@qiaolei81/copilot-session-viewer 0.3.8 → 0.4.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.
@@ -0,0 +1,77 @@
1
+ (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>x(e).slice(8,-1),C=e=>x(e)===`[object Object]`,w=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,T=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),ee=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},te=/-\w/g,E=ee(e=>e.replace(te,e=>e.slice(1).toUpperCase())),ne=/\B([A-Z])/g,D=ee(e=>e.replace(ne,`-$1`).toLowerCase()),re=ee(e=>e.charAt(0).toUpperCase()+e.slice(1)),O=ee(e=>e?`on${re(e)}`:``),k=(e,t)=>!Object.is(e,t),ie=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},A=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ae=e=>{let t=parseFloat(e);return isNaN(t)?e:t},oe,se=()=>oe||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function j(e){if(d(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=g(r)?le(r):j(r);if(i)for(let e in i)t[e]=i[e]}return t}else if(g(e)||v(e))return e}var M=/;(?![^(]*\))/g,ce=/:([^]+)/,N=/\/\*[^]*?\*\//g;function le(e){let t={};return e.replace(N,``).split(M).forEach(e=>{if(e){let n=e.split(ce);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function P(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;n<e.length;n++){let r=P(e[n]);r&&(t+=r+` `)}else if(v(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}function ue(e){if(!e)return null;let{class:t,style:n}=e;return t&&!g(t)&&(e.class=P(t)),n&&(e.style=j(n)),e}var de=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,fe=e(de);de+``;function pe(e){return!!e||e===``}function me(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=he(e[r],t[r]);return n}function he(e,t){if(e===t)return!0;let n=m(e),r=m(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=_(e),r=_(t),n||r)return e===t;if(n=d(e),r=d(t),n||r)return n&&r?me(e,t):!1;if(n=v(e),r=v(t),n||r){if(!n||!r||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let r=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(r&&!i||!r&&i||!he(e[n],t[n]))return!1}}return String(e)===String(t)}var ge=e=>!!(e&&e.__v_isRef===!0),F=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?ge(e)?F(e.value):JSON.stringify(e,_e,2):String(e),_e=(e,t)=>ge(t)?_e(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[ve(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>ve(e))}:_(t)?ve(t):v(t)&&!d(t)&&!C(t)?String(t):t,ve=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,I,ye=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&I&&(I.active?(this.parent=I,this.index=(I.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=I;try{return I=this,e()}finally{I=t}}}on(){++this._on===1&&(this.prevScope=I,I=this)}off(){if(this._on>0&&--this._on===0){if(I===this)I=this.prevScope;else{let e=I;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function be(e){return new ye(e)}function xe(){return I}function Se(e,t=!1){I&&I.cleanups.push(e)}var L,Ce=new WeakSet,we=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,I&&(I.active?I.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ce.has(this)&&(Ce.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Oe(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ve(this),je(this);let e=L,t=Le;L=this,Le=!0;try{return this.fn()}finally{Me(this),L=e,Le=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Fe(e);this.deps=this.depsTail=void 0,Ve(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ce.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ne(this)&&this.run()}get dirty(){return Ne(this)}},Te=0,Ee,De;function Oe(e,t=!1){if(e.flags|=8,t){e.next=De,De=e;return}e.next=Ee,Ee=e}function ke(){Te++}function Ae(){if(--Te>0)return;if(De){let e=De;for(De=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ee;){let t=Ee;for(Ee=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function je(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Me(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Fe(r),Ie(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ne(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Pe(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Pe(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===He)||(e.globalVersion=He,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ne(e))))return;e.flags|=2;let t=e.dep,n=L,r=Le;L=e,Le=!0;try{je(e);let n=e.fn(e._value);(t.version===0||k(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{L=n,Le=r,Me(e),e.flags&=-3}}function Fe(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Fe(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ie(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Le=!0,Re=[];function ze(){Re.push(Le),Le=!1}function Be(){let e=Re.pop();Le=e===void 0?!0:e}function Ve(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=L;L=void 0;try{t()}finally{L=e}}}var He=0,Ue=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},We=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!L||!Le||L===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==L)t=this.activeLink=new Ue(L,this),L.deps?(t.prevDep=L.depsTail,L.depsTail.nextDep=t,L.depsTail=t):L.deps=L.depsTail=t,Ge(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=L.depsTail,t.nextDep=void 0,L.depsTail.nextDep=t,L.depsTail=t,L.deps===t&&(L.deps=e)}return t}trigger(e){this.version++,He++,this.notify(e)}notify(e){ke();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ae()}}};function Ge(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Ge(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var R=new WeakMap,Ke=Symbol(``),qe=Symbol(``),Je=Symbol(``);function Ye(e,t,n){if(Le&&L){let t=R.get(e);t||R.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new We),r.map=t,r.key=n),r.track()}}function Xe(e,t,n,r,i,a){let o=R.get(e);if(!o){He++;return}let s=e=>{e&&e.trigger()};if(ke(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&w(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===Je||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Je)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Ke)),f(e)&&s(o.get(qe)));break;case`delete`:i||(s(o.get(Ke)),f(e)&&s(o.get(qe)));break;case`set`:f(e)&&s(o.get(Ke));break}}Ae()}function Ze(e,t){let n=R.get(e);return n&&n.get(t)}function Qe(e){let t=z(e);return t===e?t:(Ye(t,`iterate`,Je),Rt(e)?t:t.map(Vt))}function $e(e){return Ye(e=z(e),`iterate`,Je),e}function et(e,t){return Lt(e)?Ht(It(e)?Vt(t):t):Vt(t)}var tt={__proto__:null,[Symbol.iterator](){return nt(this,Symbol.iterator,e=>et(this,e))},concat(...e){return Qe(this).concat(...e.map(e=>d(e)?Qe(e):e))},entries(){return nt(this,`entries`,e=>(e[1]=et(this,e[1]),e))},every(e,t){return it(this,`every`,e,t,void 0,arguments)},filter(e,t){return it(this,`filter`,e,t,e=>e.map(e=>et(this,e)),arguments)},find(e,t){return it(this,`find`,e,t,e=>et(this,e),arguments)},findIndex(e,t){return it(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return it(this,`findLast`,e,t,e=>et(this,e),arguments)},findLastIndex(e,t){return it(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return it(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ot(this,`includes`,e)},indexOf(...e){return ot(this,`indexOf`,e)},join(e){return Qe(this).join(e)},lastIndexOf(...e){return ot(this,`lastIndexOf`,e)},map(e,t){return it(this,`map`,e,t,void 0,arguments)},pop(){return st(this,`pop`)},push(...e){return st(this,`push`,e)},reduce(e,...t){return at(this,`reduce`,e,t)},reduceRight(e,...t){return at(this,`reduceRight`,e,t)},shift(){return st(this,`shift`)},some(e,t){return it(this,`some`,e,t,void 0,arguments)},splice(...e){return st(this,`splice`,e)},toReversed(){return Qe(this).toReversed()},toSorted(e){return Qe(this).toSorted(e)},toSpliced(...e){return Qe(this).toSpliced(...e)},unshift(...e){return st(this,`unshift`,e)},values(){return nt(this,`values`,e=>et(this,e))}};function nt(e,t,n){let r=$e(e),i=r[t]();return r!==e&&!Rt(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var rt=Array.prototype;function it(e,t,n,r,i,a){let o=$e(e),s=o!==e&&!Rt(e),c=o[t];if(c!==rt[t]){let t=c.apply(e,a);return s?Vt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,et(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function at(e,t,n,r){let i=$e(e),a=i!==e&&!Rt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=et(e,t)),n.call(this,t,et(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?et(e,c):c}function ot(e,t,n){let r=z(e);Ye(r,`iterate`,Je);let i=r[t](...n);return(i===-1||i===!1)&&zt(n[0])?(n[0]=z(n[0]),r[t](...n)):i}function st(e,t,n=[]){ze(),ke();let r=z(e)[t].apply(e,n);return Ae(),Be(),r}var ct=e(`__proto__,__v_isRef,__isVue`),lt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function ut(e){_(e)||(e=String(e));let t=z(this);return Ye(t,`has`,e),t.hasOwnProperty(e)}var dt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?kt:Ot:i?Dt:Et).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=tt[t]))return e;if(t===`hasOwnProperty`)return ut}let o=Reflect.get(e,t,Ut(e)?e:n);if((_(t)?lt.has(t):ct(t))||(r||Ye(e,`get`,t),i))return o;if(Ut(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Pt(e):e}return v(o)?r?Pt(o):Mt(o):o}},ft=class extends dt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&w(t);if(!this._isShallow){let e=Lt(i);if(!Rt(n)&&!Lt(n)&&(i=z(i),n=z(n)),!a&&Ut(i)&&!Ut(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:u(e,t),s=Reflect.set(e,t,n,Ut(e)?e:r);return e===z(r)&&(o?k(n,i)&&Xe(e,`set`,t,n,i):Xe(e,`add`,t,n)),s}deleteProperty(e,t){let n=u(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&Xe(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!_(t)||!lt.has(t))&&Ye(e,`has`,t),n}ownKeys(e){return Ye(e,`iterate`,d(e)?`length`:Ke),Reflect.ownKeys(e)}},pt=class extends dt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},mt=new ft,ht=new pt,gt=new ft(!0),_t=e=>e,vt=e=>Reflect.getPrototypeOf(e);function yt(e,t,n){return function(...r){let i=this.__v_raw,a=z(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?_t:t?Ht:Vt;return!t&&Ye(a,`iterate`,l?qe:Ke),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function bt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function xt(e,t){let n={get(n){let r=this.__v_raw,i=z(r),a=z(n);e||(k(n,a)&&Ye(i,`get`,n),Ye(i,`get`,a));let{has:o}=vt(i),s=t?_t:e?Ht:Vt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&Ye(z(t),`iterate`,Ke),t.size},has(t){let n=this.__v_raw,r=z(n),i=z(t);return e||(k(t,i)&&Ye(r,`has`,t),Ye(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=z(a),s=t?_t:e?Ht:Vt;return!e&&Ye(o,`iterate`,Ke),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:bt(`add`),set:bt(`set`),delete:bt(`delete`),clear:bt(`clear`)}:{add(e){let n=z(this),r=vt(n),i=z(e),a=!t&&!Rt(e)&&!Lt(e)?i:e;return r.has.call(n,a)||k(e,a)&&r.has.call(n,e)||k(i,a)&&r.has.call(n,i)||(n.add(a),Xe(n,`add`,a,a)),this},set(e,n){!t&&!Rt(n)&&!Lt(n)&&(n=z(n));let r=z(this),{has:i,get:a}=vt(r),o=i.call(r,e);o||=(e=z(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?k(n,s)&&Xe(r,`set`,e,n,s):Xe(r,`add`,e,n),this},delete(e){let t=z(this),{has:n,get:r}=vt(t),i=n.call(t,e);i||=(e=z(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&Xe(t,`delete`,e,void 0,a),o},clear(){let e=z(this),t=e.size!==0,n=e.clear();return t&&Xe(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=yt(r,e,t)}),n}function St(e,t){let n=xt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(u(n,r)&&r in t?n:t,r,i)}var Ct={get:St(!1,!1)},wt={get:St(!1,!0)},Tt={get:St(!0,!1)},Et=new WeakMap,Dt=new WeakMap,Ot=new WeakMap,kt=new WeakMap;function At(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function jt(e){return e.__v_skip||!Object.isExtensible(e)?0:At(S(e))}function Mt(e){return Lt(e)?e:Ft(e,!1,mt,Ct,Et)}function Nt(e){return Ft(e,!1,gt,wt,Dt)}function Pt(e){return Ft(e,!0,ht,Tt,Ot)}function Ft(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=jt(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function It(e){return Lt(e)?It(e.__v_raw):!!(e&&e.__v_isReactive)}function Lt(e){return!!(e&&e.__v_isReadonly)}function Rt(e){return!!(e&&e.__v_isShallow)}function zt(e){return e?!!e.__v_raw:!1}function z(e){let t=e&&e.__v_raw;return t?z(t):e}function Bt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&A(e,`__v_skip`,!0),e}var Vt=e=>v(e)?Mt(e):e,Ht=e=>v(e)?Pt(e):e;function Ut(e){return e?e.__v_isRef===!0:!1}function B(e){return Gt(e,!1)}function Wt(e){return Gt(e,!0)}function Gt(e,t){return Ut(e)?e:new Kt(e,t)}var Kt=class{constructor(e,t){this.dep=new We,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:z(e),this._value=t?e:Vt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Rt(e)||Lt(e);e=n?e:z(e),k(e,t)&&(this._rawValue=e,this._value=n?e:Vt(e),this.dep.trigger())}};function V(e){return Ut(e)?e.value:e}var qt={get:(e,t,n)=>t===`__v_raw`?e:V(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return Ut(i)&&!Ut(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Jt(e){return It(e)?e:new Proxy(e,qt)}function Yt(e){let t=d(e)?Array(e.length):{};for(let n in e)t[n]=Zt(e,n);return t}var Xt=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=_(t)?t:String(t),this._raw=z(e);let r=!0,i=e;if(!d(e)||_(this._key)||!w(this._key))do r=!zt(i)||Rt(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=V(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&Ut(this._raw[this._key])){let t=this._object[this._key];if(Ut(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Ze(this._raw,this._key)}};function Zt(e,t,n){return new Xt(e,t,n)}var Qt=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new We(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=He-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&L!==this)return Oe(this,!0),!0}get value(){let e=this.dep.track();return Pe(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function $t(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new Qt(r,i,n)}var en={},tn=new WeakMap,nn=void 0;function rn(e,t=!1,n=nn){if(n){let t=tn.get(n);t||tn.set(n,t=[]),t.push(e)}}function an(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:Rt(e)||o===!1||o===0?on(e,1):on(e),m,g,_,v,y=!1,b=!1;if(Ut(e)?(g=()=>e.value,y=Rt(e)):It(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>It(e)||Rt(e)),g=()=>e.map(e=>{if(Ut(e))return e.value;if(It(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){ze();try{_()}finally{Be()}}let t=nn;nn=m;try{return f?f(e,3,[v]):e(v)}finally{nn=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>on(e(),t)}let x=xe(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(en):en,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e))if(n){let e=m.run();if(o||y||(b?e.some((e,t)=>k(e,C[t])):k(e,C))){_&&_();let t=nn;nn=m;try{let t=[e,C===en?void 0:b&&C[0]===en?[]:C,v];C=e,f?f(n,3,t):n(...t)}finally{nn=t}}}else m.run()};return u&&u(w),m=new we(g),m.scheduler=l?()=>l(w,!1):w,v=e=>rn(e,!1,m),_=m.onStop=()=>{let e=tn.get(m);if(e){if(f)f(e,4);else for(let t of e)t();tn.delete(m)}},n?a?w(!0):C=m.run():l?l(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function on(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ut(e))on(e.value,t,n);else if(d(e))for(let r=0;r<e.length;r++)on(e[r],t,n);else if(p(e)||f(e))e.forEach(e=>{on(e,t,n)});else if(C(e)){for(let r in e)on(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&on(e[r],t,n)}return e}function sn(e,t,n,r){try{return r?e(...r):e()}catch(e){ln(e,t,n)}}function cn(e,t,n,r){if(h(e)){let i=sn(e,t,n,r);return i&&y(i)&&i.catch(e=>{ln(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a<e.length;a++)i.push(cn(e[a],t,n,r));return i}}function ln(e,n,r,i=!0){let a=n?n.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:s}=n&&n.appContext.config||t;if(n){let t=n.parent,i=n.proxy,a=`https://vuejs.org/error-reference/#runtime-${r}`;for(;t;){let n=t.ec;if(n){for(let t=0;t<n.length;t++)if(n[t](e,i,a)===!1)return}t=t.parent}if(o){ze(),sn(o,null,10,[e,i,a]),Be();return}}un(e,r,a,i,s)}function un(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var dn=[],fn=-1,pn=[],mn=null,hn=0,gn=Promise.resolve(),_n=null;function vn(e){let t=_n||gn;return e?t.then(this?e.bind(this):e):t}function yn(e){let t=fn+1,n=dn.length;for(;t<n;){let r=t+n>>>1,i=dn[r],a=Tn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function bn(e){if(!(e.flags&1)){let t=Tn(e),n=dn[dn.length-1];!n||!(e.flags&2)&&t>=Tn(n)?dn.push(e):dn.splice(yn(t),0,e),e.flags|=1,xn()}}function xn(){_n||=gn.then(En)}function Sn(e){d(e)?pn.push(...e):mn&&e.id===-1?mn.splice(hn+1,0,e):e.flags&1||(pn.push(e),e.flags|=1),xn()}function Cn(e,t,n=fn+1){for(;n<dn.length;n++){let t=dn[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;dn.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function wn(e){if(pn.length){let e=[...new Set(pn)].sort((e,t)=>Tn(e)-Tn(t));if(pn.length=0,mn){mn.push(...e);return}for(mn=e,hn=0;hn<mn.length;hn++){let e=mn[hn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}mn=null,hn=0}}var Tn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function En(e){try{for(fn=0;fn<dn.length;fn++){let e=dn[fn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),sn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;fn<dn.length;fn++){let e=dn[fn];e&&(e.flags&=-2)}fn=-1,dn.length=0,wn(e),_n=null,(dn.length||pn.length)&&En(e)}}var Dn=null,On=null;function kn(e){let t=Dn;return Dn=e,On=e&&e.type.__scopeId||null,t}function An(e){On=e}function jn(){On=null}var Mn=e=>Nn;function Nn(e,t=Dn,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&la(-1);let i=kn(t),a;try{a=e(...n)}finally{kn(i),r._d&&la(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Pn(e,n){if(Dn===null)return e;let r=Wa(Dn),i=e.dirs||=[];for(let e=0;e<n.length;e++){let[a,o,s,c=t]=n[e];a&&(h(a)&&(a={mounted:a,updated:a}),a.deep&&on(o),i.push({dir:a,instance:r,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function Fn(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(ze(),cn(c,n,8,[e.el,s,e,t]),Be())}}function In(e,t){if(Oa){let n=Oa.provides,r=Oa.parent&&Oa.parent.provides;r===n&&(n=Oa.provides=Object.create(r)),n[e]=t}}function Ln(e,t,n=!1){let r=ka();if(r||fi){let i=fi?fi._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&h(t)?t.call(r&&r.proxy):t}}function Rn(){return!!(ka()||fi)}var zn=Symbol.for(`v-scx`),Bn=()=>Ln(zn);function Vn(e,t,n){return Hn(e,t,n)}function Hn(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(Fa){if(c===`sync`){let e=Bn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=Oa;u.call=(e,t,n)=>cn(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{Ui(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():bn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=an(e,n,u);return Fa&&(f?f.push(h):d&&h()),h}function Un(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Wn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=Ma(this),s=Hn(i,a.bind(r),n);return o(),s}function Wn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var Gn=new WeakMap,Kn=Symbol(`_vte`),qn=e=>e.__isTeleport,Jn=e=>e&&(e.disabled||e.disabled===``),Yn=e=>e&&(e.defer||e.defer===``),Xn=e=>typeof SVGElement<`u`&&e instanceof SVGElement,Zn=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,Qn=(e,t)=>{let n=e&&e.to;return g(n)?t?t(n):null:n},$n={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=Jn(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=Jn(e.props),r=e.target=Qn(e.props,m),a=ir(r,e,h,p);r&&(o!==`svg`&&Xn(r)?o=`svg`:o!==`mathml`&&Zn(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),rr(e,!1)))},S=e=>{let t=()=>{Gn.get(e)===t&&(Gn.delete(e),Jn(e.props)&&(b(e,_(e.el)||n,e.anchor),rr(e,!0)),x(e))};Gn.set(e,t),Ui(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),Yn(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),rr(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Gn.get(e);if(u){u.flags|=8,Gn.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Jn(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||Xn(p)?o=`svg`:(o===`mathml`||Zn(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),Yi(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):er(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=Qn(t.props,m);e&&er(t,e,null,l,0)}else g&&er(t,p,h,l,1);rr(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=a||!Jn(f),m=Gn.get(e);if(m&&(m.flags|=8,Gn.delete(e),p=!1),d&&(i(l),i(u)),a&&i(c),o&16)for(let e=0;e<s.length;e++){let i=s[e];r(i,t,n,p,!!i.dynamicChildren)}},move:er,hydrate:tr};function er(e,t,n,{o:{insert:r},m:i},a=2){a===0&&r(e.targetAnchor,t,n);let{el:o,anchor:s,shapeFlag:c,children:l,props:u}=e,d=a===2;if(d&&r(o,t,n),!Gn.has(e)&&(!d||Jn(u))&&c&16)for(let e=0;e<l.length;e++)i(l[e],t,n,2);d&&r(s,t,n)}function tr(e,t,n,r,i,a,{o:{nextSibling:o,parentNode:s,querySelector:c,insert:l,createText:u}},d){function f(e,n){let r=n;for(;r;){if(r&&r.nodeType===8){if(r.data===`teleport start anchor`)t.targetStart=r;else if(r.data===`teleport anchor`){t.targetAnchor=r,e._lpa=t.targetAnchor&&o(t.targetAnchor);break}}r=o(r)}}function p(e,t){t.anchor=d(o(e),t,s(e),n,r,i,a)}let m=t.target=Qn(t.props,c),h=Jn(t.props);if(m){let c=m._lpa||m.firstChild;t.shapeFlag&16&&(h?(p(e,t),f(m,c),t.targetAnchor||ir(m,t,u,l,s(e)===m?e:null)):(t.anchor=o(e),f(m,c),t.targetAnchor||ir(m,t,u,l),d(c&&o(c),t,m,n,r,i,a))),rr(t,h)}else h&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var nr=$n;function rr(e,t){let n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)r.nodeType===1&&r.setAttribute(`data-v-owner`,n.uid),r=r.nextSibling;n.ut()}}function ir(e,t,n,r,i=null){let a=t.targetStart=n(``),o=t.targetAnchor=n(``);return a[Kn]=o,e&&(r(a,e,i),r(o,e,i)),o}var ar=Symbol(`_leaveCb`);function or(e,t){e.shapeFlag&6&&e.component?(e.transition=t,or(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function sr(e,t){return h(e)?s({name:e.name},t,{setup:e}):e}function cr(e){e.ids=[e.ids[0]+ e.ids[2]+++`-`,0,0]}function lr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var ur=new WeakMap;function dr(e,n,r,a,o=!1){if(d(e)){e.forEach((e,t)=>dr(e,n&&(d(n)?n[t]:n),r,a,o));return}if(pr(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&dr(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?Wa(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=z(v),b=v===t?i:e=>lr(_,e)?!1:u(y,e),x=(e,t)=>!(t&&lr(_,t));if(m!=null&&m!==p){if(fr(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(Ut(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))sn(p,f,12,[l,_]);else{let t=g(p),n=Ut(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),ur.delete(e)};t.id=-1,ur.set(e,t),Ui(t,r)}else fr(e),i()}}}function fr(e){let t=ur.get(e);t&&(t.flags|=8,ur.delete(e))}se().requestIdleCallback,se().cancelIdleCallback;var pr=e=>!!e.type.__asyncLoader,mr=e=>e.type.__isKeepAlive;function hr(e,t){_r(e,`a`,t)}function gr(e,t){_r(e,`da`,t)}function _r(e,t,n=Oa){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(yr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)mr(e.parent.vnode)&&vr(r,t,n,e),e=e.parent}}function vr(e,t,n,r){let i=yr(t,e,r,!0);Er(()=>{c(r[t],i)},n)}function yr(e,t,n=Oa,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{ze();let i=Ma(n),a=cn(t,n,e,r);return i(),Be(),a};return r?i.unshift(a):i.push(a),a}}var br=e=>(t,n=Oa)=>{(!Fa||e===`sp`)&&yr(e,(...e)=>t(...e),n)},xr=br(`bm`),Sr=br(`m`),Cr=br(`bu`),wr=br(`u`),Tr=br(`bum`),Er=br(`um`),Dr=br(`sp`),Or=br(`rtg`),kr=br(`rtc`);function Ar(e,t=Oa){yr(`ec`,e,t)}var jr=`components`,Mr=`directives`;function Nr(e,t){return Lr(jr,e,!0,t)||e}var Pr=Symbol.for(`v-ndc`);function Fr(e){return g(e)?Lr(jr,e,!1)||e:e||Pr}function Ir(e){return Lr(Mr,e)}function Lr(e,t,n=!0,r=!1){let i=Dn||Oa;if(i){let n=i.type;if(e===jr){let e=Ga(n,!1);if(e&&(e===t||e===E(t)||e===re(E(t))))return n}let a=Rr(i[e]||n[e],t)||Rr(i.appContext[e],t);return!a&&r?n:a}}function Rr(e,t){return e&&(e[t]||e[E(t)]||e[re(E(t))])}function zr(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&It(e),r=!1,s=!1;n&&(r=!Rt(e),s=Lt(e),e=$e(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?Ht(Vt(e[n])):Vt(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(v(e))if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}else i=[];return n&&(n[r]=i),i}function Br(e,t,n={},r,i){if(Dn.ce||Dn.parent&&pr(Dn.parent)&&Dn.parent.ce){let e=Object.keys(n).length>0;return t!==`default`&&(n.name=t),U(),da(H,null,[K(`slot`,n,r&&r())],e?-2:64)}let a=e[t];a&&a._c&&(a._d=!1),U();let o=a&&Vr(a(n)),s=n.key||o&&o.key,c=da(H,{key:(s&&!_(s)?s:`_${t}`)+(!o&&r?`_fb`:``)},o||(r?r():[]),o&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),a&&a._c&&(a._d=!0),c}function Vr(e){return e.some(e=>fa(e)?!(e.type===ra||e.type===H&&!Vr(e.children)):!0)?e:null}function Hr(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:O(r)]=e[r];return n}var Ur=e=>e?Pa(e)?Wa(e):Ur(e.parent):null,Wr=s(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ur(e.parent),$root:e=>Ur(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>$r(e),$forceUpdate:e=>e.f||=()=>{bn(e.update)},$nextTick:e=>e.n||=vn.bind(e.proxy),$watch:e=>Un.bind(e)}),Gr=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),Kr={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(Gr(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else Jr&&(s[n]=0)}let d=Wr[n],f,p;if(d)return n===`$attrs`&&Ye(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return Gr(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||Gr(n,c)||u(o,c)||u(i,c)||u(Wr,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function qr(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var Jr=!0;function Yr(e){let t=$r(e),n=e.proxy,i=e.ctx;Jr=!1,t.beforeCreate&&Zr(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:ee,renderTriggered:te,errorCaptured:E,serverPrefetch:ne,expose:D,inheritAttrs:re,components:O,directives:k,filters:ie}=t;if(u&&Xr(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=Mt(t))}if(Jr=!0,o)for(let e in o){let t=o[e],a=Y({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)Qr(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{In(t,e[t])})}f&&Zr(f,e,`c`);function A(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(A(xr,p),A(Sr,m),A(Cr,g),A(wr,_),A(hr,y),A(gr,b),A(Ar,E),A(kr,ee),A(Or,te),A(Tr,S),A(Er,w),A(Dr,ne),d(D))if(D.length){let t=e.exposed||={};D.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};T&&e.render===r&&(e.render=T),re!=null&&(e.inheritAttrs=re),O&&(e.components=O),k&&(e.directives=k),ne&&cr(e)}function Xr(e,t,n=r){d(e)&&(e=ii(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?Ln(r.from||n,r.default,!0):Ln(r.from||n):Ln(r),Ut(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Zr(e,t,n){cn(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Qr(e,t,n,r){let i=r.includes(`.`)?Wn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&Vn(i,n)}else if(h(e))Vn(i,e.bind(n));else if(v(e))if(d(e))e.forEach(e=>Qr(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&Vn(i,r,e)}}function $r(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>ei(c,e,o,!0)),ei(c,t,o)),v(t)&&a.set(t,c),c}function ei(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&ei(e,a,n,!0),i&&i.forEach(t=>ei(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=ti[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var ti={data:ni,props:si,emits:si,methods:oi,computed:oi,beforeCreate:ai,created:ai,beforeMount:ai,mounted:ai,beforeUpdate:ai,updated:ai,beforeDestroy:ai,beforeUnmount:ai,destroyed:ai,unmounted:ai,activated:ai,deactivated:ai,errorCaptured:ai,serverPrefetch:ai,components:oi,directives:oi,watch:ci,provide:ni,inject:ri};function ni(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function ri(e,t){return oi(ii(e),ii(t))}function ii(e){if(d(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ai(e,t){return e?[...new Set([].concat(e,t))]:t}function oi(e,t){return e?s(Object.create(null),e,t):t}function si(e,t){return e?d(e)&&d(t)?[...new Set([...e,...t])]:s(Object.create(null),qr(e),qr(t??{})):t}function ci(e,t){if(!e)return t;if(!t)return e;let n=s(Object.create(null),e);for(let r in t)n[r]=ai(e[r],t[r]);return n}function li(){return{app:null,config:{isNativeTag:i,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var ui=0;function di(e,t){return function(n,r=null){h(n)||(n=s({},n)),r!=null&&!v(r)&&(r=null);let i=li(),a=new WeakSet,o=[],c=!1,l=i.app={_uid:ui++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Ja,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&h(e.install)?(a.add(e),e.install(l,...t)):h(e)&&(a.add(e),e(l,...t))),l},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),l},component(e,t){return t?(i.components[e]=t,l):i.components[e]},directive(e,t){return t?(i.directives[e]=t,l):i.directives[e]},mount(a,o,s){if(!c){let u=l._ceVNode||K(n,r);return u.appContext=i,s===!0?s=`svg`:s===!1&&(s=void 0),o&&t?t(u,a):e(u,a,s),c=!0,l._container=a,a.__vue_app__=l,Wa(u.component)}},onUnmount(e){o.push(e)},unmount(){c&&(cn(o,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide(e,t){return i.provides[e]=t,l},runWithContext(e){let t=fi;fi=l;try{return e()}finally{fi=t}}};return l}}var fi=null,pi=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${E(t)}Modifiers`]||e[`${D(t)}Modifiers`];function mi(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&pi(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=r.map(ae)));let c,l=i[c=O(n)]||i[c=O(E(n))];!l&&o&&(l=i[c=O(D(n))]),l&&cn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,cn(u,e,6,a)}}var hi=new WeakMap;function gi(e,t,n=!1){let r=n?hi:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=gi(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function _i(e,t){return!e||!a(t)?!1:(t=t.slice(2).replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,D(t))||u(e,t))}function vi(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=kn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=ba(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=ba(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:yi(c)}}catch(t){aa.length=0,ln(t,e,1),v=K(ra)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=bi(y,a)),b=va(b,y,!1,!0))}return n.dirs&&(b=va(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&or(b,n.transition),v=b,kn(_),v}var yi=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},bi=(e,t)=>{let n={};for(let r in e)(!o(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function xi(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Si(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(Ci(o,r,n)&&!_i(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?o?Si(r,o,l):!0:!!o;return!1}function Si(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(Ci(t,e,a)&&!_i(n,a))return!0}return!1}function Ci(e,t,n){let r=e[n],i=t[n];return n===`style`&&v(r)&&v(i)?!he(r,i):r!==i}function wi({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var Ti={},Ei=()=>Object.create(Ti),Di=e=>Object.getPrototypeOf(e)===Ti;function Oi(e,t,n,r=!1){let i={},a=Ei();e.propsDefaults=Object.create(null),Ai(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:Nt(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function ki(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=z(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(_i(e.emitsOptions,o))continue;let d=t[o];if(c)if(u(a,o))d!==a[o]&&(a[o]=d,l=!0);else{let t=E(o);i[t]=ji(c,s,t,d,e,!1)}else d!==a[o]&&(a[o]=d,l=!0)}}}else{Ai(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!u(t,a)&&((r=D(a))===a||!u(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=ji(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!u(t,e))&&(delete a[e],l=!0)}l&&Xe(e.attrs,`set`,``)}function Ai(e,n,r,i){let[a,o]=e.propsOptions,s=!1,c;if(n)for(let t in n){if(T(t))continue;let l=n[t],d;a&&u(a,d=E(t))?!o||!o.includes(d)?r[d]=l:(c||={})[d]=l:_i(e.emitsOptions,t)||(!(t in i)||l!==i[t])&&(i[t]=l,s=!0)}if(o){let n=z(r),i=c||t;for(let t=0;t<o.length;t++){let s=o[t];r[s]=ji(a,n,s,i[s],e,!u(i,s))}}return s}function ji(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=u(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&h(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=Ma(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===D(n))&&(r=!0))}return r}var Mi=new WeakMap;function Ni(e,r,i=!1){let a=i?Mi:r.propsCache,o=a.get(e);if(o)return o;let c=e.props,l={},f=[],p=!1;if(!h(e)){let t=e=>{p=!0;let[t,n]=Ni(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;e<c.length;e++){let n=E(c[e]);Pi(n)&&(l[n]=t)}else if(c)for(let e in c){let t=E(e);if(Pi(t)){let n=c[e],r=l[t]=d(n)||h(n)?{type:n}:s({},n),i=r.type,a=!1,o=!0;if(d(i))for(let e=0;e<i.length;++e){let t=i[e],n=h(t)&&t.name;if(n===`Boolean`){a=!0;break}else n===`String`&&(o=!1)}else a=h(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||u(r,`default`))&&f.push(t)}}let m=[l,f];return v(e)&&a.set(e,m),m}function Pi(e){return e[0]!==`$`&&!T(e)}var Fi=e=>e===`_`||e===`_ctx`||e===`$stable`,Ii=e=>d(e)?e.map(ba):[ba(e)],Li=(e,t,n)=>{if(t._n)return t;let r=Nn((...e)=>Ii(t(...e)),n);return r._c=!1,r},Ri=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Fi(n))continue;let i=e[n];if(h(i))t[n]=Li(n,i,r);else if(i!=null){let e=Ii(i);t[n]=()=>e}}},zi=(e,t)=>{let n=Ii(t);e.slots.default=()=>n},Bi=(e,t,n)=>{for(let r in t)(n||!Fi(r))&&(e[r]=t[r])},Vi=(e,t,n)=>{let r=e.slots=Ei();if(e.vnode.shapeFlag&32){let e=t._;e?(Bi(r,t,n),n&&A(r,`_`,e,!0)):Ri(t,r)}else t&&zi(e,t)},Hi=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:Bi(a,n,r):(o=!n.$stable,Ri(n,a)),s=n}else n&&(zi(e,n),s={default:1});if(o)for(let e in a)!Fi(e)&&s[e]==null&&delete a[e]},Ui=ta;function Wi(e){return Gi(e)}function Gi(e,i){let a=se();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!pa(e,t)&&(r=me(e),P(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case na:y(e,t,n,r);break;case ra:b(e,t,n,r);break;case ia:e??x(t,n,r,o);break;case H:O(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?k(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,F)}u!=null&&i?dr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&dr(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)ee(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ne(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},ee=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&E(e.children,d,null,r,i,Ki(e,a),s,u),_&&Fn(e,null,r,`created`),te(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!T(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&wa(f,r,e)}_&&Fn(e,null,r,`beforeMount`);let v=Ji(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&Ui(()=>{try{f&&wa(f,r,e),v&&g.enter(d),_&&Fn(e,null,r,`mounted`)}finally{}},i)},te=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||ea(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;te(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},E=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++)v(null,e[l]=s?xa(e[l]):ba(e[l]),t,n,r,i,a,o,s)},ne=(e,n,r,i,a,o,s)=>{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&qi(r,!1),(g=h.onVnodeBeforeUpdate)&&wa(g,r,n,e),f&&Fn(n,e,r,`beforeUpdate`),r&&qi(r,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?D(e.dynamicChildren,d,l,r,i,Ki(n,a),o):s||M(e,n,l,null,r,i,Ki(n,a),o,!1),u>0){if(u&16)re(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t],i=m[n],o=h[n];(o!==i||n===`value`)&&c(l,n,i,o,a,r)}}u&1&&e.children!==n.children&&p(l,n.children)}else !s&&d==null&&re(l,m,h,r,a);((g=h.onVnodeUpdated)||f)&&Ui(()=>{g&&wa(g,r,n,e),f&&Fn(n,e,r,`updated`)},i)},D=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s];v(c,l,c.el&&(c.type===H||!pa(c,l)||c.shapeFlag&198)?m(c.el):n,null,r,i,a,o,!0)}},re=(e,n,r,i,a)=>{if(n!==r){if(n!==t)for(let t in n)!T(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(T(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},O=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),E(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(D(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Yi(e,t,!0)):M(e,t,n,f,i,a,s,c,l)},k=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):A(t,n,r,i,a,o,c):ae(e,t,c)},A=(e,t,n,r,i,a,o)=>{let s=e.component=Da(e,r,i);if(mr(e)&&(s.ctx.renderer=F),Ia(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,oe,o),!e.el){let r=s.subTree=K(ra);b(null,r,t,n),e.placeholder=r.el}}else oe(s,e,t,n,i,a,o)},ae=(e,t,n)=>{let r=t.component=e.component;if(xi(e,t,n))if(r.asyncDep&&!r.asyncResolved){j(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},oe=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Zi(e);if(n){t&&(t.el=c.el,j(e,t,o)),n.asyncDep.then(()=>{Ui(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;qi(e,!1),t?(t.el=c.el,j(e,t,o)):t=c,n&&ie(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&wa(d,s,t,c),qi(e,!0);let f=vi(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),me(p),e,i,a),t.el=f.el,u===null&&wi(e,f.el),r&&Ui(r,i),(d=t.props&&t.props.onVnodeUpdated)&&Ui(()=>wa(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=pr(t);if(qi(e,!1),l&&ie(l),!m&&(o=c&&c.onVnodeBeforeMount)&&wa(o,d,t),qi(e,!0),s&&ve){let t=()=>{e.subTree=vi(e),ve(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=vi(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&Ui(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Ui(()=>wa(o,d,e),i)}(t.shapeFlag&256||d&&pr(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Ui(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new we(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>bn(u),qi(e,!0),l()},j=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,ki(e,t.props,r,n),Hi(e,t.children,n),ze(),Cn(e),Be()},M=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){N(l,d,n,r,i,a,o,s,c);return}else if(f&256){ce(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&pe(l,i,a),d!==l&&p(n,d)):u&16?m&16?N(l,d,n,r,i,a,o,s,c):pe(l,i,a,!0):(u&8&&p(n,``),m&16&&E(d,n,r,i,a,o,s,c))},ce=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;p<f;p++){let n=t[p]=l?xa(t[p]):ba(t[p]);v(e[p],n,r,null,a,o,s,c,l)}u>d?pe(e,a,o,!0,!1,f):E(t,r,i,a,o,s,c,l,f)},N=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?xa(t[u]):ba(t[u]);if(pa(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?xa(t[p]):ba(t[p]);if(pa(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=e<d?t[e].el:i;for(;u<=p;)v(null,t[u]=l?xa(t[u]):ba(t[u]),r,n,a,o,s,c,l),u++}}else if(u>p)for(;u<=f;)P(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?xa(t[u]):ba(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u<b;u++)C[u]=0;for(u=m;u<=f;u++){let n=e[u];if(y>=b){P(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&pa(n,t[_])){i=_;break}i===void 0?P(n,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let w=x?Xi(C):n;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1<d?f.el||$i(f):i;C[u]===0?v(null,n,r,p,a,o,s,c,l):x&&(_<0||u!==w[_]?le(n,r,p,2):_--)}}},le=(e,t,n,r,i=null)=>{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){le(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,F);return}if(c===H){o(a,t,n);for(let e=0;e<u.length;e++)le(u[e],t,n,r);o(e.anchor,t,n);return}if(c===ia){S(e,t,n);return}if(r!==2&&d&1&&l)if(r===0)l.beforeEnter(a),o(a,t,n),Ui(()=>l.enter(a),i);else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{a._isLeaving&&a[ar](!0),r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else o(a,t,n)},P=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(ze(),dr(s,null,n,e,!0),Be()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!pr(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&wa(_,t,e),u&6)fe(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Fn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,F,r):l&&!l.hasOnce&&(a!==H||d>0&&d&64)?pe(l,t,n,!1,!0):(a===H&&d&384||!i&&u&16)&&pe(c,t,n),r&&ue(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Ui(()=>{_&&wa(_,t,e),h&&Fn(e,null,t,`unmounted`),v&&(e.el=null)},n)},ue=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===H){de(n,r);return}if(t===ia){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},de=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},fe=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Qi(c),Qi(l),r&&ie(r),i.stop(),a&&(a.flags|=8,P(o,e,t,n)),s&&Ui(s,t),Ui(()=>{e.isUnmounted=!0},t)},pe=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)P(e[o],t,n,r,i)},me=e=>{if(e.shapeFlag&6)return me(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Kn];return n?h(n):t},he=!1,ge=(e,t,n)=>{let r;e==null?t._vnode&&(P(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,he||=(he=!0,Cn(r),wn(),!1)},F={p:v,um:P,m:le,r:ue,mt:A,mc:E,pc:M,pbc:D,n:me,o:e},_e,ve;return i&&([_e,ve]=i(F)),{render:ge,hydrate:_e,createApp:di(ge,_e)}}function Ki({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function qi({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ji(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Yi(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=xa(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&Yi(t,a)),a.type===na&&(a.patchFlag===-1&&(a=i[e]=xa(a)),a.el=t.el),a.type===ra&&!a.el&&(a.el=t.el)}}function Xi(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function Zi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Zi(t)}function Qi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function $i(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?$i(t.subTree):null}var ea=e=>e.__isSuspense;function ta(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):Sn(e)}var H=Symbol.for(`v-fgt`),na=Symbol.for(`v-txt`),ra=Symbol.for(`v-cmt`),ia=Symbol.for(`v-stc`),aa=[],oa=null;function U(e=!1){aa.push(oa=e?null:[])}function sa(){aa.pop(),oa=aa[aa.length-1]||null}var ca=1;function la(e,t=!1){ca+=e,e<0&&oa&&t&&(oa.hasOnce=!0)}function ua(e){return e.dynamicChildren=ca>0?oa||n:null,sa(),ca>0&&oa&&oa.push(e),e}function W(e,t,n,r,i,a){return ua(G(e,t,n,r,i,a,!0))}function da(e,t,n,r,i){return ua(K(e,t,n,r,i,!0))}function fa(e){return e?e.__v_isVNode===!0:!1}function pa(e,t){return e.type===t.type&&e.key===t.key}var ma=({key:e})=>e??null,ha=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||Ut(e)||h(e)?{i:Dn,r:e,k:t,f:!!n}:e);function G(e,t=null,n=null,r=0,i=null,a=e===H?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ma(t),ref:t&&ha(t),scopeId:On,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Dn};return s?(Sa(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),ca>0&&!o&&oa&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&oa.push(c),c}var K=ga;function ga(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Pr)&&(e=ra),fa(e)){let r=va(e,t,!0);return n&&Sa(r,n),ca>0&&!a&&oa&&(r.shapeFlag&6?oa[oa.indexOf(e)]=r:oa.push(r)),r.patchFlag=-2,r}if(Ka(e)&&(e=e.__vccOpts),t){t=_a(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=P(e)),v(n)&&(zt(n)&&!d(n)&&(n=s({},n)),t.style=j(n))}let o=g(e)?1:ea(e)?128:qn(e)?64:v(e)?4:h(e)?2:0;return G(e,t,n,r,i,o,a,!0)}function _a(e){return e?zt(e)||Di(e)?s({},e):e:null}function va(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Ca(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ma(l),ref:t&&t.ref?n&&a?d(a)?a.concat(ha(t)):[a,ha(t)]:ha(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==H?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&va(e.ssContent),ssFallback:e.ssFallback&&va(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&or(u,c.clone(u)),u}function q(e=` `,t=0){return K(na,null,e,t)}function ya(e,t){let n=K(ia,null,e);return n.staticCount=t,n}function J(e=``,t=!1){return t?(U(),da(ra,null,e)):K(ra,null,e)}function ba(e){return e==null||typeof e==`boolean`?K(ra):d(e)?K(H,null,e.slice()):fa(e)?xa(e):K(na,null,String(e))}function xa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:va(e)}function Sa(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Sa(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Di(t)?t._ctx=Dn:r===3&&Dn&&(Dn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else h(t)?(t={default:t,_ctx:Dn},n=32):(t=String(t),r&64?(n=16,t=[q(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ca(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=P([t.class,r.class]));else if(e===`style`)t.style=j([t.style,r.style]);else if(a(e)){let n=t[e],i=r[e];i&&n!==i&&!(d(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!o(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function wa(e,t,n,r=null){cn(e,t,7,[n,r])}var Ta=li(),Ea=0;function Da(e,n,r){let i=e.type,a=(n?n.appContext:e.appContext)||Ta,o={uid:Ea++,vnode:e,type:i,parent:n,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ye(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(a.provides),ids:n?n.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ni(i,a),emitsOptions:gi(i,a),emit:null,emitted:null,propsDefaults:t,inheritAttrs:i.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=n?n.root:o,o.emit=mi.bind(null,o),e.ce&&e.ce(o),o}var Oa=null,ka=()=>Oa||Dn,Aa,ja;{let e=se(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Aa=t(`__VUE_INSTANCE_SETTERS__`,e=>Oa=e),ja=t(`__VUE_SSR_SETTERS__`,e=>Fa=e)}var Ma=e=>{let t=Oa;return Aa(e),e.scope.on(),()=>{e.scope.off(),Aa(t)}},Na=()=>{Oa&&Oa.scope.off(),Aa(null)};function Pa(e){return e.vnode.shapeFlag&4}var Fa=!1;function Ia(e,t=!1,n=!1){t&&ja(t);let{props:r,children:i}=e.vnode,a=Pa(e);Oi(e,r,a,t),Vi(e,i,n||t);let o=a?La(e,t):void 0;return t&&ja(!1),o}function La(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Kr);let{setup:r}=n;if(r){ze();let n=e.setupContext=r.length>1?Ua(e):null,i=Ma(e),a=sn(r,e,0,[e.props,n]),o=y(a);if(Be(),i(),(o||e.sp)&&!pr(e)&&cr(e),o){if(a.then(Na,Na),t)return a.then(n=>{Ra(e,n,t)}).catch(t=>{ln(t,e,0)});e.asyncDep=a}else Ra(e,a,t)}else Va(e,t)}function Ra(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=Jt(t)),Va(e,n)}var za,Ba;function Va(e,t,n){let i=e.type;if(!e.render){if(!t&&za&&!i.render){let t=i.template||$r(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:o}=i;i.render=za(t,s(s({isCustomElement:n,delimiters:a},r),o))}}e.render=i.render||r,Ba&&Ba(e)}{let t=Ma(e);ze();try{Yr(e)}finally{Be(),t()}}}var Ha={get(e,t){return Ye(e,`get`,``),e[t]}};function Ua(e){return{attrs:new Proxy(e.attrs,Ha),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Wa(e){return e.exposed?e.exposeProxy||=new Proxy(Jt(Bt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Wr)return Wr[n](e)},has(e,t){return t in e||t in Wr}}):e.proxy}function Ga(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}function Ka(e){return h(e)&&`__vccOpts`in e}var Y=(e,t)=>$t(e,t,Fa);function qa(e,t,n){try{la(-1);let r=arguments.length;return r===2?v(t)&&!d(t)?fa(t)?K(e,null,[t]):K(e,t):K(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&fa(n)&&(n=[n]),K(e,t,n))}finally{la(1)}}var Ja=`3.5.34`,Ya=void 0,Xa=typeof window<`u`&&window.trustedTypes;if(Xa)try{Ya=Xa.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Za=Ya?e=>Ya.createHTML(e):e=>e,Qa=`http://www.w3.org/2000/svg`,$a=`http://www.w3.org/1998/Math/MathML`,eo=typeof document<`u`?document:null,to=eo&&eo.createElement(`template`),no={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?eo.createElementNS(Qa,e):t===`mathml`?eo.createElementNS($a,e):n?eo.createElement(e,{is:n}):eo.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>eo.createTextNode(e),createComment:e=>eo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>eo.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{to.innerHTML=Za(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=to.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ro=Symbol(`_vtc`);function io(e,t,n){let r=e[ro];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var ao=Symbol(`_vod`),oo=Symbol(`_vsh`),so={name:`show`,beforeMount(e,{value:t},{transition:n}){e[ao]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):co(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),co(e,!0),r.enter(e)):r.leave(e,()=>{co(e,!1)}):co(e,t))},beforeUnmount(e,{value:t}){co(e,t)}};function co(e,t){e.style.display=t?e[ao]:`none`,e[oo]=!t}var lo=Symbol(``),uo=/(?:^|;)\s*display\s*:/;function fo(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t)if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??mo(r,t,``)}else for(let e in t)n[e]??mo(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?mo(r,i,``):vo(e,i,!g(t)&&t?t[i]:void 0,o)||mo(r,i,o)}}else if(i){if(t!==n){let e=r[lo];e&&(n+=`;`+e),r.cssText=n,a=uo.test(n)}}else t&&e.removeAttribute(`style`);ao in e&&(e[ao]=a?r.display:``,e[oo]&&(r.display=`none`))}var po=/\s*!important$/;function mo(e,t,n){if(d(n))n.forEach(n=>mo(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=_o(e,t);po.test(n)?e.setProperty(D(r),n.replace(po,``),`important`):e[r]=n}}var ho=[`Webkit`,`Moz`,`ms`],go={};function _o(e,t){let n=go[t];if(n)return n;let r=E(t);if(r!==`filter`&&r in e)return go[t]=r;r=re(r);for(let n=0;n<ho.length;n++){let i=ho[n]+r;if(i in e)return go[t]=i}return t}function vo(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&g(r)&&n===r}var yo=`http://www.w3.org/1999/xlink`;function bo(e,t,n,r,i,a=fe(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(yo,t.slice(6,t.length)):e.setAttributeNS(yo,t,n):n==null||a&&!pe(n)?e.removeAttribute(t):e.setAttribute(t,a?``:_(n)?String(n):n)}function xo(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Za(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=pe(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function So(e,t,n,r){e.addEventListener(t,n,r)}function Co(e,t,n,r){e.removeEventListener(t,n,r)}var wo=Symbol(`_vei`);function To(e,t,n,r,i=null){let a=e[wo]||(e[wo]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=Do(t);r?So(e,n,a[t]=jo(r,i),s):o&&(Co(e,n,o,s),a[t]=void 0)}}var Eo=/(?:Once|Passive|Capture)$/;function Do(e){let t;if(Eo.test(e)){t={};let n;for(;n=e.match(Eo);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===`:`?e.slice(3):D(e.slice(2)),t]}var Oo=0,ko=Promise.resolve(),Ao=()=>Oo||=(ko.then(()=>Oo=0),Date.now());function jo(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;cn(Mo(e,n.value),t,5,[e])};return n.value=e,n.attached=Ao(),n}function Mo(e,t){if(d(t)){let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}else return t}var No=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Po=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?io(e,r,c):t===`style`?fo(e,n,r):a(t)?o(t)||To(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):Fo(e,t,r,c))?(xo(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&bo(e,t,r,c,s,t!==`value`)):e._isVueCE&&(Io(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?xo(e,E(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),bo(e,t,r,c))};function Fo(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&No(t)&&h(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return No(t)&&g(n)?!1:t in e}function Io(e,t){let n=e._def.props;if(!n)return!1;let r=E(t);return Array.isArray(n)?n.some(e=>E(e)===r):Object.keys(n).some(e=>E(e)===r)}var Lo=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return d(t)?e=>ie(t,e):t};function Ro(e){e.target.composing=!0}function zo(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var Bo=Symbol(`_assign`);function Vo(e,t,n){return t&&(e=e.trim()),n&&(e=ae(e)),e}var Ho={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[Bo]=Lo(i);let a=r||i.props&&i.props.type===`number`;So(e,t?`change`:`input`,t=>{t.target.composing||e[Bo](Vo(e.value,n,a))}),(n||a)&&So(e,`change`,()=>{e.value=Vo(e.value,n,a)}),t||(So(e,`compositionstart`,Ro),So(e,`compositionend`,zo),So(e,`change`,zo))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Bo]=Lo(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?ae(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},Uo=[`ctrl`,`shift`,`alt`,`meta`],Wo={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Uo.some(n=>e[`${n}Key`]&&!t.includes(n))},Go=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=Wo[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},Ko={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},qo=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=D(n.key);if(t.some(e=>e===r||Ko[e]===r))return e(n)}))},Jo=s({patchProp:Po},no),Yo;function Xo(){return Yo||=Wi(Jo)}var Zo=((...e)=>{let t=Xo().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=$o(e);if(!r)return;let i=t._component;!h(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Qo(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Qo(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function $o(e){return g(e)?document.querySelector(e):e}var es=typeof window<`u`,ts,ns=e=>ts=e,rs=Symbol();function is(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var as;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(as||={});var os=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function ss(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function cs(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){ps(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function ls(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function us(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var ds=typeof navigator==`object`?navigator:{userAgent:``},fs=/Macintosh/.test(ds.userAgent)&&/AppleWebKit/.test(ds.userAgent)&&!/Safari/.test(ds.userAgent),ps=es?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!fs?ms:`msSaveOrOpenBlob`in ds?hs:gs:()=>{};function ms(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?us(r):ls(r.href)?cs(e,t,n):(r.target=`_blank`,us(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){us(r)},0))}function hs(e,t=`download`,n){if(typeof e==`string`)if(ls(e))cs(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){us(t)})}else navigator.msSaveOrOpenBlob(ss(e,n),t)}function gs(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return cs(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(os.HTMLElement))||`safari`in os,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||fs)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:_s}=Object;function vs(){let e=be(!0),t=e.run(()=>B({})),n=[],r=[],i=Bt({install(e){ns(i),i._a=e,e.provide(rs,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var ys=()=>{};function bs(e,t,n,r=ys){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&xe()&&Se(i),i}function xs(e,...t){e.forEach(e=>{e(...t)})}var Ss=e=>e(),Cs=Symbol(),ws=Symbol();function Ts(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];is(i)&&is(r)&&e.hasOwnProperty(n)&&!Ut(r)&&!It(r)?e[n]=Ts(i,r):e[n]=r}return e}var Es=Symbol();function Ds(e){return!is(e)||!Object.prototype.hasOwnProperty.call(e,Es)}var{assign:Os}=Object;function ks(e){return!!(Ut(e)&&e.effect)}function As(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),Os(Yt(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=Bt(Y(()=>{ns(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=js(e,l,t,n,r,!0),c}function js(e,t,n={},r,i,a){let o,s=Os({actions:{}},n),c={deep:!0},l,u,d=new Set,f=new Set,p=r.state.value[e];!a&&!p&&(r.state.value[e]={});let m;function h(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:as.patchFunction,storeId:e,events:void 0}):(Ts(r.state.value[e],t),n={type:as.patchObject,payload:t,storeId:e,events:void 0});let i=m=Symbol();vn().then(()=>{m===i&&(l=!0)}),u=!0,xs(d,n,r.state.value[e])}let g=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{Os(e,t)})}:ys;function _(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}let v=(t,n=``)=>{if(Cs in t)return t[ws]=n,t;let i=function(){ns(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}xs(f,{args:n,name:i[ws],store:y,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:y,n)}catch(e){throw xs(o,e),e}return l instanceof Promise?l.then(e=>(xs(a,e),e)).catch(e=>(xs(o,e),Promise.reject(e))):(xs(a,l),l)};return i[Cs]=!0,i[ws]=n,i},y=Mt({_p:r,$id:e,$onAction:bs.bind(null,f),$patch:h,$reset:g,$subscribe(t,n={}){let i=bs(d,t,n.detached,()=>a()),a=o.run(()=>Vn(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:as.direct,events:void 0},r)},Os({},c,n)));return i},$dispose:_});r._s.set(e,y);let b=(r._a&&r._a.runWithContext||Ss)(()=>r._e.run(()=>(o=be()).run(()=>t({action:v}))));for(let t in b){let n=b[t];Ut(n)&&!ks(n)||It(n)?a||(p&&Ds(n)&&(Ut(n)?n.value=p[t]:Ts(n,p[t])),r.state.value[e][t]=n):typeof n==`function`&&(b[t]=v(n,t),s.actions[t]=n)}return Os(y,b),Os(z(y),b),Object.defineProperty(y,"$state",{get:()=>r.state.value[e],set:e=>{h(t=>{Os(t,e)})}}),r._p.forEach(e=>{Os(y,o.run(()=>e({store:y,app:r._a,pinia:r,options:s})))}),p&&a&&n.hydrate&&n.hydrate(y.$state,p),l=!0,u=!0,y}function Ms(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=Rn();return n||=o?Ln(rs,null):null,n&&ns(n),n=ts,n._s.has(e)||(i?js(e,t,r,n):As(e,r,n)),n._s.get(e)}return a.$id=e,a}var Ns=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Ps={};function Fs(e,t){let n=Nr(`router-view`);return U(),da(n,{key:e.$route.fullPath})}var Is=Ns(Ps,[[`render`,Fs]]),Ls=typeof document<`u`;function Rs(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function zs(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Rs(e.default)}var X=Object.assign;function Bs(e,t){let n={};for(let r in t){let i=t[r];n[r]=Hs(i)?i.map(e):e(i)}return n}var Vs=()=>{},Hs=Array.isArray;function Us(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var Ws=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),Gs=Symbol(``);Ws.MATCHER_NOT_FOUND,Ws.NAVIGATION_GUARD_REDIRECT,Ws.NAVIGATION_ABORTED,Ws.NAVIGATION_CANCELLED,Ws.NAVIGATION_DUPLICATED;function Ks(e,t){return X(Error(),{type:e,[Gs]:!0},t)}function qs(e,t){return e instanceof Error&&Gs in e&&(t==null||!!(e.type&t))}var Js=Symbol(``),Ys=Symbol(``),Xs=Symbol(``),Zs=Symbol(``),Qs=Symbol(``);function $s(){return Ln(Xs)}function ec(e){return Ln(Zs)}var tc=/#/g,nc=/&/g,rc=/\//g,ic=/=/g,ac=/\?/g,oc=/\+/g,sc=/%5B/g,cc=/%5D/g,lc=/%5E/g,uc=/%60/g,dc=/%7B/g,fc=/%7C/g,pc=/%7D/g,mc=/%20/g;function hc(e){return e==null?``:encodeURI(``+e).replace(fc,`|`).replace(sc,`[`).replace(cc,`]`)}function gc(e){return hc(e).replace(dc,`{`).replace(pc,`}`).replace(lc,`^`)}function _c(e){return hc(e).replace(oc,`%2B`).replace(mc,`+`).replace(tc,`%23`).replace(nc,`%26`).replace(uc,"`").replace(dc,`{`).replace(pc,`}`).replace(lc,`^`)}function vc(e){return _c(e).replace(ic,`%3D`)}function yc(e){return hc(e).replace(tc,`%23`).replace(ac,`%3F`)}function bc(e){return yc(e).replace(rc,`%2F`)}function xc(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Sc=/\/$/,Cc=e=>e.replace(Sc,``);function wc(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=Mc(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:xc(o)}}function Tc(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function Ec(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function Dc(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&Oc(t.matched[r],n.matched[i])&&kc(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Oc(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function kc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Ac(e[n],t[n]))return!1;return!0}function Ac(e,t){return Hs(e)?jc(e,t):Hs(t)?jc(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function jc(e,t){return Hs(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function Mc(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var Nc={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},Pc=function(e){return e.pop=`pop`,e.push=`push`,e}({}),Fc=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function Ic(e){if(!e)if(Ls){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),Cc(e)}var Lc=/^[^#]+#/;function Rc(e,t){return e.replace(Lc,`#`)+t}function zc(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var Bc=()=>({left:window.scrollX,top:window.scrollY});function Vc(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=zc(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function Hc(e,t){return(history.state?history.state.position-t:-1)+e}var Uc=new Map;function Wc(e,t){Uc.set(e,t)}function Gc(e){let t=Uc.get(e);return Uc.delete(e),t}function Kc(e){return typeof e==`string`||e&&typeof e==`object`}function qc(e){return typeof e==`string`||typeof e==`symbol`}function Jc(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(oc,` `),i=r.indexOf(`=`),a=xc(i<0?r:r.slice(0,i)),o=i<0?null:xc(r.slice(i+1));if(a in t){let e=t[a];Hs(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function Yc(e){let t=``;for(let n in e){let r=e[n];if(n=vc(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(Hs(r)?r.map(e=>e&&_c(e)):[r&&_c(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function Xc(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=Hs(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function Zc(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Qc(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(Ks(Ws.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):Kc(e)?c(Ks(Ws.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function $c(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(Rs(s)){let c=(s.__vccOpts||s)[t];c&&a.push(Qc(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=zs(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&Qc(c,n,r,o,e,i)()}))}}return a}function el(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>Oc(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>Oc(e,s))||i.push(s))}return[n,r,i]}var tl=()=>location.protocol+`//`+location.host;function nl(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),Ec(n,``)}return Ec(n,e)+r+i}function rl(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=nl(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:Pc.pop,direction:u?u>0?Fc.forward:Fc.back:Fc.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(X({},e.state,{scroll:Bc()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function il(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Bc():null}}function al(e){let{history:t,location:n}=window,r={value:nl(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:tl()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,X({},t.state,il(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=X({},i.value,t.state,{forward:e,scroll:Bc()});a(o.current,o,!0),a(e,X({},il(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function ol(e){e=Ic(e);let t=al(e),n=rl(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=X({location:``,base:e,go:r,createHref:Rc.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function sl(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),ol(e)}var cl=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),ll=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(ll||{}),ul={type:cl.Static,value:``},dl=/[a-zA-Z0-9_]/;function fl(e){if(!e)return[[]];if(e===`/`)return[[ul]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=ll.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===ll.Static?a.push({type:cl.Static,value:l}):n===ll.Param||n===ll.ParamRegExp||n===ll.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:cl.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;)switch(c=e[s++],n){case ll.Static:c===`\\`?(r=n,n=ll.EscapeNext):c===`/`?(l&&d(),o()):c===`:`?(d(),n=ll.Param):f();break;case ll.EscapeNext:f(),n=r;break;case ll.Param:c===`(`?n=ll.ParamRegExp:dl.test(c)?f():(d(),n=ll.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case ll.ParamRegExp:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=ll.ParamRegExpEnd:u+=c;break;case ll.ParamRegExpEnd:d(),n=ll.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}return n===ll.ParamRegExp&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var pl=`[^/]+?`,ml={sensitive:!1,strict:!1,start:!0,end:!0},hl=function(e){return e[e._multiplier=10]=`_multiplier`,e[e.Root=90]=`Root`,e[e.Segment=40]=`Segment`,e[e.SubSegment=30]=`SubSegment`,e[e.Static=40]=`Static`,e[e.Dynamic=20]=`Dynamic`,e[e.BonusCustomRegExp=10]=`BonusCustomRegExp`,e[e.BonusWildcard=-50]=`BonusWildcard`,e[e.BonusRepeatable=-20]=`BonusRepeatable`,e[e.BonusOptional=-8]=`BonusOptional`,e[e.BonusStrict=.7000000000000001]=`BonusStrict`,e[e.BonusCaseSensitive=.25]=`BonusCaseSensitive`,e}(hl||{}),gl=/[.+*?^${}()[\]/\\]/g;function _l(e,t){let n=X({},ml,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[hl.Root];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=hl.Segment+(n.sensitive?hl.BonusCaseSensitive:0);if(o.type===cl.Static)r||(i+=`/`),i+=o.value.replace(gl,`\\$&`),s+=hl.Static;else if(o.type===cl.Param){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||pl;if(u!==pl){s+=hl.BonusCustomRegExp;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=hl.Dynamic,c&&(s+=hl.BonusOptional),n&&(s+=hl.BonusRepeatable),u===`.*`&&(s+=hl.BonusWildcard)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=hl.BonusStrict}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===cl.Static)n+=e.value;else if(e.type===cl.Param){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(Hs(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=Hs(c)?c.join(`/`):c;if(!l)if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`);n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function vl(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===hl.Static+hl.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===hl.Static+hl.Segment?1:-1:0}function yl(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=vl(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(bl(r))return 1;if(bl(i))return-1}return i.length-r.length}function bl(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var xl={strict:!1,end:!0,sensitive:!1};function Sl(e,t,n){let r=X(_l(fl(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Cl(e,t){let n=[],r=new Map;t=Us(xl,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Tl(e);s.aliasOf=r&&r.record;let l=Us(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(Tl(X({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=Sl(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Dl(d)&&o(e.name)),jl(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:Vs}function o(e){if(qc(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=kl(e,n);n.splice(t,0,e),e.record.name&&!Dl(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw Ks(Ws.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=X(wl(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&wl(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw Ks(Ws.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=X({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Ol(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function wl(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Tl(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:El(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function El(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Dl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ol(e){return e.reduce((e,t)=>X(e,t.meta),{})}function kl(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;yl(e,t[i])<0?r=i:n=i+1}let i=Al(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function Al(e){let t=e;for(;t=t.parent;)if(jl(t)&&yl(e,t)===0)return t}function jl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Ml(e){let t=Ln(Xs),n=Ln(Zs),r=Y(()=>{let n=V(e.to);return t.resolve(n)}),i=Y(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(Oc.bind(null,i));if(o>-1)return o;let s=Ll(e[t-2]);return t>1&&Ll(i)===s&&a[a.length-1].path!==s?a.findIndex(Oc.bind(null,e[t-2])):o}),a=Y(()=>i.value>-1&&Il(n.params,r.value.params)),o=Y(()=>i.value>-1&&i.value===n.matched.length-1&&kc(n.params,r.value.params));function s(n={}){if(Fl(n)){let n=t[V(e.replace)?`replace`:`push`](V(e.to)).catch(Vs);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:Y(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function Nl(e){return e.length===1?e[0]:e}var Pl=sr({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:Ml,setup(e,{slots:t}){let n=Mt(Ml(e)),{options:r}=Ln(Xs),i=Y(()=>({[Rl(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[Rl(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&Nl(t.default(n));return e.custom?r:qa(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function Fl(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Il(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!Hs(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function Ll(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var Rl=(e,t,n)=>e??t??n,zl=sr({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Ln(Qs),i=Y(()=>e.route||r.value),a=Ln(Ys,0),o=Y(()=>{let e=V(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=Y(()=>i.value.matched[o.value]);In(Ys,Y(()=>o.value+1)),In(Js,s),In(Qs,i);let c=B();return Vn(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!Oc(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return Bl(n.default,{Component:l,route:r});let u=o.props[a],d=qa(l,X({},u?u===!0?r.params:typeof u==`function`?u(r):u:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return Bl(n.default,{Component:d,route:r})||d}}});function Bl(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Vl=zl;function Hl(e){let t=Cl(e.routes,e),n=e.parseQuery||Jc,r=e.stringifyQuery||Yc,i=e.history,a=Zc(),o=Zc(),s=Zc(),c=Wt(Nc),l=Nc;Ls&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=Bs.bind(null,e=>``+e),d=Bs.bind(null,bc),f=Bs.bind(null,xc);function p(e,n){let r,i;return qc(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=X({},a||c.value),typeof e==`string`){let r=wc(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return X(r,o,{params:f(o.params),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=X({},e,{path:wc(n,e.path,a.path).path});else{let t=X({},e.params);for(let e in t)t[e]??delete t[e];o=X({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=Tc(r,X({},e,{hash:gc(l),path:s.path})),m=i.createHref(p);return X({fullPath:p,hash:l,query:r===Yc?Xc(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?wc(n,e,c.value.path):X({},e)}function y(e,t){if(l!==e)return Ks(Ws.NAVIGATION_CANCELLED,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(X(v(e),{replace:!0}))}function S(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),X({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n,i);if(u)return C(X(v(u),{state:typeof u==`object`?X({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&Dc(r,i,n)&&(f=Ks(Ws.NAVIGATION_DUPLICATED,{to:d,from:i}),oe(i,i,!0,!1)),(f?Promise.resolve(f):ee(d,i)).catch(e=>qs(e)?qs(e,Ws.NAVIGATION_GUARD_REDIRECT)?e:ae(e):ie(e,d,i)).then(e=>{if(e){if(qs(e,Ws.NAVIGATION_GUARD_REDIRECT))return C(X({replace:s},v(e.to),{state:typeof e.to==`object`?X({},a,e.to.state):a,force:o}),t||d)}else e=E(d,i,!0,s,a);return te(d,i,e),e})}function w(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function T(e){let t=M.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function ee(e,t){let n,[r,i,s]=el(e,t);n=$c(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Qc(r,e,t))});let c=w.bind(null,e,t);return n.push(c),N(n).then(()=>{n=[];for(let r of a.list())n.push(Qc(r,e,t));return n.push(c),N(n)}).then(()=>{n=$c(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Qc(r,e,t))});return n.push(c),N(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(Hs(r.beforeEnter))for(let i of r.beforeEnter)n.push(Qc(i,e,t));else n.push(Qc(r.beforeEnter,e,t));return n.push(c),N(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=$c(s,`beforeRouteEnter`,e,t,T),n.push(c),N(n))).then(()=>{n=[];for(let r of o.list())n.push(Qc(r,e,t));return n.push(c),N(n)}).catch(e=>qs(e,Ws.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function te(e,t,n){s.list().forEach(r=>T(()=>r(e,t,n)))}function E(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===Nc,l=Ls?history.state:{};n&&(r||s?i.replace(e.fullPath,X({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,oe(e,t,n,s),ae()}let ne;function D(){ne||=i.listen((e,t,n)=>{if(!ce.listening)return;let r=_(e),a=S(r,ce.currentRoute.value);if(a){C(X(a,{replace:!0,force:!0}),r).catch(Vs);return}l=r;let o=c.value;Ls&&Wc(Hc(o.fullPath,n.delta),Bc()),ee(r,o).catch(e=>qs(e,Ws.NAVIGATION_ABORTED|Ws.NAVIGATION_CANCELLED)?e:qs(e,Ws.NAVIGATION_GUARD_REDIRECT)?(C(X(v(e.to),{force:!0}),r).then(e=>{qs(e,Ws.NAVIGATION_ABORTED|Ws.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===Pc.pop&&i.go(-1,!1)}).catch(Vs),Promise.reject()):(n.delta&&i.go(-n.delta,!1),ie(e,r,o))).then(e=>{e||=E(r,o,!1),e&&(n.delta&&!qs(e,Ws.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===Pc.pop&&qs(e,Ws.NAVIGATION_ABORTED|Ws.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),te(r,o,e)}).catch(Vs)})}let re=Zc(),O=Zc(),k;function ie(e,t,n){ae(e);let r=O.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function A(){return k&&c.value!==Nc?Promise.resolve():new Promise((e,t)=>{re.add([e,t])})}function ae(e){return k||(k=!e,D(),re.list().forEach(([t,n])=>e?n(e):t()),re.reset()),e}function oe(t,n,r,i){let{scrollBehavior:a}=e;if(!Ls||!a)return Promise.resolve();let o=!r&&Gc(Hc(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return vn().then(()=>a(t,n,o)).then(e=>e&&Vc(e)).catch(e=>ie(e,t,n))}let se=e=>i.go(e),j,M=new Set,ce={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:se,back:()=>se(-1),forward:()=>se(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:O.add,isReady:A,install(e){e.component(`RouterLink`,Pl),e.component(`RouterView`,Vl),e.config.globalProperties.$router=ce,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>V(c)}),Ls&&!j&&c.value===Nc&&(j=!0,b(i.location).catch(e=>{}));let t={};for(let e in Nc)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(Xs,ce),e.provide(Zs,Nt(t)),e.provide(Qs,c);let n=e.unmount;M.add(e),e.unmount=function(){M.delete(e),M.size<1&&(l=Nc,ne&&ne(),ne=null,c.value=Nc,j=!1,k=!1),n()}}};function N(e){return e.reduce((e,t)=>e.then(()=>T(t)),Promise.resolve())}return ce}var Ul={copilot:`copilot-cli`,vscode:`copilot-chat`,claude:`claude`,modernize:`modernize`,"pi-mono":`pi-mono`},Wl={};for(let[e,t]of Object.entries(Ul))Wl[t]=e;function Gl(e){return Ul[e]||e}var Kl={class:`flex justify-between items-center font-mono text-2xs text-text-faint mb-3 tracking-tight opacity-70`},ql=[`title`],Jl={class:`flex flex-wrap items-center justify-start gap-1 mt-1`},Yl={class:`flex flex-wrap gap-1`},Xl=[`title`],Zl={key:0,class:`version-badge py-0.5 px-2 rounded-xl text-2xs font-semibold bg-[rgba(210,153,34,0.2)] text-warning border border-[rgba(210,153,34,0.4)]`,title:`Session in progress`},Ql={key:1,class:`version-badge`,title:`Imported session`},$l={key:2,class:`version-badge`,title:`Has Agent Review`},eu=[`title`],tu={key:4,class:`version-badge-pill bg-[rgba(234,179,8,0.15)] text-warning`,title:`Modernize version`},nu={key:5,class:`version-badge-pill bg-[rgba(234,179,8,0.15)] text-warning`,title:`CLI version`},ru=[`title`],iu={key:0,class:`flex flex-wrap gap-1`},au=[`title`],ou=[`title`],su={key:1,class:`text-text-faint text-md font-medium leading-relaxed mb-3 break-words line-clamp-3 cursor-help italic`},cu={class:`flex items-center gap-4 flex-wrap text-xs font-mono min-w-0`},lu=[`title`],uu={class:`text-text-muted break-words font-medium`},du={class:`meta-row`},fu={class:`text-text-muted break-words`},pu={key:1,class:`meta-row`},mu={class:`text-text-muted break-words`},hu={class:`meta-row`},gu={class:`text-text-muted break-words`},_u={__name:`SessionCard`,props:{session:{type:Object,required:!0}},emits:[`summary-hover`,`summary-move`,`summary-leave`,`summary-touchstart`],setup(e){let t=e,n=Y(()=>Gl(t.session.source||`copilot`)),r=Y(()=>{let e=`/${n.value}/session/${t.session.id}`;return t.session._customDirId?`${e}?dirId=${encodeURIComponent(t.session._customDirId)}`:e}),i=Y(()=>t.session._customDirColor?{borderLeft:`3px solid ${t.session._customDirColor}`}:{}),a=Y(()=>{let e=t.session.summary;return e&&e!==`No summary`&&e!==`Legacy session`}),o=Y(()=>(t.session.summary||``).replace(/\n+/g,` `)),s=Y(()=>t.session.selectedModel?t.session.selectedModel.replace(`claude-`,``).replace(`gpt-`,``).replace(`gemini-`,``):``),c=Y(()=>{let e=t.session.selectedModel||``;return e.includes(`claude`)?{background:`rgba(204, 120, 92, 0.15)`,color:`#e8956f`}:e.includes(`gpt`)?{background:`rgba(16, 163, 127, 0.15)`,color:`#1ec99d`}:e.includes(`gemini`)?{background:`rgba(66, 133, 244, 0.15)`,color:`#5e9aff`}:{background:`rgba(139, 92, 246, 0.15)`,color:`#a78bfa`}}),l={"source-copilot":{bg:`rgba(88, 166, 255, 0.15)`,color:`#58a6ff`},"source-claude":{bg:`rgba(204, 120, 92, 0.15)`,color:`#e8956f`},"source-pi-mono":{bg:`rgba(138, 102, 204, 0.15)`,color:`#a78bdb`},"source-vscode":{bg:`rgba(0, 122, 204, 0.15)`,color:`#4fc3f7`},"source-modernize":{bg:`rgba(76, 175, 80, 0.15)`,color:`#66bb6a`}},u=Y(()=>{let e=l[t.session.sourceBadgeClass||`source-copilot`]||l[`source-copilot`];return{classes:``,style:{background:e.bg,color:e.color}}}),d=Y(()=>t.session.createdAt?new Date(t.session.createdAt).toLocaleString(`en-US`,{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1}):`unknown`),f=[`#3b82f6`,`#10b981`,`#f59e0b`,`#ef4444`,`#8b5cf6`,`#ec4899`,`#06b6d4`,`#f97316`];function p(e){let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return f[Math.abs(t)%f.length]}function m(e){if(!e||e<0)return`—`;let t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60);return r>0?`${r}h ${n%60}m`:n>0?`${n}m ${t%60}s`:`${t}s`}return(t,n)=>{let l=Nr(`router-link`);return U(),da(l,{"data-testid":`session-card`,to:r.value,class:P([`block bg-surface border border-border rounded-lg py-3 px-4 text-text-secondary no-underline transition-all min-h-[140px] overflow-hidden min-w-0 hover:border-accent hover:bg-surface-alt hover:-translate-y-0.5 hover:shadow-[0_4px_12px_rgba(88,166,255,0.2)]`,e.session.sessionStatus===`wip`?`border-warning border-l-[3px] border-l-warning hover:border-warning hover:border-l-[#e8b634]`:``]),style:j(i.value)},{default:Nn(()=>[G(`div`,Kl,[G(`span`,{class:`overflow-hidden text-ellipsis whitespace-nowrap flex-1 min-w-0`,title:e.session.id},F(e.session.id),9,ql)]),G(`div`,Jl,[G(`div`,Yl,[G(`span`,{class:P([`version-badge-pill`,u.value.classes]),style:j(u.value.style),title:e.session.sourceName||`Copilot`},F(e.session.sourceName||`Copilot`),15,Xl),e.session.sessionStatus===`wip`?(U(),W(`span`,Zl,`🔄 WIP`)):J(``,!0),e.session.isImported?(U(),W(`span`,Ql,`📥`)):J(``,!0),e.session.hasInsight?(U(),W(`span`,$l,`💡`)):J(``,!0),e.session.selectedModel?(U(),W(`span`,{key:3,class:`version-badge-pill`,style:j(c.value),title:`Model: ${e.session.selectedModel}`},F(s.value),13,eu)):J(``,!0),e.session.source===`modernize`&&e.session.modernizeVersion?(U(),W(`span`,tu,F(e.session.modernizeVersion),1)):e.session.copilotVersion?(U(),W(`span`,nu,F(e.session.copilotVersion),1)):J(``,!0),e.session.agentName?(U(),W(`span`,{key:6,class:`version-badge`,title:`Agent: ${e.session.agentName}`},`🤖 `+F(e.session.agentName),9,ru)):J(``,!0)]),e.session.tags&&e.session.tags.length>0?(U(),W(`div`,iu,[(U(!0),W(H,null,zr(e.session.tags,e=>(U(),W(`span`,{key:e,class:`inline-block py-[3px] px-2 rounded-[10px] text-2xs font-medium text-white`,style:j({backgroundColor:p(e)}),title:e},F(e),13,au))),128))])):J(``,!0)]),a.value?(U(),W(`div`,{key:0,class:`text-text text-md font-medium leading-relaxed mb-3 break-words line-clamp-3 cursor-help`,title:e.session.summary,onMouseenter:n[0]||=e=>t.$emit(`summary-hover`,e),onMousemove:n[1]||=e=>t.$emit(`summary-move`,e),onMouseleave:n[2]||=e=>t.$emit(`summary-leave`),onTouchstart:n[3]||=e=>t.$emit(`summary-touchstart`,e)},F(o.value),41,ou)):(U(),W(`div`,su,` No summary available `)),n[8]||=G(`div`,{class:`h-px bg-surface-hover my-3`},null,-1),G(`div`,cu,[e.session.workspace&&e.session.workspace.cwd?(U(),W(`div`,{key:0,class:`meta-row basis-full`,title:e.session.workspace.cwd},[n[4]||=G(`svg`,{class:`meta-icon`,viewBox:`0 0 16 16`,fill:`currentColor`},[G(`path`,{d:`M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3H7.5a.25.25 0 01-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75z`})],-1),G(`span`,uu,F(e.session.workspace.cwd),1)],8,lu)):J(``,!0),G(`div`,du,[n[5]||=G(`svg`,{class:`meta-icon`,viewBox:`0 0 16 16`,fill:`currentColor`},[G(`path`,{d:`M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm7-3.25v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5a.75.75 0 0 1 1.5 0Z`})],-1),G(`span`,fu,F(d.value),1)]),e.session.duration?(U(),W(`div`,pu,[n[6]||=G(`svg`,{class:`meta-icon`,viewBox:`0 0 16 16`,fill:`currentColor`},[G(`path`,{d:`M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM7.25 12.5v-5A.75.75 0 0 1 8 6.75h2.5a.75.75 0 0 1 0 1.5H8.75v4.25a.75.75 0 0 1-1.5 0Z`})],-1),G(`span`,mu,F(m(e.session.duration)),1)])):J(``,!0),G(`div`,hu,[n[7]||=G(`svg`,{class:`meta-icon`,viewBox:`0 0 16 16`,fill:`currentColor`},[G(`path`,{d:`M7.72.72a.75.75 0 0 1 1.06 0l1.5 1.5a.75.75 0 0 1-1.06 1.06l-.22-.22v1.69a.75.75 0 0 1-1.5 0V3.06l-.22.22a.75.75 0 0 1-1.06-1.06ZM2 7a.75.75 0 0 0 0 1.5h3.69l-.22.22a.75.75 0 1 0 1.06 1.06l1.5-1.5a.75.75 0 0 0 0-1.06l-1.5-1.5a.75.75 0 0 0-1.06 1.06l.22.22Zm8.53-.28a.75.75 0 0 0 0 1.06l1.5 1.5a.75.75 0 1 0 1.06-1.06l-.22-.22H16a.75.75 0 0 0 0-1.5h-3.13l.22-.22a.75.75 0 0 0-1.06-1.06ZM7.72 12.22a.75.75 0 0 1 1.06 0l1.5 1.5a.75.75 0 1 1-1.06 1.06l-.22-.22v1.69a.75.75 0 0 1-1.5 0v-1.69l-.22.22a.75.75 0 0 1-1.06-1.06Z`})],-1),G(`span`,gu,F(e.session.eventCount||0)+` events`,1)])])]),_:1},8,[`to`,`class`,`style`])}}};function vu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yu(e){if(Array.isArray(e))return e}function bu(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function xu(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Su(e,t){return yu(e)||bu(e,t)||Cu(e,t)||xu()}function Cu(e,t){if(e){if(typeof e==`string`)return vu(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vu(e,t):void 0}}var wu=Object.entries,Tu=Object.setPrototypeOf,Eu=Object.isFrozen,Du=Object.getPrototypeOf,Ou=Object.getOwnPropertyDescriptor,ku=Object.freeze,Au=Object.seal,ju=Object.create,Mu=typeof Reflect<`u`&&Reflect,Nu=Mu.apply,Pu=Mu.construct;ku||=function(e){return e},Au||=function(e){return e},Nu||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Pu||=function(e){return new e(...[...arguments].slice(1))};var Fu=td(Array.prototype.forEach),Iu=td(Array.prototype.lastIndexOf),Lu=td(Array.prototype.pop),Ru=td(Array.prototype.push),zu=td(Array.prototype.splice),Bu=Array.isArray,Vu=td(String.prototype.toLowerCase),Hu=td(String.prototype.toString),Uu=td(String.prototype.match),Wu=td(String.prototype.replace),Gu=td(String.prototype.indexOf),Ku=td(String.prototype.trim),qu=td(Number.prototype.toString),Ju=td(Boolean.prototype.toString),Yu=typeof BigInt>`u`?null:td(BigInt.prototype.toString),Xu=typeof Symbol>`u`?null:td(Symbol.prototype.toString),Zu=td(Object.prototype.hasOwnProperty),Qu=td(Object.prototype.toString),$u=td(RegExp.prototype.test),ed=nd(TypeError);function td(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return Nu(e,t,n)}}function nd(e){return function(){return Pu(e,[...arguments])}}function Z(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vu;if(Tu&&Tu(e,null),!Bu(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Eu(t)||(t[r]=e),i=e)}e[i]=!0}return e}function rd(e){for(let t=0;t<e.length;t++)Zu(e,t)||(e[t]=null);return e}function id(e){let t=ju(null);for(let r of wu(e)){var n=Su(r,2);let i=n[0],a=n[1];Zu(e,i)&&(Bu(a)?t[i]=rd(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=id(a):t[i]=a)}return t}function ad(e){switch(typeof e){case`string`:return e;case`number`:return qu(e);case`boolean`:return Ju(e);case`bigint`:return Yu?Yu(e):`0`;case`symbol`:return Xu?Xu(e):`Symbol()`;case`undefined`:return Qu(e);case`function`:case`object`:{if(e===null)return Qu(e);let t=e,n=od(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Qu(e)}return Qu(e)}default:return Qu(e)}}function od(e,t){for(;e!==null;){let n=Ou(e,t);if(n){if(n.get)return td(n.get);if(typeof n.value==`function`)return td(n.value)}e=Du(e)}function n(){return null}return n}function sd(e){try{return $u(e,``),!0}catch{return!1}}var cd=ku(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),ld=ku(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),ud=ku([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),dd=ku([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),fd=ku(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),pd=ku([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),md=ku([`#text`]),hd=ku(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),gd=ku(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),_d=ku(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),vd=ku([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),yd=Au(/{{[\w\W]*|^[\w\W]*}}/g),bd=Au(/<%[\w\W]*|^[\w\W]*%>/g),xd=Au(/\${[\w\W]*/g),Sd=Au(/^data-[\-\w.\u00B7-\uFFFF]+$/),Cd=Au(/^aria-[\-\w]+$/),wd=Au(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Td=Au(/^(?:\w+script|data):/i),Ed=Au(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dd=Au(/^html$/i),Od=Au(/^[a-z][.\w]*(-[.\w]+)+$/i),kd={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ad=function(){return typeof window>`u`?null:window},jd=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Md=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Nd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ad(),t=e=>Nd(e);if(t.version=`3.4.5`,t.removed=[],!e||!e.document||e.document.nodeType!==kd.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript,a=e.DocumentFragment,o=e.HTMLTemplateElement,s=e.Node,c=e.Element,l=e.NodeFilter,u=e.NamedNodeMap,d=u===void 0?e.NamedNodeMap||e.MozNamedAttrMap:u,f=e.HTMLFormElement,p=e.DOMParser,m=e.trustedTypes,h=c.prototype,g=od(h,`cloneNode`),_=od(h,`remove`),v=od(h,`nextSibling`),y=od(h,`childNodes`),b=od(h,`parentNode`),x=s&&s.prototype?od(s.prototype,`nodeType`):null;if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let S,C=``,w=n,T=w.implementation,ee=w.createNodeIterator,te=w.createDocumentFragment,E=w.getElementsByTagName,ne=r.importNode,D=Md();t.isSupported=typeof wu==`function`&&typeof b==`function`&&T&&T.createHTMLDocument!==void 0;let re=yd,O=bd,k=xd,ie=Sd,A=Cd,ae=Td,oe=Ed,se=Od,j=wd,M=null,ce=Z({},[...cd,...ld,...ud,...fd,...md]),N=null,le=Z({},[...hd,...gd,..._d,...vd]),P=Object.seal(ju(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ue=null,de=null,fe=Object.seal(ju(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),pe=!0,me=!0,he=!1,ge=!0,F=!1,_e=!0,ve=!1,I=!1,ye=!1,be=!1,xe=!1,Se=!1,L=!0,Ce=!1,we=`user-content-`,Te=!0,Ee=!1,De={},Oe=null,ke=Z({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Ae=null,je=Z({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Me=null,Ne=Z({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Pe=`http://www.w3.org/1998/Math/MathML`,Fe=`http://www.w3.org/2000/svg`,Ie=`http://www.w3.org/1999/xhtml`,Le=Ie,Re=!1,ze=null,Be=Z({},[Pe,Fe,Ie],Hu),Ve=Z({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),He=Z({},[`annotation-xml`]),Ue=Z({},[`title`,`style`,`font`,`a`,`script`]),We=null,Ge=[`application/xhtml+xml`,`text/html`],R=null,Ke=null,qe=n.createElement(`form`),Je=function(e){return e instanceof RegExp||e instanceof Function},Ye=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ke&&Ke===e)return;(!e||typeof e!=`object`)&&(e={}),e=id(e),We=Ge.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,R=We===`application/xhtml+xml`?Hu:Vu,M=Zu(e,`ALLOWED_TAGS`)&&Bu(e.ALLOWED_TAGS)?Z({},e.ALLOWED_TAGS,R):ce,N=Zu(e,`ALLOWED_ATTR`)&&Bu(e.ALLOWED_ATTR)?Z({},e.ALLOWED_ATTR,R):le,ze=Zu(e,`ALLOWED_NAMESPACES`)&&Bu(e.ALLOWED_NAMESPACES)?Z({},e.ALLOWED_NAMESPACES,Hu):Be,Me=Zu(e,`ADD_URI_SAFE_ATTR`)&&Bu(e.ADD_URI_SAFE_ATTR)?Z(id(Ne),e.ADD_URI_SAFE_ATTR,R):Ne,Ae=Zu(e,`ADD_DATA_URI_TAGS`)&&Bu(e.ADD_DATA_URI_TAGS)?Z(id(je),e.ADD_DATA_URI_TAGS,R):je,Oe=Zu(e,`FORBID_CONTENTS`)&&Bu(e.FORBID_CONTENTS)?Z({},e.FORBID_CONTENTS,R):ke,ue=Zu(e,`FORBID_TAGS`)&&Bu(e.FORBID_TAGS)?Z({},e.FORBID_TAGS,R):id({}),de=Zu(e,`FORBID_ATTR`)&&Bu(e.FORBID_ATTR)?Z({},e.FORBID_ATTR,R):id({}),De=Zu(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?id(e.USE_PROFILES):e.USE_PROFILES:!1,pe=e.ALLOW_ARIA_ATTR!==!1,me=e.ALLOW_DATA_ATTR!==!1,he=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,F=e.SAFE_FOR_TEMPLATES||!1,_e=e.SAFE_FOR_XML!==!1,ve=e.WHOLE_DOCUMENT||!1,be=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Se=e.RETURN_TRUSTED_TYPE||!1,ye=e.FORCE_BODY||!1,L=e.SANITIZE_DOM!==!1,Ce=e.SANITIZE_NAMED_PROPS||!1,Te=e.KEEP_CONTENT!==!1,Ee=e.IN_PLACE||!1,j=sd(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:wd,Le=typeof e.NAMESPACE==`string`?e.NAMESPACE:Ie,Ve=Zu(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?id(e.MATHML_TEXT_INTEGRATION_POINTS):Z({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),He=Zu(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?id(e.HTML_INTEGRATION_POINTS):Z({},[`annotation-xml`]);let t=Zu(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?id(e.CUSTOM_ELEMENT_HANDLING):ju(null);if(P=ju(null),Zu(t,`tagNameCheck`)&&Je(t.tagNameCheck)&&(P.tagNameCheck=t.tagNameCheck),Zu(t,`attributeNameCheck`)&&Je(t.attributeNameCheck)&&(P.attributeNameCheck=t.attributeNameCheck),Zu(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(P.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),F&&(me=!1),xe&&(be=!0),De&&(M=Z({},md),N=ju(null),De.html===!0&&(Z(M,cd),Z(N,hd)),De.svg===!0&&(Z(M,ld),Z(N,gd),Z(N,vd)),De.svgFilters===!0&&(Z(M,ud),Z(N,gd),Z(N,vd)),De.mathMl===!0&&(Z(M,fd),Z(N,_d),Z(N,vd))),fe.tagCheck=null,fe.attributeCheck=null,Zu(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?fe.tagCheck=e.ADD_TAGS:Bu(e.ADD_TAGS)&&(M===ce&&(M=id(M)),Z(M,e.ADD_TAGS,R))),Zu(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?fe.attributeCheck=e.ADD_ATTR:Bu(e.ADD_ATTR)&&(N===le&&(N=id(N)),Z(N,e.ADD_ATTR,R))),Zu(e,`ADD_URI_SAFE_ATTR`)&&Bu(e.ADD_URI_SAFE_ATTR)&&Z(Me,e.ADD_URI_SAFE_ATTR,R),Zu(e,`FORBID_CONTENTS`)&&Bu(e.FORBID_CONTENTS)&&(Oe===ke&&(Oe=id(Oe)),Z(Oe,e.FORBID_CONTENTS,R)),Zu(e,`ADD_FORBID_CONTENTS`)&&Bu(e.ADD_FORBID_CONTENTS)&&(Oe===ke&&(Oe=id(Oe)),Z(Oe,e.ADD_FORBID_CONTENTS,R)),Te&&(M[`#text`]=!0),ve&&Z(M,[`html`,`head`,`body`]),M.table&&(Z(M,[`tbody`]),delete ue.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ed(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ed(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);S=e.TRUSTED_TYPES_POLICY,C=S.createHTML(``)}else S===void 0&&(S=jd(m,i)),S!==null&&typeof C==`string`&&(C=S.createHTML(``));ku&&ku(e),Ke=e},Xe=Z({},[...ld,...ud,...dd]),Ze=Z({},[...fd,...pd]),Qe=function(e){let t=b(e);(!t||!t.tagName)&&(t={namespaceURI:Le,tagName:`template`});let n=Vu(e.tagName),r=Vu(t.tagName);return ze[e.namespaceURI]?e.namespaceURI===Fe?t.namespaceURI===Ie?n===`svg`:t.namespaceURI===Pe?n===`svg`&&(r===`annotation-xml`||Ve[r]):!!Xe[n]:e.namespaceURI===Pe?t.namespaceURI===Ie?n===`math`:t.namespaceURI===Fe?n===`math`&&He[r]:!!Ze[n]:e.namespaceURI===Ie?t.namespaceURI===Fe&&!He[r]||t.namespaceURI===Pe&&!Ve[r]?!1:!Ze[n]&&(Ue[n]||!Xe[n]):!!(We===`application/xhtml+xml`&&ze[e.namespaceURI]):!1},$e=function(e){Ru(t.removed,{element:e});try{b(e).removeChild(e)}catch{_(e)}},et=function(e,n){try{Ru(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Ru(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(be||xe)try{$e(n)}catch{}else try{n.setAttribute(e,``)}catch{}},tt=function(e){let t=null,r=null;if(ye)e=`<remove></remove>`+e;else{let t=Uu(e,/^[\r\n\t ]+/);r=t&&t[0]}We===`application/xhtml+xml`&&Le===Ie&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=S?S.createHTML(e):e;if(Le===Ie)try{t=new p().parseFromString(i,We)}catch{}if(!t||!t.documentElement){t=T.createDocument(Le,`template`,null);try{t.documentElement.innerHTML=Re?C:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Le===Ie?E.call(t,ve?`html`:`body`)[0]:ve?t.documentElement:a},nt=function(e){return ee.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},rt=function(e){e.normalize();let t=ee.call(e.ownerDocument||e,e,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;){let e=n.data;Fu([re,O,k],t=>{e=Wu(e,t,` `)}),n.data=e,n=t.nextNode()}},it=function(e){return e instanceof f&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof d)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},at=function(e){if(!x||typeof e!=`object`||!e)return!1;try{return typeof x(e)==`number`}catch{return!1}};function ot(e,n,r){Fu(e,e=>{e.call(t,n,r,Ke)})}let st=function(e){let n=null;if(ot(D.beforeSanitizeElements,e,null),it(e))return $e(e),!0;let r=R(e.nodeName);if(ot(D.uponSanitizeElement,e,{tagName:r,allowedTags:M}),_e&&e.hasChildNodes()&&!at(e.firstElementChild)&&$u(/<[/\w!]/g,e.innerHTML)&&$u(/<[/\w!]/g,e.textContent)||_e&&e.namespaceURI===Ie&&r===`style`&&at(e.firstElementChild)||e.nodeType===kd.progressingInstruction||_e&&e.nodeType===kd.comment&&$u(/<[/\w]/g,e.data))return $e(e),!0;if(ue[r]||!(fe.tagCheck instanceof Function&&fe.tagCheck(r))&&!M[r]){if(!ue[r]&&ut(r)&&(P.tagNameCheck instanceof RegExp&&$u(P.tagNameCheck,r)||P.tagNameCheck instanceof Function&&P.tagNameCheck(r)))return!1;if(Te&&!Oe[r]){let t=b(e)||e.parentNode,n=y(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=g(n[i],!0);t.insertBefore(r,v(e))}}}return $e(e),!0}return e instanceof c&&!Qe(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&$u(/<\/no(script|embed|frames)/i,e.innerHTML)?($e(e),!0):(F&&e.nodeType===kd.text&&(n=e.textContent,Fu([re,O,k],e=>{n=Wu(n,e,` `)}),e.textContent!==n&&(Ru(t.removed,{element:e.cloneNode()}),e.textContent=n)),ot(D.afterSanitizeElements,e,null),!1)},ct=function(e,t,r){if(de[t]||L&&(t===`id`||t===`name`)&&(r in n||r in qe))return!1;let i=N[t]||fe.attributeCheck instanceof Function&&fe.attributeCheck(t,e);if(!(me&&!de[t]&&$u(ie,t))&&!(pe&&$u(A,t))){if(!i||de[t]){if(!(ut(e)&&(P.tagNameCheck instanceof RegExp&&$u(P.tagNameCheck,e)||P.tagNameCheck instanceof Function&&P.tagNameCheck(e))&&(P.attributeNameCheck instanceof RegExp&&$u(P.attributeNameCheck,t)||P.attributeNameCheck instanceof Function&&P.attributeNameCheck(t,e))||t===`is`&&P.allowCustomizedBuiltInElements&&(P.tagNameCheck instanceof RegExp&&$u(P.tagNameCheck,r)||P.tagNameCheck instanceof Function&&P.tagNameCheck(r))))return!1}else if(!Me[t]&&!$u(j,Wu(r,oe,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Gu(r,`data:`)===0&&Ae[e])&&!(he&&!$u(ae,Wu(r,oe,``)))&&r)return!1}return!0},lt=Z({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),ut=function(e){return!lt[Vu(e)]&&$u(se,e)},dt=function(e){ot(D.beforeSanitizeAttributes,e,null);let n=e.attributes;if(!n||it(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:N,forceKeepAttr:void 0},i=n.length;for(;i--;){let a=n[i],o=a.name,s=a.namespaceURI,c=a.value,l=R(o),u=c,d=o===`value`?u:Ku(u);if(r.attrName=l,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,ot(D.uponSanitizeAttribute,e,r),d=r.attrValue,Ce&&(l===`id`||l===`name`)&&Gu(d,we)!==0&&(et(o,e),d=we+d),_e&&$u(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){et(o,e);continue}if(l===`attributename`&&Uu(d,`href`)){et(o,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){et(o,e);continue}if(!ge&&$u(/\/>/i,d)){et(o,e);continue}F&&Fu([re,O,k],e=>{d=Wu(d,e,` `)});let f=R(e.nodeName);if(!ct(f,l,d)){et(o,e);continue}if(S&&typeof m==`object`&&typeof m.getAttributeType==`function`&&!s)switch(m.getAttributeType(f,l)){case`TrustedHTML`:d=S.createHTML(d);break;case`TrustedScriptURL`:d=S.createScriptURL(d);break}if(d!==u)try{s?e.setAttributeNS(s,o,d):e.setAttribute(o,d),it(e)?$e(e):Lu(t.removed)}catch{et(o,e)}}ot(D.afterSanitizeAttributes,e,null)},ft=function(e){let t=null,n=nt(e);for(ot(D.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)ot(D.uponSanitizeShadowNode,t,null),st(t),dt(t),t.content instanceof a&&ft(t.content);ot(D.afterSanitizeShadowDOM,e,null)},pt=function(e){if(e.nodeType===kd.element&&e.shadowRoot instanceof a){let t=e.shadowRoot;pt(t),ft(t)}let t=e.childNodes;if(!t)return;let n=[];Fu(t,e=>{Ru(n,e)});for(let e of n)pt(e)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,s=null,c=null;if(Re=!e,Re&&(e=`<!-->`),typeof e!=`string`&&!at(e)&&(e=ad(e),typeof e!=`string`))throw ed(`dirty is not a string, aborting`);if(!t.isSupported)return e;if(I||Ye(n),t.removed=[],typeof e==`string`&&(Ee=!1),Ee){let t=e.nodeName;if(typeof t==`string`){let e=R(t);if(!M[e]||ue[e])throw ed(`root node is forbidden and cannot be sanitized in-place`)}pt(e)}else if(at(e))i=tt(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===kd.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o),pt(o);else{if(!be&&!F&&!ve&&e.indexOf(`<`)===-1)return S&&Se?S.createHTML(e):e;if(i=tt(e),!i)return be?null:Se?C:``}i&&ye&&$e(i.firstChild);let l=nt(Ee?e:i);for(;s=l.nextNode();)st(s),dt(s),s.content instanceof a&&ft(s.content);if(Ee)return F&&rt(e),e;if(be){if(F&&rt(i),xe)for(c=te.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(N.shadowroot||N.shadowrootmode)&&(c=ne.call(r,c,!0)),c}let u=ve?i.outerHTML:i.innerHTML;return ve&&M[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&$u(Dd,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
3
+ `+u),F&&Fu([re,O,k],e=>{u=Wu(u,e,` `)}),S&&Se?S.createHTML(u):u},t.setConfig=function(){Ye(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),I=!0},t.clearConfig=function(){Ke=null,I=!1},t.isValidAttribute=function(e,t,n){return Ke||Ye({}),ct(R(e),R(t),n)},t.addHook=function(e,t){typeof t==`function`&&Ru(D[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=Iu(D[e],t);return n===-1?void 0:zu(D[e],n,1)[0]}return Lu(D[e])},t.removeHooks=function(e){D[e]=[]},t.removeAllHooks=function(){D=Md()},t}var Pd=Nd();function Fd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Id=Fd();function Ld(e){Id=e}var Rd={exec:()=>null};function zd(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function Q(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Vd.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Bd=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),Vd={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:zd(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:zd(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:zd(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:zd(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:zd(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:zd(e=>RegExp(`^ {0,${e}}>`))},Hd=/^(?:[ \t]*(?:\n|$))+/,Ud=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Wd=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Kd=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,qd=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Jd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Yd=Q(Jd).replace(/bull/g,qd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Xd=Q(Jd).replace(/bull/g,qd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Zd=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Qd=/^[^\n]+/,$d=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ef=Q(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,$d).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),tf=Q(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,qd).getRegex(),nf=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,rf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,af=Q(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,rf).replace(`tag`,nf).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),of=Q(Zd).replace(`hr`,Gd).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,nf).getRegex(),sf={blockquote:Q(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,of).getRegex(),code:Ud,def:ef,fences:Wd,heading:Kd,hr:Gd,html:af,lheading:Yd,list:tf,newline:Hd,paragraph:of,table:Rd,text:Qd},cf=Q(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Gd).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,nf).getRegex(),lf={...sf,lheading:Xd,table:cf,paragraph:Q(Zd).replace(`hr`,Gd).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,cf).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,nf).getRegex()},uf={...sf,html:Q(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,rf).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Rd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Q(Zd).replace(`hr`,Gd).replace(`heading`,` *#{1,6} *[^
4
+ ]`).replace(`lheading`,Yd).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},df=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ff=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pf=/^( {2,}|\\)\n(?!\s*$)/,mf=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,hf=/[\p{P}\p{S}]/u,gf=/[\s\p{P}\p{S}]/u,_f=/[^\s\p{P}\p{S}]/u,vf=Q(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,gf).getRegex(),yf=/(?!~)[\p{P}\p{S}]/u,bf=/(?!~)[\s\p{P}\p{S}]/u,xf=/(?:[^\s\p{P}\p{S}]|~)/u,Sf=Q(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Bd?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Cf=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,wf=Q(Cf,`u`).replace(/punct/g,hf).getRegex(),Tf=Q(Cf,`u`).replace(/punct/g,yf).getRegex(),Ef=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Df=Q(Ef,`gu`).replace(/notPunctSpace/g,_f).replace(/punctSpace/g,gf).replace(/punct/g,hf).getRegex(),Of=Q(Ef,`gu`).replace(/notPunctSpace/g,xf).replace(/punctSpace/g,bf).replace(/punct/g,yf).getRegex(),kf=Q(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,_f).replace(/punctSpace/g,gf).replace(/punct/g,hf).getRegex(),Af=Q(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,hf).getRegex(),jf=Q(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,_f).replace(/punctSpace/g,gf).replace(/punct/g,hf).getRegex(),Mf=Q(/\\(punct)/,`gu`).replace(/punct/g,hf).getRegex(),Nf=Q(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Pf=Q(rf).replace(`(?:-->|$)`,`-->`).getRegex(),Ff=Q(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Pf).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),If=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Lf=Q(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,If).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Rf=Q(/^!?\[(label)\]\[(ref)\]/).replace(`label`,If).replace(`ref`,$d).getRegex(),zf=Q(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,$d).getRegex(),Bf=Q(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Rf).replace(`nolink`,zf).getRegex(),Vf=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Hf={_backpedal:Rd,anyPunctuation:Mf,autolink:Nf,blockSkip:Sf,br:pf,code:ff,del:Rd,delLDelim:Rd,delRDelim:Rd,emStrongLDelim:wf,emStrongRDelimAst:Df,emStrongRDelimUnd:kf,escape:df,link:Lf,nolink:zf,punctuation:vf,reflink:Rf,reflinkSearch:Bf,tag:Ff,text:mf,url:Rd},Uf={...Hf,link:Q(/^!?\[(label)\]\((.*?)\)/).replace(`label`,If).getRegex(),reflink:Q(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,If).getRegex()},Wf={...Hf,emStrongRDelimAst:Of,emStrongLDelim:Tf,delLDelim:Af,delRDelim:jf,url:Q(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Vf).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Q(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,Vf).getRegex()},Gf={...Wf,br:Q(pf).replace(`{2,}`,`*`).getRegex(),text:Q(Wf.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Kf={normal:sf,gfm:lf,pedantic:uf},qf={normal:Hf,gfm:Wf,breaks:Gf,pedantic:Uf},Jf={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Yf=e=>Jf[e];function Xf(e,t){if(t){if(Vd.escapeTest.test(e))return e.replace(Vd.escapeReplace,Yf)}else if(Vd.escapeTestNoEncode.test(e))return e.replace(Vd.escapeReplaceNoEncode,Yf);return e}function Zf(e){try{e=encodeURI(e).replace(Vd.percentDecode,`%`)}catch{return null}return e}function Qf(e,t){let n=e.replace(Vd.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Vd.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(Vd.slashPipe,`|`);return n}function $f(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function ep(e){let t=e.split(`
5
+ `),n=t.length-1;for(;n>=0&&Vd.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
6
+ `)}function tp(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function np(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function rp(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function ip(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
7
+ `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
8
+ `)}var ap=class{options;rules;lexer;constructor(e){this.options=e||Id}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:ep(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=ip(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=$f(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:$f(t[0],`
9
+ `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:$f(t[0],`
10
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=$f(t[0],`
11
+ `).split(`
12
+ `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
13
+ `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
14
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
15
+ ${s}`:s,r=r?`${r}
16
+ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
17
+ `+e.join(`
18
+ `),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
19
+ `+e.join(`
20
+ `),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
21
+ `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=np(t[2].split(`
22
+ `,1)[0],t[1].length),l=e.split(`
23
+ `,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
24
+ `,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
25
+ `,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
26
+ `+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
27
+ `+l}u=!l.trim(),r+=p+`
28
+ `,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]);let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1;if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=ep(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:$f(t[0],`
29
+ `),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Qf(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
30
+ `):[],a={type:`table`,raw:$f(t[0],`
31
+ `),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Qf(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:$f(t[0],`
32
+ `),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
33
+ `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=$f(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=tp(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),rp(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return rp(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},op=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Id,this.options.tokenizer=this.options.tokenizer||new ap,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Vd,block:Kf.normal,inline:qf.normal};this.options.pedantic?(t.block=Kf.pedantic,t.inline=qf.pedantic):this.options.gfm&&(t.block=Kf.gfm,this.options.breaks?t.inline=qf.breaks:t.inline=qf.gfm),this.tokenizer.rules=t}static get rules(){return{block:Kf,inline:qf}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Vd.carriageReturn,`
34
+ `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Vd.tabCharGlobal,` `).replace(Vd.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
35
+ `:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
36
+ `)?``:`
37
+ `)+i.raw,n.text+=`
38
+ `+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
39
+ `)?``:`
40
+ `)+i.raw,n.text+=`
41
+ `+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
42
+ `)?``:`
43
+ `)+i.raw,r.text+=`
44
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
45
+ `)?``:`
46
+ `)+i.raw,n.text+=`
47
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``,s=1/0;for(;e;){if(e.length<s)s=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},sp=class{options;parser;constructor(e){this.options=e||Id}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Vd.notSpaceStart)?.[0],i=e.replace(Vd.endingNewline,``)+`
48
+ `;return r?`<pre><code class="language-`+Xf(r)+`">`+(n?i:Xf(i,!0))+`</code></pre>
49
+ `:`<pre><code>`+(n?i:Xf(i,!0))+`</code></pre>
50
+ `}blockquote({tokens:e}){return`<blockquote>
51
+ ${this.parser.parse(e)}</blockquote>
52
+ `}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
53
+ `}hr(e){return`<hr>
54
+ `}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
55
+ `+r+`</`+i+`>
56
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
57
+ `}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
58
+ `}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
59
+ <thead>
60
+ `+t+`</thead>
61
+ `+r+`</table>
62
+ `}tablerow({text:e}){return`<tr>
63
+ ${e}</tr>
64
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
65
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Xf(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Zf(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+Xf(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Zf(e);if(i===null)return Xf(n);e=i;let a=`<img src="${e}" alt="${Xf(n)}"`;return t&&(a+=` title="${Xf(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Xf(e.text)}},cp=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},lp=class e{options;renderer;textRenderer;constructor(e){this.options=e||Id,this.options.renderer=this.options.renderer||new sp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new cp}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},up=class{options;block;constructor(e){this.options=e||Id}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?op.lex:op.lexInline}provideParser(e=this.block){return e?lp.parse:lp.parseInline}},dp=new class{defaults=Fd();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=lp;Renderer=sp;TextRenderer=cp;Lexer=op;Tokenizer=ap;Hooks=up;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new sp(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new ap(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new up;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];up.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&up.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return op.lex(e,t??this.defaults)}parser(e,t){return lp.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?op.lex:op.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?lp.parse:lp.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?op.lex:op.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?lp.parse:lp.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
66
+ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Xf(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function $(e,t){return dp.parse(e,t)}$.options=$.setOptions=function(e){return dp.setOptions(e),$.defaults=dp.defaults,Ld($.defaults),$},$.getDefaults=Fd,$.defaults=Id,$.use=function(...e){return dp.use(...e),$.defaults=dp.defaults,Ld($.defaults),$},$.walkTokens=function(e,t){return dp.walkTokens(e,t)},$.parseInline=dp.parseInline,$.Parser=lp,$.parser=lp.parse,$.Renderer=sp,$.TextRenderer=cp,$.Lexer=op,$.lexer=op.lex,$.Tokenizer=ap,$.Hooks=up,$.parse=$,$.options,$.setOptions,$.use,$.walkTokens,$.parseInline,lp.parse,op.lex;var fp=[`innerHTML`],pp={__name:`SummaryTooltip`,setup(e,{expose:t}){let n=B(null),r=B(!1),i=B(``),a=null,o=null,s=null,c=Y(()=>{let e=i.value,t=$.parse(e,{breaks:!0});return Pd.sanitize(t)});function l(e,t){clearTimeout(o),clearTimeout(a),s=t,(e.dataset.tooltipText||e.getAttribute(`title`))&&(e.getAttribute(`title`)&&(e.dataset.tooltipText=e.getAttribute(`title`),e.removeAttribute(`title`)),o=setTimeout(()=>{i.value=e.dataset.tooltipText||``,r.value=!0,s&&p(s)},500))}function u(){clearTimeout(o),a=setTimeout(()=>{r.value=!1},120)}function d(){clearTimeout(a)}function f(e){s=e,r.value&&p(e)}function p(e){let t=n.value;if(!t)return;let r=t.offsetWidth,i=t.offsetHeight,a=e.clientX+14,o=e.clientY+14;a+r>window.innerWidth-8&&(a=e.clientX-r-14),o+i>window.innerHeight-8&&(o=e.clientY-i-14),t.style.left=a+`px`,t.style.top=o+`px`}return t({scheduleShow:l,scheduleHide:u,cancelHide:d,onMove:f}),(e,t)=>(U(),da(nr,{to:`body`},[G(`div`,{ref_key:`tooltipEl`,ref:n,class:P([`summary-tooltip hidden fixed z-modal bg-surface-alt border border-border rounded-lg px-4 py-3 max-w-[600px] w-max max-h-[400px] overflow-y-auto text-sm leading-relaxed text-text-secondary break-words shadow-[0_8px_24px_rgba(0,0,0,0.5)] pointer-events-none`,{visible:r.value}])},[G(`div`,{innerHTML:c.value},null,8,fp)],2)]))}},mp=[`innerHTML`],hp={__name:`BottomSheet`,setup(e,{expose:t}){let n=B(!1),r=B(!1),i=B(``),a=null,o=Y(()=>{let e=i.value,t=$.parse(e,{breaks:!0});return Pd.sanitize(t)});function s(e){i.value=e,n.value=!0,vn(()=>{requestAnimationFrame(()=>{r.value=!0})})}function c(){a&&clearTimeout(a),r.value=!1,a=setTimeout(()=>{n.value=!1,a=null},280)}return Tr(()=>{a&&clearTimeout(a)}),t({open:s,close:c}),(e,t)=>(U(),da(nr,{to:`body`},[G(`div`,{class:P([`fixed inset-0 bg-black/50 z-[1000] touch-none hidden`,{"!block":n.value}]),onClick:Go(c,[`self`])},[G(`div`,{class:P([`fixed bottom-0 left-0 right-0 bg-surface border-t border-border rounded-t-2xl px-4 pb-[max(env(safe-area-inset-bottom,0px),24px)] pt-0 max-h-[70vh] overflow-y-auto z-[1001] translate-y-full transition-transform duration-[280ms] ease-[cubic-bezier(0.32,0.72,0,1)]`,{"!translate-y-0":r.value}])},[t[0]||=G(`div`,{class:`w-9 h-1 bg-surface-overlay rounded-full mx-auto mt-3 mb-4`},null,-1),G(`div`,{class:`bottom-sheet-content text-sm leading-relaxed text-text-secondary`,innerHTML:o.value},null,8,mp)],2)],2)]))}};async function gp(e){let t=`Request failed: ${e.status} ${e.statusText}`;try{let n=await e.json();n&&n.error&&(t=n.error)}catch{}return Error(t)}async function _p(){let e=await fetch(`/api/dirs`);if(!e.ok)throw await gp(e);return e.json()}async function vp(e,t){let n={path:e};t&&(n.label=t);let r=await fetch(`/api/dirs`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});if(!r.ok)throw await gp(r);return r.json()}async function yp(e){let t=await fetch(`/api/dirs/${encodeURIComponent(e)}`,{method:`DELETE`});if(t.status===204)return!0;if(t.status===404)return!1;if(!t.ok)throw await gp(t);return!0}var bp={class:`max-w-[1400px] w-full text-center mx-auto p-5`},xp={class:`bg-surface border-2 border-border rounded-xl p-2 flex gap-2 transition-colors focus-within:border-accent`},Sp={key:0,class:`mt-10 text-left`},Cp={class:`flex gap-2 mb-4 flex-wrap`},wp=[`onClick`],Tp={key:0,class:`mb-4 text-sm`},Ep={key:0,class:`flex items-center gap-2 text-text-faint text-sm mb-1`},Dp={class:`font-mono`},Op=[`onClick`],kp={key:1,class:`hint mt-5 text-text-secondary text-sm`},Ap={class:`inline-block bg-surface py-1 px-2 rounded font-mono text-sm text-accent`},jp={ref:`sessionsContainer`},Mp={key:0,style:{"text-align":`center`,color:`#6e7681`,padding:`40px`,"font-size":`14px`}},Np={class:`text-accent text-lg font-semibold mt-8 mb-4 pb-2 first:mt-0`},Pp={"data-testid":`session-list`,class:`grid grid-cols-[repeat(auto-fill,minmax(400px,1fr))] gap-4 md:grid-cols-[repeat(auto-fill,minmax(400px,1fr))] max-md:grid-cols-1`},Fp={key:3,style:{"text-align":`center`,"margin-top":`20px`}},Ip=`sessionViewer.sourceFilter`,Lp=`customDirsV2`,Rp=`customDirs`,zp={__name:`HomeView`,setup(e){let t=$s(),n=B(``),r=B([]),i=B(!1),a=B(!1),o=B(`copilot`),s=B({}),c={},l=B({}),u=B(``),d=B(``),f=B(null),p=B(null),m=B(null),h=[{source:`copilot`,label:`Copilot CLI`},{source:`vscode`,label:`Copilot Chat`},{source:`claude`,label:`Claude`},{source:`modernize`,label:`Modernize CLI`},{source:`pi-mono`,label:`Pi`}];try{let e=localStorage.getItem(Ip);e&&h.some(t=>t.source===e)&&(o.value=e)}catch{}let g=[`#3b82f6`,`#10b981`,`#f59e0b`,`#ef4444`,`#8b5cf6`,`#ec4899`,`#06b6d4`,`#f97316`];try{localStorage.getItem(Rp)!==null&&localStorage.removeItem(Rp)}catch{}function _(){try{let e=JSON.parse(localStorage.getItem(Lp)||`[]`);return Array.isArray(e)?e:[]}catch{return[]}}function v(e){try{localStorage.setItem(Lp,JSON.stringify(e))}catch{}b.value++}function y(e){return b.value,_().filter(t=>t.source===e)}let b=B(0),x=Y(()=>y(o.value)),S=Y(()=>{let e=s.value[o.value];return e?e.dir:null});async function C(){let e=prompt(`Enter absolute directory path (e.g. /home/user/sessions):`);if(!e||!e.startsWith(`/`)&&!e.startsWith(`~`)){e&&alert(`Path must be absolute (start with / or ~)`);return}let t=o.value,n=_();if(n.some(n=>n.source===t&&n.path===e))return;let r;try{r=await vp(e)}catch(e){alert(`Could not add directory: ${e.message}`);return}let i=n.filter(e=>e.source===t).length%g.length;n.push({id:r.id,label:r.label,path:r.path,color:g[i],addedAt:r.addedAt,source:t}),v(n),T()}async function w(e){try{await yp(e)}catch(e){console.error(`Failed to remove dir on server:`,e)}v(_().filter(t=>t.id!==e)),T()}async function T(){let e=o.value;r.value=r.value.filter(t=>t.source!==e);let t=O(e);t.offset=0,t.hasMore=!0,await A(e)}let ee=Y(()=>r.value.filter(e=>e.source===o.value)),te=Y(()=>{let e={};return ee.value.forEach(t=>{let n=ne(t.createdAt);e[n]||(e[n]=[]),e[n].push(t)}),e}),E=Y(()=>Object.keys(te.value).sort((e,t)=>t.localeCompare(e)));function ne(e){if(!e)return`Unknown`;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`}function D(e){let t=new Date(e);return`${t.getFullYear()}/${String(t.getMonth()+1).padStart(2,`0`)}/${String(t.getDate()).padStart(2,`0`)}`}function re(){let e=n.value.trim();e&&t.push(`/${Gl(o.value)}/session/${e}`)}function O(e){return c[e]||(c[e]={offset:0,hasMore:!0}),c[e]}async function k(e){try{let t=await Promise.all(e.map(e=>fetch(`/api/${encodeURIComponent(Gl(e.source))}/sessions/${e.id}/tags`).then(e=>e.ok?e.json():{tags:[]}).then(t=>({id:e.id,tags:t.tags||[]})).catch(()=>({id:e.id,tags:[]})))),n={};return t.forEach(({id:e,tags:t})=>{n[e]=t}),n}catch{return{}}}async function ie(e){if(e.length===0)return;let t=await k(e);e.forEach(e=>{e.tags=t[e.id]||[]})}async function A(e){let t=O(e);if(!(t.offset>0||i.value)){i.value=!0;try{let n=await fetch(`/api/${encodeURIComponent(Gl(e))}/sessions?offset=0&limit=20`);if(n.ok){let i=await n.json(),a=new Set(r.value.map(e=>e.id)),o=[];for(let e of i.sessions||[])a.has(e.id)||(r.value.push(e),o.push(e));t.offset=(i.sessions||[]).length,t.hasMore=i.hasMore;let s=y(e);for(let t of s)try{let n=await fetch(`/api/${encodeURIComponent(Gl(e))}/sessions?dirId=${encodeURIComponent(t.id)}`);if(n.ok){let e=await n.json();for(let n of e.sessions||[])n._customDirColor=t.color,n._customDirId=t.id,a.has(n.id)||(a.add(n.id),r.value.push(n),o.push(n))}}catch(e){console.error(`Failed to load custom dir sessions:`,t.path,e)}r.value.sort((e,t)=>new Date(t.updatedAt)-new Date(e.updatedAt)),await ie(o)}}catch(t){console.error(`Failed to load sessions for source:`,e,t)}finally{i.value=!1}}}async function ae(){let e=o.value,t=O(e);if(!(i.value||!t.hasMore)){i.value=!0;try{let n=await fetch(`/api/${encodeURIComponent(Gl(e))}/sessions?offset=${t.offset}&limit=20`);if(!n.ok)throw Error(`Failed to load more sessions`);let i=await n.json(),a=new Set(r.value.map(e=>e.id)),o=[];for(let e of i.sessions)a.has(e.id)||(r.value.push(e),o.push(e));t.offset+=i.sessions.length,t.hasMore=i.hasMore,await ie(o)}catch(e){console.error(`Error loading more sessions:`,e)}finally{i.value=!1}}}async function oe(e){o.value=e;try{localStorage.setItem(Ip,e)}catch{}await A(e)}let se=null,M=null;function ce(){se||=setTimeout(()=>{let e=window.pageYOffset||document.documentElement.scrollTop,t=window.innerHeight,n=document.documentElement.scrollHeight;e+t>=n-500&&O(o.value).hasMore&&!i.value&&ae(),se=null},100)}function N(){f.value?.click()}async function le(e){let t=e.target.files[0];if(t){if(!t.name.endsWith(`.zip`)){d.value=`error`,u.value=`❌ Please select a .zip file`;return}l.value={pointerEvents:`none`,opacity:`0.5`},d.value=`loading`,u.value=`Uploading and extracting session...`;try{let e=new FormData;e.append(`zipFile`,t);let n=await fetch(`/api/import`,{method:`POST`,body:e}),i=await n.json();n.ok?(d.value=`success`,u.value=`✅ Session ${i.sessionId} imported successfully!`,M=setTimeout(async()=>{let e=o.value;r.value=r.value.filter(t=>t.source!==e);let t=O(e);t.offset=0,t.hasMore=!0,await A(e)},1500)):(d.value=`error`,u.value=`❌ Import failed: ${i.error}`,ue())}catch(e){d.value=`error`,u.value=`❌ Import failed: ${e.message}`,ue()}finally{f.value&&(f.value.value=``)}}}function ue(){l.value={}}function de(e){let t=e.target.closest(`.session-summary`);t&&p.value?.scheduleShow(t,e)}function fe(e){p.value?.onMove(e)}function pe(){p.value?.scheduleHide()}let me=null,he=!1;function ge(e){let t=e.target.closest(`.session-summary`);if(!t)return;he=!1;let n=t.dataset.tooltipText||t.getAttribute(`title`)||``;n&&(me=setTimeout(()=>{he||(e.preventDefault(),m.value?.open(n))},500))}function _e(){he=!0,clearTimeout(me)}function ve(){clearTimeout(me)}return Sr(async()=>{a.value=!0,window.addEventListener(`scroll`,ce),document.addEventListener(`touchmove`,_e,{passive:!0}),document.addEventListener(`touchend`,ve,{passive:!0}),document.addEventListener(`touchcancel`,ve,{passive:!0});try{let e=await fetch(`/api/source-hints`);e.ok&&(s.value=await e.json())}catch{}try{let e=await _p(),t=new Map(e.map(e=>[e.id,e])),n=_().filter(e=>t.has(e.id)),r=new Set(n.map(e=>e.id));for(let t of e)if(!r.has(t.id)){let e=n.length%g.length;n.push({id:t.id,label:t.label,path:t.path,color:g[e],addedAt:t.addedAt,source:`copilot`})}v(n)}catch(e){console.error(`Failed to sync registered dirs:`,e)}await A(o.value)}),Er(()=>{clearTimeout(se),clearTimeout(me),clearTimeout(M),window.removeEventListener(`scroll`,ce),document.removeEventListener(`touchmove`,_e),document.removeEventListener(`touchend`,ve),document.removeEventListener(`touchcancel`,ve)}),(e,t)=>(U(),W(`div`,bp,[t[5]||=G(`h1`,{class:`text-5xl mb-2.5 text-accent`},` 🤖 Session Viewer `,-1),t[6]||=G(`p`,{class:`text-text-secondary mb-10 text-base`},` View session logs from Copilot CLI, Copilot Chat, Claude Code, and Pi-Mono `,-1),G(`form`,{onSubmit:Go(re,[`prevent`])},[G(`div`,xp,[Pn(G(`input`,{"onUpdate:modelValue":t[0]||=e=>n.value=e,type:`text`,class:`flex-1 py-4 px-5 min-h-11 bg-transparent border-none text-text-secondary text-base font-mono focus:outline-none placeholder:text-text-faint focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2`,placeholder:`Enter Session ID...`,autofocus:``,required:``},null,512),[[Ho,n.value]]),t[1]||=G(`button`,{type:`submit`,class:`py-4 px-8 min-h-11 bg-success-emphasis border-none rounded-lg text-white text-base font-semibold cursor-pointer transition-all hover:bg-success-emphasis hover:scale-[1.02] active:scale-[0.98] focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2`},` View `,-1)])],32),r.value.length>0||a.value?(U(),W(`div`,Sp,[G(`div`,Cp,[(U(),W(H,null,zr(h,e=>G(`button`,{key:e.source,class:P([`filter-pill`,o.value===e.source?`bg-accent !border-accent !text-white`:`bg-surface-hover`]),"data-testid":`source-pill`,onClick:t=>oe(e.source)},F(e.label),11,wp)),64))]),S.value||x.value.length>0?(U(),W(`div`,Tp,[S.value?(U(),W(`div`,Ep,[G(`span`,null,`📂 `+F(S.value),1),G(`button`,{"data-testid":`add-dir-btn`,class:`text-accent cursor-pointer hover:text-link bg-transparent border-none p-0 text-sm`,title:`Add custom directory`,onClick:C},` + `),G(`button`,{"data-testid":`import-btn`,class:`text-accent cursor-pointer hover:text-link bg-transparent border-none p-0 text-sm`,title:`Import session from zip`,style:j(l.value),onClick:N},` 📤 `,4)])):J(``,!0),(U(!0),W(H,null,zr(x.value,e=>(U(),W(`div`,{key:e.id,class:`flex items-center gap-2 text-sm text-text-secondary mb-1`},[G(`span`,{class:`inline-block w-2.5 h-2.5 rounded-full`,style:j({backgroundColor:e.color})},null,4),G(`span`,Dp,F(e.path),1),G(`button`,{"data-testid":`remove-dir-btn`,class:`text-text-faint hover:text-error-text bg-transparent border-none cursor-pointer p-0 text-xs`,onClick:t=>w(e.id)},` × `,8,Op)]))),128))])):J(``,!0),o.value?(U(),W(`p`,kp,[t[2]||=q(` Showing `,-1),G(`span`,Ap,F(o.value),1),t[3]||=q(` sessions `,-1)])):J(``,!0),G(`input`,{ref_key:`fileInputRef`,ref:f,type:`file`,accept:`.zip`,style:{display:`none`},onChange:le},null,544),u.value?(U(),W(`div`,{key:2,class:P([`mb-3 py-2.5 px-3 rounded-md text-sm`,d.value===`success`?`bg-success-subtle border border-success-emphasis text-success`:``,d.value===`error`?`bg-danger-subtle border border-danger-emphasis text-error-text`:``,d.value===`loading`?`bg-accent-subtle border border-accent text-accent`:``])},F(u.value),3)):J(``,!0),G(`div`,jp,[ee.value.length===0&&!i.value?(U(),W(`div`,Mp,` No sessions found for this filter. `)):(U(!0),W(H,{key:1},zr(E.value,e=>(U(),W(H,{key:e},[G(`div`,Np,F(D(te.value[e][0].createdAt)),1),G(`div`,Pp,[(U(!0),W(H,null,zr(te.value[e],e=>(U(),da(_u,{key:e.id,session:e,onSummaryHover:de,onSummaryMove:fe,onSummaryLeave:pe,onSummaryTouchstart:ge},null,8,[`session`]))),128))])],64))),128))],512),i.value?(U(),W(`div`,Fp,[...t[4]||=[G(`div`,{class:`loading-spinner`},` Loading more sessions... `,-1)]])):J(``,!0)])):J(``,!0),K(pp,{ref_key:`tooltipRef`,ref:p},null,512),K(hp,{ref_key:`bottomSheetRef`,ref:m},null,512)]))}};function Bp(){var e=window.navigator.userAgent,t=e.indexOf(`MSIE `);if(t>0)return parseInt(e.substring(t+5,e.indexOf(`.`,t)),10);if(e.indexOf(`Trident/`)>0){var n=e.indexOf(`rv:`);return parseInt(e.substring(n+3,e.indexOf(`.`,n)),10)}var r=e.indexOf(`Edge/`);return r>0?parseInt(e.substring(r+5,e.indexOf(`.`,r)),10):-1}var Vp;function Hp(){Hp.init||(Hp.init=!0,Vp=Bp()!==-1)}var Up={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){Hp(),vn(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e=document.createElement(`object`);this._resizeObject=e,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`tabindex`,-1),e.onload=this.addResizeHandlers,e.type=`text/html`,Vp&&this.$el.appendChild(e),e.data=`about:blank`,Vp||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit(`notify`,{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener(`resize`,this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Vp&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},Wp=Mn(`data-v-b329ee4c`);An(`data-v-b329ee4c`);var Gp={class:`resize-observer`,tabindex:`-1`};jn(),Up.render=Wp((e,t,n,r,i,a)=>(U(),da(`div`,Gp))),Up.__scopeId=`data-v-b329ee4c`,Up.__file=`src/components/ResizeObserver.vue`;function Kp(e){"@babel/helpers - typeof";return Kp=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},Kp(e)}function qp(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Jp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yp(e,t,n){return t&&Jp(e.prototype,t),n&&Jp(e,n),e}function Xp(e){return Zp(e)||Qp(e)||$p(e)||tm()}function Zp(e){if(Array.isArray(e))return em(e)}function Qp(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function $p(e,t){if(e){if(typeof e==`string`)return em(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return em(e,t)}}function em(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tm(){throw TypeError(`Invalid attempt to spread non-iterable instance.
67
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nm(e){return typeof e==`function`?{callback:e}:e}function rm(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,a,o=function(o){if(a=[...arguments].slice(1),!(r&&o===i)){var s=n.leading;typeof s==`function`&&(s=s(o,i)),(!r||o!==i)&&s&&e.apply(void 0,[o].concat(Xp(a))),i=o,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[o].concat(Xp(a))),r=0},t)}};return o._clear=function(){clearTimeout(r),r=null},o}function im(e,t){if(e===t)return!0;if(Kp(e)===`object`){for(var n in e)if(!im(e[n],t[n]))return!1;return!0}return!1}var am=function(){function e(t,n,r){qp(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return Yp(e,[{key:`createObserver`,value:function(e,t){var n=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=nm(e),this.callback=function(e,t){n.options.callback(e,t),e&&n.options.once&&(n.frozen=!0,n.destroyObserver())},this.callback&&this.options.throttle){var r=(this.options.throttleOptions||{}).leading;this.callback=rm(this.callback,this.options.throttle,{leading:function(e){return r===`both`||r===`visible`&&e||r===`hidden`&&!e}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(e){var t=e[0];if(e.length>1){var r=e.find(function(e){return e.isIntersecting});r&&(t=r)}if(n.callback){var i=t.isIntersecting&&t.intersectionRatio>=n.threshold;if(i===n.oldResult)return;n.oldResult=i,n.callback(i,t)}},this.options.intersection),vn(function(){n.observer&&n.observer.observe(n.el)})}}},{key:`destroyObserver`,value:function(){this.observer&&=(this.observer.disconnect(),null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:`threshold`,get:function(){return this.options.intersection&&typeof this.options.intersection.threshold==`number`?this.options.intersection.threshold:0}}]),e}();function om(e,t,n){var r=t.value;r&&(typeof IntersectionObserver>`u`?console.warn(`[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill`):e._vue_visibilityState=new am(e,r,n))}function sm(e,t,n){var r=t.value,i=t.oldValue;if(!im(r,i)){var a=e._vue_visibilityState;if(!r){cm(e);return}a?a.createObserver(r,n):om(e,{value:r},n)}}function cm(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var lm={beforeMount:om,updated:sm,unmounted:cm};function um(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(e){e(n)}),(e.get(`*`)||[]).slice().map(function(e){e(t,n)})}}}var dm={itemsLimit:1e3},fm=/(auto|scroll)/;function pm(e,t){return e.parentNode===null?t:pm(e.parentNode,t.concat([e]))}var mm=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},hm=function(e){return mm(e,`overflow`)+mm(e,`overflow-y`)+mm(e,`overflow-x`)},gm=function(e){return fm.test(hm(e))};function _m(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=pm(e.parentNode,[]),n=0;n<t.length;n+=1)if(gm(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function vm(e){"@babel/helpers - typeof";return vm=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},vm(e)}var ym={items:{type:Array,required:!0},keyField:{type:String,default:`id`},direction:{type:String,default:`vertical`,validator:function(e){return[`vertical`,`horizontal`].includes(e)}},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`}};function bm(){return this.items.length&&vm(this.items[0])!==`object`}var xm=!1;if(typeof window<`u`){xm=!1;try{var Sm=Object.defineProperty({},"passive",{get:function(){xm=!0}});window.addEventListener(`test`,null,Sm)}catch{}}var Cm=0,wm={name:`RecycleScroller`,components:{ResizeObserver:Up},directives:{ObserveVisibility:lm},props:{...ym,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:`size`},typeField:{type:String,default:`type`},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`},listClass:{type:[String,Object,Array],default:``},itemClass:{type:[String,Object,Array],default:``}},emits:[`resize`,`visible`,`hidden`,`update`,`scroll-start`,`scroll-end`],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){let e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,r=this.minItemSize,i=1e4,a=0,o;for(let s=0,c=t.length;s<c;s++)o=t[s][n]||r,o<i&&(i=o),a+=o,e[s]={accumulator:a,size:o};return this.$_computedMinItemSize=i,e}return[]},simpleArray:bm,itemIndexByKey(){let{keyField:e,items:t}=this,n={};for(let r=0,i=t.length;r<i;r++)n[t[r][e]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error(`[vue-recycle-scroller] You must provide an itemSize when using gridItems`)},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){let e=this.$_lastUpdateScrollPosition;typeof e==`number`&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,r,i){let a=Nt({item:n,position:0,nr:Bt({id:Cm++,index:t,used:!0,key:r,type:i})});return e.push(a),a},unuseView(e,t=!1){let n=this.$_unusedViews,r=e.nr.type,i=n.get(r);i||(i=[],n.set(r,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit(`resize`),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;let e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;let{continuous:e}=this.updateVisibleItems(!1,!0);e||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit(`visible`),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit(`hidden`))},updateVisibleItems(e,t=!1){let n=this.itemSize,r=this.gridItems||1,i=this.itemSecondarySize||n,a=this.$_computedMinItemSize,o=this.typeField,s=this.simpleArray?null:this.keyField,c=this.items,l=c.length,u=this.sizes,d=this.$_views,f=this.$_unusedViews,p=this.pool,m=this.itemIndexByKey,h,g,_,v,y;if(!l)h=g=v=y=_=0;else if(this.$_prerender)h=v=0,g=y=Math.min(this.prerender,c.length),_=null;else{let e=this.getScroll();if(t){let t=e.start-this.$_lastUpdateScrollPosition;if(t<0&&(t=-t),n===null&&t<a||t<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=e.start;let i=this.buffer;e.start-=i,e.end+=i;let o=0;if(this.$refs.before&&(o=this.$refs.before.scrollHeight,e.start-=o),this.$refs.after){let t=this.$refs.after.scrollHeight;e.end+=t}if(n===null){let t,n=0,r=l-1,i=~~(l/2),a;do a=i,t=u[i].accumulator,t<e.start?n=i:i<l-1&&u[i+1].accumulator>e.start&&(r=i),i=~~((n+r)/2);while(i!==a);for(i<0&&(i=0),h=i,_=u[l-1].accumulator,g=i;g<l&&u[g].accumulator<e.end;g++);for(g===-1?g=c.length-1:(g++,g>l&&(g=l)),v=h;v<l&&o+u[v].accumulator<e.start;v++);for(y=v;y<l&&o+u[y].accumulator<e.end;y++);}else{h=~~(e.start/n*r);let t=h%r;h-=t,g=Math.ceil(e.end/n*r),v=Math.max(0,Math.floor((e.start-o)/n*r)),y=Math.floor((e.end-o)/n*r),h<0&&(h=0),g>l&&(g=l),v<0&&(v=0),y>l&&(y=l),_=Math.ceil(l/r)*n}}g-h>dm.itemsLimit&&this.itemsLimitError(),this.totalSize=_;let b,x=h<=this.$_endIndex&&g>=this.$_startIndex;if(x)for(let t=0,n=p.length;t<n;t++)b=p[t],b.nr.used&&(e&&(b.nr.index=m[b.item[s]]),(b.nr.index==null||b.nr.index<h||b.nr.index>=g)&&this.unuseView(b));let S=x?null:new Map,C,w,T;for(let e=h;e<g;e++){C=c[e];let t=s?C[s]:C;if(t==null)throw Error(`Key is ${t} on item (keyField is '${s}')`);if(b=d.get(t),!n&&!u[e].size){b&&this.unuseView(b);continue}w=C[o];let a=f.get(w),l=!1;if(!b)x?b=a&&a.length?a.pop():this.addView(p,e,C,t,w):(T=S.get(w)||0,(!a||T>=a.length)&&(b=this.addView(p,e,C,t,w),this.unuseView(b,!0),a=f.get(w)),b=a[T],S.set(w,T+1)),d.delete(b.nr.key),b.nr.used=!0,b.nr.index=e,b.nr.key=t,b.nr.type=w,d.set(t,b),l=!0;else if(!b.nr.used&&(b.nr.used=!0,l=!0,a)){let e=a.indexOf(b);e!==-1&&a.splice(e,1)}b.item=C,l&&(e===c.length-1&&this.$emit(`scroll-end`),e===0&&this.$emit(`scroll-start`)),n===null?(b.position=u[e-1].accumulator,b.offset=0):(b.position=Math.floor(e/r)*n,b.offset=e%r*i)}return this.$_startIndex=h,this.$_endIndex=g,this.emitUpdate&&this.$emit(`update`,h,g,v,y),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let e=_m(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){let{$el:e,direction:t}=this,n=t===`vertical`,r;if(this.pageMode){let t=e.getBoundingClientRect(),i=n?t.height:t.width,a=-(n?t.top:t.left),o=n?window.innerHeight:window.innerWidth;a<0&&(o+=a,a=0),a+o>i&&(o=i-a),r={start:a,end:a+o}}else r=n?{start:e.scrollTop,end:e.scrollTop+e.clientHeight}:{start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener(`scroll`,this.handleScroll,xm?{passive:!0}:!1),this.listenerTarget.addEventListener(`resize`,this.handleResize)},removeListeners(){this.listenerTarget&&=(this.listenerTarget.removeEventListener(`scroll`,this.handleScroll),this.listenerTarget.removeEventListener(`resize`,this.handleResize),null)},scrollToItem(e){let t,n=this.gridItems||1;t=this.itemSize===null?e>0?this.sizes[e-1].accumulator:0:Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){let t=this.direction===`vertical`?{scroll:`scrollTop`,start:`top`}:{scroll:`scrollLeft`,start:`left`},n,r,i;if(this.pageMode){let a=_m(this.$el),o=a.tagName===`HTML`?0:a[t.scroll],s=a.getBoundingClientRect(),c=this.$el.getBoundingClientRect()[t.start]-s[t.start];n=a,r=t.scroll,i=e+o+c}else n=this.$el,r=t.scroll,i=e;n[r]=i},itemsLimitError(){throw setTimeout(()=>{console.log(`It seems the scroller element isn't scrolling, so it tries to render all the items at once.`,`Scroller:`,this.$el),console.log(`Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.`)}),Error(`Rendered items limit reached`)},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}},Tm={key:0,ref:`before`,class:`vue-recycle-scroller__slot`},Em={key:1,ref:`after`,class:`vue-recycle-scroller__slot`};function Dm(e,t,n,r,i,a){let o=Nr(`ResizeObserver`),s=Ir(`observe-visibility`);return Pn((U(),W(`div`,{class:P([`vue-recycle-scroller`,{ready:i.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||=(...e)=>a.handleScroll&&a.handleScroll(...e)},[e.$slots.before?(U(),W(`div`,Tm,[Br(e.$slots,`before`)],512)):J(`v-if`,!0),(U(),da(Fr(n.listTag),{ref:`wrapper`,style:j({[e.direction===`vertical`?`minHeight`:`minWidth`]:i.totalSize+`px`}),class:P([`vue-recycle-scroller__item-wrapper`,n.listClass])},{default:Nn(()=>[(U(!0),W(H,null,zr(i.pool,t=>(U(),da(Fr(n.itemTag),Ca({key:t.nr.id,style:i.ready?{transform:`translate${e.direction===`vertical`?`Y`:`X`}(${t.position}px) translate${e.direction===`vertical`?`X`:`Y`}(${t.offset}px)`,width:n.gridItems?`${e.direction===`vertical`&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction===`horizontal`&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:[`vue-recycle-scroller__item-view`,[n.itemClass,{hover:!n.skipHover&&i.hoverKey===t.nr.key}]]},Hr(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=t.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:Nn(()=>[Br(e.$slots,`default`,{item:t.item,index:t.nr.index,active:t.nr.used})]),_:2},1040,[`style`,`class`]))),128)),Br(e.$slots,`empty`)]),_:3},8,[`style`,`class`])),e.$slots.after?(U(),W(`div`,Em,[Br(e.$slots,`after`)],512)):J(`v-if`,!0),K(o,{onNotify:a.handleResize},null,8,[`onNotify`])],34)),[[s,a.handleVisibilityChange]])}wm.render=Dm,wm.__file=`src/components/RecycleScroller.vue`;var Om={name:`DynamicScroller`,components:{RecycleScroller:wm},provide(){return typeof ResizeObserver<`u`&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(let t of e)if(t.target&&t.target.$_vs_onResize){let e,n;if(t.borderBoxSize){let r=t.borderBoxSize[0];e=r.inlineSize,n=r.blockSize}else e=t.contentRect.width,n=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,e,n)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...ym,minItemSize:{type:[Number,String],required:!0}},emits:[`resize`,`visible`],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:bm,itemsWithSize(){let e=[],{items:t,keyField:n,simpleArray:r}=this,i=this.vscrollData.sizes,a=t.length;for(let o=0;o<a;o++){let a=t[o],s=r?o:a[n],c=i[s];c===void 0&&!this.$_undefinedMap[s]&&(c=0),e.push({item:a,id:s,size:c})}return e}},watch:{items(){this.forceUpdate()},simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},direction(e){this.forceUpdate(!0)},itemsWithSize(e,t){let n=this.$el.scrollTop,r=0,i=0,a=Math.min(e.length,t.length);for(let o=0;o<a&&!(r>=n);o++)r+=t[o].size||this.minItemSize,i+=e[o].size||this.minItemSize;let o=i-r;o!==0&&(this.$el.scrollTop+=o)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=um()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit(`resize`)},onScrollerVisible(){this.$_events.emit(`vscroll:update`,{force:!1}),this.$emit(`visible`)},forceUpdate(e=!1){(e||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit(`vscroll:update`,{force:!0})},scrollToItem(e){let t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize(e,t=void 0){let n=this.simpleArray?t??this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;let e=this.$el;this.$nextTick(()=>{e.scrollTop=e.scrollHeight+5e3;let t=()=>{e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(t)})};requestAnimationFrame(t)})}}};function km(e,t,n,r,i,a){let o=Nr(`RecycleScroller`);return U(),da(o,Ca({ref:`scroller`,items:a.itemsWithSize,"min-item-size":n.minItemSize,direction:e.direction,"key-field":`id`,"list-tag":e.listTag,"item-tag":e.itemTag},e.$attrs,{onResize:a.onScrollerResize,onVisible:a.onScrollerVisible}),{default:Nn(({item:t,index:n,active:r})=>[Br(e.$slots,`default`,ue(_a({item:t.item,index:n,active:r,itemWithSize:t})))]),before:Nn(()=>[Br(e.$slots,`before`)]),after:Nn(()=>[Br(e.$slots,`after`)]),empty:Nn(()=>[Br(e.$slots,`empty`)]),_:3},16,[`items`,`min-item-size`,`direction`,`list-tag`,`item-tag`,`onResize`,`onVisible`])}Om.render=km,Om.__file=`src/components/DynamicScroller.vue`;var Am={name:`DynamicScrollerItem`,inject:[`vscrollData`,`vscrollParent`,`vscrollResizeObserver`],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:`div`}},emits:[`resize`],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:`updateWatchData`,id(e,t){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){let n=this.vscrollData.sizes[t],r=this.vscrollData.sizes[e];n!=null&&n!==r&&this.applySize(n)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(let e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate);this.vscrollParent.$_events.on(`vscroll:update`,this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off(`vscroll:update`,this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch(`item`,()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&=(this.$_watchData(),null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(e){this.$nextTick(()=>{if(this.id===e){let e=this.$el.offsetWidth,t=this.$el.offsetHeight;this.applyWidthHeight(e,t)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){let n=~~(this.vscrollParent.direction===`vertical`?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e,this.emitResize&&this.$emit(`resize`,this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||=(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,!0))},unobserveSize(){this.vscrollResizeObserver&&(this.$_sizeObserved&&=(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,!1))},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return qa(this.tag,this.$slots.default())}};Am.__file=`src/components/DynamicScrollerItem.vue`;var jm={class:`py-4 px-5 border-b border-border shrink-0 flex items-center gap-4 max-sm:py-2 max-sm:px-3 max-sm:flex-wrap max-sm:gap-2`},Mm={class:`text-accent text-xl m-0 flex-1`},Nm={key:0,style:{"font-size":`12px`,padding:`2px 8px`,"border-radius":`3px`,background:`rgba(210, 153, 34, 0.2)`,color:`#d29922`,border:`1px solid rgba(210, 153, 34, 0.4)`,"vertical-align":`middle`,"margin-left":`8px`}},Pm={style:{display:`flex`,gap:`10px`}},Fm=[`disabled`],Im={__name:`SessionHeader`,props:{sessionId:{type:String,default:``},source:{type:String,default:``},metadata:{type:Object,default:()=>({})},exporting:Boolean},emits:[`export`],setup(e){return(t,n)=>{let r=Nr(`router-link`);return U(),W(`div`,jm,[K(r,{to:`/`,class:`py-1.5 px-3 bg-surface-hover border border-border rounded-md text-text-secondary no-underline text-sm transition-all hover:bg-border hover:border-accent`},{default:Nn(()=>[...n[1]||=[q(` ← Back to Home `,-1)]]),_:1}),G(`h1`,Mm,[q(` 📋 Session: `+F(e.sessionId)+` `,1),e.metadata.sessionStatus===`wip`?(U(),W(`span`,Nm,`🔄 WIP`)):J(``,!0)]),G(`div`,Pm,[K(r,{to:`/`+e.source+`/session/`+e.sessionId+`/time-analyze`,class:`header-action-btn bg-accent-emphasis border-accent-emphasis no-underline hover:bg-accent-emphasis hover:border-accent`},{default:Nn(()=>[...n[2]||=[q(` ⏱ Analysis `,-1)]]),_:1},8,[`to`]),!e.metadata.source||![`vscode`,`modernize`].includes(e.metadata.source)?(U(),W(`button`,{key:0,"data-testid":`export-btn`,class:`header-action-btn bg-success-emphasis border-success-emphasis cursor-pointer hover:bg-success-emphasis hover:border-success disabled:opacity-60 disabled:cursor-not-allowed`,disabled:e.exporting,onClick:n[0]||=e=>t.$emit(`export`)},F(e.exporting?`⏳ Sharing...`:`📤 Share Session`),9,Fm)):J(``,!0)])])}}},Lm={class:`sidebar-section mb-5`},Rm={class:`session-info text-sm`},zm={class:`w-full text-xs [&_td]:py-1.5 [&_td]:px-2 [&_td]:border-b [&_td]:border-[rgba(110,118,129,0.15)] [&_td]:align-top [&_td:first-child]:text-text-muted [&_td:first-child]:font-medium [&_td:first-child]:whitespace-nowrap [&_td:first-child]:w-[85px] [&_td:last-child]:text-text-secondary [&_td:last-child]:break-all [&_tr:last-child_td]:border-b-0`},Bm={key:0},Vm={key:1},Hm={key:2},Um={key:3},Wm={key:4},Gm={key:5},Km={key:6},qm={key:7},Jm={key:8},Ym={key:9},Xm={key:10},Zm={key:0,class:`sidebar-section mb-5`},Qm={class:`text-xs flex flex-col gap-3`},$m={class:`p-3.5 bg-gradient-to-b from-[rgba(88,166,255,0.16)] to-[rgba(22,27,34,0.94)] border border-[rgba(88,166,255,0.22)] rounded-[10px] text-text-secondary shadow-[inset_0_1px_0_rgba(255,255,255,0.04)]`},eh={class:`text-2xl leading-none font-bold text-text flex items-baseline gap-1.5`},th={class:`mt-1.5 text-xs text-text-muted`},nh={class:`grid grid-cols-3 gap-2 mt-3`},rh={class:`overview-metric-cell`},ih={class:`usage-metric-value`},ah={class:`overview-metric-cell`},oh={class:`usage-metric-value`},sh={class:`overview-metric-cell`},ch={class:`usage-metric-value`},lh={class:`flex flex-col gap-3`},uh={key:0,class:`usage-card`},dh={class:`flex items-center justify-between gap-2 mb-2.5`},fh={class:`inline-flex items-center justify-center min-w-[24px] py-0.5 px-2 rounded-full bg-[rgba(88,166,255,0.12)] border border-[rgba(88,166,255,0.22)] text-link text-2xs font-bold`},ph={class:`flex flex-col gap-2`},mh={class:`flex flex-col items-stretch gap-2 mb-2.5`},hh=[`title`],gh={class:`flex flex-wrap justify-start gap-1.5`},_h={class:`model-stat-pill bg-[rgba(110,118,129,0.12)] border border-[rgba(110,118,129,0.2)] text-text-secondary`},vh={key:0,class:`model-stat-pill bg-[rgba(210,153,34,0.12)] border border-[rgba(210,153,34,0.25)] text-warning`},yh={key:1,class:`model-stat-pill bg-[rgba(63,185,80,0.12)] border border-[rgba(63,185,80,0.25)] text-success`},bh={key:0,class:`grid grid-cols-2 gap-2`},xh={class:`usage-metric-cell`},Sh={class:`usage-metric-value`},Ch={class:`usage-metric-cell`},wh={class:`usage-metric-value`},Th={key:0,class:`usage-metric-cell`},Eh={class:`usage-metric-value`},Dh={key:1,class:`usage-metric-cell`},Oh={class:`usage-metric-value`},kh={key:1,class:`usage-card`},Ah={class:`grid grid-cols-2 gap-2`},jh={key:0,class:`usage-metric-cell`},Mh={class:`usage-metric-value`},Nh={key:1,class:`usage-metric-cell`},Ph={class:`usage-metric-value`},Fh={key:2,class:`usage-metric-cell`},Ih={class:`usage-metric-value`},Lh={key:3,class:`usage-metric-cell`},Rh={class:`usage-metric-value`},zh={key:2,class:`usage-card`},Bh={class:`grid grid-cols-3 gap-2`},Vh={class:`usage-metric-cell`},Hh={class:`text-sm leading-tight font-bold text-success break-all`},Uh={class:`usage-metric-cell`},Wh={class:`text-sm leading-tight font-bold text-danger-emphasis break-all`},Gh={class:`usage-metric-cell`},Kh={class:`usage-metric-value`},qh={key:1,class:`sidebar-section mb-5`},Jh={class:`flex flex-col gap-1`},Yh=[`title`],Xh={class:`relative text-warning font-semibold ml-2 shrink-0`},Zh={"data-testid":`tags-section`,class:`sidebar-section mb-5 mt-4`},Qh={key:0,class:`flex flex-wrap gap-1.5 min-h-[28px] items-start`},$h={key:1,class:`relative mt-2`},eg={class:`flex flex-wrap gap-1.5 p-2 bg-surface border border-border rounded-md min-h-[38px] focus-within:border-accent`},tg=[`onClick`],ng=[`value`],rg={key:0,class:`absolute top-full left-0 right-0 bg-surface border border-border rounded-md mt-1 max-h-[200px] overflow-y-auto z-[100] shadow-[0_4px_12px_rgba(0,0,0,0.3)]`},ig=[`onClick`,`onMouseenter`],ag={key:1,class:`mt-1.5 text-xs text-danger-emphasis`},og={__name:`SessionSidebar`,props:{collapsed:Boolean,metadata:{type:Object,default:()=>({})},formatDateTime:{type:Function,default:()=>{}},formatTokens:{type:Function,default:()=>{}},formatDuration:{type:Function,default:()=>{}},formatCost:{type:Function,default:()=>{}},totalTokens:{type:Number,default:0},totalRequests:{type:Number,default:0},totalModels:{type:Number,default:0},getDisplayUsageInputTokens:{type:Function,default:()=>{}},getModelCacheHitRatio:{type:Function,default:()=>{}},toolCallingSummary:{type:Array,default:()=>[]},sessionTags:{type:Array,default:()=>[]},tagsEditing:Boolean,editingTags:{type:Array,default:()=>[]},tagInputValue:{type:String,default:``},tagsError:{type:String,default:``},showAutocomplete:Boolean,autocompleteOptions:{type:Array,default:()=>[]},autocompleteSelectedIndex:{type:Number,default:-1},getTagColor:{type:Function,default:()=>{}}},emits:[`startEditTags`,`cancelEditTags`,`addTag`,`removeTagFromEdit`,`updateAutocomplete`,`selectAutocompleteOption`,`saveTagsOnBlur`,`update:tagInputValue`,`update:autocompleteSelectedIndex`],setup(e,{expose:t}){let n=B(null),r={"source-cli":{background:`rgba(35, 134, 54, 0.2)`,color:`#3fb950`,border:`1px solid rgba(35, 134, 54, 0.4)`},"source-vscode":{background:`rgba(0, 122, 204, 0.2)`,color:`#4fc3f7`,border:`1px solid rgba(0, 122, 204, 0.4)`},"source-copilot":{background:`rgba(88, 166, 255, 0.2)`,color:`#58a6ff`,border:`1px solid rgba(88, 166, 255, 0.4)`},"source-claude":{background:`rgba(210, 153, 34, 0.2)`,color:`#d29922`,border:`1px solid rgba(210, 153, 34, 0.4)`},"source-pi-mono":{background:`rgba(138, 102, 204, 0.2)`,color:`#a78bdb`,border:`1px solid rgba(138, 102, 204, 0.4)`},"source-modernize":{background:`rgba(76, 175, 80, 0.2)`,color:`#66bb6a`,border:`1px solid rgba(76, 175, 80, 0.4)`}};function i(e){return r[e]||r[`source-copilot`]}return t({tagInputRef:n}),(t,r)=>(U(),W(`div`,{class:P([`w-80 shrink-0 bg-surface border-r border-border overflow-y-auto p-4 transition-all duration-300`,e.collapsed?`!w-0 !p-0 !border-r-0 overflow-hidden`:``])},[G(`div`,Lm,[r[16]||=G(`div`,{class:`sidebar-section-title`},` Session Info `,-1),G(`div`,Rm,[G(`table`,zm,[G(`tbody`,null,[e.metadata.source?(U(),W(`tr`,Bm,[r[5]||=G(`td`,null,`Source`,-1),G(`td`,null,[G(`span`,{class:`source-badge`,style:j(i(e.metadata.sourceBadgeClass))},F(e.metadata.sourceName||`GitHub Copilot`),5)])])):J(``,!0),e.metadata.modernizeVersion?(U(),W(`tr`,Vm,[r[6]||=G(`td`,null,`Version`,-1),G(`td`,null,F(e.metadata.modernizeVersion),1)])):J(``,!0),e.metadata.source===`modernize`&&e.metadata.copilotVersion?(U(),W(`tr`,Hm,[r[7]||=G(`td`,null,`Copilot SDK`,-1),G(`td`,null,F(e.metadata.copilotVersion),1)])):J(``,!0),e.metadata.copilotVersion&&e.metadata.source!==`modernize`?(U(),W(`tr`,Um,[r[8]||=G(`td`,null,`Version`,-1),G(`td`,null,F(e.metadata.copilotVersion),1)])):J(``,!0),e.metadata.model?(U(),W(`tr`,Wm,[r[9]||=G(`td`,null,`Model`,-1),G(`td`,null,F(e.metadata.model),1)])):J(``,!0),e.metadata.agentName?(U(),W(`tr`,Gm,[r[10]||=G(`td`,null,`Agent`,-1),G(`td`,null,`🤖 `+F(e.metadata.agentName),1)])):J(``,!0),e.metadata.repo?(U(),W(`tr`,Km,[r[11]||=G(`td`,null,`Repo`,-1),G(`td`,null,F(e.metadata.repo),1)])):J(``,!0),e.metadata.branch?(U(),W(`tr`,qm,[r[12]||=G(`td`,null,`Branch`,-1),G(`td`,null,F(e.metadata.branch),1)])):J(``,!0),e.metadata.cwd&&!e.metadata.repo?(U(),W(`tr`,Jm,[r[13]||=G(`td`,null,`Repo`,-1),G(`td`,null,F(e.metadata.cwd),1)])):J(``,!0),e.metadata.created?(U(),W(`tr`,Ym,[r[14]||=G(`td`,null,`Created`,-1),G(`td`,null,F(e.formatDateTime(e.metadata.created)),1)])):J(``,!0),e.metadata.updated?(U(),W(`tr`,Xm,[r[15]||=G(`td`,null,`Updated`,-1),G(`td`,null,F(e.formatDateTime(e.metadata.updated)),1)])):J(``,!0)])])])]),e.metadata.usage?(U(),W(`div`,Zm,[r[36]||=G(`div`,{class:`sidebar-section-title`},` Token Usage `,-1),G(`div`,Qm,[G(`div`,$m,[r[21]||=G(`div`,{class:`text-2xs font-bold text-text-muted uppercase tracking-[0.7px] mb-1.5`},` Overview `,-1),G(`div`,eh,[q(F(e.formatTokens(e.totalTokens))+` `,1),r[17]||=G(`span`,{class:`text-2xs font-semibold uppercase tracking-[0.5px] text-text-muted`},`tokens`,-1)]),G(`div`,th,` Usage captured across `+F(e.totalModels)+` model`+F(e.totalModels===1?``:`s`),1),G(`div`,nh,[G(`div`,rh,[r[18]||=G(`span`,{class:`usage-metric-label`},`Requests`,-1),G(`span`,ih,F(e.totalRequests)+` reqs`,1)]),G(`div`,ah,[r[19]||=G(`span`,{class:`usage-metric-label`},`Models`,-1),G(`span`,oh,F(e.totalModels),1)]),G(`div`,sh,[r[20]||=G(`span`,{class:`usage-metric-label`},`API Time`,-1),G(`span`,ch,F(e.formatDuration(e.metadata.usage.totalApiDurationMs)),1)])])]),G(`div`,lh,[Object.keys(e.metadata.usage.modelMetrics).length>0?(U(),W(`div`,uh,[G(`div`,dh,[r[22]||=G(`div`,{class:`usage-card-title`},` Models `,-1),G(`div`,fh,F(e.totalModels),1)]),G(`div`,ph,[(U(!0),W(H,null,zr(e.metadata.usage.modelMetrics,(t,n)=>(U(),W(`div`,{key:n,class:`p-2.5 bg-gradient-to-b from-[rgba(13,17,23,0.96)] to-[rgba(22,27,34,0.96)] border border-[rgba(48,54,61,0.9)] rounded-lg`},[G(`div`,mh,[G(`div`,{class:`block max-w-full text-2xs font-semibold leading-[1.35] text-link font-mono whitespace-nowrap overflow-x-auto overflow-y-hidden pb-0.5`,style:{"scrollbar-width":`thin`,"scrollbar-color":`rgba(110, 118, 129, 0.55) transparent`},title:n},F(n),9,hh),G(`div`,gh,[G(`span`,_h,F(t.requests?.count||0)+` reqs`,1),t.requests?.cost?(U(),W(`span`,vh,F(e.formatCost(t.requests.cost)),1)):J(``,!0),e.getModelCacheHitRatio(n)===null?J(``,!0):(U(),W(`span`,yh,F(e.getModelCacheHitRatio(n))+`% cache`,1))])]),t.usage?(U(),W(`div`,bh,[G(`div`,xh,[r[23]||=G(`span`,{class:`usage-metric-label`},`Input`,-1),G(`span`,Sh,F(e.formatTokens(e.getDisplayUsageInputTokens(n))),1)]),G(`div`,Ch,[r[24]||=G(`span`,{class:`usage-metric-label`},`Output`,-1),G(`span`,wh,F(e.formatTokens(t.usage.outputTokens||0)),1)]),t.usage?.cacheReadTokens?(U(),W(`div`,Th,[r[25]||=G(`span`,{class:`usage-metric-label`},`Cache Read`,-1),G(`span`,Eh,F(e.formatTokens(t.usage.cacheReadTokens)),1)])):J(``,!0),t.usage?.cacheWriteTokens?(U(),W(`div`,Dh,[r[26]||=G(`span`,{class:`usage-metric-label`},`Cache Write`,-1),G(`span`,Oh,F(e.formatTokens(t.usage.cacheWriteTokens)),1)])):J(``,!0)])):J(``,!0)]))),128))])])):J(``,!0),e.metadata.usage.currentTokens||e.metadata.usage.systemTokens||e.metadata.usage.conversationTokens||e.metadata.usage.toolDefinitionsTokens?(U(),W(`div`,kh,[r[31]||=G(`div`,{class:`flex items-center justify-between gap-2 mb-2.5`},[G(`div`,{class:`usage-card-title`},` Context Window `)],-1),G(`div`,Ah,[e.metadata.usage.currentTokens?(U(),W(`div`,jh,[r[27]||=G(`span`,{class:`usage-metric-label`},`Current`,-1),G(`span`,Mh,F(e.formatTokens(e.metadata.usage.currentTokens)),1)])):J(``,!0),e.metadata.usage.systemTokens?(U(),W(`div`,Nh,[r[28]||=G(`span`,{class:`usage-metric-label`},`System`,-1),G(`span`,Ph,F(e.formatTokens(e.metadata.usage.systemTokens)),1)])):J(``,!0),e.metadata.usage.conversationTokens?(U(),W(`div`,Fh,[r[29]||=G(`span`,{class:`usage-metric-label`},`Conversation`,-1),G(`span`,Ih,F(e.formatTokens(e.metadata.usage.conversationTokens)),1)])):J(``,!0),e.metadata.usage.toolDefinitionsTokens?(U(),W(`div`,Lh,[r[30]||=G(`span`,{class:`usage-metric-label`},`Tools`,-1),G(`span`,Rh,F(e.formatTokens(e.metadata.usage.toolDefinitionsTokens)),1)])):J(``,!0)])])):J(``,!0),e.metadata.usage.codeChanges&&(e.metadata.usage.codeChanges.linesAdded>0||e.metadata.usage.codeChanges.linesRemoved>0)?(U(),W(`div`,zh,[r[35]||=G(`div`,{class:`flex items-center justify-between gap-2 mb-2.5`},[G(`div`,{class:`usage-card-title`},` Code Changes `)],-1),G(`div`,Bh,[G(`div`,Vh,[r[32]||=G(`span`,{class:`usage-metric-label`},`Added`,-1),G(`span`,Hh,`+`+F(e.metadata.usage.codeChanges.linesAdded),1)]),G(`div`,Uh,[r[33]||=G(`span`,{class:`usage-metric-label`},`Removed`,-1),G(`span`,Wh,`-`+F(e.metadata.usage.codeChanges.linesRemoved),1)]),G(`div`,Gh,[r[34]||=G(`span`,{class:`usage-metric-label`},`Files`,-1),G(`span`,Kh,F(e.metadata.usage.codeChanges.filesModified?.length||0),1)])])])):J(``,!0)])])])):J(``,!0),e.toolCallingSummary.length?(U(),W(`div`,qh,[r[37]||=G(`div`,{class:`sidebar-section-title`},` Tool Calls `,-1),G(`div`,Jh,[(U(!0),W(H,null,zr(e.toolCallingSummary,t=>(U(),W(`div`,{key:t.name,class:`tool-bar-item`},[G(`div`,{class:`absolute left-0 top-0 bottom-0 bg-[rgba(158,106,3,0.15)] rounded-badge transition-[width] duration-300`,style:j({width:t.count/e.toolCallingSummary[0].count*100+`%`})},null,4),G(`span`,{class:`relative text-text-secondary overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1`,title:t.name},F(t.name),9,Yh),G(`span`,Xh,F(t.count),1)]))),128))])])):J(``,!0),G(`div`,Zh,[r[38]||=G(`div`,{class:`sidebar-section-title`},` Tags `,-1),e.tagsEditing?(U(),W(`div`,$h,[G(`div`,eg,[(U(!0),W(H,null,zr(e.editingTags,n=>(U(),W(`span`,{key:n,"data-testid":`tag-input-chip`,class:`inline-flex items-center gap-1 py-1 px-2 rounded-xl text-xs font-medium text-white`,style:j({backgroundColor:e.getTagColor(n)})},[q(F(n)+` `,1),G(`button`,{class:`bg-none border-none text-white/70 cursor-pointer text-xs p-0 ml-0.5 hover:text-white`,title:`Remove tag`,onClick:e=>t.$emit(`removeTagFromEdit`,n)},`×`,8,tg)],4))),128)),G(`input`,{ref_key:`tagInputRef`,ref:n,"data-testid":`tag-input`,value:e.tagInputValue,class:`flex-1 min-w-[120px] bg-transparent border-none outline-none text-text-secondary text-sm p-1 placeholder:text-text-faint`,placeholder:`Type tag name...`,maxlength:`30`,onInput:r[1]||=e=>{t.$emit(`update:tagInputValue`,e.target.value),t.$emit(`updateAutocomplete`)},onKeydown:[r[2]||=qo(Go(e=>t.$emit(`addTag`),[`prevent`]),[`enter`]),r[3]||=qo(e=>t.$emit(`cancelEditTags`),[`escape`])],onBlur:r[4]||=e=>t.$emit(`saveTagsOnBlur`)},null,40,ng)]),e.showAutocomplete&&e.autocompleteOptions.length>0?(U(),W(`div`,rg,[(U(!0),W(H,null,zr(e.autocompleteOptions,(n,r)=>(U(),W(`div`,{key:n,class:P([`py-2 px-3 text-sm text-text-secondary cursor-pointer transition-colors duration-200 hover:bg-accent-subtle`,r===e.autocompleteSelectedIndex?`bg-[rgba(88,166,255,0.25)]`:``]),onClick:e=>t.$emit(`selectAutocompleteOption`,n),onMouseenter:e=>t.$emit(`update:autocompleteSelectedIndex`,r)},F(n),43,ig))),128))])):J(``,!0),e.tagsError?(U(),W(`div`,ag,F(e.tagsError),1)):J(``,!0)])):(U(),W(`div`,Qh,[(U(!0),W(H,null,zr(e.sessionTags,t=>(U(),W(`span`,{key:t,"data-testid":`tag-label`,class:`inline-flex items-center gap-1 py-1 px-2.5 rounded-xl text-xs font-medium text-white cursor-default transition-opacity duration-200 hover:opacity-80`,style:j({backgroundColor:e.getTagColor(t)})},F(t),5))),128)),G(`button`,{"data-testid":`tags-edit-btn`,class:`bg-none border border-border rounded py-1 px-2 text-text-muted cursor-pointer text-xs transition-all duration-200 inline-flex items-center gap-1 hover:border-accent hover:text-accent`,title:`Edit tags`,onClick:r[0]||=e=>t.$emit(`startEditTags`)},` ✏️ `)]))])],2))}},sg={class:`unified-filter-bar bg-canvas border-b border-border shrink-0`},cg={class:`filter-bar-row flex items-center gap-2 py-2 px-3 flex-wrap`},lg=[`title`],ug={class:`filter-bar-search flex items-center gap-1 flex-1 min-w-40`},dg=[`value`],fg={key:0,class:`search-result-count text-xs text-text-secondary py-1 px-2 bg-surface-hover rounded whitespace-nowrap`},pg=[`value`],mg=[`label`],hg=[`value`],gg={key:1,class:`subagent-selector`,"data-testid":`subagent-dropdown`,style:{position:`relative`}},_g={class:`overflow-hidden text-ellipsis whitespace-nowrap`},vg=[`value`],yg={class:`max-h-[320px] overflow-y-auto`},bg=[`onClick`],xg={class:`flex-1 min-w-0`},Sg={class:`text-sm text-text-secondary font-medium whitespace-nowrap overflow-hidden text-ellipsis`},Cg={key:0,class:`flex gap-1.5 mt-0.5 flex-wrap`},wg={key:0,class:`subagent-meta-tag`},Tg={key:1,class:`subagent-meta-tag opacity-70`},Eg={key:2,class:`subagent-meta-tag opacity-70`},Dg={key:1,class:`text-2xs text-text-faint mt-[3px] leading-[1.4] line-clamp-2`},Og={key:0,class:`p-3 text-center text-text-faint text-sm`},kg={key:1,class:`text-2xs text-text-dim whitespace-nowrap`},Ag={class:`filter-type-wrapper relative`},jg={key:0,"data-testid":`filter-type-menu`,class:`absolute top-[calc(100%+4px)] left-0 bg-surface border border-border rounded-md shadow-[0_8px_24px_rgba(0,0,0,0.5)] min-w-[250px] z-[1000]`},Mg={class:`max-h-[300px] overflow-y-auto py-1`},Ng=[`onClick`],Pg={class:`flex-1 overflow-hidden text-ellipsis whitespace-nowrap`},Fg={class:`text-text-dim text-xs ml-2 shrink-0`},Ig={key:0,"data-testid":`active-filters`,class:`flex items-center gap-1.5 py-1 px-3 pb-2 flex-wrap`},Lg={key:0,class:`filter-chip`},Rg={key:1,class:`filter-chip`},zg={key:2,class:`filter-chip`},Bg={__name:`FilterBar`,props:{sidebarCollapsed:Boolean,searchText:{type:String,default:``},searchResultCount:{type:String,default:``},turns:{type:Array,default:()=>[]},userReqs:{type:Array,default:()=>[]},currentTurnIndex:{type:Number,default:-1},subagentList:{type:Array,default:()=>[]},filteredSubagentList:{type:Array,default:()=>[]},selectedSubagent:{type:[String,null],default:null},subagentDropdownOpen:Boolean,subagentSearchQuery:{type:String,default:``},subagentTokenUsage:{type:Object,default:()=>({})},subagentColors:{type:Array,default:()=>[]},currentFilter:{type:String,default:``},typeFilterOpen:Boolean,filters:{type:Array,default:()=>[]},activeFilterCount:{type:Number,default:0},formatDuration:{type:Function,default:()=>{}},truncateText:{type:Function,default:()=>{}}},emits:[`toggleSidebar`,`update:searchText`,`jumpToTurn`,`update:currentTurnIndex`,`selectSubagent`,`toggleSubagentDropdown`,`update:subagentSearchQuery`,`setFilter`,`toggleTypeFilter`,`clearAllFilters`],setup(e,{expose:t}){let n=B(null);return t({subagentSearchRef:n}),(t,r)=>(U(),W(`div`,sg,[G(`div`,cg,[G(`button`,{class:`filter-bar-toggle`,title:e.sidebarCollapsed?`Expand sidebar`:`Collapse sidebar`,onClick:r[0]||=e=>t.$emit(`toggleSidebar`)},` ☰ `,8,lg),G(`div`,ug,[G(`input`,{value:e.searchText,type:`text`,placeholder:`🔍 Search events...`,class:`search-input flex-1 min-w-[120px] py-1.5 px-3 bg-surface border border-border rounded-md text-text-secondary text-sm outline-none transition-colors focus:border-accent focus:bg-canvas placeholder:text-text-faint`,onInput:r[1]||=e=>t.$emit(`update:searchText`,e.target.value)},null,40,dg),e.searchResultCount?(U(),W(`span`,fg,F(e.searchResultCount),1)):J(``,!0)]),r[17]||=G(`div`,{class:`filter-bar-divider w-px h-5 bg-border shrink-0`},null,-1),e.turns.length>0?(U(),W(`select`,{key:0,value:e.currentTurnIndex,class:`filter-select min-w-[260px]`,onChange:r[2]||=e=>{t.$emit(`update:currentTurnIndex`,Number(e.target.value)),t.$emit(`jumpToTurn`,Number(e.target.value))}},[(U(!0),W(H,null,zr(e.userReqs,t=>(U(),W(`optgroup`,{key:t.reqNumber,label:t.reqNumber>0?`UserReq `+t.reqNumber+`: `+e.truncateText(t.message,40):`Setup`},[(U(!0),W(H,null,zr(t.turns,e=>(U(),W(`option`,{key:e.id,value:e.id},` Turn `+F(e.originalTurnId??e.id)+` (`+F(e.duration)+`) `,9,hg))),128))],8,mg))),128))],40,pg)):J(``,!0),r[18]||=G(`div`,{class:`filter-bar-divider w-px h-5 bg-border shrink-0`},null,-1),e.subagentList.length>0?(U(),W(`div`,gg,[G(`button`,{class:`flex items-center gap-1.5 py-1 px-2.5 bg-surface border border-border rounded-md text-text-secondary text-sm cursor-pointer max-w-[280px] hover:border-accent`,onClick:r[3]||=Go(e=>t.$emit(`toggleSubagentDropdown`),[`stop`])},[r[13]||=G(`span`,null,`🤖`,-1),G(`span`,_g,F(e.selectedSubagent?e.subagentList.find(t=>t.toolCallId===e.selectedSubagent)?.name||`Agent`:`All Agents`),1),r[14]||=G(`span`,{class:`text-2xs opacity-60`},`▾`,-1)]),e.subagentDropdownOpen?(U(),W(`div`,{key:0,class:`absolute top-[calc(100%+4px)] right-0 z-[100] min-w-[320px] max-w-[420px] bg-surface border border-border rounded-lg shadow-[0_8px_24px_rgba(0,0,0,0.4)] overflow-hidden`,onClick:r[7]||=Go(()=>{},[`stop`])},[G(`input`,{ref_key:`subagentSearchRef`,ref:n,class:`w-full py-2 px-3 bg-canvas border-none border-b border-b-border text-text-secondary text-sm outline-none box-border placeholder:text-text-faint`,value:e.subagentSearchQuery,placeholder:`Search agents...`,onInput:r[4]||=e=>t.$emit(`update:subagentSearchQuery`,e.target.value),onKeydown:r[5]||=qo(e=>t.$emit(`toggleSubagentDropdown`),[`escape`])},null,40,vg),G(`div`,yg,[G(`div`,{class:P([`flex items-start gap-2 py-2 px-3 cursor-pointer border-b border-border-subtle hover:bg-surface-alt`,{"bg-accent-subtle":!e.selectedSubagent}]),onClick:r[6]||=e=>t.$emit(`selectSubagent`,null)},[...r[15]||=[G(`div`,{class:`text-sm text-text-secondary font-medium whitespace-nowrap overflow-hidden text-ellipsis`},` 🤖 All Agents `,-1)]],2),(U(!0),W(H,null,zr(e.filteredSubagentList,n=>(U(),W(`div`,{key:n.toolCallId,class:P([`flex items-start gap-2 py-2 px-3 cursor-pointer border-b border-border-subtle last:border-b-0 hover:bg-surface-alt`,{"bg-accent-subtle":e.selectedSubagent===n.toolCallId}]),onClick:e=>t.$emit(`selectSubagent`,n.toolCallId)},[G(`div`,{class:`w-1 min-h-[20px] rounded-sm shrink-0 mt-0.5`,style:j({background:e.subagentColors[n.colorIndex%e.subagentColors.length]})},null,4),G(`div`,xg,[G(`div`,Sg,F(n.name),1),n.meta.taskName||n.meta.agentType||n.meta.model?(U(),W(`div`,Cg,[n.meta.taskName?(U(),W(`span`,wg,F(n.meta.taskName),1)):J(``,!0),n.meta.agentType?(U(),W(`span`,Tg,F(n.meta.agentType),1)):J(``,!0),n.meta.model?(U(),W(`span`,Eg,F(n.meta.model),1)):J(``,!0)])):J(``,!0),n.meta.agentDescription?(U(),W(`div`,Dg,F(n.meta.agentDescription),1)):J(``,!0)])],10,bg))),128)),e.filteredSubagentList.length===0?(U(),W(`div`,Og,` No matches `)):J(``,!0)])])):J(``,!0),e.subagentTokenUsage?(U(),W(`span`,kg,F(e.subagentTokenUsage.eventCount)+` events · `+F(e.formatDuration(e.subagentTokenUsage.durationMs)),1)):J(``,!0)])):J(``,!0),r[19]||=G(`div`,{class:`filter-bar-divider w-px h-5 bg-border shrink-0`},null,-1),G(`div`,Ag,[G(`button`,{"data-testid":`filter-type-toggle`,class:P([`py-1 px-2.5 bg-surface border border-border rounded-md text-text-secondary text-sm cursor-pointer whitespace-nowrap transition-all duration-200 hover:border-accent hover:bg-canvas`,e.currentFilter===`all`?``:`!border-accent !text-accent !bg-accent-subtle`]),onClick:r[8]||=Go(e=>t.$emit(`toggleTypeFilter`),[`stop`])},` ⚡ `+F(e.currentFilter===`all`?`All Types`:e.currentFilter)+` ▾ `,3),e.typeFilterOpen?(U(),W(`div`,jg,[r[16]||=G(`div`,{class:`py-2 px-3 border-b border-border text-xs font-semibold text-text-secondary`},` Event Types `,-1),G(`div`,Mg,[(U(!0),W(H,null,zr(e.filters,n=>(U(),W(`div`,{key:n.type,"data-testid":`filter-type-item`,class:P([`flex items-center justify-between py-1.5 px-3 cursor-pointer transition-colors duration-150 text-sm text-text-secondary hover:bg-accent-subtle`,e.currentFilter===n.type?`bg-accent-subtle !text-accent`:``]),onClick:e=>{t.$emit(`setFilter`,n.type),t.$emit(`toggleTypeFilter`)}},[G(`span`,Pg,F(n.type===`all`?`All`:n.type),1),G(`span`,Fg,F(n.count),1)],10,Ng))),128))])])):J(``,!0)])]),e.activeFilterCount>0?(U(),W(`div`,Ig,[e.currentFilter===`all`?J(``,!0):(U(),W(`span`,Lg,[q(` Type: `+F(e.currentFilter)+` `,1),G(`button`,{class:`filter-chip-remove`,title:`Remove filter`,onClick:r[9]||=e=>t.$emit(`setFilter`,`all`)},`×`)])),e.selectedSubagent?(U(),W(`span`,Rg,[q(` Agent: `+F(e.subagentList.find(t=>t.toolCallId===e.selectedSubagent)?.name||e.selectedSubagent)+` `,1),G(`button`,{class:`filter-chip-remove`,title:`Remove filter`,onClick:r[10]||=e=>t.$emit(`selectSubagent`,null)},`×`)])):J(``,!0),e.searchText.trim()?(U(),W(`span`,zg,[q(` Search: "`+F(e.searchText.length>20?e.searchText.substring(0,20)+`…`:e.searchText)+`" `,1),G(`button`,{class:`filter-chip-remove`,title:`Remove filter`,onClick:r[11]||=e=>t.$emit(`update:searchText`,``)},`×`)])):J(``,!0),G(`button`,{"data-testid":`clear-all-filters`,class:`bg-none border-none text-danger-emphasis cursor-pointer text-xs py-0.5 px-1.5 rounded-badge transition-colors duration-200 hover:bg-danger-subtle`,onClick:r[12]||=e=>t.$emit(`clearAllFilters`)},` Clear all `)])):J(``,!0)]))}},Vg=[`data-type`,`data-index`],Hg={class:`turn-divider-label`},Ug={class:`turn-time`},Wg={key:0,class:`turn-time text-success turn-duration`},Gg=[`data-type`,`data-index`],Kg={key:0,class:`font-normal opacity-80 text-2xs`},qg=[`data-type`,`data-index`],Jg={class:`event-header flex items-center gap-2 mb-1.5`},Yg=[`title`],Xg={class:`event-timestamp text-xs text-text-secondary`},Zg={key:0,class:`event-content event-content-text`},Qg={key:1,class:`event-content event-content-text`},$g={key:0},e_={key:1},t_={key:2},n_={key:2,class:`event-content event-content-text`},r_={key:0},i_={key:1},a_={key:2},o_={key:3},s_={key:4},c_={key:3,class:`event-content event-content-text`},l_={key:0},u_={key:1},d_={key:4,class:`event-content mt-1.5 text-text-secondary text-left text-sm`},f_={key:0,class:`text-sm text-text`},p_={class:`model-name`},m_={class:`model-name`},h_={key:1,class:`text-sm text-text`},g_={class:`model-name`},__={key:2,class:`text-sm text-text`},v_={class:`model-name`},y_={key:3,class:`text-sm text-text`},b_={key:5,class:`event-content event-content-text`,style:{opacity:`0.7`}},x_={key:6,class:`event-content event-content-text`},S_={key:0},C_={key:1},w_={key:2},T_={key:3},E_={key:4},D_={key:7,class:`event-content event-content-text`},O_={key:8,class:`event-content event-content-text`},k_={key:0},A_={key:1},j_={key:0},M_={key:2},N_={key:3},P_={key:4,style:{"margin-top":`8px`}},F_=[`innerHTML`],I_={key:9,class:`text-sm`},L_={class:`text-text-muted`},R_={style:{color:`#8b949e`}},z_={key:0,style:{color:`#8b949e`}},B_={key:1,style:{color:`#c9d1d9`}},V_={key:2,style:{color:`#7d8590`,"margin-left":`8px`}},H_={key:3,style:{color:`#3fb950`,"margin-left":`4px`}},U_={key:4,style:{color:`#ff7b72`,"margin-left":`4px`}},W_={key:0,class:`mt-1`},G_={class:`expand-arrow`},K_={key:0,class:`hook-detail-box`},q_={key:1,class:`mt-1`},J_={class:`expand-arrow`},Y_={key:0,class:`hook-detail-box`},X_={key:2,style:{color:`#ff7b72`,"margin-top":`4px`}},Z_={key:10},Q_=[`innerHTML`],$_={key:0,style:{"margin-top":`8px`}},ev={key:11,class:`event-content event-content-text`,style:{color:`#7d8590`,"font-style":`italic`}},tv={key:12,class:`event-content reasoning-text-content text-text-secondary text-left text-sm`},nv=[`innerHTML`],rv={key:0,style:{"margin-top":`8px`}},iv={key:13,class:`mt-1.5 pl-0`},av=[`onClick`],ov={class:`text-text-faint mr-0 shrink-0 leading-none`},sv={class:`expand-arrow`},cv={class:`text-tool shrink-0 mr-1`},lv={key:0,style:{color:`#7d8590`,"margin-left":`8px`}},uv={key:1,style:{color:`#ff7b72`,"margin-left":`8px`}},dv={key:0,class:`tool-detail`},fv={key:0,class:`mb-1.5`},pv={class:`flex flex-wrap gap-x-4 gap-y-1`},mv={key:0},hv={key:1},gv={key:2},_v={key:1,class:`mb-1.5`},vv={class:``},yv={class:`tool-pre`},bv={key:2,class:`mb-1.5`},xv={class:``},Sv={class:`tool-pre`},Cv={key:3,class:`mb-1.5 last:mb-0`},wv={class:``,style:{color:`#ff7b72`}},Tv={key:14,class:`event-separator h-px bg-canvas mt-3`},Ev={__name:`EventItem`,props:{item:{type:Object,required:!0},metadata:{type:Object,required:!0},expandedTools:{type:Object,required:!0},expandedContent:{type:Object,required:!0},searchText:{type:String,default:``},subagentOwnership:{type:Object,required:!0},formatTime:{type:Function,required:!0},formatToolTime:{type:Function,required:!0},formatDateTime:{type:Function,required:!0},renderMarkdown:{type:Function,required:!0},highlightSearchText:{type:Function,required:!0},toggleTool:{type:Function,required:!0},toggleContent:{type:Function,required:!0},isContentTooLong:{type:Function,required:!0},truncateContent:{type:Function,required:!0},getBadgeInfo:{type:Function,required:!0},getToolStatus:{type:Function,required:!0},getToolErrorMessage:{type:Function,required:!0},getToolDuration:{type:Function,required:!0},getToolCommand:{type:Function,required:!0},hasTools:{type:Function,required:!0},getToolGroups:{type:Function,required:!0},getSubagentInfo:{type:Function,required:!0},getSubagentColor:{type:Function,required:!0},getTurnNumber:{type:Function,required:!0},getTurnDuration:{type:Function,required:!0},subagentColors:{type:Array,required:!0}},emits:[`selectSubagent`],setup(e){return(t,n)=>(U(),W(`div`,null,[e.item.type===`assistant.turn_start`?(U(),W(`div`,{key:0,"data-type":e.item.type,"data-index":e.item.virtualIndex,class:`turn-divider divider-base`},[G(`span`,Hg,[q(` UserReq `+F(e.getTurnNumber(e.item.virtualIndex))+` `,1),e.metadata.source===`vscode`?(U(),W(H,{key:0},[G(`span`,Ug,F(e.formatTime(e.item.timestamp)),1),e.getTurnDuration(e.item.virtualIndex)?(U(),W(`span`,Wg,F(e.getTurnDuration(e.item.virtualIndex)),1)):J(``,!0)],64)):(U(),W(H,{key:1},[q(`Start`)],64))])],8,Vg)):e.item.type===`subagent.started`||e.item.type===`subagent.completed`||e.item.type===`subagent.failed`?(U(),W(`div`,{key:1,"data-type":e.item.type,"data-index":e.item.virtualIndex,class:P([`subagent-divider divider-base`,e.item.type.split(`.`)[1]]),style:j({"--sa-color":e.getSubagentColor(e.item)||`#58a6ff`})},[G(`span`,{class:`subagent-divider-label`,style:j({color:e.getSubagentColor(e.item)||`#58a6ff`,borderColor:e.getSubagentColor(e.item)||`#58a6ff`,background:(e.getSubagentColor(e.item)||`#58a6ff`)+`1a`})},[q(` 🤖 `+F(e.item.data?.agentDisplayName||e.item.data?.agentName||`SubAgent`)+` `,1),e.subagentOwnership.subagentInfo.get(e.item.data?.toolCallId)?.meta?.model?(U(),W(`span`,Kg,`· `+F(e.subagentOwnership.subagentInfo.get(e.item.data?.toolCallId).meta.model),1)):J(``,!0),q(` `+F(e.item.type===`subagent.started`?`Start ▶`:e.item.type===`subagent.completed`?`Complete ✓`:`Failed ✗`),1)],4)],14,Gg)):(U(),W(`div`,{key:2,class:P([`event-row`]),"data-type":e.item.type,"data-index":e.item.virtualIndex,style:j(e.getSubagentColor(e.item)?{borderLeftColor:e.getSubagentColor(e.item)}:{})},[G(`div`,Jg,[G(`span`,{class:`event-badge`,style:j(e.getBadgeInfo(e.item.type,e.item).style)},F(e.getBadgeInfo(e.item.type,e.item).label),5),e.getSubagentInfo(e.item)?(U(),W(`span`,{key:0,class:`subagent-tag`,style:j({borderColor:e.getSubagentColor(e.item)||`#58a6ff`,color:e.getSubagentColor(e.item)||`#58a6ff`}),title:`Filter to `+e.getSubagentInfo(e.item).name,onMouseover:n[0]||=t=>t.target.style.background=(e.getSubagentColor(e.item)||`#58a6ff`)+`26`,onMouseout:n[1]||=e=>e.target.style.background=``,onClick:n[2]||=Go(n=>t.$emit(`selectSubagent`,e.getSubagentInfo(e.item).toolCallId),[`stop`])},`🤖 `+F(e.getSubagentInfo(e.item).name),45,Yg)):J(``,!0),G(`span`,Xg,F(e.formatTime(e.item.timestamp)),1)]),e.item.type===`abort`&&e.item.data?.reason?(U(),W(`div`,Zg,[n[8]||=G(`strong`,null,`Reason:`,-1),q(` `+F(e.item.data.reason),1)])):e.item.type===`session.start`?(U(),W(`div`,Qg,[e.item.data?.type?(U(),W(`div`,$g,[n[9]||=G(`strong`,null,`Type:`,-1),q(` `+F(e.item.data.type),1)])):J(``,!0),e.item.data?.selectedModel?(U(),W(`div`,e_,[n[10]||=G(`strong`,null,`Model:`,-1),q(` `+F(e.item.data.selectedModel),1)])):J(``,!0),e.item.data?.producer?(U(),W(`div`,t_,[n[11]||=G(`strong`,null,`Producer:`,-1),q(` `+F(e.item.data.producer),1)])):J(``,!0)])):e.item.type===`session.resume`?(U(),W(`div`,n_,[e.item.data?.resumeTime?(U(),W(`div`,r_,[n[12]||=G(`strong`,null,`Resume Time:`,-1),q(` `+F(e.formatDateTime(e.item.data.resumeTime)),1)])):J(``,!0),e.item.data?.eventCount?(U(),W(`div`,i_,[n[13]||=G(`strong`,null,`Event Count:`,-1),q(` `+F(e.item.data.eventCount),1)])):J(``,!0),e.item.data?.context?.branch?(U(),W(`div`,a_,[n[14]||=G(`strong`,null,`Branch:`,-1),q(` `+F(e.item.data.context.branch),1)])):J(``,!0),e.item.data?.context?.repository?(U(),W(`div`,o_,[n[15]||=G(`strong`,null,`Repository:`,-1),q(` `+F(e.item.data.context.repository),1)])):J(``,!0),e.item.data?.context?.cwd?(U(),W(`div`,s_,[n[16]||=G(`strong`,null,`Working Directory:`,-1),q(` `+F(e.item.data.context.cwd),1)])):J(``,!0)])):e.item.type===`session.error`&&(e.item.data?.errorType||e.item.data?.message)?(U(),W(`div`,c_,[e.item.data?.errorType?(U(),W(`div`,l_,[n[17]||=G(`strong`,null,`Error Type:`,-1),q(` `+F(e.item.data.errorType),1)])):J(``,!0),e.item.data?.message?(U(),W(`div`,u_,[n[18]||=G(`strong`,null,`Message:`,-1),q(` `+F(e.item.data.message),1)])):J(``,!0)])):e.item.type===`session.model_change`?(U(),W(`div`,d_,[e.item.data?.previousModel&&e.item.data?.newModel?(U(),W(`div`,f_,[G(`span`,p_,F(e.item.data.previousModel),1),n[19]||=G(`span`,{class:`text-text-dim mx-2`},`→`,-1),G(`span`,m_,F(e.item.data.newModel),1)])):e.item.data?.newModel?(U(),W(`div`,h_,[n[20]||=q(` Switched to `,-1),G(`span`,g_,F(e.item.data.newModel),1)])):e.item.data?.model?(U(),W(`div`,__,[n[21]||=q(` Switched to `,-1),G(`span`,v_,F(e.item.data.model),1)])):(U(),W(`div`,y_,` Model changed `))])):e.item.type===`system.notification`?(U(),W(`div`,b_,[G(`span`,null,F(e.item.data?.message),1)])):e.item.type===`session.truncation`?(U(),W(`div`,x_,[e.item.data?.messagesRemovedDuringTruncation?(U(),W(`div`,S_,[n[22]||=G(`strong`,null,`Messages removed:`,-1),q(` `+F(e.item.data.messagesRemovedDuringTruncation),1)])):J(``,!0),e.item.data?.tokensRemovedDuringTruncation?(U(),W(`div`,C_,[n[23]||=G(`strong`,null,`Tokens removed:`,-1),q(` `+F(e.item.data.tokensRemovedDuringTruncation.toLocaleString()),1)])):J(``,!0),e.item.data?.preTruncationTokensInMessages?(U(),W(`div`,w_,[n[24]||=G(`strong`,null,`Pre-truncation tokens:`,-1),q(` `+F(e.item.data.preTruncationTokensInMessages.toLocaleString()),1)])):J(``,!0),e.item.data?.postTruncationMessagesLength?(U(),W(`div`,T_,[n[25]||=G(`strong`,null,`Post-truncation messages:`,-1),q(` `+F(e.item.data.postTruncationMessagesLength),1)])):J(``,!0),e.item.data?.performedBy?(U(),W(`div`,E_,[n[26]||=G(`strong`,null,`Performed by:`,-1),q(` `+F(e.item.data.performedBy),1)])):J(``,!0)])):e.item.type===`session.compaction_start`?(U(),W(`div`,D_,` Context compaction started `)):e.item.type===`session.compaction_complete`?(U(),W(`div`,O_,[e.item.data?.success==null?J(``,!0):(U(),W(`div`,k_,[n[27]||=G(`strong`,null,`Success:`,-1),q(` `+F(e.item.data.success?`✓`:`✗`),1)])),e.item.data?.compactionTokensUsed?(U(),W(`div`,A_,[n[28]||=G(`strong`,null,`Tokens used:`,-1),q(` input `+F(e.item.data.compactionTokensUsed.input?.toLocaleString()||0)+`, output `+F(e.item.data.compactionTokensUsed.output?.toLocaleString()||0)+` `,1),e.item.data.compactionTokensUsed.cachedInput?(U(),W(`span`,j_,`, cached `+F(e.item.data.compactionTokensUsed.cachedInput.toLocaleString()),1)):J(``,!0)])):J(``,!0),e.item.data?.preCompactionMessagesLength?(U(),W(`div`,M_,[n[29]||=G(`strong`,null,`Pre-compaction messages:`,-1),q(` `+F(e.item.data.preCompactionMessagesLength),1)])):J(``,!0),e.item.data?.preCompactionTokens?(U(),W(`div`,N_,[n[30]||=G(`strong`,null,`Pre-compaction tokens:`,-1),q(` `+F(e.item.data.preCompactionTokens.toLocaleString()),1)])):J(``,!0),e.item.data?.summaryContent?(U(),W(`div`,P_,[G(`button`,{style:{background:`none`,border:`1px solid #30363d`,color:`#58a6ff`,padding:`4px 12px`,"border-radius":`4px`,cursor:`pointer`,"font-size":`13px`},onClick:n[3]||=t=>e.toggleContent(`compaction-`+e.item.stableId)},F(e.expandedContent[`compaction-`+e.item.stableId]?`Hide summary ▲`:`Show summary ▼`),1),e.expandedContent[`compaction-`+e.item.stableId]?(U(),W(`div`,{key:0,class:`event-content`,style:{"margin-top":`8px`},innerHTML:e.renderMarkdown(e.item.data.summaryContent)},null,8,F_)):J(``,!0)])):J(``,!0)])):e.item.data?.hookType?(U(),W(`div`,I_,[G(`div`,L_,[G(`span`,R_,F(e.item.data.hookType),1),e.item.data.hookToolName?(U(),W(`span`,z_,` → `)):J(``,!0),e.item.data.hookToolName?(U(),W(`span`,B_,F(e.item.data.hookToolName),1)):J(``,!0),e.item.data.hookDurationMs==null?J(``,!0):(U(),W(`span`,V_,F(e.item.data.hookDurationMs)+`ms`,1)),e.item.data.hookSuccess===!0?(U(),W(`span`,H_,`✓`)):J(``,!0),e.item.data.hookSuccess===!1?(U(),W(`span`,U_,`✗`)):J(``,!0)]),e.item.data.hookArgs&&Object.keys(e.item.data.hookArgs).length>0?(U(),W(`div`,W_,[G(`div`,{class:`hook-toggle`,onClick:n[4]||=t=>e.toggleContent(`hook-args-`+e.item.stableId)},[G(`span`,G_,F(e.expandedContent[`hook-args-`+e.item.stableId]?`▼`:`▶`),1),n[31]||=G(`span`,{style:{color:`#8b949e`}},`Arguments`,-1)]),e.expandedContent[`hook-args-`+e.item.stableId]?(U(),W(`div`,K_,[G(`pre`,null,F(JSON.stringify(e.item.data.hookArgs,null,2)),1)])):J(``,!0)])):J(``,!0),e.item.data.hookResult?(U(),W(`div`,q_,[G(`div`,{class:`hook-toggle`,onClick:n[5]||=t=>e.toggleContent(`hook-result-`+e.item.stableId)},[G(`span`,J_,F(e.expandedContent[`hook-result-`+e.item.stableId]?`▼`:`▶`),1),n[32]||=G(`span`,{style:{color:`#8b949e`}},`Result`,-1)]),e.expandedContent[`hook-result-`+e.item.stableId]?(U(),W(`div`,Y_,[G(`pre`,null,F(e.item.data.hookResult),1)])):J(``,!0)])):J(``,!0),e.item.data.hookError?(U(),W(`div`,X_,` Error: `+F(e.item.data.hookError),1)):J(``,!0)])):e.item.data?.message||e.item.data?.text||e.item.data?.content||e.item.data?.transformedContent?(U(),W(`div`,Z_,[G(`div`,{class:`event-content event-content-text`,innerHTML:e.highlightSearchText(e.renderMarkdown(e.expandedContent[e.item.stableId]||!e.isContentTooLong(e.item.data?.message||e.item.data?.text||e.item.data?.content||e.item.data?.transformedContent)?e.item.data?.message||e.item.data?.text||e.item.data?.content||e.item.data?.transformedContent:e.truncateContent(e.item.data?.message||e.item.data?.text||e.item.data?.content||e.item.data?.transformedContent)),e.searchText)},null,8,Q_),e.isContentTooLong(e.item.data?.message||e.item.data?.text||e.item.data?.content||e.item.data?.transformedContent)?(U(),W(`div`,$_,[G(`button`,{style:{background:`none`,border:`1px solid #30363d`,color:`#58a6ff`,padding:`4px 12px`,"border-radius":`4px`,cursor:`pointer`,"font-size":`13px`},onClick:n[6]||=t=>e.toggleContent(e.item.stableId)},F(e.expandedContent[e.item.stableId]?`Show less ▲`:`Show more ▼`),1)])):J(``,!0)])):!e.hasTools(e.item)&&!e.item.data?.reasoningText?(U(),W(`div`,ev,` No available message `)):J(``,!0),e.item.data?.reasoningText?(U(),W(`div`,tv,[G(`div`,{innerHTML:e.highlightSearchText(e.renderMarkdown(e.expandedContent[e.item.stableId+`-reasoning`]||!e.isContentTooLong(e.item.data.reasoningText)?e.item.data.reasoningText:e.truncateContent(e.item.data.reasoningText)),e.searchText)},null,8,nv),e.isContentTooLong(e.item.data.reasoningText)?(U(),W(`div`,rv,[G(`button`,{style:{background:`none`,border:`1px solid #30363d`,color:`#58a6ff`,padding:`4px 12px`,"border-radius":`4px`,cursor:`pointer`,"font-size":`13px`},onClick:n[7]||=t=>e.toggleContent(e.item.stableId+`-reasoning`)},F(e.expandedContent[e.item.stableId+`-reasoning`]?`Show less ▲`:`Show more ▼`),1)])):J(``,!0)])):J(``,!0),e.hasTools(e.item)?(U(),W(`div`,iv,[(U(!0),W(H,null,zr(e.getToolGroups(e.item),(t,r)=>(U(),W(`div`,{key:r,class:`py-0.5`},[G(`div`,{class:`tool-header`,onClick:t=>e.toggleTool(e.item.stableId+`-`+r)},[G(`span`,ov,F(r===e.getToolGroups(e.item).length-1?`└─`:`├─`),1),G(`span`,sv,F(e.expandedTools[e.item.stableId+`-`+r]?`▼`:`▶`),1),G(`span`,cv,`🔧\xA0`+F(t.start?.data?.toolName||t.tool||`Tool`),1),G(`span`,{class:P(e.getToolStatus(t).color),style:{"margin-left":`4px`}},`(`+F(e.getToolStatus(t).icon)+F(e.getToolDuration(t)?` `+e.getToolDuration(t):``)+`)`,3),e.getToolCommand(t)?(U(),W(`span`,lv,F(e.getToolCommand(t)),1)):J(``,!0),e.getToolErrorMessage(t)?(U(),W(`span`,uv,F(e.getToolErrorMessage(t).length>80?e.getToolErrorMessage(t).substring(0,80)+`...`:e.getToolErrorMessage(t)),1)):J(``,!0)],8,av),e.expandedTools[e.item.stableId+`-`+r]?(U(),W(`div`,dv,[t.timing.startTime||t.timing.endTime||t.timing.duration?(U(),W(`div`,fv,[G(`div`,pv,[t.timing.startTime?(U(),W(`span`,mv,[n[33]||=G(`span`,{class:`text-text-muted font-medium mr-[3px]`},`Start`,-1),q(` `+F(e.formatToolTime(t.timing.startTime)),1)])):J(``,!0),t.timing.endTime?(U(),W(`span`,hv,[n[34]||=G(`span`,{class:`text-text-muted font-medium mr-[3px]`},`Complete`,-1),q(` `+F(e.formatToolTime(t.timing.endTime)),1)])):J(``,!0),t.timing.duration?(U(),W(`span`,gv,[n[35]||=G(`span`,{class:`text-text-muted font-medium mr-[3px]`},`Duration`,-1),q(` `+F(t.timing.duration),1)])):J(``,!0)])])):J(``,!0),t.start?.data?.arguments?(U(),W(`div`,_v,[n[36]||=G(`div`,{class:`tool-section-label`},` Arguments: `,-1),G(`div`,vv,[G(`pre`,yv,F(JSON.stringify(t.start.data.arguments,null,2)),1)])])):J(``,!0),t.complete?.data?.result?(U(),W(`div`,bv,[n[37]||=G(`div`,{class:`tool-section-label`},` Result: `,-1),G(`div`,xv,[G(`pre`,Sv,F(JSON.stringify(t.complete.data.result,null,2)),1)])])):J(``,!0),e.getToolErrorMessage(t)?(U(),W(`div`,Cv,[n[38]||=G(`div`,{class:`tool-section-label`},` Error: `,-1),G(`div`,wv,F(e.getToolErrorMessage(t)),1)])):J(``,!0)])):J(``,!0)]))),128))])):J(``,!0),e.item.isLastEvent?J(``,!0):(U(),W(`div`,Tv))],12,qg))]))}};function Dv(e){if(!e||typeof e!=`object`)return 0;let t=Number.isFinite(e.inputTokens)?e.inputTokens:0,n=Number.isFinite(e.cacheReadTokens)?e.cacheReadTokens:0,r=Number.isFinite(e.cacheWriteTokens)?e.cacheWriteTokens:0;return Math.max(t-n-r,0)}var Ov=[`#58a6ff`,`#f0883e`,`#a371f7`,`#3fb950`,`#f778ba`,`#79c0ff`,`#d29922`,`#56d4dd`];function kv(e){let t=new Map,n=new Map,r=0;for(let t of e)if(t.type===`subagent.started`){let e=t.data?.toolCallId;e&&n.set(e,{name:t.data?.agentDisplayName||t.data?.agentName||`SubAgent`,colorIndex:r++,meta:{agentName:t.data?.agentName||``,agentDisplayName:t.data?.agentDisplayName||``,agentDescription:t.data?.agentDescription||``}})}for(let t of e){if(t.type!==`tool.execution_start`)continue;let e=t.data?.toolCallId;if(!e||!n.has(e))continue;let r=n.get(e),i=t.data?.arguments;if(typeof i==`string`)try{i=JSON.parse(i)}catch{continue}!i||typeof i!=`object`||(i.description&&(r.meta.taskDescription=i.description),i.name&&(r.meta.taskName=i.name),i.agent_type&&(r.meta.agentType=i.agent_type),i.mode&&(r.meta.taskMode=i.mode),i.description&&r.name===(r.meta.agentDisplayName||r.meta.agentName)&&(r.name=i.description))}for(let i of e)if(i.type===`assistant.message`&&i.data?.subAgentName&&i.data?.subAgentId){let e=i.data.subAgentId;n.has(e)||n.set(e,{name:i.data.subAgentName,colorIndex:r++,meta:{agentName:i.data.subAgentName}}),t.set(i.stableId,e)}for(let i of e)if(i._subagent?.id){let e=i._subagent.id;n.has(e)||n.set(e,{name:i._subagent.name||`SubAgent`,colorIndex:r++,meta:{agentName:i._subagent.name||``}}),t.set(i.stableId,e)}if(n.size===0)return{ownerMap:t,subagentInfo:n};let i=new Map;for(let t of e)t.id&&i.set(t.id,t);for(let r of e)if(r.type===`assistant.message`){let e=r.data?.parentToolCallId;e&&n.has(e)&&t.set(r.stableId,e)}for(let r of e){if(r.type!==`reasoning`)continue;let e=r.parentId,a=0;for(;e&&a<10;){let o=i.get(e);if(!o)break;if(o.type===`assistant.message`){let e=o.data?.parentToolCallId;e&&n.has(e)&&t.set(r.stableId,e);break}e=o.parentId,a++}}let a=new Map;for(let r of e){if(r.type!==`tool.execution_start`)continue;let e=r.parentId,o=0;for(;e&&o<10;){let s=i.get(e);if(!s)break;if(s.type===`assistant.message`){let e=s.data?.parentToolCallId;if(e&&n.has(e)){t.set(r.stableId,e);let n=r.data?.toolCallId;n&&a.set(n,e)}break}e=s.parentId,o++}}for(let n of e){if(n.type!==`tool.execution_complete`)continue;let e=n.data?.toolCallId;e&&a.has(e)&&t.set(n.stableId,a.get(e))}for(let r of e){if(r.type!==`tool.invocation`)continue;let e=r.data?.parentToolCallId;e&&n.has(e)&&t.set(r.stableId,e)}let o=null;for(let r of e)r.type===`subagent.started`&&r.data?.toolCallId&&n.has(r.data.toolCallId)?o=r.data.toolCallId:(r.type===`subagent.completed`||r.type===`subagent.failed`)&&r.data?.toolCallId===o?o=null:o&&!t.has(r.stableId)&&t.set(r.stableId,o);for(let[r,i]of n)for(let n of e){if(!(t.get(n.stableId)===r||n._subagent?.id===r||n.data?.subAgentId===r))continue;let e=n.model||n.data?.model;if(e){i.meta.model=e;break}}return{ownerMap:t,subagentInfo:n}}function Av(e,t,n){return t?e.filter(e=>(e.type===`subagent.started`||e.type===`subagent.completed`||e.type===`subagent.failed`)&&e.data?.toolCallId===t||n.get(e.stableId)===t||e._subagent?.id===t||e.data?.subAgentId===t):e}function jv(e){let t=B(null),n=B(!1),r=B(``),i=B(null),a=Y(()=>kv(e.value)),o=Y(()=>{let{subagentInfo:e}=a.value;if(e.size===0)return[];let t=[];for(let[n,r]of e)t.push({toolCallId:n,name:r.name,colorIndex:r.colorIndex,meta:r.meta||{}});return t}),s=Y(()=>{let e=r.value.toLowerCase().trim();return e?o.value.filter(t=>{let n=t.meta||{};return[t.name,n.taskName,n.taskDescription,n.agentName,n.agentType,n.agentDescription,n.model].filter(Boolean).join(` `).toLowerCase().includes(e)}):o.value}),c=Y(()=>{if(!t.value)return null;let{ownerMap:n,subagentInfo:r}=a.value,i=t.value;if(!r.has(i))return null;let o=0,s=null,c=null;for(let t of e.value){let e=(t.type===`subagent.started`||t.type===`subagent.completed`||t.type===`subagent.failed`)&&t.data?.toolCallId===i,r=n.get(t.stableId)===i,a=t._subagent?.id===i,l=t.data?.subAgentId===i;if((e||r||a||l)&&(o++,t.timestamp!==null&&t.timestamp!==void 0)){let e=new Date(t.timestamp).getTime();(s===null||e<s)&&(s=e),(c===null||e>c)&&(c=e)}}let l=s===null||c===null?0:c-s;return{eventCount:o,durationMs:l}}),l=e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t},u=e=>{let{ownerMap:t,subagentInfo:n}=a.value;if(e.type===`subagent.started`||e.type===`subagent.completed`||e.type===`subagent.failed`){let t=e.data?.toolCallId;if(t&&n.has(t)){let e=n.get(t);return{name:e.name,toolCallId:t,colorIndex:e.colorIndex}}return null}if(e._subagent){let t=e._subagent.id;if(n.has(t)){let e=n.get(t);return{name:e.name,toolCallId:t,colorIndex:e.colorIndex}}return{name:e._subagent.name,toolCallId:t,colorIndex:Math.abs(l(t))}}if(e.data?.subAgentId){let t=e.data.subAgentId,r=n.get(t);if(r)return{name:r.name,toolCallId:t,colorIndex:r.colorIndex}}let r=t.get(e.stableId);if(!r)return null;let i=n.get(r);return i?{name:i.name,toolCallId:r,colorIndex:i.colorIndex}:null};return{SUBAGENT_COLORS:Ov,selectedSubagent:t,subagentDropdownOpen:n,subagentSearchQuery:r,subagentSearchRef:i,subagentOwnership:a,subagentList:o,filteredSubagentList:s,subagentTokenUsage:c,getSubagentInfo:u,getSubagentColor:e=>{let t=u(e);return t?Ov[t.colorIndex%Ov.length]:null},selectSubagent:e=>{t.value=e,n.value=!1,r.value=``},closeSubagentDropdown:()=>{n.value=!1},filterBySubagent:Av,hashCode:l}}function Mv(e,t,n,r){let i=B(`all`),a=B(``),o=B(``),s=B(!1),c=null;Vn(a,e=>{clearTimeout(c),c=setTimeout(()=>{o.value=e},300)});let l=Y(()=>{let e=0;return i.value!==`all`&&e++,n.value&&e++,a.value.trim()&&e++,e}),u=()=>{i.value=`all`,n.value=null,a.value=``,o.value=``,s.value=!1},d=e=>{if(!o.value.trim())return!0;let t=o.value.toLowerCase();return[e.data?.message,e.data?.text,e.data?.content,e.data?.reason,e.data?.reasoningText,e.data?.errorType,e.data?.previousModel,e.data?.newModel].filter(Boolean).join(` `).toLowerCase().includes(t)},f=Y(()=>{let t=e.value.filter(e=>{let t=e.type||``;return t!==`tool.execution_start`&&t!==`tool.execution_complete`});return o.value.trim()&&(t=t.filter(d)),t});return{currentFilter:i,searchText:a,debouncedSearchText:o,typeFilterOpen:s,activeFilterCount:l,clearAllFilters:u,filteredEvents:Y(()=>{let e=f.value;if(n.value){let{ownerMap:i}=t.value;e=r(e,n.value,i)}i.value!==`all`&&(e=e.filter(e=>e.type===i.value));let a=[`assistant.turn_start`,`subagent.started`,`subagent.completed`,`subagent.failed`],o=e.length;return e.map((t,n)=>{let r=e[n+1],i=n===o-1,s=r&&a.includes(r.type);return{...t,filteredIndex:n,filteredTotal:o,isLastEvent:i||s}})}),eventCounts:Y(()=>{let e={};return f.value.forEach(t=>{t.type&&(e[t.type]=(e[t.type]||0)+1)}),e}),searchResultCount:Y(()=>{if(!o.value.trim())return null;let e=f.value.length;return e>0?`${e} result${e===1?``:`s`}`:`No matches`}),filters:Y(()=>{let e=f.value.length,t=[{type:`all`,label:`All (${e})`,count:e}],n={};f.value.forEach(e=>{e.type&&(n[e.type]=(n[e.type]||0)+1)});let r=Object.entries(n).sort((e,t)=>t[1]-e[1]).map(([e,t])=>({type:e,label:`${e} (${t})`,count:t,disabled:!1}));return[...t,...r]}),setFilter:e=>{i.value=e},closeTypeFilter:e=>{let t=document.querySelector(`.filter-type-wrapper`);t&&!t.contains(e.target)&&(s.value=!1)},getSearchTimeout:()=>c,clearSearchTimeout:()=>{c&&=(clearTimeout(c),null)}}}function Nv(){let e=new Map,t=e=>{if(!e)return``;let t=new Date(e);return`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`},n=e=>{if(!e)return``;let t=new Date(e);return`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}.${String(t.getMilliseconds()).padStart(3,`0`)}`},r=e=>e?new Date(e).toLocaleString():`N/A`,i=e=>!e||e===0?`0`:e<1e3?e.toString():Math.floor(e/1e3)+`K`,a=e=>{if(!e||e===0)return`0s`;let t=Math.floor(e/1e3);return t<60?(e/1e3).toFixed(1)+`s`:`${Math.floor(t/60)}m ${t%60}s`},o=e=>e==null?``:e+` premium`,s=e=>{let t=document.createElement(`div`);return t.textContent=e,t.innerHTML};return{formatTime:t,formatToolTime:n,formatDateTime:r,formatTokens:i,formatDuration:a,formatCost:o,escapeHtml:s,renderMarkdown:t=>{if(!t)return``;if(e.has(t))return e.get(t);try{let n=t.replace(/\\r\\n/g,`
68
+ `).replace(/\\n/g,`
69
+ `).replace(/\\t/g,` `).replace(/\\"/g,`"`).replace(/\\\\/g,`\\`),r={ALLOWED_TAGS:`p.br.strong.em.code.pre.a.ul.ol.li.h1.h2.h3.h4.h5.h6.blockquote.table.thead.tbody.tr.th.td.hr.del.span.div.mark`.split(`.`),ALLOWED_ATTR:[`href`,`style`,`class`],ALLOW_DATA_ATTR:!1,ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i},i=n.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);if(i){let n=i[1],a=i[2],o=n.split(`
70
+ `),s=[],c=0;for(;c<o.length;){let e=o[c];if(!e.trim()||!e.includes(`:`)){c++;continue}let t=e.indexOf(`:`),n=e.substring(0,t).trim(),r=e.substring(t+1).trim();if(r===`|`||r===`>`){let e=[];for(c++;c<o.length&&(o[c].startsWith(` `)||o[c].startsWith(` `)||o[c].trim()===``);)e.push(o[c].trim()),c++;let t=r===`>`?` `:`
71
+ `;s.push({key:n,value:e.filter(e=>e).join(t)})}else s.push({key:n,value:r}),c++}let l=`<table style="margin-bottom: 16px; border-collapse: collapse; width: 100%;"><tbody>`;s.forEach(e=>{let t=Pd.sanitize(e.key,{ALLOWED_TAGS:[]}),n=Pd.sanitize(e.value,{ALLOWED_TAGS:[]});l+=`<tr><td style="padding: 4px 12px; border: 1px solid #30363d; font-weight: 600; color: #7d8590;">${t}</td><td style="padding: 4px 12px; border: 1px solid #30363d;">${n}</td></tr>`}),l+=`</tbody></table>`;let u=$.parse(a),d=Pd.sanitize(u,r),f=l+d;return e.size>=200&&e.delete(e.keys().next().value),e.set(t,f),f}let a=$.parse(n),o=Pd.sanitize(a,r);return e.size>=200&&e.delete(e.keys().next().value),e.set(t,o),o}catch{return t}},highlightSearchText:(e,t)=>{if(!t||!t.trim()||!e)return e;let n=s(t.trim()).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),r=document.createElement(`div`);r.innerHTML=e;let i=e=>{if(e.nodeType===Node.TEXT_NODE){let t=e.textContent,r=RegExp(`(${n})`,`gi`);if(r.test(t)){let n=t.replace(r,`<mark class="search-highlight">$1</mark>`),i=document.createElement(`span`);i.innerHTML=n,e.parentNode.replaceChild(i,e)}}else e.nodeType===Node.ELEMENT_NODE&&e.tagName!==`SCRIPT`&&e.tagName!==`STYLE`&&Array.from(e.childNodes).forEach(i)};return Array.from(r.childNodes).forEach(i),r.innerHTML},isContentTooLong:e=>e?e.split(`
72
+ `).length>20||e.length>2e3:!1,truncateContent:e=>{let t=e.split(`
73
+ `);return t.length<=20?e:t.slice(0,20).join(`
74
+ `)+`
75
+
76
+ ...`},truncateText:(e,t)=>e?e.length<=t?e:e.substring(0,t)+`…`:``,clearMarkdownCache:()=>e.clear()}}function Pv(){return{getToolStatus:e=>{if(!e.complete)return{icon:`⏳`,color:`text-warning`,text:``};let t=e.complete.data||{};return t.error||t.isError?{icon:`❌`,color:`text-danger`,text:``}:{icon:`✓`,color:`text-success-emphasis`,text:``}},getToolErrorMessage:e=>{if(!e.complete?.data?.error)return``;let t=e.complete.data.error;if(typeof t==`object`&&t.message)return t.message;if(typeof t==`string`){try{let e=JSON.parse(t);if(e.message)return e.message}catch{}return t}return String(t)},getToolDuration:e=>{if(!e.complete)return``;let t=new Date(e.complete.timestamp).getTime()-new Date(e.start.timestamp).getTime();return t>=100?`${parseFloat((t/1e3).toPrecision(3))}s`:``},getToolCommand:e=>{if(!e.start)return``;let t=e.start.data?.arguments||{},n=e.start.data?.toolName||e.tool||``,r;if(n===`bash`||n===`exec`)r=t.command||t.description||``;else if(n===`ask_user`)r=t.question||t.message||``;else if(n===`read`||n===`write`||n===`edit`)r=t.file_path||t.path||``;else if(n===`view`)r=t.path||t.file||``;else if(n===`create`)r=t.path||t.name||``;else if(n===`report_intent`)r=t.intent||t.message||``;else if(n===`web_search`)r=t.query||``;else if(n===`web_fetch`)r=t.url||``;else if(n===`browser`){let e=t.action||``,n=t.targetUrl||t.url||``;r=n?`${e} ${n}`:e}else r=t.description||t.command||t.message||t.path||t.file_path||t.query||``;return r&&r.length>200&&(r=r.substring(0,200)+`...`),r},hasTools:e=>e.data?.tools&&e.data.tools.length>0,getToolGroups:e=>e.data?.tools&&Array.isArray(e.data.tools)?e.data.tools.filter(e=>e&&typeof e==`object`&&e.name).map(e=>{let t=e.result!==void 0||e.status===`completed`||e.status===`error`,n={};if(e.startTime&&(n.startTime=e.startTime),e.endTime&&(n.endTime=e.endTime),n.startTime&&n.endTime){let e=new Date(n.endTime).getTime()-new Date(n.startTime).getTime();e>=0&&(n.duration=`${parseFloat((e/1e3).toPrecision(3))}s (${e}ms)`)}return{tool:e.name,timing:n,start:{timestamp:e.startTime,data:{toolName:e.name,arguments:e.input||e.arguments||{}}},complete:t?{timestamp:e.endTime,data:{result:e.result,error:e.status===`error`?e.error:null}}:null}}):[]}}var Fv=[`#3b82f6`,`#10b981`,`#f59e0b`,`#ef4444`,`#8b5cf6`,`#ec4899`,`#06b6d4`,`#f97316`];function Iv(e,t){let n=B([]),r=B([]),i=B(!1),a=B([]),o=B(``),s=B(null),c=B(``),l=B(!1),u=B([]),d=B(0),f=null,p=e=>{let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return Fv[Math.abs(t)%Fv.length]},m=async()=>{try{let r=await fetch(`/api/${encodeURIComponent(t.value)}/sessions/${e.value}/tags`);r.ok&&(n.value=(await r.json()).tags||[])}catch(e){console.error(`Error loading tags:`,e)}},h=async()=>{try{let e=await fetch(`/api/tags`);e.ok&&(r.value=(await e.json()).tags||[])}catch(e){console.error(`Error loading all tags:`,e)}},g=async r=>{try{let i=await fetch(`/api/${encodeURIComponent(t.value)}/sessions/${e.value}/tags`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({tags:r})});return i.ok?(n.value=(await i.json()).tags||[],c.value=``,!0):(c.value=(await i.json()).error||`Failed to save tags`,!1)}catch{return c.value=`Network error`,!1}},_=()=>{a.value=[...n.value],i.value=!0,c.value=``,setTimeout(()=>s.value?.focus(),10)},v=()=>{i.value=!1,a.value=[],o.value=``,l.value=!1,c.value=``},y=()=>{let e=o.value.trim().toLowerCase();if(e){if(e.length>30){c.value=`Tag must be 30 characters or less`;return}if(a.value.length>=10){c.value=`Maximum 10 tags per session`;return}if(a.value.includes(e)){c.value=`Tag already added`,o.value=``;return}a.value.push(e),o.value=``,l.value=!1,c.value=``}};return{sessionTags:n,allTags:r,tagsEditing:i,editingTags:a,tagInputValue:o,tagInputRef:s,tagsError:c,showAutocomplete:l,autocompleteOptions:u,autocompleteSelectedIndex:d,getTagColor:p,loadTags:m,loadAllTags:h,startEditTags:_,cancelEditTags:v,addTag:y,removeTagFromEdit:e=>{a.value=a.value.filter(t=>t!==e),c.value=``},updateAutocomplete:()=>{let e=o.value.trim().toLowerCase();if(!e){l.value=!1,u.value=[];return}let t=r.value.filter(t=>t.toLowerCase().includes(e)&&!a.value.includes(t)).slice(0,5);t.length>0?(l.value=!0,u.value=t,d.value=0):(l.value=!1,u.value=[])},selectAutocompleteOption:e=>{o.value=e,y()},saveTagsOnBlur:async()=>{f&&clearTimeout(f),f=setTimeout(async()=>{i.value&&await g(a.value)&&(i.value=!1,a.value=[],o.value=``,l.value=!1,await h())},200)},cleanup:()=>{f&&=(clearTimeout(f),null)}}}function Lv(e,t){let n=B(!1);return{exporting:n,exportSession:async()=>{n.value=!0;try{let n=await fetch(`/api/${encodeURIComponent(t.value)}/sessions/${e.value}/export`);if(!n.ok)throw Error(`Share failed`);let r=await n.blob(),i=window.URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`session-${e.value}.zip`,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(i),document.body.removeChild(a)}catch(e){alert(`Failed to share session: `+e.message)}finally{n.value=!1}}}}var Rv=`modulepreload`,zv=function(e){return`/`+e},Bv={},Vv=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=zv(t,n),t in Bv)return;Bv[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Rv,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function Hv(e){if(!e||typeof e!=`object`)return null;let t=Number.isFinite(e.cacheReadTokens)?e.cacheReadTokens:0,n=Dv(e)+t;return t===0||n===0?null:Math.round(t/n*100)}function Uv(){let e=ec(),t=Y(()=>e.params.id),n=Y(()=>e.params.source),r=Y(()=>e.query.dirId||null),i=B({}),a=()=>window.innerWidth<=640,o=B(a()?!0:localStorage.getItem(`sidebarCollapsed`)===`true`);Vn(o,e=>{a()||localStorage.setItem(`sidebarCollapsed`,e.toString())});let s=B({}),c=B({}),l=()=>{let e=Object.keys(s.value);e.length>50&&e.slice(0,e.length-50).forEach(e=>delete s.value[e]);let t=Object.keys(c.value);t.length>50&&t.slice(0,t.length-50).forEach(e=>delete c.value[e])},u=B(0),d=B(null),f=B({start:0,end:0}),p=null,m=B([]),h=B(!0),g=B(null),_=Y(()=>m.value.filter(e=>e.type!==`assistant.turn_end`&&e.type!==`assistant.turn_complete`).sort((e,t)=>{let n=e.timestamp?new Date(e.timestamp).getTime():0,r=t.timestamp?new Date(t.timestamp).getTime():0;return n===r?(e._fileIndex??0)-(t._fileIndex??0):n-r}).map((e,t)=>({...e,virtualIndex:t,stableId:e.id||`${e.timestamp}-${e.type}-${t}`}))),v=jv(_);Vn(v.subagentDropdownOpen,e=>{e&&vn(()=>v.subagentSearchRef.value?.focus())});let y=e=>{v.selectSubagent(e),e&&(b.currentFilter.value=`all`)},b=Mv(_,v.subagentOwnership,v.selectedSubagent,v.filterBySubagent);Vn(b.currentFilter,()=>l()),Vn(b.debouncedSearchText,()=>l());let x=Nv(),S=Pv(),C=Iv(t,n),w=Lv(t,n),T=Y(()=>Object.keys(s.value).filter(e=>s.value[e]).length+Object.keys(c.value).filter(e=>c.value[e]).length),ee=e=>{let t={...s.value};t[e]?delete t[e]:t[e]=!0,s.value=t},te=e=>{let t={...c.value};t[e]?delete t[e]:t[e]=!0,c.value=t},E=Y(()=>{let e=_.value.filter(e=>e.type===`assistant.turn_start`),t=_.value.filter(e=>e.type===`user.message`);return e.map((n,r)=>{let i=new Date(n.timestamp).getTime(),a;a=r+1<e.length?new Date(e[r+1].timestamp).getTime():Date.now();let o=a-i,s=Math.floor(o/1e3),c=Math.floor(s/60),l=s%60,u=c>0?`${c}m ${l}s`:`${l}s`,d=_.value.slice(0,_.value.indexOf(n)).reverse().find(e=>e.type===`user.message`),f=d?t.indexOf(d)+1:0;return{id:r,index:n.virtualIndex,originalTurnId:n.data?.turnId,timestamp:n.timestamp,duration:u,message:d?.data?.content||d?.data?.transformedContent||``,userReqNumber:f}})}),ne=Y(()=>{let e=[],t=new Map;return E.value.forEach(n=>{let r=n.userReqNumber||0;if(!t.has(r)){let i={reqNumber:r,message:n.message,turns:[]};t.set(r,i),e.push(i)}t.get(r).turns.push(n)}),e}),D=(e,t)=>{if(t?.data?.badgeLabel&&t?.data?.badgeClass)return{label:t.data.badgeLabel,style:re(t.data.badgeClass)};if(e===`message`&&t?.data?.role===`toolResult`)return{label:`TOOL RESULT`,style:{backgroundColor:`var(--color-badge-tool)`,color:`#fff`}};if(e===`session.model_change`)return{label:`MODEL CHANGE`,style:{backgroundColor:`var(--color-badge-session)`,color:`#fff`}};if(e===`session.truncation`)return{label:`TRUNCATION`,style:{backgroundColor:`var(--color-badge-truncation)`,color:`#fff`}};if(e===`session.compaction_start`||e===`session.compaction_complete`)return{label:`COMPACTION`,style:{backgroundColor:`var(--color-badge-compaction)`,color:`#fff`}};if(e===`system.notification`)return{label:`SYSTEM`,style:{backgroundColor:`var(--color-badge-system)`,color:`#adbac7`,fontStyle:`italic`}};let n=(e||``).split(`.`)[0]||`unknown`;return{user:{label:`USER`,style:{backgroundColor:`var(--color-badge-user)`,color:`#fff`}},assistant:{label:`ASSISTANT`,style:{backgroundColor:`var(--color-badge-assistant)`,color:`#fff`}},reasoning:{label:`REASONING`,style:{backgroundColor:`var(--color-badge-reasoning)`,color:`#fff`}},turn:{label:`TURN`,style:{backgroundColor:`var(--color-badge-turn)`,color:`#fff`}},tool:{label:`TOOL`,style:{backgroundColor:`var(--color-badge-tool)`,color:`#fff`}},subagent:{label:`SUBAGENT`,style:{backgroundColor:`var(--color-badge-subagent)`,color:`#fff`}},skill:{label:`SKILL`,style:{backgroundColor:`var(--color-badge-skill)`,color:`#fff`}},session:{label:`SESSION`,style:{backgroundColor:`var(--color-badge-session)`,color:`#fff`}},error:{label:`ERROR`,style:{backgroundColor:`var(--color-badge-error)`,color:`#fff`}},abort:{label:`ABORT`,style:{backgroundColor:`var(--color-badge-abort)`,color:`#fff`}},system:{label:`SYSTEM`,style:{backgroundColor:`var(--color-badge-system)`,color:`#adbac7`,fontStyle:`italic`}}}[n]||{label:n.toUpperCase(),style:{backgroundColor:`var(--color-badge-default)`,color:`#fff`}}};function re(e){let t={color:`#fff`},n={"badge-user":`var(--color-badge-user)`,"badge-assistant":`var(--color-badge-assistant)`,"badge-reasoning":`var(--color-badge-reasoning)`,"badge-turn":`var(--color-badge-turn)`,"badge-tool":`var(--color-badge-tool)`,"badge-subagent":`var(--color-badge-subagent)`,"badge-skill":`var(--color-badge-skill)`,"badge-session":`var(--color-badge-session)`,"badge-error":`var(--color-badge-error)`,"badge-abort":`var(--color-badge-abort)`,"badge-truncation":`var(--color-badge-truncation)`,"badge-compaction":`var(--color-badge-compaction)`,"badge-system":`var(--color-badge-system)`,"badge-hook":`var(--color-badge-tool)`,"badge-default":`var(--color-badge-default)`},r=e.trim();if(n[r])t.backgroundColor=n[r];else{let n=e.match(/bg-\[([^\]]+)\]/);n?t.backgroundColor=n[1]:e.includes(`bg-accent-emphasis`)?t.backgroundColor=`var(--color-badge-user)`:e.includes(`bg-success-emphasis`)?t.backgroundColor=`var(--color-badge-assistant)`:e.includes(`bg-purple-light`)?t.backgroundColor=`var(--color-badge-reasoning)`:e.includes(`bg-text-faint`)?t.backgroundColor=`var(--color-badge-session)`:e.includes(`bg-danger`)?t.backgroundColor=`var(--color-badge-error)`:e.includes(`bg-surface-overlay`)?t.backgroundColor=`var(--color-badge-system)`:e.includes(`bg-pink`)?t.backgroundColor=`var(--color-badge-skill)`:e.includes(`bg-accent`)&&(t.backgroundColor=`var(--color-badge-default)`)}return e.includes(`italic`)&&(t.fontStyle=`italic`),r===`badge-system`&&(t.color=`#adbac7`),t}let O=[],k=e=>{b.searchText.value=``,b.currentFilter.value=`all`,v.selectedSubagent.value=null,u.value=e.id,vn(()=>{if(d.value){let t=b.filteredEvents.value.findIndex(t=>t.virtualIndex===e.index);if(t>=0){let e=n=>{n<=0||!d.value||(d.value.scrollToItem(t),O.push(setTimeout(()=>e(n-1),100)))};O.push(setTimeout(()=>e(3),50))}}})},ie=()=>{if(!d.value)return;let e=t=>{t<=0||!d.value||(d.value.scrollToItem(0),O.push(setTimeout(()=>e(t-1),100)))};e(3)},A=()=>{if(!d.value)return;let e=b.filteredEvents.value.length-1,t=n=>{n<=0||!d.value||(d.value.scrollToItem(e),O.push(setTimeout(()=>t(n-1),100)))};t(5)},ae=e=>{let t=E.value.find(t=>t.id===e);if(t){let e=`UserReq${t.userReqNumber}_Turn${t.id}`,n=`${window.location.pathname}?eventType=assistant.turn_start&eventName=${e}`;window.history.pushState({},``,n),k(t)}},oe=e=>{if(!e)return``;let t=e.replace(/\/$/,``).split(`/`);return t[t.length-1]||e},se=e=>{let t=E.value.find(t=>t.index===e);if(!t)return`?`;let n=t.originalTurnId??t.id;return t.userReqNumber>0?`${t.userReqNumber} - Turn ${n}`:`Turn ${n}`},j=e=>E.value.find(t=>t.index===e)?.duration||null,M=Y(()=>{if(!i.value.usage?.modelMetrics)return 0;let e=0;for(let t in i.value.usage.modelMetrics){let n=i.value.usage.modelMetrics[t].usage;n&&(e+=(n.inputTokens||0)+(n.outputTokens||0))}return e}),ce=Y(()=>{if(!i.value.usage?.modelMetrics)return 0;let e=0;for(let t in i.value.usage.modelMetrics)e+=i.value.usage.modelMetrics[t].requests?.count||0;return e}),N=Y(()=>i.value.usage?.modelMetrics?Object.keys(i.value.usage.modelMetrics).length:0),le=e=>{let t=i.value.usage?.modelMetrics[e];return t?.usage?Hv(t.usage):null},P=e=>{let t=i.value.usage?.modelMetrics[e];return t?.usage?Dv(t.usage):0},ue=Y(()=>{let e=new Map;for(let t of _.value)if(t.data?.tools&&Array.isArray(t.data.tools))for(let n of t.data.tools)n?.name&&e.set(n.name,(e.get(n.name)||0)+1);return Array.from(e,([e,t])=>({name:e,count:t})).sort((e,t)=>t.count-e.count)}),de=e=>{e.ctrlKey&&e.key===`b`&&(e.preventDefault(),o.value=!o.value)};return Sr(async()=>{document.addEventListener(`click`,b.closeTypeFilter),document.addEventListener(`click`,v.closeSubagentDropdown),window.addEventListener(`keydown`,de),$.setOptions({breaks:!0,gfm:!0});let e=(await Vv(async()=>{let{useSessionStore:e}=await import(`./sessionStore-CW_Vbbsn.js`);return{useSessionStore:e}},[])).useSessionStore();try{let a=await e.fetchMetadata(t.value,n.value,r.value);a&&(i.value=a)}catch(e){console.error(`Error loading metadata:`,e)}try{if(m.value=await e.fetchEvents(t.value,n.value,r.value),m.value.length>0){let e=m.value[m.value.length-1],t=e.timestamp||e.time||e.data?.timestamp;t&&(i.value={...i.value,updated:new Date(t)})}let a=new URLSearchParams(window.location.search),o=a.get(`eventType`),s=a.get(`eventName`),c=a.get(`eventTimestamp`);o&&s&&vn(()=>{let e=null;if(o===`assistant.turn_start`){let e=s.match(/UserReq(\d+)_Turn(\d+)/);if(e){let t=parseInt(e[2],10);if(!isNaN(t)){ae(t);return}}}else o===`subagent.started`?(c&&(e=_.value.find(e=>e.type===`subagent.started`&&e.timestamp===c)),e||=_.value.find(e=>e.type===`subagent.started`&&(e.data?.agentDisplayName===s||e.data?.agentName===s||e.data?.label===s))):e=_.value.find(e=>e.type===o);if(e){let t=b.filteredEvents.value.findIndex(t=>t.virtualIndex===e.virtualIndex);if(t>=0&&d.value){let e=n=>{n<=0||!d.value||(d.value.scrollToItem(t),O.push(setTimeout(()=>e(n-1),100)))};O.push(setTimeout(()=>e(3),50))}}})}catch(e){g.value=e.message}finally{h.value=!1}await C.loadTags(),await C.loadAllTags(),O.push(setTimeout(()=>{let e=document.querySelector(`.vue-recycle-scroller`);if(e){let t=()=>{let t=e.scrollTop,n=e.clientHeight,r=Math.floor(t/80),i=Math.ceil(n/80),a=Math.min(r+i,b.filteredEvents.value.length),o=Math.max(1,r+1),s=Math.max(1,a);f.value={start:Math.min(o,s),end:s}};e.addEventListener(`scroll`,t),p=()=>e.removeEventListener(`scroll`,t),t()}},500))}),Tr(()=>{O.forEach(e=>clearTimeout(e)),O.length=0,document.removeEventListener(`click`,b.closeTypeFilter),document.removeEventListener(`click`,v.closeSubagentDropdown),window.removeEventListener(`keydown`,de),b.clearSearchTimeout(),p&&=(p(),null),C.cleanup(),s.value={},c.value={},x.clearMarkdownCache()}),{sessionId:t,source:n,metadata:i,exporting:w.exporting,sidebarCollapsed:o,expandedTools:s,expandedContent:c,expansionCount:T,currentFilter:b.currentFilter,searchText:b.searchText,debouncedSearchText:b.debouncedSearchText,currentTurnIndex:u,scrollerRef:d,visibleRange:f,loadedEvents:m,eventsLoading:h,eventsError:g,flatEvents:_,filteredEvents:b.filteredEvents,eventCounts:b.eventCounts,filters:b.filters,turns:E,userReqs:ne,truncateText:x.truncateText,formatTime:x.formatTime,formatToolTime:x.formatToolTime,formatDateTime:x.formatDateTime,renderMarkdown:x.renderMarkdown,highlightSearchText:x.highlightSearchText,toggleTool:ee,toggleContent:te,isContentTooLong:x.isContentTooLong,truncateContent:x.truncateContent,getBadgeInfo:D,getToolStatus:S.getToolStatus,getToolErrorMessage:S.getToolErrorMessage,getToolDuration:S.getToolDuration,getToolCommand:S.getToolCommand,hasTools:S.hasTools,getToolGroups:S.getToolGroups,getSubagentInfo:v.getSubagentInfo,getSubagentColor:v.getSubagentColor,subagentOwnership:v.subagentOwnership,setFilter:b.setFilter,selectSubagent:y,selectedSubagent:v.selectedSubagent,subagentList:v.subagentList,filteredSubagentList:v.filteredSubagentList,subagentDropdownOpen:v.subagentDropdownOpen,subagentSearchQuery:v.subagentSearchQuery,subagentSearchRef:v.subagentSearchRef,subagentTokenUsage:v.subagentTokenUsage,SUBAGENT_COLORS:v.SUBAGENT_COLORS,typeFilterOpen:b.typeFilterOpen,activeFilterCount:b.activeFilterCount,clearAllFilters:b.clearAllFilters,scrollToTurn:k,scrollToTop:ie,scrollToBottom:A,jumpToTurn:ae,getTurnNumber:se,getTurnDuration:j,repoBasename:oe,escapeHtml:x.escapeHtml,exportSession:w.exportSession,searchResultCount:b.searchResultCount,sessionTags:C.sessionTags,allTags:C.allTags,tagsEditing:C.tagsEditing,editingTags:C.editingTags,tagInputValue:C.tagInputValue,tagInputRef:C.tagInputRef,tagsError:C.tagsError,showAutocomplete:C.showAutocomplete,autocompleteOptions:C.autocompleteOptions,autocompleteSelectedIndex:C.autocompleteSelectedIndex,getTagColor:C.getTagColor,startEditTags:C.startEditTags,cancelEditTags:C.cancelEditTags,addTag:C.addTag,removeTagFromEdit:C.removeTagFromEdit,updateAutocomplete:C.updateAutocomplete,selectAutocompleteOption:C.selectAutocompleteOption,saveTagsOnBlur:C.saveTagsOnBlur,formatTokens:x.formatTokens,formatDuration:x.formatDuration,formatCost:x.formatCost,totalTokens:M,totalRequests:ce,totalModels:N,getDisplayUsageInputTokens:P,getModelCacheHitRatio:le,toolCallingSummary:ue}}var Wv={"data-testid":`session-layout`,class:`max-w-full h-screen flex flex-col p-0 font-sans bg-canvas text-text-secondary leading-normal overflow-hidden`},Gv={class:`flex flex-1 overflow-hidden`},Kv={class:`flex-1 flex flex-col overflow-hidden relative`},qv={key:0,class:`loading-message`},Jv={key:1,class:`error-message`},Yv={style:{"text-align":`center`,padding:`40px`,color:`#f85149`}},Xv={class:`fixed bottom-6 right-6 flex flex-col gap-2 z-modal`},Zv={__name:`SessionView`,setup(e){let{sessionId:t,source:n,metadata:r,exporting:i,sidebarCollapsed:a,expandedTools:o,expandedContent:s,expansionCount:c,currentFilter:l,searchText:u,debouncedSearchText:d,currentTurnIndex:f,scrollerRef:p,visibleRange:m,loadedEvents:h,eventsLoading:g,eventsError:_,flatEvents:v,filteredEvents:y,eventCounts:b,filters:x,turns:S,userReqs:C,truncateText:w,formatTime:T,formatToolTime:ee,formatDateTime:te,renderMarkdown:E,highlightSearchText:ne,toggleTool:D,toggleContent:re,isContentTooLong:O,truncateContent:k,getBadgeInfo:ie,getToolStatus:A,getToolErrorMessage:ae,getToolDuration:oe,getToolCommand:se,hasTools:j,getToolGroups:M,getSubagentInfo:ce,getSubagentColor:N,subagentOwnership:le,setFilter:P,selectSubagent:ue,selectedSubagent:de,subagentList:fe,filteredSubagentList:pe,subagentDropdownOpen:me,subagentSearchQuery:he,subagentSearchRef:ge,subagentTokenUsage:_e,SUBAGENT_COLORS:ve,typeFilterOpen:I,activeFilterCount:ye,clearAllFilters:be,scrollToTurn:xe,scrollToTop:Se,scrollToBottom:L,jumpToTurn:Ce,getTurnNumber:we,getTurnDuration:Te,repoBasename:Ee,escapeHtml:De,exportSession:Oe,searchResultCount:ke,sessionTags:Ae,allTags:je,tagsEditing:Me,editingTags:Ne,tagInputValue:Pe,tagInputRef:Fe,tagsError:Ie,showAutocomplete:Le,autocompleteOptions:Re,autocompleteSelectedIndex:ze,getTagColor:Be,startEditTags:Ve,cancelEditTags:He,addTag:Ue,removeTagFromEdit:We,updateAutocomplete:Ge,selectAutocompleteOption:R,saveTagsOnBlur:Ke,formatTokens:qe,formatDuration:Je,formatCost:Ye,totalTokens:Xe,totalRequests:Ze,totalModels:Qe,getDisplayUsageInputTokens:$e,getModelCacheHitRatio:et,toolCallingSummary:tt}=Uv();return(e,d)=>(U(),W(`div`,Wv,[K(Im,{"session-id":V(t),source:V(n),metadata:V(r),exporting:V(i),onExport:V(Oe)},null,8,[`session-id`,`source`,`metadata`,`exporting`,`onExport`]),G(`div`,Gv,[V(a)?J(``,!0):(U(),W(`div`,{key:0,class:`hidden sm:hidden max-sm:block fixed inset-0 bg-black/50 z-backdrop`,onClick:d[0]||=e=>a.value=!0})),K(og,{class:`sidebar`,collapsed:V(a),metadata:V(r),"format-date-time":V(te),"format-tokens":V(qe),"format-duration":V(Je),"format-cost":V(Ye),"total-tokens":V(Xe),"total-requests":V(Ze),"total-models":V(Qe),"get-display-usage-input-tokens":V($e),"get-model-cache-hit-ratio":V(et),"tool-calling-summary":V(tt),"session-tags":V(Ae),"tags-editing":V(Me),"editing-tags":V(Ne),"tag-input-value":V(Pe),"tags-error":V(Ie),"show-autocomplete":V(Le),"autocomplete-options":V(Re),"autocomplete-selected-index":V(ze),"get-tag-color":V(Be),onStartEditTags:V(Ve),onCancelEditTags:V(He),onAddTag:V(Ue),onRemoveTagFromEdit:V(We),onUpdateAutocomplete:V(Ge),onSelectAutocompleteOption:V(R),onSaveTagsOnBlur:V(Ke),"onUpdate:tagInputValue":d[1]||=e=>Pe.value=e},null,8,`collapsed.metadata.format-date-time.format-tokens.format-duration.format-cost.total-tokens.total-requests.total-models.get-display-usage-input-tokens.get-model-cache-hit-ratio.tool-calling-summary.session-tags.tags-editing.editing-tags.tag-input-value.tags-error.show-autocomplete.autocomplete-options.autocomplete-selected-index.get-tag-color.onStartEditTags.onCancelEditTags.onAddTag.onRemoveTagFromEdit.onUpdateAutocomplete.onSelectAutocompleteOption.onSaveTagsOnBlur`.split(`.`)),G(`div`,Kv,[K(Bg,{"sidebar-collapsed":V(a),"search-text":V(u),"search-result-count":V(ke),turns:V(S),"user-reqs":V(C),"current-turn-index":V(f),"subagent-list":V(fe),"filtered-subagent-list":V(pe),"selected-subagent":V(de),"subagent-dropdown-open":V(me),"subagent-search-query":V(he),"subagent-token-usage":V(_e),"subagent-colors":V(ve),"current-filter":V(l),"type-filter-open":V(I),filters:V(x),"active-filter-count":V(ye),"format-duration":V(Je),"truncate-text":V(w),onToggleSidebar:d[2]||=e=>a.value=!V(a),"onUpdate:searchText":d[3]||=e=>u.value=e,onJumpToTurn:V(Ce),"onUpdate:currentTurnIndex":d[4]||=e=>f.value=e,onSelectSubagent:V(ue),onToggleSubagentDropdown:d[5]||=e=>me.value=!V(me),"onUpdate:subagentSearchQuery":d[6]||=e=>he.value=e,onSetFilter:V(P),onToggleTypeFilter:d[7]||=e=>I.value=!V(I),onClearAllFilters:V(be)},null,8,[`sidebar-collapsed`,`search-text`,`search-result-count`,`turns`,`user-reqs`,`current-turn-index`,`subagent-list`,`filtered-subagent-list`,`selected-subagent`,`subagent-dropdown-open`,`subagent-search-query`,`subagent-token-usage`,`subagent-colors`,`current-filter`,`type-filter-open`,`filters`,`active-filter-count`,`format-duration`,`truncate-text`,`onJumpToTurn`,`onSelectSubagent`,`onSetFilter`,`onClearAllFilters`]),V(g)?(U(),W(`div`,qv,[...d[10]||=[G(`div`,{style:{"text-align":`center`,padding:`40px`,color:`#c9d1d9`}},` ⏳ Loading events... `,-1)]])):V(_)?(U(),W(`div`,Jv,[G(`div`,Yv,` ❌ Error loading events: `+F(V(_)),1)])):(U(),da(V(Om),{key:2,ref_key:`scrollerRef`,ref:p,items:V(y),"min-item-size":80,prerender:10,"key-field":`stableId`,class:`scroller`},{default:Nn(({item:e,index:t,active:n})=>[K(V(Am),{item:e,active:n,"size-dependencies":[V(c)],"data-index":t},{default:Nn(()=>[K(Ev,{item:e,metadata:V(r),"expanded-tools":V(o),"expanded-content":V(s),"search-text":V(u),"subagent-ownership":V(le),"format-time":V(T),"format-tool-time":V(ee),"format-date-time":V(te),"render-markdown":V(E),"highlight-search-text":V(ne),"toggle-tool":V(D),"toggle-content":V(re),"is-content-too-long":V(O),"truncate-content":V(k),"get-badge-info":V(ie),"get-tool-status":V(A),"get-tool-error-message":V(ae),"get-tool-duration":V(oe),"get-tool-command":V(se),"has-tools":V(j),"get-tool-groups":V(M),"get-subagent-info":V(ce),"get-subagent-color":V(N),"get-turn-number":V(we),"get-turn-duration":V(Te),"subagent-colors":V(ve),onSelectSubagent:V(ue)},null,8,`item.metadata.expanded-tools.expanded-content.search-text.subagent-ownership.format-time.format-tool-time.format-date-time.render-markdown.highlight-search-text.toggle-tool.toggle-content.is-content-too-long.truncate-content.get-badge-info.get-tool-status.get-tool-error-message.get-tool-duration.get-tool-command.has-tools.get-tool-groups.get-subagent-info.get-subagent-color.get-turn-number.get-turn-duration.subagent-colors.onSelectSubagent`.split(`.`))]),_:2},1032,[`item`,`active`,`size-dependencies`,`data-index`])]),_:1},8,[`items`])),d[11]||=G(`div`,{class:`h-[max(env(safe-area-inset-bottom,0px),16px)] shrink-0`},null,-1),G(`div`,Xv,[G(`button`,{title:`Scroll to top`,class:`scroll-btn`,onClick:d[8]||=(...e)=>V(Se)&&V(Se)(...e)},` ▲ `),G(`button`,{title:`Scroll to bottom`,class:`scroll-btn`,onClick:d[9]||=(...e)=>V(L)&&V(L)(...e)},` ▼ `)])])])]))}},Qv={"data-testid":`summary-grid`,class:`grid grid-cols-6 max-md:grid-cols-2 gap-3 my-5 mx-auto`},$v={class:`summary-card`,title:`Wall-clock time from first event to last event in this session.`},ey={class:`summary-value`},ty={key:0,class:`summary-sub`,style:{"font-size":`10px`,opacity:`0.7`}},ny={class:`summary-card`,title:`Number of user messages that triggered agent work. Each request may involve multiple LLM turns.`},ry={class:`summary-value`},iy={class:`summary-sub`},ay={class:`summary-card`,title:`Total tool executions (Read, Write, Edit, Bash, Grep, etc.) across the entire session, including subagent tools.`},oy={class:`summary-value`},sy={class:`summary-sub`},cy={key:0,style:{color:`#f85149`}},ly={class:`summary-card`,title:`Spawned subagents (via Task tool). Shows completed/failed/incomplete counts, total wall-clock time, and tool calls attributed to subagents.`},uy={class:`summary-value`},dy={key:0,class:`summary-sub`},fy={key:0,style:{color:`#f85149`}},py={key:1,style:{color:`#d29922`}},my={class:`summary-card`,title:`Estimated LLM reasoning time (total duration minus tool execution and user thinking time). Breakdown shows LLM percentage, tool wall-clock time, and user idle time.`},hy={class:`summary-value`},gy={style:{"font-size":`14px`,opacity:`0.6`}},_y={class:`summary-sub`},vy={key:0},yy={class:`summary-card`,title:`Token usage across all models: input, output, and cached tokens.`},by={class:`summary-value`},xy={class:`summary-sub`},Sy={__name:`SummaryCards`,props:{formatDuration:{type:Function,required:!0},formatDateTime:{type:Function,required:!0},formatTokens:{type:Function,required:!0},totalDuration:{type:Number,required:!0},sessionStart:{type:Number,default:0},sessionEnd:{type:Number,default:0},groupedTurns:{type:Array,required:!0},turnAnalysis:{type:Array,required:!0},totalToolCount:{type:Number,required:!0},successRate:{type:Number,required:!0},errorCount:{type:Number,required:!0},subagentAnalysis:{type:Array,required:!0},subagentStats:{type:Object,required:!0},timeBreakdown:{type:Object,required:!0},totalToolTime:{type:Number,required:!0},totalTokens:{type:Number,required:!0},totalRequests:{type:Number,required:!0},totalModels:{type:Number,required:!0}},setup(e){return(t,n)=>(U(),W(`div`,Qv,[G(`div`,$v,[n[0]||=G(`div`,{class:`summary-label`},` Total Duration `,-1),G(`div`,ey,F(e.formatDuration(e.totalDuration)),1),e.sessionStart?(U(),W(`div`,ty,F(e.formatDateTime(e.sessionStart))+` → `+F(e.formatDateTime(e.sessionEnd)),1)):J(``,!0)]),G(`div`,ny,[n[1]||=G(`div`,{class:`summary-label`},` User Requests `,-1),G(`div`,ry,F(e.groupedTurns.length),1),G(`div`,iy,F(e.turnAnalysis.length)+` turn`+F(e.turnAnalysis.length===1?``:`s`),1)]),G(`div`,ay,[n[3]||=G(`div`,{class:`summary-label`},` Tool Calls `,-1),G(`div`,oy,F(e.totalToolCount),1),G(`div`,sy,[G(`span`,{style:j({color:e.successRate>=95?`#3fb950`:e.successRate>=80?`#d29922`:`#f85149`})},F(e.successRate)+`%`,5),n[2]||=q(` success `,-1),e.errorCount>0?(U(),W(`span`,cy,` · `+F(e.errorCount)+` error`+F(e.errorCount===1?``:`s`),1)):J(``,!0)])]),G(`div`,ly,[n[4]||=G(`div`,{class:`summary-label`},` Sub-Agents `,-1),G(`div`,uy,F(e.subagentAnalysis.length),1),e.subagentAnalysis.length>0?(U(),W(`div`,dy,[G(`span`,{style:j({color:e.subagentStats.successRate>=95?`#3fb950`:e.subagentStats.successRate>=80?`#d29922`:`#f85149`})},F(e.subagentStats.completed)+`✓`,5),e.subagentStats.failed>0?(U(),W(`span`,fy,` · `+F(e.subagentStats.failed)+`✗`,1)):J(``,!0),e.subagentStats.incomplete>0?(U(),W(`span`,py,` · `+F(e.subagentStats.incomplete)+`⏳`,1)):J(``,!0),q(` · `+F(e.formatDuration(e.subagentStats.totalTime))+` · `+F(e.subagentStats.totalTools)+` tools `,1)])):J(``,!0)]),G(`div`,my,[n[5]||=G(`div`,{class:`summary-label`},` Time Breakdown `,-1),G(`div`,hy,[q(F(e.formatDuration(e.timeBreakdown.llmTime))+` `,1),G(`span`,gy,`(`+F(e.timeBreakdown.llmPct)+`% LLM Reasoning)`,1)]),G(`div`,_y,[q(` Tools `+F(e.formatDuration(e.totalToolTime))+` (`+F(e.timeBreakdown.toolPct)+`%) `,1),e.timeBreakdown.userThinkingTime>1e3?(U(),W(`span`,vy,` · User `+F(e.formatDuration(e.timeBreakdown.userThinkingTime))+` (`+F(e.timeBreakdown.userThinkingPct)+`%)`,1)):J(``,!0)])]),G(`div`,yy,[n[6]||=G(`div`,{class:`summary-label`},` Token Usage `,-1),G(`div`,by,F(e.formatTokens(e.totalTokens)),1),G(`div`,xy,F(e.totalRequests)+` reqs · `+F(e.totalModels)+` model`+F(e.totalModels===1?``:`s`),1)])]))}},Cy={class:`marker-tooltip`},wy={key:0},Ty={__name:`EventMarker`,props:{marker:{type:Object,required:!0}},setup(e){return(t,n)=>(U(),W(`span`,{class:`absolute top-1/2 -translate-x-1/2 -translate-y-1/2 z-[2] cursor-pointer transition-transform duration-150 hover:scale-[1.8] hover:z-10 group`,style:j({left:e.marker.position+`%`})},[e.marker.shape===`cluster`?(U(),W(`span`,{key:0,class:`w-3.5 h-3.5 rounded-full flex items-center justify-center text-[8px] font-bold text-white border border-white/30`,style:j({background:e.marker.color})},F(e.marker.count),5)):e.marker.shape===`circle`?(U(),W(`span`,{key:1,class:`w-1.5 h-1.5 rounded-full block`,style:j({background:e.marker.color})},null,4)):e.marker.shape===`diamond`?(U(),W(`span`,{key:2,class:`w-1.5 h-1.5 rotate-45 block`,style:j({background:e.marker.color})},null,4)):e.marker.shape===`square`?(U(),W(`span`,{key:3,class:`w-[5px] h-[5px] rounded-[1px] block`,style:j({background:e.marker.color})},null,4)):e.marker.shape===`triangle`?(U(),W(`span`,{key:4,class:`w-0 h-0 border-l-[4px] border-r-[4px] border-b-[7px] border-l-transparent border-r-transparent border-b-current block`,style:j({color:e.marker.color})},null,4)):J(``,!0),G(`span`,Cy,[e.marker.shape===`cluster`?(U(),W(H,{key:0},[q(F(e.marker.count)+` events: `+F(e.marker.label),1)],64)):(U(),W(H,{key:1},[q(F(e.marker.label),1),e.marker.toolName?(U(),W(`span`,wy,` (`+F(e.marker.toolName)+`)`,1)):J(``,!0)],64))])],4))}},Ey={class:`my-6`},Dy={key:0,class:`empty-state`,style:{color:`#f85149`}},Oy={key:1,class:`empty-state`},ky={key:2},Ay={class:`text-base font-semibold text-text mb-3 pb-2 border-b border-border`,style:{display:`flex`,"align-items":`center`}},jy={class:`flex flex-wrap gap-2.5 py-2.5 px-3.5 bg-surface border border-border rounded-md mb-3`},My={key:0,class:`legend-item`},Ny={class:`absolute top-1 left-1/2 -translate-x-1/2 bg-border text-text text-2xs py-0.5 px-1.5 rounded-badge whitespace-nowrap pointer-events-none`},Py={key:0,class:`gantt-divider border-b border-border py-1 my-0.5 flex items-center gap-2 text-text-dim text-2xs uppercase tracking-[0.5px]`},Fy={key:1,class:`gantt-row`},Iy=[`title`],Ly={class:`inline-block py-0.5 px-2 bg-accent-subtle text-accent rounded text-2xs font-semibold font-mono shrink-0 mt-0.5`},Ry={class:`font-normal text-2xs text-text-muted overflow-hidden text-ellipsis ml-1.5`},zy={class:`gantt-bar-area`},By=[`title`],Vy={key:2,class:`gantt-row`},Hy=[`title`],Uy={class:`gantt-bar-area`},Wy=[`title`],Gy={key:3,class:`gantt-row`},Ky=[`title`],qy={class:`text-2xs text-text-faint block overflow-hidden text-ellipsis`},Jy={class:`gantt-bar-area`},Yy=[`title`],Xy={class:`flex justify-between ml-[212px] py-1 text-2xs text-text-dim font-mono border-t border-border`},Zy={key:0,style:{"margin-top":`24px`}},Qy={style:{display:`grid`,"grid-template-columns":`repeat(auto-fill, minmax(220px, 1fr))`,gap:`8px`}},$y={style:{flex:`1`,"min-width":`0`}},eb={style:{display:`flex`,"justify-content":`space-between`,"align-items":`baseline`,"margin-bottom":`4px`}},tb={style:{color:`#d29922`,"font-weight":`500`,"font-size":`13px`}},nb={style:{color:`#7d8590`,"font-size":`11px`}},rb={key:0,style:{color:`#f85149`}},ib={style:{background:`#21262d`,"border-radius":`3px`,height:`6px`,overflow:`hidden`}},ab={style:{color:`#7d8590`,"font-size":`11px`,"margin-top":`3px`}},ob={__name:`TimelineTab`,props:{error:{type:[String,Object,null],default:null},sessionId:{type:String,required:!0},events:{type:Array,required:!0},unifiedTimelineItems:{type:Array,required:!0},showMarkerLegend:{type:Boolean,required:!0},copyLabel:{type:String,required:!0},eventMarkerCategories:{type:Object,required:!0},ganttCrosshairX:{type:Number,default:null},ganttCrosshairTime:{type:String,default:``},onGanttMouseMove:{type:Function,required:!0},onGanttMouseLeave:{type:Function,required:!0},ganttPosition:{type:Function,required:!0},formatDuration:{type:Function,required:!0},formatTime:{type:Function,required:!0},toolTimeByCategory:{type:Array,required:!0},maxCategoryTime:{type:Number,required:!0}},emits:[`toggle-legend`,`copy-timeline`],setup(e){return(t,n)=>{let r=Nr(`router-link`);return U(),W(`div`,Ey,[e.error?(U(),W(`div`,Dy,` Error loading timeline: `+F(e.error),1)):e.unifiedTimelineItems.length?(U(),W(`div`,ky,[G(`div`,Ay,[n[4]||=q(` Timeline `,-1),G(`button`,{class:`timeline-action-btn`,onClick:n[0]||=e=>t.$emit(`toggle-legend`)},F(e.showMarkerLegend?`Hide Legend`:`Show Legend`),1),G(`button`,{class:`timeline-action-btn`,onClick:n[1]||=e=>t.$emit(`copy-timeline`)},F(e.copyLabel),1)]),Pn(G(`div`,jy,[n[5]||=ya(`<div class="legend-item"><span class="legend-dot" style="background:rgba(88, 166, 255, 0.5);"></span><span>User Request</span></div><div class="legend-item"><span class="legend-dot" style="background:rgba(63, 185, 80, 0.8);"></span><span>Sub-Agent</span></div><div class="legend-item"><span class="legend-dot" style="background:rgba(139, 148, 158, 0.3);border:1px dashed rgba(139, 148, 158, 0.5);"></span><span>Main Agent</span></div><div class="legend-item"><span class="legend-dot" style="background:#d29922;"></span><span>Tool (no errors)</span></div><div class="legend-item"><span class="legend-dot" style="background:linear-gradient(to right, #d29922, #f85149);"></span><span>Tool (error gradient)</span></div><div class="legend-item"><span class="legend-dot" style="background:#f85149;"></span><span>Tool Error (100%)</span></div>`,6),(U(!0),W(H,null,zr(e.eventMarkerCategories,(e,t)=>(U(),W(H,{key:t},[t&&!t.startsWith(`tool.`)?(U(),W(`div`,My,[G(`span`,{class:`legend-dot`,style:j({background:e.color,borderRadius:e.shape===`circle`?`50%`:e.shape===`diamond`?`1px`:`2px`,transform:e.shape===`diamond`?`rotate(45deg)`:`none`})},null,4),G(`span`,null,F(e.label),1)])):J(``,!0)],64))),128))],512),[[so,e.showMarkerLegend]]),G(`div`,{class:`overflow-x-auto overflow-y-visible pb-2 pt-[22px] relative`,onMousemove:n[2]||=(...t)=>e.onGanttMouseMove&&e.onGanttMouseMove(...t),onMouseleave:n[3]||=(...t)=>e.onGanttMouseLeave&&e.onGanttMouseLeave(...t)},[e.ganttCrosshairX===null?J(``,!0):(U(),W(`div`,{key:0,class:`absolute top-0 bottom-0 w-px bg-[rgba(139,148,158,0.5)] pointer-events-none z-10`,style:j({left:e.ganttCrosshairX+`px`})},[G(`div`,Ny,F(e.ganttCrosshairTime),1)],4)),(U(!0),W(H,null,zr(e.unifiedTimelineItems,(t,i)=>(U(),W(H,{key:`utl-`+i},[t.rowType===`divider`?(U(),W(`div`,Py,` Tool Summary `)):t.rowType===`user-req`?(U(),W(`div`,Fy,[G(`div`,{class:`gantt-label font-semibold text-text`,title:t.message||`No message`},[G(`span`,Ly,`UserReq `+F(t.userReqNumber),1),G(`span`,Ry,F((t.message||``).substring(0,40))+F((t.message||``).length>40?`...`:``),1)],8,Iy),G(`div`,zy,[G(`div`,{class:`gantt-bar bg-[rgba(88,166,255,0.35)] border border-[rgba(88,166,255,0.6)]`,style:j(e.ganttPosition(t.startTime,t.endTime)),title:`UserReq `+t.userReqNumber+` — `+e.formatDuration(t.duration)},F(e.formatDuration(t.duration)),13,By)])])):t.rowType===`subagent`?(U(),W(`div`,Vy,[G(`div`,{class:`gantt-label pl-5`,title:t.name},[K(r,{to:`/session/`+e.sessionId+`?eventType=subagent.started&eventName=`+encodeURIComponent(t.name)+`&eventTimestamp=`+encodeURIComponent(t.startTime||``),class:`text-accent no-underline transition-colors duration-200 hover:text-link hover:underline`,title:`View events from here`},{default:Nn(()=>[G(`span`,{style:j({color:t.status===`completed`?`#3fb950`:t.status===`failed`?`#f85149`:`#d29922`})},F(t.status===`completed`?`✓`:t.status===`failed`?`✗`:`⏳`),5),q(` `+F(t.name),1)]),_:2},1032,[`to`])],8,Hy),G(`div`,Uy,[G(`div`,{class:`gantt-bar`,style:j({...e.ganttPosition(t.startTime,t.endTime),background:t.status===`completed`?`rgba(63, 185, 80, 0.8)`:t.status===`failed`?`rgba(248, 81, 73, 0.8)`:`rgba(210, 153, 34, 0.8)`}),title:t.name+` — `+e.formatDuration(t.duration)},[q(F(e.formatDuration(t.duration))+` `,1),t.innerEventMarkers&&t.innerEventMarkers.length?(U(!0),W(H,{key:0},zr(t.innerEventMarkers,(e,t)=>(U(),da(Ty,{key:`m-`+t,marker:e},null,8,[`marker`]))),128)):J(``,!0)],12,Wy)])])):t.rowType===`main-agent`?(U(),W(`div`,Gy,[G(`div`,{class:`gantt-label pl-5 text-text-dim italic`,title:t.summary},[n[6]||=G(`span`,{class:`text-text-muted mr-1`},`⚙`,-1),n[7]||=G(`span`,null,`Main Agent`,-1),G(`span`,qy,F(t.summary),1)],8,Ky),G(`div`,Jy,[G(`div`,{class:`gantt-bar bg-[rgba(139,148,158,0.3)] border border-dashed border-[rgba(139,148,158,0.5)]`,style:j(e.ganttPosition(t.startTime,t.endTime)),title:`Main Agent — `+e.formatDuration(t.duration)},[q(F(e.formatDuration(t.duration))+` `,1),t.innerEventMarkers&&t.innerEventMarkers.length?(U(!0),W(H,{key:0},zr(t.innerEventMarkers,(e,t)=>(U(),da(Ty,{key:`m-`+t,marker:e},null,8,[`marker`]))),128)):J(``,!0)],12,Yy)])])):J(``,!0)],64))),128)),G(`div`,Xy,[G(`span`,null,F(e.formatTime(e.events[0]?.timestamp)),1),G(`span`,null,F(e.formatTime(e.events[e.events.length-1]?.timestamp)),1)])],32),e.toolTimeByCategory.length?(U(),W(`div`,Zy,[n[8]||=G(`h3`,{style:{color:`#e6edf3`,"font-size":`14px`,"margin-bottom":`12px`}},` 🔧 Tool Summary `,-1),G(`div`,Qy,[(U(!0),W(H,null,zr(e.toolTimeByCategory,t=>(U(),W(`div`,{key:t.category,style:{background:`#161b22`,border:`1px solid #30363d`,"border-radius":`6px`,padding:`10px 12px`,display:`flex`,"align-items":`center`,gap:`10px`}},[G(`div`,$y,[G(`div`,eb,[G(`span`,tb,F(t.category),1),G(`span`,nb,[q(F(t.count)+` call`+F(t.count===1?``:`s`),1),t.errors?(U(),W(`span`,rb,` · `+F(t.errors)+` err`,1)):J(``,!0)])]),G(`div`,ib,[G(`div`,{style:j({width:t.totalTime/e.maxCategoryTime*100+`%`,height:`100%`,background:`rgba(158, 106, 3, 0.7)`,borderRadius:`3px`})},null,4)]),G(`div`,ab,F(e.formatDuration(t.totalTime)),1)])]))),128))])])):J(``,!0)])):(U(),W(`div`,Oy,` No timeline data found in this session. `))])}}},sb={class:`section my-6`},cb={key:0,class:`empty-state`,style:{padding:`60px`,color:`#f85149`}},lb={key:1,style:{padding:`20px`}},ub={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`15px`}},db={style:{display:`flex`,"align-items":`center`}},fb={style:{"font-size":`13px`,color:`#7d8590`}},pb={key:0,style:{background:`rgba(210, 153, 34, 0.1)`,border:`1px solid rgba(210, 153, 34, 0.3)`,"border-radius":`6px`,padding:`10px 14px`,"margin-bottom":`12px`,"font-size":`13px`,color:`#d29922`}},mb={key:1,id:`insight-log`,style:{background:`#161b22`,border:`1px solid #30363d`,"border-radius":`6px`,padding:`14px 16px`,"font-family":`'SF Mono', 'Monaco', 'Consolas', monospace`,"font-size":`12px`,"line-height":`1.6`,color:`#8b949e`,"white-space":`pre-wrap`,"word-break":`break-word`,"max-height":`400px`,"overflow-y":`auto`}},hb={key:2,style:{padding:`20px`}},gb={style:{background:`#0d1117`,border:`1px solid #d29922`,"border-radius":`6px`,padding:`20px`,"margin-bottom":`20px`}},_b={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`15px`}},vb={style:{display:`flex`,"align-items":`center`}},yb={style:{"font-weight":`600`,color:`#d29922`,"margin-bottom":`5px`}},bb={key:0,style:{background:`#161b22`,border:`1px solid #30363d`,"border-radius":`6px`,padding:`14px 16px`,"font-family":`'SF Mono', 'Monaco', 'Consolas', monospace`,"font-size":`12px`,"line-height":`1.6`,color:`#8b949e`,"white-space":`pre-wrap`,"word-break":`break-word`,"max-height":`400px`,"overflow-y":`auto`}},xb={key:3,style:{padding:`40px`,"text-align":`center`}},Sb=[`disabled`],Cb={key:4,style:{padding:`20px`}},wb={style:{background:`#161b22`,border:`1px solid #30363d`,"border-radius":`6px`,padding:`20px`,"margin-bottom":`20px`}},Tb={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`15px`}},Eb={style:{color:`#7d8590`,"font-size":`13px`}},Db=[`innerHTML`],Ob={__name:`InsightTab`,props:{insightStatus:{type:String,required:!0},insightError:{type:[String,Object,null],default:null},insightLog:{type:String,default:``},insightLoading:{type:Boolean},insightAgeMs:{type:Number,default:0},insightStartedAt:{type:[String,Number,null],default:null},insightGeneratedAt:{type:[String,Number,null],default:null},renderedInsight:{type:String,default:``},formatDateTime:{type:Function,required:!0}},emits:[`generate`,`regenerate`],setup(e){return(t,n)=>(U(),W(`div`,sb,[e.insightError?(U(),W(`div`,cb,` ❌ `+F(e.insightError),1)):e.insightStatus===`generating`?(U(),W(`div`,lb,[G(`div`,{style:j({background:`#0d1117`,border:`1px solid `+(e.insightAgeMs>3e5?`#d29922`:`#30363d`),borderRadius:`6px`,padding:`20px`,marginBottom:`20px`})},[G(`div`,ub,[G(`div`,db,[n[13]||=G(`span`,{style:{"font-size":`24px`,"margin-right":`10px`}},`⏳`,-1),G(`div`,null,[n[12]||=G(`div`,{style:{"font-weight":`600`,color:`#58a6ff`,"margin-bottom":`5px`}},` Generating Agent Review... `,-1),G(`div`,fb,` Started: `+F(e.formatDateTime(e.insightStartedAt))+` • Age: `+F(Math.floor(e.insightAgeMs/1e3))+`s `,1)])]),e.insightAgeMs>3e5?(U(),W(`button`,{key:0,style:{background:`#d29922`,color:`#fff`,border:`none`,padding:`8px 16px`,"border-radius":`6px`,"font-size":`13px`,cursor:`pointer`,"font-weight":`500`,"white-space":`nowrap`},onClick:n[0]||=e=>t.$emit(`regenerate`),onMouseover:n[1]||=e=>e.target.style.background=`#e3b341`,onMouseleave:n[2]||=e=>e.target.style.background=`#d29922`},` 🔄 Stop & Retry `,32)):J(``,!0)]),e.insightAgeMs>3e5?(U(),W(`div`,pb,[...n[14]||=[q(` ⚠️ Generation is taking longer than 5 minutes. For large sessions this is normal — the agent needs to read and analyze all events. If it appears stuck, you can click `,-1),G(`strong`,null,`Stop & Retry`,-1),q(` to cancel and start fresh. `,-1)]])):J(``,!0),e.insightLog?(U(),W(`div`,mb,F(e.insightLog),1)):J(``,!0)],4)])):e.insightStatus===`timeout`?(U(),W(`div`,hb,[G(`div`,gb,[G(`div`,_b,[G(`div`,vb,[n[16]||=G(`span`,{style:{"font-size":`24px`,"margin-right":`10px`}},`⏳`,-1),G(`div`,null,[G(`div`,yb,` Still generating... (`+F(Math.floor(e.insightAgeMs/1e3/60))+`m elapsed) `,1),n[15]||=G(`div`,{style:{"font-size":`13px`,color:`#7d8590`}},` Large sessions with sub-agents may take 10–15 minutes. Still polling for completion. `,-1)])]),G(`button`,{style:{background:`#d29922`,color:`#fff`,border:`none`,padding:`8px 16px`,"border-radius":`6px`,"font-size":`13px`,cursor:`pointer`,"font-weight":`500`,"white-space":`nowrap`},onClick:n[3]||=e=>t.$emit(`regenerate`),onMouseover:n[4]||=e=>e.target.style.background=`#e3b341`,onMouseleave:n[5]||=e=>e.target.style.background=`#d29922`},` 🔄 Stop & Retry `,32)]),e.insightLog?(U(),W(`div`,bb,F(e.insightLog),1)):J(``,!0)])])):e.insightStatus===`not_started`?(U(),W(`div`,xb,[n[17]||=G(`p`,{style:{"margin-bottom":`20px`,color:`#7d8590`}},` Generate an AI-powered quality & performance review of how the agent used its tools, prompts, and workflow in this session `,-1),G(`button`,{disabled:e.insightLoading,style:{background:`#238636`,color:`#fff`,border:`none`,padding:`10px 20px`,"border-radius":`6px`,"font-size":`14px`,cursor:`pointer`,"font-weight":`500`},onClick:n[6]||=e=>t.$emit(`generate`),onMouseover:n[7]||=e=>e.target.style.background=`#2ea043`,onMouseleave:n[8]||=e=>e.target.style.background=`#238636`},` 💡 Generate Agent Review `,40,Sb),n[18]||=G(`p`,{style:{"margin-top":`12px`,"font-size":`12px`,color:`#6e7681`}},` For large sessions this may take several minutes — you'll see a live progress log while the review is being generated. `,-1)])):e.insightStatus===`completed`?(U(),W(`div`,Cb,[G(`div`,wb,[G(`div`,Tb,[G(`span`,Eb,` Generated: `+F(e.formatDateTime(e.insightGeneratedAt)),1),G(`button`,{style:{background:`transparent`,color:`#58a6ff`,border:`1px solid #58a6ff`,padding:`5px 12px`,"border-radius":`6px`,"font-size":`12px`,cursor:`pointer`},onClick:n[9]||=e=>t.$emit(`regenerate`),onMouseover:n[10]||=e=>e.target.style.background=`rgba(88, 166, 255, 0.1)`,onMouseleave:n[11]||=e=>e.target.style.background=`transparent`},` 🔄 Regenerate `,32)]),G(`div`,{style:{color:`#c9d1d9`,"line-height":`1.6`},innerHTML:e.renderedInsight},null,8,Db)])])):J(``,!0)]))}},kb={"tool.execution_start":{color:`#d29922`,shape:`diamond`,label:`Tool Start`},"tool.execution_complete":{color:`#e3b341`,shape:`diamond`,label:`Tool Complete`},"assistant.message":{color:`#8b949e`,shape:`circle`,label:`Message`},"user.message":{color:`#79c0ff`,shape:`square`,label:`User Message`},"session.start":{color:`#56d364`,shape:`square`,label:`Session Start`},"session.resume":{color:`#56d364`,shape:`square`,label:`Session Resume`},"session.error":{color:`#f85149`,shape:`triangle`,label:`Error`},"session.truncation":{color:`#f0883e`,shape:`triangle`,label:`Truncation`},"session.compaction_start":{color:`#a371f7`,shape:`square`,label:`Compaction Start`},"session.compaction_complete":{color:`#bc8cff`,shape:`square`,label:`Compaction End`},"session.model_change":{color:`#f778ba`,shape:`square`,label:`Model Change`},abort:{color:`#ff7b72`,shape:`triangle`,label:`Abort`}},Ab=new Set(Object.keys(kb));function jb(e,t){let n=B([]),r=B(!0),i=B(null),a=e=>e?typeof e==`string`?e:Array.isArray(e)?e.map(e=>e.text||e.content||``).join(` `):typeof e==`object`&&e.text?e.text:String(e):``,o=e=>{if(e==null||e<0)return`—`;if(e<1e3)return Math.round(e)+`ms`;let t=e/1e3;if(t<60){let e=Math.round(t*10)/10;return(e%1==0?Math.round(e):e.toFixed(1))+`s`}let n=Math.floor(t/60),r=Math.floor(t%60);return n<60?n+`m `+r+`s`:Math.floor(n/60)+`h `+n%60+`m`},s=e=>!e||e===0?`0`:e<1e3?e.toString():Math.floor(e/1e3)+`K`,c=e=>{if(!e)return``;let t=new Date(e);return String(t.getHours()).padStart(2,`0`)+`:`+String(t.getMinutes()).padStart(2,`0`)+`:`+String(t.getSeconds()).padStart(2,`0`)},l=e=>e?new Date(e).toLocaleString():``,u=Y(()=>[...n.value].sort((e,t)=>{let n=e.timestamp?new Date(e.timestamp).getTime():0,r=t.timestamp?new Date(t.timestamp).getTime():0;return n===r?(e._fileIndex??0)-(t._fileIndex??0):n-r})),d=Y(()=>{if(!n.value.length)return null;for(let e of n.value){let t=e.timestamp||e.snapshot?.timestamp;if(t)return new Date(t).getTime()}return null}),f=Y(()=>{if(!n.value.length)return null;for(let e=n.value.length-1;e>=0;e--){let t=n.value[e],r=t.timestamp||t.snapshot?.timestamp;if(r)return new Date(r).getTime()}return null}),p=Y(()=>!d.value||!f.value?0:f.value-d.value);return Sr(async()=>{try{n.value=await(await Vv(async()=>{let{useSessionStore:e}=await import(`./sessionStore-CW_Vbbsn.js`);return{useSessionStore:e}},[])).useSessionStore().fetchEvents(e.value,t.value)}catch(e){console.error(`[TIME-ANALYZE] Error loading events:`,e),i.value=e.message}finally{r.value=!1}}),{events:n,loading:r,error:i,sortedEvents:u,sessionStart:d,sessionEnd:f,totalDuration:p,ganttPosition:(e,t)=>{if(!d.value||!p.value||!e)return{left:`0%`,width:`0%`};let n=new Date(e).getTime(),r=t?new Date(t).getTime():n+1e3,i=(n-d.value)/p.value*100,a=Math.max((r-n)/p.value*100,.5);return{left:i+`%`,width:Math.min(a,100-i)+`%`}},formatDuration:o,formatTime:c,formatDateTime:l,formatTokens:s,normalizeMessage:a,EVENT_MARKER_CATEGORIES:kb,TRACKABLE_EVENT_TYPES:Ab}}function Mb(e,t,n,r){let i=B(!1),a=Y(()=>{let t=e.value,n=new Set;for(let e of t)if(e.type===`subagent.started`){let t=e.data?.toolCallId;t&&n.add(t)}let r=new Map;for(let e of t)e.id&&r.set(e.id,e);let i=new Map,a=new Map;for(let e of t){if(e.type!==`tool.execution_start`)continue;let t=e.parentId,o=0;for(;t&&o<10;){let s=r.get(t);if(!s)break;if(s.type===`assistant.message`){let t=s.data?.parentToolCallId;if(t&&n.has(t)){i.set(e.id,t);let n=e.data?.toolCallId;n&&a.set(n,t)}break}t=s.parentId,o++}}for(let e of t){if(e.type!==`tool.execution_complete`)continue;let t=e.data?.toolCallId;t&&a.has(t)&&i.set(e.id,a.get(t))}return i}),o=(e,t,n)=>{if(!e.length||!n)return[];let r=new Set([`session.start`,`session.resume`,`session.error`,`session.truncation`,`session.compaction_start`,`session.compaction_complete`,`session.model_change`,`abort`,`user.message`]),i=[],a=[];for(let t of e)r.has(t.type)?i.push(t):a.push(t);let o=i.map(e=>{let r=(e.timestamp-t)/n*100,i=kb[e.type]||{};return{type:e.type,position:Math.max(0,Math.min(100,r)),color:i.color||`#8b949e`,shape:i.shape||`circle`,label:i.label||e.type,timestamp:e.timestamp,toolName:e.data?.toolName||null}}),s=Math.max(300*1e3,n/20),c=new Map;for(let e of a){let n=Math.floor((e.timestamp-t)/s);c.has(n)||c.set(n,[]),c.get(n).push(e)}let l=e=>{let t=Math.round(210+38*e),n=Math.round(153+-72*e),r=Math.round(34+39*e);return`rgb(`+t+`,`+n+`,`+r+`)`},u=e=>e.type===`tool.execution_complete`&&(e.data?.isError||!!e.data?.error),d=[];for(let[e,r]of c){let i=(t+(e+.5)*s-t)/n*100,a=Math.max(0,Math.min(100,i)),o=r.filter(u).length,c=r.filter(e=>e.type===`tool.execution_complete`).length,f=c>0?o/c:0;if(r.length===1){let e=r[0],t=kb[e.type]||{},n=u(e)?`#f85149`:t.color||`#8b949e`;d.push({type:e.type,position:a,color:n,shape:t.shape||`circle`,label:u(e)?(t.label||e.type)+` (error)`:t.label||e.type,timestamp:e.timestamp,toolName:e.data?.toolName||null})}else{let e={};r.forEach(t=>{let n=(kb[t.type]||{}).label||t.type;e[n]=(e[n]||0)+1}),o>0&&(e.Errors=o);let t=Object.entries(e).map(([e,t])=>t+` `+e),n=f>0?l(f):(kb[r.reduce((e,t)=>{let n=r.filter(e=>e.type===t.type).length;return n>e.cnt?{type:t.type,cnt:n}:e},{type:r[0].type,cnt:0}).type]||{}).color||`#8b949e`;d.push({type:`cluster`,position:a,color:n,shape:`cluster`,label:t.join(`, `),count:r.length,items:r})}}return[...o,...d].sort((e,t)=>e.position-t.position)},s=Y(()=>{let t=e.value,n=[],r=[];for(let e of t)if(e.type===`subagent.started`)r.push(e);else if(e.type===`subagent.completed`||e.type===`subagent.failed`){let i=e.data?.toolCallId,s=-1;if(i){for(let e=r.length-1;e>=0;e--)if(r[e].data?.toolCallId===i){s=e;break}}s<0&&r.length>0&&(s=r.length-1);let c=s>=0?r.splice(s,1)[0]:null,l=c?.data?.agentDisplayName||c?.data?.agentName||`SubAgent`,u=c?new Date(c.timestamp).getTime():null,d=new Date(e.timestamp).getTime(),f=u?d-u:null,p=c?.data?.toolCallId,m=0,h=[];if(c)for(let e of t){e.type===`tool.execution_start`&&p&&a.value.get(e.id)===p&&m++;let t=new Date(e.timestamp).getTime();t>=u&&t<=d&&Ab.has(e.type)&&(e.type!==`tool.execution_start`&&e.type!==`tool.execution_complete`||p&&a.value.get(e.id)===p)&&h.push({type:e.type,timestamp:t,data:e.data})}let g=o(h,u,f);n.push({name:l,status:e.type===`subagent.completed`?`completed`:`failed`,startTime:c?.timestamp||null,endTime:e.timestamp,duration:f,toolCalls:m,innerEventMarkers:g})}let i=t.length>0?new Date(t[t.length-1].timestamp).getTime():Date.now();for(let e of r){let r=e.data?.agentDisplayName||e.data?.agentName||`SubAgent`,s=new Date(e.timestamp).getTime(),c=i-s,l=e.data?.toolCallId,u=0,d=[];for(let e of t){e.type===`tool.execution_start`&&l&&a.value.get(e.id)===l&&u++;let t=new Date(e.timestamp).getTime();t>=s&&t<=i&&Ab.has(e.type)&&(e.type!==`tool.execution_start`&&e.type!==`tool.execution_complete`||l&&a.value.get(e.id)===l)&&d.push({type:e.type,timestamp:t,data:e.data})}let f=o(d,s,c);n.push({name:r,status:`incomplete`,startTime:e.timestamp,endTime:t[t.length-1]?.timestamp||e.timestamp,duration:c,toolCalls:u,innerEventMarkers:f})}return n.sort((e,t)=>(e.startTime?new Date(e.startTime).getTime():0)-(t.startTime?new Date(t.startTime).getTime():0))}),c=Y(()=>Math.max(...s.value.map(e=>e.duration||0),1)),l=Y(()=>{let e=s.value,t=e.filter(e=>e.status===`completed`).length,n=e.filter(e=>e.status===`failed`).length,r=e.filter(e=>e.status===`incomplete`).length,i=e.length?(t/e.length*100).toFixed(0):100,a=e.filter(e=>e.startTime&&e.endTime).map(e=>[new Date(e.startTime).getTime(),new Date(e.endTime).getTime()]).sort((e,t)=>e[0]-t[0]),o=[];for(let[e,t]of a)!o.length||e>=o[o.length-1].e?o.push({s:e,e:t}):t>o[o.length-1].e&&(o[o.length-1].e=t);return{completed:t,failed:n,incomplete:r,totalTime:o.reduce((e,t)=>e+(t.e-t.s),0),totalTools:e.reduce((e,t)=>e+(t.toolCalls||0),0),successRate:i}}),u=(e,t,n)=>{let r=n-t,i=[],s={},c=0;for(let r of e){let e=new Date(r.timestamp).getTime();if(e>=t&&e<=n)if(r.type.startsWith(`tool.`))r.id&&a.value.has(r.id)||(Ab.has(r.type)&&i.push({type:r.type,timestamp:e,data:r.data}),r.type===`tool.execution_start`&&c++,s.tool=(s.tool||0)+1);else{Ab.has(r.type)&&i.push({type:r.type,timestamp:e,data:r.data});let t=`other`;r.type.startsWith(`assistant.`)?t=`message`:r.type.startsWith(`user.`)?t=`user`:r.type.startsWith(`session.`)&&(t=`session`),s[t]=(s[t]||0)+1}}let l=[];c&&l.push(c+` tool`+(c>1?`s`:``)),s.message&&l.push(s.message+` message`+(s.message>1?`s`:``)),s.user&&l.push(s.user+` user msg`),s.session&&l.push(s.session+` session event`+(s.session>1?`s`:``)),s.other&&l.push(s.other+` other`);let u=l.length?l.join(`, `):`idle`,d=o(i,t,r);return{itemType:`agent-op`,name:`Main Agent`,summary:u,toolCalls:c,startTime:new Date(t).toISOString(),endTime:new Date(n).toISOString(),duration:r,eventCounts:s,innerEventMarkers:d}};return{subagentToolMap:a,buildEventMarkers:o,subagentAnalysis:s,maxSubagentDuration:c,subagentStats:l,buildAgentOpItem:u,subagentTimelineItems:Y(()=>{let r=s.value;if(!r.length)return[];let i=e.value,a=[];for(let e=0;e<r.length;e++){let o=r[e];if(e===0&&o.startTime){let e=t.value,n=new Date(o.startTime).getTime();n-e>500&&a.push(u(i,e,n))}a.push({...o,itemType:`subagent`});let s=r[e+1],c=new Date(o.endTime).getTime(),l=s?new Date(s.startTime).getTime():n.value;l-c>500&&a.push(u(i,c,l))}return a}),showMarkerLegend:i}}function Nb(e,t,n,r){let i=Y(()=>{try{let i=e.value,a=i.filter(e=>e.type===`assistant.message`),o=i.filter(e=>e.type===`user.message`);return a.map((e,s)=>{let c=e.timestamp;if(!c)return null;let l=new Date(c).getTime();if(isNaN(l))return null;let u=a[s+1],d=(u?new Date(u.timestamp).getTime():t.value||l)-l,f=i.indexOf(e),p=i.slice(0,f).reverse().find(e=>e.type===`user.message`),m=p?o.indexOf(p)+1:0,h,g=e.data?.message&&e.data.message.trim()!==``;h=g?n(e.data.message):e.data?.tools&&e.data.tools.length>0?`Tool calls: ${e.data.tools.map(e=>e.name||`unknown`).join(`, `)}`:`(empty assistant message)`;let _=e.data?.tools?.length||0;return{turnId:e.id??`msg-${s}`,userReqNumber:m,message:n(p?.data?.message||p?.data?.content||p?.data?.transformedContent||``),displayText:h,hasText:g,startTime:e.timestamp,endTime:u?.timestamp||r.value[r.value.length-1]?.timestamp,duration:d,toolCalls:_}}).filter(e=>e!==null)}catch(e){return console.error(`[turnAnalysis] Error:`,e),[]}});return{turnAnalysis:i,maxTurnDuration:Y(()=>Math.max(...i.value.map(e=>e.duration||0),1)),groupedTurns:Y(()=>{let e=new Map;for(let t of i.value){let n=t.userReqNumber||0;e.has(n)||e.set(n,{userReqNumber:n,message:t.message,turns:[]}),e.get(n).turns.push(t)}return Array.from(e.values()).sort((e,t)=>e.userReqNumber-t.userReqNumber)})}}function Pb(e){let t=B(`timestamp`),n=B(`asc`),r=Y(()=>{let t=e.value,n=new Map;for(let e of t)if(e.type===`tool.execution_start`){let t=e.data?.toolCallId;t&&n.set(t,{start:e})}else if(e.type===`tool.execution_complete`){let t=e.data?.toolCallId;t&&n.has(t)&&(n.get(t).complete=e)}let r=[];return n.forEach((e,t)=>{let n=new Date(e.start.timestamp).getTime(),i=e.complete?new Date(e.complete.timestamp).getTime():null,a=i?i-n:null,o=e.start.data?.toolName||e.start.data?.tool||`unknown`,s=e.start.data?.arguments||{},c=e.complete?.data?.isError||!!e.complete?.data?.error,l;l=o===`Bash`||o===`bash`||o===`exec`?s.command||s.description||``:[`Read`,`read`,`Write`,`write`,`Edit`,`edit`].includes(o)?s.file_path||s.path||``:[`Glob`,`glob`].includes(o)||[`Grep`,`grep`].includes(o)?s.pattern||``:[`Task`,`task`].includes(o)?s.description||s.prompt?.substring(0,80)||``:s.description||s.command||s.file_path||s.path||s.query||s.url||``,l.length>120&&(l=l.substring(0,120)+`...`),r.push({toolId:t,toolName:o,description:l,startTime:e.start.timestamp,endTime:e.complete?.timestamp||null,duration:a,isError:c,isRunning:!e.complete})}),r}),i=Y(()=>{let e=[...r.value];return e.sort((e,r)=>{if(t.value===`duration`)return n.value===`asc`?(e.duration||0)-(r.duration||0):(r.duration||0)-(e.duration||0);if(t.value===`toolName`){let t=(e.toolName||``).localeCompare(r.toolName||``);return n.value===`asc`?t:-t}let i=new Date(e.startTime).getTime(),a=new Date(r.startTime).getTime();return n.value===`asc`?i-a:a-i}),e}),a=Y(()=>Math.max(...r.value.map(e=>e.duration||0),1)),o=Y(()=>{let e=r.value.filter(e=>e.duration&&e.startTime&&e.endTime).map(e=>({start:new Date(e.startTime).getTime(),end:new Date(e.endTime).getTime()})).sort((e,t)=>e.start-t.start);if(!e.length)return 0;let t=0,n=e[0].start,i=e[0].end;for(let r=1;r<e.length;r++)e[r].start<=i?i=Math.max(i,e[r].end):(t+=i-n,n=e[r].start,i=e[r].end);return t+=i-n,t}),s=Y(()=>r.value.length),c=Y(()=>s.value?r.value.reduce((e,t)=>e+(t.duration||0),0)/s.value:0),l=Y(()=>r.value.length?r.value.reduce((e,t)=>(t.duration||0)>(e.duration||0)?t:e):null),u=Y(()=>{let e={};return r.value.forEach(t=>{let n=(t.toolName||`unknown`).toLowerCase(),r;r=[`bash`,`exec`].includes(n)?`Bash/Exec`:[`read`].includes(n)?`Read`:[`write`].includes(n)?`Write`:[`edit`].includes(n)?`Edit`:[`glob`].includes(n)?`Glob`:[`grep`].includes(n)?`Grep`:[`task`].includes(n)?`Task (SubAgent)`:[`web_search`,`websearch`].includes(n)?`Web Search`:[`web_fetch`,`webfetch`].includes(n)?`Web Fetch`:t.toolName||`Other`,e[r]||(e[r]={category:r,totalTime:0,count:0,errors:0}),e[r].totalTime+=t.duration||0,e[r].count++,t.isError&&e[r].errors++}),Object.values(e).sort((e,t)=>t.count-e.count)});return{sortField:t,sortDir:n,toolAnalysis:r,sortedToolAnalysis:i,maxToolDuration:a,totalToolTime:o,totalToolCount:s,avgToolDuration:c,longestTool:l,toolTimeByCategory:u,maxCategoryTime:Y(()=>Math.max(...u.value.map(e=>e.totalTime),1)),successRate:Y(()=>{let e=r.value.length;return e===0?100:((e-r.value.filter(e=>e.isError).length)/e*100).toFixed(1)}),errorCount:Y(()=>r.value.filter(e=>e.isError).length),toggleSort:e=>{t.value===e?n.value=n.value===`asc`?`desc`:`asc`:(t.value=e,n.value=e===`duration`?`desc`:`asc`)},sortIcon:e=>t.value===e?n.value===`asc`?`↑`:`↓`:`↕`}}function Fb(e,t,n){let r=Y(()=>{let t=e.value,n=[];for(let e=0;e<t.length-1;e++){let r=t[e],i=t[e+1],a=new Date(r.timestamp).getTime(),o=new Date(i.timestamp).getTime()-a;if(o<100)continue;let s=null,c=``;r.type===`user.message`&&i.type===`assistant.turn_start`?(s=`input-consumption`,c=`LLM reading user input (${(r.data?.message||``).length} chars)`):r.type===`assistant.turn_start`&&i.type===`assistant.message`?(s=`llm-generation`,c=`LLM generating response (${(i.data?.content||``).length} chars output)`):r.type===`assistant.turn_start`&&i.type===`tool.execution_start`?(s=`llm-generation`,c=`LLM deciding to call ${i.data?.toolName||`unknown`}`):r.type===`assistant.message`&&i.type===`assistant.turn_start`?(s=`turn-gap`,c=`Gap between assistant response and next turn`):r.type===`tool.execution_complete`&&o>500?(s=`post-tool`,c=`Processing ${r.data?.toolName||`unknown`} result`):o>5e3&&(s=`idle`,c=`${r.type} → ${i.type}`),s&&n.push({type:s,description:c,startTime:r.timestamp,endTime:i.timestamp,duration:o,fromEvent:r.type,toEvent:i.type,fromData:r.data,toData:i.data})}return n.sort((e,t)=>(t.duration||0)-(e.duration||0))});return{gapAnalysis:r,maxGapDuration:Y(()=>Math.max(...r.value.map(e=>e.duration||0),1)),gapStats:Y(()=>{let e={"input-consumption":{count:0,total:0,avg:0},"llm-generation":{count:0,total:0,avg:0},"post-tool":{count:0,total:0,avg:0},"turn-gap":{count:0,total:0,avg:0},idle:{count:0,total:0,avg:0}};return r.value.forEach(t=>{e[t.type]&&(e[t.type].count++,e[t.type].total+=t.duration)}),Object.keys(e).forEach(t=>{e[t].count>0&&(e[t].avg=e[t].total/e[t].count)}),e}),timeBreakdown:Y(()=>{let r=e.value,i=0;for(let e=0;e<r.length-1;e++){let t=r[e],n=r[e+1];if(n.type===`user.message`&&t.type!==`user.message`){let e=new Date(n.timestamp).getTime()-new Date(t.timestamp).getTime();e>1e3&&(i+=e)}}let a=t.value||0,o=Math.max(a-i,0),s=Math.max(o-n.value,0);return{userThinkingTime:i,agentWorkingTime:o,llmTime:s,userThinkingPct:a>0?(i/a*100).toFixed(0):0,agentWorkingPct:a>0?(o/a*100).toFixed(0):0,llmPct:a>0?(s/a*100).toFixed(0):0,toolPct:a>0?(n.value/a*100).toFixed(0):0}})}}function Ib(e){if(!e||typeof e!=`object`)return null;let t=Number.isFinite(e.cacheReadTokens)?e.cacheReadTokens:0,n=Dv(e)+t;return t===0||n===0?null:Math.round(t/n*100)}function Lb(e){return{totalTokens:Y(()=>{if(!e.value.usage||!e.value.usage.modelMetrics)return 0;let t=0;for(let n in e.value.usage.modelMetrics){let r=e.value.usage.modelMetrics[n].usage;r&&(t+=(r.inputTokens||0)+(r.outputTokens||0))}return t}),totalRequests:Y(()=>{if(!e.value.usage||!e.value.usage.modelMetrics)return 0;let t=0;for(let n in e.value.usage.modelMetrics)t+=e.value.usage.modelMetrics[n].requests?.count||0;return t}),totalModels:Y(()=>!e.value.usage||!e.value.usage.modelMetrics?0:Object.keys(e.value.usage.modelMetrics).length),getModelCacheHitRatio:t=>{let n=e.value.usage?.modelMetrics[t];return!n||!n.usage?null:Ib(n.usage)},getDisplayUsageInputTokens:t=>{let n=e.value.usage?.modelMetrics[t];return!n||!n.usage?0:Dv(n.usage)}}}function Rb(e,t){let n=B(null),r=B(null),i=B(!1),a=B(null),o=B(null),s=B(`not_started`),c=B(null),l=B(null),u=B(0),d=null,f=Y(()=>{if(!n.value)return``;let e=$.parse(n.value);return Pd.sanitize(e)}),p=()=>{d&&=(clearInterval(d),null)},m=async()=>{try{let i=await(await fetch(`/api/${encodeURIComponent(t.value)}/sessions/${e.value}/insight`)).json();s.value=i.status,i.status===`completed`?(n.value=i.report,r.value=null,o.value=i.generatedAt,p()):i.status===`generating`?(r.value=i.log||null,l.value=i.startedAt,c.value=i.lastUpdate,u.value=i.ageMs,h(),vn(()=>{let e=document.getElementById(`insight-log`);e&&(e.scrollTop=e.scrollHeight)})):i.status===`timeout`&&(r.value=i.log||null,l.value=i.startedAt,c.value=i.lastUpdate,u.value=i.ageMs,h())}catch(e){console.error(`Failed to check insight:`,e)}},h=()=>{p(),d=setInterval(m,2e3)},g=async(c=!1)=>{i.value=!0,a.value=null,r.value=null;try{let r=await fetch(`/api/${encodeURIComponent(t.value)}/sessions/${e.value}/insight`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({force:c})});if(!r.ok){let e=await r.json();throw Error(e.error||`Failed to generate insight`)}let i=await r.json();s.value=i.status,i.status===`generating`?(l.value=i.startedAt,h()):i.status===`completed`&&(n.value=i.report,o.value=i.generatedAt)}catch(e){a.value=e.message}finally{i.value=!1}};return Sr(async()=>{await m()}),Er(()=>{p()}),{insightReport:n,insightLog:r,insightLoading:i,insightError:a,insightGeneratedAt:o,insightStatus:s,insightLastUpdate:c,insightStartedAt:l,insightAgeMs:u,renderedInsight:f,checkExistingInsight:m,generateInsight:g,regenerateInsight:async()=>{await g(!0)},startPolling:h,stopPolling:p}}var zb={"badge-subagent":`bg-[#8957e5] text-white`,"badge-tool":`bg-[#9e6a03] text-white`,"badge-turn":`bg-success-emphasis text-white`,"badge-read":`bg-accent-subtle text-accent border border-[rgba(88,166,255,0.3)]`,"badge-write":`bg-[rgba(63,185,80,0.15)] text-success border border-[rgba(63,185,80,0.3)]`,"badge-edit":`bg-warning-subtle text-warning border border-[rgba(210,153,34,0.3)]`,"badge-create":`bg-[rgba(63,185,80,0.15)] text-success border border-[rgba(63,185,80,0.3)]`,"badge-bash":`bg-[rgba(139,148,158,0.15)] text-text-muted border border-[rgba(139,148,158,0.3)]`,"badge-search":`bg-[rgba(191,57,137,0.15)] text-[#f778ba] border border-[rgba(191,57,137,0.3)]`,"badge-other":`bg-[rgba(110,118,129,0.15)] text-text-muted border border-[rgba(110,118,129,0.3)]`};function Bb(e,t,n,r,i,a){let o=B(null),s=B(``),c=B(`📊 Copy as Mermaid Gantt`);return{ganttCrosshairX:o,ganttCrosshairTime:s,onGanttMouseMove:n=>{let r=n.currentTarget,i=r.querySelector(`.gantt-bar-area`);if(!i)return;let a=i.getBoundingClientRect(),c=r.getBoundingClientRect(),l=a.left-c.left,u=l+a.width,d=n.clientX-c.left;if(d>=l&&d<=u){o.value=d;let n=(d-l)/a.width,r=e.value+n*t.value,i=new Date(r),c=String(i.getHours()).padStart(2,`0`),u=String(i.getMinutes()).padStart(2,`0`),f=String(i.getSeconds()).padStart(2,`0`);s.value=c+`:`+u+`:`+f}else o.value=null},onGanttMouseLeave:()=>{o.value=null},copyLabel:c,copyTimelineMarkdown:async()=>{let e=r.value;if(!e.length)return;let t=e=>e?new Date(e).getTime():0,o=e=>(e||``).replace(/[`\n\r]/g,``).replace(/[:;#]/g,`-`).replace(/\s+/g,` `).trim().substring(0,100),s={},l=e=>{let t=e.replace(/[^a-zA-Z0-9]/g,`_`).substring(0,30);return s[t]?(s[t]++,t+`_`+s[t]):(s[t]=1,t)},u=[];u.push("```mermaid"),u.push(`gantt`),u.push(` title Session Timeline – `+o(n.value)),u.push(` dateFormat x`),u.push(` axisFormat %H:%M:%S`),u.push(``);for(let n of e)if(n.rowType===`user-req`){let e=o(i(n.message)||`No message`).substring(0,40),r=`UserReq `+n.userReqNumber+` – `+e+` (`+a(n.duration)+`)`,s=l(`userreq_`+n.userReqNumber),c=t(n.startTime),d=t(n.endTime);u.push(` `+r+` :milestone, `+s+`, `+c+`, `+d)}else if(n.rowType===`subagent`){let e=t(n.startTime),r=t(n.endTime),i=(n.toolCalls??0)+` tools`,s=o(n.name)+` – `+a(n.duration)+` (`+i+`)`,c=l(n.name),d=n.status===`failed`?`crit, `:n.status===`incomplete`?`active, `:``;u.push(` `+s+` :`+d+c+`, `+e+`, `+r)}else if(n.rowType===`main-agent`){let e=t(n.startTime),r=t(n.endTime),i=o(n.summary||`idle`),s=`Main Agent – `+a(n.duration)+` (`+i+`)`,c=l(`main_agent`);u.push(` `+s+` :`+c+`, `+e+`, `+r)}u.push("```"),u.push(``);let d=u.join(`
77
+ `);try{await navigator.clipboard.writeText(d),c.value=`✅ Copied!`}catch{let e=document.createElement(`textarea`);e.value=d,e.style.position=`fixed`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e),c.value=`✅ Copied!`}setTimeout(()=>{c.value=`📊 Copy as Mermaid Gantt`},2e3)},getToolBadgeClass:e=>{let t=(e||``).toLowerCase(),n;return n=[`bash`,`exec`].includes(t)?`badge-bash`:t===`read`?`badge-read`:t===`write`||t===`notebookedit`?`badge-write`:t===`edit`?`badge-edit`:t===`glob`||t===`grep`?`badge-search`:t===`task`?`badge-subagent`:`badge-other`,`inline-block px-2 py-0.5 rounded-badge text-2xs font-semibold whitespace-nowrap `+zb[n]},getOpBadgeClass:e=>`inline-block px-2 py-0.5 rounded-badge text-2xs font-semibold whitespace-nowrap `+zb[{read:`badge-read`,write:`badge-write`,edit:`badge-edit`,create:`badge-create`,search:`badge-search`}[e]||`badge-other`]}}function Vb(e,t,n){let r=B(`timeline`),i=jb(e,n),a=Mb(i.sortedEvents,i.sessionStart,i.sessionEnd,i.totalDuration),o=Nb(i.sortedEvents,i.sessionEnd,i.normalizeMessage,i.events),s=Pb(i.sortedEvents),c=Fb(i.sortedEvents,i.totalDuration,s.totalToolTime),l=Lb(t),u=Rb(e,n),d=Y(()=>{let e=[],t=o.groupedTurns.value,n=a.subagentAnalysis.value,r=i.sortedEvents.value;if(t.length)for(let i=0;i<t.length;i++){let o=t[i],s=o.turns;if(!s.length)continue;let c=new Date(s[0].startTime).getTime(),l=new Date(s[s.length-1].endTime).getTime();e.push({rowType:`user-req`,userReqNumber:o.userReqNumber,message:o.message,startTime:s[0].startTime,endTime:s[s.length-1].endTime,duration:l-c});let u=n.filter(e=>{if(!e.startTime)return!1;let t=new Date(e.startTime).getTime();return t>=c&&t<=l});if(u.length)for(let t=0;t<u.length;t++){let n=u[t],i=t===0?c:new Date(u[t-1].endTime).getTime(),o=new Date(n.startTime).getTime();if(o-i>500){let t=a.buildAgentOpItem(r,i,o);t.rowType=`main-agent`,e.push(t)}if(e.push({...n,rowType:`subagent`,itemType:`subagent`}),t===u.length-1){let t=new Date(n.endTime).getTime(),i=l;if(i-t>500){let n=a.buildAgentOpItem(r,t,i);n.rowType=`main-agent`,e.push(n)}}}else if(l-c>0){let t=a.buildAgentOpItem(r,c,l);t.rowType=`main-agent`,e.push(t)}}else if(a.subagentTimelineItems.value.length)for(let t of a.subagentTimelineItems.value)e.push({...t,rowType:t.itemType===`agent-op`?`main-agent`:`subagent`});return e}),f=Bb(i.sessionStart,i.totalDuration,e,d,i.normalizeMessage,i.formatDuration);return{sessionId:e,metadata:t,events:i.events,loading:i.loading,error:i.error,activeTab:r,sortField:s.sortField,sortDir:s.sortDir,insightReport:u.insightReport,insightLog:u.insightLog,insightLoading:u.insightLoading,insightError:u.insightError,insightGeneratedAt:u.insightGeneratedAt,insightStatus:u.insightStatus,insightLastUpdate:u.insightLastUpdate,insightStartedAt:u.insightStartedAt,insightAgeMs:u.insightAgeMs,renderedInsight:u.renderedInsight,generateInsight:u.generateInsight,regenerateInsight:u.regenerateInsight,formatDuration:i.formatDuration,formatTime:i.formatTime,formatDateTime:i.formatDateTime,formatTokens:i.formatTokens,normalizeMessage:i.normalizeMessage,sessionStart:i.sessionStart,sessionEnd:i.sessionEnd,totalDuration:i.totalDuration,subagentAnalysis:a.subagentAnalysis,maxSubagentDuration:a.maxSubagentDuration,subagentTimelineItems:a.subagentTimelineItems,subagentStats:a.subagentStats,EVENT_MARKER_CATEGORIES:kb,showMarkerLegend:a.showMarkerLegend,copyLabel:f.copyLabel,copyTimelineMarkdown:f.copyTimelineMarkdown,ganttCrosshairX:f.ganttCrosshairX,ganttCrosshairTime:f.ganttCrosshairTime,onGanttMouseMove:f.onGanttMouseMove,onGanttMouseLeave:f.onGanttMouseLeave,turnAnalysis:o.turnAnalysis,maxTurnDuration:o.maxTurnDuration,groupedTurns:o.groupedTurns,unifiedTimelineItems:d,toolAnalysis:s.toolAnalysis,sortedToolAnalysis:s.sortedToolAnalysis,maxToolDuration:s.maxToolDuration,totalTokens:l.totalTokens,totalRequests:l.totalRequests,totalModels:l.totalModels,getModelCacheHitRatio:l.getModelCacheHitRatio,getDisplayUsageInputTokens:l.getDisplayUsageInputTokens,toolTimeByCategory:s.toolTimeByCategory,maxCategoryTime:s.maxCategoryTime,totalToolTime:s.totalToolTime,totalToolCount:s.totalToolCount,avgToolDuration:s.avgToolDuration,longestTool:s.longestTool,successRate:s.successRate,errorCount:s.errorCount,timeBreakdown:c.timeBreakdown,gapAnalysis:c.gapAnalysis,maxGapDuration:c.maxGapDuration,gapStats:c.gapStats,ganttPosition:i.ganttPosition,toggleSort:s.toggleSort,sortIcon:s.sortIcon,getToolBadgeClass:f.getToolBadgeClass,getOpBadgeClass:f.getOpBadgeClass}}var Hb={"data-testid":`time-analyze`},Ub={class:`py-4 px-5 border-b border-border flex items-center gap-4 sticky top-0 bg-canvas z-10`},Wb={class:`text-accent text-xl flex-1`},Gb={key:0,style:{"font-size":`12px`,padding:`2px 8px`,"border-radius":`3px`,background:`rgba(210, 153, 34, 0.2)`,color:`#d29922`,border:`1px solid rgba(210, 153, 34, 0.4)`,"vertical-align":`middle`,"margin-left":`8px`}},Kb={class:`mx-auto px-5`},qb={key:0,class:`text-center p-10 text-text-dim text-sm`,style:{padding:`60px`}},Jb={key:1,class:`text-center p-10 text-text-dim text-sm`,style:{padding:`60px`,color:`#f85149`}},Yb={key:2},Xb={"data-testid":`tabs`,class:`flex gap-1 mb-4 border-b border-border`},Zb=[{path:`/`,component:zp},{path:`/:source/session/:id`,component:Zv},{path:`/:source/session/:id/time-analyze`,component:{__name:`TimeAnalyzeView`,setup(e){let t=ec(),n=Y(()=>t.params.id),r=Y(()=>t.params.source),i=B({});fetch(`/api/`+encodeURIComponent(r.value)+`/sessions/`+n.value).then(e=>e.json()).then(e=>{i.value=e}).catch(()=>{});let{events:a,loading:o,error:s,activeTab:c,sortField:l,sortDir:u,insightReport:d,insightLog:f,insightLoading:p,insightError:m,insightGeneratedAt:h,insightStatus:g,insightLastUpdate:_,insightStartedAt:v,insightAgeMs:y,renderedInsight:b,generateInsight:x,regenerateInsight:S,formatDuration:C,formatTime:w,formatDateTime:T,formatTokens:ee,sessionStart:te,sessionEnd:E,totalDuration:ne,subagentAnalysis:D,maxSubagentDuration:re,subagentTimelineItems:O,subagentStats:k,EVENT_MARKER_CATEGORIES:ie,showMarkerLegend:A,copyLabel:ae,copyTimelineMarkdown:oe,ganttCrosshairX:se,ganttCrosshairTime:j,onGanttMouseMove:M,onGanttMouseLeave:ce,turnAnalysis:N,maxTurnDuration:le,groupedTurns:ue,unifiedTimelineItems:de,toolAnalysis:fe,sortedToolAnalysis:pe,maxToolDuration:me,totalTokens:he,totalRequests:ge,totalModels:_e,getModelCacheHitRatio:ve,getDisplayUsageInputTokens:I,toolTimeByCategory:ye,maxCategoryTime:be,totalToolTime:xe,totalToolCount:Se,avgToolDuration:L,longestTool:Ce,successRate:we,errorCount:Te,timeBreakdown:Ee,gapAnalysis:De,maxGapDuration:Oe,gapStats:ke,ganttPosition:Ae,toggleSort:je,sortIcon:Me,getToolBadgeClass:Ne,getOpBadgeClass:Pe}=Vb(n,i,r);return(e,t)=>{let l=Nr(`router-link`);return U(),W(`div`,Hb,[G(`div`,Ub,[K(l,{"data-testid":`nav-btn`,to:`/`+r.value+`/session/`+n.value,class:`py-1.5 px-3 bg-surface-hover border border-border rounded-md text-text-secondary no-underline text-sm transition-all hover:bg-border hover:border-accent`},{default:Nn(()=>[...t[4]||=[q(` ← Back to Session `,-1)]]),_:1},8,[`to`]),G(`h1`,Wb,[q(` ⏱ Analysis: `+F(n.value)+` `,1),i.value.sessionStatus===`wip`?(U(),W(`span`,Gb,`🔄 WIP`)):J(``,!0)])]),G(`div`,Kb,[V(o)?(U(),W(`div`,qb,` ⏳ Loading events... `)):V(s)?(U(),W(`div`,Jb,` ❌ `+F(V(s)),1)):(U(),W(`div`,Yb,[K(Sy,{"format-duration":V(C),"format-date-time":V(T),"format-tokens":V(ee),"total-duration":V(ne),"session-start":V(te),"session-end":V(E),"grouped-turns":V(ue),"turn-analysis":V(N),"total-tool-count":V(Se),"success-rate":V(we),"error-count":V(Te),"subagent-analysis":V(D),"subagent-stats":V(k),"time-breakdown":V(Ee),"total-tool-time":V(xe),"total-tokens":V(he),"total-requests":V(ge),"total-models":V(_e)},null,8,[`format-duration`,`format-date-time`,`format-tokens`,`total-duration`,`session-start`,`session-end`,`grouped-turns`,`turn-analysis`,`total-tool-count`,`success-rate`,`error-count`,`subagent-analysis`,`subagent-stats`,`time-breakdown`,`total-tool-time`,`total-tokens`,`total-requests`,`total-models`]),G(`div`,Xb,[G(`button`,{class:P([`py-2 px-4 bg-none border-none border-b-2 border-transparent text-text-dim text-sm cursor-pointer transition-all duration-200 font-inherit hover:text-text-secondary`,V(c)===`timeline`?`!text-accent !border-b-accent`:``]),onClick:t[0]||=e=>c.value=`timeline`},` 📊 Timeline `,2),G(`button`,{class:P([`py-2 px-4 bg-none border-none border-b-2 border-transparent text-text-dim text-sm cursor-pointer transition-all duration-200 font-inherit hover:text-text-secondary`,V(c)===`insight`?`!text-accent !border-b-accent`:``]),onClick:t[1]||=e=>c.value=`insight`},` 💡 Agent Review `,2)]),V(c)===`timeline`?(U(),da(ob,{key:0,error:V(s),"session-id":n.value,events:V(a),"unified-timeline-items":V(de),"show-marker-legend":V(A),"copy-label":V(ae),"event-marker-categories":V(ie),"gantt-crosshair-x":V(se),"gantt-crosshair-time":V(j),"on-gantt-mouse-move":V(M),"on-gantt-mouse-leave":V(ce),"gantt-position":V(Ae),"format-duration":V(C),"format-time":V(w),"tool-time-by-category":V(ye),"max-category-time":V(be),onToggleLegend:t[2]||=e=>A.value=!V(A),onCopyTimeline:V(oe)},null,8,[`error`,`session-id`,`events`,`unified-timeline-items`,`show-marker-legend`,`copy-label`,`event-marker-categories`,`gantt-crosshair-x`,`gantt-crosshair-time`,`on-gantt-mouse-move`,`on-gantt-mouse-leave`,`gantt-position`,`format-duration`,`format-time`,`tool-time-by-category`,`max-category-time`,`onCopyTimeline`])):J(``,!0),V(c)===`insight`?(U(),da(Ob,{key:1,"insight-status":V(g),"insight-error":V(m),"insight-log":V(f),"insight-loading":V(p),"insight-age-ms":V(y),"insight-started-at":V(v),"insight-generated-at":V(h),"rendered-insight":V(b),"format-date-time":V(T),onGenerate:t[3]||=e=>V(x)(!1),onRegenerate:V(S)},null,8,[`insight-status`,`insight-error`,`insight-log`,`insight-loading`,`insight-age-ms`,`insight-started-at`,`insight-generated-at`,`rendered-insight`,`format-date-time`,`onRegenerate`])):J(``,!0)]))])])}}}},{path:`/:pathMatch(.*)*`,redirect:`/`}],Qb=Hl({history:sl(),routes:Zb}),$b=Zo(Is);$b.use(vs()),$b.use(Qb),$b.mount(`#app`);export{B as n,Ms as t};