autotel-devtools 27.0.0 → 27.1.0
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.
- package/README.md +11 -8
- package/dist/cli.cjs +10 -4
- package/dist/cli.js +10 -4
- package/dist/fullpage.global.js +33 -33
- package/dist/widget.global.js +14 -14
- package/package.json +3 -3
package/dist/fullpage.global.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
var AutotelDevtools=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Array.isArray,n=Array.prototype.indexOf,r=Array.prototype.includes,i=Array.from,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,c=Object.prototype,l=Array.prototype,u=Object.getPrototypeOf,d=Object.isExtensible;function f(e){return typeof e==`function`}var p=()=>{};function m(e){for(var t=0;t<e.length;t++)e[t]()}function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function g(e,t,n=!1){return e===void 0?n?t():t:e}function _(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}function v(e){"@babel/helpers - typeof";return v=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},v(e)}function y(e,t){if(v(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(v(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function b(e){var t=y(e,`string`);return v(t)==`symbol`?t:t+``}function x(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=1<<24,C=1024,w=2048,T=4096,ee=8192,te=16384,ne=32768,re=1<<25,ie=65536,ae=1<<19,oe=1<<20,se=1<<25,ce=65536,le=1<<21,E=1<<22,ue=1<<23,de=Symbol(`$state`),fe=Symbol(`legacy props`),pe=Symbol(``),me=Symbol(`attributes`),he=Symbol(`class`),ge=Symbol(`style`),_e=Symbol(`text`),ve=Symbol(`form reset`),ye=new class extends Error{constructor(...e){super(...e),x(this,`name`,`StaleReactionError`),x(this,`message`,"The reaction that called `getAbortSignal()` was re-run or destroyed")}},be=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function xe(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Se(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ce(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function we(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Te(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ee(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function De(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Oe(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ke(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ae(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function je(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Me(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ne={},Pe=Symbol(`uninitialized`),Fe=`http://www.w3.org/2000/svg`,Ie=`@attach`;function Le(){console.warn(`https://svelte.dev/e/derived_inert`)}function Re(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function ze(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Be(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var Ve=!1;function He(e){Ve=e}var Ue;function We(e){if(e===null)throw Re(),Ne;return Ue=e}function Ge(){return We(Dr(Ue))}function D(e){if(Ve){if(Dr(Ue)!==null)throw Re(),Ne;Ue=e}}function Ke(e=1){if(Ve){for(var t=e,n=Ue;t--;)n=Dr(n);Ue=n}}function qe(e=!0){for(var t=0,n=Ue;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Dr(n);e&&n.remove(),n=i}}function Je(e){if(!e||e.nodeType!==8)throw Re(),Ne;return e.data}function Ye(e){return e===this.v}function Xe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ze(e){return!Xe(e,this.v)}var Qe=null;function $e(e){Qe=e}function et(e){return st(`getContext`).get(e)}function tt(e,t){return st(`setContext`).set(e,t),t}function nt(e){return st(`hasContext`).has(e)}function rt(){return st(`getAllContexts`)}function it(e,t=!1,n){Qe={p:Qe,i:!1,c:null,e:null,s:e,x:null,r:fi,l:null}}function at(e){var t=Qe,n=t.e;if(n!==null){t.e=null;for(var r of n)Rr(r)}return e!==void 0&&(t.x=e),t.i=!0,Qe=t.p,e??{}}function ot(){return!0}function st(e){var t;return Qe===null&&xe(e),(t=Qe).c??(t.c=new Map(ct(Qe)||void 0))}function ct(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var lt=[];function ut(){var e=lt;lt=[],m(e)}function dt(e){if(lt.length===0&&!Tn){var t=lt;queueMicrotask(()=>{t===lt&&ut()})}lt.push(e)}function ft(){for(;lt.length>0;)ut()}function pt(e){var t=fi;if(t===null)return li.f|=ue,e;if(!(t.f&32768)&&!(t.f&4))throw e;mt(e,t)}function mt(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var ht=~(w|T|C);function gt(e,t){e.f=e.f&ht|t}function _t(e){e.f&512||e.deps===null?gt(e,C):gt(e,T)}function vt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=ce,vt(t.deps))}function yt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),vt(e.deps),gt(e,C)}var bt=!1;function xt(e){var t=bt;try{return bt=!1,[e(),bt]}finally{bt=t}}function St(e,t){if(t){let t=document.body;e.autofocus=!0,dt(()=>{document.activeElement===t&&e.focus()})}}var Ct=!1;function wt(){Ct||(Ct=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[ve]?.()})},{capture:!0}))}function Tt(e){var t=li,n=fi;di(null),pi(null);try{return e()}finally{di(t),pi(n)}}function Et(e,t,n,r=n){e.addEventListener(t,()=>Tt(n));let i=e[ve];e[ve]=i?()=>{i(),r(!0)}:()=>r(!0),wt()}function Dt(e){let t=0,n=dr(0),r;return()=>{Fr()&&(z(n),Wr(()=>(t===0&&(r=Pi(()=>e(()=>hr(n)))),t+=1,()=>{dt(()=>{--t,t===0&&(r?.(),r=void 0,hr(n))})})))}}function Ot(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function kt(e,t){Ot(e,t),t.add(e)}function O(e,t,n){Ot(e,t),t.set(e,n)}function k(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function A(e,t,n){return e.set(k(e,t),n),n}function j(e,t){return e.get(k(e,t))}var At=ie|ae;function jt(e,t,n,r){new Yt(e,t,n,r)}var Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,It=new WeakMap,Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,Ht=new WeakMap,Ut=new WeakMap,Wt=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,qt=new WeakMap,Jt=new WeakSet,Yt=class{constructor(e,t,n,r){kt(this,Jt),x(this,`parent`,void 0),x(this,`is_pending`,!1),x(this,`transform_error`,void 0),O(this,Mt,void 0),O(this,Nt,Ve?Ue:null),O(this,Pt,void 0),O(this,Ft,void 0),O(this,It,void 0),O(this,Lt,null),O(this,Rt,null),O(this,zt,null),O(this,Bt,null),O(this,Vt,0),O(this,Ht,0),O(this,Ut,!1),O(this,Wt,new Set),O(this,Gt,new Set),O(this,Kt,null),O(this,qt,Dt(()=>(A(Kt,this,dr(j(Vt,this))),()=>{A(Kt,this,null)}))),A(Mt,this,e),A(Pt,this,t),A(Ft,this,e=>{var t=fi;t.b=this,t.f|=128,n(e)}),this.parent=fi.b,this.transform_error=r??this.parent?.transform_error??(e=>e),A(It,this,Gr(()=>{if(Ve){let e=j(Nt,this);Ge();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));k(Jt,this,Zt).call(this,t)}else t?k(Jt,this,$t).call(this):k(Jt,this,Xt).call(this)}else k(Jt,this,en).call(this)},At)),Ve&&A(Mt,this,Ue)}defer_effect(e){yt(e,j(Wt,this),j(Gt,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!j(Pt,this).pending}update_pending_count(e,t){k(Jt,this,rn).call(this,e,t),A(Vt,this,j(Vt,this)+e),!(!j(Kt,this)||j(Ut,this))&&(A(Ut,this,!0),dt(()=>{A(Ut,this,!1),j(Kt,this)&&pr(j(Kt,this),j(Vt,this))}))}get_effect_pending(){return j(qt,this).call(this),z(j(Kt,this))}error(e){if(!j(Pt,this).onerror&&!j(Pt,this).failed)throw e;xn?.is_fork?(j(Lt,this)&&xn.skip_effect(j(Lt,this)),j(Rt,this)&&xn.skip_effect(j(Rt,this)),j(zt,this)&&xn.skip_effect(j(zt,this)),xn.oncommit(()=>{k(Jt,this,an).call(this,e)})):k(Jt,this,an).call(this,e)}};function Xt(){try{A(Lt,this,qr(()=>j(Ft,this).call(this,j(Mt,this))))}catch(e){this.error(e)}}function Zt(e){let t=j(Pt,this).failed,{reset:n,invoke_onerror:r}=k(Jt,this,Qt).call(this,e);dt(r),t&&A(zt,this,qr(()=>{t(j(Mt,this),()=>e,()=>n)}))}function Qt(e){var t=!1,n=!1;let r=()=>{if(t){Be();return}t=!0,n&&Me(),j(zt,this)!==null&&ei(j(zt,this),()=>{A(zt,this,null)}),k(Jt,this,nn).call(this,()=>{k(Jt,this,en).call(this)})};return{reset:r,invoke_onerror:()=>{try{n=!0,j(Pt,this).onerror?.(e,r),n=!1}catch(e){mt(e,j(It,this)&&j(It,this).parent)}}}}function $t(){let e=j(Pt,this).pending;e&&(this.is_pending=!0,A(Rt,this,qr(()=>e(j(Mt,this)))),dt(()=>{var e=A(Bt,this,document.createDocumentFragment()),t=Tr();e.append(t),A(Lt,this,k(Jt,this,nn).call(this,()=>qr(()=>j(Ft,this).call(this,t)))),j(Ht,this)===0&&(j(Mt,this).before(e),A(Bt,this,null),ei(j(Rt,this),()=>{A(Rt,this,null)}),k(Jt,this,tn).call(this,xn))}))}function en(){try{if(this.is_pending=this.has_pending_snippet(),A(Ht,this,0),A(Vt,this,0),A(Lt,this,qr(()=>{j(Ft,this).call(this,j(Mt,this))})),j(Ht,this)>0){var e=A(Bt,this,document.createDocumentFragment());ii(j(Lt,this),e);let t=j(Pt,this).pending;A(Rt,this,qr(()=>t(j(Mt,this))))}else k(Jt,this,tn).call(this,xn)}catch(e){this.error(e)}}function tn(e){this.is_pending=!1,e.transfer_effects(j(Wt,this),j(Gt,this))}function nn(e){var t=fi,n=li,r=Qe;pi(j(It,this)),di(j(It,this)),$e(j(It,this).ctx);try{return qn.ensure(),e()}catch(e){return pt(e),null}finally{pi(t),di(n),$e(r)}}function rn(e,t){if(!this.has_pending_snippet()){if(this.parent){var n;k(Jt,n=this.parent,rn).call(n,e,t)}return}A(Ht,this,j(Ht,this)+e),j(Ht,this)===0&&(k(Jt,this,tn).call(this,t),j(Rt,this)&&ei(j(Rt,this),()=>{A(Rt,this,null)}),j(Bt,this)&&(j(Mt,this).before(j(Bt,this)),A(Bt,this,null)))}function an(e){j(Lt,this)&&(Zr(j(Lt,this)),A(Lt,this,null)),j(Rt,this)&&(Zr(j(Rt,this)),A(Rt,this,null)),j(zt,this)&&(Zr(j(zt,this)),A(zt,this,null)),Ve&&(We(j(Nt,this)),Ke(),We(qe()));let t=j(Pt,this).failed,n=e=>{let{reset:n,invoke_onerror:r}=k(Jt,this,Qt).call(this,e);r(),t&&A(zt,this,k(Jt,this,nn).call(this,()=>{try{return qr(()=>{var r=fi;r.b=this,r.f|=128,t(j(Mt,this),()=>e,()=>n)})}catch(e){return mt(e,j(It,this).parent),null}}))};dt(()=>{var t;try{t=this.transform_error(e)}catch(e){mt(e,j(It,this)&&j(It,this).parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>mt(e,j(It,this)&&j(It,this).parent)):n(t)})}function on(e,t,n,r){let i=ot()?un:pn;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=fi,c=sn(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){mt(e,s)}cn()}}var d=ln();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>fn(e))).then(u).catch(e=>mt(e,s)).finally(d)}l?l.then(()=>{c(),f(),cn()}):f()}function sn(){var e=fi,t=li,n=Qe,r=xn;return function(i=!0){pi(e),di(t),$e(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function cn(e=!0){pi(null),di(null),$e(null),e&&xn?.deactivate()}function ln(){var e=fi,t=e.b,n=xn,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function un(e){var t=2|w;return fi!==null&&(fi.f|=ae),{ctx:Qe,deps:null,effects:null,equals:Ye,f:t,fn:e,reactions:null,rv:0,v:Pe,wv:0,parent:fi,ac:null}}var dn=Symbol(`obsolete`);function fn(e,t,n){let r=fi;r===null&&Se();var i=void 0,a=dr(Pe),o=!li,s=new Set;return Ur(()=>{var t=fi,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ye&&n.reject(e)}).finally(cn)}catch(e){n.reject(e),cn()}var c=xn;if(o){if(t.f&32768)var l=ln();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(dn);else for(let e of s.values())e.reject(dn);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==dn&&(c.activate(),t?(a.f|=ue,pr(a,t)):(a.f&8388608&&(a.f^=ue),pr(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Ir(()=>{for(let e of s)e.reject(dn)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function M(e){let t=un(e);return hi(t),t}function pn(e){let t=un(e);return t.equals=Ze,t}function mn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Zr(t[n])}}function hn(e){var t,n=fi,r=e.parent;if(!si&&r!==null&&e.v!==Pe&&r.f&24576)return Le(),e.v;pi(r);try{e.f&=~ce,mn(e),t=Di(e)}finally{pi(n)}return t}function gn(e){var t=hn(e);if(!e.equals(t)&&(e.wv=wi(),(!xn?.is_fork||e.deps===null)&&(xn===null?e.v=t:(xn.capture(e,t,!0),Sn?.capture(e,t,!0)),e.deps===null))){gt(e,C);return}si||(Cn===null?_t(e):(Fr()||xn?.is_fork)&&Cn.set(e,t))}function _n(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Tt(()=>{t.ac.abort(ye),t.ac=null}),t.fn!==null&&(t.teardown=p),ki(t,0),Yr(t))}function vn(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Ai(t)}var yn,bn=null,xn=null,Sn=null,Cn=null,wn=null,Tn=!1,En=!1,Dn=null,On=null,kn=0,An=1,jn=new WeakMap,Mn=new WeakMap,Nn=new WeakMap,Pn=new WeakMap,Fn=new WeakMap,In=new WeakMap,Ln=new WeakMap,Rn=new WeakMap,zn=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,Hn=new WeakMap,Un=new WeakMap,Wn=new WeakMap,Gn=new WeakMap,Kn=new WeakSet,qn=class e{constructor(){kt(this,Kn),x(this,`id`,An++),O(this,jn,!1),x(this,`linked`,!0),O(this,Mn,null),O(this,Nn,null),x(this,`async_deriveds`,new Map),x(this,`current`,new Map),x(this,`previous`,new Map),O(this,Pn,new Set),O(this,Fn,new Set),O(this,In,0),O(this,Ln,new Map),O(this,Rn,null),O(this,zn,[]),O(this,Bn,[]),O(this,Vn,new Set),O(this,Hn,new Set),O(this,Un,new Map),O(this,Wn,new Set),x(this,`is_fork`,!1),O(this,Gn,!1),bn===null?bn=this:(A(Nn,bn,this),A(Mn,this,bn)),bn=this}skip_effect(e){j(Un,this).has(e)||j(Un,this).set(e,{d:[],m:[]}),j(Wn,this).delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=j(Un,this).get(e);if(n){j(Un,this).delete(e);for(var r of n.d)gt(r,w),t(r);for(r of n.m)gt(r,T),t(r)}j(Wn,this).add(e)}capture(e,t,n=!1){e.v!==Pe&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),Cn?.set(e,t)),this.is_fork||(e.v=t)}activate(){xn=this}deactivate(){xn=null,Cn=null}flush(){try{En=!0,xn=this,k(Kn,this,Yn).call(this)}finally{kn=0,wn=null,Dn=null,On=null,En=!1,xn=null,Cn=null,lr.clear()}}discard(){for(let e of j(Fn,this))e(this);j(Fn,this).clear();for(let e of this.async_deriveds.values())e.reject(dn);k(Kn,this,er).call(this),j(Rn,this)?.resolve()}register_created_effect(e){j(Bn,this).push(e)}increment(e,t){if(A(In,this,j(In,this)+1),e){let e=j(Ln,this).get(t)??0;j(Ln,this).set(t,e+1)}}decrement(e,t){if(A(In,this,j(In,this)-1),e){let e=j(Ln,this).get(t)??0;e===1?j(Ln,this).delete(t):j(Ln,this).set(t,e-1)}j(Gn,this)||(A(Gn,this,!0),dt(()=>{A(Gn,this,!1),this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)j(Vn,this).add(t);for(let e of t)j(Hn,this).add(e);e.clear(),t.clear()}oncommit(e){j(Pn,this).add(e)}ondiscard(e){j(Fn,this).add(e)}settled(){return(j(Rn,this)??A(Rn,this,h())).promise}static ensure(){if(xn===null){let t=xn=new e;!En&&!Tn&&dt(()=>{j(jn,t)||t.flush()})}return xn}apply(){Cn=null}schedule(e){if(wn=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Dn!==null&&t===fi&&(li===null||!(li.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=C}}j(zn,this).push(t)}};yn=qn;function Jn(){if(this.is_fork)return!0;for(let n of j(Ln,this).keys()){for(var e=n,t=!1;e.parent!==null;){if(j(Un,this).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}function Yn(){A(jn,this,!0),kn++>1e3&&(k(Kn,this,er).call(this),nr());for(let e of j(Vn,this))j(Hn,this).delete(e),gt(e,w),this.schedule(e);for(let e of j(Hn,this))gt(e,T),this.schedule(e);let e=j(zn,this);A(zn,this,[]),this.apply();var t=Dn=[],n=[],r=On=[];for(let r of e)try{k(Kn,this,Xn).call(this,r,t,n)}catch(e){throw sr(r),k(Kn,this,Jn).call(this)||this.discard(),e}if(xn=null,r.length>0){var i=yn.ensure();for(let e of r)i.schedule(e)}if(Dn=null,On=null,k(Kn,this,Jn).call(this)){k(Kn,this,$n).call(this,n),k(Kn,this,$n).call(this,t);for(let[e,t]of j(Un,this))or(e,t);r.length>0&&k(Kn,xn,Yn).call(xn);return}let a=k(Kn,this,Zn).call(this);if(a){k(Kn,this,$n).call(this,n),k(Kn,this,$n).call(this,t),k(Kn,a,Qn).call(a,this);return}j(Vn,this).clear(),j(Hn,this).clear();for(let e of j(Pn,this))e(this);j(Pn,this).clear(),Sn=this,ir(n),ir(t),Sn=null,j(Rn,this)?.resolve();var o=xn;if(j(In,this)===0&&(j(zn,this).length===0||o!==null)&&k(Kn,this,er).call(this),j(zn,this).length>0){if(o!==null){let e=o;j(zn,e).push(...j(zn,this).filter(t=>!j(zn,e).includes(t)))}else o=this}o!==null&&k(Kn,o,Yn).call(o)}function Xn(e,t,n){e.f^=C;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||j(Un,this).has(r))&&r.fn!==null){a?r.f^=C:i&4?t.push(r):Ti(r)&&(i&16&&j(Hn,this).add(r),Ai(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}function Zn(){for(var e=j(Mn,this);e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=j(Mn,e)}return null}function Qn(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(j(Vn,e),j(Hn,e));let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(j(Hn,this).delete(i),gt(i,w),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),k(Kn,e,er).call(e),xn=this,k(Kn,this,Yn).call(this)}function $n(e){for(var t=0;t<e.length;t+=1)yt(e[t],j(Vn,this),j(Hn,this))}function er(){if(this.linked){var e=j(Mn,this),t=j(Nn,this);e===null||A(Nn,e,t),t===null?bn=e:A(Mn,t,e),this.linked=!1}}function tr(e){var t=Tn;Tn=!0;try{var n;for(e&&(xn!==null&&!xn.is_fork&&xn.flush(),n=e());;){if(ft(),xn===null)return n;xn.flush()}}finally{Tn=t}}function nr(){try{De()}catch(e){mt(e,wn)}}var rr=null;function ir(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Ti(r)&&(rr=new Set,Ai(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&$r(r),rr?.size>0)){lr.clear();for(let e of rr){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)rr.has(n)&&(rr.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Ai(n)}}rr.clear()}}rr=null}}function ar(e){xn.schedule(e)}function or(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),gt(e,C);for(var n=e.first;n!==null;)or(n,t),n=n.next}}function sr(e){gt(e,C);for(var t=e.first;t!==null;)sr(t),t=t.next}var cr=new Set,lr=new Map,ur=!1;function dr(e,t){return{f:0,v:e,reactions:null,equals:Ye,rv:0,wv:0}}function N(e,t){let n=dr(e,t);return hi(n),n}function fr(e,t=!1,n=!0){let r=dr(e);return t||(r.equals=Ze),r}function P(e,t,n=!1){return li!==null&&(!ui||li.f&131072)&&ot()&&li.f&4325394&&(mi===null||!mi.has(e))&&je(),pr(e,n?_r(t):t,On)}function pr(e,t,n=null){if(!e.equals(t)){lr.set(e,si?t:e.v);var r=qn.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&hn(t),Cn===null&&_t(t)}e.wv=wi(),gr(e,w,n),ot()&&fi!==null&&fi.f&1024&&!(fi.f&96)&&(vi===null?yi([e]):vi.push(e)),!r.is_fork&&cr.size>0&&!ur&&mr()}return t}function mr(){ur=!1;for(let e of cr){e.f&1024&>(e,T);let t;try{t=Ti(e)}catch{t=!0}t&&Ai(e)}cr.clear()}function hr(e){P(e,e.v+1)}function gr(e,t,n){var r=e.reactions;if(r!==null)for(var i=ot(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===fi)){var l=(c&w)===0;if(l&>(s,t),c&131072)cr.add(s);else if(c&2){var u=s;Cn?.delete(u),c&65536||(c&512&&(fi===null||!(fi.f&2097152))&&(s.f|=ce),gr(u,T,n))}else if(l){var d=s;c&16&&rr!==null&&rr.add(d),n===null?ar(d):n.push(d)}}}}function _r(e){if(typeof e!=`object`||!e||de in e)return e;let n=u(e);if(n!==c&&n!==l)return e;var r=new Map,i=t(e),a=N(0),s=null,d=Si,f=e=>{if(Si===d)return e();var t=li,n=Si;di(null),Ci(d);var r=e();return di(t),Ci(n),r};return i&&r.set(`length`,N(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ke();var i=r.get(t);return i===void 0?f(()=>{var e=N(n.value,s);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>N(Pe,s));r.set(t,e),hr(a)}}else P(n,Pe),hr(a);return!0},get(t,n,i){if(n===de)return e;var a=r.get(n),c=n in t;if(a===void 0&&(!c||o(t,n)?.writable)&&(a=f(()=>N(_r(c?t[n]:Pe),s)),r.set(n,a)),a!==void 0){var l=z(a);return l===Pe?void 0:l}return Reflect.get(t,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=z(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==Pe)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===de)return!0;var n=r.get(t),i=n!==void 0&&n.v!==Pe||Reflect.has(e,t);return(n!==void 0||fi!==null&&(!i||o(e,t)?.writable))&&(n===void 0&&(n=f(()=>N(i?_r(e[t]):Pe,s)),r.set(t,n)),z(n)===Pe)?!1:i},set(e,t,n,c){var l=r.get(t),u=t in e;if(i&&t===`length`)for(var d=n;d<l.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>N(Pe,s)),r.set(d+``,p)):P(p,Pe)}if(l===void 0)(!u||o(e,t)?.writable)&&(l=f(()=>N(void 0,s)),P(l,_r(n)),r.set(t,l));else{u=l.v!==Pe;var m=f(()=>_r(n));P(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,n),!u){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&P(g,_+1)}hr(a)}return!0},ownKeys(e){z(a);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==Pe});for(var[n,i]of r)i.v!==Pe&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Ae()}})}function vr(e){try{if(typeof e==`object`&&e&&de in e)return e[de]}catch{}return e}function yr(e,t){return Object.is(vr(e),vr(t))}var br,xr,Sr,Cr;function wr(){if(br===void 0){br=window,xr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Sr=o(t,`firstChild`).get,Cr=o(t,`nextSibling`).get,d(e)&&(e[he]=void 0,e[me]=null,e[ge]=void 0,e.__e=void 0),d(n)&&(n[_e]=void 0)}}function Tr(e=``){return document.createTextNode(e)}function Er(e){return Sr.call(e)}function Dr(e){return Cr.call(e)}function F(e,t){if(!Ve)return Er(e);var n=Er(Ue);if(n===null)n=Ue.appendChild(Tr());else if(t&&n.nodeType!==3){var r=Tr();return n?.before(r),We(r),r}return t&&jr(n),We(n),n}function I(e,t=!1){if(!Ve){var n=Er(e);return n instanceof Comment&&n.data===``?Dr(n):n}if(t){if(Ue?.nodeType!==3){var r=Tr();return Ue?.before(r),We(r),r}jr(Ue)}return Ue}function L(e,t=1,n=!1){let r=Ve?Ue:e;for(var i;t--;)i=r,r=Dr(r);if(!Ve)return r;if(n){if(r?.nodeType!==3){var a=Tr();return r===null?i?.after(a):r.before(a),We(a),a}jr(r)}return We(r),r}function Or(e){e.textContent=``}function kr(){return!1}function Ar(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function jr(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Mr(e){fi===null&&(li===null&&Ee(e),Te()),si&&we(e)}function Nr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Pr(e,t){var n=fi;n!==null&&n.f&8192&&(e|=ee);var r={ctx:Qe,deps:null,nodes:null,f:e|w|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};xn?.register_created_effect(r);var i=r;if(e&4)Dn===null?qn.ensure().schedule(r):Dn.push(r);else if(t!==null){try{Ai(r)}catch(e){throw Zr(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ie))}if(i!==null&&(i.parent=n,n!==null&&Nr(i,n),li!==null&&li.f&2&&!(e&64))){var a=li;(a.effects??(a.effects=[])).push(i)}return r}function Fr(){return li!==null&&!ui}function Ir(e){let t=Pr(8,null);return gt(t,C),t.teardown=e,t}function Lr(e){Mr(`$effect`);var t=fi.f;if(!li&&t&32&&Qe!==null&&!Qe.i){var n=Qe;(n.e??(n.e=[])).push(e)}else return Rr(e)}function Rr(e){return Pr(4|oe,e)}function zr(e){return Mr(`$effect.pre`),Pr(8|oe,e)}function Br(e){qn.ensure();let t=Pr(64|ae,e);return()=>{Zr(t)}}function Vr(e){qn.ensure();let t=Pr(64|ae,e);return(e={})=>new Promise(n=>{e.outro?ei(t,()=>{Zr(t),n(void 0)}):(Zr(t),n(void 0))})}function Hr(e){return Pr(4,e)}function Ur(e){return Pr(E|ae,e)}function Wr(e,t=0){return Pr(8|t,e)}function R(e,t=[],n=[],r=[]){on(r,t,n,t=>{Pr(8,()=>{e(...t.map(z))})})}function Gr(e,t=0){return Pr(16|t,e)}function Kr(e,t=0){return Pr(S|t,e)}function qr(e){return Pr(32|ae,e)}function Jr(e){var t=e.teardown;if(t!==null){let e=si,n=li;ci(!0),di(null);try{t.call(null)}finally{ci(e),di(n)}}}function Yr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Tt(()=>{e.abort(ye)});var r=n.next;n.f&64?n.parent=null:Zr(n,t),n=r}}function Xr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Zr(t),t=n}}function Zr(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Qr(e.nodes.start,e.nodes.end),n=!0),e.f|=re,Yr(e,t&&!n),ki(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Jr(e),e.f^=re,e.f|=te;var i=e.parent;i!==null&&i.first!==null&&$r(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Qr(e,t){for(;e!==null;){var n=e===t?null:Dr(e);e.remove(),e=n}}function $r(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function ei(e,t,n=!0){var r=[];ti(e,r,!0);var i=()=>{n&&Zr(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function ti(e,t,n){if(!(e.f&8192)){e.f^=ee;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);ti(i,t,o?n:!1)}i=a}}}function ni(e){ri(e,!0)}function ri(e,t){if(e.f&8192){e.f^=ee,e.f&1024||(gt(e,w),qn.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);ri(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function ii(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Dr(n);t.append(n),n=i}}var ai=null,oi=!1,si=!1;function ci(e){si=e}var li=null,ui=!1;function di(e){li=e}var fi=null;function pi(e){fi=e}var mi=null;function hi(e){li!==null&&(mi??(mi=new Set)).add(e)}var gi=null,_i=0,vi=null;function yi(e){vi=e}var bi=1,xi=0,Si=xi;function Ci(e){Si=e}function wi(){return++bi}function Ti(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~ce),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Ti(a)&&gn(a),a.wv>e.wv)return!0}t&512&&Cn===null&>(e,C)}return!1}function Ei(e,t,n=!0){var r=e.reactions;if(r!==null&&!(mi!==null&&mi.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Ei(a,t,!1):t===a&&(n?gt(a,w):a.f&1024&>(a,T),ar(a))}}function Di(e){var t=gi,n=_i,r=vi,i=li,a=mi,o=Qe,s=ui,c=Si,l=e.f;gi=null,_i=0,vi=null,li=l&96?null:e,mi=null,$e(e.ctx),ui=!1,Si=++xi,e.ac!==null&&(Tt(()=>{e.ac.abort(ye)}),e.ac=null);try{e.f|=le;var u=e.fn,d=u();e.f|=ne;var f=e.deps,p=xn?.is_fork;if(gi!==null){var m;if(p||ki(e,_i),f!==null&&_i>0)for(f.length=_i+gi.length,m=0;m<gi.length;m++)f[_i+m]=gi[m];else e.deps=f=gi;if(Fr()&&e.f&512)for(m=_i;m<f.length;m++){var h;((h=f[m]).reactions??(h.reactions=[])).push(e)}}else!p&&f!==null&&_i<f.length&&(ki(e,_i),f.length=_i);if(ot()&&vi!==null&&!ui&&f!==null&&!(e.f&6146))for(m=0;m<vi.length;m++)Ei(vi[m],e);if(i!==null&&i!==e){if(xi++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=xi;if(t!==null)for(let e of t)e.rv=xi;vi!==null&&(r===null?r=vi:r.push(...vi))}return e.f&8388608&&(e.f^=ue),d}catch(e){return pt(e)}finally{e.f^=le,gi=t,_i=n,vi=r,li=i,mi=a,$e(o),ui=s,Si=c}}function Oi(e,t){let i=t.reactions;if(i!==null){var a=n.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=t.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&t.f&2&&(gi===null||!r.call(gi,t))){var s=t;s.f&512&&(s.f^=512,s.f&=~ce),s.v!==Pe&&_t(s),s.ac!==null&&Tt(()=>{s.ac.abort(ye),s.ac=null,gt(s,w)}),_n(s),ki(s,0)}}function ki(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Oi(e,n[r])}function Ai(e){var t=e.f;if(!(t&16384)){gt(e,C);var n=fi,r=oi;fi=e,oi=!(t&96);try{t&16777232?Xr(e):Yr(e),Jr(e);var i=Di(e);e.teardown=typeof i==`function`?i:null,e.wv=bi}finally{oi=r,fi=n}}}async function ji(){await Promise.resolve(),tr()}function z(e){var t=!!(e.f&2);if(ai?.add(e),li!==null&&!ui&&!(fi!==null&&fi.f&16384)&&(mi===null||!mi.has(e))){var n=li.deps;if(li.f&2097152)e.rv<xi&&(e.rv=xi,gi===null&&n!==null&&n[_i]===e?_i++:gi===null?gi=[e]:gi.push(e));else{var i;(i=li).deps??(i.deps=[]),r.call(li.deps,e)||li.deps.push(e);var a=e.reactions;a===null?e.reactions=[li]:r.call(a,li)||a.push(li)}}if(si&&lr.has(e))return lr.get(e);if(t){var o=e;if(si){var s=o.v;return(!(o.f&1024)&&o.reactions!==null||Ni(o))&&(s=hn(o)),lr.set(o,s),s}var c=!(o.f&512)&&!ui&&li!==null&&(oi||!!(li.f&512)),l=(o.f&ne)===0;Ti(o)&&(c&&(o.f|=512),gn(o)),c&&!l&&(vn(o),Mi(o))}if(Cn?.has(e))return Cn.get(e);if(e.f&8388608)throw e.v;return e.v}function Mi(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&2&&!(t.f&512)&&(vn(t),Mi(t))}function Ni(e){if(e.v===Pe)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(lr.has(t)||t.f&2&&Ni(t))return!0;return!1}function Pi(e){var t=ui;try{return ui=!0,e()}finally{ui=t}}function Fi(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(de in e)Ii(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&de in n&&Ii(n)}}}function Ii(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Ii(e[n],t)}catch{}let n=u(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=s(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}function Li(){return Symbol(Ie)}function Ri(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var zi=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function Bi(e){return zi.includes(e)}var Vi=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),Hi={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function Ui(e){return e=e.toLowerCase(),Hi[e]??e}[...Vi];var Wi=[`touchstart`,`touchmove`];function Gi(e){return Wi.includes(e)}var Ki=[`textarea`,`script`,`style`,`title`];function qi(e){return Ki.includes(e)}var Ji=Symbol(`events`),Yi=new Set,Xi=new Set;function Zi(e,t,n,r={}){function i(e){if(r.capture||na.call(t,e),!e.cancelBubble)return Tt(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?dt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Qi(e,t,n,r={}){var i=Zi(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function $i(e,t,n,r,i){var a={capture:r,passive:i},o=Zi(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ir(()=>{t.removeEventListener(e,o,a)})}function B(e,t,n){(t[Ji]??(t[Ji]={}))[e]=n}function ea(e){for(var t=0;t<e.length;t++)Yi.add(e[t]);for(var n of Xi)n(e)}var ta=null;function na(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;ta=e;var s=0,c=ta===e&&e[Ji];if(c){var l=i.indexOf(c);if(l!==-1&&(t===document||t===window)){e[Ji]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=i[s]||e.target,o!==t){a(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=li,f=fi;di(null),pi(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[Ji]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<i.length?i[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Ji]=t,delete e.currentTarget,di(d),pi(f)}}}var ra=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function ia(e){return ra?.createHTML(e)??e}function aa(e){var t=Ar(`template`);return t.innerHTML=ia(e.replaceAll(`<!>`,`<!---->`)),t.content}function oa(e,t){var n=fi;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(Ve)return oa(Ue,null),Ue;i===void 0&&(i=aa(a?e:`<!>`+e),n||(i=Er(i)));var t=r||xr?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Er(t),s=t.lastChild;oa(o,s)}else oa(t,t);return t}}function sa(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(Ve)return oa(Ue,null),Ue;if(!o){var e=Er(aa(a));if(i)for(o=document.createDocumentFragment();Er(e);)o.appendChild(Er(e));else o=Er(e)}var t=o.cloneNode(!0);if(i){var n=Er(t),r=t.lastChild;oa(n,r)}else oa(t,t);return t}}function ca(e,t){return sa(e,t,`svg`)}function la(){if(Ve)return oa(Ue,null),Ue;var e=document.createDocumentFragment(),t=document.createComment(``),n=Tr();return e.append(t,n),oa(t,n),e}function H(e,t){if(Ve){var n=fi;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=Ue),Ge();return}e!==null&&e.before(t)}function ua(){var e,t;if(Ve&&Ue&&Ue.nodeType===8&&Ue.textContent?.startsWith(`$`)){let e=Ue.textContent.substring(1);return Ge(),e}return(e=(t=window).__svelte??(t.__svelte={})).uid??(e.uid=1),`c${window.__svelte.uid++}`}var da=!0;function fa(e){da=e}function U(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[_e]??(e[_e]=e.nodeValue))&&(e[_e]=n,e.nodeValue=`${n}`)}function pa(e,t){return ha(e,t)}var ma=new Map;function ha(e,{target:t,anchor:n,props:r={},events:a,context:o,intro:s=!0,transformError:c}){wr();var l=void 0,u=Vr(()=>{var u=n??t.appendChild(Tr());jt(u,{pending:()=>{}},t=>{it({});var n=Qe;if(o&&(n.c=o),a&&(r.$$events=a),Ve&&oa(t,null),da=s,l=e(t,r)||{},da=!0,Ve&&(fi.nodes.end=Ue,Ue===null||Ue.nodeType!==8||Ue.data!==`]`))throw Re(),Ne;at()},c);var d=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!d.has(r)){d.add(r);var i=Gi(r);for(let e of[t,document]){var a=ma.get(e);a===void 0&&(a=new Map,ma.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,na,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(i(Yi)),Xi.add(f),()=>{for(var e of d)for(let n of[t,document]){var r=ma.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,na),r.delete(e),r.size===0&&ma.delete(n)):r.set(e,i)}Xi.delete(f),u!==n&&u.parentNode?.removeChild(u)}});return ga.set(l,u),l}var ga=new WeakMap;function _a(e,t){let n=ga.get(e);return n?(ga.delete(e),n(t)):Promise.resolve()}var va=new WeakMap,ya=new WeakMap,ba=new WeakMap,xa=new WeakMap,Sa=new WeakMap,Ca=new WeakMap,wa=new WeakMap,Ta=class{constructor(e,t=!0){x(this,`anchor`,void 0),O(this,va,new Map),O(this,ya,new Map),O(this,ba,new Map),O(this,xa,new Set),O(this,Sa,!0),O(this,Ca,e=>{if(j(va,this).has(e)){var t=j(va,this).get(e),n=j(ya,this).get(t);if(n)ni(n),j(xa,this).delete(t);else{var r=j(ba,this).get(t);r&&(ni(r.effect),j(ya,this).set(t,r.effect),j(ba,this).delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of j(va,this)){if(j(va,this).delete(t),t===e)break;let r=j(ba,this).get(n);r&&(Zr(r.effect),j(ba,this).delete(n))}for(let[e,r]of j(ya,this)){if(e===t||j(xa,this).has(e))continue;let i=()=>{if(Array.from(j(va,this).values()).includes(e)){var t=document.createDocumentFragment();ii(r,t),t.append(Tr()),j(ba,this).set(e,{effect:r,fragment:t})}else Zr(r);j(xa,this).delete(e),j(ya,this).delete(e)};j(Sa,this)||!n?(j(xa,this).add(e),ei(r,i,!1)):i()}}}),O(this,wa,e=>{j(va,this).delete(e);let t=Array.from(j(va,this).values());for(let[e,n]of j(ba,this))t.includes(e)||(Zr(n.effect),j(ba,this).delete(e))}),this.anchor=e,A(Sa,this,t)}ensure(e,t){var n=xn,r=kr();if(t&&!j(ya,this).has(e)&&!j(ba,this).has(e)){if(r){var i=document.createDocumentFragment(),a=Tr();i.append(a),j(ba,this).set(e,{effect:qr(()=>t(a)),fragment:i})}else j(ya,this).set(e,qr(()=>t(this.anchor)))}if(j(va,this).set(n,e),r){for(let[t,r]of j(ya,this))t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of j(ba,this))t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(j(Ca,this)),n.ondiscard(j(wa,this))}else Ve&&(this.anchor=Ue),j(Ca,this).call(this,n)}};function W(e,t,n=!1){var r;Ve&&(r=Ue,Ge());var i=new Ta(e),a=n?ie:0;function o(e,t){if(Ve){var n=Je(r);if(e!==parseInt(n.substring(1))){var a=qe();We(a),i.anchor=a,He(!1),i.ensure(e,t),He(!0);return}}i.ensure(e,t)}Gr(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var Ea=Symbol(`NaN`);function Da(e,t,n){Ve&&Ge();var r=new Ta(e),i=!ot();Gr(()=>{var e=t();e!==e&&(e=Ea),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function Oa(e,t){return t}function ka(e,t,n){for(var r=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];ei(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;Aa(e,i(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=r.length===0&&n!==null;if(l){var u=n,d=u.parentNode;Or(d),d.append(u),e.items.clear()}Aa(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function Aa(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=se,ii(a,document.createDocumentFragment())):Zr(t[i],n)}}var ja;function G(e,n,r,a,o,s=null){var c=e,l=new Map;if(n&4){var u=e;c=Ve?We(Er(u)):u.appendChild(Tr())}Ve&&Ge();var d=null,f=pn(()=>{var e=r();return t(e)?e:e==null?[]:i(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,Na(v,p,c,n,a),d!==null&&(p.length===0?d.f&33554432?(d.f^=se,Fa(d,null,c)):ni(d):ei(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:Gr(()=>{p=z(f);var e=p.length;let t=!1;Ve&&Je(c)===`[!`!=(e===0)&&(c=qe(),We(c),He(!1),t=!0);for(var i=new Set,u=xn,v=kr(),y=0;y<e;y+=1){Ve&&Ue.nodeType===8&&Ue.data===`]`&&(c=Ue,t=!0,He(!1));var b=p[y],x=a(b,y),S=h?null:l.get(x);S?(S.v&&pr(S.v,b),S.i&&pr(S.i,y),v&&u.unskip_effect(S.e)):(S=Pa(l,h?c:ja??(ja=Tr()),b,x,y,o,n,r),h||(S.e.f|=se),l.set(x,S)),i.add(x)}if(e===0&&s&&!d&&(h?d=qr(()=>s(c)):(d=qr(()=>s(ja??(ja=Tr()))),d.f|=se)),e>i.size&&Ce(``,``,``),Ve&&e>0&&We(qe()),!h){if(m.set(u,i),v){for(let[e,t]of l)i.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u)}t&&He(!0),z(f)}),flags:n,items:l,pending:m,outrogroups:null,fallback:d};h=!1,Ve&&(c=Ue)}function Ma(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Na(e,t,n,r,a){var o=!!(r&8),s=t.length,c=e.items,l=Ma(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??(f=new Set)).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(ni(_),o&&(_.nodes?.a?.unfix(),(f??(f=new Set)).delete(_))),_.f&33554432){if(_.f^=se,_===l)Fa(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ia(e,d,_),Ia(e,_,y),Fa(_,y,n),d=_,p=[],m=[],l=Ma(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)Fa(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Ia(e,S.prev,C.next),Ia(e,d,S),Ia(e,C,b),l=b,d=C,--v,p=[],m=[]}else u.delete(_),Fa(_,l,n),Ia(e,_.prev,_.next),Ia(e,_,d===null?e.effect.first:d.next),Ia(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??(u=new Set)).add(l),m.push(l),l=Ma(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Ma(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Aa(e,i(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=Ma(l.next);var T=w.length;if(T>0){var ee=r&4&&s===0?n:null;if(o){for(v=0;v<T;v+=1)w[v].nodes?.a?.measure();for(v=0;v<T;v+=1)w[v].nodes?.a?.fix()}ka(e,w,ee)}}o&&dt(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Pa(e,t,n,r,i,a,o,s){var c=o&1?o&16?dr(n):fr(n,!1,!1):null,l=o&2?dr(i):null;return{v:c,i:l,e:qr(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Fa(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Dr(r);if(a.before(r),r===i)return;r=o}}function Ia(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function La(e,t,...n){var r=new Ta(e);Gr(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ie)}function Ra(e,t,n){var r;Ve&&(r=Ue,Ge());var i=new Ta(e);Gr(()=>{var e=t()??null;if(Ve&&Je(r)===`[`!=(e!==null)){var a=qe();We(a),i.anchor=a,He(!1),i.ensure(e,e&&(t=>n(t,e))),He(!0);return}i.ensure(e,e&&(t=>n(t,e)))},ie)}var za=()=>performance.now(),Ba={tick:e=>requestAnimationFrame(e),now:()=>za(),tasks:new Set};function Va(){let e=Ba.now();Ba.tasks.forEach(t=>{t.c(e)||(Ba.tasks.delete(t),t.f())}),Ba.tasks.size!==0&&Ba.tick(Va)}function Ha(e){let t;return Ba.tasks.size===0&&Ba.tick(Va),{promise:new Promise(n=>{Ba.tasks.add(t={c:e,f:n})}),abort(){Ba.tasks.delete(t)}}}function Ua(e,t){Tt(()=>{e.dispatchEvent(new CustomEvent(t))})}function Wa(e){if(e===`float`)return`cssFloat`;if(e===`offset`)return`cssOffset`;if(e.startsWith(`--`))return e;let t=e.split(`-`);return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}function Ga(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=Wa(n.trim());t[i]=r.trim()}return t}var Ka=e=>e;function qa(e,t,n,r){var i,a=!!(e&1),o=!!(e&2),s=a&&o,c=!!(e&4),l=s?`both`:a?`in`:`out`,u,d=t.inert,f=t.style.overflow,p,m;function h(){return Tt(()=>u??(u=n()(t,r?.()??{},{direction:l})))}var g={is_global:c,in(){if(t.inert=d,!a){m?.abort(),m?.reset?.();return}o||p?.abort(),p=Ja(t,h(),m,1,()=>{Ua(t,`introstart`)},()=>{Ua(t,`introend`),p?.abort(),p=u=void 0,t.style.overflow=f})},out(e){if(!o){e?.(),u=void 0;return}t.inert=!0,m=Ja(t,h(),p,0,()=>{Ua(t,`outrostart`)},()=>{Ua(t,`outroend`),e?.()})},stop:()=>{p?.abort(),m?.abort()}},_=fi;if(((i=_.nodes).t??(i.t=[])).push(g),a&&da){var v=c;if(!v){for(var y=_.parent;y&&y.f&65536;)for(;(y=y.parent)&&!(y.f&16););v=!y||!!(y.f&32768)}v&&Hr(()=>{Pi(()=>g.in())})}}function Ja(e,t,n,r,i,a){var o=r===1;if(f(t)){var s,c=!1;return dt(()=>{c||(s=Ja(e,t({direction:o?`in`:`out`}),n,r,i,a))}),{abort:()=>{c=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(n?.deactivate(),!t?.duration&&!t?.delay)return i(),a(),{abort:p,deactivate:p,reset:p,t:()=>r};let{delay:l=0,css:u,tick:d,easing:m=Ka}=t;var h=[];if(o&&n===void 0&&(d&&d(0,1),u)){var g=Ga(u(0,1));h.push(g,g)}var _=()=>1-r,v=e.animate(h,{duration:l,fill:`forwards`});return v.onfinish=()=>{v.cancel(),i();var o=n?.t()??1-r;n?.abort();var s=r-o,c=t.duration*Math.abs(s),l=[];if(c>0){var f=!1;if(u)for(var p=Math.ceil(c/(1e3/60)),h=0;h<=p;h+=1){var g=o+s*m(h/p),y=Ga(u(g,1-g));l.push(y),f||(f=y.overflow===`hidden`)}f&&(e.style.overflow=`hidden`),_=()=>{var e=v.currentTime;return o+s*m(e/c)},d&&Ha(()=>{if(v.playState!==`running`)return!1;var e=_();return d(e,1-e),!0})}v=e.animate(l,{duration:c,fill:`forwards`}),v.onfinish=()=>{_=()=>r,d?.(r,1-r),a()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=p)},deactivate:()=>{a=p},reset:()=>{r===0&&d?.(1,0)},t:()=>_()}}function Ya(e,t,n,r,i,a){let o=Ve;Ve&&Ge();var s=null;Ve&&Ue.nodeType===1&&(s=Ue,Ge());var c=Ve?Ue:e,l=new Ta(c,!1);Gr(()=>{let e=t()||null;var a=i?i():n||e===`svg`?Fe:void 0;if(e===null){l.ensure(null,null),fa(!0);return}return l.ensure(e,t=>{if(e){if(s=Ve?s:Ar(e,a),oa(s,s),r){var n=null;Ve&&qi(e)&&s.append(n=document.createComment(``));var i=Ve?Er(s):s.appendChild(Tr());Ve&&(i===null?He(!1):We(i)),r(s,i),n?.remove()}fi.nodes.end=s,t.before(s)}Ve&&We(t)}),fa(!0),()=>{e&&fa(!1)}},ie),Ir(()=>{fa(!0)}),o&&(He(!0),We(c))}function Xa(e,t,n){Hr(()=>{var r=Pi(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};Wr(()=>{var e=n();Fi(e),i&&Xe(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function Za(e,t){var n=void 0,r;Kr(()=>{n!==(n=t())&&(r&&(Zr(r),r=null),n&&(r=qr(()=>{Hr(()=>n(e))})))})}function Qa(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Qa(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function $a(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Qa(e))&&(r&&(r+=` `),r+=t);return r}function K(e){return typeof e==`object`?$a(e):e??``}var eo=[...`
|
|
2
|
-
\r\f\xA0\v`];function to(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||eo.includes(r[o-1]))&&(s===r.length||eo.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function no(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function ro(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function io(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(ro)),i&&c.push(...Object.keys(i).map(ro));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=ro(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=no(r)),i&&(n+=no(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function q(e,t,n,r,i,a){var o=e[he];if(Ve||o!==n||o===void 0){var s=to(n,r,a);(!Ve||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[he]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function ao(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function oo(e,t,n,r){var i=e[ge];if(Ve||i!==t){var a=io(t,r);(!Ve||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[ge]=t}else r&&(Array.isArray(r)?(ao(e,n?.[0],r[0]),ao(e,n?.[1],r[1],`important`)):ao(e,n,r));return r}function so(e,n,r=!1){if(e.multiple){if(n==null)return;if(!t(n))return ze();for(var i of e.options)i.selected=n.includes(uo(i));return}for(i of e.options)if(yr(uo(i),n)){i.selected=!0;return}(!r||n!==void 0)&&(e.selectedIndex=-1)}function co(e){var t=new MutationObserver(()=>{`__value`in e&&so(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Ir(()=>{t.disconnect()})}function lo(e,t,n=t){var r=new WeakSet,i=!0;Et(e,`change`,t=>{var i=t?`[selected]`:`:checked`,a;if(e.multiple)a=[].map.call(e.querySelectorAll(i),uo);else{var o=e.querySelector(i)??e.querySelector(`option:not([disabled])`);a=o&&uo(o)}n(a),e.__value=a,xn!==null&&r.add(xn)}),Hr(()=>{var a=t();if(e===document.activeElement){var o=xn;if(r.has(o))return}if(so(e,a,i),i&&a===void 0){var s=e.querySelector(`:checked`);s!==null&&(a=uo(s),n(a))}e.__value=a,i=!1}),co(e)}function uo(e){return`__value`in e?e.__value:e.value}var fo=Symbol(`class`),po=Symbol(`style`),mo=Symbol(`is custom element`),ho=Symbol(`is html`),go=be?`link`:`LINK`,_o=be?`input`:`INPUT`,vo=be?`option`:`OPTION`,yo=be?`select`:`SELECT`,bo=be?`progress`:`PROGRESS`;function xo(e){if(Ve){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;J(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;J(e,`checked`,null),e.checked=r}}};e[ve]=n,dt(n),wt()}}function So(e,t){var n=Do(e);n.value!==(n.value=t??void 0)&&(e.value!==t||t===0&&e.nodeName===bo)&&(e.value=t??``)}function Co(e,t){var n=Do(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function wo(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function J(e,t,n,r){var i=Do(e);Ve&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===go)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[pe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ko(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function To(e,t,n,r,i=!1,a=!1){if(Ve&&i&&e.nodeName===_o){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||xo(o)}var s=Do(e),c=s[mo],l=!s[ho];let u=Ve&&c;u&&He(!1);var d=t||{},f=e.nodeName===vo;for(var p in t)p in n||(n[p]=null);n.class?n.class=K(n.class):(r||n[fo])&&(n.class=null),n[po]&&(n.style??(n.style=null));var m=ko(e);if(e.nodeName===_o&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==d.type||h===void 0&&e.hasAttribute(`type`))&&(d.type=h,J(e,`type`,h,a))}for(let i in n){let o=n[i];if(f&&i===`value`&&o==null){e.value=e.__value=``,d[i]=o;continue}if(i===`class`){q(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[fo],n[fo]),d[i]=o,d[fo]=n[fo];continue}if(i===`style`){oo(e,o,t?.[po],n[po]),d[i]=o,d[po]=n[po];continue}var g=d[i];if(!(o===g&&!(o===void 0&&e.hasAttribute(i)))){d[i]=o;var _=i[0]+i[1];if(_!==`$$`){if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=Bi(r);if(Ri(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(o!=null)continue;e.removeEventListener(r,d[n],t),d[n]=null}if(v)B(r,e,o),ea([r]);else if(o!=null){function y(e){d[i].call(this,e)}d[n]=Zi(r,e,y,t)}}else if(i===`style`)J(e,i,o);else if(i===`autofocus`)St(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&f)wo(e,o);else{var b=i;l||(b=Ui(b));var x=b===`defaultValue`||b===`defaultChecked`;if(o==null&&!c&&!x){if(s[i]=null,b===`value`||b===`checked`){let n=e,r=t===void 0;if(b===`value`){let e=n.defaultValue;n.removeAttribute(b),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(b),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i)}else x||m.includes(b)&&(c||typeof o!=`string`)?(e[b]=o,b in s&&(s[b]=Pe)):typeof o!=`function`&&J(e,b,o,a)}}}}return u&&He(!0),d}function Eo(e,t,n=[],r=[],i=[],a,o=!1,s=!1){on(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===yo,l=!1;if(Kr(()=>{var u=t(...n.map(z)),d=To(e,r,u,a,o,s);l&&c&&`value`in u&&so(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||Zr(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&Zr(i[t]),i[t]=qr(()=>Za(e,()=>f))),d[t]=f}r=d}),c){var u=e;Hr(()=>{so(u,r.value,!0),co(u)})}l=!0})}function Do(e){return e[me]??(e[me]={[mo]:e.nodeName.includes(`-`),[ho]:e.namespaceURI===`http://www.w3.org/1999/xhtml`})}var Oo=new Map;function ko(e){var t=e.getAttribute(`is`)||e.nodeName,n=Oo.get(t);if(n)return n;Oo.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=s(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=u(i)}return n}function Ao(e,t,n=t){var r=new WeakSet;Et(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=jo(e)?Mo(a):a,n(a),xn!==null&&r.add(xn),await ji(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(Ve&&e.defaultValue!==e.value||Pi(t)==null&&e.value)&&(n(jo(e)?Mo(e.value):e.value),xn!==null&&r.add(xn)),Wr(()=>{var n=t();if(e===document.activeElement){var i=xn;if(r.has(i))return}jo(e)&&n===Mo(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function jo(e){var t=e.type;return t===`number`||t===`range`}function Mo(e){return e===``?null:+e}var No,Po=new WeakMap,Fo=new WeakMap,Io=new WeakMap,Lo=new WeakSet,Ro=class{constructor(e){kt(this,Lo),O(this,Po,new WeakMap),O(this,Fo,void 0),O(this,Io,void 0),A(Io,this,e)}observe(e,t){var n=j(Po,this).get(e)||new Set;return n.add(t),j(Po,this).set(e,n),k(Lo,this,zo).call(this).observe(e,j(Io,this)),()=>{var n=j(Po,this).get(e);n.delete(t),n.size===0&&(j(Po,this).delete(e),j(Fo,this).unobserve(e))}}};No=Ro;function zo(){return j(Fo,this)??A(Fo,this,new ResizeObserver(e=>{for(var t of e){No.entries.set(t.target,t);for(var n of j(Po,this).get(t.target)||[])n(t)}}))}x(Ro,`entries`,new WeakMap);function Bo(e,t){return e===t||e?.[de]===t}function Vo(e={},t,n,r){var i=Qe.r,a=fi;return Hr(()=>{var o,s;return Wr(()=>{o=s,s=r?.()||[],Pi(()=>{Bo(n(...s),e)||(t(e,...s),o&&Bo(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Bo(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var Ho={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return!e.exclude.has(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Y(e,t,n){return new Proxy({props:e,exclude:t},Ho)}var Uo={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(f(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];f(i)&&(i=i());let a=o(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(f(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=o(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===de||t===fe)return!1;for(let n of e.props)if(f(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(f(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function X(...e){return new Proxy({props:e},Uo)}function Z(e,t,n,r){var i=!0,a=!!(n&8),s=!!(n&16),c=r,l=!0,u=void 0,d=()=>s&&i?(u??(u=un(r)),z(u)):(l&&(l=!1,c=s?Pi(r):r),c);let f;if(a){var p=de in e||fe in e;f=o(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=xt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Oe(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?un:pn)(()=>(v=!1,g()));a&&z(y);var b=fi;return(function(e,t){if(arguments.length>0){let n=t?z(y):i&&a?_r(e):e;return P(y,n),v=!0,c!==void 0&&(c=n),e}return si&&v||b.f&16384?y.v:z(y)})}function Wo(e){Qe===null&&xe(`onMount`),Lr(()=>{let t=Pi(e);if(typeof t==`function`)return t})}if(typeof window<`u`){var Go,Ko;((Go=(Ko=window).__svelte??(Ko.__svelte={})).v??(Go.v=new Set)).add(`5`)}function qo(e){return{...e,endTime:e.endTime??(e.startTime??0)+(e.duration??0)}}function Jo(e){let t=Array.isArray(e.spans)?e.spans.map(qo):[];return{...qo(e),rootSpan:e.rootSpan?qo(e.rootSpan):t[0],spans:t}}var Yo=e=>e.map(Jo),Xo=class{constructor(e){x(this,`url`,void 0),x(this,`ws`,null),x(this,`reconnectTimer`,null),x(this,`messageHandlers`,new Set),x(this,`statusHandlers`,new Set),x(this,`reconnectAttempts`,0),x(this,`closed`,!1),x(this,`reconnectDelay`,1e3),x(this,`maxReconnectDelay`,15e3),this.url=e}connect(){this.closed=!1;try{this.ws=new WebSocket(this.url),this.ws.addEventListener(`open`,()=>{this.reconnectAttempts=0,this.emitStatus(`connected`)}),this.ws.addEventListener(`message`,e=>{try{let t=JSON.parse(e.data),n=Array.isArray(t?.traces)?{...t,traces:Yo(t.traces)}:t;for(let e of this.messageHandlers)e(n)}catch{}}),this.ws.addEventListener(`close`,()=>{this.emitStatus(`disconnected`),this.scheduleReconnect()})}catch{this.emitStatus(`disconnected`),this.scheduleReconnect()}}emitStatus(e){if(!this.closed)for(let t of this.statusHandlers)t(e)}scheduleReconnect(){if(this.closed||this.reconnectTimer)return;this.reconnectAttempts++;let e=Math.min(this.reconnectDelay*2**(this.reconnectAttempts-1),this.maxReconnectDelay);this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}onMessage(e){return this.messageHandlers.add(e),()=>this.messageHandlers.delete(e)}onStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}disconnect(){this.closed=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null),this.messageHandlers.clear(),this.statusHandlers.clear()}isConnected(){return this.ws?.readyState===WebSocket.OPEN}};function Zo(e){try{let t=new URL(e);return t.protocol===`ws:`?`http://${t.host}`:t.protocol===`wss:`?`https://${t.host}`:null}catch{return null}}function Qo(e,t=fetch){return async(n,r)=>{if(n.kind!==`app`)return null;let i=new URL(`/source`,e);i.searchParams.set(`file`,n.file),i.searchParams.set(`line`,String(n.line)),i.searchParams.set(`context`,String(r));try{let e=await t(i.toString());return e.ok?await e.json():null}catch{return null}}}var $o=null;function es(e){$o=e===null?null:Qo(e)}var ts=(e,t)=>$o===null?Promise.resolve(null):$o(e,t),ns=new WeakMap,rs=class{constructor(e){O(this,ns,N(void 0)),P(j(ns,this),e,!0)}get value(){return z(j(ns,this))}set value(e){P(j(ns,this),e,!0)}},is=new WeakMap,as=new WeakMap,os=class{constructor(e){O(this,is,void 0),O(this,as,M(()=>j(is,this).call(this))),A(is,this,e)}get value(){return z(j(as,this))}};function ss(e){return new rs(e)}function cs(e){return new os(e)}function ls(e){return Br(()=>{Lr(e)})}function us(e,...t){for(let n of t){let t=e?.[n];if(typeof t==`string`&&t.length>0)return t}}function Q(e){return typeof e==`string`?e:void 0}function ds(e){if(typeof e==`number`)return e;if(typeof e==`string`&&e!==``){let t=Number(e);return Number.isFinite(t)?t:void 0}}function fs(e){if(typeof e==`boolean`)return e;if(e===`true`)return!0;if(e===`false`)return!1}function ps(e){if(Array.isArray(e)){let t=e.filter(e=>typeof e==`string`);return t.length===e.length?t:void 0}return typeof e==`string`?[e]:void 0}function ms(e,t){let n=e.attributes||{},r=[n[`service.name`],n[`service.peer.name`],n[`peer.service`],n[`http.host`],n[`db.system.name`],n[`db.system`],n[`messaging.system`],n[`rpc.service`],t];for(let e of r){let t=Q(e)?.trim();if(t)return t}return`unknown`}function hs(e,t){return Q(e[`db.system.name`])!==void 0||Q(e[`db.system`])!==void 0?`database`:Q(e[`cache.system`])===void 0?Q(e[`messaging.system`])===void 0?Q(e[`service.peer.name`])!==void 0||Q(e[`peer.service`])!==void 0||Q(e[`net.peer.name`])!==void 0||Q(e[`http.host`])!==void 0?t===e[`service.name`]?`service`:`external`:Q(e[`service.name`])===void 0?`unknown`:`service`:`messaging`:`cache`}function gs(e){if(e.resourceName)return e.resourceName;let t=e.resource||{},n=[t[`service.name`],t[`service.namespace`],t[`host.name`],t[`container.name`]];for(let e of n){let t=Q(e)?.trim();if(t)return t}return`unknown`}function _s(e,t){if(e===0&&t===0)return`unknown`;let n=e===0?1:t/e;return n>=.2?`unhealthy`:n>=.05?`degraded`:`healthy`}function vs(e){let t=new Map,n=(e,n=`unknown`)=>{let r=t.get(e);if(r)return r.type===`unknown`&&n!==`unknown`&&(r.type=n),r;let i={name:e,type:n,health:`unknown`,requestCount:0,errorCount:0,traceCount:0,logCount:0};return t.set(e,i),i};for(let t of e.traces){let e=new Set;for(let r of t.spans){let i=ms(r,t.service),a=n(i,hs(r.attributes,i));a.requestCount+=1,a.lastSeen=Math.max(a.lastSeen??0,r.endTime),r.status.code===`ERROR`&&(a.errorCount+=1),e.has(i)||(a.traceCount+=1,e.add(i))}}for(let t of e.logs){let e=n(gs(t),`service`);e.logCount+=1,e.lastSeen=Math.max(e.lastSeen??0,t.timestamp)}for(let t of e.errors){if(!t.service)continue;let e=n(t.service,`service`);e.errorCount+=t.count,e.lastSeen=Math.max(e.lastSeen??0,t.lastSeen)}return[...t.values()].map(e=>({...e,health:_s(e.requestCount,e.errorCount)})).sort((e,t)=>{let n=(t.lastSeen??0)-(e.lastSeen??0);return n===0?e.name.localeCompare(t.name):n})}var ys=[{id:`all`,label:`All time`,durationMs:null},{id:`5m`,label:`Last 5m`,durationMs:3e5},{id:`15m`,label:`Last 15m`,durationMs:9e5},{id:`30m`,label:`Last 30m`,durationMs:18e5},{id:`1h`,label:`Last 1h`,durationMs:36e5},{id:`3h`,label:`Last 3h`,durationMs:108e5},{id:`6h`,label:`Last 6h`,durationMs:216e5},{id:`24h`,label:`Last 24h`,durationMs:864e5},{id:`7d`,label:`Last 7d`,durationMs:6048e5}],bs={type:`preset`,preset:`all`},xs=new Map(ys.map(e=>[e.id,e]));function Ss(e,t){let n=xs.get(e);return!n||n.durationMs===null?{start:null,end:null}:{start:t-n.durationMs,end:t}}function Cs(e,t){return e.type===`preset`?Ss(e.preset,t):{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function ws(e){return e.start===null||e.end===null}function Ts(e){return e.type===`preset`?xs.get(e.preset)?.label??`All time`:`${Es(e.start)} → ${Es(e.end)}`}function Es(e){let t=new Date(e),n=new Date,r=t.toDateString()===n.toDateString(),i=t.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});return r?i:`${t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${i}`}function Ds(e){return e.type===`preset`?e.preset===bs.preset?null:e.preset:`custom:${e.start}:${e.end}`}function Os(e){if(!e)return bs;if(e.startsWith(`custom:`)){let[,t,n]=e.split(`:`),r=Number(t),i=Number(n);return!Number.isFinite(r)||!Number.isFinite(i)?bs:{type:`custom`,start:r,end:i}}return xs.has(e)?{type:`preset`,preset:e}:bs}function ks(e){if(!ws(e))return{start:e.start,end:e.end}}var As=[`gen_ai.system`,`gen_ai.provider.name`,`gen_ai.operation.name`,`ai.model.provider`];function js(e){let t=e.attributes??{};for(let e of As)if(t[e]!=null)return!0;return!1}function Ms(e){let t=e.toLowerCase();return t===`az.ai.openai`||t===`azure_openai`?`openai`:t===`vertex_ai`||t===`gcp.vertex_ai`||t===`gcp.gemini`?`google`:t}function Ns(e){let t=Object.keys(e).sort((e,t)=>{let n=e.split(`/`)[1]??``;return(t.split(`/`)[1]??``).length-n.length});return(n,r)=>{let i=Ms(n),a=r.toLowerCase();for(let n of t){let[t,r]=n.split(`/`);if(t===i&&a.startsWith(r))return e[n]}}}var Ps=Ns({"openai/gpt-4o":{inputPerMTok:2.5,outputPerMTok:10},"openai/gpt-4o-mini":{inputPerMTok:.15,outputPerMTok:.6},"openai/gpt-4-turbo":{inputPerMTok:10,outputPerMTok:30},"openai/gpt-3.5-turbo":{inputPerMTok:.5,outputPerMTok:1.5},"anthropic/claude-opus-4":{inputPerMTok:15,outputPerMTok:75},"anthropic/claude-sonnet-4":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-3-5-sonnet":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-3-5-haiku":{inputPerMTok:.8,outputPerMTok:4},"anthropic/claude-3-opus":{inputPerMTok:15,outputPerMTok:75},"anthropic/claude-3-haiku":{inputPerMTok:.25,outputPerMTok:1.25},"google/gemini-2.5-flash":{inputPerMTok:.3,outputPerMTok:2.5},"google/gemini-2.0-flash":{inputPerMTok:.1,outputPerMTok:.4},"google/gemini-1.5-pro":{inputPerMTok:1.25,outputPerMTok:5},"google/gemini-1.5-flash":{inputPerMTok:.075,outputPerMTok:.3},"mistral/mistral-large":{inputPerMTok:2,outputPerMTok:6},"mistral/mistral-small":{inputPerMTok:.2,outputPerMTok:.6},"groq/llama-3.1-70b":{inputPerMTok:.59,outputPerMTok:.79},"deepseek/deepseek-chat":{inputPerMTok:.27,outputPerMTok:1.1}});function Fs(e){let t=Ps(e.provider,e.model);if(!t)return{currency:`USD`,input:0,output:0,cacheRead:0,cacheWrite:0,total:0,source:`unknown`};let n=t.cacheReadPerMTok??t.inputPerMTok*.1,r=t.cacheWritePerMTok??t.inputPerMTok*1.25,i=(e.cacheReadInputTokens??0)/1e6*n,a=(e.cacheCreationInputTokens??0)/1e6*r,o=Math.max(0,(e.inputTokens??0)-(e.cacheReadInputTokens??0)-(e.cacheCreationInputTokens??0))/1e6*t.inputPerMTok,s=(e.outputTokens??0)/1e6*t.outputPerMTok;return{currency:`USD`,input:o,output:s,cacheRead:i,cacheWrite:a,total:o+s+i+a,source:`table`}}function Is(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function Ls(e,t){let n=e[t];return typeof n==`string`?n:void 0}function Rs(e,t){let n=e[t];return typeof n==`number`?n:void 0}function zs(e,t){return Is(e[t])}function Bs(e,t){let n=e[t];return Array.isArray(n)?n:[]}function Vs(e,t){return Array.isArray(e[t])}function Hs(e,t,n,r){return r.filter(t=>n(e,t)===void 0).map(e=>`${t}: Missing or invalid ${e}`)}function Us(e){if(e!=null){if(typeof e==`object`)return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return}}}function Ws(e){if(Array.isArray(e.parts))return e.parts.map(e=>{let t=e.type??`text`;return t===`text`?{kind:`text`,text:String(e.content??``)}:t===`image`?{kind:`image`,mediaType:`image/*`,dataRef:String(e.content??``)}:t===`audio`?{kind:`audio`,mediaType:`audio/*`,dataRef:String(e.content??``)}:{kind:`json`,value:e.content}});if(Array.isArray(e.content))return e.content.map(e=>e.type===`text`||e.text!==void 0?{kind:`text`,text:String(e.text??``)}:e.type===`image`?{kind:`image`,mediaType:e.mimeType??`image/*`,dataRef:String(e.image??e.data??``)}:e.type===`audio`?{kind:`audio`,mediaType:e.mimeType??`audio/*`,dataRef:String(e.data??``)}:{kind:`json`,value:e});let t=Q(e.content);return t===void 0?e.content==null?[]:[{kind:`json`,value:e.content}]:[{kind:`text`,text:t}]}function Gs(e){let t=Is(e);return t&&`value`in t?t.value:e}function Ks(e){return e.type===`tool-call`?{kind:`call`,call:{id:e.toolCallId,name:e.toolName??``,arguments:Us(e.input)??e.input??{}}}:e.type===`tool-result`?{kind:`result`,result:{id:e.toolCallId,value:Gs(e.output)}}:e.type===`text`||e.text!==void 0?{kind:`text`,text:String(e.text??``)}:null}function qs(e){return e.type===`tool_call`?{kind:`call`,call:{id:e.id,name:e.name??``,arguments:Us(e.arguments)??e.arguments??{}}}:e.type===`tool_call_response`?{kind:`result`,result:{id:e.id,value:Gs(e.response)}}:e.type===`text`||e.type==null?{kind:`text`,text:String(e.content??``)}:null}function Js(e,t,n){let r=[],i=[],a=[];for(let e of t)e.kind===`call`?r.push(e.call):e.kind===`result`?a.push(e.result):i.push({kind:`text`,text:e.text});if(a.length>1){let t={role:e,parts:[]};return t._toolResults=a,t}let o={role:e,parts:i};return r.length>0&&(o.toolCalls=r),a.length===1&&(o.toolCallId=a[0].id,o.parts=[{kind:`json`,value:a[0].value}]),n&&(o.finishReason=n),o}function Ys(e){let t=e.role??`user`;if(Array.isArray(e.content)){let n=e.content;if(n.some(e=>e.type===`tool-call`||e.type===`tool-result`))return Js(t,n.map(Ks).filter(e=>e!==null),e.finish_reason)}if(Array.isArray(e.parts)){let n=e.parts;if(n.some(e=>e.type===`tool_call`||e.type===`tool_call_response`))return Js(t,n.map(qs).filter(e=>e!==null),e.finish_reason)}let n={role:t,parts:Ws(e)};return Array.isArray(e.tool_calls)&&e.tool_calls.length>0&&(n.toolCalls=e.tool_calls.map(e=>({id:e.id,name:e.function?.name??``,arguments:Us(e.function?.arguments)??e.function?.arguments??{},type:e.type}))),e.tool_call_id&&(n.toolCallId=e.tool_call_id),e.finish_reason&&(n.finishReason=e.finish_reason),n}function Xs(e,t){let n=Us(e[t]);if(Array.isArray(n))return n.map(Ys)}function Zs(e){if(!e||e.length===0)return[];let t=[];for(let n of e){let e=n.attributes??{};if(n.name===`gen_ai.choice`){let n=e.message,r=Us(e.message)??n,i=Q(e.finish_reason);if(r){let e=Ys(r);i&&(e.finishReason=i),t.push(e)}continue}let r=n.name.match(/^gen_ai\.(system|user|assistant|tool)\.message$/);if(!r)continue;let i=r[1],a=e.content,o=Q(a),s=o===void 0?a:Us(o)??o;t.push(Ys({role:i,content:s,tool_calls:Us(e.tool_calls),tool_call_id:Q(e.id)??Q(e.tool_call_id)}))}return t}function Qs(e){let t=Us(e[`gen_ai.tool.definitions`]??e[`gen_ai.orchestrator.agent.definitions`]);if(Array.isArray(t))return t.filter(e=>Q(e.name)!==void 0).map(e=>({name:e.name,description:e.description,type:e.type,schema:e.schema??e.parameters}))}function $s(e){return{inputTokens:ds(e[`gen_ai.usage.input_tokens`])??ds(e[`gen_ai.usage.prompt_tokens`])??ds(e[`llm.usage.prompt_tokens`])??ds(e[`ai.usage.inputTokens`]),outputTokens:ds(e[`gen_ai.usage.output_tokens`])??ds(e[`gen_ai.usage.completion_tokens`])??ds(e[`llm.usage.completion_tokens`])??ds(e[`ai.usage.outputTokens`]),reasoningOutputTokens:ds(e[`gen_ai.usage.reasoning.output_tokens`]),cacheReadInputTokens:ds(e[`gen_ai.usage.cache_read.input_tokens`]),cacheCreationInputTokens:ds(e[`gen_ai.usage.cache_creation.input_tokens`])}}function ec(e){let t=ds(e[`gen_ai.response.time_to_first_chunk`]),n=ds(e[`gen_ai.response.time_to_finish`]),r=ds(e[`gen_ai.response.output_tokens_per_second`]),i=ds(e[`gen_ai.response.time_per_output_chunk`]);if(t!==void 0||n!==void 0||r!==void 0||i!==void 0)return{timeToFirstChunkS:t,timeToFinishS:n,outputTokensPerSecond:r,timePerOutputChunkS:i}}function tc(e){let t=ds(e[`gen_ai.session.cost.usd`]),n=ds(e[`gen_ai.session.input_tokens`]),r=ds(e[`gen_ai.session.output_tokens`]),i=ds(e[`gen_ai.session.step.count`]),a=ds(e[`gen_ai.session.tool_call.count`]),o=ds(e[`gen_ai.session.error.count`]);if(t!==void 0||n!==void 0||r!==void 0||i!==void 0||a!==void 0||o!==void 0)return{costUsd:t,inputTokens:n,outputTokens:r,stepCount:i,toolCallCount:a,errorCount:o}}function nc(e,t){let n=Q(e[`gen_ai.guard.rule`]);if(n)return{rule:n,action:Q(e[`gen_ai.guard.action`])??t,message:Q(e[`gen_ai.guard.message`]),observed:ds(e[`gen_ai.guard.observed`]),limit:ds(e[`gen_ai.guard.limit`])}}function rc(e,t){let n=fs(e[`gen_ai.guard.stopped`]),r=[],i=nc(e),a=e=>{e&&(!i||e.action===`stop`)&&(i=e)};for(let e of t??[]){let t=e.attributes??{};if(e.name===`gen_ai.guard.stop`)a(nc(t,`stop`));else if(e.name===`gen_ai.guard.warning`)a(nc(t,`warn`));else if(e.name===`gen_ai.client.warnings`){let e=Us(t[`gen_ai.warnings`]);Array.isArray(e)&&r.push(...e)}}return(n!==void 0||i)&&(i={...i,stopped:n??i?.action===`stop`}),{guard:i,warnings:r.length>0?r:void 0}}function ic(e){let t=e.toLowerCase();return t===`az.ai.openai`||t===`azure_openai`?`openai`:t===`gcp.vertex_ai`||t===`vertex_ai`||t===`gcp.gemini`||t===`google-gla`||t===`google_genai`||t===`gemini`?`google`:t}var ac=new Set(`gen_ai.system,gen_ai.provider.name,gen_ai.operation.name,gen_ai.request.model,gen_ai.response.model,gen_ai.response.id,gen_ai.response.finish_reasons,gen_ai.request.temperature,gen_ai.request.top_p,gen_ai.request.top_k,gen_ai.request.max_tokens,gen_ai.request.stop_sequences,gen_ai.request.seed,gen_ai.request.frequency_penalty,gen_ai.request.presence_penalty,gen_ai.request.choice.count,gen_ai.usage.input_tokens,gen_ai.usage.output_tokens,gen_ai.usage.prompt_tokens,gen_ai.usage.completion_tokens,gen_ai.usage.reasoning.output_tokens,gen_ai.usage.cache_read.input_tokens,gen_ai.usage.cache_creation.input_tokens,gen_ai.usage.cost.usd,gen_ai.response.time_to_first_chunk,gen_ai.response.time_to_finish,gen_ai.response.output_tokens_per_second,gen_ai.response.time_per_output_chunk,gen_ai.guard.stopped,gen_ai.guard.rule,gen_ai.guard.action,gen_ai.guard.message,gen_ai.guard.observed,gen_ai.guard.limit,gen_ai.session.cost.usd,gen_ai.session.input_tokens,gen_ai.session.output_tokens,gen_ai.session.step.count,gen_ai.session.tool_call.count,gen_ai.session.error.count,gen_ai.input.messages,gen_ai.output.messages,gen_ai.input.messages.ref,gen_ai.output.messages.ref,gen_ai.system_instructions,gen_ai.tool.definitions,gen_ai.orchestrator.agent.definitions,gen_ai.agent.id,gen_ai.agent.name,gen_ai.agent.description,gen_ai.tool.name,gen_ai.tool.call.id,gen_ai.handoff.from_agent,gen_ai.handoff.to_agent,gen_ai.guardrail.name,gen_ai.guardrail.triggered,gen_ai.conversation.id,gen_ai.evaluation.name,gen_ai.evaluation.score.value,gen_ai.evaluation.score.label,gen_ai.evaluation.explanation,gen_ai.audio.input.format,gen_ai.audio.output.format,gen_ai.speech.voice,gen_ai.speech.input_text,gen_ai.transcription.text,gen_ai.embeddings.dimension.count,gen_ai.openai.request.service_tier,gen_ai.openai.response.service_tier,gen_ai.openai.response.system_fingerprint,gen_ai.openai.request.response_format,openai.request.service_tier,openai.response.service_tier,openai.response.system_fingerprint,openai.request.response_format`.split(`,`));function oc(e){let t=e.attributes??{},n=ic(Q(t[`gen_ai.provider.name`])??Q(t[`gen_ai.system`])??Q(t[`ai.model.provider`])??`unknown`),r=Q(t[`gen_ai.operation.name`])??`chat`,i=Q(t[`gen_ai.request.model`])??Q(t[`llm.request.model`])??Q(t.model_name)??Q(t[`ai.model.id`])??`unknown`,a=Q(t[`gen_ai.response.model`])??Q(t[`llm.response.model`])??Q(t[`ai.response.model`]),o=Xs(t,`gen_ai.input.messages`)??[],s=Xs(t,`gen_ai.output.messages`)??[],c=[],l=Us(t[`gen_ai.system_instructions`]);if(Array.isArray(l)&&l.length>0){let e=Is(l[0]);c=e&&`role`in e?l.map(e=>Ys(e)):[{role:`system`,parts:l.map(e=>e.type===`text`||e.content!==void 0?{kind:`text`,text:String(e.content??``)}:{kind:`json`,value:e})}]}let u=o.length||s.length||c.length?[...c,...o,...s]:Zs(e.events),d=Q(t[`gen_ai.input.messages.ref`]),f=Q(t[`gen_ai.output.messages.ref`]),p=u.some(e=>e.role===`system`||e.role===`user`),m=u.some(e=>e.role===`assistant`);if(d&&!p&&u.push({role:`user`,parts:[{kind:`ref`,ref:d,direction:`input`}]}),f&&!m&&u.push({role:`assistant`,parts:[{kind:`ref`,ref:f,direction:`output`}]}),u.length===0){let e=Us(t[`ai.prompt.messages`]);if(Array.isArray(e))u.push(...e.map(Ys));else{let e=Us(t[`ai.prompt`]);e&&(Array.isArray(e.messages)?u.push(...e.messages.map(Ys)):(e.system&&u.push({role:`system`,parts:[{kind:`text`,text:e.system}]}),e.prompt&&u.push({role:`user`,parts:[{kind:`text`,text:e.prompt}]})))}let n=Us(t[`ai.response.toolCalls`]),r=Array.isArray(n)?n.filter(e=>Q(e.toolName)!==void 0).map(e=>({id:e.toolCallId,name:e.toolName,arguments:Us(e.input??e.args)??e.input??e.args??{}})):void 0,i=Q(t[`ai.response.text`]);if(i||r&&r.length>0){let e=ps(t[`gen_ai.response.finish_reasons`])?.[0]??Q(t[`ai.response.finishReason`]),n=Ys({role:`assistant`,content:i??``});e&&(n.finishReason=e),r&&r.length>0&&(n.toolCalls=r),u.push(n)}}if(u.length===0){let e=Us(t[`pydantic_ai.all_messages`]);Array.isArray(e)&&u.push(...e.map(Ys))}if(u.length===0){let e=[];for(let n=0;n<32;n++){let r=Q(t[`gen_ai.prompt.${n}.role`])??Q(t[`llm.prompts.${n}.role`]),i=t[`gen_ai.prompt.${n}.content`]??t[`llm.prompts.${n}.content`];if(!r)break;e.push(Ys({role:r,content:i}))}for(let n=0;n<32;n++){let r=Q(t[`gen_ai.completion.${n}.role`])??Q(t[`llm.completions.${n}.role`]),i=t[`gen_ai.completion.${n}.content`]??t[`llm.completions.${n}.content`],a=Q(t[`gen_ai.completion.${n}.finish_reason`]);if(!r)break;let o=Ys({role:r,content:i});a&&(o.finishReason=a),e.push(o)}e.length>0&&(u=e)}u=u.flatMap(e=>{let t=e._toolResults;return t?t.map(e=>({role:`tool`,parts:[{kind:`json`,value:e.value}],toolCallId:e.id})):[e]});let h=[];for(let e of u)e.toolCalls&&h.push(...e.toolCalls);if(h.length>0){let e=new Map;for(let t of h)t.id&&e.set(t.id,t);for(let t of u){if(t.role!==`tool`||!t.toolCallId)continue;let n=e.get(t.toolCallId);if(!n||n.result!==void 0)continue;let r=t.parts.find(e=>e.kind===`text`),i=t.parts.find(e=>e.kind===`json`);r&&r.kind===`text`?n.result=Us(r.text)??r.text:i&&i.kind===`json`&&(n.result=i.value)}}let g=$s(t),_=Fs({provider:n,model:a??i,inputTokens:g.inputTokens,outputTokens:g.outputTokens,cacheReadInputTokens:g.cacheReadInputTokens,cacheCreationInputTokens:g.cacheCreationInputTokens}),v=ds(t[`gen_ai.usage.cost.usd`]),y=v===void 0?_:{currency:`USD`,input:_?.input??0,output:_?.output??0,cacheRead:_?.cacheRead??0,cacheWrite:_?.cacheWrite??0,total:v,source:`reported`},b=ec(t),x=tc(t),{guard:S,warnings:C}=rc(t,e.events),w=ps(t[`gen_ai.response.finish_reasons`]),T=Q(t[`gen_ai.agent.name`]),ee=Q(t[`gen_ai.agent.id`]),te=Q(t[`gen_ai.agent.description`]),ne=Q(t[`gen_ai.tool.name`]),re=Q(t[`gen_ai.tool.call.id`]),ie=Q(t[`gen_ai.handoff.from_agent`]),ae=Q(t[`gen_ai.handoff.to_agent`]),oe=Q(t[`gen_ai.guardrail.name`]),se=fs(t[`gen_ai.guardrail.triggered`]),ce=Q(t[`gen_ai.evaluation.name`]),le=ds(t[`gen_ai.evaluation.score.value`]),E=Q(t[`gen_ai.evaluation.score.label`]),ue=Q(t[`gen_ai.evaluation.explanation`]),de=Q(t[`gen_ai.audio.input.format`]),fe=Q(t[`gen_ai.audio.output.format`]),pe=Q(t[`gen_ai.speech.voice`]),me=Q(t[`gen_ai.speech.input_text`]),he=Q(t[`gen_ai.transcription.text`]),ge=ds(t[`gen_ai.embeddings.dimension.count`]),_e=Q(t[`agent.consent.outcome`]),ve=Q(t[`policy.decision`]),ye=Q(t[`mcp.security.injection.verdict`]),be=Q(t[`agent.action.risk_class`]),xe=Q(t[`agent.input.provenance`]),Se=ds(t[`agent.plan.step_index`]),Ce=Q(t[`security.event`]),we=fs(t[`gen_ai.guard.stopped`]),Te=_e||ve||ye||be||xe||Se!==void 0||Ce||we!==void 0||S?.stopped?{..._e&&{consentOutcome:_e},...ve&&{policyDecision:ve},...ye&&{injectionVerdict:ye},...be&&{actionRiskClass:be},...xe&&{inputProvenance:xe},...Se!==void 0&&{planStepIndex:Se},...Ce&&{securityEvent:Ce},guardStopped:S?.stopped??we}:void 0,Ee={};for(let[e,n]of Object.entries(t))ac.has(e)||e.startsWith(`gen_ai.prompt.`)||e.startsWith(`gen_ai.completion.`)||e.startsWith(`llm.prompts.`)||e.startsWith(`llm.completions.`)||(Ee[e]=n);return{traceId:e.traceId,spanId:e.spanId,parentSpanId:e.parentSpanId,name:e.name,startMs:e.startTime,endMs:e.endTime,status:e.status?.code===`OK`?`ok`:e.status?.code===`ERROR`?`error`:`unset`,errorMessage:e.status?.message,provider:n,operation:r,requestModel:i,responseModel:a,params:{temperature:ds(t[`gen_ai.request.temperature`]),topP:ds(t[`gen_ai.request.top_p`]),topK:ds(t[`gen_ai.request.top_k`]),maxTokens:ds(t[`gen_ai.request.max_tokens`]),stopSequences:ps(t[`gen_ai.request.stop_sequences`]),seed:ds(t[`gen_ai.request.seed`]),frequencyPenalty:ds(t[`gen_ai.request.frequency_penalty`]),presencePenalty:ds(t[`gen_ai.request.presence_penalty`]),choiceCount:ds(t[`gen_ai.request.choice.count`])},messages:u,toolDefinitions:Qs(t),toolCalls:h,usage:g,cost:y,streaming:b,guard:S,session:x,warnings:C,finishReasons:w,responseId:Q(t[`gen_ai.response.id`]),agent:ee||T||te?{id:ee,name:T,description:te}:void 0,tool:ne||re?{name:ne,callId:re}:void 0,handoff:ie||ae?{fromAgent:ie,toAgent:ae}:void 0,guardrail:oe||se!==void 0?{name:oe,triggered:se}:void 0,conversationId:Q(t[`gen_ai.conversation.id`]),agentSecurity:Te,evaluation:ce||le!==void 0||E||ue?{name:ce,scoreValue:le,scoreLabel:E,explanation:ue}:void 0,modality:de||fe||pe||me||he||ge?{audioInputFormat:de,audioOutputFormat:fe,speechVoice:pe,speechInputText:me,transcriptionText:he,embeddingDimensions:ge}:void 0,extras:{openaiServiceTier:Q(t[`gen_ai.openai.request.service_tier`])||Q(t[`gen_ai.openai.response.service_tier`])||Q(t[`openai.request.service_tier`])||Q(t[`openai.response.service_tier`])?{request:Q(t[`gen_ai.openai.request.service_tier`])??Q(t[`openai.request.service_tier`]),response:Q(t[`gen_ai.openai.response.service_tier`])??Q(t[`openai.response.service_tier`])}:void 0,openaiSystemFingerprint:Q(t[`gen_ai.openai.response.system_fingerprint`])??Q(t[`openai.response.system_fingerprint`]),openaiResponseFormat:Q(t[`gen_ai.openai.request.response_format`])??Q(t[`openai.request.response_format`]),raw:Ee}}}function sc(e){let t=new Map;for(let n of e){let e=n.attributes??{},r=e[`ai.toolCall.id`];if(typeof r!=`string`)continue;let i=e[`ai.toolCall.result`];if(i!=null){if(typeof i==`string`)try{t.set(r,JSON.parse(i))}catch{t.set(r,i)}else t.set(r,i)}}return t}function cc(e,t){if(t.size!==0){for(let n of e.toolCalls){if(n.result!==void 0||!n.id)continue;let e=t.get(n.id);e!==void 0&&(n.result=e)}for(let n of e.messages)if(n.toolCalls)for(let e of n.toolCalls){if(e.result!==void 0||!e.id)continue;let n=t.get(e.id);n!==void 0&&(e.result=n)}}}function lc(e,...t){for(let n of t){let t=e[n];if(t==null||t instanceof Object)continue;let r=String(t);if(r.length>0)return r}}function uc(e,...t){for(let n of t){let t=e[n];if(t==null||t instanceof Object||t===!0||t===!1)continue;let r=Number(t);if(Number.isFinite(r)&&String(t).trim()!==``)return r}}function dc(e,...t){for(let n of t){let t=e[n];if(t===!0||t===`true`)return!0;if(t===!1||t===`false`)return!1}}var fc=[[`claude-opus-4`,15,75],[`claude-sonnet-4`,3,15],[`claude-haiku-4`,.8,4],[`claude-3-5-sonnet`,3,15],[`claude-3-5-haiku`,.8,4],[`claude-3-opus`,15,75],[`claude-3-haiku`,.25,1.25],[`opus`,15,75],[`sonnet`,3,15],[`haiku`,.8,4]];function pc(e,t,n){if(!e)return;let r=e.toLowerCase(),i=fc.find(([e])=>r.includes(e));if(!i)return;let[,a,o]=i;return(t??0)/1e6*a+(n??0)/1e6*o}function mc(...e){return Object.assign({},...e)}function hc(e){return{user:lc(e,`user.id`,`user.account_uuid`,`user.email`),organization:lc(e,`organization.id`),terminal:lc(e,`terminal.type`),appVersion:lc(e,`app.version`),model:lc(e,`model`)}}var gc=`mcp__`;function _c(e){if(!e.startsWith(gc))return{name:e,isMcp:!1};let t=e.slice(5),n=t.indexOf(`__`);if(n===-1)return{name:e,isMcp:!0,mcpServer:t||void 0};let r=t.slice(0,n),i=t.slice(n+2);return{name:e,isMcp:!0,mcpServer:r||void 0,mcpTool:i||void 0}}function vc(e){return e.startsWith(gc)}var yc=[`file`,`shell`,`search`,`web`,`todo`,`subagent`,`skill`,`mcp`,`other`],bc=new Map([[`read`,`file`],[`edit`,`file`],[`write`,`file`],[`multiedit`,`file`],[`notebookedit`,`file`],[`bash`,`shell`],[`bashoutput`,`shell`],[`killshell`,`shell`],[`killbash`,`shell`],[`grep`,`search`],[`glob`,`search`],[`ls`,`search`],[`webfetch`,`web`],[`websearch`,`web`],[`todowrite`,`todo`],[`task`,`subagent`],[`agent`,`subagent`],[`skill`,`skill`]]);function xc(e){return vc(e)?`mcp`:bc.get(e.toLowerCase())??`other`}function Sc(e){return lc(e,`subagent_type`,`agent_type`,`subagent.type`)}function Cc(e){return lc(e,`skill`,`skill_name`,`skill.name`)}var wc=new Map([[`user_prompt`,`user_prompt`],[`api_request`,`api_request`],[`api_error`,`api_error`],[`tool_result`,`tool_result`],[`tool_decision`,`tool_decision`],[`mcp_server_connection`,`mcp_connection`],[`plugin_loaded`,`plugin_loaded`],[`hook_execution_complete`,`hook_execution`]]),Tc=[...wc.keys()];function Ec(e,t){let n=xc(e),r={..._c(e),category:n};if(n===`subagent`){let e=Sc(t);e&&(r.subAgentType=e)}else if(n===`skill`){let e=Cc(t);e&&(r.skillName=e)}return r}var Dc=new Map([[`lines_of_code.count`,`lines_of_code`],[`commit.count`,`commit`],[`pull_request.count`,`pull_request`],[`active_time.total`,`active_time`]]);function Oc(e){let{kind:t,prefix:n,scopeHint:r,serviceHint:i}=e,a=e=>e!==void 0&&e.includes(r),o=e=>{let t=lc(e,`service.name`);return t!==void 0&&t.includes(i)},s=e=>e.startsWith(n)?e.slice(n.length):e;return{kind:t,matchesMetric(e){return e.name.startsWith(n)||a(e.scope?.name)||o(e.resource)},matchesEvent(e){return e.eventName.startsWith(n)||a(e.scope?.name)||o(e.resource)},normalizeEvent(e){let n=mc(e.resource,e.attributes),r=s(e.eventName)||lc(n,`event.name`)||e.eventName,i=wc.get(r)??`other`,a=lc(n,`session.id`);if(!a)return null;let o={id:`${a}:0`,sessionId:a,agent:t,type:i,rawEventName:r,timestamp:e.timestamp,model:lc(n,`model`),attributes:e.attributes};switch(i){case`api_request`:{o.inputTokens=uc(n,`input_tokens`),o.outputTokens=uc(n,`output_tokens`),o.cacheReadTokens=uc(n,`cache_read_tokens`),o.contextLineageId=lc(n,`query_source`),o.tokenSource=lc(n,`token_source`)===`estimated`?`estimated`:void 0,o.cacheCreationTokens=uc(n,`cache_creation_tokens`),o.durationMs=uc(n,`duration_ms`);let e=uc(n,`cost_usd`,`cost`);if(e===void 0){let e=pc(o.model,o.inputTokens,o.outputTokens);e!==void 0&&(o.costUsd=e,o.costSource=`estimated`)}else o.costUsd=e,o.costSource=`reported`;break}case`api_error`:o.errorMessage=lc(n,`error`,`error.message`,`message`),o.statusCode=uc(n,`status_code`,`http.response.status_code`,`http.status_code`),o.durationMs=uc(n,`duration_ms`);break;case`tool_result`:{let e=lc(n,`tool_name`,`name`,`tool`);e&&(o.tool=Ec(e,n)),o.success=dc(n,`success`),o.durationMs=uc(n,`duration_ms`);let t=lc(n,`decision`);(t===`accept`||t===`reject`)&&(o.decision=t);break}case`tool_decision`:{let e=lc(n,`tool_name`,`name`,`tool`);e&&(o.tool=Ec(e,n));let t=lc(n,`decision`);(t===`accept`||t===`reject`)&&(o.decision=t);break}case`user_prompt`:{o.promptLength=uc(n,`prompt_length`,`prompt.length`);let e=lc(n,`prompt`);e&&(o.promptText=e);break}case`mcp_connection`:o.mcpServerName=lc(n,`server_name`,`name`),o.mcpTransport=lc(n,`transport_type`,`transport`),o.mcpStatus=lc(n,`status`),o.durationMs=uc(n,`duration_ms`);break;case`plugin_loaded`:o.pluginName=lc(n,`plugin.name`,`plugin_name`,`name`),o.pluginVersion=lc(n,`plugin.version`,`plugin_version`);break;case`hook_execution`:o.hookName=lc(n,`hook_event`,`hook_name`,`name`),o.hookSuccess=uc(n,`num_success`),o.hookBlocked=uc(n,`num_blocking`),o.hookErrored=uc(n,`num_non_blocking_error`),o.hookCancelled=uc(n,`num_cancelled`)}return o},normalizeMetric(e){let n=Dc.get(s(e.name))??`other`;return e.dataPoints.map(r=>{let i=mc(e.resource,r.attributes);return{agent:t,sessionId:lc(i,`session.id`),identity:hc(i),kind:n,value:r.value,temporality:e.temporality,timestamp:r.timestamp,attributes:r.attributes}})}}}Oc({kind:`claude-code`,prefix:`claude_code.`,scopeHint:`claude_code`,serviceHint:`claude-code`});var kc={handled:Tc,ignored:[`api_request_body`,`api_response_body`,`assistant_response`,`hook_registered`,`hook_execution_start`]};[...kc.handled,...kc.ignored],Oc({kind:`opencode`,prefix:`opencode.`,scopeHint:`opencode`,serviceHint:`opencode`});function Ac(){return Object.fromEntries(yc.map(e=>[e,0]))}function jc(e){let t={sessions:0,costUsd:0,inputTokens:0,outputTokens:0,apiRequests:0,apiErrors:0,accepted:0,rejected:0,models:{},tools:{},toolCategories:Ac(),mcpServers:{},subAgents:{},skills:{},mcpConnections:{},plugins:{},hooks:{runs:0,blocked:0,errored:0,cancelled:0}};for(let n of e){t.sessions+=1;let{rollup:e}=n;t.costUsd+=e.costUsd,t.inputTokens+=e.inputTokens,t.outputTokens+=e.outputTokens,t.apiRequests+=e.apiRequests,t.apiErrors+=e.apiErrors,t.accepted+=e.accepted,t.rejected+=e.rejected;for(let[n,r]of Object.entries(e.models))t.models[n]=(t.models[n]??0)+r;for(let n of Object.values(e.tools))t.tools[n.name]=(t.tools[n.name]??0)+n.count,n.isMcp&&n.mcpServer&&(t.mcpServers[n.mcpServer]=(t.mcpServers[n.mcpServer]??0)+n.count);for(let n of yc)t.toolCategories[n]+=e.toolCategories[n];for(let[n,r]of Object.entries(e.subAgents))t.subAgents[n]=(t.subAgents[n]??0)+r;for(let[n,r]of Object.entries(e.skills))t.skills[n]=(t.skills[n]??0)+r;for(let n of Object.values(e.mcpConnections)){let e=t.mcpConnections[n.name]??{name:n.name,transport:n.transport,connected:!1,connects:0,disconnects:0};e.connects+=n.connects,e.disconnects+=n.disconnects,e.connected=e.connected||n.connected,n.transport&&(e.transport=n.transport),t.mcpConnections[n.name]=e}for(let n of Object.values(e.plugins))t.plugins[n.name]=n;t.hooks.runs+=e.hooks.runs,t.hooks.blocked+=e.hooks.blocked,t.hooks.errored+=e.hooks.errored,t.hooks.cancelled+=e.hooks.cancelled}return t}var Mc=ss(!1),Nc=ss({x:20,y:20}),Pc=ss(`bottom-right`),Fc=ss(`bottom`),Ic=ss(!1),Lc=ss(`traces`),Rc=ss(null),zc=ss(null),Bc=ss(null);function Vc(e,t){Bc.value={traceId:e,spanId:t}}var Hc=ss(`system`);function Uc(){try{let e=localStorage.getItem(`autotel-devtools-theme`);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`system`}var Wc=[`system`,`light`,`dark`];function Gc(){let e=Wc[(Wc.indexOf(Hc.value)+1)%Wc.length];Hc.value=e;try{localStorage.setItem(`autotel-devtools-theme`,e)}catch{}}var Kc=`autotel-devtools-editor`;function qc(){try{let e=localStorage.getItem(Kc);if(e===`vscode`||e===`cursor`||e===`webstorm`)return e}catch{}return`vscode`}var Jc=ss(qc());function Yc(e){Jc.value=e;try{localStorage.setItem(Kc,e)}catch{}}var Xc=ss(null);function Zc(e){Xc.value=e}function Qc(){Xc.value=null}function $c(e){Xc.value=Xc.value?null:e}var el={vertical:440,horizontal:560},tl=ss({...el});function nl(e){return globalThis.window===void 0?e===`vertical`?{min:200,max:900}:{min:360,max:1200}:e===`vertical`?{min:200,max:Math.round(window.innerHeight*.92)}:{min:360,max:Math.round(window.innerWidth*.92)}}function rl(e,t){let{min:n,max:r}=nl(e),i=Math.min(r,Math.max(n,Math.round(t)));tl.value={...tl.value,[e]:i}}function il(e){rl(e,el[e])}var al=ss([]),ol=ss({connectionStatus:`disconnected`}),sl=ss([]),cl=ss([]),ll=ss(`disconnected`),ul=ss(null),dl=ss(bs),fl=ss([]),pl=ss([]),ml=ss(`pending`),hl=cs(()=>{if(ml.value===`ready`)return fl.value;let e=Cs(dl.value,Date.now());if(ws(e))return al.value;let{start:t,end:n}=e;return al.value.filter(e=>e.startTime>=t&&e.startTime<=n)}),gl=ss(0),_l=15e3,vl=[];function yl(e,t,n){if(e+t+n===0)return;let r=Date.now();vl.push({t:r,traces:e,logs:t,metrics:n});let i=r-_l;(vl.length>1024||vl[0].t<i)&&(vl=vl.filter(e=>e.t>=i)),gl.value+=1}function bl(e=5e3,t=Date.now()){let n=t-e,r=0,i=0,a=0;for(let e of vl)e.t>=n&&(r+=e.traces,i+=e.logs,a+=e.metrics);let o=e/1e3;return{traces:r/o,logs:i/o,metrics:a/o,total:(r+i+a)/o}}var xl=ss(!1),Sl=ss([]),Cl=ss([]),wl=cs(()=>Sl.value.length),Tl=cs(()=>Cl.value.length),El=ss(!1),Dl=cs(()=>al.value.filter(e=>e.status===`ERROR`)),Ol=cs(()=>{let e=Dl.value;return Mc.value?0:e.length}),kl=ss({key:`time`,dir:`desc`}),Al=ss(``),jl=ss(`all`),Ml=ss(0),Nl=ss(new Set);function Pl(e){let t=new Set(Nl.value);t.has(e)?t.delete(e):t.add(e),Nl.value=t}function Fl(){Nl.value.size>0&&(Nl.value=new Set)}var Il=ss(``),Ll=new Map([[`time`,`desc`],[`duration`,`desc`],[`spans`,`desc`],[`service`,`asc`],[`name`,`asc`],[`status`,`desc`]]);function Rl(e){let t=kl.value;kl.value=t.key===e?{key:e,dir:t.dir===`asc`?`desc`:`asc`}:{key:e,dir:Ll.get(e)??`desc`}}var zl=new Set([`service`,`name`]);function Bl(e,t){return(t===`service`?e.service:e.rootSpan?.name)??``}function Vl(e,t){switch(t){case`duration`:return e.duration;case`spans`:return e.spans.length;case`status`:return+(e.status===`ERROR`);default:return e.startTime}}function Hl(e,t,n){return zl.has(n)?Bl(e,n).localeCompare(Bl(t,n)):Vl(e,n)-Vl(t,n)}var Ul=cs(()=>{let{key:e,dir:t}=kl.value,n=t===`asc`?1:-1;return[...al.value].sort((t,r)=>{let i=Hl(t,r,e);return i===0?r.startTime-t.startTime:i*n})}),Wl=cs(()=>[...cl.value].sort((e,t)=>t.timestamp-e.timestamp)),Gl=ss([]),Kl=ss(null),ql=cs(()=>[...Gl.value].sort((e,t)=>t.lastSeen-e.lastSeen)),Jl=cs(()=>jc(Gl.value)),Yl=cs(()=>{let e=ql.value;if(e.length===0)return null;let t=Kl.value;return e.find(e=>e.id===t)??e[0]});function Xl(e){Kl.value=e}var Zl=cs(()=>vs({traces:hl.value,logs:cl.value,errors:sl.value})),Ql=cs(()=>{let e=[];for(let t of hl.value){let n=sc(t.spans);for(let r of t.spans){if(!js(r))continue;let i=oc(r);cc(i,n),e.push({raw:r,normalized:i,service:t.service,traceId:t.traceId})}}return e.sort((e,t)=>t.normalized.startMs-e.normalized.startMs),e}),$l=cs(()=>Ql.value.length),eu=cs(()=>hl.value.filter(e=>e.spans.length>1).length),tu=cs(()=>{if(ml.value===`ready`)return pl.value;let e=Cs(dl.value,Date.now());if(ws(e))return sl.value;let{start:t,end:n}=e;return sl.value.filter(e=>e.lastSeen>=t&&e.firstSeen<=n)}),nu=cs(()=>[...tu.value].sort((e,t)=>t.lastSeen-e.lastSeen)),ru=cs(()=>[...tu.value].sort((e,t)=>t.count-e.count)),iu=cs(()=>tu.value.reduce((e,t)=>e+t.count,0)),au=cs(()=>{let e=Date.now()-36e5;return sl.value.filter(t=>t.lastSeen>e).reduce((e,t)=>e+t.count,0)}),ou=cs(()=>{let e=Rc.value;return e&&hl.value.find(t=>t.traceId===e)||null}),su=ss(new Set);function cu(e){let t=new Set(su.value);t.has(e)?t.delete(e):t.add(e),su.value=t}function lu(){su.value=new Set(hl.value.map(e=>e.traceId))}function uu(){su.value=new Set}function du(){let e=su.value;al.value=al.value.filter(t=>!e.has(t.traceId)),fl.value=fl.value.filter(t=>!e.has(t.traceId)),uu(),Rc.value&&e.has(Rc.value)&&(Rc.value=null)}var fu=cs(()=>su.value.size);function pu(e,t){let n=[...t].sort((e,t)=>e.startTime-t.startTime),r=n.find(e=>!e.parentSpanId)??e.rootSpan??n[0],i=Math.min(...n.map(e=>e.startTime)),a=Math.max(...n.map(e=>e.endTime)),o=n.some(e=>e.status.code===`ERROR`)?`ERROR`:`OK`,s=us(r?.attributes,`service.name`);return{...e,rootSpan:r,spans:n,startTime:i,endTime:a,duration:a-i,status:o,service:s??e.service}}function mu(e,t){let n=new Map;for(let t of e.spans)n.set(t.spanId,t);for(let e of t.spans)n.has(e.spanId)||n.set(e.spanId,e);return pu(e,[...n.values()])}function hu(e,t){if(t.length===0)return e;let n=new Map;for(let e of t){let t=n.get(e.traceId);n.set(e.traceId,t?mu(t,e):e)}let r=new Set(e.map(e=>e.traceId)),i=e.map(e=>{let t=n.get(e.traceId);return t?mu(e,t):e});for(let[e,t]of n)r.has(e)||i.push(t);return i}function gu(e,t,n){let r=hu(e,t);return r.length>n?r.slice(-n):r}function _u(e,t){if(t.length===0)return e;let n=[...t,...e];return n.length>Iu?n.slice(0,Iu):n}function vu(e,t,n,r=n){return{ingest(i,a){i.length!==0&&(a?t.value=r(t.value,i):e.value=n(e.value,i))},flushToLive(){t.value.length!==0&&(e.value=n(e.value,t.value),t.value=[])},clearPending(){t.value=[]}}}var yu=vu(al,Sl,hu,(e,t)=>gu(e,t,Iu)),bu=vu(cl,Cl,_u),xu=[yu,bu];function Su(e){if(El.value){e.health&&(ol.value=e.health,ll.value=e.health.connectionStatus);return}let t=xl.value;yu.ingest(e.traces??[],t),bu.ingest(e.logs??[],t),yl(e.traces?.length??0,e.logs?.length??0,0),e.health&&(ol.value=e.health,ll.value=e.health.connectionStatus),e.errors&&(sl.value=e.errors),e.agents&&(Gl.value=e.agents)}function Cu(e){if(xl.value!==e&&(xl.value=e,!e))for(let e of xu)e.flushToLive()}function wu(){Cu(!xl.value)}function Tu(){for(let e of xu)e.clearPending()}function Eu(e){al.value=e.traces??[],cl.value=(e.logs??[]).slice(0,Iu),sl.value=e.errors??[],Sl.value=[],Cl.value=[],xl.value=!1,El.value=!0}function Du(){El.value=!1,al.value=[],cl.value=[],sl.value=[]}function Ou(){Mc.value=!Mc.value}function ku(e){Lc.value=e}function Au(e,t=null){Rc.value=e,zc.value=e?t:null}function ju(e,t){Au(e,t??null),ku(`traces`)}function Mu(e,t){Nc.value={x:e,y:t}}function Nu(e){Pc.value=e}function Pu(e){Fc.value=e}function Fu(){let e=[`bottom`,`right`,`left`],t=Fc.value??`bottom`;Fc.value=e[(e.indexOf(t)+1)%e.length]}var Iu=100;function Lu(){al.value=[],fl.value=[],sl.value=[],pl.value=[],cl.value=[],Gl.value=[],Kl.value=null,Sl.value=[],Cl.value=[],su.value=new Set,Rc.value=null,zc.value=null,ml.value=`pending`,El.value=!1}function Ru(e){if(e.length===0)return;let t=new Set(al.value.map(e=>e.traceId)),n=e.filter(e=>!t.has(e.traceId));n.length>0?(console.log(`[Autotel Devtools] Importing ${n.length} trace(s)`),al.value=[...al.value,...n]):console.log(`[Autotel Devtools] No new traces to import (all duplicates)`)}var zu=ss(`local`),Bu=`autotel-devtools-widget-state`;function Vu(){try{let e=localStorage.getItem(Bu);if(e){let t=JSON.parse(e);t.position&&(Nc.value=t.position),t.corner&&(Pc.value=t.corner),t.docked&&(Fc.value=t.docked),t.panelSize&&(tl.value={vertical:Number(t.panelSize.vertical)||440,horizontal:Number(t.panelSize.horizontal)||560}),typeof t.timeZone==`string`&&(zu.value=t.timeZone)}}catch(e){console.error(`[Autotel Devtools] Failed to load persisted state:`,e)}}function Hu(){try{let e={position:Nc.value,corner:Pc.value,docked:Fc.value,panelSize:tl.value,timeZone:zu.value};localStorage.setItem(Bu,JSON.stringify(e))}catch(e){console.error(`[Autotel Devtools] Failed to persist state:`,e)}}ls(()=>{Nc.value,Pc.value,Fc.value,zu.value,tl.value,Hu()});var Uu=[`traces`,`resources`,`service-map`,`metrics`,`logs`,`errors`,`genai`,`flow`,`security`];function Wu(e,t){return e.find(e=>e===t)}function Gu(e){return Wu(Uu,e)!==void 0}var Ku=[`time`,`duration`,`spans`,`service`,`name`,`status`],qu=[`error`,`ok`],Ju={key:`time`,dir:`desc`};function Yu(e){if(!e)return;let[t,n]=e.split(`:`),r=Wu(Ku,t);return r&&{key:r,dir:n===`asc`?`asc`:`desc`}}function Xu(e){let t=e.startsWith(`#`)?e.slice(1):e;if(!t)return{};let n=new URLSearchParams(t),r={},i=n.get(`tab`);Gu(i)&&(r.tab=i);let a=n.get(`trace`)||void 0;a&&(r.traceId=a);let o=n.get(`span`)||void 0;a&&o&&(r.spanId=o);let s=n.get(`q`)||void 0;s&&(r.q=s);let c=Wu(qu,n.get(`status`));c&&(r.status=c);let l=n.get(`min`),u=l==null?NaN:Number(l);Number.isFinite(u)&&u>0&&(r.minDuration=u);let d=n.get(`window`);d&&(r.window=Os(d));let f=Yu(n.get(`sort`));f&&(r.sort=f);let p=n.get(`gq`)||void 0;return p&&(r.genaiQuery=p),r}function Zu(e){let t=new URLSearchParams;if(e.tab&&e.tab!==`traces`&&t.set(`tab`,e.tab),e.traceId&&t.set(`trace`,e.traceId),e.traceId&&e.spanId&&t.set(`span`,e.spanId),e.q&&t.set(`q`,e.q),e.status&&e.status!==`all`&&t.set(`status`,e.status),e.minDuration&&e.minDuration>0&&t.set(`min`,String(e.minDuration)),e.window){let n=Ds(e.window);n&&t.set(`window`,n)}e.sort&&(e.sort.key!==Ju.key||e.sort.dir!==Ju.dir)&&t.set(`sort`,`${e.sort.key}:${e.sort.dir}`),e.genaiQuery&&t.set(`gq`,e.genaiQuery);let n=t.toString();return n?`#${n}`:``}function Qu(e,t){return e&&(e.tab!==t.tab||e.traceId!==t.traceId||e.spanId!==t.spanId)?`push`:`replace`}var $u=new Set([`$$slots`,`$$events`,`$$legacy`,`fill`,`width`,`height`]),ed=ca(`<svg><circle cx="17" cy="20" r="3" fill="#9AAAB4"></circle><path fill="#DA2F47" d="M19.235 17.059a1.003 1.003 0 0 1-1.353.412L5.529 10.883a1.004 1.004 0 0 1-.412-1.353L7.94 4.235c.259-.485.868-.67 1.353-.412l12.353 6.588c.485.259.671.868.412 1.353z"></path><path fill="#DA2F47" d="M31.177 22.293a1.004 1.004 0 0 1-1.354.412l-9.705-5.176a1.004 1.004 0 0 1-.412-1.354l1.882-3.529c.259-.485.868-.67 1.354-.412l9.705 5.176c.485.259.671.868.412 1.354z"></path><path fill="#BB1A34" d="m19.235 17.058 2.824-5.293 1.765.941L20.999 18z"></path><path fill="#9D0522" d="m28.942 22.235 2.823-5.294 3.53 1.882-2.824 5.294z"></path><path fill="#292F33" d="m8.294 7.824 1.882-3.53-.881-.47v-.001L4.882 1.471a1.003 1.003 0 0 0-1.353.411L.706 7.177a1 1 0 0 0 .412 1.353l3.529 1.882 1.766.941.47-.882zM23 25a2 2 0 0 1-2 2h-8a2 2 0 0 1 0-4h8a2 2 0 0 1 2 2"></path><path fill="#9AAAB4" d="m9.467 36 3.344-7.152c.468-1 .036-2.191-.965-2.658a1.997 1.997 0 0 0-2.658.965L5.052 36zm15.065 0h4.416l-4.137-8.846a1.997 1.997 0 0 0-2.658-.965 2 2 0 0 0-.965 2.658zM19 36v-8a2 2 0 0 0-4 0v8z"></path></svg>`);function td(e,t){let n=Z(t,`width`,3,40),r=Z(t,`height`,3,40),i=Y(t,$u);var a=ed();Eo(a,()=>({width:n(),height:r(),viewBox:`0 0 36 36`,xmlns:`http://www.w3.org/2000/svg`,...i})),H(e,a)}function nd(e){let t=e<0,n=Math.abs(e),r;if(n===0)r=`0`;else if(n<.001)r=`${(n*1e6).toFixed(0)}ns`;else if(n<1)r=`${(n*1e3).toFixed(2).replace(/\.?0+$/,``)}µs`;else if(n<1e3)r=`${n.toFixed(2).replace(/\.?0+$/,``)}ms`;else if(n<6e4)r=`${(n/1e3).toFixed(2).replace(/\.?0+$/,``)}s`;else{let e=Math.floor(n/6e4),t=Math.floor(n%6e4/1e3);r=t>0?`${e}m ${t}s`:`${e}m`}return t?`⚠ ${r}`:r}function rd(e){let t=new Date(e),n=new Date().getTime()-t.getTime();if(n<6e4){let e=Math.floor(n/1e3);return e<=1?`just now`:`${e}s ago`}return n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleTimeString()}function id(e){return new Intl.NumberFormat().format(e)}function ad(e){switch(e){case`OK`:return`text-green-600`;case`ERROR`:return`text-red-600`;default:return`text-gray-500`}}function od(e,t,n,r){let i=n/2,a=r/2;return e<i&&t<a?{corner:`top-left`,x:20,y:20}:e>=i&&t<a?{corner:`top-right`,x:n-100,y:20}:e<i&&t>=a?{corner:`bottom-left`,x:20,y:r-100}:{corner:`bottom-right`,x:n-100,y:r-100}}function sd(e,t,n){return Math.min(Math.max(e,t),n)}function cd(e){return e.replace(/[\w.+-]+@[\w-]+\.[\w.-]+/g,`«email»`).replace(/\b(sk|pk|ghp|xox[baprs])[-_][A-Za-z0-9]{8,}\b/g,`«secret»`).replace(/\b[A-Za-z0-9_-]{32,}\b/g,`«token»`)}var ld=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},ud=(e,t)=>({classGroupId:e,validator:t}),dd=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),fd=`-`,pd=[],md=`arbitrary..`,hd=e=>{let t=vd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return _d(e);let n=e.split(fd);return gd(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ld(i,t):t:i||pd}return n[e]||pd}}},gd=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=gd(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(fd):e.slice(t).join(fd),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},_d=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?md+r:void 0})(),vd=e=>{let{theme:t,classGroups:n}=e;return yd(n,t)},yd=(e,t)=>{let n=dd();for(let r in e){let i=e[r];bd(i,n,r,t)}return n},bd=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];xd(i,t,n,r)}},xd=(e,t,n,r)=>{if(typeof e==`string`){Sd(e,t,n);return}if(typeof e==`function`){Cd(e,t,n,r);return}wd(e,t,n,r)},Sd=(e,t,n)=>{let r=e===``?t:Td(t,e);r.classGroupId=n},Cd=(e,t,n,r)=>{if(Ed(e)){bd(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ud(n,e))},wd=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];bd(o,Td(t,a),n,r)}},Td=(e,t)=>{let n=e,r=t.split(fd),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=dd(),n.nextPart.set(t,i)),n=i}return n},Ed=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Dd=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Od=`!`,kd=`:`,Ad=[],jd=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Md=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===kd){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Od)?(c=s.slice(0,-1),l=!0):s.startsWith(Od)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return jd(t,l,c,u)};if(t){let e=t+kd,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):jd(Ad,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Nd=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Pd=e=>({cache:Dd(e.cacheSize),parseClassName:Md(e),sortModifiers:Nd(e),postfixLookupClassGroupIds:Fd(e),...hd(e)}),Fd=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Id=/\s+/,Ld=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Id),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Od:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Rd=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=zd(n))&&(i&&(i+=` `),i+=r);return i},zd=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=zd(e[r]))&&(n&&(n+=` `),n+=t);return n},Bd=(e,...t)=>{let n,r,i,a,o=o=>(n=Pd(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Ld(e,n);return i(e,a),a};return a=o,(...e)=>a(Rd(...e))},Vd=[],Hd=e=>{let t=t=>t[e]||Vd;return t.isThemeGetter=!0,t},Ud=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Wd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Gd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Kd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Jd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Yd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zd=e=>Gd.test(e),Qd=e=>!!e&&!Number.isNaN(Number(e)),$d=e=>!!e&&Number.isInteger(Number(e)),ef=e=>e.endsWith(`%`)&&Qd(e.slice(0,-1)),tf=e=>Kd.test(e),nf=()=>!0,rf=e=>qd.test(e)&&!Jd.test(e),af=()=>!1,of=e=>Yd.test(e),sf=e=>Xd.test(e),cf=e=>!df(e)&&!yf(e),lf=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),uf=e=>Df(e,jf,af),df=e=>Ud.test(e),ff=e=>Df(e,Mf,rf),pf=e=>Df(e,Nf,Qd),mf=e=>Df(e,Ff,nf),hf=e=>Df(e,Pf,af),gf=e=>Df(e,kf,af),_f=e=>Df(e,Af,sf),vf=e=>Df(e,If,of),yf=e=>Wd.test(e),bf=e=>Of(e,Mf),xf=e=>Of(e,Pf),Sf=e=>Of(e,kf),Cf=e=>Of(e,jf),wf=e=>Of(e,Af),Tf=e=>Of(e,If,!0),Ef=e=>Of(e,Ff,!0),Df=(e,t,n)=>{let r=Ud.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Of=(e,t,n=!1)=>{let r=Wd.exec(e);return r?r[1]?t(r[1]):n:!1},kf=e=>e===`position`||e===`percentage`,Af=e=>e===`image`||e===`url`,jf=e=>e===`length`||e===`size`||e===`bg-size`,Mf=e=>e===`length`,Nf=e=>e===`number`,Pf=e=>e===`family-name`,Ff=e=>e===`number`||e===`weight`,If=e=>e===`shadow`,Lf=Bd(()=>{let e=Hd(`color`),t=Hd(`font`),n=Hd(`text`),r=Hd(`font-weight`),i=Hd(`tracking`),a=Hd(`leading`),o=Hd(`breakpoint`),s=Hd(`container`),c=Hd(`spacing`),l=Hd(`radius`),u=Hd(`shadow`),d=Hd(`inset-shadow`),f=Hd(`text-shadow`),p=Hd(`drop-shadow`),m=Hd(`blur`),h=Hd(`perspective`),g=Hd(`aspect`),_=Hd(`ease`),v=Hd(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),yf,df],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[yf,df,c],T=()=>[Zd,`full`,`auto`,...w()],ee=()=>[$d,`none`,`subgrid`,yf,df],te=()=>[`auto`,{span:[`full`,$d,yf,df]},$d,yf,df],ne=()=>[$d,`auto`,yf,df],re=()=>[`auto`,`min`,`max`,`fr`,yf,df],ie=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ae=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],oe=()=>[`auto`,...w()],se=()=>[Zd,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ce=()=>[Zd,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],le=()=>[Zd,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],E=()=>[e,yf,df],ue=()=>[...b(),Sf,gf,{position:[yf,df]}],de=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],fe=()=>[`auto`,`cover`,`contain`,Cf,uf,{size:[yf,df]}],pe=()=>[ef,bf,ff],me=()=>[``,`none`,`full`,l,yf,df],he=()=>[``,Qd,bf,ff],ge=()=>[`solid`,`dashed`,`dotted`,`double`],_e=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ve=()=>[Qd,ef,Sf,gf],ye=()=>[``,`none`,m,yf,df],be=()=>[`none`,Qd,yf,df],xe=()=>[`none`,Qd,yf,df],Se=()=>[Qd,yf,df],Ce=()=>[Zd,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[tf],breakpoint:[tf],color:[nf],container:[tf],"drop-shadow":[tf],ease:[`in`,`out`,`in-out`],font:[cf],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[tf],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[tf],shadow:[tf],spacing:[`px`,Qd],text:[tf],"text-shadow":[tf],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Zd,df,yf,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,yf,df]}],"container-named":[lf],columns:[{columns:[Qd,df,yf,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[$d,`auto`,yf,df]}],basis:[{basis:[Zd,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Qd,Zd,`auto`,`initial`,`none`,df]}],grow:[{grow:[``,Qd,yf,df]}],shrink:[{shrink:[``,Qd,yf,df]}],order:[{order:[$d,`first`,`last`,`none`,yf,df]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ie(),`normal`]}],"justify-items":[{"justify-items":[...ae(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ae()]}],"align-content":[{content:[`normal`,...ie()]}],"align-items":[{items:[...ae(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ae(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ae(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ae()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:oe()}],mx:[{mx:oe()}],my:[{my:oe()}],ms:[{ms:oe()}],me:[{me:oe()}],mbs:[{mbs:oe()}],mbe:[{mbe:oe()}],mt:[{mt:oe()}],mr:[{mr:oe()}],mb:[{mb:oe()}],ml:[{ml:oe()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:se()}],"inline-size":[{inline:[`auto`,...ce()]}],"min-inline-size":[{"min-inline":[`auto`,...ce()]}],"max-inline-size":[{"max-inline":[`none`,...ce()]}],"block-size":[{block:[`auto`,...le()]}],"min-block-size":[{"min-block":[`auto`,...le()]}],"max-block-size":[{"max-block":[`none`,...le()]}],w:[{w:[s,`screen`,...se()]}],"min-w":[{"min-w":[s,`screen`,`none`,...se()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...se()]}],h:[{h:[`screen`,`lh`,...se()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...se()]}],"max-h":[{"max-h":[`screen`,`lh`,...se()]}],"font-size":[{text:[`base`,n,bf,ff]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ef,mf]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ef,df]}],"font-family":[{font:[xf,hf,t]}],"font-features":[{"font-features":[df]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,yf,df]}],"line-clamp":[{"line-clamp":[Qd,`none`,yf,pf]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,yf,df]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,yf,df]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ge(),`wavy`]}],"text-decoration-thickness":[{decoration:[Qd,`from-font`,`auto`,yf,ff]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[Qd,`auto`,yf,df]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[$d,yf,df]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,yf,df]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,yf,df]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:de()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},$d,yf,df],radial:[``,yf,df],conic:[$d,yf,df]},wf,_f]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":he()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ge(),`hidden`,`none`]}],"divide-style":[{divide:[...ge(),`hidden`,`none`]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-bs":[{"border-bs":E()}],"border-color-be":[{"border-be":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...ge(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Qd,yf,df]}],"outline-w":[{outline:[``,Qd,bf,ff]}],"outline-color":[{outline:E()}],shadow:[{shadow:[``,`none`,u,Tf,vf]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":[`none`,d,Tf,vf]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:he()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[Qd,ff]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":[`none`,f,Tf,vf]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[Qd,yf,df]}],"mix-blend":[{"mix-blend":[..._e(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Qd]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[yf,df]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Qd]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:de()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,yf,df]}],filter:[{filter:[``,`none`,yf,df]}],blur:[{blur:ye()}],brightness:[{brightness:[Qd,yf,df]}],contrast:[{contrast:[Qd,yf,df]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Tf,vf]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:[``,Qd,yf,df]}],"hue-rotate":[{"hue-rotate":[Qd,yf,df]}],invert:[{invert:[``,Qd,yf,df]}],saturate:[{saturate:[Qd,yf,df]}],sepia:[{sepia:[``,Qd,yf,df]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,yf,df]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[Qd,yf,df]}],"backdrop-contrast":[{"backdrop-contrast":[Qd,yf,df]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Qd,yf,df]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qd,yf,df]}],"backdrop-invert":[{"backdrop-invert":[``,Qd,yf,df]}],"backdrop-opacity":[{"backdrop-opacity":[Qd,yf,df]}],"backdrop-saturate":[{"backdrop-saturate":[Qd,yf,df]}],"backdrop-sepia":[{"backdrop-sepia":[``,Qd,yf,df]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,yf,df]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Qd,`initial`,yf,df]}],ease:[{ease:[`linear`,`initial`,_,yf,df]}],delay:[{delay:[Qd,yf,df]}],animate:[{animate:[`none`,v,yf,df]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,yf,df]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":[`scale-3d`],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[yf,df,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":[`translate-none`],zoom:[{zoom:[$d,yf,df]}],accent:[{accent:E()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,yf,df]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":E()}],"scrollbar-track-color":[{"scrollbar-track":E()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,yf,df]}],fill:[{fill:[`none`,...E()]}],"stroke-w":[{stroke:[Qd,bf,ff,pf]}],stroke:[{stroke:[`none`,...E()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),$=(...e)=>Lf($a(e)),Rf=V(`<button title="Autolemetry Observability"><!></button>`);function zf(e,t){it(t,!0);let n=N(void 0),r=!1,i={x:0,y:0},a=M(()=>Nc.value),o=M(()=>Ol.value),s=M(()=>Mc.value),c=M(()=>z(o)>0),l=M(()=>z(c)?`#DA2F47`:`#22c55e`);function u(e){e.button===0&&(r=!0,i={x:e.clientX-z(a).x,y:e.clientY-z(a).y},z(n)?.setPointerCapture(e.pointerId),e.preventDefault())}function d(e){r&&Mu(sd(e.clientX-i.x,0,window.innerWidth-48),sd(e.clientY-i.y,0,window.innerHeight-48))}function f(e){if(!r)return;r=!1,z(n)?.releasePointerCapture(e.pointerId);let t=od(z(a).x,z(a).y,window.innerWidth,window.innerHeight);Mu(t.x,t.y),Nu(t.corner)}function p(){r||Ou()}var m=la(),h=I(m),g=e=>{var t=Rf(),r=F(t);{let e=M(()=>z(c)?`#fff`:void 0);td(r,{get fill(){return z(e)},width:28,height:28})}D(t),Vo(t,e=>P(n,e),()=>z(n)),R(e=>{q(t,1,e),oo(t,`width: 48px; height: 48px; left: ${z(a).x??``}px; top: ${z(a).y??``}px; transform: translate3d(0, 0, 0); border-color: ${z(l)??``};`)},[()=>K($(`fixed z-[1000] rounded-full border-2 shadow-md`,`flex items-center justify-center cursor-pointer touch-none`,`transition-all duration-150 select-none`,`hover:shadow-lg`,`bg-surface hover:bg-subtle`))]),B(`click`,t,p),B(`pointerdown`,t,u),B(`pointermove`,t,d),B(`pointerup`,t,f),H(e,t)};W(h,e=>{z(s)||e(g)}),H(e,m),at()}ea([`click`,`pointerdown`,`pointermove`,`pointerup`]);var Bf={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Vf=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Hf=Symbol(`lucide-context`),Uf=()=>et(Hf),Wf=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),Gf=ca(`<svg><!><!></svg>`);function Kf(e,t){it(t,!0);let n=Uf()??{},r=Z(t,`color`,19,()=>n.color??`currentColor`),i=Z(t,`size`,19,()=>n.size??24),a=Z(t,`strokeWidth`,19,()=>n.strokeWidth??2),o=Z(t,`absoluteStrokeWidth`,19,()=>n.absoluteStrokeWidth??!1),s=Z(t,`iconNode`,19,()=>[]),c=Y(t,Wf),l=M(()=>o()?Number(a())*24/Number(i()):a());var u=Gf();Eo(u,e=>({...Bf,...e,...c,width:i(),height:i(),stroke:r(),"stroke-width":z(l),class:[`lucide-icon lucide`,n.class,t.name&&`lucide-${t.name}`,t.class]}),[()=>!t.children&&!Vf(c)&&{"aria-hidden":`true`}]);var d=F(u);G(d,17,s,Oa,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=la();Ya(I(a),r,!0,(e,t)=>{Eo(e,()=>({...i()}))}),H(e,a)}),La(L(d),()=>t.children??p),D(u),H(e,u),at()}var qf=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jf(e,t){let n=Y(t,qf),r=[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`}]];Kf(e,X({name:`activity`},()=>n,{get iconNode(){return r}}))}var Yf=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xf(e,t){let n=Y(t,Yf),r=[[`path`,{d:`M12 5v14`}],[`path`,{d:`m19 12-7 7-7-7`}]];Kf(e,X({name:`arrow-down`},()=>n,{get iconNode(){return r}}))}var Zf=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qf(e,t){let n=Y(t,Zf),r=[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]];Kf(e,X({name:`arrow-left`},()=>n,{get iconNode(){return r}}))}var $f=new Set([`$$slots`,`$$events`,`$$legacy`]);function ep(e,t){let n=Y(t,$f),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]];Kf(e,X({name:`arrow-right`},()=>n,{get iconNode(){return r}}))}var tp=new Set([`$$slots`,`$$events`,`$$legacy`]);function np(e,t){let n=Y(t,tp),r=[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]];Kf(e,X({name:`arrow-up`},()=>n,{get iconNode(){return r}}))}var rp=new Set([`$$slots`,`$$events`,`$$legacy`]);function ip(e,t){let n=Y(t,rp),r=[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`}]];Kf(e,X({name:`blocks`},()=>n,{get iconNode(){return r}}))}var ap=new Set([`$$slots`,`$$events`,`$$legacy`]);function op(e,t){let n=Y(t,ap),r=[[`path`,{d:`M12 8V4H8`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}],[`path`,{d:`M2 14h2`}],[`path`,{d:`M20 14h2`}],[`path`,{d:`M15 13v2`}],[`path`,{d:`M9 13v2`}]];Kf(e,X({name:`bot`},()=>n,{get iconNode(){return r}}))}var sp=new Set([`$$slots`,`$$events`,`$$legacy`]);function cp(e,t){let n=Y(t,sp),r=[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`}],[`path`,{d:`m7 16.5-4.74-2.85`}],[`path`,{d:`m7 16.5 5-3`}],[`path`,{d:`M7 16.5v5.17`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`}],[`path`,{d:`m17 16.5-5-3`}],[`path`,{d:`m17 16.5 4.74-2.85`}],[`path`,{d:`M17 16.5v5.17`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`}],[`path`,{d:`M12 8 7.26 5.15`}],[`path`,{d:`m12 8 4.74-2.85`}],[`path`,{d:`M12 13.5V8`}]];Kf(e,X({name:`boxes`},()=>n,{get iconNode(){return r}}))}var lp=new Set([`$$slots`,`$$events`,`$$legacy`]);function up(e,t){let n=Y(t,lp),r=[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]];Kf(e,X({name:`brain`},()=>n,{get iconNode(){return r}}))}var dp=new Set([`$$slots`,`$$events`,`$$legacy`]);function fp(e,t){let n=Y(t,dp),r=[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]];Kf(e,X({name:`camera`},()=>n,{get iconNode(){return r}}))}var pp=new Set([`$$slots`,`$$events`,`$$legacy`]);function mp(e,t){let n=Y(t,pp),r=[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}],[`path`,{d:`M18 17V9`}],[`path`,{d:`M13 17V5`}],[`path`,{d:`M8 17v-3`}]];Kf(e,X({name:`chart-column`},()=>n,{get iconNode(){return r}}))}var hp=new Set([`$$slots`,`$$events`,`$$legacy`]);function gp(e,t){let n=Y(t,hp),r=[[`path`,{d:`M5 21v-6`}],[`path`,{d:`M12 21V9`}],[`path`,{d:`M19 21V3`}]];Kf(e,X({name:`chart-no-axes-column-increasing`},()=>n,{get iconNode(){return r}}))}var _p=new Set([`$$slots`,`$$events`,`$$legacy`]);function vp(e,t){let n=Y(t,_p),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];Kf(e,X({name:`check`},()=>n,{get iconNode(){return r}}))}var yp=new Set([`$$slots`,`$$events`,`$$legacy`]);function bp(e,t){let n=Y(t,yp),r=[[`path`,{d:`m6 9 6 6 6-6`}]];Kf(e,X({name:`chevron-down`},()=>n,{get iconNode(){return r}}))}var xp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sp(e,t){let n=Y(t,xp),r=[[`path`,{d:`m15 18-6-6 6-6`}]];Kf(e,X({name:`chevron-left`},()=>n,{get iconNode(){return r}}))}var Cp=new Set([`$$slots`,`$$events`,`$$legacy`]);function wp(e,t){let n=Y(t,Cp),r=[[`path`,{d:`m9 18 6-6-6-6`}]];Kf(e,X({name:`chevron-right`},()=>n,{get iconNode(){return r}}))}var Tp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ep(e,t){let n=Y(t,Tp),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]];Kf(e,X({name:`circle-alert`},()=>n,{get iconNode(){return r}}))}var Dp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Op(e,t){let n=Y(t,Dp),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]];Kf(e,X({name:`circle-question-mark`},()=>n,{get iconNode(){return r}}))}var kp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ap(e,t){let n=Y(t,kp),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 6v6l4 2`}]];Kf(e,X({name:`clock`},()=>n,{get iconNode(){return r}}))}var jp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mp(e,t){let n=Y(t,jp),r=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]];Kf(e,X({name:`code-xml`},()=>n,{get iconNode(){return r}}))}var Np=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pp(e,t){let n=Y(t,Np),r=[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`}],[`path`,{d:`M15 6h1v4`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`}],[`circle`,{cx:`16`,cy:`8`,r:`6`}]];Kf(e,X({name:`coins`},()=>n,{get iconNode(){return r}}))}var Fp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ip(e,t){let n=Y(t,Fp),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];Kf(e,X({name:`copy`},()=>n,{get iconNode(){return r}}))}var Lp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rp(e,t){let n=Y(t,Lp),r=[[`path`,{d:`M12 20v2`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M17 20v2`}],[`path`,{d:`M17 2v2`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M2 17h2`}],[`path`,{d:`M2 7h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`M20 17h2`}],[`path`,{d:`M20 7h2`}],[`path`,{d:`M7 20v2`}],[`path`,{d:`M7 2v2`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`}]];Kf(e,X({name:`cpu`},()=>n,{get iconNode(){return r}}))}var zp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bp(e,t){let n=Y(t,zp),r=[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`}]];Kf(e,X({name:`database`},()=>n,{get iconNode(){return r}}))}var Vp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hp(e,t){let n=Y(t,Vp),r=[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`}]];Kf(e,X({name:`dollar-sign`},()=>n,{get iconNode(){return r}}))}var Up=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wp(e,t){let n=Y(t,Up),r=[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]];Kf(e,X({name:`download`},()=>n,{get iconNode(){return r}}))}var Gp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Kp(e,t){let n=Y(t,Gp),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]];Kf(e,X({name:`external-link`},()=>n,{get iconNode(){return r}}))}var qp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jp(e,t){let n=Y(t,qp),r=[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}],[`path`,{d:`m2 2 20 20`}]];Kf(e,X({name:`eye-off`},()=>n,{get iconNode(){return r}}))}var Yp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xp(e,t){let n=Y(t,Yp),r=[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Kf(e,X({name:`eye`},()=>n,{get iconNode(){return r}}))}var Zp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qp(e,t){let n=Y(t,Zp),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]];Kf(e,X({name:`file-exclamation-point`},()=>n,{get iconNode(){return r}}))}var $p=new Set([`$$slots`,`$$events`,`$$legacy`]);function em(e,t){let n=Y(t,$p),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]];Kf(e,X({name:`file-text`},()=>n,{get iconNode(){return r}}))}var tm=new Set([`$$slots`,`$$events`,`$$legacy`]);function nm(e,t){let n=Y(t,tm),r=[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`}]];Kf(e,X({name:`flag`},()=>n,{get iconNode(){return r}}))}var rm=new Set([`$$slots`,`$$events`,`$$legacy`]);function im(e,t){let n=Y(t,rm),r=[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`}]];Kf(e,X({name:`flame`},()=>n,{get iconNode(){return r}}))}var am=new Set([`$$slots`,`$$events`,`$$legacy`]);function om(e,t){let n=Y(t,am),r=[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`}]];Kf(e,X({name:`funnel`},()=>n,{get iconNode(){return r}}))}var sm=new Set([`$$slots`,`$$events`,`$$legacy`]);function cm(e,t){let n=Y(t,sm),r=[[`path`,{d:`m12 14 4-4`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`}]];Kf(e,X({name:`gauge`},()=>n,{get iconNode(){return r}}))}var lm=new Set([`$$slots`,`$$events`,`$$legacy`]);function um(e,t){let n=Y(t,lm),r=[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}]];Kf(e,X({name:`git-branch`},()=>n,{get iconNode(){return r}}))}var dm=new Set([`$$slots`,`$$events`,`$$legacy`]);function fm(e,t){let n=Y(t,dm),r=[[`circle`,{cx:`18`,cy:`18`,r:`3`}],[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`}]];Kf(e,X({name:`git-compare`},()=>n,{get iconNode(){return r}}))}var pm=new Set([`$$slots`,`$$events`,`$$legacy`]);function mm(e,t){let n=Y(t,pm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 9h18`}],[`path`,{d:`M3 15h18`}],[`path`,{d:`M9 3v18`}],[`path`,{d:`M15 3v18`}]];Kf(e,X({name:`grid-3x3`},()=>n,{get iconNode(){return r}}))}var hm=new Set([`$$slots`,`$$events`,`$$legacy`]);function gm(e,t){let n=Y(t,hm),r=[[`circle`,{cx:`12`,cy:`9`,r:`1`}],[`circle`,{cx:`19`,cy:`9`,r:`1`}],[`circle`,{cx:`5`,cy:`9`,r:`1`}],[`circle`,{cx:`12`,cy:`15`,r:`1`}],[`circle`,{cx:`19`,cy:`15`,r:`1`}],[`circle`,{cx:`5`,cy:`15`,r:`1`}]];Kf(e,X({name:`grip-horizontal`},()=>n,{get iconNode(){return r}}))}var _m=new Set([`$$slots`,`$$events`,`$$legacy`]);function vm(e,t){let n=Y(t,_m),r=[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`}]];Kf(e,X({name:`hash`},()=>n,{get iconNode(){return r}}))}var ym=new Set([`$$slots`,`$$events`,`$$legacy`]);function bm(e,t){let n=Y(t,ym),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]];Kf(e,X({name:`info`},()=>n,{get iconNode(){return r}}))}var xm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sm(e,t){let n=Y(t,xm),r=[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`}]];Kf(e,X({name:`layers`},()=>n,{get iconNode(){return r}}))}var Cm=new Set([`$$slots`,`$$events`,`$$legacy`]);function wm(e,t){let n=Y(t,Cm),r=[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`}],[`path`,{d:`M14 4h7`}],[`path`,{d:`M14 9h7`}],[`path`,{d:`M14 15h7`}],[`path`,{d:`M14 20h7`}]];Kf(e,X({name:`layout-list`},()=>n,{get iconNode(){return r}}))}var Tm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Em(e,t){let n=Y(t,Tm),r=[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`}]];Kf(e,X({name:`link-2`},()=>n,{get iconNode(){return r}}))}var Dm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Om(e,t){let n=Y(t,Dm),r=[[`path`,{d:`M8 5h13`}],[`path`,{d:`M13 12h8`}],[`path`,{d:`M13 19h8`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`}]];Kf(e,X({name:`list-tree`},()=>n,{get iconNode(){return r}}))}var km=new Set([`$$slots`,`$$events`,`$$legacy`]);function Am(e,t){let n=Y(t,km),r=[[`path`,{d:`M3 5h.01`}],[`path`,{d:`M3 12h.01`}],[`path`,{d:`M3 19h.01`}],[`path`,{d:`M8 5h13`}],[`path`,{d:`M8 12h13`}],[`path`,{d:`M8 19h13`}]];Kf(e,X({name:`list`},()=>n,{get iconNode(){return r}}))}var jm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mm(e,t){let n=Y(t,jm),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]];Kf(e,X({name:`maximize-2`},()=>n,{get iconNode(){return r}}))}var Nm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pm(e,t){let n=Y(t,Nm),r=[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}]];Kf(e,X({name:`message-square`},()=>n,{get iconNode(){return r}}))}var Fm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Im(e,t){let n=Y(t,Fm),r=[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]];Kf(e,X({name:`minimize-2`},()=>n,{get iconNode(){return r}}))}var Lm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rm(e,t){let n=Y(t,Lm),r=[[`path`,{d:`M5 12h14`}]];Kf(e,X({name:`minus`},()=>n,{get iconNode(){return r}}))}var zm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bm(e,t){let n=Y(t,zm),r=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`}]];Kf(e,X({name:`monitor`},()=>n,{get iconNode(){return r}}))}var Vm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hm(e,t){let n=Y(t,Vm),r=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]];Kf(e,X({name:`moon`},()=>n,{get iconNode(){return r}}))}var Um=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wm(e,t){let n=Y(t,Um),r=[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`}],[`path`,{d:`M12 12V8`}]];Kf(e,X({name:`network`},()=>n,{get iconNode(){return r}}))}var Gm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Km(e,t){let n=Y(t,Gm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 15h18`}]];Kf(e,X({name:`panel-bottom`},()=>n,{get iconNode(){return r}}))}var qm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jm(e,t){let n=Y(t,qm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]];Kf(e,X({name:`panel-left`},()=>n,{get iconNode(){return r}}))}var Ym=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xm(e,t){let n=Y(t,Ym),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M15 3v18`}]];Kf(e,X({name:`panel-right`},()=>n,{get iconNode(){return r}}))}var Zm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qm(e,t){let n=Y(t,Zm),r=[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]];Kf(e,X({name:`pause`},()=>n,{get iconNode(){return r}}))}var $m=new Set([`$$slots`,`$$events`,`$$legacy`]);function eh(e,t){let n=Y(t,$m),r=[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`}]];Kf(e,X({name:`picture-in-picture-2`},()=>n,{get iconNode(){return r}}))}var th=new Set([`$$slots`,`$$events`,`$$legacy`]);function nh(e,t){let n=Y(t,th),r=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]];Kf(e,X({name:`play`},()=>n,{get iconNode(){return r}}))}var rh=new Set([`$$slots`,`$$events`,`$$legacy`]);function ih(e,t){let n=Y(t,rh),r=[[`path`,{d:`M12 22v-5`}],[`path`,{d:`M15 8V2`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`}],[`path`,{d:`M9 8V2`}]];Kf(e,X({name:`plug`},()=>n,{get iconNode(){return r}}))}var ah=new Set([`$$slots`,`$$events`,`$$legacy`]);function oh(e,t){let n=Y(t,ah),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]];Kf(e,X({name:`plus`},()=>n,{get iconNode(){return r}}))}var sh=new Set([`$$slots`,`$$events`,`$$legacy`]);function ch(e,t){let n=Y(t,sh),r=[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`}],[`path`,{d:`M4 6h.01`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`}],[`path`,{d:`M12 18h.01`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`}],[`circle`,{cx:`12`,cy:`12`,r:`2`}],[`path`,{d:`m13.41 10.59 5.66-5.66`}]];Kf(e,X({name:`radar`},()=>n,{get iconNode(){return r}}))}var lh=new Set([`$$slots`,`$$events`,`$$legacy`]);function uh(e,t){let n=Y(t,lh),r=[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]];Kf(e,X({name:`refresh-cw`},()=>n,{get iconNode(){return r}}))}var dh=new Set([`$$slots`,`$$events`,`$$legacy`]);function fh(e,t){let n=Y(t,dh),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`}]];Kf(e,X({name:`rotate-ccw`},()=>n,{get iconNode(){return r}}))}var ph=new Set([`$$slots`,`$$events`,`$$legacy`]);function mh(e,t){let n=Y(t,ph),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}],[`path`,{d:`m16 16-1.9-1.9`}]];Kf(e,X({name:`scan-search`},()=>n,{get iconNode(){return r}}))}var hh=new Set([`$$slots`,`$$events`,`$$legacy`]);function gh(e,t){let n=Y(t,hh),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}]];Kf(e,X({name:`scan`},()=>n,{get iconNode(){return r}}))}var _h=new Set([`$$slots`,`$$events`,`$$legacy`]);function vh(e,t){let n=Y(t,_h),r=[[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M8.12 8.12 12 12`}],[`path`,{d:`M20 4 8.12 15.88`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}],[`path`,{d:`M14.8 14.8 20 20`}]];Kf(e,X({name:`scissors`},()=>n,{get iconNode(){return r}}))}var yh=new Set([`$$slots`,`$$events`,`$$legacy`]);function bh(e,t){let n=Y(t,yh),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];Kf(e,X({name:`search`},()=>n,{get iconNode(){return r}}))}var xh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sh(e,t){let n=Y(t,xh),r=[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`}]];Kf(e,X({name:`server`},()=>n,{get iconNode(){return r}}))}var Ch=new Set([`$$slots`,`$$events`,`$$legacy`]);function wh(e,t){let n=Y(t,Ch),r=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Kf(e,X({name:`settings`},()=>n,{get iconNode(){return r}}))}var Th=new Set([`$$slots`,`$$events`,`$$legacy`]);function Eh(e,t){let n=Y(t,Th),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`M12 8v4`}],[`path`,{d:`M12 16h.01`}]];Kf(e,X({name:`shield-alert`},()=>n,{get iconNode(){return r}}))}var Dh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Oh(e,t){let n=Y(t,Dh),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}]];Kf(e,X({name:`shield`},()=>n,{get iconNode(){return r}}))}var kh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ah(e,t){let n=Y(t,kh),r=[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`}],[`path`,{d:`M20 2v4`}],[`path`,{d:`M22 4h-4`}],[`circle`,{cx:`4`,cy:`20`,r:`2`}]];Kf(e,X({name:`sparkles`},()=>n,{get iconNode(){return r}}))}var jh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mh(e,t){let n=Y(t,jh),r=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]];Kf(e,X({name:`sun`},()=>n,{get iconNode(){return r}}))}var Nh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ph(e,t){let n=Y(t,Nh),r=[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}]];Kf(e,X({name:`tag`},()=>n,{get iconNode(){return r}}))}var Fh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ih(e,t){let n=Y(t,Fh),r=[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]];Kf(e,X({name:`terminal`},()=>n,{get iconNode(){return r}}))}var Lh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rh(e,t){let n=Y(t,Lh),r=[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]];Kf(e,X({name:`trash-2`},()=>n,{get iconNode(){return r}}))}var zh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bh(e,t){let n=Y(t,zh),r=[[`path`,{d:`M16 7h6v6`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`}]];Kf(e,X({name:`trending-up`},()=>n,{get iconNode(){return r}}))}var Vh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hh(e,t){let n=Y(t,Vh),r=[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]];Kf(e,X({name:`triangle-alert`},()=>n,{get iconNode(){return r}}))}var Uh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wh(e,t){let n=Y(t,Uh),r=[[`path`,{d:`M12 3v12`}],[`path`,{d:`m17 8-5-5-5 5`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}]];Kf(e,X({name:`upload`},()=>n,{get iconNode(){return r}}))}var Gh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Kh(e,t){let n=Y(t,Gh),r=[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`12`,cy:`7`,r:`4`}]];Kf(e,X({name:`user`},()=>n,{get iconNode(){return r}}))}var qh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jh(e,t){let n=Y(t,qh),r=[[`path`,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`}],[`path`,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`}],[`path`,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`}]];Kf(e,X({name:`webhook`},()=>n,{get iconNode(){return r}}))}var Yh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xh(e,t){let n=Y(t,Yh),r=[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`}]];Kf(e,X({name:`workflow`},()=>n,{get iconNode(){return r}}))}var Zh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qh(e,t){let n=Y(t,Zh),r=[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]];Kf(e,X({name:`wrench`},()=>n,{get iconNode(){return r}}))}var $h=new Set([`$$slots`,`$$events`,`$$legacy`]);function eg(e,t){let n=Y(t,$h),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];Kf(e,X({name:`x`},()=>n,{get iconNode(){return r}}))}var tg=new Set([`$$slots`,`$$events`,`$$legacy`]);function ng(e,t){let n=Y(t,tg),r=[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`}]];Kf(e,X({name:`zap`},()=>n,{get iconNode(){return r}}))}function rg(e){let t=e-1;return t*t*t+1}function ig(){return globalThis.window===void 0?null:window.documentPictureInPicture??null}function ag(){return ig()!==null}var og=null,sg=null;async function cg(e,t,{width:n=720,height:r=560}={}){let i=ig();if(!i||og)return!1;let a=await i.requestWindow({width:n,height:r});og=a,a.document.title=e.ownerDocument.title||`autotel devtools`;let o=a.document.createElement(`style`);return o.textContent=`html,body{margin:0;padding:0;height:100%;width:100%;overflow:hidden;background:transparent}`,a.document.head.appendChild(o),sg=e.ownerDocument.createComment(`autotel-pip-placeholder`),e.replaceWith(sg),a.document.body.appendChild(e),a.addEventListener(`pagehide`,()=>ug(t),{once:!0}),!0}function lg(e){if(!og)return;let t=og;ug(e);try{t.close()}catch{}}function ug(e){let t=og;if(!t)return;og=null;let n=t.document.body.firstElementChild;n&&(sg?.isConnected?sg.replaceWith(n):document.body.appendChild(n)),sg=null,e?.()}var dg=[{fill:`#ede9fe`,stroke:`#8b5cf6`},{fill:`#ccfbf1`,stroke:`#14b8a6`},{fill:`#dbeafe`,stroke:`#3b82f6`},{fill:`#fef9c3`,stroke:`#ca8a04`},{fill:`#fce7f3`,stroke:`#db2777`},{fill:`#dcfce7`,stroke:`#16a34a`},{fill:`#ffedd5`,stroke:`#ea580c`},{fill:`#e0e7ff`,stroke:`#6366f1`}];function fg(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return dg[t%dg.length]}var pg=[{keys:[`1-6`],description:`Switch between tabs (Traces through Errors)`},{keys:[`?`],description:`Show/hide this shortcuts help`},{keys:[`Esc`],description:`Close shortcuts help / go back from trace detail`},{keys:[`/`],description:`Focus search filter`}],mg=[{keys:[`/`],description:`Focus search filter`},{keys:[`Esc`],description:`Clear selection / clear search`},{keys:[`CmdOrCtrl`,`A`],description:`Select all traces`},{keys:[`?`],description:`Show/hide keyboard shortcuts`}],hg=[{keys:[`Esc`],description:`Go back to trace list / close span detail`},{keys:[`w`],description:`Switch to waterfall view`},{keys:[`f`],description:`Switch to flame graph view`},{keys:[`l`],description:`Switch to list view`},{keys:[`↑`,`↓`,`Enter`],description:`Navigate spans / select in waterfall`},{keys:[`e`,`Shift+E`],description:`Next / previous error span`},{keys:[`/`],description:`Search spans in this trace`},{keys:[`?`],description:`Show/hide keyboard shortcuts`}];function gg(){let e=document.activeElement;if(!e)return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||!!e.isContentEditable}function _g(e){return t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e())}}var vg=globalThis.navigator!==void 0&&/Mac|iPhone|iPad|iPod/.test(navigator.platform),yg=V(`<div class="border border-line rounded-lg p-3 bg-subtle"><div class="font-semibold text-fg"> </div> <div class="text-xs text-fg-subtle mt-0.5"> </div></div>`),bg=V(`<div class="p-3 bg-danger-bg border border-danger-border rounded-md text-sm text-danger flex items-start gap-2"><!> <span> </span></div>`),xg=V(`<p class="mb-1 last:mb-0"> </p>`),Sg=V(`<div class="p-3 bg-accent/10 border border-accent/30 rounded-md text-sm text-accent"></div>`),Cg=V(`<div class="p-3 bg-success-bg border border-success-border rounded-md text-sm text-success"> </div>`),wg=V(`<div class="fixed inset-0 z-[1100] flex items-center justify-center" role="dialog" aria-modal="true" aria-label="Import traces"><button type="button" aria-label="Close" class="absolute inset-0 bg-black/55 backdrop-blur-[2px] at-backdrop-in"></button> <div tabindex="-1" class="at-modal-in relative z-[1] w-[min(560px,92vw)] max-h-[85vh] overflow-hidden flex flex-col bg-surface rounded-lg shadow-xl border border-line outline-none"><div class="flex items-center justify-between px-4 py-3 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-semibold text-fg">Import Traces</span> <button class="inline-flex items-center justify-center w-7 h-7 bg-transparent border border-line rounded text-sm text-fg-subtle hover:bg-danger-bg hover:border-danger-border hover:text-danger transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-y-auto p-4 flex flex-col gap-3"><label class="flex flex-col gap-2 text-sm text-fg-muted"><span class="font-semibold text-fg">JSON file</span> <span class="inline-flex items-center px-3 py-1.5 border border-line rounded text-sm text-fg-muted bg-surface hover:bg-subtle cursor-pointer w-fit transition-colors"><!> Choose file</span> <input type="file" accept=".json,application/json" class="hidden"/></label> <!> <!> <!> <!></div> <div class="flex items-center justify-end gap-3 px-4 py-3 border-t border-line bg-subtle flex-shrink-0"><button class="px-3 py-1.5 text-sm border border-line rounded bg-surface text-fg-muted hover:bg-subtle disabled:opacity-50 disabled:cursor-not-allowed transition-colors">Cancel</button> <button class="px-4 py-1.5 text-sm rounded bg-accent text-white hover:bg-accent/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"> </button></div></div></div>`);function Tg(e,t){it(t,!0);function n(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}let r=N(null),i=N(!1),a=N(null),o=N(null),s=N(void 0);Lr(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t.onclose())};return window.addEventListener(`keydown`,e),z(s)?.focus(),()=>window.removeEventListener(`keydown`,e)});let c=e=>{let t=e.target.files?.[0];t&&(P(r,t,!0),P(o,null),P(a,null))},l=async()=>{if(z(r)){P(i,!0),P(o,null);try{let e=await t.onimport(z(r));P(a,e,!0),e.errors.length>0&&P(o,e.errors.join(`; `),!0),e.imported>0&&e.errors.length===0&&setTimeout(t.onclose,1500)}catch(e){P(o,String(e),!0)}finally{P(i,!1)}}};var u=wg(),d=F(u),f=L(d,2),p=F(f),m=L(F(p),2);eg(F(m),{size:14}),D(m),D(p);var h=L(p,2),g=F(h),_=L(F(g),2);Wh(F(_),{size:14,class:`mr-1.5`}),Ke(),D(_);var v=L(_,2);D(g);var y=L(g,2),b=e=>{var t=yg(),i=F(t),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(t),R(e=>{U(a,z(r).name),U(s,e)},[()=>n(z(r).size)]),H(e,t)};W(y,e=>{z(r)&&e(b)});var x=L(y,2),S=e=>{var t=bg(),n=F(t);Hh(n,{size:14,class:`flex-shrink-0 mt-0.5`});var r=L(n,2),i=F(r,!0);D(r),D(t),R(()=>U(i,z(o))),H(e,t)};W(x,e=>{z(o)&&e(S)});var C=L(x,2),w=e=>{var t=Sg();G(t,21,()=>z(a).warnings,Oa,(e,t)=>{var n=xg(),r=F(n,!0);D(n),R(()=>U(r,z(t))),H(e,n)}),D(t),H(e,t)};W(C,e=>{z(a)&&z(a).warnings.length>0&&e(w)});var T=L(C,2),ee=e=>{var t=Cg(),n=F(t);D(t),R(()=>U(n,`Successfully imported ${z(a).imported??``} trace${z(a).imported===1?``:`s`}.`)),H(e,t)};W(T,e=>{z(a)&&z(a).imported>0&&e(ee)}),D(h);var te=L(h,2),ne=F(te),re=L(ne,2),ie=F(re,!0);D(re),D(te),D(f),Vo(f,e=>P(s,e),()=>z(s)),D(u),R(()=>{ne.disabled=z(i),re.disabled=!z(r)||z(i),U(ie,z(i)?`Importing...`:`Confirm Import`)}),B(`click`,d,function(...e){t.onclose?.apply(this,e)}),B(`click`,m,function(...e){t.onclose?.apply(this,e)}),B(`change`,v,c),B(`click`,ne,function(...e){t.onclose?.apply(this,e)}),B(`click`,re,l),H(e,u),at()}ea([`click`,`change`]);function Eg(e,t){if(t.length===0)return e.duration;let n=t.map(t=>[Math.max(t.startTime,e.startTime),Math.min(t.endTime,e.endTime)]).filter(([e,t])=>t>e).sort((e,t)=>e[0]-t[0]),r=0,i=-1/0,a=-1/0;for(let[e,t]of n)e>a?(a>i&&(r+=a-i),i=e,a=t):t>a&&(a=t);return a>i&&(r+=a-i),Math.max(0,e.duration-r)}function Dg(e){let t=new Set;if(e.length===0)return t;let n=new Map;for(let t of e)n.set(t.spanId,t);let r=new Map;for(let t of e){let e=t.parentSpanId&&n.has(t.parentSpanId)?t.parentSpanId:``,i=r.get(e);i?i.push(t):r.set(e,[t])}let i=r.get(``)??[];if(i.length===0)return t;let a=e=>e.reduce((e,t)=>t.endTime>e.endTime?t:e),o=a(i);for(;o&&!t.has(o.spanId);){t.add(o.spanId);let e=r.get(o.spanId);o=e&&e.length?a(e):void 0}return t}function Og(e,t=()=>!1){let n=[],r=(e,i,a)=>{e.forEach((o,s)=>{let c=s===e.length-1;n.push({node:o,connectors:{ancestorLines:[...i],isLast:c,depth:a}}),!(t(o)||o.children.length===0)&&r(o.children,[...i,!c],a+1)})};return r(e,[],0),n}function kg(e){if(e!==`local`)return e===`utc`?`UTC`:e}function Ag(e,t){try{return new Intl.DateTimeFormat(void 0,{...t,timeZone:kg(e)})}catch{return new Intl.DateTimeFormat(void 0,t)}}function jg(e,t=`local`){return Ag(t,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}).format(new Date(e))}function Mg(e=`local`){return e===`utc`?`UTC`:Ag(e,{timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??`Local`}var Ng=2;function Pg(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=n>0?(e[i].timestamp-t)/n*100:0,o=Math.min(Math.max(a,0),100),s=r.find(e=>e.every(e=>Math.abs(o-e.posPercent)>Ng));s?s.push({index:i,posPercent:o}):r.push([{index:i,posPercent:o}])}return r}var Fg=new Set([`error`,`fatal`,`critical`]);function Ig(e){if(e.name===`exception`)return`exception`;let t=e.attributes?.level??e.attributes?.severity;return typeof t==`string`&&Fg.has(t.toLowerCase())?`exception`:`event`}var Lg=V(`<span class="absolute inset-y-0 border-l border-line"></span>`),Rg=V(`<span class="relative shrink-0"><!></span>`),zg=V(`<span class="relative shrink-0"><span></span> <span class="absolute top-1/2 border-t border-line"></span></span>`),Bg=V(`<span aria-hidden="true" data-testid="tree-gutter"><!> <!></span>`);function Vg(e,t){it(t,!0);let n=Z(t,`indent`,3,16);var r=Bg(),i=F(r);G(i,17,()=>t.ancestorLines,Oa,(e,t)=>{var r=Rg(),i=F(r),a=e=>{var t=Lg();R(()=>oo(t,`left:${n()/2}px`)),H(e,t)};W(i,e=>{z(t)&&e(a)}),D(r),R(()=>{oo(r,`width:${n()??``}px`),J(r,`data-testid`,z(t)?`gutter-line`:`gutter-blank`)}),H(e,r)});var a=L(i,2),o=e=>{var r=zg(),i=F(r),a=L(i,2);D(r),R(e=>{oo(r,`width:${n()??``}px`),J(r,`data-testid`,t.isLast?`gutter-elbow`:`gutter-tee`),q(i,1,e),oo(i,`left:${n()/2}px`),oo(a,`left:${n()/2}px; width:${n()/2}px`)},[()=>K($(`absolute top-0 border-l border-line`,t.isLast?`h-1/2`:`inset-y-0`))]),H(e,r)};W(a,e=>{(t.ancestorLines.length>0||!t.isLast)&&e(o)}),D(r),R(e=>q(r,1,e),[()=>K($(`flex shrink-0 self-stretch`,t.class))]),H(e,r),at()}function Hg(e){let t=e.children.length;for(let n of e.children)t+=Hg(n);return t}function Ug(e,t){let n=t.startTime,r=t.duration||1,i=e.startTime-n,a=i/r*100,o=e.duration/r*100;return{offsetMs:i,offsetPercent:Math.max(0,Math.min(100,a)),widthPercent:Math.max(.5,Math.min(100-a,o))}}function Wg(e){switch(e){case`SERVER`:return`bg-blue-500`;case`CLIENT`:return`bg-green-500`;case`PRODUCER`:return`bg-purple-500`;case`CONSUMER`:return`bg-orange-500`;default:return`bg-gray-500`}}function Gg(e){switch(e){case`SERVER`:return`bg-blue-400`;case`CLIENT`:return`bg-green-400`;case`PRODUCER`:return`bg-purple-400`;case`CONSUMER`:return`bg-orange-400`;default:return`bg-gray-400`}}var Kg=V(`<button class="p-0.5 hover:bg-hover rounded flex-shrink-0"><!></button>`),qg=V(`<div class="w-4"></div>`),Jg=V(`<span class="text-xs text-fg-subtle ml-1"> </span>`),Yg=V(`<span class="absolute inset-0 flex items-center justify-center text-[10px] text-white font-medium"> </span>`),Xg=V(`<button type="button"></button>`),Zg=V(`<div class="flex gap-2 py-0.5"><span class="text-fg-subtle flex-shrink-0"> </span> <span class="text-fg break-all"> </span></div>`),Qg=V(`<div class="font-mono text-[11px] text-fg-muted bg-subtle rounded p-2 border border-line-subtle max-h-[160px] overflow-auto"></div>`),$g=V(`<div class="text-[11px] text-fg-subtle italic">No attributes</div>`),e_=V(`<div class="absolute z-30 top-[calc(100%-2px)] left-2 right-2 max-w-[420px] bg-surface border border-line rounded-md shadow-lg p-2.5 text-left at-modal-in"><div class="flex items-center gap-2 mb-1.5"><span></span> <span> </span> <span class="text-[10px] text-fg-subtle font-mono"> </span> <button type="button" class="p-0.5 hover:bg-hover rounded flex-shrink-0" aria-label="Close event detail"><!></button></div> <div class="text-[10px] text-fg-subtle font-mono mb-1.5"> </div> <!></div>`),t_=V(`<div><div class="w-[200px] shrink-0 pr-2 py-2 flex items-center gap-1 min-w-0"><!> <!> <!> <!> <!> <span> </span> <!></div> <div class="flex-1 relative"><div><!></div> <!> <!></div> <div class="w-[80px] shrink-0 px-2 py-2 text-right"><span> </span></div></div>`);function n_(e,t){it(t,!0);let n=M(()=>t.node.span),r=M(()=>Ug(z(n),t.trace)),i=M(()=>z(n).status.code===`ERROR`),a=M(()=>z(n).events&&z(n).events.length>0),o=M(()=>Pg(z(n).events??[],t.trace.startTime,t.trace.duration)),s=N(null),c=e=>{P(s,z(s)===e?null:e,!0)};Lr(()=>{if(z(s)===null)return;let e=()=>{P(s,null)},t=t=>{t.key===`Escape`&&e()};return window.addEventListener(`click`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`click`,e),window.removeEventListener(`keydown`,t)}});var l=t_(),u=F(l),d=F(u),f=e=>{Vg(e,{get ancestorLines(){return t.connectors.ancestorLines},get isLast(){return t.connectors.isLast}})};W(d,e=>{t.connectors&&e(f)});var p=L(d,2),m=e=>{var n=Kg(),r=F(n),i=e=>{wp(e,{size:12,class:`text-fg-subtle`})},a=e=>{bp(e,{size:12,class:`text-fg-subtle`})};W(r,e=>{t.isCollapsed?e(i):e(a,-1)}),D(n),B(`click`,n,e=>{e.stopPropagation(),t.onToggleCollapse?.()}),H(e,n)},h=e=>{H(e,qg())};W(p,e=>{t.hasChildren?e(m):e(h,-1)});var g=L(p,2),v=e=>{Ep(e,{size:12,class:`text-danger flex-shrink-0`})};W(g,e=>{z(i)&&e(v)});var y=L(g,2),b=e=>{bm(e,{size:10,class:`text-accent flex-shrink-0`})};W(y,e=>{z(a)&&e(b)});var x=L(y,2),S=e=>{ng(e,{size:10,class:`text-warning fill-warning flex-shrink-0`})};W(x,e=>{t.isCritical&&e(S)});var C=L(x,2),w=F(C,!0);D(C);var T=L(C,2),ee=e=>{var n=Jg(),r=F(n);D(n),R(e=>U(r,`(+${e??``})`),[()=>Hg(t.node)]),H(e,n)};W(T,e=>{t.isCollapsed&&t.node.children.length>0&&e(ee)}),D(u);var te=L(u,2),ne=F(te),re=F(ne),ie=e=>{var t=Yg(),r=F(t,!0);D(t),R(e=>U(r,e),[()=>nd(z(n).duration)]),H(e,t)};W(re,e=>{z(r).widthPercent>10&&e(ie)}),D(ne);var ae=L(ne,2);G(ae,17,()=>z(o),Oa,(e,r,i)=>{var a=la();G(I(a),17,()=>z(r),e=>e.index,(e,r)=>{let a=M(()=>z(n).events[z(r).index]),o=M(()=>28+i*8),l=M(()=>Ig(z(a))===`exception`);var u=Xg();R((e,t)=>{q(u,1,e),oo(u,`left: ${z(r).posPercent}%; top: ${z(o)}px; transform: translateX(-50%);`),J(u,`title`,t),J(u,`aria-label`,`Event ${z(a).name}`)},[()=>K($(`absolute w-2.5 h-2.5 rounded-full border border-white z-10 cursor-pointer hover:scale-125 transition-transform`,z(l)?`bg-danger`:`bg-warning`,z(s)===z(r).index&&`ring-2 ring-accent scale-125`)),()=>`${z(a).name} at ${nd(z(a).timestamp-t.trace.startTime)} — click for detail`]),B(`click`,u,e=>{e.stopPropagation(),c(z(r).index)}),H(e,u)}),H(e,a)});var oe=L(ae,2),se=e=>{let r=M(()=>z(n).events[z(s)]),i=M(()=>Ig(z(r))===`exception`);var a=e_(),o=F(a),c=F(o),l=L(c,2),u=F(l,!0);D(l);var d=L(l,2),f=F(d);D(d);var p=L(d,2);eg(F(p),{size:12,class:`text-fg-subtle`}),D(p),D(o);var m=L(o,2),h=F(m,!0);D(m);var g=L(m,2),v=e=>{var t=Qg();G(t,21,()=>Object.entries(z(r).attributes),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=Zg(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,r()),U(l,e)},[()=>typeof i()==`object`?JSON.stringify(i()):String(i())]),H(e,a)}),D(t),H(e,t)},y=M(()=>z(r).attributes&&Object.keys(z(r).attributes).length>0),b=e=>{H(e,$g())};W(g,e=>{z(y)?e(v):e(b,-1)}),D(a),R((e,t,n,i)=>{q(c,1,e),q(l,1,t),U(u,z(r).name),U(f,`+${n??``}`),U(h,i)},[()=>K($(`w-2 h-2 rounded-full flex-shrink-0`,z(i)?`bg-danger`:`bg-warning`)),()=>K($(`text-xs font-medium flex-1 truncate`,z(i)?`text-danger`:`text-fg`)),()=>nd(z(r).timestamp-t.trace.startTime),()=>jg(z(r).timestamp,zu.value)]),B(`click`,a,e=>e.stopPropagation()),B(`click`,p,e=>{e.stopPropagation(),P(s,null)}),H(e,a)};W(oe,e=>{z(s)!==null&&z(n).events?.[z(s)]&&e(se)}),D(te);var ce=L(te,2),le=F(ce),E=F(le,!0);D(le),D(ce),D(l),R((e,i,a,o,s,c,d)=>{J(l,`id`,`waterfall-row-${z(n).spanId}`),q(l,1,e),oo(u,t.connectors?`padding-left: 8px;`:`padding-left: ${8+t.node.depth*16}px;`),q(C,1,i),J(C,`title`,z(n).name),U(w,z(n).name||`unknown`),oo(te,a),q(ne,1,o),oo(ne,`left: ${z(r).offsetPercent}%; width: ${z(r).widthPercent}%; top: 6px; min-width: 4px;`),J(ne,`title`,s),q(le,1,c),U(E,d)},[()=>K($(`flex items-center border-b border-line-subtle hover:bg-accent/5 cursor-pointer transition-colors`,t.isSelected&&`bg-accent/10 hover:bg-accent/15`,z(i)&&`bg-danger-bg/40 hover:bg-danger-bg/60`,t.isCritical&&`border-l-2 border-l-warning`)),()=>K($(`text-xs truncate`,z(i)?`text-danger`:`text-fg`)),()=>`height: ${Math.max(32,30+z(o).length*8)}px;`,()=>K($(`absolute h-5 rounded-sm transition-colors group`,z(i)?`bg-danger`:Wg(z(n).kind),t.isSelected&&(z(i)?`bg-danger`:Gg(z(n).kind)))),()=>`${z(n).name}: ${nd(z(n).duration)}`,()=>K($(`text-xs font-mono`,z(i)?`text-danger`:`text-fg-muted`)),()=>nd(z(n).duration)]),B(`click`,l,()=>t.onSelect?.()),H(e,l),at()}ea([`click`]);function r_(e){let t=new Map,n=[],r=new Map;for(let n of e)t.set(n.spanId,{span:n,children:[],depth:0});for(let i of e){let e=t.get(i.spanId);if(i.parentSpanId){let n=t.get(i.parentSpanId);if(n)n.children.push(e);else{let t=r.get(i.parentSpanId)||[];t.push(e),r.set(i.parentSpanId,t)}}else n.push(e)}let i=(e,t,n=new Set)=>{if(!n.has(e.span.spanId)){n.add(e.span.spanId),e.depth=t;for(let r of e.children)i(r,t+1,new Set(n))}};for(let[t,i]of r){i.sort((e,t)=>e.span.startTime-t.span.startTime);let r=Math.min(...i.map(e=>e.span.startTime)),a=Math.max(...i.map(e=>e.span.endTime)),o=e.find(e=>e.spanId===t),s={span:{spanId:t,traceId:i[0].span.traceId,parentSpanId:o?.parentSpanId||void 0,name:`(missing)`,kind:`INTERNAL`,startTime:r,endTime:a,duration:a-r,attributes:{},status:{code:`UNSET`},events:[]},children:i,depth:0};n.push(s)}for(let e of n)i(e,0);let a=e=>{e.sort((e,t)=>e.span.startTime-t.span.startTime);for(let t of e)a(t.children)};return a(n),n}var i_=V(`<div class="absolute text-[10px] whitespace-nowrap tabular-nums"> </div>`),a_=V(`<div class="absolute top-0 bottom-0 border-l border-line-subtle"></div>`),o_=V(`<div></div>`),s_=V(`<div><!></div>`),c_=V(`<div class="px-3 py-6 text-center text-xs text-fg-subtle"> </div>`),l_=V(`<div class="flex items-center gap-1"><div></div> <span class="text-fg-muted"> </span></div>`),u_=V(`<div class="flex flex-col h-full"><div class="flex border-b border-line bg-subtle text-xs text-fg-subtle"><div class="w-[200px] shrink-0 px-3 py-2 font-medium text-fg-muted">Span Name</div> <div class="flex-1 relative py-2"></div> <div class="w-[80px] shrink-0 px-2 py-2 text-right font-medium text-fg-muted">Duration</div></div> <div class="flex-1 overflow-auto relative"><div class="absolute inset-0 pointer-events-none"></div> <div class="relative"><!> <!> <!> <!></div></div> <div class="flex items-center gap-4 px-3 py-2 border-t border-line bg-subtle text-xs"><span class="text-fg-subtle font-medium">Kind:</span> <!> <button title="Highlight the spans that determine total trace latency"><!> Critical path</button></div></div>`);function d_(e,t){it(t,!0);let n=Z(t,`selectedSpanId`,3,null),r=Z(t,`query`,3,``),i=M(()=>{let e=r().trim().toLowerCase();if(!e)return new Set;let n=new Set,i=(t.trace.service?.toLowerCase()??``).includes(e);for(let r of t.trace.spans)(i||r.name?.toLowerCase().includes(e))&&n.add(r.spanId);return n}),a=M(()=>r().trim().length>0);Lr(()=>{t.onMatchCount?.(z(i).size)});let o=N(_r(new Set)),s=N(!0),c=N(void 0),l=N(0),u=N(void 0),d=N(0),f=N(0),p=M(()=>Dg(t.trace.spans));Lr(()=>{let e=z(c);if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{P(l,e[0].contentRect.width,!0)});return t.observe(e),()=>t.disconnect()});let m=M(()=>r_(t.trace.spans)),h=M(()=>Og(z(m),e=>z(o).has(e.span.spanId))),g=M(()=>z(h).map(e=>e.node)),_=M(()=>z(h).length<300||z(f)===0?{start:0,end:z(h).length}:{start:Math.max(0,Math.floor(z(d)/34)-12),end:Math.min(z(h).length,Math.ceil((z(d)+z(f))/34)+12)}),v=M(()=>z(h).slice(z(_).start,z(_).end));Lr(()=>{let e=z(u);if(!e||typeof ResizeObserver>`u`)return;P(f,e.clientHeight,!0);let t=new ResizeObserver(()=>{P(f,e.clientHeight,!0)});return t.observe(e),()=>t.disconnect()});function y(e){if(!z(u)||z(h).length<300)return;let t=e*34,n=t+34;t<z(u).scrollTop?z(u).scrollTop=t:n>z(u).scrollTop+z(u).clientHeight&&(z(u).scrollTop=n-z(u).clientHeight),P(d,z(u).scrollTop,!0)}let b=e=>{if(Xc.value||gg()||e.key!==`ArrowUp`&&e.key!==`ArrowDown`&&e.key!==`Enter`)return;e.preventDefault();let r=z(g).findIndex(e=>e.span.spanId===n()),i;if(e.key===`ArrowUp`)i=r>0?r-1:z(g).length-1;else if(e.key===`ArrowDown`)i=r<z(g).length-1?r+1:0;else{if(r>=0){t.onSpanSelect?.(z(g)[r].span);return}i=0}let a=z(g)[i];a&&(t.onSpanSelect?.(a.span),y(i),document.getElementById(`waterfall-row-${a.span.spanId}`)?.scrollIntoView({block:`nearest`}))};Lr(()=>(z(g),n(),window.addEventListener(`keydown`,b),()=>window.removeEventListener(`keydown`,b))),Lr(()=>{let e=n();e&&Pi(()=>{let n=new Map(t.trace.spans.map(e=>[e.spanId,e])),r=new Set(z(o)),i=!1,a=n.get(e)?.parentSpanId;for(;a;)r.delete(a)&&(i=!0),a=n.get(a)?.parentSpanId;i&&P(o,r,!0);let s=z(h).findIndex(t=>t.node.span.spanId===e);s>=0&&y(s),requestAnimationFrame(()=>document.getElementById(`waterfall-row-${e}`)?.scrollIntoView({block:`center`}))})});let x=e=>{let t=new Set(z(o));t.has(e)?t.delete(e):t.add(e),P(o,t,!0)},S=e=>t.trace.spans.some(t=>t.parentSpanId===e),C=M(()=>{let e=t.trace.duration||1,n=z(l)>0?Math.min(8,Math.max(2,Math.floor(z(l)/90))):5,r=[];for(let t=0;t<=n;t++)r.push({percent:t/n*100,label:nd(t/n*e),align:t===0?`start`:t===n?`end`:`mid`});return r}),w=[`SERVER`,`CLIENT`,`INTERNAL`,`PRODUCER`,`CONSUMER`];var T=u_(),ee=F(T),te=L(F(ee),2);G(te,21,()=>z(C),Oa,(e,t)=>{var n=i_(),r=F(n,!0);D(n),R(()=>{oo(n,`left: ${z(t).percent}%; transform: ${z(t).align===`start`?`translateX(0)`:z(t).align===`end`?`translateX(-100%)`:`translateX(-50%)`};`),U(r,z(t).label)}),H(e,n)}),D(te),Vo(te,e=>P(c,e),()=>z(c)),Ke(2),D(ee);var ne=L(ee,2),re=F(ne);oo(re,`left: 200px; right: 80px;`),G(re,21,()=>z(C),Oa,(e,t)=>{var n=a_();R(()=>oo(n,`left: ${z(t).percent}%;`)),H(e,n)}),D(re);var ie=L(re,2),ae=F(ie),oe=e=>{var t=o_();R(()=>oo(t,`height: ${z(_).start*34}px`)),H(e,t)};W(ae,e=>{z(_).start>0&&e(oe)});var se=L(ae,2);G(se,17,()=>z(v),({node:e,connectors:t})=>e.span.spanId,(e,r)=>{let c=()=>z(r).node,l=()=>z(r).connectors,u=M(()=>z(i).has(c().span.spanId));var d=s_(),f=F(d);{let e=M(()=>n()===c().span.spanId),r=M(()=>z(o).has(c().span.spanId)),i=M(()=>S(c().span.spanId)),a=M(()=>z(s)&&z(p).has(c().span.spanId));n_(f,{get node(){return c()},get trace(){return t.trace},get isSelected(){return z(e)},get isCollapsed(){return z(r)},get hasChildren(){return z(i)},get isCritical(){return z(a)},get connectors(){return l()},onSelect:()=>t.onSpanSelect?.(c().span),onToggleCollapse:()=>x(c().span.spanId)})}D(d),R(e=>q(d,1,e),[()=>K($(`transition-opacity`,z(a)&&!z(u)&&`opacity-40`,z(a)&&z(u)&&`ring-1 ring-inset ring-accent rounded-sm`))]),H(e,d)});var ce=L(se,2),le=e=>{var t=o_();R(()=>oo(t,`height: ${(z(h).length-z(_).end)*34}px`)),H(e,t)};W(ce,e=>{z(_).end<z(h).length&&e(le)});var E=L(ce,2),ue=e=>{var t=c_(),n=F(t);D(t),R(e=>U(n,`No spans match “${e??``}”.`),[()=>r().trim()]),H(e,t)};W(E,e=>{z(a)&&z(i).size===0&&e(ue)}),D(ie),D(ne),Vo(ne,e=>P(u,e),()=>z(u));var de=L(ne,2),fe=L(F(de),2);G(fe,16,()=>w,e=>e,(e,t)=>{var n=l_(),r=F(n),i=L(r,2),a=F(i,!0);D(i),D(n),R(e=>{q(r,1,e),U(a,t)},[()=>K($(`w-3 h-3 rounded-sm`,Wg(t)))]),H(e,n)});var pe=L(fe,2);ng(F(pe),{size:11}),Ke(),D(pe),D(de),D(T),R(e=>q(pe,1,e),[()=>K($(`ml-auto flex items-center gap-1 px-1.5 py-0.5 rounded border transition-colors`,z(s)?`bg-warning-bg text-warning border-warning-border`:`text-fg-subtle border-line hover:bg-hover`))]),$i(`scroll`,ne,e=>P(d,e.currentTarget.scrollTop,!0)),B(`click`,pe,()=>P(s,!z(s))),H(e,T),at()}ea([`click`]);function f_(e,t){let n=new Map,r=[],i=t.duration||1,a=t.startTime;for(let t of e){let e=(t.startTime-a)/i*100,r=t.duration/i*100;n.set(t.spanId,{span:t,children:[],depth:0,x:Math.max(0,e),width:Math.max(.5,Math.min(100-e,r))})}for(let t of e){let e=n.get(t.spanId);if(t.parentSpanId){let i=n.get(t.parentSpanId);i?(i.children.push(e),e.depth=i.depth+1):r.push(e)}else r.push(e)}let o=e=>{e.sort((e,t)=>e.span.startTime-t.span.startTime);for(let t of e)o(t.children)};return o(r),r}function p_(e){let t=[],n=e=>{t.push(e),e.children.forEach(n)};return e.forEach(n),t}function m_(e){let t=0,n=e=>{t=Math.max(t,e.depth),e.children.forEach(n)};return e.forEach(n),t}function h_(e,t,n){let r=n.find(e=>e.spanId===t);if(!r)return e;let i=r.startTime,a=r.duration||1,o=(e,t)=>{let r=n.find(t=>t.spanId===e);return r?r.parentSpanId===t?!0:r.parentSpanId?o(r.parentSpanId,t):!1:!1},s=e=>{if(!(e.span.spanId===t||o(e.span.spanId,t)))return{...e,x:-100,width:0,children:e.children.map(s)};let n=(e.span.startTime-i)/a*100,r=e.span.duration/a*100;return{...e,x:Math.max(0,n),width:Math.max(.5,Math.min(100-Math.max(0,n),r)),children:e.children.map(s)}};return e.map(s)}function g_(e){if(e.status.code===`ERROR`)return`bg-red-500 hover:bg-red-400`;switch(e.kind){case`SERVER`:return`bg-blue-500 hover:bg-blue-400`;case`CLIENT`:return`bg-green-500 hover:bg-green-400`;case`PRODUCER`:return`bg-purple-500 hover:bg-purple-400`;case`CONSUMER`:return`bg-orange-500 hover:bg-orange-400`;default:return`bg-gray-500 hover:bg-gray-400`}}function __(e){return e.status.code===`ERROR`?`ring-2 ring-danger`:`ring-2 ring-accent`}var v_=V(`<div class="absolute inset-0 flex items-center px-1.5 overflow-hidden"><span class="text-[10px] text-white font-medium truncate"> </span></div>`),y_=V(`<div role="button" tabindex="-1"><!></div>`),b_=V(`<span class="flex items-center gap-2"><span class="font-medium">Zoomed:</span> <span class="truncate max-w-[200px]"> </span></span>`),x_=V(`<span>Click a span to zoom in, double-click to select</span>`),S_=V(`<button class="p-1.5 hover:bg-hover rounded transition-colors flex items-center gap-1 text-xs text-fg-muted" title="Reset zoom"><!> Reset</button>`),C_=V(`<div class="absolute left-0 right-0"></div>`),w_=V(`<div class="flex items-center gap-1 mt-1 text-danger"><!> <span>Error</span></div>`),T_=V(`<div class="absolute z-50 pointer-events-none"><div class="bg-surface text-fg text-xs rounded-md shadow-lg p-2 max-w-[200px]"><div class="font-medium truncate mb-1"> </div> <div class="flex items-center gap-2 text-fg-muted"><span> </span> <span>|</span> <span> </span></div> <!></div></div>`),E_=V(`<div class="flex items-center gap-1"><div></div> <span class="text-fg-muted"> </span></div>`),D_=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between px-3 py-2 border-b border-line bg-subtle"><div class="text-xs text-fg-muted"><!></div> <div class="flex items-center gap-1"><!></div></div> <div class="flex-1 overflow-auto p-4 relative" role="presentation"><div class="relative w-full"></div> <!></div> <div class="flex items-center gap-4 px-3 py-2 border-t border-line bg-subtle text-xs"><span class="text-fg-subtle font-medium">Kind:</span> <!> <div class="flex items-center gap-1 ml-2"><div class="w-3 h-3 rounded-sm bg-red-500"></div> <span class="text-fg-muted">ERROR</span></div></div></div>`);function O_(e,t){it(t,!0);let n=(e,n=p,r=p,i=p)=>{let a=M(()=>{let{span:e,x:t,width:r}=n();return{span:e,x:t,width:r}});var o=la(),s=I(o),c=e=>{var n=y_(),i=M(()=>_g(()=>f(z(a).span.spanId))),o=F(n),s=e=>{var t=v_(),n=F(t),r=F(n,!0);D(n),D(t),R(()=>U(r,z(a).span.name)),H(e,t)};W(o,e=>{z(a).width>5&&e(s)}),D(n),R((e,t)=>{q(n,1,e),oo(n,`left: ${z(a).x??``}%; width: ${z(a).width??``}%; height: 24px; min-width: 4px;`),J(n,`title`,t)},[()=>K($(`absolute cursor-pointer transition-all`,g_(z(a).span),r()&&__(z(a).span),`rounded-sm`)),()=>`${z(a).span.name}: ${nd(z(a).span.duration)}`]),B(`click`,n,()=>f(z(a).span.spanId)),B(`keydown`,n,function(...e){z(i)?.apply(this,e)}),B(`dblclick`,n,()=>t.onSpanSelect?.(z(a).span)),B(`mousemove`,n,e=>h(e,z(a).span)),$i(`mouseleave`,n,g),H(e,n)};W(s,e=>{z(a).width<=0||z(a).x<0||e(c)}),H(e,o)},r=N(_r({focusedSpanId:null})),i=N(null),a=N(_r({x:0,y:0})),o=N(void 0),s=M(()=>f_(t.trace.spans,t.trace)),c=M(()=>z(r).focusedSpanId?h_(z(s),z(r).focusedSpanId,t.trace.spans):z(s)),l=M(()=>p_(z(c))),u=M(()=>m_(z(c))),d=M(()=>{let e=new Map;for(let t of z(l))if(t.width>0){let n=e.get(t.depth)||[];n.push(t),e.set(t.depth,n)}return e}),f=e=>{P(r,{focusedSpanId:e},!0)},m=()=>{P(r,{focusedSpanId:null},!0)},h=(e,t)=>{if(z(o)){let t=z(o).getBoundingClientRect();P(a,{x:e.clientX-t.left,y:e.clientY-t.top},!0)}P(i,t,!0)},g=()=>{P(i,null)},v=M(()=>(z(u)+1)*26+20);var y=D_(),b=F(y),x=F(b),S=F(x),C=e=>{var n=b_(),i=L(F(n),2),a=F(i,!0);D(i),D(n),R(e=>U(a,e),[()=>t.trace.spans.find(e=>e.spanId===z(r).focusedSpanId)?.name]),H(e,n)},w=e=>{H(e,x_())};W(S,e=>{z(r).focusedSpanId?e(C):e(w,-1)}),D(x);var T=L(x,2),ee=F(T),te=e=>{var t=S_();fh(F(t),{size:14}),Ke(),D(t),B(`click`,t,m),H(e,t)};W(ee,e=>{z(r).focusedSpanId&&e(te)}),D(T),D(b);var ne=L(b,2),re=F(ne);G(re,21,()=>[...z(d).entries()],([e,t])=>e,(e,r)=>{var a=M(()=>_(z(r),2));let o=()=>z(a)[0],s=()=>z(a)[1];var c=C_();G(c,21,s,e=>e.span.spanId,(e,r)=>{n(e,()=>z(r),()=>t.selectedSpanId===z(r).span.spanId,()=>z(i)?.spanId===z(r).span.spanId)}),D(c),R(()=>oo(c,`top: ${o()*26}px;`)),H(e,c)}),D(re);var ie=L(re,2),ae=e=>{var t=T_(),n=F(t),r=F(n),s=F(r,!0);D(r);var c=L(r,2),l=F(c),u=F(l,!0);D(l);var d=L(l,4),f=F(d,!0);D(d),D(c);var p=L(c,2),m=e=>{var t=w_();Ep(F(t),{size:10}),Ke(2),D(t),H(e,t)};W(p,e=>{z(i).status.code===`ERROR`&&e(m)}),D(n),D(t),R((e,n)=>{oo(t,`left: ${e??``}px; top: ${z(a).y+10}px;`),U(s,z(i).name),U(u,n),U(f,z(i).kind)},[()=>Math.min(z(a).x+10,(z(o)?.clientWidth||300)-220),()=>nd(z(i).duration)]),H(e,t)};W(ie,e=>{z(i)&&e(ae)}),D(ne),Vo(ne,e=>P(o,e),()=>z(o));var oe=L(ne,2);G(L(F(oe),2),16,()=>[`SERVER`,`CLIENT`,`INTERNAL`,`PRODUCER`,`CONSUMER`],e=>e,(e,t)=>{var n=E_(),r=F(n),i=L(r,2),a=F(i,!0);D(i),D(n),R(e=>{q(r,1,e),U(a,t)},[()=>K($(`w-3 h-3 rounded-sm`,t===`SERVER`&&`bg-blue-500`,t===`CLIENT`&&`bg-green-500`,t===`PRODUCER`&&`bg-purple-500`,t===`CONSUMER`&&`bg-orange-500`,t===`INTERNAL`&&`bg-gray-500`))]),H(e,n)}),Ke(2),D(oe),D(y),R(()=>oo(re,`height: ${z(v)??``}px; min-width: 100%;`)),$i(`mouseleave`,ne,g),H(e,y),at()}ea([`click`,`keydown`,`dblclick`,`mousemove`]);function k_(e){if(typeof e==`object`&&e)return e;if(typeof e!=`string`)return null;let t=e.trim();if(t.length<2)return null;let n=t[0];if(n!==`{`&&n!==`[`)return null;try{let e=JSON.parse(t);return typeof e==`object`&&e?e:null}catch{return null}}var A_=V(`<div class="relative group"><!> <button title="Copy"><!></button></div>`);function j_(e,t){it(t,!0);let n=N(!1);async function r(){try{await navigator.clipboard.writeText(t.content),P(n,!0),setTimeout(()=>P(n,!1),2e3)}catch(e){console.error(`Failed to copy:`,e)}}var i=A_(),a=F(i);La(a,()=>t.children);var o=L(a,2),s=F(o),c=e=>{vp(e,{size:14,class:`text-success`})},l=e=>{Ip(e,{size:14,class:`text-fg-muted`})};W(s,e=>{z(n)?e(c):e(l,-1)}),D(o),D(i),R(e=>q(o,1,e),[()=>K($(`absolute top-2 right-2 p-1.5 rounded-md`,`bg-surface border border-line shadow-sm`,`opacity-0 group-hover:opacity-100 transition-opacity`,`hover:bg-subtle`))]),B(`click`,o,r),H(e,i),at()}ea([`click`]);var M_=V(`<button type="button" class="absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-fg-subtle hover:text-fg-muted"><!></button>`),N_=V(`<div><!> <input/> <!></div>`);function P_(e,t){it(t,!0);let n=Z(t,`value`,15),r=Z(t,`clearTitle`,3,`Clear filter`),i=Z(t,`class`,3,`flex-1`),a=Z(t,`inputClass`,3,`border-line focus:border-line`),o=Z(t,`ref`,15,null);function s(e){n(e),t.onValue?.(e)}var c=N_(),l=F(c);bh(l,{size:12,class:`absolute left-2 top-1/2 -translate-y-1/2 text-fg-subtle`});var u=L(l,2);xo(u),Vo(u,e=>o(e),()=>o());var d=L(u,2),f=e=>{var t=M_();eg(F(t),{size:12}),D(t),R(()=>J(t,`title`,r())),B(`click`,t,()=>s(``)),H(e,t)};W(d,e=>{n()&&e(f)}),D(c),R((e,r)=>{q(c,1,e),So(u,n()),J(u,`placeholder`,t.placeholder),J(u,`aria-label`,t.ariaLabel),q(u,1,r)},[()=>K($(`relative`,i())),()=>K($(`w-full pl-7 pr-7 py-1 text-xs rounded border focus:outline-none`,a()))]),B(`input`,u,e=>s(e.currentTarget.value)),H(e,c),at()}ea([`input`,`click`]);function F_(e,t){return!e||t.some(t=>t!=null&&String(t).toLowerCase().includes(e))}var I_=V(`<span class="text-fg-subtle"> </span>`),L_=V(`<div class="flex gap-1 leading-5"><!> <span> </span></div>`),R_=V(`<span class="text-fg-subtle opacity-70"> </span>`),z_=V(`<div class="pl-3 ml-1 border-l border-line-subtle"><!> <div class="text-fg-subtle"> </div></div>`),B_=V(`<div class="leading-5"><button class="inline-flex items-center gap-1 hover:bg-hover rounded px-0.5"><!> <!> <span class="text-fg-subtle"> </span> <!></button> <!></div>`);function V_(e,t){it(t,!0);function n(e){if(e===null)return`text-fg-subtle`;switch(typeof e){case`string`:return`text-green-600`;case`number`:return`text-blue-600`;case`boolean`:return`text-purple-600`;default:return`text-fg`}}function r(e){return e===null?`null`:typeof e==`string`?`"${e}"`:String(e)}let i=M(()=>t.value!==null&&typeof t.value==`object`),a=N(t.depth<2),o=M(()=>Array.isArray(t.value)),s=M(()=>z(o)?t.value.map((e,t)=>[String(t),e]):Object.entries(t.value)),c=M(()=>z(o)?`[`:`{`),l=M(()=>z(o)?`]`:`}`),u=M(()=>`${z(s).length} ${z(o)?`items`:`keys`}`);var d=la(),f=I(d),p=e=>{var i=L_(),a=F(i),o=e=>{var n=I_(),r=F(n);D(n),R(()=>U(r,`${t.label??``}:`)),H(e,n)};W(a,e=>{t.label!==void 0&&e(o)});var s=L(a,2),c=F(s,!0);D(s),D(i),R((e,t)=>{q(s,1,e),U(c,t)},[()=>K($(`break-all`,n(t.value))),()=>r(t.value)]),H(e,i)},m=e=>{var n=B_(),r=F(n),i=F(r),o=e=>{bp(e,{size:10})},d=e=>{wp(e,{size:10})};W(i,e=>{z(a)?e(o):e(d,-1)});var f=L(i,2),p=e=>{var n=I_(),r=F(n);D(n),R(()=>U(r,`${t.label??``}:`)),H(e,n)};W(f,e=>{t.label!==void 0&&e(p)});var m=L(f,2),h=F(m,!0);D(m);var g=L(m,2),v=e=>{var t=R_(),n=F(t,!0);D(t),R(()=>U(n,z(u))),H(e,t)};W(g,e=>{z(a)||e(v)}),D(r);var y=L(r,2),b=e=>{var n=z_(),r=F(n);G(r,17,()=>z(s),([e,t])=>e,(e,n)=>{var r=M(()=>_(z(n),2));let i=()=>z(r)[0],a=()=>z(r)[1];{let n=M(()=>t.depth+1);V_(e,{get label(){return i()},get value(){return a()},get depth(){return z(n)}})}});var i=L(r,2),a=F(i,!0);D(i),D(n),R(()=>U(a,z(l))),H(e,n)};W(y,e=>{z(a)&&e(b)}),D(n),R(()=>U(h,z(a)?z(c):`${z(c)}…${z(l)}`)),B(`click`,r,()=>P(a,!z(a))),H(e,n)};W(f,e=>{z(i)?e(m,-1):e(p)}),H(e,d),at()}ea([`click`]);var H_=V(`<div class="font-mono text-xs text-fg"><!></div>`);function U_(e,t){var n=H_();V_(F(n),{get value(){return t.data},depth:0}),D(n),H(e,n)}var W_=V(`<button type="button" class="font-mono text-accent hover:underline truncate flex-1 text-left cursor-pointer"> </button>`),G_=V(`<code class="font-mono text-fg-muted truncate flex-1"> </code>`),K_=V(`<div class="flex items-center gap-2"><span class="text-fg-subtle w-24 flex-shrink-0"> </span> <!> <button class="p-1 hover:bg-hover rounded transition-colors flex-shrink-0" title="Copy to clipboard"><!></button></div>`);function q_(e,t){let n=N(!1),r=async()=>{await navigator.clipboard.writeText(t.value),P(n,!0),setTimeout(()=>P(n,!1),2e3)};var i=K_(),a=F(i),o=F(a);D(a);var s=L(a,2),c=e=>{var n=W_(),r=F(n,!0);D(n),R(()=>{J(n,`title`,t.activateTitle??`Open`),U(r,t.value)}),B(`click`,n,function(...e){t.onActivate?.apply(this,e)}),H(e,n)},l=e=>{var n=G_(),r=F(n,!0);D(n),R(()=>U(r,t.value)),H(e,n)};W(s,e=>{t.onActivate?e(c):e(l,-1)});var u=L(s,2),d=F(u),f=e=>{vp(e,{size:12,class:`text-success`})},p=e=>{Ip(e,{size:12,class:`text-fg-subtle`})};W(d,e=>{z(n)?e(f):e(p,-1)}),D(u),D(i),R(()=>U(o,`${t.label??``}:`)),B(`click`,u,r),H(e,i)}ea([`click`]);var J_=V(`<button type="button"><!></button>`);function Y_(e,t){it(t,!0);let n=Z(t,`label`,3,`Copy`),r=Z(t,`size`,3,12),i=Z(t,`class`,3,``),a=Z(t,`stop`,3,!0),o=N(!1);async function s(e){a()&&(e.stopPropagation(),e.preventDefault());try{await navigator.clipboard.writeText(t.value),P(o,!0),setTimeout(()=>P(o,!1),1500)}catch(e){console.error(`[autotel-devtools] copy failed:`,e)}}var c=J_(),l=F(c),u=e=>{vp(e,{get size(){return r()},class:`text-success`})},d=e=>{Ip(e,{get size(){return r()}})};W(l,e=>{z(o)?e(u):e(d,-1)}),D(c),R(e=>{J(c,`title`,z(o)?`Copied!`:n()),J(c,`aria-label`,n()),q(c,1,e)},[()=>K($(`inline-flex items-center justify-center p-1 rounded flex-shrink-0`,`text-fg-subtle hover:text-fg hover:bg-hover transition-colors`,i()))]),B(`click`,c,s),H(e,c),at()}ea([`click`]);function X_(e){return`'${e.replaceAll(`'`,`'\\''`)}'`}function Z_(e){if(typeof e==`string`&&e.length>0)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e)}function Q_(e){let t=Z_(e[`url.full`])??Z_(e[`http.url`]);if(t)return t;let n=Z_(e[`server.address`])??Z_(e[`net.peer.name`]),r=Z_(e[`url.path`])??Z_(e[`http.target`]);if(!n||!r)return;let i=Z_(e[`url.scheme`])??`https`,a=Z_(e[`server.port`]),o=Z_(e[`url.query`]);return`${i}://${a&&a!==`80`&&a!==`443`?`${n}:${a}`:n}${r}${o?`?${o}`:``}`}function $_(e){let t=e.attributes??{},n=Z_(t[`http.request.method`])??Z_(t[`http.method`]),r=Q_(t);if(!n||!r)return null;let i=[`curl -X ${n.toUpperCase()}`,X_(r)],a=Object.entries(t).filter(([e])=>e.startsWith(`http.request.header.`)).sort(([e],[t])=>e.localeCompare(t));for(let[e,t]of a){let n=e.slice(20),r=Array.isArray(t)?t.map(String).join(`, `):Z_(t);r&&i.push(`-H ${X_(`${n}: ${r}`)}`)}return i.join(` `)}var ev={count:`autotel.schema.violations`,severity:`autotel.schema.violation.severity`,codes:`autotel.schema.violation.codes`};function tv(e){let t=e.attributes??{},n=t[ev.count],r=typeof n==`number`?n:Number(n);if(!Number.isFinite(r)||r<=0)return null;let i=t[ev.codes];return{count:r,severity:t[ev.severity]===`error`?`error`:`warning`,codes:Array.isArray(i)?i.map(String):[]}}var nv=[`code.filepath`,`code.file.path`],rv=[`code.lineno`,`code.line.number`],iv=[`code.column`,`code.column.number`],av=[`code.function`,`code.function.name`];function ov(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function sv(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t)))return Number(t)}}function cv(e,t,n,r){if(e===`webstorm`){let e=`jetbrains://web-storm/navigate/reference?path=${encodeURIComponent(t)}`;return n!==void 0&&(e+=`&line=${n}`),e}let i=`${e}://file/${t.replace(/^\//,``)}`;return n!==void 0&&(i+=`:${n}`,r!==void 0&&(i+=`:${r}`)),i}function lv(e,t){let n=ov(e,nv);if(!n)return null;let r=sv(e,rv),i=sv(e,iv),a=ov(e,av),o=ov(e,[`code.namespace`]),s=n.split(/[/\\]/).pop()||n;return{filepath:n,line:r,column:i,functionName:a,namespace:o,display:r===void 0?s:`${s}:${r}`,href:cv(t,n,r,i)}}function uv(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function dv(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t)))return Number(t)}}function fv(e){let t=uv(e,[`db.system`,`db.system.name`]),n=uv(e,[`db.statement`,`db.query.text`]);return!t&&!n?null:{system:t,statement:n,operation:uv(e,[`db.operation`,`db.operation.name`]),table:uv(e,[`db.sql.table`,`db.collection.name`]),dbName:uv(e,[`db.name`,`db.namespace`]),rowCount:dv(e,[`db.response.returned_rows`,`db.rows_affected`])}}var pv=new Set(`select.from.where.insert.into.values.update.set.delete.join.left.right.inner.outer.full.cross.on.and.or.not.in.is.null.as.order.by.group.having.limit.offset.distinct.union.all.returning.with.using.between.like.asc.desc.count.case.when.then.else.end.exists.create.table.alter.drop.index`.split(`.`)),mv=/('(?:[^']|'')*'|[A-Za-z_][A-Za-z0-9_]*|[^A-Za-z_']+)/g;function hv(e){let t=[];for(let[n]of e.matchAll(mv))n.startsWith(`'`)?t.push({text:n,kind:`string`}):/^[A-Za-z_]/.test(n)&&pv.has(n.toLowerCase())?t.push({text:n,kind:`keyword`}):t.push({text:n,kind:`text`});return t}var gv=(e,t=p,n=p,r=p)=>{let i=M(()=>yv.test(t())),a=M(()=>bv.some(e=>t().startsWith(e))),o=M(()=>z(i)?null:k_(n()));var s=la(),c=I(s),l=e=>{var n=Tv(),r=F(n),i=F(r),s=F(i,!0);D(i);var c=L(i,2),l=L(c,2),u=e=>{var t=wv();q(t,1,K(Cv)),H(e,t)};W(l,e=>{z(a)&&e(u)}),D(r);var d=L(r,2);U_(F(d),{get data(){return z(o)}}),D(d),D(n),R(e=>{U(s,t()),q(c,1,e)},[()=>K($(Sv,`bg-amber-500/15 text-amber-600 border-amber-500/30`))]),H(e,n)},u=e=>{let o=M(()=>xv(n())),s=M(()=>String(n()));var c=Dv(),l=F(c),u=F(l),d=F(u,!0);D(u);var f=L(u,2),p=F(f,!0);D(f);var m=L(f,2),h=e=>{var t=wv();q(t,1,K(Cv)),H(e,t)};W(m,e=>{z(a)&&!z(i)&&e(h)});var g=L(m,2),_=e=>{var n=Ev();Mm(F(n),{size:10,class:`text-fg-subtle`}),D(n),B(`click`,n,()=>r()({key:t(),value:z(s)})),H(e,n)};W(g,e=>{!z(i)&&z(s).length>60&&e(_)}),D(l);var v=L(l,2),y=F(v,!0);D(v),D(c),R(e=>{J(u,`title`,t()),U(d,t()),q(f,1,e),U(p,z(i)?`sensitive`:z(o).label),U(y,z(i)?`[redacted]`:z(s))},[()=>K($(Sv,z(o).cls))]),H(e,c)};W(c,e=>{z(o)===null?e(u,-1):e(l)}),H(e,s)},_v=(e,t=p,n=p,r=p,i=p,a=p)=>{var o=kv(),s=F(o),c=F(s);La(F(c),n),D(c);var l=L(c,2),u=F(l,!0);D(l);var d=L(l,2);{let e=M(()=>$(`text-fg-subtle transition-transform`,r()&&`rotate-180`));bp(d,{size:14,get class(){return z(e)}})}D(s);var f=L(s,2),m=e=>{var t=Ov();La(F(t),a),D(t),H(e,t)};W(f,e=>{r()&&e(m)}),D(o),R(()=>U(u,t())),B(`click`,s,function(...e){i()?.apply(this,e)}),H(e,o)},vv=(e,t=p,n=p,r=p)=>{var i=Av(),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(i),R(()=>{J(i,`title`,r()),U(o,t()),U(c,n())}),H(e,i)},yv=/(password|secret|token|authorization|api[-_.]?key)/i,bv=[`service.`,`deployment.`,`host.`,`container.`,`process.`];function xv(e){return e==null?{label:`null`,cls:`bg-hover text-fg-subtle border-line`}:Array.isArray(e)?{label:`array`,cls:`bg-amber-500/15 text-amber-600 border-amber-500/30`}:typeof e==`string`?{label:`string`,cls:`bg-green-500/15 text-green-600 border-green-500/30`}:typeof e==`number`?{label:`number`,cls:`bg-blue-500/15 text-blue-600 border-blue-500/30`}:typeof e==`boolean`?{label:`boolean`,cls:`bg-purple-500/15 text-purple-600 border-purple-500/30`}:{label:`object`,cls:`bg-stone-500/15 text-stone-600 border-stone-500/30`}}var Sv=`text-[9px] px-1.5 py-px rounded border font-mono flex-shrink-0`,Cv=`${Sv} bg-hover text-fg-subtle border-line`,wv=V(`<span>resource</span>`),Tv=V(`<div class="py-1 border-b border-line-subtle last:border-b-0"><div class="flex items-center gap-2"><span class="text-fg-subtle font-medium"> </span> <span>json</span> <!></div> <div class="mt-1"><!></div></div>`),Ev=V(`<button class="ml-auto p-0.5 hover:bg-hover rounded flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity" title="View full value"><!></button>`),Dv=V(`<div class="group py-1 border-b border-line-subtle last:border-b-0"><div class="flex items-center gap-2 min-w-0"><span class="text-fg-subtle font-medium truncate"> </span> <span> </span> <!> <!></div> <div class="mt-0.5 text-fg leading-snug at-wrap-anywhere"> </div></div>`),Ov=V(`<div class="px-4 pb-3"><!></div>`),kv=V(`<div class="border-b border-line-subtle"><button class="w-full flex items-center gap-2 px-4 py-3 hover:bg-subtle transition-colors"><span class="text-fg-subtle"><!></span> <span class="text-xs font-medium text-fg-muted flex-1 text-left"> </span> <!></button> <!></div>`),Av=V(`<div><div class="text-fg-subtle mb-0.5"> </div> <div class="font-mono font-medium text-fg"> </div></div>`),jv=V(`<span class="px-2 py-0.5 rounded bg-hover text-fg-subtle text-xs font-mono" title="Instrumentation scope"> </span>`),Mv=V(`<div class="grid grid-cols-2 gap-3 text-xs"><!> <!> <!> <!> <!></div>`),Nv=V(`<div class="mx-4 mt-4 p-3 bg-danger-bg border border-danger-border rounded-md"><div class="flex items-start gap-2"><!> <div class="text-xs text-danger"><span class="font-medium">Error:</span> </div></div></div>`),Pv=V(`<li class="font-mono text-[11px] text-fg-muted"> </li>`),Fv=V(`<p class="mt-1 text-[11px] text-fg-subtle"> </p>`),Iv=V(`<div><div class="mb-1 flex items-center gap-1.5"><!> <span class="text-xs font-medium text-fg"> </span></div> <ul class="space-y-0.5"></ul> <!></div>`),Lv=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="mb-1 flex items-center justify-between gap-2"><span class="text-[11px] uppercase tracking-wide text-fg-muted">Reproduce</span> <!></div> <code class="block overflow-x-auto whitespace-pre rounded bg-subtle px-2 py-1 text-[11px] text-fg-muted"> </code> <p class="mt-1 text-[11px] text-fg-subtle">Rebuilt from span attributes. Headers appear only if captured; the
|
|
3
|
-
body is never recorded.</p></div>`),
|
|
4
|
-
${t.span.scope.version?`@${t.span.scope.version}`:``}`)),H(e,n)};W(he,e=>{t.span.scope?.name&&e(ge)}),D(ue),D(ce);var _e=L(ce,2);
|
|
5
|
-
${z(i).count===1?`contract violation`:`contract violations`}`)}),H(e,t)};W(Se,e=>{z(i)&&e(Ce)});var we=L(Se,2),Te=e=>{var t=Lv(),n=F(t);Y_(L(F(n),2),{get value(){return z(r)},label:`Copy as curl`}),D(n);var i=L(n,2),a=F(i,!0);D(i),Ke(2),D(t),R(()=>U(a,z(r))),H(e,t)};W(we,e=>{z(r)&&e(Te)});var Ee=L(we,2),De=F(Ee),Oe=F(De);q_(Oe,{label:`Span ID`,get value(){return t.span.spanId}});var ke=L(Oe,2);{let e=M(()=>z(ne)&&z(ne).spanId!==t.span.spanId?()=>re(z(ne).spanId):void 0);q_(ke,{label:`Trace ID`,get value(){return t.span.traceId},get onActivate(){return z(e)},activateTitle:`Go to root span`})}var Ae=L(ke,2),je=e=>{{let n=M(()=>z(ee)?()=>re(t.span.parentSpanId):void 0),r=M(()=>z(ee)?`Go to parent span`:`Parent span not captured in this trace`);q_(e,{label:`Parent Span ID`,get value(){return t.span.parentSpanId},get onActivate(){return z(n)},get activateTitle(){return z(r)}})}};W(Ae,e=>{t.span.parentSpanId&&e(je)}),D(De),D(Ee);var Me=L(Ee,2),Ne=F(Me);Ph(F(Ne),{size:14,class:`text-fg-subtle`}),Ke(2),D(Ne);var Pe=L(Ne,2),Fe=F(Pe);vv(Fe,()=>`Trace Service`,()=>t.trace.service);var Ie=L(Fe,2);vv(Ie,()=>`Derived Resource`,()=>z(f));var Le=L(Ie,2);vv(Le,()=>`Resource Type`,()=>z(p));var Re=L(Le,2);{let e=M(()=>String(z(m).length));vv(Re,()=>`Resource Attrs`,()=>z(e))}D(Pe),D(Me);var ze=L(Me,2),Be=e=>{var t=Bv(),r=F(t),i=F(r);Mp(i,{size:14,class:`text-fg-subtle`});var a=L(i,4);G(a,21,()=>n,e=>e.value,(e,t)=>{var n=Rv(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).label),i!==(i=z(t).value)&&(n.value=(n.__value=z(t).value)??``)}),H(e,n)}),D(a);var o;co(a),D(r);var s=L(r,2),c=F(s);Kp(c,{size:12,class:`flex-shrink-0`});var l=L(c,2),u=F(l,!0);D(l),D(s);var d=L(s,2),f=e=>{var t=zv(),n=F(t);D(t),R(()=>U(n,`${z(b).namespace?`${z(b).namespace}.`:``}${z(b).functionName??``}()`)),H(e,t)};W(d,e=>{z(b).functionName&&e(f)});var p=L(d,2),m=F(p,!0);D(p),D(t),R(()=>{o!==(o=Jc.value)&&(a.value=(a.__value=Jc.value)??``,so(a,Jc.value)),J(s,`href`,z(b).href),J(s,`title`,`Open ${z(b).filepath}${z(b).line?`:${z(b).line}`:``}`),U(u,z(b).display),U(m,z(b).filepath)}),B(`change`,a,e=>Yc(e.currentTarget.value)),H(e,t)};W(ze,e=>{z(b)&&e(Be)});var Ve=L(ze,2),He=e=>{var t=Gv(),n=F(t),r=F(n);Bp(r,{size:14,class:`text-fg-subtle`});var i=L(r,4),a=e=>{var t=Vv(),n=F(t,!0);D(t),R(()=>U(n,z(x).system)),H(e,t)};W(i,e=>{z(x).system&&e(a)}),D(n);var o=L(n,2),s=e=>{var t=Hv(),n=F(t),r=e=>{vv(e,()=>`Operation`,()=>z(x).operation)};W(n,e=>{z(x).operation&&e(r)});var i=L(n,2),a=e=>{vv(e,()=>`Table`,()=>z(x).table)};W(i,e=>{z(x).table&&e(a)});var o=L(i,2),s=e=>{vv(e,()=>`Database`,()=>z(x).dbName)};W(o,e=>{z(x).dbName&&e(s)});var c=L(o,2),l=e=>{{let t=M(()=>String(z(x).rowCount));vv(e,()=>`Rows`,()=>z(t))}};W(c,e=>{z(x).rowCount!==void 0&&e(l)}),D(t),H(e,t)};W(o,e=>{(z(x).operation||z(x).table||z(x).dbName||z(x).rowCount!==void 0)&&e(s)});var c=L(o,2),l=e=>{j_(e,{get content(){return z(x).statement},children:(e,t)=>{var n=Wv();G(n,21,()=>z(S),Oa,(e,t)=>{var n=Uv(),r=F(n,!0);D(n),R(()=>{q(n,1,K(z(t).kind===`keyword`?`text-indigo-500 font-semibold`:z(t).kind===`string`?`text-green-500`:``)),U(r,z(t).text)}),H(e,n)}),D(n),H(e,n)},$$slots:{default:!0}})};W(c,e=>{z(x).statement&&e(l)}),D(t),H(e,t)};W(Ve,e=>{z(x)&&e(He)});var Ue=L(Ve,2),We=e=>{var t=Xv(),n=F(t);Sm(F(n),{size:14,class:`text-fg-subtle`}),Ke(2),D(n);var r=L(n,2),i=F(r),a=e=>{var t=Kv(),n=L(F(t),2),r=F(n,!0);D(n),D(t),R(()=>U(r,z(ee).name)),H(e,t)};W(i,e=>{z(ee)&&e(a)});var o=L(i,2),s=e=>{var t=Yv(),n=F(t),r=F(n);D(n);var i=L(n,2),a=F(i);G(a,17,()=>z(te).slice(0,5),e=>e.spanId,(e,t)=>{var n=qv(),r=F(n,!0);D(n),R(()=>U(r,z(t).name)),H(e,n)});var o=L(a,2),s=e=>{var t=Jv(),n=F(t);D(t),R(()=>U(n,`+${z(te).length-5} more`)),H(e,t)};W(o,e=>{z(te).length>5&&e(s)}),D(i),D(t),R(()=>U(r,`Children (${z(te).length??``}):`)),H(e,t)};W(o,e=>{z(te).length>0&&e(s)}),D(r),D(t),H(e,t)};W(Ue,e=>{(z(ee)||z(te).length>0)&&e(We)});var Ge=L(Ue,2),qe=e=>{let n=e=>{Ph(e,{size:14})},r=e=>{var n=$v(),r=I(n);P_(r,{class:`mb-2`,inputClass:`border-line bg-subtle text-fg focus:border-line focus-visible:ring-1 focus-visible:ring-accent`,placeholder:`Filter attributes by key or value…`,ariaLabel:`Filter attributes by key or value`,get value(){return z(g)},set value(e){P(g,e,!0)}});var i=L(r,2);{let e=M(()=>JSON.stringify(t.span.attributes,null,2));j_(i,{get content(){return z(e)},children:(e,t)=>{var n=Qv(),r=F(n),i=e=>{H(e,Zv())},a=e=>{var t=la();G(I(t),17,()=>z(v),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));gv(e,()=>z(n)[0],()=>z(n)[1],()=>e=>P(o,e,!0))}),H(e,t)};W(r,e=>{z(v).length===0?e(i):e(a,-1)}),D(n),H(e,n)},$$slots:{default:!0}})}H(e,n)};{let i=M(()=>z(y)?`Attributes (${z(v).length} of ${Object.keys(t.span.attributes).length})`:`Attributes (${Object.keys(t.span.attributes).length})`);_v(e,()=>z(i),()=>n,()=>z(a).attributes,()=>()=>s(`attributes`),()=>r)}};W(Ge,e=>{z(l)&&e(qe)});var Je=L(Ge,2),Ye=e=>{let n=e=>{bm(e,{size:14})},r=e=>{var n=ny();G(n,21,()=>t.span.events,Oa,(e,n)=>{var r=ty(),i=F(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s);D(s),D(i);var l=L(i,2),u=e=>{{let t=M(()=>JSON.stringify(z(n).attributes,null,2));j_(e,{get content(){return z(t)},children:(e,t)=>{var r=ey(),i=F(r),a=F(i,!0);D(i),D(r),R(e=>U(a,e),[()=>JSON.stringify(z(n).attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},d=M(()=>z(n).attributes&&Object.keys(z(n).attributes).length>0);W(l,e=>{z(d)&&e(u)}),D(r),R(e=>{U(o,z(n).name),U(c,`+${e??``}`)},[()=>nd(z(n).timestamp-t.span.startTime)]),H(e,r)}),D(n),H(e,n)};_v(e,()=>`Events (${t.span.events.length})`,()=>n,()=>z(a).events,()=>()=>s(`events`),()=>r)};W(Je,e=>{z(u)&&e(Ye)});var Xe=L(Je,2),Ze=e=>{let n=e=>{Em(e,{size:14})},r=e=>{var n=oy();G(n,21,()=>t.span.links,Oa,(e,t)=>{var n=ay(),r=F(n),i=L(F(r),2),a=F(i,!0);D(i),j_(L(i,2),{get content(){return z(t).traceId},children:(e,t)=>{H(e,ry())},$$slots:{default:!0}}),D(r);var o=L(r,2),s=L(F(o),2),c=F(s,!0);D(s),j_(L(s,2),{get content(){return z(t).spanId},children:(e,t)=>{H(e,ry())},$$slots:{default:!0}}),D(o);var l=L(o,2),u=e=>{var n=iy(),r=F(n),i=F(r,!0);D(r),D(n),R(e=>U(i,e),[()=>Object.entries(z(t).attributes).map(([e,t])=>`${e}: ${typeof t==`object`?JSON.stringify(t):t}`).join(`, `)]),H(e,n)},d=M(()=>z(t).attributes&&Object.keys(z(t).attributes).length>0);W(l,e=>{z(d)&&e(u)}),D(n),R(()=>{U(a,z(t).traceId),U(c,z(t).spanId)}),B(`click`,i,()=>ju(z(t).traceId,z(t).spanId)),B(`click`,s,()=>ju(z(t).traceId,z(t).spanId)),H(e,n)}),D(n),H(e,n)};_v(e,()=>`Links (${t.span.links.length})`,()=>n,()=>z(a).links,()=>()=>s(`links`),()=>r)};W(Xe,e=>{z(d)&&e(Ze)});var Qe=L(Xe,2),$e=e=>{var n=ly(),r=F(n),i=F(r);em(i,{size:14,class:`text-fg-subtle`});var a=L(i,2),o=F(a);D(a),D(r);var s=L(r,2),c=F(s);G(c,23,()=>z(ae).slice(0,50),(e,t)=>e.id||t,(e,n)=>{let r=M(()=>z(n).spanId===t.span.spanId),i=M(()=>z(n).severityText||`INFO`),a=M(()=>z(i)===`ERROR`?`text-danger`:z(i)===`WARN`?`text-warning`:`text-fg-subtle`),o=M(()=>typeof z(n).body==`string`?z(n).body:JSON.stringify(z(n).body));var s=cy(),c=F(s),l=F(c),u=F(l,!0);D(l);var d=L(l,2),f=e=>{H(e,sy())};W(d,e=>{z(r)&&e(f)});var p=L(d,2),m=F(p,!0);D(p),D(c);var h=L(c,2),g=F(h,!0);D(h),D(s),R((e,t,n)=>{q(s,1,e),q(l,1,t),U(u,z(i)),U(m,n),U(g,z(o))},[()=>K($(`text-xs p-2 rounded border`,z(r)?`border-accent/30 bg-accent/10`:`border-line-subtle bg-subtle`)),()=>K($(`font-mono font-medium`,z(a))),()=>jg(z(n).timestamp,zu.value)]),H(e,s)}),D(c),D(s),D(n),R(()=>U(o,`Correlated Logs (${z(ae).length??``})`)),H(e,n)};W(Qe,e=>{z(ae).length>0&&e($e)}),D(ve)}var et=L(ve,2),tt=e=>{var t=uy(),n=F(t),r=L(n,2),i=F(r),a=F(i),s=F(a,!0);D(a);var c=L(a,2);eg(F(c),{size:16,class:`text-fg-subtle`}),D(c),D(i);var l=L(i,2),u=F(l),d=F(u,!0);D(u),D(l),D(r),D(t),R(()=>{J(t,`aria-label`,`Full value for ${z(o).key}`),U(s,z(o).key),U(d,z(o).value)}),B(`click`,n,()=>P(o,null)),B(`click`,c,()=>P(o,null)),H(e,t)};W(et,e=>{z(o)&&e(tt)}),D(oe),R(e=>{U(E,t.span.name||`Unknown Span`),q(de,1,e),U(fe,t.span.status.code),U(me,t.span.kind)},[()=>K($(`px-2 py-0.5 rounded text-xs font-medium`,z(c)?`bg-danger-bg text-danger`:t.span.status.code===`OK`?`bg-success-bg text-success`:`bg-hover text-fg-muted`))]),B(`click`,_e,function(...e){t.onClose?.apply(this,e)}),H(e,oe),at()}ea([`click`,`change`]);var py=V(`<div><div class="absolute inset-y-0 -left-1.5 -right-1.5"></div> <div></div></div>`);function my(e,t){it(t,!0);var n=py(),r=L(F(n),2);D(n),R((e,i)=>{J(n,`role`,t.role),J(n,`aria-orientation`,t[`aria-orientation`]),J(n,`aria-valuenow`,t[`aria-valuenow`]),J(n,`aria-valuemin`,t[`aria-valuemin`]),J(n,`tabindex`,t.tabIndex),J(n,`title`,t.title??`Drag to resize · double-click to reset`),q(n,1,e),q(r,1,i)},[()=>K($(`group relative z-10 shrink-0 cursor-col-resize self-stretch outline-none`,`w-px bg-hover`)),()=>K($(`absolute inset-y-0 -left-px w-0.5 transition-colors`,`group-hover:bg-accent group-focus-visible:bg-accent`,t.dragging&&`bg-accent`))]),B(`pointerdown`,n,function(...e){t.onPointerDown?.apply(this,e)}),B(`keydown`,n,function(...e){t.onKeyDown?.apply(this,e)}),B(`dblclick`,n,function(...e){t.onDblClick?.apply(this,e)}),H(e,n),at()}ea([`pointerdown`,`keydown`,`dblclick`]);function hy(e,t){e.preventDefault();let n=document.body.style.cursor,r=document.body.style.userSelect;document.body.style.cursor=t.cursor,document.body.style.userSelect=`none`,t.onStart?.();let i=e=>t.onMove(e),a=()=>{document.body.style.cursor=n,document.body.style.userSelect=r,window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),t.onEnd?.()};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)}function gy(e,t){if(!e)return t;try{let t=window.localStorage.getItem(e);if(t!=null){let e=Number(t);if(Number.isFinite(e))return e}}catch{}return t}function _y(e,t){if(e)try{window.localStorage.setItem(e,String(Math.round(t)))}catch{}}function vy(e){let{initial:t,min:n,minOther:r,containerRef:i,storageKey:a,invert:o=!1,step:s=24}=e,c=Math.max(n,gy(a,t)),l=N(_r(c)),u=N(!1),d={current:c},f=()=>{let e=i.current?.clientWidth;return e?Math.max(n,e-r):1/0},p=e=>Math.min(f(),Math.max(n,e)),m=e=>{P(l,e,!0),d.current=e},h=e=>{let t=e.clientX,n=d.current;hy(e,{cursor:`col-resize`,onStart:()=>P(u,!0),onMove:e=>{let r=e.clientX-t,i=o?-r:r;m(p(n+i))},onEnd:()=>{P(u,!1),_y(a,d.current)}})},g=e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault();let t=e.key===`ArrowLeft`?-s:s,n=p(d.current+(o?-t:t));m(n),_y(a,n)},_=()=>{let e=p(t);m(e),_y(a,e)};return{get size(){return z(l)},get dragging(){return z(u)},get separatorProps(){return{role:`separator`,"aria-orientation":`vertical`,"aria-valuenow":Math.round(z(l)),"aria-valuemin":n,tabIndex:0,onPointerDown:h,onKeyDown:g,onDblClick:_}}}}var yy=V(`<div><!></div>`),by=V(`<div class="flex flex-col gap-2"><button class="flex items-center gap-2 cursor-pointer text-fg-muted hover:text-fg transition-colors w-fit"><!> <span class="text-xs font-medium"> </span></button> <!></div>`);function xy(e,t){it(t,!0);var n=by(),r=F(n),i=F(r);{let e=M(()=>$(`text-fg-subtle transition-transform`,t.expanded&&`rotate-180`));bp(i,{size:12,get class(){return z(e)}})}var a=L(i,2),o=F(a,!0);D(a),D(r);var s=L(r,2),c=e=>{var n=yy();La(F(n),()=>t.children),D(n),H(e,n)};W(s,e=>{t.expanded&&e(c)}),D(n),R(()=>U(o,t.label)),B(`click`,r,function(...e){t.onToggle?.apply(this,e)}),H(e,n),at()}ea([`click`]);var Sy=V(`<div class="bg-subtle rounded p-3 border border-line font-mono text-xs"><pre class="whitespace-pre-wrap break-words text-fg"> </pre></div>`),Cy=V(`<div class="font-mono text-xs text-fg-muted mt-1"> </div>`),wy=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="font-medium text-xs text-fg mb-1.5"> </div> <!></div>`),Ty=V(`<div class="space-y-2"></div>`),Ey=V(`<div class="text-xs text-fg-muted"><span class="font-medium">Status message:</span> </div>`),Dy=V(`<div role="presentation" class="mt-3 pt-3 border-t border-line space-y-3"><!> <!> <!></div>`),Oy=V(`<div role="button" tabindex="0" data-focus-inset=""><div class="flex items-center justify-between gap-4"><div class="flex-1 min-w-0"><div class="font-medium text-sm mb-1 text-fg"> </div> <div class="flex items-center gap-3 text-xs text-fg-muted"><span> </span> <span> </span> <span class="text-fg-subtle"> </span></div></div> <button class="p-1 hover:bg-hover rounded"><!></button></div> <!></div>`);function ky(e,t){it(t,!0);let n=N(!1),r=N(_r({attributes:!1,events:!1})),i=M(()=>t.span.status.code===`ERROR`);function a(e){P(r,{...z(r),[e]:!z(r)[e]},!0)}function o(){let e=0,n=t.span;for(;n.parentSpanId;){e++;let r=t.trace.spans.find(e=>e.spanId===n.parentSpanId);if(!r)break;n=r}return e}let s=M(o),c=M(()=>Object.keys(t.span.attributes||{}).length>0),l=M(()=>t.span.events&&t.span.events.length>0);var u=Oy(),d=M(()=>_g(t.onSelect)),f=F(u),p=F(f),m=F(p),h=F(m,!0);D(m);var g=L(m,2),_=F(g),v=F(_,!0);D(_);var y=L(_,2),b=F(y,!0);D(y);var x=L(y,2),S=F(x,!0);D(x),D(g),D(p);var C=L(p,2),w=F(C);{let e=M(()=>$(`text-fg-subtle transition-transform flex-shrink-0`,z(n)&&`rotate-180`));bp(w,{size:14,get class(){return z(e)}})}D(C),D(f);var T=L(f,2),ee=e=>{var n=Dy(),i=F(n),o=e=>{xy(e,{label:`All attributes`,get expanded(){return z(r).attributes},onToggle:()=>a(`attributes`),children:(e,n)=>{{let n=M(()=>JSON.stringify(t.span.attributes,null,2));j_(e,{get content(){return z(n)},children:(e,n)=>{var r=Sy(),i=F(r),a=F(i,!0);D(i),D(r),R(e=>U(a,e),[()=>JSON.stringify(t.span.attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},$$slots:{default:!0}})};W(i,e=>{z(c)&&e(o)});var s=L(i,2),u=e=>{{let n=M(()=>`Events (${t.span.events.length})`);xy(e,{get label(){return z(n)},get expanded(){return z(r).events},onToggle:()=>a(`events`),children:(e,n)=>{var r=Ty();G(r,21,()=>t.span.events,Oa,(e,t)=>{var n=wy(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=e=>{{let n=M(()=>JSON.stringify(z(t).attributes,null,2));j_(e,{get content(){return z(n)},children:(e,n)=>{var r=Cy(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>JSON.stringify(z(t).attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},s=M(()=>z(t).attributes&&Object.keys(z(t).attributes).length>0);W(a,e=>{z(s)&&e(o)}),D(n),R(()=>U(i,z(t).name)),H(e,n)}),D(r),H(e,r)},$$slots:{default:!0}})}};W(s,e=>{z(l)&&e(u)});var d=L(s,2),f=e=>{var n=Ey(),r=L(F(n));D(n),R(()=>U(r,` ${t.span.status.message??``}`)),H(e,n)};W(d,e=>{t.span.status.message&&e(f)}),D(n),B(`click`,n,e=>e.stopPropagation()),H(e,n)};W(T,e=>{z(n)&&e(ee)}),D(u),R((e,n,r)=>{q(u,1,e),oo(u,`padding-left: ${16+z(s)*20}px;`),U(h,t.span.name||`unknown`),q(_,1,n),U(v,t.span.status.code),U(b,r),U(S,t.span.kind)},[()=>K($(`px-4 py-3`,`hover:bg-subtle transition-colors cursor-pointer`,z(i)&&`bg-danger-bg`,t.isSelected&&`bg-hover hover:bg-hover`)),()=>K($(`font-medium`,ad(t.span.status.code))),()=>nd(t.span.duration)]),B(`click`,u,function(...e){t.onSelect?.apply(this,e)}),B(`keydown`,u,function(...e){z(d)?.apply(this,e)}),B(`click`,C,e=>{e.stopPropagation(),P(n,!z(n))}),H(e,u),at()}ea([`click`,`keydown`]);var Ay=`1.0.0`;function jy(e){return{version:Ay,exportedAt:new Date().toISOString(),trace:e}}function My(e){return{version:Ay,exportedAt:new Date().toISOString(),traces:e}}function Ny(e){return JSON.stringify(e,null,2)}function Py(e,t){let n=Ny(jy(e)),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`trace-${e.traceId.slice(0,8)}-${new Date().toISOString().split(`T`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}function Fy(e,t){let n=Ny(My(e)),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`traces-${e.length}-${new Date().toISOString().split(`T`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}async function Iy(e){let t=Ny(jy(e));await navigator.clipboard.writeText(t)}function Ly(e,t){if(!e)return[`${t}: Invalid span data`];let n=e;return[...Hs(n,t,Ls,[`spanId`,`traceId`,`name`]),...Hs(n,t,Rs,[`startTime`,`endTime`,`duration`]),...Hs(n,t,zs,[`status`])]}function Ry(e,t){let n=`trace[${t}]`;if(!e)return{errors:[`${n}: Invalid trace data`],warnings:[]};let r=e,i=Ls(r,`correlationId`)?[]:[`${n}: Missing correlationId, will use traceId`],a=zs(r,`rootSpan`),o=Vs(r,`spans`)?Bs(r,`spans`).flatMap((e,t)=>Ly(Is(e),`${n}.spans[${t}]`)):[`${n}: Missing or invalid spans array`];return{errors:[...Hs(r,n,Ls,[`traceId`]),...a?Ly(a,`${n}.rootSpan`):[`${n}: Missing or invalid rootSpan`],...o,...Hs(r,n,Rs,[`startTime`,`endTime`,`duration`])],warnings:i}}function zy(e){return e}function By(e){let t=[],n=[],r=[],i;try{i=JSON.parse(e)}catch(e){return{success:!1,traces:[],errors:[`Invalid JSON: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}let a=Is(i);if(!a)return{success:!1,traces:[],errors:[`Parsed data is not an object`],warnings:[]};let o=Ls(a,`version`);o&&o!==Ay&&n.push(`Version mismatch: expected ${Ay}, got ${o}`);let s=zs(a,`trace`);if(s){let e=Ry(s,0);t.push(...e.errors),n.push(...e.warnings),e.errors.length===0&&r.push(Vy(zy(s)))}else if(Vs(a,`traces`))for(let[e,i]of Bs(a,`traces`).entries()){let a=Is(i),o=Ry(a,e);t.push(...o.errors),n.push(...o.warnings),a&&o.errors.length===0&&r.push(Vy(zy(a)))}else if(a.traceId){let e=Ry(a,0);t.push(...e.errors),n.push(...e.warnings),e.errors.length===0&&r.push(Vy(zy(a)))}else t.push(`Unrecognized format: expected { trace: ... } or { traces: [...] } or direct trace object`);return{success:t.length===0&&r.length>0,traces:r,errors:t,warnings:n}}function Vy(e){return{...e,correlationId:e.correlationId||e.traceId.slice(0,8),service:e.service||`imported`,status:e.status||(e.spans.some(e=>e.status.code===`ERROR`)?`ERROR`:`OK`),spans:e.spans.map(Hy),rootSpan:Hy(e.rootSpan)}}function Hy(e){return{...e,kind:e.kind||`INTERNAL`,attributes:e.attributes||{},status:{code:e.status?.code||`UNSET`,message:e.status?.message},events:e.events||[]}}function Uy(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(Error(`Failed to read file`)),r.readAsText(e)})}function Wy(e){return{version:Ay,kind:`autotel-devtools-snapshot`,capturedAt:new Date().toISOString(),data:e}}function Gy(e,t){let n=JSON.stringify(Wy(e),null,2),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`autotel-snapshot-${new Date().toISOString().replaceAll(`:`,`-`).split(`.`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}function Ky(e,t){return Bs(e,t)}function qy(e){let t;try{t=JSON.parse(e)}catch(e){return{success:!1,errors:[`Invalid JSON: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}let n=Is(t);if(!n)return{success:!1,errors:[`Snapshot is not an object`],warnings:[]};let r=[];n.kind&&n.kind!==`autotel-devtools-snapshot`&&r.push(`Unexpected snapshot kind: ${String(n.kind)}`);let i=Ls(n,`version`);i&&i!==Ay&&r.push(`Version mismatch: expected ${Ay}, got ${i}`);let a=zs(n,`data`)??n,o=Ky(a,`traces`).map(Vy),s=Ky(a,`logs`),c=Ky(a,`errors`);return o.length===0&&s.length===0&&c.length===0?{success:!1,errors:[`Snapshot contains no traces, logs, or errors`],warnings:r}:{success:!0,snapshot:{traces:o,logs:s,errors:c},errors:[],warnings:r}}async function Jy(e){try{return qy(await Uy(e))}catch(e){return{success:!1,errors:[`Failed to read file: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}}var Yy=V(`<div class="text-warning">Partial trace — the root span has not arrived. This is the highest
|
|
6
|
-
span received; the duration covers only the spans present.</div>`)
|
|
7
|
-
${z(o)===1?`match`:`matches`}`)),H(e,t)},c=M(()=>z(a).trim());W(r,e=>{z(c)&&e(i)}),D(t),H(e,t)};W(Ee,e=>{z(n)===`waterfall`&&e(De)});var Oe=L(Ee,2),ke=F(Oe),Ae=F(ke),je=e=>{{let n=M(()=>z(r)?.spanId);d_(e,{get trace(){return t.trace},onSpanSelect:i,get selectedSpanId(){return z(n)},get query(){return z(a)},onMatchCount:e=>P(o,e,!0)})}},Me=e=>{{let n=M(()=>z(r)?.spanId);O_(e,{get trace(){return t.trace},onSpanSelect:i,get selectedSpanId(){return z(n)}})}},Ne=e=>{var n=Qy(),a=F(n);G(a,21,()=>t.trace.spans,e=>e.spanId,(e,n)=>{{let a=M(()=>z(r)?.spanId===z(n).spanId);ky(e,{get span(){return z(n)},get trace(){return t.trace},get isSelected(){return z(a)},onSelect:()=>i(z(n))})}}),D(a),D(n),H(e,n)};W(Ae,e=>{z(n)===`waterfall`?e(je):z(n)===`flame`?e(Me,1):e(Ne,-1)}),D(ke);var Pe=L(ke,2),Fe=e=>{var n=$y(),a=I(n);my(a,X({get dragging(){return z(f)},title:`Drag to resize the detail panel · double-click to reset`},()=>z(p)));var o=L(a,2);fy(F(o),{get span(){return z(r)},get trace(){return t.trace},onClose:()=>i(null)}),D(o),R(()=>oo(o,`width: ${z(d)??``}px;`)),H(e,n)};W(Pe,e=>{z(r)&&e(Fe)}),D(Oe),Vo(Oe,e=>P(l,e),()=>z(l)),D(v),R((e,n,r,i,a,o,s)=>{q(x,1,e),q(ie,1,n),q(ae,1,r),q(oe,1,i),U(ue,t.trace.rootSpan.name||`Trace`),U(he,a),U(ve,`Trace ID: ${t.trace.traceId??``}`),q(be,1,o),U(xe,t.trace.status),U(Ce,s),U(Te,`${t.trace.spans.length??``} spans`)},[()=>K($(`text-xs text-fg-muted hover:text-fg`,`flex items-center gap-1 transition-colors`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`waterfall`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`flame`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`list`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>h(t.trace.startTime),()=>K($(`font-medium text-sm mb-1`,ad(t.trace.status))),()=>nd(t.trace.duration)]),B(`click`,x,()=>Au(null)),B(`click`,w,_),B(`click`,ne,g),B(`click`,ie,()=>P(n,`waterfall`)),B(`click`,ae,()=>P(n,`flame`)),B(`click`,oe,()=>P(n,`list`)),B(`click`,se,()=>Zc(hg)),H(e,v),at()}ea([`click`]);var nb=V(`<span class="ml-0.5 min-w-[16px] px-1 rounded-full bg-accent text-[10px] font-semibold text-white text-center tabular-nums"> </span>`),rb=V(`<div class="sticky top-0 bg-surface p-2 border-b border-line-subtle"><div class="relative"><!> <input type="text" placeholder="Narrow options…" class="w-full pl-6 pr-2 py-1 text-xs rounded border border-line bg-subtle text-fg focus:outline-none focus:border-accent"/></div></div>`),ib=V(`<span class="text-accent normal-case"> </span>`),ab=V(`<div class="px-1 py-1 text-xs text-fg-subtle">No matches</div>`),ob=ca(`<svg viewBox="0 0 12 12" class="w-2.5 h-2.5 text-white" fill="none" stroke="currentColor" stroke-width="2"><path d="M2.5 6.5l2.5 2.5 4.5-5" stroke-linecap="round" stroke-linejoin="round"></path></svg>`),sb=V(`<button type="button" role="menuitemcheckbox"><span><!></span> <span class="flex-1 truncate"> </span> <span class="flex-shrink-0 font-mono tabular-nums text-fg-subtle"> </span></button>`),cb=V(`<div class="flex flex-col gap-0.5"></div>`),lb=V(`<div class="p-2 border-b border-line-subtle last:border-b-0"><div class="flex items-center justify-between px-1 pb-1 text-[10px] font-semibold uppercase tracking-wide text-fg-subtle"><span> </span> <!></div> <!></div>`),ub=V(`<button type="button" class="flex items-center gap-1 w-full px-3 py-2 text-xs text-fg-subtle hover:bg-hover transition-colors border-t border-line"><!> Clear all filters</button>`),db=V(`<div class="absolute right-0 z-30 mt-1 w-64 max-h-[60vh] overflow-auto rounded-md border border-line bg-surface shadow-lg" role="menu"><!> <!> <!></div>`),fb=V(`<div class="relative"><button type="button" aria-haspopup="true" title="Filter by facets"><!> <span>Filter</span> <!></button> <!></div>`);function pb(e,t){it(t,!0);let n=Z(t,`searchThreshold`,3,8),r=N(!1),i=N(``),a=N(void 0),o=M(()=>t.facets.reduce((e,t)=>e+t.selected.size,0)),s=M(()=>t.facets.some(e=>e.options.length>n()));function c(e){let t=z(i).trim().toLowerCase();return[...t?e.options.filter(e=>e.value.toLowerCase().includes(t)):e.options].sort((t,n)=>{let r=+!!e.selected.has(t.value),i=+!!e.selected.has(n.value);return r===i?t.count===n.count?t.value.localeCompare(n.value):n.count-t.count:i-r})}function l(){P(r,!z(r)),z(r)||P(i,``)}Lr(()=>{if(!z(r))return;let e=e=>{z(a)&&!e.composedPath().includes(z(a))&&(P(r,!1),P(i,``))},t=e=>{e.key===`Escape`&&(P(r,!1),P(i,``))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}});var u=fb(),d=F(u),f=F(d);om(f,{size:12});var p=L(f,4),m=e=>{var t=nb(),n=F(t,!0);D(t),R(()=>U(n,z(o))),H(e,t)};W(p,e=>{z(o)>0&&e(m)}),D(d);var h=L(d,2),g=e=>{var n=db(),r=F(n),a=e=>{var t=rb(),n=F(t),r=F(n);bh(r,{size:12,class:`absolute left-2 top-1/2 -translate-y-1/2 text-fg-subtle`});var a=L(r,2);xo(a),D(n),D(t),Ao(a,()=>z(i),e=>P(i,e)),H(e,t)};W(r,e=>{z(s)&&e(a)});var l=L(r,2);G(l,17,()=>t.facets,e=>e.key,(e,t)=>{let n=M(()=>c(z(t)));var r=lb(),i=F(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2),l=e=>{var n=ib(),r=F(n,!0);D(n),R(()=>U(r,z(t).selected.size)),H(e,n)};W(s,e=>{z(t).selected.size>0&&e(l)}),D(i);var u=L(i,2),d=e=>{H(e,ab())},f=e=>{var r=cb();G(r,21,()=>z(n),e=>e.value,(e,n)=>{let r=M(()=>z(t).selected.has(z(n).value));var i=sb(),a=F(i),o=F(a),s=e=>{H(e,ob())};W(o,e=>{z(r)&&e(s)}),D(a);var c=L(a,2),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u),D(i),R((e,t)=>{q(i,1,e),J(i,`aria-checked`,z(r)),q(a,1,t),J(c,`title`,z(n).value),U(l,z(n).value),U(d,z(n).count)},[()=>K($(`flex items-center gap-2 px-1.5 py-1 rounded text-xs text-left transition-colors`,z(r)?`bg-accent/15 text-accent`:`text-fg-muted hover:bg-hover`)),()=>K($(`flex-shrink-0 w-3 h-3 rounded-sm border flex items-center justify-center`,z(r)?`bg-accent border-accent`:`border-line`))]),B(`click`,i,()=>z(t).onToggle(z(n).value)),H(e,i)}),D(r),H(e,r)};W(u,e=>{z(n).length===0?e(d):e(f,-1)}),D(r),R(()=>U(o,z(t).label)),H(e,r)});var u=L(l,2),d=e=>{var n=ub();eg(F(n),{size:12}),Ke(),D(n),B(`click`,n,function(...e){t.onClearAll?.apply(this,e)}),H(e,n)};W(u,e=>{z(o)>0&&e(d)}),D(n),H(e,n)};W(h,e=>{z(r)&&e(g)}),D(u),Vo(u,e=>P(a,e),()=>z(a)),R(e=>{q(d,1,e),J(d,`aria-expanded`,z(r))},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded border transition-colors`,z(o)>0||z(r)?`border-accent/40 bg-accent/10 text-accent`:`border-line text-fg-muted hover:bg-hover`))]),B(`click`,d,l),H(e,u),at()}ea([`click`]);var mb={"=~":`REGEXP`,"!~":`NOT REGEXP`},hb=/[^\s()[\],=!<>^$"']/,gb=[`>=`,`<=`,`!=`,`=~`,`!~`,`=`,`>`,`<`,`^`,`$`];function _b(e){let t=[],n=0,r=(e,n,r,i,a=!0)=>t.push({type:e,value:n,from:r,to:i,terminated:a});for(;n<e.length;){let t=e[n];if(/\s/.test(t)){n++;continue}let i={"(":`lparen`,")":`rparen`,"[":`lbracket`,"]":`rbracket`,",":`comma`};if(i[t]){r(i[t],t,n,n+1),n++;continue}if(t===`"`||t===`'`){let i=n,a=t;n++;let o=``,s=!1;for(;n<e.length;){if(e[n]===`\\`&&n+1<e.length){o+=e[n+1],n+=2;continue}if(e[n]===a){n++,s=!0;break}o+=e[n],n++}r(`string`,o,i,n,s);continue}let a=gb.find(t=>e.startsWith(t,n));if(a){r(`sigil`,a,n,n+a.length),n+=a.length;continue}let o=n;for(;n<e.length&&hb.test(e[n]);)n++;n===o&&n++,r(`word`,e.slice(o,n),o,n)}return t}var vb=new Set([`and`,`or`]),yb=new Set([`null`,`nil`]),bb=new Map([[`contains`,`CONTAINS`],[`regexp`,`REGEXP`],[`in`,`IN`]]);function xb(e){let t=_b(e),n=[],r=()=>({from:t.length?t[t.length-1].to:0,to:e.length}),i=0,a=(e=0)=>t[i+e],o=()=>t[i++],s=(e,t)=>n.push({message:e,range:t}),c=(e=0)=>{let t=a(e);return t?.type===`word`?t.value.toLowerCase():void 0},l=(e=0)=>{let t=c(e);return t!==void 0&&vb.has(t)};function u(e,t){return{from:e.from,to:t.to}}function d(){let e=o();if(!e){s(`Expected a value`,r());return}if(e.type===`string`)return e.terminated||s(`Unterminated quoted string`,{from:e.from,to:e.to}),{type:`string`,value:e.value};if(e.type===`lbracket`){let e=[];if(a()?.type===`rbracket`)return o(),{type:`array`,values:e};for(;;){let t=d();if(!t)return{type:`array`,values:e};e.push(t);let n=a();if(n?.type===`comma`){o();continue}return n?.type===`rbracket`?(o(),{type:`array`,values:e}):(s(`Expected "," or "]" in array`,n??r()),{type:`array`,values:e})}}if(e.type===`word`){let t=e.value.toLowerCase();if(yb.has(t))return{type:`null`};if(t===`true`)return{type:`boolean`,value:!0};if(t===`false`)return{type:`boolean`,value:!1};let n=Number(e.value);return Number.isFinite(n)?{type:`number`,value:n}:{type:`string`,value:e.value}}s(`Expected a value, found "${e.value}"`,e)}function f(){let e=a();if(!e)return;if(e.type===`sigil`)return o(),mb[e.value]??e.value;if(e.type!==`word`)return;let t=e.value.toLowerCase();if(t===`not`){let e=c(1),t=e?bb.get(e):void 0;return t?(o(),o(),`NOT ${t}`):void 0}let n=bb.get(t);if(n)return o(),n}function p(){let e=a();if(!e){s(`Expected a condition`,r());return}if(e.type===`lparen`){o();let e=g(),t=a();return t?.type===`rparen`?o():s(`Unclosed parenthesis — expected ")"`,t??r()),e}if(e.type===`word`||e.type===`string`){let n=i;o();let r=f();if(r){let n=d();if(!n)return;let a=t[i-1];return{type:`comparison`,field:e.value,op:r,value:n,range:u(e,a??e)}}return i=n,o(),e.type===`string`&&!e.terminated&&s(`Unterminated quoted string`,{from:e.from,to:e.to}),{type:`freeText`,text:e.value,range:{from:e.from,to:e.to}}}s(`Unexpected "${e.value}"`,e),o()}function m(){let e=a();return!e||e.type===`rparen`||e.type===`rbracket`||e.type===`comma`?!1:!l()}function h(){let e=p();if(e)for(;;){if(c()===`and`){o();let t=p();if(!t)return e;e={type:`and`,left:e,right:t,range:Sb(e,t)};continue}if(m()){let t=p();if(!t)return e;e={type:`and`,left:e,right:t,range:Sb(e,t)};continue}return e}}function g(){let e=h();if(e){for(;c()===`or`;){o();let t=h();if(!t)return e;e={type:`or`,left:e,right:t,range:Sb(e,t)}}return e}}if(t.length===0)return{ok:!0,node:{type:`all`}};let _=g(),v=a();return v&&s(`Unexpected "${v.value}"`,v),n.length>0||!_?{ok:!1,errors:n.length>0?n:[{message:`Invalid query`,range:r()}]}:{ok:!0,node:_}}function Sb(e,t){let n=`range`in e?e.range.from:0;return{from:n,to:`range`in t?t.range.to:n}}var Cb=V(`<button type="button" title="Clear query" aria-label="Clear query" class="absolute right-1.5 top-[7px] p-0.5 text-fg-subtle hover:text-fg-muted"><!></button>`),wb=V(`<button type="button" role="option" aria-selected="false" class="block w-full px-2 py-1.5 text-left font-mono text-xs text-fg hover:bg-hover"> </button>`),Tb=V(`<div role="listbox" aria-label="Query fields" class="absolute left-0 right-0 top-full z-30 mt-1 max-h-48 overflow-auto rounded border border-line bg-surface shadow-lg"></div>`),Eb=V(`<div id="query-error" role="status" class="mt-1 flex items-start gap-1.5 text-[11px] text-danger"><!> <span> <span class="text-fg-subtle"> </span></span></div>`),Db=V(`<div><!> <input spellcheck="false" autocomplete="off" autocapitalize="off" aria-label="Query"/> <!> <!> <!></div>`);function Ob(e,t){it(t,!0);let n=Z(t,`placeholder`,3,`Filter — e.g. service = api AND duration > 100`),r=Z(t,`fields`,19,()=>[]),i=Z(t,`ref`,15,null),a=M(()=>xb(t.value)),o=M(()=>z(a).ok?[]:z(a).errors),s=M(()=>z(o).length>0?z(o):t.serverErrors??[]),c=M(()=>z(s).length>0&&t.value.trim().length>0),l=N(!1),u=M(()=>{let e=t.value.match(/(?:^|[\s(])([A-Za-z_][\w.-]*)$/),n=e?.[1]?.toLowerCase()??``;return t.value.trim().length>0&&!e?[]:r().filter(e=>e.toLowerCase().startsWith(n)).filter(e=>e.toLowerCase()!==n).slice(0,8)});function d(e){e.key===`Enter`&&!z(c)&&(e.preventDefault(),t.onSubmit(t.value)),e.key===`Escape`&&t.value&&(e.preventDefault(),t.onInput(``),t.onSubmit(``))}function f(){t.onInput(``),t.onSubmit(``),i()?.focus()}function p(e){let n=t.value.match(/(?:^|[\s(])([A-Za-z_][\w.-]*)$/),r=n?.[1]?t.value.length-n[1].length:t.value.length;t.onInput(`${t.value.slice(0,r)}${e} = `),i()?.focus()}var m=Db(),h=F(m);bh(h,{size:12,class:`absolute left-2 top-[9px] text-fg-subtle pointer-events-none`});var g=L(h,2);xo(g),Vo(g,e=>i(e),()=>i());var _=L(g,2),v=e=>{var t=Cb();eg(F(t),{size:12}),D(t),B(`click`,t,f),H(e,t)};W(_,e=>{t.value&&e(v)});var y=L(_,2),b=e=>{var t=Tb();G(t,20,()=>z(u),e=>e,(e,t)=>{var n=wb(),r=F(n,!0);D(n),R(()=>U(r,t)),B(`mousedown`,n,e=>e.preventDefault()),B(`click`,n,()=>p(t)),H(e,n)}),D(t),H(e,t)};W(y,e=>{z(l)&&z(u).length>0&&e(b)});var x=L(y,2),S=e=>{var t=Eb(),n=F(t);Ep(n,{size:12,class:`mt-px shrink-0`});var r=L(n,2),i=F(r),a=L(i),o=F(a);D(a),D(r),D(t),R(()=>{U(i,`${z(s)[0].message??``} `),U(o,`(column ${z(s)[0].range.from+1})`)}),H(e,t)};W(x,e=>{z(c)&&e(S)}),D(m),R((e,r)=>{q(m,1,e),So(g,t.value),J(g,`placeholder`,n()),J(g,`aria-invalid`,z(c)?`true`:void 0),J(g,`aria-describedby`,z(c)?`query-error`:void 0),q(g,1,r)},[()=>K($(`relative`,t.class)),()=>K($(`w-full pl-7 pr-7 py-1.5 text-xs font-mono rounded border bg-surface text-fg`,`focus:outline-none focus:ring-1`,z(c)?`border-danger-border focus:ring-danger`:`border-line focus:ring-accent`))]),B(`input`,g,e=>t.onInput(e.currentTarget.value)),B(`keydown`,g,d),$i(`focus`,g,()=>P(l,!0)),$i(`blur`,g,()=>P(l,!1)),H(e,m),at()}ea([`input`,`keydown`,`click`,`mousedown`]);function kb(e){return typeof e==`function`}function Ab(e){return typeof e==`object`&&!!e}var jb=[`string`,`number`,`bigint`,`boolean`];function Mb(e){return e==null||jb.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>Mb(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var Nb=Symbol(`box`),Pb=Symbol(`is-writable`);function Fb(e,t){let n=M(e);return t?{[Nb]:!0,[Pb]:!0,get current(){return z(n)},set current(e){t(e)}}:{[Nb]:!0,get current(){return e()}}}function Ib(e){return Ab(e)&&Nb in e}function Lb(e){return Ib(e)?e:kb(e)?Fb(e):Rb(e)}function Rb(e){let t=N(_r(e));return{[Nb]:!0,[Pb]:!0,get current(){return z(t)},set current(e){P(t,e,!0)}}}function zb(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var Bb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Vb=/\n/g,Hb=/^\s*/,Ub=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Wb=/^:\s*/,Gb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Kb=/^[;\s]*/,qb=/^\s+|\s+$/g,Jb=`
|
|
8
|
-
`,
|
|
9
|
-
`)}function
|
|
10
|
-
`,` `)}var
|
|
11
|
-
`,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var bx=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function xx(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Sx,Cx=!1,wx=new WeakMap,Tx=new WeakMap,Ex=new WeakMap,Dx=new WeakSet;Sx=class extends Date{constructor(...e){super(...e),kt(this,Dx),O(this,wx,N(super.getTime())),O(this,Tx,new Map),O(this,Ex,li),Cx||k(Dx,this,Ox).call(this)}};function Ox(){Cx=!0;var e=Sx.prototype,t=Date.prototype,n=Object.getOwnPropertyNames(t);for(let r of n)(r.startsWith(`get`)||r.startsWith(`to`)||r===`valueOf`)&&(e[r]=function(...e){if(e.length>0)return z(j(wx,this)),t[r].apply(this,e);var n=j(Tx,this).get(r);if(n===void 0){let i=li;di(j(Ex,this)),n=M(()=>(z(j(wx,this)),t[r].apply(this,e))),j(Tx,this).set(r,n),di(i)}return z(n)}),r.startsWith(`set`)&&(e[r]=function(...e){var n=t[r].apply(this,e);return P(j(wx,this),t.getTime.call(this)),n})}var kx,Ax,jx=[`forEach`,`isDisjointFrom`,`isSubsetOf`,`isSupersetOf`],Mx=[`difference`,`intersection`,`symmetricDifference`,`union`],Nx=!1,Px=new WeakMap,Fx=new WeakMap,Ix=new WeakMap,Lx=new WeakMap,Rx=new WeakSet;Ax=Symbol.iterator,kx=class extends Set{constructor(e){if(super(),kt(this,Rx),O(this,Px,new Map),O(this,Fx,N(0)),O(this,Ix,N(0)),O(this,Lx,Si||-1),e){for(var t of e)super.add(t);j(Ix,this).v=super.size}Nx||k(Rx,this,Bx).call(this)}has(e){var t=super.has(e),n=j(Px,this),r=n.get(e);if(r===void 0){if(!t)return z(j(Fx,this)),!1;r=k(Rx,this,zx).call(this,!0),n.set(e,r)}return z(r),t}add(e){return super.has(e)||(super.add(e),P(j(Ix,this),super.size),hr(j(Fx,this))),this}delete(e){var t=super.delete(e),n=j(Px,this),r=n.get(e);return r!==void 0&&(n.delete(e),P(r,!1)),t&&(P(j(Ix,this),super.size),hr(j(Fx,this))),t}clear(){if(super.size!==0){super.clear();var e=j(Px,this);for(var t of e.values())P(t,!1);e.clear(),P(j(Ix,this),0),hr(j(Fx,this))}}keys(){return this.values()}values(){return z(j(Fx,this)),super.values()}entries(){return z(j(Fx,this)),super.entries()}[Ax](){return this.keys()}get size(){return z(j(Ix,this))}};function zx(e){return Si===j(Lx,this)?N(e):dr(e)}function Bx(){Nx=!0;var e=kx.prototype,t=Set.prototype;for(let n of jx)e[n]=function(...e){return z(j(Fx,this)),t[n].apply(this,e)};for(let n of Mx)e[n]=function(...e){z(j(Fx,this));var r=t[n].apply(this,e);return new kx(r)}}function Vx(e){return Vx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vx(e)}function Hx(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Vx(e))!==null;);return e}function Ux(){return Ux=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Hx(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ux.apply(null,arguments)}function Wx(e,t,n,r){var i=Ux(Vx(1&r?e.prototype:e),t,n);return 2&r&&typeof i==`function`?function(e){return i.apply(n,e)}:i}var Gx,Kx,qx=new WeakMap,Jx=new WeakMap,Yx=new WeakMap,Xx=new WeakMap,Zx=new WeakSet;Kx=Symbol.iterator;var Qx=class extends Map{constructor(e){if(super(),kt(this,Zx),O(this,qx,new Map),O(this,Jx,N(0)),O(this,Yx,N(0)),O(this,Xx,Si||-1),e){for(var[t,n]of e)super.set(t,n);j(Yx,this).v=super.size}}has(e){var t=j(qx,this),n=t.get(e);if(n===void 0){if(super.has(e))n=k(Zx,this,$x).call(this,0),t.set(e,n);else return z(j(Jx,this)),!1}return z(n),!0}forEach(e,t){k(Zx,this,eS).call(this),super.forEach(e,t)}get(e){var t=j(qx,this),n=t.get(e);if(n===void 0){if(super.has(e))n=k(Zx,this,$x).call(this,0),t.set(e,n);else{z(j(Jx,this));return}}return z(n),super.get(e)}set(e,t){var n=j(qx,this),r=n.get(e),i=super.get(e),a=super.set(e,t),o=j(Jx,this);if(r===void 0)r=k(Zx,this,$x).call(this,0),n.set(e,r),P(j(Yx,this),super.size),hr(o);else if(i!==t){hr(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&hr(o)}return a}delete(e){var t=j(qx,this),n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),P(n,-1)),r&&(P(j(Yx,this),super.size),hr(j(Jx,this))),r}clear(){if(super.size!==0){super.clear();var e=j(qx,this);P(j(Yx,this),0);for(var t of e.values())P(t,-1);hr(j(Jx,this)),e.clear()}}keys(){return z(j(Jx,this)),super.keys()}values(){return k(Zx,this,eS).call(this),super.values()}entries(){return k(Zx,this,eS).call(this),super.entries()}[Kx](){return this.entries()}get size(){return z(j(Yx,this)),super.size}};Gx=Qx;function $x(e){return Si===j(Xx,this)?N(e):dr(e)}function eS(){z(j(Jx,this));var e=j(qx,this);if(j(Yx,this).v!==e.size){for(var t of Wx(Gx.prototype,`keys`,this,2)([]))if(!e.has(t)){var n=k(Zx,this,$x).call(this,0);e.set(t,n)}}for([,n]of j(qx,this))z(n)}var tS=new WeakMap,nS=new WeakMap;new class{constructor(e={}){O(this,tS,void 0),O(this,nS,void 0);let{window:t=bx,document:n=t?.document}=e;t!==void 0&&(A(tS,this,n),A(nS,this,Dt(e=>{let n=Qi(t,`focusin`,e),r=Qi(t,`focusout`,e);return()=>{n(),r()}})))}get current(){return j(nS,this)?.call(this),j(tS,this)?xx(j(tS,this)):null}};function rS(e){return typeof e==`function`}var iS=new WeakMap,aS=new WeakMap,oS=class{constructor(e){O(this,iS,void 0),O(this,aS,void 0),A(iS,this,e),A(aS,this,Symbol(e))}get key(){return j(aS,this)}exists(){return nt(j(aS,this))}get(){let e=et(j(aS,this));if(e===void 0)throw Error(`Context "${j(iS,this)}" not found`);return e}getOr(e){let t=et(j(aS,this));return t===void 0?e:t}set(e){return tt(j(aS,this),e)}};function sS(e,t){switch(e){case`post`:Lr(t);break;case`pre`:zr(t)}}function cS(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;sS(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Pi(()=>n(t,o));return o=t,r})}function lS(e,t,n){cS(e,`post`,t,n)}function uS(e,t,n){cS(e,`pre`,t,n)}lS.pre=uS;function dS(e){return rS(e)?e():e}var fS=new WeakMap,pS=new WeakMap,mS=new WeakMap,hS=new WeakMap,gS=new WeakMap,_S=new WeakMap,vS=new WeakMap,yS=new WeakMap,bS=class{constructor(e,t={box:`border-box`}){O(this,fS,{width:0,height:0}),O(this,pS,!1),O(this,mS,void 0),O(this,hS,void 0),O(this,gS,void 0),O(this,_S,M(()=>(z(j(yS,this))?.(),this.getSize().width))),O(this,vS,M(()=>(z(j(yS,this))?.(),this.getSize().height))),O(this,yS,M(()=>{let e=dS(j(hS,this));if(e)return Dt(t=>{if(!j(gS,this))return;let n=new(j(gS,this)).ResizeObserver(e=>{A(pS,this,!0);for(let t of e){let e=j(mS,this).box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];j(fS,this).width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),j(fS,this).height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{A(pS,this,!1),n.disconnect()}})})),A(gS,this,t.window??bx),A(mS,this,t),A(hS,this,e),A(fS,this,{width:0,height:0})}calculateSize(){let e=dS(j(hS,this));if(!e||!j(gS,this))return;let t=e.offsetWidth,n=e.offsetHeight;if(j(mS,this).box===`border-box`)return{width:t,height:n};let r=j(gS,this).getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return j(pS,this)?j(fS,this):this.calculateSize()??j(fS,this)}get current(){return z(j(yS,this))?.(),this.getSize()}get width(){return z(j(_S,this))}get height(){return z(j(vS,this))}};function xS(e){Lr(()=>()=>{e()})}function SS(e,t){return setTimeout(t,e)}function CS(e){ji().then(e)}var wS=1,TS=9,ES=11;function DS(e){return Ab(e)&&e.nodeType===wS&&typeof e.nodeName==`string`}function OS(e){return Ab(e)&&e.nodeType===TS}function kS(e){return Ab(e)&&e.constructor?.name===`VisualViewport`}function AS(e){return Ab(e)&&e.nodeType!==void 0}function jS(e){return AS(e)&&e.nodeType===ES&&`host`in e}function MS(e,t){if(!e||!t||!DS(e)||!DS(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&jS(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function NS(e){return OS(e)?e:kS(e)?e.document:e?.ownerDocument??document}function PS(e){return jS(e)?PS(e.host):OS(e)?e.defaultView??window:DS(e)?e.ownerDocument?.defaultView??window:window}function FS(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var IS=new WeakMap,LS=class{get root(){return z(j(IS,this))}set root(e){P(j(IS,this),e)}constructor(e){x(this,`element`,void 0),O(this,IS,M(()=>this.element.current?this.element.current.getRootNode()??document:document)),x(this,`getDocument`,()=>NS(this.root)),x(this,`getWindow`,()=>this.getDocument().defaultView??window),x(this,`getActiveElement`,()=>FS(this.root)),x(this,`isActiveElement`,e=>e===this.getActiveElement()),x(this,`querySelector`,e=>this.root?this.root.querySelector(e):null),x(this,`querySelectorAll`,e=>this.root?this.root.querySelectorAll(e):[]),x(this,`setTimeout`,(e,t)=>this.getWindow().setTimeout(e,t)),x(this,`clearTimeout`,e=>this.getWindow().clearTimeout(e)),this.element=typeof e==`function`?Fb(e):e}getElementById(e){return this.root.getElementById(e)}};function RS(e,t){return{[Li()]:n=>Ib(e)?(e.current=n,Pi(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Pi(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function zS(e){return e?`true`:`false`}function BS(e){return e?`open`:`closed`}function VS(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}var HS=new WeakMap,US=new WeakMap,WS=class{constructor(e){O(this,HS,void 0),O(this,US,void 0),x(this,`attrs`,void 0),A(HS,this,e.getVariant?e.getVariant():null),A(US,this,j(HS,this)?`data-${j(HS,this)}-`:`data-${e.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${j(US,this)}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function GS(e){let t=new WS(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var KS=typeof document<`u`,qS=JS();function JS(){return KS&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function YS(e){return e instanceof HTMLElement}function XS(e){return e instanceof Element}function ZS(e){return e instanceof Element||e instanceof SVGElement}function QS(e){return e.pointerType===`touch`}function $S(e){return e!==null}var eC=new WeakMap,tC=new WeakMap,nC=new WeakMap,rC=new WeakMap,iC=new WeakSet,aC=class{constructor(e){kt(this,iC),O(this,eC,void 0),O(this,tC,null),O(this,nC,null),O(this,rC,0),A(eC,this,e),xS(()=>k(iC,this,oC).call(this))}run(e){k(iC,this,oC).call(this);let t=j(eC,this).ref.current;if(!t)return;if(typeof t.getAnimations!=`function`){k(iC,this,sC).call(this,e);return}let n=j(rC,this),r=()=>{n===j(rC,this)&&k(iC,this,sC).call(this,e)},i=()=>{if(n!==j(rC,this))return;let e=t.getAnimations();if(e.length===0){r();return}Promise.all(e.map(e=>e.finished)).then(()=>{r()}).catch(()=>{if(n===j(rC,this)){if(t.getAnimations().some(e=>e.pending||e.playState!==`finished`)){i();return}r()}})},a=()=>{A(tC,this,window.requestAnimationFrame(()=>{A(tC,this,null),i()}))};if(!j(eC,this).afterTick.current){a();return}A(tC,this,window.requestAnimationFrame(()=>{A(tC,this,null);let e=`data-starting-style`;if(!t.hasAttribute(e)){a();return}A(nC,this,new MutationObserver(()=>{n===j(rC,this)&&(t.hasAttribute(e)||(j(nC,this)?.disconnect(),A(nC,this,null),a()))})),j(nC,this).observe(t,{attributes:!0,attributeFilter:[e]})}))}};function oC(){var e;j(tC,this)!==null&&(window.cancelAnimationFrame(j(tC,this)),A(tC,this,null)),j(nC,this)?.disconnect(),A(nC,this,null),A(rC,this,(e=j(rC,this),e++,e))}function sC(e){let t=()=>{e()};j(eC,this).afterTick?CS(t):t()}var cC=new WeakMap,lC=new WeakMap,uC=new WeakMap,dC=new WeakMap,fC=new WeakMap,pC=new WeakMap,mC=new WeakMap,hC=new WeakSet,gC=class{constructor(e){kt(this,hC),O(this,cC,void 0),O(this,lC,void 0),O(this,uC,void 0),O(this,dC,N(!1)),O(this,fC,N(void 0)),O(this,pC,!1),O(this,mC,null),A(cC,this,e),P(j(dC,this),e.open.current,!0),A(lC,this,e.enabled??!0),A(uC,this,new aC({ref:j(cC,this).ref,afterTick:j(cC,this).open})),xS(()=>k(hC,this,_C).call(this)),lS(()=>j(cC,this).open.current,e=>{if(!j(pC,this)){A(pC,this,!0);return}if(k(hC,this,_C).call(this),!e&&j(cC,this).shouldSkipExitAnimation?.()){P(j(dC,this),!1),P(j(fC,this),void 0),j(cC,this).onComplete?.();return}if(e&&P(j(dC,this),!0),P(j(fC,this),e?`starting`:`ending`,!0),e&&A(mC,this,window.requestAnimationFrame(()=>{A(mC,this,null),j(cC,this).open.current&&P(j(fC,this),void 0)})),!j(lC,this)){e||P(j(dC,this),!1),P(j(fC,this),void 0),j(cC,this).onComplete?.();return}j(uC,this).run(()=>{e===j(cC,this).open.current&&(j(cC,this).open.current||P(j(dC,this),!1),P(j(fC,this),void 0),j(cC,this).onComplete?.())})})}get shouldRender(){return z(j(dC,this))}get transitionStatus(){return z(j(fC,this))}};function _C(){j(mC,this)!==null&&(window.cancelAnimationFrame(j(mC,this)),A(mC,this,null))}function vC(){}function yC(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function bC(e,t){var n=la();Da(I(n),()=>t.children,e=>{var n=la();La(I(n),()=>t.children??p),H(e,n)}),H(e,n)}var xC=new oS(`BitsConfig`);function SC(){let e=new wC(null,{});return xC.getOr(e).opts}function CC(e){return xC.set(new wC(xC.getOr(null),e))}var wC=class{constructor(e,t){x(this,`opts`,void 0);let n=TC(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function TC(e,t){return n=>Fb(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function EC(e,t){return n=>{let r=SC();return Fb(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var DC=EC(e=>e.defaultPortalTo,`body`);function OC(e,t){it(t,!0);let n=DC(()=>t.to),r=rt(),i=M(a);function a(){if(!KS||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let o;function s(){o&&(_a(o),o=null)}lS([()=>z(i),()=>t.disabled],([e,n])=>{if(!e||n){s();return}return o=pa(bC,{target:e,props:{children:t.children},context:r}),()=>{s()}});var c=la(),l=I(c),u=e=>{var n=la();La(I(n),()=>t.children??p),H(e,n)};W(l,e=>{t.disabled&&e(u)}),H(e,c),at()}var kC=class{constructor(e,t={bubbles:!0,cancelable:!0}){x(this,`eventName`,void 0),x(this,`options`,void 0),this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){return Qi(e,this.eventName,e=>{t(e)},n)}};function AC(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function jC(e,t){return e===t||e.contains(t)}function MC(e){return e?.ownerDocument??document}function NC(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var PC=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],FC=PC.join(`,`),IC=typeof Element>`u`,LC=IC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,RC=!IC&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},zC=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):zC(e.parentNode))},BC=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},VC=function(e,t,n){if(zC(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(FC));return t&&LC.call(e,FC)&&r.unshift(e),r=r.filter(n),r},HC=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!zC(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=HC(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{LC.call(a,FC)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!zC(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=HC(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},UC=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},WC=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||BC(e))&&!UC(e)?0:e.tabIndex},GC=function(e,t){var n=WC(e);return n<0&&t&&!UC(e)?0:n},KC=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},qC=function(e){return e.tagName===`INPUT`},JC=function(e){return qC(e)&&e.type===`hidden`},YC=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},XC=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},ZC=function(e){if(!e.name)return!0;var t=e.form||RC(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=XC(r,e.form);return!i||i===e},QC=function(e){return qC(e)&&e.type===`radio`},$C=function(e){return QC(e)&&!ZC(e)},ew=function(e){var t=e&&RC(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=RC(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},tw=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},nw=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=LC.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(LC.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=RC(e);if(s&&!s.shadowRoot&&r(s)===!0)return tw(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(ew(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return tw(e);return!1},rw=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return LC.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},iw=function(e,t){return!(t.disabled||JC(t)||nw(t,e)||YC(t)||rw(t))},aw=function(e,t){return!($C(t)||WC(t)<0||!iw(e,t))},ow=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},sw=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=GC(a,i),s=i?sw(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(KC).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},cw=function(e,t){return t=t||{},sw(t.getShadowRoot?HC([e],t.includeContainer,{filter:aw.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ow}):VC(e,t.includeContainer,aw.bind(null,t)))},lw=function(e,t){return t=t||{},t.getShadowRoot?HC([e],t.includeContainer,{filter:iw.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):VC(e,t.includeContainer,iw.bind(null,t))},uw=function(e,t){if(t=t||{},!e)throw Error(`No node provided`);return LC.call(e,FC)!==!1&&aw(t,e)},dw=PC.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),fw=function(e,t){if(t=t||{},!e)throw Error(`No node provided`);return LC.call(e,dw)!==!1&&iw(t,e)},pw=`data-context-menu-trigger`,mw=`data-context-menu-content`;new oS(`Menu.Root`),new oS(`Menu.Root | Menu.Sub`),new oS(`Menu.Content`),new oS(`Menu.Group | Menu.RadioGroup`),new oS(`Menu.RadioGroup`),new oS(`Menu.CheckboxGroup`),new kC(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),GS({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]});var hw;(hw=globalThis).bitsDismissableLayers??(hw.bitsDismissableLayers=new Map);var gw=new WeakMap,_w=new WeakMap,vw=new WeakMap,yw=new WeakMap,bw=new WeakMap,xw=new WeakMap,Sw=new WeakMap,Cw=new WeakMap,ww=new WeakMap,Tw=new WeakSet,Ew=new WeakMap,Dw=new WeakMap,Ow=new WeakMap,kw=new WeakMap,Aw=new WeakMap,jw=new WeakMap,Mw=new WeakMap,Nw=new WeakMap,Pw=new WeakMap,Fw=class e{static create(t){return new e(t)}constructor(e){kt(this,Tw),x(this,`opts`,void 0),O(this,gw,void 0),O(this,_w,void 0),O(this,vw,{pointerdown:!1}),O(this,yw,!1),O(this,bw,!1),O(this,xw,void 0),O(this,Sw,void 0),O(this,Cw,vC),O(this,ww,e=>{e.defaultPrevented||this.opts.ref.current&&CS(()=>{!this.opts.ref.current||j(jw,this).call(this,e.target)||e.target&&!j(bw,this)&&j(Sw,this).current?.(e)})}),O(this,Ew,e=>{let t=e;t.defaultPrevented&&(t=Vw(e)),j(gw,this).current(e)}),O(this,Dw,AC(e=>{if(!this.opts.ref.current){j(Cw,this).call(this);return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||Bw(e,this.opts.ref.current);if(!j(yw,this)||k(Tw,this,Lw).call(this)||!t){j(Cw,this).call(this);return}let n=e;if(n.defaultPrevented&&(n=Vw(n)),j(_w,this).current!==`close`&&j(_w,this).current!==`defer-otherwise-close`){j(Cw,this).call(this);return}e.pointerType===`touch`?(j(Cw,this).call(this),A(Cw,this,Qi(j(xw,this),`click`,j(Ew,this),{once:!0}))):j(gw,this).current(n)},10)),O(this,Ow,e=>{j(vw,this)[e.type]=!0}),O(this,kw,e=>{j(vw,this)[e.type]=!1}),O(this,Aw,()=>{this.opts.ref.current&&A(yw,this,zw(this.opts.ref.current))}),O(this,jw,e=>this.opts.ref.current?jC(this.opts.ref.current,e):!1),O(this,Mw,AC(()=>{for(let e in j(vw,this))j(vw,this)[e]=!1;A(yw,this,!1)},20)),O(this,Nw,()=>{A(bw,this,!0)}),O(this,Pw,()=>{A(bw,this,!1)}),x(this,`props`,{onfocuscapture:j(Nw,this),onblurcapture:j(Pw,this)}),this.opts=e,A(_w,this,e.interactOutsideBehavior),A(gw,this,e.onInteractOutside),A(Sw,this,e.onFocusOutside),Lr(()=>{A(xw,this,MC(this.opts.ref.current))});let t=vC,n=null,r=!1,i=()=>{n!=null&&(clearTimeout(n),n=null)},a=()=>{i(),j(Mw,this).call(this),globalThis.bitsDismissableLayers.delete(this),j(Dw,this).destroy(),t()};lS([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return i(),n=SS(1,()=>{n=null,!(r||!this.opts.ref.current)&&(globalThis.bitsDismissableLayers.set(this,j(_w,this)),t(),t=k(Tw,this,Iw).call(this))}),a}),xS(()=>{r=!0,i(),j(Mw,this).destroy(),globalThis.bitsDismissableLayers.delete(this),j(Dw,this).destroy(),j(Cw,this).call(this),t()})}};function Iw(){return fx(Qi(j(xw,this),`pointerdown`,fx(j(Ow,this),j(Aw,this)),{capture:!0}),Qi(j(xw,this),`pointerdown`,fx(j(kw,this),j(Dw,this))),Qi(j(xw,this),`focusin`,j(ww,this)))}function Lw(){return Object.values(j(vw,this)).some(Boolean)}function Rw(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function zw(e){let t=[...globalThis.bitsDismissableLayers],n=Rw(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function Bw(e,t){let n=e.target;if(!ZS(n))return!1;let r=!!n.closest(`[${pw}]`),i=!!t.closest(`[${mw}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:MC(n).documentElement.contains(n)&&!jC(t,n)&&NC(e,t)}function Vw(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function Hw(e,t){it(t,!0);let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`onInteractOutside`,3,vC),i=Z(t,`onFocusOutside`,3,vC),a=Z(t,`isValidEvent`,3,()=>!1),o=Fw.create({id:Fb(()=>t.id),interactOutsideBehavior:Fb(()=>n()),onInteractOutside:Fb(()=>r()),enabled:Fb(()=>t.enabled),onFocusOutside:Fb(()=>i()),isValidEvent:Fb(()=>a()),ref:t.ref});var s=la();La(I(s),()=>t.children??p,()=>({props:o.props})),H(e,s),at()}var Uw;(Uw=globalThis).bitsEscapeLayers??(Uw.bitsEscapeLayers=new Map);var Ww=new WeakMap,Gw=new WeakMap,Kw=class e{static create(t){return new e(t)}constructor(e){x(this,`opts`,void 0),x(this,`domContext`,void 0),O(this,Ww,()=>Qi(this.domContext.getDocument(),`keydown`,j(Gw,this),{passive:!1})),O(this,Gw,e=>{if(e.key!==`Escape`||!qw(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;(n===`close`||n===`defer-otherwise-close`)&&this.opts.onEscapeKeydown.current(t)}),this.opts=e,this.domContext=new LS(this.opts.ref);let t=vC;lS(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=j(Ww,this).call(this)),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}};function qw(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function Jw(e,t){it(t,!0);let n=Z(t,`escapeKeydownBehavior`,3,`close`),r=Z(t,`onEscapeKeydown`,3,vC);Kw.create({escapeKeydownBehavior:Fb(()=>n()),onEscapeKeydown:Fb(()=>r()),enabled:Fb(()=>t.enabled),ref:t.ref});var i=la();La(I(i),()=>t.children??p),H(e,i),at()}var Yw=new WeakMap,Xw=new WeakMap,Zw=new WeakMap,Qw=class e{constructor(){O(this,Yw,Rb([])),O(this,Xw,new WeakMap),O(this,Zw,new WeakMap)}static getInstance(){return this.instance||(this.instance=new e),this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&j(Zw,this).set(e,n),j(Yw,this).current=j(Yw,this).current.filter(t=>t!==e),j(Yw,this).current.unshift(e)}unregister(e){j(Yw,this).current=j(Yw,this).current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return j(Yw,this).current[0]}setFocusMemory(e,t){j(Xw,this).set(e,t)}getFocusMemory(e){return j(Xw,this).get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){j(Zw,this).set(e,t)}getPreFocusMemory(e){return j(Zw,this).get(e)}clearPreFocusMemory(e){j(Zw,this).delete(e)}};x(Qw,`instance`,void 0);var $w=new WeakMap,eT=new WeakMap,tT=new WeakMap,nT=new WeakMap,rT=new WeakMap,iT=new WeakSet,aT=class e{constructor(e){kt(this,iT),O(this,$w,!1),O(this,eT,null),O(this,tT,Qw.getInstance()),O(this,nT,[]),O(this,rT,void 0),A(rT,this,e)}get paused(){return j($w,this)}pause(){A($w,this,!0)}resume(){A($w,this,!1)}mount(e){j(eT,this)&&this.unmount(),A(eT,this,e),j(tT,this).register(this),k(iT,this,lT).call(this),k(iT,this,sT).call(this)}unmount(){j(eT,this)&&(k(iT,this,oT).call(this),k(iT,this,cT).call(this),j(tT,this).unregister(this),j(tT,this).clearPreFocusMemory(this),A(eT,this,null))}static use(t){let n=null;return lS([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||(n=new e(t)),n.mount(r)):n&&(n.unmount(),n=null)}),xS(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function oT(){for(let e of j(nT,this))e();A(nT,this,[])}function sT(){if(!j(eT,this))return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});j(rT,this).onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!j(eT,this))return;let e=k(iT,this,dT).call(this);e?(e.focus(),j(tT,this).setFocusMemory(this,e)):j(eT,this).focus()})}function cT(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(j(rT,this).onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=j(tT,this).getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}function lT(){if(!j(eT,this)||!j(rT,this).trap.current)return;let e=j(eT,this),t=e.ownerDocument;j(nT,this).push(Qi(t,`focusin`,t=>{if(j($w,this)||!j(tT,this).isActiveScope(this))return;let n=t.target;if(n){if(e.contains(n))j(tT,this).setFocusMemory(this,n);else{let n=j(tT,this).getFocusMemory(this);if(n&&e.contains(n)&&fw(n))t.preventDefault(),n.focus();else{let t=k(iT,this,dT).call(this),n=k(iT,this,fT).call(this)[0];(t||n||e).focus()}}}},{capture:!0}),Qi(e,`keydown`,e=>{if(!j(rT,this).loop||j($w,this)||e.key!==`Tab`||!j(tT,this).isActiveScope(this))return;let n=k(iT,this,uT).call(this);if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=j(tT,this).getFocusMemory(this);if(t&&!e.contains(t)){let t=k(iT,this,dT).call(this),n=k(iT,this,fT).call(this)[0],r=t||n;r?(r.focus(),j(tT,this).setFocusMemory(this,r)):e.focus()}});n.observe(e,{childList:!0,subtree:!0}),j(nT,this).push(()=>n.disconnect())}function uT(){return j(eT,this)?cw(j(eT,this),{includeContainer:!1,getShadowRoot:!0}):[]}function dT(){return k(iT,this,uT).call(this)[0]||null}function fT(){return j(eT,this)?lw(j(eT,this),{includeContainer:!1,getShadowRoot:!0}):[]}function pT(e,t){it(t,!0);let n=Z(t,`enabled`,3,!1),r=Z(t,`trapFocus`,3,!1),i=Z(t,`loop`,3,!1),a=Z(t,`onCloseAutoFocus`,3,vC),o=Z(t,`onOpenAutoFocus`,3,vC),s=aT.use({enabled:Fb(()=>n()),trap:Fb(()=>r()),loop:i(),onCloseAutoFocus:Fb(()=>a()),onOpenAutoFocus:Fb(()=>o()),ref:t.ref});var c=la();La(I(c),()=>t.focusScope??p,()=>({props:s.props})),H(e,c),at()}var mT,hT=()=>{};(mT=globalThis).bitsTextSelectionLayers??(mT.bitsTextSelectionLayers=new Map);var gT=new WeakMap,_T=new WeakMap,vT=new WeakMap,yT=new WeakMap,bT=new WeakSet,xT=new WeakMap,ST=new WeakMap,CT=new WeakMap,wT=class e{static create(t){return new e(t)}constructor(e){kt(this,bT),x(this,`opts`,void 0),x(this,`domContext`,void 0),O(this,gT,vC),O(this,_T,!1),O(this,vT,hT),O(this,yT,hT),O(this,xT,e=>{j(yT,this).call(this,e)}),O(this,ST,e=>{if(!j(_T,this))return;let t=this.opts.ref.current,n=e.target;!YS(t)||!YS(n)||!kT(this)||!MS(t,n)||(j(vT,this).call(this,e),!e.defaultPrevented&&A(gT,this,DT(t,this.domContext.getDocument().body)))}),O(this,CT,()=>{j(gT,this).call(this),A(gT,this,vC)}),this.opts=e,this.domContext=new LS(e.ref);let t=vC;lS(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(A(_T,this,e),A(vT,this,n),A(yT,this,r),e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=k(bT,this,TT).call(this)),()=>{A(_T,this,!1),t(),j(CT,this).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}};function TT(){return fx(Qi(this.domContext.getDocument(),`pointerdown`,j(ST,this)),Qi(this.domContext.getDocument(),`pointerup`,zb(j(CT,this),j(xT,this))))}var ET=e=>e.style.userSelect||e.style.webkitUserSelect;function DT(e,t){let n=ET(t),r=ET(e);return OT(t,`none`),OT(e,`text`),()=>{OT(t,n),OT(e,r)}}function OT(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function kT(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function AT(e,t){it(t,!0);let n=Z(t,`preventOverflowTextSelection`,3,!0),r=Z(t,`onPointerDown`,3,vC),i=Z(t,`onPointerUp`,3,vC);wT.create({id:Fb(()=>t.id),onPointerDown:Fb(()=>r()),onPointerUp:Fb(()=>i()),enabled:Fb(()=>t.enabled&&n()),ref:t.ref});var a=la();La(I(a),()=>t.children??p),H(e,a),at()}var jT;(jT=globalThis).bitsIdCounter??(jT.bitsIdCounter={current:0});function MT(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var NT=new WeakMap,PT=new WeakMap,FT=new WeakMap,IT=new WeakMap,LT=new WeakSet,RT=class{constructor(e){kt(this,LT),O(this,NT,void 0),O(this,PT,0),O(this,FT,N()),O(this,IT,void 0),A(NT,this,e)}get(...e){return A(PT,this,j(PT,this)+1),z(j(FT,this))===void 0&&A(IT,this,Br(()=>{P(j(FT,this),j(NT,this).call(this,...e),!0)})),Lr(()=>()=>{k(LT,this,zT).call(this)}),z(j(FT,this))}};function zT(){A(PT,this,j(PT,this)-1),j(IT,this)&&j(PT,this)<=0&&(j(IT,this).call(this),P(j(FT,this),void 0),A(IT,this,void 0))}var BT=new Qx,VT=N(null),HT=null,UT=null,WT=!1,GT=Fb(()=>{for(let e of BT.values())if(e)return!0;return!1}),KT=null,qT=new RT(()=>{function e(){document.body.setAttribute(`style`,z(VT)??``),document.body.style.removeProperty(`--scrollbar-width`),qS&&HT?.(),P(VT,null)}function t(){UT!==null&&(window.clearTimeout(UT),UT=null)}function n(e,n){t(),WT=!0,KT=Date.now();let r=KT,i=()=>{UT=null,KT===r&&($T(BT)?WT=!1:(WT=!1,n()))},a=e===null?24:e;UT=window.setTimeout(i,a)}function r(){z(VT)===null&&BT.size===0&&!WT&&P(VT,document.body.getAttribute(`style`),!0)}return lS(()=>GT.current,()=>{if(!GT.current)return;r(),WT=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,qS&&(HT=Qi(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),CS(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),xS(()=>()=>{HT?.()}),{get lockMap(){return BT},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),JT=new WeakMap,YT=new WeakMap,XT=new WeakMap,ZT=new WeakMap,QT=class{constructor(e,t=()=>null){O(this,JT,MT()),O(this,YT,void 0),O(this,XT,()=>null),O(this,ZT,void 0),x(this,`locked`,void 0),A(YT,this,e),A(XT,this,t),A(ZT,this,qT.get()),j(ZT,this)&&(j(ZT,this).cancelPendingCleanup(),j(ZT,this).ensureInitialStyleCaptured(),j(ZT,this).lockMap.set(j(JT,this),j(YT,this)??!1),this.locked=Fb(()=>j(ZT,this).lockMap.get(j(JT,this))??!1,e=>j(ZT,this).lockMap.set(j(JT,this),e)),xS(()=>{if(j(ZT,this).lockMap.delete(j(JT,this)),$T(j(ZT,this).lockMap))return;let e=j(XT,this).call(this);j(ZT,this).scheduleCleanupIfNoNewLocks(e,()=>{j(ZT,this).resetBodyStyle()})}))}};function $T(e){for(let[t,n]of e)if(n)return!0;return!1}function eE(e,t){it(t,!0);let n=Z(t,`preventScroll`,3,!0),r=Z(t,`restoreScrollDelay`,3,null);n()&&new QT(n(),()=>r()),at()}function tE(e,t){it(t,!0),CC({defaultPortalTo:Fb(()=>t.defaultPortalTo),defaultLocale:Fb(()=>t.defaultLocale)});var n=la();La(I(n),()=>t.children??p),H(e,n),at()}var nE=[`top`,`right`,`bottom`,`left`],rE=Math.min,iE=Math.max,aE=Math.round,oE=Math.floor,sE=e=>({x:e,y:e}),cE={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function lE(e,t,n){return iE(e,rE(t,n))}function uE(e,t){return typeof e==`function`?e(t):e}function dE(e){return e.split(`-`)[0]}function fE(e){return e.split(`-`)[1]}function pE(e){return e===`x`?`y`:`x`}function mE(e){return e===`y`?`height`:`width`}function hE(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function gE(e){return pE(hE(e))}function _E(e,t,n){n===void 0&&(n=!1);let r=fE(e),i=gE(e),a=mE(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=EE(o)),[o,EE(o)]}function vE(e){let t=EE(e);return[yE(e),t,yE(t)]}function yE(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var bE=[`left`,`right`],xE=[`right`,`left`],SE=[`top`,`bottom`],CE=[`bottom`,`top`];function wE(e,t,n){switch(e){case`top`:case`bottom`:return n?t?xE:bE:t?bE:xE;case`left`:case`right`:return t?SE:CE;default:return[]}}function TE(e,t,n,r){let i=fE(e),a=wE(dE(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(yE)))),a}function EE(e){let t=dE(e);return cE[t]+e.slice(t.length)}function DE(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function OE(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:DE(e)}function kE(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function AE(e,t,n){let{reference:r,floating:i}=e,a=hE(t),o=gE(t),s=mE(o),c=dE(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=fE(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function jE(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=uE(t,e),p=OE(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=kE(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=kE(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ME=50,NE=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:jE},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=AE(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ME&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=AE(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},PE=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=uE(e,t)||{};if(l==null)return{};let d=OE(u),f={x:n,y:r},p=gE(i),m=mE(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=rE(d[_],T),te=rE(d[v],T),ne=C-h[m]-te,re=C/2-h[m]/2+w,ie=lE(ee,re,ne),ae=!c.arrow&&fE(i)!=null&&re!==ie&&a.reference[m]/2-(re<ee?ee:te)-h[m]/2<0,oe=ae?re<ee?re-ee:re-ne:0;return{[p]:f[p]+oe,data:{[p]:ie,centerOffset:re-ie-oe,...ae&&{alignmentOffset:oe}},reset:ae}}}),FE=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=uE(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=dE(r),_=hE(o),v=dE(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[EE(o)]:vE(o)),x=p!==`none`;!d&&x&&b.push(...TE(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=_E(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===hE(t)||T.every(e=>hE(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=hE(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function IE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LE(e){return nE.some(t=>e[t]>=0)}var RE=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=uE(e,t);switch(i){case`referenceHidden`:{let e=IE(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:LE(e)}}}case`escaped`:{let e=IE(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:LE(e)}}}default:return{}}}}},zE=new Set([`left`,`top`]);async function BE(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=dE(n),s=fE(n),c=hE(n)===`y`,l=zE.has(o)?-1:1,u=a&&c?-1:1,d=uE(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var VE=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await BE(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},HE=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=uE(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=hE(i),p=pE(f),m=u[p],h=u[f],g=(e,t)=>lE(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},UE=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=uE(e,t),u={x:n,y:r},d=hE(i),f=pE(d),p=u[f],m=u[d],h=uE(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=zE.has(dE(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},WE=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=uE(e,t),c=await i.detectOverflow(t,s),l=dE(n),u=fE(n),d=hE(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=rE(p-c[m],g),y=rE(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*iE(c.left,c.right):S=p-2*iE(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function GE(){return typeof window<`u`}function KE(e){return YE(e)?(e.nodeName||``).toLowerCase():`#document`}function qE(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function JE(e){return((YE(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function YE(e){return GE()?e instanceof Node||e instanceof qE(e).Node:!1}function XE(e){return GE()?e instanceof Element||e instanceof qE(e).Element:!1}function ZE(e){return GE()?e instanceof HTMLElement||e instanceof qE(e).HTMLElement:!1}function QE(e){return!GE()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof qE(e).ShadowRoot}function $E(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=uD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function eD(e){return/^(table|td|th)$/.test(KE(e))}function tD(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var nD=/transform|translate|scale|rotate|perspective|filter/,rD=/paint|layout|strict|content/,iD=e=>!!e&&e!==`none`,aD;function oD(e){let t=XE(e)?uD(e):e;return iD(t.transform)||iD(t.translate)||iD(t.scale)||iD(t.rotate)||iD(t.perspective)||!cD()&&(iD(t.backdropFilter)||iD(t.filter))||nD.test(t.willChange||``)||rD.test(t.contain||``)}function sD(e){let t=fD(e);for(;ZE(t)&&!lD(t);){if(oD(t))return t;if(tD(t))return null;t=fD(t)}return null}function cD(){return aD??(aD=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`)),aD}function lD(e){return/^(html|body|#document)$/.test(KE(e))}function uD(e){return qE(e).getComputedStyle(e)}function dD(e){return XE(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fD(e){if(KE(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||QE(e)&&e.host||JE(e);return QE(t)?t.host:t}function pD(e){let t=fD(e);return lD(t)?(e.ownerDocument||e).body:ZE(t)&&$E(t)?t:pD(t)}function mD(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=pD(e),i=r===e.ownerDocument?.body,a=qE(r);if(i){let e=hD(a);return t.concat(a,a.visualViewport||[],$E(r)?r:[],e&&n?mD(e):[])}return t.concat(r,mD(r,[],n))}function hD(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gD(e){let t=uD(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ZE(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=aE(n)!==a||aE(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function _D(e){return XE(e)?e:e.contextElement}function vD(e){let t=_D(e);if(!ZE(t))return sE(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=gD(t),o=(a?aE(n.width):n.width)/r,s=(a?aE(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var yD=sE(0);function bD(e){let t=qE(e);return!cD()||!t.visualViewport?yD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xD(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===qE(e)}function SD(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=_D(e),o=sE(1);t&&(r?XE(r)&&(o=vD(r)):o=vD(e));let s=xD(a,n,r)?bD(a):sE(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=qE(a),t=XE(r)?qE(r):r,n=e,i=hD(n);for(;i&&t!==n;){let e=vD(i),t=i.getBoundingClientRect(),r=uD(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=qE(i),i=hD(n)}}return kE({width:u,height:d,x:c,y:l})}function CD(e,t){let n=dD(e).scrollLeft;return t?t.left+n:SD(JE(e)).left+n}function wD(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-CD(e,n),y:n.top+t.scrollTop}}function TD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=JE(r),s=t?tD(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=sE(1),u=sE(0),d=ZE(r);if((d||!a)&&((KE(r)!==`body`||$E(o))&&(c=dD(r)),d)){let e=SD(r);l=vD(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?wD(o,c):sE(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ED(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function DD(e){let t=dD(e),n=e.ownerDocument.body,r=iE(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=iE(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+CD(e),o=-t.scrollTop;return uD(n).direction===`rtl`&&(a+=iE(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var OD=25;function kD(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=qE(e),a=JE(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!cD()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(CD(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=OD&&(s-=o)}return{width:s,height:c,x:l,y:u}}function AD(e,t){let n=SD(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=vD(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function jD(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=kD(e,n,t);else if(t===`document`)r=DD(JE(e));else if(XE(t))r=AD(t,n);else{let n=bD(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return kE(r)}function MD(e,t){let n=t.get(e);if(n)return n;let r=mD(e,[],!1).filter(e=>XE(e)&&KE(e)!==`body`),i=null,a=uD(e).position===`fixed`,o=a?fD(e):e;for(;XE(o)&&!lD(o);){let e=uD(o),t=oD(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=fD(o)}return t.set(e,r),r}function ND(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?tD(t)?[]:MD(t,this._c):[].concat(n),r],o=jD(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=jD(t,a[e],i);s=iE(n.top,s),c=rE(n.right,c),l=rE(n.bottom,l),u=iE(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function PD(e){let{width:t,height:n}=gD(e);return{width:t,height:n}}function FD(e,t,n){let r=ZE(t),i=JE(t),a=n===`fixed`,o=SD(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=sE(0);if((r||!a)&&((KE(t)!==`body`||$E(i))&&(s=dD(t)),r)){let e=SD(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=CD(i));let l=i&&!r&&!a?wD(i,s):sE(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function ID(e){return uD(e).position===`static`}function LD(e,t){if(!ZE(e)||uD(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return JE(e)===n&&(n=n.ownerDocument.body),n}function RD(e,t){let n=qE(e);if(tD(e))return n;if(!ZE(e)){let t=fD(e);for(;t&&!lD(t);){if(XE(t)&&!ID(t))return t;t=fD(t)}return n}let r=LD(e,t);for(;r&&eD(r)&&ID(r);)r=LD(r,t);return r&&lD(r)&&ID(r)&&!oD(r)?n:r||sD(e)||n}var zD=async function(e){let t=this.getOffsetParent||RD,n=this.getDimensions,r=await n(e.floating);return{reference:FD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function BD(e){return uD(e).direction===`rtl`}var VD={convertOffsetParentRelativeRectToViewportRelativeRect:TD,getDocumentElement:JE,getClippingRect:ND,getOffsetParent:RD,getElementRects:zD,getClientRects:ED,getDimensions:PD,getScale:vD,isElement:XE,isRTL:BD};function HD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function UD(e,t,n){let r=null,i,a=JE(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=oE(d),h=oE(a.clientWidth-(u+f)),g=oE(a.clientHeight-(d+p)),_=oE(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:iE(0,rE(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!HD(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=qE(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function WD(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=_D(e),u=i||a?[...l?mD(l):[],...t?mD(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?UD(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?SD(e):null;c&&g();function g(){let t=SD(e);h&&!HD(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var GD=VE,KD=HE,qD=FE,JD=WE,YD=RE,XD=PE,ZD=UE,QD=(e,t,n)=>{let r=new Map,i=n??{},a={...VD,...i.platform,_c:r};return NE(e,t,{...i,platform:a})};function $D(e){return typeof e==`function`?e():e}function eO(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tO(e,t){let n=eO(e);return Math.round(t*n)/n}function nO(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}function rO(e){let t=e.whileElementsMounted,n=M(()=>$D(e.open)??!0),r=M(()=>$D(e.middleware)),i=M(()=>$D(e.transform)??!0),a=M(()=>$D(e.placement)??`bottom`),o=M(()=>$D(e.strategy)??`absolute`),s=M(()=>$D(e.sideOffset)??0),c=M(()=>$D(e.alignOffset)??0),l=e.reference,u=N(0),d=N(0),f=Rb(null),p=N(_r(z(o))),m=N(_r(z(a))),h=N(_r({})),g=N(!1),_=!1,v=0,y=M(()=>{let e=f.current?tO(f.current,z(u)):z(u),t=f.current?tO(f.current,z(d)):z(d);return z(i)?{position:z(p),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...f.current&&eO(f.current)>=1.5&&{willChange:`transform`}}:{position:z(p),left:`${e}px`,top:`${t}px`}}),b;function x(){if(l.current===null||f.current===null)return;let e=l.current,t=f.current,i=++v;QD(e,t,{middleware:z(r),placement:z(a),strategy:z(o)}).then(r=>{if(i===v&&l.current===e&&f.current===t){if(iO(e)){P(h,{...z(h),hide:{...z(h).hide,referenceHidden:!0}},!0);return}if(!z(n)&&z(u)!==0&&z(d)!==0){let e=Math.max(Math.abs(z(s)),Math.abs(z(c)),15);if(r.x<=e&&r.y<=e)return}P(u,r.x,!0),P(d,r.y,!0),P(p,r.strategy,!0),P(m,r.placement,!0),P(h,r.middlewareData,!0),P(g,!0)}})}function S(){typeof b==`function`&&(b(),b=void 0),v++}function C(){if(S(),t===void 0){x();return}z(n)&&l.current!==null&&f.current!==null&&(b=t(l.current,f.current,x))}function w(){!z(n)&&f.current===null&&P(g,!1)}function T(){return[z(r),z(a),z(o),z(s),z(c),z(n)]}return Lr(()=>{t===void 0&&z(n)&&x()}),Lr(C),Lr(()=>{if(t!==void 0){if(T(),!z(n)){_=!1;return}if(!z(g)){_=!1;return}if(!_){_=!0;return}x()}}),Lr(w),Lr(()=>S),{floating:f,reference:l,get strategy(){return z(p)},get placement(){return z(m)},get middlewareData(){return z(h)},get isPositioned(){return z(g)},get floatingStyles(){return z(y)},get update(){return x}}}function iO(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var aO={top:`bottom`,right:`left`,bottom:`top`,left:`right`},oO=new oS(`Floating.Root`),sO=new oS(`Floating.Content`),cO=new oS(`Floating.Root`),lO=class e{static create(t=!1){return t?cO.set(new e):oO.set(new e)}constructor(){x(this,`anchorNode`,Rb(null)),x(this,`customAnchorNode`,Rb(null)),x(this,`triggerNode`,Rb(null)),Lr(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},uO=new WeakMap,dO=new WeakMap,fO=new WeakMap,pO=new WeakMap,mO=new WeakMap,hO=new WeakMap,gO=new WeakMap,_O=new WeakMap,vO=new WeakMap,yO=new WeakMap,bO=new WeakMap,xO=new WeakMap,SO=new WeakMap,CO=new WeakMap,wO=new WeakMap,TO=new WeakMap,EO=new WeakMap,DO=new WeakMap,OO=new WeakMap,kO=new WeakMap,AO=new WeakMap,jO=new WeakMap,MO=new WeakMap,NO=new WeakMap,PO=class e{static create(t,n=!1){return n?sO.set(new e(t,cO.get())):sO.set(new e(t,oO.get()))}get hasExplicitBoundaries(){return z(j(_O,this))}set hasExplicitBoundaries(e){P(j(_O,this),e)}get detectOverflowOptions(){return z(j(vO,this))}set detectOverflowOptions(e){P(j(vO,this),e)}get middleware(){return z(j(CO,this))}set middleware(e){P(j(CO,this),e)}get placedSide(){return z(j(wO,this))}set placedSide(e){P(j(wO,this),e)}get placedAlign(){return z(j(TO,this))}set placedAlign(e){P(j(TO,this),e)}get arrowX(){return z(j(EO,this))}set arrowX(e){P(j(EO,this),e)}get arrowY(){return z(j(DO,this))}set arrowY(e){P(j(DO,this),e)}get cannotCenterArrow(){return z(j(OO,this))}set cannotCenterArrow(e){P(j(OO,this),e)}get contentZIndex(){return z(j(kO,this))}set contentZIndex(e){P(j(kO,this),e,!0)}get arrowBaseSide(){return z(j(AO,this))}set arrowBaseSide(e){P(j(AO,this),e)}get wrapperProps(){return z(j(jO,this))}set wrapperProps(e){P(j(jO,this),e)}get props(){return z(j(MO,this))}set props(e){P(j(MO,this),e)}get arrowStyle(){return z(j(NO,this))}set arrowStyle(e){P(j(NO,this),e)}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`contentRef`,Rb(null)),x(this,`wrapperRef`,Rb(null)),x(this,`arrowRef`,Rb(null)),x(this,`contentAttachment`,RS(this.contentRef)),x(this,`wrapperAttachment`,RS(this.wrapperRef)),x(this,`arrowAttachment`,RS(this.arrowRef)),x(this,`arrowId`,Rb(MT())),O(this,uO,M(()=>{if(typeof this.opts.style==`string`)return dx(this.opts.style);if(!this.opts.style)return{}})),O(this,dO,void 0),O(this,fO,new bS(()=>this.arrowRef.current??void 0)),O(this,pO,M(()=>j(fO,this)?.width??0)),O(this,mO,M(()=>j(fO,this)?.height??0)),O(this,hO,M(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`))),O(this,gO,M(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current])),O(this,_O,M(()=>z(j(gO,this)).length>0)),O(this,vO,M(()=>({padding:this.opts.collisionPadding.current,boundary:z(j(gO,this)).filter($S),altBoundary:this.hasExplicitBoundaries}))),O(this,yO,N(void 0)),O(this,bO,N(void 0)),O(this,xO,N(void 0)),O(this,SO,N(void 0)),O(this,CO,M(()=>[GD({mainAxis:this.opts.sideOffset.current+z(j(mO,this)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&KD({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?ZD():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&qD({...this.detectOverflowOptions}),JD({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;P(j(yO,this),t,!0),P(j(bO,this),n,!0),P(j(xO,this),r,!0),P(j(SO,this),i,!0)}}),this.arrowRef.current&&XD({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),IO({arrowWidth:z(j(pO,this)),arrowHeight:z(j(mO,this))}),this.opts.hideWhenDetached.current&&YD({strategy:`referenceHidden`,...this.detectOverflowOptions})].filter(Boolean))),x(this,`floating`,void 0),O(this,wO,M(()=>RO(this.floating.placement))),O(this,TO,M(()=>zO(this.floating.placement))),O(this,EO,M(()=>this.floating.middlewareData.arrow?.x??0)),O(this,DO,M(()=>this.floating.middlewareData.arrow?.y??0)),O(this,OO,M(()=>this.floating.middlewareData.arrow?.centerOffset!==0)),O(this,kO,N()),O(this,AO,M(()=>aO[this.placedSide])),O(this,jO,M(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${z(j(yO,this))}px`,"--bits-floating-available-height":`${z(j(bO,this))}px`,"--bits-floating-anchor-width":`${z(j(xO,this))}px`,"--bits-floating-anchor-height":`${z(j(SO,this))}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:`hidden`,"pointer-events":`none`},...z(j(uO,this))},dir:this.opts.dir.current,...this.wrapperAttachment}))),O(this,MO,M(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:gx({...z(j(uO,this))}),...this.contentAttachment}))),O(this,NO,M(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}))),this.opts=e,this.root=t,A(dO,this,e.updatePositionStrategy),e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),lS(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=rO({strategy:()=>this.opts.strategy.current,placement:()=>z(j(hO,this)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>WD(...e,{animationFrame:j(dO,this)?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),Lr(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),lS(()=>this.contentRef.current,e=>{if(!e||!this.opts.enabled.current)return;let t=PS(e),n=t.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let n=t.getComputedStyle(e).zIndex;n!==this.contentZIndex&&(this.contentZIndex=n)});return()=>{t.cancelAnimationFrame(n)}}),Lr(()=>{this.floating.floating.current=this.wrapperRef.current})}},FO=class e{static create(t,n=!1){return n?new e(t,cO.get()):new e(t,oO.get())}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),this.opts=e,this.root=t,t.triggerNode=e.virtualEl&&e.virtualEl.current?Lb(e.virtualEl.current):e.ref}};function IO(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=LO(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function LO(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function RO(e){return LO(e)[0]}function zO(e){return LO(e)[1]}function BO(e,t){it(t,!0);let n=Z(t,`tooltip`,3,!1);lO.create(n());var r=la();La(I(r),()=>t.children??p),H(e,r),at()}function VO(e,t){it(t,!0);let n=Z(t,`tooltip`,3,!1);FO.create({id:Fb(()=>t.id),virtualEl:Fb(()=>t.virtualEl),ref:t.ref},n());var r=la();La(I(r),()=>t.children??p),H(e,r),at()}function HO(e,t){it(t,!0);let n=Z(t,`side`,3,`bottom`),r=Z(t,`sideOffset`,3,0),i=Z(t,`align`,3,`center`),a=Z(t,`alignOffset`,3,0),o=Z(t,`arrowPadding`,3,0),s=Z(t,`avoidCollisions`,3,!0),c=Z(t,`collisionBoundary`,19,()=>[]),l=Z(t,`collisionPadding`,3,0),u=Z(t,`hideWhenDetached`,3,!1),d=Z(t,`onPlaced`,3,()=>{}),f=Z(t,`sticky`,3,`partial`),m=Z(t,`updatePositionStrategy`,3,`optimized`),h=Z(t,`strategy`,3,`fixed`),g=Z(t,`dir`,3,`ltr`),_=Z(t,`style`,19,()=>({})),v=Z(t,`wrapperId`,19,MT),y=Z(t,`customAnchor`,3,null),b=Z(t,`tooltip`,3,!1),x=PO.create({side:Fb(()=>n()),sideOffset:Fb(()=>r()),align:Fb(()=>i()),alignOffset:Fb(()=>a()),id:Fb(()=>t.id),arrowPadding:Fb(()=>o()),avoidCollisions:Fb(()=>s()),collisionBoundary:Fb(()=>c()),collisionPadding:Fb(()=>l()),hideWhenDetached:Fb(()=>u()),onPlaced:Fb(()=>d()),sticky:Fb(()=>f()),updatePositionStrategy:Fb(()=>m()),strategy:Fb(()=>h()),dir:Fb(()=>g()),style:Fb(()=>_()),enabled:Fb(()=>t.enabled),wrapperId:Fb(()=>v()),customAnchor:Fb(()=>y())},b()),S=M(()=>yx(x.wrapperProps,{style:{pointerEvents:`auto`}}));var C=la();La(I(C),()=>t.content??p,()=>({props:x.props,wrapperProps:z(S)})),H(e,C),at()}function UO(e,t){it(t,!0),Wo(()=>{t.onPlaced?.()});var n=la();La(I(n),()=>t.content??p,()=>({props:{},wrapperProps:{}})),H(e,n),at()}var WO=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function GO(e,t){let n=Z(t,`isStatic`,3,!1),r=Y(t,WO);var i=la(),a=I(i),o=e=>{UO(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},s=e=>{HO(e,X({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};W(a,e=>{n()?e(o):e(s,-1)}),H(e,i)}var KO=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents`.split(`.`)),qO=V(`<!> <!>`,1);function JO(e,t){it(t,!0);let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Z(t,`tooltip`,3,!1),c=Z(t,`contentPointerEvents`,3,`auto`),l=Y(t,KO),u=M(()=>t.preventScroll??!0),d=M(()=>t.strategy??(z(u)?`fixed`:`absolute`));GO(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return z(d)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get enabled(){return t.enabled},get tooltip(){return s()},content:(e,a)=>{let o=()=>(a?.()).props,s=()=>(a?.()).wrapperProps;var d=qO(),f=I(d),m=e=>{eE(e,{get preventScroll(){return z(u)}})},h=e=>{eE(e,{get preventScroll(){return z(u)}})};W(f,e=>{t.forceMount&&t.enabled?e(m):t.forceMount||e(h,1)}),pT(L(f,2),{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(e,r)=>{let a=()=>(r?.()).props;Jw(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,r)=>{Hw(e,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{let r=()=>(n?.()).props;AT(e,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{var i=la(),u=I(i);{let e=M(()=>({props:yx(l,o(),r(),a(),{style:{pointerEvents:c()}}),wrapperProps:s()}));La(u,()=>t.popper??p,()=>z(e))}H(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),H(e,d)},$$slots:{content:!0}}),at()}var YO=new Set(`$$slots.$$events.$$legacy.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));function XO(e,t){let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Y(t,YO);var c=la(),l=I(c),u=e=>{JO(e,X({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>s))};W(l,e=>{t.shouldRender&&e(u)}),H(e,c)}var ZO=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));function QO(e,t){let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Y(t,ZO);JO(e,X({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>s,{forceMount:!0}))}function $O(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]??[0,0],[c,l]=t[o]??[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function ek(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function tk(e,t){let n=e.left+e.width/2,r=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,o=i-n,s=a-r;return Math.abs(o)>Math.abs(s)?o>0?`right`:`left`:s>0?`bottom`:`top`}var nk=new WeakMap,rk=new WeakMap,ik=new WeakMap,ak=new WeakMap,ok=new WeakMap,sk=new WeakMap,ck=new WeakMap,lk=new WeakMap,uk=new WeakMap,dk=new WeakSet,fk=class{constructor(e){kt(this,dk),O(this,nk,void 0),O(this,rk,void 0),O(this,ik,void 0),O(this,ak,null),O(this,ok,null),O(this,sk,[]),O(this,ck,null),O(this,lk,null),O(this,uk,null),A(nk,this,e),A(rk,this,e.buffer??1);let t=e.transitIntentTimeout;A(ik,this,typeof t==`number`&&t>0?t:null),lS([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>{if(!e||!t||!n){A(ck,this,null),k(dk,this,vk).call(this);return}return j(ck,this)&&j(ck,this)!==e&&k(dk,this,vk).call(this),A(ck,this,e),[Qi(NS(e),`pointermove`,n=>{k(dk,this,_k).call(this,[n.clientX,n.clientY],e,t)}),Qi(e,`pointerleave`,e=>{let n=e.relatedTarget;if(XS(n)&&t.contains(n))return;let r=j(nk,this).ignoredTargets?.()??[];XS(n)&&r.some(e=>e===n||e.contains(n))||(A(sk,this,XS(n)&&r.length>0?r.filter(e=>n.contains(e)):[]),A(ak,this,[e.clientX,e.clientY]),A(ok,this,`content`),k(dk,this,mk).call(this))}),Qi(e,`pointerenter`,()=>{k(dk,this,vk).call(this)}),Qi(t,`pointerenter`,()=>{k(dk,this,vk).call(this)}),Qi(t,`pointerleave`,t=>{let n=t.relatedTarget;XS(n)&&e.contains(n)||(A(ak,this,[t.clientX,t.clientY]),A(ok,this,`trigger`),k(dk,this,mk).call(this))})].reduce((e,t)=>()=>{e(),t()},()=>{})})}};function pk(){j(lk,this)!==null&&(cancelAnimationFrame(j(lk,this)),A(lk,this,null))}function mk(){k(dk,this,pk).call(this),A(lk,this,requestAnimationFrame(()=>{A(lk,this,null),!(!j(ak,this)||!j(ok,this))&&(k(dk,this,vk).call(this),j(nk,this).onPointerExit())}))}function hk(){j(uk,this)!==null&&(clearTimeout(j(uk,this)),A(uk,this,null))}function gk(){j(ik,this)!==null&&(k(dk,this,hk).call(this),A(uk,this,window.setTimeout(()=>{A(uk,this,null),!(!j(ak,this)||!j(ok,this))&&(k(dk,this,vk).call(this),j(nk,this).onPointerExit())},j(ik,this))))}function _k(e,t,n){if(!j(ak,this)||!j(ok,this))return;k(dk,this,pk).call(this),k(dk,this,gk).call(this);let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();if(j(ok,this)===`content`&&ek(e,i)){k(dk,this,vk).call(this);return}if(j(ok,this)===`trigger`&&ek(e,r)){k(dk,this,vk).call(this);return}if(j(ok,this)===`content`&&j(sk,this).length>0)for(let t of j(sk,this)){let n=t.getBoundingClientRect();if(ek(e,n))return;let i=tk(r,n),a=k(dk,this,yk).call(this,r,n,i);if(a&&$O(e,a))return}let a=tk(r,i),o=k(dk,this,yk).call(this,r,i,a);if(o&&$O(e,o))return;let s=j(ok,this)===`content`?i:r;$O(e,k(dk,this,bk).call(this,j(ak,this),s,a,j(ok,this)))||(k(dk,this,vk).call(this),j(nk,this).onPointerExit())}function vk(){A(ak,this,null),A(ok,this,null),A(sk,this,[]),k(dk,this,pk).call(this),k(dk,this,hk).call(this)}function yk(e,t,n){let r=j(rk,this);switch(n){case`top`:return[[Math.min(e.left,t.left)-r,e.top],[Math.min(e.left,t.left)-r,t.bottom],[Math.max(e.right,t.right)+r,t.bottom],[Math.max(e.right,t.right)+r,e.top]];case`bottom`:return[[Math.min(e.left,t.left)-r,e.bottom],[Math.min(e.left,t.left)-r,t.top],[Math.max(e.right,t.right)+r,t.top],[Math.max(e.right,t.right)+r,e.bottom]];case`left`:return[[e.left,Math.min(e.top,t.top)-r],[t.right,Math.min(e.top,t.top)-r],[t.right,Math.max(e.bottom,t.bottom)+r],[e.left,Math.max(e.bottom,t.bottom)+r]];case`right`:return[[e.right,Math.min(e.top,t.top)-r],[t.left,Math.min(e.top,t.top)-r],[t.left,Math.max(e.bottom,t.bottom)+r],[e.right,Math.max(e.bottom,t.bottom)+r]]}}function bk(e,t,n,r){let i=j(rk,this)*4,[a,o]=e;switch(r===`trigger`?k(dk,this,xk).call(this,n):n){case`top`:return[[a-i,o+i],[a+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case`bottom`:return[[a-i,o-i],[a+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case`left`:return[[a+i,o-i],[a+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case`right`:return[[a-i,o-i],[a-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}function xk(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}var Sk=GS({component:`popover`,parts:[`root`,`trigger`,`content`,`close`,`overlay`]}),Ck=new oS(`Popover.Root`),wk=new WeakMap,Tk=new WeakMap,Ek=new WeakMap,Dk=new WeakMap,Ok=new WeakMap,kk=new WeakMap,Ak=new WeakMap,jk=new WeakMap,Mk=new WeakMap,Nk=new WeakSet,Pk=class e{static create(t){return Ck.set(new e(t))}get contentNode(){return z(j(wk,this))}set contentNode(e){P(j(wk,this),e,!0)}get triggerNode(){return z(j(Tk,this))}set triggerNode(e){P(j(Tk,this),e,!0)}get overlayNode(){return z(j(Ek,this))}set overlayNode(e){P(j(Ek,this),e,!0)}get openedViaHover(){return z(j(Dk,this))}set openedViaHover(e){P(j(Dk,this),e,!0)}get hasInteractedWithContent(){return z(j(Ok,this))}set hasInteractedWithContent(e){P(j(Ok,this),e,!0)}get hoverCooldown(){return z(j(kk,this))}set hoverCooldown(e){P(j(kk,this),e,!0)}get closeDelay(){return z(j(Ak,this))}set closeDelay(e){P(j(Ak,this),e,!0)}constructor(e){kt(this,Nk),x(this,`opts`,void 0),O(this,wk,N(null)),x(this,`contentPresence`,void 0),O(this,Tk,N(null)),O(this,Ek,N(null)),x(this,`overlayPresence`,void 0),O(this,Dk,N(!1)),O(this,Ok,N(!1)),O(this,kk,N(!1)),O(this,Ak,N(0)),O(this,jk,null),O(this,Mk,null),this.opts=e,this.contentPresence=new gC({ref:Fb(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new gC({ref:Fb(()=>this.overlayNode),open:this.opts.open}),lS(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,k(Nk,this,Fk).call(this))})}setDomContext(e){A(Mk,this,e)}toggleOpen(){k(Nk,this,Fk).call(this),this.opts.open.current=!this.opts.open.current}handleClose(){k(Nk,this,Fk).call(this),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){k(Nk,this,Fk).call(this),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(k(Nk,this,Fk).call(this),this.closeDelay<=0?this.opts.open.current=!1:j(Mk,this)&&A(jk,this,j(Mk,this).setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),A(jk,this,null)},this.closeDelay))))}cancelDelayedClose(){k(Nk,this,Fk).call(this)}markInteraction(){this.hasInteractedWithContent=!0,k(Nk,this,Fk).call(this)}};function Fk(){j(jk,this)!==null&&j(Mk,this)&&(j(Mk,this).clearTimeout(j(jk,this)),A(jk,this,null))}var Ik=new WeakMap,Lk=new WeakMap,Rk=new WeakMap,zk=new WeakSet,Bk=new WeakMap,Vk=class e{static create(t){return new e(t,Ck.get())}constructor(e,t){kt(this,zk),x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`attachment`,void 0),x(this,`domContext`,void 0),O(this,Ik,null),O(this,Lk,null),O(this,Rk,N(!1)),O(this,Bk,M(()=>({id:this.opts.id.current,"aria-haspopup":`dialog`,"aria-expanded":zS(this.root.opts.open.current),"data-state":BS(this.root.opts.open.current),"aria-controls":k(zk,this,Gk).call(this),[Sk.trigger]:``,disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}))),this.opts=e,this.root=t,this.attachment=RS(this.opts.ref,e=>this.root.triggerNode=e),this.domContext=new LS(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),lS(()=>this.opts.closeDelay.current,e=>{this.root.closeDelay=e})}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||QS(e)||(P(j(Rk,this),!0),k(zk,this,Uk).call(this),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;let t=this.opts.openDelay.current;t<=0?this.root.handleHoverOpen():A(Ik,this,this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),A(Ik,this,null)},t))}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(QS(e)||(P(j(Rk,this),!1),k(zk,this,Hk).call(this),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(k(zk,this,Wk).call(this),z(j(Rk,this))&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}z(j(Rk,this))&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),k(zk,this,Wk).call(this),this.root.toggleOpen())}get props(){return z(j(Bk,this))}set props(e){P(j(Bk,this),e)}};function Hk(){j(Ik,this)!==null&&(this.domContext.clearTimeout(j(Ik,this)),A(Ik,this,null))}function Uk(){j(Lk,this)!==null&&(this.domContext.clearTimeout(j(Lk,this)),A(Lk,this,null))}function Wk(){k(zk,this,Hk).call(this),k(zk,this,Uk).call(this)}function Gk(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}var Kk=new WeakMap,qk=new WeakMap,Jk=class e{static create(t){return new e(t,Ck.get())}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`attachment`,void 0),x(this,`onInteractOutside`,e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!XS(e.target))return;let t=e.target.closest(Sk.selector(`trigger`));if(!(t&&t===this.root.triggerNode)){if(this.opts.customAnchor.current){if(XS(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current==`string`){let t=document.querySelector(this.opts.customAnchor.current);if(t&&t.contains(e.target))return}}this.root.handleClose()}}),x(this,`onEscapeKeydown`,e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()}),O(this,Kk,M(()=>({open:this.root.opts.open.current}))),O(this,qk,M(()=>({id:this.opts.id.current,tabindex:-1,"data-state":BS(this.root.opts.open.current),...VS(this.root.contentPresence.transitionStatus),[Sk.content]:``,style:{pointerEvents:`auto`,contain:`layout style`},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}))),x(this,`popperProps`,{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}),this.opts=e,this.root=t,this.attachment=RS(this.opts.ref,e=>this.root.contentNode=e),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new fk({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){let t=e.target;XS(t)&&uw(t)&&this.root.markInteraction()}onpointerenter(e){QS(e)||this.root.cancelDelayedClose()}onpointerleave(e){QS(e)}get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}get snippetProps(){return z(j(Kk,this))}set snippetProps(e){P(j(Kk,this),e)}get props(){return z(j(qk,this))}set props(e){P(j(qk,this),e)}},Yk=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`forceMount`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`customAnchor`,`style`]),Xk=V(`<div><div><!></div></div>`);function Zk(e,t){let n=ua();it(t,!0);let r=Z(t,`ref`,15,null),i=Z(t,`id`,19,()=>yC(n)),a=Z(t,`forceMount`,3,!1),o=Z(t,`onOpenAutoFocus`,3,vC),s=Z(t,`onCloseAutoFocus`,3,vC),c=Z(t,`onEscapeKeydown`,3,vC),l=Z(t,`onInteractOutside`,3,vC),u=Z(t,`trapFocus`,3,!0),d=Z(t,`preventScroll`,3,!1),f=Z(t,`customAnchor`,3,null),m=Y(t,Yk),h=Jk.create({id:Fb(()=>i()),ref:Fb(()=>r(),e=>r(e)),onInteractOutside:Fb(()=>l()),onEscapeKeydown:Fb(()=>c()),customAnchor:Fb(()=>f())}),g=M(()=>yx(m,h.props)),_=M(()=>u()&&h.shouldTrapFocus);function v(e){h.shouldTrapFocus||e.preventDefault(),o()(e)}var y=la(),b=I(y),x=e=>{QO(e,X(()=>z(g),()=>h.popperProps,{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},get id(){return i()},get trapFocus(){return z(_)},get preventScroll(){return d()},loop:!0,forceMount:!0,get customAnchor(){return f()},onOpenAutoFocus:v,get onCloseAutoFocus(){return s()},get shouldRender(){return h.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>yx(r(),{style:nO(`popover`)},{style:t.style}));var o=la(),s=I(o),c=e=>{var n=la(),r=I(n);{let e=M(()=>({props:z(a),wrapperProps:i(),...h.snippetProps}));La(r,()=>t.child,()=>z(e))}H(e,n)},l=e=>{var n=Xk();Eo(n,()=>({...i()}));var r=F(n);Eo(r,()=>({...z(a)})),La(F(r),()=>t.children??p),D(r),D(n),H(e,n)};W(s,e=>{t.child?e(c):e(l,-1)}),H(e,o)},$$slots:{popper:!0}}))},S=e=>{XO(e,X(()=>z(g),()=>h.popperProps,{get ref(){return h.opts.ref},get open(){return h.root.opts.open.current},get id(){return i()},get trapFocus(){return z(_)},get preventScroll(){return d()},loop:!0,forceMount:!1,get customAnchor(){return f()},onOpenAutoFocus:v,get onCloseAutoFocus(){return s()},get shouldRender(){return h.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>yx(r(),{style:nO(`popover`)},{style:t.style}));var o=la(),s=I(o),c=e=>{var n=la(),r=I(n);{let e=M(()=>({props:z(a),wrapperProps:i(),...h.snippetProps}));La(r,()=>t.child,()=>z(e))}H(e,n)},l=e=>{var n=Xk();Eo(n,()=>({...i()}));var r=F(n);Eo(r,()=>({...z(a)})),La(F(r),()=>t.children??p),D(r),D(n),H(e,n)};W(s,e=>{t.child?e(c):e(l,-1)}),H(e,o)},$$slots:{popper:!0}}))};W(b,e=>{a()?e(x):a()||e(S,1)}),H(e,y),at()}var Qk=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`type`,`disabled`,`openOnHover`,`openDelay`,`closeDelay`]),$k=V(`<button><!></button>`);function eA(e,t){let n=ua();it(t,!0);let r=Z(t,`id`,19,()=>yC(n)),i=Z(t,`ref`,15,null),a=Z(t,`type`,3,`button`),o=Z(t,`disabled`,3,!1),s=Z(t,`openOnHover`,3,!1),c=Z(t,`openDelay`,3,700),l=Z(t,`closeDelay`,3,300),u=Y(t,Qk),d=Vk.create({id:Fb(()=>r()),ref:Fb(()=>i(),e=>i(e)),disabled:Fb(()=>!!o()),openOnHover:Fb(()=>s()),openDelay:Fb(()=>c()),closeDelay:Fb(()=>l())}),f=M(()=>yx(u,d.props,{type:a()}));VO(e,{get id(){return r()},get ref(){return d.opts.ref},children:(e,n)=>{var r=la(),i=I(r),a=e=>{var n=la();La(I(n),()=>t.child,()=>({props:z(f)})),H(e,n)},o=e=>{var n=$k();Eo(n,()=>({...z(f)})),La(F(n),()=>t.children??p),D(n),H(e,n)};W(i,e=>{t.child?e(a):e(o,-1)}),H(e,r)},$$slots:{default:!0}}),at()}function tA(e,t){it(t,!0);let n=Z(t,`open`,15,!1),r=Z(t,`onOpenChange`,3,vC),i=Z(t,`onOpenChangeComplete`,3,vC);Pk.create({open:Fb(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Fb(()=>i())}),BO(e,{children:(e,n)=>{var r=la();La(I(r),()=>t.children??p),H(e,r)},$$slots:{default:!0}}),at()}var nA=V(`<!> `,1),rA=V(`<button type="button"> <!></button>`),iA=V(`<button type="button"> </button>`),aA=V(`<div role="group" aria-label="Presets"></div> <div class="mt-1 border-t border-line pt-2 px-2 pb-1"><div class="text-[11px] uppercase tracking-wide text-fg-subtle mb-1.5">Custom range</div> <label class="block text-[11px] text-fg-muted mb-1">From <input type="datetime-local" class="mt-0.5 w-full rounded border border-line bg-subtle px-1.5 py-1 text-xs text-fg focus:outline-none focus:border-accent"/></label> <label class="block text-[11px] text-fg-muted mb-2">To <input type="datetime-local" class="mt-0.5 w-full rounded border border-line bg-subtle px-1.5 py-1 text-xs text-fg focus:outline-none focus:border-accent"/></label> <div class="mb-2 border-t border-line pt-2"><div class="mb-1 text-[11px] text-fg-muted">Show times in</div> <div class="flex gap-1"></div> <div class="mt-1 text-[11px] text-fg-subtle"> </div></div> <button type="button">Apply</button></div>`,1),oA=V(`<!> <!>`,1);function sA(e,t){it(t,!0);let n=N(!1),r=M(()=>t.selection.type===`custom`?{start:t.selection.start,end:t.selection.end}:{start:Date.now()-9e5,end:Date.now()}),i=N(``),a=N(``);function o(e){P(n,e,!0),e&&(P(i,u(z(r).start),!0),P(a,u(z(r).end),!0))}function s(e){t.onChange({type:`preset`,preset:e}),P(n,!1)}function c(){let e=d(z(i)),r=d(z(a));e!==null&&r!==null&&(t.onChange({type:`custom`,start:e,end:r}),P(n,!1))}let l=M(()=>d(z(i))!==null&&d(z(a))!==null);function u(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function d(e){if(!e)return null;let t=new Date(e).getTime();return Number.isFinite(t)?t:null}var f=la();Ra(I(f),()=>tA,(e,r)=>{r(e,{onOpenChange:o,get open(){return z(n)},set open(e){P(n,e,!0)},children:(e,n)=>{var r=oA(),o=I(r);{let e=M(()=>$(`inline-flex items-center gap-1.5 px-2 py-1 text-xs rounded border`,`border-line bg-surface text-fg-muted hover:text-fg hover:bg-hover`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,t.class));Ra(o,()=>eA,(n,r)=>{r(n,{"aria-label":`Time window`,title:`Change the time window`,get class(){return z(e)},children:(e,n)=>{var r=nA(),i=I(r);Ap(i,{size:12});var a=L(i);R(e=>U(a,` ${e??``}`),[()=>Ts(t.selection)]),H(e,r)},$$slots:{default:!0}})})}Ra(L(o,2),()=>OC,(e,n)=>{n(e,{children:(e,n)=>{var r=la();Ra(I(r),()=>Zk,(e,n)=>{n(e,{sideOffset:6,align:`start`,class:`z-50 w-64 rounded-md border border-line bg-surface p-1 shadow-lg`,children:(e,n)=>{var r=aA(),o=I(r);G(o,21,()=>ys,e=>e.id,(e,n)=>{let r=M(()=>t.selection.type===`preset`&&t.selection.preset===z(n).id);var i=rA(),a=F(i),o=L(a),c=e=>{vp(e,{size:12,class:`text-accent`})};W(o,e=>{z(r)&&e(c)}),D(i),R(e=>{J(i,`aria-current`,z(r)?`true`:void 0),q(i,1,e),U(a,`${z(n).label??``} `)},[()=>K($(`flex w-full items-center justify-between rounded px-2 py-1.5 text-xs`,`text-fg hover:bg-hover focus-visible:outline-none focus-visible:bg-hover`,z(r)&&`bg-selected font-medium`))]),B(`click`,i,()=>s(z(n).id)),H(e,i)}),D(o);var u=L(o,2),d=L(F(u),2),f=L(F(d));xo(f),D(d);var p=L(d,2),m=L(F(p));xo(m),D(p);var h=L(p,2),g=L(F(h),2);G(g,20,()=>[{id:`local`,label:`Local`},{id:`utc`,label:`UTC`}],e=>e.id,(e,t)=>{var n=iA(),r=F(n,!0);D(n),R(e=>{J(n,`aria-pressed`,zu.value===t.id),q(n,1,e),U(r,t.label)},[()=>K($(`flex-1 rounded px-2 py-1 text-xs`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,zu.value===t.id?`bg-accent text-white`:`border border-line text-fg-muted hover:text-fg`))]),B(`click`,n,()=>zu.value=t.id),H(e,n)}),D(g);var _=L(g,2),v=F(_);D(_),D(h);var y=L(h,2);D(u),R((e,t)=>{U(v,`Currently ${e??``}`),y.disabled=!z(l),q(y,1,t)},[()=>Mg(zu.value),()=>K($(`w-full rounded px-2 py-1 text-xs font-medium`,`bg-accent text-white hover:opacity-90`,`disabled:opacity-40 disabled:cursor-not-allowed`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`))]),Ao(f,()=>z(i),e=>P(i,e)),Ao(m,()=>z(a),e=>P(a,e)),B(`click`,y,c),H(e,r)},$$slots:{default:!0}})}),H(e,r)},$$slots:{default:!0}})}),H(e,r)},$$slots:{default:!0}})}),H(e,f),at()}ea([`click`]);var cA=V(`<button type="button" aria-live="polite" title="Show the newest matches and follow new data again"><!> </button>`);function lA(e,t){it(t,!0);let n=M(()=>!t.live&&t.count>0),r=M(()=>t.count>999?`999+`:String(t.count));var i=la(),a=I(i),o=e=>{var n=cA(),i=F(n);np(i,{size:12});var a=L(i);D(n),R(e=>{q(n,1,e),U(a,` ${z(r)??``} new`)},[()=>K($(`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium`,`bg-accent text-white shadow-sm hover:opacity-90 focus-visible:outline-none`,`focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1`,`transition-opacity`,t.class))]),B(`click`,n,function(...e){t.onResume?.apply(this,e)}),H(e,n)};W(a,e=>{z(n)&&e(o)}),H(e,i),at()}ea([`click`]);async function uA(e,t){try{let n=await t.fetch(`${t.baseUrl}/api/query/${e}/fields`,{signal:t.signal});if(!n.ok)return[];let r=await n.json();return Array.isArray(r.fields)?r.fields:[]}catch{return[]}}async function dA(e,t,n){let r={query:t.query};t.window&&(r.window=t.window),t.limit!==void 0&&(r.limit=t.limit),t.cursor&&(r.cursor=t.cursor);let i;try{i=await n.fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(r),signal:n.signal})}catch(e){return pA(e)?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}let a;try{a=await i.json()}catch{return{status:`error`,message:`Unexpected response from ${n.baseUrl} (not JSON)`}}if(i.status===400){let e=a.errors;return e?.length?{status:`invalid`,errors:e}:{status:`error`,message:`Invalid query request`}}return i.status===403?{status:`error`,message:`Forbidden: the devtools server rejected this origin. Open the viewer from the same machine.`}:i.ok?{status:`ok`,payload:a}:{status:`error`,message:`Server error: ${a.error??i.statusText}`}}async function fA(e,t){let n=await dA(`${t.baseUrl}/api/query/traces`,e,t);if(n.status!==`ok`)return n;let r=n.payload;return{status:`ok`,traces:r.traces??[],nextCursor:r.nextCursor??null}}function pA(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}async function mA(e,t){let n=await dA(`${t.baseUrl}/api/query/logs`,e,t);if(n.status!==`ok`)return n;let r=n.payload;return{status:`ok`,logs:r.logs??[],nextCursor:r.nextCursor??null}}async function hA(e,t){let n=await dA(`${t.baseUrl}/api/query/errors`,e,t);return n.status===`ok`?{status:`ok`,errors:n.payload.errors??[]}:n}async function gA(e,t){let n=await dA(`${t.baseUrl}/api/query/webmcp`,{query:``,...e},t);return n.status===`ok`?{status:`ok`,webmcp:n.payload.webmcp??{tools:[],summary:{installations:0,emptyInstallations:0,toolsOffered:0,toolsWithdrawn:0,calls:0,errors:0,resultBytes:0,envelopeBytes:0,toolsWithDroppedAnnotations:0,toolsWithoutInputSchema:0,toolsWithLabelMismatch:0,toolsRedefined:0,refusedCalls:0}}}:n}function _A(){return{reasons:{query:!1,scrolled:!1,selected:!1,window:!1},pending:0}}function vA(e){return!Object.values(e.reasons).some(Boolean)}function yA(e){return vA(e)?0:e.pending}function bA(e,t){switch(t.type){case`query-changed`:return xA(e,`query`,t.query.trim().length>0);case`scrolled`:return xA(e,`scrolled`,!t.atTop);case`row-selected`:return xA(e,`selected`,!0);case`row-deselected`:return xA(e,`selected`,!1);case`window-changed`:return xA(e,`window`,t.bounded);case`arrived`:return vA(e)?e:{...e,pending:Math.max(0,e.pending+t.count)};case`resumed`:return _A()}}function xA(e,t,n){if(e.reasons[t]===n)return e;let r={reasons:{...e.reasons,[t]:n},pending:e.pending};return vA(r)&&(r.pending=0),r}var SA={run:async(e,t)=>{let n=await fA(e,t);return n.status===`ok`?{status:`ok`,rows:n.traces,nextCursor:n.nextCursor}:n}},CA={run:async(e,t)=>{let n=await mA(e,t);return n.status===`ok`?{status:`ok`,rows:n.logs,nextCursor:n.nextCursor}:n}},wA=200,TA=100;function EA(e,t){let n=e.now??(()=>Date.now()),r=e.debounceMs??wA,i=e.pageSize??TA,a=new rs(``),o=dl,s=new rs([]),c=new rs([]),l=new rs(null),u=new rs(!1),d=new rs(!1),f=new rs(null),p=new rs(_A()),m=0,h=null,g=null;function _(e){p.value=bA(p.value,e)}async function v(r={}){let p=++m;h?.abort();let g=new AbortController;h=g,u.value=!0;let _=Cs(o.value,n()),v=await t.run({query:a.value,window:ks(_),limit:i,cursor:r.append?f.value??void 0:void 0},{fetch:e.client.fetch,baseUrl:typeof e.client.baseUrl==`function`?e.client.baseUrl():e.client.baseUrl,signal:g.signal});if(p===m)switch(u.value=!1,v.status){case`ok`:s.value=r.append?[...s.value,...v.rows]:v.rows,f.value=v.nextCursor,c.value=[],l.value=null,d.value=!0;return;case`invalid`:c.value=v.errors,l.value=null;return;case`error`:c.value=[],l.value=v.message;return;case`aborted`:return}}function y(){if(g&&clearTimeout(g),r<=0){v();return}g=setTimeout(()=>{g=null,v()},r)}return{text:a,window:o,results:s,errors:c,failure:l,loading:u,ready:d,nextCursor:f,tail:p,get live(){return vA(p.value)},get pending(){return yA(p.value)},setText(e){a.value=e,_({type:`query-changed`,query:e}),y()},submit(){g&&(clearTimeout(g),g=null),v()},refresh(){return g&&(clearTimeout(g),g=null),v()},setWindow(e){o.value=e,_({type:`window-changed`,bounded:!ws(Cs(e,n()))}),v()},setScrolledToTop(e){_({type:`scrolled`,atTop:e})},setSelected(e){_(e?{type:`row-selected`}:{type:`row-deselected`})},arrived(e){_({type:`arrived`,count:e}),vA(p.value)&&v()},resume(){_({type:`resumed`}),a.value=``,v()},loadMore(){!f.value||u.value||v({append:!0})},removeRows(e){s.value=s.value.filter(t=>!e(t))},dispose(){g&&clearTimeout(g),h?.abort()}}}function DA(e){return EA(e,SA)}function OA(e){return EA(e,CA)}function kA(e,t){let n=t,r=!0;if(typeof IntersectionObserver>`u`)return{update:e=>{n=e}};let i=new IntersectionObserver(e=>{let t=e[e.length-1];if(t){if(!t.isIntersecting){r=!0;return}!r||n.disabled||(r=!1,n.onReach())}},{root:n.root??null,rootMargin:n.rootMargin??`200px`});return i.observe(e),{update(e){let t=n.disabled;n=e,t&&!e.disabled&&(r=!0)},destroy(){i.disconnect()}}}function AA(e){let t=e.target;return/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||t.isContentEditable}function jA(e,t){return e>t-1?t-1:e}function MA(e,t,n,r){return n===0?e:e<0?t>0?0:r===`last`?n-1:0:Math.min(Math.max(e+t,0),n-1)}function NA(e){let{count:t,onActivate:n,scrollToIndex:r,fromUnsetUp:i=`first`}=e,a=N(-1),o=M(()=>jA(z(a),t())),s=e=>{t()!==0&&(P(a,MA(z(o),e,t(),i),!0),r?.(z(a)))};return{get cursor(){return z(o)},set cursor(e){P(a,e,!0)},onKeyDown:e=>{AA(e)||(e.key===`ArrowDown`||e.key===`j`?(e.preventDefault(),s(1)):e.key===`ArrowUp`||e.key===`k`?(e.preventDefault(),s(-1)):e.key===`Enter`&&z(o)>=0&&z(o)<t()&&(e.preventDefault(),n(z(o))))}}}var PA=V(`<button><span class="truncate"> </span> <!></button>`),FA=V(`<span class="flex-shrink-0 px-1.5 py-0.5 rounded bg-warning-bg text-warning text-[10px] font-medium uppercase tracking-wide" title="Partial trace: the root span has not arrived, so this row shows the highest span received and a duration covering only that part.">partial</span>`),IA=V(`<div role="option" tabindex="-1" data-focus-inset=""><label class="cursor-pointer flex items-center"><input type="checkbox" class="w-3.5 h-3.5 rounded border-line text-accent"/></label> <button type="button"> </button> <div class="flex items-center gap-1.5 min-w-0"><!> <span class="truncate text-sm text-fg"> </span> <!> <!></div> <span class="font-mono text-xs text-fg-muted text-right tabular-nums"> </span> <span class="trace-col-spans font-mono text-xs text-fg-subtle text-right tabular-nums"> </span> <span class="trace-col-time font-mono text-[11px] text-fg-subtle truncate"> </span> <span> </span> <!></div>`),LA=V(`<span class="text-xs font-normal text-accent"> </span>`),RA=V(`<div class="flex items-center gap-1 mr-2 px-2 border-r border-line"><button class="flex items-center gap-1 px-2 py-1 text-xs rounded bg-accent/10 text-accent hover:bg-accent/20 transition-colors" title="Export selected traces"><!> </button> <button class="flex items-center gap-1 px-2 py-1 text-xs rounded bg-danger-bg text-danger hover:bg-danger-bg/80 transition-colors" title="Delete selected traces"><!> Delete</button></div>`),zA=V(`<button class="px-2 py-1 text-xs rounded text-fg-subtle hover:bg-hover transition-colors" title="Drop buffered traces received while paused">Drop buffer</button>`),BA=V(`<button class="p-1.5 hover:bg-hover rounded transition-colors" title="Export all traces as JSON"><!></button>`),VA=V(`<div class="text-center text-fg-subtle text-sm py-12">Loading traces…</div>`),HA=V(`<div class="mx-auto flex max-w-2xl flex-col items-center gap-3 px-6 py-12 text-center text-sm text-fg-subtle"><p class="font-medium text-fg">No traces yet — send telemetry to get started</p> <p class="max-w-lg text-xs text-fg-muted">Both standard OTLP transports are ready. Existing SDK defaults
|
|
12
|
-
usually work unchanged.</p> <div class="grid w-full gap-2 text-left md:grid-cols-2"><div class="rounded-md border border-line bg-subtle p-3"><div class="mb-1 text-[11px] font-semibold uppercase tracking-wide">OTLP/gRPC</div> <code class="break-all text-xs text-fg">OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317</code></div> <div class="rounded-md border border-line bg-subtle p-3"><div class="mb-1 text-[11px] font-semibold uppercase tracking-wide">OTLP/HTTP</div> <code class="break-all text-xs text-fg">OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318</code></div></div></div>`),UA=V(`<div class="text-center text-fg-subtle text-sm py-12">No traces match the current filter.</div>`),WA=V(`<div class="px-4 py-3 text-center text-xs text-fg-subtle"> </div>`),GA=V(`<div><div class="trace-grid sticky top-0 z-10 px-4 py-2 border-b border-line bg-subtle text-[11px] font-semibold uppercase tracking-wide text-fg-subtle"><label class="cursor-pointer flex items-center"><input type="checkbox" class="w-3.5 h-3.5 rounded border-line text-accent"/></label> <!> <!> <!> <!> <!> <!> <span></span></div> <!> <!></div>`),KA=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> <!></h3> <div class="flex items-center gap-1"><!> <button><!> </button> <!> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Import traces from file"><!></button> <!> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Keyboard shortcuts (?)"><!></button></div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!> <!> <select class="text-xs border border-line rounded px-1.5 py-1 bg-surface text-fg-muted"><option>All</option><option>Errors</option><option>OK</option></select> <!> <div class="flex items-center text-xs text-fg-subtle flex-shrink-0" title="Only show traces at least this slow"><span class="mr-1">≥</span> <input type="number" placeholder="0" class="w-14 px-1 py-1 rounded border border-line bg-surface text-fg-muted focus:outline-none"/> <span class="ml-1">ms</span></div></div> <div class="trace-list-container flex-1 overflow-auto focus:outline-none" role="listbox" aria-label="Traces" tabindex="0"><!></div> <!></div>`);function qA(e,t){it(t,!0);let n=(e,t=p,n=p,r=p,i=p)=>{let a=M(()=>z(s).key===n());var o=PA(),c=F(o),l=F(c,!0);D(c);var u=L(c,2),d=e=>{var t=la(),n=I(t),r=e=>{np(e,{size:11,class:`flex-shrink-0`})},i=e=>{Xf(e,{size:11,class:`flex-shrink-0`})};W(n,e=>{z(s).dir===`asc`?e(r):e(i,-1)}),H(e,t)};W(u,e=>{z(a)&&e(d)}),D(o),R((e,n)=>{q(o,1,e),J(o,`title`,n),U(l,t())},[()=>K($(`flex items-center gap-1 min-w-0 transition-colors hover:text-fg-muted`,z(a)?`text-fg-muted`:`text-fg-subtle`,r()===`end`&&`justify-end`,i())),()=>`Sort by ${t().toLowerCase()}`]),B(`click`,o,()=>Rl(n())),H(e,o)},r=(e,t=p,n=p,r=p)=>{let i=M(()=>t().status===`ERROR`),a=M(()=>fg(t().service||`unknown`)),o=M(()=>oe.cursor===r());var s=IA(),c=M(()=>_g(()=>Au(t().traceId))),l=F(s),u=F(l);xo(u),D(l);var d=L(l,2),f=F(d,!0);D(d);var m=L(d,2),h=F(m),g=e=>{Ep(e,{size:13,class:`text-danger flex-shrink-0`})};W(h,e=>{z(i)&&e(g)});var v=L(h,2),y=F(v,!0);D(v);var b=L(v,2),x=e=>{H(e,FA())};W(b,e=>{t().partial&&e(x)}),Y_(L(b,2),{get value(){return t().traceId},label:`Copy trace ID`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(m);var S=L(m,2),C=F(S,!0);D(S);var w=L(S,2),T=F(w,!0);D(w);var ee=L(w,2),te=F(ee,!0);D(ee);var ne=L(ee,2),re=F(ne,!0);D(ne),wp(L(ne,2),{size:15,class:`text-fg-subtle justify-self-end`}),D(s),R((e,i,c,l,p)=>{q(s,1,e),J(s,`aria-selected`,z(o)),J(s,`data-row-index`,r()),Co(u,n()),q(d,1,i),oo(d,`background-color: ${z(a).fill??``}; color: ${z(a).stroke??``};`),J(d,`title`,`Filter by ${t().service||`unknown`}`),U(f,t().service||`unknown`),J(v,`title`,t().rootSpan.name),U(y,t().rootSpan.name||`unknown`),U(C,c),U(T,t().spans.length),U(te,l),q(ne,1,p),U(re,t().status)},[()=>K($(`group trace-grid px-4 py-2 border-b border-line-subtle cursor-pointer transition-colors`,`row-virtual`,n()?`bg-accent/10`:z(i)?`bg-danger-bg/40 hover:bg-danger-bg/70`:`hover:bg-hover`,z(o)&&`ring-1 ring-inset ring-accent bg-accent/10`)),()=>K($(`text-[11px] font-medium px-2 py-0.5 rounded truncate text-left transition-shadow`,z(_).has(t().service||`unknown`)&&`ring-1 ring-inset ring-accent`)),()=>nd(t().duration),()=>rd(t().startTime),()=>K($(`text-[10px] font-semibold px-1.5 py-0.5 rounded justify-self-start`,z(i)?`bg-danger-bg text-danger`:t().status===`OK`?`bg-success-bg text-success`:`bg-hover text-fg-muted`))]),B(`click`,s,()=>{oe.cursor=r(),Au(t().traceId)}),B(`keydown`,s,function(...e){z(c)?.apply(this,e)}),B(`click`,u,e=>e.stopPropagation()),B(`change`,u,()=>cu(t().traceId)),B(`click`,d,e=>{e.stopPropagation(),Pl(t().service||`unknown`)}),H(e,s)};function i(e,t,n,r,i){return n===`error`&&e.status!==`ERROR`||n===`ok`&&e.status===`ERROR`||r>0&&e.duration<r||i.size>0&&!i.has(e.service||`unknown`)?!1:F_(t.toLowerCase(),[e.service,e.rootSpan?.name,e.traceId,e.correlationId,...e.spans.map(e=>e.name)])}let a=M(()=>Ul.value),o=M(()=>hl.value),s=M(()=>kl.value),c=M(()=>ou.value),l=M(()=>xl.value),u=M(()=>wl.value),d=M(()=>su.value),f=M(()=>fu.value),m=M(()=>Al.value),h=M(()=>jl.value),g=M(()=>Ml.value),_=M(()=>Nl.value),v=M(()=>{let e=new Map;for(let t of z(a)){let n=t.service||`unknown`;e.set(n,(e.get(n)??0)+1)}return{key:`service`,label:`Service`,options:[...e.entries()].map(([e,t])=>({value:e,count:t})),selected:z(_),onToggle:Pl}}),y=M(()=>z(v).options.length>1),b=N(null),x=N(!1),S=M(()=>z(f)>0);Lr(()=>{if(z(c))return;let e=e=>{if(!(Xc.value||z(x))){if(e.key===`/`&&!gg()){e.preventDefault(),z(b)?.focus();return}e.key===`Escape`&&(z(S)?uu():document.activeElement===z(b)&&(Al.value=``,C.setText(``))),e.key===`a`&&(e.metaKey||e.ctrlKey)&&!gg()&&(e.preventDefault(),lu())}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let C=DA({client:{fetch:globalThis.fetch.bind(globalThis),baseUrl:w}});function w(){let e=ul.value;return(e?Zo(e):null)??globalThis.location.origin}Lr(()=>()=>C.dispose());let T=N(null),ee=N(_r([]));Lr(()=>{let e=w();e!==z(T)&&(P(T,e,!0),uA(`traces`,{fetch:globalThis.fetch.bind(globalThis),baseUrl:e}).then(e=>P(ee,e,!0)),!C.ready.value&&Al.value?C.setText(Al.value):C.refresh())});let te=N(0);Lr(()=>{let e=z(a).length;e>z(te)&&C.arrived(e-z(te)),P(te,e,!0)}),Lr(()=>{C.setSelected(z(c)!=null)});let ne=M(()=>C.results.value),re=M(()=>{let e=C.ready.value&&C.failure.value===null,t=z(o);return e&&(t=z(m).length>0?z(ne):ie(z(ne),z(o))),t.filter(t=>i(t,e?``:z(m),z(h),z(g),z(_)))});function ie(e,t){let n=new Set(e.map(e=>e.traceId));return[...e,...t.filter(e=>!n.has(e.traceId))]}let ae=N(void 0),oe=NA({count:()=>z(re).length,onActivate:e=>{let t=z(re)[e];t&&Au(t.traceId)},scrollToIndex:e=>queueMicrotask(()=>{z(ae)?.querySelector(`[data-row-index="${e}"]`)?.scrollIntoView({block:`nearest`})})});function se(){let e=z(re).filter(e=>z(d).has(e.traceId));e.length>0&&Fy(e)}async function ce(){let e=[...z(d)];if(!(e.length===0||!globalThis.confirm(`Delete ${e.length} stored trace${e.length===1?``:`s`}?`)))try{await fetch(`${w()}/api/traces`,{method:`DELETE`,headers:{"content-type":`application/json`},body:JSON.stringify({traceIds:e})})}catch{}finally{let t=new Set(e);C.removeRows(e=>t.has(e.traceId)),du()}}let le=M(()=>z(m).length>0||z(h)!==`all`||z(g)>0||z(_).size>0),E=M(()=>z(re).length>0&&z(re).every(e=>z(d).has(e.traceId)));var ue=la(),de=I(ue),fe=e=>{tb(e,{get trace(){return z(c)}})},pe=e=>{var t=KA(),i=F(t),o=F(i),s=F(o);Bp(s,{size:16});var c=L(s),p=L(c),m=e=>{var t=LA(),n=F(t);D(t),R(()=>U(n,`(${z(f)??``} selected)`)),H(e,t)};W(p,e=>{z(S)&&e(m)}),D(o);var _=L(o,2),w=F(_),T=e=>{var t=RA(),n=F(t),r=F(n);Wp(r,{size:12});var i=L(r);D(n);var a=L(n,2);Rh(F(a),{size:12}),Ke(),D(a),D(t),R(()=>U(i,` Export (${z(f)??``})`)),B(`click`,n,se),B(`click`,a,ce),H(e,t)};W(w,e=>{z(S)&&e(T)});var te=L(w,2),ne=F(te),ie=e=>{nh(e,{size:12})},ue=e=>{Qm(e,{size:12})};W(ne,e=>{z(l)?e(ie):e(ue,-1)});var de=L(ne);D(te);var fe=L(te,2),pe=e=>{var t=zA();B(`click`,t,function(...e){Tu?.apply(this,e)}),H(e,t)};W(fe,e=>{z(l)&&z(u)>0&&e(pe)});var me=L(fe,2);Wh(F(me),{size:14,class:`text-fg-subtle`}),D(me);var he=L(me,2),ge=e=>{var t=BA();Wp(F(t),{size:14,class:`text-fg-subtle`}),D(t),B(`click`,t,()=>Fy(z(re))),H(e,t)};W(he,e=>{z(re).length>0&&e(ge)});var _e=L(he,2);Op(F(_e),{size:14,class:`text-fg-subtle`}),D(_e),D(_),D(i);var ve=L(i,2),ye=F(ve);Ob(ye,{get value(){return C.text.value},onInput:e=>{C.setText(e),Al.value=e},onSubmit:()=>C.submit(),get serverErrors(){return C.errors.value},get fields(){return z(ee)},class:`flex-1`,get ref(){return z(b)},set ref(e){P(b,e,!0)}});var be=L(ye,2);sA(be,{get selection(){return C.window.value},onChange:e=>C.setWindow(e)});var xe=L(be,2);lA(xe,{get count(){return C.pending},get live(){return C.live},onResume:()=>{Al.value=``,C.resume()}});var Se=L(xe,2),Ce=F(Se);Ce.value=Ce.__value=`all`;var we=L(Ce);we.value=we.__value=`error`;var Te=L(we);Te.value=Te.__value=`ok`,D(Se);var Ee;co(Se);var De=L(Se,2),Oe=e=>{{let t=M(()=>[z(v)]);pb(e,{get facets(){return z(t)},get onClearAll(){return Fl}})}};W(De,e=>{z(y)&&e(Oe)});var ke=L(De,2),Ae=L(F(ke),2);xo(Ae),J(Ae,`min`,0),J(Ae,`step`,50),Ke(2),D(ke),D(ve);var je=L(ve,2),Me=F(je),Ne=e=>{H(e,VA())},Pe=e=>{H(e,HA())},Fe=e=>{H(e,UA())},Ie=e=>{var t=GA(),i=F(t),a=F(i),o=F(a);xo(o),D(a);var s=L(a,2);n(s,()=>`Service`,()=>`service`);var c=L(s,2);n(c,()=>`Operation`,()=>`name`);var l=L(c,2);n(l,()=>`Duration`,()=>`duration`,()=>`end`);var u=L(l,2);n(u,()=>`Spans`,()=>`spans`,()=>`end`,()=>`trace-col-spans`);var f=L(u,2);n(f,()=>`Time`,()=>`time`,()=>void 0,()=>`trace-col-time`);var p=L(f,2);n(p,()=>`Status`,()=>`status`),Ke(2),D(i);var m=L(i,2);G(m,19,()=>z(re),e=>e.traceId,(e,t,n)=>{{let i=M(()=>z(d).has(z(t).traceId));r(e,()=>z(t),()=>z(i),()=>z(n))}});var h=L(m,2),g=e=>{var t=WA(),n=F(t,!0);D(t),Xa(t,(e,t)=>kA?.(e,t),()=>({onReach:()=>C.loadMore(),disabled:C.loading.value})),R(()=>U(n,C.loading.value?`Loading…`:`Scroll for more`)),H(e,t)};W(h,e=>{C.nextCursor.value&&e(g)}),D(t),R(()=>{J(a,`title`,z(E)?`Clear selection`:`Select all`),Co(o,z(E))}),B(`click`,o,e=>e.stopPropagation()),B(`change`,o,()=>z(E)?uu():lu()),H(e,t)};W(Me,e=>{C.loading.value&&!C.ready.value&&z(a).length===0?e(Ne):z(re).length===0&&!z(le)?e(Pe,1):z(re).length===0?e(Fe,2):e(Ie,-1)}),D(je),Vo(je,e=>P(ae,e),()=>z(ae));var Le=L(je,2),Re=e=>{Tg(e,{onclose:()=>P(x,!1),onimport:async e=>{try{let t=By(await Uy(e));return t.success&&t.traces.length>0?(Ru(t.traces),{imported:t.traces.length,errors:[],warnings:t.warnings}):{imported:0,errors:t.errors,warnings:t.warnings}}catch(e){return{imported:0,errors:[String(e)],warnings:[]}}}})};W(Le,e=>{z(x)&&e(Re)}),D(t),R(e=>{U(c,` Traces (${(z(le)?`${z(re).length} of ${z(a).length}`:z(a).length)??``}) `),q(te,1,e),J(te,`title`,z(l)?`Resume live tail`:`Pause live tail`),U(de,` ${z(l)?`Resume${z(u)>0?` (+${z(u)})`:``}`:`Pause`}`),Ee!==(Ee=z(h))&&(Se.value=(Se.__value=z(h))??``,so(Se,z(h))),So(Ae,z(g)||``)},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors`,z(l)?`bg-warning-bg text-warning hover:bg-warning-bg/80`:`hover:bg-hover text-fg-muted`))]),B(`click`,te,function(...e){wu?.apply(this,e)}),B(`click`,me,()=>P(x,!0)),B(`click`,_e,()=>Zc(mg)),B(`change`,Se,e=>jl.value=e.currentTarget.value),B(`input`,Ae,e=>Ml.value=Number(e.currentTarget.value)||0),B(`keydown`,je,function(...e){oe.onKeyDown?.apply(this,e)}),H(e,t)};W(de,e=>{z(c)?e(fe):e(pe,-1)}),H(e,ue),at()}ea([`click`,`keydown`,`change`,`input`]);var JA=(e,t=p,n=p,r=p)=>{let i=M(t);var a=YA(),o=F(a);Ra(o,()=>z(i),(e,t)=>{t(e,{size:12})});var s=L(o,1,!0);D(a),R(()=>{q(a,1,`flex items-center gap-1 px-2 py-1 bg-subtle rounded-md ${r()??``}`),U(s,n())}),H(e,a)},YA=V(`<span><!> </span>`),XA=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-violet-100 text-violet-700 rounded-full"> </span>`),ZA=V(`<div class="flex-1 flex flex-col items-center justify-center text-center gap-4 px-6"><!> <div class="max-w-md"><p class="text-sm font-medium text-fg">Waiting for coding-agent telemetry</p> <p class="text-xs text-fg-muted mt-1.5">Launch Claude Code wired to this receiver and its sessions, tokens,
|
|
2
|
+
\r\f\xA0\v`];function to(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||eo.includes(r[o-1]))&&(s===r.length||eo.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function no(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function ro(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function io(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(ro)),i&&c.push(...Object.keys(i).map(ro));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=ro(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=no(r)),i&&(n+=no(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function q(e,t,n,r,i,a){var o=e[he];if(Ve||o!==n||o===void 0){var s=to(n,r,a);(!Ve||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[he]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function ao(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function oo(e,t,n,r){var i=e[ge];if(Ve||i!==t){var a=io(t,r);(!Ve||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[ge]=t}else r&&(Array.isArray(r)?(ao(e,n?.[0],r[0]),ao(e,n?.[1],r[1],`important`)):ao(e,n,r));return r}function so(e,n,r=!1){if(e.multiple){if(n==null)return;if(!t(n))return ze();for(var i of e.options)i.selected=n.includes(uo(i));return}for(i of e.options)if(yr(uo(i),n)){i.selected=!0;return}(!r||n!==void 0)&&(e.selectedIndex=-1)}function co(e){var t=new MutationObserver(()=>{`__value`in e&&so(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Ir(()=>{t.disconnect()})}function lo(e,t,n=t){var r=new WeakSet,i=!0;Et(e,`change`,t=>{var i=t?`[selected]`:`:checked`,a;if(e.multiple)a=[].map.call(e.querySelectorAll(i),uo);else{var o=e.querySelector(i)??e.querySelector(`option:not([disabled])`);a=o&&uo(o)}n(a),e.__value=a,xn!==null&&r.add(xn)}),Hr(()=>{var a=t();if(e===document.activeElement){var o=xn;if(r.has(o))return}if(so(e,a,i),i&&a===void 0){var s=e.querySelector(`:checked`);s!==null&&(a=uo(s),n(a))}e.__value=a,i=!1}),co(e)}function uo(e){return`__value`in e?e.__value:e.value}var fo=Symbol(`class`),po=Symbol(`style`),mo=Symbol(`is custom element`),ho=Symbol(`is html`),go=be?`link`:`LINK`,_o=be?`input`:`INPUT`,vo=be?`option`:`OPTION`,yo=be?`select`:`SELECT`,bo=be?`progress`:`PROGRESS`;function xo(e){if(Ve){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;J(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;J(e,`checked`,null),e.checked=r}}};e[ve]=n,dt(n),wt()}}function So(e,t){var n=Do(e);n.value!==(n.value=t??void 0)&&(e.value!==t||t===0&&e.nodeName===bo)&&(e.value=t??``)}function Co(e,t){var n=Do(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function wo(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function J(e,t,n,r){var i=Do(e);Ve&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===go)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[pe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ko(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function To(e,t,n,r,i=!1,a=!1){if(Ve&&i&&e.nodeName===_o){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||xo(o)}var s=Do(e),c=s[mo],l=!s[ho];let u=Ve&&c;u&&He(!1);var d=t||{},f=e.nodeName===vo;for(var p in t)p in n||(n[p]=null);n.class?n.class=K(n.class):(r||n[fo])&&(n.class=null),n[po]&&(n.style??(n.style=null));var m=ko(e);if(e.nodeName===_o&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==d.type||h===void 0&&e.hasAttribute(`type`))&&(d.type=h,J(e,`type`,h,a))}for(let i in n){let o=n[i];if(f&&i===`value`&&o==null){e.value=e.__value=``,d[i]=o;continue}if(i===`class`){q(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[fo],n[fo]),d[i]=o,d[fo]=n[fo];continue}if(i===`style`){oo(e,o,t?.[po],n[po]),d[i]=o,d[po]=n[po];continue}var g=d[i];if(!(o===g&&!(o===void 0&&e.hasAttribute(i)))){d[i]=o;var _=i[0]+i[1];if(_!==`$$`){if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=Bi(r);if(Ri(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(o!=null)continue;e.removeEventListener(r,d[n],t),d[n]=null}if(v)B(r,e,o),ea([r]);else if(o!=null){function y(e){d[i].call(this,e)}d[n]=Zi(r,e,y,t)}}else if(i===`style`)J(e,i,o);else if(i===`autofocus`)St(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&f)wo(e,o);else{var b=i;l||(b=Ui(b));var x=b===`defaultValue`||b===`defaultChecked`;if(o==null&&!c&&!x){if(s[i]=null,b===`value`||b===`checked`){let n=e,r=t===void 0;if(b===`value`){let e=n.defaultValue;n.removeAttribute(b),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(b),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i)}else x||m.includes(b)&&(c||typeof o!=`string`)?(e[b]=o,b in s&&(s[b]=Pe)):typeof o!=`function`&&J(e,b,o,a)}}}}return u&&He(!0),d}function Eo(e,t,n=[],r=[],i=[],a,o=!1,s=!1){on(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===yo,l=!1;if(Kr(()=>{var u=t(...n.map(z)),d=To(e,r,u,a,o,s);l&&c&&`value`in u&&so(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||Zr(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&Zr(i[t]),i[t]=qr(()=>Za(e,()=>f))),d[t]=f}r=d}),c){var u=e;Hr(()=>{so(u,r.value,!0),co(u)})}l=!0})}function Do(e){return e[me]??(e[me]={[mo]:e.nodeName.includes(`-`),[ho]:e.namespaceURI===`http://www.w3.org/1999/xhtml`})}var Oo=new Map;function ko(e){var t=e.getAttribute(`is`)||e.nodeName,n=Oo.get(t);if(n)return n;Oo.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=s(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=u(i)}return n}function Ao(e,t,n=t){var r=new WeakSet;Et(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=jo(e)?Mo(a):a,n(a),xn!==null&&r.add(xn),await ji(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(Ve&&e.defaultValue!==e.value||Pi(t)==null&&e.value)&&(n(jo(e)?Mo(e.value):e.value),xn!==null&&r.add(xn)),Wr(()=>{var n=t();if(e===document.activeElement){var i=xn;if(r.has(i))return}jo(e)&&n===Mo(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function jo(e){var t=e.type;return t===`number`||t===`range`}function Mo(e){return e===``?null:+e}var No,Po=new WeakMap,Fo=new WeakMap,Io=new WeakMap,Lo=new WeakSet,Ro=class{constructor(e){kt(this,Lo),O(this,Po,new WeakMap),O(this,Fo,void 0),O(this,Io,void 0),A(Io,this,e)}observe(e,t){var n=j(Po,this).get(e)||new Set;return n.add(t),j(Po,this).set(e,n),k(Lo,this,zo).call(this).observe(e,j(Io,this)),()=>{var n=j(Po,this).get(e);n.delete(t),n.size===0&&(j(Po,this).delete(e),j(Fo,this).unobserve(e))}}};No=Ro;function zo(){return j(Fo,this)??A(Fo,this,new ResizeObserver(e=>{for(var t of e){No.entries.set(t.target,t);for(var n of j(Po,this).get(t.target)||[])n(t)}}))}x(Ro,`entries`,new WeakMap);function Bo(e,t){return e===t||e?.[de]===t}function Vo(e={},t,n,r){var i=Qe.r,a=fi;return Hr(()=>{var o,s;return Wr(()=>{o=s,s=r?.()||[],Pi(()=>{Bo(n(...s),e)||(t(e,...s),o&&Bo(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Bo(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var Ho={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return!e.exclude.has(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Y(e,t,n){return new Proxy({props:e,exclude:t},Ho)}var Uo={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(f(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];f(i)&&(i=i());let a=o(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(f(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=o(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===de||t===fe)return!1;for(let n of e.props)if(f(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(f(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function X(...e){return new Proxy({props:e},Uo)}function Z(e,t,n,r){var i=!0,a=!!(n&8),s=!!(n&16),c=r,l=!0,u=void 0,d=()=>s&&i?(u??(u=un(r)),z(u)):(l&&(l=!1,c=s?Pi(r):r),c);let f;if(a){var p=de in e||fe in e;f=o(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=xt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Oe(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?un:pn)(()=>(v=!1,g()));a&&z(y);var b=fi;return(function(e,t){if(arguments.length>0){let n=t?z(y):i&&a?_r(e):e;return P(y,n),v=!0,c!==void 0&&(c=n),e}return si&&v||b.f&16384?y.v:z(y)})}function Wo(e){Qe===null&&xe(`onMount`),Lr(()=>{let t=Pi(e);if(typeof t==`function`)return t})}if(typeof window<`u`){var Go,Ko;((Go=(Ko=window).__svelte??(Ko.__svelte={})).v??(Go.v=new Set)).add(`5`)}function qo(e){return{...e,endTime:e.endTime??(e.startTime??0)+(e.duration??0)}}function Jo(e){let t=Array.isArray(e.spans)?e.spans.map(qo):[];return{...qo(e),rootSpan:e.rootSpan?qo(e.rootSpan):t[0],spans:t}}var Yo=e=>e.map(Jo),Xo=class{constructor(e){x(this,`url`,void 0),x(this,`ws`,null),x(this,`reconnectTimer`,null),x(this,`messageHandlers`,new Set),x(this,`statusHandlers`,new Set),x(this,`reconnectAttempts`,0),x(this,`closed`,!1),x(this,`reconnectDelay`,1e3),x(this,`maxReconnectDelay`,15e3),this.url=e}connect(){this.closed=!1;try{this.ws=new WebSocket(this.url),this.ws.addEventListener(`open`,()=>{this.reconnectAttempts=0,this.emitStatus(`connected`)}),this.ws.addEventListener(`message`,e=>{try{let t=JSON.parse(e.data),n=Array.isArray(t?.traces)?{...t,traces:Yo(t.traces)}:t;for(let e of this.messageHandlers)e(n)}catch{}}),this.ws.addEventListener(`close`,()=>{this.emitStatus(`disconnected`),this.scheduleReconnect()})}catch{this.emitStatus(`disconnected`),this.scheduleReconnect()}}emitStatus(e){if(!this.closed)for(let t of this.statusHandlers)t(e)}scheduleReconnect(){if(this.closed||this.reconnectTimer)return;this.reconnectAttempts++;let e=Math.min(this.reconnectDelay*2**(this.reconnectAttempts-1),this.maxReconnectDelay);this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}onMessage(e){return this.messageHandlers.add(e),()=>this.messageHandlers.delete(e)}onStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}disconnect(){this.closed=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null),this.messageHandlers.clear(),this.statusHandlers.clear()}isConnected(){return this.ws?.readyState===WebSocket.OPEN}};function Zo(e){try{let t=new URL(e);return t.protocol===`ws:`?`http://${t.host}`:t.protocol===`wss:`?`https://${t.host}`:null}catch{return null}}function Qo(e,t=fetch){return async(n,r)=>{if(n.kind!==`app`)return null;let i=new URL(`/source`,e);i.searchParams.set(`file`,n.file),i.searchParams.set(`line`,String(n.line)),i.searchParams.set(`context`,String(r));try{let e=await t(i.toString());return e.ok?await e.json():null}catch{return null}}}var $o=null;function es(e){$o=e===null?null:Qo(e)}var ts=(e,t)=>$o===null?Promise.resolve(null):$o(e,t),ns=new WeakMap,rs=class{constructor(e){O(this,ns,N(void 0)),P(j(ns,this),e,!0)}get value(){return z(j(ns,this))}set value(e){P(j(ns,this),e,!0)}},is=new WeakMap,as=new WeakMap,os=class{constructor(e){O(this,is,void 0),O(this,as,M(()=>j(is,this).call(this))),A(is,this,e)}get value(){return z(j(as,this))}};function ss(e){return new rs(e)}function cs(e){return new os(e)}function ls(e){return Br(()=>{Lr(e)})}function us(e,...t){for(let n of t){let t=e?.[n];if(typeof t==`string`&&t.length>0)return t}}function Q(e){return typeof e==`string`?e:void 0}function ds(e){if(typeof e==`number`)return e;if(typeof e==`string`&&e!==``){let t=Number(e);return Number.isFinite(t)?t:void 0}}function fs(e){if(typeof e==`boolean`)return e;if(e===`true`)return!0;if(e===`false`)return!1}function ps(e){if(Array.isArray(e)){let t=e.filter(e=>typeof e==`string`);return t.length===e.length?t:void 0}return typeof e==`string`?[e]:void 0}function ms(e,t){let n=e.attributes||{},r=[n[`service.name`],n[`service.peer.name`],n[`peer.service`],n[`http.host`],n[`db.system.name`],n[`db.system`],n[`messaging.system`],n[`rpc.service`],t];for(let e of r){let t=Q(e)?.trim();if(t)return t}return`unknown`}function hs(e,t){return Q(e[`db.system.name`])!==void 0||Q(e[`db.system`])!==void 0?`database`:Q(e[`cache.system`])===void 0?Q(e[`messaging.system`])===void 0?Q(e[`service.peer.name`])!==void 0||Q(e[`peer.service`])!==void 0||Q(e[`net.peer.name`])!==void 0||Q(e[`http.host`])!==void 0?t===e[`service.name`]?`service`:`external`:Q(e[`service.name`])===void 0?`unknown`:`service`:`messaging`:`cache`}function gs(e){if(e.resourceName)return e.resourceName;let t=e.resource||{},n=[t[`service.name`],t[`service.namespace`],t[`host.name`],t[`container.name`]];for(let e of n){let t=Q(e)?.trim();if(t)return t}return`unknown`}function _s(e,t){if(e===0&&t===0)return`unknown`;let n=e===0?1:t/e;return n>=.2?`unhealthy`:n>=.05?`degraded`:`healthy`}function vs(e){let t=new Map,n=(e,n=`unknown`)=>{let r=t.get(e);if(r)return r.type===`unknown`&&n!==`unknown`&&(r.type=n),r;let i={name:e,type:n,health:`unknown`,requestCount:0,errorCount:0,traceCount:0,logCount:0};return t.set(e,i),i};for(let t of e.traces){let e=new Set;for(let r of t.spans){let i=ms(r,t.service),a=n(i,hs(r.attributes,i));a.requestCount+=1,a.lastSeen=Math.max(a.lastSeen??0,r.endTime),r.status.code===`ERROR`&&(a.errorCount+=1),e.has(i)||(a.traceCount+=1,e.add(i))}}for(let t of e.logs){let e=n(gs(t),`service`);e.logCount+=1,e.lastSeen=Math.max(e.lastSeen??0,t.timestamp)}for(let t of e.errors){if(!t.service)continue;let e=n(t.service,`service`);e.errorCount+=t.count,e.lastSeen=Math.max(e.lastSeen??0,t.lastSeen)}return[...t.values()].map(e=>({...e,health:_s(e.requestCount,e.errorCount)})).sort((e,t)=>{let n=(t.lastSeen??0)-(e.lastSeen??0);return n===0?e.name.localeCompare(t.name):n})}var ys=[{id:`all`,label:`All time`,durationMs:null},{id:`5m`,label:`Last 5m`,durationMs:3e5},{id:`15m`,label:`Last 15m`,durationMs:9e5},{id:`30m`,label:`Last 30m`,durationMs:18e5},{id:`1h`,label:`Last 1h`,durationMs:36e5},{id:`3h`,label:`Last 3h`,durationMs:108e5},{id:`6h`,label:`Last 6h`,durationMs:216e5},{id:`24h`,label:`Last 24h`,durationMs:864e5},{id:`7d`,label:`Last 7d`,durationMs:6048e5}],bs={type:`preset`,preset:`all`},xs=new Map(ys.map(e=>[e.id,e]));function Ss(e,t){let n=xs.get(e);return!n||n.durationMs===null?{start:null,end:null}:{start:t-n.durationMs,end:t}}function Cs(e,t){return e.type===`preset`?Ss(e.preset,t):{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function ws(e){return e.start===null||e.end===null}function Ts(e){return e.type===`preset`?xs.get(e.preset)?.label??`All time`:`${Es(e.start)} → ${Es(e.end)}`}function Es(e){let t=new Date(e),n=new Date,r=t.toDateString()===n.toDateString(),i=t.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});return r?i:`${t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${i}`}function Ds(e){return e.type===`preset`?e.preset===bs.preset?null:e.preset:`custom:${e.start}:${e.end}`}function Os(e){if(!e)return bs;if(e.startsWith(`custom:`)){let[,t,n]=e.split(`:`),r=Number(t),i=Number(n);return!Number.isFinite(r)||!Number.isFinite(i)?bs:{type:`custom`,start:r,end:i}}return xs.has(e)?{type:`preset`,preset:e}:bs}function ks(e){if(!ws(e))return{start:e.start,end:e.end}}var As=[`gen_ai.system`,`gen_ai.provider.name`,`gen_ai.operation.name`,`ai.model.provider`];function js(e){let t=e.attributes??{};for(let e of As)if(t[e]!=null)return!0;return!1}function Ms(e){let t=e.toLowerCase();return t===`az.ai.openai`||t===`azure_openai`?`openai`:t===`vertex_ai`||t===`gcp.vertex_ai`||t===`gcp.gemini`?`google`:t}function Ns(e){let t=Object.keys(e).sort((e,t)=>{let n=e.split(`/`)[1]??``;return(t.split(`/`)[1]??``).length-n.length});return(n,r)=>{let i=Ms(n),a=r.toLowerCase();for(let n of t){let[t,r]=n.split(`/`);if(t===i&&a.startsWith(r))return e[n]}}}var Ps=Ns({"openai/gpt-4o":{inputPerMTok:2.5,outputPerMTok:10},"openai/gpt-4o-mini":{inputPerMTok:.15,outputPerMTok:.6},"openai/gpt-4-turbo":{inputPerMTok:10,outputPerMTok:30},"openai/gpt-3.5-turbo":{inputPerMTok:.5,outputPerMTok:1.5},"anthropic/claude-opus-4":{inputPerMTok:15,outputPerMTok:75},"anthropic/claude-sonnet-4":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-3-5-sonnet":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-3-5-haiku":{inputPerMTok:.8,outputPerMTok:4},"anthropic/claude-3-opus":{inputPerMTok:15,outputPerMTok:75},"anthropic/claude-3-haiku":{inputPerMTok:.25,outputPerMTok:1.25},"google/gemini-2.5-flash":{inputPerMTok:.3,outputPerMTok:2.5},"google/gemini-2.0-flash":{inputPerMTok:.1,outputPerMTok:.4},"google/gemini-1.5-pro":{inputPerMTok:1.25,outputPerMTok:5},"google/gemini-1.5-flash":{inputPerMTok:.075,outputPerMTok:.3},"mistral/mistral-large":{inputPerMTok:2,outputPerMTok:6},"mistral/mistral-small":{inputPerMTok:.2,outputPerMTok:.6},"groq/llama-3.1-70b":{inputPerMTok:.59,outputPerMTok:.79},"deepseek/deepseek-chat":{inputPerMTok:.27,outputPerMTok:1.1}});function Fs(e){let t=Ps(e.provider,e.model);if(!t)return{currency:`USD`,input:0,output:0,cacheRead:0,cacheWrite:0,total:0,source:`unknown`};let n=t.cacheReadPerMTok??t.inputPerMTok*.1,r=t.cacheWritePerMTok??t.inputPerMTok*1.25,i=(e.cacheReadInputTokens??0)/1e6*n,a=(e.cacheCreationInputTokens??0)/1e6*r,o=Math.max(0,(e.inputTokens??0)-(e.cacheReadInputTokens??0)-(e.cacheCreationInputTokens??0))/1e6*t.inputPerMTok,s=(e.outputTokens??0)/1e6*t.outputPerMTok;return{currency:`USD`,input:o,output:s,cacheRead:i,cacheWrite:a,total:o+s+i+a,source:`table`}}function Is(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function Ls(e,t){let n=e[t];return typeof n==`string`?n:void 0}function Rs(e,t){let n=e[t];return typeof n==`number`?n:void 0}function zs(e,t){return Is(e[t])}function Bs(e,t){let n=e[t];return Array.isArray(n)?n:[]}function Vs(e,t){return Array.isArray(e[t])}function Hs(e,t,n,r){return r.filter(t=>n(e,t)===void 0).map(e=>`${t}: Missing or invalid ${e}`)}function Us(e){if(e!=null){if(typeof e==`object`)return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return}}}function Ws(e){if(Array.isArray(e.parts))return e.parts.map(e=>{let t=e.type??`text`;return t===`text`?{kind:`text`,text:String(e.content??``)}:t===`image`?{kind:`image`,mediaType:`image/*`,dataRef:String(e.content??``)}:t===`audio`?{kind:`audio`,mediaType:`audio/*`,dataRef:String(e.content??``)}:{kind:`json`,value:e.content}});if(Array.isArray(e.content))return e.content.map(e=>e.type===`text`||e.text!==void 0?{kind:`text`,text:String(e.text??``)}:e.type===`image`?{kind:`image`,mediaType:e.mimeType??`image/*`,dataRef:String(e.image??e.data??``)}:e.type===`audio`?{kind:`audio`,mediaType:e.mimeType??`audio/*`,dataRef:String(e.data??``)}:{kind:`json`,value:e});let t=Q(e.content);return t===void 0?e.content==null?[]:[{kind:`json`,value:e.content}]:[{kind:`text`,text:t}]}function Gs(e){let t=Is(e);return t&&`value`in t?t.value:e}function Ks(e){return e.type===`tool-call`?{kind:`call`,call:{id:e.toolCallId,name:e.toolName??``,arguments:Us(e.input)??e.input??{}}}:e.type===`tool-result`?{kind:`result`,result:{id:e.toolCallId,value:Gs(e.output)}}:e.type===`text`||e.text!==void 0?{kind:`text`,text:String(e.text??``)}:null}function qs(e){return e.type===`tool_call`?{kind:`call`,call:{id:e.id,name:e.name??``,arguments:Us(e.arguments)??e.arguments??{}}}:e.type===`tool_call_response`?{kind:`result`,result:{id:e.id,value:Gs(e.response)}}:e.type===`text`||e.type==null?{kind:`text`,text:String(e.content??``)}:null}function Js(e,t,n){let r=[],i=[],a=[];for(let e of t)e.kind===`call`?r.push(e.call):e.kind===`result`?a.push(e.result):i.push({kind:`text`,text:e.text});if(a.length>1){let t={role:e,parts:[]};return t._toolResults=a,t}let o={role:e,parts:i};return r.length>0&&(o.toolCalls=r),a.length===1&&(o.toolCallId=a[0].id,o.parts=[{kind:`json`,value:a[0].value}]),n&&(o.finishReason=n),o}function Ys(e){let t=e.role??`user`;if(Array.isArray(e.content)){let n=e.content;if(n.some(e=>e.type===`tool-call`||e.type===`tool-result`))return Js(t,n.map(Ks).filter(e=>e!==null),e.finish_reason)}if(Array.isArray(e.parts)){let n=e.parts;if(n.some(e=>e.type===`tool_call`||e.type===`tool_call_response`))return Js(t,n.map(qs).filter(e=>e!==null),e.finish_reason)}let n={role:t,parts:Ws(e)};return Array.isArray(e.tool_calls)&&e.tool_calls.length>0&&(n.toolCalls=e.tool_calls.map(e=>({id:e.id,name:e.function?.name??``,arguments:Us(e.function?.arguments)??e.function?.arguments??{},type:e.type}))),e.tool_call_id&&(n.toolCallId=e.tool_call_id),e.finish_reason&&(n.finishReason=e.finish_reason),n}function Xs(e,t){let n=Us(e[t]);if(Array.isArray(n))return n.map(Ys)}function Zs(e){if(!e||e.length===0)return[];let t=[];for(let n of e){let e=n.attributes??{};if(n.name===`gen_ai.choice`){let n=e.message,r=Us(e.message)??n,i=Q(e.finish_reason);if(r){let e=Ys(r);i&&(e.finishReason=i),t.push(e)}continue}let r=n.name.match(/^gen_ai\.(system|user|assistant|tool)\.message$/);if(!r)continue;let i=r[1],a=e.content,o=Q(a),s=o===void 0?a:Us(o)??o;t.push(Ys({role:i,content:s,tool_calls:Us(e.tool_calls),tool_call_id:Q(e.id)??Q(e.tool_call_id)}))}return t}function Qs(e){let t=Us(e[`gen_ai.tool.definitions`]??e[`gen_ai.orchestrator.agent.definitions`]);if(Array.isArray(t))return t.filter(e=>Q(e.name)!==void 0).map(e=>({name:e.name,description:e.description,type:e.type,schema:e.schema??e.parameters}))}function $s(e){return{inputTokens:ds(e[`gen_ai.usage.input_tokens`])??ds(e[`gen_ai.usage.prompt_tokens`])??ds(e[`llm.usage.prompt_tokens`])??ds(e[`ai.usage.inputTokens`]),outputTokens:ds(e[`gen_ai.usage.output_tokens`])??ds(e[`gen_ai.usage.completion_tokens`])??ds(e[`llm.usage.completion_tokens`])??ds(e[`ai.usage.outputTokens`]),reasoningOutputTokens:ds(e[`gen_ai.usage.reasoning.output_tokens`]),cacheReadInputTokens:ds(e[`gen_ai.usage.cache_read.input_tokens`]),cacheCreationInputTokens:ds(e[`gen_ai.usage.cache_creation.input_tokens`])}}function ec(e){let t=ds(e[`gen_ai.response.time_to_first_chunk`]),n=ds(e[`gen_ai.response.time_to_finish`]),r=ds(e[`gen_ai.response.output_tokens_per_second`]),i=ds(e[`gen_ai.response.time_per_output_chunk`]);if(t!==void 0||n!==void 0||r!==void 0||i!==void 0)return{timeToFirstChunkS:t,timeToFinishS:n,outputTokensPerSecond:r,timePerOutputChunkS:i}}function tc(e){let t=ds(e[`gen_ai.session.cost.usd`]),n=ds(e[`gen_ai.session.input_tokens`]),r=ds(e[`gen_ai.session.output_tokens`]),i=ds(e[`gen_ai.session.step.count`]),a=ds(e[`gen_ai.session.tool_call.count`]),o=ds(e[`gen_ai.session.error.count`]);if(t!==void 0||n!==void 0||r!==void 0||i!==void 0||a!==void 0||o!==void 0)return{costUsd:t,inputTokens:n,outputTokens:r,stepCount:i,toolCallCount:a,errorCount:o}}function nc(e,t){let n=Q(e[`gen_ai.guard.rule`]);if(n)return{rule:n,action:Q(e[`gen_ai.guard.action`])??t,message:Q(e[`gen_ai.guard.message`]),observed:ds(e[`gen_ai.guard.observed`]),limit:ds(e[`gen_ai.guard.limit`])}}function rc(e,t){let n=fs(e[`gen_ai.guard.stopped`]),r=[],i=nc(e),a=e=>{e&&(!i||e.action===`stop`)&&(i=e)};for(let e of t??[]){let t=e.attributes??{};if(e.name===`gen_ai.guard.stop`)a(nc(t,`stop`));else if(e.name===`gen_ai.guard.warning`)a(nc(t,`warn`));else if(e.name===`gen_ai.client.warnings`){let e=Us(t[`gen_ai.warnings`]);Array.isArray(e)&&r.push(...e)}}return(n!==void 0||i)&&(i={...i,stopped:n??i?.action===`stop`}),{guard:i,warnings:r.length>0?r:void 0}}function ic(e){let t=e.toLowerCase();return t===`az.ai.openai`||t===`azure_openai`?`openai`:t===`gcp.vertex_ai`||t===`vertex_ai`||t===`gcp.gemini`||t===`google-gla`||t===`google_genai`||t===`gemini`?`google`:t}var ac=new Set(`gen_ai.system,gen_ai.provider.name,gen_ai.operation.name,gen_ai.request.model,gen_ai.response.model,gen_ai.response.id,gen_ai.response.finish_reasons,gen_ai.request.temperature,gen_ai.request.top_p,gen_ai.request.top_k,gen_ai.request.max_tokens,gen_ai.request.stop_sequences,gen_ai.request.seed,gen_ai.request.frequency_penalty,gen_ai.request.presence_penalty,gen_ai.request.choice.count,gen_ai.usage.input_tokens,gen_ai.usage.output_tokens,gen_ai.usage.prompt_tokens,gen_ai.usage.completion_tokens,gen_ai.usage.reasoning.output_tokens,gen_ai.usage.cache_read.input_tokens,gen_ai.usage.cache_creation.input_tokens,gen_ai.usage.cost.usd,gen_ai.response.time_to_first_chunk,gen_ai.response.time_to_finish,gen_ai.response.output_tokens_per_second,gen_ai.response.time_per_output_chunk,gen_ai.guard.stopped,gen_ai.guard.rule,gen_ai.guard.action,gen_ai.guard.message,gen_ai.guard.observed,gen_ai.guard.limit,gen_ai.session.cost.usd,gen_ai.session.input_tokens,gen_ai.session.output_tokens,gen_ai.session.step.count,gen_ai.session.tool_call.count,gen_ai.session.error.count,gen_ai.input.messages,gen_ai.output.messages,gen_ai.input.messages.ref,gen_ai.output.messages.ref,gen_ai.system_instructions,gen_ai.tool.definitions,gen_ai.orchestrator.agent.definitions,gen_ai.agent.id,gen_ai.agent.name,gen_ai.agent.description,gen_ai.tool.name,gen_ai.tool.call.id,gen_ai.handoff.from_agent,gen_ai.handoff.to_agent,gen_ai.guardrail.name,gen_ai.guardrail.triggered,gen_ai.conversation.id,gen_ai.evaluation.name,gen_ai.evaluation.score.value,gen_ai.evaluation.score.label,gen_ai.evaluation.explanation,gen_ai.audio.input.format,gen_ai.audio.output.format,gen_ai.speech.voice,gen_ai.speech.input_text,gen_ai.transcription.text,gen_ai.embeddings.dimension.count,gen_ai.openai.request.service_tier,gen_ai.openai.response.service_tier,gen_ai.openai.response.system_fingerprint,gen_ai.openai.request.response_format,openai.request.service_tier,openai.response.service_tier,openai.response.system_fingerprint,openai.request.response_format`.split(`,`));function oc(e){let t=e.attributes??{},n=ic(Q(t[`gen_ai.provider.name`])??Q(t[`gen_ai.system`])??Q(t[`ai.model.provider`])??`unknown`),r=Q(t[`gen_ai.operation.name`])??`chat`,i=Q(t[`gen_ai.request.model`])??Q(t[`llm.request.model`])??Q(t.model_name)??Q(t[`ai.model.id`])??`unknown`,a=Q(t[`gen_ai.response.model`])??Q(t[`llm.response.model`])??Q(t[`ai.response.model`]),o=Xs(t,`gen_ai.input.messages`)??[],s=Xs(t,`gen_ai.output.messages`)??[],c=[],l=Us(t[`gen_ai.system_instructions`]);if(Array.isArray(l)&&l.length>0){let e=Is(l[0]);c=e&&`role`in e?l.map(e=>Ys(e)):[{role:`system`,parts:l.map(e=>e.type===`text`||e.content!==void 0?{kind:`text`,text:String(e.content??``)}:{kind:`json`,value:e})}]}let u=o.length||s.length||c.length?[...c,...o,...s]:Zs(e.events),d=Q(t[`gen_ai.input.messages.ref`]),f=Q(t[`gen_ai.output.messages.ref`]),p=u.some(e=>e.role===`system`||e.role===`user`),m=u.some(e=>e.role===`assistant`);if(d&&!p&&u.push({role:`user`,parts:[{kind:`ref`,ref:d,direction:`input`}]}),f&&!m&&u.push({role:`assistant`,parts:[{kind:`ref`,ref:f,direction:`output`}]}),u.length===0){let e=Us(t[`ai.prompt.messages`]);if(Array.isArray(e))u.push(...e.map(Ys));else{let e=Us(t[`ai.prompt`]);e&&(Array.isArray(e.messages)?u.push(...e.messages.map(Ys)):(e.system&&u.push({role:`system`,parts:[{kind:`text`,text:e.system}]}),e.prompt&&u.push({role:`user`,parts:[{kind:`text`,text:e.prompt}]})))}let n=Us(t[`ai.response.toolCalls`]),r=Array.isArray(n)?n.filter(e=>Q(e.toolName)!==void 0).map(e=>({id:e.toolCallId,name:e.toolName,arguments:Us(e.input??e.args)??e.input??e.args??{}})):void 0,i=Q(t[`ai.response.text`]);if(i||r&&r.length>0){let e=ps(t[`gen_ai.response.finish_reasons`])?.[0]??Q(t[`ai.response.finishReason`]),n=Ys({role:`assistant`,content:i??``});e&&(n.finishReason=e),r&&r.length>0&&(n.toolCalls=r),u.push(n)}}if(u.length===0){let e=Us(t[`pydantic_ai.all_messages`]);Array.isArray(e)&&u.push(...e.map(Ys))}if(u.length===0){let e=[];for(let n=0;n<32;n++){let r=Q(t[`gen_ai.prompt.${n}.role`])??Q(t[`llm.prompts.${n}.role`]),i=t[`gen_ai.prompt.${n}.content`]??t[`llm.prompts.${n}.content`];if(!r)break;e.push(Ys({role:r,content:i}))}for(let n=0;n<32;n++){let r=Q(t[`gen_ai.completion.${n}.role`])??Q(t[`llm.completions.${n}.role`]),i=t[`gen_ai.completion.${n}.content`]??t[`llm.completions.${n}.content`],a=Q(t[`gen_ai.completion.${n}.finish_reason`]);if(!r)break;let o=Ys({role:r,content:i});a&&(o.finishReason=a),e.push(o)}e.length>0&&(u=e)}u=u.flatMap(e=>{let t=e._toolResults;return t?t.map(e=>({role:`tool`,parts:[{kind:`json`,value:e.value}],toolCallId:e.id})):[e]});let h=[];for(let e of u)e.toolCalls&&h.push(...e.toolCalls);if(h.length>0){let e=new Map;for(let t of h)t.id&&e.set(t.id,t);for(let t of u){if(t.role!==`tool`||!t.toolCallId)continue;let n=e.get(t.toolCallId);if(!n||n.result!==void 0)continue;let r=t.parts.find(e=>e.kind===`text`),i=t.parts.find(e=>e.kind===`json`);r&&r.kind===`text`?n.result=Us(r.text)??r.text:i&&i.kind===`json`&&(n.result=i.value)}}let g=$s(t),_=Fs({provider:n,model:a??i,inputTokens:g.inputTokens,outputTokens:g.outputTokens,cacheReadInputTokens:g.cacheReadInputTokens,cacheCreationInputTokens:g.cacheCreationInputTokens}),v=ds(t[`gen_ai.usage.cost.usd`]),y=v===void 0?_:{currency:`USD`,input:_?.input??0,output:_?.output??0,cacheRead:_?.cacheRead??0,cacheWrite:_?.cacheWrite??0,total:v,source:`reported`},b=ec(t),x=tc(t),{guard:S,warnings:C}=rc(t,e.events),w=ps(t[`gen_ai.response.finish_reasons`]),T=Q(t[`gen_ai.agent.name`]),ee=Q(t[`gen_ai.agent.id`]),te=Q(t[`gen_ai.agent.description`]),ne=Q(t[`gen_ai.tool.name`]),re=Q(t[`gen_ai.tool.call.id`]),ie=Q(t[`gen_ai.handoff.from_agent`]),ae=Q(t[`gen_ai.handoff.to_agent`]),oe=Q(t[`gen_ai.guardrail.name`]),se=fs(t[`gen_ai.guardrail.triggered`]),ce=Q(t[`gen_ai.evaluation.name`]),le=ds(t[`gen_ai.evaluation.score.value`]),E=Q(t[`gen_ai.evaluation.score.label`]),ue=Q(t[`gen_ai.evaluation.explanation`]),de=Q(t[`gen_ai.audio.input.format`]),fe=Q(t[`gen_ai.audio.output.format`]),pe=Q(t[`gen_ai.speech.voice`]),me=Q(t[`gen_ai.speech.input_text`]),he=Q(t[`gen_ai.transcription.text`]),ge=ds(t[`gen_ai.embeddings.dimension.count`]),_e=Q(t[`agent.consent.outcome`]),ve=Q(t[`policy.decision`]),ye=Q(t[`mcp.security.injection.verdict`]),be=Q(t[`agent.action.risk_class`]),xe=Q(t[`agent.input.provenance`]),Se=ds(t[`agent.plan.step_index`]),Ce=Q(t[`security.event`]),we=fs(t[`gen_ai.guard.stopped`]),Te=_e||ve||ye||be||xe||Se!==void 0||Ce||we!==void 0||S?.stopped?{..._e&&{consentOutcome:_e},...ve&&{policyDecision:ve},...ye&&{injectionVerdict:ye},...be&&{actionRiskClass:be},...xe&&{inputProvenance:xe},...Se!==void 0&&{planStepIndex:Se},...Ce&&{securityEvent:Ce},guardStopped:S?.stopped??we}:void 0,Ee={};for(let[e,n]of Object.entries(t))ac.has(e)||e.startsWith(`gen_ai.prompt.`)||e.startsWith(`gen_ai.completion.`)||e.startsWith(`llm.prompts.`)||e.startsWith(`llm.completions.`)||(Ee[e]=n);return{traceId:e.traceId,spanId:e.spanId,parentSpanId:e.parentSpanId,name:e.name,startMs:e.startTime,endMs:e.endTime,status:e.status?.code===`OK`?`ok`:e.status?.code===`ERROR`?`error`:`unset`,errorMessage:e.status?.message,provider:n,operation:r,requestModel:i,responseModel:a,params:{temperature:ds(t[`gen_ai.request.temperature`]),topP:ds(t[`gen_ai.request.top_p`]),topK:ds(t[`gen_ai.request.top_k`]),maxTokens:ds(t[`gen_ai.request.max_tokens`]),stopSequences:ps(t[`gen_ai.request.stop_sequences`]),seed:ds(t[`gen_ai.request.seed`]),frequencyPenalty:ds(t[`gen_ai.request.frequency_penalty`]),presencePenalty:ds(t[`gen_ai.request.presence_penalty`]),choiceCount:ds(t[`gen_ai.request.choice.count`])},messages:u,toolDefinitions:Qs(t),toolCalls:h,usage:g,cost:y,streaming:b,guard:S,session:x,warnings:C,finishReasons:w,responseId:Q(t[`gen_ai.response.id`]),agent:ee||T||te?{id:ee,name:T,description:te}:void 0,tool:ne||re?{name:ne,callId:re}:void 0,handoff:ie||ae?{fromAgent:ie,toAgent:ae}:void 0,guardrail:oe||se!==void 0?{name:oe,triggered:se}:void 0,conversationId:Q(t[`gen_ai.conversation.id`]),agentSecurity:Te,evaluation:ce||le!==void 0||E||ue?{name:ce,scoreValue:le,scoreLabel:E,explanation:ue}:void 0,modality:de||fe||pe||me||he||ge?{audioInputFormat:de,audioOutputFormat:fe,speechVoice:pe,speechInputText:me,transcriptionText:he,embeddingDimensions:ge}:void 0,extras:{openaiServiceTier:Q(t[`gen_ai.openai.request.service_tier`])||Q(t[`gen_ai.openai.response.service_tier`])||Q(t[`openai.request.service_tier`])||Q(t[`openai.response.service_tier`])?{request:Q(t[`gen_ai.openai.request.service_tier`])??Q(t[`openai.request.service_tier`]),response:Q(t[`gen_ai.openai.response.service_tier`])??Q(t[`openai.response.service_tier`])}:void 0,openaiSystemFingerprint:Q(t[`gen_ai.openai.response.system_fingerprint`])??Q(t[`openai.response.system_fingerprint`]),openaiResponseFormat:Q(t[`gen_ai.openai.request.response_format`])??Q(t[`openai.request.response_format`]),raw:Ee}}}function sc(e){let t=new Map;for(let n of e){let e=n.attributes??{},r=e[`ai.toolCall.id`];if(typeof r!=`string`)continue;let i=e[`ai.toolCall.result`];if(i!=null){if(typeof i==`string`)try{t.set(r,JSON.parse(i))}catch{t.set(r,i)}else t.set(r,i)}}return t}function cc(e,t){if(t.size!==0){for(let n of e.toolCalls){if(n.result!==void 0||!n.id)continue;let e=t.get(n.id);e!==void 0&&(n.result=e)}for(let n of e.messages)if(n.toolCalls)for(let e of n.toolCalls){if(e.result!==void 0||!e.id)continue;let n=t.get(e.id);n!==void 0&&(e.result=n)}}}function lc(e,...t){for(let n of t){let t=e[n];if(t==null||t instanceof Object)continue;let r=String(t);if(r.length>0)return r}}function uc(e,...t){for(let n of t){let t=e[n];if(t==null||t instanceof Object||t===!0||t===!1)continue;let r=Number(t);if(Number.isFinite(r)&&String(t).trim()!==``)return r}}function dc(e,...t){for(let n of t){let t=e[n];if(t===!0||t===`true`)return!0;if(t===!1||t===`false`)return!1}}var fc=[[`claude-opus-4`,15,75],[`claude-sonnet-4`,3,15],[`claude-haiku-4`,.8,4],[`claude-3-5-sonnet`,3,15],[`claude-3-5-haiku`,.8,4],[`claude-3-opus`,15,75],[`claude-3-haiku`,.25,1.25],[`opus`,15,75],[`sonnet`,3,15],[`haiku`,.8,4]];function pc(e,t,n){if(!e)return;let r=e.toLowerCase(),i=fc.find(([e])=>r.includes(e));if(!i)return;let[,a,o]=i;return(t??0)/1e6*a+(n??0)/1e6*o}function mc(...e){return Object.assign({},...e)}function hc(e){return{user:lc(e,`user.id`,`user.account_uuid`,`user.email`),organization:lc(e,`organization.id`),terminal:lc(e,`terminal.type`),appVersion:lc(e,`app.version`),model:lc(e,`model`)}}var gc=`mcp__`;function _c(e){if(!e.startsWith(gc))return{name:e,isMcp:!1};let t=e.slice(5),n=t.indexOf(`__`);if(n===-1)return{name:e,isMcp:!0,mcpServer:t||void 0};let r=t.slice(0,n),i=t.slice(n+2);return{name:e,isMcp:!0,mcpServer:r||void 0,mcpTool:i||void 0}}function vc(e){return e.startsWith(gc)}var yc=[`file`,`shell`,`search`,`web`,`todo`,`subagent`,`skill`,`mcp`,`other`],bc=new Map([[`read`,`file`],[`edit`,`file`],[`write`,`file`],[`multiedit`,`file`],[`notebookedit`,`file`],[`bash`,`shell`],[`bashoutput`,`shell`],[`killshell`,`shell`],[`killbash`,`shell`],[`grep`,`search`],[`glob`,`search`],[`ls`,`search`],[`webfetch`,`web`],[`websearch`,`web`],[`todowrite`,`todo`],[`task`,`subagent`],[`agent`,`subagent`],[`skill`,`skill`]]);function xc(e){return vc(e)?`mcp`:bc.get(e.toLowerCase())??`other`}function Sc(e){return lc(e,`subagent_type`,`agent_type`,`subagent.type`)}function Cc(e){return lc(e,`skill`,`skill_name`,`skill.name`)}var wc=new Map([[`user_prompt`,`user_prompt`],[`api_request`,`api_request`],[`api_error`,`api_error`],[`api_refusal`,`api_refusal`],[`tool_result`,`tool_result`],[`tool_decision`,`tool_decision`],[`mcp_server_connection`,`mcp_connection`],[`plugin_loaded`,`plugin_loaded`],[`hook_execution_complete`,`hook_execution`]]),Tc=[...wc.keys()];function Ec(e,t){let n=xc(e),r={..._c(e),category:n};if(n===`subagent`){let e=Sc(t);e&&(r.subAgentType=e)}else if(n===`skill`){let e=Cc(t);e&&(r.skillName=e)}return r}var Dc=new Map([[`lines_of_code.count`,`lines_of_code`],[`commit.count`,`commit`],[`pull_request.count`,`pull_request`],[`active_time.total`,`active_time`]]);function Oc(e){let{kind:t,prefix:n,scopeHint:r,serviceHint:i}=e,a=e=>e!==void 0&&e.includes(r),o=e=>{let t=lc(e,`service.name`);return t!==void 0&&t.includes(i)},s=e=>e.startsWith(n)?e.slice(n.length):e;return{kind:t,matchesMetric(e){return e.name.startsWith(n)||a(e.scope?.name)||o(e.resource)},matchesEvent(e){return e.eventName.startsWith(n)||a(e.scope?.name)||o(e.resource)},normalizeEvent(e){let n=mc(e.resource,e.attributes),r=s(e.eventName)||lc(n,`event.name`)||e.eventName,i=wc.get(r)??`other`,a=lc(n,`session.id`);if(!a)return null;let o={id:`${a}:0`,sessionId:a,agent:t,type:i,rawEventName:r,timestamp:e.timestamp,model:lc(n,`model`),promptId:lc(n,`prompt.id`),attributes:e.attributes};switch((i===`api_request`||i===`api_error`||i===`api_refusal`)&&(o.effort=lc(n,`effort`),o.speed=lc(n,`speed`),o.agentName=lc(n,`agent.name`),o.skillName=lc(n,`skill.name`)),i){case`api_request`:{o.inputTokens=uc(n,`input_tokens`),o.outputTokens=uc(n,`output_tokens`),o.cacheReadTokens=uc(n,`cache_read_tokens`),o.contextLineageId=lc(n,`query_source`),o.tokenSource=lc(n,`token_source`)===`estimated`?`estimated`:void 0,o.cacheCreationTokens=uc(n,`cache_creation_tokens`),o.durationMs=uc(n,`duration_ms`);let e=uc(n,`cost_usd`,`cost`);if(e===void 0){let e=pc(o.model,o.inputTokens,o.outputTokens);e!==void 0&&(o.costUsd=e,o.costSource=`estimated`)}else o.costUsd=e,o.costSource=`reported`;break}case`api_refusal`:o.durationMs=uc(n,`duration_ms`);break;case`api_error`:o.errorMessage=lc(n,`error`,`error.message`,`message`),o.statusCode=uc(n,`status_code`,`http.response.status_code`,`http.status_code`),o.durationMs=uc(n,`duration_ms`);break;case`tool_result`:{let e=lc(n,`tool_name`,`name`,`tool`);e&&(o.tool=Ec(e,n)),o.success=dc(n,`success`),o.durationMs=uc(n,`duration_ms`);let t=lc(n,`decision`);(t===`accept`||t===`reject`)&&(o.decision=t);break}case`tool_decision`:{let e=lc(n,`tool_name`,`name`,`tool`);e&&(o.tool=Ec(e,n));let t=lc(n,`decision`);(t===`accept`||t===`reject`)&&(o.decision=t);break}case`user_prompt`:{o.promptLength=uc(n,`prompt_length`,`prompt.length`);let e=lc(n,`prompt`);e&&(o.promptText=e);break}case`mcp_connection`:o.mcpServerName=lc(n,`server_name`,`name`),o.mcpTransport=lc(n,`transport_type`,`transport`),o.mcpStatus=lc(n,`status`),o.durationMs=uc(n,`duration_ms`);break;case`plugin_loaded`:o.pluginName=lc(n,`plugin.name`,`plugin_name`,`name`),o.pluginVersion=lc(n,`plugin.version`,`plugin_version`);break;case`hook_execution`:o.hookName=lc(n,`hook_event`,`hook_name`,`name`),o.hookSuccess=uc(n,`num_success`),o.hookBlocked=uc(n,`num_blocking`),o.hookErrored=uc(n,`num_non_blocking_error`),o.hookCancelled=uc(n,`num_cancelled`)}return o},normalizeMetric(e){let n=Dc.get(s(e.name))??`other`;return e.dataPoints.map(r=>{let i=mc(e.resource,r.attributes);return{agent:t,sessionId:lc(i,`session.id`),identity:hc(i),kind:n,value:r.value,temporality:e.temporality,timestamp:r.timestamp,attributes:r.attributes}})}}}Oc({kind:`claude-code`,prefix:`claude_code.`,scopeHint:`claude_code`,serviceHint:`claude-code`});var kc={handled:Tc,ignored:[`api_request_body`,`api_response_body`,`assistant_response`,`hook_registered`,`hook_execution_start`,`permission_mode_changed`,`auth`]};[...kc.handled,...kc.ignored],Oc({kind:`opencode`,prefix:`opencode.`,scopeHint:`opencode`,serviceHint:`opencode`});function Ac(){return Object.fromEntries(yc.map(e=>[e,0]))}function jc(){return Object.create(null)}function Mc(){return{requests:0,costUsd:0,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0}}function Nc(e,t){for(let[n,r]of Object.entries(t)){let t=e[n]??(e[n]=Mc());t.requests+=r.requests,t.costUsd+=r.costUsd,t.inputTokens+=r.inputTokens,t.outputTokens+=r.outputTokens,t.cacheReadTokens+=r.cacheReadTokens,t.cacheCreationTokens+=r.cacheCreationTokens}}function Pc(e){let t={sessions:0,costUsd:0,inputTokens:0,outputTokens:0,apiRequests:0,apiErrors:0,accepted:0,rejected:0,byModel:jc(),byEffort:jc(),bySkill:jc(),byAgent:jc(),tools:jc(),toolCategories:Ac(),mcpServers:jc(),subAgents:jc(),skills:jc(),mcpConnections:jc(),plugins:jc(),hooks:{runs:0,blocked:0,errored:0,cancelled:0}};for(let n of e){t.sessions+=1;let{rollup:e}=n;t.costUsd+=e.costUsd,t.inputTokens+=e.inputTokens,t.outputTokens+=e.outputTokens,t.apiRequests+=e.apiRequests,t.apiErrors+=e.apiErrors,t.accepted+=e.accepted,t.rejected+=e.rejected,Nc(t.byModel,e.byModel),Nc(t.byEffort,e.byEffort),Nc(t.bySkill,e.bySkill),Nc(t.byAgent,e.byAgent);for(let n of Object.values(e.tools))t.tools[n.name]=(t.tools[n.name]??0)+n.count,n.isMcp&&n.mcpServer&&(t.mcpServers[n.mcpServer]=(t.mcpServers[n.mcpServer]??0)+n.count);for(let n of yc)t.toolCategories[n]+=e.toolCategories[n];for(let[n,r]of Object.entries(e.subAgents))t.subAgents[n]=(t.subAgents[n]??0)+r;for(let[n,r]of Object.entries(e.skills))t.skills[n]=(t.skills[n]??0)+r;for(let n of Object.values(e.mcpConnections)){let e=t.mcpConnections[n.name]??{name:n.name,transport:n.transport,connected:!1,connects:0,disconnects:0};e.connects+=n.connects,e.disconnects+=n.disconnects,e.connected=e.connected||n.connected,n.transport&&(e.transport=n.transport),t.mcpConnections[n.name]=e}for(let n of Object.values(e.plugins))t.plugins[n.name]=n;t.hooks.runs+=e.hooks.runs,t.hooks.blocked+=e.hooks.blocked,t.hooks.errored+=e.hooks.errored,t.hooks.cancelled+=e.hooks.cancelled}return t}var Fc=ss(!1),Ic=ss({x:20,y:20}),Lc=ss(`bottom-right`),Rc=ss(`bottom`),zc=ss(!1),Bc=ss(`traces`),Vc=ss(null),Hc=ss(null),Uc=ss(null);function Wc(e,t){Uc.value={traceId:e,spanId:t}}var Gc=ss(`system`);function Kc(){try{let e=localStorage.getItem(`autotel-devtools-theme`);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`system`}var qc=[`system`,`light`,`dark`];function Jc(){let e=qc[(qc.indexOf(Gc.value)+1)%qc.length];Gc.value=e;try{localStorage.setItem(`autotel-devtools-theme`,e)}catch{}}var Yc=`autotel-devtools-editor`;function Xc(){try{let e=localStorage.getItem(Yc);if(e===`vscode`||e===`cursor`||e===`webstorm`)return e}catch{}return`vscode`}var Zc=ss(Xc());function Qc(e){Zc.value=e;try{localStorage.setItem(Yc,e)}catch{}}var $c=ss(null);function el(e){$c.value=e}function tl(){$c.value=null}function nl(e){$c.value=$c.value?null:e}var rl={vertical:440,horizontal:560},il=ss({...rl});function al(e){return globalThis.window===void 0?e===`vertical`?{min:200,max:900}:{min:360,max:1200}:e===`vertical`?{min:200,max:Math.round(window.innerHeight*.92)}:{min:360,max:Math.round(window.innerWidth*.92)}}function ol(e,t){let{min:n,max:r}=al(e),i=Math.min(r,Math.max(n,Math.round(t)));il.value={...il.value,[e]:i}}function sl(e){ol(e,rl[e])}var cl=ss([]),ll=ss({connectionStatus:`disconnected`}),ul=ss([]),dl=ss([]),fl=ss(`disconnected`),pl=ss(null),ml=ss(bs),hl=ss([]),gl=ss([]),_l=ss(`pending`),vl=cs(()=>{if(_l.value===`ready`)return hl.value;let e=Cs(ml.value,Date.now());if(ws(e))return cl.value;let{start:t,end:n}=e;return cl.value.filter(e=>e.startTime>=t&&e.startTime<=n)}),yl=ss(0),bl=15e3,xl=[];function Sl(e,t,n){if(e+t+n===0)return;let r=Date.now();xl.push({t:r,traces:e,logs:t,metrics:n});let i=r-bl;(xl.length>1024||xl[0].t<i)&&(xl=xl.filter(e=>e.t>=i)),yl.value+=1}function Cl(e=5e3,t=Date.now()){let n=t-e,r=0,i=0,a=0;for(let e of xl)e.t>=n&&(r+=e.traces,i+=e.logs,a+=e.metrics);let o=e/1e3;return{traces:r/o,logs:i/o,metrics:a/o,total:(r+i+a)/o}}var wl=ss(!1),Tl=ss([]),El=ss([]),Dl=cs(()=>Tl.value.length),Ol=cs(()=>El.value.length),kl=ss(!1),Al=cs(()=>cl.value.filter(e=>e.status===`ERROR`)),jl=cs(()=>{let e=Al.value;return Fc.value?0:e.length}),Ml=ss({key:`time`,dir:`desc`}),Nl=ss(``),Pl=ss(`all`),Fl=ss(0),Il=ss(new Set);function Ll(e){let t=new Set(Il.value);t.has(e)?t.delete(e):t.add(e),Il.value=t}function Rl(){Il.value.size>0&&(Il.value=new Set)}var zl=ss(``),Bl=new Map([[`time`,`desc`],[`duration`,`desc`],[`spans`,`desc`],[`service`,`asc`],[`name`,`asc`],[`status`,`desc`]]);function Vl(e){let t=Ml.value;Ml.value=t.key===e?{key:e,dir:t.dir===`asc`?`desc`:`asc`}:{key:e,dir:Bl.get(e)??`desc`}}var Hl=new Set([`service`,`name`]);function Ul(e,t){return(t===`service`?e.service:e.rootSpan?.name)??``}function Wl(e,t){switch(t){case`duration`:return e.duration;case`spans`:return e.spans.length;case`status`:return+(e.status===`ERROR`);default:return e.startTime}}function Gl(e,t,n){return Hl.has(n)?Ul(e,n).localeCompare(Ul(t,n)):Wl(e,n)-Wl(t,n)}var Kl=cs(()=>{let{key:e,dir:t}=Ml.value,n=t===`asc`?1:-1;return[...cl.value].sort((t,r)=>{let i=Gl(t,r,e);return i===0?r.startTime-t.startTime:i*n})}),ql=cs(()=>[...dl.value].sort((e,t)=>t.timestamp-e.timestamp)),Jl=ss([]),Yl=ss(null),Xl=cs(()=>[...Jl.value].sort((e,t)=>t.lastSeen-e.lastSeen)),Zl=cs(()=>Pc(Jl.value)),Ql=cs(()=>{let e=Xl.value;if(e.length===0)return null;let t=Yl.value;return e.find(e=>e.id===t)??e[0]});function $l(e){Yl.value=e}var eu=cs(()=>vs({traces:vl.value,logs:dl.value,errors:ul.value})),tu=cs(()=>{let e=[];for(let t of vl.value){let n=sc(t.spans);for(let r of t.spans){if(!js(r))continue;let i=oc(r);cc(i,n),e.push({raw:r,normalized:i,service:t.service,traceId:t.traceId})}}return e.sort((e,t)=>t.normalized.startMs-e.normalized.startMs),e}),nu=cs(()=>tu.value.length),ru=cs(()=>vl.value.filter(e=>e.spans.length>1).length),iu=cs(()=>{if(_l.value===`ready`)return gl.value;let e=Cs(ml.value,Date.now());if(ws(e))return ul.value;let{start:t,end:n}=e;return ul.value.filter(e=>e.lastSeen>=t&&e.firstSeen<=n)}),au=cs(()=>[...iu.value].sort((e,t)=>t.lastSeen-e.lastSeen)),ou=cs(()=>[...iu.value].sort((e,t)=>t.count-e.count)),su=cs(()=>iu.value.reduce((e,t)=>e+t.count,0)),cu=cs(()=>{let e=Date.now()-36e5;return ul.value.filter(t=>t.lastSeen>e).reduce((e,t)=>e+t.count,0)}),lu=cs(()=>{let e=Vc.value;return e&&vl.value.find(t=>t.traceId===e)||null}),uu=ss(new Set);function du(e){let t=new Set(uu.value);t.has(e)?t.delete(e):t.add(e),uu.value=t}function fu(){uu.value=new Set(vl.value.map(e=>e.traceId))}function pu(){uu.value=new Set}function mu(){let e=uu.value;cl.value=cl.value.filter(t=>!e.has(t.traceId)),hl.value=hl.value.filter(t=>!e.has(t.traceId)),pu(),Vc.value&&e.has(Vc.value)&&(Vc.value=null)}var hu=cs(()=>uu.value.size);function gu(e,t){let n=[...t].sort((e,t)=>e.startTime-t.startTime),r=n.find(e=>!e.parentSpanId)??e.rootSpan??n[0],i=Math.min(...n.map(e=>e.startTime)),a=Math.max(...n.map(e=>e.endTime)),o=n.some(e=>e.status.code===`ERROR`)?`ERROR`:`OK`,s=us(r?.attributes,`service.name`);return{...e,rootSpan:r,spans:n,startTime:i,endTime:a,duration:a-i,status:o,service:s??e.service}}function _u(e,t){let n=new Map;for(let t of e.spans)n.set(t.spanId,t);for(let e of t.spans)n.has(e.spanId)||n.set(e.spanId,e);return gu(e,[...n.values()])}function vu(e,t){if(t.length===0)return e;let n=new Map;for(let e of t){let t=n.get(e.traceId);n.set(e.traceId,t?_u(t,e):e)}let r=new Set(e.map(e=>e.traceId)),i=e.map(e=>{let t=n.get(e.traceId);return t?_u(e,t):e});for(let[e,t]of n)r.has(e)||i.push(t);return i}function yu(e,t,n){let r=vu(e,t);return r.length>n?r.slice(-n):r}function bu(e,t){if(t.length===0)return e;let n=[...t,...e];return n.length>zu?n.slice(0,zu):n}function xu(e,t,n,r=n){return{ingest(i,a){i.length!==0&&(a?t.value=r(t.value,i):e.value=n(e.value,i))},flushToLive(){t.value.length!==0&&(e.value=n(e.value,t.value),t.value=[])},clearPending(){t.value=[]}}}var Su=xu(cl,Tl,vu,(e,t)=>yu(e,t,zu)),Cu=xu(dl,El,bu),wu=[Su,Cu];function Tu(e){if(kl.value){e.health&&(ll.value=e.health,fl.value=e.health.connectionStatus);return}let t=wl.value;Su.ingest(e.traces??[],t),Cu.ingest(e.logs??[],t),Sl(e.traces?.length??0,e.logs?.length??0,0),e.health&&(ll.value=e.health,fl.value=e.health.connectionStatus),e.errors&&(ul.value=e.errors),e.agents&&(Jl.value=e.agents)}function Eu(e){if(wl.value!==e&&(wl.value=e,!e))for(let e of wu)e.flushToLive()}function Du(){Eu(!wl.value)}function Ou(){for(let e of wu)e.clearPending()}function ku(e){cl.value=e.traces??[],dl.value=(e.logs??[]).slice(0,zu),ul.value=e.errors??[],Tl.value=[],El.value=[],wl.value=!1,kl.value=!0}function Au(){kl.value=!1,cl.value=[],dl.value=[],ul.value=[]}function ju(){Fc.value=!Fc.value}function Mu(e){Bc.value=e}function Nu(e,t=null){Vc.value=e,Hc.value=e?t:null}function Pu(e,t){Nu(e,t??null),Mu(`traces`)}function Fu(e,t){Ic.value={x:e,y:t}}function Iu(e){Lc.value=e}function Lu(e){Rc.value=e}function Ru(){let e=[`bottom`,`right`,`left`],t=Rc.value??`bottom`;Rc.value=e[(e.indexOf(t)+1)%e.length]}var zu=100;function Bu(){cl.value=[],hl.value=[],ul.value=[],gl.value=[],dl.value=[],Jl.value=[],Yl.value=null,Tl.value=[],El.value=[],uu.value=new Set,Vc.value=null,Hc.value=null,_l.value=`pending`,kl.value=!1}function Vu(e){if(e.length===0)return;let t=new Set(cl.value.map(e=>e.traceId)),n=e.filter(e=>!t.has(e.traceId));n.length>0?(console.log(`[Autotel Devtools] Importing ${n.length} trace(s)`),cl.value=[...cl.value,...n]):console.log(`[Autotel Devtools] No new traces to import (all duplicates)`)}var Hu=ss(`local`),Uu=`autotel-devtools-widget-state`;function Wu(){try{let e=localStorage.getItem(Uu);if(e){let t=JSON.parse(e);t.position&&(Ic.value=t.position),t.corner&&(Lc.value=t.corner),t.docked&&(Rc.value=t.docked),t.panelSize&&(il.value={vertical:Number(t.panelSize.vertical)||440,horizontal:Number(t.panelSize.horizontal)||560}),typeof t.timeZone==`string`&&(Hu.value=t.timeZone)}}catch(e){console.error(`[Autotel Devtools] Failed to load persisted state:`,e)}}function Gu(){try{let e={position:Ic.value,corner:Lc.value,docked:Rc.value,panelSize:il.value,timeZone:Hu.value};localStorage.setItem(Uu,JSON.stringify(e))}catch(e){console.error(`[Autotel Devtools] Failed to persist state:`,e)}}ls(()=>{Ic.value,Lc.value,Rc.value,Hu.value,il.value,Gu()});var Ku=[`traces`,`resources`,`service-map`,`metrics`,`logs`,`errors`,`genai`,`flow`,`security`];function qu(e,t){return e.find(e=>e===t)}function Ju(e){return qu(Ku,e)!==void 0}var Yu=[`time`,`duration`,`spans`,`service`,`name`,`status`],Xu=[`error`,`ok`],Zu={key:`time`,dir:`desc`};function Qu(e){if(!e)return;let[t,n]=e.split(`:`),r=qu(Yu,t);return r&&{key:r,dir:n===`asc`?`asc`:`desc`}}function $u(e){let t=e.startsWith(`#`)?e.slice(1):e;if(!t)return{};let n=new URLSearchParams(t),r={},i=n.get(`tab`);Ju(i)&&(r.tab=i);let a=n.get(`trace`)||void 0;a&&(r.traceId=a);let o=n.get(`span`)||void 0;a&&o&&(r.spanId=o);let s=n.get(`q`)||void 0;s&&(r.q=s);let c=qu(Xu,n.get(`status`));c&&(r.status=c);let l=n.get(`min`),u=l==null?NaN:Number(l);Number.isFinite(u)&&u>0&&(r.minDuration=u);let d=n.get(`window`);d&&(r.window=Os(d));let f=Qu(n.get(`sort`));f&&(r.sort=f);let p=n.get(`gq`)||void 0;return p&&(r.genaiQuery=p),r}function ed(e){let t=new URLSearchParams;if(e.tab&&e.tab!==`traces`&&t.set(`tab`,e.tab),e.traceId&&t.set(`trace`,e.traceId),e.traceId&&e.spanId&&t.set(`span`,e.spanId),e.q&&t.set(`q`,e.q),e.status&&e.status!==`all`&&t.set(`status`,e.status),e.minDuration&&e.minDuration>0&&t.set(`min`,String(e.minDuration)),e.window){let n=Ds(e.window);n&&t.set(`window`,n)}e.sort&&(e.sort.key!==Zu.key||e.sort.dir!==Zu.dir)&&t.set(`sort`,`${e.sort.key}:${e.sort.dir}`),e.genaiQuery&&t.set(`gq`,e.genaiQuery);let n=t.toString();return n?`#${n}`:``}function td(e,t){return e&&(e.tab!==t.tab||e.traceId!==t.traceId||e.spanId!==t.spanId)?`push`:`replace`}var nd=new Set([`$$slots`,`$$events`,`$$legacy`,`fill`,`width`,`height`]),rd=ca(`<svg><circle cx="17" cy="20" r="3" fill="#9AAAB4"></circle><path fill="#DA2F47" d="M19.235 17.059a1.003 1.003 0 0 1-1.353.412L5.529 10.883a1.004 1.004 0 0 1-.412-1.353L7.94 4.235c.259-.485.868-.67 1.353-.412l12.353 6.588c.485.259.671.868.412 1.353z"></path><path fill="#DA2F47" d="M31.177 22.293a1.004 1.004 0 0 1-1.354.412l-9.705-5.176a1.004 1.004 0 0 1-.412-1.354l1.882-3.529c.259-.485.868-.67 1.354-.412l9.705 5.176c.485.259.671.868.412 1.354z"></path><path fill="#BB1A34" d="m19.235 17.058 2.824-5.293 1.765.941L20.999 18z"></path><path fill="#9D0522" d="m28.942 22.235 2.823-5.294 3.53 1.882-2.824 5.294z"></path><path fill="#292F33" d="m8.294 7.824 1.882-3.53-.881-.47v-.001L4.882 1.471a1.003 1.003 0 0 0-1.353.411L.706 7.177a1 1 0 0 0 .412 1.353l3.529 1.882 1.766.941.47-.882zM23 25a2 2 0 0 1-2 2h-8a2 2 0 0 1 0-4h8a2 2 0 0 1 2 2"></path><path fill="#9AAAB4" d="m9.467 36 3.344-7.152c.468-1 .036-2.191-.965-2.658a1.997 1.997 0 0 0-2.658.965L5.052 36zm15.065 0h4.416l-4.137-8.846a1.997 1.997 0 0 0-2.658-.965 2 2 0 0 0-.965 2.658zM19 36v-8a2 2 0 0 0-4 0v8z"></path></svg>`);function id(e,t){let n=Z(t,`width`,3,40),r=Z(t,`height`,3,40),i=Y(t,nd);var a=rd();Eo(a,()=>({width:n(),height:r(),viewBox:`0 0 36 36`,xmlns:`http://www.w3.org/2000/svg`,...i})),H(e,a)}function ad(e){let t=e<0,n=Math.abs(e),r;if(n===0)r=`0`;else if(n<.001)r=`${(n*1e6).toFixed(0)}ns`;else if(n<1)r=`${(n*1e3).toFixed(2).replace(/\.?0+$/,``)}µs`;else if(n<1e3)r=`${n.toFixed(2).replace(/\.?0+$/,``)}ms`;else if(n<6e4)r=`${(n/1e3).toFixed(2).replace(/\.?0+$/,``)}s`;else{let e=Math.floor(n/6e4),t=Math.floor(n%6e4/1e3);r=t>0?`${e}m ${t}s`:`${e}m`}return t?`⚠ ${r}`:r}function od(e){let t=new Date(e),n=new Date().getTime()-t.getTime();if(n<6e4){let e=Math.floor(n/1e3);return e<=1?`just now`:`${e}s ago`}return n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleTimeString()}function sd(e){return new Intl.NumberFormat().format(e)}function cd(e){switch(e){case`OK`:return`text-green-600`;case`ERROR`:return`text-red-600`;default:return`text-gray-500`}}function ld(e,t,n,r){let i=n/2,a=r/2;return e<i&&t<a?{corner:`top-left`,x:20,y:20}:e>=i&&t<a?{corner:`top-right`,x:n-100,y:20}:e<i&&t>=a?{corner:`bottom-left`,x:20,y:r-100}:{corner:`bottom-right`,x:n-100,y:r-100}}function ud(e,t,n){return Math.min(Math.max(e,t),n)}function dd(e){return e.replace(/[\w.+-]+@[\w-]+\.[\w.-]+/g,`«email»`).replace(/\b(sk|pk|ghp|xox[baprs])[-_][A-Za-z0-9]{8,}\b/g,`«secret»`).replace(/\b[A-Za-z0-9_-]{32,}\b/g,`«token»`)}var fd=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},pd=(e,t)=>({classGroupId:e,validator:t}),md=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),hd=`-`,gd=[],_d=`arbitrary..`,vd=e=>{let t=xd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return bd(e);let n=e.split(hd);return yd(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?fd(i,t):t:i||gd}return n[e]||gd}}},yd=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=yd(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(hd):e.slice(t).join(hd),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},bd=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?_d+r:void 0})(),xd=e=>{let{theme:t,classGroups:n}=e;return Sd(n,t)},Sd=(e,t)=>{let n=md();for(let r in e){let i=e[r];Cd(i,n,r,t)}return n},Cd=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];wd(i,t,n,r)}},wd=(e,t,n,r)=>{if(typeof e==`string`){Td(e,t,n);return}if(typeof e==`function`){Ed(e,t,n,r);return}Dd(e,t,n,r)},Td=(e,t,n)=>{let r=e===``?t:Od(t,e);r.classGroupId=n},Ed=(e,t,n,r)=>{if(kd(e)){Cd(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(pd(n,e))},Dd=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Cd(o,Od(t,a),n,r)}},Od=(e,t)=>{let n=e,r=t.split(hd),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=md(),n.nextPart.set(t,i)),n=i}return n},kd=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ad=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},jd=`!`,Md=`:`,Nd=[],Pd=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Fd=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Md){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(jd)?(c=s.slice(0,-1),l=!0):s.startsWith(jd)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Pd(t,l,c,u)};if(t){let e=t+Md,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Pd(Nd,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Id=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Ld=e=>({cache:Ad(e.cacheSize),parseClassName:Fd(e),sortModifiers:Id(e),postfixLookupClassGroupIds:Rd(e),...vd(e)}),Rd=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},zd=/\s+/,Bd=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(zd),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+jd:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Vd=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Hd(n))&&(i&&(i+=` `),i+=r);return i},Hd=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Hd(e[r]))&&(n&&(n+=` `),n+=t);return n},Ud=(e,...t)=>{let n,r,i,a,o=o=>(n=Ld(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Bd(e,n);return i(e,a),a};return a=o,(...e)=>a(Vd(...e))},Wd=[],Gd=e=>{let t=t=>t[e]||Wd;return t.isThemeGetter=!0,t},Kd=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$d=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ef=e=>Jd.test(e),tf=e=>!!e&&!Number.isNaN(Number(e)),nf=e=>!!e&&Number.isInteger(Number(e)),rf=e=>e.endsWith(`%`)&&tf(e.slice(0,-1)),af=e=>Yd.test(e),of=()=>!0,sf=e=>Xd.test(e)&&!Zd.test(e),cf=()=>!1,lf=e=>Qd.test(e),uf=e=>$d.test(e),df=e=>!mf(e)&&!Sf(e),ff=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),pf=e=>Af(e,Pf,cf),mf=e=>Kd.test(e),hf=e=>Af(e,Ff,sf),gf=e=>Af(e,If,tf),_f=e=>Af(e,Rf,of),vf=e=>Af(e,Lf,cf),yf=e=>Af(e,Mf,cf),bf=e=>Af(e,Nf,uf),xf=e=>Af(e,zf,lf),Sf=e=>qd.test(e),Cf=e=>jf(e,Ff),wf=e=>jf(e,Lf),Tf=e=>jf(e,Mf),Ef=e=>jf(e,Pf),Df=e=>jf(e,Nf),Of=e=>jf(e,zf,!0),kf=e=>jf(e,Rf,!0),Af=(e,t,n)=>{let r=Kd.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},jf=(e,t,n=!1)=>{let r=qd.exec(e);return r?r[1]?t(r[1]):n:!1},Mf=e=>e===`position`||e===`percentage`,Nf=e=>e===`image`||e===`url`,Pf=e=>e===`length`||e===`size`||e===`bg-size`,Ff=e=>e===`length`,If=e=>e===`number`,Lf=e=>e===`family-name`,Rf=e=>e===`number`||e===`weight`,zf=e=>e===`shadow`,Bf=Ud(()=>{let e=Gd(`color`),t=Gd(`font`),n=Gd(`text`),r=Gd(`font-weight`),i=Gd(`tracking`),a=Gd(`leading`),o=Gd(`breakpoint`),s=Gd(`container`),c=Gd(`spacing`),l=Gd(`radius`),u=Gd(`shadow`),d=Gd(`inset-shadow`),f=Gd(`text-shadow`),p=Gd(`drop-shadow`),m=Gd(`blur`),h=Gd(`perspective`),g=Gd(`aspect`),_=Gd(`ease`),v=Gd(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Sf,mf],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Sf,mf,c],T=()=>[ef,`full`,`auto`,...w()],ee=()=>[nf,`none`,`subgrid`,Sf,mf],te=()=>[`auto`,{span:[`full`,nf,Sf,mf]},nf,Sf,mf],ne=()=>[nf,`auto`,Sf,mf],re=()=>[`auto`,`min`,`max`,`fr`,Sf,mf],ie=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ae=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],oe=()=>[`auto`,...w()],se=()=>[ef,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ce=()=>[ef,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],le=()=>[ef,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],E=()=>[e,Sf,mf],ue=()=>[...b(),Tf,yf,{position:[Sf,mf]}],de=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],fe=()=>[`auto`,`cover`,`contain`,Ef,pf,{size:[Sf,mf]}],pe=()=>[rf,Cf,hf],me=()=>[``,`none`,`full`,l,Sf,mf],he=()=>[``,tf,Cf,hf],ge=()=>[`solid`,`dashed`,`dotted`,`double`],_e=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ve=()=>[tf,rf,Tf,yf],ye=()=>[``,`none`,m,Sf,mf],be=()=>[`none`,tf,Sf,mf],xe=()=>[`none`,tf,Sf,mf],Se=()=>[tf,Sf,mf],Ce=()=>[ef,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[af],breakpoint:[af],color:[of],container:[af],"drop-shadow":[af],ease:[`in`,`out`,`in-out`],font:[df],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[af],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[af],shadow:[af],spacing:[`px`,tf],text:[af],"text-shadow":[af],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ef,mf,Sf,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Sf,mf]}],"container-named":[ff],columns:[{columns:[tf,mf,Sf,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[nf,`auto`,Sf,mf]}],basis:[{basis:[ef,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[tf,ef,`auto`,`initial`,`none`,mf]}],grow:[{grow:[``,tf,Sf,mf]}],shrink:[{shrink:[``,tf,Sf,mf]}],order:[{order:[nf,`first`,`last`,`none`,Sf,mf]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ie(),`normal`]}],"justify-items":[{"justify-items":[...ae(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ae()]}],"align-content":[{content:[`normal`,...ie()]}],"align-items":[{items:[...ae(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ae(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ae(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ae()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:oe()}],mx:[{mx:oe()}],my:[{my:oe()}],ms:[{ms:oe()}],me:[{me:oe()}],mbs:[{mbs:oe()}],mbe:[{mbe:oe()}],mt:[{mt:oe()}],mr:[{mr:oe()}],mb:[{mb:oe()}],ml:[{ml:oe()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:se()}],"inline-size":[{inline:[`auto`,...ce()]}],"min-inline-size":[{"min-inline":[`auto`,...ce()]}],"max-inline-size":[{"max-inline":[`none`,...ce()]}],"block-size":[{block:[`auto`,...le()]}],"min-block-size":[{"min-block":[`auto`,...le()]}],"max-block-size":[{"max-block":[`none`,...le()]}],w:[{w:[s,`screen`,...se()]}],"min-w":[{"min-w":[s,`screen`,`none`,...se()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...se()]}],h:[{h:[`screen`,`lh`,...se()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...se()]}],"max-h":[{"max-h":[`screen`,`lh`,...se()]}],"font-size":[{text:[`base`,n,Cf,hf]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,kf,_f]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,rf,mf]}],"font-family":[{font:[wf,vf,t]}],"font-features":[{"font-features":[mf]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Sf,mf]}],"line-clamp":[{"line-clamp":[tf,`none`,Sf,gf]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Sf,mf]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Sf,mf]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ge(),`wavy`]}],"text-decoration-thickness":[{decoration:[tf,`from-font`,`auto`,Sf,hf]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[tf,`auto`,Sf,mf]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[nf,Sf,mf]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Sf,mf]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Sf,mf]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:de()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},nf,Sf,mf],radial:[``,Sf,mf],conic:[nf,Sf,mf]},Df,bf]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":he()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ge(),`hidden`,`none`]}],"divide-style":[{divide:[...ge(),`hidden`,`none`]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-bs":[{"border-bs":E()}],"border-color-be":[{"border-be":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...ge(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[tf,Sf,mf]}],"outline-w":[{outline:[``,tf,Cf,hf]}],"outline-color":[{outline:E()}],shadow:[{shadow:[``,`none`,u,Of,xf]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":[`none`,d,Of,xf]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:he()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[tf,hf]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":[`none`,f,Of,xf]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[tf,Sf,mf]}],"mix-blend":[{"mix-blend":[..._e(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[tf]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[Sf,mf]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[tf]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:de()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Sf,mf]}],filter:[{filter:[``,`none`,Sf,mf]}],blur:[{blur:ye()}],brightness:[{brightness:[tf,Sf,mf]}],contrast:[{contrast:[tf,Sf,mf]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Of,xf]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:[``,tf,Sf,mf]}],"hue-rotate":[{"hue-rotate":[tf,Sf,mf]}],invert:[{invert:[``,tf,Sf,mf]}],saturate:[{saturate:[tf,Sf,mf]}],sepia:[{sepia:[``,tf,Sf,mf]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Sf,mf]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[tf,Sf,mf]}],"backdrop-contrast":[{"backdrop-contrast":[tf,Sf,mf]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,tf,Sf,mf]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tf,Sf,mf]}],"backdrop-invert":[{"backdrop-invert":[``,tf,Sf,mf]}],"backdrop-opacity":[{"backdrop-opacity":[tf,Sf,mf]}],"backdrop-saturate":[{"backdrop-saturate":[tf,Sf,mf]}],"backdrop-sepia":[{"backdrop-sepia":[``,tf,Sf,mf]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Sf,mf]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[tf,`initial`,Sf,mf]}],ease:[{ease:[`linear`,`initial`,_,Sf,mf]}],delay:[{delay:[tf,Sf,mf]}],animate:[{animate:[`none`,v,Sf,mf]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Sf,mf]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":[`scale-3d`],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[Sf,mf,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":[`translate-none`],zoom:[{zoom:[nf,Sf,mf]}],accent:[{accent:E()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Sf,mf]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":E()}],"scrollbar-track-color":[{"scrollbar-track":E()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Sf,mf]}],fill:[{fill:[`none`,...E()]}],"stroke-w":[{stroke:[tf,Cf,hf,gf]}],stroke:[{stroke:[`none`,...E()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),$=(...e)=>Bf($a(e)),Vf=V(`<button title="Autolemetry Observability"><!></button>`);function Hf(e,t){it(t,!0);let n=N(void 0),r=!1,i={x:0,y:0},a=M(()=>Ic.value),o=M(()=>jl.value),s=M(()=>Fc.value),c=M(()=>z(o)>0),l=M(()=>z(c)?`#DA2F47`:`#22c55e`);function u(e){e.button===0&&(r=!0,i={x:e.clientX-z(a).x,y:e.clientY-z(a).y},z(n)?.setPointerCapture(e.pointerId),e.preventDefault())}function d(e){r&&Fu(ud(e.clientX-i.x,0,window.innerWidth-48),ud(e.clientY-i.y,0,window.innerHeight-48))}function f(e){if(!r)return;r=!1,z(n)?.releasePointerCapture(e.pointerId);let t=ld(z(a).x,z(a).y,window.innerWidth,window.innerHeight);Fu(t.x,t.y),Iu(t.corner)}function p(){r||ju()}var m=la(),h=I(m),g=e=>{var t=Vf(),r=F(t);{let e=M(()=>z(c)?`#fff`:void 0);id(r,{get fill(){return z(e)},width:28,height:28})}D(t),Vo(t,e=>P(n,e),()=>z(n)),R(e=>{q(t,1,e),oo(t,`width: 48px; height: 48px; left: ${z(a).x??``}px; top: ${z(a).y??``}px; transform: translate3d(0, 0, 0); border-color: ${z(l)??``};`)},[()=>K($(`fixed z-[1000] rounded-full border-2 shadow-md`,`flex items-center justify-center cursor-pointer touch-none`,`transition-all duration-150 select-none`,`hover:shadow-lg`,`bg-surface hover:bg-subtle`))]),B(`click`,t,p),B(`pointerdown`,t,u),B(`pointermove`,t,d),B(`pointerup`,t,f),H(e,t)};W(h,e=>{z(s)||e(g)}),H(e,m),at()}ea([`click`,`pointerdown`,`pointermove`,`pointerup`]);var Uf={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Wf=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Gf=Symbol(`lucide-context`),Kf=()=>et(Gf),qf=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),Jf=ca(`<svg><!><!></svg>`);function Yf(e,t){it(t,!0);let n=Kf()??{},r=Z(t,`color`,19,()=>n.color??`currentColor`),i=Z(t,`size`,19,()=>n.size??24),a=Z(t,`strokeWidth`,19,()=>n.strokeWidth??2),o=Z(t,`absoluteStrokeWidth`,19,()=>n.absoluteStrokeWidth??!1),s=Z(t,`iconNode`,19,()=>[]),c=Y(t,qf),l=M(()=>o()?Number(a())*24/Number(i()):a());var u=Jf();Eo(u,e=>({...Uf,...e,...c,width:i(),height:i(),stroke:r(),"stroke-width":z(l),class:[`lucide-icon lucide`,n.class,t.name&&`lucide-${t.name}`,t.class]}),[()=>!t.children&&!Wf(c)&&{"aria-hidden":`true`}]);var d=F(u);G(d,17,s,Oa,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=la();Ya(I(a),r,!0,(e,t)=>{Eo(e,()=>({...i()}))}),H(e,a)}),La(L(d),()=>t.children??p),D(u),H(e,u),at()}var Xf=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zf(e,t){let n=Y(t,Xf),r=[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`}]];Yf(e,X({name:`activity`},()=>n,{get iconNode(){return r}}))}var Qf=new Set([`$$slots`,`$$events`,`$$legacy`]);function $f(e,t){let n=Y(t,Qf),r=[[`path`,{d:`M12 5v14`}],[`path`,{d:`m19 12-7 7-7-7`}]];Yf(e,X({name:`arrow-down`},()=>n,{get iconNode(){return r}}))}var ep=new Set([`$$slots`,`$$events`,`$$legacy`]);function tp(e,t){let n=Y(t,ep),r=[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]];Yf(e,X({name:`arrow-left`},()=>n,{get iconNode(){return r}}))}var np=new Set([`$$slots`,`$$events`,`$$legacy`]);function rp(e,t){let n=Y(t,np),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]];Yf(e,X({name:`arrow-right`},()=>n,{get iconNode(){return r}}))}var ip=new Set([`$$slots`,`$$events`,`$$legacy`]);function ap(e,t){let n=Y(t,ip),r=[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]];Yf(e,X({name:`arrow-up`},()=>n,{get iconNode(){return r}}))}var op=new Set([`$$slots`,`$$events`,`$$legacy`]);function sp(e,t){let n=Y(t,op),r=[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`}]];Yf(e,X({name:`blocks`},()=>n,{get iconNode(){return r}}))}var cp=new Set([`$$slots`,`$$events`,`$$legacy`]);function lp(e,t){let n=Y(t,cp),r=[[`path`,{d:`M12 8V4H8`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}],[`path`,{d:`M2 14h2`}],[`path`,{d:`M20 14h2`}],[`path`,{d:`M15 13v2`}],[`path`,{d:`M9 13v2`}]];Yf(e,X({name:`bot`},()=>n,{get iconNode(){return r}}))}var up=new Set([`$$slots`,`$$events`,`$$legacy`]);function dp(e,t){let n=Y(t,up),r=[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`}],[`path`,{d:`m7 16.5-4.74-2.85`}],[`path`,{d:`m7 16.5 5-3`}],[`path`,{d:`M7 16.5v5.17`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`}],[`path`,{d:`m17 16.5-5-3`}],[`path`,{d:`m17 16.5 4.74-2.85`}],[`path`,{d:`M17 16.5v5.17`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`}],[`path`,{d:`M12 8 7.26 5.15`}],[`path`,{d:`m12 8 4.74-2.85`}],[`path`,{d:`M12 13.5V8`}]];Yf(e,X({name:`boxes`},()=>n,{get iconNode(){return r}}))}var fp=new Set([`$$slots`,`$$events`,`$$legacy`]);function pp(e,t){let n=Y(t,fp),r=[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]];Yf(e,X({name:`brain`},()=>n,{get iconNode(){return r}}))}var mp=new Set([`$$slots`,`$$events`,`$$legacy`]);function hp(e,t){let n=Y(t,mp),r=[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]];Yf(e,X({name:`camera`},()=>n,{get iconNode(){return r}}))}var gp=new Set([`$$slots`,`$$events`,`$$legacy`]);function _p(e,t){let n=Y(t,gp),r=[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}],[`path`,{d:`M18 17V9`}],[`path`,{d:`M13 17V5`}],[`path`,{d:`M8 17v-3`}]];Yf(e,X({name:`chart-column`},()=>n,{get iconNode(){return r}}))}var vp=new Set([`$$slots`,`$$events`,`$$legacy`]);function yp(e,t){let n=Y(t,vp),r=[[`path`,{d:`M5 21v-6`}],[`path`,{d:`M12 21V9`}],[`path`,{d:`M19 21V3`}]];Yf(e,X({name:`chart-no-axes-column-increasing`},()=>n,{get iconNode(){return r}}))}var bp=new Set([`$$slots`,`$$events`,`$$legacy`]);function xp(e,t){let n=Y(t,bp),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];Yf(e,X({name:`check`},()=>n,{get iconNode(){return r}}))}var Sp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Cp(e,t){let n=Y(t,Sp),r=[[`path`,{d:`m6 9 6 6 6-6`}]];Yf(e,X({name:`chevron-down`},()=>n,{get iconNode(){return r}}))}var wp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Tp(e,t){let n=Y(t,wp),r=[[`path`,{d:`m15 18-6-6 6-6`}]];Yf(e,X({name:`chevron-left`},()=>n,{get iconNode(){return r}}))}var Ep=new Set([`$$slots`,`$$events`,`$$legacy`]);function Dp(e,t){let n=Y(t,Ep),r=[[`path`,{d:`m9 18 6-6-6-6`}]];Yf(e,X({name:`chevron-right`},()=>n,{get iconNode(){return r}}))}var Op=new Set([`$$slots`,`$$events`,`$$legacy`]);function kp(e,t){let n=Y(t,Op),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]];Yf(e,X({name:`circle-alert`},()=>n,{get iconNode(){return r}}))}var Ap=new Set([`$$slots`,`$$events`,`$$legacy`]);function jp(e,t){let n=Y(t,Ap),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]];Yf(e,X({name:`circle-question-mark`},()=>n,{get iconNode(){return r}}))}var Mp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Np(e,t){let n=Y(t,Mp),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 6v6l4 2`}]];Yf(e,X({name:`clock`},()=>n,{get iconNode(){return r}}))}var Pp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Fp(e,t){let n=Y(t,Pp),r=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]];Yf(e,X({name:`code-xml`},()=>n,{get iconNode(){return r}}))}var Ip=new Set([`$$slots`,`$$events`,`$$legacy`]);function Lp(e,t){let n=Y(t,Ip),r=[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`}],[`path`,{d:`M15 6h1v4`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`}],[`circle`,{cx:`16`,cy:`8`,r:`6`}]];Yf(e,X({name:`coins`},()=>n,{get iconNode(){return r}}))}var Rp=new Set([`$$slots`,`$$events`,`$$legacy`]);function zp(e,t){let n=Y(t,Rp),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];Yf(e,X({name:`copy`},()=>n,{get iconNode(){return r}}))}var Bp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vp(e,t){let n=Y(t,Bp),r=[[`path`,{d:`M12 20v2`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M17 20v2`}],[`path`,{d:`M17 2v2`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M2 17h2`}],[`path`,{d:`M2 7h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`M20 17h2`}],[`path`,{d:`M20 7h2`}],[`path`,{d:`M7 20v2`}],[`path`,{d:`M7 2v2`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`}]];Yf(e,X({name:`cpu`},()=>n,{get iconNode(){return r}}))}var Hp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Up(e,t){let n=Y(t,Hp),r=[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`}]];Yf(e,X({name:`database`},()=>n,{get iconNode(){return r}}))}var Wp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gp(e,t){let n=Y(t,Wp),r=[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`}]];Yf(e,X({name:`dollar-sign`},()=>n,{get iconNode(){return r}}))}var Kp=new Set([`$$slots`,`$$events`,`$$legacy`]);function qp(e,t){let n=Y(t,Kp),r=[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]];Yf(e,X({name:`download`},()=>n,{get iconNode(){return r}}))}var Jp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Yp(e,t){let n=Y(t,Jp),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]];Yf(e,X({name:`external-link`},()=>n,{get iconNode(){return r}}))}var Xp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zp(e,t){let n=Y(t,Xp),r=[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}],[`path`,{d:`m2 2 20 20`}]];Yf(e,X({name:`eye-off`},()=>n,{get iconNode(){return r}}))}var Qp=new Set([`$$slots`,`$$events`,`$$legacy`]);function $p(e,t){let n=Y(t,Qp),r=[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Yf(e,X({name:`eye`},()=>n,{get iconNode(){return r}}))}var em=new Set([`$$slots`,`$$events`,`$$legacy`]);function tm(e,t){let n=Y(t,em),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]];Yf(e,X({name:`file-exclamation-point`},()=>n,{get iconNode(){return r}}))}var nm=new Set([`$$slots`,`$$events`,`$$legacy`]);function rm(e,t){let n=Y(t,nm),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]];Yf(e,X({name:`file-text`},()=>n,{get iconNode(){return r}}))}var im=new Set([`$$slots`,`$$events`,`$$legacy`]);function am(e,t){let n=Y(t,im),r=[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`}]];Yf(e,X({name:`flag`},()=>n,{get iconNode(){return r}}))}var om=new Set([`$$slots`,`$$events`,`$$legacy`]);function sm(e,t){let n=Y(t,om),r=[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`}]];Yf(e,X({name:`flame`},()=>n,{get iconNode(){return r}}))}var cm=new Set([`$$slots`,`$$events`,`$$legacy`]);function lm(e,t){let n=Y(t,cm),r=[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`}]];Yf(e,X({name:`funnel`},()=>n,{get iconNode(){return r}}))}var um=new Set([`$$slots`,`$$events`,`$$legacy`]);function dm(e,t){let n=Y(t,um),r=[[`path`,{d:`m12 14 4-4`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`}]];Yf(e,X({name:`gauge`},()=>n,{get iconNode(){return r}}))}var fm=new Set([`$$slots`,`$$events`,`$$legacy`]);function pm(e,t){let n=Y(t,fm),r=[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}]];Yf(e,X({name:`git-branch`},()=>n,{get iconNode(){return r}}))}var mm=new Set([`$$slots`,`$$events`,`$$legacy`]);function hm(e,t){let n=Y(t,mm),r=[[`circle`,{cx:`18`,cy:`18`,r:`3`}],[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`}]];Yf(e,X({name:`git-compare`},()=>n,{get iconNode(){return r}}))}var gm=new Set([`$$slots`,`$$events`,`$$legacy`]);function _m(e,t){let n=Y(t,gm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 9h18`}],[`path`,{d:`M3 15h18`}],[`path`,{d:`M9 3v18`}],[`path`,{d:`M15 3v18`}]];Yf(e,X({name:`grid-3x3`},()=>n,{get iconNode(){return r}}))}var vm=new Set([`$$slots`,`$$events`,`$$legacy`]);function ym(e,t){let n=Y(t,vm),r=[[`circle`,{cx:`12`,cy:`9`,r:`1`}],[`circle`,{cx:`19`,cy:`9`,r:`1`}],[`circle`,{cx:`5`,cy:`9`,r:`1`}],[`circle`,{cx:`12`,cy:`15`,r:`1`}],[`circle`,{cx:`19`,cy:`15`,r:`1`}],[`circle`,{cx:`5`,cy:`15`,r:`1`}]];Yf(e,X({name:`grip-horizontal`},()=>n,{get iconNode(){return r}}))}var bm=new Set([`$$slots`,`$$events`,`$$legacy`]);function xm(e,t){let n=Y(t,bm),r=[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`}]];Yf(e,X({name:`hash`},()=>n,{get iconNode(){return r}}))}var Sm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Cm(e,t){let n=Y(t,Sm),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]];Yf(e,X({name:`info`},()=>n,{get iconNode(){return r}}))}var wm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Tm(e,t){let n=Y(t,wm),r=[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`}]];Yf(e,X({name:`layers`},()=>n,{get iconNode(){return r}}))}var Em=new Set([`$$slots`,`$$events`,`$$legacy`]);function Dm(e,t){let n=Y(t,Em),r=[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`}],[`path`,{d:`M14 4h7`}],[`path`,{d:`M14 9h7`}],[`path`,{d:`M14 15h7`}],[`path`,{d:`M14 20h7`}]];Yf(e,X({name:`layout-list`},()=>n,{get iconNode(){return r}}))}var Om=new Set([`$$slots`,`$$events`,`$$legacy`]);function km(e,t){let n=Y(t,Om),r=[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`}]];Yf(e,X({name:`link-2`},()=>n,{get iconNode(){return r}}))}var Am=new Set([`$$slots`,`$$events`,`$$legacy`]);function jm(e,t){let n=Y(t,Am),r=[[`path`,{d:`M8 5h13`}],[`path`,{d:`M13 12h8`}],[`path`,{d:`M13 19h8`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`}]];Yf(e,X({name:`list-tree`},()=>n,{get iconNode(){return r}}))}var Mm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Nm(e,t){let n=Y(t,Mm),r=[[`path`,{d:`M3 5h.01`}],[`path`,{d:`M3 12h.01`}],[`path`,{d:`M3 19h.01`}],[`path`,{d:`M8 5h13`}],[`path`,{d:`M8 12h13`}],[`path`,{d:`M8 19h13`}]];Yf(e,X({name:`list`},()=>n,{get iconNode(){return r}}))}var Pm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Fm(e,t){let n=Y(t,Pm),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]];Yf(e,X({name:`maximize-2`},()=>n,{get iconNode(){return r}}))}var Im=new Set([`$$slots`,`$$events`,`$$legacy`]);function Lm(e,t){let n=Y(t,Im),r=[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}]];Yf(e,X({name:`message-square`},()=>n,{get iconNode(){return r}}))}var Rm=new Set([`$$slots`,`$$events`,`$$legacy`]);function zm(e,t){let n=Y(t,Rm),r=[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]];Yf(e,X({name:`minimize-2`},()=>n,{get iconNode(){return r}}))}var Bm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vm(e,t){let n=Y(t,Bm),r=[[`path`,{d:`M5 12h14`}]];Yf(e,X({name:`minus`},()=>n,{get iconNode(){return r}}))}var Hm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Um(e,t){let n=Y(t,Hm),r=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`}]];Yf(e,X({name:`monitor`},()=>n,{get iconNode(){return r}}))}var Wm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gm(e,t){let n=Y(t,Wm),r=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]];Yf(e,X({name:`moon`},()=>n,{get iconNode(){return r}}))}var Km=new Set([`$$slots`,`$$events`,`$$legacy`]);function qm(e,t){let n=Y(t,Km),r=[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`}],[`path`,{d:`M12 12V8`}]];Yf(e,X({name:`network`},()=>n,{get iconNode(){return r}}))}var Jm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ym(e,t){let n=Y(t,Jm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 15h18`}]];Yf(e,X({name:`panel-bottom`},()=>n,{get iconNode(){return r}}))}var Xm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zm(e,t){let n=Y(t,Xm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]];Yf(e,X({name:`panel-left`},()=>n,{get iconNode(){return r}}))}var Qm=new Set([`$$slots`,`$$events`,`$$legacy`]);function $m(e,t){let n=Y(t,Qm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M15 3v18`}]];Yf(e,X({name:`panel-right`},()=>n,{get iconNode(){return r}}))}var eh=new Set([`$$slots`,`$$events`,`$$legacy`]);function th(e,t){let n=Y(t,eh),r=[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]];Yf(e,X({name:`pause`},()=>n,{get iconNode(){return r}}))}var nh=new Set([`$$slots`,`$$events`,`$$legacy`]);function rh(e,t){let n=Y(t,nh),r=[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`}]];Yf(e,X({name:`picture-in-picture-2`},()=>n,{get iconNode(){return r}}))}var ih=new Set([`$$slots`,`$$events`,`$$legacy`]);function ah(e,t){let n=Y(t,ih),r=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]];Yf(e,X({name:`play`},()=>n,{get iconNode(){return r}}))}var oh=new Set([`$$slots`,`$$events`,`$$legacy`]);function sh(e,t){let n=Y(t,oh),r=[[`path`,{d:`M12 22v-5`}],[`path`,{d:`M15 8V2`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`}],[`path`,{d:`M9 8V2`}]];Yf(e,X({name:`plug`},()=>n,{get iconNode(){return r}}))}var ch=new Set([`$$slots`,`$$events`,`$$legacy`]);function lh(e,t){let n=Y(t,ch),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]];Yf(e,X({name:`plus`},()=>n,{get iconNode(){return r}}))}var uh=new Set([`$$slots`,`$$events`,`$$legacy`]);function dh(e,t){let n=Y(t,uh),r=[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`}],[`path`,{d:`M4 6h.01`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`}],[`path`,{d:`M12 18h.01`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`}],[`circle`,{cx:`12`,cy:`12`,r:`2`}],[`path`,{d:`m13.41 10.59 5.66-5.66`}]];Yf(e,X({name:`radar`},()=>n,{get iconNode(){return r}}))}var fh=new Set([`$$slots`,`$$events`,`$$legacy`]);function ph(e,t){let n=Y(t,fh),r=[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]];Yf(e,X({name:`refresh-cw`},()=>n,{get iconNode(){return r}}))}var mh=new Set([`$$slots`,`$$events`,`$$legacy`]);function hh(e,t){let n=Y(t,mh),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`}]];Yf(e,X({name:`rotate-ccw`},()=>n,{get iconNode(){return r}}))}var gh=new Set([`$$slots`,`$$events`,`$$legacy`]);function _h(e,t){let n=Y(t,gh),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}],[`path`,{d:`m16 16-1.9-1.9`}]];Yf(e,X({name:`scan-search`},()=>n,{get iconNode(){return r}}))}var vh=new Set([`$$slots`,`$$events`,`$$legacy`]);function yh(e,t){let n=Y(t,vh),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}]];Yf(e,X({name:`scan`},()=>n,{get iconNode(){return r}}))}var bh=new Set([`$$slots`,`$$events`,`$$legacy`]);function xh(e,t){let n=Y(t,bh),r=[[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M8.12 8.12 12 12`}],[`path`,{d:`M20 4 8.12 15.88`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}],[`path`,{d:`M14.8 14.8 20 20`}]];Yf(e,X({name:`scissors`},()=>n,{get iconNode(){return r}}))}var Sh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ch(e,t){let n=Y(t,Sh),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];Yf(e,X({name:`search`},()=>n,{get iconNode(){return r}}))}var wh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Th(e,t){let n=Y(t,wh),r=[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`}]];Yf(e,X({name:`server`},()=>n,{get iconNode(){return r}}))}var Eh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Dh(e,t){let n=Y(t,Eh),r=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Yf(e,X({name:`settings`},()=>n,{get iconNode(){return r}}))}var Oh=new Set([`$$slots`,`$$events`,`$$legacy`]);function kh(e,t){let n=Y(t,Oh),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`M12 8v4`}],[`path`,{d:`M12 16h.01`}]];Yf(e,X({name:`shield-alert`},()=>n,{get iconNode(){return r}}))}var Ah=new Set([`$$slots`,`$$events`,`$$legacy`]);function jh(e,t){let n=Y(t,Ah),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}]];Yf(e,X({name:`shield`},()=>n,{get iconNode(){return r}}))}var Mh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Nh(e,t){let n=Y(t,Mh),r=[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`}],[`path`,{d:`M20 2v4`}],[`path`,{d:`M22 4h-4`}],[`circle`,{cx:`4`,cy:`20`,r:`2`}]];Yf(e,X({name:`sparkles`},()=>n,{get iconNode(){return r}}))}var Ph=new Set([`$$slots`,`$$events`,`$$legacy`]);function Fh(e,t){let n=Y(t,Ph),r=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]];Yf(e,X({name:`sun`},()=>n,{get iconNode(){return r}}))}var Ih=new Set([`$$slots`,`$$events`,`$$legacy`]);function Lh(e,t){let n=Y(t,Ih),r=[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}]];Yf(e,X({name:`tag`},()=>n,{get iconNode(){return r}}))}var Rh=new Set([`$$slots`,`$$events`,`$$legacy`]);function zh(e,t){let n=Y(t,Rh),r=[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]];Yf(e,X({name:`terminal`},()=>n,{get iconNode(){return r}}))}var Bh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vh(e,t){let n=Y(t,Bh),r=[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]];Yf(e,X({name:`trash-2`},()=>n,{get iconNode(){return r}}))}var Hh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Uh(e,t){let n=Y(t,Hh),r=[[`path`,{d:`M16 7h6v6`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`}]];Yf(e,X({name:`trending-up`},()=>n,{get iconNode(){return r}}))}var Wh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gh(e,t){let n=Y(t,Wh),r=[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]];Yf(e,X({name:`triangle-alert`},()=>n,{get iconNode(){return r}}))}var Kh=new Set([`$$slots`,`$$events`,`$$legacy`]);function qh(e,t){let n=Y(t,Kh),r=[[`path`,{d:`M12 3v12`}],[`path`,{d:`m17 8-5-5-5 5`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}]];Yf(e,X({name:`upload`},()=>n,{get iconNode(){return r}}))}var Jh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Yh(e,t){let n=Y(t,Jh),r=[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`12`,cy:`7`,r:`4`}]];Yf(e,X({name:`user`},()=>n,{get iconNode(){return r}}))}var Xh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zh(e,t){let n=Y(t,Xh),r=[[`path`,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`}],[`path`,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`}],[`path`,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`}]];Yf(e,X({name:`webhook`},()=>n,{get iconNode(){return r}}))}var Qh=new Set([`$$slots`,`$$events`,`$$legacy`]);function $h(e,t){let n=Y(t,Qh),r=[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`}]];Yf(e,X({name:`workflow`},()=>n,{get iconNode(){return r}}))}var eg=new Set([`$$slots`,`$$events`,`$$legacy`]);function tg(e,t){let n=Y(t,eg),r=[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]];Yf(e,X({name:`wrench`},()=>n,{get iconNode(){return r}}))}var ng=new Set([`$$slots`,`$$events`,`$$legacy`]);function rg(e,t){let n=Y(t,ng),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];Yf(e,X({name:`x`},()=>n,{get iconNode(){return r}}))}var ig=new Set([`$$slots`,`$$events`,`$$legacy`]);function ag(e,t){let n=Y(t,ig),r=[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`}]];Yf(e,X({name:`zap`},()=>n,{get iconNode(){return r}}))}function og(e){let t=e-1;return t*t*t+1}function sg(){return globalThis.window===void 0?null:window.documentPictureInPicture??null}function cg(){return sg()!==null}var lg=null,ug=null;async function dg(e,t,{width:n=720,height:r=560}={}){let i=sg();if(!i||lg)return!1;let a=await i.requestWindow({width:n,height:r});lg=a,a.document.title=e.ownerDocument.title||`autotel devtools`;let o=a.document.createElement(`style`);return o.textContent=`html,body{margin:0;padding:0;height:100%;width:100%;overflow:hidden;background:transparent}`,a.document.head.appendChild(o),ug=e.ownerDocument.createComment(`autotel-pip-placeholder`),e.replaceWith(ug),a.document.body.appendChild(e),a.addEventListener(`pagehide`,()=>pg(t),{once:!0}),!0}function fg(e){if(!lg)return;let t=lg;pg(e);try{t.close()}catch{}}function pg(e){let t=lg;if(!t)return;lg=null;let n=t.document.body.firstElementChild;n&&(ug?.isConnected?ug.replaceWith(n):document.body.appendChild(n)),ug=null,e?.()}var mg=[{fill:`#ede9fe`,stroke:`#8b5cf6`},{fill:`#ccfbf1`,stroke:`#14b8a6`},{fill:`#dbeafe`,stroke:`#3b82f6`},{fill:`#fef9c3`,stroke:`#ca8a04`},{fill:`#fce7f3`,stroke:`#db2777`},{fill:`#dcfce7`,stroke:`#16a34a`},{fill:`#ffedd5`,stroke:`#ea580c`},{fill:`#e0e7ff`,stroke:`#6366f1`}];function hg(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return mg[t%mg.length]}var gg=[{keys:[`1-6`],description:`Switch between tabs (Traces through Errors)`},{keys:[`?`],description:`Show/hide this shortcuts help`},{keys:[`Esc`],description:`Close shortcuts help / go back from trace detail`},{keys:[`/`],description:`Focus search filter`}],_g=[{keys:[`/`],description:`Focus search filter`},{keys:[`Esc`],description:`Clear selection / clear search`},{keys:[`CmdOrCtrl`,`A`],description:`Select all traces`},{keys:[`?`],description:`Show/hide keyboard shortcuts`}],vg=[{keys:[`Esc`],description:`Go back to trace list / close span detail`},{keys:[`w`],description:`Switch to waterfall view`},{keys:[`f`],description:`Switch to flame graph view`},{keys:[`l`],description:`Switch to list view`},{keys:[`↑`,`↓`,`Enter`],description:`Navigate spans / select in waterfall`},{keys:[`e`,`Shift+E`],description:`Next / previous error span`},{keys:[`/`],description:`Search spans in this trace`},{keys:[`?`],description:`Show/hide keyboard shortcuts`}];function yg(){let e=document.activeElement;if(!e)return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||!!e.isContentEditable}function bg(e){return t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e())}}var xg=globalThis.navigator!==void 0&&/Mac|iPhone|iPad|iPod/.test(navigator.platform),Sg=V(`<div class="border border-line rounded-lg p-3 bg-subtle"><div class="font-semibold text-fg"> </div> <div class="text-xs text-fg-subtle mt-0.5"> </div></div>`),Cg=V(`<div class="p-3 bg-danger-bg border border-danger-border rounded-md text-sm text-danger flex items-start gap-2"><!> <span> </span></div>`),wg=V(`<p class="mb-1 last:mb-0"> </p>`),Tg=V(`<div class="p-3 bg-accent/10 border border-accent/30 rounded-md text-sm text-accent"></div>`),Eg=V(`<div class="p-3 bg-success-bg border border-success-border rounded-md text-sm text-success"> </div>`),Dg=V(`<div class="fixed inset-0 z-[1100] flex items-center justify-center" role="dialog" aria-modal="true" aria-label="Import traces"><button type="button" aria-label="Close" class="absolute inset-0 bg-black/55 backdrop-blur-[2px] at-backdrop-in"></button> <div tabindex="-1" class="at-modal-in relative z-[1] w-[min(560px,92vw)] max-h-[85vh] overflow-hidden flex flex-col bg-surface rounded-lg shadow-xl border border-line outline-none"><div class="flex items-center justify-between px-4 py-3 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-semibold text-fg">Import Traces</span> <button class="inline-flex items-center justify-center w-7 h-7 bg-transparent border border-line rounded text-sm text-fg-subtle hover:bg-danger-bg hover:border-danger-border hover:text-danger transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-y-auto p-4 flex flex-col gap-3"><label class="flex flex-col gap-2 text-sm text-fg-muted"><span class="font-semibold text-fg">JSON file</span> <span class="inline-flex items-center px-3 py-1.5 border border-line rounded text-sm text-fg-muted bg-surface hover:bg-subtle cursor-pointer w-fit transition-colors"><!> Choose file</span> <input type="file" accept=".json,application/json" class="hidden"/></label> <!> <!> <!> <!></div> <div class="flex items-center justify-end gap-3 px-4 py-3 border-t border-line bg-subtle flex-shrink-0"><button class="px-3 py-1.5 text-sm border border-line rounded bg-surface text-fg-muted hover:bg-subtle disabled:opacity-50 disabled:cursor-not-allowed transition-colors">Cancel</button> <button class="px-4 py-1.5 text-sm rounded bg-accent text-white hover:bg-accent/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"> </button></div></div></div>`);function Og(e,t){it(t,!0);function n(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}let r=N(null),i=N(!1),a=N(null),o=N(null),s=N(void 0);Lr(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t.onclose())};return window.addEventListener(`keydown`,e),z(s)?.focus(),()=>window.removeEventListener(`keydown`,e)});let c=e=>{let t=e.target.files?.[0];t&&(P(r,t,!0),P(o,null),P(a,null))},l=async()=>{if(z(r)){P(i,!0),P(o,null);try{let e=await t.onimport(z(r));P(a,e,!0),e.errors.length>0&&P(o,e.errors.join(`; `),!0),e.imported>0&&e.errors.length===0&&setTimeout(t.onclose,1500)}catch(e){P(o,String(e),!0)}finally{P(i,!1)}}};var u=Dg(),d=F(u),f=L(d,2),p=F(f),m=L(F(p),2);rg(F(m),{size:14}),D(m),D(p);var h=L(p,2),g=F(h),_=L(F(g),2);qh(F(_),{size:14,class:`mr-1.5`}),Ke(),D(_);var v=L(_,2);D(g);var y=L(g,2),b=e=>{var t=Sg(),i=F(t),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(t),R(e=>{U(a,z(r).name),U(s,e)},[()=>n(z(r).size)]),H(e,t)};W(y,e=>{z(r)&&e(b)});var x=L(y,2),S=e=>{var t=Cg(),n=F(t);Gh(n,{size:14,class:`flex-shrink-0 mt-0.5`});var r=L(n,2),i=F(r,!0);D(r),D(t),R(()=>U(i,z(o))),H(e,t)};W(x,e=>{z(o)&&e(S)});var C=L(x,2),w=e=>{var t=Tg();G(t,21,()=>z(a).warnings,Oa,(e,t)=>{var n=wg(),r=F(n,!0);D(n),R(()=>U(r,z(t))),H(e,n)}),D(t),H(e,t)};W(C,e=>{z(a)&&z(a).warnings.length>0&&e(w)});var T=L(C,2),ee=e=>{var t=Eg(),n=F(t);D(t),R(()=>U(n,`Successfully imported ${z(a).imported??``} trace${z(a).imported===1?``:`s`}.`)),H(e,t)};W(T,e=>{z(a)&&z(a).imported>0&&e(ee)}),D(h);var te=L(h,2),ne=F(te),re=L(ne,2),ie=F(re,!0);D(re),D(te),D(f),Vo(f,e=>P(s,e),()=>z(s)),D(u),R(()=>{ne.disabled=z(i),re.disabled=!z(r)||z(i),U(ie,z(i)?`Importing...`:`Confirm Import`)}),B(`click`,d,function(...e){t.onclose?.apply(this,e)}),B(`click`,m,function(...e){t.onclose?.apply(this,e)}),B(`change`,v,c),B(`click`,ne,function(...e){t.onclose?.apply(this,e)}),B(`click`,re,l),H(e,u),at()}ea([`click`,`change`]);function kg(e,t){if(t.length===0)return e.duration;let n=t.map(t=>[Math.max(t.startTime,e.startTime),Math.min(t.endTime,e.endTime)]).filter(([e,t])=>t>e).sort((e,t)=>e[0]-t[0]),r=0,i=-1/0,a=-1/0;for(let[e,t]of n)e>a?(a>i&&(r+=a-i),i=e,a=t):t>a&&(a=t);return a>i&&(r+=a-i),Math.max(0,e.duration-r)}function Ag(e){let t=new Set;if(e.length===0)return t;let n=new Map;for(let t of e)n.set(t.spanId,t);let r=new Map;for(let t of e){let e=t.parentSpanId&&n.has(t.parentSpanId)?t.parentSpanId:``,i=r.get(e);i?i.push(t):r.set(e,[t])}let i=r.get(``)??[];if(i.length===0)return t;let a=e=>e.reduce((e,t)=>t.endTime>e.endTime?t:e),o=a(i);for(;o&&!t.has(o.spanId);){t.add(o.spanId);let e=r.get(o.spanId);o=e&&e.length?a(e):void 0}return t}function jg(e,t=()=>!1){let n=[],r=(e,i,a)=>{e.forEach((o,s)=>{let c=s===e.length-1;n.push({node:o,connectors:{ancestorLines:[...i],isLast:c,depth:a}}),!(t(o)||o.children.length===0)&&r(o.children,[...i,!c],a+1)})};return r(e,[],0),n}function Mg(e){if(e!==`local`)return e===`utc`?`UTC`:e}function Ng(e,t){try{return new Intl.DateTimeFormat(void 0,{...t,timeZone:Mg(e)})}catch{return new Intl.DateTimeFormat(void 0,t)}}function Pg(e,t=`local`){return Ng(t,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}).format(new Date(e))}function Fg(e=`local`){return e===`utc`?`UTC`:Ng(e,{timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??`Local`}var Ig=2;function Lg(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=n>0?(e[i].timestamp-t)/n*100:0,o=Math.min(Math.max(a,0),100),s=r.find(e=>e.every(e=>Math.abs(o-e.posPercent)>Ig));s?s.push({index:i,posPercent:o}):r.push([{index:i,posPercent:o}])}return r}var Rg=new Set([`error`,`fatal`,`critical`]);function zg(e){if(e.name===`exception`)return`exception`;let t=e.attributes?.level??e.attributes?.severity;return typeof t==`string`&&Rg.has(t.toLowerCase())?`exception`:`event`}var Bg=V(`<span class="absolute inset-y-0 border-l border-line"></span>`),Vg=V(`<span class="relative shrink-0"><!></span>`),Hg=V(`<span class="relative shrink-0"><span></span> <span class="absolute top-1/2 border-t border-line"></span></span>`),Ug=V(`<span aria-hidden="true" data-testid="tree-gutter"><!> <!></span>`);function Wg(e,t){it(t,!0);let n=Z(t,`indent`,3,16);var r=Ug(),i=F(r);G(i,17,()=>t.ancestorLines,Oa,(e,t)=>{var r=Vg(),i=F(r),a=e=>{var t=Bg();R(()=>oo(t,`left:${n()/2}px`)),H(e,t)};W(i,e=>{z(t)&&e(a)}),D(r),R(()=>{oo(r,`width:${n()??``}px`),J(r,`data-testid`,z(t)?`gutter-line`:`gutter-blank`)}),H(e,r)});var a=L(i,2),o=e=>{var r=Hg(),i=F(r),a=L(i,2);D(r),R(e=>{oo(r,`width:${n()??``}px`),J(r,`data-testid`,t.isLast?`gutter-elbow`:`gutter-tee`),q(i,1,e),oo(i,`left:${n()/2}px`),oo(a,`left:${n()/2}px; width:${n()/2}px`)},[()=>K($(`absolute top-0 border-l border-line`,t.isLast?`h-1/2`:`inset-y-0`))]),H(e,r)};W(a,e=>{(t.ancestorLines.length>0||!t.isLast)&&e(o)}),D(r),R(e=>q(r,1,e),[()=>K($(`flex shrink-0 self-stretch`,t.class))]),H(e,r),at()}function Gg(e){let t=e.children.length;for(let n of e.children)t+=Gg(n);return t}function Kg(e,t){let n=t.startTime,r=t.duration||1,i=e.startTime-n,a=i/r*100,o=e.duration/r*100;return{offsetMs:i,offsetPercent:Math.max(0,Math.min(100,a)),widthPercent:Math.max(.5,Math.min(100-a,o))}}function qg(e){switch(e){case`SERVER`:return`bg-blue-500`;case`CLIENT`:return`bg-green-500`;case`PRODUCER`:return`bg-purple-500`;case`CONSUMER`:return`bg-orange-500`;default:return`bg-gray-500`}}function Jg(e){switch(e){case`SERVER`:return`bg-blue-400`;case`CLIENT`:return`bg-green-400`;case`PRODUCER`:return`bg-purple-400`;case`CONSUMER`:return`bg-orange-400`;default:return`bg-gray-400`}}var Yg=V(`<button class="p-0.5 hover:bg-hover rounded flex-shrink-0"><!></button>`),Xg=V(`<div class="w-4"></div>`),Zg=V(`<span class="text-xs text-fg-subtle ml-1"> </span>`),Qg=V(`<span class="absolute inset-0 flex items-center justify-center text-[10px] text-white font-medium"> </span>`),$g=V(`<button type="button"></button>`),e_=V(`<div class="flex gap-2 py-0.5"><span class="text-fg-subtle flex-shrink-0"> </span> <span class="text-fg break-all"> </span></div>`),t_=V(`<div class="font-mono text-[11px] text-fg-muted bg-subtle rounded p-2 border border-line-subtle max-h-[160px] overflow-auto"></div>`),n_=V(`<div class="text-[11px] text-fg-subtle italic">No attributes</div>`),r_=V(`<div class="absolute z-30 top-[calc(100%-2px)] left-2 right-2 max-w-[420px] bg-surface border border-line rounded-md shadow-lg p-2.5 text-left at-modal-in"><div class="flex items-center gap-2 mb-1.5"><span></span> <span> </span> <span class="text-[10px] text-fg-subtle font-mono"> </span> <button type="button" class="p-0.5 hover:bg-hover rounded flex-shrink-0" aria-label="Close event detail"><!></button></div> <div class="text-[10px] text-fg-subtle font-mono mb-1.5"> </div> <!></div>`),i_=V(`<div><div class="w-[200px] shrink-0 pr-2 py-2 flex items-center gap-1 min-w-0"><!> <!> <!> <!> <!> <span> </span> <!></div> <div class="flex-1 relative"><div><!></div> <!> <!></div> <div class="w-[80px] shrink-0 px-2 py-2 text-right"><span> </span></div></div>`);function a_(e,t){it(t,!0);let n=M(()=>t.node.span),r=M(()=>Kg(z(n),t.trace)),i=M(()=>z(n).status.code===`ERROR`),a=M(()=>z(n).events&&z(n).events.length>0),o=M(()=>Lg(z(n).events??[],t.trace.startTime,t.trace.duration)),s=N(null),c=e=>{P(s,z(s)===e?null:e,!0)};Lr(()=>{if(z(s)===null)return;let e=()=>{P(s,null)},t=t=>{t.key===`Escape`&&e()};return window.addEventListener(`click`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`click`,e),window.removeEventListener(`keydown`,t)}});var l=i_(),u=F(l),d=F(u),f=e=>{Wg(e,{get ancestorLines(){return t.connectors.ancestorLines},get isLast(){return t.connectors.isLast}})};W(d,e=>{t.connectors&&e(f)});var p=L(d,2),m=e=>{var n=Yg(),r=F(n),i=e=>{Dp(e,{size:12,class:`text-fg-subtle`})},a=e=>{Cp(e,{size:12,class:`text-fg-subtle`})};W(r,e=>{t.isCollapsed?e(i):e(a,-1)}),D(n),B(`click`,n,e=>{e.stopPropagation(),t.onToggleCollapse?.()}),H(e,n)},h=e=>{H(e,Xg())};W(p,e=>{t.hasChildren?e(m):e(h,-1)});var g=L(p,2),v=e=>{kp(e,{size:12,class:`text-danger flex-shrink-0`})};W(g,e=>{z(i)&&e(v)});var y=L(g,2),b=e=>{Cm(e,{size:10,class:`text-accent flex-shrink-0`})};W(y,e=>{z(a)&&e(b)});var x=L(y,2),S=e=>{ag(e,{size:10,class:`text-warning fill-warning flex-shrink-0`})};W(x,e=>{t.isCritical&&e(S)});var C=L(x,2),w=F(C,!0);D(C);var T=L(C,2),ee=e=>{var n=Zg(),r=F(n);D(n),R(e=>U(r,`(+${e??``})`),[()=>Gg(t.node)]),H(e,n)};W(T,e=>{t.isCollapsed&&t.node.children.length>0&&e(ee)}),D(u);var te=L(u,2),ne=F(te),re=F(ne),ie=e=>{var t=Qg(),r=F(t,!0);D(t),R(e=>U(r,e),[()=>ad(z(n).duration)]),H(e,t)};W(re,e=>{z(r).widthPercent>10&&e(ie)}),D(ne);var ae=L(ne,2);G(ae,17,()=>z(o),Oa,(e,r,i)=>{var a=la();G(I(a),17,()=>z(r),e=>e.index,(e,r)=>{let a=M(()=>z(n).events[z(r).index]),o=M(()=>28+i*8),l=M(()=>zg(z(a))===`exception`);var u=$g();R((e,t)=>{q(u,1,e),oo(u,`left: ${z(r).posPercent}%; top: ${z(o)}px; transform: translateX(-50%);`),J(u,`title`,t),J(u,`aria-label`,`Event ${z(a).name}`)},[()=>K($(`absolute w-2.5 h-2.5 rounded-full border border-white z-10 cursor-pointer hover:scale-125 transition-transform`,z(l)?`bg-danger`:`bg-warning`,z(s)===z(r).index&&`ring-2 ring-accent scale-125`)),()=>`${z(a).name} at ${ad(z(a).timestamp-t.trace.startTime)} — click for detail`]),B(`click`,u,e=>{e.stopPropagation(),c(z(r).index)}),H(e,u)}),H(e,a)});var oe=L(ae,2),se=e=>{let r=M(()=>z(n).events[z(s)]),i=M(()=>zg(z(r))===`exception`);var a=r_(),o=F(a),c=F(o),l=L(c,2),u=F(l,!0);D(l);var d=L(l,2),f=F(d);D(d);var p=L(d,2);rg(F(p),{size:12,class:`text-fg-subtle`}),D(p),D(o);var m=L(o,2),h=F(m,!0);D(m);var g=L(m,2),v=e=>{var t=t_();G(t,21,()=>Object.entries(z(r).attributes),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=e_(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,r()),U(l,e)},[()=>typeof i()==`object`?JSON.stringify(i()):String(i())]),H(e,a)}),D(t),H(e,t)},y=M(()=>z(r).attributes&&Object.keys(z(r).attributes).length>0),b=e=>{H(e,n_())};W(g,e=>{z(y)?e(v):e(b,-1)}),D(a),R((e,t,n,i)=>{q(c,1,e),q(l,1,t),U(u,z(r).name),U(f,`+${n??``}`),U(h,i)},[()=>K($(`w-2 h-2 rounded-full flex-shrink-0`,z(i)?`bg-danger`:`bg-warning`)),()=>K($(`text-xs font-medium flex-1 truncate`,z(i)?`text-danger`:`text-fg`)),()=>ad(z(r).timestamp-t.trace.startTime),()=>Pg(z(r).timestamp,Hu.value)]),B(`click`,a,e=>e.stopPropagation()),B(`click`,p,e=>{e.stopPropagation(),P(s,null)}),H(e,a)};W(oe,e=>{z(s)!==null&&z(n).events?.[z(s)]&&e(se)}),D(te);var ce=L(te,2),le=F(ce),E=F(le,!0);D(le),D(ce),D(l),R((e,i,a,o,s,c,d)=>{J(l,`id`,`waterfall-row-${z(n).spanId}`),q(l,1,e),oo(u,t.connectors?`padding-left: 8px;`:`padding-left: ${8+t.node.depth*16}px;`),q(C,1,i),J(C,`title`,z(n).name),U(w,z(n).name||`unknown`),oo(te,a),q(ne,1,o),oo(ne,`left: ${z(r).offsetPercent}%; width: ${z(r).widthPercent}%; top: 6px; min-width: 4px;`),J(ne,`title`,s),q(le,1,c),U(E,d)},[()=>K($(`flex items-center border-b border-line-subtle hover:bg-accent/5 cursor-pointer transition-colors`,t.isSelected&&`bg-accent/10 hover:bg-accent/15`,z(i)&&`bg-danger-bg/40 hover:bg-danger-bg/60`,t.isCritical&&`border-l-2 border-l-warning`)),()=>K($(`text-xs truncate`,z(i)?`text-danger`:`text-fg`)),()=>`height: ${Math.max(32,30+z(o).length*8)}px;`,()=>K($(`absolute h-5 rounded-sm transition-colors group`,z(i)?`bg-danger`:qg(z(n).kind),t.isSelected&&(z(i)?`bg-danger`:Jg(z(n).kind)))),()=>`${z(n).name}: ${ad(z(n).duration)}`,()=>K($(`text-xs font-mono`,z(i)?`text-danger`:`text-fg-muted`)),()=>ad(z(n).duration)]),B(`click`,l,()=>t.onSelect?.()),H(e,l),at()}ea([`click`]);function o_(e){let t=new Map,n=[],r=new Map;for(let n of e)t.set(n.spanId,{span:n,children:[],depth:0});for(let i of e){let e=t.get(i.spanId);if(i.parentSpanId){let n=t.get(i.parentSpanId);if(n)n.children.push(e);else{let t=r.get(i.parentSpanId)||[];t.push(e),r.set(i.parentSpanId,t)}}else n.push(e)}let i=(e,t,n=new Set)=>{if(!n.has(e.span.spanId)){n.add(e.span.spanId),e.depth=t;for(let r of e.children)i(r,t+1,new Set(n))}};for(let[t,i]of r){i.sort((e,t)=>e.span.startTime-t.span.startTime);let r=Math.min(...i.map(e=>e.span.startTime)),a=Math.max(...i.map(e=>e.span.endTime)),o=e.find(e=>e.spanId===t),s={span:{spanId:t,traceId:i[0].span.traceId,parentSpanId:o?.parentSpanId||void 0,name:`(missing)`,kind:`INTERNAL`,startTime:r,endTime:a,duration:a-r,attributes:{},status:{code:`UNSET`},events:[]},children:i,depth:0};n.push(s)}for(let e of n)i(e,0);let a=e=>{e.sort((e,t)=>e.span.startTime-t.span.startTime);for(let t of e)a(t.children)};return a(n),n}var s_=V(`<div class="absolute text-[10px] whitespace-nowrap tabular-nums"> </div>`),c_=V(`<div class="absolute top-0 bottom-0 border-l border-line-subtle"></div>`),l_=V(`<div></div>`),u_=V(`<div><!></div>`),d_=V(`<div class="px-3 py-6 text-center text-xs text-fg-subtle"> </div>`),f_=V(`<div class="flex items-center gap-1"><div></div> <span class="text-fg-muted"> </span></div>`),p_=V(`<div class="flex flex-col h-full"><div class="flex border-b border-line bg-subtle text-xs text-fg-subtle"><div class="w-[200px] shrink-0 px-3 py-2 font-medium text-fg-muted">Span Name</div> <div class="flex-1 relative py-2"></div> <div class="w-[80px] shrink-0 px-2 py-2 text-right font-medium text-fg-muted">Duration</div></div> <div class="flex-1 overflow-auto relative"><div class="absolute inset-0 pointer-events-none"></div> <div class="relative"><!> <!> <!> <!></div></div> <div class="flex items-center gap-4 px-3 py-2 border-t border-line bg-subtle text-xs"><span class="text-fg-subtle font-medium">Kind:</span> <!> <button title="Highlight the spans that determine total trace latency"><!> Critical path</button></div></div>`);function m_(e,t){it(t,!0);let n=Z(t,`selectedSpanId`,3,null),r=Z(t,`query`,3,``),i=M(()=>{let e=r().trim().toLowerCase();if(!e)return new Set;let n=new Set,i=(t.trace.service?.toLowerCase()??``).includes(e);for(let r of t.trace.spans)(i||r.name?.toLowerCase().includes(e))&&n.add(r.spanId);return n}),a=M(()=>r().trim().length>0);Lr(()=>{t.onMatchCount?.(z(i).size)});let o=N(_r(new Set)),s=N(!0),c=N(void 0),l=N(0),u=N(void 0),d=N(0),f=N(0),p=M(()=>Ag(t.trace.spans));Lr(()=>{let e=z(c);if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{P(l,e[0].contentRect.width,!0)});return t.observe(e),()=>t.disconnect()});let m=M(()=>o_(t.trace.spans)),h=M(()=>jg(z(m),e=>z(o).has(e.span.spanId))),g=M(()=>z(h).map(e=>e.node)),_=M(()=>z(h).length<300||z(f)===0?{start:0,end:z(h).length}:{start:Math.max(0,Math.floor(z(d)/34)-12),end:Math.min(z(h).length,Math.ceil((z(d)+z(f))/34)+12)}),v=M(()=>z(h).slice(z(_).start,z(_).end));Lr(()=>{let e=z(u);if(!e||typeof ResizeObserver>`u`)return;P(f,e.clientHeight,!0);let t=new ResizeObserver(()=>{P(f,e.clientHeight,!0)});return t.observe(e),()=>t.disconnect()});function y(e){if(!z(u)||z(h).length<300)return;let t=e*34,n=t+34;t<z(u).scrollTop?z(u).scrollTop=t:n>z(u).scrollTop+z(u).clientHeight&&(z(u).scrollTop=n-z(u).clientHeight),P(d,z(u).scrollTop,!0)}let b=e=>{if($c.value||yg()||e.key!==`ArrowUp`&&e.key!==`ArrowDown`&&e.key!==`Enter`)return;e.preventDefault();let r=z(g).findIndex(e=>e.span.spanId===n()),i;if(e.key===`ArrowUp`)i=r>0?r-1:z(g).length-1;else if(e.key===`ArrowDown`)i=r<z(g).length-1?r+1:0;else{if(r>=0){t.onSpanSelect?.(z(g)[r].span);return}i=0}let a=z(g)[i];a&&(t.onSpanSelect?.(a.span),y(i),document.getElementById(`waterfall-row-${a.span.spanId}`)?.scrollIntoView({block:`nearest`}))};Lr(()=>(z(g),n(),window.addEventListener(`keydown`,b),()=>window.removeEventListener(`keydown`,b))),Lr(()=>{let e=n();e&&Pi(()=>{let n=new Map(t.trace.spans.map(e=>[e.spanId,e])),r=new Set(z(o)),i=!1,a=n.get(e)?.parentSpanId;for(;a;)r.delete(a)&&(i=!0),a=n.get(a)?.parentSpanId;i&&P(o,r,!0);let s=z(h).findIndex(t=>t.node.span.spanId===e);s>=0&&y(s),requestAnimationFrame(()=>document.getElementById(`waterfall-row-${e}`)?.scrollIntoView({block:`center`}))})});let x=e=>{let t=new Set(z(o));t.has(e)?t.delete(e):t.add(e),P(o,t,!0)},S=e=>t.trace.spans.some(t=>t.parentSpanId===e),C=M(()=>{let e=t.trace.duration||1,n=z(l)>0?Math.min(8,Math.max(2,Math.floor(z(l)/90))):5,r=[];for(let t=0;t<=n;t++)r.push({percent:t/n*100,label:ad(t/n*e),align:t===0?`start`:t===n?`end`:`mid`});return r}),w=[`SERVER`,`CLIENT`,`INTERNAL`,`PRODUCER`,`CONSUMER`];var T=p_(),ee=F(T),te=L(F(ee),2);G(te,21,()=>z(C),Oa,(e,t)=>{var n=s_(),r=F(n,!0);D(n),R(()=>{oo(n,`left: ${z(t).percent}%; transform: ${z(t).align===`start`?`translateX(0)`:z(t).align===`end`?`translateX(-100%)`:`translateX(-50%)`};`),U(r,z(t).label)}),H(e,n)}),D(te),Vo(te,e=>P(c,e),()=>z(c)),Ke(2),D(ee);var ne=L(ee,2),re=F(ne);oo(re,`left: 200px; right: 80px;`),G(re,21,()=>z(C),Oa,(e,t)=>{var n=c_();R(()=>oo(n,`left: ${z(t).percent}%;`)),H(e,n)}),D(re);var ie=L(re,2),ae=F(ie),oe=e=>{var t=l_();R(()=>oo(t,`height: ${z(_).start*34}px`)),H(e,t)};W(ae,e=>{z(_).start>0&&e(oe)});var se=L(ae,2);G(se,17,()=>z(v),({node:e,connectors:t})=>e.span.spanId,(e,r)=>{let c=()=>z(r).node,l=()=>z(r).connectors,u=M(()=>z(i).has(c().span.spanId));var d=u_(),f=F(d);{let e=M(()=>n()===c().span.spanId),r=M(()=>z(o).has(c().span.spanId)),i=M(()=>S(c().span.spanId)),a=M(()=>z(s)&&z(p).has(c().span.spanId));a_(f,{get node(){return c()},get trace(){return t.trace},get isSelected(){return z(e)},get isCollapsed(){return z(r)},get hasChildren(){return z(i)},get isCritical(){return z(a)},get connectors(){return l()},onSelect:()=>t.onSpanSelect?.(c().span),onToggleCollapse:()=>x(c().span.spanId)})}D(d),R(e=>q(d,1,e),[()=>K($(`transition-opacity`,z(a)&&!z(u)&&`opacity-40`,z(a)&&z(u)&&`ring-1 ring-inset ring-accent rounded-sm`))]),H(e,d)});var ce=L(se,2),le=e=>{var t=l_();R(()=>oo(t,`height: ${(z(h).length-z(_).end)*34}px`)),H(e,t)};W(ce,e=>{z(_).end<z(h).length&&e(le)});var E=L(ce,2),ue=e=>{var t=d_(),n=F(t);D(t),R(e=>U(n,`No spans match “${e??``}”.`),[()=>r().trim()]),H(e,t)};W(E,e=>{z(a)&&z(i).size===0&&e(ue)}),D(ie),D(ne),Vo(ne,e=>P(u,e),()=>z(u));var de=L(ne,2),fe=L(F(de),2);G(fe,16,()=>w,e=>e,(e,t)=>{var n=f_(),r=F(n),i=L(r,2),a=F(i,!0);D(i),D(n),R(e=>{q(r,1,e),U(a,t)},[()=>K($(`w-3 h-3 rounded-sm`,qg(t)))]),H(e,n)});var pe=L(fe,2);ag(F(pe),{size:11}),Ke(),D(pe),D(de),D(T),R(e=>q(pe,1,e),[()=>K($(`ml-auto flex items-center gap-1 px-1.5 py-0.5 rounded border transition-colors`,z(s)?`bg-warning-bg text-warning border-warning-border`:`text-fg-subtle border-line hover:bg-hover`))]),$i(`scroll`,ne,e=>P(d,e.currentTarget.scrollTop,!0)),B(`click`,pe,()=>P(s,!z(s))),H(e,T),at()}ea([`click`]);function h_(e,t){let n=new Map,r=[],i=t.duration||1,a=t.startTime;for(let t of e){let e=(t.startTime-a)/i*100,r=t.duration/i*100;n.set(t.spanId,{span:t,children:[],depth:0,x:Math.max(0,e),width:Math.max(.5,Math.min(100-e,r))})}for(let t of e){let e=n.get(t.spanId);if(t.parentSpanId){let i=n.get(t.parentSpanId);i?(i.children.push(e),e.depth=i.depth+1):r.push(e)}else r.push(e)}let o=e=>{e.sort((e,t)=>e.span.startTime-t.span.startTime);for(let t of e)o(t.children)};return o(r),r}function g_(e){let t=[],n=e=>{t.push(e),e.children.forEach(n)};return e.forEach(n),t}function __(e){let t=0,n=e=>{t=Math.max(t,e.depth),e.children.forEach(n)};return e.forEach(n),t}function v_(e,t,n){let r=n.find(e=>e.spanId===t);if(!r)return e;let i=r.startTime,a=r.duration||1,o=(e,t)=>{let r=n.find(t=>t.spanId===e);return r?r.parentSpanId===t?!0:r.parentSpanId?o(r.parentSpanId,t):!1:!1},s=e=>{if(!(e.span.spanId===t||o(e.span.spanId,t)))return{...e,x:-100,width:0,children:e.children.map(s)};let n=(e.span.startTime-i)/a*100,r=e.span.duration/a*100;return{...e,x:Math.max(0,n),width:Math.max(.5,Math.min(100-Math.max(0,n),r)),children:e.children.map(s)}};return e.map(s)}function y_(e){if(e.status.code===`ERROR`)return`bg-red-500 hover:bg-red-400`;switch(e.kind){case`SERVER`:return`bg-blue-500 hover:bg-blue-400`;case`CLIENT`:return`bg-green-500 hover:bg-green-400`;case`PRODUCER`:return`bg-purple-500 hover:bg-purple-400`;case`CONSUMER`:return`bg-orange-500 hover:bg-orange-400`;default:return`bg-gray-500 hover:bg-gray-400`}}function b_(e){return e.status.code===`ERROR`?`ring-2 ring-danger`:`ring-2 ring-accent`}var x_=V(`<div class="absolute inset-0 flex items-center px-1.5 overflow-hidden"><span class="text-[10px] text-white font-medium truncate"> </span></div>`),S_=V(`<div role="button" tabindex="-1"><!></div>`),C_=V(`<span class="flex items-center gap-2"><span class="font-medium">Zoomed:</span> <span class="truncate max-w-[200px]"> </span></span>`),w_=V(`<span>Click a span to zoom in, double-click to select</span>`),T_=V(`<button class="p-1.5 hover:bg-hover rounded transition-colors flex items-center gap-1 text-xs text-fg-muted" title="Reset zoom"><!> Reset</button>`),E_=V(`<div class="absolute left-0 right-0"></div>`),D_=V(`<div class="flex items-center gap-1 mt-1 text-danger"><!> <span>Error</span></div>`),O_=V(`<div class="absolute z-50 pointer-events-none"><div class="bg-surface text-fg text-xs rounded-md shadow-lg p-2 max-w-[200px]"><div class="font-medium truncate mb-1"> </div> <div class="flex items-center gap-2 text-fg-muted"><span> </span> <span>|</span> <span> </span></div> <!></div></div>`),k_=V(`<div class="flex items-center gap-1"><div></div> <span class="text-fg-muted"> </span></div>`),A_=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between px-3 py-2 border-b border-line bg-subtle"><div class="text-xs text-fg-muted"><!></div> <div class="flex items-center gap-1"><!></div></div> <div class="flex-1 overflow-auto p-4 relative" role="presentation"><div class="relative w-full"></div> <!></div> <div class="flex items-center gap-4 px-3 py-2 border-t border-line bg-subtle text-xs"><span class="text-fg-subtle font-medium">Kind:</span> <!> <div class="flex items-center gap-1 ml-2"><div class="w-3 h-3 rounded-sm bg-red-500"></div> <span class="text-fg-muted">ERROR</span></div></div></div>`);function j_(e,t){it(t,!0);let n=(e,n=p,r=p,i=p)=>{let a=M(()=>{let{span:e,x:t,width:r}=n();return{span:e,x:t,width:r}});var o=la(),s=I(o),c=e=>{var n=S_(),i=M(()=>bg(()=>f(z(a).span.spanId))),o=F(n),s=e=>{var t=x_(),n=F(t),r=F(n,!0);D(n),D(t),R(()=>U(r,z(a).span.name)),H(e,t)};W(o,e=>{z(a).width>5&&e(s)}),D(n),R((e,t)=>{q(n,1,e),oo(n,`left: ${z(a).x??``}%; width: ${z(a).width??``}%; height: 24px; min-width: 4px;`),J(n,`title`,t)},[()=>K($(`absolute cursor-pointer transition-all`,y_(z(a).span),r()&&b_(z(a).span),`rounded-sm`)),()=>`${z(a).span.name}: ${ad(z(a).span.duration)}`]),B(`click`,n,()=>f(z(a).span.spanId)),B(`keydown`,n,function(...e){z(i)?.apply(this,e)}),B(`dblclick`,n,()=>t.onSpanSelect?.(z(a).span)),B(`mousemove`,n,e=>h(e,z(a).span)),$i(`mouseleave`,n,g),H(e,n)};W(s,e=>{z(a).width<=0||z(a).x<0||e(c)}),H(e,o)},r=N(_r({focusedSpanId:null})),i=N(null),a=N(_r({x:0,y:0})),o=N(void 0),s=M(()=>h_(t.trace.spans,t.trace)),c=M(()=>z(r).focusedSpanId?v_(z(s),z(r).focusedSpanId,t.trace.spans):z(s)),l=M(()=>g_(z(c))),u=M(()=>__(z(c))),d=M(()=>{let e=new Map;for(let t of z(l))if(t.width>0){let n=e.get(t.depth)||[];n.push(t),e.set(t.depth,n)}return e}),f=e=>{P(r,{focusedSpanId:e},!0)},m=()=>{P(r,{focusedSpanId:null},!0)},h=(e,t)=>{if(z(o)){let t=z(o).getBoundingClientRect();P(a,{x:e.clientX-t.left,y:e.clientY-t.top},!0)}P(i,t,!0)},g=()=>{P(i,null)},v=M(()=>(z(u)+1)*26+20);var y=A_(),b=F(y),x=F(b),S=F(x),C=e=>{var n=C_(),i=L(F(n),2),a=F(i,!0);D(i),D(n),R(e=>U(a,e),[()=>t.trace.spans.find(e=>e.spanId===z(r).focusedSpanId)?.name]),H(e,n)},w=e=>{H(e,w_())};W(S,e=>{z(r).focusedSpanId?e(C):e(w,-1)}),D(x);var T=L(x,2),ee=F(T),te=e=>{var t=T_();hh(F(t),{size:14}),Ke(),D(t),B(`click`,t,m),H(e,t)};W(ee,e=>{z(r).focusedSpanId&&e(te)}),D(T),D(b);var ne=L(b,2),re=F(ne);G(re,21,()=>[...z(d).entries()],([e,t])=>e,(e,r)=>{var a=M(()=>_(z(r),2));let o=()=>z(a)[0],s=()=>z(a)[1];var c=E_();G(c,21,s,e=>e.span.spanId,(e,r)=>{n(e,()=>z(r),()=>t.selectedSpanId===z(r).span.spanId,()=>z(i)?.spanId===z(r).span.spanId)}),D(c),R(()=>oo(c,`top: ${o()*26}px;`)),H(e,c)}),D(re);var ie=L(re,2),ae=e=>{var t=O_(),n=F(t),r=F(n),s=F(r,!0);D(r);var c=L(r,2),l=F(c),u=F(l,!0);D(l);var d=L(l,4),f=F(d,!0);D(d),D(c);var p=L(c,2),m=e=>{var t=D_();kp(F(t),{size:10}),Ke(2),D(t),H(e,t)};W(p,e=>{z(i).status.code===`ERROR`&&e(m)}),D(n),D(t),R((e,n)=>{oo(t,`left: ${e??``}px; top: ${z(a).y+10}px;`),U(s,z(i).name),U(u,n),U(f,z(i).kind)},[()=>Math.min(z(a).x+10,(z(o)?.clientWidth||300)-220),()=>ad(z(i).duration)]),H(e,t)};W(ie,e=>{z(i)&&e(ae)}),D(ne),Vo(ne,e=>P(o,e),()=>z(o));var oe=L(ne,2);G(L(F(oe),2),16,()=>[`SERVER`,`CLIENT`,`INTERNAL`,`PRODUCER`,`CONSUMER`],e=>e,(e,t)=>{var n=k_(),r=F(n),i=L(r,2),a=F(i,!0);D(i),D(n),R(e=>{q(r,1,e),U(a,t)},[()=>K($(`w-3 h-3 rounded-sm`,t===`SERVER`&&`bg-blue-500`,t===`CLIENT`&&`bg-green-500`,t===`PRODUCER`&&`bg-purple-500`,t===`CONSUMER`&&`bg-orange-500`,t===`INTERNAL`&&`bg-gray-500`))]),H(e,n)}),Ke(2),D(oe),D(y),R(()=>oo(re,`height: ${z(v)??``}px; min-width: 100%;`)),$i(`mouseleave`,ne,g),H(e,y),at()}ea([`click`,`keydown`,`dblclick`,`mousemove`]);function M_(e){if(typeof e==`object`&&e)return e;if(typeof e!=`string`)return null;let t=e.trim();if(t.length<2)return null;let n=t[0];if(n!==`{`&&n!==`[`)return null;try{let e=JSON.parse(t);return typeof e==`object`&&e?e:null}catch{return null}}var N_=V(`<div class="relative group"><!> <button title="Copy"><!></button></div>`);function P_(e,t){it(t,!0);let n=N(!1);async function r(){try{await navigator.clipboard.writeText(t.content),P(n,!0),setTimeout(()=>P(n,!1),2e3)}catch(e){console.error(`Failed to copy:`,e)}}var i=N_(),a=F(i);La(a,()=>t.children);var o=L(a,2),s=F(o),c=e=>{xp(e,{size:14,class:`text-success`})},l=e=>{zp(e,{size:14,class:`text-fg-muted`})};W(s,e=>{z(n)?e(c):e(l,-1)}),D(o),D(i),R(e=>q(o,1,e),[()=>K($(`absolute top-2 right-2 p-1.5 rounded-md`,`bg-surface border border-line shadow-sm`,`opacity-0 group-hover:opacity-100 transition-opacity`,`hover:bg-subtle`))]),B(`click`,o,r),H(e,i),at()}ea([`click`]);var F_=V(`<button type="button" class="absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-fg-subtle hover:text-fg-muted"><!></button>`),I_=V(`<div><!> <input/> <!></div>`);function L_(e,t){it(t,!0);let n=Z(t,`value`,15),r=Z(t,`clearTitle`,3,`Clear filter`),i=Z(t,`class`,3,`flex-1`),a=Z(t,`inputClass`,3,`border-line focus:border-line`),o=Z(t,`ref`,15,null);function s(e){n(e),t.onValue?.(e)}var c=I_(),l=F(c);Ch(l,{size:12,class:`absolute left-2 top-1/2 -translate-y-1/2 text-fg-subtle`});var u=L(l,2);xo(u),Vo(u,e=>o(e),()=>o());var d=L(u,2),f=e=>{var t=F_();rg(F(t),{size:12}),D(t),R(()=>J(t,`title`,r())),B(`click`,t,()=>s(``)),H(e,t)};W(d,e=>{n()&&e(f)}),D(c),R((e,r)=>{q(c,1,e),So(u,n()),J(u,`placeholder`,t.placeholder),J(u,`aria-label`,t.ariaLabel),q(u,1,r)},[()=>K($(`relative`,i())),()=>K($(`w-full pl-7 pr-7 py-1 text-xs rounded border focus:outline-none`,a()))]),B(`input`,u,e=>s(e.currentTarget.value)),H(e,c),at()}ea([`input`,`click`]);function R_(e,t){return!e||t.some(t=>t!=null&&String(t).toLowerCase().includes(e))}var z_=V(`<span class="text-fg-subtle"> </span>`),B_=V(`<div class="flex gap-1 leading-5"><!> <span> </span></div>`),V_=V(`<span class="text-fg-subtle opacity-70"> </span>`),H_=V(`<div class="pl-3 ml-1 border-l border-line-subtle"><!> <div class="text-fg-subtle"> </div></div>`),U_=V(`<div class="leading-5"><button class="inline-flex items-center gap-1 hover:bg-hover rounded px-0.5"><!> <!> <span class="text-fg-subtle"> </span> <!></button> <!></div>`);function W_(e,t){it(t,!0);function n(e){if(e===null)return`text-fg-subtle`;switch(typeof e){case`string`:return`text-green-600`;case`number`:return`text-blue-600`;case`boolean`:return`text-purple-600`;default:return`text-fg`}}function r(e){return e===null?`null`:typeof e==`string`?`"${e}"`:String(e)}let i=M(()=>t.value!==null&&typeof t.value==`object`),a=N(t.depth<2),o=M(()=>Array.isArray(t.value)),s=M(()=>z(o)?t.value.map((e,t)=>[String(t),e]):Object.entries(t.value)),c=M(()=>z(o)?`[`:`{`),l=M(()=>z(o)?`]`:`}`),u=M(()=>`${z(s).length} ${z(o)?`items`:`keys`}`);var d=la(),f=I(d),p=e=>{var i=B_(),a=F(i),o=e=>{var n=z_(),r=F(n);D(n),R(()=>U(r,`${t.label??``}:`)),H(e,n)};W(a,e=>{t.label!==void 0&&e(o)});var s=L(a,2),c=F(s,!0);D(s),D(i),R((e,t)=>{q(s,1,e),U(c,t)},[()=>K($(`break-all`,n(t.value))),()=>r(t.value)]),H(e,i)},m=e=>{var n=U_(),r=F(n),i=F(r),o=e=>{Cp(e,{size:10})},d=e=>{Dp(e,{size:10})};W(i,e=>{z(a)?e(o):e(d,-1)});var f=L(i,2),p=e=>{var n=z_(),r=F(n);D(n),R(()=>U(r,`${t.label??``}:`)),H(e,n)};W(f,e=>{t.label!==void 0&&e(p)});var m=L(f,2),h=F(m,!0);D(m);var g=L(m,2),v=e=>{var t=V_(),n=F(t,!0);D(t),R(()=>U(n,z(u))),H(e,t)};W(g,e=>{z(a)||e(v)}),D(r);var y=L(r,2),b=e=>{var n=H_(),r=F(n);G(r,17,()=>z(s),([e,t])=>e,(e,n)=>{var r=M(()=>_(z(n),2));let i=()=>z(r)[0],a=()=>z(r)[1];{let n=M(()=>t.depth+1);W_(e,{get label(){return i()},get value(){return a()},get depth(){return z(n)}})}});var i=L(r,2),a=F(i,!0);D(i),D(n),R(()=>U(a,z(l))),H(e,n)};W(y,e=>{z(a)&&e(b)}),D(n),R(()=>U(h,z(a)?z(c):`${z(c)}…${z(l)}`)),B(`click`,r,()=>P(a,!z(a))),H(e,n)};W(f,e=>{z(i)?e(m,-1):e(p)}),H(e,d),at()}ea([`click`]);var G_=V(`<div class="font-mono text-xs text-fg"><!></div>`);function K_(e,t){var n=G_();W_(F(n),{get value(){return t.data},depth:0}),D(n),H(e,n)}var q_=V(`<button type="button" class="font-mono text-accent hover:underline truncate flex-1 text-left cursor-pointer"> </button>`),J_=V(`<code class="font-mono text-fg-muted truncate flex-1"> </code>`),Y_=V(`<div class="flex items-center gap-2"><span class="text-fg-subtle w-24 flex-shrink-0"> </span> <!> <button class="p-1 hover:bg-hover rounded transition-colors flex-shrink-0" title="Copy to clipboard"><!></button></div>`);function X_(e,t){let n=N(!1),r=async()=>{await navigator.clipboard.writeText(t.value),P(n,!0),setTimeout(()=>P(n,!1),2e3)};var i=Y_(),a=F(i),o=F(a);D(a);var s=L(a,2),c=e=>{var n=q_(),r=F(n,!0);D(n),R(()=>{J(n,`title`,t.activateTitle??`Open`),U(r,t.value)}),B(`click`,n,function(...e){t.onActivate?.apply(this,e)}),H(e,n)},l=e=>{var n=J_(),r=F(n,!0);D(n),R(()=>U(r,t.value)),H(e,n)};W(s,e=>{t.onActivate?e(c):e(l,-1)});var u=L(s,2),d=F(u),f=e=>{xp(e,{size:12,class:`text-success`})},p=e=>{zp(e,{size:12,class:`text-fg-subtle`})};W(d,e=>{z(n)?e(f):e(p,-1)}),D(u),D(i),R(()=>U(o,`${t.label??``}:`)),B(`click`,u,r),H(e,i)}ea([`click`]);var Z_=V(`<button type="button"><!></button>`);function Q_(e,t){it(t,!0);let n=Z(t,`label`,3,`Copy`),r=Z(t,`size`,3,12),i=Z(t,`class`,3,``),a=Z(t,`stop`,3,!0),o=N(!1);async function s(e){a()&&(e.stopPropagation(),e.preventDefault());try{await navigator.clipboard.writeText(t.value),P(o,!0),setTimeout(()=>P(o,!1),1500)}catch(e){console.error(`[autotel-devtools] copy failed:`,e)}}var c=Z_(),l=F(c),u=e=>{xp(e,{get size(){return r()},class:`text-success`})},d=e=>{zp(e,{get size(){return r()}})};W(l,e=>{z(o)?e(u):e(d,-1)}),D(c),R(e=>{J(c,`title`,z(o)?`Copied!`:n()),J(c,`aria-label`,n()),q(c,1,e)},[()=>K($(`inline-flex items-center justify-center p-1 rounded flex-shrink-0`,`text-fg-subtle hover:text-fg hover:bg-hover transition-colors`,i()))]),B(`click`,c,s),H(e,c),at()}ea([`click`]);function $_(e){return`'${e.replaceAll(`'`,`'\\''`)}'`}function ev(e){if(typeof e==`string`&&e.length>0)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e)}function tv(e){let t=ev(e[`url.full`])??ev(e[`http.url`]);if(t)return t;let n=ev(e[`server.address`])??ev(e[`net.peer.name`]),r=ev(e[`url.path`])??ev(e[`http.target`]);if(!n||!r)return;let i=ev(e[`url.scheme`])??`https`,a=ev(e[`server.port`]),o=ev(e[`url.query`]);return`${i}://${a&&a!==`80`&&a!==`443`?`${n}:${a}`:n}${r}${o?`?${o}`:``}`}function nv(e){let t=e.attributes??{},n=ev(t[`http.request.method`])??ev(t[`http.method`]),r=tv(t);if(!n||!r)return null;let i=[`curl -X ${n.toUpperCase()}`,$_(r)],a=Object.entries(t).filter(([e])=>e.startsWith(`http.request.header.`)).sort(([e],[t])=>e.localeCompare(t));for(let[e,t]of a){let n=e.slice(20),r=Array.isArray(t)?t.map(String).join(`, `):ev(t);r&&i.push(`-H ${$_(`${n}: ${r}`)}`)}return i.join(` `)}var rv={count:`autotel.schema.violations`,severity:`autotel.schema.violation.severity`,codes:`autotel.schema.violation.codes`};function iv(e){let t=e.attributes??{},n=t[rv.count],r=typeof n==`number`?n:Number(n);if(!Number.isFinite(r)||r<=0)return null;let i=t[rv.codes];return{count:r,severity:t[rv.severity]===`error`?`error`:`warning`,codes:Array.isArray(i)?i.map(String):[]}}var av=[`code.filepath`,`code.file.path`],ov=[`code.lineno`,`code.line.number`],sv=[`code.column`,`code.column.number`],cv=[`code.function`,`code.function.name`];function lv(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function uv(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t)))return Number(t)}}function dv(e,t,n,r){if(e===`webstorm`){let e=`jetbrains://web-storm/navigate/reference?path=${encodeURIComponent(t)}`;return n!==void 0&&(e+=`&line=${n}`),e}let i=`${e}://file/${t.replace(/^\//,``)}`;return n!==void 0&&(i+=`:${n}`,r!==void 0&&(i+=`:${r}`)),i}function fv(e,t){let n=lv(e,av);if(!n)return null;let r=uv(e,ov),i=uv(e,sv),a=lv(e,cv),o=lv(e,[`code.namespace`]),s=n.split(/[/\\]/).pop()||n;return{filepath:n,line:r,column:i,functionName:a,namespace:o,display:r===void 0?s:`${s}:${r}`,href:dv(t,n,r,i)}}function pv(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function mv(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t)))return Number(t)}}function hv(e){let t=pv(e,[`db.system`,`db.system.name`]),n=pv(e,[`db.statement`,`db.query.text`]);return!t&&!n?null:{system:t,statement:n,operation:pv(e,[`db.operation`,`db.operation.name`]),table:pv(e,[`db.sql.table`,`db.collection.name`]),dbName:pv(e,[`db.name`,`db.namespace`]),rowCount:mv(e,[`db.response.returned_rows`,`db.rows_affected`])}}var gv=new Set(`select.from.where.insert.into.values.update.set.delete.join.left.right.inner.outer.full.cross.on.and.or.not.in.is.null.as.order.by.group.having.limit.offset.distinct.union.all.returning.with.using.between.like.asc.desc.count.case.when.then.else.end.exists.create.table.alter.drop.index`.split(`.`)),_v=/('(?:[^']|'')*'|[A-Za-z_][A-Za-z0-9_]*|[^A-Za-z_']+)/g;function vv(e){let t=[];for(let[n]of e.matchAll(_v))n.startsWith(`'`)?t.push({text:n,kind:`string`}):/^[A-Za-z_]/.test(n)&&gv.has(n.toLowerCase())?t.push({text:n,kind:`keyword`}):t.push({text:n,kind:`text`});return t}var yv=(e,t=p,n=p,r=p)=>{let i=M(()=>Sv.test(t())),a=M(()=>Cv.some(e=>t().startsWith(e))),o=M(()=>z(i)?null:M_(n()));var s=la(),c=I(s),l=e=>{var n=Ov(),r=F(n),i=F(r),s=F(i,!0);D(i);var c=L(i,2),l=L(c,2),u=e=>{var t=Dv();q(t,1,K(Ev)),H(e,t)};W(l,e=>{z(a)&&e(u)}),D(r);var d=L(r,2);K_(F(d),{get data(){return z(o)}}),D(d),D(n),R(e=>{U(s,t()),q(c,1,e)},[()=>K($(Tv,`bg-amber-500/15 text-amber-600 border-amber-500/30`))]),H(e,n)},u=e=>{let o=M(()=>wv(n())),s=M(()=>String(n()));var c=Av(),l=F(c),u=F(l),d=F(u,!0);D(u);var f=L(u,2),p=F(f,!0);D(f);var m=L(f,2),h=e=>{var t=Dv();q(t,1,K(Ev)),H(e,t)};W(m,e=>{z(a)&&!z(i)&&e(h)});var g=L(m,2),_=e=>{var n=kv();Fm(F(n),{size:10,class:`text-fg-subtle`}),D(n),B(`click`,n,()=>r()({key:t(),value:z(s)})),H(e,n)};W(g,e=>{!z(i)&&z(s).length>60&&e(_)}),D(l);var v=L(l,2),y=F(v,!0);D(v),D(c),R(e=>{J(u,`title`,t()),U(d,t()),q(f,1,e),U(p,z(i)?`sensitive`:z(o).label),U(y,z(i)?`[redacted]`:z(s))},[()=>K($(Tv,z(o).cls))]),H(e,c)};W(c,e=>{z(o)===null?e(u,-1):e(l)}),H(e,s)},bv=(e,t=p,n=p,r=p,i=p,a=p)=>{var o=Mv(),s=F(o),c=F(s);La(F(c),n),D(c);var l=L(c,2),u=F(l,!0);D(l);var d=L(l,2);{let e=M(()=>$(`text-fg-subtle transition-transform`,r()&&`rotate-180`));Cp(d,{size:14,get class(){return z(e)}})}D(s);var f=L(s,2),m=e=>{var t=jv();La(F(t),a),D(t),H(e,t)};W(f,e=>{r()&&e(m)}),D(o),R(()=>U(u,t())),B(`click`,s,function(...e){i()?.apply(this,e)}),H(e,o)},xv=(e,t=p,n=p,r=p)=>{var i=Nv(),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(i),R(()=>{J(i,`title`,r()),U(o,t()),U(c,n())}),H(e,i)},Sv=/(password|secret|token|authorization|api[-_.]?key)/i,Cv=[`service.`,`deployment.`,`host.`,`container.`,`process.`];function wv(e){return e==null?{label:`null`,cls:`bg-hover text-fg-subtle border-line`}:Array.isArray(e)?{label:`array`,cls:`bg-amber-500/15 text-amber-600 border-amber-500/30`}:typeof e==`string`?{label:`string`,cls:`bg-green-500/15 text-green-600 border-green-500/30`}:typeof e==`number`?{label:`number`,cls:`bg-blue-500/15 text-blue-600 border-blue-500/30`}:typeof e==`boolean`?{label:`boolean`,cls:`bg-purple-500/15 text-purple-600 border-purple-500/30`}:{label:`object`,cls:`bg-stone-500/15 text-stone-600 border-stone-500/30`}}var Tv=`text-[9px] px-1.5 py-px rounded border font-mono flex-shrink-0`,Ev=`${Tv} bg-hover text-fg-subtle border-line`,Dv=V(`<span>resource</span>`),Ov=V(`<div class="py-1 border-b border-line-subtle last:border-b-0"><div class="flex items-center gap-2"><span class="text-fg-subtle font-medium"> </span> <span>json</span> <!></div> <div class="mt-1"><!></div></div>`),kv=V(`<button class="ml-auto p-0.5 hover:bg-hover rounded flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity" title="View full value"><!></button>`),Av=V(`<div class="group py-1 border-b border-line-subtle last:border-b-0"><div class="flex items-center gap-2 min-w-0"><span class="text-fg-subtle font-medium truncate"> </span> <span> </span> <!> <!></div> <div class="mt-0.5 text-fg leading-snug at-wrap-anywhere"> </div></div>`),jv=V(`<div class="px-4 pb-3"><!></div>`),Mv=V(`<div class="border-b border-line-subtle"><button class="w-full flex items-center gap-2 px-4 py-3 hover:bg-subtle transition-colors"><span class="text-fg-subtle"><!></span> <span class="text-xs font-medium text-fg-muted flex-1 text-left"> </span> <!></button> <!></div>`),Nv=V(`<div><div class="text-fg-subtle mb-0.5"> </div> <div class="font-mono font-medium text-fg"> </div></div>`),Pv=V(`<span class="px-2 py-0.5 rounded bg-hover text-fg-subtle text-xs font-mono" title="Instrumentation scope"> </span>`),Fv=V(`<div class="grid grid-cols-2 gap-3 text-xs"><!> <!> <!> <!> <!></div>`),Iv=V(`<div class="mx-4 mt-4 p-3 bg-danger-bg border border-danger-border rounded-md"><div class="flex items-start gap-2"><!> <div class="text-xs text-danger"><span class="font-medium">Error:</span> </div></div></div>`),Lv=V(`<li class="font-mono text-[11px] text-fg-muted"> </li>`),Rv=V(`<p class="mt-1 text-[11px] text-fg-subtle"> </p>`),zv=V(`<div><div class="mb-1 flex items-center gap-1.5"><!> <span class="text-xs font-medium text-fg"> </span></div> <ul class="space-y-0.5"></ul> <!></div>`),Bv=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="mb-1 flex items-center justify-between gap-2"><span class="text-[11px] uppercase tracking-wide text-fg-muted">Reproduce</span> <!></div> <code class="block overflow-x-auto whitespace-pre rounded bg-subtle px-2 py-1 text-[11px] text-fg-muted"> </code> <p class="mt-1 text-[11px] text-fg-subtle">Rebuilt from span attributes. Headers appear only if captured; the
|
|
3
|
+
body is never recorded.</p></div>`),Vv=V(`<option> </option>`),Hv=V(`<div class="mt-1 text-[11px] text-fg-subtle font-mono"> </div>`),Uv=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted flex-1">Code Location</span> <select class="text-[10px] bg-subtle border border-line rounded px-1 py-0.5 text-fg-muted" title="Editor to open source files in"></select></div> <a class="group flex items-center gap-2 text-xs font-mono text-accent hover:underline break-all"><!> <span class="break-all"> </span></a> <!> <div class="mt-1 text-[10px] text-fg-subtle break-all"> </div></div>`),Wv=V(`<span class="text-[10px] px-1.5 py-px rounded border font-mono bg-indigo-500/15 text-indigo-600 border-indigo-500/30"> </span>`),Gv=V(`<div class="grid grid-cols-2 gap-2 text-xs mb-2"><!> <!> <!> <!></div>`),Kv=V(`<span> </span>`),qv=V(`<pre class="bg-subtle rounded p-2.5 border border-line font-mono text-[11px] text-fg whitespace-pre-wrap break-all overflow-auto max-h-[240px]"></pre>`),Jv=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted flex-1">Database</span> <!></div> <!> <!></div>`),Yv=V(`<div class="flex items-center gap-2"><span class="text-fg-subtle">Parent:</span> <span class="font-medium text-fg"> </span></div>`),Xv=V(`<div class="text-fg-muted truncate"> </div>`),Zv=V(`<div class="text-fg-subtle"> </div>`),Qv=V(`<div><span class="text-fg-subtle"> </span> <div class="mt-1 space-y-1 pl-2"><!> <!></div></div>`),$v=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted">Relationships</span></div> <div class="space-y-2 text-xs"><!> <!></div></div>`),ey=V(`<div class="text-fg-subtle py-2 text-center">No matches</div>`),ty=V(`<div class="bg-subtle rounded p-3 border border-line font-mono text-xs h-[300px] min-h-[120px] overflow-auto resize-y" title="Drag bottom edge to resize"><!></div>`),ny=V(`<!> <!>`,1),ry=V(`<div class="font-mono text-[11px] text-fg-muted mt-1"><pre class="whitespace-pre-wrap break-words"> </pre></div>`),iy=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="flex items-center justify-between mb-1"><span class="font-medium text-xs text-fg"> </span> <span class="text-[10px] text-fg-subtle"> </span></div> <!></div>`),ay=V(`<div class="space-y-2"></div>`),oy=V(`<span></span>`),sy=V(`<div class="mt-1.5 pt-1.5 border-t border-line"><div class="font-mono text-[10px] text-fg-subtle"> </div></div>`),cy=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="flex items-center gap-2 text-xs mb-1"><span class="text-fg-subtle">Trace:</span> <button type="button" title="Open linked span in the Traces waterfall" class="font-mono text-accent hover:underline text-[11px] truncate text-left cursor-pointer"> </button> <!></div> <div class="flex items-center gap-2 text-xs"><span class="text-fg-subtle">Span:</span> <button type="button" title="Open linked span in the Traces waterfall" class="font-mono text-accent hover:underline text-[11px] truncate text-left cursor-pointer"> </button> <!></div> <!></div>`),ly=V(`<div class="space-y-1.5"></div>`),uy=V(`<span class="text-[10px] text-accent font-medium">this span</span>`),dy=V(`<div><div class="flex items-center gap-2 mb-0.5"><span> </span> <!> <span class="text-fg-subtle text-[10px] ml-auto"> </span></div> <div class="text-fg-muted break-all line-clamp-2"> </div></div>`),fy=V(`<div class="border-b border-line-subtle"><div class="flex items-center gap-2 px-4 py-3"><!> <span class="text-xs font-medium text-fg-muted"> </span></div> <div class="px-4 pb-3"><div class="space-y-1.5 max-h-[200px] overflow-auto"></div></div></div>`),py=V(`<div class="fixed inset-0 z-[1200] flex items-center justify-center" role="dialog" aria-modal="true"><div class="absolute inset-0 bg-black/60 backdrop-blur-[2px] at-backdrop-in"></div> <div class="at-modal-in relative z-[1] w-[min(700px,92vw)] max-h-[85vh] flex flex-col bg-surface rounded-lg shadow-xl border border-line overflow-hidden"><div class="flex items-center justify-between px-4 py-2.5 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-mono font-semibold text-fg-muted truncate"> </span> <button class="p-1 hover:bg-hover rounded transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-auto p-4"><pre class="font-mono text-xs text-fg whitespace-pre-wrap break-all"> </pre></div></div></div>`),my=V(`<div class="flex flex-col h-full bg-surface border-l border-line"><div class="flex items-start justify-between gap-3 px-4 py-3 border-b border-line bg-subtle"><div class="flex-1 min-w-0"><h3 class="font-semibold text-sm text-fg truncate mb-1"> </h3> <div class="flex items-center gap-2 flex-wrap"><span> </span> <span class="px-2 py-0.5 rounded bg-hover text-fg-muted text-xs font-medium"> </span> <!></div></div> <button class="p-1.5 hover:bg-hover rounded-md transition-colors flex-shrink-0" title="Close"><!></button></div> <div class="flex-1 overflow-auto"><!> <!> <!> <!> <div class="px-4 py-3 border-b border-line-subtle"><div class="space-y-2 text-xs"><!> <!> <!></div></div> <div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted">Resource</span></div> <div class="grid grid-cols-2 gap-3 text-xs"><!> <!> <!> <!></div></div> <!> <!> <!> <!> <!> <!> <!></div> <!></div>`);function hy(e,t){it(t,!0);let n=[{value:`vscode`,label:`VS Code`},{value:`cursor`,label:`Cursor`},{value:`webstorm`,label:`WebStorm`}],r=M(()=>nv(t.span)),i=M(()=>iv(t.span)),a=N(_r({timing:!0,attributes:!0,events:!1,links:!1})),o=N(null),s=e=>{P(a,{...z(a),[e]:!z(a)[e]},!0)},c=M(()=>t.span.status.code===`ERROR`),l=M(()=>Object.keys(t.span.attributes||{}).length>0),u=M(()=>t.span.events&&t.span.events.length>0),d=M(()=>t.span.links&&t.span.links.length>0),f=M(()=>ms(t.span,t.trace.service)),p=M(()=>hs(t.span.attributes,z(f))),m=M(()=>Object.entries(t.span.attributes||{}).filter(([e])=>e.startsWith(`service.`)||e.startsWith(`deployment.`)||e.startsWith(`host.`)||e.startsWith(`container.`)||e.startsWith(`process.`))),h=M(()=>Object.entries(t.span.attributes||{}).sort(([e],[t])=>e.localeCompare(t))),g=N(``),v=M(()=>{let e=z(g).trim().toLowerCase();return e?z(h).filter(([t,n])=>R_(e,[t,n])):z(h)}),y=M(()=>z(g).trim().length>0),b=M(()=>fv(t.span.attributes||{},Zc.value)),x=M(()=>hv(t.span.attributes||{})),S=M(()=>z(x)?.statement?vv(z(x).statement):[]),C=M(()=>kg(t.span,t.trace.spans.filter(e=>e.parentSpanId===t.span.spanId))),w=M(()=>t.span.startTime-t.trace.startTime),T=M(()=>t.span.endTime-t.trace.startTime),ee=M(()=>t.trace.spans.find(e=>e.spanId===t.span.parentSpanId)),te=M(()=>t.trace.spans.filter(e=>e.parentSpanId===t.span.spanId)),ne=M(()=>t.trace.spans.find(e=>!e.parentSpanId)),re=e=>Nu(t.trace.traceId,e),ie=M(()=>dl.value),ae=M(()=>z(ie).filter(e=>e.traceId===t.trace.traceId));var oe=my(),se=F(oe),ce=F(se),le=F(ce),E=F(le,!0);D(le);var ue=L(le,2),de=F(ue),fe=F(de,!0);D(de);var pe=L(de,2),me=F(pe,!0);D(pe);var he=L(pe,2),ge=e=>{var n=Pv(),r=F(n);D(n),R(()=>U(r,`${t.span.scope.name??``}
|
|
4
|
+
${t.span.scope.version?`@${t.span.scope.version}`:``}`)),H(e,n)};W(he,e=>{t.span.scope?.name&&e(ge)}),D(ue),D(ce);var _e=L(ce,2);rg(F(_e),{size:16,class:`text-fg-subtle`}),D(_e),D(se);var ve=L(se,2);{let e=e=>{Np(e,{size:14})},c=e=>{var n=Fv(),r=F(n);{let e=M(()=>ad(t.span.duration));xv(r,()=>`Duration`,()=>z(e))}var i=L(r,2);{let e=M(()=>ad(z(C)));xv(i,()=>`Self time`,()=>z(e),()=>`Time in this span excluding its children`)}var a=L(i,2);{let e=M(()=>ad(z(w)));xv(a,()=>`Start (relative)`,()=>z(e))}var o=L(a,2);{let e=M(()=>ad(z(T)));xv(o,()=>`End (relative)`,()=>z(e))}var s=L(o,2);{let e=M(()=>Pg(t.span.startTime,Hu.value));xv(s,()=>`Start Time`,()=>z(e))}D(n),H(e,n)};var ye=F(ve),be=e=>{var n=Iv(),r=F(n),i=F(r);kp(i,{size:14,class:`text-danger flex-shrink-0 mt-0.5`});var a=L(i,2),o=L(F(a));D(a),D(r),D(n),R(()=>U(o,` ${t.span.status.message??``}`)),H(e,n)};W(ye,e=>{t.span.status.message&&e(be)});var xe=L(ye,2);bv(xe,()=>`Timing`,()=>e,()=>z(a).timing,()=>()=>s(`timing`),()=>c);var Se=L(xe,2),Ce=e=>{var t=zv(),n=F(t),r=F(n);{let e=M(()=>z(i).severity===`error`?`text-danger`:`text-warning`);Gh(r,{size:13,get class(){return z(e)}})}var a=L(r,2),o=F(a);D(a),D(n);var s=L(n,2);G(s,20,()=>z(i).codes,e=>e,(e,t)=>{var n=Lv(),r=F(n,!0);D(n),R(()=>U(r,t)),H(e,n)}),D(s);var c=L(s,2),l=e=>{var t=Rv(),n=F(t);D(t),R(()=>U(n,`${z(i).count-z(i).codes.length} more not listed on the span.`)),H(e,t)};W(c,e=>{z(i).count>z(i).codes.length&&e(l)}),D(t),R(()=>{q(t,1,K(z(i).severity===`error`?`border-b border-line-subtle bg-danger/5 px-4 py-3`:`border-b border-line-subtle bg-warning/5 px-4 py-3`)),U(o,`${z(i).count??``}
|
|
5
|
+
${z(i).count===1?`contract violation`:`contract violations`}`)}),H(e,t)};W(Se,e=>{z(i)&&e(Ce)});var we=L(Se,2),Te=e=>{var t=Bv(),n=F(t);Q_(L(F(n),2),{get value(){return z(r)},label:`Copy as curl`}),D(n);var i=L(n,2),a=F(i,!0);D(i),Ke(2),D(t),R(()=>U(a,z(r))),H(e,t)};W(we,e=>{z(r)&&e(Te)});var Ee=L(we,2),De=F(Ee),Oe=F(De);X_(Oe,{label:`Span ID`,get value(){return t.span.spanId}});var ke=L(Oe,2);{let e=M(()=>z(ne)&&z(ne).spanId!==t.span.spanId?()=>re(z(ne).spanId):void 0);X_(ke,{label:`Trace ID`,get value(){return t.span.traceId},get onActivate(){return z(e)},activateTitle:`Go to root span`})}var Ae=L(ke,2),je=e=>{{let n=M(()=>z(ee)?()=>re(t.span.parentSpanId):void 0),r=M(()=>z(ee)?`Go to parent span`:`Parent span not captured in this trace`);X_(e,{label:`Parent Span ID`,get value(){return t.span.parentSpanId},get onActivate(){return z(n)},get activateTitle(){return z(r)}})}};W(Ae,e=>{t.span.parentSpanId&&e(je)}),D(De),D(Ee);var Me=L(Ee,2),Ne=F(Me);Lh(F(Ne),{size:14,class:`text-fg-subtle`}),Ke(2),D(Ne);var Pe=L(Ne,2),Fe=F(Pe);xv(Fe,()=>`Trace Service`,()=>t.trace.service);var Ie=L(Fe,2);xv(Ie,()=>`Derived Resource`,()=>z(f));var Le=L(Ie,2);xv(Le,()=>`Resource Type`,()=>z(p));var Re=L(Le,2);{let e=M(()=>String(z(m).length));xv(Re,()=>`Resource Attrs`,()=>z(e))}D(Pe),D(Me);var ze=L(Me,2),Be=e=>{var t=Uv(),r=F(t),i=F(r);Fp(i,{size:14,class:`text-fg-subtle`});var a=L(i,4);G(a,21,()=>n,e=>e.value,(e,t)=>{var n=Vv(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).label),i!==(i=z(t).value)&&(n.value=(n.__value=z(t).value)??``)}),H(e,n)}),D(a);var o;co(a),D(r);var s=L(r,2),c=F(s);Yp(c,{size:12,class:`flex-shrink-0`});var l=L(c,2),u=F(l,!0);D(l),D(s);var d=L(s,2),f=e=>{var t=Hv(),n=F(t);D(t),R(()=>U(n,`${z(b).namespace?`${z(b).namespace}.`:``}${z(b).functionName??``}()`)),H(e,t)};W(d,e=>{z(b).functionName&&e(f)});var p=L(d,2),m=F(p,!0);D(p),D(t),R(()=>{o!==(o=Zc.value)&&(a.value=(a.__value=Zc.value)??``,so(a,Zc.value)),J(s,`href`,z(b).href),J(s,`title`,`Open ${z(b).filepath}${z(b).line?`:${z(b).line}`:``}`),U(u,z(b).display),U(m,z(b).filepath)}),B(`change`,a,e=>Qc(e.currentTarget.value)),H(e,t)};W(ze,e=>{z(b)&&e(Be)});var Ve=L(ze,2),He=e=>{var t=Jv(),n=F(t),r=F(n);Up(r,{size:14,class:`text-fg-subtle`});var i=L(r,4),a=e=>{var t=Wv(),n=F(t,!0);D(t),R(()=>U(n,z(x).system)),H(e,t)};W(i,e=>{z(x).system&&e(a)}),D(n);var o=L(n,2),s=e=>{var t=Gv(),n=F(t),r=e=>{xv(e,()=>`Operation`,()=>z(x).operation)};W(n,e=>{z(x).operation&&e(r)});var i=L(n,2),a=e=>{xv(e,()=>`Table`,()=>z(x).table)};W(i,e=>{z(x).table&&e(a)});var o=L(i,2),s=e=>{xv(e,()=>`Database`,()=>z(x).dbName)};W(o,e=>{z(x).dbName&&e(s)});var c=L(o,2),l=e=>{{let t=M(()=>String(z(x).rowCount));xv(e,()=>`Rows`,()=>z(t))}};W(c,e=>{z(x).rowCount!==void 0&&e(l)}),D(t),H(e,t)};W(o,e=>{(z(x).operation||z(x).table||z(x).dbName||z(x).rowCount!==void 0)&&e(s)});var c=L(o,2),l=e=>{P_(e,{get content(){return z(x).statement},children:(e,t)=>{var n=qv();G(n,21,()=>z(S),Oa,(e,t)=>{var n=Kv(),r=F(n,!0);D(n),R(()=>{q(n,1,K(z(t).kind===`keyword`?`text-indigo-500 font-semibold`:z(t).kind===`string`?`text-green-500`:``)),U(r,z(t).text)}),H(e,n)}),D(n),H(e,n)},$$slots:{default:!0}})};W(c,e=>{z(x).statement&&e(l)}),D(t),H(e,t)};W(Ve,e=>{z(x)&&e(He)});var Ue=L(Ve,2),We=e=>{var t=$v(),n=F(t);Tm(F(n),{size:14,class:`text-fg-subtle`}),Ke(2),D(n);var r=L(n,2),i=F(r),a=e=>{var t=Yv(),n=L(F(t),2),r=F(n,!0);D(n),D(t),R(()=>U(r,z(ee).name)),H(e,t)};W(i,e=>{z(ee)&&e(a)});var o=L(i,2),s=e=>{var t=Qv(),n=F(t),r=F(n);D(n);var i=L(n,2),a=F(i);G(a,17,()=>z(te).slice(0,5),e=>e.spanId,(e,t)=>{var n=Xv(),r=F(n,!0);D(n),R(()=>U(r,z(t).name)),H(e,n)});var o=L(a,2),s=e=>{var t=Zv(),n=F(t);D(t),R(()=>U(n,`+${z(te).length-5} more`)),H(e,t)};W(o,e=>{z(te).length>5&&e(s)}),D(i),D(t),R(()=>U(r,`Children (${z(te).length??``}):`)),H(e,t)};W(o,e=>{z(te).length>0&&e(s)}),D(r),D(t),H(e,t)};W(Ue,e=>{(z(ee)||z(te).length>0)&&e(We)});var Ge=L(Ue,2),qe=e=>{let n=e=>{Lh(e,{size:14})},r=e=>{var n=ny(),r=I(n);L_(r,{class:`mb-2`,inputClass:`border-line bg-subtle text-fg focus:border-line focus-visible:ring-1 focus-visible:ring-accent`,placeholder:`Filter attributes by key or value…`,ariaLabel:`Filter attributes by key or value`,get value(){return z(g)},set value(e){P(g,e,!0)}});var i=L(r,2);{let e=M(()=>JSON.stringify(t.span.attributes,null,2));P_(i,{get content(){return z(e)},children:(e,t)=>{var n=ty(),r=F(n),i=e=>{H(e,ey())},a=e=>{var t=la();G(I(t),17,()=>z(v),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));yv(e,()=>z(n)[0],()=>z(n)[1],()=>e=>P(o,e,!0))}),H(e,t)};W(r,e=>{z(v).length===0?e(i):e(a,-1)}),D(n),H(e,n)},$$slots:{default:!0}})}H(e,n)};{let i=M(()=>z(y)?`Attributes (${z(v).length} of ${Object.keys(t.span.attributes).length})`:`Attributes (${Object.keys(t.span.attributes).length})`);bv(e,()=>z(i),()=>n,()=>z(a).attributes,()=>()=>s(`attributes`),()=>r)}};W(Ge,e=>{z(l)&&e(qe)});var Je=L(Ge,2),Ye=e=>{let n=e=>{Cm(e,{size:14})},r=e=>{var n=ay();G(n,21,()=>t.span.events,Oa,(e,n)=>{var r=iy(),i=F(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s);D(s),D(i);var l=L(i,2),u=e=>{{let t=M(()=>JSON.stringify(z(n).attributes,null,2));P_(e,{get content(){return z(t)},children:(e,t)=>{var r=ry(),i=F(r),a=F(i,!0);D(i),D(r),R(e=>U(a,e),[()=>JSON.stringify(z(n).attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},d=M(()=>z(n).attributes&&Object.keys(z(n).attributes).length>0);W(l,e=>{z(d)&&e(u)}),D(r),R(e=>{U(o,z(n).name),U(c,`+${e??``}`)},[()=>ad(z(n).timestamp-t.span.startTime)]),H(e,r)}),D(n),H(e,n)};bv(e,()=>`Events (${t.span.events.length})`,()=>n,()=>z(a).events,()=>()=>s(`events`),()=>r)};W(Je,e=>{z(u)&&e(Ye)});var Xe=L(Je,2),Ze=e=>{let n=e=>{km(e,{size:14})},r=e=>{var n=ly();G(n,21,()=>t.span.links,Oa,(e,t)=>{var n=cy(),r=F(n),i=L(F(r),2),a=F(i,!0);D(i),P_(L(i,2),{get content(){return z(t).traceId},children:(e,t)=>{H(e,oy())},$$slots:{default:!0}}),D(r);var o=L(r,2),s=L(F(o),2),c=F(s,!0);D(s),P_(L(s,2),{get content(){return z(t).spanId},children:(e,t)=>{H(e,oy())},$$slots:{default:!0}}),D(o);var l=L(o,2),u=e=>{var n=sy(),r=F(n),i=F(r,!0);D(r),D(n),R(e=>U(i,e),[()=>Object.entries(z(t).attributes).map(([e,t])=>`${e}: ${typeof t==`object`?JSON.stringify(t):t}`).join(`, `)]),H(e,n)},d=M(()=>z(t).attributes&&Object.keys(z(t).attributes).length>0);W(l,e=>{z(d)&&e(u)}),D(n),R(()=>{U(a,z(t).traceId),U(c,z(t).spanId)}),B(`click`,i,()=>Pu(z(t).traceId,z(t).spanId)),B(`click`,s,()=>Pu(z(t).traceId,z(t).spanId)),H(e,n)}),D(n),H(e,n)};bv(e,()=>`Links (${t.span.links.length})`,()=>n,()=>z(a).links,()=>()=>s(`links`),()=>r)};W(Xe,e=>{z(d)&&e(Ze)});var Qe=L(Xe,2),$e=e=>{var n=fy(),r=F(n),i=F(r);rm(i,{size:14,class:`text-fg-subtle`});var a=L(i,2),o=F(a);D(a),D(r);var s=L(r,2),c=F(s);G(c,23,()=>z(ae).slice(0,50),(e,t)=>e.id||t,(e,n)=>{let r=M(()=>z(n).spanId===t.span.spanId),i=M(()=>z(n).severityText||`INFO`),a=M(()=>z(i)===`ERROR`?`text-danger`:z(i)===`WARN`?`text-warning`:`text-fg-subtle`),o=M(()=>typeof z(n).body==`string`?z(n).body:JSON.stringify(z(n).body));var s=dy(),c=F(s),l=F(c),u=F(l,!0);D(l);var d=L(l,2),f=e=>{H(e,uy())};W(d,e=>{z(r)&&e(f)});var p=L(d,2),m=F(p,!0);D(p),D(c);var h=L(c,2),g=F(h,!0);D(h),D(s),R((e,t,n)=>{q(s,1,e),q(l,1,t),U(u,z(i)),U(m,n),U(g,z(o))},[()=>K($(`text-xs p-2 rounded border`,z(r)?`border-accent/30 bg-accent/10`:`border-line-subtle bg-subtle`)),()=>K($(`font-mono font-medium`,z(a))),()=>Pg(z(n).timestamp,Hu.value)]),H(e,s)}),D(c),D(s),D(n),R(()=>U(o,`Correlated Logs (${z(ae).length??``})`)),H(e,n)};W(Qe,e=>{z(ae).length>0&&e($e)}),D(ve)}var et=L(ve,2),tt=e=>{var t=py(),n=F(t),r=L(n,2),i=F(r),a=F(i),s=F(a,!0);D(a);var c=L(a,2);rg(F(c),{size:16,class:`text-fg-subtle`}),D(c),D(i);var l=L(i,2),u=F(l),d=F(u,!0);D(u),D(l),D(r),D(t),R(()=>{J(t,`aria-label`,`Full value for ${z(o).key}`),U(s,z(o).key),U(d,z(o).value)}),B(`click`,n,()=>P(o,null)),B(`click`,c,()=>P(o,null)),H(e,t)};W(et,e=>{z(o)&&e(tt)}),D(oe),R(e=>{U(E,t.span.name||`Unknown Span`),q(de,1,e),U(fe,t.span.status.code),U(me,t.span.kind)},[()=>K($(`px-2 py-0.5 rounded text-xs font-medium`,z(c)?`bg-danger-bg text-danger`:t.span.status.code===`OK`?`bg-success-bg text-success`:`bg-hover text-fg-muted`))]),B(`click`,_e,function(...e){t.onClose?.apply(this,e)}),H(e,oe),at()}ea([`click`,`change`]);var gy=V(`<div><div class="absolute inset-y-0 -left-1.5 -right-1.5"></div> <div></div></div>`);function _y(e,t){it(t,!0);var n=gy(),r=L(F(n),2);D(n),R((e,i)=>{J(n,`role`,t.role),J(n,`aria-orientation`,t[`aria-orientation`]),J(n,`aria-valuenow`,t[`aria-valuenow`]),J(n,`aria-valuemin`,t[`aria-valuemin`]),J(n,`tabindex`,t.tabIndex),J(n,`title`,t.title??`Drag to resize · double-click to reset`),q(n,1,e),q(r,1,i)},[()=>K($(`group relative z-10 shrink-0 cursor-col-resize self-stretch outline-none`,`w-px bg-hover`)),()=>K($(`absolute inset-y-0 -left-px w-0.5 transition-colors`,`group-hover:bg-accent group-focus-visible:bg-accent`,t.dragging&&`bg-accent`))]),B(`pointerdown`,n,function(...e){t.onPointerDown?.apply(this,e)}),B(`keydown`,n,function(...e){t.onKeyDown?.apply(this,e)}),B(`dblclick`,n,function(...e){t.onDblClick?.apply(this,e)}),H(e,n),at()}ea([`pointerdown`,`keydown`,`dblclick`]);function vy(e,t){e.preventDefault();let n=document.body.style.cursor,r=document.body.style.userSelect;document.body.style.cursor=t.cursor,document.body.style.userSelect=`none`,t.onStart?.();let i=e=>t.onMove(e),a=()=>{document.body.style.cursor=n,document.body.style.userSelect=r,window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),t.onEnd?.()};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)}function yy(e,t){if(!e)return t;try{let t=window.localStorage.getItem(e);if(t!=null){let e=Number(t);if(Number.isFinite(e))return e}}catch{}return t}function by(e,t){if(e)try{window.localStorage.setItem(e,String(Math.round(t)))}catch{}}function xy(e){let{initial:t,min:n,minOther:r,containerRef:i,storageKey:a,invert:o=!1,step:s=24}=e,c=Math.max(n,yy(a,t)),l=N(_r(c)),u=N(!1),d={current:c},f=()=>{let e=i.current?.clientWidth;return e?Math.max(n,e-r):1/0},p=e=>Math.min(f(),Math.max(n,e)),m=e=>{P(l,e,!0),d.current=e},h=e=>{let t=e.clientX,n=d.current;vy(e,{cursor:`col-resize`,onStart:()=>P(u,!0),onMove:e=>{let r=e.clientX-t,i=o?-r:r;m(p(n+i))},onEnd:()=>{P(u,!1),by(a,d.current)}})},g=e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault();let t=e.key===`ArrowLeft`?-s:s,n=p(d.current+(o?-t:t));m(n),by(a,n)},_=()=>{let e=p(t);m(e),by(a,e)};return{get size(){return z(l)},get dragging(){return z(u)},get separatorProps(){return{role:`separator`,"aria-orientation":`vertical`,"aria-valuenow":Math.round(z(l)),"aria-valuemin":n,tabIndex:0,onPointerDown:h,onKeyDown:g,onDblClick:_}}}}var Sy=V(`<div><!></div>`),Cy=V(`<div class="flex flex-col gap-2"><button class="flex items-center gap-2 cursor-pointer text-fg-muted hover:text-fg transition-colors w-fit"><!> <span class="text-xs font-medium"> </span></button> <!></div>`);function wy(e,t){it(t,!0);var n=Cy(),r=F(n),i=F(r);{let e=M(()=>$(`text-fg-subtle transition-transform`,t.expanded&&`rotate-180`));Cp(i,{size:12,get class(){return z(e)}})}var a=L(i,2),o=F(a,!0);D(a),D(r);var s=L(r,2),c=e=>{var n=Sy();La(F(n),()=>t.children),D(n),H(e,n)};W(s,e=>{t.expanded&&e(c)}),D(n),R(()=>U(o,t.label)),B(`click`,r,function(...e){t.onToggle?.apply(this,e)}),H(e,n),at()}ea([`click`]);var Ty=V(`<div class="bg-subtle rounded p-3 border border-line font-mono text-xs"><pre class="whitespace-pre-wrap break-words text-fg"> </pre></div>`),Ey=V(`<div class="font-mono text-xs text-fg-muted mt-1"> </div>`),Dy=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="font-medium text-xs text-fg mb-1.5"> </div> <!></div>`),Oy=V(`<div class="space-y-2"></div>`),ky=V(`<div class="text-xs text-fg-muted"><span class="font-medium">Status message:</span> </div>`),Ay=V(`<div role="presentation" class="mt-3 pt-3 border-t border-line space-y-3"><!> <!> <!></div>`),jy=V(`<div role="button" tabindex="0" data-focus-inset=""><div class="flex items-center justify-between gap-4"><div class="flex-1 min-w-0"><div class="font-medium text-sm mb-1 text-fg"> </div> <div class="flex items-center gap-3 text-xs text-fg-muted"><span> </span> <span> </span> <span class="text-fg-subtle"> </span></div></div> <button class="p-1 hover:bg-hover rounded"><!></button></div> <!></div>`);function My(e,t){it(t,!0);let n=N(!1),r=N(_r({attributes:!1,events:!1})),i=M(()=>t.span.status.code===`ERROR`);function a(e){P(r,{...z(r),[e]:!z(r)[e]},!0)}function o(){let e=0,n=t.span;for(;n.parentSpanId;){e++;let r=t.trace.spans.find(e=>e.spanId===n.parentSpanId);if(!r)break;n=r}return e}let s=M(o),c=M(()=>Object.keys(t.span.attributes||{}).length>0),l=M(()=>t.span.events&&t.span.events.length>0);var u=jy(),d=M(()=>bg(t.onSelect)),f=F(u),p=F(f),m=F(p),h=F(m,!0);D(m);var g=L(m,2),_=F(g),v=F(_,!0);D(_);var y=L(_,2),b=F(y,!0);D(y);var x=L(y,2),S=F(x,!0);D(x),D(g),D(p);var C=L(p,2),w=F(C);{let e=M(()=>$(`text-fg-subtle transition-transform flex-shrink-0`,z(n)&&`rotate-180`));Cp(w,{size:14,get class(){return z(e)}})}D(C),D(f);var T=L(f,2),ee=e=>{var n=Ay(),i=F(n),o=e=>{wy(e,{label:`All attributes`,get expanded(){return z(r).attributes},onToggle:()=>a(`attributes`),children:(e,n)=>{{let n=M(()=>JSON.stringify(t.span.attributes,null,2));P_(e,{get content(){return z(n)},children:(e,n)=>{var r=Ty(),i=F(r),a=F(i,!0);D(i),D(r),R(e=>U(a,e),[()=>JSON.stringify(t.span.attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},$$slots:{default:!0}})};W(i,e=>{z(c)&&e(o)});var s=L(i,2),u=e=>{{let n=M(()=>`Events (${t.span.events.length})`);wy(e,{get label(){return z(n)},get expanded(){return z(r).events},onToggle:()=>a(`events`),children:(e,n)=>{var r=Oy();G(r,21,()=>t.span.events,Oa,(e,t)=>{var n=Dy(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=e=>{{let n=M(()=>JSON.stringify(z(t).attributes,null,2));P_(e,{get content(){return z(n)},children:(e,n)=>{var r=Ey(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>JSON.stringify(z(t).attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},s=M(()=>z(t).attributes&&Object.keys(z(t).attributes).length>0);W(a,e=>{z(s)&&e(o)}),D(n),R(()=>U(i,z(t).name)),H(e,n)}),D(r),H(e,r)},$$slots:{default:!0}})}};W(s,e=>{z(l)&&e(u)});var d=L(s,2),f=e=>{var n=ky(),r=L(F(n));D(n),R(()=>U(r,` ${t.span.status.message??``}`)),H(e,n)};W(d,e=>{t.span.status.message&&e(f)}),D(n),B(`click`,n,e=>e.stopPropagation()),H(e,n)};W(T,e=>{z(n)&&e(ee)}),D(u),R((e,n,r)=>{q(u,1,e),oo(u,`padding-left: ${16+z(s)*20}px;`),U(h,t.span.name||`unknown`),q(_,1,n),U(v,t.span.status.code),U(b,r),U(S,t.span.kind)},[()=>K($(`px-4 py-3`,`hover:bg-subtle transition-colors cursor-pointer`,z(i)&&`bg-danger-bg`,t.isSelected&&`bg-hover hover:bg-hover`)),()=>K($(`font-medium`,cd(t.span.status.code))),()=>ad(t.span.duration)]),B(`click`,u,function(...e){t.onSelect?.apply(this,e)}),B(`keydown`,u,function(...e){z(d)?.apply(this,e)}),B(`click`,C,e=>{e.stopPropagation(),P(n,!z(n))}),H(e,u),at()}ea([`click`,`keydown`]);var Ny=`1.0.0`;function Py(e){return{version:Ny,exportedAt:new Date().toISOString(),trace:e}}function Fy(e){return{version:Ny,exportedAt:new Date().toISOString(),traces:e}}function Iy(e){return JSON.stringify(e,null,2)}function Ly(e,t){let n=Iy(Py(e)),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`trace-${e.traceId.slice(0,8)}-${new Date().toISOString().split(`T`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}function Ry(e,t){let n=Iy(Fy(e)),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`traces-${e.length}-${new Date().toISOString().split(`T`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}async function zy(e){let t=Iy(Py(e));await navigator.clipboard.writeText(t)}function By(e,t){if(!e)return[`${t}: Invalid span data`];let n=e;return[...Hs(n,t,Ls,[`spanId`,`traceId`,`name`]),...Hs(n,t,Rs,[`startTime`,`endTime`,`duration`]),...Hs(n,t,zs,[`status`])]}function Vy(e,t){let n=`trace[${t}]`;if(!e)return{errors:[`${n}: Invalid trace data`],warnings:[]};let r=e,i=Ls(r,`correlationId`)?[]:[`${n}: Missing correlationId, will use traceId`],a=zs(r,`rootSpan`),o=Vs(r,`spans`)?Bs(r,`spans`).flatMap((e,t)=>By(Is(e),`${n}.spans[${t}]`)):[`${n}: Missing or invalid spans array`];return{errors:[...Hs(r,n,Ls,[`traceId`]),...a?By(a,`${n}.rootSpan`):[`${n}: Missing or invalid rootSpan`],...o,...Hs(r,n,Rs,[`startTime`,`endTime`,`duration`])],warnings:i}}function Hy(e){return e}function Uy(e){let t=[],n=[],r=[],i;try{i=JSON.parse(e)}catch(e){return{success:!1,traces:[],errors:[`Invalid JSON: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}let a=Is(i);if(!a)return{success:!1,traces:[],errors:[`Parsed data is not an object`],warnings:[]};let o=Ls(a,`version`);o&&o!==Ny&&n.push(`Version mismatch: expected ${Ny}, got ${o}`);let s=zs(a,`trace`);if(s){let e=Vy(s,0);t.push(...e.errors),n.push(...e.warnings),e.errors.length===0&&r.push(Wy(Hy(s)))}else if(Vs(a,`traces`))for(let[e,i]of Bs(a,`traces`).entries()){let a=Is(i),o=Vy(a,e);t.push(...o.errors),n.push(...o.warnings),a&&o.errors.length===0&&r.push(Wy(Hy(a)))}else if(a.traceId){let e=Vy(a,0);t.push(...e.errors),n.push(...e.warnings),e.errors.length===0&&r.push(Wy(Hy(a)))}else t.push(`Unrecognized format: expected { trace: ... } or { traces: [...] } or direct trace object`);return{success:t.length===0&&r.length>0,traces:r,errors:t,warnings:n}}function Wy(e){return{...e,correlationId:e.correlationId||e.traceId.slice(0,8),service:e.service||`imported`,status:e.status||(e.spans.some(e=>e.status.code===`ERROR`)?`ERROR`:`OK`),spans:e.spans.map(Gy),rootSpan:Gy(e.rootSpan)}}function Gy(e){return{...e,kind:e.kind||`INTERNAL`,attributes:e.attributes||{},status:{code:e.status?.code||`UNSET`,message:e.status?.message},events:e.events||[]}}function Ky(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(Error(`Failed to read file`)),r.readAsText(e)})}function qy(e){return{version:Ny,kind:`autotel-devtools-snapshot`,capturedAt:new Date().toISOString(),data:e}}function Jy(e,t){let n=JSON.stringify(qy(e),null,2),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`autotel-snapshot-${new Date().toISOString().replaceAll(`:`,`-`).split(`.`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}function Yy(e,t){return Bs(e,t)}function Xy(e){let t;try{t=JSON.parse(e)}catch(e){return{success:!1,errors:[`Invalid JSON: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}let n=Is(t);if(!n)return{success:!1,errors:[`Snapshot is not an object`],warnings:[]};let r=[];n.kind&&n.kind!==`autotel-devtools-snapshot`&&r.push(`Unexpected snapshot kind: ${String(n.kind)}`);let i=Ls(n,`version`);i&&i!==Ny&&r.push(`Version mismatch: expected ${Ny}, got ${i}`);let a=zs(n,`data`)??n,o=Yy(a,`traces`).map(Wy),s=Yy(a,`logs`),c=Yy(a,`errors`);return o.length===0&&s.length===0&&c.length===0?{success:!1,errors:[`Snapshot contains no traces, logs, or errors`],warnings:r}:{success:!0,snapshot:{traces:o,logs:s,errors:c},errors:[],warnings:r}}async function Zy(e){try{return Xy(await Ky(e))}catch(e){return{success:!1,errors:[`Failed to read file: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}}var Qy=V(`<div class="text-warning">Partial trace — the root span has not arrived. This is the highest
|
|
6
|
+
span received; the duration covers only the spans present.</div>`),$y=V(`<span class="text-xs text-fg-muted tabular-nums flex-shrink-0"> </span>`),eb=V(`<div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!></div>`),tb=V(`<div class="overflow-auto h-full"><div class="divide-y divide-line-subtle"></div></div>`),nb=V(`<!> <div class="flex-shrink-0 overflow-hidden"><!></div>`,1),rb=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line"><div class="flex items-center justify-between mb-3"><button><!> Back to traces</button> <div class="flex items-center gap-2"><div class="flex items-center gap-1"><button class="p-1.5 hover:bg-hover rounded transition-colors" title="Copy trace JSON to clipboard"><!></button> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Download trace as JSON"><!></button></div> <div class="flex items-center gap-1 bg-hover rounded-md p-0.5"><button title="Waterfall view (w)"><!> Timeline</button> <button title="Flame graph view (f)"><!> Flame</button> <button title="List view (l)"><!> List</button></div> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Keyboard shortcuts (?)"><!></button></div></div> <div class="flex items-start justify-between gap-4"><div class="flex-1 min-w-0"><h3 class="font-semibold text-base mb-1.5 text-fg"> </h3> <div class="text-xs text-fg-subtle space-y-0.5"><!> <div> </div> <div class="font-mono flex items-center gap-1"><span class="truncate"> </span> <!></div></div></div> <div class="text-right flex-shrink-0"><div> </div> <div class="text-xs text-fg-muted"> </div> <div class="text-xs text-fg-subtle mt-1"> </div></div></div></div> <!> <div class="flex-1 overflow-hidden flex"><div class="flex-1 overflow-hidden min-w-0"><!></div> <!></div></div>`);function ib(e,t){it(t,!0);let n=N(`waterfall`),r=M(()=>t.trace.spans.find(e=>e.spanId===Hc.value)??null),i=e=>Hc.value=e?.spanId??null,a=N(``),o=N(0),s=N(null);Lr(()=>{let e=e=>{e.key===`/`&&z(n)===`waterfall`&&!yg()&&(e.preventDefault(),z(s)?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let c=N(!1),l=N(void 0),u=xy({initial:320,min:260,minOther:360,containerRef:{get current(){return z(l)??null}},storageKey:`autotel-devtools:span-detail-width`,invert:!0}),d=M(()=>u.size),f=M(()=>u.dragging),p=M(()=>u.separatorProps);function m(e,t,n){let r=e.filter(e=>e.status.code===`ERROR`);return r.length===0?null:r[((t?r.findIndex(e=>e.spanId===t.spanId):-1)+n+r.length)%r.length]}Lr(()=>{let e=e=>{if(!$c.value){if(e.key===`Escape`){z(r)?i(null):Nu(null);return}if(!yg()){if(e.key===`w`)e.preventDefault(),P(n,`waterfall`);else if(e.key===`f`)e.preventDefault(),P(n,`flame`);else if(e.key===`l`)e.preventDefault(),P(n,`list`);else if(e.key===`e`&&!e.shiftKey){e.preventDefault();let n=m(t.trace.spans,z(r),1);n&&i(n)}else if(e.key===`E`&&e.shiftKey){e.preventDefault();let n=m(t.trace.spans,z(r),-1);n&&i(n)}}}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});function h(e){return new Date(e).toLocaleString(`en-US`,{month:`long`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0})}function g(){Ly(t.trace)}async function _(){await zy(t.trace),P(c,!0),setTimeout(()=>P(c,!1),2e3)}var v=rb(),y=F(v),b=F(y),x=F(b);Tp(F(x),{size:14}),Ke(),D(x);var S=L(x,2),C=F(S),w=F(C),T=F(w),ee=e=>{xp(e,{size:14,class:`text-success`})},te=e=>{zp(e,{size:14,class:`text-fg-subtle`})};W(T,e=>{z(c)?e(ee):e(te,-1)}),D(w);var ne=L(w,2);qp(F(ne),{size:14,class:`text-fg-subtle`}),D(ne),D(C);var re=L(C,2),ie=F(re);_p(F(ie),{size:12}),Ke(),D(ie);var ae=L(ie,2);sm(F(ae),{size:12}),Ke(),D(ae);var oe=L(ae,2);Dm(F(oe),{size:12}),Ke(),D(oe),D(re);var se=L(re,2);jp(F(se),{size:14,class:`text-fg-subtle`}),D(se),D(S),D(b);var ce=L(b,2),le=F(ce),E=F(le),ue=F(E,!0);D(E);var de=L(E,2),fe=F(de),pe=e=>{H(e,Qy())};W(fe,e=>{t.trace.partial&&e(pe)});var me=L(fe,2),he=F(me,!0);D(me);var ge=L(me,2),_e=F(ge),ve=F(_e);D(_e),Q_(L(_e,2),{get value(){return t.trace.traceId},label:`Copy trace ID`,stop:!1}),D(ge),D(de),D(le);var ye=L(le,2),be=F(ye),xe=F(be,!0);D(be);var Se=L(be,2),Ce=F(Se,!0);D(Se);var we=L(Se,2),Te=F(we);D(we),D(ye),D(ce),D(y);var Ee=L(y,2),De=e=>{var t=eb(),n=F(t);L_(n,{placeholder:`Search spans… (press /)`,ariaLabel:`Search spans by name or service`,clearTitle:`Clear search`,get value(){return z(a)},set value(e){P(a,e,!0)},get ref(){return z(s)},set ref(e){P(s,e,!0)}});var r=L(n,2),i=e=>{var t=$y(),n=F(t);D(t),R(()=>U(n,`${z(o)??``}
|
|
7
|
+
${z(o)===1?`match`:`matches`}`)),H(e,t)},c=M(()=>z(a).trim());W(r,e=>{z(c)&&e(i)}),D(t),H(e,t)};W(Ee,e=>{z(n)===`waterfall`&&e(De)});var Oe=L(Ee,2),ke=F(Oe),Ae=F(ke),je=e=>{{let n=M(()=>z(r)?.spanId);m_(e,{get trace(){return t.trace},onSpanSelect:i,get selectedSpanId(){return z(n)},get query(){return z(a)},onMatchCount:e=>P(o,e,!0)})}},Me=e=>{{let n=M(()=>z(r)?.spanId);j_(e,{get trace(){return t.trace},onSpanSelect:i,get selectedSpanId(){return z(n)}})}},Ne=e=>{var n=tb(),a=F(n);G(a,21,()=>t.trace.spans,e=>e.spanId,(e,n)=>{{let a=M(()=>z(r)?.spanId===z(n).spanId);My(e,{get span(){return z(n)},get trace(){return t.trace},get isSelected(){return z(a)},onSelect:()=>i(z(n))})}}),D(a),D(n),H(e,n)};W(Ae,e=>{z(n)===`waterfall`?e(je):z(n)===`flame`?e(Me,1):e(Ne,-1)}),D(ke);var Pe=L(ke,2),Fe=e=>{var n=nb(),a=I(n);_y(a,X({get dragging(){return z(f)},title:`Drag to resize the detail panel · double-click to reset`},()=>z(p)));var o=L(a,2);hy(F(o),{get span(){return z(r)},get trace(){return t.trace},onClose:()=>i(null)}),D(o),R(()=>oo(o,`width: ${z(d)??``}px;`)),H(e,n)};W(Pe,e=>{z(r)&&e(Fe)}),D(Oe),Vo(Oe,e=>P(l,e),()=>z(l)),D(v),R((e,n,r,i,a,o,s)=>{q(x,1,e),q(ie,1,n),q(ae,1,r),q(oe,1,i),U(ue,t.trace.rootSpan.name||`Trace`),U(he,a),U(ve,`Trace ID: ${t.trace.traceId??``}`),q(be,1,o),U(xe,t.trace.status),U(Ce,s),U(Te,`${t.trace.spans.length??``} spans`)},[()=>K($(`text-xs text-fg-muted hover:text-fg`,`flex items-center gap-1 transition-colors`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`waterfall`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`flame`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`list`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>h(t.trace.startTime),()=>K($(`font-medium text-sm mb-1`,cd(t.trace.status))),()=>ad(t.trace.duration)]),B(`click`,x,()=>Nu(null)),B(`click`,w,_),B(`click`,ne,g),B(`click`,ie,()=>P(n,`waterfall`)),B(`click`,ae,()=>P(n,`flame`)),B(`click`,oe,()=>P(n,`list`)),B(`click`,se,()=>el(vg)),H(e,v),at()}ea([`click`]);var ab=V(`<span class="ml-0.5 min-w-[16px] px-1 rounded-full bg-accent text-[10px] font-semibold text-white text-center tabular-nums"> </span>`),ob=V(`<div class="sticky top-0 bg-surface p-2 border-b border-line-subtle"><div class="relative"><!> <input type="text" placeholder="Narrow options…" class="w-full pl-6 pr-2 py-1 text-xs rounded border border-line bg-subtle text-fg focus:outline-none focus:border-accent"/></div></div>`),sb=V(`<span class="text-accent normal-case"> </span>`),cb=V(`<div class="px-1 py-1 text-xs text-fg-subtle">No matches</div>`),lb=ca(`<svg viewBox="0 0 12 12" class="w-2.5 h-2.5 text-white" fill="none" stroke="currentColor" stroke-width="2"><path d="M2.5 6.5l2.5 2.5 4.5-5" stroke-linecap="round" stroke-linejoin="round"></path></svg>`),ub=V(`<button type="button" role="menuitemcheckbox"><span><!></span> <span class="flex-1 truncate"> </span> <span class="flex-shrink-0 font-mono tabular-nums text-fg-subtle"> </span></button>`),db=V(`<div class="flex flex-col gap-0.5"></div>`),fb=V(`<div class="p-2 border-b border-line-subtle last:border-b-0"><div class="flex items-center justify-between px-1 pb-1 text-[10px] font-semibold uppercase tracking-wide text-fg-subtle"><span> </span> <!></div> <!></div>`),pb=V(`<button type="button" class="flex items-center gap-1 w-full px-3 py-2 text-xs text-fg-subtle hover:bg-hover transition-colors border-t border-line"><!> Clear all filters</button>`),mb=V(`<div class="absolute right-0 z-30 mt-1 w-64 max-h-[60vh] overflow-auto rounded-md border border-line bg-surface shadow-lg" role="menu"><!> <!> <!></div>`),hb=V(`<div class="relative"><button type="button" aria-haspopup="true" title="Filter by facets"><!> <span>Filter</span> <!></button> <!></div>`);function gb(e,t){it(t,!0);let n=Z(t,`searchThreshold`,3,8),r=N(!1),i=N(``),a=N(void 0),o=M(()=>t.facets.reduce((e,t)=>e+t.selected.size,0)),s=M(()=>t.facets.some(e=>e.options.length>n()));function c(e){let t=z(i).trim().toLowerCase();return[...t?e.options.filter(e=>e.value.toLowerCase().includes(t)):e.options].sort((t,n)=>{let r=+!!e.selected.has(t.value),i=+!!e.selected.has(n.value);return r===i?t.count===n.count?t.value.localeCompare(n.value):n.count-t.count:i-r})}function l(){P(r,!z(r)),z(r)||P(i,``)}Lr(()=>{if(!z(r))return;let e=e=>{z(a)&&!e.composedPath().includes(z(a))&&(P(r,!1),P(i,``))},t=e=>{e.key===`Escape`&&(P(r,!1),P(i,``))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}});var u=hb(),d=F(u),f=F(d);lm(f,{size:12});var p=L(f,4),m=e=>{var t=ab(),n=F(t,!0);D(t),R(()=>U(n,z(o))),H(e,t)};W(p,e=>{z(o)>0&&e(m)}),D(d);var h=L(d,2),g=e=>{var n=mb(),r=F(n),a=e=>{var t=ob(),n=F(t),r=F(n);Ch(r,{size:12,class:`absolute left-2 top-1/2 -translate-y-1/2 text-fg-subtle`});var a=L(r,2);xo(a),D(n),D(t),Ao(a,()=>z(i),e=>P(i,e)),H(e,t)};W(r,e=>{z(s)&&e(a)});var l=L(r,2);G(l,17,()=>t.facets,e=>e.key,(e,t)=>{let n=M(()=>c(z(t)));var r=fb(),i=F(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2),l=e=>{var n=sb(),r=F(n,!0);D(n),R(()=>U(r,z(t).selected.size)),H(e,n)};W(s,e=>{z(t).selected.size>0&&e(l)}),D(i);var u=L(i,2),d=e=>{H(e,cb())},f=e=>{var r=db();G(r,21,()=>z(n),e=>e.value,(e,n)=>{let r=M(()=>z(t).selected.has(z(n).value));var i=ub(),a=F(i),o=F(a),s=e=>{H(e,lb())};W(o,e=>{z(r)&&e(s)}),D(a);var c=L(a,2),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u),D(i),R((e,t)=>{q(i,1,e),J(i,`aria-checked`,z(r)),q(a,1,t),J(c,`title`,z(n).value),U(l,z(n).value),U(d,z(n).count)},[()=>K($(`flex items-center gap-2 px-1.5 py-1 rounded text-xs text-left transition-colors`,z(r)?`bg-accent/15 text-accent`:`text-fg-muted hover:bg-hover`)),()=>K($(`flex-shrink-0 w-3 h-3 rounded-sm border flex items-center justify-center`,z(r)?`bg-accent border-accent`:`border-line`))]),B(`click`,i,()=>z(t).onToggle(z(n).value)),H(e,i)}),D(r),H(e,r)};W(u,e=>{z(n).length===0?e(d):e(f,-1)}),D(r),R(()=>U(o,z(t).label)),H(e,r)});var u=L(l,2),d=e=>{var n=pb();rg(F(n),{size:12}),Ke(),D(n),B(`click`,n,function(...e){t.onClearAll?.apply(this,e)}),H(e,n)};W(u,e=>{z(o)>0&&e(d)}),D(n),H(e,n)};W(h,e=>{z(r)&&e(g)}),D(u),Vo(u,e=>P(a,e),()=>z(a)),R(e=>{q(d,1,e),J(d,`aria-expanded`,z(r))},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded border transition-colors`,z(o)>0||z(r)?`border-accent/40 bg-accent/10 text-accent`:`border-line text-fg-muted hover:bg-hover`))]),B(`click`,d,l),H(e,u),at()}ea([`click`]);var _b={"=~":`REGEXP`,"!~":`NOT REGEXP`},vb=/[^\s()[\],=!<>^$"']/,yb=[`>=`,`<=`,`!=`,`=~`,`!~`,`=`,`>`,`<`,`^`,`$`];function bb(e){let t=[],n=0,r=(e,n,r,i,a=!0)=>t.push({type:e,value:n,from:r,to:i,terminated:a});for(;n<e.length;){let t=e[n];if(/\s/.test(t)){n++;continue}let i={"(":`lparen`,")":`rparen`,"[":`lbracket`,"]":`rbracket`,",":`comma`};if(i[t]){r(i[t],t,n,n+1),n++;continue}if(t===`"`||t===`'`){let i=n,a=t;n++;let o=``,s=!1;for(;n<e.length;){if(e[n]===`\\`&&n+1<e.length){o+=e[n+1],n+=2;continue}if(e[n]===a){n++,s=!0;break}o+=e[n],n++}r(`string`,o,i,n,s);continue}let a=yb.find(t=>e.startsWith(t,n));if(a){r(`sigil`,a,n,n+a.length),n+=a.length;continue}let o=n;for(;n<e.length&&vb.test(e[n]);)n++;n===o&&n++,r(`word`,e.slice(o,n),o,n)}return t}var xb=new Set([`and`,`or`]),Sb=new Set([`null`,`nil`]),Cb=new Map([[`contains`,`CONTAINS`],[`regexp`,`REGEXP`],[`in`,`IN`]]);function wb(e){let t=bb(e),n=[],r=()=>({from:t.length?t[t.length-1].to:0,to:e.length}),i=0,a=(e=0)=>t[i+e],o=()=>t[i++],s=(e,t)=>n.push({message:e,range:t}),c=(e=0)=>{let t=a(e);return t?.type===`word`?t.value.toLowerCase():void 0},l=(e=0)=>{let t=c(e);return t!==void 0&&xb.has(t)};function u(e,t){return{from:e.from,to:t.to}}function d(){let e=o();if(!e){s(`Expected a value`,r());return}if(e.type===`string`)return e.terminated||s(`Unterminated quoted string`,{from:e.from,to:e.to}),{type:`string`,value:e.value};if(e.type===`lbracket`){let e=[];if(a()?.type===`rbracket`)return o(),{type:`array`,values:e};for(;;){let t=d();if(!t)return{type:`array`,values:e};e.push(t);let n=a();if(n?.type===`comma`){o();continue}return n?.type===`rbracket`?(o(),{type:`array`,values:e}):(s(`Expected "," or "]" in array`,n??r()),{type:`array`,values:e})}}if(e.type===`word`){let t=e.value.toLowerCase();if(Sb.has(t))return{type:`null`};if(t===`true`)return{type:`boolean`,value:!0};if(t===`false`)return{type:`boolean`,value:!1};let n=Number(e.value);return Number.isFinite(n)?{type:`number`,value:n}:{type:`string`,value:e.value}}s(`Expected a value, found "${e.value}"`,e)}function f(){let e=a();if(!e)return;if(e.type===`sigil`)return o(),_b[e.value]??e.value;if(e.type!==`word`)return;let t=e.value.toLowerCase();if(t===`not`){let e=c(1),t=e?Cb.get(e):void 0;return t?(o(),o(),`NOT ${t}`):void 0}let n=Cb.get(t);if(n)return o(),n}function p(){let e=a();if(!e){s(`Expected a condition`,r());return}if(e.type===`lparen`){o();let e=g(),t=a();return t?.type===`rparen`?o():s(`Unclosed parenthesis — expected ")"`,t??r()),e}if(e.type===`word`||e.type===`string`){let n=i;o();let r=f();if(r){let n=d();if(!n)return;let a=t[i-1];return{type:`comparison`,field:e.value,op:r,value:n,range:u(e,a??e)}}return i=n,o(),e.type===`string`&&!e.terminated&&s(`Unterminated quoted string`,{from:e.from,to:e.to}),{type:`freeText`,text:e.value,range:{from:e.from,to:e.to}}}s(`Unexpected "${e.value}"`,e),o()}function m(){let e=a();return!e||e.type===`rparen`||e.type===`rbracket`||e.type===`comma`?!1:!l()}function h(){let e=p();if(e)for(;;){if(c()===`and`){o();let t=p();if(!t)return e;e={type:`and`,left:e,right:t,range:Tb(e,t)};continue}if(m()){let t=p();if(!t)return e;e={type:`and`,left:e,right:t,range:Tb(e,t)};continue}return e}}function g(){let e=h();if(e){for(;c()===`or`;){o();let t=h();if(!t)return e;e={type:`or`,left:e,right:t,range:Tb(e,t)}}return e}}if(t.length===0)return{ok:!0,node:{type:`all`}};let _=g(),v=a();return v&&s(`Unexpected "${v.value}"`,v),n.length>0||!_?{ok:!1,errors:n.length>0?n:[{message:`Invalid query`,range:r()}]}:{ok:!0,node:_}}function Tb(e,t){let n=`range`in e?e.range.from:0;return{from:n,to:`range`in t?t.range.to:n}}var Eb=V(`<button type="button" title="Clear query" aria-label="Clear query" class="absolute right-1.5 top-[7px] p-0.5 text-fg-subtle hover:text-fg-muted"><!></button>`),Db=V(`<button type="button" role="option" aria-selected="false" class="block w-full px-2 py-1.5 text-left font-mono text-xs text-fg hover:bg-hover"> </button>`),Ob=V(`<div role="listbox" aria-label="Query fields" class="absolute left-0 right-0 top-full z-30 mt-1 max-h-48 overflow-auto rounded border border-line bg-surface shadow-lg"></div>`),kb=V(`<div id="query-error" role="status" class="mt-1 flex items-start gap-1.5 text-[11px] text-danger"><!> <span> <span class="text-fg-subtle"> </span></span></div>`),Ab=V(`<div><!> <input spellcheck="false" autocomplete="off" autocapitalize="off" aria-label="Query"/> <!> <!> <!></div>`);function jb(e,t){it(t,!0);let n=Z(t,`placeholder`,3,`Filter — e.g. service = api AND duration > 100`),r=Z(t,`fields`,19,()=>[]),i=Z(t,`ref`,15,null),a=M(()=>wb(t.value)),o=M(()=>z(a).ok?[]:z(a).errors),s=M(()=>z(o).length>0?z(o):t.serverErrors??[]),c=M(()=>z(s).length>0&&t.value.trim().length>0),l=N(!1),u=M(()=>{let e=t.value.match(/(?:^|[\s(])([A-Za-z_][\w.-]*)$/),n=e?.[1]?.toLowerCase()??``;return t.value.trim().length>0&&!e?[]:r().filter(e=>e.toLowerCase().startsWith(n)).filter(e=>e.toLowerCase()!==n).slice(0,8)});function d(e){e.key===`Enter`&&!z(c)&&(e.preventDefault(),t.onSubmit(t.value)),e.key===`Escape`&&t.value&&(e.preventDefault(),t.onInput(``),t.onSubmit(``))}function f(){t.onInput(``),t.onSubmit(``),i()?.focus()}function p(e){let n=t.value.match(/(?:^|[\s(])([A-Za-z_][\w.-]*)$/),r=n?.[1]?t.value.length-n[1].length:t.value.length;t.onInput(`${t.value.slice(0,r)}${e} = `),i()?.focus()}var m=Ab(),h=F(m);Ch(h,{size:12,class:`absolute left-2 top-[9px] text-fg-subtle pointer-events-none`});var g=L(h,2);xo(g),Vo(g,e=>i(e),()=>i());var _=L(g,2),v=e=>{var t=Eb();rg(F(t),{size:12}),D(t),B(`click`,t,f),H(e,t)};W(_,e=>{t.value&&e(v)});var y=L(_,2),b=e=>{var t=Ob();G(t,20,()=>z(u),e=>e,(e,t)=>{var n=Db(),r=F(n,!0);D(n),R(()=>U(r,t)),B(`mousedown`,n,e=>e.preventDefault()),B(`click`,n,()=>p(t)),H(e,n)}),D(t),H(e,t)};W(y,e=>{z(l)&&z(u).length>0&&e(b)});var x=L(y,2),S=e=>{var t=kb(),n=F(t);kp(n,{size:12,class:`mt-px shrink-0`});var r=L(n,2),i=F(r),a=L(i),o=F(a);D(a),D(r),D(t),R(()=>{U(i,`${z(s)[0].message??``} `),U(o,`(column ${z(s)[0].range.from+1})`)}),H(e,t)};W(x,e=>{z(c)&&e(S)}),D(m),R((e,r)=>{q(m,1,e),So(g,t.value),J(g,`placeholder`,n()),J(g,`aria-invalid`,z(c)?`true`:void 0),J(g,`aria-describedby`,z(c)?`query-error`:void 0),q(g,1,r)},[()=>K($(`relative`,t.class)),()=>K($(`w-full pl-7 pr-7 py-1.5 text-xs font-mono rounded border bg-surface text-fg`,`focus:outline-none focus:ring-1`,z(c)?`border-danger-border focus:ring-danger`:`border-line focus:ring-accent`))]),B(`input`,g,e=>t.onInput(e.currentTarget.value)),B(`keydown`,g,d),$i(`focus`,g,()=>P(l,!0)),$i(`blur`,g,()=>P(l,!1)),H(e,m),at()}ea([`input`,`keydown`,`click`,`mousedown`]);function Mb(e){return typeof e==`function`}function Nb(e){return typeof e==`object`&&!!e}var Pb=[`string`,`number`,`bigint`,`boolean`];function Fb(e){return e==null||Pb.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>Fb(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var Ib=Symbol(`box`),Lb=Symbol(`is-writable`);function Rb(e,t){let n=M(e);return t?{[Ib]:!0,[Lb]:!0,get current(){return z(n)},set current(e){t(e)}}:{[Ib]:!0,get current(){return e()}}}function zb(e){return Nb(e)&&Ib in e}function Bb(e){return zb(e)?e:Mb(e)?Rb(e):Vb(e)}function Vb(e){let t=N(_r(e));return{[Ib]:!0,[Lb]:!0,get current(){return z(t)},set current(e){P(t,e,!0)}}}function Hb(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var Ub=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Wb=/\n/g,Gb=/^\s*/,Kb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,qb=/^:\s*/,Jb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yb=/^[;\s]*/,Xb=/^\s+|\s+$/g,Zb=`
|
|
8
|
+
`,Qb=`/`,$b=`*`,ex=``,tx=`comment`,nx=`declaration`;function rx(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t=t||{};var n=1,r=1;function i(e){var t=e.match(Wb);t&&(n+=t.length);var i=e.lastIndexOf(Zb);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(Gb)}function u(e){var t;for(e=e||[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(Qb==e.charAt(0)&&$b==e.charAt(1)){for(var n=2;ex!=e.charAt(n)&&($b!=e.charAt(n)||Qb!=e.charAt(n+1));)++n;if(n+=2,ex===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:tx,comment:o})}}function f(){var e=a(),t=c(Kb);if(t){if(d(),!c(qb))return s(`property missing ':'`);var n=c(Jb),r=e({type:nx,property:ix(t[0].replace(Ub,ex)),value:n?ix(n[0].replace(Ub,ex)):ex});return c(Yb),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function ix(e){return e?e.replace(Xb,ex):ex}function ax(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=rx(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n=n||{},n[r]=a)}),n}var ox=/\d/,sx=[`-`,`_`,`/`,`.`];function cx(e=``){if(!ox.test(e))return e!==e.toLowerCase()}function lx(e){let t=[],n=``,r,i;for(let a of e){let e=sx.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=cx(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function ux(e){return e?lx(e).map(e=>fx(e)).join(``):``}function dx(e){return px(ux(e||``))}function fx(e){return e?e[0].toUpperCase()+e.slice(1):``}function px(e){return e?e[0].toLowerCase()+e.slice(1):``}function mx(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[ux(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[dx(e)]=n}return ax(e,n),t}function hx(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function gx(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var _x=gx(/[A-Z]/,e=>`-${e.toLowerCase()}`);function vx(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${_x(t)}: ${e[t]};`).join(`
|
|
9
|
+
`)}function yx(e={}){return vx(e).replace(`
|
|
10
|
+
`,` `)}var bx=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function xx(e){return bx.has(e)}function Sx(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&typeof o&&xx(e))t[e]=Hb(n,i);else if(a&&o)t[e]=hx(n,i);else if(e===`class`){let r=Fb(n),a=Fb(i);r&&a?t[e]=$a(n,i):r?t[e]=$a(n):a&&(t[e]=$a(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=mx(i);t[e]={...n,...r}}else if(o&&a)t[e]={...mx(n),...i};else if(o&&s){let r=mx(n),a=mx(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}for(let e of Object.getOwnPropertySymbols(r)){let n=t[e],i=r[e];t[e]=i===void 0?n:i}}}return typeof t.style==`object`&&(t.style=yx(t.style).replaceAll(`
|
|
11
|
+
`,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Cx=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function wx(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Tx,Ex=!1,Dx=new WeakMap,Ox=new WeakMap,kx=new WeakMap,Ax=new WeakSet;Tx=class extends Date{constructor(...e){super(...e),kt(this,Ax),O(this,Dx,N(super.getTime())),O(this,Ox,new Map),O(this,kx,li),Ex||k(Ax,this,jx).call(this)}};function jx(){Ex=!0;var e=Tx.prototype,t=Date.prototype,n=Object.getOwnPropertyNames(t);for(let r of n)(r.startsWith(`get`)||r.startsWith(`to`)||r===`valueOf`)&&(e[r]=function(...e){if(e.length>0)return z(j(Dx,this)),t[r].apply(this,e);var n=j(Ox,this).get(r);if(n===void 0){let i=li;di(j(kx,this)),n=M(()=>(z(j(Dx,this)),t[r].apply(this,e))),j(Ox,this).set(r,n),di(i)}return z(n)}),r.startsWith(`set`)&&(e[r]=function(...e){var n=t[r].apply(this,e);return P(j(Dx,this),t.getTime.call(this)),n})}var Mx,Nx,Px=[`forEach`,`isDisjointFrom`,`isSubsetOf`,`isSupersetOf`],Fx=[`difference`,`intersection`,`symmetricDifference`,`union`],Ix=!1,Lx=new WeakMap,Rx=new WeakMap,zx=new WeakMap,Bx=new WeakMap,Vx=new WeakSet;Nx=Symbol.iterator,Mx=class extends Set{constructor(e){if(super(),kt(this,Vx),O(this,Lx,new Map),O(this,Rx,N(0)),O(this,zx,N(0)),O(this,Bx,Si||-1),e){for(var t of e)super.add(t);j(zx,this).v=super.size}Ix||k(Vx,this,Ux).call(this)}has(e){var t=super.has(e),n=j(Lx,this),r=n.get(e);if(r===void 0){if(!t)return z(j(Rx,this)),!1;r=k(Vx,this,Hx).call(this,!0),n.set(e,r)}return z(r),t}add(e){return super.has(e)||(super.add(e),P(j(zx,this),super.size),hr(j(Rx,this))),this}delete(e){var t=super.delete(e),n=j(Lx,this),r=n.get(e);return r!==void 0&&(n.delete(e),P(r,!1)),t&&(P(j(zx,this),super.size),hr(j(Rx,this))),t}clear(){if(super.size!==0){super.clear();var e=j(Lx,this);for(var t of e.values())P(t,!1);e.clear(),P(j(zx,this),0),hr(j(Rx,this))}}keys(){return this.values()}values(){return z(j(Rx,this)),super.values()}entries(){return z(j(Rx,this)),super.entries()}[Nx](){return this.keys()}get size(){return z(j(zx,this))}};function Hx(e){return Si===j(Bx,this)?N(e):dr(e)}function Ux(){Ix=!0;var e=Mx.prototype,t=Set.prototype;for(let n of Px)e[n]=function(...e){return z(j(Rx,this)),t[n].apply(this,e)};for(let n of Fx)e[n]=function(...e){z(j(Rx,this));var r=t[n].apply(this,e);return new Mx(r)}}function Wx(e){return Wx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wx(e)}function Gx(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Wx(e))!==null;);return e}function Kx(){return Kx=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Gx(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Kx.apply(null,arguments)}function qx(e,t,n,r){var i=Kx(Wx(1&r?e.prototype:e),t,n);return 2&r&&typeof i==`function`?function(e){return i.apply(n,e)}:i}var Jx,Yx,Xx=new WeakMap,Zx=new WeakMap,Qx=new WeakMap,$x=new WeakMap,eS=new WeakSet;Yx=Symbol.iterator;var tS=class extends Map{constructor(e){if(super(),kt(this,eS),O(this,Xx,new Map),O(this,Zx,N(0)),O(this,Qx,N(0)),O(this,$x,Si||-1),e){for(var[t,n]of e)super.set(t,n);j(Qx,this).v=super.size}}has(e){var t=j(Xx,this),n=t.get(e);if(n===void 0){if(super.has(e))n=k(eS,this,nS).call(this,0),t.set(e,n);else return z(j(Zx,this)),!1}return z(n),!0}forEach(e,t){k(eS,this,rS).call(this),super.forEach(e,t)}get(e){var t=j(Xx,this),n=t.get(e);if(n===void 0){if(super.has(e))n=k(eS,this,nS).call(this,0),t.set(e,n);else{z(j(Zx,this));return}}return z(n),super.get(e)}set(e,t){var n=j(Xx,this),r=n.get(e),i=super.get(e),a=super.set(e,t),o=j(Zx,this);if(r===void 0)r=k(eS,this,nS).call(this,0),n.set(e,r),P(j(Qx,this),super.size),hr(o);else if(i!==t){hr(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&hr(o)}return a}delete(e){var t=j(Xx,this),n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),P(n,-1)),r&&(P(j(Qx,this),super.size),hr(j(Zx,this))),r}clear(){if(super.size!==0){super.clear();var e=j(Xx,this);P(j(Qx,this),0);for(var t of e.values())P(t,-1);hr(j(Zx,this)),e.clear()}}keys(){return z(j(Zx,this)),super.keys()}values(){return k(eS,this,rS).call(this),super.values()}entries(){return k(eS,this,rS).call(this),super.entries()}[Yx](){return this.entries()}get size(){return z(j(Qx,this)),super.size}};Jx=tS;function nS(e){return Si===j($x,this)?N(e):dr(e)}function rS(){z(j(Zx,this));var e=j(Xx,this);if(j(Qx,this).v!==e.size){for(var t of qx(Jx.prototype,`keys`,this,2)([]))if(!e.has(t)){var n=k(eS,this,nS).call(this,0);e.set(t,n)}}for([,n]of j(Xx,this))z(n)}var iS=new WeakMap,aS=new WeakMap;new class{constructor(e={}){O(this,iS,void 0),O(this,aS,void 0);let{window:t=Cx,document:n=t?.document}=e;t!==void 0&&(A(iS,this,n),A(aS,this,Dt(e=>{let n=Qi(t,`focusin`,e),r=Qi(t,`focusout`,e);return()=>{n(),r()}})))}get current(){return j(aS,this)?.call(this),j(iS,this)?wx(j(iS,this)):null}};function oS(e){return typeof e==`function`}var sS=new WeakMap,cS=new WeakMap,lS=class{constructor(e){O(this,sS,void 0),O(this,cS,void 0),A(sS,this,e),A(cS,this,Symbol(e))}get key(){return j(cS,this)}exists(){return nt(j(cS,this))}get(){let e=et(j(cS,this));if(e===void 0)throw Error(`Context "${j(sS,this)}" not found`);return e}getOr(e){let t=et(j(cS,this));return t===void 0?e:t}set(e){return tt(j(cS,this),e)}};function uS(e,t){switch(e){case`post`:Lr(t);break;case`pre`:zr(t)}}function dS(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;uS(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Pi(()=>n(t,o));return o=t,r})}function fS(e,t,n){dS(e,`post`,t,n)}function pS(e,t,n){dS(e,`pre`,t,n)}fS.pre=pS;function mS(e){return oS(e)?e():e}var hS=new WeakMap,gS=new WeakMap,_S=new WeakMap,vS=new WeakMap,yS=new WeakMap,bS=new WeakMap,xS=new WeakMap,SS=new WeakMap,CS=class{constructor(e,t={box:`border-box`}){O(this,hS,{width:0,height:0}),O(this,gS,!1),O(this,_S,void 0),O(this,vS,void 0),O(this,yS,void 0),O(this,bS,M(()=>(z(j(SS,this))?.(),this.getSize().width))),O(this,xS,M(()=>(z(j(SS,this))?.(),this.getSize().height))),O(this,SS,M(()=>{let e=mS(j(vS,this));if(e)return Dt(t=>{if(!j(yS,this))return;let n=new(j(yS,this)).ResizeObserver(e=>{A(gS,this,!0);for(let t of e){let e=j(_S,this).box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];j(hS,this).width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),j(hS,this).height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{A(gS,this,!1),n.disconnect()}})})),A(yS,this,t.window??Cx),A(_S,this,t),A(vS,this,e),A(hS,this,{width:0,height:0})}calculateSize(){let e=mS(j(vS,this));if(!e||!j(yS,this))return;let t=e.offsetWidth,n=e.offsetHeight;if(j(_S,this).box===`border-box`)return{width:t,height:n};let r=j(yS,this).getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return j(gS,this)?j(hS,this):this.calculateSize()??j(hS,this)}get current(){return z(j(SS,this))?.(),this.getSize()}get width(){return z(j(bS,this))}get height(){return z(j(xS,this))}};function wS(e){Lr(()=>()=>{e()})}function TS(e,t){return setTimeout(t,e)}function ES(e){ji().then(e)}var DS=1,OS=9,kS=11;function AS(e){return Nb(e)&&e.nodeType===DS&&typeof e.nodeName==`string`}function jS(e){return Nb(e)&&e.nodeType===OS}function MS(e){return Nb(e)&&e.constructor?.name===`VisualViewport`}function NS(e){return Nb(e)&&e.nodeType!==void 0}function PS(e){return NS(e)&&e.nodeType===kS&&`host`in e}function FS(e,t){if(!e||!t||!AS(e)||!AS(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&PS(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function IS(e){return jS(e)?e:MS(e)?e.document:e?.ownerDocument??document}function LS(e){return PS(e)?LS(e.host):jS(e)?e.defaultView??window:AS(e)?e.ownerDocument?.defaultView??window:window}function RS(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var zS=new WeakMap,BS=class{get root(){return z(j(zS,this))}set root(e){P(j(zS,this),e)}constructor(e){x(this,`element`,void 0),O(this,zS,M(()=>this.element.current?this.element.current.getRootNode()??document:document)),x(this,`getDocument`,()=>IS(this.root)),x(this,`getWindow`,()=>this.getDocument().defaultView??window),x(this,`getActiveElement`,()=>RS(this.root)),x(this,`isActiveElement`,e=>e===this.getActiveElement()),x(this,`querySelector`,e=>this.root?this.root.querySelector(e):null),x(this,`querySelectorAll`,e=>this.root?this.root.querySelectorAll(e):[]),x(this,`setTimeout`,(e,t)=>this.getWindow().setTimeout(e,t)),x(this,`clearTimeout`,e=>this.getWindow().clearTimeout(e)),this.element=typeof e==`function`?Rb(e):e}getElementById(e){return this.root.getElementById(e)}};function VS(e,t){return{[Li()]:n=>zb(e)?(e.current=n,Pi(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Pi(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function HS(e){return e?`true`:`false`}function US(e){return e?`open`:`closed`}function WS(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}var GS=new WeakMap,KS=new WeakMap,qS=class{constructor(e){O(this,GS,void 0),O(this,KS,void 0),x(this,`attrs`,void 0),A(GS,this,e.getVariant?e.getVariant():null),A(KS,this,j(GS,this)?`data-${j(GS,this)}-`:`data-${e.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${j(KS,this)}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function JS(e){let t=new qS(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var YS=typeof document<`u`,XS=ZS();function ZS(){return YS&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function QS(e){return e instanceof HTMLElement}function $S(e){return e instanceof Element}function eC(e){return e instanceof Element||e instanceof SVGElement}function tC(e){return e.pointerType===`touch`}function nC(e){return e!==null}var rC=new WeakMap,iC=new WeakMap,aC=new WeakMap,oC=new WeakMap,sC=new WeakSet,cC=class{constructor(e){kt(this,sC),O(this,rC,void 0),O(this,iC,null),O(this,aC,null),O(this,oC,0),A(rC,this,e),wS(()=>k(sC,this,lC).call(this))}run(e){k(sC,this,lC).call(this);let t=j(rC,this).ref.current;if(!t)return;if(typeof t.getAnimations!=`function`){k(sC,this,uC).call(this,e);return}let n=j(oC,this),r=()=>{n===j(oC,this)&&k(sC,this,uC).call(this,e)},i=()=>{if(n!==j(oC,this))return;let e=t.getAnimations();if(e.length===0){r();return}Promise.all(e.map(e=>e.finished)).then(()=>{r()}).catch(()=>{if(n===j(oC,this)){if(t.getAnimations().some(e=>e.pending||e.playState!==`finished`)){i();return}r()}})},a=()=>{A(iC,this,window.requestAnimationFrame(()=>{A(iC,this,null),i()}))};if(!j(rC,this).afterTick.current){a();return}A(iC,this,window.requestAnimationFrame(()=>{A(iC,this,null);let e=`data-starting-style`;if(!t.hasAttribute(e)){a();return}A(aC,this,new MutationObserver(()=>{n===j(oC,this)&&(t.hasAttribute(e)||(j(aC,this)?.disconnect(),A(aC,this,null),a()))})),j(aC,this).observe(t,{attributes:!0,attributeFilter:[e]})}))}};function lC(){var e;j(iC,this)!==null&&(window.cancelAnimationFrame(j(iC,this)),A(iC,this,null)),j(aC,this)?.disconnect(),A(aC,this,null),A(oC,this,(e=j(oC,this),e++,e))}function uC(e){let t=()=>{e()};j(rC,this).afterTick?ES(t):t()}var dC=new WeakMap,fC=new WeakMap,pC=new WeakMap,mC=new WeakMap,hC=new WeakMap,gC=new WeakMap,_C=new WeakMap,vC=new WeakSet,yC=class{constructor(e){kt(this,vC),O(this,dC,void 0),O(this,fC,void 0),O(this,pC,void 0),O(this,mC,N(!1)),O(this,hC,N(void 0)),O(this,gC,!1),O(this,_C,null),A(dC,this,e),P(j(mC,this),e.open.current,!0),A(fC,this,e.enabled??!0),A(pC,this,new cC({ref:j(dC,this).ref,afterTick:j(dC,this).open})),wS(()=>k(vC,this,bC).call(this)),fS(()=>j(dC,this).open.current,e=>{if(!j(gC,this)){A(gC,this,!0);return}if(k(vC,this,bC).call(this),!e&&j(dC,this).shouldSkipExitAnimation?.()){P(j(mC,this),!1),P(j(hC,this),void 0),j(dC,this).onComplete?.();return}if(e&&P(j(mC,this),!0),P(j(hC,this),e?`starting`:`ending`,!0),e&&A(_C,this,window.requestAnimationFrame(()=>{A(_C,this,null),j(dC,this).open.current&&P(j(hC,this),void 0)})),!j(fC,this)){e||P(j(mC,this),!1),P(j(hC,this),void 0),j(dC,this).onComplete?.();return}j(pC,this).run(()=>{e===j(dC,this).open.current&&(j(dC,this).open.current||P(j(mC,this),!1),P(j(hC,this),void 0),j(dC,this).onComplete?.())})})}get shouldRender(){return z(j(mC,this))}get transitionStatus(){return z(j(hC,this))}};function bC(){j(_C,this)!==null&&(window.cancelAnimationFrame(j(_C,this)),A(_C,this,null))}function xC(){}function SC(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function CC(e,t){var n=la();Da(I(n),()=>t.children,e=>{var n=la();La(I(n),()=>t.children??p),H(e,n)}),H(e,n)}var wC=new lS(`BitsConfig`);function TC(){let e=new DC(null,{});return wC.getOr(e).opts}function EC(e){return wC.set(new DC(wC.getOr(null),e))}var DC=class{constructor(e,t){x(this,`opts`,void 0);let n=OC(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function OC(e,t){return n=>Rb(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function kC(e,t){return n=>{let r=TC();return Rb(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var AC=kC(e=>e.defaultPortalTo,`body`);function jC(e,t){it(t,!0);let n=AC(()=>t.to),r=rt(),i=M(a);function a(){if(!YS||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let o;function s(){o&&(_a(o),o=null)}fS([()=>z(i),()=>t.disabled],([e,n])=>{if(!e||n){s();return}return o=pa(CC,{target:e,props:{children:t.children},context:r}),()=>{s()}});var c=la(),l=I(c),u=e=>{var n=la();La(I(n),()=>t.children??p),H(e,n)};W(l,e=>{t.disabled&&e(u)}),H(e,c),at()}var MC=class{constructor(e,t={bubbles:!0,cancelable:!0}){x(this,`eventName`,void 0),x(this,`options`,void 0),this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){return Qi(e,this.eventName,e=>{t(e)},n)}};function NC(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function PC(e,t){return e===t||e.contains(t)}function FC(e){return e?.ownerDocument??document}function IC(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var LC=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],RC=LC.join(`,`),zC=typeof Element>`u`,BC=zC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,VC=!zC&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},HC=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):HC(e.parentNode))},UC=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},WC=function(e,t,n){if(HC(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(RC));return t&&BC.call(e,RC)&&r.unshift(e),r=r.filter(n),r},GC=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!HC(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=GC(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{BC.call(a,RC)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!HC(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=GC(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},KC=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},qC=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||UC(e))&&!KC(e)?0:e.tabIndex},JC=function(e,t){var n=qC(e);return n<0&&t&&!KC(e)?0:n},YC=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},XC=function(e){return e.tagName===`INPUT`},ZC=function(e){return XC(e)&&e.type===`hidden`},QC=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},$C=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},ew=function(e){if(!e.name)return!0;var t=e.form||VC(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=$C(r,e.form);return!i||i===e},tw=function(e){return XC(e)&&e.type===`radio`},nw=function(e){return tw(e)&&!ew(e)},rw=function(e){var t=e&&VC(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=VC(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},iw=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},aw=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=BC.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(BC.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=VC(e);if(s&&!s.shadowRoot&&r(s)===!0)return iw(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(rw(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return iw(e);return!1},ow=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return BC.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},sw=function(e,t){return!(t.disabled||ZC(t)||aw(t,e)||QC(t)||ow(t))},cw=function(e,t){return!(nw(t)||qC(t)<0||!sw(e,t))},lw=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},uw=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=JC(a,i),s=i?uw(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(YC).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},dw=function(e,t){return t=t||{},uw(t.getShadowRoot?GC([e],t.includeContainer,{filter:cw.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:lw}):WC(e,t.includeContainer,cw.bind(null,t)))},fw=function(e,t){return t=t||{},t.getShadowRoot?GC([e],t.includeContainer,{filter:sw.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):WC(e,t.includeContainer,sw.bind(null,t))},pw=function(e,t){if(t=t||{},!e)throw Error(`No node provided`);return BC.call(e,RC)!==!1&&cw(t,e)},mw=LC.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),hw=function(e,t){if(t=t||{},!e)throw Error(`No node provided`);return BC.call(e,mw)!==!1&&sw(t,e)},gw=`data-context-menu-trigger`,_w=`data-context-menu-content`;new lS(`Menu.Root`),new lS(`Menu.Root | Menu.Sub`),new lS(`Menu.Content`),new lS(`Menu.Group | Menu.RadioGroup`),new lS(`Menu.RadioGroup`),new lS(`Menu.CheckboxGroup`),new MC(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),JS({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]});var vw;(vw=globalThis).bitsDismissableLayers??(vw.bitsDismissableLayers=new Map);var yw=new WeakMap,bw=new WeakMap,xw=new WeakMap,Sw=new WeakMap,Cw=new WeakMap,ww=new WeakMap,Tw=new WeakMap,Ew=new WeakMap,Dw=new WeakMap,Ow=new WeakSet,kw=new WeakMap,Aw=new WeakMap,jw=new WeakMap,Mw=new WeakMap,Nw=new WeakMap,Pw=new WeakMap,Fw=new WeakMap,Iw=new WeakMap,Lw=new WeakMap,Rw=class e{static create(t){return new e(t)}constructor(e){kt(this,Ow),x(this,`opts`,void 0),O(this,yw,void 0),O(this,bw,void 0),O(this,xw,{pointerdown:!1}),O(this,Sw,!1),O(this,Cw,!1),O(this,ww,void 0),O(this,Tw,void 0),O(this,Ew,xC),O(this,Dw,e=>{e.defaultPrevented||this.opts.ref.current&&ES(()=>{!this.opts.ref.current||j(Pw,this).call(this,e.target)||e.target&&!j(Cw,this)&&j(Tw,this).current?.(e)})}),O(this,kw,e=>{let t=e;t.defaultPrevented&&(t=Ww(e)),j(yw,this).current(e)}),O(this,Aw,NC(e=>{if(!this.opts.ref.current){j(Ew,this).call(this);return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||Uw(e,this.opts.ref.current);if(!j(Sw,this)||k(Ow,this,Bw).call(this)||!t){j(Ew,this).call(this);return}let n=e;if(n.defaultPrevented&&(n=Ww(n)),j(bw,this).current!==`close`&&j(bw,this).current!==`defer-otherwise-close`){j(Ew,this).call(this);return}e.pointerType===`touch`?(j(Ew,this).call(this),A(Ew,this,Qi(j(ww,this),`click`,j(kw,this),{once:!0}))):j(yw,this).current(n)},10)),O(this,jw,e=>{j(xw,this)[e.type]=!0}),O(this,Mw,e=>{j(xw,this)[e.type]=!1}),O(this,Nw,()=>{this.opts.ref.current&&A(Sw,this,Hw(this.opts.ref.current))}),O(this,Pw,e=>this.opts.ref.current?PC(this.opts.ref.current,e):!1),O(this,Fw,NC(()=>{for(let e in j(xw,this))j(xw,this)[e]=!1;A(Sw,this,!1)},20)),O(this,Iw,()=>{A(Cw,this,!0)}),O(this,Lw,()=>{A(Cw,this,!1)}),x(this,`props`,{onfocuscapture:j(Iw,this),onblurcapture:j(Lw,this)}),this.opts=e,A(bw,this,e.interactOutsideBehavior),A(yw,this,e.onInteractOutside),A(Tw,this,e.onFocusOutside),Lr(()=>{A(ww,this,FC(this.opts.ref.current))});let t=xC,n=null,r=!1,i=()=>{n!=null&&(clearTimeout(n),n=null)},a=()=>{i(),j(Fw,this).call(this),globalThis.bitsDismissableLayers.delete(this),j(Aw,this).destroy(),t()};fS([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return i(),n=TS(1,()=>{n=null,!(r||!this.opts.ref.current)&&(globalThis.bitsDismissableLayers.set(this,j(bw,this)),t(),t=k(Ow,this,zw).call(this))}),a}),wS(()=>{r=!0,i(),j(Fw,this).destroy(),globalThis.bitsDismissableLayers.delete(this),j(Aw,this).destroy(),j(Ew,this).call(this),t()})}};function zw(){return hx(Qi(j(ww,this),`pointerdown`,hx(j(jw,this),j(Nw,this)),{capture:!0}),Qi(j(ww,this),`pointerdown`,hx(j(Mw,this),j(Aw,this))),Qi(j(ww,this),`focusin`,j(Dw,this)))}function Bw(){return Object.values(j(xw,this)).some(Boolean)}function Vw(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Hw(e){let t=[...globalThis.bitsDismissableLayers],n=Vw(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function Uw(e,t){let n=e.target;if(!eC(n))return!1;let r=!!n.closest(`[${gw}]`),i=!!t.closest(`[${_w}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:FC(n).documentElement.contains(n)&&!PC(t,n)&&IC(e,t)}function Ww(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function Gw(e,t){it(t,!0);let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`onInteractOutside`,3,xC),i=Z(t,`onFocusOutside`,3,xC),a=Z(t,`isValidEvent`,3,()=>!1),o=Rw.create({id:Rb(()=>t.id),interactOutsideBehavior:Rb(()=>n()),onInteractOutside:Rb(()=>r()),enabled:Rb(()=>t.enabled),onFocusOutside:Rb(()=>i()),isValidEvent:Rb(()=>a()),ref:t.ref});var s=la();La(I(s),()=>t.children??p,()=>({props:o.props})),H(e,s),at()}var Kw;(Kw=globalThis).bitsEscapeLayers??(Kw.bitsEscapeLayers=new Map);var qw=new WeakMap,Jw=new WeakMap,Yw=class e{static create(t){return new e(t)}constructor(e){x(this,`opts`,void 0),x(this,`domContext`,void 0),O(this,qw,()=>Qi(this.domContext.getDocument(),`keydown`,j(Jw,this),{passive:!1})),O(this,Jw,e=>{if(e.key!==`Escape`||!Xw(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;(n===`close`||n===`defer-otherwise-close`)&&this.opts.onEscapeKeydown.current(t)}),this.opts=e,this.domContext=new BS(this.opts.ref);let t=xC;fS(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=j(qw,this).call(this)),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}};function Xw(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function Zw(e,t){it(t,!0);let n=Z(t,`escapeKeydownBehavior`,3,`close`),r=Z(t,`onEscapeKeydown`,3,xC);Yw.create({escapeKeydownBehavior:Rb(()=>n()),onEscapeKeydown:Rb(()=>r()),enabled:Rb(()=>t.enabled),ref:t.ref});var i=la();La(I(i),()=>t.children??p),H(e,i),at()}var Qw=new WeakMap,$w=new WeakMap,eT=new WeakMap,tT=class e{constructor(){O(this,Qw,Vb([])),O(this,$w,new WeakMap),O(this,eT,new WeakMap)}static getInstance(){return this.instance||(this.instance=new e),this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&j(eT,this).set(e,n),j(Qw,this).current=j(Qw,this).current.filter(t=>t!==e),j(Qw,this).current.unshift(e)}unregister(e){j(Qw,this).current=j(Qw,this).current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return j(Qw,this).current[0]}setFocusMemory(e,t){j($w,this).set(e,t)}getFocusMemory(e){return j($w,this).get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){j(eT,this).set(e,t)}getPreFocusMemory(e){return j(eT,this).get(e)}clearPreFocusMemory(e){j(eT,this).delete(e)}};x(tT,`instance`,void 0);var nT=new WeakMap,rT=new WeakMap,iT=new WeakMap,aT=new WeakMap,oT=new WeakMap,sT=new WeakSet,cT=class e{constructor(e){kt(this,sT),O(this,nT,!1),O(this,rT,null),O(this,iT,tT.getInstance()),O(this,aT,[]),O(this,oT,void 0),A(oT,this,e)}get paused(){return j(nT,this)}pause(){A(nT,this,!0)}resume(){A(nT,this,!1)}mount(e){j(rT,this)&&this.unmount(),A(rT,this,e),j(iT,this).register(this),k(sT,this,fT).call(this),k(sT,this,uT).call(this)}unmount(){j(rT,this)&&(k(sT,this,lT).call(this),k(sT,this,dT).call(this),j(iT,this).unregister(this),j(iT,this).clearPreFocusMemory(this),A(rT,this,null))}static use(t){let n=null;return fS([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||(n=new e(t)),n.mount(r)):n&&(n.unmount(),n=null)}),wS(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function lT(){for(let e of j(aT,this))e();A(aT,this,[])}function uT(){if(!j(rT,this))return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});j(oT,this).onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!j(rT,this))return;let e=k(sT,this,mT).call(this);e?(e.focus(),j(iT,this).setFocusMemory(this,e)):j(rT,this).focus()})}function dT(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(j(oT,this).onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=j(iT,this).getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}function fT(){if(!j(rT,this)||!j(oT,this).trap.current)return;let e=j(rT,this),t=e.ownerDocument;j(aT,this).push(Qi(t,`focusin`,t=>{if(j(nT,this)||!j(iT,this).isActiveScope(this))return;let n=t.target;if(n){if(e.contains(n))j(iT,this).setFocusMemory(this,n);else{let n=j(iT,this).getFocusMemory(this);if(n&&e.contains(n)&&hw(n))t.preventDefault(),n.focus();else{let t=k(sT,this,mT).call(this),n=k(sT,this,hT).call(this)[0];(t||n||e).focus()}}}},{capture:!0}),Qi(e,`keydown`,e=>{if(!j(oT,this).loop||j(nT,this)||e.key!==`Tab`||!j(iT,this).isActiveScope(this))return;let n=k(sT,this,pT).call(this);if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=j(iT,this).getFocusMemory(this);if(t&&!e.contains(t)){let t=k(sT,this,mT).call(this),n=k(sT,this,hT).call(this)[0],r=t||n;r?(r.focus(),j(iT,this).setFocusMemory(this,r)):e.focus()}});n.observe(e,{childList:!0,subtree:!0}),j(aT,this).push(()=>n.disconnect())}function pT(){return j(rT,this)?dw(j(rT,this),{includeContainer:!1,getShadowRoot:!0}):[]}function mT(){return k(sT,this,pT).call(this)[0]||null}function hT(){return j(rT,this)?fw(j(rT,this),{includeContainer:!1,getShadowRoot:!0}):[]}function gT(e,t){it(t,!0);let n=Z(t,`enabled`,3,!1),r=Z(t,`trapFocus`,3,!1),i=Z(t,`loop`,3,!1),a=Z(t,`onCloseAutoFocus`,3,xC),o=Z(t,`onOpenAutoFocus`,3,xC),s=cT.use({enabled:Rb(()=>n()),trap:Rb(()=>r()),loop:i(),onCloseAutoFocus:Rb(()=>a()),onOpenAutoFocus:Rb(()=>o()),ref:t.ref});var c=la();La(I(c),()=>t.focusScope??p,()=>({props:s.props})),H(e,c),at()}var _T,vT=()=>{};(_T=globalThis).bitsTextSelectionLayers??(_T.bitsTextSelectionLayers=new Map);var yT=new WeakMap,bT=new WeakMap,xT=new WeakMap,ST=new WeakMap,CT=new WeakSet,wT=new WeakMap,TT=new WeakMap,ET=new WeakMap,DT=class e{static create(t){return new e(t)}constructor(e){kt(this,CT),x(this,`opts`,void 0),x(this,`domContext`,void 0),O(this,yT,xC),O(this,bT,!1),O(this,xT,vT),O(this,ST,vT),O(this,wT,e=>{j(ST,this).call(this,e)}),O(this,TT,e=>{if(!j(bT,this))return;let t=this.opts.ref.current,n=e.target;!QS(t)||!QS(n)||!MT(this)||!FS(t,n)||(j(xT,this).call(this,e),!e.defaultPrevented&&A(yT,this,AT(t,this.domContext.getDocument().body)))}),O(this,ET,()=>{j(yT,this).call(this),A(yT,this,xC)}),this.opts=e,this.domContext=new BS(e.ref);let t=xC;fS(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(A(bT,this,e),A(xT,this,n),A(ST,this,r),e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=k(CT,this,OT).call(this)),()=>{A(bT,this,!1),t(),j(ET,this).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}};function OT(){return hx(Qi(this.domContext.getDocument(),`pointerdown`,j(TT,this)),Qi(this.domContext.getDocument(),`pointerup`,Hb(j(ET,this),j(wT,this))))}var kT=e=>e.style.userSelect||e.style.webkitUserSelect;function AT(e,t){let n=kT(t),r=kT(e);return jT(t,`none`),jT(e,`text`),()=>{jT(t,n),jT(e,r)}}function jT(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function MT(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function NT(e,t){it(t,!0);let n=Z(t,`preventOverflowTextSelection`,3,!0),r=Z(t,`onPointerDown`,3,xC),i=Z(t,`onPointerUp`,3,xC);DT.create({id:Rb(()=>t.id),onPointerDown:Rb(()=>r()),onPointerUp:Rb(()=>i()),enabled:Rb(()=>t.enabled&&n()),ref:t.ref});var a=la();La(I(a),()=>t.children??p),H(e,a),at()}var PT;(PT=globalThis).bitsIdCounter??(PT.bitsIdCounter={current:0});function FT(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var IT=new WeakMap,LT=new WeakMap,RT=new WeakMap,zT=new WeakMap,BT=new WeakSet,VT=class{constructor(e){kt(this,BT),O(this,IT,void 0),O(this,LT,0),O(this,RT,N()),O(this,zT,void 0),A(IT,this,e)}get(...e){return A(LT,this,j(LT,this)+1),z(j(RT,this))===void 0&&A(zT,this,Br(()=>{P(j(RT,this),j(IT,this).call(this,...e),!0)})),Lr(()=>()=>{k(BT,this,HT).call(this)}),z(j(RT,this))}};function HT(){A(LT,this,j(LT,this)-1),j(zT,this)&&j(LT,this)<=0&&(j(zT,this).call(this),P(j(RT,this),void 0),A(zT,this,void 0))}var UT=new tS,WT=N(null),GT=null,KT=null,qT=!1,JT=Rb(()=>{for(let e of UT.values())if(e)return!0;return!1}),YT=null,XT=new VT(()=>{function e(){document.body.setAttribute(`style`,z(WT)??``),document.body.style.removeProperty(`--scrollbar-width`),XS&>?.(),P(WT,null)}function t(){KT!==null&&(window.clearTimeout(KT),KT=null)}function n(e,n){t(),qT=!0,YT=Date.now();let r=YT,i=()=>{KT=null,YT===r&&(nE(UT)?qT=!1:(qT=!1,n()))},a=e===null?24:e;KT=window.setTimeout(i,a)}function r(){z(WT)===null&&UT.size===0&&!qT&&P(WT,document.body.getAttribute(`style`),!0)}return fS(()=>JT.current,()=>{if(!JT.current)return;r(),qT=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,XS&&(GT=Qi(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),ES(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),wS(()=>()=>{GT?.()}),{get lockMap(){return UT},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),ZT=new WeakMap,QT=new WeakMap,$T=new WeakMap,eE=new WeakMap,tE=class{constructor(e,t=()=>null){O(this,ZT,FT()),O(this,QT,void 0),O(this,$T,()=>null),O(this,eE,void 0),x(this,`locked`,void 0),A(QT,this,e),A($T,this,t),A(eE,this,XT.get()),j(eE,this)&&(j(eE,this).cancelPendingCleanup(),j(eE,this).ensureInitialStyleCaptured(),j(eE,this).lockMap.set(j(ZT,this),j(QT,this)??!1),this.locked=Rb(()=>j(eE,this).lockMap.get(j(ZT,this))??!1,e=>j(eE,this).lockMap.set(j(ZT,this),e)),wS(()=>{if(j(eE,this).lockMap.delete(j(ZT,this)),nE(j(eE,this).lockMap))return;let e=j($T,this).call(this);j(eE,this).scheduleCleanupIfNoNewLocks(e,()=>{j(eE,this).resetBodyStyle()})}))}};function nE(e){for(let[t,n]of e)if(n)return!0;return!1}function rE(e,t){it(t,!0);let n=Z(t,`preventScroll`,3,!0),r=Z(t,`restoreScrollDelay`,3,null);n()&&new tE(n(),()=>r()),at()}function iE(e,t){it(t,!0),EC({defaultPortalTo:Rb(()=>t.defaultPortalTo),defaultLocale:Rb(()=>t.defaultLocale)});var n=la();La(I(n),()=>t.children??p),H(e,n),at()}var aE=[`top`,`right`,`bottom`,`left`],oE=Math.min,sE=Math.max,cE=Math.round,lE=Math.floor,uE=e=>({x:e,y:e}),dE={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function fE(e,t,n){return sE(e,oE(t,n))}function pE(e,t){return typeof e==`function`?e(t):e}function mE(e){return e.split(`-`)[0]}function hE(e){return e.split(`-`)[1]}function gE(e){return e===`x`?`y`:`x`}function _E(e){return e===`y`?`height`:`width`}function vE(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function yE(e){return gE(vE(e))}function bE(e,t,n){n===void 0&&(n=!1);let r=hE(e),i=yE(e),a=_E(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=kE(o)),[o,kE(o)]}function xE(e){let t=kE(e);return[SE(e),t,SE(t)]}function SE(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var CE=[`left`,`right`],wE=[`right`,`left`],TE=[`top`,`bottom`],EE=[`bottom`,`top`];function DE(e,t,n){switch(e){case`top`:case`bottom`:return n?t?wE:CE:t?CE:wE;case`left`:case`right`:return t?TE:EE;default:return[]}}function OE(e,t,n,r){let i=hE(e),a=DE(mE(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(SE)))),a}function kE(e){let t=mE(e);return dE[t]+e.slice(t.length)}function AE(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function jE(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:AE(e)}function ME(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function NE(e,t,n){let{reference:r,floating:i}=e,a=vE(t),o=yE(t),s=_E(o),c=mE(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=hE(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function PE(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=pE(t,e),p=jE(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ME(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ME(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var FE=50,IE=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:PE},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=NE(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<FE&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=NE(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},LE=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=pE(e,t)||{};if(l==null)return{};let d=jE(u),f={x:n,y:r},p=yE(i),m=_E(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=oE(d[_],T),te=oE(d[v],T),ne=C-h[m]-te,re=C/2-h[m]/2+w,ie=fE(ee,re,ne),ae=!c.arrow&&hE(i)!=null&&re!==ie&&a.reference[m]/2-(re<ee?ee:te)-h[m]/2<0,oe=ae?re<ee?re-ee:re-ne:0;return{[p]:f[p]+oe,data:{[p]:ie,centerOffset:re-ie-oe,...ae&&{alignmentOffset:oe}},reset:ae}}}),RE=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=pE(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=mE(r),_=vE(o),v=mE(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[kE(o)]:xE(o)),x=p!==`none`;!d&&x&&b.push(...OE(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=bE(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===vE(t)||T.every(e=>vE(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=vE(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function zE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BE(e){return aE.some(t=>e[t]>=0)}var VE=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=pE(e,t);switch(i){case`referenceHidden`:{let e=zE(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:BE(e)}}}case`escaped`:{let e=zE(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:BE(e)}}}default:return{}}}}},HE=new Set([`left`,`top`]);async function UE(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=mE(n),s=hE(n),c=vE(n)===`y`,l=HE.has(o)?-1:1,u=a&&c?-1:1,d=pE(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var WE=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await UE(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},GE=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=pE(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=vE(i),p=gE(f),m=u[p],h=u[f],g=(e,t)=>fE(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},KE=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=pE(e,t),u={x:n,y:r},d=vE(i),f=gE(d),p=u[f],m=u[d],h=pE(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=HE.has(mE(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},qE=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=pE(e,t),c=await i.detectOverflow(t,s),l=mE(n),u=hE(n),d=vE(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=oE(p-c[m],g),y=oE(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*sE(c.left,c.right):S=p-2*sE(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function JE(){return typeof window<`u`}function YE(e){return QE(e)?(e.nodeName||``).toLowerCase():`#document`}function XE(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ZE(e){return((QE(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function QE(e){return JE()?e instanceof Node||e instanceof XE(e).Node:!1}function $E(e){return JE()?e instanceof Element||e instanceof XE(e).Element:!1}function eD(e){return JE()?e instanceof HTMLElement||e instanceof XE(e).HTMLElement:!1}function tD(e){return!JE()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof XE(e).ShadowRoot}function nD(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=pD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function rD(e){return/^(table|td|th)$/.test(YE(e))}function iD(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var aD=/transform|translate|scale|rotate|perspective|filter/,oD=/paint|layout|strict|content/,sD=e=>!!e&&e!==`none`,cD;function lD(e){let t=$E(e)?pD(e):e;return sD(t.transform)||sD(t.translate)||sD(t.scale)||sD(t.rotate)||sD(t.perspective)||!dD()&&(sD(t.backdropFilter)||sD(t.filter))||aD.test(t.willChange||``)||oD.test(t.contain||``)}function uD(e){let t=hD(e);for(;eD(t)&&!fD(t);){if(lD(t))return t;if(iD(t))return null;t=hD(t)}return null}function dD(){return cD??(cD=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`)),cD}function fD(e){return/^(html|body|#document)$/.test(YE(e))}function pD(e){return XE(e).getComputedStyle(e)}function mD(e){return $E(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hD(e){if(YE(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||tD(e)&&e.host||ZE(e);return tD(t)?t.host:t}function gD(e){let t=hD(e);return fD(t)?(e.ownerDocument||e).body:eD(t)&&nD(t)?t:gD(t)}function _D(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=gD(e),i=r===e.ownerDocument?.body,a=XE(r);if(i){let e=vD(a);return t.concat(a,a.visualViewport||[],nD(r)?r:[],e&&n?_D(e):[])}return t.concat(r,_D(r,[],n))}function vD(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yD(e){let t=pD(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=eD(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=cE(n)!==a||cE(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function bD(e){return $E(e)?e:e.contextElement}function xD(e){let t=bD(e);if(!eD(t))return uE(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=yD(t),o=(a?cE(n.width):n.width)/r,s=(a?cE(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var SD=uE(0);function CD(e){let t=XE(e);return!dD()||!t.visualViewport?SD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wD(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===XE(e)}function TD(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=bD(e),o=uE(1);t&&(r?$E(r)&&(o=xD(r)):o=xD(e));let s=wD(a,n,r)?CD(a):uE(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=XE(a),t=$E(r)?XE(r):r,n=e,i=vD(n);for(;i&&t!==n;){let e=xD(i),t=i.getBoundingClientRect(),r=pD(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=XE(i),i=vD(n)}}return ME({width:u,height:d,x:c,y:l})}function ED(e,t){let n=mD(e).scrollLeft;return t?t.left+n:TD(ZE(e)).left+n}function DD(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ED(e,n),y:n.top+t.scrollTop}}function OD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=ZE(r),s=t?iD(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=uE(1),u=uE(0),d=eD(r);if((d||!a)&&((YE(r)!==`body`||nD(o))&&(c=mD(r)),d)){let e=TD(r);l=xD(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?DD(o,c):uE(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function kD(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function AD(e){let t=mD(e),n=e.ownerDocument.body,r=sE(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=sE(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+ED(e),o=-t.scrollTop;return pD(n).direction===`rtl`&&(a+=sE(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var jD=25;function MD(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=XE(e),a=ZE(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!dD()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(ED(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=jD&&(s-=o)}return{width:s,height:c,x:l,y:u}}function ND(e,t){let n=TD(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=xD(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function PD(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=MD(e,n,t);else if(t===`document`)r=AD(ZE(e));else if($E(t))r=ND(t,n);else{let n=CD(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ME(r)}function FD(e,t){let n=t.get(e);if(n)return n;let r=_D(e,[],!1).filter(e=>$E(e)&&YE(e)!==`body`),i=null,a=pD(e).position===`fixed`,o=a?hD(e):e;for(;$E(o)&&!fD(o);){let e=pD(o),t=lD(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=hD(o)}return t.set(e,r),r}function ID(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?iD(t)?[]:FD(t,this._c):[].concat(n),r],o=PD(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=PD(t,a[e],i);s=sE(n.top,s),c=oE(n.right,c),l=oE(n.bottom,l),u=sE(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function LD(e){let{width:t,height:n}=yD(e);return{width:t,height:n}}function RD(e,t,n){let r=eD(t),i=ZE(t),a=n===`fixed`,o=TD(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=uE(0);if((r||!a)&&((YE(t)!==`body`||nD(i))&&(s=mD(t)),r)){let e=TD(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=ED(i));let l=i&&!r&&!a?DD(i,s):uE(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function zD(e){return pD(e).position===`static`}function BD(e,t){if(!eD(e)||pD(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return ZE(e)===n&&(n=n.ownerDocument.body),n}function VD(e,t){let n=XE(e);if(iD(e))return n;if(!eD(e)){let t=hD(e);for(;t&&!fD(t);){if($E(t)&&!zD(t))return t;t=hD(t)}return n}let r=BD(e,t);for(;r&&rD(r)&&zD(r);)r=BD(r,t);return r&&fD(r)&&zD(r)&&!lD(r)?n:r||uD(e)||n}var HD=async function(e){let t=this.getOffsetParent||VD,n=this.getDimensions,r=await n(e.floating);return{reference:RD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function UD(e){return pD(e).direction===`rtl`}var WD={convertOffsetParentRelativeRectToViewportRelativeRect:OD,getDocumentElement:ZE,getClippingRect:ID,getOffsetParent:VD,getElementRects:HD,getClientRects:kD,getDimensions:LD,getScale:xD,isElement:$E,isRTL:UD};function GD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function KD(e,t,n){let r=null,i,a=ZE(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=lE(d),h=lE(a.clientWidth-(u+f)),g=lE(a.clientHeight-(d+p)),_=lE(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:sE(0,oE(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!GD(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=XE(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function qD(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=bD(e),u=i||a?[...l?_D(l):[],...t?_D(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?KD(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?TD(e):null;c&&g();function g(){let t=TD(e);h&&!GD(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var JD=WE,YD=GE,XD=RE,ZD=qE,QD=VE,$D=LE,eO=KE,tO=(e,t,n)=>{let r=new Map,i=n??{},a={...WD,...i.platform,_c:r};return IE(e,t,{...i,platform:a})};function nO(e){return typeof e==`function`?e():e}function rO(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iO(e,t){let n=rO(e);return Math.round(t*n)/n}function aO(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}function oO(e){let t=e.whileElementsMounted,n=M(()=>nO(e.open)??!0),r=M(()=>nO(e.middleware)),i=M(()=>nO(e.transform)??!0),a=M(()=>nO(e.placement)??`bottom`),o=M(()=>nO(e.strategy)??`absolute`),s=M(()=>nO(e.sideOffset)??0),c=M(()=>nO(e.alignOffset)??0),l=e.reference,u=N(0),d=N(0),f=Vb(null),p=N(_r(z(o))),m=N(_r(z(a))),h=N(_r({})),g=N(!1),_=!1,v=0,y=M(()=>{let e=f.current?iO(f.current,z(u)):z(u),t=f.current?iO(f.current,z(d)):z(d);return z(i)?{position:z(p),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...f.current&&rO(f.current)>=1.5&&{willChange:`transform`}}:{position:z(p),left:`${e}px`,top:`${t}px`}}),b;function x(){if(l.current===null||f.current===null)return;let e=l.current,t=f.current,i=++v;tO(e,t,{middleware:z(r),placement:z(a),strategy:z(o)}).then(r=>{if(i===v&&l.current===e&&f.current===t){if(sO(e)){P(h,{...z(h),hide:{...z(h).hide,referenceHidden:!0}},!0);return}if(!z(n)&&z(u)!==0&&z(d)!==0){let e=Math.max(Math.abs(z(s)),Math.abs(z(c)),15);if(r.x<=e&&r.y<=e)return}P(u,r.x,!0),P(d,r.y,!0),P(p,r.strategy,!0),P(m,r.placement,!0),P(h,r.middlewareData,!0),P(g,!0)}})}function S(){typeof b==`function`&&(b(),b=void 0),v++}function C(){if(S(),t===void 0){x();return}z(n)&&l.current!==null&&f.current!==null&&(b=t(l.current,f.current,x))}function w(){!z(n)&&f.current===null&&P(g,!1)}function T(){return[z(r),z(a),z(o),z(s),z(c),z(n)]}return Lr(()=>{t===void 0&&z(n)&&x()}),Lr(C),Lr(()=>{if(t!==void 0){if(T(),!z(n)){_=!1;return}if(!z(g)){_=!1;return}if(!_){_=!0;return}x()}}),Lr(w),Lr(()=>S),{floating:f,reference:l,get strategy(){return z(p)},get placement(){return z(m)},get middlewareData(){return z(h)},get isPositioned(){return z(g)},get floatingStyles(){return z(y)},get update(){return x}}}function sO(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var cO={top:`bottom`,right:`left`,bottom:`top`,left:`right`},lO=new lS(`Floating.Root`),uO=new lS(`Floating.Content`),dO=new lS(`Floating.Root`),fO=class e{static create(t=!1){return t?dO.set(new e):lO.set(new e)}constructor(){x(this,`anchorNode`,Vb(null)),x(this,`customAnchorNode`,Vb(null)),x(this,`triggerNode`,Vb(null)),Lr(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},pO=new WeakMap,mO=new WeakMap,hO=new WeakMap,gO=new WeakMap,_O=new WeakMap,vO=new WeakMap,yO=new WeakMap,bO=new WeakMap,xO=new WeakMap,SO=new WeakMap,CO=new WeakMap,wO=new WeakMap,TO=new WeakMap,EO=new WeakMap,DO=new WeakMap,OO=new WeakMap,kO=new WeakMap,AO=new WeakMap,jO=new WeakMap,MO=new WeakMap,NO=new WeakMap,PO=new WeakMap,FO=new WeakMap,IO=new WeakMap,LO=class e{static create(t,n=!1){return n?uO.set(new e(t,dO.get())):uO.set(new e(t,lO.get()))}get hasExplicitBoundaries(){return z(j(bO,this))}set hasExplicitBoundaries(e){P(j(bO,this),e)}get detectOverflowOptions(){return z(j(xO,this))}set detectOverflowOptions(e){P(j(xO,this),e)}get middleware(){return z(j(EO,this))}set middleware(e){P(j(EO,this),e)}get placedSide(){return z(j(DO,this))}set placedSide(e){P(j(DO,this),e)}get placedAlign(){return z(j(OO,this))}set placedAlign(e){P(j(OO,this),e)}get arrowX(){return z(j(kO,this))}set arrowX(e){P(j(kO,this),e)}get arrowY(){return z(j(AO,this))}set arrowY(e){P(j(AO,this),e)}get cannotCenterArrow(){return z(j(jO,this))}set cannotCenterArrow(e){P(j(jO,this),e)}get contentZIndex(){return z(j(MO,this))}set contentZIndex(e){P(j(MO,this),e,!0)}get arrowBaseSide(){return z(j(NO,this))}set arrowBaseSide(e){P(j(NO,this),e)}get wrapperProps(){return z(j(PO,this))}set wrapperProps(e){P(j(PO,this),e)}get props(){return z(j(FO,this))}set props(e){P(j(FO,this),e)}get arrowStyle(){return z(j(IO,this))}set arrowStyle(e){P(j(IO,this),e)}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`contentRef`,Vb(null)),x(this,`wrapperRef`,Vb(null)),x(this,`arrowRef`,Vb(null)),x(this,`contentAttachment`,VS(this.contentRef)),x(this,`wrapperAttachment`,VS(this.wrapperRef)),x(this,`arrowAttachment`,VS(this.arrowRef)),x(this,`arrowId`,Vb(FT())),O(this,pO,M(()=>{if(typeof this.opts.style==`string`)return mx(this.opts.style);if(!this.opts.style)return{}})),O(this,mO,void 0),O(this,hO,new CS(()=>this.arrowRef.current??void 0)),O(this,gO,M(()=>j(hO,this)?.width??0)),O(this,_O,M(()=>j(hO,this)?.height??0)),O(this,vO,M(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`))),O(this,yO,M(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current])),O(this,bO,M(()=>z(j(yO,this)).length>0)),O(this,xO,M(()=>({padding:this.opts.collisionPadding.current,boundary:z(j(yO,this)).filter(nC),altBoundary:this.hasExplicitBoundaries}))),O(this,SO,N(void 0)),O(this,CO,N(void 0)),O(this,wO,N(void 0)),O(this,TO,N(void 0)),O(this,EO,M(()=>[JD({mainAxis:this.opts.sideOffset.current+z(j(_O,this)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&YD({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?eO():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&XD({...this.detectOverflowOptions}),ZD({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;P(j(SO,this),t,!0),P(j(CO,this),n,!0),P(j(wO,this),r,!0),P(j(TO,this),i,!0)}}),this.arrowRef.current&&$D({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),zO({arrowWidth:z(j(gO,this)),arrowHeight:z(j(_O,this))}),this.opts.hideWhenDetached.current&&QD({strategy:`referenceHidden`,...this.detectOverflowOptions})].filter(Boolean))),x(this,`floating`,void 0),O(this,DO,M(()=>VO(this.floating.placement))),O(this,OO,M(()=>HO(this.floating.placement))),O(this,kO,M(()=>this.floating.middlewareData.arrow?.x??0)),O(this,AO,M(()=>this.floating.middlewareData.arrow?.y??0)),O(this,jO,M(()=>this.floating.middlewareData.arrow?.centerOffset!==0)),O(this,MO,N()),O(this,NO,M(()=>cO[this.placedSide])),O(this,PO,M(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${z(j(SO,this))}px`,"--bits-floating-available-height":`${z(j(CO,this))}px`,"--bits-floating-anchor-width":`${z(j(wO,this))}px`,"--bits-floating-anchor-height":`${z(j(TO,this))}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:`hidden`,"pointer-events":`none`},...z(j(pO,this))},dir:this.opts.dir.current,...this.wrapperAttachment}))),O(this,FO,M(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:yx({...z(j(pO,this))}),...this.contentAttachment}))),O(this,IO,M(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}))),this.opts=e,this.root=t,A(mO,this,e.updatePositionStrategy),e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),fS(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=oO({strategy:()=>this.opts.strategy.current,placement:()=>z(j(vO,this)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>qD(...e,{animationFrame:j(mO,this)?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),Lr(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),fS(()=>this.contentRef.current,e=>{if(!e||!this.opts.enabled.current)return;let t=LS(e),n=t.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let n=t.getComputedStyle(e).zIndex;n!==this.contentZIndex&&(this.contentZIndex=n)});return()=>{t.cancelAnimationFrame(n)}}),Lr(()=>{this.floating.floating.current=this.wrapperRef.current})}},RO=class e{static create(t,n=!1){return n?new e(t,dO.get()):new e(t,lO.get())}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),this.opts=e,this.root=t,t.triggerNode=e.virtualEl&&e.virtualEl.current?Bb(e.virtualEl.current):e.ref}};function zO(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=BO(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function BO(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function VO(e){return BO(e)[0]}function HO(e){return BO(e)[1]}function UO(e,t){it(t,!0);let n=Z(t,`tooltip`,3,!1);fO.create(n());var r=la();La(I(r),()=>t.children??p),H(e,r),at()}function WO(e,t){it(t,!0);let n=Z(t,`tooltip`,3,!1);RO.create({id:Rb(()=>t.id),virtualEl:Rb(()=>t.virtualEl),ref:t.ref},n());var r=la();La(I(r),()=>t.children??p),H(e,r),at()}function GO(e,t){it(t,!0);let n=Z(t,`side`,3,`bottom`),r=Z(t,`sideOffset`,3,0),i=Z(t,`align`,3,`center`),a=Z(t,`alignOffset`,3,0),o=Z(t,`arrowPadding`,3,0),s=Z(t,`avoidCollisions`,3,!0),c=Z(t,`collisionBoundary`,19,()=>[]),l=Z(t,`collisionPadding`,3,0),u=Z(t,`hideWhenDetached`,3,!1),d=Z(t,`onPlaced`,3,()=>{}),f=Z(t,`sticky`,3,`partial`),m=Z(t,`updatePositionStrategy`,3,`optimized`),h=Z(t,`strategy`,3,`fixed`),g=Z(t,`dir`,3,`ltr`),_=Z(t,`style`,19,()=>({})),v=Z(t,`wrapperId`,19,FT),y=Z(t,`customAnchor`,3,null),b=Z(t,`tooltip`,3,!1),x=LO.create({side:Rb(()=>n()),sideOffset:Rb(()=>r()),align:Rb(()=>i()),alignOffset:Rb(()=>a()),id:Rb(()=>t.id),arrowPadding:Rb(()=>o()),avoidCollisions:Rb(()=>s()),collisionBoundary:Rb(()=>c()),collisionPadding:Rb(()=>l()),hideWhenDetached:Rb(()=>u()),onPlaced:Rb(()=>d()),sticky:Rb(()=>f()),updatePositionStrategy:Rb(()=>m()),strategy:Rb(()=>h()),dir:Rb(()=>g()),style:Rb(()=>_()),enabled:Rb(()=>t.enabled),wrapperId:Rb(()=>v()),customAnchor:Rb(()=>y())},b()),S=M(()=>Sx(x.wrapperProps,{style:{pointerEvents:`auto`}}));var C=la();La(I(C),()=>t.content??p,()=>({props:x.props,wrapperProps:z(S)})),H(e,C),at()}function KO(e,t){it(t,!0),Wo(()=>{t.onPlaced?.()});var n=la();La(I(n),()=>t.content??p,()=>({props:{},wrapperProps:{}})),H(e,n),at()}var qO=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function JO(e,t){let n=Z(t,`isStatic`,3,!1),r=Y(t,qO);var i=la(),a=I(i),o=e=>{KO(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},s=e=>{GO(e,X({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};W(a,e=>{n()?e(o):e(s,-1)}),H(e,i)}var YO=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents`.split(`.`)),XO=V(`<!> <!>`,1);function ZO(e,t){it(t,!0);let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Z(t,`tooltip`,3,!1),c=Z(t,`contentPointerEvents`,3,`auto`),l=Y(t,YO),u=M(()=>t.preventScroll??!0),d=M(()=>t.strategy??(z(u)?`fixed`:`absolute`));JO(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return z(d)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get enabled(){return t.enabled},get tooltip(){return s()},content:(e,a)=>{let o=()=>(a?.()).props,s=()=>(a?.()).wrapperProps;var d=XO(),f=I(d),m=e=>{rE(e,{get preventScroll(){return z(u)}})},h=e=>{rE(e,{get preventScroll(){return z(u)}})};W(f,e=>{t.forceMount&&t.enabled?e(m):t.forceMount||e(h,1)}),gT(L(f,2),{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(e,r)=>{let a=()=>(r?.()).props;Zw(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,r)=>{Gw(e,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{let r=()=>(n?.()).props;NT(e,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{var i=la(),u=I(i);{let e=M(()=>({props:Sx(l,o(),r(),a(),{style:{pointerEvents:c()}}),wrapperProps:s()}));La(u,()=>t.popper??p,()=>z(e))}H(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),H(e,d)},$$slots:{content:!0}}),at()}var QO=new Set(`$$slots.$$events.$$legacy.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));function $O(e,t){let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Y(t,QO);var c=la(),l=I(c),u=e=>{ZO(e,X({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>s))};W(l,e=>{t.shouldRender&&e(u)}),H(e,c)}var ek=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));function tk(e,t){let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Y(t,ek);ZO(e,X({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>s,{forceMount:!0}))}function nk(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]??[0,0],[c,l]=t[o]??[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function rk(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function ik(e,t){let n=e.left+e.width/2,r=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,o=i-n,s=a-r;return Math.abs(o)>Math.abs(s)?o>0?`right`:`left`:s>0?`bottom`:`top`}var ak=new WeakMap,ok=new WeakMap,sk=new WeakMap,ck=new WeakMap,lk=new WeakMap,uk=new WeakMap,dk=new WeakMap,fk=new WeakMap,pk=new WeakMap,mk=new WeakSet,hk=class{constructor(e){kt(this,mk),O(this,ak,void 0),O(this,ok,void 0),O(this,sk,void 0),O(this,ck,null),O(this,lk,null),O(this,uk,[]),O(this,dk,null),O(this,fk,null),O(this,pk,null),A(ak,this,e),A(ok,this,e.buffer??1);let t=e.transitIntentTimeout;A(sk,this,typeof t==`number`&&t>0?t:null),fS([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>{if(!e||!t||!n){A(dk,this,null),k(mk,this,xk).call(this);return}return j(dk,this)&&j(dk,this)!==e&&k(mk,this,xk).call(this),A(dk,this,e),[Qi(IS(e),`pointermove`,n=>{k(mk,this,bk).call(this,[n.clientX,n.clientY],e,t)}),Qi(e,`pointerleave`,e=>{let n=e.relatedTarget;if($S(n)&&t.contains(n))return;let r=j(ak,this).ignoredTargets?.()??[];$S(n)&&r.some(e=>e===n||e.contains(n))||(A(uk,this,$S(n)&&r.length>0?r.filter(e=>n.contains(e)):[]),A(ck,this,[e.clientX,e.clientY]),A(lk,this,`content`),k(mk,this,_k).call(this))}),Qi(e,`pointerenter`,()=>{k(mk,this,xk).call(this)}),Qi(t,`pointerenter`,()=>{k(mk,this,xk).call(this)}),Qi(t,`pointerleave`,t=>{let n=t.relatedTarget;$S(n)&&e.contains(n)||(A(ck,this,[t.clientX,t.clientY]),A(lk,this,`trigger`),k(mk,this,_k).call(this))})].reduce((e,t)=>()=>{e(),t()},()=>{})})}};function gk(){j(fk,this)!==null&&(cancelAnimationFrame(j(fk,this)),A(fk,this,null))}function _k(){k(mk,this,gk).call(this),A(fk,this,requestAnimationFrame(()=>{A(fk,this,null),!(!j(ck,this)||!j(lk,this))&&(k(mk,this,xk).call(this),j(ak,this).onPointerExit())}))}function vk(){j(pk,this)!==null&&(clearTimeout(j(pk,this)),A(pk,this,null))}function yk(){j(sk,this)!==null&&(k(mk,this,vk).call(this),A(pk,this,window.setTimeout(()=>{A(pk,this,null),!(!j(ck,this)||!j(lk,this))&&(k(mk,this,xk).call(this),j(ak,this).onPointerExit())},j(sk,this))))}function bk(e,t,n){if(!j(ck,this)||!j(lk,this))return;k(mk,this,gk).call(this),k(mk,this,yk).call(this);let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();if(j(lk,this)===`content`&&rk(e,i)){k(mk,this,xk).call(this);return}if(j(lk,this)===`trigger`&&rk(e,r)){k(mk,this,xk).call(this);return}if(j(lk,this)===`content`&&j(uk,this).length>0)for(let t of j(uk,this)){let n=t.getBoundingClientRect();if(rk(e,n))return;let i=ik(r,n),a=k(mk,this,Sk).call(this,r,n,i);if(a&&nk(e,a))return}let a=ik(r,i),o=k(mk,this,Sk).call(this,r,i,a);if(o&&nk(e,o))return;let s=j(lk,this)===`content`?i:r;nk(e,k(mk,this,Ck).call(this,j(ck,this),s,a,j(lk,this)))||(k(mk,this,xk).call(this),j(ak,this).onPointerExit())}function xk(){A(ck,this,null),A(lk,this,null),A(uk,this,[]),k(mk,this,gk).call(this),k(mk,this,vk).call(this)}function Sk(e,t,n){let r=j(ok,this);switch(n){case`top`:return[[Math.min(e.left,t.left)-r,e.top],[Math.min(e.left,t.left)-r,t.bottom],[Math.max(e.right,t.right)+r,t.bottom],[Math.max(e.right,t.right)+r,e.top]];case`bottom`:return[[Math.min(e.left,t.left)-r,e.bottom],[Math.min(e.left,t.left)-r,t.top],[Math.max(e.right,t.right)+r,t.top],[Math.max(e.right,t.right)+r,e.bottom]];case`left`:return[[e.left,Math.min(e.top,t.top)-r],[t.right,Math.min(e.top,t.top)-r],[t.right,Math.max(e.bottom,t.bottom)+r],[e.left,Math.max(e.bottom,t.bottom)+r]];case`right`:return[[e.right,Math.min(e.top,t.top)-r],[t.left,Math.min(e.top,t.top)-r],[t.left,Math.max(e.bottom,t.bottom)+r],[e.right,Math.max(e.bottom,t.bottom)+r]]}}function Ck(e,t,n,r){let i=j(ok,this)*4,[a,o]=e;switch(r===`trigger`?k(mk,this,wk).call(this,n):n){case`top`:return[[a-i,o+i],[a+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case`bottom`:return[[a-i,o-i],[a+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case`left`:return[[a+i,o-i],[a+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case`right`:return[[a-i,o-i],[a-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}function wk(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}var Tk=JS({component:`popover`,parts:[`root`,`trigger`,`content`,`close`,`overlay`]}),Ek=new lS(`Popover.Root`),Dk=new WeakMap,Ok=new WeakMap,kk=new WeakMap,Ak=new WeakMap,jk=new WeakMap,Mk=new WeakMap,Nk=new WeakMap,Pk=new WeakMap,Fk=new WeakMap,Ik=new WeakSet,Lk=class e{static create(t){return Ek.set(new e(t))}get contentNode(){return z(j(Dk,this))}set contentNode(e){P(j(Dk,this),e,!0)}get triggerNode(){return z(j(Ok,this))}set triggerNode(e){P(j(Ok,this),e,!0)}get overlayNode(){return z(j(kk,this))}set overlayNode(e){P(j(kk,this),e,!0)}get openedViaHover(){return z(j(Ak,this))}set openedViaHover(e){P(j(Ak,this),e,!0)}get hasInteractedWithContent(){return z(j(jk,this))}set hasInteractedWithContent(e){P(j(jk,this),e,!0)}get hoverCooldown(){return z(j(Mk,this))}set hoverCooldown(e){P(j(Mk,this),e,!0)}get closeDelay(){return z(j(Nk,this))}set closeDelay(e){P(j(Nk,this),e,!0)}constructor(e){kt(this,Ik),x(this,`opts`,void 0),O(this,Dk,N(null)),x(this,`contentPresence`,void 0),O(this,Ok,N(null)),O(this,kk,N(null)),x(this,`overlayPresence`,void 0),O(this,Ak,N(!1)),O(this,jk,N(!1)),O(this,Mk,N(!1)),O(this,Nk,N(0)),O(this,Pk,null),O(this,Fk,null),this.opts=e,this.contentPresence=new yC({ref:Rb(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new yC({ref:Rb(()=>this.overlayNode),open:this.opts.open}),fS(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,k(Ik,this,Rk).call(this))})}setDomContext(e){A(Fk,this,e)}toggleOpen(){k(Ik,this,Rk).call(this),this.opts.open.current=!this.opts.open.current}handleClose(){k(Ik,this,Rk).call(this),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){k(Ik,this,Rk).call(this),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(k(Ik,this,Rk).call(this),this.closeDelay<=0?this.opts.open.current=!1:j(Fk,this)&&A(Pk,this,j(Fk,this).setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),A(Pk,this,null)},this.closeDelay))))}cancelDelayedClose(){k(Ik,this,Rk).call(this)}markInteraction(){this.hasInteractedWithContent=!0,k(Ik,this,Rk).call(this)}};function Rk(){j(Pk,this)!==null&&j(Fk,this)&&(j(Fk,this).clearTimeout(j(Pk,this)),A(Pk,this,null))}var zk=new WeakMap,Bk=new WeakMap,Vk=new WeakMap,Hk=new WeakSet,Uk=new WeakMap,Wk=class e{static create(t){return new e(t,Ek.get())}constructor(e,t){kt(this,Hk),x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`attachment`,void 0),x(this,`domContext`,void 0),O(this,zk,null),O(this,Bk,null),O(this,Vk,N(!1)),O(this,Uk,M(()=>({id:this.opts.id.current,"aria-haspopup":`dialog`,"aria-expanded":HS(this.root.opts.open.current),"data-state":US(this.root.opts.open.current),"aria-controls":k(Hk,this,Jk).call(this),[Tk.trigger]:``,disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}))),this.opts=e,this.root=t,this.attachment=VS(this.opts.ref,e=>this.root.triggerNode=e),this.domContext=new BS(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),fS(()=>this.opts.closeDelay.current,e=>{this.root.closeDelay=e})}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||tC(e)||(P(j(Vk,this),!0),k(Hk,this,Kk).call(this),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;let t=this.opts.openDelay.current;t<=0?this.root.handleHoverOpen():A(zk,this,this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),A(zk,this,null)},t))}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(tC(e)||(P(j(Vk,this),!1),k(Hk,this,Gk).call(this),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(k(Hk,this,qk).call(this),z(j(Vk,this))&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}z(j(Vk,this))&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),k(Hk,this,qk).call(this),this.root.toggleOpen())}get props(){return z(j(Uk,this))}set props(e){P(j(Uk,this),e)}};function Gk(){j(zk,this)!==null&&(this.domContext.clearTimeout(j(zk,this)),A(zk,this,null))}function Kk(){j(Bk,this)!==null&&(this.domContext.clearTimeout(j(Bk,this)),A(Bk,this,null))}function qk(){k(Hk,this,Gk).call(this),k(Hk,this,Kk).call(this)}function Jk(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}var Yk=new WeakMap,Xk=new WeakMap,Zk=class e{static create(t){return new e(t,Ek.get())}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`attachment`,void 0),x(this,`onInteractOutside`,e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!$S(e.target))return;let t=e.target.closest(Tk.selector(`trigger`));if(!(t&&t===this.root.triggerNode)){if(this.opts.customAnchor.current){if($S(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current==`string`){let t=document.querySelector(this.opts.customAnchor.current);if(t&&t.contains(e.target))return}}this.root.handleClose()}}),x(this,`onEscapeKeydown`,e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()}),O(this,Yk,M(()=>({open:this.root.opts.open.current}))),O(this,Xk,M(()=>({id:this.opts.id.current,tabindex:-1,"data-state":US(this.root.opts.open.current),...WS(this.root.contentPresence.transitionStatus),[Tk.content]:``,style:{pointerEvents:`auto`,contain:`layout style`},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}))),x(this,`popperProps`,{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}),this.opts=e,this.root=t,this.attachment=VS(this.opts.ref,e=>this.root.contentNode=e),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new hk({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){let t=e.target;$S(t)&&pw(t)&&this.root.markInteraction()}onpointerenter(e){tC(e)||this.root.cancelDelayedClose()}onpointerleave(e){tC(e)}get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}get snippetProps(){return z(j(Yk,this))}set snippetProps(e){P(j(Yk,this),e)}get props(){return z(j(Xk,this))}set props(e){P(j(Xk,this),e)}},Qk=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`forceMount`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`customAnchor`,`style`]),$k=V(`<div><div><!></div></div>`);function eA(e,t){let n=ua();it(t,!0);let r=Z(t,`ref`,15,null),i=Z(t,`id`,19,()=>SC(n)),a=Z(t,`forceMount`,3,!1),o=Z(t,`onOpenAutoFocus`,3,xC),s=Z(t,`onCloseAutoFocus`,3,xC),c=Z(t,`onEscapeKeydown`,3,xC),l=Z(t,`onInteractOutside`,3,xC),u=Z(t,`trapFocus`,3,!0),d=Z(t,`preventScroll`,3,!1),f=Z(t,`customAnchor`,3,null),m=Y(t,Qk),h=Zk.create({id:Rb(()=>i()),ref:Rb(()=>r(),e=>r(e)),onInteractOutside:Rb(()=>l()),onEscapeKeydown:Rb(()=>c()),customAnchor:Rb(()=>f())}),g=M(()=>Sx(m,h.props)),_=M(()=>u()&&h.shouldTrapFocus);function v(e){h.shouldTrapFocus||e.preventDefault(),o()(e)}var y=la(),b=I(y),x=e=>{tk(e,X(()=>z(g),()=>h.popperProps,{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},get id(){return i()},get trapFocus(){return z(_)},get preventScroll(){return d()},loop:!0,forceMount:!0,get customAnchor(){return f()},onOpenAutoFocus:v,get onCloseAutoFocus(){return s()},get shouldRender(){return h.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>Sx(r(),{style:aO(`popover`)},{style:t.style}));var o=la(),s=I(o),c=e=>{var n=la(),r=I(n);{let e=M(()=>({props:z(a),wrapperProps:i(),...h.snippetProps}));La(r,()=>t.child,()=>z(e))}H(e,n)},l=e=>{var n=$k();Eo(n,()=>({...i()}));var r=F(n);Eo(r,()=>({...z(a)})),La(F(r),()=>t.children??p),D(r),D(n),H(e,n)};W(s,e=>{t.child?e(c):e(l,-1)}),H(e,o)},$$slots:{popper:!0}}))},S=e=>{$O(e,X(()=>z(g),()=>h.popperProps,{get ref(){return h.opts.ref},get open(){return h.root.opts.open.current},get id(){return i()},get trapFocus(){return z(_)},get preventScroll(){return d()},loop:!0,forceMount:!1,get customAnchor(){return f()},onOpenAutoFocus:v,get onCloseAutoFocus(){return s()},get shouldRender(){return h.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>Sx(r(),{style:aO(`popover`)},{style:t.style}));var o=la(),s=I(o),c=e=>{var n=la(),r=I(n);{let e=M(()=>({props:z(a),wrapperProps:i(),...h.snippetProps}));La(r,()=>t.child,()=>z(e))}H(e,n)},l=e=>{var n=$k();Eo(n,()=>({...i()}));var r=F(n);Eo(r,()=>({...z(a)})),La(F(r),()=>t.children??p),D(r),D(n),H(e,n)};W(s,e=>{t.child?e(c):e(l,-1)}),H(e,o)},$$slots:{popper:!0}}))};W(b,e=>{a()?e(x):a()||e(S,1)}),H(e,y),at()}var tA=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`type`,`disabled`,`openOnHover`,`openDelay`,`closeDelay`]),nA=V(`<button><!></button>`);function rA(e,t){let n=ua();it(t,!0);let r=Z(t,`id`,19,()=>SC(n)),i=Z(t,`ref`,15,null),a=Z(t,`type`,3,`button`),o=Z(t,`disabled`,3,!1),s=Z(t,`openOnHover`,3,!1),c=Z(t,`openDelay`,3,700),l=Z(t,`closeDelay`,3,300),u=Y(t,tA),d=Wk.create({id:Rb(()=>r()),ref:Rb(()=>i(),e=>i(e)),disabled:Rb(()=>!!o()),openOnHover:Rb(()=>s()),openDelay:Rb(()=>c()),closeDelay:Rb(()=>l())}),f=M(()=>Sx(u,d.props,{type:a()}));WO(e,{get id(){return r()},get ref(){return d.opts.ref},children:(e,n)=>{var r=la(),i=I(r),a=e=>{var n=la();La(I(n),()=>t.child,()=>({props:z(f)})),H(e,n)},o=e=>{var n=nA();Eo(n,()=>({...z(f)})),La(F(n),()=>t.children??p),D(n),H(e,n)};W(i,e=>{t.child?e(a):e(o,-1)}),H(e,r)},$$slots:{default:!0}}),at()}function iA(e,t){it(t,!0);let n=Z(t,`open`,15,!1),r=Z(t,`onOpenChange`,3,xC),i=Z(t,`onOpenChangeComplete`,3,xC);Lk.create({open:Rb(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Rb(()=>i())}),UO(e,{children:(e,n)=>{var r=la();La(I(r),()=>t.children??p),H(e,r)},$$slots:{default:!0}}),at()}var aA=V(`<!> `,1),oA=V(`<button type="button"> <!></button>`),sA=V(`<button type="button"> </button>`),cA=V(`<div role="group" aria-label="Presets"></div> <div class="mt-1 border-t border-line pt-2 px-2 pb-1"><div class="text-[11px] uppercase tracking-wide text-fg-subtle mb-1.5">Custom range</div> <label class="block text-[11px] text-fg-muted mb-1">From <input type="datetime-local" class="mt-0.5 w-full rounded border border-line bg-subtle px-1.5 py-1 text-xs text-fg focus:outline-none focus:border-accent"/></label> <label class="block text-[11px] text-fg-muted mb-2">To <input type="datetime-local" class="mt-0.5 w-full rounded border border-line bg-subtle px-1.5 py-1 text-xs text-fg focus:outline-none focus:border-accent"/></label> <div class="mb-2 border-t border-line pt-2"><div class="mb-1 text-[11px] text-fg-muted">Show times in</div> <div class="flex gap-1"></div> <div class="mt-1 text-[11px] text-fg-subtle"> </div></div> <button type="button">Apply</button></div>`,1),lA=V(`<!> <!>`,1);function uA(e,t){it(t,!0);let n=N(!1),r=M(()=>t.selection.type===`custom`?{start:t.selection.start,end:t.selection.end}:{start:Date.now()-9e5,end:Date.now()}),i=N(``),a=N(``);function o(e){P(n,e,!0),e&&(P(i,u(z(r).start),!0),P(a,u(z(r).end),!0))}function s(e){t.onChange({type:`preset`,preset:e}),P(n,!1)}function c(){let e=d(z(i)),r=d(z(a));e!==null&&r!==null&&(t.onChange({type:`custom`,start:e,end:r}),P(n,!1))}let l=M(()=>d(z(i))!==null&&d(z(a))!==null);function u(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function d(e){if(!e)return null;let t=new Date(e).getTime();return Number.isFinite(t)?t:null}var f=la();Ra(I(f),()=>iA,(e,r)=>{r(e,{onOpenChange:o,get open(){return z(n)},set open(e){P(n,e,!0)},children:(e,n)=>{var r=lA(),o=I(r);{let e=M(()=>$(`inline-flex items-center gap-1.5 px-2 py-1 text-xs rounded border`,`border-line bg-surface text-fg-muted hover:text-fg hover:bg-hover`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,t.class));Ra(o,()=>rA,(n,r)=>{r(n,{"aria-label":`Time window`,title:`Change the time window`,get class(){return z(e)},children:(e,n)=>{var r=aA(),i=I(r);Np(i,{size:12});var a=L(i);R(e=>U(a,` ${e??``}`),[()=>Ts(t.selection)]),H(e,r)},$$slots:{default:!0}})})}Ra(L(o,2),()=>jC,(e,n)=>{n(e,{children:(e,n)=>{var r=la();Ra(I(r),()=>eA,(e,n)=>{n(e,{sideOffset:6,align:`start`,class:`z-50 w-64 rounded-md border border-line bg-surface p-1 shadow-lg`,children:(e,n)=>{var r=cA(),o=I(r);G(o,21,()=>ys,e=>e.id,(e,n)=>{let r=M(()=>t.selection.type===`preset`&&t.selection.preset===z(n).id);var i=oA(),a=F(i),o=L(a),c=e=>{xp(e,{size:12,class:`text-accent`})};W(o,e=>{z(r)&&e(c)}),D(i),R(e=>{J(i,`aria-current`,z(r)?`true`:void 0),q(i,1,e),U(a,`${z(n).label??``} `)},[()=>K($(`flex w-full items-center justify-between rounded px-2 py-1.5 text-xs`,`text-fg hover:bg-hover focus-visible:outline-none focus-visible:bg-hover`,z(r)&&`bg-selected font-medium`))]),B(`click`,i,()=>s(z(n).id)),H(e,i)}),D(o);var u=L(o,2),d=L(F(u),2),f=L(F(d));xo(f),D(d);var p=L(d,2),m=L(F(p));xo(m),D(p);var h=L(p,2),g=L(F(h),2);G(g,20,()=>[{id:`local`,label:`Local`},{id:`utc`,label:`UTC`}],e=>e.id,(e,t)=>{var n=sA(),r=F(n,!0);D(n),R(e=>{J(n,`aria-pressed`,Hu.value===t.id),q(n,1,e),U(r,t.label)},[()=>K($(`flex-1 rounded px-2 py-1 text-xs`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,Hu.value===t.id?`bg-accent text-white`:`border border-line text-fg-muted hover:text-fg`))]),B(`click`,n,()=>Hu.value=t.id),H(e,n)}),D(g);var _=L(g,2),v=F(_);D(_),D(h);var y=L(h,2);D(u),R((e,t)=>{U(v,`Currently ${e??``}`),y.disabled=!z(l),q(y,1,t)},[()=>Fg(Hu.value),()=>K($(`w-full rounded px-2 py-1 text-xs font-medium`,`bg-accent text-white hover:opacity-90`,`disabled:opacity-40 disabled:cursor-not-allowed`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`))]),Ao(f,()=>z(i),e=>P(i,e)),Ao(m,()=>z(a),e=>P(a,e)),B(`click`,y,c),H(e,r)},$$slots:{default:!0}})}),H(e,r)},$$slots:{default:!0}})}),H(e,r)},$$slots:{default:!0}})}),H(e,f),at()}ea([`click`]);var dA=V(`<button type="button" aria-live="polite" title="Show the newest matches and follow new data again"><!> </button>`);function fA(e,t){it(t,!0);let n=M(()=>!t.live&&t.count>0),r=M(()=>t.count>999?`999+`:String(t.count));var i=la(),a=I(i),o=e=>{var n=dA(),i=F(n);ap(i,{size:12});var a=L(i);D(n),R(e=>{q(n,1,e),U(a,` ${z(r)??``} new`)},[()=>K($(`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium`,`bg-accent text-white shadow-sm hover:opacity-90 focus-visible:outline-none`,`focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1`,`transition-opacity`,t.class))]),B(`click`,n,function(...e){t.onResume?.apply(this,e)}),H(e,n)};W(a,e=>{z(n)&&e(o)}),H(e,i),at()}ea([`click`]);async function pA(e,t){try{let n=await t.fetch(`${t.baseUrl}/api/query/${e}/fields`,{signal:t.signal});if(!n.ok)return[];let r=await n.json();return Array.isArray(r.fields)?r.fields:[]}catch{return[]}}async function mA(e,t,n){let r={query:t.query};t.window&&(r.window=t.window),t.limit!==void 0&&(r.limit=t.limit),t.cursor&&(r.cursor=t.cursor);let i;try{i=await n.fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(r),signal:n.signal})}catch(e){return gA(e)?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}let a;try{a=await i.json()}catch{return{status:`error`,message:`Unexpected response from ${n.baseUrl} (not JSON)`}}if(i.status===400){let e=a.errors;return e?.length?{status:`invalid`,errors:e}:{status:`error`,message:`Invalid query request`}}return i.status===403?{status:`error`,message:`Forbidden: the devtools server rejected this origin. Open the viewer from the same machine.`}:i.ok?{status:`ok`,payload:a}:{status:`error`,message:`Server error: ${a.error??i.statusText}`}}async function hA(e,t){let n=await mA(`${t.baseUrl}/api/query/traces`,e,t);if(n.status!==`ok`)return n;let r=n.payload;return{status:`ok`,traces:r.traces??[],nextCursor:r.nextCursor??null}}function gA(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}async function _A(e,t){let n=await mA(`${t.baseUrl}/api/query/logs`,e,t);if(n.status!==`ok`)return n;let r=n.payload;return{status:`ok`,logs:r.logs??[],nextCursor:r.nextCursor??null}}async function vA(e,t){let n=await mA(`${t.baseUrl}/api/query/errors`,e,t);return n.status===`ok`?{status:`ok`,errors:n.payload.errors??[]}:n}async function yA(e,t){let n=await mA(`${t.baseUrl}/api/query/webmcp`,{query:``,...e},t);return n.status===`ok`?{status:`ok`,webmcp:n.payload.webmcp??{tools:[],summary:{installations:0,emptyInstallations:0,toolsOffered:0,toolsWithdrawn:0,calls:0,errors:0,resultBytes:0,envelopeBytes:0,toolsWithDroppedAnnotations:0,toolsWithoutInputSchema:0,toolsWithLabelMismatch:0,toolsRedefined:0,refusedCalls:0}}}:n}function bA(){return{reasons:{query:!1,scrolled:!1,selected:!1,window:!1},pending:0}}function xA(e){return!Object.values(e.reasons).some(Boolean)}function SA(e){return xA(e)?0:e.pending}function CA(e,t){switch(t.type){case`query-changed`:return wA(e,`query`,t.query.trim().length>0);case`scrolled`:return wA(e,`scrolled`,!t.atTop);case`row-selected`:return wA(e,`selected`,!0);case`row-deselected`:return wA(e,`selected`,!1);case`window-changed`:return wA(e,`window`,t.bounded);case`arrived`:return xA(e)?e:{...e,pending:Math.max(0,e.pending+t.count)};case`resumed`:return bA()}}function wA(e,t,n){if(e.reasons[t]===n)return e;let r={reasons:{...e.reasons,[t]:n},pending:e.pending};return xA(r)&&(r.pending=0),r}var TA={run:async(e,t)=>{let n=await hA(e,t);return n.status===`ok`?{status:`ok`,rows:n.traces,nextCursor:n.nextCursor}:n}},EA={run:async(e,t)=>{let n=await _A(e,t);return n.status===`ok`?{status:`ok`,rows:n.logs,nextCursor:n.nextCursor}:n}},DA=200,OA=100;function kA(e,t){let n=e.now??(()=>Date.now()),r=e.debounceMs??DA,i=e.pageSize??OA,a=new rs(``),o=ml,s=new rs([]),c=new rs([]),l=new rs(null),u=new rs(!1),d=new rs(!1),f=new rs(null),p=new rs(bA()),m=0,h=null,g=null;function _(e){p.value=CA(p.value,e)}async function v(r={}){let p=++m;h?.abort();let g=new AbortController;h=g,u.value=!0;let _=Cs(o.value,n()),v=await t.run({query:a.value,window:ks(_),limit:i,cursor:r.append?f.value??void 0:void 0},{fetch:e.client.fetch,baseUrl:typeof e.client.baseUrl==`function`?e.client.baseUrl():e.client.baseUrl,signal:g.signal});if(p===m)switch(u.value=!1,v.status){case`ok`:s.value=r.append?[...s.value,...v.rows]:v.rows,f.value=v.nextCursor,c.value=[],l.value=null,d.value=!0;return;case`invalid`:c.value=v.errors,l.value=null;return;case`error`:c.value=[],l.value=v.message;return;case`aborted`:return}}function y(){if(g&&clearTimeout(g),r<=0){v();return}g=setTimeout(()=>{g=null,v()},r)}return{text:a,window:o,results:s,errors:c,failure:l,loading:u,ready:d,nextCursor:f,tail:p,get live(){return xA(p.value)},get pending(){return SA(p.value)},setText(e){a.value=e,_({type:`query-changed`,query:e}),y()},submit(){g&&(clearTimeout(g),g=null),v()},refresh(){return g&&(clearTimeout(g),g=null),v()},setWindow(e){o.value=e,_({type:`window-changed`,bounded:!ws(Cs(e,n()))}),v()},setScrolledToTop(e){_({type:`scrolled`,atTop:e})},setSelected(e){_(e?{type:`row-selected`}:{type:`row-deselected`})},arrived(e){_({type:`arrived`,count:e}),xA(p.value)&&v()},resume(){_({type:`resumed`}),a.value=``,v()},loadMore(){!f.value||u.value||v({append:!0})},removeRows(e){s.value=s.value.filter(t=>!e(t))},dispose(){g&&clearTimeout(g),h?.abort()}}}function AA(e){return kA(e,TA)}function jA(e){return kA(e,EA)}function MA(e,t){let n=t,r=!0;if(typeof IntersectionObserver>`u`)return{update:e=>{n=e}};let i=new IntersectionObserver(e=>{let t=e[e.length-1];if(t){if(!t.isIntersecting){r=!0;return}!r||n.disabled||(r=!1,n.onReach())}},{root:n.root??null,rootMargin:n.rootMargin??`200px`});return i.observe(e),{update(e){let t=n.disabled;n=e,t&&!e.disabled&&(r=!0)},destroy(){i.disconnect()}}}function NA(e){let t=e.target;return/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||t.isContentEditable}function PA(e,t){return e>t-1?t-1:e}function FA(e,t,n,r){return n===0?e:e<0?t>0?0:r===`last`?n-1:0:Math.min(Math.max(e+t,0),n-1)}function IA(e){let{count:t,onActivate:n,scrollToIndex:r,fromUnsetUp:i=`first`}=e,a=N(-1),o=M(()=>PA(z(a),t())),s=e=>{t()!==0&&(P(a,FA(z(o),e,t(),i),!0),r?.(z(a)))};return{get cursor(){return z(o)},set cursor(e){P(a,e,!0)},onKeyDown:e=>{NA(e)||(e.key===`ArrowDown`||e.key===`j`?(e.preventDefault(),s(1)):e.key===`ArrowUp`||e.key===`k`?(e.preventDefault(),s(-1)):e.key===`Enter`&&z(o)>=0&&z(o)<t()&&(e.preventDefault(),n(z(o))))}}}var LA=V(`<button><span class="truncate"> </span> <!></button>`),RA=V(`<span class="flex-shrink-0 px-1.5 py-0.5 rounded bg-warning-bg text-warning text-[10px] font-medium uppercase tracking-wide" title="Partial trace: the root span has not arrived, so this row shows the highest span received and a duration covering only that part.">partial</span>`),zA=V(`<div role="option" tabindex="-1" data-focus-inset=""><label class="cursor-pointer flex items-center"><input type="checkbox" class="w-3.5 h-3.5 rounded border-line text-accent"/></label> <button type="button"> </button> <div class="flex items-center gap-1.5 min-w-0"><!> <span class="truncate text-sm text-fg"> </span> <!> <!></div> <span class="font-mono text-xs text-fg-muted text-right tabular-nums"> </span> <span class="trace-col-spans font-mono text-xs text-fg-subtle text-right tabular-nums"> </span> <span class="trace-col-time font-mono text-[11px] text-fg-subtle truncate"> </span> <span> </span> <!></div>`),BA=V(`<span class="text-xs font-normal text-accent"> </span>`),VA=V(`<div class="flex items-center gap-1 mr-2 px-2 border-r border-line"><button class="flex items-center gap-1 px-2 py-1 text-xs rounded bg-accent/10 text-accent hover:bg-accent/20 transition-colors" title="Export selected traces"><!> </button> <button class="flex items-center gap-1 px-2 py-1 text-xs rounded bg-danger-bg text-danger hover:bg-danger-bg/80 transition-colors" title="Delete selected traces"><!> Delete</button></div>`),HA=V(`<button class="px-2 py-1 text-xs rounded text-fg-subtle hover:bg-hover transition-colors" title="Drop buffered traces received while paused">Drop buffer</button>`),UA=V(`<button class="p-1.5 hover:bg-hover rounded transition-colors" title="Export all traces as JSON"><!></button>`),WA=V(`<div class="text-center text-fg-subtle text-sm py-12">Loading traces…</div>`),GA=V(`<div class="mx-auto flex max-w-2xl flex-col items-center gap-3 px-6 py-12 text-center text-sm text-fg-subtle"><p class="font-medium text-fg">No traces yet — send telemetry to get started</p> <p class="max-w-lg text-xs text-fg-muted">Both standard OTLP transports are ready. Existing SDK defaults
|
|
12
|
+
usually work unchanged.</p> <div class="grid w-full gap-2 text-left md:grid-cols-2"><div class="rounded-md border border-line bg-subtle p-3"><div class="mb-1 text-[11px] font-semibold uppercase tracking-wide">OTLP/gRPC</div> <code class="break-all text-xs text-fg">OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317</code></div> <div class="rounded-md border border-line bg-subtle p-3"><div class="mb-1 text-[11px] font-semibold uppercase tracking-wide">OTLP/HTTP</div> <code class="break-all text-xs text-fg">OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318</code></div></div></div>`),KA=V(`<div class="text-center text-fg-subtle text-sm py-12">No traces match the current filter.</div>`),qA=V(`<div class="px-4 py-3 text-center text-xs text-fg-subtle"> </div>`),JA=V(`<div><div class="trace-grid sticky top-0 z-10 px-4 py-2 border-b border-line bg-subtle text-[11px] font-semibold uppercase tracking-wide text-fg-subtle"><label class="cursor-pointer flex items-center"><input type="checkbox" class="w-3.5 h-3.5 rounded border-line text-accent"/></label> <!> <!> <!> <!> <!> <!> <span></span></div> <!> <!></div>`),YA=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> <!></h3> <div class="flex items-center gap-1"><!> <button><!> </button> <!> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Import traces from file"><!></button> <!> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Keyboard shortcuts (?)"><!></button></div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!> <!> <select class="text-xs border border-line rounded px-1.5 py-1 bg-surface text-fg-muted"><option>All</option><option>Errors</option><option>OK</option></select> <!> <div class="flex items-center text-xs text-fg-subtle flex-shrink-0" title="Only show traces at least this slow"><span class="mr-1">≥</span> <input type="number" placeholder="0" class="w-14 px-1 py-1 rounded border border-line bg-surface text-fg-muted focus:outline-none"/> <span class="ml-1">ms</span></div></div> <div class="trace-list-container flex-1 overflow-auto focus:outline-none" role="listbox" aria-label="Traces" tabindex="0"><!></div> <!></div>`);function XA(e,t){it(t,!0);let n=(e,t=p,n=p,r=p,i=p)=>{let a=M(()=>z(s).key===n());var o=LA(),c=F(o),l=F(c,!0);D(c);var u=L(c,2),d=e=>{var t=la(),n=I(t),r=e=>{ap(e,{size:11,class:`flex-shrink-0`})},i=e=>{$f(e,{size:11,class:`flex-shrink-0`})};W(n,e=>{z(s).dir===`asc`?e(r):e(i,-1)}),H(e,t)};W(u,e=>{z(a)&&e(d)}),D(o),R((e,n)=>{q(o,1,e),J(o,`title`,n),U(l,t())},[()=>K($(`flex items-center gap-1 min-w-0 transition-colors hover:text-fg-muted`,z(a)?`text-fg-muted`:`text-fg-subtle`,r()===`end`&&`justify-end`,i())),()=>`Sort by ${t().toLowerCase()}`]),B(`click`,o,()=>Vl(n())),H(e,o)},r=(e,t=p,n=p,r=p)=>{let i=M(()=>t().status===`ERROR`),a=M(()=>hg(t().service||`unknown`)),o=M(()=>oe.cursor===r());var s=zA(),c=M(()=>bg(()=>Nu(t().traceId))),l=F(s),u=F(l);xo(u),D(l);var d=L(l,2),f=F(d,!0);D(d);var m=L(d,2),h=F(m),g=e=>{kp(e,{size:13,class:`text-danger flex-shrink-0`})};W(h,e=>{z(i)&&e(g)});var v=L(h,2),y=F(v,!0);D(v);var b=L(v,2),x=e=>{H(e,RA())};W(b,e=>{t().partial&&e(x)}),Q_(L(b,2),{get value(){return t().traceId},label:`Copy trace ID`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(m);var S=L(m,2),C=F(S,!0);D(S);var w=L(S,2),T=F(w,!0);D(w);var ee=L(w,2),te=F(ee,!0);D(ee);var ne=L(ee,2),re=F(ne,!0);D(ne),Dp(L(ne,2),{size:15,class:`text-fg-subtle justify-self-end`}),D(s),R((e,i,c,l,p)=>{q(s,1,e),J(s,`aria-selected`,z(o)),J(s,`data-row-index`,r()),Co(u,n()),q(d,1,i),oo(d,`background-color: ${z(a).fill??``}; color: ${z(a).stroke??``};`),J(d,`title`,`Filter by ${t().service||`unknown`}`),U(f,t().service||`unknown`),J(v,`title`,t().rootSpan.name),U(y,t().rootSpan.name||`unknown`),U(C,c),U(T,t().spans.length),U(te,l),q(ne,1,p),U(re,t().status)},[()=>K($(`group trace-grid px-4 py-2 border-b border-line-subtle cursor-pointer transition-colors`,`row-virtual`,n()?`bg-accent/10`:z(i)?`bg-danger-bg/40 hover:bg-danger-bg/70`:`hover:bg-hover`,z(o)&&`ring-1 ring-inset ring-accent bg-accent/10`)),()=>K($(`text-[11px] font-medium px-2 py-0.5 rounded truncate text-left transition-shadow`,z(_).has(t().service||`unknown`)&&`ring-1 ring-inset ring-accent`)),()=>ad(t().duration),()=>od(t().startTime),()=>K($(`text-[10px] font-semibold px-1.5 py-0.5 rounded justify-self-start`,z(i)?`bg-danger-bg text-danger`:t().status===`OK`?`bg-success-bg text-success`:`bg-hover text-fg-muted`))]),B(`click`,s,()=>{oe.cursor=r(),Nu(t().traceId)}),B(`keydown`,s,function(...e){z(c)?.apply(this,e)}),B(`click`,u,e=>e.stopPropagation()),B(`change`,u,()=>du(t().traceId)),B(`click`,d,e=>{e.stopPropagation(),Ll(t().service||`unknown`)}),H(e,s)};function i(e,t,n,r,i){return n===`error`&&e.status!==`ERROR`||n===`ok`&&e.status===`ERROR`||r>0&&e.duration<r||i.size>0&&!i.has(e.service||`unknown`)?!1:R_(t.toLowerCase(),[e.service,e.rootSpan?.name,e.traceId,e.correlationId,...e.spans.map(e=>e.name)])}let a=M(()=>Kl.value),o=M(()=>vl.value),s=M(()=>Ml.value),c=M(()=>lu.value),l=M(()=>wl.value),u=M(()=>Dl.value),d=M(()=>uu.value),f=M(()=>hu.value),m=M(()=>Nl.value),h=M(()=>Pl.value),g=M(()=>Fl.value),_=M(()=>Il.value),v=M(()=>{let e=new Map;for(let t of z(a)){let n=t.service||`unknown`;e.set(n,(e.get(n)??0)+1)}return{key:`service`,label:`Service`,options:[...e.entries()].map(([e,t])=>({value:e,count:t})),selected:z(_),onToggle:Ll}}),y=M(()=>z(v).options.length>1),b=N(null),x=N(!1),S=M(()=>z(f)>0);Lr(()=>{if(z(c))return;let e=e=>{if(!($c.value||z(x))){if(e.key===`/`&&!yg()){e.preventDefault(),z(b)?.focus();return}e.key===`Escape`&&(z(S)?pu():document.activeElement===z(b)&&(Nl.value=``,C.setText(``))),e.key===`a`&&(e.metaKey||e.ctrlKey)&&!yg()&&(e.preventDefault(),fu())}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let C=AA({client:{fetch:globalThis.fetch.bind(globalThis),baseUrl:w}});function w(){let e=pl.value;return(e?Zo(e):null)??globalThis.location.origin}Lr(()=>()=>C.dispose());let T=N(null),ee=N(_r([]));Lr(()=>{let e=w();e!==z(T)&&(P(T,e,!0),pA(`traces`,{fetch:globalThis.fetch.bind(globalThis),baseUrl:e}).then(e=>P(ee,e,!0)),!C.ready.value&&Nl.value?C.setText(Nl.value):C.refresh())});let te=N(0);Lr(()=>{let e=z(a).length;e>z(te)&&C.arrived(e-z(te)),P(te,e,!0)}),Lr(()=>{C.setSelected(z(c)!=null)});let ne=M(()=>C.results.value),re=M(()=>{let e=C.ready.value&&C.failure.value===null,t=z(o);return e&&(t=z(m).length>0?z(ne):ie(z(ne),z(o))),t.filter(t=>i(t,e?``:z(m),z(h),z(g),z(_)))});function ie(e,t){let n=new Set(e.map(e=>e.traceId));return[...e,...t.filter(e=>!n.has(e.traceId))]}let ae=N(void 0),oe=IA({count:()=>z(re).length,onActivate:e=>{let t=z(re)[e];t&&Nu(t.traceId)},scrollToIndex:e=>queueMicrotask(()=>{z(ae)?.querySelector(`[data-row-index="${e}"]`)?.scrollIntoView({block:`nearest`})})});function se(){let e=z(re).filter(e=>z(d).has(e.traceId));e.length>0&&Ry(e)}async function ce(){let e=[...z(d)];if(!(e.length===0||!globalThis.confirm(`Delete ${e.length} stored trace${e.length===1?``:`s`}?`)))try{await fetch(`${w()}/api/traces`,{method:`DELETE`,headers:{"content-type":`application/json`},body:JSON.stringify({traceIds:e})})}catch{}finally{let t=new Set(e);C.removeRows(e=>t.has(e.traceId)),mu()}}let le=M(()=>z(m).length>0||z(h)!==`all`||z(g)>0||z(_).size>0),E=M(()=>z(re).length>0&&z(re).every(e=>z(d).has(e.traceId)));var ue=la(),de=I(ue),fe=e=>{ib(e,{get trace(){return z(c)}})},pe=e=>{var t=YA(),i=F(t),o=F(i),s=F(o);Up(s,{size:16});var c=L(s),p=L(c),m=e=>{var t=BA(),n=F(t);D(t),R(()=>U(n,`(${z(f)??``} selected)`)),H(e,t)};W(p,e=>{z(S)&&e(m)}),D(o);var _=L(o,2),w=F(_),T=e=>{var t=VA(),n=F(t),r=F(n);qp(r,{size:12});var i=L(r);D(n);var a=L(n,2);Vh(F(a),{size:12}),Ke(),D(a),D(t),R(()=>U(i,` Export (${z(f)??``})`)),B(`click`,n,se),B(`click`,a,ce),H(e,t)};W(w,e=>{z(S)&&e(T)});var te=L(w,2),ne=F(te),ie=e=>{ah(e,{size:12})},ue=e=>{th(e,{size:12})};W(ne,e=>{z(l)?e(ie):e(ue,-1)});var de=L(ne);D(te);var fe=L(te,2),pe=e=>{var t=HA();B(`click`,t,function(...e){Ou?.apply(this,e)}),H(e,t)};W(fe,e=>{z(l)&&z(u)>0&&e(pe)});var me=L(fe,2);qh(F(me),{size:14,class:`text-fg-subtle`}),D(me);var he=L(me,2),ge=e=>{var t=UA();qp(F(t),{size:14,class:`text-fg-subtle`}),D(t),B(`click`,t,()=>Ry(z(re))),H(e,t)};W(he,e=>{z(re).length>0&&e(ge)});var _e=L(he,2);jp(F(_e),{size:14,class:`text-fg-subtle`}),D(_e),D(_),D(i);var ve=L(i,2),ye=F(ve);jb(ye,{get value(){return C.text.value},onInput:e=>{C.setText(e),Nl.value=e},onSubmit:()=>C.submit(),get serverErrors(){return C.errors.value},get fields(){return z(ee)},class:`flex-1`,get ref(){return z(b)},set ref(e){P(b,e,!0)}});var be=L(ye,2);uA(be,{get selection(){return C.window.value},onChange:e=>C.setWindow(e)});var xe=L(be,2);fA(xe,{get count(){return C.pending},get live(){return C.live},onResume:()=>{Nl.value=``,C.resume()}});var Se=L(xe,2),Ce=F(Se);Ce.value=Ce.__value=`all`;var we=L(Ce);we.value=we.__value=`error`;var Te=L(we);Te.value=Te.__value=`ok`,D(Se);var Ee;co(Se);var De=L(Se,2),Oe=e=>{{let t=M(()=>[z(v)]);gb(e,{get facets(){return z(t)},get onClearAll(){return Rl}})}};W(De,e=>{z(y)&&e(Oe)});var ke=L(De,2),Ae=L(F(ke),2);xo(Ae),J(Ae,`min`,0),J(Ae,`step`,50),Ke(2),D(ke),D(ve);var je=L(ve,2),Me=F(je),Ne=e=>{H(e,WA())},Pe=e=>{H(e,GA())},Fe=e=>{H(e,KA())},Ie=e=>{var t=JA(),i=F(t),a=F(i),o=F(a);xo(o),D(a);var s=L(a,2);n(s,()=>`Service`,()=>`service`);var c=L(s,2);n(c,()=>`Operation`,()=>`name`);var l=L(c,2);n(l,()=>`Duration`,()=>`duration`,()=>`end`);var u=L(l,2);n(u,()=>`Spans`,()=>`spans`,()=>`end`,()=>`trace-col-spans`);var f=L(u,2);n(f,()=>`Time`,()=>`time`,()=>void 0,()=>`trace-col-time`);var p=L(f,2);n(p,()=>`Status`,()=>`status`),Ke(2),D(i);var m=L(i,2);G(m,19,()=>z(re),e=>e.traceId,(e,t,n)=>{{let i=M(()=>z(d).has(z(t).traceId));r(e,()=>z(t),()=>z(i),()=>z(n))}});var h=L(m,2),g=e=>{var t=qA(),n=F(t,!0);D(t),Xa(t,(e,t)=>MA?.(e,t),()=>({onReach:()=>C.loadMore(),disabled:C.loading.value})),R(()=>U(n,C.loading.value?`Loading…`:`Scroll for more`)),H(e,t)};W(h,e=>{C.nextCursor.value&&e(g)}),D(t),R(()=>{J(a,`title`,z(E)?`Clear selection`:`Select all`),Co(o,z(E))}),B(`click`,o,e=>e.stopPropagation()),B(`change`,o,()=>z(E)?pu():fu()),H(e,t)};W(Me,e=>{C.loading.value&&!C.ready.value&&z(a).length===0?e(Ne):z(re).length===0&&!z(le)?e(Pe,1):z(re).length===0?e(Fe,2):e(Ie,-1)}),D(je),Vo(je,e=>P(ae,e),()=>z(ae));var Le=L(je,2),Re=e=>{Og(e,{onclose:()=>P(x,!1),onimport:async e=>{try{let t=Uy(await Ky(e));return t.success&&t.traces.length>0?(Vu(t.traces),{imported:t.traces.length,errors:[],warnings:t.warnings}):{imported:0,errors:t.errors,warnings:t.warnings}}catch(e){return{imported:0,errors:[String(e)],warnings:[]}}}})};W(Le,e=>{z(x)&&e(Re)}),D(t),R(e=>{U(c,` Traces (${(z(le)?`${z(re).length} of ${z(a).length}`:z(a).length)??``}) `),q(te,1,e),J(te,`title`,z(l)?`Resume live tail`:`Pause live tail`),U(de,` ${z(l)?`Resume${z(u)>0?` (+${z(u)})`:``}`:`Pause`}`),Ee!==(Ee=z(h))&&(Se.value=(Se.__value=z(h))??``,so(Se,z(h))),So(Ae,z(g)||``)},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors`,z(l)?`bg-warning-bg text-warning hover:bg-warning-bg/80`:`hover:bg-hover text-fg-muted`))]),B(`click`,te,function(...e){Du?.apply(this,e)}),B(`click`,me,()=>P(x,!0)),B(`click`,_e,()=>el(_g)),B(`change`,Se,e=>Pl.value=e.currentTarget.value),B(`input`,Ae,e=>Fl.value=Number(e.currentTarget.value)||0),B(`keydown`,je,function(...e){oe.onKeyDown?.apply(this,e)}),H(e,t)};W(de,e=>{z(c)?e(fe):e(pe,-1)}),H(e,ue),at()}ea([`click`,`keydown`,`change`,`input`]);var ZA=(e,t=p,n=p,r=p)=>{let i=M(t);var a=QA(),o=F(a);Ra(o,()=>z(i),(e,t)=>{t(e,{size:12})});var s=L(o,1,!0);D(a),R(()=>{q(a,1,`flex items-center gap-1 px-2 py-1 bg-subtle rounded-md ${r()??``}`),U(s,n())}),H(e,a)},QA=V(`<span><!> </span>`),$A=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-violet-100 text-violet-700 rounded-full"> </span>`),ej=V(`<div class="flex-1 flex flex-col items-center justify-center text-center gap-4 px-6"><!> <div class="max-w-md"><p class="text-sm font-medium text-fg">Waiting for coding-agent telemetry</p> <p class="text-xs text-fg-muted mt-1.5">Launch Claude Code wired to this receiver and its sessions, tokens,
|
|
13
13
|
cost, tool, MCP, sub-agent & skill usage will appear here.</p></div> <div class="flex items-center gap-2 bg-subtle border border-line rounded-md px-3 py-2 font-mono text-xs text-fg"><!> <span></span> <!></div> <p class="text-[11px] text-fg-muted/80 max-w-md">Uses OTLP <span class="font-mono">http/protobuf</span> on <span class="font-mono">:4318</span>. Standard OTLP/gRPC exporters can
|
|
14
|
-
connect on <span class="font-mono">:4317</span>.</p></div>`),QA=V(`<span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-red-600"><!> </span>`),$A=V(`<span class="px-2 py-1 bg-subtle rounded-md text-fg-muted font-mono"> </span>`),ej=V(`<button><div class="flex items-center justify-between gap-2"><span class="font-mono text-xs text-fg truncate"> </span> <span class="text-[11px] text-fg-muted"> </span></div> <div class="flex items-center gap-2 mt-1 text-[11px] text-fg-muted"><span> </span> <span>·</span> <span> </span> <span>·</span> <span> </span></div></button>`),tj=V(`<span class="text-[11px] text-fg-muted"> </span>`),nj=V(`<span class="text-amber-500" title="includes estimated cost">~</span>`),rj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg-muted flex items-center gap-1 border border-line" title="Context was replaced by a summary — inferred from token counts, not reported by the agent"><!> </span>`),ij=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg flex items-center gap-1"><!> </span>`),aj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span>`),oj=V(`<span class="text-red-500"> </span>`),sj=V(`<span> </span>`),cj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> <!> <!> </span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span> </span> <!> <!></span></div>`),lj=V(`<div class="p-3 border-b border-line"><div class="text-[11px] font-semibold text-fg-muted uppercase mb-2">Tools & MCP</div> <div class="flex flex-col gap-1"></div></div>`),uj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> </span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span></span> <!> <!></span></div>`),dj=V(`<span class="text-fg-muted flex-shrink-0"> </span>`),fj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> </span> <!></div>`),pj=V(`<span class="text-amber-600"> </span>`),mj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg flex items-center gap-1.5"><!> hooks</span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span> </span> <!> <!></span></div>`),hj=V(`<div class="p-3 border-b border-line"><div class="text-[11px] font-semibold text-fg-muted uppercase mb-2">Runtime environment</div> <div class="flex flex-col gap-1"><!> <!> <!></div></div>`),gj=V(`<!>Hide prompts`,1),_j=V(`<!>Reveal prompts`,1),vj=V(`<div><!> <span class="whitespace-nowrap"> </span> <span></span></div>`),yj=V(`<!> <div class="flex items-center gap-2 text-xs py-1 border-b border-line/50"><span class="text-fg-muted tabular-nums flex-shrink-0"> </span> <span> </span> <span class="text-fg truncate"> </span> <span class="text-fg-muted truncate ml-auto text-right"> </span></div>`,1),bj=V(`<div class="p-3 border-b border-line"><div class="flex items-center justify-between gap-2"><span class="font-mono text-xs text-fg"> </span> <!></div> <div class="flex flex-wrap gap-2 mt-2 text-[11px]"><span class="px-2 py-0.5 bg-subtle rounded text-fg"> <!></span> <span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span> <span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span> <!> <span class="px-2 py-0.5 bg-subtle rounded text-fg flex items-center gap-1"><!> </span> <!> <!></div></div> <!> <!> <div class="p-3"><div class="flex items-center justify-between mb-2"><div class="text-[11px] font-semibold text-fg-muted uppercase">Timeline</div> <button class="flex items-center gap-1 text-[11px] text-fg-muted hover:text-fg" title="Reveal / hide captured prompt text"><!></button></div> <div class="flex flex-col gap-1"></div></div>`,1),xj=V(`<div class="flex flex-wrap gap-2 p-3 border-b border-line text-xs"><span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> </span> <span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> </span> <span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> <!> </span> <!> <!> <!> <!> <!> <!></div> <div class="flex-1 flex min-h-0"><div class="w-64 flex-shrink-0 overflow-y-auto border-r border-line"></div> <div class="flex-1 overflow-y-auto min-w-0"><!></div></div>`,1),Sj=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between p-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Agents <!></h3></div> <!></div>`);function Cj(e,t){it(t,!0);let n=M(()=>ql.value),r=M(()=>Yl.value),i=M(()=>Jl.value),a=N(!1);function o(e){return e===0?`$0`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function s(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}function c(e){return Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1])}function l(e){switch(e.type){case`api_request`:return e.model??`api request`;case`api_error`:return`api error`;case`tool_result`:case`tool_decision`:return e.tool?.name??`tool`;case`user_prompt`:return`prompt`;case`mcp_connection`:return e.mcpServerName??`mcp server`;case`plugin_loaded`:return e.pluginName??`plugin`;case`hook_execution`:return e.hookName??`hook`;default:return e.rawEventName}}function u(e){let t=[];if(e.type===`api_request`){e.costUsd!==void 0&&t.push(o(e.costUsd));let n=(e.inputTokens??0)+(e.outputTokens??0);n>0&&t.push(`${id(n)} tok`),e.durationMs&&t.push(nd(e.durationMs))}else e.type===`tool_result`?(e.tool?.isMcp&&e.tool.mcpServer?t.push(`mcp:${e.tool.mcpServer}`):e.tool&&t.push(e.tool.category),e.success===!1&&t.push(`failed`),e.durationMs&&t.push(nd(e.durationMs))):e.type===`tool_decision`?e.tool&&t.push(e.tool.category):e.type===`user_prompt`?e.promptText?t.push(z(a)?cd(e.promptText):`${e.promptLength??e.promptText.length} chars (hidden)`):e.promptLength!==void 0&&t.push(`${e.promptLength} chars`):e.type===`api_error`?(e.statusCode&&t.push(String(e.statusCode)),e.errorMessage&&t.push(e.errorMessage)):e.type===`mcp_connection`?(e.mcpStatus&&t.push(e.mcpStatus),e.mcpTransport&&t.push(e.mcpTransport),e.durationMs&&t.push(nd(e.durationMs))):e.type===`plugin_loaded`?e.pluginVersion&&t.push(`v${e.pluginVersion}`):e.type===`hook_execution`&&(e.hookBlocked&&t.push(`${e.hookBlocked} blocked`),e.hookErrored&&t.push(`${e.hookErrored} errored`));return t.join(` · `)}function d(e){return e.rollup.inputTokens+e.rollup.outputTokens}let f=M(()=>z(r)?[...z(r).timeline].reverse().slice(0,200):[]),p=M(()=>z(r)?Object.values(z(r).rollup.tools).sort((e,t)=>t.count-e.count):[]),m=M(()=>z(r)?Object.values(z(r).rollup.mcpConnections):[]),h=M(()=>z(r)?Object.values(z(r).rollup.plugins):[]),g=M(()=>z(r)?.rollup.hooks),v=M(()=>z(r)?.rollup.compactions??[]),y=M(()=>new Map(z(v).map(e=>[e.atEventId,e]))),b=M(()=>z(v).reduce((e,t)=>e+t.droppedTokens,0)),x=M(()=>z(m).length>0||z(h).length>0||z(g)!==void 0&&z(g).runs>0);var S=Sj(),C=F(S),w=F(C),T=F(w);op(T,{size:16,class:`text-violet-500`});var ee=L(T,2),te=e=>{var t=XA(),r=F(t,!0);D(t),R(()=>U(r,z(n).length)),H(e,t)};W(ee,e=>{z(n).length>0&&e(te)}),D(w),D(C);var ne=L(C,2),re=e=>{var t=ZA(),n=F(t);op(n,{size:40,class:`text-fg-muted opacity-40`});var r=L(n,4),i=F(r);Ih(i,{size:13,class:`text-fg-muted flex-shrink-0`});var a=L(i,2);a.textContent=`npx autotel-devtools claude`,Y_(L(a,2),{value:`npx autotel-devtools claude`,label:`Copy launch command`}),D(r),Ke(2),D(t),H(e,t)},ie=e=>{var t=xj(),S=I(t),C=F(S),w=F(C);Hp(w,{size:12,class:`text-emerald-500`});var T=L(w,1,!0);D(C);var ee=L(C,2),te=F(ee);Pp(te,{size:12,class:`text-amber-500`});var ne=L(te);D(ee);var re=L(ee,2),ie=F(re);vp(ie,{size:12,class:`text-emerald-500`});var ae=L(ie),oe=L(ae);eg(oe,{size:12,class:`text-red-500 ml-1`});var se=L(oe,1,!0);D(re);var ce=L(re,2),le=e=>{var t=QA(),n=F(t);Hh(n,{size:12});var r=L(n);D(t),R(()=>U(r,`${z(i).apiErrors??``} errors`)),H(e,t)};W(ce,e=>{z(i).apiErrors>0&&e(le)});var E=L(ce,2);G(E,17,()=>c(z(i).toolCategories),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];JA(e,()=>Qh,()=>`${r()} ${i()}`,()=>`text-fg-muted`)});var ue=L(E,2);G(ue,17,()=>c(z(i).mcpServers),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];JA(e,()=>Sh,()=>`mcp:${r()} ${i()}`,()=>`text-sky-600`)});var de=L(ue,2);G(de,17,()=>c(z(i).subAgents),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];JA(e,()=>op,()=>`${r()} ${i()}`,()=>`text-violet-600`)});var fe=L(de,2);G(fe,17,()=>c(z(i).skills),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];JA(e,()=>Ah,()=>`${r()} ${i()}`,()=>`text-fuchsia-600`)}),G(L(fe,2),17,()=>c(z(i).models),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=$A(),o=F(a);D(a),R(()=>U(o,`${r()??``} ×${i()??``}`)),H(e,a)}),D(S);var pe=L(S,2),me=F(pe);G(me,21,()=>z(n),e=>e.id,(e,t)=>{var n=ej(),i=F(n),a=F(i),c=F(a,!0);D(a);var l=L(a,2),u=F(l,!0);D(l),D(i);var f=L(i,2),p=F(f),m=F(p,!0);D(p);var h=L(p,4),g=F(h);D(h);var _=L(h,4),v=F(_,!0);D(_),D(f),D(n),R((e,i,a,o)=>{q(n,1,`w-full text-left px-3 py-2.5 border-b border-line hover:bg-subtle transition-colors ${z(r)?.id===z(t).id?`bg-subtle`:``}`),U(c,e),U(u,z(t).agent),U(m,i),U(g,`${a??``} tok`),U(v,o)},[()=>s(z(t).id),()=>o(z(t).rollup.costUsd),()=>id(d(z(t))),()=>nd(z(t).lastSeen-z(t).firstSeen)]),B(`click`,n,()=>Xl(z(t).id)),H(e,n)}),D(me);var he=L(me,2),ge=F(he),_e=e=>{var t=bj(),n=I(t),i=F(n),s=F(i),c=F(s,!0);D(s);var d=L(s,2),_=e=>{var t=tj(),n=F(t);D(t),R(()=>U(n,`${z(r).terminal??``??``}${z(r).appVersion?` · v${z(r).appVersion}`:``}`)),H(e,t)};W(d,e=>{(z(r).terminal||z(r).appVersion)&&e(_)}),D(i);var S=L(i,2),C=F(S),w=F(C),T=L(w),ee=e=>{H(e,nj())};W(T,e=>{z(r).rollup.costEstimatedUsd>0&&e(ee)}),D(C);var te=L(C,2),ne=F(te);D(te);var re=L(te,2),ie=F(re);D(re);var ae=L(re,2),oe=e=>{var t=rj(),n=F(t);vh(n,{size:11});var r=L(n);D(t),R(e=>U(r,`${z(v).length??``} context reset${z(v).length>1?`s`:``} · ${e??``} tokens`),[()=>id(z(b))]),H(e,t)};W(ae,e=>{z(v).length>0&&e(oe)});var se=L(ae,2),ce=F(se);Pm(ce,{size:11});var le=L(ce,1,!0);D(se);var E=L(se,2),ue=e=>{var t=ij(),n=F(t);um(n,{size:11});var i=L(n);D(t),R(()=>U(i,`+${z(r).rollup.linesAdded??``}/-${z(r).rollup.linesRemoved??``}`)),H(e,t)};W(E,e=>{(z(r).rollup.linesAdded||z(r).rollup.linesRemoved)&&e(ue)});var de=L(E,2),fe=e=>{var t=aj(),n=F(t);D(t),R(()=>U(n,`${z(r).rollup.commits??``} commits`)),H(e,t)};W(de,e=>{z(r).rollup.commits&&e(fe)}),D(S),D(n);var pe=L(n,2),me=e=>{var t=lj(),n=L(F(t),2);G(n,21,()=>z(p),e=>e.name,(e,t)=>{var n=cj(),r=F(n),i=F(r),a=e=>{Sh(e,{size:11,class:`text-sky-500`})};W(i,e=>{z(t).isMcp&&e(a)});var o=L(i,2),s=e=>{op(e,{size:11,class:`text-violet-500`})};W(o,e=>{z(t).category===`subagent`&&e(s)});var c=L(o,2),l=e=>{Ah(e,{size:11,class:`text-fuchsia-500`})};W(c,e=>{z(t).category===`skill`&&e(l)});var u=L(c);D(r);var d=L(r,2),f=F(d),p=F(f);D(f);var m=L(f,2),h=e=>{var n=oj(),r=F(n);D(n),R(()=>U(r,`${z(t).failures??``} fail`)),H(e,n)};W(m,e=>{z(t).failures>0&&e(h)});var g=L(m,2),_=e=>{var n=sj(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>nd(z(t).totalDurationMs)]),H(e,n)};W(g,e=>{z(t).totalDurationMs>0&&e(_)}),D(d),D(n),R(()=>{U(u,` ${z(t).name??``}`),U(p,`×${z(t).count??``}`)}),H(e,n)}),D(n),D(t),H(e,t)};W(pe,e=>{z(p).length>0&&e(me)});var he=L(pe,2),ge=e=>{var t=hj(),n=L(F(t),2),r=F(n);G(r,17,()=>z(m),e=>e.name,(e,t)=>{var n=uj(),r=F(n),i=F(r);ih(i,{size:11,class:`text-sky-500 flex-shrink-0`});var a=L(i);D(r);var o=L(r,2),s=F(o),c=L(s,2),l=e=>{var n=sj(),r=F(n,!0);D(n),R(()=>U(r,z(t).transport)),H(e,n)};W(c,e=>{z(t).transport&&e(l)});var u=L(c,2),d=e=>{var n=sj(),r=F(n);D(n),R(()=>U(r,`${z(t).connects??``}↑/${z(t).disconnects??``}↓`)),H(e,n)};W(u,e=>{z(t).disconnects>0&&e(d)}),D(o),D(n),R(()=>{U(a,` ${z(t).name??``}`),q(s,1,`w-1.5 h-1.5 rounded-full ${z(t).connected?`bg-emerald-500`:`bg-fg-subtle`}`),J(s,`title`,z(t).connected?`connected`:`disconnected`)}),H(e,n)});var i=L(r,2);G(i,17,()=>z(h),e=>e.name,(e,t)=>{var n=fj(),r=F(n),i=F(r);ip(i,{size:11,class:`text-fuchsia-500 flex-shrink-0`});var a=L(i);D(r);var o=L(r,2),s=e=>{var n=dj(),r=F(n);D(n),R(()=>U(r,`v${z(t).version??``}`)),H(e,n)};W(o,e=>{z(t).version&&e(s)}),D(n),R(()=>U(a,` ${z(t).name??``}`)),H(e,n)});var a=L(i,2),o=e=>{var t=mj(),n=F(t);Jh(F(n),{size:11,class:`text-amber-500 flex-shrink-0`}),Ke(),D(n);var r=L(n,2),i=F(r),a=F(i);D(i);var o=L(i,2),s=e=>{var t=pj(),n=F(t);D(t),R(()=>U(n,`${z(g).blocked??``} blocked`)),H(e,t)};W(o,e=>{z(g).blocked>0&&e(s)});var c=L(o,2),l=e=>{var t=oj(),n=F(t);D(t),R(()=>U(n,`${z(g).errored??``} err`)),H(e,t)};W(c,e=>{z(g).errored>0&&e(l)}),D(r),D(t),R(()=>U(a,`×${z(g).runs??``}`)),H(e,t)};W(a,e=>{z(g)&&z(g).runs>0&&e(o)}),D(n),D(t),H(e,t)};W(he,e=>{z(x)&&e(ge)});var _e=L(he,2),ve=F(_e),ye=L(F(ve),2),be=F(ye),xe=e=>{var t=gj();Jp(I(t),{size:12}),Ke(),H(e,t)},Se=e=>{var t=_j();Xp(I(t),{size:12}),Ke(),H(e,t)};W(be,e=>{z(a)?e(xe):e(Se,-1)}),D(ye),D(ve);var Ce=L(ve,2);G(Ce,21,()=>z(f),e=>e.id,(e,t)=>{let n=M(()=>z(y).get(z(t).id));var r=yj(),i=I(r),a=e=>{var t=vj(),r=F(t);vh(r,{size:11,class:`flex-shrink-0`});var i=L(r,2),a=F(i);D(i);var o=L(i,2);D(t),R(e=>{q(t,1,`flex items-center gap-2 my-1 text-[11px] ${z(n).confidence===`likely`?`text-fg-muted`:`text-fg-muted/70`}`),U(a,`${e??``} tokens left the agent's
|
|
15
|
-
context · ${z(n).confidence??``}`),q(o,1,`flex-1 border-t border-dashed ${z(n).confidence===`likely`?`border-line`:`border-line/60`}`)},[()=>
|
|
16
|
-
`)]),H(e,n)};W(C,e=>{t.span.warnings&&t.span.warnings.length>0&&e(w)});var T=L(C,2),ee=e=>{var t=
|
|
17
|
-
transcripts.</p></div>`),
|
|
14
|
+
connect on <span class="font-mono">:4317</span>.</p></div>`),tj=V(`<span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-red-600"><!> </span>`),nj=V(`<span class="px-2 py-1 bg-subtle rounded-md text-fg-muted font-mono"> </span>`),rj=V(`<button><div class="flex items-center justify-between gap-2"><span class="font-mono text-xs text-fg truncate"> </span> <span class="text-[11px] text-fg-muted"> </span></div> <div class="flex items-center gap-2 mt-1 text-[11px] text-fg-muted"><span> </span> <span>·</span> <span> </span> <span>·</span> <span> </span></div></button>`),ij=V(`<span class="text-[11px] text-fg-muted"> </span>`),aj=V(`<span class="text-amber-500" title="includes estimated cost">~</span>`),oj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg-muted flex items-center gap-1 border border-line" title="Context was replaced by a summary — inferred from token counts, not reported by the agent"><!> </span>`),sj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg flex items-center gap-1"><!> </span>`),cj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span>`),lj=V(`<span class="text-red-500"> </span>`),uj=V(`<span> </span>`),dj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> <!> <!> </span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span> </span> <!> <!></span></div>`),fj=V(`<div class="p-3 border-b border-line"><div class="text-[11px] font-semibold text-fg-muted uppercase mb-2">Tools & MCP</div> <div class="flex flex-col gap-1"></div></div>`),pj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> </span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span></span> <!> <!></span></div>`),mj=V(`<span class="text-fg-muted flex-shrink-0"> </span>`),hj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> </span> <!></div>`),gj=V(`<span class="text-amber-600"> </span>`),_j=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg flex items-center gap-1.5"><!> hooks</span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span> </span> <!> <!></span></div>`),vj=V(`<div class="p-3 border-b border-line"><div class="text-[11px] font-semibold text-fg-muted uppercase mb-2">Runtime environment</div> <div class="flex flex-col gap-1"><!> <!> <!></div></div>`),yj=V(`<!>Hide prompts`,1),bj=V(`<!>Reveal prompts`,1),xj=V(`<div><!> <span class="whitespace-nowrap"> </span> <span></span></div>`),Sj=V(`<!> <div class="flex items-center gap-2 text-xs py-1 border-b border-line/50"><span class="text-fg-muted tabular-nums flex-shrink-0"> </span> <span> </span> <span class="text-fg truncate"> </span> <span class="text-fg-muted truncate ml-auto text-right"> </span></div>`,1),Cj=V(`<div class="p-3 border-b border-line"><div class="flex items-center justify-between gap-2"><span class="font-mono text-xs text-fg"> </span> <!></div> <div class="flex flex-wrap gap-2 mt-2 text-[11px]"><span class="px-2 py-0.5 bg-subtle rounded text-fg"> <!></span> <span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span> <span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span> <!> <span class="px-2 py-0.5 bg-subtle rounded text-fg flex items-center gap-1"><!> </span> <!> <!></div></div> <!> <!> <div class="p-3"><div class="flex items-center justify-between mb-2"><div class="text-[11px] font-semibold text-fg-muted uppercase">Timeline</div> <button class="flex items-center gap-1 text-[11px] text-fg-muted hover:text-fg" title="Reveal / hide captured prompt text"><!></button></div> <div class="flex flex-col gap-1"></div></div>`,1),wj=V(`<div class="flex flex-wrap gap-2 p-3 border-b border-line text-xs"><span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> </span> <span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> </span> <span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> <!> </span> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <div class="flex-1 flex min-h-0"><div class="w-64 flex-shrink-0 overflow-y-auto border-r border-line"></div> <div class="flex-1 overflow-y-auto min-w-0"><!></div></div>`,1),Tj=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between p-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Agents <!></h3></div> <!></div>`);function Ej(e,t){it(t,!0);let n=M(()=>Xl.value),r=M(()=>Ql.value),i=M(()=>Zl.value),a=N(!1);function o(e){return e===0?`$0`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function s(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}function c(e){return Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1])}function l(e){return Object.entries(e).sort((e,t)=>t[1].costUsd-e[1].costUsd)}function u(e){switch(e.type){case`api_request`:return e.model??`api request`;case`api_error`:return`api error`;case`tool_result`:case`tool_decision`:return e.tool?.name??`tool`;case`user_prompt`:return`prompt`;case`mcp_connection`:return e.mcpServerName??`mcp server`;case`plugin_loaded`:return e.pluginName??`plugin`;case`hook_execution`:return e.hookName??`hook`;default:return e.rawEventName}}function d(e){let t=[];if(e.type===`api_request`){e.costUsd!==void 0&&t.push(o(e.costUsd));let n=(e.inputTokens??0)+(e.outputTokens??0);n>0&&t.push(`${sd(n)} tok`),e.durationMs&&t.push(ad(e.durationMs)),e.effort&&t.push(e.effort),e.speed&&t.push(e.speed),e.skillName&&t.push(`skill:${e.skillName}`),e.agentName&&t.push(`agent:${e.agentName}`)}else e.type===`tool_result`?(e.tool?.isMcp&&e.tool.mcpServer?t.push(`mcp:${e.tool.mcpServer}`):e.tool&&t.push(e.tool.category),e.success===!1&&t.push(`failed`),e.durationMs&&t.push(ad(e.durationMs))):e.type===`tool_decision`?e.tool&&t.push(e.tool.category):e.type===`user_prompt`?e.promptText?t.push(z(a)?dd(e.promptText):`${e.promptLength??e.promptText.length} chars (hidden)`):e.promptLength!==void 0&&t.push(`${e.promptLength} chars`):e.type===`api_error`?(e.statusCode&&t.push(String(e.statusCode)),e.errorMessage&&t.push(e.errorMessage)):e.type===`mcp_connection`?(e.mcpStatus&&t.push(e.mcpStatus),e.mcpTransport&&t.push(e.mcpTransport),e.durationMs&&t.push(ad(e.durationMs))):e.type===`plugin_loaded`?e.pluginVersion&&t.push(`v${e.pluginVersion}`):e.type===`hook_execution`&&(e.hookBlocked&&t.push(`${e.hookBlocked} blocked`),e.hookErrored&&t.push(`${e.hookErrored} errored`));return t.join(` · `)}function f(e){return e.rollup.inputTokens+e.rollup.outputTokens}let p=M(()=>z(r)?[...z(r).timeline].reverse().slice(0,200):[]),m=M(()=>z(r)?Object.values(z(r).rollup.tools).sort((e,t)=>t.count-e.count):[]),h=M(()=>z(r)?Object.values(z(r).rollup.mcpConnections):[]),g=M(()=>z(r)?Object.values(z(r).rollup.plugins):[]),v=M(()=>z(r)?.rollup.hooks),y=M(()=>z(r)?.rollup.compactions??[]),b=M(()=>new Map(z(y).map(e=>[e.atEventId,e]))),x=M(()=>z(y).reduce((e,t)=>e+t.droppedTokens,0)),S=M(()=>z(h).length>0||z(g).length>0||z(v)!==void 0&&z(v).runs>0);var C=Tj(),w=F(C),T=F(w),ee=F(T);lp(ee,{size:16,class:`text-violet-500`});var te=L(ee,2),ne=e=>{var t=$A(),r=F(t,!0);D(t),R(()=>U(r,z(n).length)),H(e,t)};W(te,e=>{z(n).length>0&&e(ne)}),D(T),D(w);var re=L(w,2),ie=e=>{var t=ej(),n=F(t);lp(n,{size:40,class:`text-fg-muted opacity-40`});var r=L(n,4),i=F(r);zh(i,{size:13,class:`text-fg-muted flex-shrink-0`});var a=L(i,2);a.textContent=`npx autotel-devtools claude`,Q_(L(a,2),{value:`npx autotel-devtools claude`,label:`Copy launch command`}),D(r),Ke(2),D(t),H(e,t)},ae=e=>{var t=wj(),C=I(t),w=F(C),T=F(w);Gp(T,{size:12,class:`text-emerald-500`});var ee=L(T,1,!0);D(w);var te=L(w,2),ne=F(te);Lp(ne,{size:12,class:`text-amber-500`});var re=L(ne);D(te);var ie=L(te,2),ae=F(ie);xp(ae,{size:12,class:`text-emerald-500`});var oe=L(ae),se=L(oe);rg(se,{size:12,class:`text-red-500 ml-1`});var ce=L(se,1,!0);D(ie);var le=L(ie,2),E=e=>{var t=tj(),n=F(t);Gh(n,{size:12});var r=L(n);D(t),R(()=>U(r,`${z(i).apiErrors??``} errors`)),H(e,t)};W(le,e=>{z(i).apiErrors>0&&e(E)});var ue=L(le,2);G(ue,17,()=>c(z(i).toolCategories),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ZA(e,()=>tg,()=>`${r()} ${i()}`,()=>`text-fg-muted`)});var de=L(ue,2);G(de,17,()=>c(z(i).mcpServers),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ZA(e,()=>Th,()=>`mcp:${r()} ${i()}`,()=>`text-sky-600`)});var fe=L(de,2);G(fe,17,()=>c(z(i).subAgents),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ZA(e,()=>lp,()=>`${r()} ${i()}`,()=>`text-violet-600`)});var pe=L(fe,2);G(pe,17,()=>c(z(i).skills),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ZA(e,()=>Nh,()=>`${r()} ${i()}`,()=>`text-fuchsia-600`)});var me=L(pe,2);G(me,17,()=>l(z(i).byEffort),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];{let t=M(()=>`${r()} ${o(i().costUsd)}`);ZA(e,()=>dm,()=>z(t),()=>`text-amber-600`)}});var he=L(me,2);G(he,17,()=>l(z(i).bySkill),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];{let t=M(()=>`${r()} ${o(i().costUsd)}`);ZA(e,()=>Nh,()=>z(t),()=>`text-fuchsia-600`)}});var ge=L(he,2);G(ge,17,()=>l(z(i).byAgent),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];{let t=M(()=>`${r()} ${o(i().costUsd)}`);ZA(e,()=>lp,()=>z(t),()=>`text-violet-600`)}}),G(L(ge,2),17,()=>l(z(i).byModel),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=nj(),s=F(a);D(a),R(e=>U(s,`${r()??``} ×${i().requests??``} ${e??``}`),[()=>o(i().costUsd)]),H(e,a)}),D(C);var _e=L(C,2),ve=F(_e);G(ve,21,()=>z(n),e=>e.id,(e,t)=>{var n=rj(),i=F(n),a=F(i),c=F(a,!0);D(a);var l=L(a,2),u=F(l,!0);D(l),D(i);var d=L(i,2),p=F(d),m=F(p,!0);D(p);var h=L(p,4),g=F(h);D(h);var _=L(h,4),v=F(_,!0);D(_),D(d),D(n),R((e,i,a,o)=>{q(n,1,`w-full text-left px-3 py-2.5 border-b border-line hover:bg-subtle transition-colors ${z(r)?.id===z(t).id?`bg-subtle`:``}`),U(c,e),U(u,z(t).agent),U(m,i),U(g,`${a??``} tok`),U(v,o)},[()=>s(z(t).id),()=>o(z(t).rollup.costUsd),()=>sd(f(z(t))),()=>ad(z(t).lastSeen-z(t).firstSeen)]),B(`click`,n,()=>$l(z(t).id)),H(e,n)}),D(ve);var ye=L(ve,2),be=F(ye),xe=e=>{var t=Cj(),n=I(t),i=F(n),s=F(i),c=F(s,!0);D(s);var l=L(s,2),f=e=>{var t=ij(),n=F(t);D(t),R(()=>U(n,`${z(r).terminal??``??``}${z(r).appVersion?` · v${z(r).appVersion}`:``}`)),H(e,t)};W(l,e=>{(z(r).terminal||z(r).appVersion)&&e(f)}),D(i);var _=L(i,2),C=F(_),w=F(C),T=L(w),ee=e=>{H(e,aj())};W(T,e=>{z(r).rollup.costEstimatedUsd>0&&e(ee)}),D(C);var te=L(C,2),ne=F(te);D(te);var re=L(te,2),ie=F(re);D(re);var ae=L(re,2),oe=e=>{var t=oj(),n=F(t);xh(n,{size:11});var r=L(n);D(t),R(e=>U(r,`${z(y).length??``} context reset${z(y).length>1?`s`:``} · ${e??``} tokens`),[()=>sd(z(x))]),H(e,t)};W(ae,e=>{z(y).length>0&&e(oe)});var se=L(ae,2),ce=F(se);Lm(ce,{size:11});var le=L(ce,1,!0);D(se);var E=L(se,2),ue=e=>{var t=sj(),n=F(t);pm(n,{size:11});var i=L(n);D(t),R(()=>U(i,`+${z(r).rollup.linesAdded??``}/-${z(r).rollup.linesRemoved??``}`)),H(e,t)};W(E,e=>{(z(r).rollup.linesAdded||z(r).rollup.linesRemoved)&&e(ue)});var de=L(E,2),fe=e=>{var t=cj(),n=F(t);D(t),R(()=>U(n,`${z(r).rollup.commits??``} commits`)),H(e,t)};W(de,e=>{z(r).rollup.commits&&e(fe)}),D(_),D(n);var pe=L(n,2),me=e=>{var t=fj(),n=L(F(t),2);G(n,21,()=>z(m),e=>e.name,(e,t)=>{var n=dj(),r=F(n),i=F(r),a=e=>{Th(e,{size:11,class:`text-sky-500`})};W(i,e=>{z(t).isMcp&&e(a)});var o=L(i,2),s=e=>{lp(e,{size:11,class:`text-violet-500`})};W(o,e=>{z(t).category===`subagent`&&e(s)});var c=L(o,2),l=e=>{Nh(e,{size:11,class:`text-fuchsia-500`})};W(c,e=>{z(t).category===`skill`&&e(l)});var u=L(c);D(r);var d=L(r,2),f=F(d),p=F(f);D(f);var m=L(f,2),h=e=>{var n=lj(),r=F(n);D(n),R(()=>U(r,`${z(t).failures??``} fail`)),H(e,n)};W(m,e=>{z(t).failures>0&&e(h)});var g=L(m,2),_=e=>{var n=uj(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>ad(z(t).totalDurationMs)]),H(e,n)};W(g,e=>{z(t).totalDurationMs>0&&e(_)}),D(d),D(n),R(()=>{U(u,` ${z(t).name??``}`),U(p,`×${z(t).count??``}`)}),H(e,n)}),D(n),D(t),H(e,t)};W(pe,e=>{z(m).length>0&&e(me)});var he=L(pe,2),ge=e=>{var t=vj(),n=L(F(t),2),r=F(n);G(r,17,()=>z(h),e=>e.name,(e,t)=>{var n=pj(),r=F(n),i=F(r);sh(i,{size:11,class:`text-sky-500 flex-shrink-0`});var a=L(i);D(r);var o=L(r,2),s=F(o),c=L(s,2),l=e=>{var n=uj(),r=F(n,!0);D(n),R(()=>U(r,z(t).transport)),H(e,n)};W(c,e=>{z(t).transport&&e(l)});var u=L(c,2),d=e=>{var n=uj(),r=F(n);D(n),R(()=>U(r,`${z(t).connects??``}↑/${z(t).disconnects??``}↓`)),H(e,n)};W(u,e=>{z(t).disconnects>0&&e(d)}),D(o),D(n),R(()=>{U(a,` ${z(t).name??``}`),q(s,1,`w-1.5 h-1.5 rounded-full ${z(t).connected?`bg-emerald-500`:`bg-fg-subtle`}`),J(s,`title`,z(t).connected?`connected`:`disconnected`)}),H(e,n)});var i=L(r,2);G(i,17,()=>z(g),e=>e.name,(e,t)=>{var n=hj(),r=F(n),i=F(r);sp(i,{size:11,class:`text-fuchsia-500 flex-shrink-0`});var a=L(i);D(r);var o=L(r,2),s=e=>{var n=mj(),r=F(n);D(n),R(()=>U(r,`v${z(t).version??``}`)),H(e,n)};W(o,e=>{z(t).version&&e(s)}),D(n),R(()=>U(a,` ${z(t).name??``}`)),H(e,n)});var a=L(i,2),o=e=>{var t=_j(),n=F(t);Zh(F(n),{size:11,class:`text-amber-500 flex-shrink-0`}),Ke(),D(n);var r=L(n,2),i=F(r),a=F(i);D(i);var o=L(i,2),s=e=>{var t=gj(),n=F(t);D(t),R(()=>U(n,`${z(v).blocked??``} blocked`)),H(e,t)};W(o,e=>{z(v).blocked>0&&e(s)});var c=L(o,2),l=e=>{var t=lj(),n=F(t);D(t),R(()=>U(n,`${z(v).errored??``} err`)),H(e,t)};W(c,e=>{z(v).errored>0&&e(l)}),D(r),D(t),R(()=>U(a,`×${z(v).runs??``}`)),H(e,t)};W(a,e=>{z(v)&&z(v).runs>0&&e(o)}),D(n),D(t),H(e,t)};W(he,e=>{z(S)&&e(ge)});var _e=L(he,2),ve=F(_e),ye=L(F(ve),2),be=F(ye),xe=e=>{var t=yj();Zp(I(t),{size:12}),Ke(),H(e,t)},Se=e=>{var t=bj();$p(I(t),{size:12}),Ke(),H(e,t)};W(be,e=>{z(a)?e(xe):e(Se,-1)}),D(ye),D(ve);var Ce=L(ve,2);G(Ce,21,()=>z(p),e=>e.id,(e,t)=>{let n=M(()=>z(b).get(z(t).id));var r=Sj(),i=I(r),a=e=>{var t=xj(),r=F(t);xh(r,{size:11,class:`flex-shrink-0`});var i=L(r,2),a=F(i);D(i);var o=L(i,2);D(t),R(e=>{q(t,1,`flex items-center gap-2 my-1 text-[11px] ${z(n).confidence===`likely`?`text-fg-muted`:`text-fg-muted/70`}`),U(a,`${e??``} tokens left the agent's
|
|
15
|
+
context · ${z(n).confidence??``}`),q(o,1,`flex-1 border-t border-dashed ${z(n).confidence===`likely`?`border-line`:`border-line/60`}`)},[()=>sd(z(n).droppedTokens)]),H(e,t)};W(i,e=>{z(n)&&e(a)});var o=L(i,2),s=F(o),c=F(s,!0);D(s);var l=L(s,2),f=F(l,!0);D(l);var p=L(l,2),m=F(p,!0);D(p);var h=L(p,2),g=F(h,!0);D(h),D(o),R((e,n,r)=>{U(c,e),q(l,1,`px-1.5 py-0.5 rounded text-[10px] flex-shrink-0 ${z(t).type===`api_error`?`bg-red-100 text-red-700`:z(t).decision===`reject`?`bg-amber-100 text-amber-700`:`bg-subtle text-fg-muted`}`),U(f,z(t).type),U(m,n),U(g,r)},[()=>od(z(t).timestamp),()=>u(z(t)),()=>d(z(t))]),H(e,r)}),D(Ce),D(_e),R((e,t,n)=>{U(c,z(r).id),U(w,`${e??``} `),U(ne,`${t??``} in / ${n??``} out`),U(ie,`${z(r).rollup.apiRequests??``} req`),U(le,z(r).rollup.prompts)},[()=>o(z(r).rollup.costUsd),()=>sd(z(r).rollup.inputTokens),()=>sd(z(r).rollup.outputTokens)]),B(`click`,ye,()=>P(a,!z(a))),H(e,t)};W(be,e=>{z(r)&&e(xe)}),D(ye),D(_e),R((e,t,n)=>{U(ee,e),U(re,` ${t??``} in / ${n??``} out`),U(oe,`${z(i).accepted??``} `),U(ce,z(i).rejected)},[()=>o(z(i).costUsd),()=>sd(z(i).inputTokens),()=>sd(z(i).outputTokens)]),H(e,t)};W(re,e=>{z(n).length===0?e(ie):e(ae,-1)}),D(C),H(e,C),at()}ea([`click`]);function Dj(e,t){return e==null&&t==null?`—`:`${e??`—`}→${t??`—`}`}function Oj(e,t=!0){return e==null||!t?`—`:e<1e-4?`$${(e*1e6).toFixed(2)}μ`:e<.01?`$${(e*1e3).toFixed(3)}m`:`$${e.toFixed(4)}`}function kj(e,t){return e==null?`—`:t&&t>0?`${e} (${t} cached)`:String(e)}function Aj(e,t){return e==null?`—`:t&&t>0?`${e} (${t} reasoning)`:String(e)}function jj(e){return e==null?`—`:`${e>=10?Math.round(e):e.toFixed(1)} tok/s`}function Mj(e){return e==null?`—`:e<1?`${Math.round(e*1e3)}ms`:`${e.toFixed(e<10?2:1)}s`}function Nj(e){if(e.length===0)return{label:``,details:``};let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);let n=[...t.keys()],r=e=>{let n=t.get(e)??0;return n>1?`${e} (x${n})`:e},i=n.map(r).join(`, `);return n.length===1?{label:r(n[0]),details:``}:n.length===2?{label:`${r(n[0])}, ${r(n[1])}`,details:i}:{label:`${r(n[0])}, ${r(n[1])}, …`,details:i}}var Pj=new Set([`chat`,`text_completion`,`generate_content`,`embeddings`]),Fj=new Set([`invoke_agent`,`create_agent`]);function Ij(e){return e.operation===`execute_handoff`||e.handoff!=null}function Lj(e){let t=new Set;for(let n of e){let r=n.endMs-n.startMs;for(let i of e){if(i===n)continue;let e=i.endMs-i.startMs;if(i.startMs>=n.startMs&&i.endMs<=n.endMs&&e<r){t.add(n.spanId);break}}}return t}function Rj(e){let t={spanCount:e.length,modelCalls:0,toolCalls:0,agentInvocations:0,handoffs:0,errors:0,inputTokens:0,outputTokens:0,totalTokens:0,reasoningTokens:0,cachedTokens:0,totalCostUsd:0,costKnown:!1,costComplete:!0,durationMs:0,models:[],providers:[]};if(e.length===0)return t.costComplete=!1,t;let n=Lj(e),r=1/0,i=-1/0,a=0,o=0,s=new Set,c=new Set,l=new Set,u=0;for(let d of e){r=Math.min(r,d.startMs),i=Math.max(i,d.endMs),d.status===`error`&&t.errors++;let e=d.operation,f=n.has(d.spanId);if(e===`execute_tool`&&!f&&a++,!f)for(let e of d.toolCalls)e.id?l.add(e.id):u++;if(Fj.has(e)&&t.agentInvocations++,Ij(d)&&t.handoffs++,Pj.has(e)&&!f){t.modelCalls++;let e=d.responseModel??d.requestModel;e&&e!==`unknown`&&s.add(e),d.provider&&d.provider!==`unknown`&&c.add(d.provider);let n=d.usage;t.inputTokens+=n.inputTokens??0,t.outputTokens+=n.outputTokens??0,t.reasoningTokens+=n.reasoningOutputTokens??0,t.cachedTokens+=n.cacheReadInputTokens??0,d.cost&&d.cost.source!==`unknown`?(t.totalCostUsd+=d.cost.total,o++):t.costComplete=!1}}return t.totalTokens=t.inputTokens+t.outputTokens,t.toolCalls=a>0?a:l.size+u,t.costKnown=o>0,t.modelCalls===0&&(t.costComplete=!1),t.durationMs=i>r?i-r:0,t.models=[...s],t.providers=[...c],t}function zj(e){let t=new Map;for(let n of e){let e=n.normalized.conversationId,r=e??`trace:${n.traceId}`,i=t.get(r);i?(i.rows.push(n),i.latest=Math.max(i.latest,n.normalized.startMs)):t.set(r,{key:r,conversationId:e,traceId:n.traceId,rows:[n],latest:n.normalized.startMs})}return[...t.values()].sort((e,t)=>t.latest-e.latest)}var Bj=Ns({"openai/gpt-4o":128e3,"openai/gpt-4o-mini":128e3,"openai/gpt-4.1":1047576,"openai/gpt-4-turbo":128e3,"openai/gpt-4":8192,"openai/gpt-3.5-turbo":16385,"openai/o1":2e5,"openai/o3":2e5,"anthropic/claude-opus-4":2e5,"anthropic/claude-sonnet-4":2e5,"anthropic/claude-3-5-sonnet":2e5,"anthropic/claude-3-5-haiku":2e5,"anthropic/claude-3-opus":2e5,"anthropic/claude-3-haiku":2e5,"google/gemini-2.5-pro":1048576,"google/gemini-2.5-flash":1048576,"google/gemini-2.0-flash":1048576,"google/gemini-1.5-pro":2097152,"google/gemini-1.5-flash":1048576,"mistral/mistral-large":128e3,"mistral/mistral-small":32e3,"groq/llama-3.1-70b":131072,"deepseek/deepseek-chat":65536}),Vj=V(`<span class="inline-flex items-center gap-1.5"><svg class="flex-shrink-0 -rotate-90" role="img"><circle fill="none" stroke="currentColor" class="text-line"></circle><circle fill="none" stroke="currentColor" stroke-linecap="round"></circle></svg> <span> </span></span>`);function Hj(e,t){it(t,!0);let n=Z(t,`size`,3,30),r=M(()=>t.total>0?Math.min(t.used/t.total,1):0),i=M(()=>Math.round(z(r)*100)),a=M(()=>z(r)>=.9?{arc:`text-danger`,label:`text-danger`}:z(r)>=.7?{arc:`text-warning`,label:`text-warning`}:{arc:`text-success`,label:`text-fg-muted`}),o=M(()=>(n()-3)/2),s=M(()=>2*Math.PI*z(o)),c=M(()=>z(s)*(1-z(r))),l=M(()=>`${t.used.toLocaleString()} / ${t.total.toLocaleString()} tokens · ${z(i)}% of context window`);var u=Vj(),d=F(u),f=F(d);J(f,`stroke-width`,3);var p=L(f);J(p,`stroke-width`,3),D(d);var m=L(d,2),h=F(m);D(m),D(u),R((e,t)=>{J(u,`title`,z(l)),J(u,`aria-label`,z(l)),J(d,`width`,n()),J(d,`height`,n()),J(d,`viewBox`,`0 0 ${n()} ${n()}`),J(f,`cx`,n()/2),J(f,`cy`,n()/2),J(f,`r`,z(o)),J(p,`cx`,n()/2),J(p,`cy`,n()/2),J(p,`r`,z(o)),J(p,`stroke-dasharray`,z(s)),J(p,`stroke-dashoffset`,z(c)),q(p,0,e),q(m,1,t),U(h,`${z(i)??``}%`)},[()=>K($(`transition-all duration-300`,z(a).arc)),()=>K($(`font-mono text-[11px] tabular-nums`,z(a).label))]),H(e,u),at()}var Uj=V(`<span><!> </span>`),Wj=V(`<span class="group inline-flex items-center gap-0.5"><span class="font-mono text-fg"> </span> <!></span>`),Gj=V(`<button type="button" class="font-mono text-[11px] text-accent hover:underline cursor-pointer" title="Open trace in waterfall"> </button>`),Kj=V(`<span class="font-mono text-[11px] text-fg-subtle"> </span>`),qj=V(`<span class="text-fg-subtle font-mono text-xs"> </span>`),Jj=V(`<span class="inline-flex items-center gap-1 font-mono text-xs" title="Streaming: time to first chunk · output throughput"><!> </span>`),Yj=V(`<div><!> <!> <!> <!> <span class="text-fg-subtle"> </span> <span class="group inline-flex items-center gap-0.5"><!> <!></span> <!> <span class="ml-auto flex items-center gap-3 text-fg-muted"><!> <span class="inline-flex items-center gap-1" title="Latency"><!> </span> <span class="inline-flex items-center gap-1 font-mono text-xs" title="Tokens in (cached) → out (reasoning)"><!> <span class="text-fg-subtle">→</span> </span> <!> <span><!> </span></span></div>`);function Xj(e,t){it(t,!0);let n={openai:`bg-emerald-500/15 text-emerald-600 border-emerald-500/30`,anthropic:`bg-orange-500/15 text-orange-600 border-orange-500/30`,google:`bg-blue-500/15 text-blue-600 border-blue-500/30`,mistral:`bg-fuchsia-500/15 text-fuchsia-600 border-fuchsia-500/30`,groq:`bg-amber-500/15 text-amber-600 border-amber-500/30`,deepseek:`bg-cyan-500/15 text-cyan-600 border-cyan-500/30`},r=M(()=>n[t.span.provider]??`bg-subtle text-fg-muted border-line`),i=M(()=>ad(t.span.endMs-t.span.startMs)),a=M(()=>kj(t.span.usage.inputTokens,t.span.usage.cacheReadInputTokens)),o=M(()=>Aj(t.span.usage.outputTokens,t.span.usage.reasoningOutputTokens)),s=M(()=>Bj(t.span.provider,t.span.responseModel??t.span.requestModel)),c=M(()=>z(s)!=null&&t.span.usage.inputTokens!=null),l=M(()=>[[`temp`,t.span.params.temperature],[`top_p`,t.span.params.topP],[`max`,t.span.params.maxTokens]].filter(([,e])=>e!==void 0).map(([e,t])=>`${e} ${t}`).join(` · `)),u=M(()=>{let e=t.span.streaming;if(!e)return null;let n=[];return e.timeToFirstChunkS!==void 0&&n.push(`TTFC ${Mj(e.timeToFirstChunkS)}`),e.outputTokensPerSecond!==void 0&&n.push(jj(e.outputTokensPerSecond)),n.length>0?n.join(` · `):null}),d=M(()=>t.span.cost?.source===`table`||t.span.cost?.source===`reported`),f=`inline-flex items-center gap-1 px-2 py-0.5 rounded border text-xs font-medium`,p=`bg-amber-500/15 text-amber-600 border-amber-500/30`,m=M(()=>t.span.provider===`unknown`&&t.span.agent?.name?null:t.span.provider),h=M(()=>t.span.responseModel??t.span.requestModel),g=M(()=>t.span.agent?.name&&(t.span.provider===`unknown`||z(h)===`unknown`));var _=Yj(),v=F(_),y=e=>{var n=Uj(),r=F(n);lp(r,{size:12});var i=L(r);D(n),R(e=>{q(n,1,e),U(i,` agent: ${t.span.agent.name??``}`)},[()=>K($(f,`bg-violet-500/15 text-violet-600 border-violet-500/30`))]),H(e,n)},b=e=>{var t=Uj(),n=F(t);Vp(n,{size:12});var i=L(n);D(t),R(e=>{q(t,1,e),U(i,` ${z(m)??``}`)},[()=>K($(f,z(r)))]),H(e,t)};W(v,e=>{z(g)?e(y):e(b,-1)});var x=L(v,2),S=e=>{var n=Uj(),r=F(n);kh(r,{size:12});var i=L(r);D(n),R(e=>{q(n,1,e),J(n,`title`,t.span.guard.message??(t.span.guard.stopped?`Guard stopped the run`:`Guard warning`)),U(i,` guard${t.span.guard.rule?`: ${t.span.guard.rule}`:``}`)},[()=>K($(f,t.span.guard.stopped||t.span.guard.action===`stop`?`bg-red-500/15 text-red-600 border-red-500/30`:p))]),H(e,n)};W(x,e=>{t.span.guard&&e(S)});var C=L(x,2),w=e=>{var n=Uj(),r=F(n);Gh(r,{size:12});var i=L(r);D(n),R((e,r)=>{q(n,1,e),J(n,`title`,r),U(i,` ${t.span.warnings.length??``} warning${t.span.warnings.length===1?``:`s`}`)},[()=>K($(f,p)),()=>t.span.warnings.map(e=>e.message??e.setting??e.type).filter(Boolean).join(`
|
|
16
|
+
`)]),H(e,n)};W(C,e=>{t.span.warnings&&t.span.warnings.length>0&&e(w)});var T=L(C,2),ee=e=>{var t=Wj(),n=F(t),r=F(n,!0);D(n),Q_(L(n,2),{get value(){return z(h)},label:`Copy model name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(t),R(()=>U(r,z(h))),H(e,t)};W(T,e=>{z(h)!==`unknown`&&e(ee)});var te=L(T,2),ne=F(te,!0);D(te);var re=L(te,2),ie=F(re),ae=e=>{var n=Gj(),r=F(n);D(n),R(e=>U(r,`trace ${e??``}…`),[()=>t.span.traceId.slice(0,8)]),B(`click`,n,function(...e){t.onOpenTrace?.apply(this,e)}),H(e,n)},oe=e=>{var n=Kj(),r=F(n);D(n),R(e=>{J(n,`title`,t.span.traceId),U(r,`trace ${e??``}…`)},[()=>t.span.traceId.slice(0,8)]),H(e,n)};W(ie,e=>{t.onOpenTrace?e(ae):e(oe,-1)}),Q_(L(ie,2),{get value(){return t.span.traceId},label:`Copy trace ID`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(re);var se=L(re,2),ce=e=>{var t=qj(),n=F(t,!0);D(t),R(()=>U(n,z(l))),H(e,t)};W(se,e=>{z(l)&&e(ce)});var le=L(se,2),E=F(le),ue=e=>{var t=Jj(),n=F(t);dm(n,{size:12});var r=L(n);D(t),R(()=>U(r,` ${z(u)??``}`)),H(e,t)};W(E,e=>{z(u)&&e(ue)});var de=L(E,2),fe=F(de);Np(fe,{size:12});var pe=L(fe);D(de);var me=L(de,2),he=F(me);xm(he,{size:12});var ge=L(he),_e=L(ge,2);D(me);var ve=L(me,2),ye=e=>{{let n=M(()=>t.span.usage.inputTokens??0),r=M(()=>z(s)??0);Hj(e,{get used(){return z(n)},get total(){return z(r)}})}};W(ve,e=>{z(c)&&e(ye)});var be=L(ve,2),xe=F(be);Lp(xe,{size:12});var Se=L(xe);D(be),D(le),D(_),R((e,n,r)=>{q(_,1,e),U(ne,t.span.operation),U(pe,` ${z(i)??``}`),U(ge,` ${z(a)??``} `),U(_e,` ${z(o)??``}`),q(be,1,n),J(be,`title`,t.span.cost?.source===`reported`?`Reported cost (gen_ai.usage.cost.usd)`:t.span.cost?.source===`table`?`Estimated cost`:`No price for ${t.span.provider}/${t.span.requestModel}`),U(Se,` ${r??``}`)},[()=>K($(`flex items-center gap-3 flex-wrap`,`px-3 py-2 border-b border-line`,`text-sm`)),()=>K($(`inline-flex items-center gap-1`,z(d)?`text-fg`:`text-fg-subtle`)),()=>Oj(t.span.cost?.total,z(d))]),H(e,_),at()}ea([`click`]);function Zj(e){if(!e)return``;if(/[\s/:.]/.test(e))return e;let t=e.replace(/[_-]+/g,` `).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`).trim();return!t.includes(` `)&&t===e?e.charAt(0).toUpperCase()+e.slice(1):t.split(` `).filter(Boolean).map(e=>e.length>1&&e===e.toUpperCase()?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}function Qj(e){if(e===void 0)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}var $j=V(`<div> </div> <pre> </pre>`,1);function eM(e,t){it(t,!0);let n=Z(t,`tone`,3,`neutral`);var r=$j(),i=I(r),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),R((e,n,r)=>{q(i,1,e),U(a,t.label),q(o,1,n),U(s,r)},[()=>K($(`text-[10px] font-medium uppercase tracking-wider mb-1`,n()===`positive`?`text-success`:`text-fg-subtle`)),()=>K($(`text-xs p-2 rounded overflow-x-auto whitespace-pre-wrap`,n()===`positive`?`bg-surface border border-success-border text-fg`:`bg-subtle border border-line text-fg`)),()=>Qj(t.value)]),H(e,r),at()}var tM=V(`<span class="font-mono text-[11px] text-violet-600/70 truncate"> </span>`),nM=V(`<span class="ml-auto text-[10px] uppercase tracking-wide text-fg-subtle">no result</span>`),rM=V(`<div class="px-3 py-2 border-t border-emerald-500/30 bg-emerald-500/15"><!></div>`),iM=V(`<div class="px-3 py-1.5 border-t border-line-subtle bg-subtle/60 text-[10px] font-mono text-fg-subtle"> </div>`),aM=V(`<div class="px-3 py-2 border-t border-violet-500/30 bg-surface"><!></div> <!> <!>`,1),oM=V(`<div class="mt-2 border border-violet-500/30 rounded-md overflow-hidden"><button type="button"><!> <!> <span class="font-mono font-medium text-violet-600"> </span> <!> <!></button> <!></div>`);function sM(e,t){it(t,!0);let n=M(()=>Zj(t.call.name)),r=M(()=>z(n)&&z(n)!==t.call.name?z(n):void 0),i=N(!1);function a(e){if(typeof e!=`object`||!e||Array.isArray(e))return``;let t=Object.entries(e);return t.length===0?``:t.slice(0,3).map(([e,t])=>`${e}: ${typeof t==`string`?`"${t.length>20?t.slice(0,20)+`…`:t}"`:t===null?`null`:typeof t==`object`?`…`:String(t)}`).join(`, `)}let o=M(()=>typeof t.call.arguments==`string`?(()=>{try{return JSON.parse(t.call.arguments)}catch{return t.call.arguments}})():t.call.arguments),s=M(()=>t.call.result),c=M(()=>a(z(o)));var l=oM(),u=F(l),d=F(u);{let e=M(()=>$(`text-violet-600 transition-transform shrink-0`,z(i)&&`rotate-90`));Dp(d,{size:12,get class(){return z(e)}})}var f=L(d,2);tg(f,{size:12,class:`text-violet-600 shrink-0`});var p=L(f,2),m=F(p,!0);D(p);var h=L(p,2),g=e=>{var t=tM(),n=F(t);D(t),R(()=>U(n,`(${z(c)??``})`)),H(e,t)};W(h,e=>{!z(i)&&z(c)&&e(g)});var _=L(h,2),v=e=>{H(e,nM())};W(_,e=>{!z(i)&&z(s)===void 0&&e(v)}),D(u);var y=L(u,2),b=e=>{var n=aM(),r=I(n);eM(F(r),{label:`Input`,get value(){return z(o)}}),D(r);var i=L(r,2),a=e=>{var t=rM();eM(F(t),{label:`Output`,get value(){return z(s)},tone:`positive`}),D(t),H(e,t)};W(i,e=>{z(s)!==void 0&&e(a)});var c=L(i,2),l=e=>{var n=iM(),r=F(n);D(n),R(()=>U(r,`id: ${t.call.id??``}`)),H(e,n)};W(c,e=>{t.call.id&&e(l)}),H(e,n)};W(y,e=>{z(i)&&e(b)}),D(l),R(e=>{q(u,1,e),J(p,`title`,z(r)),U(m,t.call.name)},[()=>K($(`w-full px-2.5 py-1.5 flex items-center gap-1.5 text-left`,`text-xs bg-violet-500/15 hover:bg-violet-500/25 transition-colors`))]),B(`click`,u,()=>P(i,!z(i))),H(e,l),at()}ea([`click`]);var cM=(e,t=p)=>{var n=la(),r=I(n),i=e=>{var n=dM(),r=F(n,!0);D(n),R(()=>U(r,t().text)),H(e,n)},a=e=>{var n=fM(),r=F(n);D(n),R(()=>U(r,`[image · ${t().mediaType??``} · ref=${t().dataRef??``}]`)),H(e,n)},o=e=>{var n=fM(),r=F(n);D(n),R(()=>U(r,`[audio · ${t().mediaType??``} · ref=${t().dataRef??``}]`)),H(e,n)},s=e=>{var n=pM(),r=F(n),i=L(r),a=F(i,!0);D(i),D(n),R(()=>{U(r,`Content stored externally (${t().direction??``}). Reference: `),U(a,t().ref)}),H(e,n)},c=e=>{let n=M(()=>JSON.stringify(t().value,null,2));P_(e,{get content(){return z(n)},children:(e,t)=>{var r=mM(),i=F(r,!0);D(r),R(()=>U(i,z(n))),H(e,r)},$$slots:{default:!0}})};W(r,e=>{t().kind===`text`?e(i):t().kind===`image`?e(a,1):t().kind===`audio`?e(o,2):t().kind===`ref`?e(s,3):e(c,-1)}),H(e,n)},lM=(e,t=p)=>{var n=SM(),r=F(n);tg(F(r),{size:14}),Ke(),D(r);var i=L(r,2),a=F(i),o=e=>{var n=vM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().handoff.fromAgent)),H(e,n)};W(a,e=>{t().handoff?.fromAgent&&e(o)});var s=L(a,2),c=e=>{var n=yM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().handoff.toAgent)),H(e,n)};W(s,e=>{t().handoff?.toAgent&&e(c)});var l=L(s,2),u=e=>{var n=bM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().conversationId)),H(e,n)};W(l,e=>{t().conversationId&&e(u)});var d=L(l,2),f=e=>{var n=xM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().agent.name)),H(e,n)};W(d,e=>{t().agent?.name&&e(f)}),D(i),D(n),H(e,n)},uM=(e,t=p)=>{var n=wM(),r=F(n);lp(F(r),{size:14}),Ke(),D(r);var i=L(r,2),a=F(i),o=e=>{var n=xM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().agent.name)),H(e,n)};W(a,e=>{t().agent?.name&&e(o)});var s=L(a,2),c=e=>{var n=CM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().agent.description)),H(e,n)};W(s,e=>{t().agent?.description&&e(c)});var l=L(s,2),u=e=>{var n=bM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().conversationId)),H(e,n)};W(l,e=>{t().conversationId&&e(u)}),D(i),Ke(2),D(n),H(e,n)},dM=V(`<p class="whitespace-pre-wrap leading-relaxed text-fg text-sm"> </p>`),fM=V(`<div class="text-xs text-fg-subtle italic"> </div>`),pM=V(`<div class="text-xs text-fg-muted italic"> <code class="not-italic text-fg"> </code></div>`),mM=V(`<pre class="text-xs bg-code text-fg p-2 rounded overflow-x-auto"> </pre>`),hM=V(`<span class="text-[10px] text-fg-subtle"> </span>`),gM=V(`<span class="text-[10px] font-mono text-fg-subtle"> </span>`),_M=V(`<div><div class="flex items-center gap-1.5 mb-1.5"><span><!> </span> <!> <!> <!></div> <div class="space-y-2"></div> <!></div>`),vM=V(`<div class="text-fg-subtle">from</div> <div class="font-mono"> </div>`,1),yM=V(`<div class="text-fg-subtle">to</div> <div class="font-mono"> </div>`,1),bM=V(`<div class="text-fg-subtle">conversation</div> <div class="font-mono text-xs text-fg-muted truncate"> </div>`,1),xM=V(`<div class="text-fg-subtle">agent</div> <div class="font-mono"> </div>`,1),SM=V(`<div class="p-4 space-y-3 text-sm"><div class="flex items-center gap-2 text-violet-600 font-medium"><!> Agent handoff</div> <div class="grid grid-cols-[80px_1fr] gap-y-2 text-fg-muted"><!> <!> <!> <!></div></div>`),CM=V(`<div class="text-fg-subtle">description</div> <div> </div>`,1),wM=V(`<div class="p-4 space-y-3 text-sm"><div class="flex items-center gap-2 text-violet-600 font-medium"><!> Agent run</div> <div class="grid grid-cols-[100px_1fr] gap-y-2 text-fg-muted"><!> <!> <!></div> <p class="text-xs text-fg-subtle italic">Agent-run spans aggregate child LLM calls. Open child spans for
|
|
17
|
+
transcripts.</p></div>`),TM=V(`<div class="p-4 text-sm text-fg-subtle italic">No conversation payload on this span. Enable content capture (<code class="text-xs">OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true</code>) in your instrumentation to see prompts and completions.</div>`),EM=V(`<div class="p-3 space-y-2"></div>`);function DM(e,t){it(t,!0);let n=(e,t=p)=>{let n=M(()=>i[t().role]??i.user),a=M(()=>z(n).icon);var o=_M(),s=F(o),c=F(s),l=F(c);Ra(l,()=>z(a),(e,t)=>{t(e,{size:10})});var u=L(l);D(c);var d=L(c,2),f=e=>{var n=hM(),r=F(n);D(n),R(()=>U(r,`finish: ${t().finishReason??``}`)),H(e,n)};W(d,e=>{t().finishReason&&e(f)});var m=L(d,2),h=e=>{var n=gM(),r=F(n);D(n),R(()=>U(r,`tool_call_id=${t().toolCallId??``}`)),H(e,n)};W(m,e=>{t().toolCallId&&e(h)});var g=L(m,2);{let e=M(()=>r(t()));Q_(g,{get value(){return z(e)},label:`Copy message`,class:`ml-auto opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(s);var _=L(s,2);G(_,20,()=>t().parts,e=>e,(e,t)=>{cM(e,()=>t)}),D(_),G(L(_,2),16,()=>t().toolCalls??[],e=>e,(e,t)=>{sM(e,{get call(){return t}})}),D(o),R((e,t)=>{q(o,1,e),q(c,1,t),U(u,` ${z(n).label??``}`)},[()=>K($(`group border rounded-lg px-3 py-2`,z(n).wrap)),()=>K($(`inline-flex items-center gap-1 px-1.5 py-0.5`,`rounded text-[10px] font-medium uppercase tracking-wide`,z(n).chip))]),H(e,o)};function r(e){let t=e.parts.map(e=>e.kind===`text`?e.text:e.kind===`ref`?`[ref:${e.direction}] ${e.ref}`:e.kind===`image`||e.kind===`audio`?`[${e.kind} · ${e.mediaType} · ${e.dataRef}]`:JSON.stringify(e.value,null,2));for(let n of e.toolCalls??[])t.push(JSON.stringify({tool:n.name,...n},null,2));return t.join(`
|
|
18
18
|
|
|
19
|
-
`)}let i={system:{wrap:`bg-subtle border-line`,chip:`bg-hover text-fg-muted`,label:`system`,icon:wh},user:{wrap:`bg-blue-500/10 border-blue-500/30`,chip:`bg-blue-500/15 text-blue-600`,label:`user`,icon:Kh},assistant:{wrap:`bg-emerald-500/10 border-emerald-500/30`,chip:`bg-emerald-500/15 text-emerald-600`,label:`assistant`,icon:op},tool:{wrap:`bg-amber-500/10 border-amber-500/30`,chip:`bg-amber-500/15 text-amber-600`,label:`tool`,icon:Qh}};var a=la(),o=I(a),s=e=>{var n=la(),r=I(n),i=e=>{oM(e,()=>t.span)},a=e=>{sM(e,()=>t.span)},o=e=>{H(e,SM())};W(r,e=>{t.span.operation===`execute_handoff`||t.span.handoff?e(i):t.span.operation===`invoke_agent`||t.span.operation===`create_agent`?e(a,1):e(o,-1)}),H(e,n)},c=e=>{var r=CM();G(r,20,()=>t.span.messages,e=>e,(e,t)=>{n(e,()=>t)}),D(r),H(e,r)};W(o,e=>{t.span.messages.length===0?e(s):e(c,-1)}),H(e,a),at()}var TM=V(`<span class="inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-700 border border-amber-500/20 font-mono" title="Agent security signal"><!> </span>`),EM=V(`<button type="button"><!> <span class="truncate"> </span></button>`),DM=V(`<div class="flex items-center gap-3"><div><!> <span class="truncate"> </span></div> <div class="relative flex-1 h-6 bg-subtle border border-line-subtle rounded"></div></div>`),OM=V(`<div class="border border-line rounded-lg overflow-hidden bg-surface"><header class="px-3 py-2 border-b border-line bg-subtle flex items-center gap-2 text-sm"><!> <span class="font-mono text-xs text-fg-muted truncate"> </span> <span class="text-xs text-fg-subtle ml-auto flex items-center gap-1.5 flex-wrap justify-end"><!> </span></header> <div class="p-3 space-y-1.5"></div></div>`),kM=V(`<div class="p-6 text-sm text-fg-subtle">No conversations to display.</div>`),AM=V(`<div class="p-3 space-y-3 overflow-y-auto h-full"></div>`);function jM(e,t){it(t,!0);let n=(e,n=p)=>{let r=M(()=>s(n()));var i=OM(),a=F(i),l=F(a);op(l,{size:14,class:`text-violet-600`});var u=L(l,2),d=F(u,!0);D(u);var f=L(u,2),m=F(f);G(m,16,()=>c(n()),e=>e,(e,t)=>{var n=TM(),r=F(n);Oh(r,{size:10});var i=L(r);D(n),R(()=>U(i,` ${t??``}`)),H(e,n)});var h=L(m);D(f),D(a);var g=L(a,2);G(g,20,()=>z(r).laneOrder,e=>e,(e,i)=>{let a=M(()=>z(r).laneMap.get(i)),s=M(()=>i.startsWith(`handoff:`));var c=DM(),l=F(c),u=F(l),d=e=>{ep(e,{size:11})},f=e=>{Rp(e,{size:11,class:`text-fg-subtle`})};W(u,e=>{z(s)?e(d):e(f,-1)});var p=L(u,2),m=F(p,!0);D(p),D(l);var h=L(l,2);G(h,21,()=>z(a),e=>e.spanId,(e,a)=>{let c=M(()=>(z(a).startMs-n().startMs)/z(r).durationMs*100),l=M(()=>Math.max(.5,(z(a).endMs-z(a).startMs)/z(r).durationMs*100)),u=M(()=>z(a).status===`error`),d=M(()=>z(a).spanId===t.selectedSpanId),f=M(()=>z(r).wrapperIdsByLane.get(i)?.has(z(a).spanId)??!1);var p=EM(),m=F(p),h=e=>{Hh(e,{size:9})};W(m,e=>{z(u)&&e(h)});var g=L(m,2),_=F(g,!0);D(g),D(p),R((e,t)=>{J(p,`title`,e),q(p,1,t),oo(p,`left: ${z(c)??``}%; width: ${z(l)??``}%; min-width: 8px; z-index: ${z(f)?1:2};`),U(_,z(a).operation)},[()=>`${z(a).operation} · ${nd(z(a).endMs-z(a).startMs)}${z(a).usage.inputTokens==null?``:` · ${z(a).usage.inputTokens}→${z(a).usage.outputTokens??`—`}`}${z(f)?` (wraps children)`:``}`,()=>K($(`absolute top-0.5 bottom-0.5 rounded text-[10px] font-mono px-1 truncate flex items-center gap-1 transition-all`,o(z(f),z(s),z(u)),z(d)&&`ring-2 ring-accent ring-offset-1`))]),B(`click`,p,()=>t.onSelectSpan?.(z(a).spanId)),H(e,p)}),D(h),D(c),R(e=>{q(l,1,e),J(l,`title`,i),U(m,i)},[()=>K($(`w-44 shrink-0 flex items-center gap-1.5 text-xs font-mono truncate`,z(s)?`text-violet-600`:`text-fg-muted`))]),H(e,c)}),D(g),D(i),R((e,t)=>{J(u,`title`,n().conversationId),U(d,e),U(h,` ${n().spans.length??``} span${n().spans.length===1?``:`s`} · ${t??``} · ${n().service??``}`)},[()=>n().conversationId.startsWith(`trace:`)?`trace ${n().conversationId.slice(6,14)}…`:`conversation ${n().conversationId.slice(0,12)}…`,()=>nd(z(r).durationMs)]),H(e,i)};function r(e){let t=new Map;for(let n of e){let e=n.normalized.conversationId??`trace:${n.traceId}`,r=t.get(e);r?(r.spans.push(n.normalized),r.startMs=Math.min(r.startMs,n.normalized.startMs),r.endMs=Math.max(r.endMs,n.normalized.endMs)):t.set(e,{conversationId:e,service:n.service,traceId:n.traceId,spans:[n.normalized],startMs:n.normalized.startMs,endMs:n.normalized.endMs})}return[...t.values()].sort((e,t)=>t.startMs-e.startMs)}function i(e){return e.handoff?`handoff: ${e.handoff.fromAgent??`?`} → ${e.handoff.toAgent??`?`}`:e.agent?.name?e.agent.name:`${e.provider}/${e.responseModel??e.requestModel}`}function a(e){let t=new Set;for(let n=0;n<e.length;n++){let r=e[n];for(let i=0;i<e.length;i++){if(n===i)continue;let a=e[i];if(a.startMs>=r.startMs&&a.endMs<=r.endMs&&a.endMs-a.startMs<r.endMs-r.startMs){t.add(r.spanId);break}}}return t}function o(e,t,n){return e?`bg-transparent border border-dashed border-line text-fg-subtle hover:bg-hover/50`:t?`bg-violet-500/15 hover:bg-violet-500/25 text-violet-600 border border-violet-500/30`:n?`bg-red-500/15 hover:bg-red-500/25 text-red-600 border border-red-500/30`:`bg-emerald-500/15 hover:bg-emerald-500/25 text-emerald-600 border border-emerald-500/30`}function s(e){let t=[],n=new Map;for(let r of e.spans){let e=i(r);n.has(e)||(n.set(e,[]),t.push(e)),n.get(e).push(r)}let r=new Map;for(let[e,t]of n)r.set(e,a(t));return{laneOrder:t,laneMap:n,wrapperIdsByLane:r,durationMs:Math.max(1,e.endMs-e.startMs)}}function c(e){let t=new Set;for(let n of e.spans){let e=n.agentSecurity;e&&(e.consentOutcome&&t.add(`consent:${e.consentOutcome}`),e.policyDecision===`deny`&&t.add(`policy:deny`),e.injectionVerdict&&e.injectionVerdict!==`clean`&&t.add(`injection:${e.injectionVerdict}`),e.guardStopped&&t.add(`guard:stop`),e.securityEvent&&t.add(e.securityEvent),e.planStepIndex!==void 0&&t.add(`plan:#${e.planStepIndex}`))}return[...t]}let l=M(()=>r(t.rows));var u=la(),d=I(u),f=e=>{H(e,kM())},m=e=>{var t=AM();G(t,21,()=>z(l),e=>e.conversationId,(e,t)=>{n(e,()=>z(t))}),D(t),H(e,t)};W(d,e=>{z(l).length===0?e(f):e(m,-1)}),H(e,u),at()}ea([`click`]);function MM(e,t=80){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function NM(e,t=60){if(e==null)return``;if(typeof e==`string`)return MM(e,t);try{return MM(JSON.stringify(e),t)}catch{return MM(String(e),t)}}function PM(e){let t=e.responseModel??e.requestModel;return t&&t!==`unknown`?e.provider&&e.provider!==`unknown`?`${e.provider}/${t}`:t:e.agent?.name??e.provider??`model`}function FM(e){let{inputTokens:t,outputTokens:n}=e.usage;if(t!=null||n!=null)return{input:t,output:n}}function IM(e){for(let t=e.messages.length-1;t>=0;t--){let n=e.messages[t];if(n.role!==`assistant`)continue;let r=n.parts.filter(e=>e.kind===`text`).map(e=>e.text).join(` `).trim();if(r)return r}}function LM(e){let t=e.extras?.raw??{},n=t.tool_response??t.tool_result;return n==null?``:NM(n)}function RM(e){if(e.length===0)return[];let t=new Map(e.map(e=>[e.spanId,e])),n=new Map,r=[];for(let i of e){let e=i.parentSpanId;if(e&&t.has(e)){let t=n.get(e)??[];t.push(i),n.set(e,t)}else r.push(i)}let i=new Set;for(let t of e)t.operation===`execute_tool`&&t.tool?.callId&&i.add(t.tool.callId);let a=new Set,o=(e,t)=>e.startMs-t.startMs||e.endMs-t.endMs,s=0,c=()=>`trace-${s++}`;function l(e,t){return(n.get(e.spanId)??[]).sort(o).map(e=>u(e,t))}function u(e,t){let n=e.operation,r=e.endMs-e.startMs,o={startMs:e.startMs,durationMs:r,spanId:e.spanId};if(n===`execute_handoff`||e.handoff){let n=e.handoff?.fromAgent??`?`,r=e.handoff?.toAgent??`?`;return{id:c(),kind:`handoff`,label:`${n} → ${r}`,depth:t,...o,children:l(e,t+1)}}if(Mj.has(n))return{id:c(),kind:`agent`,label:`Agent: ${e.agent?.name??`agent`}`,depth:t,...o,tokens:FM(e),children:l(e,t+1)};if(n===`execute_tool`){let n=e.tool?.name??e.agent?.name??e.name??`tool`,r=LM(e);return{id:c(),kind:`tool`,label:`Tool: ${n}`,sublabel:r?`→ ${r}`:void 0,depth:t,...o,children:l(e,t+1)}}if(jj.has(n)){let n=l(e,t+1);if(n.length>0)return{id:c(),kind:`group`,label:PM(e),depth:t,...o,tokens:FM(e),children:n};let r=[],s=e.usage.reasoningOutputTokens??0;s>0&&r.push({id:c(),kind:`reasoning`,label:`Reasoning`,sublabel:`${s} tokens`,depth:t+1,children:[]});for(let n of e.toolCalls){if(n.id&&i.has(n.id)||n.id&&a.has(n.id))continue;n.id&&a.add(n.id);let e=NM(n.arguments,40),o=n.result===void 0?``:` → ${NM(n.result,40)}`;r.push({id:c(),kind:`tool`,label:`Tool: ${n.name}`,sublabel:`${e}${o}`.trim()||void 0,depth:t+1,children:[]})}let u=IM(e);return u&&r.push({id:c(),kind:`text`,label:`Text`,sublabel:MM(u),depth:t+1,children:[]}),{id:c(),kind:`step`,label:PM(e),sublabel:e.operation,depth:t,...o,tokens:FM(e),children:r}}return{id:c(),kind:`step`,label:e.name||n,depth:t,...o,children:l(e,t+1)}}return r.sort(o).map(e=>u(e,0))}function zM(e){let t=[],n=e=>{t.push(e);for(let t of e.children)n(t)};for(let t of e)n(t);return t}var BM={agent:{icon:op,dot:`bg-violet-500`,text:`text-violet-600`},group:{icon:Sm,dot:`bg-blue-500`,text:`text-blue-600`},step:{icon:Rp,dot:`bg-blue-500`,text:`text-fg`},reasoning:{icon:up,dot:`bg-amber-500`,text:`text-amber-600`},tool:{icon:Qh,dot:`bg-purple-500`,text:`text-purple-600`},text:{icon:Pm,dot:`bg-emerald-500`,text:`text-emerald-600`},handoff:{icon:ep,dot:`bg-violet-500`,text:`text-violet-600`}};function VM(e){if(!e)return``;let{input:t,output:n}=e;return t==null&&n==null?``:`${t??`—`}→${n??`—`}`}var HM=V(`<div class="p-6 text-sm text-fg-subtle">No trace to display.</div>`),UM=V(`<span class="text-line-subtle select-none">·</span>`),WM=V(`<span class="min-w-0 flex-1 truncate text-fg-subtle font-sans"> </span>`),GM=V(`<span class="flex-1"></span>`),KM=V(`<span title="tokens in → out"> </span>`),qM=V(`<span class="text-fg-muted"> </span>`),JM=V(`<button type="button"><span class="relative flex items-center gap-1.5 shrink-0"><!> <span></span> <!></span> <span> </span> <!> <span class="shrink-0 flex items-center gap-2 text-fg-subtle tabular-nums"><!> <!></span></button>`),YM=V(`<div class="py-1 overflow-y-auto h-full font-mono text-xs"></div>`);function XM(e,t){it(t,!0);let n=Z(t,`selectedSpanId`,3,null),r=M(()=>zM(t.nodes));var i=la(),a=I(i),o=e=>{H(e,HM())},s=e=>{var i=YM();G(i,21,()=>z(r),e=>e.id,(e,r)=>{let i=M(()=>BM[z(r).kind]),a=M(()=>z(i).icon),o=M(()=>z(r).spanId!=null),s=M(()=>z(r).spanId!=null&&z(r).spanId===n());var c=JM(),l=F(c),u=F(l),d=e=>{H(e,UM())};W(u,e=>{z(r).depth>0&&e(d)});var f=L(u,2),p=L(f,2);{let e=M(()=>$(`shrink-0`,z(i).text));Ra(p,()=>z(a),(t,n)=>{n(t,{size:12,get class(){return z(e)}})})}D(l);var m=L(l,2),h=F(m,!0);D(m);var g=L(m,2),_=e=>{var t=WM(),n=F(t,!0);D(t),R(()=>U(n,z(r).sublabel)),H(e,t)},v=e=>{H(e,GM())};W(g,e=>{z(r).sublabel?e(_):e(v,-1)});var y=L(g,2),b=F(y),x=e=>{var t=KM(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>VM(z(r).tokens)]),H(e,t)},S=M(()=>VM(z(r).tokens));W(b,e=>{z(S)&&e(x)});var C=L(b,2),w=e=>{var t=qM(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>nd(z(r).durationMs)]),H(e,t)};W(C,e=>{z(r).durationMs!=null&&z(r).durationMs>0&&e(w)}),D(y),D(c),R((e,t,n)=>{c.disabled=!z(o),q(c,1,e),oo(c,`padding-left: ${z(r).depth*18+8}px`),q(f,1,t),q(m,1,n),U(h,z(r).label)},[()=>K($(`group flex w-full items-center gap-2 py-1 pr-3 text-left transition-colors`,z(o)?`hover:bg-subtle cursor-pointer`:`cursor-default`,z(s)&&`bg-accent/10`)),()=>K($(`w-1.5 h-1.5 rounded-full shrink-0`,z(i).dot)),()=>K($(`shrink-0 font-medium`,z(i).text))]),B(`click`,c,()=>z(r).spanId&&t.onSelectSpan?.(z(r).spanId)),H(e,c)}),D(i),H(e,i)};W(a,e=>{z(r).length===0?e(o):e(s,-1)}),H(e,i),at()}ea([`click`]);function ZM(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(0)}k`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}var QM=V(`<div><!> <span class="text-[10px] uppercase tracking-wide text-fg-subtle"> </span> <span class="text-xs font-mono font-semibold tabular-nums"> </span></div>`),$M=V(`<div class="flex items-center gap-1.5 px-2 py-1 text-[11px] text-fg-subtle font-mono truncate max-w-full"> </div>`),eN=V(`<div class="flex flex-wrap items-stretch gap-1.5 px-3 py-2 border-b border-line bg-subtle/40" role="group" aria-label="Run summary"><!> <!></div>`);function tN(e,t){it(t,!0);let n=M(()=>[t.summary.costKnown&&{icon:Hp,label:`Cost`,value:Tj(t.summary.totalCostUsd)+(t.summary.costComplete?``:`+`),title:t.summary.costComplete?`Total cost across this run (exact)`:`Total cost — lower bound; some model calls are not in the price table`,accent:!0},t.summary.totalTokens>0&&{icon:vm,label:`Tokens`,value:`${ZM(t.summary.inputTokens)}→${ZM(t.summary.outputTokens)}`,title:`${t.summary.inputTokens.toLocaleString()} in → ${t.summary.outputTokens.toLocaleString()} out`},t.summary.reasoningTokens>0&&{icon:up,label:`Reasoning`,value:ZM(t.summary.reasoningTokens),title:`${t.summary.reasoningTokens.toLocaleString()} reasoning tokens`},t.summary.modelCalls>0&&{icon:Rp,label:`Model calls`,value:String(t.summary.modelCalls),title:`${t.summary.modelCalls} LLM request(s)`},t.summary.toolCalls>0&&{icon:Qh,label:`Tools`,value:String(t.summary.toolCalls),title:`${t.summary.toolCalls} tool execution(s)`},t.summary.agentInvocations>1&&{icon:op,label:`Agents`,value:String(t.summary.agentInvocations),title:`${t.summary.agentInvocations} agent invocation(s)`},t.summary.durationMs>0&&{icon:Ap,label:`Duration`,value:nd(t.summary.durationMs),title:`Wall-clock span of the run`},t.summary.errors>0&&{icon:Hh,label:`Errors`,value:String(t.summary.errors),title:`${t.summary.errors} errored span(s)`,danger:!0}].filter(Boolean));var r=la(),i=I(r),a=e=>{var r=eN(),i=F(r);G(i,17,()=>z(n),e=>e.label,(e,t)=>{let n=M(()=>z(t).icon);var r=QM(),i=F(r);{let e=M(()=>$(`shrink-0`,z(t).danger?`text-danger`:z(t).accent?`text-accent`:`text-fg-subtle`));Ra(i,()=>z(n),(t,n)=>{n(t,{size:12,get class(){return z(e)}})})}var a=L(i,2),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(r),R(e=>{q(r,1,e),J(r,`title`,z(t).title),U(o,z(t).label),U(c,z(t).value)},[()=>K($(`flex items-center gap-1.5 px-2 py-1 rounded border bg-surface`,z(t).danger?`border-danger/30 text-danger`:z(t).accent?`border-accent/30 text-fg`:`border-line text-fg`))]),H(e,r)});var a=L(i,2),o=e=>{var n=$M(),r=F(n);D(n),R((e,i)=>{J(n,`title`,e),U(r,`${i??``}${t.summary.models.length>2?` +${t.summary.models.length-2}`:``}`)},[()=>`Models: ${t.summary.models.join(`, `)}`,()=>t.summary.models.slice(0,2).join(` · `)]),H(e,n)};W(a,e=>{t.summary.models.length>0&&e(o)}),D(r),H(e,r)};W(i,e=>{z(n).length>0&&e(a)}),H(e,r),at()}var nN=V(`<div class="border-b border-line bg-surface shadow-sm" role="region" aria-label="Guided tour"><div class="h-0.5 bg-line"><div class="h-full bg-accent transition-all duration-300"></div></div> <div class="flex items-start gap-3 px-3 py-2.5"><div class="flex items-center gap-2 shrink-0 pt-0.5"><span></span> <span><!> </span></div> <div class="min-w-0 flex-1"><div class="text-sm font-semibold text-fg leading-tight"> </div> <p class="mt-0.5 text-xs text-fg-muted leading-relaxed"> </p></div> <div class="flex items-center gap-1 shrink-0"><span class="text-[11px] text-fg-subtle tabular-nums mr-1"> </span> <button type="button" class="p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover disabled:opacity-30 disabled:hover:bg-transparent transition-colors" aria-label="Previous step" title="Previous (←)"><!></button> <button type="button"><!></button> <button type="button" class="p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover disabled:opacity-30 disabled:hover:bg-transparent transition-colors" aria-label="Next step" title="Next (→ or Space)"><!></button> <button type="button" class="p-1 ml-1 rounded text-fg-subtle hover:text-fg hover:bg-hover transition-colors" aria-label="Exit tour" title="Exit (Esc)"><!></button></div></div></div>`);function rN(e,t){it(t,!0);let n=Z(t,`index`,15),r=N(!1),i=M(()=>t.steps[n()]),a=M(()=>n()<=0),o=M(()=>n()>=t.steps.length-1),s=M(()=>t.steps.length>1?(n()+1)/t.steps.length*100:100);function c(){z(o)||n(n()+1)}function l(){z(a)||n(n()-1)}function u(){P(r,!z(r))}Lr(()=>{if(!z(r))return;if(z(o)){P(r,!1);return}let e=setTimeout(()=>{n(n()+1)},2600);return()=>clearTimeout(e)});function d(e){e.key===`ArrowRight`||e.key===` `?(e.preventDefault(),c()):e.key===`ArrowLeft`?(e.preventDefault(),l()):e.key===`Escape`&&t.onClose()}let f={Agent:{icon:op,dot:`bg-violet-500`,chip:`text-violet-600 bg-violet-500/10`},Handoff:{icon:ep,dot:`bg-violet-500`,chip:`text-violet-600 bg-violet-500/10`},Tool:{icon:Qh,dot:`bg-amber-500`,chip:`text-amber-600 bg-amber-500/10`}};function p(e){return e.startsWith(`Model`)?{icon:Rp,dot:`bg-emerald-500`,chip:`text-emerald-600 bg-emerald-500/10`}:f[e]??{icon:Rp,dot:`bg-accent`,chip:`text-fg-muted bg-hover`}}var m=la();$i(`keydown`,br,d);var h=I(m),g=e=>{let d=M(()=>p(z(i).role)),f=M(()=>z(d).icon);var m=nN(),h=F(m),g=F(h);D(h);var _=L(h,2),v=F(_),y=F(v),b=L(y,2),x=F(b);Ra(x,()=>z(f),(e,t)=>{t(e,{size:11})});var S=L(x);D(b),D(v);var C=L(v,2),w=F(C),T=F(w,!0);D(w);var ee=L(w,2),te=F(ee,!0);D(ee),D(C);var ne=L(C,2),re=F(ne),ie=F(re);D(re);var ae=L(re,2);Sp(F(ae),{size:15}),D(ae);var oe=L(ae,2),se=F(oe),ce=e=>{Qm(e,{size:15})},le=e=>{nh(e,{size:15})};W(se,e=>{z(r)?e(ce):e(le,-1)}),D(oe);var E=L(oe,2);wp(F(E),{size:15}),D(E);var ue=L(E,2);eg(F(ue),{size:15}),D(ue),D(ne),D(_),D(m),R((e,c,l)=>{oo(g,`width: ${z(s)??``}%`),q(y,1,e),q(b,1,c),U(S,` ${z(i).role??``}`),U(T,z(i).title),U(te,z(i).explain),U(ie,`${n()+1} / ${t.steps.length??``}`),ae.disabled=z(a),q(oe,1,l),J(oe,`aria-label`,z(r)?`Pause auto-play`:`Play tour`),J(oe,`title`,z(r)?`Pause`:`Auto-play`),E.disabled=z(o)},[()=>K($(`w-2 h-2 rounded-full`,z(d).dot)),()=>K($(`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium uppercase tracking-wide`,z(d).chip)),()=>K($(`p-1 rounded transition-colors`,z(r)?`text-accent bg-accent/10`:`text-fg-subtle hover:text-fg hover:bg-hover`))]),B(`click`,ae,l),B(`click`,oe,u),B(`click`,E,c),B(`click`,ue,function(...e){t.onClose?.apply(this,e)}),H(e,m)};W(h,e=>{z(i)&&e(g)}),H(e,m),at()}ea([`click`]);function iN(e){if(!e)return!1;let t=e.toLowerCase();return t===`tool_call`||t===`tool_calls`||t===`tool_use`||t===`function_call`}function aN(e){return e.toolCalls.length>0||e.messages.some(e=>e.role===`assistant`&&(e.toolCalls?.length??0)>0)||e.finishReasons?.some(iN)?!0:e.messages.some(e=>iN(e.finishReason))}function oN(e){let t=e.responseModel??e.requestModel;return t&&t!==`unknown`?t:e.provider===`unknown`?`model`:e.provider}function sN(e){let t=e.operation;if(t===`invoke_agent`||t===`create_agent`)return{role:`Agent`,title:`Agent: ${e.agent?.name??`agent`}`,explain:`An agent orchestrates the work — it reads the goal, calls the model, runs tools, and decides what to do next.`};if(t===`execute_handoff`||e.handoff){let t=e.handoff?.fromAgent??`?`,n=e.handoff?.toAgent??`?`;return{role:`Handoff`,title:`Handoff: ${t} → ${n}`,explain:`Control passes from "${t}" to "${n}" — a specialised agent takes over for the next part of the task.`}}if(t===`execute_tool`)return{role:`Tool`,title:`Tool: ${e.tool?.name??e.agent?.name??e.name??`tool`}`,explain:`A tool is real code the agent ran — the model chose the input, the function returned the output.`};if(t===`embeddings`)return{role:`Embeddings`,title:`Embeddings: ${oN(e)}`,explain:`The text is turned into vectors so the agent can search or compare meaning, not just keywords.`};if(t===`speech`||t===`transcription`)return{role:t===`speech`?`Speech`:`Transcription`,title:`${t===`speech`?`Text → speech`:`Audio → text`}: ${oN(e)}`,explain:t===`speech`?`The model converts text into spoken audio.`:`The model converts spoken audio into text the agent can read.`};if(jj.has(t)){if(aN(e)){let t=Aj(e.toolCalls.map(e=>e.name).filter(Boolean));return{role:`Model · planning`,title:t.label?`Model calls ${t.label}`:`Model decides what to do`,explain:`The model reads the request, reasons about it, and decides which tools to call — it requests them, it does not run them yet.`}}return{role:`Model · responding`,title:`Model writes the answer`,explain:`The model takes everything gathered so far and synthesises it into the answer. This step often carries the most input, so it can be the most expensive.`}}return{role:t,title:e.name||t,explain:`A step in the agent run.`}}function cN(e){return[...e].sort((e,t)=>e.startMs-t.startMs||e.endMs-t.endMs).map(e=>({span:e,...sN(e)}))}function lN(e,t){return t?Ij(e).find(e=>e.rows.some(e=>e.normalized.spanId===t))?.rows??[]:[]}function uN(e){return wj(e.inputTokens,e.outputTokens)}function dN(e){return Tj(e?.total,e?.source===`table`)}function fN(e,t){let n=e.normalized;return F_(t.toLowerCase(),[n.responseModel??n.requestModel,n.requestModel,n.provider,String(n.operation),n.name,n.agent?.name,e.service])}var pN=V(`<span class="ml-1 text-[10px] text-fg-subtle">(by trace)</span>`),mN=V(`<div class="flex items-center gap-1 px-3 py-1.5 border-b border-line bg-subtle/50"><button type="button"><!> List</button> <button type="button"><!> Timeline <!></button> <button type="button" title="Decompose the selected run into reasoning, tools, text and nested agents"><!> Trace</button> <button type="button" title="Step through this run with plain-language narration"><!> Explain run</button></div>`),hN=V(`<li class="px-3 py-6 text-xs text-fg-subtle text-center">No matches</li>`),gN=V(`<div class="mt-0.5 text-[10px] text-fg-subtle truncate"> </div>`),_N=V(`<li role="option"><button type="button"><div class="flex items-center gap-1.5 text-xs font-mono"><!> <span class="text-fg truncate"> </span></div> <div class="mt-0.5 flex items-center gap-2 text-[11px] text-fg-subtle"><span> </span> <span>·</span> <span> </span> <span>·</span> <span> </span> <span class="ml-auto"> </span></div> <!></button></li>`),vN=V(`<div class="px-3 py-2 border-b border-line bg-subtle/50"><div class="mb-1.5 flex items-center justify-between gap-2 text-[11px] font-medium text-fg-muted"><span> </span> <span> </span></div> <!></div> <ul class="divide-y divide-line overflow-y-auto flex-1 focus:outline-none" tabindex="0" role="listbox" aria-label="GenAI spans"><!> <!></ul>`,1),yN=V(`<div class="p-6 text-sm text-fg-subtle"><div class="flex items-center gap-2 mb-2 text-fg-muted font-medium"><!> No GenAI spans yet</div> <p>Spans appear here as soon as your app emits OpenTelemetry GenAI semconv
|
|
19
|
+
`)}let i={system:{wrap:`bg-subtle border-line`,chip:`bg-hover text-fg-muted`,label:`system`,icon:Dh},user:{wrap:`bg-blue-500/10 border-blue-500/30`,chip:`bg-blue-500/15 text-blue-600`,label:`user`,icon:Yh},assistant:{wrap:`bg-emerald-500/10 border-emerald-500/30`,chip:`bg-emerald-500/15 text-emerald-600`,label:`assistant`,icon:lp},tool:{wrap:`bg-amber-500/10 border-amber-500/30`,chip:`bg-amber-500/15 text-amber-600`,label:`tool`,icon:tg}};var a=la(),o=I(a),s=e=>{var n=la(),r=I(n),i=e=>{lM(e,()=>t.span)},a=e=>{uM(e,()=>t.span)},o=e=>{H(e,TM())};W(r,e=>{t.span.operation===`execute_handoff`||t.span.handoff?e(i):t.span.operation===`invoke_agent`||t.span.operation===`create_agent`?e(a,1):e(o,-1)}),H(e,n)},c=e=>{var r=EM();G(r,20,()=>t.span.messages,e=>e,(e,t)=>{n(e,()=>t)}),D(r),H(e,r)};W(o,e=>{t.span.messages.length===0?e(s):e(c,-1)}),H(e,a),at()}var OM=V(`<span class="inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-700 border border-amber-500/20 font-mono" title="Agent security signal"><!> </span>`),kM=V(`<button type="button"><!> <span class="truncate"> </span></button>`),AM=V(`<div class="flex items-center gap-3"><div><!> <span class="truncate"> </span></div> <div class="relative flex-1 h-6 bg-subtle border border-line-subtle rounded"></div></div>`),jM=V(`<div class="border border-line rounded-lg overflow-hidden bg-surface"><header class="px-3 py-2 border-b border-line bg-subtle flex items-center gap-2 text-sm"><!> <span class="font-mono text-xs text-fg-muted truncate"> </span> <span class="text-xs text-fg-subtle ml-auto flex items-center gap-1.5 flex-wrap justify-end"><!> </span></header> <div class="p-3 space-y-1.5"></div></div>`),MM=V(`<div class="p-6 text-sm text-fg-subtle">No conversations to display.</div>`),NM=V(`<div class="p-3 space-y-3 overflow-y-auto h-full"></div>`);function PM(e,t){it(t,!0);let n=(e,n=p)=>{let r=M(()=>s(n()));var i=jM(),a=F(i),l=F(a);lp(l,{size:14,class:`text-violet-600`});var u=L(l,2),d=F(u,!0);D(u);var f=L(u,2),m=F(f);G(m,16,()=>c(n()),e=>e,(e,t)=>{var n=OM(),r=F(n);jh(r,{size:10});var i=L(r);D(n),R(()=>U(i,` ${t??``}`)),H(e,n)});var h=L(m);D(f),D(a);var g=L(a,2);G(g,20,()=>z(r).laneOrder,e=>e,(e,i)=>{let a=M(()=>z(r).laneMap.get(i)),s=M(()=>i.startsWith(`handoff:`));var c=AM(),l=F(c),u=F(l),d=e=>{rp(e,{size:11})},f=e=>{Vp(e,{size:11,class:`text-fg-subtle`})};W(u,e=>{z(s)?e(d):e(f,-1)});var p=L(u,2),m=F(p,!0);D(p),D(l);var h=L(l,2);G(h,21,()=>z(a),e=>e.spanId,(e,a)=>{let c=M(()=>(z(a).startMs-n().startMs)/z(r).durationMs*100),l=M(()=>Math.max(.5,(z(a).endMs-z(a).startMs)/z(r).durationMs*100)),u=M(()=>z(a).status===`error`),d=M(()=>z(a).spanId===t.selectedSpanId),f=M(()=>z(r).wrapperIdsByLane.get(i)?.has(z(a).spanId)??!1);var p=kM(),m=F(p),h=e=>{Gh(e,{size:9})};W(m,e=>{z(u)&&e(h)});var g=L(m,2),_=F(g,!0);D(g),D(p),R((e,t)=>{J(p,`title`,e),q(p,1,t),oo(p,`left: ${z(c)??``}%; width: ${z(l)??``}%; min-width: 8px; z-index: ${z(f)?1:2};`),U(_,z(a).operation)},[()=>`${z(a).operation} · ${ad(z(a).endMs-z(a).startMs)}${z(a).usage.inputTokens==null?``:` · ${z(a).usage.inputTokens}→${z(a).usage.outputTokens??`—`}`}${z(f)?` (wraps children)`:``}`,()=>K($(`absolute top-0.5 bottom-0.5 rounded text-[10px] font-mono px-1 truncate flex items-center gap-1 transition-all`,o(z(f),z(s),z(u)),z(d)&&`ring-2 ring-accent ring-offset-1`))]),B(`click`,p,()=>t.onSelectSpan?.(z(a).spanId)),H(e,p)}),D(h),D(c),R(e=>{q(l,1,e),J(l,`title`,i),U(m,i)},[()=>K($(`w-44 shrink-0 flex items-center gap-1.5 text-xs font-mono truncate`,z(s)?`text-violet-600`:`text-fg-muted`))]),H(e,c)}),D(g),D(i),R((e,t)=>{J(u,`title`,n().conversationId),U(d,e),U(h,` ${n().spans.length??``} span${n().spans.length===1?``:`s`} · ${t??``} · ${n().service??``}`)},[()=>n().conversationId.startsWith(`trace:`)?`trace ${n().conversationId.slice(6,14)}…`:`conversation ${n().conversationId.slice(0,12)}…`,()=>ad(z(r).durationMs)]),H(e,i)};function r(e){let t=new Map;for(let n of e){let e=n.normalized.conversationId??`trace:${n.traceId}`,r=t.get(e);r?(r.spans.push(n.normalized),r.startMs=Math.min(r.startMs,n.normalized.startMs),r.endMs=Math.max(r.endMs,n.normalized.endMs)):t.set(e,{conversationId:e,service:n.service,traceId:n.traceId,spans:[n.normalized],startMs:n.normalized.startMs,endMs:n.normalized.endMs})}return[...t.values()].sort((e,t)=>t.startMs-e.startMs)}function i(e){return e.handoff?`handoff: ${e.handoff.fromAgent??`?`} → ${e.handoff.toAgent??`?`}`:e.agent?.name?e.agent.name:`${e.provider}/${e.responseModel??e.requestModel}`}function a(e){let t=new Set;for(let n=0;n<e.length;n++){let r=e[n];for(let i=0;i<e.length;i++){if(n===i)continue;let a=e[i];if(a.startMs>=r.startMs&&a.endMs<=r.endMs&&a.endMs-a.startMs<r.endMs-r.startMs){t.add(r.spanId);break}}}return t}function o(e,t,n){return e?`bg-transparent border border-dashed border-line text-fg-subtle hover:bg-hover/50`:t?`bg-violet-500/15 hover:bg-violet-500/25 text-violet-600 border border-violet-500/30`:n?`bg-red-500/15 hover:bg-red-500/25 text-red-600 border border-red-500/30`:`bg-emerald-500/15 hover:bg-emerald-500/25 text-emerald-600 border border-emerald-500/30`}function s(e){let t=[],n=new Map;for(let r of e.spans){let e=i(r);n.has(e)||(n.set(e,[]),t.push(e)),n.get(e).push(r)}let r=new Map;for(let[e,t]of n)r.set(e,a(t));return{laneOrder:t,laneMap:n,wrapperIdsByLane:r,durationMs:Math.max(1,e.endMs-e.startMs)}}function c(e){let t=new Set;for(let n of e.spans){let e=n.agentSecurity;e&&(e.consentOutcome&&t.add(`consent:${e.consentOutcome}`),e.policyDecision===`deny`&&t.add(`policy:deny`),e.injectionVerdict&&e.injectionVerdict!==`clean`&&t.add(`injection:${e.injectionVerdict}`),e.guardStopped&&t.add(`guard:stop`),e.securityEvent&&t.add(e.securityEvent),e.planStepIndex!==void 0&&t.add(`plan:#${e.planStepIndex}`))}return[...t]}let l=M(()=>r(t.rows));var u=la(),d=I(u),f=e=>{H(e,MM())},m=e=>{var t=NM();G(t,21,()=>z(l),e=>e.conversationId,(e,t)=>{n(e,()=>z(t))}),D(t),H(e,t)};W(d,e=>{z(l).length===0?e(f):e(m,-1)}),H(e,u),at()}ea([`click`]);function FM(e,t=80){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function IM(e,t=60){if(e==null)return``;if(typeof e==`string`)return FM(e,t);try{return FM(JSON.stringify(e),t)}catch{return FM(String(e),t)}}function LM(e){let t=e.responseModel??e.requestModel;return t&&t!==`unknown`?e.provider&&e.provider!==`unknown`?`${e.provider}/${t}`:t:e.agent?.name??e.provider??`model`}function RM(e){let{inputTokens:t,outputTokens:n}=e.usage;if(t!=null||n!=null)return{input:t,output:n}}function zM(e){for(let t=e.messages.length-1;t>=0;t--){let n=e.messages[t];if(n.role!==`assistant`)continue;let r=n.parts.filter(e=>e.kind===`text`).map(e=>e.text).join(` `).trim();if(r)return r}}function BM(e){let t=e.extras?.raw??{},n=t.tool_response??t.tool_result;return n==null?``:IM(n)}function VM(e){if(e.length===0)return[];let t=new Map(e.map(e=>[e.spanId,e])),n=new Map,r=[];for(let i of e){let e=i.parentSpanId;if(e&&t.has(e)){let t=n.get(e)??[];t.push(i),n.set(e,t)}else r.push(i)}let i=new Set;for(let t of e)t.operation===`execute_tool`&&t.tool?.callId&&i.add(t.tool.callId);let a=new Set,o=(e,t)=>e.startMs-t.startMs||e.endMs-t.endMs,s=0,c=()=>`trace-${s++}`;function l(e,t){return(n.get(e.spanId)??[]).sort(o).map(e=>u(e,t))}function u(e,t){let n=e.operation,r=e.endMs-e.startMs,o={startMs:e.startMs,durationMs:r,spanId:e.spanId};if(n===`execute_handoff`||e.handoff){let n=e.handoff?.fromAgent??`?`,r=e.handoff?.toAgent??`?`;return{id:c(),kind:`handoff`,label:`${n} → ${r}`,depth:t,...o,children:l(e,t+1)}}if(Fj.has(n))return{id:c(),kind:`agent`,label:`Agent: ${e.agent?.name??`agent`}`,depth:t,...o,tokens:RM(e),children:l(e,t+1)};if(n===`execute_tool`){let n=e.tool?.name??e.agent?.name??e.name??`tool`,r=BM(e);return{id:c(),kind:`tool`,label:`Tool: ${n}`,sublabel:r?`→ ${r}`:void 0,depth:t,...o,children:l(e,t+1)}}if(Pj.has(n)){let n=l(e,t+1);if(n.length>0)return{id:c(),kind:`group`,label:LM(e),depth:t,...o,tokens:RM(e),children:n};let r=[],s=e.usage.reasoningOutputTokens??0;s>0&&r.push({id:c(),kind:`reasoning`,label:`Reasoning`,sublabel:`${s} tokens`,depth:t+1,children:[]});for(let n of e.toolCalls){if(n.id&&i.has(n.id)||n.id&&a.has(n.id))continue;n.id&&a.add(n.id);let e=IM(n.arguments,40),o=n.result===void 0?``:` → ${IM(n.result,40)}`;r.push({id:c(),kind:`tool`,label:`Tool: ${n.name}`,sublabel:`${e}${o}`.trim()||void 0,depth:t+1,children:[]})}let u=zM(e);return u&&r.push({id:c(),kind:`text`,label:`Text`,sublabel:FM(u),depth:t+1,children:[]}),{id:c(),kind:`step`,label:LM(e),sublabel:e.operation,depth:t,...o,tokens:RM(e),children:r}}return{id:c(),kind:`step`,label:e.name||n,depth:t,...o,children:l(e,t+1)}}return r.sort(o).map(e=>u(e,0))}function HM(e){let t=[],n=e=>{t.push(e);for(let t of e.children)n(t)};for(let t of e)n(t);return t}var UM={agent:{icon:lp,dot:`bg-violet-500`,text:`text-violet-600`},group:{icon:Tm,dot:`bg-blue-500`,text:`text-blue-600`},step:{icon:Vp,dot:`bg-blue-500`,text:`text-fg`},reasoning:{icon:pp,dot:`bg-amber-500`,text:`text-amber-600`},tool:{icon:tg,dot:`bg-purple-500`,text:`text-purple-600`},text:{icon:Lm,dot:`bg-emerald-500`,text:`text-emerald-600`},handoff:{icon:rp,dot:`bg-violet-500`,text:`text-violet-600`}};function WM(e){if(!e)return``;let{input:t,output:n}=e;return t==null&&n==null?``:`${t??`—`}→${n??`—`}`}var GM=V(`<div class="p-6 text-sm text-fg-subtle">No trace to display.</div>`),KM=V(`<span class="text-line-subtle select-none">·</span>`),qM=V(`<span class="min-w-0 flex-1 truncate text-fg-subtle font-sans"> </span>`),JM=V(`<span class="flex-1"></span>`),YM=V(`<span title="tokens in → out"> </span>`),XM=V(`<span class="text-fg-muted"> </span>`),ZM=V(`<button type="button"><span class="relative flex items-center gap-1.5 shrink-0"><!> <span></span> <!></span> <span> </span> <!> <span class="shrink-0 flex items-center gap-2 text-fg-subtle tabular-nums"><!> <!></span></button>`),QM=V(`<div class="py-1 overflow-y-auto h-full font-mono text-xs"></div>`);function $M(e,t){it(t,!0);let n=Z(t,`selectedSpanId`,3,null),r=M(()=>HM(t.nodes));var i=la(),a=I(i),o=e=>{H(e,GM())},s=e=>{var i=QM();G(i,21,()=>z(r),e=>e.id,(e,r)=>{let i=M(()=>UM[z(r).kind]),a=M(()=>z(i).icon),o=M(()=>z(r).spanId!=null),s=M(()=>z(r).spanId!=null&&z(r).spanId===n());var c=ZM(),l=F(c),u=F(l),d=e=>{H(e,KM())};W(u,e=>{z(r).depth>0&&e(d)});var f=L(u,2),p=L(f,2);{let e=M(()=>$(`shrink-0`,z(i).text));Ra(p,()=>z(a),(t,n)=>{n(t,{size:12,get class(){return z(e)}})})}D(l);var m=L(l,2),h=F(m,!0);D(m);var g=L(m,2),_=e=>{var t=qM(),n=F(t,!0);D(t),R(()=>U(n,z(r).sublabel)),H(e,t)},v=e=>{H(e,JM())};W(g,e=>{z(r).sublabel?e(_):e(v,-1)});var y=L(g,2),b=F(y),x=e=>{var t=YM(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>WM(z(r).tokens)]),H(e,t)},S=M(()=>WM(z(r).tokens));W(b,e=>{z(S)&&e(x)});var C=L(b,2),w=e=>{var t=XM(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>ad(z(r).durationMs)]),H(e,t)};W(C,e=>{z(r).durationMs!=null&&z(r).durationMs>0&&e(w)}),D(y),D(c),R((e,t,n)=>{c.disabled=!z(o),q(c,1,e),oo(c,`padding-left: ${z(r).depth*18+8}px`),q(f,1,t),q(m,1,n),U(h,z(r).label)},[()=>K($(`group flex w-full items-center gap-2 py-1 pr-3 text-left transition-colors`,z(o)?`hover:bg-subtle cursor-pointer`:`cursor-default`,z(s)&&`bg-accent/10`)),()=>K($(`w-1.5 h-1.5 rounded-full shrink-0`,z(i).dot)),()=>K($(`shrink-0 font-medium`,z(i).text))]),B(`click`,c,()=>z(r).spanId&&t.onSelectSpan?.(z(r).spanId)),H(e,c)}),D(i),H(e,i)};W(a,e=>{z(r).length===0?e(o):e(s,-1)}),H(e,i),at()}ea([`click`]);function eN(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(0)}k`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}var tN=V(`<div><!> <span class="text-[10px] uppercase tracking-wide text-fg-subtle"> </span> <span class="text-xs font-mono font-semibold tabular-nums"> </span></div>`),nN=V(`<div class="flex items-center gap-1.5 px-2 py-1 text-[11px] text-fg-subtle font-mono truncate max-w-full"> </div>`),rN=V(`<div class="flex flex-wrap items-stretch gap-1.5 px-3 py-2 border-b border-line bg-subtle/40" role="group" aria-label="Run summary"><!> <!></div>`);function iN(e,t){it(t,!0);let n=M(()=>[t.summary.costKnown&&{icon:Gp,label:`Cost`,value:Oj(t.summary.totalCostUsd)+(t.summary.costComplete?``:`+`),title:t.summary.costComplete?`Total cost across this run (exact)`:`Total cost — lower bound; some model calls are not in the price table`,accent:!0},t.summary.totalTokens>0&&{icon:xm,label:`Tokens`,value:`${eN(t.summary.inputTokens)}→${eN(t.summary.outputTokens)}`,title:`${t.summary.inputTokens.toLocaleString()} in → ${t.summary.outputTokens.toLocaleString()} out`},t.summary.reasoningTokens>0&&{icon:pp,label:`Reasoning`,value:eN(t.summary.reasoningTokens),title:`${t.summary.reasoningTokens.toLocaleString()} reasoning tokens`},t.summary.modelCalls>0&&{icon:Vp,label:`Model calls`,value:String(t.summary.modelCalls),title:`${t.summary.modelCalls} LLM request(s)`},t.summary.toolCalls>0&&{icon:tg,label:`Tools`,value:String(t.summary.toolCalls),title:`${t.summary.toolCalls} tool execution(s)`},t.summary.agentInvocations>1&&{icon:lp,label:`Agents`,value:String(t.summary.agentInvocations),title:`${t.summary.agentInvocations} agent invocation(s)`},t.summary.durationMs>0&&{icon:Np,label:`Duration`,value:ad(t.summary.durationMs),title:`Wall-clock span of the run`},t.summary.errors>0&&{icon:Gh,label:`Errors`,value:String(t.summary.errors),title:`${t.summary.errors} errored span(s)`,danger:!0}].filter(Boolean));var r=la(),i=I(r),a=e=>{var r=rN(),i=F(r);G(i,17,()=>z(n),e=>e.label,(e,t)=>{let n=M(()=>z(t).icon);var r=tN(),i=F(r);{let e=M(()=>$(`shrink-0`,z(t).danger?`text-danger`:z(t).accent?`text-accent`:`text-fg-subtle`));Ra(i,()=>z(n),(t,n)=>{n(t,{size:12,get class(){return z(e)}})})}var a=L(i,2),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(r),R(e=>{q(r,1,e),J(r,`title`,z(t).title),U(o,z(t).label),U(c,z(t).value)},[()=>K($(`flex items-center gap-1.5 px-2 py-1 rounded border bg-surface`,z(t).danger?`border-danger/30 text-danger`:z(t).accent?`border-accent/30 text-fg`:`border-line text-fg`))]),H(e,r)});var a=L(i,2),o=e=>{var n=nN(),r=F(n);D(n),R((e,i)=>{J(n,`title`,e),U(r,`${i??``}${t.summary.models.length>2?` +${t.summary.models.length-2}`:``}`)},[()=>`Models: ${t.summary.models.join(`, `)}`,()=>t.summary.models.slice(0,2).join(` · `)]),H(e,n)};W(a,e=>{t.summary.models.length>0&&e(o)}),D(r),H(e,r)};W(i,e=>{z(n).length>0&&e(a)}),H(e,r),at()}var aN=V(`<div class="border-b border-line bg-surface shadow-sm" role="region" aria-label="Guided tour"><div class="h-0.5 bg-line"><div class="h-full bg-accent transition-all duration-300"></div></div> <div class="flex items-start gap-3 px-3 py-2.5"><div class="flex items-center gap-2 shrink-0 pt-0.5"><span></span> <span><!> </span></div> <div class="min-w-0 flex-1"><div class="text-sm font-semibold text-fg leading-tight"> </div> <p class="mt-0.5 text-xs text-fg-muted leading-relaxed"> </p></div> <div class="flex items-center gap-1 shrink-0"><span class="text-[11px] text-fg-subtle tabular-nums mr-1"> </span> <button type="button" class="p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover disabled:opacity-30 disabled:hover:bg-transparent transition-colors" aria-label="Previous step" title="Previous (←)"><!></button> <button type="button"><!></button> <button type="button" class="p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover disabled:opacity-30 disabled:hover:bg-transparent transition-colors" aria-label="Next step" title="Next (→ or Space)"><!></button> <button type="button" class="p-1 ml-1 rounded text-fg-subtle hover:text-fg hover:bg-hover transition-colors" aria-label="Exit tour" title="Exit (Esc)"><!></button></div></div></div>`);function oN(e,t){it(t,!0);let n=Z(t,`index`,15),r=N(!1),i=M(()=>t.steps[n()]),a=M(()=>n()<=0),o=M(()=>n()>=t.steps.length-1),s=M(()=>t.steps.length>1?(n()+1)/t.steps.length*100:100);function c(){z(o)||n(n()+1)}function l(){z(a)||n(n()-1)}function u(){P(r,!z(r))}Lr(()=>{if(!z(r))return;if(z(o)){P(r,!1);return}let e=setTimeout(()=>{n(n()+1)},2600);return()=>clearTimeout(e)});function d(e){e.key===`ArrowRight`||e.key===` `?(e.preventDefault(),c()):e.key===`ArrowLeft`?(e.preventDefault(),l()):e.key===`Escape`&&t.onClose()}let f={Agent:{icon:lp,dot:`bg-violet-500`,chip:`text-violet-600 bg-violet-500/10`},Handoff:{icon:rp,dot:`bg-violet-500`,chip:`text-violet-600 bg-violet-500/10`},Tool:{icon:tg,dot:`bg-amber-500`,chip:`text-amber-600 bg-amber-500/10`}};function p(e){return e.startsWith(`Model`)?{icon:Vp,dot:`bg-emerald-500`,chip:`text-emerald-600 bg-emerald-500/10`}:f[e]??{icon:Vp,dot:`bg-accent`,chip:`text-fg-muted bg-hover`}}var m=la();$i(`keydown`,br,d);var h=I(m),g=e=>{let d=M(()=>p(z(i).role)),f=M(()=>z(d).icon);var m=aN(),h=F(m),g=F(h);D(h);var _=L(h,2),v=F(_),y=F(v),b=L(y,2),x=F(b);Ra(x,()=>z(f),(e,t)=>{t(e,{size:11})});var S=L(x);D(b),D(v);var C=L(v,2),w=F(C),T=F(w,!0);D(w);var ee=L(w,2),te=F(ee,!0);D(ee),D(C);var ne=L(C,2),re=F(ne),ie=F(re);D(re);var ae=L(re,2);Tp(F(ae),{size:15}),D(ae);var oe=L(ae,2),se=F(oe),ce=e=>{th(e,{size:15})},le=e=>{ah(e,{size:15})};W(se,e=>{z(r)?e(ce):e(le,-1)}),D(oe);var E=L(oe,2);Dp(F(E),{size:15}),D(E);var ue=L(E,2);rg(F(ue),{size:15}),D(ue),D(ne),D(_),D(m),R((e,c,l)=>{oo(g,`width: ${z(s)??``}%`),q(y,1,e),q(b,1,c),U(S,` ${z(i).role??``}`),U(T,z(i).title),U(te,z(i).explain),U(ie,`${n()+1} / ${t.steps.length??``}`),ae.disabled=z(a),q(oe,1,l),J(oe,`aria-label`,z(r)?`Pause auto-play`:`Play tour`),J(oe,`title`,z(r)?`Pause`:`Auto-play`),E.disabled=z(o)},[()=>K($(`w-2 h-2 rounded-full`,z(d).dot)),()=>K($(`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium uppercase tracking-wide`,z(d).chip)),()=>K($(`p-1 rounded transition-colors`,z(r)?`text-accent bg-accent/10`:`text-fg-subtle hover:text-fg hover:bg-hover`))]),B(`click`,ae,l),B(`click`,oe,u),B(`click`,E,c),B(`click`,ue,function(...e){t.onClose?.apply(this,e)}),H(e,m)};W(h,e=>{z(i)&&e(g)}),H(e,m),at()}ea([`click`]);function sN(e){if(!e)return!1;let t=e.toLowerCase();return t===`tool_call`||t===`tool_calls`||t===`tool_use`||t===`function_call`}function cN(e){return e.toolCalls.length>0||e.messages.some(e=>e.role===`assistant`&&(e.toolCalls?.length??0)>0)||e.finishReasons?.some(sN)?!0:e.messages.some(e=>sN(e.finishReason))}function lN(e){let t=e.responseModel??e.requestModel;return t&&t!==`unknown`?t:e.provider===`unknown`?`model`:e.provider}function uN(e){let t=e.operation;if(t===`invoke_agent`||t===`create_agent`)return{role:`Agent`,title:`Agent: ${e.agent?.name??`agent`}`,explain:`An agent orchestrates the work — it reads the goal, calls the model, runs tools, and decides what to do next.`};if(t===`execute_handoff`||e.handoff){let t=e.handoff?.fromAgent??`?`,n=e.handoff?.toAgent??`?`;return{role:`Handoff`,title:`Handoff: ${t} → ${n}`,explain:`Control passes from "${t}" to "${n}" — a specialised agent takes over for the next part of the task.`}}if(t===`execute_tool`)return{role:`Tool`,title:`Tool: ${e.tool?.name??e.agent?.name??e.name??`tool`}`,explain:`A tool is real code the agent ran — the model chose the input, the function returned the output.`};if(t===`embeddings`)return{role:`Embeddings`,title:`Embeddings: ${lN(e)}`,explain:`The text is turned into vectors so the agent can search or compare meaning, not just keywords.`};if(t===`speech`||t===`transcription`)return{role:t===`speech`?`Speech`:`Transcription`,title:`${t===`speech`?`Text → speech`:`Audio → text`}: ${lN(e)}`,explain:t===`speech`?`The model converts text into spoken audio.`:`The model converts spoken audio into text the agent can read.`};if(Pj.has(t)){if(cN(e)){let t=Nj(e.toolCalls.map(e=>e.name).filter(Boolean));return{role:`Model · planning`,title:t.label?`Model calls ${t.label}`:`Model decides what to do`,explain:`The model reads the request, reasons about it, and decides which tools to call — it requests them, it does not run them yet.`}}return{role:`Model · responding`,title:`Model writes the answer`,explain:`The model takes everything gathered so far and synthesises it into the answer. This step often carries the most input, so it can be the most expensive.`}}return{role:t,title:e.name||t,explain:`A step in the agent run.`}}function dN(e){return[...e].sort((e,t)=>e.startMs-t.startMs||e.endMs-t.endMs).map(e=>({span:e,...uN(e)}))}function fN(e,t){return t?zj(e).find(e=>e.rows.some(e=>e.normalized.spanId===t))?.rows??[]:[]}function pN(e){return Dj(e.inputTokens,e.outputTokens)}function mN(e){return Oj(e?.total,e?.source===`table`)}function hN(e,t){let n=e.normalized;return R_(t.toLowerCase(),[n.responseModel??n.requestModel,n.requestModel,n.provider,String(n.operation),n.name,n.agent?.name,e.service])}var gN=V(`<span class="ml-1 text-[10px] text-fg-subtle">(by trace)</span>`),_N=V(`<div class="flex items-center gap-1 px-3 py-1.5 border-b border-line bg-subtle/50"><button type="button"><!> List</button> <button type="button"><!> Timeline <!></button> <button type="button" title="Decompose the selected run into reasoning, tools, text and nested agents"><!> Trace</button> <button type="button" title="Step through this run with plain-language narration"><!> Explain run</button></div>`),vN=V(`<li class="px-3 py-6 text-xs text-fg-subtle text-center">No matches</li>`),yN=V(`<div class="mt-0.5 text-[10px] text-fg-subtle truncate"> </div>`),bN=V(`<li role="option"><button type="button"><div class="flex items-center gap-1.5 text-xs font-mono"><!> <span class="text-fg truncate"> </span></div> <div class="mt-0.5 flex items-center gap-2 text-[11px] text-fg-subtle"><span> </span> <span>·</span> <span> </span> <span>·</span> <span> </span> <span class="ml-auto"> </span></div> <!></button></li>`),xN=V(`<div class="px-3 py-2 border-b border-line bg-subtle/50"><div class="mb-1.5 flex items-center justify-between gap-2 text-[11px] font-medium text-fg-muted"><span> </span> <span> </span></div> <!></div> <ul class="divide-y divide-line overflow-y-auto flex-1 focus:outline-none" tabindex="0" role="listbox" aria-label="GenAI spans"><!> <!></ul>`,1),SN=V(`<div class="p-6 text-sm text-fg-subtle"><div class="flex items-center gap-2 mb-2 text-fg-muted font-medium"><!> No GenAI spans yet</div> <p>Spans appear here as soon as your app emits OpenTelemetry GenAI semconv
|
|
20
20
|
attributes (any of <code class="text-xs">gen_ai.system</code>, <code class="text-xs">gen_ai.provider.name</code>, or <code class="text-xs">gen_ai.operation.name</code>). Works with Vercel AI
|
|
21
21
|
SDK <code class="text-xs">experimental_telemetry</code>, Pydantic AI +
|
|
22
22
|
Logfire, OpenAI Agents v2, Anthropic, Google GenAI, LangChain, OpenLLMetry
|
|
23
|
-
— anything following the spec.</p></div>`),
|
|
24
|
-
to arrive.</div>`),SN=V(`<div class="flex flex-col h-full"><!> <!> <div class="flex-1 overflow-hidden"><!></div></div>`),CN=V(`<div class="flex items-center justify-between px-3 pt-2"><button type="button" class="@md:hidden inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors"><!> Back</button> <button type="button" class="ml-auto inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors" title="Open this span in the Traces waterfall"><!> Open in Traces</button></div> <!> <!> <!>`,1),wN=V(`<div class="flex flex-col h-full"><!> <!> <div class="@container flex flex-1 overflow-hidden"><div><!></div> <div><!></div></div></div>`);function TN(e,t){it(t,!0);let n=e=>{var t=mN(),n=F(t);Am(F(n),{size:12}),Ke(),D(n);var r=L(n,2),i=F(r);Wm(i,{size:12});var a=L(i,2),s=e=>{H(e,pN())};W(a,e=>{z(p)||e(s)}),D(r);var c=L(r,2);Om(F(c),{size:12}),Ke(),D(c);var l=L(c,2);Ah(F(l),{size:12}),Ke(),D(l),D(t),R((e,t,i,a)=>{q(n,1,e),r.disabled=!z(p)&&!1,q(r,1,t),q(c,1,i),l.disabled=z(g).length===0||z(y),q(l,1,a)},[()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`list`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`timeline`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`trace`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`ml-auto inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,`text-accent hover:bg-accent/10 disabled:opacity-40 disabled:hover:bg-transparent`))]),B(`click`,n,()=>P(o,`list`)),B(`click`,r,()=>P(o,`timeline`)),B(`click`,c,()=>P(o,`trace`)),B(`click`,l,S),H(e,t)},r=e=>{var t=vN(),n=I(t),r=F(n),o=F(r),p=F(o);D(o);var h=L(o,2),g=F(h);D(h),D(r),P_(L(r,2),{get value(){return z(s)},onValue:e=>Il.value=e,class:``,inputClass:`border-line bg-subtle text-fg focus:border-line focus:ring-1 focus:ring-accent`,placeholder:`Filter by model, operation, agent…`,ariaLabel:`Filter GenAI spans`}),D(n);var _=L(n,2),v=F(_),S=e=>{H(e,hN())};W(v,e=>{z(c).length===0&&e(S)}),G(L(v,2),19,()=>z(c),e=>e.normalized.spanId,(e,t,n)=>{let r=M(()=>z(t).normalized.spanId===z(f)?.normalized.spanId),i=M(()=>z(t).normalized.status===`error`),o=M(()=>z(t).normalized.responseModel??z(t).normalized.requestModel),s=M(()=>z(t).normalized.agent?.name&&(z(t).normalized.provider===`unknown`||z(o)===`unknown`));var c=_N(),d=F(c),p=F(d),m=F(p),h=e=>{{let t=M(()=>z(i)?`text-danger`:`text-accent`);op(e,{size:11,get class(){return z(t)}})}},g=e=>{{let t=M(()=>z(i)?`text-danger`:`text-fg-subtle`);Rp(e,{size:11,get class(){return z(t)}})}};W(m,e=>{z(s)?e(h):e(g,-1)});var _=L(m,2),v=F(_,!0);D(_),D(p);var S=L(p,2),C=F(S),w=F(C,!0);D(C);var T=L(C,4),ee=F(T,!0);D(T);var te=L(T,4),ne=F(te,!0);D(te);var re=L(te,2),ie=F(re,!0);D(re),D(S);var ae=L(S,2),oe=e=>{var n=gN(),r=F(n,!0);D(n),R(()=>U(r,z(t).service)),H(e,n)};W(ae,e=>{z(t).service&&e(oe)}),D(d),Vo(d,(e,t)=>l[t]=e,e=>l?.[e],()=>[z(n)]),D(c),R((e,i,a,l)=>{J(c,`aria-selected`,z(r)),J(d,`data-row-index`,z(n)),q(d,1,e),U(v,z(s)?`agent: ${z(t).normalized.agent.name}`:`${z(t).normalized.provider}/${z(o)}`),U(w,z(t).normalized.operation),U(ee,i),U(ne,a),U(ie,l)},[()=>K($(`w-full text-left px-3 py-2 hover:bg-subtle transition-colors`,z(r)&&`bg-hover hover:bg-hover`,z(n)===u.cursor&&`ring-1 ring-inset ring-accent bg-accent/10`)),()=>nd(z(t).normalized.endMs-z(t).normalized.startMs),()=>uN(z(t).normalized.usage),()=>dN(z(t).normalized.cost)]),B(`click`,d,()=>{if(u.cursor=z(n),P(a,z(t).normalized.spanId,!0),z(y)){let e=z(x).findIndex(e=>e.span.spanId===z(t).normalized.spanId);e>=0&&P(b,e,!0)}}),H(e,c)}),D(_),R(()=>{U(p,`Spans (${(z(d)?`${z(c).length} of ${z(i).length}`:z(i).length)??``})`),U(g,`${z(m)??``} run${z(m)===1?``:`s`}`)}),B(`keydown`,_,function(...e){u.onKeyDown?.apply(this,e)}),H(e,t)},i=M(()=>Ql.value),a=N(null),o=N(`list`),s=M(()=>Il.value),c=M(()=>z(i).filter(e=>fN(e,z(s)))),l=_r([]),u=NA({count:()=>z(c).length,fromUnsetUp:`last`,onActivate:e=>{P(a,z(c)[e].normalized.spanId,!0)},scrollToIndex:e=>l[e]?.scrollIntoView({block:`nearest`})}),d=M(()=>z(s).length>0),f=M(()=>z(c).find(e=>e.normalized.spanId===z(a))??z(c)[0]??z(i).find(e=>e.normalized.spanId===z(a))??z(i)[0]),p=M(()=>z(i).some(e=>e.normalized.conversationId)),m=M(()=>Ij(z(i)).length),h=M(()=>z(a)!==null),g=M(()=>lN(z(i),z(f)?.normalized.spanId??z(a)??void 0)),_=M(()=>Fj(z(g).map(e=>e.normalized))),v=M(()=>RM(z(g).map(e=>e.normalized))),y=N(!1),b=N(0),x=M(()=>z(y)?cN(z(g).map(e=>e.normalized)):[]);function S(){z(g).length!==0&&(P(o,`list`),z(a)===null&&P(a,z(g)[0].normalized.spanId,!0),P(b,0),P(y,!0))}function C(){P(y,!1)}Lr(()=>{if(!z(y))return;let e=z(x)[z(b)]?.span.spanId;e&&e!==z(a)&&P(a,e,!0)});var w=la(),T=I(w),ee=e=>{var t=yN(),n=F(t);Pm(F(n),{size:16}),Ke(),D(n),Ke(2),D(t),H(e,t)},te=e=>{var t=bN(),r=F(t);n(r);var s=L(r,2),c=F(s);{let e=M(()=>z(f)?.normalized.spanId??null);jM(c,{get rows(){return z(i)},get selectedSpanId(){return z(e)},onSelectSpan:e=>{P(a,e,!0),P(o,`list`)}})}D(s),D(t),H(e,t)},ne=e=>{var t=SN(),r=F(t);n(r);var i=L(r,2),s=e=>{tN(e,{get summary(){return z(_)}})};W(i,e=>{z(_).spanCount>0&&e(s)});var c=L(i,2),l=F(c),u=e=>{H(e,xN())},d=e=>{{let t=M(()=>z(f)?.normalized.spanId??null);XM(e,{get nodes(){return z(v)},get selectedSpanId(){return z(t)},onSelectSpan:e=>{P(a,e,!0),P(o,`list`)}})}};W(l,e=>{z(g).length===0?e(u):e(d,-1)}),D(c),D(t),H(e,t)},re=e=>{var t=wN(),i=F(t);n(i);var o=L(i,2),s=e=>{rN(e,{get steps(){return z(x)},onClose:C,get index(){return z(b)},set index(e){P(b,e,!0)}})};W(o,e=>{z(y)&&z(x).length>0&&e(s)});var c=L(o,2),l=F(c),u=F(l);r(u),D(l);var d=L(l,2),p=F(d),m=e=>{var t=CN(),n=I(t),r=F(n);Qf(F(r),{size:11}),Ke(),D(r);var i=L(r,2);Kp(F(i),{size:11}),Ke(),D(i),D(n);var o=L(n,2),s=e=>{tN(e,{get summary(){return z(_)}})};W(o,e=>{z(_).spanCount>0&&e(s)});var c=L(o,2);qj(c,{get span(){return z(f).normalized},onOpenTrace:()=>ju(z(f).traceId,z(f).normalized.spanId)}),wM(L(c,2),{get span(){return z(f).normalized}}),B(`click`,r,()=>P(a,null)),B(`click`,i,()=>ju(z(f).traceId,z(f).normalized.spanId)),H(e,t)};W(p,e=>{z(f)&&e(m)}),D(d),D(c),D(t),R((e,t)=>{q(l,1,e),q(d,1,t)},[()=>K($(`flex flex-col w-full border-line @md:w-72 @md:shrink-0 @md:border-r`,z(h)&&`hidden @md:flex`)),()=>K($(`flex-1 overflow-y-auto w-full`,!z(h)&&`hidden @md:block`))]),H(e,t)};W(T,e=>{z(i).length===0?e(ee):z(o)===`timeline`?e(te,1):z(o)===`trace`?e(ne,2):e(re,-1)}),H(e,w),at()}ea([`click`,`keydown`]);var EN=`__start__`,DN=`__end__`;function ON(e){return e[`ai.toolCall.name`]!=null||e[`operation.name`]===`ai.toolCall`||e[`ai.operationId`]===`ai.toolCall`||e[`gen_ai.operation.name`]===`execute_tool`||e[`gen_ai.tool.name`]!=null}function kN(e){return e[`gen_ai.system`]!=null||e[`gen_ai.provider.name`]!=null||e[`ai.model.provider`]!=null||e[`gen_ai.request.model`]!=null||e[`ai.model.id`]!=null}function AN(e){return e[`db.system.name`]!=null||e[`db.system`]!=null||e[`db.statement`]!=null||e[`db.query.text`]!=null}function jN(e,t){return e.kind===`CLIENT`&&(t[`http.method`]!=null||t[`http.request.method`]!=null||t[`url.full`]!=null||t[`http.url`]!=null)}function MN(e){let t=e.lastIndexOf(`:`);return t>0&&e.slice(t+1).startsWith(`ai.`)?e.slice(t+1):e}function NN(e){let t=e.attributes??{};return ON(t)?{role:`tool`,label:Q(t[`ai.toolCall.name`])??Q(t[`gen_ai.tool.name`])??MN(e.name)}:kN(t)?{role:`llm`,label:MN(e.name)}:AN(t)?{role:`db`,label:Q(t[`db.operation.name`])??Q(t[`db.operation`])??Q(t[`db.system.name`])??Q(t[`db.system`])??MN(e.name)}:jN(e,t)?{role:`http`,label:Q(t[`http.route`])??Q(t[`url.path`])??MN(e.name)}:e.kind===`SERVER`||e.kind===`CONSUMER`?{role:`entry`,label:MN(e.name)}:{role:`function`,label:MN(e.name)}}function PN(e){let t=Q(e);if(t===void 0)return e;let n=t.trim();if(!n||n[0]!==`{`&&n[0]!==`[`)return e;try{return JSON.parse(n)}catch{return e}}function FN(e,t){let n=e.attributes??{},r={};return t===`tool`?(n[`ai.toolCall.args`]!=null&&(r.input=PN(n[`ai.toolCall.args`])),n[`ai.toolCall.result`]!=null&&(r.output=PN(n[`ai.toolCall.result`]))):t===`llm`?(n[`ai.prompt`]==null?n[`gen_ai.prompt`]!=null&&(r.input=PN(n[`gen_ai.prompt`])):r.input=PN(n[`ai.prompt`]),n[`ai.response.text`]==null?n[`gen_ai.completion`]!=null&&(r.output=PN(n[`gen_ai.completion`])):r.output=PN(n[`ai.response.text`])):t===`db`&&(n[`db.statement`]==null?n[`db.query.text`]!=null&&(r.input=n[`db.query.text`]):r.input=n[`db.statement`]),r.input===void 0&&(r.input=PN(n[`autotel.input`]??n[`code.function.input`]??n.input??n[`rpc.request.body`])),r.output===void 0&&(r.output=PN(n[`autotel.output`]??n[`code.function.output`]??n.output??n[`rpc.response.body`])),r}function IN(e,t){if(!t)return;let n=e.metrics??{};t.inputTokens!=null&&(n.inputTokens=(n.inputTokens??0)+t.inputTokens),t.outputTokens!=null&&(n.outputTokens=(n.outputTokens??0)+t.outputTokens),t.costUsd!=null&&(n.costUsd=(n.costUsd??0)+t.costUsd),e.metrics=n}function LN(e,t={}){let n=t.bookends??!0,r=new Map;for(let t of e)r.set(t.spanId,t);let i=new Map,a=new Map,o=[...e].sort((e,t)=>e.startTime-t.startTime);for(let e of o){let{role:n,label:r}=NN(e),o=`${n}|${r}`;i.set(e.spanId,o);let s=a.get(o);if(s||(s={id:o,label:r,role:n,count:0,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}},a.set(o,s)),s.count++,e.status?.code===`ERROR`&&s.errorCount++,s.totalDurationMs+=e.duration,s.spanIds.push(e.spanId),IN(s,t.metricsBySpanId?.get(e.spanId)),s.sample.input===void 0&&s.sample.output===void 0){let t=FN(e,n);(t.input!==void 0||t.output!==void 0)&&(s.sample=t)}}let s=new Map,c=(e,t)=>{if(e===t)return;let n=`${e}>${t}`,r=s.get(n);r?r.count++:s.set(n,{source:e,target:t,count:1})},l=new Set,u=new Set;for(let e of o){let t=i.get(e.spanId),n=e.parentSpanId?r.get(e.parentSpanId):void 0;if(n){let e=i.get(n.spanId);e!==t&&(c(e,t),l.add(e),u.add(t))}}let d=[...a.values()];if(n&&d.length>0){let e={id:EN,label:`__start__`,role:`entry`,count:1,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}},t={id:DN,label:`__end__`,role:`end`,count:1,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}};a.set(EN,e),a.set(DN,t);for(let e of d)u.has(e.id)||c(EN,e.id),l.has(e.id)||c(e.id,DN)}return{nodes:[...a.values()],edges:[...s.values()]}}function RN(e){let t={};for(let n of e){if(!n.metrics)continue;let{inputTokens:e,outputTokens:r,costUsd:i}=n.metrics;e!=null&&(t.inputTokens=(t.inputTokens??0)+e),r!=null&&(t.outputTokens=(t.outputTokens??0)+r),i!=null&&(t.costUsd=(t.costUsd??0)+i)}return t}var zN=7.2,BN=28,VN=96,HN=280,UN=32,WN=24;function GN(e){let t=e.label.length*zN+BN,n=e.count>1?34:0;return Math.max(VN,Math.min(HN,t+n))}function KN(e){let{nodes:t,edges:n}=e;if(t.length===0)return{nodes:[],edges:[],width:0,height:0};let r=t.map(e=>e.id),i=new Map,a=new Map;for(let e of r)i.set(e,[]),a.set(e,[]);for(let e of n)i.get(e.source)?.push(e.target),a.get(e.target)?.push(e.source);let o=new Map,s=r.filter(e=>(a.get(e)?.length??0)===0),c=s.length>0?s:[r[0]],l=[...c];for(let e of c)o.set(e,0);let u=0;for(;l.length&&u++<r.length*r.length+r.length;){let e=l.shift(),t=o.get(e)??0;for(let n of i.get(e)??[])(o.get(n)??-1)<t+1&&(o.set(n,t+1),l.push(n))}for(let e of r)o.has(e)||o.set(e,0);let d=Math.max(...o.values()),f=Array.from({length:d+1},()=>[]);for(let e of r)f[o.get(e)].push(e);for(let e=0;e<2;e++)for(let e=1;e<=d;e++){let t=f[e-1],n=new Map;t.forEach((e,t)=>n.set(e,t)),f[e].sort((e,t)=>{let r=a.get(e)??[],i=a.get(t)??[];return(r.length?r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length:999)-(i.length?i.reduce((e,t)=>e+(n.get(t)??0),0)/i.length:999)})}let p=new Map(t.map(e=>[e.id,e])),m=new Map(t.map(e=>[e.id,GN(e)])),h=f.map(e=>e.reduce((e,t)=>e+(m.get(t)??VN)+UN,0)),g=Math.max(...h,VN),_=[];return f.forEach((e,t)=>{let n=WN+(g-h[t])/2;for(let r of e){let e=p.get(r),i=m.get(r)??VN;_.push({...e,x:n,y:WN+t*122,width:i,layer:t}),n+=i+UN}}),{nodes:_,edges:n,width:g+48,height:48+(d+1)*122}}var qN={entry:{fill:`fill-emerald-500/15`,stroke:`stroke-emerald-500/60`,text:`fill-emerald-600`,dot:`bg-emerald-500`,label:`Entry`},end:{fill:`fill-rose-500/15`,stroke:`stroke-rose-500/60`,text:`fill-rose-600`,dot:`bg-rose-500`,label:`End`},llm:{fill:`fill-blue-500/15`,stroke:`stroke-blue-500/60`,text:`fill-blue-600`,dot:`bg-blue-500`,label:`LLM`},tool:{fill:`fill-violet-500/15`,stroke:`stroke-violet-500/60`,text:`fill-violet-600`,dot:`bg-violet-500`,label:`AI tool`},function:{fill:`fill-amber-500/15`,stroke:`stroke-amber-500/60`,text:`fill-amber-600`,dot:`bg-amber-500`,label:`Function`},db:{fill:`fill-teal-500/15`,stroke:`stroke-teal-500/60`,text:`fill-teal-600`,dot:`bg-teal-500`,label:`Database`},http:{fill:`fill-sky-500/15`,stroke:`stroke-sky-500/60`,text:`fill-sky-600`,dot:`bg-sky-500`,label:`HTTP`}},JN=[`entry`,`llm`,`tool`,`function`,`db`,`http`,`end`],YN=V(`<div class="p-6 text-sm text-fg-subtle"><div class="flex items-center gap-2 mb-2 text-fg-muted font-medium"><!> No flow to show yet</div> <p>The Flow view turns a trace into a call graph — entry points, LLM calls,
|
|
23
|
+
— anything following the spec.</p></div>`),CN=V(`<div class="flex flex-col h-full"><!> <div class="flex-1 overflow-hidden"><!></div></div>`),wN=V(`<div class="p-6 text-sm text-fg-subtle">Select a span (in List) to trace its run, or wait for a multi-span run
|
|
24
|
+
to arrive.</div>`),TN=V(`<div class="flex flex-col h-full"><!> <!> <div class="flex-1 overflow-hidden"><!></div></div>`),EN=V(`<div class="flex items-center justify-between px-3 pt-2"><button type="button" class="@md:hidden inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors"><!> Back</button> <button type="button" class="ml-auto inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors" title="Open this span in the Traces waterfall"><!> Open in Traces</button></div> <!> <!> <!>`,1),DN=V(`<div class="flex flex-col h-full"><!> <!> <div class="@container flex flex-1 overflow-hidden"><div><!></div> <div><!></div></div></div>`);function ON(e,t){it(t,!0);let n=e=>{var t=_N(),n=F(t);Nm(F(n),{size:12}),Ke(),D(n);var r=L(n,2),i=F(r);qm(i,{size:12});var a=L(i,2),s=e=>{H(e,gN())};W(a,e=>{z(p)||e(s)}),D(r);var c=L(r,2);jm(F(c),{size:12}),Ke(),D(c);var l=L(c,2);Nh(F(l),{size:12}),Ke(),D(l),D(t),R((e,t,i,a)=>{q(n,1,e),r.disabled=!z(p)&&!1,q(r,1,t),q(c,1,i),l.disabled=z(g).length===0||z(y),q(l,1,a)},[()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`list`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`timeline`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`trace`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`ml-auto inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,`text-accent hover:bg-accent/10 disabled:opacity-40 disabled:hover:bg-transparent`))]),B(`click`,n,()=>P(o,`list`)),B(`click`,r,()=>P(o,`timeline`)),B(`click`,c,()=>P(o,`trace`)),B(`click`,l,S),H(e,t)},r=e=>{var t=xN(),n=I(t),r=F(n),o=F(r),p=F(o);D(o);var h=L(o,2),g=F(h);D(h),D(r),L_(L(r,2),{get value(){return z(s)},onValue:e=>zl.value=e,class:``,inputClass:`border-line bg-subtle text-fg focus:border-line focus:ring-1 focus:ring-accent`,placeholder:`Filter by model, operation, agent…`,ariaLabel:`Filter GenAI spans`}),D(n);var _=L(n,2),v=F(_),S=e=>{H(e,vN())};W(v,e=>{z(c).length===0&&e(S)}),G(L(v,2),19,()=>z(c),e=>e.normalized.spanId,(e,t,n)=>{let r=M(()=>z(t).normalized.spanId===z(f)?.normalized.spanId),i=M(()=>z(t).normalized.status===`error`),o=M(()=>z(t).normalized.responseModel??z(t).normalized.requestModel),s=M(()=>z(t).normalized.agent?.name&&(z(t).normalized.provider===`unknown`||z(o)===`unknown`));var c=bN(),d=F(c),p=F(d),m=F(p),h=e=>{{let t=M(()=>z(i)?`text-danger`:`text-accent`);lp(e,{size:11,get class(){return z(t)}})}},g=e=>{{let t=M(()=>z(i)?`text-danger`:`text-fg-subtle`);Vp(e,{size:11,get class(){return z(t)}})}};W(m,e=>{z(s)?e(h):e(g,-1)});var _=L(m,2),v=F(_,!0);D(_),D(p);var S=L(p,2),C=F(S),w=F(C,!0);D(C);var T=L(C,4),ee=F(T,!0);D(T);var te=L(T,4),ne=F(te,!0);D(te);var re=L(te,2),ie=F(re,!0);D(re),D(S);var ae=L(S,2),oe=e=>{var n=yN(),r=F(n,!0);D(n),R(()=>U(r,z(t).service)),H(e,n)};W(ae,e=>{z(t).service&&e(oe)}),D(d),Vo(d,(e,t)=>l[t]=e,e=>l?.[e],()=>[z(n)]),D(c),R((e,i,a,l)=>{J(c,`aria-selected`,z(r)),J(d,`data-row-index`,z(n)),q(d,1,e),U(v,z(s)?`agent: ${z(t).normalized.agent.name}`:`${z(t).normalized.provider}/${z(o)}`),U(w,z(t).normalized.operation),U(ee,i),U(ne,a),U(ie,l)},[()=>K($(`w-full text-left px-3 py-2 hover:bg-subtle transition-colors`,z(r)&&`bg-hover hover:bg-hover`,z(n)===u.cursor&&`ring-1 ring-inset ring-accent bg-accent/10`)),()=>ad(z(t).normalized.endMs-z(t).normalized.startMs),()=>pN(z(t).normalized.usage),()=>mN(z(t).normalized.cost)]),B(`click`,d,()=>{if(u.cursor=z(n),P(a,z(t).normalized.spanId,!0),z(y)){let e=z(x).findIndex(e=>e.span.spanId===z(t).normalized.spanId);e>=0&&P(b,e,!0)}}),H(e,c)}),D(_),R(()=>{U(p,`Spans (${(z(d)?`${z(c).length} of ${z(i).length}`:z(i).length)??``})`),U(g,`${z(m)??``} run${z(m)===1?``:`s`}`)}),B(`keydown`,_,function(...e){u.onKeyDown?.apply(this,e)}),H(e,t)},i=M(()=>tu.value),a=N(null),o=N(`list`),s=M(()=>zl.value),c=M(()=>z(i).filter(e=>hN(e,z(s)))),l=_r([]),u=IA({count:()=>z(c).length,fromUnsetUp:`last`,onActivate:e=>{P(a,z(c)[e].normalized.spanId,!0)},scrollToIndex:e=>l[e]?.scrollIntoView({block:`nearest`})}),d=M(()=>z(s).length>0),f=M(()=>z(c).find(e=>e.normalized.spanId===z(a))??z(c)[0]??z(i).find(e=>e.normalized.spanId===z(a))??z(i)[0]),p=M(()=>z(i).some(e=>e.normalized.conversationId)),m=M(()=>zj(z(i)).length),h=M(()=>z(a)!==null),g=M(()=>fN(z(i),z(f)?.normalized.spanId??z(a)??void 0)),_=M(()=>Rj(z(g).map(e=>e.normalized))),v=M(()=>VM(z(g).map(e=>e.normalized))),y=N(!1),b=N(0),x=M(()=>z(y)?dN(z(g).map(e=>e.normalized)):[]);function S(){z(g).length!==0&&(P(o,`list`),z(a)===null&&P(a,z(g)[0].normalized.spanId,!0),P(b,0),P(y,!0))}function C(){P(y,!1)}Lr(()=>{if(!z(y))return;let e=z(x)[z(b)]?.span.spanId;e&&e!==z(a)&&P(a,e,!0)});var w=la(),T=I(w),ee=e=>{var t=SN(),n=F(t);Lm(F(n),{size:16}),Ke(),D(n),Ke(2),D(t),H(e,t)},te=e=>{var t=CN(),r=F(t);n(r);var s=L(r,2),c=F(s);{let e=M(()=>z(f)?.normalized.spanId??null);PM(c,{get rows(){return z(i)},get selectedSpanId(){return z(e)},onSelectSpan:e=>{P(a,e,!0),P(o,`list`)}})}D(s),D(t),H(e,t)},ne=e=>{var t=TN(),r=F(t);n(r);var i=L(r,2),s=e=>{iN(e,{get summary(){return z(_)}})};W(i,e=>{z(_).spanCount>0&&e(s)});var c=L(i,2),l=F(c),u=e=>{H(e,wN())},d=e=>{{let t=M(()=>z(f)?.normalized.spanId??null);$M(e,{get nodes(){return z(v)},get selectedSpanId(){return z(t)},onSelectSpan:e=>{P(a,e,!0),P(o,`list`)}})}};W(l,e=>{z(g).length===0?e(u):e(d,-1)}),D(c),D(t),H(e,t)},re=e=>{var t=DN(),i=F(t);n(i);var o=L(i,2),s=e=>{oN(e,{get steps(){return z(x)},onClose:C,get index(){return z(b)},set index(e){P(b,e,!0)}})};W(o,e=>{z(y)&&z(x).length>0&&e(s)});var c=L(o,2),l=F(c),u=F(l);r(u),D(l);var d=L(l,2),p=F(d),m=e=>{var t=EN(),n=I(t),r=F(n);tp(F(r),{size:11}),Ke(),D(r);var i=L(r,2);Yp(F(i),{size:11}),Ke(),D(i),D(n);var o=L(n,2),s=e=>{iN(e,{get summary(){return z(_)}})};W(o,e=>{z(_).spanCount>0&&e(s)});var c=L(o,2);Xj(c,{get span(){return z(f).normalized},onOpenTrace:()=>Pu(z(f).traceId,z(f).normalized.spanId)}),DM(L(c,2),{get span(){return z(f).normalized}}),B(`click`,r,()=>P(a,null)),B(`click`,i,()=>Pu(z(f).traceId,z(f).normalized.spanId)),H(e,t)};W(p,e=>{z(f)&&e(m)}),D(d),D(c),D(t),R((e,t)=>{q(l,1,e),q(d,1,t)},[()=>K($(`flex flex-col w-full border-line @md:w-72 @md:shrink-0 @md:border-r`,z(h)&&`hidden @md:flex`)),()=>K($(`flex-1 overflow-y-auto w-full`,!z(h)&&`hidden @md:block`))]),H(e,t)};W(T,e=>{z(i).length===0?e(ee):z(o)===`timeline`?e(te,1):z(o)===`trace`?e(ne,2):e(re,-1)}),H(e,w),at()}ea([`click`,`keydown`]);var kN=`__start__`,AN=`__end__`;function jN(e){return e[`ai.toolCall.name`]!=null||e[`operation.name`]===`ai.toolCall`||e[`ai.operationId`]===`ai.toolCall`||e[`gen_ai.operation.name`]===`execute_tool`||e[`gen_ai.tool.name`]!=null}function MN(e){return e[`gen_ai.system`]!=null||e[`gen_ai.provider.name`]!=null||e[`ai.model.provider`]!=null||e[`gen_ai.request.model`]!=null||e[`ai.model.id`]!=null}function NN(e){return e[`db.system.name`]!=null||e[`db.system`]!=null||e[`db.statement`]!=null||e[`db.query.text`]!=null}function PN(e,t){return e.kind===`CLIENT`&&(t[`http.method`]!=null||t[`http.request.method`]!=null||t[`url.full`]!=null||t[`http.url`]!=null)}function FN(e){let t=e.lastIndexOf(`:`);return t>0&&e.slice(t+1).startsWith(`ai.`)?e.slice(t+1):e}function IN(e){let t=e.attributes??{};return jN(t)?{role:`tool`,label:Q(t[`ai.toolCall.name`])??Q(t[`gen_ai.tool.name`])??FN(e.name)}:MN(t)?{role:`llm`,label:FN(e.name)}:NN(t)?{role:`db`,label:Q(t[`db.operation.name`])??Q(t[`db.operation`])??Q(t[`db.system.name`])??Q(t[`db.system`])??FN(e.name)}:PN(e,t)?{role:`http`,label:Q(t[`http.route`])??Q(t[`url.path`])??FN(e.name)}:e.kind===`SERVER`||e.kind===`CONSUMER`?{role:`entry`,label:FN(e.name)}:{role:`function`,label:FN(e.name)}}function LN(e){let t=Q(e);if(t===void 0)return e;let n=t.trim();if(!n||n[0]!==`{`&&n[0]!==`[`)return e;try{return JSON.parse(n)}catch{return e}}function RN(e,t){let n=e.attributes??{},r={};return t===`tool`?(n[`ai.toolCall.args`]!=null&&(r.input=LN(n[`ai.toolCall.args`])),n[`ai.toolCall.result`]!=null&&(r.output=LN(n[`ai.toolCall.result`]))):t===`llm`?(n[`ai.prompt`]==null?n[`gen_ai.prompt`]!=null&&(r.input=LN(n[`gen_ai.prompt`])):r.input=LN(n[`ai.prompt`]),n[`ai.response.text`]==null?n[`gen_ai.completion`]!=null&&(r.output=LN(n[`gen_ai.completion`])):r.output=LN(n[`ai.response.text`])):t===`db`&&(n[`db.statement`]==null?n[`db.query.text`]!=null&&(r.input=n[`db.query.text`]):r.input=n[`db.statement`]),r.input===void 0&&(r.input=LN(n[`autotel.input`]??n[`code.function.input`]??n.input??n[`rpc.request.body`])),r.output===void 0&&(r.output=LN(n[`autotel.output`]??n[`code.function.output`]??n.output??n[`rpc.response.body`])),r}function zN(e,t){if(!t)return;let n=e.metrics??{};t.inputTokens!=null&&(n.inputTokens=(n.inputTokens??0)+t.inputTokens),t.outputTokens!=null&&(n.outputTokens=(n.outputTokens??0)+t.outputTokens),t.costUsd!=null&&(n.costUsd=(n.costUsd??0)+t.costUsd),e.metrics=n}function BN(e,t={}){let n=t.bookends??!0,r=new Map;for(let t of e)r.set(t.spanId,t);let i=new Map,a=new Map,o=[...e].sort((e,t)=>e.startTime-t.startTime);for(let e of o){let{role:n,label:r}=IN(e),o=`${n}|${r}`;i.set(e.spanId,o);let s=a.get(o);if(s||(s={id:o,label:r,role:n,count:0,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}},a.set(o,s)),s.count++,e.status?.code===`ERROR`&&s.errorCount++,s.totalDurationMs+=e.duration,s.spanIds.push(e.spanId),zN(s,t.metricsBySpanId?.get(e.spanId)),s.sample.input===void 0&&s.sample.output===void 0){let t=RN(e,n);(t.input!==void 0||t.output!==void 0)&&(s.sample=t)}}let s=new Map,c=(e,t)=>{if(e===t)return;let n=`${e}>${t}`,r=s.get(n);r?r.count++:s.set(n,{source:e,target:t,count:1})},l=new Set,u=new Set;for(let e of o){let t=i.get(e.spanId),n=e.parentSpanId?r.get(e.parentSpanId):void 0;if(n){let e=i.get(n.spanId);e!==t&&(c(e,t),l.add(e),u.add(t))}}let d=[...a.values()];if(n&&d.length>0){let e={id:kN,label:`__start__`,role:`entry`,count:1,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}},t={id:AN,label:`__end__`,role:`end`,count:1,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}};a.set(kN,e),a.set(AN,t);for(let e of d)u.has(e.id)||c(kN,e.id),l.has(e.id)||c(e.id,AN)}return{nodes:[...a.values()],edges:[...s.values()]}}function VN(e){let t={};for(let n of e){if(!n.metrics)continue;let{inputTokens:e,outputTokens:r,costUsd:i}=n.metrics;e!=null&&(t.inputTokens=(t.inputTokens??0)+e),r!=null&&(t.outputTokens=(t.outputTokens??0)+r),i!=null&&(t.costUsd=(t.costUsd??0)+i)}return t}var HN=7.2,UN=28,WN=96,GN=280,KN=32,qN=24;function JN(e){let t=e.label.length*HN+UN,n=e.count>1?34:0;return Math.max(WN,Math.min(GN,t+n))}function YN(e){let{nodes:t,edges:n}=e;if(t.length===0)return{nodes:[],edges:[],width:0,height:0};let r=t.map(e=>e.id),i=new Map,a=new Map;for(let e of r)i.set(e,[]),a.set(e,[]);for(let e of n)i.get(e.source)?.push(e.target),a.get(e.target)?.push(e.source);let o=new Map,s=r.filter(e=>(a.get(e)?.length??0)===0),c=s.length>0?s:[r[0]],l=[...c];for(let e of c)o.set(e,0);let u=0;for(;l.length&&u++<r.length*r.length+r.length;){let e=l.shift(),t=o.get(e)??0;for(let n of i.get(e)??[])(o.get(n)??-1)<t+1&&(o.set(n,t+1),l.push(n))}for(let e of r)o.has(e)||o.set(e,0);let d=Math.max(...o.values()),f=Array.from({length:d+1},()=>[]);for(let e of r)f[o.get(e)].push(e);for(let e=0;e<2;e++)for(let e=1;e<=d;e++){let t=f[e-1],n=new Map;t.forEach((e,t)=>n.set(e,t)),f[e].sort((e,t)=>{let r=a.get(e)??[],i=a.get(t)??[];return(r.length?r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length:999)-(i.length?i.reduce((e,t)=>e+(n.get(t)??0),0)/i.length:999)})}let p=new Map(t.map(e=>[e.id,e])),m=new Map(t.map(e=>[e.id,JN(e)])),h=f.map(e=>e.reduce((e,t)=>e+(m.get(t)??WN)+KN,0)),g=Math.max(...h,WN),_=[];return f.forEach((e,t)=>{let n=qN+(g-h[t])/2;for(let r of e){let e=p.get(r),i=m.get(r)??WN;_.push({...e,x:n,y:qN+t*122,width:i,layer:t}),n+=i+KN}}),{nodes:_,edges:n,width:g+48,height:48+(d+1)*122}}var XN={entry:{fill:`fill-emerald-500/15`,stroke:`stroke-emerald-500/60`,text:`fill-emerald-600`,dot:`bg-emerald-500`,label:`Entry`},end:{fill:`fill-rose-500/15`,stroke:`stroke-rose-500/60`,text:`fill-rose-600`,dot:`bg-rose-500`,label:`End`},llm:{fill:`fill-blue-500/15`,stroke:`stroke-blue-500/60`,text:`fill-blue-600`,dot:`bg-blue-500`,label:`LLM`},tool:{fill:`fill-violet-500/15`,stroke:`stroke-violet-500/60`,text:`fill-violet-600`,dot:`bg-violet-500`,label:`AI tool`},function:{fill:`fill-amber-500/15`,stroke:`stroke-amber-500/60`,text:`fill-amber-600`,dot:`bg-amber-500`,label:`Function`},db:{fill:`fill-teal-500/15`,stroke:`stroke-teal-500/60`,text:`fill-teal-600`,dot:`bg-teal-500`,label:`Database`},http:{fill:`fill-sky-500/15`,stroke:`stroke-sky-500/60`,text:`fill-sky-600`,dot:`bg-sky-500`,label:`HTTP`}},ZN=[`entry`,`llm`,`tool`,`function`,`db`,`http`,`end`],QN=V(`<div class="p-6 text-sm text-fg-subtle"><div class="flex items-center gap-2 mb-2 text-fg-muted font-medium"><!> No flow to show yet</div> <p>The Flow view turns a trace into a call graph — entry points, LLM calls,
|
|
25
25
|
AI tool calls and plain functions, with repeated calls collapsed into one
|
|
26
26
|
node (e.g. <code class="text-xs">calculate (5)</code>). Send a trace to
|
|
27
|
-
devtools and it appears here.</p></div>`),XN=V(`<option> </option>`),ZN=V(`<select class="text-xs bg-surface border border-line rounded px-2 py-1 text-fg max-w-[16rem]"></select>`),QN=V(`<div class="flex items-center gap-1.5 text-xs font-medium text-fg-muted"><!> </div>`),$N=V(`<span> </span>`),eP=V(`<div class="flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-accent/10 border border-accent/30 text-[11px] font-medium text-accent" title="Total LLM tokens and cost for this trace"><!> <!> <span class="font-mono text-accent/80"> </span></div>`),tP=V(`<span class="text-[10px] text-fg-muted whitespace-nowrap"> </span>`),nP=V(`<div class="flex items-center gap-1 text-[10px] text-fg-subtle"><span></span> </div>`),rP=V(`<div class="absolute left-1/2 top-3 -translate-x-1/2 z-10 px-3 py-1.5 rounded border border-line bg-subtle text-xs text-fg-muted shadow-sm"> </div>`),iP=ca(`<text text-anchor="middle" class="fill-fg-subtle text-[10px]" dy="-2"> </text>`),aP=ca(`<path fill="none" stroke-width="1.5" marker-end="url(#flow-arrow)"></path><!>`,1),oP=ca(`<g><rect width="28" height="16" rx="8"></rect><text text-anchor="middle" dominant-baseline="central" class="fill-white text-[10px] font-semibold"> </text></g>`),sP=ca(`<g role="button" tabindex="0"><rect rx="8"></rect><text text-anchor="middle" dominant-baseline="central"> </text><!></g>`),cP=V(`<button type="button" class="ml-auto shrink-0 inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors" title="Open this span in the Traces waterfall"><!> Traces</button> <!>`,1),lP=V(`<span>·</span> <span class="text-danger"> </span>`,1),uP=V(`<span>·</span> <span> </span>`,1),dP=V(`<span class="font-medium"> </span> <span class="text-fg-subtle">·</span>`,1),fP=V(`<div class="mt-1.5 flex items-center gap-1.5 text-[11px] text-accent"><!> <!> <span class="font-mono text-accent/80"> </span></div>`),pP=V(`<div class="px-3 py-2 border-b border-line"><!></div>`),mP=V(`<div class="px-3 py-2 border-b border-success-border bg-success-bg"><!></div>`),hP=V(`<div class="px-3 py-3 text-xs text-fg-subtle flex items-center gap-1.5"><!> No input/output captured for this node.</div>`),gP=V(`<div class="w-80 shrink-0 border-l border-line overflow-y-auto bg-surface"><div class="px-3 py-2.5 border-b border-line"><div class="group flex items-center gap-1.5"><span></span> <span class="font-mono text-sm font-medium text-fg truncate"> </span> <!> <!></div> <div class="mt-1 flex items-center gap-2 text-[11px] text-fg-subtle flex-wrap"><span class="uppercase tracking-wide"> </span> <span>·</span> <span> </span> <!> <!></div> <!></div> <!> <!> <!></div>`),_P=V(`<div class="flex flex-col h-full"><div class="flex items-center gap-3 px-3 py-1.5 border-b border-line bg-subtle/50 flex-wrap"><!> <!> <!> <div class="flex items-center gap-3 flex-wrap"><!> <!></div></div> <div class="flex flex-1 overflow-hidden"><div class="relative flex-1 overflow-auto bg-surface focus:outline-none" role="application" aria-label="Flow call graph — arrow keys to navigate, Enter to open in Traces" tabindex="0"><!> <svg class="min-w-full" role="presentation"><defs><marker id="flow-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" class="fill-fg-subtle"></path></marker></defs><!><!></svg></div> <!></div></div>`);function vP(e,t){it(t,!0);let n=M(()=>hl.value),r=N(null),i=N(null),a=M(()=>z(n).find(e=>e.traceId===z(r))??z(n)[0]),o=M(()=>{let e=new Map;if(!z(a))return e;let t=Ql.value.filter(e=>e.traceId===z(a).traceId),n=e=>e?.source===`table`?e.total:void 0,r=e=>e.normalized.usage.inputTokens!=null||e.normalized.usage.outputTokens!=null||n(e.normalized.cost)!=null,i=new Set(t.filter(r).map(e=>e.raw.spanId)),o=new Map(z(a).spans.map(e=>[e.spanId,e])),s=e=>{let t=e.parentSpanId;for(;t;){if(i.has(t))return!0;t=o.get(t)?.parentSpanId}return!1};for(let i of t){if(!r(i)||s(i.raw))continue;let{usage:t,cost:a}=i.normalized;e.set(i.raw.spanId,{inputTokens:t.inputTokens,outputTokens:t.outputTokens,costUsd:n(a)})}return e}),s=M(()=>z(a)?KN(LN(z(a).spans,{metricsBySpanId:z(o)})):null),c=M(()=>z(s)?RN(z(s).nodes):{}),l=M(()=>{let e=new Map;if(z(s))for(let t of z(s).nodes)e.set(t.id,t);return e}),u=M(()=>z(i)?z(l).get(z(i))??null:null),d=N(``);function f(e,t){return F_(t,[e.label,qN[e.role].label])}let p=M(()=>z(d).trim().length>0),m=M(()=>{let e=new Set;if(!z(s)||!z(p))return e;let t=z(d).trim().toLowerCase();for(let n of z(s).nodes)f(n,t)&&e.add(n.id);return e}),h=M(()=>z(m).size),g=M(()=>z(s)?.nodes.length??0);function _(e,t){let n=z(l).get(e),r=z(l).get(t);if(!n||!r)return``;let i=n.x+n.width/2,a=n.y+44,o=r.x+r.width/2,s=r.y,c=(a+s)/2;return`M ${i} ${a} C ${i} ${c}, ${o} ${c}, ${o} ${s}`}function v(e){P(i,z(i)===e?null:e,!0)}function y(e){!z(a)||e.spanIds.length===0||ju(z(a).traceId,e.spanIds[0])}function b(e){let t=z(s)?.nodes??[];if(t.length===0)return;let n=z(i)?z(l).get(z(i)):void 0;if(!n){P(i,t[0].id,!0);return}if(e===`left`||e===`right`){let r=t.filter(e=>e.layer===n.layer).sort((e,t)=>e.x-t.x),a=r.findIndex(e=>e.id===n.id),o=r[e===`left`?a-1:a+1];o&&P(i,o.id,!0);return}let r=n.layer+(e===`down`?1:-1),a=t.filter(e=>e.layer===r);if(a.length===0)return;let o=n.x+n.width/2,c=a.reduce((e,t)=>Math.abs(t.x+t.width/2-o)<Math.abs(e.x+e.width/2-o)?t:e);P(i,c.id,!0)}let x=N(!1);function S(e){if(z(x))switch(e.key){case`ArrowLeft`:e.preventDefault(),b(`left`);break;case`ArrowRight`:e.preventDefault(),b(`right`);break;case`ArrowUp`:e.preventDefault(),b(`up`);break;case`ArrowDown`:e.preventDefault(),b(`down`);break;case`Enter`:z(u)&&y(z(u));break;case`Escape`:P(i,null)}}Lr(()=>(window.addEventListener(`keydown`,S),()=>window.removeEventListener(`keydown`,S)));var C=la(),w=I(C),T=e=>{var t=YN(),n=F(t);Xh(F(n),{size:16}),Ke(),D(n),Ke(2),D(t),H(e,t)},ee=e=>{var t=_P(),o=F(t),f=F(o),b=e=>{var t=ZN();G(t,21,()=>z(n),e=>e.traceId,(e,t)=>{var n=XN(),r=F(n);D(n);var i={};R(e=>{U(r,`${z(t).service??``} · ${e??``}`),i!==(i=z(t).traceId)&&(n.value=(n.__value=z(t).traceId)??``)},[()=>z(t).rootSpan?.name??z(t).traceId.slice(0,8)]),H(e,n)}),D(t),lo(t,()=>z(r),e=>P(r,e)),H(e,t)},S=e=>{var t=QN(),n=F(t);Xh(n,{size:13});var r=L(n);D(t),R(()=>U(r,` ${z(a).rootSpan?.name??`Flow`??``}`)),H(e,t)};W(f,e=>{z(n).length>1?e(b):e(S,-1)});var C=L(f,2),w=e=>{var t=eP(),n=F(t);Pp(n,{size:11,class:`text-accent`});var r=L(n,2),i=e=>{var t=$N(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Tj(z(c).costUsd)]),H(e,t)};W(r,e=>{z(c).costUsd!=null&&e(i)});var a=L(r,2),o=F(a,!0);D(a),D(t),R(e=>U(o,e),[()=>wj(z(c).inputTokens,z(c).outputTokens)]),H(e,t)};W(C,e=>{(z(c).costUsd!=null||z(c).inputTokens!=null)&&e(w)});var T=L(C,2);{let e=M(()=>$(`bg-subtle text-fg`,z(p)?`border-accent ring-1 ring-accent`:`border-line`));P_(T,{class:`ml-auto w-48 max-w-[14rem]`,get inputClass(){return z(e)},ariaLabel:`Search flow nodes by name or type`,placeholder:`Search nodes…`,clearTitle:`Clear search`,get value(){return z(d)},set value(e){P(d,e,!0)}})}var ee=L(T,2),te=F(ee),ne=e=>{var t=tP(),n=F(t);D(t),R(()=>U(n,`Nodes (${z(h)??``} of ${z(g)??``})`)),H(e,t)};W(te,e=>{z(p)&&e(ne)}),G(L(te,2),16,()=>JN,e=>e,(e,t)=>{var n=nP(),r=F(n),i=L(r);D(n),R(e=>{q(r,1,e),U(i,` ${qN[t].label??``}`)},[()=>K($(`inline-block w-2 h-2 rounded-sm`,qN[t].dot))]),H(e,n)}),D(ee),D(o);var re=L(o,2),ie=F(re),ae=F(ie),oe=e=>{var t=rP(),n=F(t);D(t),R(e=>U(n,`No matches for “${e??``}”`),[()=>z(d).trim()]),H(e,t)};W(ae,e=>{z(p)&&z(h)===0&&e(oe)});var se=L(ae,2),ce=L(F(se));G(ce,17,()=>z(s).edges,e=>e.source+`>`+e.target,(e,t)=>{let n=M(()=>z(i)&&z(t).source!==z(i)&&z(t).target!==z(i));var r=aP(),a=I(r),o=L(a),s=e=>{let n=M(()=>z(l).get(z(t).source)),r=M(()=>z(l).get(z(t).target));var i=la(),a=I(i),o=e=>{var i=iP(),a=F(i);D(i),R(()=>{J(i,`x`,(z(n).x+z(n).width/2+z(r).x+z(r).width/2)/2),J(i,`y`,(z(n).y+44+z(r).y)/2),U(a,`×${z(t).count??``}`)}),H(e,i)};W(a,e=>{z(n)&&z(r)&&e(o)}),H(e,i)};W(o,e=>{z(t).count>1&&e(s)}),R((e,t)=>{J(a,`d`,e),q(a,0,t)},[()=>_(z(t).source,z(t).target),()=>K($(`stroke-fg-subtle transition-opacity`,z(n)&&`opacity-20`))]),H(e,r)}),G(L(ce),17,()=>z(s).nodes,e=>e.id,(e,t)=>{let n=M(()=>qN[z(t).role]),r=M(()=>z(t).id===z(i)),a=M(()=>z(m).has(z(t).id)),o=M(()=>z(p)&&z(a)),s=M(()=>z(p)&&!z(a)||z(i)&&!z(r)),c=M(()=>z(t).errorCount>0);var l=sP(),u=F(l),d=L(u),f=F(d,!0);D(d);var h=L(d),g=e=>{var n=oP(),r=F(n),i=L(r),a=F(i,!0);D(i),D(n),R(e=>{J(r,`x`,z(t).x+z(t).width-26),J(r,`y`,z(t).y-8),q(r,0,e),J(i,`x`,z(t).x+z(t).width-12),J(i,`y`,z(t).y),U(a,z(c)?`${z(t).count-z(t).errorCount}/${z(t).count}`:`${z(t).count}`)},[()=>K($(z(c)?`fill-red-500`:`fill-fg-muted`))]),H(e,n)};W(h,e=>{z(t).count>1&&e(g)}),D(l),R((e,n,i,a)=>{q(l,0,e),J(u,`x`,z(t).x),J(u,`y`,z(t).y),J(u,`width`,z(t).width),J(u,`height`,44),q(u,0,n),J(u,`stroke-width`,z(r)||z(o)?2.5:1.5),J(d,`x`,z(t).x+z(t).width/2),J(d,`y`,z(t).y+22),q(d,0,i),U(f,a)},[()=>K($(`cursor-pointer transition-opacity focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent`,z(s)&&`opacity-40`)),()=>K($(z(n).fill,z(o)?`stroke-accent`:z(c)?`stroke-red-500`:z(n).stroke,(z(r)||z(o))&&`stroke-[2.5px]`)),()=>K($(`text-[12px] font-medium font-mono`,z(n).text)),()=>z(t).label.length>26?z(t).label.slice(0,25)+`…`:z(t).label]),B(`click`,l,()=>v(z(t).id)),B(`keydown`,l,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(z(t).id))}),H(e,l)}),D(se),D(ie);var le=L(ie,2),E=e=>{let t=M(()=>qN[z(u).role]);var n=gP(),r=F(n),i=F(r),o=F(i),s=L(o,2),c=F(s,!0);D(s);var l=L(s,2);Y_(l,{get value(){return z(u).label},label:`Copy node name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`});var d=L(l,2),f=e=>{var t=cP(),n=I(t);Kp(F(n),{size:11}),Ke(),D(n),Y_(L(n,2),{get value(){return z(a).traceId},label:`Copy trace ID`,class:`shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),B(`click`,n,()=>y(z(u))),H(e,t)};W(d,e=>{z(u).spanIds.length>0&&e(f)}),D(i);var p=L(i,2),m=F(p),h=F(m,!0);D(m);var g=L(m,4),_=F(g);D(g);var v=L(g,2),b=e=>{var t=lP(),n=L(I(t),2),r=F(n);D(n),R(()=>U(r,`${z(u).errorCount??``} errored`)),H(e,t)};W(v,e=>{z(u).errorCount>0&&e(b)});var x=L(v,2),S=e=>{var t=uP(),n=L(I(t),2),r=F(n,!0);D(n),R(e=>U(r,e),[()=>nd(z(u).totalDurationMs)]),H(e,t)};W(x,e=>{z(u).totalDurationMs>0&&e(S)}),D(p);var C=L(p,2),w=e=>{var t=fP(),n=F(t);Pp(n,{size:11,class:`text-accent`});var r=L(n,2),i=e=>{var t=dP(),n=I(t),r=F(n,!0);D(n),Ke(2),R(e=>U(r,e),[()=>Tj(z(u).metrics.costUsd)]),H(e,t)};W(r,e=>{z(u).metrics.costUsd!=null&&e(i)});var a=L(r,2),o=F(a);D(a),D(t),R(e=>U(o,`${e??``} tokens`),[()=>wj(z(u).metrics.inputTokens,z(u).metrics.outputTokens)]),H(e,t)};W(C,e=>{z(u).metrics&&e(w)}),D(r);var T=L(r,2),ee=e=>{var t=pP(),n=F(t);{let e=M(()=>Yj(z(u).sample.input));j_(n,{get content(){return z(e)},children:(e,t)=>{Zj(e,{label:`Input`,get value(){return z(u).sample.input}})},$$slots:{default:!0}})}D(t),H(e,t)};W(T,e=>{z(u).sample.input!==void 0&&e(ee)});var te=L(T,2),ne=e=>{var t=mP(),n=F(t);{let e=M(()=>Yj(z(u).sample.output));j_(n,{get content(){return z(e)},children:(e,t)=>{Zj(e,{label:`Output`,get value(){return z(u).sample.output},tone:`positive`})},$$slots:{default:!0}})}D(t),H(e,t)};W(te,e=>{z(u).sample.output!==void 0&&e(ne)});var re=L(te,2),ie=e=>{var t=hP();Pm(F(t),{size:13}),Ke(),D(t),H(e,t)};W(re,e=>{z(u).sample.input===void 0&&z(u).sample.output===void 0&&e(ie)}),D(n),R(e=>{q(o,1,e),U(c,z(u).label),U(h,z(t).label),U(_,`${z(u).count??``}
|
|
28
|
-
${z(u).count===1?`call`:`calls`}`)},[()=>K($(`inline-block w-2 h-2 rounded-sm`,z(t).dot))]),H(e,n)};W(le,e=>{z(u)&&e(E)}),D(re),D(t),R(()=>{J(se,`width`,z(s).width),J(se,`height`,z(s).height),J(se,`viewBox`,`0 0 ${z(s).width} ${z(s).height}`)}),B(`focusin`,ie,()=>P(x,!0)),B(`focusout`,ie,()=>P(x,!1)),H(e,t)};W(w,e=>{!z(a)||!z(s)||z(s).nodes.length===0?e(T):e(ee,-1)}),H(e,C),at()}ea([`focusin`,`focusout`,`click`,`keydown`]);var yP=(e,t=p,n=p)=>{var r=xP(),i=F(r),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(r),R(()=>{U(a,t()),U(s,n())}),H(e,r)},bP=(e,t=p,n=p,r=p)=>{var i=la(),a=I(i),o=e=>{var i=SP(),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(i),R(e=>{J(i,`title`,e),U(o,t()),U(c,n())},[()=>`View ${t().toLowerCase()} in the ${r()} tab`]),B(`click`,i,()=>ku(r())),H(e,i)},s=e=>{yP(e,t,n)};W(a,e=>{n()>0?e(o):e(s,-1)}),H(e,i)},xP=V(`<div><div class="text-[11px] uppercase tracking-wide text-fg-subtle"> </div> <div class="text-sm text-fg"> </div></div>`),SP=V(`<button type="button" class="group/stat text-left rounded -m-1 p-1 hover:bg-hover transition-colors"><div class="text-[11px] uppercase tracking-wide text-fg-subtle"> </div> <div class="text-sm text-accent group-hover/stat:underline"> </div></button>`),CP=V(`<div class="border border-line rounded-md p-3 bg-surface"><div class="flex items-start justify-between gap-2 mb-2"><div><div class="text-sm font-medium text-fg"> </div> <div class="text-xs text-fg-subtle uppercase tracking-wide"> </div></div> <span> </span></div> <div class="grid grid-cols-2 gap-2 text-xs text-fg-muted sm:grid-cols-5"><!> <!> <!> <!> <!></div></div>`),wP=V(`<option> </option>`),TP=V(`<div class="text-center text-fg-subtle text-sm py-12">No resources derived yet. Send traces or logs with resource metadata.</div>`),EP=V(`<div class="space-y-2"></div>`),DP=V(`<div class="flex flex-col h-full p-4"><div class="flex flex-col gap-3 mb-4 pb-3 border-b border-line"><div class="flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3></div> <div class="flex flex-wrap gap-2"><input type="search" placeholder="Filter resources" class="px-3 py-2 text-xs border border-line rounded-md min-w-[180px]"/> <select class="px-3 py-2 text-xs border border-line rounded-md bg-surface"><option>All types</option><!></select></div></div> <div class="flex-1 overflow-auto"><!></div></div>`);function OP(e,t){it(t,!0);let n=(e,t=p)=>{var n=CP(),r=F(n),a=F(r),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a);var u=L(a,2),d=F(u,!0);D(u),D(r);var f=L(r,2),m=F(f);yP(m,()=>`Requests`,()=>t().requestCount);var h=L(m,2);bP(h,()=>`Errors`,()=>t().errorCount,()=>`errors`);var g=L(h,2);bP(g,()=>`Traces`,()=>t().traceCount,()=>`traces`);var _=L(g,2);bP(_,()=>`Logs`,()=>t().logCount,()=>`logs`);var v=L(_,2);{let e=M(()=>t().lastSeen?rd(t().lastSeen):`n/a`);yP(v,()=>`Last Seen`,()=>z(e))}D(f),D(n),R(e=>{U(s,t().name),U(l,t().type),q(u,1,e),U(d,t().health)},[()=>K($(`px-2 py-1 rounded border text-[11px] font-medium capitalize`,i(t().health)))]),H(e,n)},r=[`service`,`database`,`cache`,`messaging`,`external`,`unknown`];function i(e){switch(e){case`healthy`:return`bg-success-bg text-success border-success-border`;case`degraded`:return`bg-warning-bg text-warning border-warning-border`;case`unhealthy`:return`bg-danger-bg text-danger border-danger-border`;default:return`bg-subtle text-fg-muted border-line`}}let a=M(()=>Zl.value),o=N(``),s=N(`all`),c=M(()=>{let e=z(o).trim().toLowerCase();return z(a).filter(t=>(z(s)===`all`||t.type===z(s))&&F_(e,[t.name]))});var l=DP(),u=F(l),d=F(u),f=F(d),m=F(f);cp(m,{size:16});var h=L(m);D(f),D(d);var g=L(d,2),_=F(g);xo(_);var v=L(_,2),y=F(v);y.value=y.__value=`all`,G(L(y),16,()=>r,e=>e,(e,t)=>{var n=wP(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(v);var b;co(v),D(g),D(u);var x=L(u,2),S=F(x),C=e=>{H(e,TP())},w=e=>{var t=EP();G(t,21,()=>z(c),e=>e.name,(e,t)=>{n(e,()=>z(t))}),D(t),H(e,t)};W(S,e=>{z(c).length===0?e(C):e(w,-1)}),D(x),D(l),R(()=>{U(h,` Resources (${z(a).length??``})`),So(_,z(o)),b!==(b=z(s))&&(v.value=(v.__value=z(s))??``,so(v,z(s)))}),B(`input`,_,e=>P(o,e.currentTarget.value,!0)),B(`change`,v,e=>P(s,e.currentTarget.value,!0)),H(e,l),at()}ea([`click`,`input`,`change`]);var kP=200,AP=70,jP=20;function MP(e,t){return ms(e,t)}function NP(e){let t=e.attributes||{};return t[`db.system.name`]||t[`db.system`]||t[`db.namespace`]||t[`db.name`]||t[`db.query.text`]||t[`db.statement`]?`database`:t[`messaging.system`]||t[`messaging.destination`]||t[`messaging.url`]?`messaging`:t[`rpc.system.name`]||t[`rpc.system`]||t[`rpc.service`]||t[`peer.service`]?`external`:`service`}function PP(e,t){if(e.length===0)return 0;let n=Math.ceil(t/100*e.length)-1;return e[Math.max(0,n)]}function FP(e){let t=new Map,n=new Map;for(let r of e){let e=new Map;for(let t of r.spans)e.set(t.spanId,t);for(let i of r.spans){let a=MP(i,r.service),o=t.get(a);o||(o={id:a,name:a,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:`service`},t.set(a,o)),o.requestCount++,i.status.code===`ERROR`&&o.errorCount++,o.avgLatency=(o.avgLatency*(o.requestCount-1)+i.duration)/o.requestCount,o.minLatency=Math.min(o.minLatency,i.duration),o.maxLatency=Math.max(o.maxLatency,i.duration),o.spanKinds.add(i.kind);let s=NP(i),c=String(i.attributes?.[`service.name`]||r.service||a);if(s!==`service`&&a!==c&&(o.nodeType=s),i.kind===`CLIENT`){let e=r.spans.find(e=>e.parentSpanId===i.spanId&&e.kind===`SERVER`),o=String(i.attributes?.[`service.name`]||r.service||a),s=(e?MP(e,r.service):void 0)||us(i.attributes,`peer.service`,`http.host`,`db.system.name`,`db.system`,`net.peer.name`,`rpc.service`,`messaging.system`)||`external`;if(t.has(o)||t.set(o,{id:o,name:o,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:`service`}),o!==s){let e=`${o}->${s}`,r=n.get(e);if(!r){if(r={id:e,source:o,target:s,requestCount:0,errorCount:0,avgLatency:0,p50Latency:0,p99Latency:0,latencies:[]},n.set(e,r),!t.has(s))t.set(s,{id:s,name:s,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:NP(i)});else{let e=t.get(s),n=NP(i);n!==`service`&&(e.nodeType=n)}}r.requestCount++,i.status.code===`ERROR`&&r.errorCount++,r.avgLatency=(r.avgLatency*(r.requestCount-1)+i.duration)/r.requestCount,r.latencies.push(i.duration);let a=[...r.latencies].sort((e,t)=>e-t);r.p50Latency=PP(a,50),r.p99Latency=PP(a,99)}}if(i.kind!==`SERVER`||!i.parentSpanId)continue;let l=e.get(i.parentSpanId);if(!l||l.kind!==`CLIENT`)continue;let u=MP(l,r.service);if(u===a)continue;let d=`${u}->${a}`;n.has(d)||n.set(d,{id:d,source:u,target:a,requestCount:1,errorCount:+(i.status.code===`ERROR`),avgLatency:i.duration,p50Latency:i.duration,p99Latency:i.duration,latencies:[i.duration]})}}return{nodes:[...t.values()].map(e=>({...e,minLatency:e.minLatency===1/0?0:e.minLatency})),connections:[...n.values()]}}function IP(e,t){let n=new Map;if(e.length===0)return n;if(e.length===1)return n.set(e[0].id,{x:180,y:92}),n;let r=e.map(e=>e.id),i=new Map,a=new Map;for(let e of r)i.set(e,[]),a.set(e,[]);for(let e of t)i.has(e.source)&&i.get(e.source).push(e.target),a.has(e.target)&&a.get(e.target).push(e.source);let o=new Map,s=r.filter(e=>(a.get(e)?.length??0)===0),c=s.length>0?s:r,l=[...c];for(let e of c)o.set(e,0);for(;l.length>0;){let e=l.shift(),t=o.get(e)??0;for(let n of i.get(e)??[])(o.get(n)??-1)<=t&&(o.set(n,t+1),l.push(n))}for(let e of r)o.has(e)||o.set(e,0);let u=Math.max(...Array.from(o.values())),d=Array.from({length:u+1},()=>[]);for(let e of r)d[o.get(e)].push(e);for(let e=0;e<2;e++)for(let e=1;e<=u;e++){let t=d[e-1],n=new Map;t.forEach((e,t)=>n.set(e,t)),d[e].sort((e,t)=>{let r=a.get(e)??[],i=a.get(t)??[];return(r.length>0?r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length:999)-(i.length>0?i.reduce((e,t)=>e+(n.get(t)??0),0)/i.length:999)})}let f=Math.max(...d.map(e=>e.length)),p=Math.max(f*122-AP,52);for(let e=0;e<=u;e++){let t=d[e],r=(p-(t.length*122-AP))/2,i=e*kP+70+jP;t.forEach((e,t)=>{n.set(e,{x:i-70,y:r+t*122+jP})})}return n}function LP(e,t,n){return Math.min(n,Math.max(t,e))}function RP(e,t,n,r,i){let a=LP(t,r,i);if(a===e.scale)return e;let o=(n.x-e.translate.x)/e.scale,s=(n.y-e.translate.y)/e.scale;return{scale:a,translate:{x:n.x-o*a,y:n.y-s*a}}}function zP(e,t,n,r,i,a){let o=e.maxX-e.minX,s=e.maxY-e.minY,c=t-r*2,l=n-r*2,u=LP(Math.min(o>0?c/o:a,s>0?l/s:a),i,a);return{scale:u,translate:{x:(t-o*u)/2-e.minX*u,y:(n-s*u)/2-e.minY*u}}}function BP(e){let{viewWidth:t,viewHeight:n,svg:r,contentBounds:i,minScale:a=.2,maxScale:o=3,zoomStep:s=1.2,fitPadding:c=24}=e,l=N(1),u=N(_r({x:0,y:0})),d=N(!1),f={x:0,y:0,tx:0,ty:0},p=(e,i)=>{let a=r();if(!a)return{x:e,y:i};let o=a.getBoundingClientRect(),s=o.width>0?t()/o.width:1,c=o.height>0?n()/o.height:1;return{x:(e-o.left)*s,y:(i-o.top)*c}},m=e=>{P(l,e.scale,!0),P(u,e.translate,!0)},h=(e,t)=>m(RP({scale:z(l),translate:z(u)},e,t,a,o)),g=()=>{P(l,1),P(u,{x:0,y:0},!0)},_=e=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let t=p(e.clientX,e.clientY),n=e.deltaY<0?s:1/s;h(z(l)*n,t)},v=e=>{e.button===0&&(e.target?.closest(`[data-node]`)||(P(d,!0),f={x:e.clientX,y:e.clientY,tx:z(u).x,ty:z(u).y},r()?.setPointerCapture?.(e.pointerId)))},y=e=>{let i=r();if(!z(d)||!i)return;let a=i.getBoundingClientRect(),o=a.width>0?t()/a.width:1,s=a.height>0?n()/a.height:1;P(u,{x:f.tx+(e.clientX-f.x)*o,y:f.ty+(e.clientY-f.y)*s},!0)},b=e=>{z(d)&&(P(d,!1),r()?.releasePointerCapture?.(e.pointerId))},x=()=>({x:t()/2,y:n()/2});return{get scale(){return z(l)},get translate(){return z(u)},get isPanning(){return z(d)},onWheel:_,onPointerDown:v,onPointerMove:y,onPointerEnd:b,zoomIn:()=>h(z(l)*s,x()),zoomOut:()=>h(z(l)/s,x()),fit:()=>{let e=i();if(!e){g();return}m(zP(e,t(),n(),c,a,o))},reset:g}}var VP=(e,t=p,n=p,r)=>{let i=pn(()=>g(r?.(),!1));var a=HP(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,t()),q(c,1,e),U(l,n())},[()=>K($(`font-medium`,z(i)?`text-danger`:`text-fg`))]),H(e,a)},HP=V(`<div class="flex justify-between text-xs"><span class="text-fg-subtle"> </span> <span> </span></div>`),UP=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle p-8"><!> <p class="text-sm text-center">No traces available to build service map. <br/> Traces will appear here as they are captured.</p></div>`),WP=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle p-8"><!> <p class="text-sm text-center">No services detected in traces. <br/> Service information is extracted from span attributes.</p></div>`),GP=V(`<span class="text-xs text-fg-subtle flex-shrink-0">No service matches</span>`),KP=ca(`<g><path fill="none" stroke-linecap="round"></path><text text-anchor="middle"> </text></g>`),qP=ca(`<rect fill="none" class="stroke-accent"></rect>`),JP=ca(`<rect></rect><path></path><ellipse></ellipse>`,1),YP=ca(`<polygon></polygon>`),XP=ca(`<rect></rect>`),ZP=ca(`<rect fill="#64748b"></rect>`),QP=ca(`<tspan fill="#dc2626" class="font-semibold"> </tspan>`),$P=ca(`<g role="button" tabindex="0"><!><g filter="url(#nodeShadow)"><!></g><!><text text-anchor="middle" class="text-[11px] font-semibold" fill="#1f2937"> </text><text text-anchor="middle" class="text-[10px]" fill="#475569"> <!></text></g>`),eF=V(`<div class="space-y-3 pr-8"><!> <!> <!> <!> <!> <!></div>`),tF=V(`<span class="text-danger"> </span>`),nF=V(`<div class="text-xs p-2 bg-surface rounded border border-line"><div class="flex items-center gap-1 text-fg-muted"><span class="font-medium"> </span> <!></div> <div class="flex items-center gap-2 mt-1 text-fg-subtle"><span> </span> <!> <span> </span></div></div>`),rF=V(`<div class="mt-4 pt-4 border-t border-line"><div class="group flex items-center justify-between mb-2"><h5 class="text-xs font-medium text-fg-muted">Connections</h5> <!></div> <div class="space-y-2"></div></div>`),iF=V(`<div class="w-64 border-l border-line bg-subtle overflow-auto"><div class="p-4"><div class="flex items-center justify-between mb-4"><div class="group flex items-center gap-1 min-w-0"><h4 class="font-semibold text-fg truncate"> </h4> <!></div> <button class="text-fg-subtle hover:text-fg-muted">×</button></div> <!> <!></div></div>`),aF=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3> <div class="text-xs text-fg-subtle"> </div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!></div> <div class="flex-1 overflow-hidden flex"><div class="relative flex-1 overflow-auto p-4"><svg role="application" aria-label="Service map. Drag to pan, ctrl or cmd and scroll to zoom."><defs><marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#94a3b8"></polygon></marker><marker id="arrowhead-error" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#ef4444"></polygon></marker><filter id="nodeShadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#0f172a" flood-opacity="0.14"></feDropShadow></filter></defs><g><!><!></g></svg> <div class="absolute bottom-3 right-3 flex flex-col gap-1 rounded-md border border-line bg-surface p-1 shadow-sm"><button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Zoom in" aria-label="Zoom in"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Zoom out" aria-label="Zoom out"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Fit to content" aria-label="Fit to content"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Reset to 1:1" aria-label="Reset zoom to 1:1"><!></button></div></div> <!></div> <div class="flex items-center gap-4 px-4 py-2 border-t border-line bg-subtle text-xs"><div class="flex items-center gap-1"><div class="w-4 h-4 rounded-full border-2 border-accent bg-surface"></div> <span class="text-fg-muted">Healthy</span></div> <div class="flex items-center gap-1"><div class="w-4 h-4 rounded-full border-2 border-danger-border bg-surface"></div> <span class="text-fg-muted">Has Errors</span></div> <div class="flex items-center gap-1"><div class="w-6 h-0.5 bg-fg-subtle"></div> <span class="text-fg-muted">Connection</span></div></div></div>`);function oF(e,t){it(t,!0);let n=M(()=>hl.value),r=N(null),i=N(null),a=N(``),o=M(()=>FP(z(n))),s=M(()=>z(o).nodes),c=M(()=>z(o).connections),l=M(()=>z(a).length>0);function u(e){return F_(z(a).toLowerCase(),[e.name])}let d=M(()=>z(s).filter(u)),f=M(()=>new Set(z(d).map(e=>e.id))),p=M(()=>z(d).length>0),m=M(()=>IP(z(s),z(c))),h=M(()=>{let e=400;for(let[,t]of z(m))t.x+140+20>e&&(e=t.x+140+20);return e}),g=M(()=>{let e=300;for(let[,t]of z(m))t.y+52+20>e&&(e=t.y+52+20);return e}),_=N(null),v=BP({viewWidth:()=>z(h),viewHeight:()=>z(g),svg:()=>z(_),contentBounds:()=>{let e=1/0,t=1/0,n=-1/0,r=-1/0;for(let[,i]of z(m))e=Math.min(e,i.x),t=Math.min(t,i.y),n=Math.max(n,i.x+140),r=Math.max(r,i.y+52);return Number.isFinite(e)?{minX:e,minY:t,maxX:n,maxY:r}:null}}),y=M(()=>z(r)?z(s).find(e=>e.id===z(r))??null:null);function b(e,t){if(e.key===`Enter`||e.key===` `){e.preventDefault(),P(r,z(r)===t?null:t,!0);return}e.key===`Escape`&&z(r)&&(e.stopPropagation(),P(r,null))}let x=M(()=>z(r)?z(c).filter(e=>e.source===z(r)||e.target===z(r)):[]),S=M(()=>z(x).length>0?JSON.stringify(z(x).map(e=>({source:e.source,target:e.target,requests:e.requestCount,errors:e.errorCount,avgLatency:nd(e.avgLatency)})),null,2):``),C=M(()=>{if(!z(y))return``;let e=z(y);return JSON.stringify({service:e.name,requests:e.requestCount,errors:e.errorCount,errorRate:`${(e.errorCount/e.requestCount*100).toFixed(1)}%`,avgLatency:nd(e.avgLatency),minLatency:nd(e.minLatency),maxLatency:nd(e.maxLatency),connections:z(x).map(e=>({source:e.source,target:e.target,requests:e.requestCount,errors:e.errorCount,avgLatency:nd(e.avgLatency)}))},null,2)});var w=la(),T=I(w),ee=e=>{var t=UP();Jf(F(t),{size:48,class:`mb-4 opacity-50`}),Ke(2),D(t),H(e,t)},te=e=>{var t=WP();Sh(F(t),{size:48,class:`mb-4 opacity-50`}),Ke(2),D(t),H(e,t)},ne=e=>{var t=aF(),n=F(t),o=F(n),u=F(o);Jf(u,{size:16});var w=L(u);D(o);var T=L(o,2),ee=F(T);D(T),D(n);var te=L(n,2),ne=F(te);P_(ne,{placeholder:`Find a service by name…`,ariaLabel:`Find a service by name`,get value(){return z(a)},set value(e){P(a,e,!0)}});var re=L(ne,2),ie=e=>{H(e,GP())};W(re,e=>{z(l)&&!z(p)&&e(ie)}),D(te);var ae=L(te,2),oe=F(ae),se=F(oe);oo(se,`min-height: 300px;`);var ce=L(F(se)),le=F(ce);G(le,17,()=>z(c),e=>e.id,(e,t)=>{let n=M(()=>z(m).get(z(t).source)),i=M(()=>z(m).get(z(t).target));var a=la(),o=I(a),s=e=>{let a=M(()=>z(r)===z(t).source||z(r)===z(t).target),o=M(()=>z(t).errorCount>0),s=M(()=>z(n).x+140),c=M(()=>z(n).y+26),l=M(()=>z(i).x),u=M(()=>z(i).y+26),d=M(()=>Math.abs(z(l)-z(s))*.5),f=M(()=>z(t).requestCount>0?z(t).errorCount/z(t).requestCount*100:0),p=M(()=>z(o)?`${z(t).requestCount}× · ${z(f).toFixed(0)}% err · ${nd(z(t).p50Latency)}`:`${z(t).requestCount}× · ${nd(z(t).p50Latency)}`);var m=KP(),h=F(m),g=L(h),_=F(g,!0);D(g),D(m),R(e=>{J(h,`d`,`M${z(s)},${z(c)} C${z(s)+z(d)},${z(c)} ${z(l)-z(d)},${z(u)} ${z(l)},${z(u)}`),J(h,`stroke`,z(o)?`#ef4444`:`#94a3b8`),J(h,`stroke-width`,z(o)||z(a)?2.5:1.5),J(h,`stroke-dasharray`,z(o)?`6 4`:void 0),J(h,`stroke-opacity`,z(r)&&!z(a)?.2:1),J(h,`marker-end`,`url(#${z(o)?`arrowhead-error`:`arrowhead`})`),J(g,`x`,(z(s)+z(l))/2),J(g,`y`,(z(c)+z(u))/2-6),q(g,0,e),J(g,`opacity`,z(r)&&!z(a)?.25:1),U(_,z(p))},[()=>K($(`at-edge-label text-[10px]`,z(o)?`fill-danger font-medium`:`fill-fg-subtle`))]),H(e,m)};W(o,e=>{z(n)&&z(i)&&e(s)}),H(e,a)}),G(L(le),17,()=>z(s),e=>e.id,(e,t)=>{let n=M(()=>z(m).get(z(t).id));var a=la(),o=I(a),s=e=>{let a=M(()=>z(r)===z(t).id),o=M(()=>z(i)===z(t).id),s=M(()=>z(t).errorCount>0),c=M(()=>z(f).has(z(t).id)),u=M(()=>z(l)&&!z(c)),d=M(()=>fg(z(t).id)),p=M(()=>z(d).fill),m=M(()=>z(s)?`#ef4444`:z(d).stroke),h=M(()=>z(a)||z(s)?2.5:z(o)?2:1.5);var g=$P(),_=F(g),v=e=>{var t=qP();J(t,`x`,-3),J(t,`y`,-3),J(t,`rx`,11),J(t,`stroke-width`,2.5),R(()=>{J(t,`width`,146),J(t,`height`,58)}),H(e,t)};W(_,e=>{z(l)&&z(c)&&e(v)});var y=L(_),S=F(y),C=e=>{var t=JP(),n=I(t);J(n,`x`,2),J(n,`y`,6);var r=L(n),i=L(r);J(i,`cy`,6),J(i,`ry`,6),R(()=>{J(n,`width`,136),J(n,`height`,40),J(n,`fill`,z(p)),J(r,`d`,`M2,46 A68,6 0 0,0 138,46 L138,6 A68,6 0 0,1 2,6 Z`),J(r,`fill`,z(p)),J(r,`stroke`,z(m)),J(r,`stroke-width`,z(h)),J(i,`cx`,70),J(i,`rx`,68),J(i,`fill`,z(p)),J(i,`stroke`,z(m)),J(i,`stroke-width`,z(h))}),H(e,t)},w=e=>{var t=YP();R(()=>{J(t,`points`,`70,2 138,13 138,39 70,50 2,39 2,13`),J(t,`fill`,z(p)),J(t,`stroke`,z(m)),J(t,`stroke-width`,z(h))}),H(e,t)},T=e=>{var t=XP();J(t,`x`,2),J(t,`y`,2),J(t,`rx`,8),R(()=>{J(t,`width`,136),J(t,`height`,48),J(t,`fill`,z(p)),J(t,`stroke`,z(m)),J(t,`stroke-width`,z(h))}),H(e,t)};W(S,e=>{z(t).nodeType===`database`?e(C):z(t).nodeType===`messaging`?e(w,1):e(T,-1)}),D(y);var ee=L(y),te=e=>{var t=ZP();J(t,`x`,0),J(t,`y`,0),J(t,`rx`,8),J(t,`opacity`,.4),R(()=>{J(t,`width`,140),J(t,`height`,52)}),H(e,t)},ne=M(()=>z(r)&&!z(a)&&!z(x).some(e=>e.source===z(t).id||e.target===z(t).id));W(ee,e=>{z(ne)&&e(te)});var re=L(ee),ie=F(re,!0);D(re);var ae=L(re),oe=F(ae),se=L(oe),ce=e=>{var n=QP(),r=F(n);D(n),R(()=>U(r,` · ${z(t).errorCount??``} err`)),H(e,n)};W(se,e=>{z(s)&&e(ce)}),D(ae),D(g),R((e,r)=>{J(g,`data-node`,z(t).id),J(g,`transform`,`translate(${z(n).x}, ${z(n).y})`),q(g,0,e),J(g,`aria-label`,z(t).name),J(re,`x`,70),J(re,`y`,23),U(ie,r),J(ae,`x`,70),J(ae,`y`,38),U(oe,`${z(t).requestCount??``} span${z(t).requestCount===1?``:`s`} `)},[()=>K($(`cursor-pointer`,z(u)&&`opacity-30`)),()=>z(t).name.length>16?z(t).name.slice(0,14)+`…`:z(t).name]),B(`click`,g,()=>P(r,z(a)?null:z(t).id,!0)),B(`keydown`,g,e=>b(e,z(t).id)),$i(`mouseenter`,g,()=>P(i,z(t).id,!0)),$i(`mouseleave`,g,()=>P(i,null)),H(e,g)};W(o,e=>{z(n)&&e(s)}),H(e,a)}),D(ce),D(se),Vo(se,e=>P(_,e),()=>z(_));var E=L(se,2),ue=F(E);oh(F(ue),{size:14}),D(ue);var de=L(ue,2);Rm(F(de),{size:14}),D(de);var fe=L(de,2);gh(F(fe),{size:14}),D(fe);var pe=L(fe,2);fh(F(pe),{size:14}),D(pe),D(E),D(oe);var me=L(oe,2),he=e=>{var t=iF(),n=F(t),i=F(n),a=F(i),o=F(a),s=F(o,!0);D(o),Y_(L(o,2),{get value(){return z(y).name},label:`Copy service name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(a);var c=L(a,2);D(i);var l=L(i,2);j_(l,{get content(){return z(C)},children:(e,t)=>{var n=eF(),r=F(n);{let e=M(()=>z(y).requestCount.toString());VP(r,()=>`Requests`,()=>z(e))}var i=L(r,2);{let e=M(()=>z(y).errorCount.toString());VP(i,()=>`Errors`,()=>z(e),()=>z(y).errorCount>0)}var a=L(i,2);{let e=M(()=>`${(z(y).errorCount/z(y).requestCount*100).toFixed(1)}%`);VP(a,()=>`Error Rate`,()=>z(e),()=>z(y).errorCount>0)}var o=L(a,2);{let e=M(()=>nd(z(y).avgLatency));VP(o,()=>`Avg Latency`,()=>z(e))}var s=L(o,2);{let e=M(()=>nd(z(y).minLatency));VP(s,()=>`Min Latency`,()=>z(e))}var c=L(s,2);{let e=M(()=>nd(z(y).maxLatency));VP(c,()=>`Max Latency`,()=>z(e))}D(n),H(e,n)},$$slots:{default:!0}});var u=L(l,2),d=e=>{var t=rF(),n=F(t);Y_(L(F(n),2),{get value(){return z(S)},label:`Copy connections`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(n);var i=L(n,2);G(i,21,()=>z(x),e=>e.id,(e,t)=>{var n=nF(),i=F(n),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=e=>{ep(e,{size:10})},l=e=>{ep(e,{size:10,class:`rotate-180`})};W(s,e=>{z(t).source===z(r)?e(c):e(l,-1)}),D(i);var u=L(i,2),d=F(u),f=F(d);D(d);var p=L(d,2),m=e=>{var n=tF(),r=F(n);D(n),R(()=>U(r,`${z(t).errorCount??``} err`)),H(e,n)};W(p,e=>{z(t).errorCount>0&&e(m)});var h=L(p,2),g=F(h,!0);D(h),D(u),D(n),R(e=>{U(o,z(t).source===z(r)?z(t).target:z(t).source),U(f,`${z(t).requestCount??``} req`),U(g,e)},[()=>nd(z(t).avgLatency)]),H(e,n)}),D(i),D(t),H(e,t)};W(u,e=>{z(x).length>0&&e(d)}),D(n),D(t),R(()=>U(s,z(y).name)),B(`click`,c,()=>P(r,null)),H(e,t)};W(me,e=>{z(y)&&e(he)}),D(ae),Ke(2),D(t),R(e=>{U(w,` Service Map (${(z(l)?`${z(d).length} of ${z(s).length}`:z(s).length)??``} services)`),U(ee,`${z(c).length??``} connections`),J(se,`viewBox`,`0 0 ${z(h)} ${z(g)}`),q(se,0,e),J(ce,`transform`,`translate(${v.translate.x}, ${v.translate.y}) scale(${v.scale})`)},[()=>K($(`w-full h-full`,v.isPanning?`cursor-grabbing`:`cursor-grab`))]),$i(`wheel`,se,function(...e){v.onWheel?.apply(this,e)}),B(`pointerdown`,se,function(...e){v.onPointerDown?.apply(this,e)}),B(`pointermove`,se,function(...e){v.onPointerMove?.apply(this,e)}),B(`pointerup`,se,function(...e){v.onPointerEnd?.apply(this,e)}),$i(`pointercancel`,se,function(...e){v.onPointerEnd?.apply(this,e)}),$i(`pointerleave`,se,function(...e){v.onPointerEnd?.apply(this,e)}),B(`click`,ue,function(...e){v.zoomIn?.apply(this,e)}),B(`click`,de,function(...e){v.zoomOut?.apply(this,e)}),B(`click`,fe,function(...e){v.fit?.apply(this,e)}),B(`click`,pe,function(...e){v.reset?.apply(this,e)}),H(e,t)};W(T,e=>{z(n).length===0?e(ee):z(s).length===0?e(te,1):e(ne,-1)}),H(e,w),at()}ea([`pointerdown`,`pointermove`,`pointerup`,`click`,`keydown`]);async function sF(e,t=``){let n=t?`?q=${encodeURIComponent(t)}`:``;return uF(`${e.baseUrl}/api/metrics${n}`,{method:`GET`,signal:e.signal},e,e=>e.metrics??[])}async function cF(e,t){let n={name:e.name};return e.window&&(n.window=e.window),n.maxPoints=e.maxPoints??1500,uF(`${t.baseUrl}/api/query/metrics`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n),signal:t.signal},t,e=>e.series??[])}async function lF(e,t){return uF(`${t.baseUrl}/api/metrics?name=${encodeURIComponent(e)}`,{method:`DELETE`,signal:t.signal},t,e=>e.deletedSeries??0)}async function uF(e,t,n,r){let i;try{i=await n.fetch(e,t)}catch(e){return dF(e)?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}if(i.status===403)return{status:`error`,message:`Forbidden: the devtools server rejected this origin. Open the viewer from the same machine.`};let a;try{a=await i.json()}catch{return{status:`error`,message:`Unexpected response from ${n.baseUrl} (not JSON)`}}return i.ok?{status:`ok`,data:r(a)}:{status:`error`,message:`Server error: ${a.error??i.statusText}`}}function dF(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}function fF(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function mF(e){let t,n,r;e.length===2?(t=e===fF||e===pF?e:hF,n=e,r=e):(t=fF,n=(t,n)=>fF(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function hF(){return 0}function gF(e){return e===null?NaN:+e}var _F=mF(fF),vF=_F.right;_F.left,mF(gF).center;var yF=Math.sqrt(50),bF=Math.sqrt(10),xF=Math.sqrt(2);function SF(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=yF?10:a>=bF?5:a>=xF?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?SF(e,t,n*2):[s,c,l]}function CF(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?SF(t,e,n):SF(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function wF(e,t,n){return t=+t,e=+e,n=+n,SF(e,t,n)[2]}function TF(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?wF(t,e,n):wF(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function EF(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function DF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function OF(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function kF(){}var AF=.7,jF=1/AF,MF=`\\s*([+-]?\\d+)\\s*`,NF=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,PF=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,FF=/^#([0-9a-f]{3,8})$/,IF=RegExp(`^rgb\\(${MF},${MF},${MF}\\)$`),LF=RegExp(`^rgb\\(${PF},${PF},${PF}\\)$`),RF=RegExp(`^rgba\\(${MF},${MF},${MF},${NF}\\)$`),zF=RegExp(`^rgba\\(${PF},${PF},${PF},${NF}\\)$`),BF=RegExp(`^hsl\\(${NF},${PF},${PF}\\)$`),VF=RegExp(`^hsla\\(${NF},${PF},${PF},${NF}\\)$`),HF={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};DF(kF,qF,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:UF,formatHex:UF,formatHex8:WF,formatHsl:GF,formatRgb:KF,toString:KF});function UF(){return this.rgb().formatHex()}function WF(){return this.rgb().formatHex8()}function GF(){return oI(this).formatHsl()}function KF(){return this.rgb().formatRgb()}function qF(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=FF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?JF(t):n===3?new QF(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?YF(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?YF(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=IF.exec(e))?new QF(t[1],t[2],t[3],1):(t=LF.exec(e))?new QF(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=RF.exec(e))?YF(t[1],t[2],t[3],t[4]):(t=zF.exec(e))?YF(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=BF.exec(e))?aI(t[1],t[2]/100,t[3]/100,1):(t=VF.exec(e))?aI(t[1],t[2]/100,t[3]/100,t[4]):HF.hasOwnProperty(e)?JF(HF[e]):e===`transparent`?new QF(NaN,NaN,NaN,0):null}function JF(e){return new QF(e>>16&255,e>>8&255,e&255,1)}function YF(e,t,n,r){return r<=0&&(e=t=n=NaN),new QF(e,t,n,r)}function XF(e){return e instanceof kF||(e=qF(e)),e?(e=e.rgb(),new QF(e.r,e.g,e.b,e.opacity)):new QF}function ZF(e,t,n,r){return arguments.length===1?XF(e):new QF(e,t,n,r??1)}function QF(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}DF(QF,ZF,OF(kF,{brighter(e){return e=e==null?jF:jF**+e,new QF(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?AF:AF**+e,new QF(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new QF(rI(this.r),rI(this.g),rI(this.b),nI(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$F,formatHex:$F,formatHex8:eI,formatRgb:tI,toString:tI}));function $F(){return`#${iI(this.r)}${iI(this.g)}${iI(this.b)}`}function eI(){return`#${iI(this.r)}${iI(this.g)}${iI(this.b)}${iI((isNaN(this.opacity)?1:this.opacity)*255)}`}function tI(){let e=nI(this.opacity);return`${e===1?`rgb(`:`rgba(`}${rI(this.r)}, ${rI(this.g)}, ${rI(this.b)}${e===1?`)`:`, ${e})`}`}function nI(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function rI(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function iI(e){return e=rI(e),(e<16?`0`:``)+e.toString(16)}function aI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new cI(e,t,n,r)}function oI(e){if(e instanceof cI)return new cI(e.h,e.s,e.l,e.opacity);if(e instanceof kF||(e=qF(e)),!e)return new cI;if(e instanceof cI)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new cI(o,s,c,e.opacity)}function sI(e,t,n,r){return arguments.length===1?oI(e):new cI(e,t,n,r??1)}function cI(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}DF(cI,sI,OF(kF,{brighter(e){return e=e==null?jF:jF**+e,new cI(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?AF:AF**+e,new cI(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new QF(dI(e>=240?e-240:e+120,i,r),dI(e,i,r),dI(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new cI(lI(this.h),uI(this.s),uI(this.l),nI(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=nI(this.opacity);return`${e===1?`hsl(`:`hsla(`}${lI(this.h)}, ${uI(this.s)*100}%, ${uI(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function lI(e){return e=(e||0)%360,e<0?e+360:e}function uI(e){return Math.max(0,Math.min(1,e||0))}function dI(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var fI=e=>()=>e;function pI(e,t){return function(n){return e+n*t}}function mI(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function hI(e){return(e=+e)==1?gI:function(t,n){return n-t?mI(t,n,e):fI(isNaN(t)?n:t)}}function gI(e,t){var n=t-e;return n?pI(e,n):fI(isNaN(e)?t:e)}var _I=(function e(t){var n=hI(t);function r(e,t){var r=n((e=ZF(e)).r,(t=ZF(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=gI(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function vI(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function yI(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function bI(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=kI(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function xI(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function SI(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function CI(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=kI(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var wI=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,TI=new RegExp(wI.source,`g`);function EI(e){return function(){return e}}function DI(e){return function(t){return e(t)+``}}function OI(e,t){var n=wI.lastIndex=TI.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=wI.exec(e))&&(i=TI.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:SI(r,i)})),n=TI.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?DI(c[0].x):EI(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function kI(e,t){var n=typeof t,r;return t==null||n===`boolean`?fI(t):(n===`number`?SI:n===`string`?(r=qF(t))?(t=r,_I):OI:t instanceof qF?_I:t instanceof Date?xI:yI(t)?vI:Array.isArray(t)?bI:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?CI:SI)(e,t)}function AI(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function jI(e){return function(){return e}}function MI(e){return+e}var NI=[0,1];function PI(e){return e}function FI(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:jI(isNaN(t)?NaN:.5)}function II(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function LI(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=FI(i,r),a=n(o,a)):(r=FI(r,i),a=n(a,o)),function(e){return a(r(e))}}function RI(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=FI(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=vF(e,t,1,r)-1;return a[n](i[n](t))}}function zI(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function BI(){var e=NI,t=NI,n=kI,r,i,a,o=PI,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==PI&&(o=II(e[0],e[n-1])),s=n>2?RI:LI,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||(c=s(e.map(r),t,n)))(r(o(i)))}return d.invert=function(n){return o(i((l||(l=s(t,e.map(r),SI)))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,MI),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=AI,u()},d.clamp=function(e){return arguments.length?(o=e?!0:PI,u()):o!==PI},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function VI(){return BI()(PI,PI)}function HI(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function UI(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function WI(e){return e=UI(Math.abs(e)),e?e[1]:NaN}function GI(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function KI(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var qI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function JI(e){if(!(t=qI.exec(e)))throw Error(`invalid format: `+e);var t;return new YI({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}JI.prototype=YI.prototype;function YI(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}YI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function XI(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var ZI;function QI(e,t){var n=UI(e,t);if(!n)return e+``;var r=n[0],i=n[1],a=i-(ZI=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+UI(e,Math.max(0,t+a-1))[0]}function $I(e,t){var n=UI(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var eL={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:HI,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>$I(e*100,t),r:$I,s:QI,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function tL(e){return e}var nL=Array.prototype.map,rL=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function iL(e){var t=e.grouping===void 0||e.thousands===void 0?tL:GI(nL.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?tL:KI(nL.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e){e=JI(e);var l=e.fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,g=e.precision,_=e.trim,v=e.type;v===`n`?(h=!0,v=`g`):eL[v]||(g===void 0&&(g=12),_=!0,v=`g`),(p||l===`0`&&u===`=`)&&(p=!0,l=`0`,u=`=`);var y=f===`$`?n:f===`#`&&/[boxX]/.test(v)?`0`+v.toLowerCase():``,b=f===`$`?r:/[%p]/.test(v)?o:``,x=eL[v],S=/[defgprs%]/.test(v);g=g===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(e){var n=y,r=b,o,f,C;if(v===`c`)r=x(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),_&&(e=XI(e)),w&&+e==0&&d!==`+`&&(w=!1),n=(w?d===`(`?d:s:d===`-`||d===`(`?``:d)+n,r=(v===`s`?rL[8+ZI/3]:``)+r+(w&&d===`(`?`)`:``),S){for(o=-1,f=e.length;++o<f;)if(C=e.charCodeAt(o),48>C||C>57){r=(C===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}h&&!p&&(e=t(e,1/0));var T=n.length+e.length+r.length,ee=T<m?Array(m-T+1).join(l):``;switch(h&&p&&(e=t(ee+e,ee.length?m-r.length:1/0),ee=``),u){case`<`:e=n+e+r+ee;break;case`=`:e=n+ee+e+r;break;case`^`:e=ee.slice(0,T=ee.length>>1)+n+e+r+ee.slice(T);break;default:e=ee+n+e+r}return a(e)}return C.toString=function(){return e+``},C}function u(e,t){var n=l((e=JI(e),e.type=`f`,e)),r=Math.max(-8,Math.min(8,Math.floor(WI(t)/3)))*3,i=10**-r,a=rL[8+r/3];return function(e){return n(i*e)+a}}return{format:l,formatPrefix:u}}var aL,oL,sL;cL({thousands:`,`,grouping:[3],currency:[`$`,``]});function cL(e){return aL=iL(e),oL=aL.format,sL=aL.formatPrefix,aL}function lL(e){return Math.max(0,-WI(Math.abs(e)))}function uL(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(WI(t)/3)))*3-WI(Math.abs(e)))}function dL(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,WI(t)-WI(e))+1}function fL(e,t,n,r){var i=TF(e,t,n),a;switch(r=JI(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=uL(i,o))&&(r.precision=a),sL(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=dL(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=lL(i))&&(r.precision=a-(r.type===`%`)*2)}return oL(r)}function pL(e){var t=e.domain;return e.ticks=function(e){var n=t();return CF(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return fL(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=wF(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function mL(){var e=VI();return e.copy=function(){return zI(e,mL())},EF.apply(e,arguments),pL(e)}function hL(e){return function(){return e}}var gL=Math.PI,_L=2*gL,vL=1e-6,yL=_L-vL;function bL(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function xL(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return bL;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var SL=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?bL:xL(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>vL){if(!(Math.abs(u*s-c*l)>vL)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((gL-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>vL&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>vL||Math.abs(this._y1-l)>vL)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%_L+_L),d>yL?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>vL&&this._append`A${n},${n},0,${+(d>=gL)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};SL.prototype;function CL(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new SL(t)}Array.prototype.slice;function wL(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function TL(e){this._context=e}TL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function EL(e){return new TL(e)}function DL(e){return e[0]}function OL(e){return e[1]}function kL(e,t){var n=hL(!0),r=null,i=EL,a=null,o=CL(s);e=typeof e==`function`?e:e===void 0?DL:hL(e),t=typeof t==`function`?t:t===void 0?OL:hL(t);function s(s){var c,l=(s=wL(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:hL(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:hL(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:hL(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function AL(e,t,n){var r=null,i=hL(!0),a=null,o=EL,s=null,c=CL(l);e=typeof e==`function`?e:e===void 0?DL:hL(+e),t=typeof t==`function`?t:hL(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?OL:hL(+n);function l(l){var u,d,f,p=(l=wL(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return kL().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:hL(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:hL(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:hL(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:hL(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:hL(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:hL(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:hL(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var jL=ca(`<svg role="img"><path fill="none" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"></path></svg>`),ML=V(`<span>—</span>`);function NL(e,t){it(t,!0);let n=Z(t,`width`,3,80),r=Z(t,`height`,3,20),i=Z(t,`color`,3,`var(--color-accent)`),a=M(()=>t.points.map(e=>e.value??0)),o=M(()=>{if(t.points.length<2)return null;let e=mL().domain([t.points[0].timestamp,t.points[t.points.length-1].timestamp]).range([1,n()-1]),i=Math.min(...z(a)),o=Math.max(...z(a)),s=mL().domain(i===o?[i-1,o+1]:[i,o]).range([r()-1,1]);return kL().x(t=>e(t.timestamp)).y(e=>s(e.value??0))(t.points)});var s=la(),c=I(s),l=e=>{var a=jL(),s=F(a);D(a),R(e=>{J(a,`width`,n()),J(a,`height`,r()),J(a,`viewBox`,`0 0 ${n()??``} ${r()??``}`),J(a,`aria-label`,t.ariaLabel??`Sparkline, ${t.points.length} points`),q(a,0,e),J(s,`d`,z(o)),J(s,`stroke`,i())},[()=>K($(`overflow-visible`,t.class))]),H(e,a)},u=e=>{var i=ML();R(e=>{q(i,1,e),oo(i,`width:${n()??``}px;height:${r()??``}px`)},[()=>K($(`text-[10px] text-fg-subtle`,t.class))]),H(e,i)};W(c,e=>{z(o)?e(l):e(u,-1)}),H(e,s),at()}function PL(e,t){if(t===void 0)return e;if(t===`cumulative`&&e.length<2)return[];let n=[],r=+(t===`cumulative`);for(let i=r;i<e.length;i++){let r=e[i-1],a=r?.value??0,o=e[i].value??0,s=o;t===`cumulative`&&o>=a&&(s=o-a);let c=e[i].startTimestamp??r?.timestamp,l=c===void 0?0:(e[i].timestamp-c)/1e3;n.push({...e[i],value:l>0?s/l:s})}return n}function FL(e,t,n){if(e.length!==t.length+1)return;let r=e.reduce((e,t)=>e+t,0);if(r===0)return;let i=n*r,a=0;for(let n=0;n<e.length;n++){let r=e[n];if(a+r>=i){let e=n===0?0:t[n-1],o=n<t.length?t[n]:t[t.length-1];if(r===0)return o;let s=(i-a)/r;return e+(o-e)*s}a+=r}return t[t.length-1]}function IL(e,t){return e.length===t.length+1?t.length===0?[{label:`all`,count:e[0],from:-1/0,to:1/0}]:e.map((e,n)=>{let r=n===0?-1/0:t[n-1],i=n<t.length?t[n]:1/0;return{label:n===0?`≤${UL(t[0])}`:n===t.length?`>${UL(t[t.length-1])}`:`${UL(t[n-1])}–${UL(t[n])}`,count:e,from:r,to:i}}):[]}function LL(e){if(e.bucketCounts&&e.explicitBounds)return IL(e.bucketCounts,e.explicitBounds);if(e.scale===void 0)return[];let t=2**2**-e.scale,n=[];if(RL(n,e.negative,t,!0),e.zeroCount!==void 0){let t=e.zeroThreshold??0;n.push({label:t>0?`−${UL(t)}–${UL(t)}`:`0`,count:e.zeroCount,from:-t,to:t})}return RL(n,e.positive,t,!1),n.sort((e,t)=>e.from-t.from)}function RL(e,t,n,r){if(t)for(let i=0;i<t.bucketCounts.length;i++){let a=t.offset+i,o=n**a,s=n**(a+1),c=r?-s:o,l=r?-o:s;e.push({label:`${UL(c)}–${UL(l)}`,count:t.bucketCounts[i],from:c,to:l})}}function zL(e,t){if(e.bucketCounts&&e.explicitBounds)return FL(e.bucketCounts,e.explicitBounds,t);let n=LL(e),r=n.reduce((e,t)=>e+t.count,0);if(r===0)return;let i=t*r,a=0;for(let e of n){if(a+e.count>=i)return e.count===0?e.to:e.from+(i-a)/e.count*(e.to-e.from);a+=e.count}return n[n.length-1]?.to}function BL(e,t){if(e.length===0)return;let n=e.map(e=>e.value??0);switch(t){case`sum`:return n.reduce((e,t)=>e+t,0);case`avg`:return n.reduce((e,t)=>e+t,0)/n.length;case`min`:return Math.min(...n);case`max`:return Math.max(...n);case`last`:return n[n.length-1];case`count`:return e.length}}function VL(e,t,n){if(!Number.isFinite(e)||!Number.isFinite(t)||e===t)return[e];let r=(t-e)/Math.max(1,n),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a<=1?1:a<=2?2:a<=5?5:10)*i,s=Math.floor(e/o)*o,c=Math.ceil(t/o)*o,l=[],u=Math.round((c-s)/o);for(let e=0;e<=u;e++)l.push(s+e*o);return l}function HL(e,t){if(e.length<=t||t<3)return e;let n=Math.max(1,Math.floor((t-2)/2)),r=e.length/n,i=new Map;i.set(0,e[0]),i.set(e.length-1,e[e.length-1]);for(let t=0;t<n;t++){let n=Math.floor(t*r),a=Math.min(e.length,Math.floor((t+1)*r));if(n>=a)continue;let o=n,s=n;for(let t=n;t<a;t++){let n=e[t].value??0;n<(e[o].value??0)&&(o=t),n>(e[s].value??0)&&(s=t)}i.set(o,e[o]),i.set(s,e[s])}return[...i.entries()].sort((e,t)=>e[0]-t[0]).map(([,e])=>e)}function UL(e){return Number.isFinite(e)?Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):String(Math.round(e*100)/100):`∞`}function WL(e){if(e.length===0)return[];let t=[...new Set(e.flatMap(e=>e.map(e=>e.timestamp)))].sort((e,t)=>e-t),n=e.map(e=>new Map(e.map(e=>[e.timestamp,e.value??0]))),r=new Map(t.map(e=>[e,0]));return n.map(e=>t.map(t=>{let n=r.get(t)??0,i=e.get(t)??0,a=n+Math.max(0,i);return r.set(t,a),{timestamp:t,y0:n,y1:a}}))}function GL(e,t){return t.map(t=>({quantile:t,points:e.flatMap(e=>{let n=zL(e,t);return n===void 0?[]:[{timestamp:e.timestamp,value:n}]})}))}function KL(e){let t=e.filter(e=>LL(e).length>0);if(t.length===0)return{columns:[],rows:[],max:0};let n=t[0],r=LL(n),i=r.map(e=>({label:e.label,from:e.from,to:e.to}));if(i.length===0)return{columns:[],rows:[],max:0};let a=t.filter(e=>LL(e).length===r.length&&LL(e).every((e,t)=>e.label===r[t].label)),o=Math.max(0,...a.flatMap(e=>LL(e).map(e=>e.count)));return{columns:a.slice().sort((e,t)=>e.timestamp-t.timestamp).map(e=>({timestamp:e.timestamp,cells:LL(e).map(({count:e})=>({count:e,intensity:o>0?e/o:0}))})),rows:i,max:o}}var qL=V(`<div>No data in this window</div>`),JL=ca(`<line x1="0" stroke="var(--color-line-subtle)" stroke-width="1"></line><text x="-6" text-anchor="end" dominant-baseline="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`,1),YL=ca(`<text text-anchor="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`),XL=ca(`<path opacity="0.75" stroke="var(--color-surface)" stroke-width="0.5" data-testid="stack-band"></path>`),ZL=ca(`<path opacity="0.15"></path>`),QL=ca(`<path fill="none" stroke-width="1.5" stroke-linejoin="round"></path>`),$L=ca(`<circle r="2.5"></circle>`),eR=ca(`<!><!>`,1),tR=ca(`<circle r="3.5" fill="var(--color-warning)" stroke="var(--color-surface)" stroke-width="1" role="button" tabindex="0" class="cursor-pointer"></circle>`),nR=ca(`<svg role="img"><g><!><!><!><!></g></svg>`);function rR(e,t){it(t,!0);let n=Z(t,`width`,3,640),r=Z(t,`height`,3,220),i=Z(t,`area`,3,!1),a=Z(t,`stacked`,3,!1),o={top:8,right:12,bottom:22,left:44},s=M(()=>Math.max(1,n()-o.left-o.right)),c=M(()=>Math.max(1,r()-o.top-o.bottom)),l=M(()=>t.series.map(e=>({...e,points:HL(e.points,400)}))),u=M(()=>z(l).filter(e=>!t.isolated?.size||t.isolated.has(e.seriesId))),d=M(()=>a()?WL(z(u).map(e=>e.points)):null),f=M(()=>{let e=z(u).flatMap(e=>e.points);if(e.length===0)return null;let t=e.map(e=>e.timestamp),n=z(d)?z(d).flatMap(e=>e.map(e=>e.y1)):e.map(e=>e.value??0),r=Math.min(...t),i=Math.max(...t),a=Math.min(0,...n),o=Math.max(...n);return{minTime:r,maxTime:i===r?r+1:i,minValue:a,maxValue:o===a?a+1:o}}),p=M(()=>z(f)?mL().domain([z(f).minTime,z(f).maxTime]).range([0,z(s)]):null),m=M(()=>z(f)?mL().domain([z(f).minValue,z(f).maxValue]).range([z(c),0]):null),h=M(()=>z(f)?VL(z(f).minValue,z(f).maxValue,4):[]),g=M(()=>z(f)?VL(z(f).minTime,z(f).maxTime,4):[]);function _(e){return!z(p)||!z(m)||e.length===0||e.length===1?null:kL().x(e=>z(p)(e.timestamp)).y(e=>z(m)(e.value??0))(e)}function v(e){return!z(p)||!z(m)||e.length<2?null:AL().x(e=>z(p)(e.timestamp)).y0(z(m)(Math.max(0,z(f)?.minValue??0))).y1(e=>z(m)(e.value??0))(e)}function y(e){return fg(e.seriesId).stroke}function b(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function x(e){return Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):String(Math.round(e*1e3)/1e3)}function S(e){return!z(p)||!z(m)||e.length<2?null:AL().x(e=>z(p)(e.timestamp)).y0(e=>z(m)(e.y0)).y1(e=>z(m)(e.y1))(e)}let C=M(()=>!z(p)||!z(m)?[]:z(u).flatMap(e=>e.points.flatMap(t=>(t.exemplars??[]).filter(e=>e.traceId).map(n=>({key:`${e.seriesId}:${n.timestamp}:${n.traceId}`,x:z(p)(n.timestamp||t.timestamp),y:z(m)(n.value),traceId:n.traceId,spanId:n.spanId,value:n.value})))));var w=la(),T=I(w),ee=e=>{var n=qL();R(e=>{q(n,1,e),oo(n,`height:${r()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,n)},te=e=>{var a=nR(),l=F(a),f=F(l);G(f,16,()=>z(h),e=>e,(e,t)=>{let n=M(()=>z(m)?z(m)(t):0);var r=la(),i=I(r),a=e=>{var r=JL(),i=I(r),a=L(i),o=F(a,!0);D(a),R(e=>{J(i,`x2`,z(s)),J(i,`y1`,z(n)),J(i,`y2`,z(n)),J(a,`y`,z(n)),U(o,e)},[()=>x(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(c)&&e(a)}),H(e,r)});var w=L(f);G(w,16,()=>z(g),e=>e,(e,t)=>{let n=M(()=>z(p)?z(p)(t):0);var r=la(),i=I(r),a=e=>{var r=YL(),i=F(r,!0);D(r),R(e=>{J(r,`x`,z(n)),J(r,`y`,z(c)+14),U(i,e)},[()=>b(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(s)&&e(a)}),H(e,r)});var T=L(w),ee=e=>{var t=la();G(I(t),19,()=>z(u),e=>e.seriesId,(e,t,n)=>{let r=M(()=>S(z(d)[z(n)]));var i=la(),a=I(i),o=e=>{var n=XL();R(e=>{J(n,`d`,z(r)),J(n,`fill`,e)},[()=>y(z(t))]),H(e,n)};W(a,e=>{z(r)&&e(o)}),H(e,i)}),H(e,t)},te=e=>{var t=la();G(I(t),17,()=>z(u),e=>e.seriesId,(e,t)=>{let n=M(()=>_(z(t).points));var r=eR(),a=I(r),o=e=>{let n=M(()=>v(z(t).points));var r=la(),i=I(r),a=e=>{var r=ZL();R(e=>{J(r,`d`,z(n)),J(r,`fill`,e)},[()=>y(z(t))]),H(e,r)};W(i,e=>{z(n)&&e(a)}),H(e,r)};W(a,e=>{i()&&e(o)});var s=L(a),c=e=>{var r=QL();R(e=>{J(r,`d`,z(n)),J(r,`stroke`,e)},[()=>y(z(t))]),H(e,r)},l=e=>{var n=$L();R((e,t,r)=>{J(n,`cx`,e),J(n,`cy`,t),J(n,`fill`,r)},[()=>z(p)?z(p)(z(t).points[0].timestamp):0,()=>z(m)?z(m)(z(t).points[0].value??0):0,()=>y(z(t))]),H(e,n)};W(s,e=>{z(n)?e(c):z(t).points.length===1&&e(l,1)}),H(e,r)}),H(e,t)};W(T,e=>{z(d)?e(ee):e(te,-1)}),G(L(T),17,()=>z(C),e=>e.key,(e,n)=>{var r=tR();R(e=>{J(r,`cx`,z(n).x),J(r,`cy`,z(n).y),J(r,`aria-label`,`Open trace ${z(n).traceId??``} (${e??``})`)},[()=>x(z(n).value)]),B(`click`,r,()=>t.onExemplar?.(z(n).traceId,z(n).spanId)),B(`keydown`,r,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.onExemplar?.(z(n).traceId,z(n).spanId))}),H(e,r)}),D(l),D(a),R(e=>{J(a,`width`,n()),J(a,`height`,r()),J(a,`viewBox`,`0 0 ${n()??``} ${r()??``}`),J(a,`aria-label`,`Time series chart, ${z(u).length??``} series`),q(a,0,e),J(l,`transform`,`translate(${o.left??``},${o.top??``})`)},[()=>K($(`overflow-visible`,t.class))]),H(e,a)};W(T,e=>{z(f)?e(te,-1):e(ee)}),H(e,w),at()}ea([`click`,`keydown`]);var iR=V(`<div>No bucket data on this point</div>`),aR=V(`<div class="flex-1 flex flex-col items-center justify-end h-full gap-1"><span class="text-[10px] text-fg-subtle tabular-nums"> </span> <div class="w-full rounded-t bg-accent/70 hover:bg-accent transition-colors"></div> <span class="text-[10px] text-fg-subtle truncate w-full text-center"> </span></div>`),oR=V(`<span><span class="text-fg-subtle"> </span> <span class="font-mono text-fg"> </span></span>`),sR=V(`<span class="ml-auto"><span class="text-fg-subtle">count</span> <span class="font-mono text-fg"> </span></span>`),cR=V(`<div><div class="flex items-end gap-1" role="img"></div> <div class="flex items-center gap-4 text-[11px] text-fg-muted border-t border-line pt-2"><!> <!></div></div>`);function lR(e,t){it(t,!0);let n=Z(t,`height`,3,160),r=M(()=>LL(t.point)),i=M(()=>Math.max(1,...z(r).map(e=>e.count))),a=M(()=>z(r).reduce((e,t)=>e+t.count,0)),o=M(()=>[.5,.9,.99].map(e=>({label:`p${e*100}`,value:zL(t.point,e)})));function s(e){if(e===void 0)return`—`;let n=Math.round(e*100)/100;return t.unit?`${n}${t.unit}`:String(n)}function c(e){return z(a)===0?`0%`:`${Math.round(e/z(a)*100)}%`}var l=la(),u=I(l),d=e=>{var r=iR();R(e=>{q(r,1,e),oo(r,`height:${n()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,r)},f=e=>{var l=cR(),u=F(l);G(u,21,()=>z(r),e=>e.label,(e,t)=>{var n=aR(),r=F(n),a=F(r,!0);D(r);var o=L(r,2),s=L(o,2),l=F(s,!0);D(s),D(n),R(e=>{U(a,z(t).count),oo(o,`height:${z(t).count/z(i)*100}%`),J(o,`title`,`${z(t).label??``}: ${z(t).count??``} (${e??``})`),U(l,z(t).label)},[()=>c(z(t).count)]),H(e,n)}),D(u);var d=L(u,2),f=F(d);G(f,17,()=>z(o),e=>e.label,(e,t)=>{var n=oR(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a),D(n),R(e=>{U(i,z(t).label),U(o,e)},[()=>s(z(t).value)]),H(e,n)});var p=L(f,2),m=e=>{var n=sR(),r=L(F(n),2),i=F(r,!0);D(r),D(n),R(()=>U(i,t.point.count)),H(e,n)};W(p,e=>{t.point.count!==void 0&&e(m)}),D(d),D(l),R(e=>{q(l,1,e),oo(u,`height:${n()??``}px`),J(u,`aria-label`,`Histogram, ${z(r).length??``} buckets, ${z(a)??``} observations`)},[()=>K($(`flex flex-col gap-2`,t.class))]),H(e,l)};W(u,e=>{z(r).length===0?e(d):e(f,-1)}),H(e,l),at()}var uR=V(`<div>No bucketed data in this window</div>`),dR=V(`<span class="ml-0.5"> </span>`),fR=V(`<div class="text-[10px] text-fg-subtle flex items-center justify-end"> <!></div>`),pR=V(`<button type="button" class="w-full rounded-[1px] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent"></button>`),mR=V(`<div class="flex-1 min-w-[8px] flex flex-col gap-px"></div>`),hR=V(`<div><div class="flex" role="img"><div class="shrink-0 pr-2 text-right"></div> <div class="flex-1 min-w-0 overflow-x-auto"><div class="flex gap-px h-full"></div></div></div> <div class="flex items-center gap-2 text-[10px] text-fg-subtle pl-2"><span> </span> <span class="flex-1 border-t border-line-subtle"></span> <span> </span> <span class="ml-2"> </span></div></div>`);function gR(e,t){it(t,!0);let n=Z(t,`rowHeight`,3,22),r=M(()=>KL(t.points));function i(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function a(e){return e===0?`background: var(--color-subtle)`:`background: color-mix(in oklch, var(--color-accent) ${(.12+e*.88)*100}%, transparent)`}var o=la(),s=I(o),c=e=>{var n=uR();R(e=>q(n,1,e),[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded p-6`,t.class))]),H(e,n)},l=e=>{var o=hR(),s=F(o),c=F(s);G(c,21,()=>[...z(r).rows].reverse(),e=>e.label,(e,r)=>{var i=fR(),a=F(i,!0),o=L(a),s=e=>{var n=dR(),r=F(n,!0);D(n),R(()=>U(r,t.unit)),H(e,n)};W(o,e=>{t.unit&&e(s)}),D(i),R(()=>{oo(i,`height:${n()??``}px`),U(a,z(r).label)}),H(e,i)}),D(c);var l=L(c,2),u=F(l);G(u,21,()=>z(r).columns,e=>e.timestamp,(e,o)=>{var s=mR();G(s,21,()=>[...z(o).cells].reverse(),Oa,(e,s,c)=>{let l=M(()=>z(o).cells.length-1-c);var u=pR();R((e,i,a)=>{oo(u,`height:${n()??``}px; ${e??``}`),J(u,`title`,`${z(r).rows[z(l)].label??``}${t.unit??``??``} at ${i??``}: ${z(s).count??``}`),J(u,`aria-label`,`${z(r).rows[z(l)].label??``} at ${a??``}: ${z(s).count??``} observations`)},[()=>a(z(s).intensity),()=>i(z(o).timestamp),()=>i(z(o).timestamp)]),B(`click`,u,()=>t.onCell?.(z(o).timestamp,z(l))),H(e,u)}),D(s),H(e,s)}),D(u),D(l),D(s);var d=L(s,2),f=F(d),p=F(f,!0);D(f);var m=L(f,4),h=F(m,!0);D(m);var g=L(m,2),_=F(g);D(g),D(d),D(o),R((e,t,n)=>{q(o,1,e),J(s,`aria-label`,`Distribution heatmap, ${z(r).rows.length??``} buckets over ${z(r).columns.length??``} intervals, busiest cell ${z(r).max??``}`),U(p,t),U(h,n),U(_,`busiest ${z(r).max??``}`)},[()=>K($(`flex flex-col gap-1`,t.class)),()=>i(z(r).columns[0].timestamp),()=>i(z(r).columns[z(r).columns.length-1].timestamp)]),H(e,o)};W(s,e=>{z(r).columns.length===0?e(c):e(l,-1)}),H(e,o),at()}ea([`click`]);var _R=V(`<div>No bucketed data in this window</div>`),vR=ca(`<line x1="0" stroke="var(--color-line-subtle)"></line><text x="-6" text-anchor="end" dominant-baseline="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`,1),yR=ca(`<text text-anchor="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`),bR=ca(`<path fill="var(--color-accent)"></path>`),xR=ca(`<path fill="none" stroke="var(--color-accent)" stroke-width="1.25"></path>`),SR=V(`<span><span class="text-fg-subtle"> </span> <span class="font-mono text-fg ml-1"> </span></span>`),CR=V(`<div><svg role="img" class="overflow-visible"><g><!><!><!><!></g></svg> <div class="flex items-center gap-4 text-[11px] border-t border-line pt-2"></div></div>`);function wR(e,t){it(t,!0);let n=Z(t,`quantiles`,19,()=>[.5,.9,.99]),r=Z(t,`width`,3,640),i=Z(t,`height`,3,220),a={top:8,right:12,bottom:22,left:48},o=M(()=>Math.max(1,r()-a.left-a.right)),s=M(()=>Math.max(1,i()-a.top-a.bottom)),c=M(()=>[...n()].sort((e,t)=>e-t)),l=M(()=>GL(t.points,z(c))),u=M(()=>{let e=z(l).flatMap(e=>e.points);if(e.length===0)return null;let t=e.map(e=>e.timestamp),n=e.map(e=>e.value),r=Math.min(...t),i=Math.max(...t),a=Math.max(...n);return{minTime:r,maxTime:i===r?r+1:i,maxValue:a===0?1:a}}),d=M(()=>z(u)?mL().domain([z(u).minTime,z(u).maxTime]).range([0,z(o)]):null),f=M(()=>z(u)?mL().domain([0,z(u).maxValue]).range([z(s),0]):null),p=M(()=>z(u)?VL(0,z(u).maxValue,4):[]),m=M(()=>z(u)?VL(z(u).minTime,z(u).maxTime,4):[]);function h(e){return!z(d)||!z(f)||e.points.length<2?null:AL().x(e=>z(d)(e.timestamp)).y0(z(s)).y1(e=>z(f)(e.value))(e.points)}function g(e){return!z(d)||!z(f)||e.points.length<2?null:kL().x(e=>z(d)(e.timestamp)).y(e=>z(f)(e.value))(e.points)}function _(e){return .3-e*.08}function v(e){return`p${Math.round(e*100)}`}function y(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`})}function b(e){let n=Math.round(e*10)/10;return t.unit?`${n}${t.unit}`:String(n)}let x=M(()=>z(l).map(e=>({quantile:e.quantile,value:e.points[e.points.length-1]?.value})));var S=la(),C=I(S),w=e=>{var n=_R();R(e=>{q(n,1,e),oo(n,`height:${i()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,n)},T=e=>{var n=CR(),u=F(n),S=F(u),C=F(S);G(C,16,()=>z(p),e=>e,(e,t)=>{let n=M(()=>z(f)?z(f)(t):0);var r=la(),i=I(r),a=e=>{var r=vR(),i=I(r),a=L(i),s=F(a,!0);D(a),R(e=>{J(i,`x2`,z(o)),J(i,`y1`,z(n)),J(i,`y2`,z(n)),J(a,`y`,z(n)),U(s,e)},[()=>b(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(s)&&e(a)}),H(e,r)});var w=L(C);G(w,16,()=>z(m),e=>e,(e,t)=>{let n=M(()=>z(d)?z(d)(t):0);var r=la(),i=I(r),a=e=>{var r=yR(),i=F(r,!0);D(r),R(e=>{J(r,`x`,z(n)),J(r,`y`,z(s)+14),U(i,e)},[()=>y(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(o)&&e(a)}),H(e,r)});var T=L(w);G(T,19,()=>[...z(l)].reverse(),e=>e.quantile,(e,t,n)=>{let r=M(()=>h(z(t)));var i=la(),a=I(i),o=e=>{var i=bR();R((e,t)=>{J(i,`d`,z(r)),J(i,`opacity`,e),J(i,`data-testid`,`band-${t??``}`)},[()=>_(z(l).length-1-z(n)),()=>v(z(t).quantile)]),H(e,i)};W(a,e=>{z(r)&&e(o)}),H(e,i)}),G(L(T),17,()=>z(l),e=>e.quantile,(e,t)=>{let n=M(()=>g(z(t)));var r=la(),i=I(r),a=e=>{var r=xR();R(e=>{J(r,`d`,z(n)),J(r,`data-testid`,`line-${e??``}`)},[()=>v(z(t).quantile)]),H(e,r)};W(i,e=>{z(n)&&e(a)}),H(e,r)}),D(S),D(u);var ee=L(u,2);G(ee,21,()=>z(x),e=>e.quantile,(e,t)=>{var n=SR(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a),D(n),R((e,t)=>{U(i,e),U(o,t)},[()=>v(z(t).quantile),()=>z(t).value===void 0?`—`:b(z(t).value)]),H(e,n)}),D(ee),D(n),R((e,t)=>{q(n,1,e),J(u,`width`,r()),J(u,`height`,i()),J(u,`viewBox`,`0 0 ${r()??``} ${i()??``}`),J(u,`aria-label`,`Percentile bands: ${t??``}`),J(S,`transform`,`translate(${a.left??``},${a.top??``})`)},[()=>K($(`flex flex-col gap-2`,t.class)),()=>z(c).map(v).join(`, `)]),H(e,n)};W(C,e=>{z(u)?e(T,-1):e(w)}),H(e,S),at()}var TR=V(`<button type="button"><!> </button>`),ER=V(`<div class="flex rounded border border-line overflow-hidden" role="group" aria-label="Chart type"></div>`),DR=V(`<option> </option>`),OR=V(`<label class="flex items-center gap-1.5 text-[11px] text-fg-muted cursor-pointer" title="Show cumulative or delta counter change per second"><input type="checkbox" class="w-3 h-3 rounded border-line"/> Rate</label>`),kR=V(`<label class="flex items-center gap-1.5 text-[11px] text-fg-muted cursor-pointer" title="Stack the series so each sits on the sum of those below"><input type="checkbox" class="w-3 h-3 rounded border-line"/> <!> Stack</label>`),AR=V(`<label class="flex items-center gap-1 text-[11px] text-fg-muted"><span class="text-fg-subtle">Summarise</span> <select aria-label="Summary statistic" class="rounded border border-line bg-surface px-1.5 py-1 text-[11px] text-fg"></select></label> <!> <!>`,1),jR=V(`<div><!> <!></div>`);function MR(e,t){it(t,!0);let n=M(()=>t.kind===`histogram`||t.kind===`exponentialHistogram`),r=M(()=>t.kind!==`gauge`),i=M(()=>t.kind===`sum`),a=[{id:`timeseries`,label:`Time series`,icon:Bh},{id:`percentiles`,label:`Percentiles`,icon:mp},{id:`heatmap`,label:`Heatmap`,icon:mm}],o=M(()=>z(n)?a:a.filter(e=>e.id===`timeseries`)),s=[{id:`sum`,label:`Sum`},{id:`avg`,label:`Avg`},{id:`min`,label:`Min`},{id:`max`,label:`Max`},{id:`last`,label:`Last`},{id:`count`,label:`Count`}];var c=jR(),l=F(c),u=e=>{var n=ER();G(n,21,()=>z(o),e=>e.id,(e,n)=>{let r=M(()=>z(n).icon);var i=TR(),a=F(i);Ra(a,()=>z(r),(e,t)=>{t(e,{size:11})});var o=L(a);D(i),R(e=>{J(i,`aria-pressed`,t.mode===z(n).id),J(i,`title`,z(n).label),q(i,1,e),U(o,` ${z(n).label??``}`)},[()=>K($(`flex items-center gap-1 px-2 py-1 text-[11px] transition-colors`,`focus-visible:outline-none focus-visible:bg-hover`,t.mode===z(n).id?`bg-selected text-fg font-medium`:`text-fg-muted hover:bg-hover`))]),B(`click`,i,()=>t.onMode(z(n).id)),H(e,i)}),D(n),H(e,n)};W(l,e=>{z(o).length>1&&e(u)});var d=L(l,2),f=e=>{var n=AR(),a=I(n),o=L(F(a),2);G(o,21,()=>s,e=>e.id,(e,t)=>{var n=DR(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).label),i!==(i=z(t).id)&&(n.value=(n.__value=z(t).id)??``)}),H(e,n)}),D(o);var c;co(o),D(a);var l=L(a,2),u=e=>{var n=OR(),r=F(n);xo(r),Ke(),D(n),R(()=>Co(r,t.rate)),B(`change`,r,e=>t.onRate(e.currentTarget.checked)),H(e,n)};W(l,e=>{z(i)&&e(u)});var d=L(l,2),f=e=>{var n=kR(),r=F(n);xo(r),Sm(L(r,2),{size:11}),Ke(),D(n),R(()=>Co(r,t.stacked)),B(`change`,r,e=>t.onStacked(e.currentTarget.checked)),H(e,n)};W(d,e=>{z(r)&&e(f)}),R(()=>{c!==(c=t.aggregate)&&(o.value=(o.__value=t.aggregate)??``,so(o,t.aggregate))}),B(`change`,o,e=>t.onAggregate(e.currentTarget.value)),H(e,n)};W(d,e=>{t.mode===`timeseries`&&e(f)}),D(c),R(e=>q(c,1,e),[()=>K($(`flex items-center gap-3 flex-wrap`,t.class))]),H(e,c),at()}ea([`click`,`change`]);var NR=V(`<button type="button" title="Delete this metric stream" aria-label="Delete selected metric" class="p-1.5 hover:bg-danger-bg rounded transition-colors text-fg-subtle hover:text-danger"><!></button>`),PR=V(`<div role="alert" class="m-4 rounded border border-danger-border bg-danger-bg px-3 py-2 text-xs text-danger"> </div>`),FR=V(`<div class="flex-1 flex items-center justify-center text-sm text-fg-subtle">No metrics received yet. Point an OTLP exporter at this server.</div>`),IR=V(`<span> </span>`),LR=V(`<button type="button" role="option"><div class="flex items-center justify-between gap-2"><span class="text-xs font-medium text-fg truncate"> </span> <!></div> <div class="mt-0.5 flex items-center gap-2 text-[10px] text-fg-subtle"><span class="uppercase tracking-wide"> </span> <!> <span> </span></div></button>`),RR=V(`<div class="p-3 text-xs text-fg-subtle">No metric matches that filter.</div>`),zR=V(`<div class="text-sm text-fg-subtle">Select a metric.</div>`),BR=V(`<p class="text-xs text-fg-muted mt-0.5"> </p>`),VR=V(`<div class="text-xs text-fg-subtle">No data for this metric in the selected window.</div>`),HR=V(`<button type="button"><span class="w-2.5 h-2.5 rounded-sm shrink-0"></span> <span class="truncate text-fg-muted font-mono"> </span> <span class="ml-auto font-mono text-fg tabular-nums"> </span></button>`),UR=V(`<div class="mt-3 border-t border-line pt-2 space-y-1" role="group" aria-label="Series"></div>`),WR=V(`<div class="mb-3"><h4 class="text-sm font-semibold text-fg"> </h4> <!></div> <!> <!> <!>`,1),GR=V(`<div class="flex-1 flex min-h-0"><div class="w-72 shrink-0 border-r border-line flex flex-col min-h-0"><div class="p-2 border-b border-line"><!></div> <div class="flex-1 overflow-auto" role="listbox" aria-label="Metrics"><!> <!></div></div> <div class="flex-1 min-w-0 overflow-auto p-4"><!></div></div>`),KR=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between px-4 py-2 border-b border-line gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg shrink-0"><!> Metrics</h3> <!> <div class="flex items-center gap-1"><!> <button type="button" title="Refresh" aria-label="Refresh metrics" class="p-1.5 hover:bg-hover rounded transition-colors text-fg-subtle"><!></button></div></div> <!> <!></div>`);function qR(e,t){it(t,!0);function n(){let e=ul.value;return(e?Zo(e):null)??globalThis.location.origin}let r=N(_r([])),i=N(null),a=N(_r([])),o=N(null),s=N(!1),c=N(``),l=M(()=>dl.value),u=N(_r(new Set)),d=N(`timeseries`),f=N(`sum`),p=N(!1),m=N(!0),h=()=>({fetch:globalThis.fetch.bind(globalThis),baseUrl:n()});async function g(e=z(c)){let t=await sF(h(),e);t.status===`ok`?(P(r,t.data,!0),P(o,null),!z(i)&&z(r).length>0&&v(z(r)[0].name)):t.status===`error`&&P(o,t.message,!0)}async function _(e){P(s,!0);let t=await cF({name:e,window:ks(Cs(dl.value,Date.now()))},h());t.status!==`aborted`&&(P(s,!1),t.status===`ok`?(P(a,t.data,!0),P(o,null)):P(o,t.message,!0))}function v(e){P(i,e,!0),P(u,new Set,!0),P(d,`timeseries`),P(f,`sum`),P(p,!1),_(e)}function y(){g(),z(i)&&_(z(i))}function b(e){dl.value=e,z(i)&&_(z(i))}function x(e,t){Au(e),Vc(e,t),ku(`traces`)}function S(e){let t=new Set(z(u));t.has(e)?t.delete(e):t.add(e),P(u,t,!0)}async function C(){if(!z(i)||!globalThis.confirm(`Delete every stored series for “${z(i)}”?`))return;let e=await lF(z(i),h());if(e.status!==`ok`){e.status===`error`&&P(o,e.message,!0);return}P(i,null),P(a,[],!0),await g(``)}Lr(()=>{let e=z(c),t=setTimeout(()=>void g(e),200);return()=>clearTimeout(t)});let w=M(()=>z(r).find(e=>e.name===z(i))),T=M(()=>z(w)?.kind===`histogram`||z(w)?.kind===`exponentialHistogram`),ee=M(()=>z(a).map(e=>({...e,points:z(m)?PL(e.points,e.temporality):e.points}))),te=M(()=>z(a).flatMap(e=>e.points).sort((e,t)=>e.timestamp-t.timestamp)),ne=M(()=>z(r)),re=M(()=>z(a).map(e=>({id:e.seriesId,color:fg(e.seriesId).stroke,label:ie(e),value:BL(z(m)?PL(e.points,e.temporality):e.points,e.kind===`gauge`?`last`:z(f))})));function ie(e){let t=Object.entries(e.attributes),n=Object.entries(e.resource??{}).filter(([e])=>e!==`service.name`);return[...t,...n].map(([e,t])=>`${e}=${String(t)}`).join(` `)||e.service}function ae(e,t){return e===void 0?`—`:`${(Math.round(e*100)/100).toLocaleString(void 0,{maximumFractionDigits:2})}${t&&t!==`1`?` ${t}`:``}${z(m)&&z(w)?.kind===`sum`?`/s`:``}`}var oe=KR(),se=F(oe),ce=F(se);gp(F(ce),{size:16}),Ke(),D(ce);var le=L(ce,2);sA(le,{get selection(){return z(l)},onChange:b});var E=L(le,2),ue=F(E),de=e=>{var t=NR();Rh(F(t),{size:14}),D(t),B(`click`,t,C),H(e,t)};W(ue,e=>{z(i)&&e(de)});var fe=L(ue,2),pe=F(fe);{let e=M(()=>z(s)?`animate-spin`:``);uh(pe,{size:14,get class(){return z(e)}})}D(fe),D(E),D(se);var me=L(se,2),he=e=>{var t=PR(),n=F(t,!0);D(t),R(()=>U(n,z(o))),H(e,t)};W(me,e=>{z(o)&&e(he)});var ge=L(me,2),_e=e=>{H(e,FR())},ve=e=>{var t=GR(),n=F(t),r=F(n);P_(F(r),{get value(){return z(c)},onValue:e=>P(c,e,!0),placeholder:`Filter metrics…`,ariaLabel:`Filter metrics`}),D(r);var o=L(r,2),s=F(o);G(s,17,()=>z(ne),e=>e.name+e.kind,(e,t)=>{var n=LR(),r=F(n),o=F(r),s=F(o,!0);D(o);var c=L(o,2),l=e=>{{let n=M(()=>z(m)?PL(z(a)[0].points,z(a)[0].temporality):z(a)[0].points);NL(e,{get points(){return z(n)},width:48,height:14,get ariaLabel(){return`${z(t).name??``} trend`}})}};W(c,e=>{z(t).name===z(i)&&z(a).length>0&&e(l)}),D(r);var u=L(r,2),d=F(u),f=F(d,!0);D(d);var p=L(d,2),h=e=>{var n=IR(),r=F(n,!0);D(n),R(()=>U(r,z(t).unit)),H(e,n)};W(p,e=>{z(t).unit&&z(t).unit!==`1`&&e(h)});var g=L(p,2),_=F(g);D(g),D(u),D(n),R(e=>{J(n,`aria-selected`,z(t).name===z(i)),q(n,1,e),U(s,z(t).name),U(f,z(t).kind),U(_,`${z(t).seriesCount??``}
|
|
29
|
-
series`)},[()=>K($(`w-full text-left px-3 py-2 border-b border-line-subtle hover:bg-hover`,`focus-visible:outline-none focus-visible:bg-hover`,z(t).name===z(i)&&`bg-selected`))]),B(`click`,n,()=>v(z(t).name)),H(e,n)});var l=L(s,2),h=e=>{H(e,RR())};W(l,e=>{z(ne).length===0&&e(h)}),D(o),D(n);var g=L(n,2),_=F(g),y=e=>{H(e,zR())},b=e=>{var t=WR(),n=I(t),r=F(n),i=F(r,!0);D(r);var o=L(r,2),s=e=>{var t=BR(),n=F(t,!0);D(t),R(()=>U(n,z(w).description)),H(e,t)};W(o,e=>{z(w).description&&e(s)}),D(n);var c=L(n,2);MR(c,{get kind(){return z(w).kind},get mode(){return z(d)},onMode:e=>P(d,e,!0),get aggregate(){return z(f)},onAggregate:e=>P(f,e,!0),get stacked(){return z(p)},onStacked:e=>P(p,e,!0),get rate(){return z(m)},onRate:e=>P(m,e,!0),class:`mb-3`});var l=L(c,2),h=e=>{H(e,VR())},g=e=>{gR(e,{get points(){return z(te)},get unit(){return z(w).unit}})},_=e=>{wR(e,{get points(){return z(te)},get unit(){return z(w).unit}})},v=e=>{lR(e,{get point(){return z(te)[z(te).length-1]},get unit(){return z(w).unit}})},y=e=>{{let t=M(()=>z(ee).length===1&&!z(p));rR(e,{get series(){return z(ee)},get isolated(){return z(u)},get stacked(){return z(p)},get area(){return z(t)},onExemplar:x})}};W(l,e=>{z(a).length===0?e(h):z(d)===`heatmap`?e(g,1):z(d)===`percentiles`?e(_,2):z(T)?e(v,3):e(y,-1)});var b=L(l,2),C=e=>{var t=UR();G(t,21,()=>z(re),e=>e.id,(e,t)=>{var n=HR(),r=F(n),i=L(r,2),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(n),R((e,i,o)=>{J(n,`aria-pressed`,e),q(n,1,i),oo(r,`background:${z(t).color??``}`),U(a,z(t).label),U(s,o)},[()=>z(u).has(z(t).id),()=>K($(`w-full flex items-center gap-2 px-1 py-0.5 rounded text-[11px] hover:bg-hover`,`focus-visible:outline-none focus-visible:bg-hover`,z(u).size>0&&!z(u).has(z(t).id)&&`opacity-40`)),()=>ae(z(t).value,z(w).unit)]),B(`click`,n,()=>S(z(t).id)),H(e,n)}),D(t),H(e,t)};W(b,e=>{z(a).length>0&&z(d)===`timeseries`&&e(C)}),R(()=>U(i,z(w).name)),H(e,t)};W(_,e=>{z(w)?e(b,-1):e(y)}),D(g),D(t),H(e,t)};W(ge,e=>{z(r).length===0?e(_e):e(ve,-1)}),D(oe),B(`click`,fe,y),H(e,oe),at()}ea([`click`]);function JR(e){let t=e.severityNumber,n=(e.severityText??``).toUpperCase();return n===`ERROR`||t!==void 0&&t>=17?`error`:n===`WARN`||n===`WARNING`||t!==void 0&&t>=13?`warn`:`info`}function YR(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function XR(e){try{return JSON.stringify({body:e.body,severity:e.severityText??null,severityNumber:e.severityNumber??null,timestamp:e.timestamp,traceId:e.traceId??null,attributes:e.attributes??{}},null,2)}catch{return YR(e.body)}}function ZR(e,t,n){if(n!==`all`){let t=JR(e);if(n===`error`&&t!==`error`||n===`warn`&&t!==`warn`&&t!==`error`||n===`info`&&t!==`info`)return!1}return F_(t.toLowerCase(),[YR(e.body),e.severityText,e.resourceName,e.traceId])}function QR(e){let t=JR(e);return t===`error`?`text-danger`:t===`warn`?`text-warning`:`text-fg-subtle`}function $R(e){let t=JR(e);return t===`error`?`bg-danger`:t===`warn`?`bg-warning`:`bg-line`}function ez(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function tz(e){try{return JSON.stringify(e.attributes??{},null,2)}catch{return`{}`}}var nz=V(`<span class="flex-shrink-0 text-fg-subtle truncate max-w-[10rem]"> </span>`),rz=V(`<button type="button" title="Go to trace" aria-label="Go to trace" class="flex-shrink-0 inline-flex items-center justify-center p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity"><!></button>`),iz=V(`<div class="font-mono text-xs break-words whitespace-pre-wrap pr-6"> </div>`),az=V(`<pre class="font-mono text-[11px] text-fg-muted whitespace-pre-wrap break-words pr-6"> </pre>`),oz=V(`<div class="flex items-center gap-1"><button type="button" class="inline-flex items-center gap-1 text-xs text-fg-muted hover:underline"><!> Go to trace</button> <!></div>`),sz=V(`<div class="pl-3 pr-2 pb-2 space-y-2"><!> <!> <!></div>`),cz=V(`<div class="group relative flex flex-col border-b border-line-subtle hover:bg-hover"><span aria-hidden="true"></span> <div class="flex items-center gap-2 pl-3 pr-2 py-1 text-xs"><button type="button" class="flex flex-1 items-center gap-2 min-w-0 text-left"><span class="font-mono tabular-nums text-fg-subtle flex-shrink-0"> </span> <span> </span> <span class="font-mono text-fg truncate min-w-0 flex-1"> </span> <!></button> <!> <!></div> <!></div>`),lz=V(`<button class="px-2 py-1 text-xs rounded text-fg-subtle hover:bg-hover transition-colors" title="Drop buffered logs received while paused">Drop buffer</button>`),uz=V(`<div class="text-center text-fg-subtle text-sm py-12">Loading logs…</div>`),dz=V(`<div class="text-center text-fg-subtle text-sm py-12">No logs yet. Send logs via AutotelLogExporter or POST /ingest/logs.</div>`),fz=V(`<div class="text-center text-fg-subtle text-sm py-12">No logs match the current filter.</div>`),pz=V(`<div class="px-4 py-3 text-center text-xs text-fg-subtle"> </div>`),mz=V(`<!> <!>`,1),hz=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3> <div class="flex items-center gap-1"><button><!> </button> <!></div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!> <!> <select class="text-xs border border-line rounded px-1.5 py-1 bg-surface text-fg-muted"><option>All</option><option>Errors</option><option>Warn+</option><option>Info</option></select></div> <div class="flex-1 overflow-auto space-y-0"><!></div></div>`);function gz(e,t){it(t,!0);let n=(e,t=p)=>{let n=M(()=>YR(t().body)),r=M(()=>QR(t())),i=M(()=>$R(t())),a=M(()=>z(c).has(t().id));var o=cz(),s=F(o),u=L(s,2),d=F(u),f=F(d),m=F(f,!0);D(f);var h=L(f,2),g=F(h,!0);D(h);var _=L(h,2),v=F(_,!0);D(_);var b=L(_,2),x=e=>{var n=nz(),r=F(n,!0);D(n),R(()=>U(r,t().resourceName)),H(e,n)};W(b,e=>{t().resourceName&&e(x)}),D(d);var S=L(d,2),C=e=>{var n=rz();Em(F(n),{size:12}),D(n),B(`click`,n,()=>y(t())),H(e,n)};W(S,e=>{t().traceId&&e(C)});var w=L(S,2);{let e=M(()=>XR(t()));Y_(w,{get value(){return z(e)},label:`Copy log as JSON`,class:`flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(u);var T=L(u,2),ee=e=>{var r=sz(),i=F(r);j_(i,{get content(){return z(n)},children:(e,t)=>{var r=iz(),i=F(r,!0);D(r),R(()=>U(i,z(n))),H(e,r)},$$slots:{default:!0}});var a=L(i,2),o=e=>{{let n=M(()=>tz(t()));j_(e,{get content(){return z(n)},children:(e,n)=>{var r=az(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>tz(t())]),H(e,r)},$$slots:{default:!0}})}},s=M(()=>t().attributes&&Object.keys(t().attributes).length>0);W(a,e=>{z(s)&&e(o)});var c=L(a,2),l=e=>{var n=oz(),r=F(n);Em(F(r),{size:12}),Ke(),D(r),Y_(L(r,2),{get value(){return t().traceId},label:`Copy trace ID`}),D(n),B(`click`,r,()=>y(t())),H(e,n)};W(c,e=>{t().traceId&&e(l)}),D(r),H(e,r)};W(T,e=>{z(a)&&e(ee)}),D(o),R((e,r,i)=>{q(s,1,e),J(d,`aria-expanded`,z(a)),J(d,`title`,z(a)?`Collapse log`:`Expand log`),U(m,r),q(h,1,i),U(g,t().severityText??`LOG`),U(v,z(n))},[()=>K($(`absolute inset-y-0 left-0 w-0.5`,z(i))),()=>ez(t().timestamp),()=>K($(`flex-shrink-0 font-medium uppercase tracking-wide text-[10px]`,z(r)))]),B(`click`,d,()=>l(t().id)),H(e,o)},r=M(()=>Wl.value),i=M(()=>xl.value),a=M(()=>Tl.value),o=N(``),s=N(`all`),c=N(_r(new Set));function l(e){let t=new Set(z(c));t.has(e)?t.delete(e):t.add(e),P(c,t,!0)}let u=OA({client:{fetch:globalThis.fetch.bind(globalThis),baseUrl:()=>(ul.value?Zo(ul.value):null)??globalThis.location.origin}});Lr(()=>()=>u.dispose());let d=N(null),f=N(_r([]));Lr(()=>{let e=(ul.value?Zo(ul.value):null)??globalThis.location.origin;e!==z(d)&&(P(d,e,!0),uA(`logs`,{fetch:globalThis.fetch.bind(globalThis),baseUrl:e}).then(e=>P(f,e,!0)),u.refresh())});let m=N(0);Lr(()=>{let e=z(r).length;e>z(m)&&u.arrived(e-z(m)),P(m,e,!0)});let h=M(()=>u.results.value),g=M(()=>{let e=u.ready.value&&u.failure.value===null,t=z(r);return e&&(t=z(o).length>0?z(h):_(z(h),z(r))),t.filter(t=>ZR(t,e?``:z(o),z(s)))});function _(e,t){let n=new Set(e.map(e=>e.id));return[...e,...t.filter(e=>!n.has(e.id))]}let v=M(()=>z(o).length>0||z(s)!==`all`);function y(e){e.traceId&&(Au(e.traceId),ku(`traces`))}var b=hz(),x=F(b),S=F(x),C=F(S);em(C,{size:16});var w=L(C);D(S);var T=L(S,2),ee=F(T),te=F(ee),ne=e=>{nh(e,{size:12})},re=e=>{Qm(e,{size:12})};W(te,e=>{z(i)?e(ne):e(re,-1)});var ie=L(te);D(ee);var ae=L(ee,2),oe=e=>{var t=lz();B(`click`,t,function(...e){Tu?.apply(this,e)}),H(e,t)};W(ae,e=>{z(i)&&z(a)>0&&e(oe)}),D(T),D(x);var se=L(x,2),ce=F(se);Ob(ce,{get value(){return u.text.value},onInput:e=>{u.setText(e),P(o,e,!0)},onSubmit:()=>u.submit(),get serverErrors(){return u.errors.value},get fields(){return z(f)},placeholder:`Filter — e.g. severity_number >= 17 AND service = api`,class:`flex-1`});var le=L(ce,2);sA(le,{get selection(){return u.window.value},onChange:e=>u.setWindow(e)});var E=L(le,2);lA(E,{get count(){return u.pending},get live(){return u.live},onResume:()=>{P(o,``),u.resume()}});var ue=L(E,2),de=F(ue);de.value=de.__value=`all`;var fe=L(de);fe.value=fe.__value=`error`;var pe=L(fe);pe.value=pe.__value=`warn`;var me=L(pe);me.value=me.__value=`info`,D(ue);var he;co(ue),D(se);var ge=L(se,2),_e=F(ge),ve=e=>{H(e,uz())},ye=e=>{H(e,dz())},be=e=>{H(e,fz())},xe=e=>{var t=mz(),r=I(t);G(r,17,()=>z(g),e=>e.id,(e,t)=>{n(e,()=>z(t))});var i=L(r,2),a=e=>{var t=pz(),n=F(t,!0);D(t),Xa(t,(e,t)=>kA?.(e,t),()=>({onReach:()=>u.loadMore(),disabled:u.loading.value})),R(()=>U(n,u.loading.value?`Loading…`:`Scroll for more`)),H(e,t)};W(i,e=>{u.nextCursor.value&&e(a)}),H(e,t)};W(_e,e=>{u.loading.value&&!u.ready.value&&z(r).length===0?e(ve):z(g).length===0&&!z(v)?e(ye,1):z(g).length===0?e(be,2):e(xe,-1)}),D(ge),D(b),R(e=>{U(w,` Logs (${z(g).length??``})`),q(ee,1,e),J(ee,`title`,z(i)?`Resume live tail`:`Pause live tail`),U(ie,` ${z(i)?`Resume${z(a)>0?` (+${z(a)})`:``}`:`Pause`}`),he!==(he=z(s))&&(ue.value=(ue.__value=z(s))??``,so(ue,z(s)))},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors`,z(i)?`bg-warning-bg text-warning hover:bg-warning-bg`:`hover:bg-hover text-fg-muted`))]),B(`click`,ee,function(...e){wu?.apply(this,e)}),B(`change`,ue,e=>P(s,e.currentTarget.value,!0)),H(e,b),at()}ea([`click`,`change`]);var _z=V(`<p class="p-3 text-xs text-fg-muted">No stack frames on this error.</p>`),vz=V(`<button type="button"><span class="font-mono text-xs text-fg"> </span> <span class="font-mono text-[11px] text-fg-subtle"> </span></button>`),yz=V(`<div class="flex flex-col items-start gap-0.5 px-3 py-2"><span class="flex items-center gap-2"><span class="font-mono text-xs text-fg-muted"> </span> <span class="rounded bg-subtle px-1.5 py-0.5 text-[10px] text-fg-subtle"> </span></span> <span class="font-mono text-[11px] text-fg-muted"> </span></div>`),bz=V(`<li><!></li>`),xz=V(`<ol class="divide-y divide-line-subtle"></ol>`);function Sz(e,t){it(t,!0);let n=Z(t,`selected`,3,null),r={dependency:`node_modules`,native:`runtime`};function i(e){return`${e.file}:${e.line}:${e.column}`}function a(e){return n()!==null&&n().file===e.file&&n().line===e.line&&n().column===e.column}var o=la(),s=I(o),c=e=>{H(e,_z())},l=e=>{var n=xz();G(n,21,()=>t.frames,Oa,(e,n)=>{let o=M(()=>z(n).kind===`app`?null:r[z(n).kind]);var s=bz(),c=F(s),l=e=>{var r=vz(),o=F(r),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(r),R((e,t)=>{q(r,1,e),U(s,z(n).function??`(anonymous)`),U(l,t)},[()=>K($(`flex w-full flex-col items-start gap-0.5 px-3 py-2 text-left transition-colors hover:bg-hover`,a(z(n))&&`bg-subtle border-l-2 border-accent`)),()=>i(z(n))]),B(`click`,r,()=>t.onselect?.(z(n))),H(e,r)},u=e=>{var t=yz(),r=F(t),a=F(r),s=F(a,!0);D(a);var c=L(a,2),l=F(c,!0);D(c),D(r);var u=L(r,2),d=F(u,!0);D(u),D(t),R(e=>{U(s,z(n).function??`(anonymous)`),U(l,z(o)),U(d,e)},[()=>i(z(n))]),H(e,t)};W(c,e=>{z(n).kind===`app`?e(l):e(u,-1)}),D(s),H(e,s)}),D(n),H(e,n)};W(s,e=>{t.frames.length===0?e(c):e(l,-1)}),H(e,o),at()}ea([`click`]);var Cz=V(`<p class="p-3 text-xs text-fg-muted">This file could not be read. It may be outside the project, or generated
|
|
30
|
-
rather than written.</p>`),
|
|
31
|
-
`)){let e=kz.exec(n);if(e){let n=jz(e[2]);t.push({function:e[1],file:n,line:Number(e[3]),column:Number(e[4]),kind:Oz(n)});continue}let r=Az.exec(n);if(r){let e=jz(r[1]);t.push({file:e,line:Number(r[2]),column:Number(r[3]),kind:Oz(e)})}}return t}var Nz=V(`<div class="overflow-hidden rounded border border-line"><!></div>`),Pz=V(`<div class="flex flex-col gap-2"><div class="overflow-hidden rounded border border-line"><!></div> <!></div>`);function Fz(e,t){it(t,!0);let n=Z(t,`context`,3,4),r=M(()=>Mz(t.stackTrace)),i=N(null),a=N(null),o=N(!1),s=0;async function c(e){P(i,e,!0),P(o,!1);let r=++s,c=await t.loadSource(e,n());r===s&&(P(a,c,!0),P(o,!0))}var l=la(),u=I(l),d=e=>{var t=Pz(),n=F(t);Sz(F(n),{get frames(){return z(r)},get selected(){return z(i)},onselect:c}),D(n);var s=L(n,2),l=e=>{var t=Nz();Dz(F(t),{get window(){return z(a)}}),D(t),H(e,t)};W(s,e=>{z(o)&&e(l)}),D(t),H(e,t)};W(u,e=>{z(r).length>0&&e(d)}),H(e,l),at()}function Iz(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var Lz=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded"> </span>`),Rz=V(`<pre class="text-xs font-mono bg-code text-fg p-2 rounded overflow-x-auto whitespace-pre-wrap"> </pre>`),zz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Stack Trace</h5> <!> <details class="mt-2"><summary class="cursor-pointer text-[11px] text-fg-subtle hover:text-fg">Raw stack</summary> <!></details></div>`),Bz=V(`<span class="px-2 py-0.5 text-xs font-mono bg-hover text-fg-muted rounded"> </span>`),Vz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Affected Operations</h5> <div class="flex flex-wrap gap-1"></div></div>`),Hz=V(`<div class="group flex items-center gap-1"><button class="flex items-center gap-1 text-xs text-fg-muted hover:text-fg font-mono"><!> <!></button> <!></div>`),Uz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Recent Traces</h5> <div class="space-y-1"></div></div>`),Wz=V(`<div class="flex gap-2"><span class="text-fg-subtle"> </span> <span class="font-mono text-fg-muted"> </span></div>`),Gz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Context</h5> <div class="text-xs space-y-0.5"></div></div>`),Kz=V(`<div class="border-t border-line p-3 bg-subtle space-y-3"><!> <!> <!> <!> <div class="text-xs text-fg-subtle pt-2 border-t border-line"><div class="flex gap-4"><span> </span> <span> </span></div></div></div>`),qz=V(`<div role="option"><button class="w-full p-3 flex items-start gap-3 hover:bg-subtle transition-colors text-left"><div class="mt-0.5"><!></div> <div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1"><span class="text-sm font-semibold text-danger"> </span> <span class="px-1.5 py-0.5 text-xs font-medium bg-danger-bg text-danger rounded"> </span> <!></div> <div class="group flex items-start gap-1 mb-2"><p class="text-sm text-fg-muted truncate"> </p> <!></div> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span class="flex items-center gap-1"><!> </span> <span class="flex items-center gap-1"><!> </span></div></div></button> <!></div>`),Jz=V(`<span class="text-xs font-normal text-fg-muted"> </span>`),Yz=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-danger-bg text-danger rounded-full"> </span>`),Xz=V(`<div class="flex gap-4 mb-4 p-3 bg-subtle rounded-md border border-line"><div class="text-sm"><span class="text-fg-muted">Groups:</span> <span class="font-semibold text-fg"> </span></div> <div class="text-sm"><span class="text-fg-muted">Total:</span> <span class="font-semibold text-fg"> </span></div> <div class="text-sm"><span class="text-fg-muted">Last hour:</span> <span class="font-semibold text-danger"> </span></div></div>`),Zz=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No errors captured</p> <p class="text-xs text-fg-subtle mt-1">Errors from failed traces will appear here</p></div>`),Qz=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No matching errors</p> <p class="text-xs text-fg-subtle mt-1">No error groups match the current filter</p></div>`),$z=V(`<div class="flex flex-col h-full p-4"><div class="flex items-center justify-between mb-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Errors <!> <!></h3> <div class="flex items-center gap-2"><select class="text-xs border border-line rounded px-2 py-1 bg-surface text-fg-muted"><option>Most Recent</option><option>Most Frequent</option></select></div></div> <!> <!> <div role="listbox" tabindex="0" aria-label="Error groups" class="flex-1 overflow-auto space-y-2 focus:outline-none"><!></div></div>`);function eB(e,t){it(t,!0);let n=(e,t=p,n=p,r=p,i=p)=>{let a=M(()=>Date.now()-t().firstSeen),o=M(()=>Date.now()-t().lastSeen);var s=qz(),c=F(s),l=F(c),u=F(l),d=e=>{bp(e,{size:16,class:`text-fg-subtle`})},f=e=>{wp(e,{size:16,class:`text-fg-subtle`})};W(u,e=>{n()?e(d):e(f,-1)}),D(l);var v=L(l,2),y=F(v),b=F(y),x=F(b,!0);D(b);var S=L(b,2),C=F(S);D(S);var w=L(S,2),T=e=>{var n=Lz(),r=F(n,!0);D(n),R(()=>U(r,t().service)),H(e,n)};W(w,e=>{t().service&&e(T)}),D(y);var ee=L(y,2),te=F(ee),ne=F(te,!0);D(te);var re=L(te,2);{let e=M(()=>`${t().type}: ${t().message}`);Y_(re,{get value(){return z(e)},label:`Copy error message`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(ee);var ie=L(ee,2),ae=F(ie),oe=F(ae);Ap(oe,{size:12});var se=L(oe);D(ae);var ce=L(ae,2),le=F(ce);Ap(le,{size:12});var E=L(le);D(ce),D(ie),D(v),D(c);var ue=L(c,2),de=e=>{var n=Kz(),r=F(n),i=e=>{var n=zz(),r=L(F(n),2);Fz(r,{get stackTrace(){return t().stackTrace},get loadSource(){return ts}});var i=L(r,2);j_(L(F(i),2),{get content(){return t().stackTrace},children:(e,n)=>{var r=Rz(),i=F(r,!0);D(r),R(()=>U(i,t().stackTrace)),H(e,r)},$$slots:{default:!0}}),D(i),D(n),H(e,n)};W(r,e=>{t().stackTrace&&e(i)});var a=L(r,2),o=e=>{var n=Vz(),r=L(F(n),2);G(r,21,()=>t().affectedSpans,Oa,(e,t)=>{var n=Bz(),r=F(n,!0);D(n),R(()=>U(r,z(t))),H(e,n)}),D(r),D(n),H(e,n)};W(a,e=>{t().affectedSpans.length>0&&e(o)});var s=L(a,2),c=e=>{var n=Uz(),r=L(F(n),2);G(r,20,()=>t().affectedTraces.slice(0,5),e=>e,(e,t)=>{var n=Hz(),r=F(n),i=F(r);vm(i,{size:10});var a=L(i);Kp(L(a),{size:10}),D(r),Y_(L(r,2),{get value(){return t},label:`Copy trace ID`,size:10,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(n),R(e=>U(a,` ${e??``}... `),[()=>t.slice(0,16)]),B(`click`,r,()=>g(t)),H(e,n)}),D(r),D(n),H(e,n)};W(s,e=>{t().affectedTraces.length>0&&e(c)});var l=L(s,2),u=e=>{var n=Gz(),r=L(F(n),2);G(r,21,()=>Object.entries(t().attributes),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=Wz(),o=F(a),s=F(o);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,`${r()??``}:`),U(l,e)},[()=>String(i())]),H(e,a)}),D(r),D(n),H(e,n)},d=M(()=>t().attributes&&Object.keys(t().attributes).length>0);W(l,e=>{z(d)&&e(u)});var f=L(l,2),p=F(f),m=F(p),h=F(m);D(m);var v=L(m,2),y=F(v);D(v),D(p),D(f),D(n),R((e,t)=>{U(h,`First seen: ${e??``}`),U(y,`Last seen: ${t??``}`)},[()=>rd(t().firstSeen),()=>rd(t().lastSeen)]),H(e,n)};W(ue,e=>{n()&&e(de)}),D(s),R((e,n)=>{J(s,`aria-selected`,i()),J(s,`data-row-index`,r()),q(s,1,`border border-line rounded-md bg-surface overflow-hidden${i()?` ring-1 ring-inset ring-accent bg-accent/10`:``}`),U(x,t().type),U(C,`${t().count??``}x`),U(ne,t().message),U(se,` First: ${e??``}`),U(E,` Last: ${n??``}`)},[()=>Iz(z(a)),()=>Iz(z(o))]),B(`click`,c,()=>{m.cursor=r(),h(t().fingerprint)}),H(e,s)};function r(e,t){return F_(t.toLowerCase(),[e.type,e.message,...e.affectedTraces])}let i=N(`recent`),a=N(null),o=N(``),s=N(void 0),c=M(()=>z(i)===`recent`?nu.value:ru.value),l=M(()=>z(c).filter(e=>r(e,z(o)))),u=M(()=>z(o).length>0),d=M(()=>iu.value),f=M(()=>au.value),m=NA({count:()=>z(l).length,onActivate:e=>{let t=z(l)[e];t&&h(t.fingerprint)},scrollToIndex:e=>z(s)?.querySelector(`[data-row-index="${e}"]`)?.scrollIntoView({block:`nearest`})});function h(e){P(a,z(a)===e?null:e,!0)}function g(e){Au(e),ku(`traces`)}var v=$z(),y=F(v),b=F(y),x=F(b);Hh(x,{size:16,class:`text-danger`});var S=L(x,2),C=e=>{var t=Jz(),n=F(t);D(t),R(()=>U(n,`(${z(l).length??``} of ${z(c).length??``})`)),H(e,t)};W(S,e=>{z(u)&&e(C)});var w=L(S,2),T=e=>{var t=Yz(),n=F(t,!0);D(t),R(()=>U(n,z(d))),H(e,t)};W(w,e=>{z(d)>0&&e(T)}),D(b);var ee=L(b,2),te=F(ee),ne=F(te);ne.value=ne.__value=`recent`;var re=L(ne);re.value=re.__value=`frequent`,D(te);var ie;co(te),D(ee),D(y);var ae=L(y,2),oe=e=>{P_(e,{class:`mb-4`,inputClass:`border-line bg-subtle text-fg focus:border-line focus:ring-1 focus:ring-accent`,placeholder:`Filter by type, message, trace id…`,ariaLabel:`Filter errors`,get value(){return z(o)},set value(e){P(o,e,!0)}})};W(ae,e=>{z(c).length>0&&e(oe)});var se=L(ae,2),ce=e=>{var t=Xz(),n=F(t),r=L(F(n),2),i=F(r,!0);D(r),D(n);var a=L(n,2),o=L(F(a),2),s=F(o,!0);D(o),D(a);var p=L(a,2),m=L(F(p),2),h=F(m,!0);D(m),D(p),D(t),R(()=>{U(i,z(u)?`${z(l).length} of ${z(c).length}`:z(c).length),U(s,z(d)),U(h,z(f))}),H(e,t)};W(se,e=>{z(d)>0&&e(ce)});var le=L(se,2),E=F(le),ue=e=>{var t=Zz();Hh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},de=e=>{var t=Qz();bh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},fe=e=>{var t=la();G(I(t),19,()=>z(l),e=>e.fingerprint,(e,t,r)=>{n(e,()=>z(t),()=>z(a)===z(t).fingerprint,()=>z(r),()=>m.cursor===z(r))}),H(e,t)};W(E,e=>{z(c).length===0?e(ue):z(l).length===0?e(de,1):e(fe,-1)}),D(le),Vo(le,e=>P(s,e),()=>z(s)),D(v),R(()=>{ie!==(ie=z(i))&&(te.value=(te.__value=z(i))??``,so(te,z(i)))}),B(`change`,te,e=>P(i,e.target.value,!0)),B(`keydown`,le,function(...e){m.onKeyDown?.apply(this,e)}),H(e,v),at()}ea([`click`,`change`,`keydown`]);var tB={info:0,warning:1,error:2,critical:3};function nB(e,t=`info`){return typeof e==`string`&&e in tB?e:t}function rB(e,t){return tB[e]>=tB[t]}var iB={marker:`autotel.security`,forceKeep:`autotel.security.force_keep`,event:`security.event`,category:`security.category`,outcome:`security.outcome`,severity:`security.severity`,actorId:`security.actor_id`,targetType:`security.target_type`,targetId:`security.target_id`,tenantId:`security.tenant_id`,reason:`security.reason`,droppedKeys:`security.dropped_keys`,suspiciousRequest:`security.suspicious_request`,signal:`security.signal`};function aB(e){return typeof e==`string`&&e.length>0?e:void 0}function oB(e,t){let n=e.attributes??{},r=aB(n[iB.event]),i=n[iB.suspiciousRequest]===!0;return!r&&!i?null:{traceId:e.traceId,spanId:e.spanId,spanName:e.name,service:t,timestamp:e.startTime,event:r,category:aB(n[iB.category]),outcome:aB(n[iB.outcome]),severity:nB(n[iB.severity],i?`warning`:`info`),reason:aB(n[iB.reason]),suspicious:i,signal:aB(n[iB.signal])}}function sB(e){let t=[];for(let n of e)for(let e of n.spans){let r=oB(e,n.service);r&&t.push(r)}return t.sort((e,t)=>t.timestamp-e.timestamp)}function cB(e){let t={info:0,warning:0,error:0,critical:0};for(let n of e)t[n.severity]+=1;return t}function lB(e,t){return rB(e.severity,t)}function uB(e){switch(e){case`critical`:return`bg-red-100 text-red-700`;case`error`:return`bg-orange-100 text-orange-700`;case`warning`:return`bg-amber-100 text-amber-700`;default:return`bg-hover text-fg-muted`}}var dB=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-red-100 text-red-700 rounded-full"> </span>`),fB=V(`<div class="flex gap-4 mb-4 p-3 bg-subtle rounded-md border border-line"><div class="text-sm"><span class="text-fg-muted">Critical:</span> <span class="font-semibold text-red-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Error:</span> <span class="font-semibold text-orange-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Warning:</span> <span class="font-semibold text-amber-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Info:</span> <span class="font-semibold text-fg"> </span></div></div>`),pB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No security events captured</p> <p class="text-xs text-fg-subtle mt-1">Spans with security.* attributes (autotel-audit) will appear here</p></div>`),mB=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded"> </span>`),hB=V(`<span class="text-fg-subtle"> </span>`),gB=V(`<div class="border border-line rounded-md bg-surface p-3"><div class="flex items-center gap-2 mb-1"><!> <span class="text-sm font-semibold text-fg"> </span> <span> </span> <!> <!> <!></div> <p class="text-xs text-fg-muted truncate mb-2 font-mono"> <!></p> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span> </span> <button class="flex items-center gap-1 text-fg-muted hover:text-fg font-mono"><!> <!></button></div></div>`),_B=V(`<div class="flex flex-col h-full p-4"><div class="flex items-center justify-between mb-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Security <!></h3> <select class="text-xs border border-line rounded px-2 py-1 bg-surface text-fg-muted"><option>All severities</option><option>Warning+</option><option>Error+</option><option>Critical only</option></select></div> <!> <div class="flex-1 overflow-auto space-y-2"><!></div></div>`);function vB(e,t){it(t,!0);let n=N(`info`),r=M(()=>sB(hl.value)),i=M(()=>cB(z(r))),a=M(()=>z(r).filter(e=>lB(e,z(n))));function o(e,t){Au(e,t),ku(`traces`)}function s(e){return e.event?e.event:e.signal?`probe: ${e.signal}`:`suspicious request`}var c=_B(),l=F(c),u=F(l),d=F(u);Eh(d,{size:16,class:`text-red-500`});var f=L(d,2),p=e=>{var t=dB(),n=F(t,!0);D(t),R(()=>U(n,z(r).length)),H(e,t)};W(f,e=>{z(r).length>0&&e(p)}),D(u);var m=L(u,2),h=F(m);h.value=h.__value=`info`;var g=L(h);g.value=g.__value=`warning`;var _=L(g);_.value=_.__value=`error`;var v=L(_);v.value=v.__value=`critical`,D(m);var y;co(m),D(l);var b=L(l,2),x=e=>{var t=fB(),n=F(t),r=L(F(n),2),a=F(r,!0);D(r),D(n);var o=L(n,2),s=L(F(o),2),c=F(s,!0);D(s),D(o);var l=L(o,2),u=L(F(l),2),d=F(u,!0);D(u),D(l);var f=L(l,2),p=L(F(f),2),m=F(p,!0);D(p),D(f),D(t),R(()=>{U(a,z(i).critical),U(c,z(i).error),U(d,z(i).warning),U(m,z(i).info)}),H(e,t)};W(b,e=>{z(r).length>0&&e(x)});var S=L(b,2),C=F(S),w=e=>{var t=pB();Eh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},T=e=>{var t=la();G(I(t),17,()=>z(a),e=>e.traceId+e.spanId,(e,t)=>{var n=gB(),r=F(n),i=F(r),a=e=>{ch(e,{size:14,class:`text-amber-500`})};W(i,e=>{z(t).suspicious&&e(a)});var c=L(i,2),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u);var f=L(u,2),p=e=>{var n=mB(),r=F(n,!0);D(n),R(()=>U(r,z(t).category)),H(e,n)};W(f,e=>{z(t).category&&e(p)});var m=L(f,2),h=e=>{var n=mB(),r=F(n,!0);D(n),R(()=>U(r,z(t).outcome)),H(e,n)};W(m,e=>{z(t).outcome&&e(h)});var g=L(m,2),_=e=>{var n=mB(),r=F(n,!0);D(n),R(()=>U(r,z(t).service)),H(e,n)};W(g,e=>{z(t).service&&e(_)}),D(r);var v=L(r,2),y=F(v),b=L(y),x=e=>{var n=hB(),r=F(n);D(n),R(()=>U(r,`— ${z(t).reason??``}`)),H(e,n)};W(b,e=>{z(t).reason&&e(x)}),D(v);var S=L(v,2),C=F(S),w=F(C,!0);D(C);var T=L(C,2),ee=F(T);vm(ee,{size:10});var te=L(ee);Kp(L(te),{size:10}),D(T),D(S),D(n),R((e,n,r,i)=>{U(l,e),q(u,1,n),U(d,z(t).severity),U(y,`${z(t).spanName??``} `),U(w,r),U(te,` ${i??``}... `)},[()=>s(z(t)),()=>`px-1.5 py-0.5 text-xs font-medium rounded `+uB(z(t).severity),()=>rd(z(t).timestamp),()=>z(t).traceId.slice(0,16)]),B(`click`,T,()=>o(z(t).traceId,z(t).spanId)),H(e,n)}),H(e,t)};W(C,e=>{z(a).length===0?e(w):e(T,-1)}),D(S),D(c),R(()=>{y!==(y=z(n))&&(m.value=(m.__value=z(n))??``,so(m,z(n)))}),B(`change`,m,e=>P(n,e.target.value,!0)),H(e,c),at()}ea([`change`,`click`]);async function yB(e,t){let n;try{n=await t.fetch(`${t.baseUrl}/api/analysis/compare`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e),signal:t.signal})}catch(e){return e?.name===`AbortError`?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}let r;try{r=await n.json()}catch{return{status:`error`,message:`Unexpected response (not JSON)`}}let i=r;if(n.status===501)return{status:`unavailable`,message:i.message??`Comparison is unavailable on this server.`};if(n.status===400)return{status:`invalid`,message:i.message??i.error??`Invalid query`};if(!n.ok)return{status:`error`,message:i.error??n.statusText};let a=i.outlierCount??0,o=i.baselineCount??0;return a===0||o===0?{status:`empty`,outlierCount:a,baselineCount:o}:{status:`ok`,differences:i.differences??[],outlierCount:a,baselineCount:o}}var bB=V(`<!> Mark now`,1),xB=V(`<!> Comparing since mark`,1),SB=V(`<option> </option>`),CB=V(`<div class="mb-2 grid grid-cols-2 gap-2"><label class="block text-[11px] text-fg-muted">Arm <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"></select></label> <label class="block text-[11px] text-fg-muted">Against <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"><option>Every other arm</option><!></select></label></div>`),wB=V(`<label class="mb-2 block text-[11px] text-fg-muted">Experiment <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"><option>Compare by query instead</option><!></select></label> <!>`,1),TB=V(`<label class="mb-1 block text-[11px] text-fg-muted">Investigating <input placeholder="duration > 500" class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 font-mono text-xs text-fg focus:border-accent focus:outline-none"/></label>`),EB=V(`<p class="mb-1 text-[11px] text-fg-subtle">Comparing spans since the mark against those before it, within the
|
|
32
|
-
current time window.</p>`),
|
|
27
|
+
devtools and it appears here.</p></div>`),$N=V(`<option> </option>`),eP=V(`<select class="text-xs bg-surface border border-line rounded px-2 py-1 text-fg max-w-[16rem]"></select>`),tP=V(`<div class="flex items-center gap-1.5 text-xs font-medium text-fg-muted"><!> </div>`),nP=V(`<span> </span>`),rP=V(`<div class="flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-accent/10 border border-accent/30 text-[11px] font-medium text-accent" title="Total LLM tokens and cost for this trace"><!> <!> <span class="font-mono text-accent/80"> </span></div>`),iP=V(`<span class="text-[10px] text-fg-muted whitespace-nowrap"> </span>`),aP=V(`<div class="flex items-center gap-1 text-[10px] text-fg-subtle"><span></span> </div>`),oP=V(`<div class="absolute left-1/2 top-3 -translate-x-1/2 z-10 px-3 py-1.5 rounded border border-line bg-subtle text-xs text-fg-muted shadow-sm"> </div>`),sP=ca(`<text text-anchor="middle" class="fill-fg-subtle text-[10px]" dy="-2"> </text>`),cP=ca(`<path fill="none" stroke-width="1.5" marker-end="url(#flow-arrow)"></path><!>`,1),lP=ca(`<g><rect width="28" height="16" rx="8"></rect><text text-anchor="middle" dominant-baseline="central" class="fill-white text-[10px] font-semibold"> </text></g>`),uP=ca(`<g role="button" tabindex="0"><rect rx="8"></rect><text text-anchor="middle" dominant-baseline="central"> </text><!></g>`),dP=V(`<button type="button" class="ml-auto shrink-0 inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors" title="Open this span in the Traces waterfall"><!> Traces</button> <!>`,1),fP=V(`<span>·</span> <span class="text-danger"> </span>`,1),pP=V(`<span>·</span> <span> </span>`,1),mP=V(`<span class="font-medium"> </span> <span class="text-fg-subtle">·</span>`,1),hP=V(`<div class="mt-1.5 flex items-center gap-1.5 text-[11px] text-accent"><!> <!> <span class="font-mono text-accent/80"> </span></div>`),gP=V(`<div class="px-3 py-2 border-b border-line"><!></div>`),_P=V(`<div class="px-3 py-2 border-b border-success-border bg-success-bg"><!></div>`),vP=V(`<div class="px-3 py-3 text-xs text-fg-subtle flex items-center gap-1.5"><!> No input/output captured for this node.</div>`),yP=V(`<div class="w-80 shrink-0 border-l border-line overflow-y-auto bg-surface"><div class="px-3 py-2.5 border-b border-line"><div class="group flex items-center gap-1.5"><span></span> <span class="font-mono text-sm font-medium text-fg truncate"> </span> <!> <!></div> <div class="mt-1 flex items-center gap-2 text-[11px] text-fg-subtle flex-wrap"><span class="uppercase tracking-wide"> </span> <span>·</span> <span> </span> <!> <!></div> <!></div> <!> <!> <!></div>`),bP=V(`<div class="flex flex-col h-full"><div class="flex items-center gap-3 px-3 py-1.5 border-b border-line bg-subtle/50 flex-wrap"><!> <!> <!> <div class="flex items-center gap-3 flex-wrap"><!> <!></div></div> <div class="flex flex-1 overflow-hidden"><div class="relative flex-1 overflow-auto bg-surface focus:outline-none" role="application" aria-label="Flow call graph — arrow keys to navigate, Enter to open in Traces" tabindex="0"><!> <svg class="min-w-full" role="presentation"><defs><marker id="flow-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" class="fill-fg-subtle"></path></marker></defs><!><!></svg></div> <!></div></div>`);function xP(e,t){it(t,!0);let n=M(()=>vl.value),r=N(null),i=N(null),a=M(()=>z(n).find(e=>e.traceId===z(r))??z(n)[0]),o=M(()=>{let e=new Map;if(!z(a))return e;let t=tu.value.filter(e=>e.traceId===z(a).traceId),n=e=>e?.source===`table`?e.total:void 0,r=e=>e.normalized.usage.inputTokens!=null||e.normalized.usage.outputTokens!=null||n(e.normalized.cost)!=null,i=new Set(t.filter(r).map(e=>e.raw.spanId)),o=new Map(z(a).spans.map(e=>[e.spanId,e])),s=e=>{let t=e.parentSpanId;for(;t;){if(i.has(t))return!0;t=o.get(t)?.parentSpanId}return!1};for(let i of t){if(!r(i)||s(i.raw))continue;let{usage:t,cost:a}=i.normalized;e.set(i.raw.spanId,{inputTokens:t.inputTokens,outputTokens:t.outputTokens,costUsd:n(a)})}return e}),s=M(()=>z(a)?YN(BN(z(a).spans,{metricsBySpanId:z(o)})):null),c=M(()=>z(s)?VN(z(s).nodes):{}),l=M(()=>{let e=new Map;if(z(s))for(let t of z(s).nodes)e.set(t.id,t);return e}),u=M(()=>z(i)?z(l).get(z(i))??null:null),d=N(``);function f(e,t){return R_(t,[e.label,XN[e.role].label])}let p=M(()=>z(d).trim().length>0),m=M(()=>{let e=new Set;if(!z(s)||!z(p))return e;let t=z(d).trim().toLowerCase();for(let n of z(s).nodes)f(n,t)&&e.add(n.id);return e}),h=M(()=>z(m).size),g=M(()=>z(s)?.nodes.length??0);function _(e,t){let n=z(l).get(e),r=z(l).get(t);if(!n||!r)return``;let i=n.x+n.width/2,a=n.y+44,o=r.x+r.width/2,s=r.y,c=(a+s)/2;return`M ${i} ${a} C ${i} ${c}, ${o} ${c}, ${o} ${s}`}function v(e){P(i,z(i)===e?null:e,!0)}function y(e){!z(a)||e.spanIds.length===0||Pu(z(a).traceId,e.spanIds[0])}function b(e){let t=z(s)?.nodes??[];if(t.length===0)return;let n=z(i)?z(l).get(z(i)):void 0;if(!n){P(i,t[0].id,!0);return}if(e===`left`||e===`right`){let r=t.filter(e=>e.layer===n.layer).sort((e,t)=>e.x-t.x),a=r.findIndex(e=>e.id===n.id),o=r[e===`left`?a-1:a+1];o&&P(i,o.id,!0);return}let r=n.layer+(e===`down`?1:-1),a=t.filter(e=>e.layer===r);if(a.length===0)return;let o=n.x+n.width/2,c=a.reduce((e,t)=>Math.abs(t.x+t.width/2-o)<Math.abs(e.x+e.width/2-o)?t:e);P(i,c.id,!0)}let x=N(!1);function S(e){if(z(x))switch(e.key){case`ArrowLeft`:e.preventDefault(),b(`left`);break;case`ArrowRight`:e.preventDefault(),b(`right`);break;case`ArrowUp`:e.preventDefault(),b(`up`);break;case`ArrowDown`:e.preventDefault(),b(`down`);break;case`Enter`:z(u)&&y(z(u));break;case`Escape`:P(i,null)}}Lr(()=>(window.addEventListener(`keydown`,S),()=>window.removeEventListener(`keydown`,S)));var C=la(),w=I(C),T=e=>{var t=QN(),n=F(t);$h(F(n),{size:16}),Ke(),D(n),Ke(2),D(t),H(e,t)},ee=e=>{var t=bP(),o=F(t),f=F(o),b=e=>{var t=eP();G(t,21,()=>z(n),e=>e.traceId,(e,t)=>{var n=$N(),r=F(n);D(n);var i={};R(e=>{U(r,`${z(t).service??``} · ${e??``}`),i!==(i=z(t).traceId)&&(n.value=(n.__value=z(t).traceId)??``)},[()=>z(t).rootSpan?.name??z(t).traceId.slice(0,8)]),H(e,n)}),D(t),lo(t,()=>z(r),e=>P(r,e)),H(e,t)},S=e=>{var t=tP(),n=F(t);$h(n,{size:13});var r=L(n);D(t),R(()=>U(r,` ${z(a).rootSpan?.name??`Flow`??``}`)),H(e,t)};W(f,e=>{z(n).length>1?e(b):e(S,-1)});var C=L(f,2),w=e=>{var t=rP(),n=F(t);Lp(n,{size:11,class:`text-accent`});var r=L(n,2),i=e=>{var t=nP(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Oj(z(c).costUsd)]),H(e,t)};W(r,e=>{z(c).costUsd!=null&&e(i)});var a=L(r,2),o=F(a,!0);D(a),D(t),R(e=>U(o,e),[()=>Dj(z(c).inputTokens,z(c).outputTokens)]),H(e,t)};W(C,e=>{(z(c).costUsd!=null||z(c).inputTokens!=null)&&e(w)});var T=L(C,2);{let e=M(()=>$(`bg-subtle text-fg`,z(p)?`border-accent ring-1 ring-accent`:`border-line`));L_(T,{class:`ml-auto w-48 max-w-[14rem]`,get inputClass(){return z(e)},ariaLabel:`Search flow nodes by name or type`,placeholder:`Search nodes…`,clearTitle:`Clear search`,get value(){return z(d)},set value(e){P(d,e,!0)}})}var ee=L(T,2),te=F(ee),ne=e=>{var t=iP(),n=F(t);D(t),R(()=>U(n,`Nodes (${z(h)??``} of ${z(g)??``})`)),H(e,t)};W(te,e=>{z(p)&&e(ne)}),G(L(te,2),16,()=>ZN,e=>e,(e,t)=>{var n=aP(),r=F(n),i=L(r);D(n),R(e=>{q(r,1,e),U(i,` ${XN[t].label??``}`)},[()=>K($(`inline-block w-2 h-2 rounded-sm`,XN[t].dot))]),H(e,n)}),D(ee),D(o);var re=L(o,2),ie=F(re),ae=F(ie),oe=e=>{var t=oP(),n=F(t);D(t),R(e=>U(n,`No matches for “${e??``}”`),[()=>z(d).trim()]),H(e,t)};W(ae,e=>{z(p)&&z(h)===0&&e(oe)});var se=L(ae,2),ce=L(F(se));G(ce,17,()=>z(s).edges,e=>e.source+`>`+e.target,(e,t)=>{let n=M(()=>z(i)&&z(t).source!==z(i)&&z(t).target!==z(i));var r=cP(),a=I(r),o=L(a),s=e=>{let n=M(()=>z(l).get(z(t).source)),r=M(()=>z(l).get(z(t).target));var i=la(),a=I(i),o=e=>{var i=sP(),a=F(i);D(i),R(()=>{J(i,`x`,(z(n).x+z(n).width/2+z(r).x+z(r).width/2)/2),J(i,`y`,(z(n).y+44+z(r).y)/2),U(a,`×${z(t).count??``}`)}),H(e,i)};W(a,e=>{z(n)&&z(r)&&e(o)}),H(e,i)};W(o,e=>{z(t).count>1&&e(s)}),R((e,t)=>{J(a,`d`,e),q(a,0,t)},[()=>_(z(t).source,z(t).target),()=>K($(`stroke-fg-subtle transition-opacity`,z(n)&&`opacity-20`))]),H(e,r)}),G(L(ce),17,()=>z(s).nodes,e=>e.id,(e,t)=>{let n=M(()=>XN[z(t).role]),r=M(()=>z(t).id===z(i)),a=M(()=>z(m).has(z(t).id)),o=M(()=>z(p)&&z(a)),s=M(()=>z(p)&&!z(a)||z(i)&&!z(r)),c=M(()=>z(t).errorCount>0);var l=uP(),u=F(l),d=L(u),f=F(d,!0);D(d);var h=L(d),g=e=>{var n=lP(),r=F(n),i=L(r),a=F(i,!0);D(i),D(n),R(e=>{J(r,`x`,z(t).x+z(t).width-26),J(r,`y`,z(t).y-8),q(r,0,e),J(i,`x`,z(t).x+z(t).width-12),J(i,`y`,z(t).y),U(a,z(c)?`${z(t).count-z(t).errorCount}/${z(t).count}`:`${z(t).count}`)},[()=>K($(z(c)?`fill-red-500`:`fill-fg-muted`))]),H(e,n)};W(h,e=>{z(t).count>1&&e(g)}),D(l),R((e,n,i,a)=>{q(l,0,e),J(u,`x`,z(t).x),J(u,`y`,z(t).y),J(u,`width`,z(t).width),J(u,`height`,44),q(u,0,n),J(u,`stroke-width`,z(r)||z(o)?2.5:1.5),J(d,`x`,z(t).x+z(t).width/2),J(d,`y`,z(t).y+22),q(d,0,i),U(f,a)},[()=>K($(`cursor-pointer transition-opacity focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent`,z(s)&&`opacity-40`)),()=>K($(z(n).fill,z(o)?`stroke-accent`:z(c)?`stroke-red-500`:z(n).stroke,(z(r)||z(o))&&`stroke-[2.5px]`)),()=>K($(`text-[12px] font-medium font-mono`,z(n).text)),()=>z(t).label.length>26?z(t).label.slice(0,25)+`…`:z(t).label]),B(`click`,l,()=>v(z(t).id)),B(`keydown`,l,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(z(t).id))}),H(e,l)}),D(se),D(ie);var le=L(ie,2),E=e=>{let t=M(()=>XN[z(u).role]);var n=yP(),r=F(n),i=F(r),o=F(i),s=L(o,2),c=F(s,!0);D(s);var l=L(s,2);Q_(l,{get value(){return z(u).label},label:`Copy node name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`});var d=L(l,2),f=e=>{var t=dP(),n=I(t);Yp(F(n),{size:11}),Ke(),D(n),Q_(L(n,2),{get value(){return z(a).traceId},label:`Copy trace ID`,class:`shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),B(`click`,n,()=>y(z(u))),H(e,t)};W(d,e=>{z(u).spanIds.length>0&&e(f)}),D(i);var p=L(i,2),m=F(p),h=F(m,!0);D(m);var g=L(m,4),_=F(g);D(g);var v=L(g,2),b=e=>{var t=fP(),n=L(I(t),2),r=F(n);D(n),R(()=>U(r,`${z(u).errorCount??``} errored`)),H(e,t)};W(v,e=>{z(u).errorCount>0&&e(b)});var x=L(v,2),S=e=>{var t=pP(),n=L(I(t),2),r=F(n,!0);D(n),R(e=>U(r,e),[()=>ad(z(u).totalDurationMs)]),H(e,t)};W(x,e=>{z(u).totalDurationMs>0&&e(S)}),D(p);var C=L(p,2),w=e=>{var t=hP(),n=F(t);Lp(n,{size:11,class:`text-accent`});var r=L(n,2),i=e=>{var t=mP(),n=I(t),r=F(n,!0);D(n),Ke(2),R(e=>U(r,e),[()=>Oj(z(u).metrics.costUsd)]),H(e,t)};W(r,e=>{z(u).metrics.costUsd!=null&&e(i)});var a=L(r,2),o=F(a);D(a),D(t),R(e=>U(o,`${e??``} tokens`),[()=>Dj(z(u).metrics.inputTokens,z(u).metrics.outputTokens)]),H(e,t)};W(C,e=>{z(u).metrics&&e(w)}),D(r);var T=L(r,2),ee=e=>{var t=gP(),n=F(t);{let e=M(()=>Qj(z(u).sample.input));P_(n,{get content(){return z(e)},children:(e,t)=>{eM(e,{label:`Input`,get value(){return z(u).sample.input}})},$$slots:{default:!0}})}D(t),H(e,t)};W(T,e=>{z(u).sample.input!==void 0&&e(ee)});var te=L(T,2),ne=e=>{var t=_P(),n=F(t);{let e=M(()=>Qj(z(u).sample.output));P_(n,{get content(){return z(e)},children:(e,t)=>{eM(e,{label:`Output`,get value(){return z(u).sample.output},tone:`positive`})},$$slots:{default:!0}})}D(t),H(e,t)};W(te,e=>{z(u).sample.output!==void 0&&e(ne)});var re=L(te,2),ie=e=>{var t=vP();Lm(F(t),{size:13}),Ke(),D(t),H(e,t)};W(re,e=>{z(u).sample.input===void 0&&z(u).sample.output===void 0&&e(ie)}),D(n),R(e=>{q(o,1,e),U(c,z(u).label),U(h,z(t).label),U(_,`${z(u).count??``}
|
|
28
|
+
${z(u).count===1?`call`:`calls`}`)},[()=>K($(`inline-block w-2 h-2 rounded-sm`,z(t).dot))]),H(e,n)};W(le,e=>{z(u)&&e(E)}),D(re),D(t),R(()=>{J(se,`width`,z(s).width),J(se,`height`,z(s).height),J(se,`viewBox`,`0 0 ${z(s).width} ${z(s).height}`)}),B(`focusin`,ie,()=>P(x,!0)),B(`focusout`,ie,()=>P(x,!1)),H(e,t)};W(w,e=>{!z(a)||!z(s)||z(s).nodes.length===0?e(T):e(ee,-1)}),H(e,C),at()}ea([`focusin`,`focusout`,`click`,`keydown`]);var SP=(e,t=p,n=p)=>{var r=wP(),i=F(r),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(r),R(()=>{U(a,t()),U(s,n())}),H(e,r)},CP=(e,t=p,n=p,r=p)=>{var i=la(),a=I(i),o=e=>{var i=TP(),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(i),R(e=>{J(i,`title`,e),U(o,t()),U(c,n())},[()=>`View ${t().toLowerCase()} in the ${r()} tab`]),B(`click`,i,()=>Mu(r())),H(e,i)},s=e=>{SP(e,t,n)};W(a,e=>{n()>0?e(o):e(s,-1)}),H(e,i)},wP=V(`<div><div class="text-[11px] uppercase tracking-wide text-fg-subtle"> </div> <div class="text-sm text-fg"> </div></div>`),TP=V(`<button type="button" class="group/stat text-left rounded -m-1 p-1 hover:bg-hover transition-colors"><div class="text-[11px] uppercase tracking-wide text-fg-subtle"> </div> <div class="text-sm text-accent group-hover/stat:underline"> </div></button>`),EP=V(`<div class="border border-line rounded-md p-3 bg-surface"><div class="flex items-start justify-between gap-2 mb-2"><div><div class="text-sm font-medium text-fg"> </div> <div class="text-xs text-fg-subtle uppercase tracking-wide"> </div></div> <span> </span></div> <div class="grid grid-cols-2 gap-2 text-xs text-fg-muted sm:grid-cols-5"><!> <!> <!> <!> <!></div></div>`),DP=V(`<option> </option>`),OP=V(`<div class="text-center text-fg-subtle text-sm py-12">No resources derived yet. Send traces or logs with resource metadata.</div>`),kP=V(`<div class="space-y-2"></div>`),AP=V(`<div class="flex flex-col h-full p-4"><div class="flex flex-col gap-3 mb-4 pb-3 border-b border-line"><div class="flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3></div> <div class="flex flex-wrap gap-2"><input type="search" placeholder="Filter resources" class="px-3 py-2 text-xs border border-line rounded-md min-w-[180px]"/> <select class="px-3 py-2 text-xs border border-line rounded-md bg-surface"><option>All types</option><!></select></div></div> <div class="flex-1 overflow-auto"><!></div></div>`);function jP(e,t){it(t,!0);let n=(e,t=p)=>{var n=EP(),r=F(n),a=F(r),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a);var u=L(a,2),d=F(u,!0);D(u),D(r);var f=L(r,2),m=F(f);SP(m,()=>`Requests`,()=>t().requestCount);var h=L(m,2);CP(h,()=>`Errors`,()=>t().errorCount,()=>`errors`);var g=L(h,2);CP(g,()=>`Traces`,()=>t().traceCount,()=>`traces`);var _=L(g,2);CP(_,()=>`Logs`,()=>t().logCount,()=>`logs`);var v=L(_,2);{let e=M(()=>t().lastSeen?od(t().lastSeen):`n/a`);SP(v,()=>`Last Seen`,()=>z(e))}D(f),D(n),R(e=>{U(s,t().name),U(l,t().type),q(u,1,e),U(d,t().health)},[()=>K($(`px-2 py-1 rounded border text-[11px] font-medium capitalize`,i(t().health)))]),H(e,n)},r=[`service`,`database`,`cache`,`messaging`,`external`,`unknown`];function i(e){switch(e){case`healthy`:return`bg-success-bg text-success border-success-border`;case`degraded`:return`bg-warning-bg text-warning border-warning-border`;case`unhealthy`:return`bg-danger-bg text-danger border-danger-border`;default:return`bg-subtle text-fg-muted border-line`}}let a=M(()=>eu.value),o=N(``),s=N(`all`),c=M(()=>{let e=z(o).trim().toLowerCase();return z(a).filter(t=>(z(s)===`all`||t.type===z(s))&&R_(e,[t.name]))});var l=AP(),u=F(l),d=F(u),f=F(d),m=F(f);dp(m,{size:16});var h=L(m);D(f),D(d);var g=L(d,2),_=F(g);xo(_);var v=L(_,2),y=F(v);y.value=y.__value=`all`,G(L(y),16,()=>r,e=>e,(e,t)=>{var n=DP(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(v);var b;co(v),D(g),D(u);var x=L(u,2),S=F(x),C=e=>{H(e,OP())},w=e=>{var t=kP();G(t,21,()=>z(c),e=>e.name,(e,t)=>{n(e,()=>z(t))}),D(t),H(e,t)};W(S,e=>{z(c).length===0?e(C):e(w,-1)}),D(x),D(l),R(()=>{U(h,` Resources (${z(a).length??``})`),So(_,z(o)),b!==(b=z(s))&&(v.value=(v.__value=z(s))??``,so(v,z(s)))}),B(`input`,_,e=>P(o,e.currentTarget.value,!0)),B(`change`,v,e=>P(s,e.currentTarget.value,!0)),H(e,l),at()}ea([`click`,`input`,`change`]);var MP=200,NP=70,PP=20;function FP(e,t){return ms(e,t)}function IP(e){let t=e.attributes||{};return t[`db.system.name`]||t[`db.system`]||t[`db.namespace`]||t[`db.name`]||t[`db.query.text`]||t[`db.statement`]?`database`:t[`messaging.system`]||t[`messaging.destination`]||t[`messaging.url`]?`messaging`:t[`rpc.system.name`]||t[`rpc.system`]||t[`rpc.service`]||t[`peer.service`]?`external`:`service`}function LP(e,t){if(e.length===0)return 0;let n=Math.ceil(t/100*e.length)-1;return e[Math.max(0,n)]}function RP(e){let t=new Map,n=new Map;for(let r of e){let e=new Map;for(let t of r.spans)e.set(t.spanId,t);for(let i of r.spans){let a=FP(i,r.service),o=t.get(a);o||(o={id:a,name:a,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:`service`},t.set(a,o)),o.requestCount++,i.status.code===`ERROR`&&o.errorCount++,o.avgLatency=(o.avgLatency*(o.requestCount-1)+i.duration)/o.requestCount,o.minLatency=Math.min(o.minLatency,i.duration),o.maxLatency=Math.max(o.maxLatency,i.duration),o.spanKinds.add(i.kind);let s=IP(i),c=String(i.attributes?.[`service.name`]||r.service||a);if(s!==`service`&&a!==c&&(o.nodeType=s),i.kind===`CLIENT`){let e=r.spans.find(e=>e.parentSpanId===i.spanId&&e.kind===`SERVER`),o=String(i.attributes?.[`service.name`]||r.service||a),s=(e?FP(e,r.service):void 0)||us(i.attributes,`peer.service`,`http.host`,`db.system.name`,`db.system`,`net.peer.name`,`rpc.service`,`messaging.system`)||`external`;if(t.has(o)||t.set(o,{id:o,name:o,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:`service`}),o!==s){let e=`${o}->${s}`,r=n.get(e);if(!r){if(r={id:e,source:o,target:s,requestCount:0,errorCount:0,avgLatency:0,p50Latency:0,p99Latency:0,latencies:[]},n.set(e,r),!t.has(s))t.set(s,{id:s,name:s,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:IP(i)});else{let e=t.get(s),n=IP(i);n!==`service`&&(e.nodeType=n)}}r.requestCount++,i.status.code===`ERROR`&&r.errorCount++,r.avgLatency=(r.avgLatency*(r.requestCount-1)+i.duration)/r.requestCount,r.latencies.push(i.duration);let a=[...r.latencies].sort((e,t)=>e-t);r.p50Latency=LP(a,50),r.p99Latency=LP(a,99)}}if(i.kind!==`SERVER`||!i.parentSpanId)continue;let l=e.get(i.parentSpanId);if(!l||l.kind!==`CLIENT`)continue;let u=FP(l,r.service);if(u===a)continue;let d=`${u}->${a}`;n.has(d)||n.set(d,{id:d,source:u,target:a,requestCount:1,errorCount:+(i.status.code===`ERROR`),avgLatency:i.duration,p50Latency:i.duration,p99Latency:i.duration,latencies:[i.duration]})}}return{nodes:[...t.values()].map(e=>({...e,minLatency:e.minLatency===1/0?0:e.minLatency})),connections:[...n.values()]}}function zP(e,t){let n=new Map;if(e.length===0)return n;if(e.length===1)return n.set(e[0].id,{x:180,y:92}),n;let r=e.map(e=>e.id),i=new Map,a=new Map;for(let e of r)i.set(e,[]),a.set(e,[]);for(let e of t)i.has(e.source)&&i.get(e.source).push(e.target),a.has(e.target)&&a.get(e.target).push(e.source);let o=new Map,s=r.filter(e=>(a.get(e)?.length??0)===0),c=s.length>0?s:r,l=[...c];for(let e of c)o.set(e,0);for(;l.length>0;){let e=l.shift(),t=o.get(e)??0;for(let n of i.get(e)??[])(o.get(n)??-1)<=t&&(o.set(n,t+1),l.push(n))}for(let e of r)o.has(e)||o.set(e,0);let u=Math.max(...Array.from(o.values())),d=Array.from({length:u+1},()=>[]);for(let e of r)d[o.get(e)].push(e);for(let e=0;e<2;e++)for(let e=1;e<=u;e++){let t=d[e-1],n=new Map;t.forEach((e,t)=>n.set(e,t)),d[e].sort((e,t)=>{let r=a.get(e)??[],i=a.get(t)??[];return(r.length>0?r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length:999)-(i.length>0?i.reduce((e,t)=>e+(n.get(t)??0),0)/i.length:999)})}let f=Math.max(...d.map(e=>e.length)),p=Math.max(f*122-NP,52);for(let e=0;e<=u;e++){let t=d[e],r=(p-(t.length*122-NP))/2,i=e*MP+70+PP;t.forEach((e,t)=>{n.set(e,{x:i-70,y:r+t*122+PP})})}return n}function BP(e,t,n){return Math.min(n,Math.max(t,e))}function VP(e,t,n,r,i){let a=BP(t,r,i);if(a===e.scale)return e;let o=(n.x-e.translate.x)/e.scale,s=(n.y-e.translate.y)/e.scale;return{scale:a,translate:{x:n.x-o*a,y:n.y-s*a}}}function HP(e,t,n,r,i,a){let o=e.maxX-e.minX,s=e.maxY-e.minY,c=t-r*2,l=n-r*2,u=BP(Math.min(o>0?c/o:a,s>0?l/s:a),i,a);return{scale:u,translate:{x:(t-o*u)/2-e.minX*u,y:(n-s*u)/2-e.minY*u}}}function UP(e){let{viewWidth:t,viewHeight:n,svg:r,contentBounds:i,minScale:a=.2,maxScale:o=3,zoomStep:s=1.2,fitPadding:c=24}=e,l=N(1),u=N(_r({x:0,y:0})),d=N(!1),f={x:0,y:0,tx:0,ty:0},p=(e,i)=>{let a=r();if(!a)return{x:e,y:i};let o=a.getBoundingClientRect(),s=o.width>0?t()/o.width:1,c=o.height>0?n()/o.height:1;return{x:(e-o.left)*s,y:(i-o.top)*c}},m=e=>{P(l,e.scale,!0),P(u,e.translate,!0)},h=(e,t)=>m(VP({scale:z(l),translate:z(u)},e,t,a,o)),g=()=>{P(l,1),P(u,{x:0,y:0},!0)},_=e=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let t=p(e.clientX,e.clientY),n=e.deltaY<0?s:1/s;h(z(l)*n,t)},v=e=>{e.button===0&&(e.target?.closest(`[data-node]`)||(P(d,!0),f={x:e.clientX,y:e.clientY,tx:z(u).x,ty:z(u).y},r()?.setPointerCapture?.(e.pointerId)))},y=e=>{let i=r();if(!z(d)||!i)return;let a=i.getBoundingClientRect(),o=a.width>0?t()/a.width:1,s=a.height>0?n()/a.height:1;P(u,{x:f.tx+(e.clientX-f.x)*o,y:f.ty+(e.clientY-f.y)*s},!0)},b=e=>{z(d)&&(P(d,!1),r()?.releasePointerCapture?.(e.pointerId))},x=()=>({x:t()/2,y:n()/2});return{get scale(){return z(l)},get translate(){return z(u)},get isPanning(){return z(d)},onWheel:_,onPointerDown:v,onPointerMove:y,onPointerEnd:b,zoomIn:()=>h(z(l)*s,x()),zoomOut:()=>h(z(l)/s,x()),fit:()=>{let e=i();if(!e){g();return}m(HP(e,t(),n(),c,a,o))},reset:g}}var WP=(e,t=p,n=p,r)=>{let i=pn(()=>g(r?.(),!1));var a=GP(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,t()),q(c,1,e),U(l,n())},[()=>K($(`font-medium`,z(i)?`text-danger`:`text-fg`))]),H(e,a)},GP=V(`<div class="flex justify-between text-xs"><span class="text-fg-subtle"> </span> <span> </span></div>`),KP=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle p-8"><!> <p class="text-sm text-center">No traces available to build service map. <br/> Traces will appear here as they are captured.</p></div>`),qP=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle p-8"><!> <p class="text-sm text-center">No services detected in traces. <br/> Service information is extracted from span attributes.</p></div>`),JP=V(`<span class="text-xs text-fg-subtle flex-shrink-0">No service matches</span>`),YP=ca(`<g><path fill="none" stroke-linecap="round"></path><text text-anchor="middle"> </text></g>`),XP=ca(`<rect fill="none" class="stroke-accent"></rect>`),ZP=ca(`<rect></rect><path></path><ellipse></ellipse>`,1),QP=ca(`<polygon></polygon>`),$P=ca(`<rect></rect>`),eF=ca(`<rect fill="#64748b"></rect>`),tF=ca(`<tspan fill="#dc2626" class="font-semibold"> </tspan>`),nF=ca(`<g role="button" tabindex="0"><!><g filter="url(#nodeShadow)"><!></g><!><text text-anchor="middle" class="text-[11px] font-semibold" fill="#1f2937"> </text><text text-anchor="middle" class="text-[10px]" fill="#475569"> <!></text></g>`),rF=V(`<div class="space-y-3 pr-8"><!> <!> <!> <!> <!> <!></div>`),iF=V(`<span class="text-danger"> </span>`),aF=V(`<div class="text-xs p-2 bg-surface rounded border border-line"><div class="flex items-center gap-1 text-fg-muted"><span class="font-medium"> </span> <!></div> <div class="flex items-center gap-2 mt-1 text-fg-subtle"><span> </span> <!> <span> </span></div></div>`),oF=V(`<div class="mt-4 pt-4 border-t border-line"><div class="group flex items-center justify-between mb-2"><h5 class="text-xs font-medium text-fg-muted">Connections</h5> <!></div> <div class="space-y-2"></div></div>`),sF=V(`<div class="w-64 border-l border-line bg-subtle overflow-auto"><div class="p-4"><div class="flex items-center justify-between mb-4"><div class="group flex items-center gap-1 min-w-0"><h4 class="font-semibold text-fg truncate"> </h4> <!></div> <button class="text-fg-subtle hover:text-fg-muted">×</button></div> <!> <!></div></div>`),cF=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3> <div class="text-xs text-fg-subtle"> </div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!></div> <div class="flex-1 overflow-hidden flex"><div class="relative flex-1 overflow-auto p-4"><svg role="application" aria-label="Service map. Drag to pan, ctrl or cmd and scroll to zoom."><defs><marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#94a3b8"></polygon></marker><marker id="arrowhead-error" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#ef4444"></polygon></marker><filter id="nodeShadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#0f172a" flood-opacity="0.14"></feDropShadow></filter></defs><g><!><!></g></svg> <div class="absolute bottom-3 right-3 flex flex-col gap-1 rounded-md border border-line bg-surface p-1 shadow-sm"><button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Zoom in" aria-label="Zoom in"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Zoom out" aria-label="Zoom out"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Fit to content" aria-label="Fit to content"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Reset to 1:1" aria-label="Reset zoom to 1:1"><!></button></div></div> <!></div> <div class="flex items-center gap-4 px-4 py-2 border-t border-line bg-subtle text-xs"><div class="flex items-center gap-1"><div class="w-4 h-4 rounded-full border-2 border-accent bg-surface"></div> <span class="text-fg-muted">Healthy</span></div> <div class="flex items-center gap-1"><div class="w-4 h-4 rounded-full border-2 border-danger-border bg-surface"></div> <span class="text-fg-muted">Has Errors</span></div> <div class="flex items-center gap-1"><div class="w-6 h-0.5 bg-fg-subtle"></div> <span class="text-fg-muted">Connection</span></div></div></div>`);function lF(e,t){it(t,!0);let n=M(()=>vl.value),r=N(null),i=N(null),a=N(``),o=M(()=>RP(z(n))),s=M(()=>z(o).nodes),c=M(()=>z(o).connections),l=M(()=>z(a).length>0);function u(e){return R_(z(a).toLowerCase(),[e.name])}let d=M(()=>z(s).filter(u)),f=M(()=>new Set(z(d).map(e=>e.id))),p=M(()=>z(d).length>0),m=M(()=>zP(z(s),z(c))),h=M(()=>{let e=400;for(let[,t]of z(m))t.x+140+20>e&&(e=t.x+140+20);return e}),g=M(()=>{let e=300;for(let[,t]of z(m))t.y+52+20>e&&(e=t.y+52+20);return e}),_=N(null),v=UP({viewWidth:()=>z(h),viewHeight:()=>z(g),svg:()=>z(_),contentBounds:()=>{let e=1/0,t=1/0,n=-1/0,r=-1/0;for(let[,i]of z(m))e=Math.min(e,i.x),t=Math.min(t,i.y),n=Math.max(n,i.x+140),r=Math.max(r,i.y+52);return Number.isFinite(e)?{minX:e,minY:t,maxX:n,maxY:r}:null}}),y=M(()=>z(r)?z(s).find(e=>e.id===z(r))??null:null);function b(e,t){if(e.key===`Enter`||e.key===` `){e.preventDefault(),P(r,z(r)===t?null:t,!0);return}e.key===`Escape`&&z(r)&&(e.stopPropagation(),P(r,null))}let x=M(()=>z(r)?z(c).filter(e=>e.source===z(r)||e.target===z(r)):[]),S=M(()=>z(x).length>0?JSON.stringify(z(x).map(e=>({source:e.source,target:e.target,requests:e.requestCount,errors:e.errorCount,avgLatency:ad(e.avgLatency)})),null,2):``),C=M(()=>{if(!z(y))return``;let e=z(y);return JSON.stringify({service:e.name,requests:e.requestCount,errors:e.errorCount,errorRate:`${(e.errorCount/e.requestCount*100).toFixed(1)}%`,avgLatency:ad(e.avgLatency),minLatency:ad(e.minLatency),maxLatency:ad(e.maxLatency),connections:z(x).map(e=>({source:e.source,target:e.target,requests:e.requestCount,errors:e.errorCount,avgLatency:ad(e.avgLatency)}))},null,2)});var w=la(),T=I(w),ee=e=>{var t=KP();Zf(F(t),{size:48,class:`mb-4 opacity-50`}),Ke(2),D(t),H(e,t)},te=e=>{var t=qP();Th(F(t),{size:48,class:`mb-4 opacity-50`}),Ke(2),D(t),H(e,t)},ne=e=>{var t=cF(),n=F(t),o=F(n),u=F(o);Zf(u,{size:16});var w=L(u);D(o);var T=L(o,2),ee=F(T);D(T),D(n);var te=L(n,2),ne=F(te);L_(ne,{placeholder:`Find a service by name…`,ariaLabel:`Find a service by name`,get value(){return z(a)},set value(e){P(a,e,!0)}});var re=L(ne,2),ie=e=>{H(e,JP())};W(re,e=>{z(l)&&!z(p)&&e(ie)}),D(te);var ae=L(te,2),oe=F(ae),se=F(oe);oo(se,`min-height: 300px;`);var ce=L(F(se)),le=F(ce);G(le,17,()=>z(c),e=>e.id,(e,t)=>{let n=M(()=>z(m).get(z(t).source)),i=M(()=>z(m).get(z(t).target));var a=la(),o=I(a),s=e=>{let a=M(()=>z(r)===z(t).source||z(r)===z(t).target),o=M(()=>z(t).errorCount>0),s=M(()=>z(n).x+140),c=M(()=>z(n).y+26),l=M(()=>z(i).x),u=M(()=>z(i).y+26),d=M(()=>Math.abs(z(l)-z(s))*.5),f=M(()=>z(t).requestCount>0?z(t).errorCount/z(t).requestCount*100:0),p=M(()=>z(o)?`${z(t).requestCount}× · ${z(f).toFixed(0)}% err · ${ad(z(t).p50Latency)}`:`${z(t).requestCount}× · ${ad(z(t).p50Latency)}`);var m=YP(),h=F(m),g=L(h),_=F(g,!0);D(g),D(m),R(e=>{J(h,`d`,`M${z(s)},${z(c)} C${z(s)+z(d)},${z(c)} ${z(l)-z(d)},${z(u)} ${z(l)},${z(u)}`),J(h,`stroke`,z(o)?`#ef4444`:`#94a3b8`),J(h,`stroke-width`,z(o)||z(a)?2.5:1.5),J(h,`stroke-dasharray`,z(o)?`6 4`:void 0),J(h,`stroke-opacity`,z(r)&&!z(a)?.2:1),J(h,`marker-end`,`url(#${z(o)?`arrowhead-error`:`arrowhead`})`),J(g,`x`,(z(s)+z(l))/2),J(g,`y`,(z(c)+z(u))/2-6),q(g,0,e),J(g,`opacity`,z(r)&&!z(a)?.25:1),U(_,z(p))},[()=>K($(`at-edge-label text-[10px]`,z(o)?`fill-danger font-medium`:`fill-fg-subtle`))]),H(e,m)};W(o,e=>{z(n)&&z(i)&&e(s)}),H(e,a)}),G(L(le),17,()=>z(s),e=>e.id,(e,t)=>{let n=M(()=>z(m).get(z(t).id));var a=la(),o=I(a),s=e=>{let a=M(()=>z(r)===z(t).id),o=M(()=>z(i)===z(t).id),s=M(()=>z(t).errorCount>0),c=M(()=>z(f).has(z(t).id)),u=M(()=>z(l)&&!z(c)),d=M(()=>hg(z(t).id)),p=M(()=>z(d).fill),m=M(()=>z(s)?`#ef4444`:z(d).stroke),h=M(()=>z(a)||z(s)?2.5:z(o)?2:1.5);var g=nF(),_=F(g),v=e=>{var t=XP();J(t,`x`,-3),J(t,`y`,-3),J(t,`rx`,11),J(t,`stroke-width`,2.5),R(()=>{J(t,`width`,146),J(t,`height`,58)}),H(e,t)};W(_,e=>{z(l)&&z(c)&&e(v)});var y=L(_),S=F(y),C=e=>{var t=ZP(),n=I(t);J(n,`x`,2),J(n,`y`,6);var r=L(n),i=L(r);J(i,`cy`,6),J(i,`ry`,6),R(()=>{J(n,`width`,136),J(n,`height`,40),J(n,`fill`,z(p)),J(r,`d`,`M2,46 A68,6 0 0,0 138,46 L138,6 A68,6 0 0,1 2,6 Z`),J(r,`fill`,z(p)),J(r,`stroke`,z(m)),J(r,`stroke-width`,z(h)),J(i,`cx`,70),J(i,`rx`,68),J(i,`fill`,z(p)),J(i,`stroke`,z(m)),J(i,`stroke-width`,z(h))}),H(e,t)},w=e=>{var t=QP();R(()=>{J(t,`points`,`70,2 138,13 138,39 70,50 2,39 2,13`),J(t,`fill`,z(p)),J(t,`stroke`,z(m)),J(t,`stroke-width`,z(h))}),H(e,t)},T=e=>{var t=$P();J(t,`x`,2),J(t,`y`,2),J(t,`rx`,8),R(()=>{J(t,`width`,136),J(t,`height`,48),J(t,`fill`,z(p)),J(t,`stroke`,z(m)),J(t,`stroke-width`,z(h))}),H(e,t)};W(S,e=>{z(t).nodeType===`database`?e(C):z(t).nodeType===`messaging`?e(w,1):e(T,-1)}),D(y);var ee=L(y),te=e=>{var t=eF();J(t,`x`,0),J(t,`y`,0),J(t,`rx`,8),J(t,`opacity`,.4),R(()=>{J(t,`width`,140),J(t,`height`,52)}),H(e,t)},ne=M(()=>z(r)&&!z(a)&&!z(x).some(e=>e.source===z(t).id||e.target===z(t).id));W(ee,e=>{z(ne)&&e(te)});var re=L(ee),ie=F(re,!0);D(re);var ae=L(re),oe=F(ae),se=L(oe),ce=e=>{var n=tF(),r=F(n);D(n),R(()=>U(r,` · ${z(t).errorCount??``} err`)),H(e,n)};W(se,e=>{z(s)&&e(ce)}),D(ae),D(g),R((e,r)=>{J(g,`data-node`,z(t).id),J(g,`transform`,`translate(${z(n).x}, ${z(n).y})`),q(g,0,e),J(g,`aria-label`,z(t).name),J(re,`x`,70),J(re,`y`,23),U(ie,r),J(ae,`x`,70),J(ae,`y`,38),U(oe,`${z(t).requestCount??``} span${z(t).requestCount===1?``:`s`} `)},[()=>K($(`cursor-pointer`,z(u)&&`opacity-30`)),()=>z(t).name.length>16?z(t).name.slice(0,14)+`…`:z(t).name]),B(`click`,g,()=>P(r,z(a)?null:z(t).id,!0)),B(`keydown`,g,e=>b(e,z(t).id)),$i(`mouseenter`,g,()=>P(i,z(t).id,!0)),$i(`mouseleave`,g,()=>P(i,null)),H(e,g)};W(o,e=>{z(n)&&e(s)}),H(e,a)}),D(ce),D(se),Vo(se,e=>P(_,e),()=>z(_));var E=L(se,2),ue=F(E);lh(F(ue),{size:14}),D(ue);var de=L(ue,2);Vm(F(de),{size:14}),D(de);var fe=L(de,2);yh(F(fe),{size:14}),D(fe);var pe=L(fe,2);hh(F(pe),{size:14}),D(pe),D(E),D(oe);var me=L(oe,2),he=e=>{var t=sF(),n=F(t),i=F(n),a=F(i),o=F(a),s=F(o,!0);D(o),Q_(L(o,2),{get value(){return z(y).name},label:`Copy service name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(a);var c=L(a,2);D(i);var l=L(i,2);P_(l,{get content(){return z(C)},children:(e,t)=>{var n=rF(),r=F(n);{let e=M(()=>z(y).requestCount.toString());WP(r,()=>`Requests`,()=>z(e))}var i=L(r,2);{let e=M(()=>z(y).errorCount.toString());WP(i,()=>`Errors`,()=>z(e),()=>z(y).errorCount>0)}var a=L(i,2);{let e=M(()=>`${(z(y).errorCount/z(y).requestCount*100).toFixed(1)}%`);WP(a,()=>`Error Rate`,()=>z(e),()=>z(y).errorCount>0)}var o=L(a,2);{let e=M(()=>ad(z(y).avgLatency));WP(o,()=>`Avg Latency`,()=>z(e))}var s=L(o,2);{let e=M(()=>ad(z(y).minLatency));WP(s,()=>`Min Latency`,()=>z(e))}var c=L(s,2);{let e=M(()=>ad(z(y).maxLatency));WP(c,()=>`Max Latency`,()=>z(e))}D(n),H(e,n)},$$slots:{default:!0}});var u=L(l,2),d=e=>{var t=oF(),n=F(t);Q_(L(F(n),2),{get value(){return z(S)},label:`Copy connections`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(n);var i=L(n,2);G(i,21,()=>z(x),e=>e.id,(e,t)=>{var n=aF(),i=F(n),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=e=>{rp(e,{size:10})},l=e=>{rp(e,{size:10,class:`rotate-180`})};W(s,e=>{z(t).source===z(r)?e(c):e(l,-1)}),D(i);var u=L(i,2),d=F(u),f=F(d);D(d);var p=L(d,2),m=e=>{var n=iF(),r=F(n);D(n),R(()=>U(r,`${z(t).errorCount??``} err`)),H(e,n)};W(p,e=>{z(t).errorCount>0&&e(m)});var h=L(p,2),g=F(h,!0);D(h),D(u),D(n),R(e=>{U(o,z(t).source===z(r)?z(t).target:z(t).source),U(f,`${z(t).requestCount??``} req`),U(g,e)},[()=>ad(z(t).avgLatency)]),H(e,n)}),D(i),D(t),H(e,t)};W(u,e=>{z(x).length>0&&e(d)}),D(n),D(t),R(()=>U(s,z(y).name)),B(`click`,c,()=>P(r,null)),H(e,t)};W(me,e=>{z(y)&&e(he)}),D(ae),Ke(2),D(t),R(e=>{U(w,` Service Map (${(z(l)?`${z(d).length} of ${z(s).length}`:z(s).length)??``} services)`),U(ee,`${z(c).length??``} connections`),J(se,`viewBox`,`0 0 ${z(h)} ${z(g)}`),q(se,0,e),J(ce,`transform`,`translate(${v.translate.x}, ${v.translate.y}) scale(${v.scale})`)},[()=>K($(`w-full h-full`,v.isPanning?`cursor-grabbing`:`cursor-grab`))]),$i(`wheel`,se,function(...e){v.onWheel?.apply(this,e)}),B(`pointerdown`,se,function(...e){v.onPointerDown?.apply(this,e)}),B(`pointermove`,se,function(...e){v.onPointerMove?.apply(this,e)}),B(`pointerup`,se,function(...e){v.onPointerEnd?.apply(this,e)}),$i(`pointercancel`,se,function(...e){v.onPointerEnd?.apply(this,e)}),$i(`pointerleave`,se,function(...e){v.onPointerEnd?.apply(this,e)}),B(`click`,ue,function(...e){v.zoomIn?.apply(this,e)}),B(`click`,de,function(...e){v.zoomOut?.apply(this,e)}),B(`click`,fe,function(...e){v.fit?.apply(this,e)}),B(`click`,pe,function(...e){v.reset?.apply(this,e)}),H(e,t)};W(T,e=>{z(n).length===0?e(ee):z(s).length===0?e(te,1):e(ne,-1)}),H(e,w),at()}ea([`pointerdown`,`pointermove`,`pointerup`,`click`,`keydown`]);async function uF(e,t=``){let n=t?`?q=${encodeURIComponent(t)}`:``;return pF(`${e.baseUrl}/api/metrics${n}`,{method:`GET`,signal:e.signal},e,e=>e.metrics??[])}async function dF(e,t){let n={name:e.name};return e.window&&(n.window=e.window),n.maxPoints=e.maxPoints??1500,pF(`${t.baseUrl}/api/query/metrics`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n),signal:t.signal},t,e=>e.series??[])}async function fF(e,t){return pF(`${t.baseUrl}/api/metrics?name=${encodeURIComponent(e)}`,{method:`DELETE`,signal:t.signal},t,e=>e.deletedSeries??0)}async function pF(e,t,n,r){let i;try{i=await n.fetch(e,t)}catch(e){return mF(e)?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}if(i.status===403)return{status:`error`,message:`Forbidden: the devtools server rejected this origin. Open the viewer from the same machine.`};let a;try{a=await i.json()}catch{return{status:`error`,message:`Unexpected response from ${n.baseUrl} (not JSON)`}}return i.ok?{status:`ok`,data:r(a)}:{status:`error`,message:`Server error: ${a.error??i.statusText}`}}function mF(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}function hF(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function gF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function _F(e){let t,n,r;e.length===2?(t=e===hF||e===gF?e:vF,n=e,r=e):(t=hF,n=(t,n)=>hF(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function vF(){return 0}function yF(e){return e===null?NaN:+e}var bF=_F(hF),xF=bF.right;bF.left,_F(yF).center;var SF=Math.sqrt(50),CF=Math.sqrt(10),wF=Math.sqrt(2);function TF(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=SF?10:a>=CF?5:a>=wF?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?TF(e,t,n*2):[s,c,l]}function EF(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?TF(t,e,n):TF(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function DF(e,t,n){return t=+t,e=+e,n=+n,TF(e,t,n)[2]}function OF(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?DF(t,e,n):DF(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function kF(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function AF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function jF(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function MF(){}var NF=.7,PF=1/NF,FF=`\\s*([+-]?\\d+)\\s*`,IF=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,LF=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,RF=/^#([0-9a-f]{3,8})$/,zF=RegExp(`^rgb\\(${FF},${FF},${FF}\\)$`),BF=RegExp(`^rgb\\(${LF},${LF},${LF}\\)$`),VF=RegExp(`^rgba\\(${FF},${FF},${FF},${IF}\\)$`),HF=RegExp(`^rgba\\(${LF},${LF},${LF},${IF}\\)$`),UF=RegExp(`^hsl\\(${IF},${LF},${LF}\\)$`),WF=RegExp(`^hsla\\(${IF},${LF},${LF},${IF}\\)$`),GF={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};AF(MF,XF,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:KF,formatHex:KF,formatHex8:qF,formatHsl:JF,formatRgb:YF,toString:YF});function KF(){return this.rgb().formatHex()}function qF(){return this.rgb().formatHex8()}function JF(){return lI(this).formatHsl()}function YF(){return this.rgb().formatRgb()}function XF(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=RF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ZF(t):n===3?new tI(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?QF(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?QF(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=zF.exec(e))?new tI(t[1],t[2],t[3],1):(t=BF.exec(e))?new tI(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=VF.exec(e))?QF(t[1],t[2],t[3],t[4]):(t=HF.exec(e))?QF(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=UF.exec(e))?cI(t[1],t[2]/100,t[3]/100,1):(t=WF.exec(e))?cI(t[1],t[2]/100,t[3]/100,t[4]):GF.hasOwnProperty(e)?ZF(GF[e]):e===`transparent`?new tI(NaN,NaN,NaN,0):null}function ZF(e){return new tI(e>>16&255,e>>8&255,e&255,1)}function QF(e,t,n,r){return r<=0&&(e=t=n=NaN),new tI(e,t,n,r)}function $F(e){return e instanceof MF||(e=XF(e)),e?(e=e.rgb(),new tI(e.r,e.g,e.b,e.opacity)):new tI}function eI(e,t,n,r){return arguments.length===1?$F(e):new tI(e,t,n,r??1)}function tI(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}AF(tI,eI,jF(MF,{brighter(e){return e=e==null?PF:PF**+e,new tI(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?NF:NF**+e,new tI(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tI(oI(this.r),oI(this.g),oI(this.b),aI(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nI,formatHex:nI,formatHex8:rI,formatRgb:iI,toString:iI}));function nI(){return`#${sI(this.r)}${sI(this.g)}${sI(this.b)}`}function rI(){return`#${sI(this.r)}${sI(this.g)}${sI(this.b)}${sI((isNaN(this.opacity)?1:this.opacity)*255)}`}function iI(){let e=aI(this.opacity);return`${e===1?`rgb(`:`rgba(`}${oI(this.r)}, ${oI(this.g)}, ${oI(this.b)}${e===1?`)`:`, ${e})`}`}function aI(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oI(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function sI(e){return e=oI(e),(e<16?`0`:``)+e.toString(16)}function cI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new dI(e,t,n,r)}function lI(e){if(e instanceof dI)return new dI(e.h,e.s,e.l,e.opacity);if(e instanceof MF||(e=XF(e)),!e)return new dI;if(e instanceof dI)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new dI(o,s,c,e.opacity)}function uI(e,t,n,r){return arguments.length===1?lI(e):new dI(e,t,n,r??1)}function dI(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}AF(dI,uI,jF(MF,{brighter(e){return e=e==null?PF:PF**+e,new dI(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?NF:NF**+e,new dI(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new tI(mI(e>=240?e-240:e+120,i,r),mI(e,i,r),mI(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new dI(fI(this.h),pI(this.s),pI(this.l),aI(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=aI(this.opacity);return`${e===1?`hsl(`:`hsla(`}${fI(this.h)}, ${pI(this.s)*100}%, ${pI(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function fI(e){return e=(e||0)%360,e<0?e+360:e}function pI(e){return Math.max(0,Math.min(1,e||0))}function mI(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var hI=e=>()=>e;function gI(e,t){return function(n){return e+n*t}}function _I(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function vI(e){return(e=+e)==1?yI:function(t,n){return n-t?_I(t,n,e):hI(isNaN(t)?n:t)}}function yI(e,t){var n=t-e;return n?gI(e,n):hI(isNaN(e)?t:e)}var bI=(function e(t){var n=vI(t);function r(e,t){var r=n((e=eI(e)).r,(t=eI(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=yI(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function xI(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function SI(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function CI(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=MI(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function wI(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function TI(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function EI(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=MI(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var DI=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,OI=new RegExp(DI.source,`g`);function kI(e){return function(){return e}}function AI(e){return function(t){return e(t)+``}}function jI(e,t){var n=DI.lastIndex=OI.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=DI.exec(e))&&(i=OI.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:TI(r,i)})),n=OI.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?AI(c[0].x):kI(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function MI(e,t){var n=typeof t,r;return t==null||n===`boolean`?hI(t):(n===`number`?TI:n===`string`?(r=XF(t))?(t=r,bI):jI:t instanceof XF?bI:t instanceof Date?wI:SI(t)?xI:Array.isArray(t)?CI:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?EI:TI)(e,t)}function NI(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function PI(e){return function(){return e}}function FI(e){return+e}var II=[0,1];function LI(e){return e}function RI(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:PI(isNaN(t)?NaN:.5)}function zI(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function BI(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=RI(i,r),a=n(o,a)):(r=RI(r,i),a=n(a,o)),function(e){return a(r(e))}}function VI(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=RI(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=xF(e,t,1,r)-1;return a[n](i[n](t))}}function HI(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function UI(){var e=II,t=II,n=MI,r,i,a,o=LI,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==LI&&(o=zI(e[0],e[n-1])),s=n>2?VI:BI,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||(c=s(e.map(r),t,n)))(r(o(i)))}return d.invert=function(n){return o(i((l||(l=s(t,e.map(r),TI)))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,FI),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=NI,u()},d.clamp=function(e){return arguments.length?(o=e?!0:LI,u()):o!==LI},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function WI(){return UI()(LI,LI)}function GI(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function KI(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function qI(e){return e=KI(Math.abs(e)),e?e[1]:NaN}function JI(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function YI(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var XI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ZI(e){if(!(t=XI.exec(e)))throw Error(`invalid format: `+e);var t;return new QI({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ZI.prototype=QI.prototype;function QI(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}QI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function $I(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var eL;function tL(e,t){var n=KI(e,t);if(!n)return e+``;var r=n[0],i=n[1],a=i-(eL=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+KI(e,Math.max(0,t+a-1))[0]}function nL(e,t){var n=KI(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var rL={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:GI,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>nL(e*100,t),r:nL,s:tL,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function iL(e){return e}var aL=Array.prototype.map,oL=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function sL(e){var t=e.grouping===void 0||e.thousands===void 0?iL:JI(aL.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?iL:YI(aL.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e){e=ZI(e);var l=e.fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,g=e.precision,_=e.trim,v=e.type;v===`n`?(h=!0,v=`g`):rL[v]||(g===void 0&&(g=12),_=!0,v=`g`),(p||l===`0`&&u===`=`)&&(p=!0,l=`0`,u=`=`);var y=f===`$`?n:f===`#`&&/[boxX]/.test(v)?`0`+v.toLowerCase():``,b=f===`$`?r:/[%p]/.test(v)?o:``,x=rL[v],S=/[defgprs%]/.test(v);g=g===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(e){var n=y,r=b,o,f,C;if(v===`c`)r=x(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),_&&(e=$I(e)),w&&+e==0&&d!==`+`&&(w=!1),n=(w?d===`(`?d:s:d===`-`||d===`(`?``:d)+n,r=(v===`s`?oL[8+eL/3]:``)+r+(w&&d===`(`?`)`:``),S){for(o=-1,f=e.length;++o<f;)if(C=e.charCodeAt(o),48>C||C>57){r=(C===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}h&&!p&&(e=t(e,1/0));var T=n.length+e.length+r.length,ee=T<m?Array(m-T+1).join(l):``;switch(h&&p&&(e=t(ee+e,ee.length?m-r.length:1/0),ee=``),u){case`<`:e=n+e+r+ee;break;case`=`:e=n+ee+e+r;break;case`^`:e=ee.slice(0,T=ee.length>>1)+n+e+r+ee.slice(T);break;default:e=ee+n+e+r}return a(e)}return C.toString=function(){return e+``},C}function u(e,t){var n=l((e=ZI(e),e.type=`f`,e)),r=Math.max(-8,Math.min(8,Math.floor(qI(t)/3)))*3,i=10**-r,a=oL[8+r/3];return function(e){return n(i*e)+a}}return{format:l,formatPrefix:u}}var cL,lL,uL;dL({thousands:`,`,grouping:[3],currency:[`$`,``]});function dL(e){return cL=sL(e),lL=cL.format,uL=cL.formatPrefix,cL}function fL(e){return Math.max(0,-qI(Math.abs(e)))}function pL(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(qI(t)/3)))*3-qI(Math.abs(e)))}function mL(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qI(t)-qI(e))+1}function hL(e,t,n,r){var i=OF(e,t,n),a;switch(r=ZI(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=pL(i,o))&&(r.precision=a),uL(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=mL(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=fL(i))&&(r.precision=a-(r.type===`%`)*2)}return lL(r)}function gL(e){var t=e.domain;return e.ticks=function(e){var n=t();return EF(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return hL(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=DF(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function _L(){var e=WI();return e.copy=function(){return HI(e,_L())},kF.apply(e,arguments),gL(e)}function vL(e){return function(){return e}}var yL=Math.PI,bL=2*yL,xL=1e-6,SL=bL-xL;function CL(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function wL(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return CL;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var TL=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?CL:wL(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>xL){if(!(Math.abs(u*s-c*l)>xL)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((yL-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>xL&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>xL||Math.abs(this._y1-l)>xL)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%bL+bL),d>SL?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>xL&&this._append`A${n},${n},0,${+(d>=yL)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};TL.prototype;function EL(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new TL(t)}Array.prototype.slice;function DL(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function OL(e){this._context=e}OL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function kL(e){return new OL(e)}function AL(e){return e[0]}function jL(e){return e[1]}function ML(e,t){var n=vL(!0),r=null,i=kL,a=null,o=EL(s);e=typeof e==`function`?e:e===void 0?AL:vL(e),t=typeof t==`function`?t:t===void 0?jL:vL(t);function s(s){var c,l=(s=DL(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:vL(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:vL(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:vL(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function NL(e,t,n){var r=null,i=vL(!0),a=null,o=kL,s=null,c=EL(l);e=typeof e==`function`?e:e===void 0?AL:vL(+e),t=typeof t==`function`?t:vL(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?jL:vL(+n);function l(l){var u,d,f,p=(l=DL(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return ML().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:vL(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:vL(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:vL(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:vL(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:vL(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:vL(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:vL(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var PL=ca(`<svg role="img"><path fill="none" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"></path></svg>`),FL=V(`<span>—</span>`);function IL(e,t){it(t,!0);let n=Z(t,`width`,3,80),r=Z(t,`height`,3,20),i=Z(t,`color`,3,`var(--color-accent)`),a=M(()=>t.points.map(e=>e.value??0)),o=M(()=>{if(t.points.length<2)return null;let e=_L().domain([t.points[0].timestamp,t.points[t.points.length-1].timestamp]).range([1,n()-1]),i=Math.min(...z(a)),o=Math.max(...z(a)),s=_L().domain(i===o?[i-1,o+1]:[i,o]).range([r()-1,1]);return ML().x(t=>e(t.timestamp)).y(e=>s(e.value??0))(t.points)});var s=la(),c=I(s),l=e=>{var a=PL(),s=F(a);D(a),R(e=>{J(a,`width`,n()),J(a,`height`,r()),J(a,`viewBox`,`0 0 ${n()??``} ${r()??``}`),J(a,`aria-label`,t.ariaLabel??`Sparkline, ${t.points.length} points`),q(a,0,e),J(s,`d`,z(o)),J(s,`stroke`,i())},[()=>K($(`overflow-visible`,t.class))]),H(e,a)},u=e=>{var i=FL();R(e=>{q(i,1,e),oo(i,`width:${n()??``}px;height:${r()??``}px`)},[()=>K($(`text-[10px] text-fg-subtle`,t.class))]),H(e,i)};W(c,e=>{z(o)?e(l):e(u,-1)}),H(e,s),at()}function LL(e,t){if(t===void 0)return e;if(t===`cumulative`&&e.length<2)return[];let n=[],r=+(t===`cumulative`);for(let i=r;i<e.length;i++){let r=e[i-1],a=r?.value??0,o=e[i].value??0,s=o;t===`cumulative`&&o>=a&&(s=o-a);let c=e[i].startTimestamp??r?.timestamp,l=c===void 0?0:(e[i].timestamp-c)/1e3;n.push({...e[i],value:l>0?s/l:s})}return n}function RL(e,t,n){if(e.length!==t.length+1)return;let r=e.reduce((e,t)=>e+t,0);if(r===0)return;let i=n*r,a=0;for(let n=0;n<e.length;n++){let r=e[n];if(a+r>=i){let e=n===0?0:t[n-1],o=n<t.length?t[n]:t[t.length-1];if(r===0)return o;let s=(i-a)/r;return e+(o-e)*s}a+=r}return t[t.length-1]}function zL(e,t){return e.length===t.length+1?t.length===0?[{label:`all`,count:e[0],from:-1/0,to:1/0}]:e.map((e,n)=>{let r=n===0?-1/0:t[n-1],i=n<t.length?t[n]:1/0;return{label:n===0?`≤${KL(t[0])}`:n===t.length?`>${KL(t[t.length-1])}`:`${KL(t[n-1])}–${KL(t[n])}`,count:e,from:r,to:i}}):[]}function BL(e){if(e.bucketCounts&&e.explicitBounds)return zL(e.bucketCounts,e.explicitBounds);if(e.scale===void 0)return[];let t=2**2**-e.scale,n=[];if(VL(n,e.negative,t,!0),e.zeroCount!==void 0){let t=e.zeroThreshold??0;n.push({label:t>0?`−${KL(t)}–${KL(t)}`:`0`,count:e.zeroCount,from:-t,to:t})}return VL(n,e.positive,t,!1),n.sort((e,t)=>e.from-t.from)}function VL(e,t,n,r){if(t)for(let i=0;i<t.bucketCounts.length;i++){let a=t.offset+i,o=n**a,s=n**(a+1),c=r?-s:o,l=r?-o:s;e.push({label:`${KL(c)}–${KL(l)}`,count:t.bucketCounts[i],from:c,to:l})}}function HL(e,t){if(e.bucketCounts&&e.explicitBounds)return RL(e.bucketCounts,e.explicitBounds,t);let n=BL(e),r=n.reduce((e,t)=>e+t.count,0);if(r===0)return;let i=t*r,a=0;for(let e of n){if(a+e.count>=i)return e.count===0?e.to:e.from+(i-a)/e.count*(e.to-e.from);a+=e.count}return n[n.length-1]?.to}function UL(e,t){if(e.length===0)return;let n=e.map(e=>e.value??0);switch(t){case`sum`:return n.reduce((e,t)=>e+t,0);case`avg`:return n.reduce((e,t)=>e+t,0)/n.length;case`min`:return Math.min(...n);case`max`:return Math.max(...n);case`last`:return n[n.length-1];case`count`:return e.length}}function WL(e,t,n){if(!Number.isFinite(e)||!Number.isFinite(t)||e===t)return[e];let r=(t-e)/Math.max(1,n),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a<=1?1:a<=2?2:a<=5?5:10)*i,s=Math.floor(e/o)*o,c=Math.ceil(t/o)*o,l=[],u=Math.round((c-s)/o);for(let e=0;e<=u;e++)l.push(s+e*o);return l}function GL(e,t){if(e.length<=t||t<3)return e;let n=Math.max(1,Math.floor((t-2)/2)),r=e.length/n,i=new Map;i.set(0,e[0]),i.set(e.length-1,e[e.length-1]);for(let t=0;t<n;t++){let n=Math.floor(t*r),a=Math.min(e.length,Math.floor((t+1)*r));if(n>=a)continue;let o=n,s=n;for(let t=n;t<a;t++){let n=e[t].value??0;n<(e[o].value??0)&&(o=t),n>(e[s].value??0)&&(s=t)}i.set(o,e[o]),i.set(s,e[s])}return[...i.entries()].sort((e,t)=>e[0]-t[0]).map(([,e])=>e)}function KL(e){return Number.isFinite(e)?Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):String(Math.round(e*100)/100):`∞`}function qL(e){if(e.length===0)return[];let t=[...new Set(e.flatMap(e=>e.map(e=>e.timestamp)))].sort((e,t)=>e-t),n=e.map(e=>new Map(e.map(e=>[e.timestamp,e.value??0]))),r=new Map(t.map(e=>[e,0]));return n.map(e=>t.map(t=>{let n=r.get(t)??0,i=e.get(t)??0,a=n+Math.max(0,i);return r.set(t,a),{timestamp:t,y0:n,y1:a}}))}function JL(e,t){return t.map(t=>({quantile:t,points:e.flatMap(e=>{let n=HL(e,t);return n===void 0?[]:[{timestamp:e.timestamp,value:n}]})}))}function YL(e){let t=e.filter(e=>BL(e).length>0);if(t.length===0)return{columns:[],rows:[],max:0};let n=t[0],r=BL(n),i=r.map(e=>({label:e.label,from:e.from,to:e.to}));if(i.length===0)return{columns:[],rows:[],max:0};let a=t.filter(e=>BL(e).length===r.length&&BL(e).every((e,t)=>e.label===r[t].label)),o=Math.max(0,...a.flatMap(e=>BL(e).map(e=>e.count)));return{columns:a.slice().sort((e,t)=>e.timestamp-t.timestamp).map(e=>({timestamp:e.timestamp,cells:BL(e).map(({count:e})=>({count:e,intensity:o>0?e/o:0}))})),rows:i,max:o}}var XL=V(`<div>No data in this window</div>`),ZL=ca(`<line x1="0" stroke="var(--color-line-subtle)" stroke-width="1"></line><text x="-6" text-anchor="end" dominant-baseline="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`,1),QL=ca(`<text text-anchor="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`),$L=ca(`<path opacity="0.75" stroke="var(--color-surface)" stroke-width="0.5" data-testid="stack-band"></path>`),eR=ca(`<path opacity="0.15"></path>`),tR=ca(`<path fill="none" stroke-width="1.5" stroke-linejoin="round"></path>`),nR=ca(`<circle r="2.5"></circle>`),rR=ca(`<!><!>`,1),iR=ca(`<circle r="3.5" fill="var(--color-warning)" stroke="var(--color-surface)" stroke-width="1" role="button" tabindex="0" class="cursor-pointer"></circle>`),aR=ca(`<svg role="img"><g><!><!><!><!></g></svg>`);function oR(e,t){it(t,!0);let n=Z(t,`width`,3,640),r=Z(t,`height`,3,220),i=Z(t,`area`,3,!1),a=Z(t,`stacked`,3,!1),o={top:8,right:12,bottom:22,left:44},s=M(()=>Math.max(1,n()-o.left-o.right)),c=M(()=>Math.max(1,r()-o.top-o.bottom)),l=M(()=>t.series.map(e=>({...e,points:GL(e.points,400)}))),u=M(()=>z(l).filter(e=>!t.isolated?.size||t.isolated.has(e.seriesId))),d=M(()=>a()?qL(z(u).map(e=>e.points)):null),f=M(()=>{let e=z(u).flatMap(e=>e.points);if(e.length===0)return null;let t=e.map(e=>e.timestamp),n=z(d)?z(d).flatMap(e=>e.map(e=>e.y1)):e.map(e=>e.value??0),r=Math.min(...t),i=Math.max(...t),a=Math.min(0,...n),o=Math.max(...n);return{minTime:r,maxTime:i===r?r+1:i,minValue:a,maxValue:o===a?a+1:o}}),p=M(()=>z(f)?_L().domain([z(f).minTime,z(f).maxTime]).range([0,z(s)]):null),m=M(()=>z(f)?_L().domain([z(f).minValue,z(f).maxValue]).range([z(c),0]):null),h=M(()=>z(f)?WL(z(f).minValue,z(f).maxValue,4):[]),g=M(()=>z(f)?WL(z(f).minTime,z(f).maxTime,4):[]);function _(e){return!z(p)||!z(m)||e.length===0||e.length===1?null:ML().x(e=>z(p)(e.timestamp)).y(e=>z(m)(e.value??0))(e)}function v(e){return!z(p)||!z(m)||e.length<2?null:NL().x(e=>z(p)(e.timestamp)).y0(z(m)(Math.max(0,z(f)?.minValue??0))).y1(e=>z(m)(e.value??0))(e)}function y(e){return hg(e.seriesId).stroke}function b(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function x(e){return Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):String(Math.round(e*1e3)/1e3)}function S(e){return!z(p)||!z(m)||e.length<2?null:NL().x(e=>z(p)(e.timestamp)).y0(e=>z(m)(e.y0)).y1(e=>z(m)(e.y1))(e)}let C=M(()=>!z(p)||!z(m)?[]:z(u).flatMap(e=>e.points.flatMap(t=>(t.exemplars??[]).filter(e=>e.traceId).map(n=>({key:`${e.seriesId}:${n.timestamp}:${n.traceId}`,x:z(p)(n.timestamp||t.timestamp),y:z(m)(n.value),traceId:n.traceId,spanId:n.spanId,value:n.value})))));var w=la(),T=I(w),ee=e=>{var n=XL();R(e=>{q(n,1,e),oo(n,`height:${r()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,n)},te=e=>{var a=aR(),l=F(a),f=F(l);G(f,16,()=>z(h),e=>e,(e,t)=>{let n=M(()=>z(m)?z(m)(t):0);var r=la(),i=I(r),a=e=>{var r=ZL(),i=I(r),a=L(i),o=F(a,!0);D(a),R(e=>{J(i,`x2`,z(s)),J(i,`y1`,z(n)),J(i,`y2`,z(n)),J(a,`y`,z(n)),U(o,e)},[()=>x(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(c)&&e(a)}),H(e,r)});var w=L(f);G(w,16,()=>z(g),e=>e,(e,t)=>{let n=M(()=>z(p)?z(p)(t):0);var r=la(),i=I(r),a=e=>{var r=QL(),i=F(r,!0);D(r),R(e=>{J(r,`x`,z(n)),J(r,`y`,z(c)+14),U(i,e)},[()=>b(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(s)&&e(a)}),H(e,r)});var T=L(w),ee=e=>{var t=la();G(I(t),19,()=>z(u),e=>e.seriesId,(e,t,n)=>{let r=M(()=>S(z(d)[z(n)]));var i=la(),a=I(i),o=e=>{var n=$L();R(e=>{J(n,`d`,z(r)),J(n,`fill`,e)},[()=>y(z(t))]),H(e,n)};W(a,e=>{z(r)&&e(o)}),H(e,i)}),H(e,t)},te=e=>{var t=la();G(I(t),17,()=>z(u),e=>e.seriesId,(e,t)=>{let n=M(()=>_(z(t).points));var r=rR(),a=I(r),o=e=>{let n=M(()=>v(z(t).points));var r=la(),i=I(r),a=e=>{var r=eR();R(e=>{J(r,`d`,z(n)),J(r,`fill`,e)},[()=>y(z(t))]),H(e,r)};W(i,e=>{z(n)&&e(a)}),H(e,r)};W(a,e=>{i()&&e(o)});var s=L(a),c=e=>{var r=tR();R(e=>{J(r,`d`,z(n)),J(r,`stroke`,e)},[()=>y(z(t))]),H(e,r)},l=e=>{var n=nR();R((e,t,r)=>{J(n,`cx`,e),J(n,`cy`,t),J(n,`fill`,r)},[()=>z(p)?z(p)(z(t).points[0].timestamp):0,()=>z(m)?z(m)(z(t).points[0].value??0):0,()=>y(z(t))]),H(e,n)};W(s,e=>{z(n)?e(c):z(t).points.length===1&&e(l,1)}),H(e,r)}),H(e,t)};W(T,e=>{z(d)?e(ee):e(te,-1)}),G(L(T),17,()=>z(C),e=>e.key,(e,n)=>{var r=iR();R(e=>{J(r,`cx`,z(n).x),J(r,`cy`,z(n).y),J(r,`aria-label`,`Open trace ${z(n).traceId??``} (${e??``})`)},[()=>x(z(n).value)]),B(`click`,r,()=>t.onExemplar?.(z(n).traceId,z(n).spanId)),B(`keydown`,r,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.onExemplar?.(z(n).traceId,z(n).spanId))}),H(e,r)}),D(l),D(a),R(e=>{J(a,`width`,n()),J(a,`height`,r()),J(a,`viewBox`,`0 0 ${n()??``} ${r()??``}`),J(a,`aria-label`,`Time series chart, ${z(u).length??``} series`),q(a,0,e),J(l,`transform`,`translate(${o.left??``},${o.top??``})`)},[()=>K($(`overflow-visible`,t.class))]),H(e,a)};W(T,e=>{z(f)?e(te,-1):e(ee)}),H(e,w),at()}ea([`click`,`keydown`]);var sR=V(`<div>No bucket data on this point</div>`),cR=V(`<div class="flex-1 flex flex-col items-center justify-end h-full gap-1"><span class="text-[10px] text-fg-subtle tabular-nums"> </span> <div class="w-full rounded-t bg-accent/70 hover:bg-accent transition-colors"></div> <span class="text-[10px] text-fg-subtle truncate w-full text-center"> </span></div>`),lR=V(`<span><span class="text-fg-subtle"> </span> <span class="font-mono text-fg"> </span></span>`),uR=V(`<span class="ml-auto"><span class="text-fg-subtle">count</span> <span class="font-mono text-fg"> </span></span>`),dR=V(`<div><div class="flex items-end gap-1" role="img"></div> <div class="flex items-center gap-4 text-[11px] text-fg-muted border-t border-line pt-2"><!> <!></div></div>`);function fR(e,t){it(t,!0);let n=Z(t,`height`,3,160),r=M(()=>BL(t.point)),i=M(()=>Math.max(1,...z(r).map(e=>e.count))),a=M(()=>z(r).reduce((e,t)=>e+t.count,0)),o=M(()=>[.5,.9,.99].map(e=>({label:`p${e*100}`,value:HL(t.point,e)})));function s(e){if(e===void 0)return`—`;let n=Math.round(e*100)/100;return t.unit?`${n}${t.unit}`:String(n)}function c(e){return z(a)===0?`0%`:`${Math.round(e/z(a)*100)}%`}var l=la(),u=I(l),d=e=>{var r=sR();R(e=>{q(r,1,e),oo(r,`height:${n()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,r)},f=e=>{var l=dR(),u=F(l);G(u,21,()=>z(r),e=>e.label,(e,t)=>{var n=cR(),r=F(n),a=F(r,!0);D(r);var o=L(r,2),s=L(o,2),l=F(s,!0);D(s),D(n),R(e=>{U(a,z(t).count),oo(o,`height:${z(t).count/z(i)*100}%`),J(o,`title`,`${z(t).label??``}: ${z(t).count??``} (${e??``})`),U(l,z(t).label)},[()=>c(z(t).count)]),H(e,n)}),D(u);var d=L(u,2),f=F(d);G(f,17,()=>z(o),e=>e.label,(e,t)=>{var n=lR(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a),D(n),R(e=>{U(i,z(t).label),U(o,e)},[()=>s(z(t).value)]),H(e,n)});var p=L(f,2),m=e=>{var n=uR(),r=L(F(n),2),i=F(r,!0);D(r),D(n),R(()=>U(i,t.point.count)),H(e,n)};W(p,e=>{t.point.count!==void 0&&e(m)}),D(d),D(l),R(e=>{q(l,1,e),oo(u,`height:${n()??``}px`),J(u,`aria-label`,`Histogram, ${z(r).length??``} buckets, ${z(a)??``} observations`)},[()=>K($(`flex flex-col gap-2`,t.class))]),H(e,l)};W(u,e=>{z(r).length===0?e(d):e(f,-1)}),H(e,l),at()}var pR=V(`<div>No bucketed data in this window</div>`),mR=V(`<span class="ml-0.5"> </span>`),hR=V(`<div class="text-[10px] text-fg-subtle flex items-center justify-end"> <!></div>`),gR=V(`<button type="button" class="w-full rounded-[1px] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent"></button>`),_R=V(`<div class="flex-1 min-w-[8px] flex flex-col gap-px"></div>`),vR=V(`<div><div class="flex" role="img"><div class="shrink-0 pr-2 text-right"></div> <div class="flex-1 min-w-0 overflow-x-auto"><div class="flex gap-px h-full"></div></div></div> <div class="flex items-center gap-2 text-[10px] text-fg-subtle pl-2"><span> </span> <span class="flex-1 border-t border-line-subtle"></span> <span> </span> <span class="ml-2"> </span></div></div>`);function yR(e,t){it(t,!0);let n=Z(t,`rowHeight`,3,22),r=M(()=>YL(t.points));function i(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function a(e){return e===0?`background: var(--color-subtle)`:`background: color-mix(in oklch, var(--color-accent) ${(.12+e*.88)*100}%, transparent)`}var o=la(),s=I(o),c=e=>{var n=pR();R(e=>q(n,1,e),[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded p-6`,t.class))]),H(e,n)},l=e=>{var o=vR(),s=F(o),c=F(s);G(c,21,()=>[...z(r).rows].reverse(),e=>e.label,(e,r)=>{var i=hR(),a=F(i,!0),o=L(a),s=e=>{var n=mR(),r=F(n,!0);D(n),R(()=>U(r,t.unit)),H(e,n)};W(o,e=>{t.unit&&e(s)}),D(i),R(()=>{oo(i,`height:${n()??``}px`),U(a,z(r).label)}),H(e,i)}),D(c);var l=L(c,2),u=F(l);G(u,21,()=>z(r).columns,e=>e.timestamp,(e,o)=>{var s=_R();G(s,21,()=>[...z(o).cells].reverse(),Oa,(e,s,c)=>{let l=M(()=>z(o).cells.length-1-c);var u=gR();R((e,i,a)=>{oo(u,`height:${n()??``}px; ${e??``}`),J(u,`title`,`${z(r).rows[z(l)].label??``}${t.unit??``??``} at ${i??``}: ${z(s).count??``}`),J(u,`aria-label`,`${z(r).rows[z(l)].label??``} at ${a??``}: ${z(s).count??``} observations`)},[()=>a(z(s).intensity),()=>i(z(o).timestamp),()=>i(z(o).timestamp)]),B(`click`,u,()=>t.onCell?.(z(o).timestamp,z(l))),H(e,u)}),D(s),H(e,s)}),D(u),D(l),D(s);var d=L(s,2),f=F(d),p=F(f,!0);D(f);var m=L(f,4),h=F(m,!0);D(m);var g=L(m,2),_=F(g);D(g),D(d),D(o),R((e,t,n)=>{q(o,1,e),J(s,`aria-label`,`Distribution heatmap, ${z(r).rows.length??``} buckets over ${z(r).columns.length??``} intervals, busiest cell ${z(r).max??``}`),U(p,t),U(h,n),U(_,`busiest ${z(r).max??``}`)},[()=>K($(`flex flex-col gap-1`,t.class)),()=>i(z(r).columns[0].timestamp),()=>i(z(r).columns[z(r).columns.length-1].timestamp)]),H(e,o)};W(s,e=>{z(r).columns.length===0?e(c):e(l,-1)}),H(e,o),at()}ea([`click`]);var bR=V(`<div>No bucketed data in this window</div>`),xR=ca(`<line x1="0" stroke="var(--color-line-subtle)"></line><text x="-6" text-anchor="end" dominant-baseline="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`,1),SR=ca(`<text text-anchor="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`),CR=ca(`<path fill="var(--color-accent)"></path>`),wR=ca(`<path fill="none" stroke="var(--color-accent)" stroke-width="1.25"></path>`),TR=V(`<span><span class="text-fg-subtle"> </span> <span class="font-mono text-fg ml-1"> </span></span>`),ER=V(`<div><svg role="img" class="overflow-visible"><g><!><!><!><!></g></svg> <div class="flex items-center gap-4 text-[11px] border-t border-line pt-2"></div></div>`);function DR(e,t){it(t,!0);let n=Z(t,`quantiles`,19,()=>[.5,.9,.99]),r=Z(t,`width`,3,640),i=Z(t,`height`,3,220),a={top:8,right:12,bottom:22,left:48},o=M(()=>Math.max(1,r()-a.left-a.right)),s=M(()=>Math.max(1,i()-a.top-a.bottom)),c=M(()=>[...n()].sort((e,t)=>e-t)),l=M(()=>JL(t.points,z(c))),u=M(()=>{let e=z(l).flatMap(e=>e.points);if(e.length===0)return null;let t=e.map(e=>e.timestamp),n=e.map(e=>e.value),r=Math.min(...t),i=Math.max(...t),a=Math.max(...n);return{minTime:r,maxTime:i===r?r+1:i,maxValue:a===0?1:a}}),d=M(()=>z(u)?_L().domain([z(u).minTime,z(u).maxTime]).range([0,z(o)]):null),f=M(()=>z(u)?_L().domain([0,z(u).maxValue]).range([z(s),0]):null),p=M(()=>z(u)?WL(0,z(u).maxValue,4):[]),m=M(()=>z(u)?WL(z(u).minTime,z(u).maxTime,4):[]);function h(e){return!z(d)||!z(f)||e.points.length<2?null:NL().x(e=>z(d)(e.timestamp)).y0(z(s)).y1(e=>z(f)(e.value))(e.points)}function g(e){return!z(d)||!z(f)||e.points.length<2?null:ML().x(e=>z(d)(e.timestamp)).y(e=>z(f)(e.value))(e.points)}function _(e){return .3-e*.08}function v(e){return`p${Math.round(e*100)}`}function y(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`})}function b(e){let n=Math.round(e*10)/10;return t.unit?`${n}${t.unit}`:String(n)}let x=M(()=>z(l).map(e=>({quantile:e.quantile,value:e.points[e.points.length-1]?.value})));var S=la(),C=I(S),w=e=>{var n=bR();R(e=>{q(n,1,e),oo(n,`height:${i()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,n)},T=e=>{var n=ER(),u=F(n),S=F(u),C=F(S);G(C,16,()=>z(p),e=>e,(e,t)=>{let n=M(()=>z(f)?z(f)(t):0);var r=la(),i=I(r),a=e=>{var r=xR(),i=I(r),a=L(i),s=F(a,!0);D(a),R(e=>{J(i,`x2`,z(o)),J(i,`y1`,z(n)),J(i,`y2`,z(n)),J(a,`y`,z(n)),U(s,e)},[()=>b(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(s)&&e(a)}),H(e,r)});var w=L(C);G(w,16,()=>z(m),e=>e,(e,t)=>{let n=M(()=>z(d)?z(d)(t):0);var r=la(),i=I(r),a=e=>{var r=SR(),i=F(r,!0);D(r),R(e=>{J(r,`x`,z(n)),J(r,`y`,z(s)+14),U(i,e)},[()=>y(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(o)&&e(a)}),H(e,r)});var T=L(w);G(T,19,()=>[...z(l)].reverse(),e=>e.quantile,(e,t,n)=>{let r=M(()=>h(z(t)));var i=la(),a=I(i),o=e=>{var i=CR();R((e,t)=>{J(i,`d`,z(r)),J(i,`opacity`,e),J(i,`data-testid`,`band-${t??``}`)},[()=>_(z(l).length-1-z(n)),()=>v(z(t).quantile)]),H(e,i)};W(a,e=>{z(r)&&e(o)}),H(e,i)}),G(L(T),17,()=>z(l),e=>e.quantile,(e,t)=>{let n=M(()=>g(z(t)));var r=la(),i=I(r),a=e=>{var r=wR();R(e=>{J(r,`d`,z(n)),J(r,`data-testid`,`line-${e??``}`)},[()=>v(z(t).quantile)]),H(e,r)};W(i,e=>{z(n)&&e(a)}),H(e,r)}),D(S),D(u);var ee=L(u,2);G(ee,21,()=>z(x),e=>e.quantile,(e,t)=>{var n=TR(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a),D(n),R((e,t)=>{U(i,e),U(o,t)},[()=>v(z(t).quantile),()=>z(t).value===void 0?`—`:b(z(t).value)]),H(e,n)}),D(ee),D(n),R((e,t)=>{q(n,1,e),J(u,`width`,r()),J(u,`height`,i()),J(u,`viewBox`,`0 0 ${r()??``} ${i()??``}`),J(u,`aria-label`,`Percentile bands: ${t??``}`),J(S,`transform`,`translate(${a.left??``},${a.top??``})`)},[()=>K($(`flex flex-col gap-2`,t.class)),()=>z(c).map(v).join(`, `)]),H(e,n)};W(C,e=>{z(u)?e(T,-1):e(w)}),H(e,S),at()}var OR=V(`<button type="button"><!> </button>`),kR=V(`<div class="flex rounded border border-line overflow-hidden" role="group" aria-label="Chart type"></div>`),AR=V(`<option> </option>`),jR=V(`<label class="flex items-center gap-1.5 text-[11px] text-fg-muted cursor-pointer" title="Show cumulative or delta counter change per second"><input type="checkbox" class="w-3 h-3 rounded border-line"/> Rate</label>`),MR=V(`<label class="flex items-center gap-1.5 text-[11px] text-fg-muted cursor-pointer" title="Stack the series so each sits on the sum of those below"><input type="checkbox" class="w-3 h-3 rounded border-line"/> <!> Stack</label>`),NR=V(`<label class="flex items-center gap-1 text-[11px] text-fg-muted"><span class="text-fg-subtle">Summarise</span> <select aria-label="Summary statistic" class="rounded border border-line bg-surface px-1.5 py-1 text-[11px] text-fg"></select></label> <!> <!>`,1),PR=V(`<div><!> <!></div>`);function FR(e,t){it(t,!0);let n=M(()=>t.kind===`histogram`||t.kind===`exponentialHistogram`),r=M(()=>t.kind!==`gauge`),i=M(()=>t.kind===`sum`),a=[{id:`timeseries`,label:`Time series`,icon:Uh},{id:`percentiles`,label:`Percentiles`,icon:_p},{id:`heatmap`,label:`Heatmap`,icon:_m}],o=M(()=>z(n)?a:a.filter(e=>e.id===`timeseries`)),s=[{id:`sum`,label:`Sum`},{id:`avg`,label:`Avg`},{id:`min`,label:`Min`},{id:`max`,label:`Max`},{id:`last`,label:`Last`},{id:`count`,label:`Count`}];var c=PR(),l=F(c),u=e=>{var n=kR();G(n,21,()=>z(o),e=>e.id,(e,n)=>{let r=M(()=>z(n).icon);var i=OR(),a=F(i);Ra(a,()=>z(r),(e,t)=>{t(e,{size:11})});var o=L(a);D(i),R(e=>{J(i,`aria-pressed`,t.mode===z(n).id),J(i,`title`,z(n).label),q(i,1,e),U(o,` ${z(n).label??``}`)},[()=>K($(`flex items-center gap-1 px-2 py-1 text-[11px] transition-colors`,`focus-visible:outline-none focus-visible:bg-hover`,t.mode===z(n).id?`bg-selected text-fg font-medium`:`text-fg-muted hover:bg-hover`))]),B(`click`,i,()=>t.onMode(z(n).id)),H(e,i)}),D(n),H(e,n)};W(l,e=>{z(o).length>1&&e(u)});var d=L(l,2),f=e=>{var n=NR(),a=I(n),o=L(F(a),2);G(o,21,()=>s,e=>e.id,(e,t)=>{var n=AR(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).label),i!==(i=z(t).id)&&(n.value=(n.__value=z(t).id)??``)}),H(e,n)}),D(o);var c;co(o),D(a);var l=L(a,2),u=e=>{var n=jR(),r=F(n);xo(r),Ke(),D(n),R(()=>Co(r,t.rate)),B(`change`,r,e=>t.onRate(e.currentTarget.checked)),H(e,n)};W(l,e=>{z(i)&&e(u)});var d=L(l,2),f=e=>{var n=MR(),r=F(n);xo(r),Tm(L(r,2),{size:11}),Ke(),D(n),R(()=>Co(r,t.stacked)),B(`change`,r,e=>t.onStacked(e.currentTarget.checked)),H(e,n)};W(d,e=>{z(r)&&e(f)}),R(()=>{c!==(c=t.aggregate)&&(o.value=(o.__value=t.aggregate)??``,so(o,t.aggregate))}),B(`change`,o,e=>t.onAggregate(e.currentTarget.value)),H(e,n)};W(d,e=>{t.mode===`timeseries`&&e(f)}),D(c),R(e=>q(c,1,e),[()=>K($(`flex items-center gap-3 flex-wrap`,t.class))]),H(e,c),at()}ea([`click`,`change`]);var IR=V(`<button type="button" title="Delete this metric stream" aria-label="Delete selected metric" class="p-1.5 hover:bg-danger-bg rounded transition-colors text-fg-subtle hover:text-danger"><!></button>`),LR=V(`<div role="alert" class="m-4 rounded border border-danger-border bg-danger-bg px-3 py-2 text-xs text-danger"> </div>`),RR=V(`<div class="flex-1 flex items-center justify-center text-sm text-fg-subtle">No metrics received yet. Point an OTLP exporter at this server.</div>`),zR=V(`<span> </span>`),BR=V(`<button type="button" role="option"><div class="flex items-center justify-between gap-2"><span class="text-xs font-medium text-fg truncate"> </span> <!></div> <div class="mt-0.5 flex items-center gap-2 text-[10px] text-fg-subtle"><span class="uppercase tracking-wide"> </span> <!> <span> </span></div></button>`),VR=V(`<div class="p-3 text-xs text-fg-subtle">No metric matches that filter.</div>`),HR=V(`<div class="text-sm text-fg-subtle">Select a metric.</div>`),UR=V(`<p class="text-xs text-fg-muted mt-0.5"> </p>`),WR=V(`<div class="text-xs text-fg-subtle">No data for this metric in the selected window.</div>`),GR=V(`<button type="button"><span class="w-2.5 h-2.5 rounded-sm shrink-0"></span> <span class="truncate text-fg-muted font-mono"> </span> <span class="ml-auto font-mono text-fg tabular-nums"> </span></button>`),KR=V(`<div class="mt-3 border-t border-line pt-2 space-y-1" role="group" aria-label="Series"></div>`),qR=V(`<div class="mb-3"><h4 class="text-sm font-semibold text-fg"> </h4> <!></div> <!> <!> <!>`,1),JR=V(`<div class="flex-1 flex min-h-0"><div class="w-72 shrink-0 border-r border-line flex flex-col min-h-0"><div class="p-2 border-b border-line"><!></div> <div class="flex-1 overflow-auto" role="listbox" aria-label="Metrics"><!> <!></div></div> <div class="flex-1 min-w-0 overflow-auto p-4"><!></div></div>`),YR=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between px-4 py-2 border-b border-line gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg shrink-0"><!> Metrics</h3> <!> <div class="flex items-center gap-1"><!> <button type="button" title="Refresh" aria-label="Refresh metrics" class="p-1.5 hover:bg-hover rounded transition-colors text-fg-subtle"><!></button></div></div> <!> <!></div>`);function XR(e,t){it(t,!0);function n(){let e=pl.value;return(e?Zo(e):null)??globalThis.location.origin}let r=N(_r([])),i=N(null),a=N(_r([])),o=N(null),s=N(!1),c=N(``),l=M(()=>ml.value),u=N(_r(new Set)),d=N(`timeseries`),f=N(`sum`),p=N(!1),m=N(!0),h=()=>({fetch:globalThis.fetch.bind(globalThis),baseUrl:n()});async function g(e=z(c)){let t=await uF(h(),e);t.status===`ok`?(P(r,t.data,!0),P(o,null),!z(i)&&z(r).length>0&&v(z(r)[0].name)):t.status===`error`&&P(o,t.message,!0)}async function _(e){P(s,!0);let t=await dF({name:e,window:ks(Cs(ml.value,Date.now()))},h());t.status!==`aborted`&&(P(s,!1),t.status===`ok`?(P(a,t.data,!0),P(o,null)):P(o,t.message,!0))}function v(e){P(i,e,!0),P(u,new Set,!0),P(d,`timeseries`),P(f,`sum`),P(p,!1),_(e)}function y(){g(),z(i)&&_(z(i))}function b(e){ml.value=e,z(i)&&_(z(i))}function x(e,t){Nu(e),Wc(e,t),Mu(`traces`)}function S(e){let t=new Set(z(u));t.has(e)?t.delete(e):t.add(e),P(u,t,!0)}async function C(){if(!z(i)||!globalThis.confirm(`Delete every stored series for “${z(i)}”?`))return;let e=await fF(z(i),h());if(e.status!==`ok`){e.status===`error`&&P(o,e.message,!0);return}P(i,null),P(a,[],!0),await g(``)}Lr(()=>{let e=z(c),t=setTimeout(()=>void g(e),200);return()=>clearTimeout(t)});let w=M(()=>z(r).find(e=>e.name===z(i))),T=M(()=>z(w)?.kind===`histogram`||z(w)?.kind===`exponentialHistogram`),ee=M(()=>z(a).map(e=>({...e,points:z(m)?LL(e.points,e.temporality):e.points}))),te=M(()=>z(a).flatMap(e=>e.points).sort((e,t)=>e.timestamp-t.timestamp)),ne=M(()=>z(r)),re=M(()=>z(a).map(e=>({id:e.seriesId,color:hg(e.seriesId).stroke,label:ie(e),value:UL(z(m)?LL(e.points,e.temporality):e.points,e.kind===`gauge`?`last`:z(f))})));function ie(e){let t=Object.entries(e.attributes),n=Object.entries(e.resource??{}).filter(([e])=>e!==`service.name`);return[...t,...n].map(([e,t])=>`${e}=${String(t)}`).join(` `)||e.service}function ae(e,t){return e===void 0?`—`:`${(Math.round(e*100)/100).toLocaleString(void 0,{maximumFractionDigits:2})}${t&&t!==`1`?` ${t}`:``}${z(m)&&z(w)?.kind===`sum`?`/s`:``}`}var oe=YR(),se=F(oe),ce=F(se);yp(F(ce),{size:16}),Ke(),D(ce);var le=L(ce,2);uA(le,{get selection(){return z(l)},onChange:b});var E=L(le,2),ue=F(E),de=e=>{var t=IR();Vh(F(t),{size:14}),D(t),B(`click`,t,C),H(e,t)};W(ue,e=>{z(i)&&e(de)});var fe=L(ue,2),pe=F(fe);{let e=M(()=>z(s)?`animate-spin`:``);ph(pe,{size:14,get class(){return z(e)}})}D(fe),D(E),D(se);var me=L(se,2),he=e=>{var t=LR(),n=F(t,!0);D(t),R(()=>U(n,z(o))),H(e,t)};W(me,e=>{z(o)&&e(he)});var ge=L(me,2),_e=e=>{H(e,RR())},ve=e=>{var t=JR(),n=F(t),r=F(n);L_(F(r),{get value(){return z(c)},onValue:e=>P(c,e,!0),placeholder:`Filter metrics…`,ariaLabel:`Filter metrics`}),D(r);var o=L(r,2),s=F(o);G(s,17,()=>z(ne),e=>e.name+e.kind,(e,t)=>{var n=BR(),r=F(n),o=F(r),s=F(o,!0);D(o);var c=L(o,2),l=e=>{{let n=M(()=>z(m)?LL(z(a)[0].points,z(a)[0].temporality):z(a)[0].points);IL(e,{get points(){return z(n)},width:48,height:14,get ariaLabel(){return`${z(t).name??``} trend`}})}};W(c,e=>{z(t).name===z(i)&&z(a).length>0&&e(l)}),D(r);var u=L(r,2),d=F(u),f=F(d,!0);D(d);var p=L(d,2),h=e=>{var n=zR(),r=F(n,!0);D(n),R(()=>U(r,z(t).unit)),H(e,n)};W(p,e=>{z(t).unit&&z(t).unit!==`1`&&e(h)});var g=L(p,2),_=F(g);D(g),D(u),D(n),R(e=>{J(n,`aria-selected`,z(t).name===z(i)),q(n,1,e),U(s,z(t).name),U(f,z(t).kind),U(_,`${z(t).seriesCount??``}
|
|
29
|
+
series`)},[()=>K($(`w-full text-left px-3 py-2 border-b border-line-subtle hover:bg-hover`,`focus-visible:outline-none focus-visible:bg-hover`,z(t).name===z(i)&&`bg-selected`))]),B(`click`,n,()=>v(z(t).name)),H(e,n)});var l=L(s,2),h=e=>{H(e,VR())};W(l,e=>{z(ne).length===0&&e(h)}),D(o),D(n);var g=L(n,2),_=F(g),y=e=>{H(e,HR())},b=e=>{var t=qR(),n=I(t),r=F(n),i=F(r,!0);D(r);var o=L(r,2),s=e=>{var t=UR(),n=F(t,!0);D(t),R(()=>U(n,z(w).description)),H(e,t)};W(o,e=>{z(w).description&&e(s)}),D(n);var c=L(n,2);FR(c,{get kind(){return z(w).kind},get mode(){return z(d)},onMode:e=>P(d,e,!0),get aggregate(){return z(f)},onAggregate:e=>P(f,e,!0),get stacked(){return z(p)},onStacked:e=>P(p,e,!0),get rate(){return z(m)},onRate:e=>P(m,e,!0),class:`mb-3`});var l=L(c,2),h=e=>{H(e,WR())},g=e=>{yR(e,{get points(){return z(te)},get unit(){return z(w).unit}})},_=e=>{DR(e,{get points(){return z(te)},get unit(){return z(w).unit}})},v=e=>{fR(e,{get point(){return z(te)[z(te).length-1]},get unit(){return z(w).unit}})},y=e=>{{let t=M(()=>z(ee).length===1&&!z(p));oR(e,{get series(){return z(ee)},get isolated(){return z(u)},get stacked(){return z(p)},get area(){return z(t)},onExemplar:x})}};W(l,e=>{z(a).length===0?e(h):z(d)===`heatmap`?e(g,1):z(d)===`percentiles`?e(_,2):z(T)?e(v,3):e(y,-1)});var b=L(l,2),C=e=>{var t=KR();G(t,21,()=>z(re),e=>e.id,(e,t)=>{var n=GR(),r=F(n),i=L(r,2),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(n),R((e,i,o)=>{J(n,`aria-pressed`,e),q(n,1,i),oo(r,`background:${z(t).color??``}`),U(a,z(t).label),U(s,o)},[()=>z(u).has(z(t).id),()=>K($(`w-full flex items-center gap-2 px-1 py-0.5 rounded text-[11px] hover:bg-hover`,`focus-visible:outline-none focus-visible:bg-hover`,z(u).size>0&&!z(u).has(z(t).id)&&`opacity-40`)),()=>ae(z(t).value,z(w).unit)]),B(`click`,n,()=>S(z(t).id)),H(e,n)}),D(t),H(e,t)};W(b,e=>{z(a).length>0&&z(d)===`timeseries`&&e(C)}),R(()=>U(i,z(w).name)),H(e,t)};W(_,e=>{z(w)?e(b,-1):e(y)}),D(g),D(t),H(e,t)};W(ge,e=>{z(r).length===0?e(_e):e(ve,-1)}),D(oe),B(`click`,fe,y),H(e,oe),at()}ea([`click`]);function ZR(e){let t=e.severityNumber,n=(e.severityText??``).toUpperCase();return n===`ERROR`||t!==void 0&&t>=17?`error`:n===`WARN`||n===`WARNING`||t!==void 0&&t>=13?`warn`:`info`}function QR(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function $R(e){try{return JSON.stringify({body:e.body,severity:e.severityText??null,severityNumber:e.severityNumber??null,timestamp:e.timestamp,traceId:e.traceId??null,attributes:e.attributes??{}},null,2)}catch{return QR(e.body)}}function ez(e,t,n){if(n!==`all`){let t=ZR(e);if(n===`error`&&t!==`error`||n===`warn`&&t!==`warn`&&t!==`error`||n===`info`&&t!==`info`)return!1}return R_(t.toLowerCase(),[QR(e.body),e.severityText,e.resourceName,e.traceId])}function tz(e){let t=ZR(e);return t===`error`?`text-danger`:t===`warn`?`text-warning`:`text-fg-subtle`}function nz(e){let t=ZR(e);return t===`error`?`bg-danger`:t===`warn`?`bg-warning`:`bg-line`}function rz(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function iz(e){try{return JSON.stringify(e.attributes??{},null,2)}catch{return`{}`}}var az=V(`<span class="flex-shrink-0 text-fg-subtle truncate max-w-[10rem]"> </span>`),oz=V(`<button type="button" title="Go to trace" aria-label="Go to trace" class="flex-shrink-0 inline-flex items-center justify-center p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity"><!></button>`),sz=V(`<div class="font-mono text-xs break-words whitespace-pre-wrap pr-6"> </div>`),cz=V(`<pre class="font-mono text-[11px] text-fg-muted whitespace-pre-wrap break-words pr-6"> </pre>`),lz=V(`<div class="flex items-center gap-1"><button type="button" class="inline-flex items-center gap-1 text-xs text-fg-muted hover:underline"><!> Go to trace</button> <!></div>`),uz=V(`<div class="pl-3 pr-2 pb-2 space-y-2"><!> <!> <!></div>`),dz=V(`<div class="group relative flex flex-col border-b border-line-subtle hover:bg-hover"><span aria-hidden="true"></span> <div class="flex items-center gap-2 pl-3 pr-2 py-1 text-xs"><button type="button" class="flex flex-1 items-center gap-2 min-w-0 text-left"><span class="font-mono tabular-nums text-fg-subtle flex-shrink-0"> </span> <span> </span> <span class="font-mono text-fg truncate min-w-0 flex-1"> </span> <!></button> <!> <!></div> <!></div>`),fz=V(`<button class="px-2 py-1 text-xs rounded text-fg-subtle hover:bg-hover transition-colors" title="Drop buffered logs received while paused">Drop buffer</button>`),pz=V(`<div class="text-center text-fg-subtle text-sm py-12">Loading logs…</div>`),mz=V(`<div class="text-center text-fg-subtle text-sm py-12">No logs yet. Send logs via AutotelLogExporter or POST /ingest/logs.</div>`),hz=V(`<div class="text-center text-fg-subtle text-sm py-12">No logs match the current filter.</div>`),gz=V(`<div class="px-4 py-3 text-center text-xs text-fg-subtle"> </div>`),_z=V(`<!> <!>`,1),vz=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3> <div class="flex items-center gap-1"><button><!> </button> <!></div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!> <!> <select class="text-xs border border-line rounded px-1.5 py-1 bg-surface text-fg-muted"><option>All</option><option>Errors</option><option>Warn+</option><option>Info</option></select></div> <div class="flex-1 overflow-auto space-y-0"><!></div></div>`);function yz(e,t){it(t,!0);let n=(e,t=p)=>{let n=M(()=>QR(t().body)),r=M(()=>tz(t())),i=M(()=>nz(t())),a=M(()=>z(c).has(t().id));var o=dz(),s=F(o),u=L(s,2),d=F(u),f=F(d),m=F(f,!0);D(f);var h=L(f,2),g=F(h,!0);D(h);var _=L(h,2),v=F(_,!0);D(_);var b=L(_,2),x=e=>{var n=az(),r=F(n,!0);D(n),R(()=>U(r,t().resourceName)),H(e,n)};W(b,e=>{t().resourceName&&e(x)}),D(d);var S=L(d,2),C=e=>{var n=oz();km(F(n),{size:12}),D(n),B(`click`,n,()=>y(t())),H(e,n)};W(S,e=>{t().traceId&&e(C)});var w=L(S,2);{let e=M(()=>$R(t()));Q_(w,{get value(){return z(e)},label:`Copy log as JSON`,class:`flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(u);var T=L(u,2),ee=e=>{var r=uz(),i=F(r);P_(i,{get content(){return z(n)},children:(e,t)=>{var r=sz(),i=F(r,!0);D(r),R(()=>U(i,z(n))),H(e,r)},$$slots:{default:!0}});var a=L(i,2),o=e=>{{let n=M(()=>iz(t()));P_(e,{get content(){return z(n)},children:(e,n)=>{var r=cz(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>iz(t())]),H(e,r)},$$slots:{default:!0}})}},s=M(()=>t().attributes&&Object.keys(t().attributes).length>0);W(a,e=>{z(s)&&e(o)});var c=L(a,2),l=e=>{var n=lz(),r=F(n);km(F(r),{size:12}),Ke(),D(r),Q_(L(r,2),{get value(){return t().traceId},label:`Copy trace ID`}),D(n),B(`click`,r,()=>y(t())),H(e,n)};W(c,e=>{t().traceId&&e(l)}),D(r),H(e,r)};W(T,e=>{z(a)&&e(ee)}),D(o),R((e,r,i)=>{q(s,1,e),J(d,`aria-expanded`,z(a)),J(d,`title`,z(a)?`Collapse log`:`Expand log`),U(m,r),q(h,1,i),U(g,t().severityText??`LOG`),U(v,z(n))},[()=>K($(`absolute inset-y-0 left-0 w-0.5`,z(i))),()=>rz(t().timestamp),()=>K($(`flex-shrink-0 font-medium uppercase tracking-wide text-[10px]`,z(r)))]),B(`click`,d,()=>l(t().id)),H(e,o)},r=M(()=>ql.value),i=M(()=>wl.value),a=M(()=>Ol.value),o=N(``),s=N(`all`),c=N(_r(new Set));function l(e){let t=new Set(z(c));t.has(e)?t.delete(e):t.add(e),P(c,t,!0)}let u=jA({client:{fetch:globalThis.fetch.bind(globalThis),baseUrl:()=>(pl.value?Zo(pl.value):null)??globalThis.location.origin}});Lr(()=>()=>u.dispose());let d=N(null),f=N(_r([]));Lr(()=>{let e=(pl.value?Zo(pl.value):null)??globalThis.location.origin;e!==z(d)&&(P(d,e,!0),pA(`logs`,{fetch:globalThis.fetch.bind(globalThis),baseUrl:e}).then(e=>P(f,e,!0)),u.refresh())});let m=N(0);Lr(()=>{let e=z(r).length;e>z(m)&&u.arrived(e-z(m)),P(m,e,!0)});let h=M(()=>u.results.value),g=M(()=>{let e=u.ready.value&&u.failure.value===null,t=z(r);return e&&(t=z(o).length>0?z(h):_(z(h),z(r))),t.filter(t=>ez(t,e?``:z(o),z(s)))});function _(e,t){let n=new Set(e.map(e=>e.id));return[...e,...t.filter(e=>!n.has(e.id))]}let v=M(()=>z(o).length>0||z(s)!==`all`);function y(e){e.traceId&&(Nu(e.traceId),Mu(`traces`))}var b=vz(),x=F(b),S=F(x),C=F(S);rm(C,{size:16});var w=L(C);D(S);var T=L(S,2),ee=F(T),te=F(ee),ne=e=>{ah(e,{size:12})},re=e=>{th(e,{size:12})};W(te,e=>{z(i)?e(ne):e(re,-1)});var ie=L(te);D(ee);var ae=L(ee,2),oe=e=>{var t=fz();B(`click`,t,function(...e){Ou?.apply(this,e)}),H(e,t)};W(ae,e=>{z(i)&&z(a)>0&&e(oe)}),D(T),D(x);var se=L(x,2),ce=F(se);jb(ce,{get value(){return u.text.value},onInput:e=>{u.setText(e),P(o,e,!0)},onSubmit:()=>u.submit(),get serverErrors(){return u.errors.value},get fields(){return z(f)},placeholder:`Filter — e.g. severity_number >= 17 AND service = api`,class:`flex-1`});var le=L(ce,2);uA(le,{get selection(){return u.window.value},onChange:e=>u.setWindow(e)});var E=L(le,2);fA(E,{get count(){return u.pending},get live(){return u.live},onResume:()=>{P(o,``),u.resume()}});var ue=L(E,2),de=F(ue);de.value=de.__value=`all`;var fe=L(de);fe.value=fe.__value=`error`;var pe=L(fe);pe.value=pe.__value=`warn`;var me=L(pe);me.value=me.__value=`info`,D(ue);var he;co(ue),D(se);var ge=L(se,2),_e=F(ge),ve=e=>{H(e,pz())},ye=e=>{H(e,mz())},be=e=>{H(e,hz())},xe=e=>{var t=_z(),r=I(t);G(r,17,()=>z(g),e=>e.id,(e,t)=>{n(e,()=>z(t))});var i=L(r,2),a=e=>{var t=gz(),n=F(t,!0);D(t),Xa(t,(e,t)=>MA?.(e,t),()=>({onReach:()=>u.loadMore(),disabled:u.loading.value})),R(()=>U(n,u.loading.value?`Loading…`:`Scroll for more`)),H(e,t)};W(i,e=>{u.nextCursor.value&&e(a)}),H(e,t)};W(_e,e=>{u.loading.value&&!u.ready.value&&z(r).length===0?e(ve):z(g).length===0&&!z(v)?e(ye,1):z(g).length===0?e(be,2):e(xe,-1)}),D(ge),D(b),R(e=>{U(w,` Logs (${z(g).length??``})`),q(ee,1,e),J(ee,`title`,z(i)?`Resume live tail`:`Pause live tail`),U(ie,` ${z(i)?`Resume${z(a)>0?` (+${z(a)})`:``}`:`Pause`}`),he!==(he=z(s))&&(ue.value=(ue.__value=z(s))??``,so(ue,z(s)))},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors`,z(i)?`bg-warning-bg text-warning hover:bg-warning-bg`:`hover:bg-hover text-fg-muted`))]),B(`click`,ee,function(...e){Du?.apply(this,e)}),B(`change`,ue,e=>P(s,e.currentTarget.value,!0)),H(e,b),at()}ea([`click`,`change`]);var bz=V(`<p class="p-3 text-xs text-fg-muted">No stack frames on this error.</p>`),xz=V(`<button type="button"><span class="font-mono text-xs text-fg"> </span> <span class="font-mono text-[11px] text-fg-subtle"> </span></button>`),Sz=V(`<div class="flex flex-col items-start gap-0.5 px-3 py-2"><span class="flex items-center gap-2"><span class="font-mono text-xs text-fg-muted"> </span> <span class="rounded bg-subtle px-1.5 py-0.5 text-[10px] text-fg-subtle"> </span></span> <span class="font-mono text-[11px] text-fg-muted"> </span></div>`),Cz=V(`<li><!></li>`),wz=V(`<ol class="divide-y divide-line-subtle"></ol>`);function Tz(e,t){it(t,!0);let n=Z(t,`selected`,3,null),r={dependency:`node_modules`,native:`runtime`};function i(e){return`${e.file}:${e.line}:${e.column}`}function a(e){return n()!==null&&n().file===e.file&&n().line===e.line&&n().column===e.column}var o=la(),s=I(o),c=e=>{H(e,bz())},l=e=>{var n=wz();G(n,21,()=>t.frames,Oa,(e,n)=>{let o=M(()=>z(n).kind===`app`?null:r[z(n).kind]);var s=Cz(),c=F(s),l=e=>{var r=xz(),o=F(r),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(r),R((e,t)=>{q(r,1,e),U(s,z(n).function??`(anonymous)`),U(l,t)},[()=>K($(`flex w-full flex-col items-start gap-0.5 px-3 py-2 text-left transition-colors hover:bg-hover`,a(z(n))&&`bg-subtle border-l-2 border-accent`)),()=>i(z(n))]),B(`click`,r,()=>t.onselect?.(z(n))),H(e,r)},u=e=>{var t=Sz(),r=F(t),a=F(r),s=F(a,!0);D(a);var c=L(a,2),l=F(c,!0);D(c),D(r);var u=L(r,2),d=F(u,!0);D(u),D(t),R(e=>{U(s,z(n).function??`(anonymous)`),U(l,z(o)),U(d,e)},[()=>i(z(n))]),H(e,t)};W(c,e=>{z(n).kind===`app`?e(l):e(u,-1)}),D(s),H(e,s)}),D(n),H(e,n)};W(s,e=>{t.frames.length===0?e(c):e(l,-1)}),H(e,o),at()}ea([`click`]);var Ez=V(`<p class="p-3 text-xs text-fg-muted">This file could not be read. It may be outside the project, or generated
|
|
30
|
+
rather than written.</p>`),Dz=V(`<button type="button" class="rounded px-1.5 py-0.5 text-[11px] text-accent hover:bg-hover">Open in editor</button>`),Oz=V(`<li><span class="w-8 shrink-0 select-none text-right text-fg-subtle"> </span> <span class="whitespace-pre"> </span></li>`),kz=V(`<div class="flex flex-col"><div class="flex items-center justify-between border-b border-line px-3 py-1.5"><span class="font-mono text-[11px] text-fg-subtle"> </span> <!></div> <ol class="overflow-x-auto py-1"></ol></div>`);function Az(e,t){it(t,!0);var n=la(),r=I(n),i=e=>{H(e,Ez())},a=e=>{var n=kz(),r=F(n),i=F(r),a=F(i);D(i);var o=L(i,2),s=e=>{var n=Dz();B(`click`,n,()=>t.onopen?.(t.window)),H(e,n)};W(o,e=>{t.onopen&&e(s)}),D(r);var c=L(r,2);G(c,21,()=>t.window.lines,Oa,(e,n,r)=>{let i=M(()=>t.window.startLine+r),a=M(()=>z(i)===t.window.line);var o=Oz(),s=F(o),c=F(s,!0);D(s);var l=L(s,2),u=F(l,!0);D(l),D(o),R(e=>{J(o,`aria-current`,z(a)?`true`:void 0),q(o,1,e),U(c,z(i)),U(u,z(n))},[()=>K($(`flex gap-3 px-3 font-mono text-[11px] leading-5`,z(a)?`bg-danger-bg text-fg`:`text-fg-muted`))]),H(e,o)}),D(c),D(n),R(()=>U(a,`${t.window.file??``}:${t.window.line??``}`)),H(e,n)};W(r,e=>{t.window===null?e(i):e(a,-1)}),H(e,n),at()}ea([`click`]);function jz(e){return e.startsWith(`node:`)||e.startsWith(`[`)||e.startsWith(`<`)?`native`:/(^|[/\\])node_modules([/\\]|$)/.test(e)?`dependency`:`app`}var Mz=/^\s*at\s+(?:async\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/,Nz=/^\s*at\s+(?:async\s+)?(.+?):(\d+):(\d+)$/;function Pz(e){if(!e.startsWith(`file://`))return e;try{let t=decodeURIComponent(new URL(e).pathname);return/^\/[A-Za-z]:/.test(t)?t.slice(1):t}catch{return e}}function Fz(e){let t=[];for(let n of e.split(`
|
|
31
|
+
`)){let e=Mz.exec(n);if(e){let n=Pz(e[2]);t.push({function:e[1],file:n,line:Number(e[3]),column:Number(e[4]),kind:jz(n)});continue}let r=Nz.exec(n);if(r){let e=Pz(r[1]);t.push({file:e,line:Number(r[2]),column:Number(r[3]),kind:jz(e)})}}return t}var Iz=V(`<div class="overflow-hidden rounded border border-line"><!></div>`),Lz=V(`<div class="flex flex-col gap-2"><div class="overflow-hidden rounded border border-line"><!></div> <!></div>`);function Rz(e,t){it(t,!0);let n=Z(t,`context`,3,4),r=M(()=>Fz(t.stackTrace)),i=N(null),a=N(null),o=N(!1),s=0;async function c(e){P(i,e,!0),P(o,!1);let r=++s,c=await t.loadSource(e,n());r===s&&(P(a,c,!0),P(o,!0))}var l=la(),u=I(l),d=e=>{var t=Lz(),n=F(t);Tz(F(n),{get frames(){return z(r)},get selected(){return z(i)},onselect:c}),D(n);var s=L(n,2),l=e=>{var t=Iz();Az(F(t),{get window(){return z(a)}}),D(t),H(e,t)};W(s,e=>{z(o)&&e(l)}),D(t),H(e,t)};W(u,e=>{z(r).length>0&&e(d)}),H(e,l),at()}function zz(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var Bz=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded"> </span>`),Vz=V(`<pre class="text-xs font-mono bg-code text-fg p-2 rounded overflow-x-auto whitespace-pre-wrap"> </pre>`),Hz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Stack Trace</h5> <!> <details class="mt-2"><summary class="cursor-pointer text-[11px] text-fg-subtle hover:text-fg">Raw stack</summary> <!></details></div>`),Uz=V(`<span class="px-2 py-0.5 text-xs font-mono bg-hover text-fg-muted rounded"> </span>`),Wz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Affected Operations</h5> <div class="flex flex-wrap gap-1"></div></div>`),Gz=V(`<div class="group flex items-center gap-1"><button class="flex items-center gap-1 text-xs text-fg-muted hover:text-fg font-mono"><!> <!></button> <!></div>`),Kz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Recent Traces</h5> <div class="space-y-1"></div></div>`),qz=V(`<div class="flex gap-2"><span class="text-fg-subtle"> </span> <span class="font-mono text-fg-muted"> </span></div>`),Jz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Context</h5> <div class="text-xs space-y-0.5"></div></div>`),Yz=V(`<div class="border-t border-line p-3 bg-subtle space-y-3"><!> <!> <!> <!> <div class="text-xs text-fg-subtle pt-2 border-t border-line"><div class="flex gap-4"><span> </span> <span> </span></div></div></div>`),Xz=V(`<div role="option"><button class="w-full p-3 flex items-start gap-3 hover:bg-subtle transition-colors text-left"><div class="mt-0.5"><!></div> <div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1"><span class="text-sm font-semibold text-danger"> </span> <span class="px-1.5 py-0.5 text-xs font-medium bg-danger-bg text-danger rounded"> </span> <!></div> <div class="group flex items-start gap-1 mb-2"><p class="text-sm text-fg-muted truncate"> </p> <!></div> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span class="flex items-center gap-1"><!> </span> <span class="flex items-center gap-1"><!> </span></div></div></button> <!></div>`),Zz=V(`<span class="text-xs font-normal text-fg-muted"> </span>`),Qz=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-danger-bg text-danger rounded-full"> </span>`),$z=V(`<div class="flex gap-4 mb-4 p-3 bg-subtle rounded-md border border-line"><div class="text-sm"><span class="text-fg-muted">Groups:</span> <span class="font-semibold text-fg"> </span></div> <div class="text-sm"><span class="text-fg-muted">Total:</span> <span class="font-semibold text-fg"> </span></div> <div class="text-sm"><span class="text-fg-muted">Last hour:</span> <span class="font-semibold text-danger"> </span></div></div>`),eB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No errors captured</p> <p class="text-xs text-fg-subtle mt-1">Errors from failed traces will appear here</p></div>`),tB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No matching errors</p> <p class="text-xs text-fg-subtle mt-1">No error groups match the current filter</p></div>`),nB=V(`<div class="flex flex-col h-full p-4"><div class="flex items-center justify-between mb-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Errors <!> <!></h3> <div class="flex items-center gap-2"><select class="text-xs border border-line rounded px-2 py-1 bg-surface text-fg-muted"><option>Most Recent</option><option>Most Frequent</option></select></div></div> <!> <!> <div role="listbox" tabindex="0" aria-label="Error groups" class="flex-1 overflow-auto space-y-2 focus:outline-none"><!></div></div>`);function rB(e,t){it(t,!0);let n=(e,t=p,n=p,r=p,i=p)=>{let a=M(()=>Date.now()-t().firstSeen),o=M(()=>Date.now()-t().lastSeen);var s=Xz(),c=F(s),l=F(c),u=F(l),d=e=>{Cp(e,{size:16,class:`text-fg-subtle`})},f=e=>{Dp(e,{size:16,class:`text-fg-subtle`})};W(u,e=>{n()?e(d):e(f,-1)}),D(l);var v=L(l,2),y=F(v),b=F(y),x=F(b,!0);D(b);var S=L(b,2),C=F(S);D(S);var w=L(S,2),T=e=>{var n=Bz(),r=F(n,!0);D(n),R(()=>U(r,t().service)),H(e,n)};W(w,e=>{t().service&&e(T)}),D(y);var ee=L(y,2),te=F(ee),ne=F(te,!0);D(te);var re=L(te,2);{let e=M(()=>`${t().type}: ${t().message}`);Q_(re,{get value(){return z(e)},label:`Copy error message`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(ee);var ie=L(ee,2),ae=F(ie),oe=F(ae);Np(oe,{size:12});var se=L(oe);D(ae);var ce=L(ae,2),le=F(ce);Np(le,{size:12});var E=L(le);D(ce),D(ie),D(v),D(c);var ue=L(c,2),de=e=>{var n=Yz(),r=F(n),i=e=>{var n=Hz(),r=L(F(n),2);Rz(r,{get stackTrace(){return t().stackTrace},get loadSource(){return ts}});var i=L(r,2);P_(L(F(i),2),{get content(){return t().stackTrace},children:(e,n)=>{var r=Vz(),i=F(r,!0);D(r),R(()=>U(i,t().stackTrace)),H(e,r)},$$slots:{default:!0}}),D(i),D(n),H(e,n)};W(r,e=>{t().stackTrace&&e(i)});var a=L(r,2),o=e=>{var n=Wz(),r=L(F(n),2);G(r,21,()=>t().affectedSpans,Oa,(e,t)=>{var n=Uz(),r=F(n,!0);D(n),R(()=>U(r,z(t))),H(e,n)}),D(r),D(n),H(e,n)};W(a,e=>{t().affectedSpans.length>0&&e(o)});var s=L(a,2),c=e=>{var n=Kz(),r=L(F(n),2);G(r,20,()=>t().affectedTraces.slice(0,5),e=>e,(e,t)=>{var n=Gz(),r=F(n),i=F(r);xm(i,{size:10});var a=L(i);Yp(L(a),{size:10}),D(r),Q_(L(r,2),{get value(){return t},label:`Copy trace ID`,size:10,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(n),R(e=>U(a,` ${e??``}... `),[()=>t.slice(0,16)]),B(`click`,r,()=>g(t)),H(e,n)}),D(r),D(n),H(e,n)};W(s,e=>{t().affectedTraces.length>0&&e(c)});var l=L(s,2),u=e=>{var n=Jz(),r=L(F(n),2);G(r,21,()=>Object.entries(t().attributes),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=qz(),o=F(a),s=F(o);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,`${r()??``}:`),U(l,e)},[()=>String(i())]),H(e,a)}),D(r),D(n),H(e,n)},d=M(()=>t().attributes&&Object.keys(t().attributes).length>0);W(l,e=>{z(d)&&e(u)});var f=L(l,2),p=F(f),m=F(p),h=F(m);D(m);var v=L(m,2),y=F(v);D(v),D(p),D(f),D(n),R((e,t)=>{U(h,`First seen: ${e??``}`),U(y,`Last seen: ${t??``}`)},[()=>od(t().firstSeen),()=>od(t().lastSeen)]),H(e,n)};W(ue,e=>{n()&&e(de)}),D(s),R((e,n)=>{J(s,`aria-selected`,i()),J(s,`data-row-index`,r()),q(s,1,`border border-line rounded-md bg-surface overflow-hidden${i()?` ring-1 ring-inset ring-accent bg-accent/10`:``}`),U(x,t().type),U(C,`${t().count??``}x`),U(ne,t().message),U(se,` First: ${e??``}`),U(E,` Last: ${n??``}`)},[()=>zz(z(a)),()=>zz(z(o))]),B(`click`,c,()=>{m.cursor=r(),h(t().fingerprint)}),H(e,s)};function r(e,t){return R_(t.toLowerCase(),[e.type,e.message,...e.affectedTraces])}let i=N(`recent`),a=N(null),o=N(``),s=N(void 0),c=M(()=>z(i)===`recent`?au.value:ou.value),l=M(()=>z(c).filter(e=>r(e,z(o)))),u=M(()=>z(o).length>0),d=M(()=>su.value),f=M(()=>cu.value),m=IA({count:()=>z(l).length,onActivate:e=>{let t=z(l)[e];t&&h(t.fingerprint)},scrollToIndex:e=>z(s)?.querySelector(`[data-row-index="${e}"]`)?.scrollIntoView({block:`nearest`})});function h(e){P(a,z(a)===e?null:e,!0)}function g(e){Nu(e),Mu(`traces`)}var v=nB(),y=F(v),b=F(y),x=F(b);Gh(x,{size:16,class:`text-danger`});var S=L(x,2),C=e=>{var t=Zz(),n=F(t);D(t),R(()=>U(n,`(${z(l).length??``} of ${z(c).length??``})`)),H(e,t)};W(S,e=>{z(u)&&e(C)});var w=L(S,2),T=e=>{var t=Qz(),n=F(t,!0);D(t),R(()=>U(n,z(d))),H(e,t)};W(w,e=>{z(d)>0&&e(T)}),D(b);var ee=L(b,2),te=F(ee),ne=F(te);ne.value=ne.__value=`recent`;var re=L(ne);re.value=re.__value=`frequent`,D(te);var ie;co(te),D(ee),D(y);var ae=L(y,2),oe=e=>{L_(e,{class:`mb-4`,inputClass:`border-line bg-subtle text-fg focus:border-line focus:ring-1 focus:ring-accent`,placeholder:`Filter by type, message, trace id…`,ariaLabel:`Filter errors`,get value(){return z(o)},set value(e){P(o,e,!0)}})};W(ae,e=>{z(c).length>0&&e(oe)});var se=L(ae,2),ce=e=>{var t=$z(),n=F(t),r=L(F(n),2),i=F(r,!0);D(r),D(n);var a=L(n,2),o=L(F(a),2),s=F(o,!0);D(o),D(a);var p=L(a,2),m=L(F(p),2),h=F(m,!0);D(m),D(p),D(t),R(()=>{U(i,z(u)?`${z(l).length} of ${z(c).length}`:z(c).length),U(s,z(d)),U(h,z(f))}),H(e,t)};W(se,e=>{z(d)>0&&e(ce)});var le=L(se,2),E=F(le),ue=e=>{var t=eB();Gh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},de=e=>{var t=tB();Ch(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},fe=e=>{var t=la();G(I(t),19,()=>z(l),e=>e.fingerprint,(e,t,r)=>{n(e,()=>z(t),()=>z(a)===z(t).fingerprint,()=>z(r),()=>m.cursor===z(r))}),H(e,t)};W(E,e=>{z(c).length===0?e(ue):z(l).length===0?e(de,1):e(fe,-1)}),D(le),Vo(le,e=>P(s,e),()=>z(s)),D(v),R(()=>{ie!==(ie=z(i))&&(te.value=(te.__value=z(i))??``,so(te,z(i)))}),B(`change`,te,e=>P(i,e.target.value,!0)),B(`keydown`,le,function(...e){m.onKeyDown?.apply(this,e)}),H(e,v),at()}ea([`click`,`change`,`keydown`]);var iB={info:0,warning:1,error:2,critical:3};function aB(e,t=`info`){return typeof e==`string`&&e in iB?e:t}function oB(e,t){return iB[e]>=iB[t]}var sB={marker:`autotel.security`,forceKeep:`autotel.security.force_keep`,event:`security.event`,category:`security.category`,outcome:`security.outcome`,severity:`security.severity`,actorId:`security.actor_id`,targetType:`security.target_type`,targetId:`security.target_id`,tenantId:`security.tenant_id`,reason:`security.reason`,droppedKeys:`security.dropped_keys`,suspiciousRequest:`security.suspicious_request`,signal:`security.signal`};function cB(e){return typeof e==`string`&&e.length>0?e:void 0}function lB(e,t){let n=e.attributes??{},r=cB(n[sB.event]),i=n[sB.suspiciousRequest]===!0;return!r&&!i?null:{traceId:e.traceId,spanId:e.spanId,spanName:e.name,service:t,timestamp:e.startTime,event:r,category:cB(n[sB.category]),outcome:cB(n[sB.outcome]),severity:aB(n[sB.severity],i?`warning`:`info`),reason:cB(n[sB.reason]),suspicious:i,signal:cB(n[sB.signal])}}function uB(e){let t=[];for(let n of e)for(let e of n.spans){let r=lB(e,n.service);r&&t.push(r)}return t.sort((e,t)=>t.timestamp-e.timestamp)}function dB(e){let t={info:0,warning:0,error:0,critical:0};for(let n of e)t[n.severity]+=1;return t}function fB(e,t){return oB(e.severity,t)}function pB(e){switch(e){case`critical`:return`bg-red-100 text-red-700`;case`error`:return`bg-orange-100 text-orange-700`;case`warning`:return`bg-amber-100 text-amber-700`;default:return`bg-hover text-fg-muted`}}var mB=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-red-100 text-red-700 rounded-full"> </span>`),hB=V(`<div class="flex gap-4 mb-4 p-3 bg-subtle rounded-md border border-line"><div class="text-sm"><span class="text-fg-muted">Critical:</span> <span class="font-semibold text-red-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Error:</span> <span class="font-semibold text-orange-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Warning:</span> <span class="font-semibold text-amber-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Info:</span> <span class="font-semibold text-fg"> </span></div></div>`),gB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No security events captured</p> <p class="text-xs text-fg-subtle mt-1">Spans with security.* attributes (autotel-audit) will appear here</p></div>`),_B=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded"> </span>`),vB=V(`<span class="text-fg-subtle"> </span>`),yB=V(`<div class="border border-line rounded-md bg-surface p-3"><div class="flex items-center gap-2 mb-1"><!> <span class="text-sm font-semibold text-fg"> </span> <span> </span> <!> <!> <!></div> <p class="text-xs text-fg-muted truncate mb-2 font-mono"> <!></p> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span> </span> <button class="flex items-center gap-1 text-fg-muted hover:text-fg font-mono"><!> <!></button></div></div>`),bB=V(`<div class="flex flex-col h-full p-4"><div class="flex items-center justify-between mb-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Security <!></h3> <select class="text-xs border border-line rounded px-2 py-1 bg-surface text-fg-muted"><option>All severities</option><option>Warning+</option><option>Error+</option><option>Critical only</option></select></div> <!> <div class="flex-1 overflow-auto space-y-2"><!></div></div>`);function xB(e,t){it(t,!0);let n=N(`info`),r=M(()=>uB(vl.value)),i=M(()=>dB(z(r))),a=M(()=>z(r).filter(e=>fB(e,z(n))));function o(e,t){Nu(e,t),Mu(`traces`)}function s(e){return e.event?e.event:e.signal?`probe: ${e.signal}`:`suspicious request`}var c=bB(),l=F(c),u=F(l),d=F(u);kh(d,{size:16,class:`text-red-500`});var f=L(d,2),p=e=>{var t=mB(),n=F(t,!0);D(t),R(()=>U(n,z(r).length)),H(e,t)};W(f,e=>{z(r).length>0&&e(p)}),D(u);var m=L(u,2),h=F(m);h.value=h.__value=`info`;var g=L(h);g.value=g.__value=`warning`;var _=L(g);_.value=_.__value=`error`;var v=L(_);v.value=v.__value=`critical`,D(m);var y;co(m),D(l);var b=L(l,2),x=e=>{var t=hB(),n=F(t),r=L(F(n),2),a=F(r,!0);D(r),D(n);var o=L(n,2),s=L(F(o),2),c=F(s,!0);D(s),D(o);var l=L(o,2),u=L(F(l),2),d=F(u,!0);D(u),D(l);var f=L(l,2),p=L(F(f),2),m=F(p,!0);D(p),D(f),D(t),R(()=>{U(a,z(i).critical),U(c,z(i).error),U(d,z(i).warning),U(m,z(i).info)}),H(e,t)};W(b,e=>{z(r).length>0&&e(x)});var S=L(b,2),C=F(S),w=e=>{var t=gB();kh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},T=e=>{var t=la();G(I(t),17,()=>z(a),e=>e.traceId+e.spanId,(e,t)=>{var n=yB(),r=F(n),i=F(r),a=e=>{dh(e,{size:14,class:`text-amber-500`})};W(i,e=>{z(t).suspicious&&e(a)});var c=L(i,2),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u);var f=L(u,2),p=e=>{var n=_B(),r=F(n,!0);D(n),R(()=>U(r,z(t).category)),H(e,n)};W(f,e=>{z(t).category&&e(p)});var m=L(f,2),h=e=>{var n=_B(),r=F(n,!0);D(n),R(()=>U(r,z(t).outcome)),H(e,n)};W(m,e=>{z(t).outcome&&e(h)});var g=L(m,2),_=e=>{var n=_B(),r=F(n,!0);D(n),R(()=>U(r,z(t).service)),H(e,n)};W(g,e=>{z(t).service&&e(_)}),D(r);var v=L(r,2),y=F(v),b=L(y),x=e=>{var n=vB(),r=F(n);D(n),R(()=>U(r,`— ${z(t).reason??``}`)),H(e,n)};W(b,e=>{z(t).reason&&e(x)}),D(v);var S=L(v,2),C=F(S),w=F(C,!0);D(C);var T=L(C,2),ee=F(T);xm(ee,{size:10});var te=L(ee);Yp(L(te),{size:10}),D(T),D(S),D(n),R((e,n,r,i)=>{U(l,e),q(u,1,n),U(d,z(t).severity),U(y,`${z(t).spanName??``} `),U(w,r),U(te,` ${i??``}... `)},[()=>s(z(t)),()=>`px-1.5 py-0.5 text-xs font-medium rounded `+pB(z(t).severity),()=>od(z(t).timestamp),()=>z(t).traceId.slice(0,16)]),B(`click`,T,()=>o(z(t).traceId,z(t).spanId)),H(e,n)}),H(e,t)};W(C,e=>{z(a).length===0?e(w):e(T,-1)}),D(S),D(c),R(()=>{y!==(y=z(n))&&(m.value=(m.__value=z(n))??``,so(m,z(n)))}),B(`change`,m,e=>P(n,e.target.value,!0)),H(e,c),at()}ea([`change`,`click`]);async function SB(e,t){let n;try{n=await t.fetch(`${t.baseUrl}/api/analysis/compare`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e),signal:t.signal})}catch(e){return e?.name===`AbortError`?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}let r;try{r=await n.json()}catch{return{status:`error`,message:`Unexpected response (not JSON)`}}let i=r;if(n.status===501)return{status:`unavailable`,message:i.message??`Comparison is unavailable on this server.`};if(n.status===400)return{status:`invalid`,message:i.message??i.error??`Invalid query`};if(!n.ok)return{status:`error`,message:i.error??n.statusText};let a=i.outlierCount??0,o=i.baselineCount??0;return a===0||o===0?{status:`empty`,outlierCount:a,baselineCount:o}:{status:`ok`,differences:i.differences??[],outlierCount:a,baselineCount:o}}var CB=V(`<!> Mark now`,1),wB=V(`<!> Comparing since mark`,1),TB=V(`<option> </option>`),EB=V(`<div class="mb-2 grid grid-cols-2 gap-2"><label class="block text-[11px] text-fg-muted">Arm <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"></select></label> <label class="block text-[11px] text-fg-muted">Against <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"><option>Every other arm</option><!></select></label></div>`),DB=V(`<label class="mb-2 block text-[11px] text-fg-muted">Experiment <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"><option>Compare by query instead</option><!></select></label> <!>`,1),OB=V(`<label class="mb-1 block text-[11px] text-fg-muted">Investigating <input placeholder="duration > 500" class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 font-mono text-xs text-fg focus:border-accent focus:outline-none"/></label>`),kB=V(`<p class="mb-1 text-[11px] text-fg-subtle">Comparing spans since the mark against those before it, within the
|
|
32
|
+
current time window.</p>`),AB=V(`<p class="text-xs text-fg-subtle">Describe the spans you are investigating, or mark a moment and compare
|
|
33
33
|
what came after it. The result ranks the attributes that tell the two
|
|
34
|
-
groups apart.</p>`),
|
|
35
|
-
spans. A share of zero events says nothing about either group.`)),H(e,t)},_e=e=>{var t=la(),n=I(t),r=e=>{var t=
|
|
36
|
-
${z(_).baselineCount??``} they were compared with.`)),H(e,t)},i=e=>{var t=
|
|
37
|
-
hypothesis to check against individual traces, not a conclusion.`)),H(e,t)};W(n,e=>{z(_).differences.length===0?e(r):e(i,-1)}),H(e,t)};W(pe,e=>{z(_)?z(_).status===`unavailable`||z(_).status===`invalid`||z(_).status===`error`?e(he,1):z(_).status===`empty`?e(ge,2):z(_).status===`ok`&&e(_e,3):e(me)}),D(fe),D(x),R(e=>{q(w,1,e),ne.disabled=z(g),U(ie,` ${z(g)?`Comparing…`:`Compare`}`),U(ue,`${z(h)===null?`Compared with`:`Restricted to`} `)},[()=>K($(`flex items-center gap-1 rounded px-2 py-1 text-xs`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,z(h)===null?`border border-line text-fg-muted hover:text-fg`:`bg-accent text-white`))]),B(`click`,w,()=>P(h,z(h)===null?Date.now():null,!0)),B(`click`,ne,b),Ao(de,()=>z(r),e=>P(r,e)),H(e,x),at()}ea([`click`,`change`]);var
|
|
38
|
-
nothing`)),H(e,t)},u=e=>{H(e,
|
|
39
|
-
that happen after it runs — call it before registering your tools.`)),H(e,t)};W(te,e=>{z(l).emptyInstallations>0&&e(ne)});var re=L(te,2);G(re,21,()=>z(c).tools,e=>o(e),(e,t)=>{let n=M(()=>o(z(t)));var i=
|
|
34
|
+
groups apart.</p>`),jB=V(`<p class="text-xs text-danger"> </p>`),MB=V(`<p class="text-xs text-fg-muted"> </p>`),NB=V(`<tr class="border-t border-line-subtle"><td class="py-1 pr-2 font-mono"> <span class="text-fg-subtle">=</span> </td><td class="py-1 pr-2 tabular-nums"> </td><td class="py-1 pr-2 tabular-nums text-fg-muted"> </td></tr>`),PB=V(`<p class="mb-2 text-[11px] text-fg-subtle"> </p> <table class="w-full text-left text-xs"><thead class="text-[11px] uppercase tracking-wide text-fg-muted"><tr><th class="py-1 pr-2 font-medium">Attribute</th><th class="py-1 pr-2 font-medium">These</th><th class="py-1 pr-2 font-medium">Those</th></tr></thead><tbody></tbody></table>`,1),FB=V(`<div class="flex h-full flex-col overflow-hidden"><div class="border-b border-line px-4 py-3"><div class="mb-2 flex items-center gap-2"><button type="button"><!></button> <button type="button" class="flex items-center gap-1 rounded bg-accent px-2 py-1 text-xs text-white hover:opacity-90 disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"><!> </button></div> <!> <!> <label class="block text-[11px] text-fg-muted"> <input placeholder="everything else" class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 font-mono text-xs text-fg focus:border-accent focus:outline-none"/></label></div> <div class="flex-1 overflow-auto px-4 py-3"><!></div></div>`);function IB(e,t){it(t,!0);let n=N(`duration > 500`),r=N(``),i=N(_r([])),a=N(``),o=N(``),s=N(``),c=e=>z(i).find(t=>t.name===e)?.arms??[];function l(){let e=pl.value;return e===null?null:Zo(e)}let u=e=>`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`;async function d(){let e=l();if(e!==null)try{let t=await fetch(`${e}/api/query/attributes?key=experiment.name&pair=experiment.variant`);if(!t.ok)return;let n=await t.json(),r=new Map;for(let e of n.pairs??[]){let t=String(e.value),n=String(e.paired);if(t===``||n===``)continue;let i=r.get(t)??[];i.includes(n)||i.push(n),r.set(t,i)}P(i,[...r].map(([e,t])=>({name:e,arms:t})),!0)}catch{}}Lr(()=>{d()});function f(e){P(a,e,!0);let t=c(e);P(o,t[0]??``,!0),P(s,t[1]??``,!0),e!==``&&P(h,null),m()}function p(e){P(o,e,!0),z(s)===e&&P(s,``),m()}function m(){if(z(a)===``||z(o)===``)return;let e=`experiment.name = ${u(z(a))}`;P(n,`${e} AND experiment.variant = ${u(z(o))}`),P(r,z(s)===``?`${e} AND experiment.variant != ${u(z(o))}`:`${e} AND experiment.variant = ${u(z(s))}`,!0)}let h=N(null),g=N(!1),_=N(null),v=e=>`${Math.round(e*100)}%`;function y(){let e=Cs(ml.value,Date.now());if(z(h)===null){let t=ks(e);return{outlier:{query:z(n),window:t},baseline:{query:z(r),window:t}}}return{outlier:{query:z(r),window:{start:z(h),end:Date.now()}},baseline:{query:z(r),window:{start:e?.start??0,end:z(h)}}}}async function b(){let e=pl.value,t=e===null?null:Zo(e);if(t===null){P(_,{status:`error`,message:`The telemetry receiver is not connected.`},!0);return}P(g,!0);try{P(_,await SB({...y(),ignoreFields:z(a)===``?void 0:[`experiment.name`,`experiment.variant`]},{fetch:globalThis.fetch.bind(globalThis),baseUrl:t}),!0)}finally{P(g,!1)}}var x=FB(),S=F(x),C=F(S),w=F(C),T=F(w),ee=e=>{var t=CB();am(I(t),{size:12}),Ke(),H(e,t)},te=e=>{var t=wB();rg(I(t),{size:12}),Ke(),H(e,t)};W(T,e=>{z(h)===null?e(ee):e(te,-1)}),D(w);var ne=L(w,2),re=F(ne);ah(re,{size:12});var ie=L(re);D(ne),D(C);var ae=L(C,2),oe=e=>{var t=DB(),n=I(t),r=L(F(n)),l=F(r);l.value=l.__value=``,G(L(l),17,()=>z(i),e=>e.name,(e,t)=>{var n=TB(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).name),i!==(i=z(t).name)&&(n.value=(n.__value=z(t).name)??``)}),H(e,n)}),D(r);var u;co(r),D(n);var d=L(n,2),h=e=>{var t=EB(),n=F(t),r=L(F(n));G(r,20,()=>c(z(a)),e=>e,(e,t)=>{var n=TB(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(r);var i;co(r),D(n);var l=L(n,2),u=L(F(l)),d=F(u);d.value=d.__value=``,G(L(d),16,()=>c(z(a)).filter(e=>e!==z(o)),e=>e,(e,t)=>{var n=TB(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(u);var f;co(u),D(l),D(t),R(()=>{i!==(i=z(o))&&(r.value=(r.__value=z(o))??``,so(r,z(o))),f!==(f=z(s))&&(u.value=(u.__value=z(s))??``,so(u,z(s)))}),B(`change`,r,e=>p(e.currentTarget.value)),B(`change`,u,e=>{P(s,e.currentTarget.value,!0),m()}),H(e,t)};W(d,e=>{z(a)!==``&&e(h)}),R(()=>{u!==(u=z(a))&&(r.value=(r.__value=z(a))??``,so(r,z(a)))}),B(`change`,r,e=>f(e.currentTarget.value)),H(e,t)};W(ae,e=>{z(i).length>0&&e(oe)});var se=L(ae,2),ce=e=>{var t=OB(),r=L(F(t));xo(r),D(t),Ao(r,()=>z(n),e=>P(n,e)),H(e,t)},le=e=>{H(e,kB())};W(se,e=>{z(h)===null?e(ce):e(le,-1)});var E=L(se,2),ue=F(E),de=L(ue);xo(de),D(E),D(S);var fe=L(S,2),pe=F(fe),me=e=>{H(e,AB())},he=e=>{var t=jB(),n=F(t,!0);D(t),R(()=>U(n,z(_).message)),H(e,t)},ge=e=>{var t=MB(),n=F(t);D(t),R(()=>U(n,`Nothing to compare: ${z(_).outlierCount??``} against ${z(_).baselineCount??``}
|
|
35
|
+
spans. A share of zero events says nothing about either group.`)),H(e,t)},_e=e=>{var t=la(),n=I(t),r=e=>{var t=MB(),n=F(t);D(t),R(()=>U(n,`No attribute separates these ${z(_).outlierCount??``} spans from the
|
|
36
|
+
${z(_).baselineCount??``} they were compared with.`)),H(e,t)},i=e=>{var t=PB(),n=I(t),r=F(n);D(n);var i=L(n,2),a=L(F(i));G(a,21,()=>z(_).differences,e=>`${e.field}=${e.value}`,(e,t)=>{var n=NB(),r=F(n),i=F(r,!0),a=L(i,2,!0);D(r);var o=L(r),s=F(o,!0);D(o);var c=L(o),l=F(c,!0);D(c),D(n),R((e,n)=>{U(i,z(t).field),U(a,z(t).value),U(s,e),U(l,n)},[()=>v(z(t).outlierFraction),()=>v(z(t).baselineFraction)]),H(e,n)}),D(a),D(i),R(()=>U(r,`${z(_).outlierCount??``} spans against ${z(_).baselineCount??``}. A
|
|
37
|
+
hypothesis to check against individual traces, not a conclusion.`)),H(e,t)};W(n,e=>{z(_).differences.length===0?e(r):e(i,-1)}),H(e,t)};W(pe,e=>{z(_)?z(_).status===`unavailable`||z(_).status===`invalid`||z(_).status===`error`?e(he,1):z(_).status===`empty`?e(ge,2):z(_).status===`ok`&&e(_e,3):e(me)}),D(fe),D(x),R(e=>{q(w,1,e),ne.disabled=z(g),U(ie,` ${z(g)?`Comparing…`:`Compare`}`),U(ue,`${z(h)===null?`Compared with`:`Restricted to`} `)},[()=>K($(`flex items-center gap-1 rounded px-2 py-1 text-xs`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,z(h)===null?`border border-line text-fg-muted hover:text-fg`:`bg-accent text-white`))]),B(`click`,w,()=>P(h,z(h)===null?Date.now():null,!0)),B(`click`,ne,b),Ao(de,()=>z(r),e=>P(r,e)),H(e,x),at()}ea([`click`,`change`]);var LB=V(`<span class="text-xs text-fg"> </span>`),RB=V(`<span class="text-xs text-fg-muted">Instrumentation coverage</span>`),zB=V(`<p class="text-xs text-fg-subtle">Loading…</p>`),BB=V(`<div class="flex items-start gap-2 text-xs text-fg-muted"><!> <p> </p></div>`),VB=V(`<p class="text-xs text-danger"> </p>`),HB=V(`<p class="text-xs text-fg-muted">The map records no entry points.</p>`),UB=V(`<span class="mr-1 inline-block h-1.5 w-1.5 rounded-full bg-danger" aria-label="never seen"></span>`),WB=V(`<tr class="border-t border-line-subtle"><td class="py-1 pr-2 font-mono"><!> </td><td> </td><td class="py-1"><a class="text-fg-subtle hover:text-accent hover:underline"> </a></td></tr>`),GB=V(`<table class="w-full text-left text-xs"><thead class="text-[11px] uppercase tracking-wide text-fg-muted"><tr><th class="py-1 pr-2 font-medium">Entry point</th><th class="py-1 pr-2 font-medium">Spans</th><th class="py-1 font-medium">Source</th></tr></thead><tbody></tbody></table>`),KB=V(`<div class="flex h-full flex-col overflow-hidden"><div class="flex items-center justify-between border-b border-line px-4 py-3"><div><!></div> <button type="button" class="flex items-center gap-1 rounded border border-line px-2 py-1 text-xs text-fg-muted hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"><!> Refresh</button></div> <div class="flex-1 overflow-auto px-4 py-3"><!></div></div>`);function qB(e,t){it(t,!0);let n=N(_r({status:`idle`}));async function r(){P(n,{status:`loading`},!0);try{let e=pl.value,t=e===null?null:Zo(e);if(t===null){P(n,{status:`error`,message:`The telemetry receiver is not connected.`},!0);return}let r=await fetch(`${t}/api/coverage`),i=await r.json();r.status===404?P(n,{status:`missing`,message:i.message??`No map found.`},!0):r.ok?P(n,{status:`ok`,...i},!0):P(n,{status:`error`,message:i.message??r.statusText},!0)}catch(e){P(n,{status:`error`,message:e instanceof Error?e.message:`Request failed`},!0)}}Lr(()=>{r()});let i=e=>`vscode://file/${e.file}${e.handler?.line?`:${e.handler.line}`:``}`;var a=KB(),o=F(a),s=F(o),c=F(s),l=e=>{var t=LB(),r=F(t);D(t),R(()=>U(r,`${z(n).total-z(n).seenCount} of ${z(n).total??``} entry points have emitted
|
|
38
|
+
nothing`)),H(e,t)},u=e=>{H(e,RB())};W(c,e=>{z(n).status===`ok`?e(l):e(u,-1)}),D(s);var d=L(s,2);ph(F(d),{size:12}),Ke(),D(d),D(o);var f=L(o,2),p=F(f),m=e=>{H(e,zB())},h=e=>{var t=BB(),r=F(t);tm(r,{size:14,class:`mt-0.5 shrink-0`});var i=L(r,2),a=F(i,!0);D(i),D(t),R(()=>U(a,z(n).message)),H(e,t)},g=e=>{var t=VB(),r=F(t,!0);D(t),R(()=>U(r,z(n).message)),H(e,t)},_=e=>{H(e,HB())},v=e=>{var t=GB(),r=L(F(t));G(r,21,()=>z(n).entries,e=>`${e.method??``} ${e.path}`,(e,t)=>{var n=WB(),r=F(n),a=F(r),o=e=>{H(e,UB())};W(a,e=>{z(t).seen||e(o)});var s=L(a);D(r);var c=L(r),l=F(c,!0);D(c);var u=L(c),d=F(u),f=F(d,!0);D(d),D(u),D(n),R(e=>{U(s,` ${z(t).method?`${z(t).method} `:``}${z(t).path??``}`),q(c,1,K(z(t).seen?`py-1 pr-2 tabular-nums text-fg-muted`:`py-1 pr-2 text-danger`)),U(l,z(t).seen?z(t).spanCount:`none`),J(d,`href`,e),U(f,z(t).file)},[()=>i(z(t))]),H(e,n)}),D(r),D(t),H(e,t)};W(p,e=>{z(n).status===`loading`||z(n).status===`idle`?e(m):z(n).status===`missing`?e(h,1):z(n).status===`error`?e(g,2):z(n).entries.length===0?e(_,3):e(v,-1)}),D(f),D(a),B(`click`,d,r),H(e,a),at()}ea([`click`]);var JB=V(`<p class="p-4 text-sm text-fg-muted">Loading…</p>`),YB=V(`<p class="p-4 text-sm text-danger"> </p>`),XB=V(`<div class="flex items-start gap-2 m-3 p-2 rounded bg-warning-bg text-warning text-xs"><!> <span> </span></div>`),ZB=V(`<span class="text-xs text-fg-muted font-normal"> </span>`),QB=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-success-bg text-success rounded">offered</span>`),$B=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded">withdrawn</span>`),eV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="The title the browser may show does not match the name that runs">label mismatch</span>`),tV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="This name came back with a different descriptor after it was first offered">redefined</span>`),nV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded" title="A known library refusal — the handler did not run"> </span>`),rV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="The browser discarded these at registration"> </span>`),iV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="Chrome does not unwrap the MCP envelope; the agent parses it">envelope</span>`),aV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded" title="The browser replaced an empty result with its own text">substituted</span>`),oV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="The agent was not told what arguments to send">no schema</span>`),sV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-subtle rounded" title="Seen executing but never at registration — annotations and schema are unknown">not observed at registration</span>`),cV=V(`<span class="text-danger"> </span>`),lV=V(`<span>session <code class="font-mono"> </code></span>`),uV=V(`<span> </span>`),dV=V(`<div class="flex items-start gap-2 text-fg-muted"><span> <code class="font-mono"></code> </span></div>`),fV=V(`, kept <code class="font-mono"> </code>`,1),pV=V(`<div class="text-fg-muted">annotations sent <code class="font-mono"> </code><!></div>`),mV=V(`<button type="button" class="flex items-center gap-1 text-fg-subtle hover:text-fg"> </button>`),hV=V(`<span class="text-fg-subtle"> </span>`),gV=V(`<span class="text-fg-muted"> </span>`),_V=V(`<span class="text-fg-muted break-all"> </span>`),vV=V(`<li class="font-mono text-[11px] flex flex-wrap gap-2"><!> <span class="text-fg-subtle"> </span> <!> <span> </span> <!></li>`),yV=V(`<div><div class="flex items-center justify-between mb-1.5"><h5 class="font-semibold text-fg-muted">Recent calls</h5> <!></div> <ul class="space-y-1"></ul></div>`),bV=V(`<div class="border-t border-line p-3 bg-subtle space-y-3 text-xs"><div class="flex flex-wrap gap-4 text-fg-muted"><span>service <code class="font-mono"> </code></span> <!> <span>installation <code class="font-mono"> </code></span> <!></div> <!> <!> <!></div>`),xV=V(`<li><button type="button" class="w-full p-3 flex items-start gap-3 hover:bg-subtle transition-colors text-left"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1 flex-wrap"><span class="text-sm font-mono font-semibold"> </span> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span> </span> <!> <span> </span> <span> </span></div></div></button> <!></li>`),SV=V(`<div class="grid grid-cols-2 sm:grid-cols-4 gap-3 p-3 border-b border-line"><div><div class="text-lg font-semibold"> </div> <div class="text-xs text-fg-subtle">offered now</div></div> <div><div class="text-lg font-semibold"> </div> <div class="text-xs text-fg-subtle"> </div></div> <div><div> </div> <div class="text-xs text-fg-subtle">with dropped annotations</div></div> <div><div class="text-lg font-semibold"> </div> <div class="text-xs text-fg-subtle"> </div></div></div> <!> <ul class="divide-y divide-line"></ul>`,1),CV=V(`<div class="p-6 max-w-xl space-y-3 text-sm"><p class="text-fg-muted">No WebMCP tools observed in this window.</p> <p class="text-fg-subtle text-xs">WebMCP needs Chrome 151+ with <code class="font-mono bg-code px-1 rounded">chrome://flags/#web-machine-learning-model-context</code> enabled. Check with <code class="font-mono">'modelContext' in document</code>.</p> <pre class="bg-code text-fg p-2 rounded text-xs overflow-x-auto"></pre> <p class="text-fg-subtle text-xs">Registrations that happen before <code class="font-mono">instrumentWebMCP()</code> runs are invisible to it.</p></div>`),wV=V(`<div class="h-full overflow-auto"><div class="flex items-center justify-between p-3 border-b border-line"><div class="flex items-center gap-2"><!> <h2 class="text-sm font-semibold">WebMCP tools</h2></div> <button type="button" class="flex items-center gap-1 text-xs text-fg-subtle hover:text-fg">Refresh</button></div> <!></div>`);function TV(e,t){it(t,!0);let n=N(_r({status:`idle`})),r=N(null),i,a=N(!1),o=e=>`${e.service}/${e.installationId}/${e.name}`;async function s(){i?.abort();let e=new AbortController;i=e;let t=pl.value,r=t===null?null:Zo(t);if(r===null){P(n,{status:`error`,message:`The telemetry receiver is not connected.`},!0);return}P(n,{status:`loading`},!0);let a=await yA({window:ks(Cs(ml.value,Date.now()))},{fetch,baseUrl:r,signal:e.signal});e.signal.aborted||(a.status===`ok`?P(n,{status:`ok`,inventory:a.webmcp},!0):a.status===`invalid`?P(n,{status:`error`,message:`The server rejected the query.`},!0):a.status===`error`&&P(n,{status:`error`,message:a.message},!0))}Lr(()=>{ml.value,pl.value,s()});let c=M(()=>z(n).status===`ok`?z(n).inventory:void 0),l=M(()=>z(c)?.summary),u=e=>e<1024?`${e} B`:`${(e/1024).toFixed(1)} kB`,d=e=>z(a)?dd(e):`•`.repeat(Math.min(e.length,32));var f=wV(),p=F(f),m=F(p);tg(F(m),{size:16,class:`text-fg-muted`}),Ke(2),D(m);var h=L(m,2);D(p);var g=L(p,2),_=e=>{H(e,JB())},v=e=>{var t=YB(),r=F(t,!0);D(t),R(()=>U(r,z(n).message)),H(e,t)},y=e=>{var t=SV(),n=I(t),i=F(n),s=F(i),f=F(s,!0);D(s),Ke(2),D(i);var p=L(i,2),m=F(p),h=F(m,!0);D(m);var g=L(m,2),_=F(g);D(g),D(p);var v=L(p,2),y=F(v);let b;var x=F(y,!0);D(y),Ke(2),D(v);var S=L(v,2),C=F(S),w=F(C,!0);D(C);var T=L(C,2),ee=F(T);D(T),D(S),D(n);var te=L(n,2),ne=e=>{var t=XB(),n=F(t);Gh(n,{size:14,class:`mt-0.5 shrink-0`});var r=L(n,2),i=F(r);D(r),D(t),R(()=>U(i,`${z(l).emptyInstallations??``} installation${z(l).emptyInstallations===1?``:`s`} registered no tools. \`instrumentWebMCP()\` only sees registrations
|
|
39
|
+
that happen after it runs — call it before registering your tools.`)),H(e,t)};W(te,e=>{z(l).emptyInstallations>0&&e(ne)});var re=L(te,2);G(re,21,()=>z(c).tools,e=>o(e),(e,t)=>{let n=M(()=>o(z(t)));var i=xV(),s=F(i),c=F(s),l=F(c),f=F(l),p=F(f,!0);D(f);var m=L(f,2),h=e=>{var n=ZB(),r=F(n);D(n),R(()=>U(r,`title ${z(t).title??``}`)),H(e,n)};W(m,e=>{z(t).title&&z(t).labelMismatch&&e(h)});var g=L(m,2),_=e=>{H(e,QB())},v=e=>{H(e,$B())};W(g,e=>{z(t).offered?e(_):e(v,-1)});var y=L(g,2),b=e=>{H(e,eV())};W(y,e=>{z(t).labelMismatch&&e(b)});var x=L(y,2),S=e=>{H(e,tV())};W(x,e=>{z(t).redefined&&e(S)});var C=L(x,2),w=e=>{var n=nV(),r=F(n);D(n),R(()=>U(r,`refused ${z(t).refusedCalls??``}`)),H(e,n)};W(C,e=>{z(t).refusedCalls>0&&e(w)});var T=L(C,2),ee=e=>{var n=rV(),r=F(n);D(n),R(e=>U(r,`dropped ${e??``}`),[()=>z(t).annotationsDropped.join(`, `)]),H(e,n)};W(T,e=>{z(t).annotationsDropped.length>0&&e(ee)});var te=L(T,2),ne=e=>{H(e,iV())};W(te,e=>{z(t).envelopeCalls>0&&e(ne)});var re=L(te,2),ie=e=>{H(e,aV())};W(re,e=>{z(t).substitutedCalls>0&&e(ie)});var ae=L(re,2),oe=e=>{H(e,oV())};W(ae,e=>{z(t).observedAtRegistration&&z(t).hasInputSchema===!1&&e(oe)});var se=L(ae,2),ce=e=>{H(e,sV())};W(se,e=>{z(t).observedAtRegistration||e(ce)}),D(l);var le=L(l,2),E=F(le),ue=F(E);D(E);var de=L(E,2),fe=e=>{var n=cV(),r=F(n);D(n),R(()=>U(r,`${z(t).errors??``} failed`)),H(e,n)};W(de,e=>{z(t).errors>0&&e(fe)});var pe=L(de,2),me=F(pe);D(pe);var he=L(pe,2),ge=F(he,!0);D(he),D(le),D(c),D(s);var _e=L(s,2),ve=e=>{var n=bV(),r=F(n),i=F(r),o=L(F(i)),s=F(o,!0);D(o),D(i);var c=L(i,2),l=e=>{var n=lV(),r=L(F(n)),i=F(r,!0);D(r),D(n),R(()=>U(i,z(t).sessionId)),H(e,n)};W(c,e=>{z(t).sessionId&&e(l)});var f=L(c,2),p=L(F(f)),m=F(p,!0);D(p),D(f);var h=L(f,2),g=e=>{var n=uV(),r=F(n);D(n),R(()=>U(r,`${z(t).descriptionLength??``}-char description`)),H(e,n)};W(h,e=>{z(t).descriptionLength!==void 0&&e(g)}),D(r);var _=L(r,2),v=e=>{var n=dV(),r=F(n),i=F(r),a=L(i);a.textContent=`{ content: [...] }`;var o=L(a);D(r),D(n),R((e,n)=>{U(i,`${z(t).envelopeCalls??``} of ${z(t).calls??``} results arrived as an MCP `),U(o,` envelope. Chrome hands the agent the wrapper unparsed, so
|
|
40
40
|
${e??``} would be about
|
|
41
41
|
${n??``}
|
|
42
|
-
returning the text plainly.`)},[()=>u(z(t).resultBytes),()=>u(Math.max(0,z(t).resultBytes-z(t).envelopeBytes))]),H(e,n)};W(_,e=>{z(t).envelopeCalls>0&&e(v)});var y=L(_,2),b=e=>{var n=
|
|
42
|
+
returning the text plainly.`)},[()=>u(z(t).resultBytes),()=>u(Math.max(0,z(t).resultBytes-z(t).envelopeBytes))]),H(e,n)};W(_,e=>{z(t).envelopeCalls>0&&e(v)});var y=L(_,2),b=e=>{var n=pV(),r=L(F(n)),i=F(r,!0);D(r);var a=L(r),o=e=>{var n=fV(),r=L(I(n)),i=F(r,!0);D(r),R(e=>U(i,e),[()=>z(t).annotationsSent.filter(e=>!z(t).annotationsDropped.includes(e)).join(`, `)||`none`]),H(e,n)};W(a,e=>{z(t).annotationsDropped.length>0&&e(o)}),D(n),R(e=>U(i,e),[()=>z(t).annotationsSent.join(`, `)]),H(e,n)};W(y,e=>{z(t).annotationsSent.length>0&&e(b)});var x=L(y,2),S=e=>{var n=yV(),r=F(n),i=L(F(r),2),o=e=>{var t=mV(),n=F(t,!0);D(t),R(()=>U(n,z(a)?`Hide payloads`:`Reveal payloads`)),B(`click`,t,()=>P(a,!z(a))),H(e,t)},s=M(()=>z(t).recentCalls.some(e=>e.input||e.result));W(i,e=>{z(s)&&e(o)}),D(r);var c=L(r,2);G(c,21,()=>z(t).recentCalls,e=>e.spanId,(e,t)=>{var n=vV(),r=F(n),i=e=>{var n=hV(),r=F(n);D(n),R(()=>U(r,`#${z(t).seq??``}`)),H(e,n)};W(r,e=>{z(t).seq!==void 0&&e(i)});var a=L(r,2),o=F(a,!0);D(a);var s=L(a,2),c=e=>{var n=gV(),r=F(n,!0);D(n),R(()=>U(r,z(t).refusal??`refused`)),H(e,n)};W(s,e=>{z(t).refused&&e(c)});var l=L(s,2);let f;var p=F(l);D(l);var m=L(l,2),h=e=>{var n=_V(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>d(z(t).result)]),H(e,n)};W(m,e=>{z(t).result&&e(h)}),D(n),R((e,n)=>{U(o,e),f=q(l,1,``,null,f,{"text-danger":z(t).error}),U(p,`${z(t).resultType??`result`??``} · ${n??``}`)},[()=>od(z(t).timestamp),()=>u(z(t).resultBytes)]),H(e,n)}),D(c),D(n),H(e,n)};W(x,e=>{z(t).recentCalls.length>0&&e(S)}),D(n),R(()=>{U(s,z(t).service),U(m,z(t).installationId)}),H(e,n)};W(_e,e=>{z(r)===z(n)&&e(ve)}),D(i),R((e,n,r)=>{U(p,z(t).name),U(ue,`${e??``} calls`),U(me,`${n??``} median result`),U(ge,r)},[()=>sd(z(t).calls),()=>u(z(t).medianResultBytes),()=>od(z(t).lastSeen)]),B(`click`,s,()=>P(r,z(r)===z(n)?null:z(n),!0)),H(e,i)}),D(re),R((e,t,n)=>{U(f,z(l).toolsOffered),U(h,e),U(_,`calls${z(l).errors>0?`, ${z(l).errors} failed`:``}`),b=q(y,1,`text-lg font-semibold`,null,b,{"text-warning":z(l).toolsWithDroppedAnnotations>0}),U(x,z(l).toolsWithDroppedAnnotations),U(w,t),U(ee,`result bytes${n??``}`)},[()=>sd(z(l).calls),()=>u(z(l).resultBytes),()=>z(l).envelopeBytes>0?` · ${u(z(l).envelopeBytes)} envelope`:``]),H(e,t)},b=e=>{var t=CV(),n=L(F(t),4);n.textContent=`npm install autotel-webmcp autotel-web
|
|
43
43
|
|
|
44
44
|
import { instrumentWebMCP } from 'autotel-webmcp';
|
|
45
|
-
instrumentWebMCP(); // before you register any tools`,Ke(2),D(t),H(e,t)};W(g,e=>{z(n).status===`loading`?e(_):z(n).status===`error`?e(v,1):z(c)&&z(l)&&z(c).tools.length>0?e(y,2):e(b,-1)}),D(f),B(`click`,h,()=>void s()),H(e,f),at()}ea([`click`]);var CV={traces:qA,agents:Cj,genai:TN,flow:vP,resources:OP,"service-map":oF,metrics:qR,logs:gz,errors:eB,security:vB,compare:NB,coverage:WB,webmcp:SV},wV=[{id:`traces`,label:`Traces`,icon:Bp},{id:`agents`,label:`Agents`,icon:op},{id:`genai`,label:`GenAI`,icon:Ah},{id:`flow`,label:`Flow`,icon:Xh},{id:`resources`,label:`Resources`,icon:cp},{id:`service-map`,label:`Service Map`,icon:Wm},{id:`metrics`,label:`Metrics`,icon:gp},{id:`logs`,label:`Logs`,icon:em},{id:`errors`,label:`Errors`,icon:Hh},{id:`security`,label:`Security`,icon:Eh},{id:`compare`,label:`Compare`,icon:fm},{id:`coverage`,label:`Coverage`,icon:mh},{id:`webmcp`,label:`WebMCP`,icon:Qh}].filter(e=>CV[e.id]!==void 0),TV=wV.map(e=>e.id),EV=16,DV=48;function OV(e){let{isVertical:t,dock:n,axisSize:r,setSize:i,resetSize:a}=e,o=N(!1);return{get resizing(){return z(o)},onPointerDown:e=>{e.stopPropagation();let a=t(),s=a?`vertical`:`horizontal`,c=a?e.clientY:e.clientX,l=r(),u=n()===`bottom`||n()===`right`?-1:1;hy(e,{cursor:a?`ns-resize`:`ew-resize`,onStart:()=>P(o,!0),onMove:e=>{let t=a?e.clientY:e.clientX;i(s,l+(t-c)*u)},onEnd:()=>P(o,!1)})},onKeyDown:e=>{let a=t()?`vertical`:`horizontal`,o=e.shiftKey?DV:EV,s=t()?{ArrowUp:n()===`bottom`?o:-o,ArrowDown:n()===`bottom`?-o:o}:{ArrowLeft:n()===`right`?o:-o,ArrowRight:n()===`right`?-o:o};e.key in s&&(e.preventDefault(),i(a,r()+s[e.key]))},onDblClick:()=>a(t()?`vertical`:`horizontal`)}}function kV(e,t,n,r){let i={left:e,right:n-e,top:t,bottom:r-t};return Object.keys(i).reduce((e,t)=>i[t]<i[e]?t:e)}function AV(e){let{dock:t,pipActive:n,onDock:r}=e,i=N(!1),a=N(null);return{get dragging(){return z(i)},get dropTarget(){return z(a)},onHeaderPointerDown:e=>{e.button===0&&(e.target.closest(`button`)||n()||hy(e,{cursor:`grabbing`,onStart:()=>{P(i,!0),P(a,t(),!0)},onMove:e=>{P(a,kV(e.clientX,e.clientY,window.innerWidth,window.innerHeight),!0)},onEnd:()=>{P(i,!1),z(a)&&z(a)!==t()&&r(z(a)),P(a,null)}}))}}}function jV(e,t){it(t,!0);let n=M(()=>Lc.value),r=M(()=>CV[z(n)]??CV.traces);var i=la(),a=I(i),o=e=>{var t=la();Ra(I(t),()=>z(r),(e,t)=>{t(e,{})}),H(e,t)};W(a,e=>{z(r)&&e(o)}),H(e,i),at()}var MV=V(`<span class="absolute inset-0 rounded-full bg-success opacity-75 animate-ping" aria-hidden="true"></span>`),NV=V(`<span class="text-xs font-mono tabular-nums text-fg-subtle" title="Telemetry ingest rate"> </span>`),PV=V(`<span class="text-xs font-mono tabular-nums text-fg-subtle" title="Telemetry store usage and retention cap"> </span>`),FV=V(`<span> </span> <!> <!>`,1),IV=V(`<div role="status"><span class="relative inline-flex w-2 h-2 shrink-0"><!> <span aria-hidden="true"></span></span> <!></div>`);function LV(e,t){it(t,!0);let n=Z(t,`compact`,3,!1),r=M(()=>ll.value),i=M(()=>z(r)===`connected`?{dot:`bg-success`,label:`Connected`,text:`text-success`}:z(r)===`connecting`?{dot:`bg-warning animate-pulse`,label:`Connecting…`,text:`text-warning`}:{dot:`bg-danger`,label:`Disconnected`,text:`text-fg-subtle`}),a=M(()=>gl.value),o=N(!1);Lr(()=>{if(z(a),z(a)===0)return;P(o,!0);let e=setTimeout(()=>P(o,!1),900);return()=>clearTimeout(e)});let s=N(0);Lr(()=>{if(n())return;let e=()=>{P(s,Math.round(bl(5e3).total),!0)};e();let t=setInterval(e,1e3);return()=>clearInterval(t)});let c=M(()=>!n()&&z(r)===`connected`&&z(s)>0),l=N(null);Lr(()=>{if(n()||z(r)!==`connected`)return;let e=!0,t=async()=>{let t=ul.value,n=(t?Zo(t):null)??globalThis.location?.origin;if(n)try{let t=await fetch(`${n}/api/stats`);t.ok&&e&&P(l,await t.json(),!0)}catch{}};t();let i=setInterval(t,3e4);return()=>{e=!1,clearInterval(i)}});function u(e){return e<1024**2?`${Math.round(e/1024)} KB`:e<1024**3?`${(e/1024**2).toFixed(1)} MB`:`${(e/1024**3).toFixed(1)} GB`}var d=IV(),f=F(d),p=F(f),m=e=>{H(e,MV())};W(p,e=>{z(o)&&z(r)===`connected`&&e(m)});var h=L(p,2);D(f);var g=L(f,2),_=e=>{var t=FV(),n=I(t),r=F(n,!0);D(n);var a=L(n,2),o=e=>{var t=NV(),n=F(t);D(t),R(()=>U(n,`· ${z(s)??``}/s`)),H(e,t)};W(a,e=>{z(c)&&e(o)});var d=L(a,2),f=e=>{var t=PV(),n=F(t);D(t),R((e,t)=>U(n,`· ${e??``} / ${t??``}`),[()=>u(z(l).bytesUsed),()=>u(z(l).maxBytes)]),H(e,t)};W(d,e=>{z(l)&&e(f)}),R(e=>{q(n,1,e),U(r,z(i).label)},[()=>K($(`text-xs font-medium`,z(i).text))]),H(e,t)};W(g,e=>{n()||e(_)}),D(d),R((e,t)=>{q(d,1,e),J(d,`aria-label`,`OTLP receiver: ${z(i).label}`),J(d,`title`,`OTLP receiver: ${z(i).label}${z(s)>0?` · ${z(s)}/s`:``}`),q(h,1,t)},[()=>K($(`flex items-center gap-1.5`,!n()&&`px-3 py-2`)),()=>K($(`relative inline-block w-2 h-2 rounded-full`,z(i).dot))]),H(e,d),at()}var RV=V(`<kbd class="inline-block px-1.5 py-0.5 font-mono text-xs font-semibold bg-hover border border-line rounded text-fg mr-1 last:mr-0 shadow-[0_1px_0_#d4d4d8]"> </kbd>`),zV=V(`<tr class="border-b border-line-subtle last:border-b-0"><td class="py-2.5 px-4 whitespace-nowrap align-middle w-[1%]"></td><td class="py-2.5 pr-4 pl-1 text-sm text-fg-muted align-middle"> </td></tr>`),BV=V(`<div class="fixed inset-0 z-[1000] flex items-center justify-center" role="dialog" aria-modal="true" aria-label="Keyboard shortcuts"><button type="button" aria-label="Close" class="absolute inset-0 bg-black/55 backdrop-blur-[2px] at-backdrop-in"></button> <div tabindex="-1" class="at-modal-in relative z-[1] bg-surface border border-line rounded-lg shadow-xl w-[480px] max-w-[90vw] max-h-[80vh] flex flex-col overflow-hidden outline-none"><div class="flex items-center justify-between px-4 py-3 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-semibold text-fg">Keyboard Shortcuts</span> <button class="inline-flex items-center justify-center w-7 h-7 p-0 bg-transparent border border-line rounded cursor-pointer text-sm text-fg-subtle hover:bg-danger-bg hover:border-danger-border hover:text-danger transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-y-auto py-2"><table class="w-full border-collapse"><tbody></tbody></table></div></div></div>`);function VV(e,t){it(t,!0);let n=N(void 0);Lr(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t.onClose())},r=z(n);return r&&(r.addEventListener(`keydown`,e),r.focus()),window.addEventListener(`keydown`,e),()=>{r&&r.removeEventListener(`keydown`,e),window.removeEventListener(`keydown`,e)}});var r=BV(),i=F(r),a=L(i,2),o=F(a),s=L(F(o),2);eg(F(s),{size:14}),D(s),D(o);var c=L(o,2),l=F(c),u=F(l);G(u,21,()=>t.shortcuts,Oa,(e,t)=>{var n=zV(),r=F(n);G(r,21,()=>z(t).keys,Oa,(e,t)=>{var n=RV(),r=F(n,!0);D(n),R(()=>U(r,z(t)===`CmdOrCtrl`?vg?`⌘`:`Ctrl`:z(t)===`AltOrOpt`?vg?`⌥`:`Alt`:z(t))),H(e,n)}),D(r);var i=L(r),a=F(i,!0);D(i),D(n),R(()=>U(a,z(t).description)),H(e,n)}),D(u),D(l),D(c),D(a),Vo(a,e=>P(n,e),()=>z(n)),D(r),B(`click`,i,function(...e){t.onClose?.apply(this,e)}),B(`click`,s,function(...e){t.onClose?.apply(this,e)}),H(e,r),at()}ea([`click`]);var HV=V(`<div role="separator" aria-label="Resize panel" tabindex="0" title="Drag to resize · double-click to reset"><div></div> <div></div></div>`),UV=V(`<span class="text-fg-subtle/60 flex-shrink-0 pl-0.5" aria-hidden="true"><!></span>`),WV=V(`<span> </span>`),GV=V(`<button><!> <span> </span> <!></button>`),KV=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Dock position (click to cycle: bottom → right → left) — or drag the header to an edge" aria-label="Change dock position"><!></button>`),qV=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors"><!></button>`),JV=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Close (Esc)" aria-label="Close devtools"><!></button>`),YV=V(`<span class="px-2.5 py-1 rounded-md bg-accent text-white text-xs font-semibold shadow-lg"> </span>`),XV=V(`<div><!></div>`),ZV=V(`<div class="fixed inset-0 z-[1001] pointer-events-none" aria-hidden="true"></div>`),QV=V(`<section aria-label="Autotel devtools"><!> <header><!> <div class="flex items-center gap-2 flex-shrink-0 pr-1 mr-0.5"><!> <span class="text-xs font-semibold tracking-tight text-fg hidden sm:inline">autotel</span></div> <nav class="flex items-center gap-0.5 overflow-x-auto min-w-0 flex-1 at-no-scrollbar" aria-label="Devtools sections"></nav> <div class="flex items-center gap-1 flex-shrink-0 pl-1"><!> <button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Keyboard shortcuts (?)" aria-label="Keyboard shortcuts"><!></button> <!> <!> <!></div></header> <div class="flex-1 min-h-0 overflow-hidden"><!></div> <!></section> <!>`,1);function $V(e,t){it(t,!0);let n=N(void 0),r=M(()=>Mc.value),i=M(()=>Lc.value),a=M(()=>Fc.value??`bottom`),o=M(()=>tl.value),s=M(()=>Ic.value),c=ag(),l=M(()=>z(a)===`bottom`||z(a)===`top`),u=M(()=>z(l)?z(o).vertical:z(o).horizontal),d=M(()=>nl(z(l)?`vertical`:`horizontal`)),f=M(()=>iu.value),p=M(()=>$l.value),m=M(()=>eu.value),h=M(()=>({genai:z(p)>0?z(p):void 0,flow:z(m)>0?z(m):void 0,errors:z(f)>0?z(f):void 0})),g=M(()=>wV.map(e=>({...e,badge:z(h)[e.id]}))),_=OV({isVertical:()=>z(l),dock:()=>z(a),axisSize:()=>z(u),setSize:rl,resetSize:il}),v=AV({dock:()=>z(a),pipActive:()=>z(s),onDock:Pu});async function y(){if(z(s)){lg(()=>Ic.value=!1);return}let e=z(n)?.getRootNode(),t=e instanceof ShadowRoot?e.host:null;t&&await cg(t,()=>Ic.value=!1,{width:760,height:600})&&(Ic.value=!0)}let b=globalThis.window!==void 0&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function x(e,{dock:t}){if(b||z(s))return{duration:0};let n=t===`left`||t===`right`?`X`:`Y`,r=t===`bottom`||t===`right`?1:-1;return{duration:240,easing:rg,css:(e,t)=>`transform: translate${n}(${t*r*100}%)`}}let S=[`traces`,`genai`,`flow`,`service-map`,`metrics`,`logs`,`errors`],C=M(()=>Xc.value);function w(){return Rc.value?hg:Lc.value===`traces`?mg:pg}Lr(()=>{let e=z(n)?.getRootNode(),t=e instanceof ShadowRoot||e instanceof Document?e:window,r=e=>{let t=e;if(t.key===`Escape`){if(Xc.value){Qc();return}if(gg())return;if(Ic.value){lg(()=>Ic.value=!1);return}Ou();return}if(t.key===`?`&&!gg()){t.preventDefault(),$c(w());return}if(!Xc.value&&!gg()&&t.key>=`1`&&t.key<=`7`){let e=Number.parseInt(t.key,10)-1;e<S.length&&ku(S[e])}};return t.addEventListener(`keydown`,r),()=>t.removeEventListener(`keydown`,r)});let T=M(()=>z(s)?`inset-0`:{bottom:`left-0 right-0 bottom-0`,top:`left-0 right-0 top-0`,right:`top-0 bottom-0 right-0`,left:`top-0 bottom-0 left-0`}[z(a)]),ee=M(()=>z(s)?``:{bottom:`border-t`,top:`border-b`,right:`border-l`,left:`border-r`}[z(a)]),te=M(()=>({bottom:`-top-1 left-0 right-0 h-2 cursor-ns-resize`,top:`-bottom-1 left-0 right-0 h-2 cursor-ns-resize`,right:`-left-1 top-0 bottom-0 w-2 cursor-ew-resize`,left:`-right-1 top-0 bottom-0 w-2 cursor-ew-resize`})[z(a)]),ne=M(()=>({bottom:`inset-x-0 top-1 h-px`,top:`inset-x-0 bottom-1 h-px`,right:`inset-y-0 left-1 w-px`,left:`inset-y-0 right-1 w-px`})[z(a)]),re=M(()=>z(s)?``:z(l)?`height: ${z(u)}px;`:`width: ${z(u)}px;`),ie=M(()=>z(s)?``:{bottom:`box-shadow: 0 -12px 32px -14px var(--at-shadow), 0 -2px 6px -4px var(--at-shadow);`,top:`box-shadow: 0 12px 32px -14px var(--at-shadow), 0 2px 6px -4px var(--at-shadow);`,right:`box-shadow: -12px 0 32px -14px var(--at-shadow), -2px 0 6px -4px var(--at-shadow);`,left:`box-shadow: 12px 0 32px -14px var(--at-shadow), 2px 0 6px -4px var(--at-shadow);`}[z(a)]),ae=M(()=>z(a)===`right`?Xm:z(a)===`left`?Jm:Km),oe=[{edge:`bottom`,pos:`left-0 right-0 bottom-0 h-24`,label:`Dock bottom`},{edge:`top`,pos:`left-0 right-0 top-0 h-24`,label:`Dock top`},{edge:`left`,pos:`top-0 bottom-0 left-0 w-44`,label:`Dock left`},{edge:`right`,pos:`top-0 bottom-0 right-0 w-44`,label:`Dock right`}];var se=la(),ce=I(se),le=e=>{var t=QV(),r=I(t),o=F(r),f=e=>{var t=HV(),n=F(t),r=L(n,2);D(t),R((e,i,a,o)=>{J(t,`aria-orientation`,z(l)?`horizontal`:`vertical`),J(t,`aria-valuenow`,e),J(t,`aria-valuemin`,z(d).min),J(t,`aria-valuemax`,z(d).max),q(t,1,i),q(n,1,a),q(r,1,o)},[()=>Math.round(z(u)),()=>K($(`absolute z-20 group touch-none select-none outline-none`,z(te))),()=>K($(`absolute bg-line-subtle transition-colors duration-150`,`group-hover:bg-accent group-focus-visible:bg-accent`,_.resizing&&`!bg-accent`,z(ne))),()=>K($(`absolute rounded-full bg-line transition-colors duration-150`,`group-hover:bg-accent group-focus-visible:bg-accent`,_.resizing&&`!bg-accent`,z(l)?`left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2 w-9 h-1`:`top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 h-9 w-1`))]),B(`pointerdown`,t,function(...e){_.onPointerDown?.apply(this,e)}),B(`keydown`,t,function(...e){_.onKeyDown?.apply(this,e)}),B(`dblclick`,t,function(...e){_.onDblClick?.apply(this,e)}),H(e,t)};W(o,e=>{z(s)||e(f)});var p=L(o,2),m=F(p),h=e=>{var t=UV();gm(F(t),{size:14}),D(t),H(e,t)};W(m,e=>{z(s)||e(h)});var b=L(m,2);td(F(b),{width:18,height:18}),Ke(2),D(b);var S=L(b,2);G(S,21,()=>z(g),e=>e.id,(e,t)=>{let n=M(()=>z(t).icon),r=M(()=>z(i)===z(t).id);var a=GV(),o=F(a);{let e=M(()=>z(t).id===`errors`&&z(t).badge?`text-danger`:void 0);Ra(o,()=>z(n),(t,n)=>{n(t,{size:14,get class(){return z(e)}})})}var s=L(o,2),c=F(s,!0);D(s);var l=L(s,2),u=e=>{var n=WV(),r=F(n,!0);D(n),R(e=>{q(n,1,e),U(r,z(t).badge>99?`99+`:z(t).badge)},[()=>K($(`px-1.5 py-px text-[10px] font-semibold rounded-full`,z(t).id===`errors`?`bg-danger-bg text-danger`:`bg-accent/15 text-fg-muted`))]),H(e,n)};W(l,e=>{z(t).badge&&e(u)}),D(a),R(e=>{J(a,`aria-current`,z(r)?`page`:void 0),q(a,1,e),U(c,z(t).label)},[()=>K($(`flex items-center gap-1.5 px-2.5 h-8 rounded-md flex-shrink-0`,`text-xs transition-colors cursor-pointer`,z(r)?`bg-accent/12 text-fg font-semibold ring-1 ring-inset ring-accent/20`:`text-fg-subtle font-medium hover:text-fg hover:bg-subtle`))]),B(`click`,a,()=>ku(z(t).id)),H(e,a)}),D(S);var se=L(S,2);{let e=e=>{let t=M(()=>z(ae));var n=la();Ra(I(n),()=>z(t),(e,t)=>{t(e,{size:15})}),H(e,n)};var ce=F(se);LV(ce,{compact:!0});var le=L(ce,2);Op(F(le),{size:15}),D(le);var E=L(le,2),ue=t=>{var n=KV(),r=F(n);e(r),D(n),B(`click`,n,function(...e){Fu?.apply(this,e)}),H(t,n)};W(E,e=>{z(s)||e(ue)});var de=L(E,2),fe=e=>{var t=qV(),n=F(t),r=e=>{Im(e,{size:15})},i=e=>{eh(e,{size:15})};W(n,e=>{z(s)?e(r):e(i,-1)}),D(t),R(()=>{J(t,`title`,z(s)?`Return to docked panel`:`Pop out to a separate window`),J(t,`aria-label`,z(s)?`Return to docked panel`:`Pop out to window`)}),B(`click`,t,y),H(e,t)};W(de,e=>{c&&e(fe)});var pe=L(de,2),me=e=>{var t=JV();eg(F(t),{size:16}),D(t),B(`click`,t,function(...e){Ou?.apply(this,e)}),H(e,t)};W(pe,e=>{z(s)||e(me)}),D(se),B(`click`,le,()=>$c(w()))}D(p);var he=L(p,2);jV(F(he),{}),D(he);var ge=L(he,2),_e=e=>{VV(e,{get shortcuts(){return z(C)},get onClose(){return Qc}})};W(ge,e=>{z(C)&&e(_e)}),D(r),Vo(r,e=>P(n,e),()=>z(n));var ve=L(r,2),ye=e=>{var t=ZV();G(t,21,()=>oe,e=>e.edge,(e,t)=>{let n=M(()=>v.dropTarget===z(t).edge);var r=XV(),i=F(r),a=e=>{var n=YV(),r=F(n,!0);D(n),R(()=>U(r,z(t).label)),H(e,n)};W(i,e=>{z(n)&&e(a)}),D(r),R(e=>q(r,1,e),[()=>K($(`absolute flex items-center justify-center transition-colors duration-100`,z(t).pos,z(n)?`bg-accent/15 ring-2 ring-inset ring-accent`:`bg-accent/5`))]),H(e,r)}),D(t),H(e,t)};W(ve,e=>{v.dragging&&e(ye)}),R((e,t)=>{q(r,1,e),oo(r,`${z(re)} ${z(ie)}`),q(p,1,t)},[()=>K($(`fixed z-[1000] flex flex-col`,`bg-surface text-fg`,z(T),z(ee),`border-line`)),()=>K($(`flex items-center gap-1 pl-2 pr-2 h-11 flex-shrink-0`,`border-b border-line bg-surface`,z(s)?``:`cursor-grab active:cursor-grabbing`))]),B(`pointerdown`,p,function(...e){v.onHeaderPointerDown?.apply(this,e)}),qa(3,r,()=>x,()=>({dock:z(a)})),H(e,t)};W(ce,e=>{z(r)&&e(le)}),H(e,se),at()}ea([`pointerdown`,`keydown`,`dblclick`,`click`]);var eH=V(`<button><!> </button>`),tH=V(`<nav></nav>`);function nH(e,t){it(t,!0);let n=Z(t,`orientation`,3,`horizontal`),r=M(()=>Lc.value);var i=tH();G(i,21,()=>wV,({id:e,label:t,icon:n})=>e,(e,t)=>{let n=()=>z(t).id,i=()=>z(t).label,a=()=>z(t).icon;var o=eH(),s=F(o);Ra(s,a,(e,t)=>{t(e,{size:14})});var c=L(s);D(o),R(e=>{q(o,1,e),U(c,` ${i()??``}`)},[()=>K($(`flex items-center gap-2 px-3 py-2 text-xs font-medium rounded transition-colors whitespace-nowrap`,z(r)===n()?`bg-accent text-white`:`text-fg-subtle hover:bg-hover hover:text-fg`))]),B(`click`,o,()=>ku(n())),H(e,o)}),D(i),R(e=>q(i,1,e),[()=>K($(`flex gap-1 p-1`,n()===`vertical`?`flex-col w-48 border-r border-line`:`border-b border-line overflow-x-auto`))]),H(e,i),at()}ea([`click`]);var rH=V(`<!> <span class="font-medium">Snapshot mode</span> <span class="text-warning">— live updates paused.</span> <button class="ml-auto inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-warning-bg transition-colors" title="Exit snapshot and clear data"><!> Exit</button>`,1),iH=V(`<span class="text-fg-subtle"> </span> <button class="ml-auto inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent"><!> Download snapshot</button> <button class="inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover transition-colors" title="Load a snapshot file"><!> Load snapshot</button> <button class="inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover hover:text-danger transition-colors" title="Clear all captured data — traces, logs, metrics and errors"><!> Clear</button>`,1),aH=V(`<span class="text-danger truncate"> </span>`),oH=V(`<span class="text-warning truncate"> </span>`),sH=V(`<div><!> <input type="file" accept="application/json,.json" class="hidden"/> <!> <!></div>`);function cH(e,t){it(t,!0);let n=N(void 0),r=N(null),i=N(null),a=M(()=>El.value),o=M(()=>[{n:al.value.length,one:`trace`,many:`traces`},{n:cl.value.length,one:`log`,many:`logs`},{n:sl.value.length,one:`error`,many:`errors`}].filter(e=>e.n>0).map(e=>`${e.n} ${e.n===1?e.one:e.many}`)),s=M(()=>z(o).length===0),c=()=>{P(r,null),P(i,null),Gy({traces:al.value,logs:cl.value,errors:sl.value})},l=()=>{z(n)?.click()},u=()=>{P(r,null),P(i,null),Lu()},d=async e=>{P(r,null),P(i,null);let t=e.currentTarget,n=t.files?.[0];if(t.value=``,!n)return;let a=await Jy(n);if(!a.success||!a.snapshot){P(r,a.errors.join(`; `)||`Failed to load snapshot`,!0);return}a.warnings.length>0&&P(i,a.warnings.join(`; `),!0),Eu(a.snapshot)};var f=sH(),p=F(f),m=e=>{var t=rH(),n=I(t);fp(n,{size:12});var r=L(n,6);eg(F(r),{size:12}),Ke(),D(r),B(`click`,r,function(...e){Du?.apply(this,e)}),H(e,t)},h=e=>{var t=iH(),n=I(t),r=F(n,!0);D(n);var i=L(n,2);fp(F(i),{size:12}),Ke(),D(i);var a=L(i,2);Wh(F(a),{size:12}),Ke(),D(a);var d=L(a,2);Rh(F(d),{size:12}),Ke(),D(d),R(e=>{U(r,e),i.disabled=z(s),J(i,`title`,z(s)?`Nothing captured yet`:`Download a snapshot of traces, logs, errors and metrics`)},[()=>z(s)?`No data captured`:z(o).join(` · `)]),B(`click`,i,c),B(`click`,a,l),B(`click`,d,u),H(e,t)};W(p,e=>{z(a)?e(m):e(h,-1)});var g=L(p,2);Vo(g,e=>P(n,e),()=>z(n));var _=L(g,2),v=e=>{var t=aH(),n=F(t,!0);D(t),R(()=>{J(t,`title`,z(r)),U(n,z(r))}),H(e,t)};W(_,e=>{z(r)&&e(v)});var y=L(_,2),b=e=>{var t=oH(),n=F(t,!0);D(t),R(()=>{J(t,`title`,z(i)),U(n,z(i))}),H(e,t)};W(y,e=>{z(i)&&!z(r)&&e(b)}),D(f),R(e=>q(f,1,e),[()=>K($(`border-b border-line px-3 py-1.5 text-xs flex items-center gap-2`,z(a)?`bg-warning-bg text-warning`:`bg-subtle text-fg-muted`))]),B(`change`,g,d),H(e,f),at()}ea([`click`,`change`]);var lH=V(`<div class="flex h-screen w-screen bg-surface text-fg"><div class="hidden md:flex flex-col border-r border-line"><!> <div class="mt-auto p-2 border-t border-line flex flex-col gap-1"><!> <button class="flex items-center gap-2 px-3 py-2 text-xs text-fg-subtle hover:bg-hover hover:text-fg rounded transition-colors"><!> </button> <button class="flex items-center gap-2 px-3 py-2 text-xs text-fg-subtle hover:bg-hover hover:text-fg rounded transition-colors" title="Keyboard shortcuts (?)"><!> Shortcuts</button></div></div> <div class="flex-1 flex flex-col min-w-0"><!> <div class="md:hidden"><!></div> <div class="flex-1 overflow-hidden"><!></div></div> <!></div>`);function uH(e,t){it(t,!0);function n(){return Rc.value?hg:Lc.value===`traces`?mg:pg}let r=M(()=>Hc.value),i=M(()=>Xc.value);Lr(()=>{Hc.value=Uc()});let a=N(void 0);Lr(()=>{let e=null,t=z(a)?.getRootNode();t instanceof ShadowRoot?e=t.host:globalThis.document!==void 0&&(e=document.documentElement),e&&e.setAttribute(`data-theme`,z(r))}),Lr(()=>{let e=e=>{if(e.key===`?`&&!gg()){e.preventDefault(),$c(n());return}if(!Xc.value&&!gg()&&e.key>=`1`&&e.key<=`9`){let t=parseInt(e.key,10)-1;t<TV.length&&ku(TV[t])}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let o=M(()=>z(r)===`dark`?`Dark`:z(r)===`light`?`Light`:`System`);var s=lH(),c=F(s),l=F(c);nH(l,{orientation:`vertical`});var u=L(l,2),d=F(u);LV(d,{});var f=L(d,2),p=F(f),m=e=>{Hm(e,{size:14})},h=e=>{Mh(e,{size:14})},g=e=>{Bm(e,{size:14})};W(p,e=>{z(r)===`dark`?e(m):z(r)===`light`?e(h,1):e(g,-1)});var _=L(p);D(f);var v=L(f,2);Op(F(v),{size:14}),Ke(),D(v),D(u),D(c);var y=L(c,2),b=F(y);cH(b,{});var x=L(b,2);nH(F(x),{orientation:`horizontal`}),D(x);var S=L(x,2);jV(F(S),{}),D(S),D(y);var C=L(y,2),w=e=>{VV(e,{get shortcuts(){return z(i)},get onClose(){return Qc}})};W(C,e=>{z(i)&&e(w)}),D(s),Vo(s,e=>P(a,e),()=>z(a)),R(()=>{J(f,`title`,`Theme: ${z(o)} (click to cycle)`),U(_,` ${z(o)??``}`)}),B(`click`,f,function(...e){Gc?.apply(this,e)}),B(`click`,v,()=>Zc(n())),H(e,s),at()}ea([`click`]);var dH=250,fH=5e3;function pH(e={}){let t=e.now??(()=>Date.now()),n=e.debounceMs??dH,r=e.limit??fH,i=0,a=null,o=null,s=!1;function c(){let t=ul.value,n=e.baseUrl??(t?Zo(t):null)??globalThis.location?.origin??``;return{fetch:e.fetch??globalThis.fetch.bind(globalThis),baseUrl:n}}async function l(){if(s)return;let e=++i;a?.abort();let n=new AbortController;a=n;let o={query:``,window:ks(Cs(dl.value,t())),limit:r},l={...c(),signal:n.signal},[u,d]=await Promise.all([mH(o,l),hA(o,l)]);e!==i||s||(u.status===`ok`?(fl.value=u.traces,ml.value=`ready`):u.status===`error`&&(ml.value=`unavailable`),d.status===`ok`&&(pl.value=d.errors))}function u(){if(!s){if(o&&clearTimeout(o),n<=0){l();return}o=setTimeout(()=>{o=null,l()},n)}}return{refresh:l,invalidate:u,dispose(){s=!0,o&&clearTimeout(o),a?.abort()}}}async function mH(e,t){let n=[],r=new Set,i;do{let a=await fA({...e,cursor:i},t);if(a.status!==`ok`)return a;if(n.push(...a.traces),i=a.nextCursor??void 0,i&&r.has(i))return{status:`error`,message:`The trace query returned a repeated pagination cursor.`};i&&r.add(i)}while(i);return{status:`ok`,traces:n,nextCursor:null}}var hH=`data-autotel-portal`;function gH(e){let t=e.querySelector(`[${hH}]`);if(t)return t;let n=document.createElement(`div`);return n.setAttribute(hH,``),n.style.position=`absolute`,n.style.top=`0`,n.style.left=`0`,n.style.zIndex=`2147483000`,e.appendChild(n),n}var _H=V(`<!> <!>`,1),vH=V(`<div class="contents"><!></div>`);function yH(e,t){it(t,!0);function n(e){ku(e.tab??`traces`),Al.value=e.q??``,jl.value=e.status??`all`,Ml.value=e.minDuration??0,dl.value=e.window??bs,kl.value=e.sort??Ju,Il.value=e.genaiQuery??``,e.traceId&&Vc(e.traceId,e.spanId)}Lr(()=>{ul.value=t.wsUrl});let r=pH();Lr(()=>(r.refresh(),()=>r.dispose())),Lr(()=>{dl.value,al.value.length,r.invalidate()});let i=N(void 0),a=N(void 0);Lr(()=>{if(!z(i))return;let e=z(i).getRootNode();P(a,gH(e instanceof ShadowRoot?e:document.body),!0)}),Lr(()=>{t.deepLink&&n(t.deepLink)}),Lr(()=>{let e=Bc.value;e&&al.value.some(t=>t.traceId===e.traceId)&&(Au(e.traceId,e.spanId??null),ku(`traces`),Bc.value=null)});let o=null;Lr(()=>{if(t.mode!==`fullpage`)return;let e={tab:Lc.value,traceId:Rc.value??void 0,spanId:zc.value??void 0,q:Al.value||void 0,status:jl.value,minDuration:Ml.value,window:dl.value,sort:kl.value,genaiQuery:Il.value||void 0};if(Bc.value)return;let n=Zu(e);if(n===location.hash)return;let r=Qu(o,e);o=e;let i=`${location.pathname}${location.search}${n}`;r===`push`?history.pushState(history.state,``,i):history.replaceState(history.state,``,i)}),Lr(()=>{if(t.mode!==`fullpage`)return;let e=()=>{let e=Xu(location.hash);o=e,n(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)}),Lr(()=>{Vu(),es(Zo(t.wsUrl));let e=new Xo(t.wsUrl);ll.value=`connecting`;let n=e.onStatusChange(e=>{ll.value=e}),r=e.onMessage(Su);return e.connect(),()=>{r(),n(),e.disconnect()}});var s=vH();tE(F(s),{get defaultPortalTo(){return z(a)},children:(e,n)=>{var r=la(),i=I(r),a=e=>{uH(e,{})},o=e=>{var t=_H(),n=I(t);zf(n,{}),$V(L(n,2),{}),H(e,t)};W(i,e=>{t.mode===`fullpage`?e(a):e(o,-1)}),H(e,r)},$$slots:{default:!0}}),D(s),Vo(s,e=>P(i,e),()=>z(i)),H(e,s),at()}function bH(e,t){let n=pa(yH,{target:e,props:t});return()=>{_a(n)}}var xH=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
46
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:"Hanken Grotesk", system-ui, -apple-system, sans-serif;--font-mono:"JetBrains Mono", ui-monospace, "SF Mono", monospace;--color-red-100:#ffe2e2;--color-red-400:#ff6568;--color-red-500:#fb2c36;--color-red-600:#e40014;--color-red-700:#bf000f;--color-orange-100:#ffedd5;--color-orange-400:#ff8b1a;--color-orange-500:#fe6e00;--color-orange-600:#f05100;--color-orange-700:#c53c00;--color-amber-100:#fef3c6;--color-amber-500:#f99c00;--color-amber-600:#dd7400;--color-amber-700:#b75000;--color-yellow-100:#fef9c2;--color-yellow-500:#edb200;--color-yellow-600:#cd8900;--color-green-100:#dcfce7;--color-green-400:#05df72;--color-green-500:#00c758;--color-green-600:#00a544;--color-emerald-500:#00bb7f;--color-emerald-600:#009767;--color-teal-500:#00baa7;--color-teal-600:#009588;--color-cyan-100:#cefafe;--color-cyan-500:#00b7d7;--color-cyan-600:#0092b5;--color-sky-500:#00a5ef;--color-sky-600:#0084cc;--color-blue-100:#dbeafe;--color-blue-400:#54a2ff;--color-blue-500:#3080ff;--color-blue-600:#155dfc;--color-indigo-500:#625fff;--color-indigo-600:#4f39f6;--color-violet-100:#ede9fe;--color-violet-500:#8d54ff;--color-violet-600:#7f22fe;--color-violet-700:#7008e7;--color-purple-100:#f3e8ff;--color-purple-400:#c07eff;--color-purple-500:#ac4bff;--color-purple-600:#9810fa;--color-fuchsia-500:#e12afb;--color-fuchsia-600:#c600db;--color-rose-500:#ff2357;--color-rose-600:#e70044;--color-gray-50:#f9fafb;--color-gray-100:#f3f4f6;--color-gray-400:#99a1af;--color-gray-500:#6a7282;--color-gray-900:#101828;--color-stone-500:#79716b;--color-stone-600:#57534d;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-surface:var(--at-surface);--color-subtle:var(--at-muted);--color-hover:var(--at-surface-hover);--color-code:var(--at-code);--color-fg:var(--at-text-primary);--color-fg-muted:var(--at-text-secondary);--color-fg-subtle:var(--at-text-muted);--color-line:var(--at-border);--color-line-subtle:var(--at-border-light);--color-accent:var(--at-accent);--color-danger:var(--at-error-text);--color-danger-bg:var(--at-error-bg);--color-danger-border:var(--at-error-border);--color-success:var(--at-ok-text);--color-success-bg:var(--at-ok-bg);--color-success-border:var(--at-ok-border);--color-warning:var(--at-warn-text);--color-warning-bg:var(--at-warn-bg);--color-warning-border:var(--at-warn-border);--color-selected:var(--at-selected-bg)}@supports (color:color(display-p3 0 0 0)){:root,:host{--color-red-100:color(display-p3 .980386 .889727 .887779);--color-red-400:color(display-p3 .933534 .431676 .423491);--color-red-500:color(display-p3 .903738 .262579 .253307);--color-red-600:color(display-p3 .830323 .140383 .133196);--color-red-700:color(display-p3 .692737 .116232 .104679);--color-orange-100:color(display-p3 .988762 .931393 .843273);--color-orange-400:color(display-p3 .950192 .561807 .211017);--color-orange-500:color(display-p3 .946589 .449788 .0757345);--color-orange-600:color(display-p3 .887467 .341665 .0219962);--color-orange-700:color(display-p3 .729844 .257256 .0511062);--color-amber-100:color(display-p3 .989391 .954583 .796328);--color-amber-500:color(display-p3 .93994 .620584 .0585367);--color-amber-600:color(display-p3 .827144 .467166 .0336006);--color-amber-700:color(display-p3 .67989 .32771 .0520514);--color-yellow-100:color(display-p3 .993436 .977463 .782913);--color-yellow-500:color(display-p3 .903651 .703062 .0745389);--color-yellow-600:color(display-p3 .776342 .542492 .041709);--color-green-100:color(display-p3 .885269 .984329 .910368);--color-green-400:color(display-p3 .399536 .862346 .49324);--color-green-500:color(display-p3 .308734 .774754 .374307);--color-green-600:color(display-p3 .243882 .640824 .294808);--color-emerald-500:color(display-p3 .267113 .726847 .508397);--color-emerald-600:color(display-p3 .206557 .589057 .413962);--color-teal-500:color(display-p3 .266569 .721518 .655462);--color-teal-600:color(display-p3 .207114 .579584 .53668);--color-cyan-100:color(display-p3 .843085 .97553 .992573);--color-cyan-500:color(display-p3 .246703 .710032 .841444);--color-cyan-600:color(display-p3 .193249 .564651 .707197);--color-sky-500:color(display-p3 .219113 .639027 .931479);--color-sky-600:color(display-p3 .162505 .509376 .796082);--color-blue-100:color(display-p3 .869214 .915931 .989622);--color-blue-400:color(display-p3 .397443 .62813 .992116);--color-blue-500:color(display-p3 .266422 .491219 .988624);--color-blue-600:color(display-p3 .174493 .358974 .950247);--color-indigo-500:color(display-p3 .380374 .372235 .971707);--color-indigo-600:color(display-p3 .297656 .227891 .929242);--color-violet-100:color(display-p3 .926222 .913546 .990178);--color-violet-500:color(display-p3 .523372 .329605 .990884);--color-violet-600:color(display-p3 .459951 .162666 .957985);--color-violet-700:color(display-p3 .40161 .0841901 .871151);--color-purple-100:color(display-p3 .945034 .910569 .992972);--color-purple-400:color(display-p3 .719919 .492497 .995173);--color-purple-500:color(display-p3 .629519 .30089 .990817);--color-purple-600:color(display-p3 .546729 .130167 .94439);--color-fuchsia-500:color(display-p3 .81268 .241966 .951571);--color-fuchsia-600:color(display-p3 .716587 .083681 .841036);--color-rose-500:color(display-p3 .921824 .240748 .355666);--color-rose-600:color(display-p3 .848792 .102011 .269259);--color-gray-50:color(display-p3 .977213 .98084 .985102);--color-gray-100:color(display-p3 .953567 .956796 .964321);--color-gray-400:color(display-p3 .605734 .630385 .680158);--color-gray-500:color(display-p3 .421287 .446085 .504784);--color-gray-900:color(display-p3 .070423 .0928982 .151928);--color-stone-500:color(display-p3 .467445 .443064 .42264);--color-stone-600:color(display-p3 .339543 .325291 .304619)}}@supports (color:lab(0% 0 0)){:root,:host{--color-red-100:lab(92.243% 10.2865 3.83865);--color-red-400:lab(63.7053% 60.745 31.3109);--color-red-500:lab(55.4814% 75.0732 48.8528);--color-red-600:lab(48.4493% 77.4328 61.5452);--color-red-700:lab(40.4273% 67.2623 53.7441);--color-orange-100:lab(94.7127% 3.58394 14.3151);--color-orange-400:lab(70.0429% 42.5156 75.8207);--color-orange-500:lab(64.272% 57.1788 90.3583);--color-orange-600:lab(57.1026% 64.2584 89.8886);--color-orange-700:lab(46.4615% 57.7275 70.8507);--color-amber-100:lab(95.916% -1.21653 23.111);--color-amber-500:lab(72.7183% 31.8672 97.9407);--color-amber-600:lab(60.3514% 40.5624 87.1228);--color-amber-700:lab(47.2709% 42.9082 69.2966);--color-yellow-100:lab(97.3564% -4.51407 27.344);--color-yellow-500:lab(76.3898% 14.5258 98.4589);--color-yellow-600:lab(62.7799% 22.4197 86.1544);--color-green-100:lab(96.1861% -13.8464 6.52365);--color-green-400:lab(78.503% -64.9265 39.7492);--color-green-500:lab(70.5521% -66.5147 45.8073);--color-green-600:lab(59.0978% -58.6621 41.2579);--color-emerald-500:lab(66.9756% -58.27 19.5419);--color-emerald-600:lab(55.0481% -49.9246 15.93);--color-teal-500:lab(67.3859% -49.0983 -2.63511);--color-teal-600:lab(55.0223% -41.0774 -3.90277);--color-cyan-100:lab(95.3146% -13.8285 -6.84732);--color-cyan-500:lab(67.805% -35.3952 -30.2018);--color-cyan-600:lab(55.1767% -26.7496 -30.5139);--color-sky-500:lab(63.3038% -18.433 -51.0407);--color-sky-600:lab(51.7754% -11.4712 -49.8349);--color-blue-100:lab(92.0301% -2.24757 -11.6453);--color-blue-400:lab(65.0361% -1.42065 -56.9802);--color-blue-500:lab(54.1736% 13.3369 -74.6839);--color-blue-600:lab(44.0605% 29.0279 -86.0352);--color-indigo-500:lab(48.295% 38.3129 -81.9673);--color-indigo-600:lab(38.4009% 52.6132 -92.3857);--color-violet-100:lab(93.0838% 4.35197 -9.88284);--color-violet-500:lab(49.9355% 55.1776 -81.8963);--color-violet-600:lab(41.088% 68.9966 -91.995);--color-violet-700:lab(35.2783% 67.9912 -88.793);--color-purple-100:lab(93.3333% 6.97437 -9.83434);--color-purple-400:lab(63.6946% 47.6127 -59.2066);--color-purple-500:lab(52.0183% 66.11 -78.2316);--color-purple-600:lab(43.0295% 75.21 -86.5669);--color-fuchsia-500:lab(56.4256% 83.132 -64.639);--color-fuchsia-600:lab(47.5131% 83.4271 -63.0363);--color-rose-500:lab(56.101% 79.4328 31.4532);--color-rose-600:lab(49.1882% 81.577 36.0311);--color-gray-50:lab(98.2596% -.247031 -.706708);--color-gray-100:lab(96.1596% -.0823438 -1.13575);--color-gray-400:lab(65.9269% -.832707 -8.17473);--color-gray-500:lab(47.7841% -.393182 -10.0268);--color-gray-900:lab(8.11897% .811279 -12.254);--color-stone-500:lab(48.1164% 2.35701 4.26852);--color-stone-600:lab(35.5168% 1.08604 4.07829)}}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::-webkit-file-upload-button{margin-inline-end:4px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button{-webkit-appearance:button;appearance:button}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;bottom:0;left:0;right:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:0}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-10{top:calc(var(--spacing) * 10)}.top-\\[7px\\]{top:7px}.top-\\[9px\\]{top:9px}.top-\\[calc\\(100\\%-2px\\)\\]{top:calc(100% - 2px)}.top-full{top:100%}.-right-1{right:calc(var(--spacing) * -1)}.-right-1\\.5{right:calc(var(--spacing) * -1.5)}.right-0{right:0}.right-1{right:var(--spacing)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.-bottom-1{bottom:calc(var(--spacing) * -1)}.bottom-0{bottom:0}.bottom-0\\.5{bottom:calc(var(--spacing) * .5)}.bottom-1{bottom:var(--spacing)}.bottom-3{bottom:calc(var(--spacing) * 3)}.-left-1{left:calc(var(--spacing) * -1)}.-left-1\\.5{left:calc(var(--spacing) * -1.5)}.-left-px{left:-1px}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[1000\\]{z-index:1000}.z-\\[1001\\]{z-index:1001}.z-\\[1100\\]{z-index:1100}.z-\\[1200\\]{z-index:1200}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-m-1{margin:calc(var(--spacing) * -1)}.m-3{margin:calc(var(--spacing) * 3)}.m-4{margin:calc(var(--spacing) * 4)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline-start:auto;margin-inline-end:auto}.my-1{margin-block:var(--spacing)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.mr-0\\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:var(--spacing)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-1\\/2{height:50%}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-11{height:calc(var(--spacing) * 11)}.h-24{height:calc(var(--spacing) * 24)}.h-\\[300px\\]{height:300px}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[160px\\]{max-height:160px}.max-h-\\[200px\\]{max-height:200px}.max-h-\\[240px\\]{max-height:240px}.min-h-0{min-height:0}.min-h-\\[120px\\]{min-height:120px}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-1{width:var(--spacing)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-14{width:calc(var(--spacing) * 14)}.w-24{width:calc(var(--spacing) * 24)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[1\\%\\]{width:1%}.w-\\[80px\\]{width:80px}.w-\\[200px\\]{width:200px}.w-\\[480px\\]{width:480px}.w-\\[min\\(560px\\,92vw\\)\\]{width:min(560px,92vw)}.w-\\[min\\(700px\\,92vw\\)\\]{width:min(700px,92vw)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[10rem\\]{max-width:10rem}.max-w-\\[14rem\\]{max-width:14rem}.max-w-\\[16rem\\]{max-width:16rem}.max-w-\\[90vw\\]{max-width:90vw}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[420px\\]{max-width:420px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-\\[8px\\]{min-width:8px}.min-w-\\[16px\\]{min-width:16px}.min-w-\\[180px\\]{min-width:180px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.-rotate-90{rotate:-90deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-ns-resize{cursor:ns-resize}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-y{resize:vertical}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\\[80px_1fr\\]{grid-template-columns:80px 1fr}.grid-cols-\\[100px_1fr\\]{grid-template-columns:100px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-px{gap:1px}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:0;margin-block-end:0}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-line>:not(:last-child)){border-color:var(--color-line)}:where(.divide-line-subtle>:not(:last-child)){border-color:var(--color-line-subtle)}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.justify-self-start{justify-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[1px\\]{border-radius:1px}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent,.border-accent\\/30{border-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/30{border-color:color-mix(in oklab, var(--color-accent) 30%, transparent)}}.border-accent\\/40{border-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/40{border-color:color-mix(in oklab, var(--color-accent) 40%, transparent)}}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/20{border-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-blue-500\\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab, red, red)){.border-blue-500\\/30{border-color:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}.border-cyan-500\\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab, red, red)){.border-cyan-500\\/30{border-color:color-mix(in oklab, var(--color-cyan-500) 30%, transparent)}}.border-danger-border{border-color:var(--color-danger-border)}.border-danger\\/30{border-color:var(--color-danger)}@supports (color:color-mix(in lab, red, red)){.border-danger\\/30{border-color:color-mix(in oklab, var(--color-danger) 30%, transparent)}}.border-emerald-500\\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\\/30{border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.border-fuchsia-500\\/30{border-color:#e12afb4d}@supports (color:color-mix(in lab, red, red)){.border-fuchsia-500\\/30{border-color:color-mix(in oklab, var(--color-fuchsia-500) 30%, transparent)}}.border-green-500\\/30{border-color:#00c7584d}@supports (color:color-mix(in lab, red, red)){.border-green-500\\/30{border-color:color-mix(in oklab, var(--color-green-500) 30%, transparent)}}.border-indigo-500\\/30{border-color:#625fff4d}@supports (color:color-mix(in lab, red, red)){.border-indigo-500\\/30{border-color:color-mix(in oklab, var(--color-indigo-500) 30%, transparent)}}.border-line{border-color:var(--color-line)}.border-line-subtle{border-color:var(--color-line-subtle)}.border-line\\/50{border-color:var(--color-line)}@supports (color:color-mix(in lab, red, red)){.border-line\\/50{border-color:color-mix(in oklab, var(--color-line) 50%, transparent)}}.border-line\\/60{border-color:var(--color-line)}@supports (color:color-mix(in lab, red, red)){.border-line\\/60{border-color:color-mix(in oklab, var(--color-line) 60%, transparent)}}.border-orange-500\\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab, red, red)){.border-orange-500\\/30{border-color:color-mix(in oklab, var(--color-orange-500) 30%, transparent)}}.border-purple-500\\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab, red, red)){.border-purple-500\\/30{border-color:color-mix(in oklab, var(--color-purple-500) 30%, transparent)}}.border-red-500\\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab, red, red)){.border-red-500\\/30{border-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.border-stone-500\\/30{border-color:#79716b4d}@supports (color:color-mix(in lab, red, red)){.border-stone-500\\/30{border-color:color-mix(in oklab, var(--color-stone-500) 30%, transparent)}}.border-success-border{border-color:var(--color-success-border)}.border-violet-500\\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab, red, red)){.border-violet-500\\/30{border-color:color-mix(in oklab, var(--color-violet-500) 30%, transparent)}}.border-warning-border{border-color:var(--color-warning-border)}.border-white{border-color:var(--color-white)}.border-l-warning{border-left-color:var(--color-warning)}.\\!bg-accent{background-color:var(--color-accent)!important}.bg-accent,.bg-accent\\/5{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/5{background-color:color-mix(in oklab, var(--color-accent) 5%, transparent)}}.bg-accent\\/10{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/10{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.bg-accent\\/12{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/12{background-color:color-mix(in oklab, var(--color-accent) 12%, transparent)}}.bg-accent\\/15{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/15{background-color:color-mix(in oklab, var(--color-accent) 15%, transparent)}}.bg-accent\\/70{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/70{background-color:color-mix(in oklab, var(--color-accent) 70%, transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-amber-500\\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab, red, red)){.bg-black\\/55{background-color:color-mix(in oklab, var(--color-black) 55%, transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\\/10{background-color:color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\\/15{background-color:color-mix(in oklab, var(--color-blue-500) 15%, transparent)}}.bg-code{background-color:var(--color-code)}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-cyan-500\\/15{background-color:#00b7d726}@supports (color:color-mix(in lab, red, red)){.bg-cyan-500\\/15{background-color:color-mix(in oklab, var(--color-cyan-500) 15%, transparent)}}.bg-danger{background-color:var(--color-danger)}.bg-danger-bg,.bg-danger-bg\\/40{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.bg-danger-bg\\/40{background-color:color-mix(in oklab, var(--color-danger-bg) 40%, transparent)}}.bg-danger\\/5{background-color:var(--color-danger)}@supports (color:color-mix(in lab, red, red)){.bg-danger\\/5{background-color:color-mix(in oklab, var(--color-danger) 5%, transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-emerald-500\\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-fg-subtle{background-color:var(--color-fg-subtle)}.bg-fuchsia-500\\/15{background-color:#e12afb26}@supports (color:color-mix(in lab, red, red)){.bg-fuchsia-500\\/15{background-color:color-mix(in oklab, var(--color-fuchsia-500) 15%, transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\\/15{background-color:#00c75826}@supports (color:color-mix(in lab, red, red)){.bg-green-500\\/15{background-color:color-mix(in oklab, var(--color-green-500) 15%, transparent)}}.bg-hover{background-color:var(--color-hover)}.bg-indigo-500\\/15{background-color:#625fff26}@supports (color:color-mix(in lab, red, red)){.bg-indigo-500\\/15{background-color:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.bg-line{background-color:var(--color-line)}.bg-line-subtle{background-color:var(--color-line-subtle)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\\/15{background-color:#fe6e0026}@supports (color:color-mix(in lab, red, red)){.bg-orange-500\\/15{background-color:color-mix(in oklab, var(--color-orange-500) 15%, transparent)}}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab, red, red)){.bg-purple-500\\/15{background-color:color-mix(in oklab, var(--color-purple-500) 15%, transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab, red, red)){.bg-red-500\\/15{background-color:color-mix(in oklab, var(--color-red-500) 15%, transparent)}}.bg-rose-500{background-color:var(--color-rose-500)}.bg-selected{background-color:var(--color-selected)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-stone-500\\/15{background-color:#79716b26}@supports (color:color-mix(in lab, red, red)){.bg-stone-500\\/15{background-color:color-mix(in oklab, var(--color-stone-500) 15%, transparent)}}.bg-subtle,.bg-subtle\\/40{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/40{background-color:color-mix(in oklab, var(--color-subtle) 40%, transparent)}}.bg-subtle\\/50{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/50{background-color:color-mix(in oklab, var(--color-subtle) 50%, transparent)}}.bg-subtle\\/60{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/60{background-color:color-mix(in oklab, var(--color-subtle) 60%, transparent)}}.bg-success{background-color:var(--color-success)}.bg-success-bg{background-color:var(--color-success-bg)}.bg-surface{background-color:var(--color-surface)}.bg-teal-500{background-color:var(--color-teal-500)}.bg-transparent{background-color:#0000}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\\/10{background-color:color-mix(in oklab, var(--color-violet-500) 10%, transparent)}}.bg-violet-500\\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\\/15{background-color:color-mix(in oklab, var(--color-violet-500) 15%, transparent)}}.bg-warning{background-color:var(--color-warning)}.bg-warning-bg{background-color:var(--color-warning-bg)}.bg-warning\\/5{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/5{background-color:color-mix(in oklab, var(--color-warning) 5%, transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.fill-\\[var\\(--color-fg-subtle\\)\\]{fill:var(--color-fg-subtle)}.fill-amber-500\\/15{fill:#f99c0026}@supports (color:color-mix(in lab, red, red)){.fill-amber-500\\/15{fill:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.fill-amber-600{fill:var(--color-amber-600)}.fill-blue-500\\/15{fill:#3080ff26}@supports (color:color-mix(in lab, red, red)){.fill-blue-500\\/15{fill:color-mix(in oklab, var(--color-blue-500) 15%, transparent)}}.fill-blue-600{fill:var(--color-blue-600)}.fill-danger{fill:var(--color-danger)}.fill-emerald-500\\/15{fill:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.fill-emerald-500\\/15{fill:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.fill-emerald-600{fill:var(--color-emerald-600)}.fill-fg-muted{fill:var(--color-fg-muted)}.fill-fg-subtle{fill:var(--color-fg-subtle)}.fill-red-500{fill:var(--color-red-500)}.fill-rose-500\\/15{fill:#ff235726}@supports (color:color-mix(in lab, red, red)){.fill-rose-500\\/15{fill:color-mix(in oklab, var(--color-rose-500) 15%, transparent)}}.fill-rose-600{fill:var(--color-rose-600)}.fill-sky-500\\/15{fill:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.fill-sky-500\\/15{fill:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.fill-sky-600{fill:var(--color-sky-600)}.fill-teal-500\\/15{fill:#00baa726}@supports (color:color-mix(in lab, red, red)){.fill-teal-500\\/15{fill:color-mix(in oklab, var(--color-teal-500) 15%, transparent)}}.fill-teal-600{fill:var(--color-teal-600)}.fill-violet-500\\/15{fill:#8d54ff26}@supports (color:color-mix(in lab, red, red)){.fill-violet-500\\/15{fill:color-mix(in oklab, var(--color-violet-500) 15%, transparent)}}.fill-violet-600{fill:var(--color-violet-600)}.fill-warning{fill:var(--color-warning)}.fill-white{fill:var(--color-white)}.stroke-accent{stroke:var(--color-accent)}.stroke-amber-500\\/60{stroke:#f99c0099}@supports (color:color-mix(in lab, red, red)){.stroke-amber-500\\/60{stroke:color-mix(in oklab, var(--color-amber-500) 60%, transparent)}}.stroke-blue-500\\/60{stroke:#3080ff99}@supports (color:color-mix(in lab, red, red)){.stroke-blue-500\\/60{stroke:color-mix(in oklab, var(--color-blue-500) 60%, transparent)}}.stroke-emerald-500\\/60{stroke:#00bb7f99}@supports (color:color-mix(in lab, red, red)){.stroke-emerald-500\\/60{stroke:color-mix(in oklab, var(--color-emerald-500) 60%, transparent)}}.stroke-fg-subtle{stroke:var(--color-fg-subtle)}.stroke-red-500{stroke:var(--color-red-500)}.stroke-rose-500\\/60{stroke:#ff235799}@supports (color:color-mix(in lab, red, red)){.stroke-rose-500\\/60{stroke:color-mix(in oklab, var(--color-rose-500) 60%, transparent)}}.stroke-sky-500\\/60{stroke:#00a5ef99}@supports (color:color-mix(in lab, red, red)){.stroke-sky-500\\/60{stroke:color-mix(in oklab, var(--color-sky-500) 60%, transparent)}}.stroke-teal-500\\/60{stroke:#00baa799}@supports (color:color-mix(in lab, red, red)){.stroke-teal-500\\/60{stroke:color-mix(in oklab, var(--color-teal-500) 60%, transparent)}}.stroke-violet-500\\/60{stroke:#8d54ff99}@supports (color:color-mix(in lab, red, red)){.stroke-violet-500\\/60{stroke:color-mix(in oklab, var(--color-violet-500) 60%, transparent)}}.stroke-\\[2\\.5px\\]{stroke-width:2.5px}.p-0{padding:0}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-px{padding-block-start:1px;padding-block-end:1px}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-7{padding-right:calc(var(--spacing) * 7)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-0\\.5{padding-left:calc(var(--spacing) * .5)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent,.text-accent\\/80{color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.text-accent\\/80{color:color-mix(in oklab, var(--color-accent) 80%, transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-cyan-500{color:var(--color-cyan-500)}.text-cyan-600{color:var(--color-cyan-600)}.text-danger{color:var(--color-danger)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-fg{color:var(--color-fg)}.text-fg-muted,.text-fg-muted\\/70{color:var(--color-fg-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\\/70{color:color-mix(in oklab, var(--color-fg-muted) 70%, transparent)}}.text-fg-muted\\/80{color:var(--color-fg-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\\/80{color:color-mix(in oklab, var(--color-fg-muted) 80%, transparent)}}.text-fg-subtle,.text-fg-subtle\\/60{color:var(--color-fg-subtle)}@supports (color:color-mix(in lab, red, red)){.text-fg-subtle\\/60{color:color-mix(in oklab, var(--color-fg-subtle) 60%, transparent)}}.text-fuchsia-500{color:var(--color-fuchsia-500)}.text-fuchsia-600{color:var(--color-fuchsia-600)}.text-gray-50{color:var(--color-gray-50)}.text-gray-100{color:var(--color-gray-100)}.text-gray-500{color:var(--color-gray-500)}.text-gray-900{color:var(--color-gray-900)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-line{color:var(--color-line)}.text-line-subtle{color:var(--color-line-subtle)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-stone-600{color:var(--color-stone-600)}.text-success{color:var(--color-success)}.text-surface{color:var(--color-surface)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-violet-600\\/70{color:#7f22feb3}@supports (color:color-mix(in lab, red, red)){.text-violet-600\\/70{color:color-mix(in oklab, var(--color-violet-600) 70%, transparent)}}.text-violet-700{color:var(--color-violet-700)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_0_\\#d4d4d8\\]{--tw-shadow:0 1px 0 var(--tw-shadow-color,#d4d4d8);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-accent,.ring-accent\\/20{--tw-ring-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.ring-accent\\/20{--tw-ring-color:color-mix(in oklab, var(--color-accent) 20%, transparent)}}.ring-danger{--tw-ring-color:var(--color-danger)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.row-virtual{content-visibility:auto;contain-intrinsic-size:auto 32px}.select-none{-webkit-user-select:none;user-select:none}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.group-hover\\:bg-accent:is(:where(.group):hover *){background-color:var(--color-accent)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\/stat\\:underline:is(:where(.group\\/stat):hover *){text-decoration-line:underline}}.group-focus-visible\\:bg-accent:is(:where(.group):focus-visible *){background-color:var(--color-accent)}.last\\:mr-0:last-child{margin-right:0}.last\\:mb-0:last-child{margin-bottom:0}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-danger-border:hover{border-color:var(--color-danger-border)}.hover\\:bg-accent:hover,.hover\\:bg-accent\\/5:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/5:hover{background-color:color-mix(in oklab, var(--color-accent) 5%, transparent)}}.hover\\:bg-accent\\/10:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/10:hover{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.hover\\:bg-accent\\/15:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/15:hover{background-color:color-mix(in oklab, var(--color-accent) 15%, transparent)}}.hover\\:bg-accent\\/20:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/20:hover{background-color:color-mix(in oklab, var(--color-accent) 20%, transparent)}}.hover\\:bg-accent\\/90:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/90:hover{background-color:color-mix(in oklab, var(--color-accent) 90%, transparent)}}.hover\\:bg-blue-400:hover{background-color:var(--color-blue-400)}.hover\\:bg-danger-bg:hover,.hover\\:bg-danger-bg\\/60:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/60:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 60%, transparent)}}.hover\\:bg-danger-bg\\/70:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/70:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 70%, transparent)}}.hover\\:bg-danger-bg\\/80:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/80:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 80%, transparent)}}.hover\\:bg-emerald-500\\/25:hover{background-color:#00bb7f40}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-emerald-500\\/25:hover{background-color:color-mix(in oklab, var(--color-emerald-500) 25%, transparent)}}.hover\\:bg-gray-400:hover{background-color:var(--color-gray-400)}.hover\\:bg-green-400:hover{background-color:var(--color-green-400)}.hover\\:bg-hover:hover,.hover\\:bg-hover\\/50:hover{background-color:var(--color-hover)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-hover\\/50:hover{background-color:color-mix(in oklab, var(--color-hover) 50%, transparent)}}.hover\\:bg-orange-400:hover{background-color:var(--color-orange-400)}.hover\\:bg-purple-400:hover{background-color:var(--color-purple-400)}.hover\\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab, var(--color-red-500) 25%, transparent)}}.hover\\:bg-subtle:hover{background-color:var(--color-subtle)}.hover\\:bg-violet-500\\/25:hover{background-color:#8d54ff40}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-violet-500\\/25:hover{background-color:color-mix(in oklab, var(--color-violet-500) 25%, transparent)}}.hover\\:bg-warning-bg:hover,.hover\\:bg-warning-bg\\/80:hover{background-color:var(--color-warning-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-warning-bg\\/80:hover{background-color:color-mix(in oklab, var(--color-warning-bg) 80%, transparent)}}.hover\\:text-accent:hover{color:var(--color-accent)}.hover\\:text-danger:hover{color:var(--color-danger)}.hover\\:text-fg:hover{color:var(--color-fg)}.hover\\:text-fg-muted:hover{color:var(--color-fg-muted)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus\\:border-accent:focus{border-color:var(--color-accent)}.focus\\:border-line:focus{border-color:var(--color-line)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-accent:focus{--tw-ring-color:var(--color-accent)}.focus\\:ring-danger:focus{--tw-ring-color:var(--color-danger)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:bg-hover:focus-visible{background-color:var(--color-hover)}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-accent:focus-visible{--tw-ring-color:var(--color-accent)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-accent:focus-visible{outline-color:var(--color-accent)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}@media (hover:hover){.disabled\\:hover\\:bg-transparent:disabled:hover{background-color:#0000}}@media (min-width:40rem){.sm\\:inline{display:inline}.sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width:48rem){.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (width>=28rem){.\\@md\\:block{display:block}.\\@md\\:flex{display:flex}.\\@md\\:hidden{display:none}.\\@md\\:w-72{width:calc(var(--spacing) * 72)}.\\@md\\:shrink-0{flex-shrink:0}.\\@md\\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}}}*{box-sizing:border-box}:host,:root{--at-surface:#fcfdfe;--at-surface-hover:#f5f6f9;--at-muted:#f2f5f8;--at-code:#f3f6fa;--at-text-primary:#1a1f29;--at-text-secondary:#515864;--at-text-muted:#868d97;--at-border:#dfe1e5;--at-border-light:#eef0f3;--at-shadow:#171f2e1a;--at-accent:#3177dc;--at-error-bg:#ffecea;--at-error-text:#cc2827;--at-error-border:#f8a49d;--at-ok-bg:#e0fae4;--at-ok-text:#0e8c41;--at-ok-border:#89da9b;--at-warn-bg:#fff0d1;--at-warn-text:#a16500;--at-warn-border:#e5c379;--at-highlight-bg:#fff6d1;--at-selected-bg:#e9f3ff;--at-scrollbar-thumb:#ced1d6;--at-scrollbar-thumb-hover:#999fa8}@supports (color:color(display-p3 0 0 0)){:host,:root{--at-surface:color(display-p3 .989609 .992382 .997175);--at-surface-hover:color(display-p3 .960878 .966392 .975929);--at-muted:color(display-p3 .951795 .958673 .970576);--at-code:color(display-p3 .955784 .964045 .978342);--at-text-primary:color(display-p3 .106201 .12247 .157281);--at-text-secondary:color(display-p3 .323937 .346032 .388256);--at-text-muted:color(display-p3 .528711 .550898 .589512);--at-border:color(display-p3 .875378 .883503 .897566);--at-border-light:color(display-p3 .934839 .941694 .953557);--at-shadow:color(display-p3 .0979137 .121845 .174352/.1);--at-accent:color(display-p3 .266557 .461859 .837181);--at-error-bg:color(display-p3 1.00853 .923821 .911661);--at-error-text:color(display-p3 .7372 .221951 .191652);--at-error-border:color(display-p3 .924106 .659231 .626897);--at-ok-bg:color(display-p3 .896905 .977035 .900254);--at-ok-text:color(display-p3 .247857 .539374 .286752);--at-ok-border:color(display-p3 .609805 .847347 .627399);--at-warn-bg:color(display-p3 .997819 .943515 .816698);--at-warn-text:color(display-p3 .607081 .403503 .0845266);--at-warn-border:color(display-p3 .876737 .768181 .515098);--at-highlight-bg:color(display-p3 .994932 .96424 .830533);--at-selected-bg:color(display-p3 .910207 .951093 1.02232);--at-scrollbar-thumb:color(display-p3 .80912 .819793 .838278);--at-scrollbar-thumb-hover:color(display-p3 .60332 .622263 .655172)}}@supports (color:lab(0% 0 0)){:host,:root{--at-surface:lab(99.2988% -.132054 -.745118);--at-surface-hover:lab(96.9735% -.261605 -1.48877);--at-muted:lab(96.2747% -.325292 -1.86008);--at-code:lab(96.736% -.388592 -2.23104);--at-text-primary:lab(11.741% -.349499 -7.30943);--at-text-secondary:lab(37.2801% -.862852 -7.73156);--at-text-muted:lab(58.1854% -1.04666 -6.62941);--at-border:lab(89.5439% -.387847 -2.23061);--at-border-light:lab(94.7667% -.325233 -1.86);--at-shadow:lab(11.6682% -.113927 -10.842/.1);--at-accent:lab(49.8997% 5.63273 -59.1615);--at-error-bg:lab(95.0829% 9.19622 4.96011);--at-error-text:lab(45.8049% 62.9533 44.1);--at-error-border:lab(75.8489% 31.0226 17.1029);--at-ok-bg:lab(95.8936% -11.84 7.56052);--at-ok-text:lab(50.824% -45.5785 30.3918);--at-ok-border:lab(80.6679% -35.8792 23.2774);--at-warn-bg:lab(95.5261% 2.02972 19.535);--at-warn-text:lab(48.6413% 21.7782 63.415);--at-warn-border:lab(80.5062% 5.88706 41.41);--at-highlight-bg:lab(96.7959% -.972748 19.4827);--at-selected-bg:lab(95.2674% -1.71572 -11.035);--at-scrollbar-thumb:lab(83.7382% -.510752 -2.97043);--at-scrollbar-thumb-hover:lab(65.1562% -.902712 -5.53997)}}:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:#151b25;--at-surface-hover:#1d2431;--at-muted:#191f2b;--at-code:#1b222d;--at-text-primary:#dfe5ed;--at-text-secondary:#9ca5b3;--at-text-muted:#727b88;--at-border:#2e3643;--at-border-light:#232934;--at-shadow:#00000073;--at-accent:#63a6ff;--at-error-bg:#742e2940;--at-error-text:#ff7f73;--at-error-border:#cf413a;--at-ok-bg:#39794933;--at-ok-text:#6ed889;--at-ok-border:#2e9e52;--at-warn-bg:#7e5d1d38;--at-warn-text:#f1bf5b;--at-warn-border:#b07b00;--at-highlight-bg:#b8a4571f;--at-selected-bg:#6087c22e;--at-scrollbar-thumb:#3d434d;--at-scrollbar-thumb-hover:#565e6c}@supports (color:color(display-p3 0 0 0)){:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:color(display-p3 .0866362 .104012 .141551);--at-surface-hover:color(display-p3 .119527 .140938 .187194);--at-muted:color(display-p3 .10291 .122282 .164135);--at-code:color(display-p3 .112011 .131618 .173879);--at-text-primary:color(display-p3 .880198 .897517 .925177);--at-text-secondary:color(display-p3 .618009 .647763 .695453);--at-text-muted:color(display-p3 .454817 .481202 .527256);--at-border:color(display-p3 .187231 .209329 .256415);--at-border-light:color(display-p3 .14159 .16023 .200008);--at-shadow:color(display-p3 0 0 0/.45);--at-accent:color(display-p3 .445537 .644287 .978823);--at-error-bg:color(display-p3 .422373 .197971 .171651/.25);--at-error-text:color(display-p3 .938127 .52257 .468553);--at-error-border:color(display-p3 .751519 .297873 .256966);--at-ok-bg:color(display-p3 .287508 .467968 .304198/.2);--at-ok-text:color(display-p3 .538207 .838899 .565385);--at-ok-border:color(display-p3 .319936 .612208 .354223);--at-warn-bg:color(display-p3 .474062 .369044 .161788/.22);--at-warn-text:color(display-p3 .915105 .755059 .421563);--at-warn-border:color(display-p3 .660566 .489104 .15495);--at-highlight-bg:color(display-p3 .708898 .646062 .385093/.12);--at-selected-bg:color(display-p3 .407909 .526271 .742584/.18);--at-scrollbar-thumb:color(display-p3 .241934 .260441 .299404);--at-scrollbar-thumb-hover:color(display-p3 .342885 .367416 .419047)}}@supports (color:lab(0% 0 0)){:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:lab(9.40435% -.26536 -8.00193);--at-surface-hover:lab(14.0233% -.313595 -9.45683);--at-muted:lab(11.7138% -.289485 -8.72938);--at-code:lab(12.8756% -.320837 -8.73908);--at-text-primary:lab(90.6923% -.891328 -4.41389);--at-text-secondary:lab(67.4629% -1.51783 -8.03232);--at-text-muted:lab(51.2096% -1.21292 -8.07107);--at-border:lab(22.1597% -.497714 -9.15806);--at-border-light:lab(16.373% -.418156 -8.05204);--at-shadow:lab(0% 0 0/.45);--at-accent:lab(66.6499% -1.4444 -52.3046);--at-error-bg:lab(29.4384% 31.1218 19.7271/.25);--at-error-text:lab(68.3188% 49.5998 30.86);--at-error-border:lab(49.5145% 56.3761 37.3383);--at-ok-bg:lab(45.5916% -30.0637 19.6786/.2);--at-ok-text:lab(78.7102% -45.0683 29.4705);--at-ok-border:lab(57.7987% -45.4011 30.0617);--at-warn-bg:lab(42.0282% 9.23485 40.2236/.22);--at-warn-text:lab(80.4197% 11.1201 56.0991);--at-warn-border:lab(55.853% 15.6735 62.0226);--at-highlight-bg:lab(67.9375% .259876 42.1122/.12);--at-selected-bg:lab(55.3782% -1.45972 -35.4324/.18);--at-scrollbar-thumb:lab(27.992% -.544697 -7.38333);--at-scrollbar-thumb-hover:lab(39.5702% -.685155 -9.23098)}}@media (prefers-color-scheme:dark){:host([data-theme=system]),:root[data-theme=system]{--at-surface:#151b25;--at-surface-hover:#1d2431;--at-muted:#191f2b;--at-code:#1b222d;--at-text-primary:#dfe5ed;--at-text-secondary:#9ca5b3;--at-text-muted:#727b88;--at-border:#2e3643;--at-border-light:#232934;--at-shadow:#00000073;--at-accent:#63a6ff;--at-error-bg:#742e2940;--at-error-text:#ff7f73;--at-error-border:#cf413a;--at-ok-bg:#39794933;--at-ok-text:#6ed889;--at-ok-border:#2e9e52;--at-highlight-bg:#b8a4571f;--at-selected-bg:#6087c22e;--at-scrollbar-thumb:#3d434d;--at-scrollbar-thumb-hover:#565e6c}@supports (color:color(display-p3 0 0 0)){:host([data-theme=system]),:root[data-theme=system]{--at-surface:color(display-p3 .0866362 .104012 .141551);--at-surface-hover:color(display-p3 .119527 .140938 .187194);--at-muted:color(display-p3 .10291 .122282 .164135);--at-code:color(display-p3 .112011 .131618 .173879);--at-text-primary:color(display-p3 .880198 .897517 .925177);--at-text-secondary:color(display-p3 .618009 .647763 .695453);--at-text-muted:color(display-p3 .454817 .481202 .527256);--at-border:color(display-p3 .187231 .209329 .256415);--at-border-light:color(display-p3 .14159 .16023 .200008);--at-shadow:color(display-p3 0 0 0/.45);--at-accent:color(display-p3 .445537 .644287 .978823);--at-error-bg:color(display-p3 .422373 .197971 .171651/.25);--at-error-text:color(display-p3 .938127 .52257 .468553);--at-error-border:color(display-p3 .751519 .297873 .256966);--at-ok-bg:color(display-p3 .287508 .467968 .304198/.2);--at-ok-text:color(display-p3 .538207 .838899 .565385);--at-ok-border:color(display-p3 .319936 .612208 .354223);--at-highlight-bg:color(display-p3 .708898 .646062 .385093/.12);--at-selected-bg:color(display-p3 .407909 .526271 .742584/.18);--at-scrollbar-thumb:color(display-p3 .241934 .260441 .299404);--at-scrollbar-thumb-hover:color(display-p3 .342885 .367416 .419047)}}@supports (color:lab(0% 0 0)){:host([data-theme=system]),:root[data-theme=system]{--at-surface:lab(9.40435% -.26536 -8.00193);--at-surface-hover:lab(14.0233% -.313595 -9.45683);--at-muted:lab(11.7138% -.289485 -8.72938);--at-code:lab(12.8756% -.320837 -8.73908);--at-text-primary:lab(90.6923% -.891328 -4.41389);--at-text-secondary:lab(67.4629% -1.51783 -8.03232);--at-text-muted:lab(51.2096% -1.21292 -8.07107);--at-border:lab(22.1597% -.497714 -9.15806);--at-border-light:lab(16.373% -.418156 -8.05204);--at-shadow:lab(0% 0 0/.45);--at-accent:lab(66.6499% -1.4444 -52.3046);--at-error-bg:lab(29.4384% 31.1218 19.7271/.25);--at-error-text:lab(68.3188% 49.5998 30.86);--at-error-border:lab(49.5145% 56.3761 37.3383);--at-ok-bg:lab(45.5916% -30.0637 19.6786/.2);--at-ok-text:lab(78.7102% -45.0683 29.4705);--at-ok-border:lab(57.7987% -45.4011 30.0617);--at-highlight-bg:lab(67.9375% .259876 42.1122/.12);--at-selected-bg:lab(55.3782% -1.45972 -35.4324/.18);--at-scrollbar-thumb:lab(27.992% -.544697 -7.38333);--at-scrollbar-thumb-hover:lab(39.5702% -.685155 -9.23098)}}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--at-scrollbar-thumb,#d4d4d8);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--at-scrollbar-thumb-hover,#a1a1aa)}.waterfall-row:hover .waterfall-bar{filter:brightness(1.1)}.waterfall-bar{transition:all .15s ease-out}.trace-list-container{container-type:inline-size}.trace-grid{grid-template-columns:20px 104px minmax(0,1fr) 84px 52px 88px 60px 16px;align-items:center;gap:.75rem;display:grid}@container (width<=640px){.trace-grid{grid-template-columns:20px 92px minmax(0,1fr) 80px 58px 16px}.trace-col-spans,.trace-col-time{display:none}}@keyframes at-modal-in{0%{opacity:0;transform:translateY(6px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes at-fade-in{0%{opacity:0}to{opacity:1}}.at-modal-in{animation:.17s cubic-bezier(.22,1,.36,1) at-modal-in}.at-backdrop-in{animation:.17s ease-out at-fade-in}.at-wrap-anywhere{overflow-wrap:anywhere;word-break:normal}.at-no-scrollbar{scrollbar-width:none}.at-no-scrollbar::-webkit-scrollbar{display:none}@media (prefers-reduced-motion:reduce){.at-modal-in,.at-backdrop-in{animation:none}}.at-edge-label{paint-order:stroke;stroke:var(--color-surface);stroke-width:3px;stroke-linejoin:round}:where(a,button,[role=button],input,select,textarea,summary,[tabindex]:not([tabindex="-1"])):focus-visible{outline:2px solid var(--at-accent);outline-offset:2px}:where([data-focus-inset]):focus-visible{outline-offset:-2px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}`,SH=class extends HTMLElement{constructor(...e){super(...e),x(this,`cleanup`,null)}connectedCallback(){let e=this.attachShadow({mode:`open`}),t=document.createElement(`link`);t.rel=`stylesheet`,t.href=`https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap`,e.appendChild(t);let n=document.createElement(`style`);n.textContent=xH,e.appendChild(n);let r=this.getAttribute(`mode`)||`widget`,i=this.getAttribute(`ws-url`)||this.deriveWsUrl();this.cleanup=bH(e,{mode:r,wsUrl:i})}disconnectedCallback(){this.cleanup?.(),this.cleanup=null}deriveWsUrl(){return`ws://${location.host}/ws`}};x(SH,`observedAttributes`,[`mode`,`ws-url`]);function CH(){customElements.get(`autotel-devtools`)||customElements.define(`autotel-devtools`,SH)}var wH=document.currentScript;function TH(){let e=Xu(location.hash);return Object.keys(e).length>0?e:void 0}function EH(){let e=TH();if(!wH?.src)return{mode:`widget`,wsUrl:`ws://${location.host}/ws`,deepLink:e};let t=new URL(wH.src),n=t.searchParams;return{mode:n.get(`mode`)||`widget`,wsUrl:n.get(`ws`)||`ws://${t.host}/ws`,deepLink:e}}function DH(){if(CH(),document.querySelector(`autotel-devtools`))return;let{mode:e,wsUrl:t,deepLink:n}=EH(),r=document.createElement(`div`);r.id=`autotel-devtools-root`,document.body.appendChild(r);let i=r.attachShadow({mode:`open`}),a=document.createElement(`style`);a.textContent=xH,i.appendChild(a),bH(i,{mode:e,wsUrl:t,deepLink:n})}return document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,DH):DH(),e.mountWidget=bH,e.registerElement=CH,e})({});
|
|
45
|
+
instrumentWebMCP(); // before you register any tools`,Ke(2),D(t),H(e,t)};W(g,e=>{z(n).status===`loading`?e(_):z(n).status===`error`?e(v,1):z(c)&&z(l)&&z(c).tools.length>0?e(y,2):e(b,-1)}),D(f),B(`click`,h,()=>void s()),H(e,f),at()}ea([`click`]);var EV={traces:XA,agents:Ej,genai:ON,flow:xP,resources:jP,"service-map":lF,metrics:XR,logs:yz,errors:rB,security:xB,compare:IB,coverage:qB,webmcp:TV},DV=[{id:`traces`,label:`Traces`,icon:Up},{id:`agents`,label:`Agents`,icon:lp},{id:`genai`,label:`GenAI`,icon:Nh},{id:`flow`,label:`Flow`,icon:$h},{id:`resources`,label:`Resources`,icon:dp},{id:`service-map`,label:`Service Map`,icon:qm},{id:`metrics`,label:`Metrics`,icon:yp},{id:`logs`,label:`Logs`,icon:rm},{id:`errors`,label:`Errors`,icon:Gh},{id:`security`,label:`Security`,icon:kh},{id:`compare`,label:`Compare`,icon:hm},{id:`coverage`,label:`Coverage`,icon:_h},{id:`webmcp`,label:`WebMCP`,icon:tg}].filter(e=>EV[e.id]!==void 0),OV=DV.map(e=>e.id),kV=16,AV=48;function jV(e){let{isVertical:t,dock:n,axisSize:r,setSize:i,resetSize:a}=e,o=N(!1);return{get resizing(){return z(o)},onPointerDown:e=>{e.stopPropagation();let a=t(),s=a?`vertical`:`horizontal`,c=a?e.clientY:e.clientX,l=r(),u=n()===`bottom`||n()===`right`?-1:1;vy(e,{cursor:a?`ns-resize`:`ew-resize`,onStart:()=>P(o,!0),onMove:e=>{let t=a?e.clientY:e.clientX;i(s,l+(t-c)*u)},onEnd:()=>P(o,!1)})},onKeyDown:e=>{let a=t()?`vertical`:`horizontal`,o=e.shiftKey?AV:kV,s=t()?{ArrowUp:n()===`bottom`?o:-o,ArrowDown:n()===`bottom`?-o:o}:{ArrowLeft:n()===`right`?o:-o,ArrowRight:n()===`right`?-o:o};e.key in s&&(e.preventDefault(),i(a,r()+s[e.key]))},onDblClick:()=>a(t()?`vertical`:`horizontal`)}}function MV(e,t,n,r){let i={left:e,right:n-e,top:t,bottom:r-t};return Object.keys(i).reduce((e,t)=>i[t]<i[e]?t:e)}function NV(e){let{dock:t,pipActive:n,onDock:r}=e,i=N(!1),a=N(null);return{get dragging(){return z(i)},get dropTarget(){return z(a)},onHeaderPointerDown:e=>{e.button===0&&(e.target.closest(`button`)||n()||vy(e,{cursor:`grabbing`,onStart:()=>{P(i,!0),P(a,t(),!0)},onMove:e=>{P(a,MV(e.clientX,e.clientY,window.innerWidth,window.innerHeight),!0)},onEnd:()=>{P(i,!1),z(a)&&z(a)!==t()&&r(z(a)),P(a,null)}}))}}}function PV(e,t){it(t,!0);let n=M(()=>Bc.value),r=M(()=>EV[z(n)]??EV.traces);var i=la(),a=I(i),o=e=>{var t=la();Ra(I(t),()=>z(r),(e,t)=>{t(e,{})}),H(e,t)};W(a,e=>{z(r)&&e(o)}),H(e,i),at()}var FV=V(`<span class="absolute inset-0 rounded-full bg-success opacity-75 animate-ping" aria-hidden="true"></span>`),IV=V(`<span class="text-xs font-mono tabular-nums text-fg-subtle" title="Telemetry ingest rate"> </span>`),LV=V(`<span class="text-xs font-mono tabular-nums text-fg-subtle" title="Telemetry store usage and retention cap"> </span>`),RV=V(`<span> </span> <!> <!>`,1),zV=V(`<div role="status"><span class="relative inline-flex w-2 h-2 shrink-0"><!> <span aria-hidden="true"></span></span> <!></div>`);function BV(e,t){it(t,!0);let n=Z(t,`compact`,3,!1),r=M(()=>fl.value),i=M(()=>z(r)===`connected`?{dot:`bg-success`,label:`Connected`,text:`text-success`}:z(r)===`connecting`?{dot:`bg-warning animate-pulse`,label:`Connecting…`,text:`text-warning`}:{dot:`bg-danger`,label:`Disconnected`,text:`text-fg-subtle`}),a=M(()=>yl.value),o=N(!1);Lr(()=>{if(z(a),z(a)===0)return;P(o,!0);let e=setTimeout(()=>P(o,!1),900);return()=>clearTimeout(e)});let s=N(0);Lr(()=>{if(n())return;let e=()=>{P(s,Math.round(Cl(5e3).total),!0)};e();let t=setInterval(e,1e3);return()=>clearInterval(t)});let c=M(()=>!n()&&z(r)===`connected`&&z(s)>0),l=N(null);Lr(()=>{if(n()||z(r)!==`connected`)return;let e=!0,t=async()=>{let t=pl.value,n=(t?Zo(t):null)??globalThis.location?.origin;if(n)try{let t=await fetch(`${n}/api/stats`);t.ok&&e&&P(l,await t.json(),!0)}catch{}};t();let i=setInterval(t,3e4);return()=>{e=!1,clearInterval(i)}});function u(e){return e<1024**2?`${Math.round(e/1024)} KB`:e<1024**3?`${(e/1024**2).toFixed(1)} MB`:`${(e/1024**3).toFixed(1)} GB`}var d=zV(),f=F(d),p=F(f),m=e=>{H(e,FV())};W(p,e=>{z(o)&&z(r)===`connected`&&e(m)});var h=L(p,2);D(f);var g=L(f,2),_=e=>{var t=RV(),n=I(t),r=F(n,!0);D(n);var a=L(n,2),o=e=>{var t=IV(),n=F(t);D(t),R(()=>U(n,`· ${z(s)??``}/s`)),H(e,t)};W(a,e=>{z(c)&&e(o)});var d=L(a,2),f=e=>{var t=LV(),n=F(t);D(t),R((e,t)=>U(n,`· ${e??``} / ${t??``}`),[()=>u(z(l).bytesUsed),()=>u(z(l).maxBytes)]),H(e,t)};W(d,e=>{z(l)&&e(f)}),R(e=>{q(n,1,e),U(r,z(i).label)},[()=>K($(`text-xs font-medium`,z(i).text))]),H(e,t)};W(g,e=>{n()||e(_)}),D(d),R((e,t)=>{q(d,1,e),J(d,`aria-label`,`OTLP receiver: ${z(i).label}`),J(d,`title`,`OTLP receiver: ${z(i).label}${z(s)>0?` · ${z(s)}/s`:``}`),q(h,1,t)},[()=>K($(`flex items-center gap-1.5`,!n()&&`px-3 py-2`)),()=>K($(`relative inline-block w-2 h-2 rounded-full`,z(i).dot))]),H(e,d),at()}var VV=V(`<kbd class="inline-block px-1.5 py-0.5 font-mono text-xs font-semibold bg-hover border border-line rounded text-fg mr-1 last:mr-0 shadow-[0_1px_0_#d4d4d8]"> </kbd>`),HV=V(`<tr class="border-b border-line-subtle last:border-b-0"><td class="py-2.5 px-4 whitespace-nowrap align-middle w-[1%]"></td><td class="py-2.5 pr-4 pl-1 text-sm text-fg-muted align-middle"> </td></tr>`),UV=V(`<div class="fixed inset-0 z-[1000] flex items-center justify-center" role="dialog" aria-modal="true" aria-label="Keyboard shortcuts"><button type="button" aria-label="Close" class="absolute inset-0 bg-black/55 backdrop-blur-[2px] at-backdrop-in"></button> <div tabindex="-1" class="at-modal-in relative z-[1] bg-surface border border-line rounded-lg shadow-xl w-[480px] max-w-[90vw] max-h-[80vh] flex flex-col overflow-hidden outline-none"><div class="flex items-center justify-between px-4 py-3 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-semibold text-fg">Keyboard Shortcuts</span> <button class="inline-flex items-center justify-center w-7 h-7 p-0 bg-transparent border border-line rounded cursor-pointer text-sm text-fg-subtle hover:bg-danger-bg hover:border-danger-border hover:text-danger transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-y-auto py-2"><table class="w-full border-collapse"><tbody></tbody></table></div></div></div>`);function WV(e,t){it(t,!0);let n=N(void 0);Lr(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t.onClose())},r=z(n);return r&&(r.addEventListener(`keydown`,e),r.focus()),window.addEventListener(`keydown`,e),()=>{r&&r.removeEventListener(`keydown`,e),window.removeEventListener(`keydown`,e)}});var r=UV(),i=F(r),a=L(i,2),o=F(a),s=L(F(o),2);rg(F(s),{size:14}),D(s),D(o);var c=L(o,2),l=F(c),u=F(l);G(u,21,()=>t.shortcuts,Oa,(e,t)=>{var n=HV(),r=F(n);G(r,21,()=>z(t).keys,Oa,(e,t)=>{var n=VV(),r=F(n,!0);D(n),R(()=>U(r,z(t)===`CmdOrCtrl`?xg?`⌘`:`Ctrl`:z(t)===`AltOrOpt`?xg?`⌥`:`Alt`:z(t))),H(e,n)}),D(r);var i=L(r),a=F(i,!0);D(i),D(n),R(()=>U(a,z(t).description)),H(e,n)}),D(u),D(l),D(c),D(a),Vo(a,e=>P(n,e),()=>z(n)),D(r),B(`click`,i,function(...e){t.onClose?.apply(this,e)}),B(`click`,s,function(...e){t.onClose?.apply(this,e)}),H(e,r),at()}ea([`click`]);var GV=V(`<div role="separator" aria-label="Resize panel" tabindex="0" title="Drag to resize · double-click to reset"><div></div> <div></div></div>`),KV=V(`<span class="text-fg-subtle/60 flex-shrink-0 pl-0.5" aria-hidden="true"><!></span>`),qV=V(`<span> </span>`),JV=V(`<button><!> <span> </span> <!></button>`),YV=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Dock position (click to cycle: bottom → right → left) — or drag the header to an edge" aria-label="Change dock position"><!></button>`),XV=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors"><!></button>`),ZV=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Close (Esc)" aria-label="Close devtools"><!></button>`),QV=V(`<span class="px-2.5 py-1 rounded-md bg-accent text-white text-xs font-semibold shadow-lg"> </span>`),$V=V(`<div><!></div>`),eH=V(`<div class="fixed inset-0 z-[1001] pointer-events-none" aria-hidden="true"></div>`),tH=V(`<section aria-label="Autotel devtools"><!> <header><!> <div class="flex items-center gap-2 flex-shrink-0 pr-1 mr-0.5"><!> <span class="text-xs font-semibold tracking-tight text-fg hidden sm:inline">autotel</span></div> <nav class="flex items-center gap-0.5 overflow-x-auto min-w-0 flex-1 at-no-scrollbar" aria-label="Devtools sections"></nav> <div class="flex items-center gap-1 flex-shrink-0 pl-1"><!> <button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Keyboard shortcuts (?)" aria-label="Keyboard shortcuts"><!></button> <!> <!> <!></div></header> <div class="flex-1 min-h-0 overflow-hidden"><!></div> <!></section> <!>`,1);function nH(e,t){it(t,!0);let n=N(void 0),r=M(()=>Fc.value),i=M(()=>Bc.value),a=M(()=>Rc.value??`bottom`),o=M(()=>il.value),s=M(()=>zc.value),c=cg(),l=M(()=>z(a)===`bottom`||z(a)===`top`),u=M(()=>z(l)?z(o).vertical:z(o).horizontal),d=M(()=>al(z(l)?`vertical`:`horizontal`)),f=M(()=>su.value),p=M(()=>nu.value),m=M(()=>ru.value),h=M(()=>({genai:z(p)>0?z(p):void 0,flow:z(m)>0?z(m):void 0,errors:z(f)>0?z(f):void 0})),g=M(()=>DV.map(e=>({...e,badge:z(h)[e.id]}))),_=jV({isVertical:()=>z(l),dock:()=>z(a),axisSize:()=>z(u),setSize:ol,resetSize:sl}),v=NV({dock:()=>z(a),pipActive:()=>z(s),onDock:Lu});async function y(){if(z(s)){fg(()=>zc.value=!1);return}let e=z(n)?.getRootNode(),t=e instanceof ShadowRoot?e.host:null;t&&await dg(t,()=>zc.value=!1,{width:760,height:600})&&(zc.value=!0)}let b=globalThis.window!==void 0&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function x(e,{dock:t}){if(b||z(s))return{duration:0};let n=t===`left`||t===`right`?`X`:`Y`,r=t===`bottom`||t===`right`?1:-1;return{duration:240,easing:og,css:(e,t)=>`transform: translate${n}(${t*r*100}%)`}}let S=[`traces`,`genai`,`flow`,`service-map`,`metrics`,`logs`,`errors`],C=M(()=>$c.value);function w(){return Vc.value?vg:Bc.value===`traces`?_g:gg}Lr(()=>{let e=z(n)?.getRootNode(),t=e instanceof ShadowRoot||e instanceof Document?e:window,r=e=>{let t=e;if(t.key===`Escape`){if($c.value){tl();return}if(yg())return;if(zc.value){fg(()=>zc.value=!1);return}ju();return}if(t.key===`?`&&!yg()){t.preventDefault(),nl(w());return}if(!$c.value&&!yg()&&t.key>=`1`&&t.key<=`7`){let e=Number.parseInt(t.key,10)-1;e<S.length&&Mu(S[e])}};return t.addEventListener(`keydown`,r),()=>t.removeEventListener(`keydown`,r)});let T=M(()=>z(s)?`inset-0`:{bottom:`left-0 right-0 bottom-0`,top:`left-0 right-0 top-0`,right:`top-0 bottom-0 right-0`,left:`top-0 bottom-0 left-0`}[z(a)]),ee=M(()=>z(s)?``:{bottom:`border-t`,top:`border-b`,right:`border-l`,left:`border-r`}[z(a)]),te=M(()=>({bottom:`-top-1 left-0 right-0 h-2 cursor-ns-resize`,top:`-bottom-1 left-0 right-0 h-2 cursor-ns-resize`,right:`-left-1 top-0 bottom-0 w-2 cursor-ew-resize`,left:`-right-1 top-0 bottom-0 w-2 cursor-ew-resize`})[z(a)]),ne=M(()=>({bottom:`inset-x-0 top-1 h-px`,top:`inset-x-0 bottom-1 h-px`,right:`inset-y-0 left-1 w-px`,left:`inset-y-0 right-1 w-px`})[z(a)]),re=M(()=>z(s)?``:z(l)?`height: ${z(u)}px;`:`width: ${z(u)}px;`),ie=M(()=>z(s)?``:{bottom:`box-shadow: 0 -12px 32px -14px var(--at-shadow), 0 -2px 6px -4px var(--at-shadow);`,top:`box-shadow: 0 12px 32px -14px var(--at-shadow), 0 2px 6px -4px var(--at-shadow);`,right:`box-shadow: -12px 0 32px -14px var(--at-shadow), -2px 0 6px -4px var(--at-shadow);`,left:`box-shadow: 12px 0 32px -14px var(--at-shadow), 2px 0 6px -4px var(--at-shadow);`}[z(a)]),ae=M(()=>z(a)===`right`?$m:z(a)===`left`?Zm:Ym),oe=[{edge:`bottom`,pos:`left-0 right-0 bottom-0 h-24`,label:`Dock bottom`},{edge:`top`,pos:`left-0 right-0 top-0 h-24`,label:`Dock top`},{edge:`left`,pos:`top-0 bottom-0 left-0 w-44`,label:`Dock left`},{edge:`right`,pos:`top-0 bottom-0 right-0 w-44`,label:`Dock right`}];var se=la(),ce=I(se),le=e=>{var t=tH(),r=I(t),o=F(r),f=e=>{var t=GV(),n=F(t),r=L(n,2);D(t),R((e,i,a,o)=>{J(t,`aria-orientation`,z(l)?`horizontal`:`vertical`),J(t,`aria-valuenow`,e),J(t,`aria-valuemin`,z(d).min),J(t,`aria-valuemax`,z(d).max),q(t,1,i),q(n,1,a),q(r,1,o)},[()=>Math.round(z(u)),()=>K($(`absolute z-20 group touch-none select-none outline-none`,z(te))),()=>K($(`absolute bg-line-subtle transition-colors duration-150`,`group-hover:bg-accent group-focus-visible:bg-accent`,_.resizing&&`!bg-accent`,z(ne))),()=>K($(`absolute rounded-full bg-line transition-colors duration-150`,`group-hover:bg-accent group-focus-visible:bg-accent`,_.resizing&&`!bg-accent`,z(l)?`left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2 w-9 h-1`:`top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 h-9 w-1`))]),B(`pointerdown`,t,function(...e){_.onPointerDown?.apply(this,e)}),B(`keydown`,t,function(...e){_.onKeyDown?.apply(this,e)}),B(`dblclick`,t,function(...e){_.onDblClick?.apply(this,e)}),H(e,t)};W(o,e=>{z(s)||e(f)});var p=L(o,2),m=F(p),h=e=>{var t=KV();ym(F(t),{size:14}),D(t),H(e,t)};W(m,e=>{z(s)||e(h)});var b=L(m,2);id(F(b),{width:18,height:18}),Ke(2),D(b);var S=L(b,2);G(S,21,()=>z(g),e=>e.id,(e,t)=>{let n=M(()=>z(t).icon),r=M(()=>z(i)===z(t).id);var a=JV(),o=F(a);{let e=M(()=>z(t).id===`errors`&&z(t).badge?`text-danger`:void 0);Ra(o,()=>z(n),(t,n)=>{n(t,{size:14,get class(){return z(e)}})})}var s=L(o,2),c=F(s,!0);D(s);var l=L(s,2),u=e=>{var n=qV(),r=F(n,!0);D(n),R(e=>{q(n,1,e),U(r,z(t).badge>99?`99+`:z(t).badge)},[()=>K($(`px-1.5 py-px text-[10px] font-semibold rounded-full`,z(t).id===`errors`?`bg-danger-bg text-danger`:`bg-accent/15 text-fg-muted`))]),H(e,n)};W(l,e=>{z(t).badge&&e(u)}),D(a),R(e=>{J(a,`aria-current`,z(r)?`page`:void 0),q(a,1,e),U(c,z(t).label)},[()=>K($(`flex items-center gap-1.5 px-2.5 h-8 rounded-md flex-shrink-0`,`text-xs transition-colors cursor-pointer`,z(r)?`bg-accent/12 text-fg font-semibold ring-1 ring-inset ring-accent/20`:`text-fg-subtle font-medium hover:text-fg hover:bg-subtle`))]),B(`click`,a,()=>Mu(z(t).id)),H(e,a)}),D(S);var se=L(S,2);{let e=e=>{let t=M(()=>z(ae));var n=la();Ra(I(n),()=>z(t),(e,t)=>{t(e,{size:15})}),H(e,n)};var ce=F(se);BV(ce,{compact:!0});var le=L(ce,2);jp(F(le),{size:15}),D(le);var E=L(le,2),ue=t=>{var n=YV(),r=F(n);e(r),D(n),B(`click`,n,function(...e){Ru?.apply(this,e)}),H(t,n)};W(E,e=>{z(s)||e(ue)});var de=L(E,2),fe=e=>{var t=XV(),n=F(t),r=e=>{zm(e,{size:15})},i=e=>{rh(e,{size:15})};W(n,e=>{z(s)?e(r):e(i,-1)}),D(t),R(()=>{J(t,`title`,z(s)?`Return to docked panel`:`Pop out to a separate window`),J(t,`aria-label`,z(s)?`Return to docked panel`:`Pop out to window`)}),B(`click`,t,y),H(e,t)};W(de,e=>{c&&e(fe)});var pe=L(de,2),me=e=>{var t=ZV();rg(F(t),{size:16}),D(t),B(`click`,t,function(...e){ju?.apply(this,e)}),H(e,t)};W(pe,e=>{z(s)||e(me)}),D(se),B(`click`,le,()=>nl(w()))}D(p);var he=L(p,2);PV(F(he),{}),D(he);var ge=L(he,2),_e=e=>{WV(e,{get shortcuts(){return z(C)},get onClose(){return tl}})};W(ge,e=>{z(C)&&e(_e)}),D(r),Vo(r,e=>P(n,e),()=>z(n));var ve=L(r,2),ye=e=>{var t=eH();G(t,21,()=>oe,e=>e.edge,(e,t)=>{let n=M(()=>v.dropTarget===z(t).edge);var r=$V(),i=F(r),a=e=>{var n=QV(),r=F(n,!0);D(n),R(()=>U(r,z(t).label)),H(e,n)};W(i,e=>{z(n)&&e(a)}),D(r),R(e=>q(r,1,e),[()=>K($(`absolute flex items-center justify-center transition-colors duration-100`,z(t).pos,z(n)?`bg-accent/15 ring-2 ring-inset ring-accent`:`bg-accent/5`))]),H(e,r)}),D(t),H(e,t)};W(ve,e=>{v.dragging&&e(ye)}),R((e,t)=>{q(r,1,e),oo(r,`${z(re)} ${z(ie)}`),q(p,1,t)},[()=>K($(`fixed z-[1000] flex flex-col`,`bg-surface text-fg`,z(T),z(ee),`border-line`)),()=>K($(`flex items-center gap-1 pl-2 pr-2 h-11 flex-shrink-0`,`border-b border-line bg-surface`,z(s)?``:`cursor-grab active:cursor-grabbing`))]),B(`pointerdown`,p,function(...e){v.onHeaderPointerDown?.apply(this,e)}),qa(3,r,()=>x,()=>({dock:z(a)})),H(e,t)};W(ce,e=>{z(r)&&e(le)}),H(e,se),at()}ea([`pointerdown`,`keydown`,`dblclick`,`click`]);var rH=V(`<button><!> </button>`),iH=V(`<nav></nav>`);function aH(e,t){it(t,!0);let n=Z(t,`orientation`,3,`horizontal`),r=M(()=>Bc.value);var i=iH();G(i,21,()=>DV,({id:e,label:t,icon:n})=>e,(e,t)=>{let n=()=>z(t).id,i=()=>z(t).label,a=()=>z(t).icon;var o=rH(),s=F(o);Ra(s,a,(e,t)=>{t(e,{size:14})});var c=L(s);D(o),R(e=>{q(o,1,e),U(c,` ${i()??``}`)},[()=>K($(`flex items-center gap-2 px-3 py-2 text-xs font-medium rounded transition-colors whitespace-nowrap`,z(r)===n()?`bg-accent text-white`:`text-fg-subtle hover:bg-hover hover:text-fg`))]),B(`click`,o,()=>Mu(n())),H(e,o)}),D(i),R(e=>q(i,1,e),[()=>K($(`flex gap-1 p-1`,n()===`vertical`?`flex-col w-48 border-r border-line`:`border-b border-line overflow-x-auto`))]),H(e,i),at()}ea([`click`]);var oH=V(`<!> <span class="font-medium">Snapshot mode</span> <span class="text-warning">— live updates paused.</span> <button class="ml-auto inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-warning-bg transition-colors" title="Exit snapshot and clear data"><!> Exit</button>`,1),sH=V(`<span class="text-fg-subtle"> </span> <button class="ml-auto inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent"><!> Download snapshot</button> <button class="inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover transition-colors" title="Load a snapshot file"><!> Load snapshot</button> <button class="inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover hover:text-danger transition-colors" title="Clear all captured data — traces, logs, metrics and errors"><!> Clear</button>`,1),cH=V(`<span class="text-danger truncate"> </span>`),lH=V(`<span class="text-warning truncate"> </span>`),uH=V(`<div><!> <input type="file" accept="application/json,.json" class="hidden"/> <!> <!></div>`);function dH(e,t){it(t,!0);let n=N(void 0),r=N(null),i=N(null),a=M(()=>kl.value),o=M(()=>[{n:cl.value.length,one:`trace`,many:`traces`},{n:dl.value.length,one:`log`,many:`logs`},{n:ul.value.length,one:`error`,many:`errors`}].filter(e=>e.n>0).map(e=>`${e.n} ${e.n===1?e.one:e.many}`)),s=M(()=>z(o).length===0),c=()=>{P(r,null),P(i,null),Jy({traces:cl.value,logs:dl.value,errors:ul.value})},l=()=>{z(n)?.click()},u=()=>{P(r,null),P(i,null),Bu()},d=async e=>{P(r,null),P(i,null);let t=e.currentTarget,n=t.files?.[0];if(t.value=``,!n)return;let a=await Zy(n);if(!a.success||!a.snapshot){P(r,a.errors.join(`; `)||`Failed to load snapshot`,!0);return}a.warnings.length>0&&P(i,a.warnings.join(`; `),!0),ku(a.snapshot)};var f=uH(),p=F(f),m=e=>{var t=oH(),n=I(t);hp(n,{size:12});var r=L(n,6);rg(F(r),{size:12}),Ke(),D(r),B(`click`,r,function(...e){Au?.apply(this,e)}),H(e,t)},h=e=>{var t=sH(),n=I(t),r=F(n,!0);D(n);var i=L(n,2);hp(F(i),{size:12}),Ke(),D(i);var a=L(i,2);qh(F(a),{size:12}),Ke(),D(a);var d=L(a,2);Vh(F(d),{size:12}),Ke(),D(d),R(e=>{U(r,e),i.disabled=z(s),J(i,`title`,z(s)?`Nothing captured yet`:`Download a snapshot of traces, logs, errors and metrics`)},[()=>z(s)?`No data captured`:z(o).join(` · `)]),B(`click`,i,c),B(`click`,a,l),B(`click`,d,u),H(e,t)};W(p,e=>{z(a)?e(m):e(h,-1)});var g=L(p,2);Vo(g,e=>P(n,e),()=>z(n));var _=L(g,2),v=e=>{var t=cH(),n=F(t,!0);D(t),R(()=>{J(t,`title`,z(r)),U(n,z(r))}),H(e,t)};W(_,e=>{z(r)&&e(v)});var y=L(_,2),b=e=>{var t=lH(),n=F(t,!0);D(t),R(()=>{J(t,`title`,z(i)),U(n,z(i))}),H(e,t)};W(y,e=>{z(i)&&!z(r)&&e(b)}),D(f),R(e=>q(f,1,e),[()=>K($(`border-b border-line px-3 py-1.5 text-xs flex items-center gap-2`,z(a)?`bg-warning-bg text-warning`:`bg-subtle text-fg-muted`))]),B(`change`,g,d),H(e,f),at()}ea([`click`,`change`]);var fH=V(`<div class="flex h-screen w-screen bg-surface text-fg"><div class="hidden md:flex flex-col border-r border-line"><!> <div class="mt-auto p-2 border-t border-line flex flex-col gap-1"><!> <button class="flex items-center gap-2 px-3 py-2 text-xs text-fg-subtle hover:bg-hover hover:text-fg rounded transition-colors"><!> </button> <button class="flex items-center gap-2 px-3 py-2 text-xs text-fg-subtle hover:bg-hover hover:text-fg rounded transition-colors" title="Keyboard shortcuts (?)"><!> Shortcuts</button></div></div> <div class="flex-1 flex flex-col min-w-0"><!> <div class="md:hidden"><!></div> <div class="flex-1 overflow-hidden"><!></div></div> <!></div>`);function pH(e,t){it(t,!0);function n(){return Vc.value?vg:Bc.value===`traces`?_g:gg}let r=M(()=>Gc.value),i=M(()=>$c.value);Lr(()=>{Gc.value=Kc()});let a=N(void 0);Lr(()=>{let e=null,t=z(a)?.getRootNode();t instanceof ShadowRoot?e=t.host:globalThis.document!==void 0&&(e=document.documentElement),e&&e.setAttribute(`data-theme`,z(r))}),Lr(()=>{let e=e=>{if(e.key===`?`&&!yg()){e.preventDefault(),nl(n());return}if(!$c.value&&!yg()&&e.key>=`1`&&e.key<=`9`){let t=parseInt(e.key,10)-1;t<OV.length&&Mu(OV[t])}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let o=M(()=>z(r)===`dark`?`Dark`:z(r)===`light`?`Light`:`System`);var s=fH(),c=F(s),l=F(c);aH(l,{orientation:`vertical`});var u=L(l,2),d=F(u);BV(d,{});var f=L(d,2),p=F(f),m=e=>{Gm(e,{size:14})},h=e=>{Fh(e,{size:14})},g=e=>{Um(e,{size:14})};W(p,e=>{z(r)===`dark`?e(m):z(r)===`light`?e(h,1):e(g,-1)});var _=L(p);D(f);var v=L(f,2);jp(F(v),{size:14}),Ke(),D(v),D(u),D(c);var y=L(c,2),b=F(y);dH(b,{});var x=L(b,2);aH(F(x),{orientation:`horizontal`}),D(x);var S=L(x,2);PV(F(S),{}),D(S),D(y);var C=L(y,2),w=e=>{WV(e,{get shortcuts(){return z(i)},get onClose(){return tl}})};W(C,e=>{z(i)&&e(w)}),D(s),Vo(s,e=>P(a,e),()=>z(a)),R(()=>{J(f,`title`,`Theme: ${z(o)} (click to cycle)`),U(_,` ${z(o)??``}`)}),B(`click`,f,function(...e){Jc?.apply(this,e)}),B(`click`,v,()=>el(n())),H(e,s),at()}ea([`click`]);var mH=250,hH=5e3;function gH(e={}){let t=e.now??(()=>Date.now()),n=e.debounceMs??mH,r=e.limit??hH,i=0,a=null,o=null,s=!1;function c(){let t=pl.value,n=e.baseUrl??(t?Zo(t):null)??globalThis.location?.origin??``;return{fetch:e.fetch??globalThis.fetch.bind(globalThis),baseUrl:n}}async function l(){if(s)return;let e=++i;a?.abort();let n=new AbortController;a=n;let o={query:``,window:ks(Cs(ml.value,t())),limit:r},l={...c(),signal:n.signal},[u,d]=await Promise.all([_H(o,l),vA(o,l)]);e!==i||s||(u.status===`ok`?(hl.value=u.traces,_l.value=`ready`):u.status===`error`&&(_l.value=`unavailable`),d.status===`ok`&&(gl.value=d.errors))}function u(){if(!s){if(o&&clearTimeout(o),n<=0){l();return}o=setTimeout(()=>{o=null,l()},n)}}return{refresh:l,invalidate:u,dispose(){s=!0,o&&clearTimeout(o),a?.abort()}}}async function _H(e,t){let n=[],r=new Set,i;do{let a=await hA({...e,cursor:i},t);if(a.status!==`ok`)return a;if(n.push(...a.traces),i=a.nextCursor??void 0,i&&r.has(i))return{status:`error`,message:`The trace query returned a repeated pagination cursor.`};i&&r.add(i)}while(i);return{status:`ok`,traces:n,nextCursor:null}}var vH=`data-autotel-portal`;function yH(e){let t=e.querySelector(`[${vH}]`);if(t)return t;let n=document.createElement(`div`);return n.setAttribute(vH,``),n.style.position=`absolute`,n.style.top=`0`,n.style.left=`0`,n.style.zIndex=`2147483000`,e.appendChild(n),n}var bH=V(`<!> <!>`,1),xH=V(`<div class="contents"><!></div>`);function SH(e,t){it(t,!0);function n(e){Mu(e.tab??`traces`),Nl.value=e.q??``,Pl.value=e.status??`all`,Fl.value=e.minDuration??0,ml.value=e.window??bs,Ml.value=e.sort??Zu,zl.value=e.genaiQuery??``,e.traceId&&Wc(e.traceId,e.spanId)}Lr(()=>{pl.value=t.wsUrl});let r=gH();Lr(()=>(r.refresh(),()=>r.dispose())),Lr(()=>{ml.value,cl.value.length,r.invalidate()});let i=N(void 0),a=N(void 0);Lr(()=>{if(!z(i))return;let e=z(i).getRootNode();P(a,yH(e instanceof ShadowRoot?e:document.body),!0)}),Lr(()=>{t.deepLink&&n(t.deepLink)}),Lr(()=>{let e=Uc.value;e&&cl.value.some(t=>t.traceId===e.traceId)&&(Nu(e.traceId,e.spanId??null),Mu(`traces`),Uc.value=null)});let o=null;Lr(()=>{if(t.mode!==`fullpage`)return;let e={tab:Bc.value,traceId:Vc.value??void 0,spanId:Hc.value??void 0,q:Nl.value||void 0,status:Pl.value,minDuration:Fl.value,window:ml.value,sort:Ml.value,genaiQuery:zl.value||void 0};if(Uc.value)return;let n=ed(e);if(n===location.hash)return;let r=td(o,e);o=e;let i=`${location.pathname}${location.search}${n}`;r===`push`?history.pushState(history.state,``,i):history.replaceState(history.state,``,i)}),Lr(()=>{if(t.mode!==`fullpage`)return;let e=()=>{let e=$u(location.hash);o=e,n(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)}),Lr(()=>{Wu(),es(Zo(t.wsUrl));let e=new Xo(t.wsUrl);fl.value=`connecting`;let n=e.onStatusChange(e=>{fl.value=e}),r=e.onMessage(Tu);return e.connect(),()=>{r(),n(),e.disconnect()}});var s=xH();iE(F(s),{get defaultPortalTo(){return z(a)},children:(e,n)=>{var r=la(),i=I(r),a=e=>{pH(e,{})},o=e=>{var t=bH(),n=I(t);Hf(n,{}),nH(L(n,2),{}),H(e,t)};W(i,e=>{t.mode===`fullpage`?e(a):e(o,-1)}),H(e,r)},$$slots:{default:!0}}),D(s),Vo(s,e=>P(i,e),()=>z(i)),H(e,s),at()}function CH(e,t){let n=pa(SH,{target:e,props:t});return()=>{_a(n)}}var wH=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
46
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:"Hanken Grotesk", system-ui, -apple-system, sans-serif;--font-mono:"JetBrains Mono", ui-monospace, "SF Mono", monospace;--color-red-100:#ffe2e2;--color-red-400:#ff6568;--color-red-500:#fb2c36;--color-red-600:#e40014;--color-red-700:#bf000f;--color-orange-100:#ffedd5;--color-orange-400:#ff8b1a;--color-orange-500:#fe6e00;--color-orange-600:#f05100;--color-orange-700:#c53c00;--color-amber-100:#fef3c6;--color-amber-500:#f99c00;--color-amber-600:#dd7400;--color-amber-700:#b75000;--color-yellow-100:#fef9c2;--color-yellow-500:#edb200;--color-yellow-600:#cd8900;--color-green-100:#dcfce7;--color-green-400:#05df72;--color-green-500:#00c758;--color-green-600:#00a544;--color-emerald-500:#00bb7f;--color-emerald-600:#009767;--color-teal-500:#00baa7;--color-teal-600:#009588;--color-cyan-100:#cefafe;--color-cyan-500:#00b7d7;--color-cyan-600:#0092b5;--color-sky-500:#00a5ef;--color-sky-600:#0084cc;--color-blue-100:#dbeafe;--color-blue-400:#54a2ff;--color-blue-500:#3080ff;--color-blue-600:#155dfc;--color-indigo-500:#625fff;--color-indigo-600:#4f39f6;--color-violet-100:#ede9fe;--color-violet-500:#8d54ff;--color-violet-600:#7f22fe;--color-violet-700:#7008e7;--color-purple-100:#f3e8ff;--color-purple-400:#c07eff;--color-purple-500:#ac4bff;--color-purple-600:#9810fa;--color-fuchsia-500:#e12afb;--color-fuchsia-600:#c600db;--color-rose-500:#ff2357;--color-rose-600:#e70044;--color-gray-50:#f9fafb;--color-gray-100:#f3f4f6;--color-gray-400:#99a1af;--color-gray-500:#6a7282;--color-gray-900:#101828;--color-stone-500:#79716b;--color-stone-600:#57534d;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-surface:var(--at-surface);--color-subtle:var(--at-muted);--color-hover:var(--at-surface-hover);--color-code:var(--at-code);--color-fg:var(--at-text-primary);--color-fg-muted:var(--at-text-secondary);--color-fg-subtle:var(--at-text-muted);--color-line:var(--at-border);--color-line-subtle:var(--at-border-light);--color-accent:var(--at-accent);--color-danger:var(--at-error-text);--color-danger-bg:var(--at-error-bg);--color-danger-border:var(--at-error-border);--color-success:var(--at-ok-text);--color-success-bg:var(--at-ok-bg);--color-success-border:var(--at-ok-border);--color-warning:var(--at-warn-text);--color-warning-bg:var(--at-warn-bg);--color-warning-border:var(--at-warn-border);--color-selected:var(--at-selected-bg)}@supports (color:color(display-p3 0 0 0)){:root,:host{--color-red-100:color(display-p3 .980386 .889727 .887779);--color-red-400:color(display-p3 .933534 .431676 .423491);--color-red-500:color(display-p3 .903738 .262579 .253307);--color-red-600:color(display-p3 .830323 .140383 .133196);--color-red-700:color(display-p3 .692737 .116232 .104679);--color-orange-100:color(display-p3 .988762 .931393 .843273);--color-orange-400:color(display-p3 .950192 .561807 .211017);--color-orange-500:color(display-p3 .946589 .449788 .0757345);--color-orange-600:color(display-p3 .887467 .341665 .0219962);--color-orange-700:color(display-p3 .729844 .257256 .0511062);--color-amber-100:color(display-p3 .989391 .954583 .796328);--color-amber-500:color(display-p3 .93994 .620584 .0585367);--color-amber-600:color(display-p3 .827144 .467166 .0336006);--color-amber-700:color(display-p3 .67989 .32771 .0520514);--color-yellow-100:color(display-p3 .993436 .977463 .782913);--color-yellow-500:color(display-p3 .903651 .703062 .0745389);--color-yellow-600:color(display-p3 .776342 .542492 .041709);--color-green-100:color(display-p3 .885269 .984329 .910368);--color-green-400:color(display-p3 .399536 .862346 .49324);--color-green-500:color(display-p3 .308734 .774754 .374307);--color-green-600:color(display-p3 .243882 .640824 .294808);--color-emerald-500:color(display-p3 .267113 .726847 .508397);--color-emerald-600:color(display-p3 .206557 .589057 .413962);--color-teal-500:color(display-p3 .266569 .721518 .655462);--color-teal-600:color(display-p3 .207114 .579584 .53668);--color-cyan-100:color(display-p3 .843085 .97553 .992573);--color-cyan-500:color(display-p3 .246703 .710032 .841444);--color-cyan-600:color(display-p3 .193249 .564651 .707197);--color-sky-500:color(display-p3 .219113 .639027 .931479);--color-sky-600:color(display-p3 .162505 .509376 .796082);--color-blue-100:color(display-p3 .869214 .915931 .989622);--color-blue-400:color(display-p3 .397443 .62813 .992116);--color-blue-500:color(display-p3 .266422 .491219 .988624);--color-blue-600:color(display-p3 .174493 .358974 .950247);--color-indigo-500:color(display-p3 .380374 .372235 .971707);--color-indigo-600:color(display-p3 .297656 .227891 .929242);--color-violet-100:color(display-p3 .926222 .913546 .990178);--color-violet-500:color(display-p3 .523372 .329605 .990884);--color-violet-600:color(display-p3 .459951 .162666 .957985);--color-violet-700:color(display-p3 .40161 .0841901 .871151);--color-purple-100:color(display-p3 .945034 .910569 .992972);--color-purple-400:color(display-p3 .719919 .492497 .995173);--color-purple-500:color(display-p3 .629519 .30089 .990817);--color-purple-600:color(display-p3 .546729 .130167 .94439);--color-fuchsia-500:color(display-p3 .81268 .241966 .951571);--color-fuchsia-600:color(display-p3 .716587 .083681 .841036);--color-rose-500:color(display-p3 .921824 .240748 .355666);--color-rose-600:color(display-p3 .848792 .102011 .269259);--color-gray-50:color(display-p3 .977213 .98084 .985102);--color-gray-100:color(display-p3 .953567 .956796 .964321);--color-gray-400:color(display-p3 .605734 .630385 .680158);--color-gray-500:color(display-p3 .421287 .446085 .504784);--color-gray-900:color(display-p3 .070423 .0928982 .151928);--color-stone-500:color(display-p3 .467445 .443064 .42264);--color-stone-600:color(display-p3 .339543 .325291 .304619)}}@supports (color:lab(0% 0 0)){:root,:host{--color-red-100:lab(92.243% 10.2865 3.83865);--color-red-400:lab(63.7053% 60.745 31.3109);--color-red-500:lab(55.4814% 75.0732 48.8528);--color-red-600:lab(48.4493% 77.4328 61.5452);--color-red-700:lab(40.4273% 67.2623 53.7441);--color-orange-100:lab(94.7127% 3.58394 14.3151);--color-orange-400:lab(70.0429% 42.5156 75.8207);--color-orange-500:lab(64.272% 57.1788 90.3583);--color-orange-600:lab(57.1026% 64.2584 89.8886);--color-orange-700:lab(46.4615% 57.7275 70.8507);--color-amber-100:lab(95.916% -1.21653 23.111);--color-amber-500:lab(72.7183% 31.8672 97.9407);--color-amber-600:lab(60.3514% 40.5624 87.1228);--color-amber-700:lab(47.2709% 42.9082 69.2966);--color-yellow-100:lab(97.3564% -4.51407 27.344);--color-yellow-500:lab(76.3898% 14.5258 98.4589);--color-yellow-600:lab(62.7799% 22.4197 86.1544);--color-green-100:lab(96.1861% -13.8464 6.52365);--color-green-400:lab(78.503% -64.9265 39.7492);--color-green-500:lab(70.5521% -66.5147 45.8073);--color-green-600:lab(59.0978% -58.6621 41.2579);--color-emerald-500:lab(66.9756% -58.27 19.5419);--color-emerald-600:lab(55.0481% -49.9246 15.93);--color-teal-500:lab(67.3859% -49.0983 -2.63511);--color-teal-600:lab(55.0223% -41.0774 -3.90277);--color-cyan-100:lab(95.3146% -13.8285 -6.84732);--color-cyan-500:lab(67.805% -35.3952 -30.2018);--color-cyan-600:lab(55.1767% -26.7496 -30.5139);--color-sky-500:lab(63.3038% -18.433 -51.0407);--color-sky-600:lab(51.7754% -11.4712 -49.8349);--color-blue-100:lab(92.0301% -2.24757 -11.6453);--color-blue-400:lab(65.0361% -1.42065 -56.9802);--color-blue-500:lab(54.1736% 13.3369 -74.6839);--color-blue-600:lab(44.0605% 29.0279 -86.0352);--color-indigo-500:lab(48.295% 38.3129 -81.9673);--color-indigo-600:lab(38.4009% 52.6132 -92.3857);--color-violet-100:lab(93.0838% 4.35197 -9.88284);--color-violet-500:lab(49.9355% 55.1776 -81.8963);--color-violet-600:lab(41.088% 68.9966 -91.995);--color-violet-700:lab(35.2783% 67.9912 -88.793);--color-purple-100:lab(93.3333% 6.97437 -9.83434);--color-purple-400:lab(63.6946% 47.6127 -59.2066);--color-purple-500:lab(52.0183% 66.11 -78.2316);--color-purple-600:lab(43.0295% 75.21 -86.5669);--color-fuchsia-500:lab(56.4256% 83.132 -64.639);--color-fuchsia-600:lab(47.5131% 83.4271 -63.0363);--color-rose-500:lab(56.101% 79.4328 31.4532);--color-rose-600:lab(49.1882% 81.577 36.0311);--color-gray-50:lab(98.2596% -.247031 -.706708);--color-gray-100:lab(96.1596% -.0823438 -1.13575);--color-gray-400:lab(65.9269% -.832707 -8.17473);--color-gray-500:lab(47.7841% -.393182 -10.0268);--color-gray-900:lab(8.11897% .811279 -12.254);--color-stone-500:lab(48.1164% 2.35701 4.26852);--color-stone-600:lab(35.5168% 1.08604 4.07829)}}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::-webkit-file-upload-button{margin-inline-end:4px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button{-webkit-appearance:button;appearance:button}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;bottom:0;left:0;right:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:0}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-10{top:calc(var(--spacing) * 10)}.top-\\[7px\\]{top:7px}.top-\\[9px\\]{top:9px}.top-\\[calc\\(100\\%-2px\\)\\]{top:calc(100% - 2px)}.top-full{top:100%}.-right-1{right:calc(var(--spacing) * -1)}.-right-1\\.5{right:calc(var(--spacing) * -1.5)}.right-0{right:0}.right-1{right:var(--spacing)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.-bottom-1{bottom:calc(var(--spacing) * -1)}.bottom-0{bottom:0}.bottom-0\\.5{bottom:calc(var(--spacing) * .5)}.bottom-1{bottom:var(--spacing)}.bottom-3{bottom:calc(var(--spacing) * 3)}.-left-1{left:calc(var(--spacing) * -1)}.-left-1\\.5{left:calc(var(--spacing) * -1.5)}.-left-px{left:-1px}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[1000\\]{z-index:1000}.z-\\[1001\\]{z-index:1001}.z-\\[1100\\]{z-index:1100}.z-\\[1200\\]{z-index:1200}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-m-1{margin:calc(var(--spacing) * -1)}.m-3{margin:calc(var(--spacing) * 3)}.m-4{margin:calc(var(--spacing) * 4)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline-start:auto;margin-inline-end:auto}.my-1{margin-block:var(--spacing)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.mr-0\\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:var(--spacing)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-1\\/2{height:50%}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-11{height:calc(var(--spacing) * 11)}.h-24{height:calc(var(--spacing) * 24)}.h-\\[300px\\]{height:300px}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[160px\\]{max-height:160px}.max-h-\\[200px\\]{max-height:200px}.max-h-\\[240px\\]{max-height:240px}.min-h-0{min-height:0}.min-h-\\[120px\\]{min-height:120px}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-1{width:var(--spacing)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-14{width:calc(var(--spacing) * 14)}.w-24{width:calc(var(--spacing) * 24)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[1\\%\\]{width:1%}.w-\\[80px\\]{width:80px}.w-\\[200px\\]{width:200px}.w-\\[480px\\]{width:480px}.w-\\[min\\(560px\\,92vw\\)\\]{width:min(560px,92vw)}.w-\\[min\\(700px\\,92vw\\)\\]{width:min(700px,92vw)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[10rem\\]{max-width:10rem}.max-w-\\[14rem\\]{max-width:14rem}.max-w-\\[16rem\\]{max-width:16rem}.max-w-\\[90vw\\]{max-width:90vw}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[420px\\]{max-width:420px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-\\[8px\\]{min-width:8px}.min-w-\\[16px\\]{min-width:16px}.min-w-\\[180px\\]{min-width:180px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.-rotate-90{rotate:-90deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-ns-resize{cursor:ns-resize}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-y{resize:vertical}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\\[80px_1fr\\]{grid-template-columns:80px 1fr}.grid-cols-\\[100px_1fr\\]{grid-template-columns:100px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-px{gap:1px}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:0;margin-block-end:0}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-line>:not(:last-child)){border-color:var(--color-line)}:where(.divide-line-subtle>:not(:last-child)){border-color:var(--color-line-subtle)}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.justify-self-start{justify-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[1px\\]{border-radius:1px}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent,.border-accent\\/30{border-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/30{border-color:color-mix(in oklab, var(--color-accent) 30%, transparent)}}.border-accent\\/40{border-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/40{border-color:color-mix(in oklab, var(--color-accent) 40%, transparent)}}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/20{border-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-blue-500\\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab, red, red)){.border-blue-500\\/30{border-color:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}.border-cyan-500\\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab, red, red)){.border-cyan-500\\/30{border-color:color-mix(in oklab, var(--color-cyan-500) 30%, transparent)}}.border-danger-border{border-color:var(--color-danger-border)}.border-danger\\/30{border-color:var(--color-danger)}@supports (color:color-mix(in lab, red, red)){.border-danger\\/30{border-color:color-mix(in oklab, var(--color-danger) 30%, transparent)}}.border-emerald-500\\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\\/30{border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.border-fuchsia-500\\/30{border-color:#e12afb4d}@supports (color:color-mix(in lab, red, red)){.border-fuchsia-500\\/30{border-color:color-mix(in oklab, var(--color-fuchsia-500) 30%, transparent)}}.border-green-500\\/30{border-color:#00c7584d}@supports (color:color-mix(in lab, red, red)){.border-green-500\\/30{border-color:color-mix(in oklab, var(--color-green-500) 30%, transparent)}}.border-indigo-500\\/30{border-color:#625fff4d}@supports (color:color-mix(in lab, red, red)){.border-indigo-500\\/30{border-color:color-mix(in oklab, var(--color-indigo-500) 30%, transparent)}}.border-line{border-color:var(--color-line)}.border-line-subtle{border-color:var(--color-line-subtle)}.border-line\\/50{border-color:var(--color-line)}@supports (color:color-mix(in lab, red, red)){.border-line\\/50{border-color:color-mix(in oklab, var(--color-line) 50%, transparent)}}.border-line\\/60{border-color:var(--color-line)}@supports (color:color-mix(in lab, red, red)){.border-line\\/60{border-color:color-mix(in oklab, var(--color-line) 60%, transparent)}}.border-orange-500\\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab, red, red)){.border-orange-500\\/30{border-color:color-mix(in oklab, var(--color-orange-500) 30%, transparent)}}.border-purple-500\\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab, red, red)){.border-purple-500\\/30{border-color:color-mix(in oklab, var(--color-purple-500) 30%, transparent)}}.border-red-500\\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab, red, red)){.border-red-500\\/30{border-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.border-stone-500\\/30{border-color:#79716b4d}@supports (color:color-mix(in lab, red, red)){.border-stone-500\\/30{border-color:color-mix(in oklab, var(--color-stone-500) 30%, transparent)}}.border-success-border{border-color:var(--color-success-border)}.border-violet-500\\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab, red, red)){.border-violet-500\\/30{border-color:color-mix(in oklab, var(--color-violet-500) 30%, transparent)}}.border-warning-border{border-color:var(--color-warning-border)}.border-white{border-color:var(--color-white)}.border-l-warning{border-left-color:var(--color-warning)}.\\!bg-accent{background-color:var(--color-accent)!important}.bg-accent,.bg-accent\\/5{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/5{background-color:color-mix(in oklab, var(--color-accent) 5%, transparent)}}.bg-accent\\/10{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/10{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.bg-accent\\/12{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/12{background-color:color-mix(in oklab, var(--color-accent) 12%, transparent)}}.bg-accent\\/15{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/15{background-color:color-mix(in oklab, var(--color-accent) 15%, transparent)}}.bg-accent\\/70{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/70{background-color:color-mix(in oklab, var(--color-accent) 70%, transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-amber-500\\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab, red, red)){.bg-black\\/55{background-color:color-mix(in oklab, var(--color-black) 55%, transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\\/10{background-color:color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\\/15{background-color:color-mix(in oklab, var(--color-blue-500) 15%, transparent)}}.bg-code{background-color:var(--color-code)}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-cyan-500\\/15{background-color:#00b7d726}@supports (color:color-mix(in lab, red, red)){.bg-cyan-500\\/15{background-color:color-mix(in oklab, var(--color-cyan-500) 15%, transparent)}}.bg-danger{background-color:var(--color-danger)}.bg-danger-bg,.bg-danger-bg\\/40{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.bg-danger-bg\\/40{background-color:color-mix(in oklab, var(--color-danger-bg) 40%, transparent)}}.bg-danger\\/5{background-color:var(--color-danger)}@supports (color:color-mix(in lab, red, red)){.bg-danger\\/5{background-color:color-mix(in oklab, var(--color-danger) 5%, transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-emerald-500\\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-fg-subtle{background-color:var(--color-fg-subtle)}.bg-fuchsia-500\\/15{background-color:#e12afb26}@supports (color:color-mix(in lab, red, red)){.bg-fuchsia-500\\/15{background-color:color-mix(in oklab, var(--color-fuchsia-500) 15%, transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\\/15{background-color:#00c75826}@supports (color:color-mix(in lab, red, red)){.bg-green-500\\/15{background-color:color-mix(in oklab, var(--color-green-500) 15%, transparent)}}.bg-hover{background-color:var(--color-hover)}.bg-indigo-500\\/15{background-color:#625fff26}@supports (color:color-mix(in lab, red, red)){.bg-indigo-500\\/15{background-color:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.bg-line{background-color:var(--color-line)}.bg-line-subtle{background-color:var(--color-line-subtle)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\\/15{background-color:#fe6e0026}@supports (color:color-mix(in lab, red, red)){.bg-orange-500\\/15{background-color:color-mix(in oklab, var(--color-orange-500) 15%, transparent)}}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab, red, red)){.bg-purple-500\\/15{background-color:color-mix(in oklab, var(--color-purple-500) 15%, transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab, red, red)){.bg-red-500\\/15{background-color:color-mix(in oklab, var(--color-red-500) 15%, transparent)}}.bg-rose-500{background-color:var(--color-rose-500)}.bg-selected{background-color:var(--color-selected)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-stone-500\\/15{background-color:#79716b26}@supports (color:color-mix(in lab, red, red)){.bg-stone-500\\/15{background-color:color-mix(in oklab, var(--color-stone-500) 15%, transparent)}}.bg-subtle,.bg-subtle\\/40{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/40{background-color:color-mix(in oklab, var(--color-subtle) 40%, transparent)}}.bg-subtle\\/50{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/50{background-color:color-mix(in oklab, var(--color-subtle) 50%, transparent)}}.bg-subtle\\/60{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/60{background-color:color-mix(in oklab, var(--color-subtle) 60%, transparent)}}.bg-success{background-color:var(--color-success)}.bg-success-bg{background-color:var(--color-success-bg)}.bg-surface{background-color:var(--color-surface)}.bg-teal-500{background-color:var(--color-teal-500)}.bg-transparent{background-color:#0000}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\\/10{background-color:color-mix(in oklab, var(--color-violet-500) 10%, transparent)}}.bg-violet-500\\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\\/15{background-color:color-mix(in oklab, var(--color-violet-500) 15%, transparent)}}.bg-warning{background-color:var(--color-warning)}.bg-warning-bg{background-color:var(--color-warning-bg)}.bg-warning\\/5{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/5{background-color:color-mix(in oklab, var(--color-warning) 5%, transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.fill-\\[var\\(--color-fg-subtle\\)\\]{fill:var(--color-fg-subtle)}.fill-amber-500\\/15{fill:#f99c0026}@supports (color:color-mix(in lab, red, red)){.fill-amber-500\\/15{fill:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.fill-amber-600{fill:var(--color-amber-600)}.fill-blue-500\\/15{fill:#3080ff26}@supports (color:color-mix(in lab, red, red)){.fill-blue-500\\/15{fill:color-mix(in oklab, var(--color-blue-500) 15%, transparent)}}.fill-blue-600{fill:var(--color-blue-600)}.fill-danger{fill:var(--color-danger)}.fill-emerald-500\\/15{fill:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.fill-emerald-500\\/15{fill:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.fill-emerald-600{fill:var(--color-emerald-600)}.fill-fg-muted{fill:var(--color-fg-muted)}.fill-fg-subtle{fill:var(--color-fg-subtle)}.fill-red-500{fill:var(--color-red-500)}.fill-rose-500\\/15{fill:#ff235726}@supports (color:color-mix(in lab, red, red)){.fill-rose-500\\/15{fill:color-mix(in oklab, var(--color-rose-500) 15%, transparent)}}.fill-rose-600{fill:var(--color-rose-600)}.fill-sky-500\\/15{fill:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.fill-sky-500\\/15{fill:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.fill-sky-600{fill:var(--color-sky-600)}.fill-teal-500\\/15{fill:#00baa726}@supports (color:color-mix(in lab, red, red)){.fill-teal-500\\/15{fill:color-mix(in oklab, var(--color-teal-500) 15%, transparent)}}.fill-teal-600{fill:var(--color-teal-600)}.fill-violet-500\\/15{fill:#8d54ff26}@supports (color:color-mix(in lab, red, red)){.fill-violet-500\\/15{fill:color-mix(in oklab, var(--color-violet-500) 15%, transparent)}}.fill-violet-600{fill:var(--color-violet-600)}.fill-warning{fill:var(--color-warning)}.fill-white{fill:var(--color-white)}.stroke-accent{stroke:var(--color-accent)}.stroke-amber-500\\/60{stroke:#f99c0099}@supports (color:color-mix(in lab, red, red)){.stroke-amber-500\\/60{stroke:color-mix(in oklab, var(--color-amber-500) 60%, transparent)}}.stroke-blue-500\\/60{stroke:#3080ff99}@supports (color:color-mix(in lab, red, red)){.stroke-blue-500\\/60{stroke:color-mix(in oklab, var(--color-blue-500) 60%, transparent)}}.stroke-emerald-500\\/60{stroke:#00bb7f99}@supports (color:color-mix(in lab, red, red)){.stroke-emerald-500\\/60{stroke:color-mix(in oklab, var(--color-emerald-500) 60%, transparent)}}.stroke-fg-subtle{stroke:var(--color-fg-subtle)}.stroke-red-500{stroke:var(--color-red-500)}.stroke-rose-500\\/60{stroke:#ff235799}@supports (color:color-mix(in lab, red, red)){.stroke-rose-500\\/60{stroke:color-mix(in oklab, var(--color-rose-500) 60%, transparent)}}.stroke-sky-500\\/60{stroke:#00a5ef99}@supports (color:color-mix(in lab, red, red)){.stroke-sky-500\\/60{stroke:color-mix(in oklab, var(--color-sky-500) 60%, transparent)}}.stroke-teal-500\\/60{stroke:#00baa799}@supports (color:color-mix(in lab, red, red)){.stroke-teal-500\\/60{stroke:color-mix(in oklab, var(--color-teal-500) 60%, transparent)}}.stroke-violet-500\\/60{stroke:#8d54ff99}@supports (color:color-mix(in lab, red, red)){.stroke-violet-500\\/60{stroke:color-mix(in oklab, var(--color-violet-500) 60%, transparent)}}.stroke-\\[2\\.5px\\]{stroke-width:2.5px}.p-0{padding:0}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-px{padding-block-start:1px;padding-block-end:1px}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-7{padding-right:calc(var(--spacing) * 7)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-0\\.5{padding-left:calc(var(--spacing) * .5)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent,.text-accent\\/80{color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.text-accent\\/80{color:color-mix(in oklab, var(--color-accent) 80%, transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-cyan-500{color:var(--color-cyan-500)}.text-cyan-600{color:var(--color-cyan-600)}.text-danger{color:var(--color-danger)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-fg{color:var(--color-fg)}.text-fg-muted,.text-fg-muted\\/70{color:var(--color-fg-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\\/70{color:color-mix(in oklab, var(--color-fg-muted) 70%, transparent)}}.text-fg-muted\\/80{color:var(--color-fg-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\\/80{color:color-mix(in oklab, var(--color-fg-muted) 80%, transparent)}}.text-fg-subtle,.text-fg-subtle\\/60{color:var(--color-fg-subtle)}@supports (color:color-mix(in lab, red, red)){.text-fg-subtle\\/60{color:color-mix(in oklab, var(--color-fg-subtle) 60%, transparent)}}.text-fuchsia-500{color:var(--color-fuchsia-500)}.text-fuchsia-600{color:var(--color-fuchsia-600)}.text-gray-50{color:var(--color-gray-50)}.text-gray-100{color:var(--color-gray-100)}.text-gray-500{color:var(--color-gray-500)}.text-gray-900{color:var(--color-gray-900)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-line{color:var(--color-line)}.text-line-subtle{color:var(--color-line-subtle)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-stone-600{color:var(--color-stone-600)}.text-success{color:var(--color-success)}.text-surface{color:var(--color-surface)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-violet-600\\/70{color:#7f22feb3}@supports (color:color-mix(in lab, red, red)){.text-violet-600\\/70{color:color-mix(in oklab, var(--color-violet-600) 70%, transparent)}}.text-violet-700{color:var(--color-violet-700)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_0_\\#d4d4d8\\]{--tw-shadow:0 1px 0 var(--tw-shadow-color,#d4d4d8);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-accent,.ring-accent\\/20{--tw-ring-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.ring-accent\\/20{--tw-ring-color:color-mix(in oklab, var(--color-accent) 20%, transparent)}}.ring-danger{--tw-ring-color:var(--color-danger)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.row-virtual{content-visibility:auto;contain-intrinsic-size:auto 32px}.select-none{-webkit-user-select:none;user-select:none}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.group-hover\\:bg-accent:is(:where(.group):hover *){background-color:var(--color-accent)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\/stat\\:underline:is(:where(.group\\/stat):hover *){text-decoration-line:underline}}.group-focus-visible\\:bg-accent:is(:where(.group):focus-visible *){background-color:var(--color-accent)}.last\\:mr-0:last-child{margin-right:0}.last\\:mb-0:last-child{margin-bottom:0}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-danger-border:hover{border-color:var(--color-danger-border)}.hover\\:bg-accent:hover,.hover\\:bg-accent\\/5:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/5:hover{background-color:color-mix(in oklab, var(--color-accent) 5%, transparent)}}.hover\\:bg-accent\\/10:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/10:hover{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.hover\\:bg-accent\\/15:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/15:hover{background-color:color-mix(in oklab, var(--color-accent) 15%, transparent)}}.hover\\:bg-accent\\/20:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/20:hover{background-color:color-mix(in oklab, var(--color-accent) 20%, transparent)}}.hover\\:bg-accent\\/90:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/90:hover{background-color:color-mix(in oklab, var(--color-accent) 90%, transparent)}}.hover\\:bg-blue-400:hover{background-color:var(--color-blue-400)}.hover\\:bg-danger-bg:hover,.hover\\:bg-danger-bg\\/60:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/60:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 60%, transparent)}}.hover\\:bg-danger-bg\\/70:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/70:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 70%, transparent)}}.hover\\:bg-danger-bg\\/80:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/80:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 80%, transparent)}}.hover\\:bg-emerald-500\\/25:hover{background-color:#00bb7f40}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-emerald-500\\/25:hover{background-color:color-mix(in oklab, var(--color-emerald-500) 25%, transparent)}}.hover\\:bg-gray-400:hover{background-color:var(--color-gray-400)}.hover\\:bg-green-400:hover{background-color:var(--color-green-400)}.hover\\:bg-hover:hover,.hover\\:bg-hover\\/50:hover{background-color:var(--color-hover)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-hover\\/50:hover{background-color:color-mix(in oklab, var(--color-hover) 50%, transparent)}}.hover\\:bg-orange-400:hover{background-color:var(--color-orange-400)}.hover\\:bg-purple-400:hover{background-color:var(--color-purple-400)}.hover\\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab, var(--color-red-500) 25%, transparent)}}.hover\\:bg-subtle:hover{background-color:var(--color-subtle)}.hover\\:bg-violet-500\\/25:hover{background-color:#8d54ff40}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-violet-500\\/25:hover{background-color:color-mix(in oklab, var(--color-violet-500) 25%, transparent)}}.hover\\:bg-warning-bg:hover,.hover\\:bg-warning-bg\\/80:hover{background-color:var(--color-warning-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-warning-bg\\/80:hover{background-color:color-mix(in oklab, var(--color-warning-bg) 80%, transparent)}}.hover\\:text-accent:hover{color:var(--color-accent)}.hover\\:text-danger:hover{color:var(--color-danger)}.hover\\:text-fg:hover{color:var(--color-fg)}.hover\\:text-fg-muted:hover{color:var(--color-fg-muted)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus\\:border-accent:focus{border-color:var(--color-accent)}.focus\\:border-line:focus{border-color:var(--color-line)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-accent:focus{--tw-ring-color:var(--color-accent)}.focus\\:ring-danger:focus{--tw-ring-color:var(--color-danger)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:bg-hover:focus-visible{background-color:var(--color-hover)}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-accent:focus-visible{--tw-ring-color:var(--color-accent)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-accent:focus-visible{outline-color:var(--color-accent)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}@media (hover:hover){.disabled\\:hover\\:bg-transparent:disabled:hover{background-color:#0000}}@media (min-width:40rem){.sm\\:inline{display:inline}.sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width:48rem){.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (width>=28rem){.\\@md\\:block{display:block}.\\@md\\:flex{display:flex}.\\@md\\:hidden{display:none}.\\@md\\:w-72{width:calc(var(--spacing) * 72)}.\\@md\\:shrink-0{flex-shrink:0}.\\@md\\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}}}*{box-sizing:border-box}:host,:root{--at-surface:#fcfdfe;--at-surface-hover:#f5f6f9;--at-muted:#f2f5f8;--at-code:#f3f6fa;--at-text-primary:#1a1f29;--at-text-secondary:#515864;--at-text-muted:#868d97;--at-border:#dfe1e5;--at-border-light:#eef0f3;--at-shadow:#171f2e1a;--at-accent:#3177dc;--at-error-bg:#ffecea;--at-error-text:#cc2827;--at-error-border:#f8a49d;--at-ok-bg:#e0fae4;--at-ok-text:#0e8c41;--at-ok-border:#89da9b;--at-warn-bg:#fff0d1;--at-warn-text:#a16500;--at-warn-border:#e5c379;--at-highlight-bg:#fff6d1;--at-selected-bg:#e9f3ff;--at-scrollbar-thumb:#ced1d6;--at-scrollbar-thumb-hover:#999fa8}@supports (color:color(display-p3 0 0 0)){:host,:root{--at-surface:color(display-p3 .989609 .992382 .997175);--at-surface-hover:color(display-p3 .960878 .966392 .975929);--at-muted:color(display-p3 .951795 .958673 .970576);--at-code:color(display-p3 .955784 .964045 .978342);--at-text-primary:color(display-p3 .106201 .12247 .157281);--at-text-secondary:color(display-p3 .323937 .346032 .388256);--at-text-muted:color(display-p3 .528711 .550898 .589512);--at-border:color(display-p3 .875378 .883503 .897566);--at-border-light:color(display-p3 .934839 .941694 .953557);--at-shadow:color(display-p3 .0979137 .121845 .174352/.1);--at-accent:color(display-p3 .266557 .461859 .837181);--at-error-bg:color(display-p3 1.00853 .923821 .911661);--at-error-text:color(display-p3 .7372 .221951 .191652);--at-error-border:color(display-p3 .924106 .659231 .626897);--at-ok-bg:color(display-p3 .896905 .977035 .900254);--at-ok-text:color(display-p3 .247857 .539374 .286752);--at-ok-border:color(display-p3 .609805 .847347 .627399);--at-warn-bg:color(display-p3 .997819 .943515 .816698);--at-warn-text:color(display-p3 .607081 .403503 .0845266);--at-warn-border:color(display-p3 .876737 .768181 .515098);--at-highlight-bg:color(display-p3 .994932 .96424 .830533);--at-selected-bg:color(display-p3 .910207 .951093 1.02232);--at-scrollbar-thumb:color(display-p3 .80912 .819793 .838278);--at-scrollbar-thumb-hover:color(display-p3 .60332 .622263 .655172)}}@supports (color:lab(0% 0 0)){:host,:root{--at-surface:lab(99.2988% -.132054 -.745118);--at-surface-hover:lab(96.9735% -.261605 -1.48877);--at-muted:lab(96.2747% -.325292 -1.86008);--at-code:lab(96.736% -.388592 -2.23104);--at-text-primary:lab(11.741% -.349499 -7.30943);--at-text-secondary:lab(37.2801% -.862852 -7.73156);--at-text-muted:lab(58.1854% -1.04666 -6.62941);--at-border:lab(89.5439% -.387847 -2.23061);--at-border-light:lab(94.7667% -.325233 -1.86);--at-shadow:lab(11.6682% -.113927 -10.842/.1);--at-accent:lab(49.8997% 5.63273 -59.1615);--at-error-bg:lab(95.0829% 9.19622 4.96011);--at-error-text:lab(45.8049% 62.9533 44.1);--at-error-border:lab(75.8489% 31.0226 17.1029);--at-ok-bg:lab(95.8936% -11.84 7.56052);--at-ok-text:lab(50.824% -45.5785 30.3918);--at-ok-border:lab(80.6679% -35.8792 23.2774);--at-warn-bg:lab(95.5261% 2.02972 19.535);--at-warn-text:lab(48.6413% 21.7782 63.415);--at-warn-border:lab(80.5062% 5.88706 41.41);--at-highlight-bg:lab(96.7959% -.972748 19.4827);--at-selected-bg:lab(95.2674% -1.71572 -11.035);--at-scrollbar-thumb:lab(83.7382% -.510752 -2.97043);--at-scrollbar-thumb-hover:lab(65.1562% -.902712 -5.53997)}}:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:#151b25;--at-surface-hover:#1d2431;--at-muted:#191f2b;--at-code:#1b222d;--at-text-primary:#dfe5ed;--at-text-secondary:#9ca5b3;--at-text-muted:#727b88;--at-border:#2e3643;--at-border-light:#232934;--at-shadow:#00000073;--at-accent:#63a6ff;--at-error-bg:#742e2940;--at-error-text:#ff7f73;--at-error-border:#cf413a;--at-ok-bg:#39794933;--at-ok-text:#6ed889;--at-ok-border:#2e9e52;--at-warn-bg:#7e5d1d38;--at-warn-text:#f1bf5b;--at-warn-border:#b07b00;--at-highlight-bg:#b8a4571f;--at-selected-bg:#6087c22e;--at-scrollbar-thumb:#3d434d;--at-scrollbar-thumb-hover:#565e6c}@supports (color:color(display-p3 0 0 0)){:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:color(display-p3 .0866362 .104012 .141551);--at-surface-hover:color(display-p3 .119527 .140938 .187194);--at-muted:color(display-p3 .10291 .122282 .164135);--at-code:color(display-p3 .112011 .131618 .173879);--at-text-primary:color(display-p3 .880198 .897517 .925177);--at-text-secondary:color(display-p3 .618009 .647763 .695453);--at-text-muted:color(display-p3 .454817 .481202 .527256);--at-border:color(display-p3 .187231 .209329 .256415);--at-border-light:color(display-p3 .14159 .16023 .200008);--at-shadow:color(display-p3 0 0 0/.45);--at-accent:color(display-p3 .445537 .644287 .978823);--at-error-bg:color(display-p3 .422373 .197971 .171651/.25);--at-error-text:color(display-p3 .938127 .52257 .468553);--at-error-border:color(display-p3 .751519 .297873 .256966);--at-ok-bg:color(display-p3 .287508 .467968 .304198/.2);--at-ok-text:color(display-p3 .538207 .838899 .565385);--at-ok-border:color(display-p3 .319936 .612208 .354223);--at-warn-bg:color(display-p3 .474062 .369044 .161788/.22);--at-warn-text:color(display-p3 .915105 .755059 .421563);--at-warn-border:color(display-p3 .660566 .489104 .15495);--at-highlight-bg:color(display-p3 .708898 .646062 .385093/.12);--at-selected-bg:color(display-p3 .407909 .526271 .742584/.18);--at-scrollbar-thumb:color(display-p3 .241934 .260441 .299404);--at-scrollbar-thumb-hover:color(display-p3 .342885 .367416 .419047)}}@supports (color:lab(0% 0 0)){:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:lab(9.40435% -.26536 -8.00193);--at-surface-hover:lab(14.0233% -.313595 -9.45683);--at-muted:lab(11.7138% -.289485 -8.72938);--at-code:lab(12.8756% -.320837 -8.73908);--at-text-primary:lab(90.6923% -.891328 -4.41389);--at-text-secondary:lab(67.4629% -1.51783 -8.03232);--at-text-muted:lab(51.2096% -1.21292 -8.07107);--at-border:lab(22.1597% -.497714 -9.15806);--at-border-light:lab(16.373% -.418156 -8.05204);--at-shadow:lab(0% 0 0/.45);--at-accent:lab(66.6499% -1.4444 -52.3046);--at-error-bg:lab(29.4384% 31.1218 19.7271/.25);--at-error-text:lab(68.3188% 49.5998 30.86);--at-error-border:lab(49.5145% 56.3761 37.3383);--at-ok-bg:lab(45.5916% -30.0637 19.6786/.2);--at-ok-text:lab(78.7102% -45.0683 29.4705);--at-ok-border:lab(57.7987% -45.4011 30.0617);--at-warn-bg:lab(42.0282% 9.23485 40.2236/.22);--at-warn-text:lab(80.4197% 11.1201 56.0991);--at-warn-border:lab(55.853% 15.6735 62.0226);--at-highlight-bg:lab(67.9375% .259876 42.1122/.12);--at-selected-bg:lab(55.3782% -1.45972 -35.4324/.18);--at-scrollbar-thumb:lab(27.992% -.544697 -7.38333);--at-scrollbar-thumb-hover:lab(39.5702% -.685155 -9.23098)}}@media (prefers-color-scheme:dark){:host([data-theme=system]),:root[data-theme=system]{--at-surface:#151b25;--at-surface-hover:#1d2431;--at-muted:#191f2b;--at-code:#1b222d;--at-text-primary:#dfe5ed;--at-text-secondary:#9ca5b3;--at-text-muted:#727b88;--at-border:#2e3643;--at-border-light:#232934;--at-shadow:#00000073;--at-accent:#63a6ff;--at-error-bg:#742e2940;--at-error-text:#ff7f73;--at-error-border:#cf413a;--at-ok-bg:#39794933;--at-ok-text:#6ed889;--at-ok-border:#2e9e52;--at-highlight-bg:#b8a4571f;--at-selected-bg:#6087c22e;--at-scrollbar-thumb:#3d434d;--at-scrollbar-thumb-hover:#565e6c}@supports (color:color(display-p3 0 0 0)){:host([data-theme=system]),:root[data-theme=system]{--at-surface:color(display-p3 .0866362 .104012 .141551);--at-surface-hover:color(display-p3 .119527 .140938 .187194);--at-muted:color(display-p3 .10291 .122282 .164135);--at-code:color(display-p3 .112011 .131618 .173879);--at-text-primary:color(display-p3 .880198 .897517 .925177);--at-text-secondary:color(display-p3 .618009 .647763 .695453);--at-text-muted:color(display-p3 .454817 .481202 .527256);--at-border:color(display-p3 .187231 .209329 .256415);--at-border-light:color(display-p3 .14159 .16023 .200008);--at-shadow:color(display-p3 0 0 0/.45);--at-accent:color(display-p3 .445537 .644287 .978823);--at-error-bg:color(display-p3 .422373 .197971 .171651/.25);--at-error-text:color(display-p3 .938127 .52257 .468553);--at-error-border:color(display-p3 .751519 .297873 .256966);--at-ok-bg:color(display-p3 .287508 .467968 .304198/.2);--at-ok-text:color(display-p3 .538207 .838899 .565385);--at-ok-border:color(display-p3 .319936 .612208 .354223);--at-highlight-bg:color(display-p3 .708898 .646062 .385093/.12);--at-selected-bg:color(display-p3 .407909 .526271 .742584/.18);--at-scrollbar-thumb:color(display-p3 .241934 .260441 .299404);--at-scrollbar-thumb-hover:color(display-p3 .342885 .367416 .419047)}}@supports (color:lab(0% 0 0)){:host([data-theme=system]),:root[data-theme=system]{--at-surface:lab(9.40435% -.26536 -8.00193);--at-surface-hover:lab(14.0233% -.313595 -9.45683);--at-muted:lab(11.7138% -.289485 -8.72938);--at-code:lab(12.8756% -.320837 -8.73908);--at-text-primary:lab(90.6923% -.891328 -4.41389);--at-text-secondary:lab(67.4629% -1.51783 -8.03232);--at-text-muted:lab(51.2096% -1.21292 -8.07107);--at-border:lab(22.1597% -.497714 -9.15806);--at-border-light:lab(16.373% -.418156 -8.05204);--at-shadow:lab(0% 0 0/.45);--at-accent:lab(66.6499% -1.4444 -52.3046);--at-error-bg:lab(29.4384% 31.1218 19.7271/.25);--at-error-text:lab(68.3188% 49.5998 30.86);--at-error-border:lab(49.5145% 56.3761 37.3383);--at-ok-bg:lab(45.5916% -30.0637 19.6786/.2);--at-ok-text:lab(78.7102% -45.0683 29.4705);--at-ok-border:lab(57.7987% -45.4011 30.0617);--at-highlight-bg:lab(67.9375% .259876 42.1122/.12);--at-selected-bg:lab(55.3782% -1.45972 -35.4324/.18);--at-scrollbar-thumb:lab(27.992% -.544697 -7.38333);--at-scrollbar-thumb-hover:lab(39.5702% -.685155 -9.23098)}}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--at-scrollbar-thumb,#d4d4d8);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--at-scrollbar-thumb-hover,#a1a1aa)}.waterfall-row:hover .waterfall-bar{filter:brightness(1.1)}.waterfall-bar{transition:all .15s ease-out}.trace-list-container{container-type:inline-size}.trace-grid{grid-template-columns:20px 104px minmax(0,1fr) 84px 52px 88px 60px 16px;align-items:center;gap:.75rem;display:grid}@container (width<=640px){.trace-grid{grid-template-columns:20px 92px minmax(0,1fr) 80px 58px 16px}.trace-col-spans,.trace-col-time{display:none}}@keyframes at-modal-in{0%{opacity:0;transform:translateY(6px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes at-fade-in{0%{opacity:0}to{opacity:1}}.at-modal-in{animation:.17s cubic-bezier(.22,1,.36,1) at-modal-in}.at-backdrop-in{animation:.17s ease-out at-fade-in}.at-wrap-anywhere{overflow-wrap:anywhere;word-break:normal}.at-no-scrollbar{scrollbar-width:none}.at-no-scrollbar::-webkit-scrollbar{display:none}@media (prefers-reduced-motion:reduce){.at-modal-in,.at-backdrop-in{animation:none}}.at-edge-label{paint-order:stroke;stroke:var(--color-surface);stroke-width:3px;stroke-linejoin:round}:where(a,button,[role=button],input,select,textarea,summary,[tabindex]:not([tabindex="-1"])):focus-visible{outline:2px solid var(--at-accent);outline-offset:2px}:where([data-focus-inset]):focus-visible{outline-offset:-2px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}`,TH=class extends HTMLElement{constructor(...e){super(...e),x(this,`cleanup`,null)}connectedCallback(){let e=this.attachShadow({mode:`open`}),t=document.createElement(`link`);t.rel=`stylesheet`,t.href=`https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap`,e.appendChild(t);let n=document.createElement(`style`);n.textContent=wH,e.appendChild(n);let r=this.getAttribute(`mode`)||`widget`,i=this.getAttribute(`ws-url`)||this.deriveWsUrl();this.cleanup=CH(e,{mode:r,wsUrl:i})}disconnectedCallback(){this.cleanup?.(),this.cleanup=null}deriveWsUrl(){return`ws://${location.host}/ws`}};x(TH,`observedAttributes`,[`mode`,`ws-url`]);function EH(){customElements.get(`autotel-devtools`)||customElements.define(`autotel-devtools`,TH)}var DH=document.currentScript;function OH(){let e=$u(location.hash);return Object.keys(e).length>0?e:void 0}function kH(){let e=OH();if(!DH?.src)return{mode:`widget`,wsUrl:`ws://${location.host}/ws`,deepLink:e};let t=new URL(DH.src),n=t.searchParams;return{mode:n.get(`mode`)||`widget`,wsUrl:n.get(`ws`)||`ws://${t.host}/ws`,deepLink:e}}function AH(){if(EH(),document.querySelector(`autotel-devtools`))return;let{mode:e,wsUrl:t,deepLink:n}=kH(),r=document.createElement(`div`);r.id=`autotel-devtools-root`,document.body.appendChild(r);let i=r.attachShadow({mode:`open`}),a=document.createElement(`style`);a.textContent=wH,i.appendChild(a),CH(i,{mode:e,wsUrl:t,deepLink:n})}return document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,AH):AH(),e.mountWidget=CH,e.registerElement=EH,e})({});
|