1import{b0 as be,u as on,bf as sy,b6 as cs,bq as ou,bb as ry,br as ai,bk as pt,r as $e,b5 as oi,bu as us,bx as iy,be as eh,bj as hs,F as Me,bz as Lr,b4 as Or,b1 as St,bm as ut,k as ny,s as re,o as F,h as Ne,w as ye,f as ee,e as R,n as De,aS as th,bM as sh,ay as ra,as as rh,t as Z,d as N,g as je,at as xe,aG as oy,b3 as xt,au as qe,p as Q,q as dt,v as Ns,bN as ih,aw as ts,aq as nh,ar as ia,b2 as Dr,bO as ay,bP as oh,bQ as na,aj as ly,bR as cy,bS as oa,bT as aa,bU as uy,bV as hy,bW as ah,bA as rr,bX as dy,bY as fy,bZ as py,b_ as my,bG as _y,ax as gy,m as vy,bH as yy,b$ as by,c0 as wy,c1 as Sy,c2 as xy,c3 as Cy}from"./vendor.89fe5b79.js";import{h as Nt}from"./moment.40bc58bf.js";import{S as la}from"./Spinner.621c1713.js";import{_ as st,E as or,g as Wo}from"./index.7e7a0f15.js";import{o as jo,t as au,a as ky,Y as fn,V as pn,h as ca,S as ua,G as ha}from"./transition.174cbc52.js";import{r as Ey}from"./TrashIcon.b9a96163.js";import{d as lh,e as ch}from"./form.301aa837.js";import{o as ke,u as ft,E as uh,A as Ct,T as li,i as rs,N as Ws,a as He}from"./keyboard.d5a90458.js";import{a as hh,i as dh,O as ir,n as Ty,b as Ry,h as Ly,T as sn,P as Er,N as ls}from"./use-outside-click.8f8da96c.js";import{s as da}from"./use-resolve-button-type.854b98cb.js";import{c as Ye,f as Ko,i as Dy,u as fh,p as Ay,g as fa,S as pa,b as ma,M as _a}from"./menu.366511e3.js";import{f as mn,u as ga}from"./description.f08e06e3.js";import{t as ph,i as zs,l as mh}from"./open-closed.88859740.js";import{r as Iy}from"./CheckIcon.b33f0438.js";import{h as My,C as an,j as Ar,k as Ir,l as Oy,u as Py,m as Rr,n as va,o as _h,q as ks,v as ni,E as lr,t as Ts,r as By,s as gh,w as lu,x as _n,y as ya,z as Hy,F as ss,G as qy,H as Fy,I as Uy,Q as ti,J as rn,K as cu,M as uu,R as vh,N as zo,b as Ny,L as $y,P as Wy,c as zy,p as Vy,d as jy,e as Ky,i as Gy,f as Xy}from"./index.3c58bf7e.js";import{C as Yy}from"./CacheEntryModal.286f12b6.js";import{g as Jy,a as Zy}from"./interaction-style.11aa11b8.js";import{T as Qy}from"./TestHistorySidebar.d910b1dc.js";import{a as hu}from"./auth-headers.02b8b099.js";import{_ as du}from"./[email protected]";import{N as e1,Q as t1,V as s1}from"./disclosure.885f9d4a.js";function Tr(s,t,r){var n;let p=(n=r.initialDeps)!=null?n:[],a,g=!0;function v(){var c,u,w;let f;r.key&&((c=r.debug)==null?void 0:c.call(r))&&(f=Date.now());const y=s();if(!(y.length!==p.length||y.some((b,d)=>p[d]!==b)))return a;p=y;let T;if(r.key&&((u=r.debug)==null?void 0:u.call(r))&&(T=Date.now()),a=t(...y),r.key&&((w=r.debug)==null?void 0:w.call(r))){const b=Math.round((Date.now()-f)*100)/100,d=Math.round((Date.now()-T)*100)/100,m=d/16,o=(l,S)=>{for(l=String(l);l.length<S;)l=" "+l;return l};console.info(`%c\u23F1 ${o(d,5)} /${o(b,5)} ms`,` 2 font-size: .6rem; 3 font-weight: bold; 4 color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,r==null?void 0:r.key)}return(r==null?void 0:r.onChange)&&!(g&&r.skipInitialOnChange)&&r.onChange(a),g=!1,a}return v.updateDeps=c=>{p=c},v}function fu(s,t){if(s===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return s}const r1=(s,t)=>Math.abs(s-t)<1.01,i1=(s,t,r)=>{let p;return function(...a){s.clearTimeout(p),p=s.setTimeout(()=>t.apply(this,a),r)}},pu=s=>{const{offsetWidth:t,offsetHeight:r}=s;return{width:t,height:r}},n1=s=>s,o1=s=>{const t=Math.max(s.startIndex-s.overscan,0),r=Math.min(s.endIndex+s.overscan,s.count-1),p=[];for(let a=t;a<=r;a++)p.push(a);return p},a1=(s,t)=>{const r=s.scrollElement;if(!r)return;const p=s.targetWindow;if(!p)return;const a=v=>{const{width:n,height:c}=v;t({width:Math.round(n),height:Math.round(c)})};if(a(pu(r)),!p.ResizeObserver)return()=>{};const g=new p.ResizeObserver(v=>{const n=()=>{const c=v[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){a({width:u.inlineSize,height:u.blockSize});return}}a(pu(r))};s.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()});return g.observe(r,{box:"border-box"}),()=>{g.unobserve(r)}},mu={passive:!0},_u=typeof window=="undefined"?!0:"onscrollend"in window,l1=(s,t)=>{const r=s.scrollElement;if(!r)return;const p=s.targetWindow;if(!p)return;let a=0;const g=s.options.useScrollendEvent&&_u?()=>{}:i1(p,()=>{t(a,!1)},s.options.isScrollingResetDelay),v=w=>()=>{const{horizontal:f,isRtl:y}=s.options;a=f?r.scrollLeft*(y&&-1||1):r.scrollTop,g(),t(a,w)},n=v(!0),c=v(!1);r.addEventListener("scroll",n,mu);const u=s.options.useScrollendEvent&&_u;return u&&r.addEventListener("scrollend",c,mu),()=>{r.removeEventListener("scroll",n),u&&r.removeEventListener("scrollend",c)}},c1=(s,t,r)=>{if(t!=null&&t.borderBoxSize){const p=t.borderBoxSize[0];if(p)return Math.round(p[r.options.horizontal?"inlineSize":"blockSize"])}return s[r.options.horizontal?"offsetWidth":"offsetHeight"]},u1=(s,{adjustments:t=0,behavior:r},p)=>{var a,g;const v=s+t;(g=(a=p.scrollElement)==null?void 0:a.scrollTo)==null||g.call(a,{[p.options.horizontal?"left"
4:"top"]:v,behavior:r})};class h1{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let r=null;const p=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(a=>{a.forEach(g=>{const v=()=>{this._measureElement(g.target,g)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(v):v()})}));return{disconnect:()=>{var a;(a=p())==null||a.disconnect(),r=null},observe:a=>{var g;return(g=p())==null?void 0:g.observe(a,{box:"border-box"})},unobserve:a=>{var g;return(g=p())==null?void 0:g.unobserve(a)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([p,a])=>{typeof a=="undefined"&&delete r[p]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:n1,rangeExtractor:o1,onChange:()=>{},measureElement:c1,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var p,a;(a=(p=this.options).onChange)==null||a.call(p,this,r)},this.maybeNotify=Tr(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var a;var r;const p=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==p){if(this.cleanup(),!p){this.maybeNotify();return}this.scrollElement=p,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(a=(r=this.scrollElement)==null?void 0:r.window)!=null?a:null,this.elementsCache.forEach(g=>{this.observer.observe(g)}),this.unsubs.push(this.options.observeElementRect(this,g=>{this.scrollRect=g,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(g,v)=>{this.scrollAdjustments=0,this.scrollDirection=v?this.getScrollOffset()<g?"forward":"backward":null,this.scrollOffset=g,this.isScrolling=v,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}}
4,this.getSize=()=>{var r;return this.options.enabled?(this.scrollRect=(r=this.scrollRect)!=null?r:this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0)},this.getScrollOffset=()=>{var r;return this.options.enabled?(this.scrollOffset=(r=this.scrollOffset)!=null?r:typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.scrollOffset):(this.scrollOffset=null,0)},this.getFurthestMeasurement=(r,p)=>{const a=new Map,g=new Map;for(let v=p-1;v>=0;v--){const n=r[v];if(a.has(n.lane))continue;const c=g.get(n.lane);if(c==null||n.end>c.end?g.set(n.lane,n):n.end<c.end&&a.set(n.lane,!0),a.size===this.options.lanes)break}return g.size===this.options.lanes?Array.from(g.values()).sort((v,n)=>v.end===n.end?v.index-n.index:v.end-n.end)[0]:void 0},this.getMeasurementOptions=Tr(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,p,a,g,v,n)=>(this.prevLanes!==void 0&&this.prevLanes!==n&&(this.lanesChangedFlag=!0),this.prevLanes=n,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:p,scrollMargin:a,getItemKey:g,enabled:v,lanes:n}),{key:!1}),this.getMeasurements=Tr(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:p,scrollMargin:a,getItemKey:g,enabled:v,lanes:n},c)=>{if(!v)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const y of this.laneAssignments.keys())y>=r&&this.laneAssignments.delete(y);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(y=>{this.itemSizeCache.set(y.key,y.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const w=this.measurementsCache.slice(0,u),f=new Array(n).fill(void 0);for(let y=0;y<u;y++){const x=w[y];x&&(f[x.lane]=y)}for(let y=u;y<r;y++){const x=g(y),T=this.laneAssignments.get(y);let b,d;if(T!==void 0&&this.options.lanes>1){b=T;const S=f[b],E=S!==void 0?w[S]:void 0;d=E?E.end+this.options.gap:p+a}else{const S=this.options.lanes===1?w[y-1]:this.getFurthestMeasurement(w,y);d=S?S.end+this.options.gap:p+a,b=S?S.lane:y%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(y,b)}const m=c.get(x),o=typeof m=="number"?m:this.options.estimateSize(y),l=d+o;w[y]={index:y,start:d,size:o,end:l,key:x,lane:b},f[b]=y}return this.measurementsCache=w,w},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Tr(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,p,a,g)=>this.range=r.length>0&&p>0?d1({measurements:r,outerSize:p,scrollOffset:a,lanes:g}):null,{key:!1,debug:()=>this.options.debug}
4),this.getVirtualIndexes=Tr(()=>{let r=null,p=null;const a=this.calculateRange();return a&&(r=a.startIndex,p=a.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,p]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,p]},(r,p,a,g,v)=>g===null||v===null?[]:r({startIndex:g,endIndex:v,overscan:p,count:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=r=>{const p=this.options.indexAttribute,a=r.getAttribute(p);return a?parseInt(a,10):(console.warn(`Missing attribute name '${p}={index}' on measured element.`),-1)},this._measureElement=(r,p)=>{const a=this.indexFromElement(r),g=this.measurementsCache[a];if(!g)return;const v=g.key,n=this.elementsCache.get(v);n!==r&&(n&&this.observer.unobserve(n),this.observer.observe(r),this.elementsCache.set(v,r)),r.isConnected&&this.resizeItem(a,this.options.measureElement(r,p,this))},this.resizeItem=(r,p)=>{var n;const a=this.measurementsCache[r];if(!a)return;const g=(n=this.itemSizeCache.get(a.key))!=null?n:a.size,v=p-g;v!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,v,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=v,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,p)),this.notify(!1))},this.measureElement=r=>{if(!r){this.elementsCache.forEach((p,a)=>{p.isConnected||(this.observer.unobserve(p),this.elementsCache.delete(a))});return}this._measureElement(r,void 0)},this.getVirtualItems=Tr(()=>
4[this.getVirtualIndexes(),this.getMeasurements()],(r,p)=>{const a=[];for(let g=0,v=r.length;g<v;g++){const n=r[g],c=p[n];a.push(c)}return a},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const p=this.getMeasurements();if(p.length!==0)return fu(p[yh(0,p.length-1,a=>fu(p[a]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,p,a=0)=>{if(!this.scrollElement)return 0;const g=this.getSize(),v=this.getScrollOffset();p==="auto"&&(p=r>=v+g?"end":"start"),p==="center"?r+=(a-g)/2:p==="end"&&(r-=g);const n=this.getMaxScrollOffset();return Math.max(Math.min(n,r),0)},this.getOffsetForIndex=(r,p="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const a=this.measurementsCache[r];if(!a)return;const g=this.getSize(),v=this.getScrollOffset();if(p==="auto")if(a.end>=v+g-this.options.scrollPaddingEnd)p="end";else if(a.start<=v+this.options.scrollPaddingStart)p="start";else return[v,p];if(p==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),p];const n=p==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(n,p,a.size),p]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(r,{align:p="start",behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,p),{adjustments:void 0,behavior:a})},this.scrollToIndex=(r,{align:p="auto",behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),r=Math.max(0,Math.min(r,this.options.count-1)),this.currentScrollToIndex=r;let g=0;const v=10,n=u=>{if(!this.targetWindow)return;const w=this.getOffsetForIndex(r,u);if(!w){console.warn("Failed to get offset for index:",r);return}const[f,y]=w;this._scrollToOffset(f,{adjustments:void 0,behavior:a}),this.targetWindow.requestAnimationFrame(()=>{if(!this.targetWindow)return;const x=()=>{if(this.currentScrollToIndex!==r)return;const T=this.getScrollOffset(),b=this.getOffsetForIndex(r,y);if(!b){console.warn("Failed to get offset for index:",r);return}r1(b[0],T)||c(y)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(x):x()})},c=u=>{!this.targetWindow||this.currentScrollToIndex===r&&(g++,g<v?this.targetWindow.requestAnimationFrame(()=>n(u)):console.warn(`Failed to scroll to index ${r} after ${v} attempts.`))};n(p)},this.scrollBy=(r,{behavior:p}={})=>{p==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:p})},this.getTotalSize=()=>{var g;var r;const p=this.getMeasurements();let a;if(p.length===0)a=this.options.paddingStart;else if(this.options.lanes===1)a=(g=(r=p[p.length-1])==null?void 0:r.end)!=null?g:0;else{const v=Array(this.options.lanes).fill(null);let n=p.length-1;for(;n>=0&&v.some(c=>c===null);){const c=p[n];v[c.lane]===null&&(v[c.lane]=c.end),n--}a=Math.max(...v.filter(c=>c!==null))}return Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:p,behavior:a})=>{this.options.scrollToFn(r,{behavior:a,adjustments:p},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const yh=(s,t,r,p)=>{for(;s<=t;){const a=(s+t)/2|0,g=r(a);if(g<p)s=a+1;else if(g>p)t=a-1;else return a}return s>0?s-1:0};function d1({measurements:s,outerSize:t,scrollOffset:r,lanes:p}){const a=s.length-1,g=c=>s[c].start;if(s.length<=p)return{startIndex:0,endIndex:a};let v=yh(0,a,g,r),n=v;if(p===1)for(;n<a&&s[n].end<r+t;)n++;else if(p>1){const c=Array(p).fill(0);for(;n<a&&c.some(w=>w<r+t);){const w=s[n];c[w.lane]=w.end,n++}const u=Array(p).fill(r+t);for(;v>=0&&u.some(w=>w>=r);){const w=s[v];u[w.lane]=w.start,v--}v=Math.max(0,v-v%p),n=Math.min(a,n+(p-1-n%p))}return{startIndex:v,endIndex:n}}function f1(s){const t=new h1(on(s)),r=sy(t),p=t._didMount();return cs(()=>on(s).getScrollElement(),a=>{a&&t._willUpdate()},{immediate:!0}),cs(()=>on(s),a=>{t.setOptions({...a,onChange:(g,v)=>{var n;ou(r),(n=a.onChange)==null||n.call(a,g,v)}
4}),t._willUpdate(),ou(r)},{immediate:!0}),ry(p),r}function p1(s){return f1(be(()=>({observeElementRect:a1,observeElementOffset:l1,scrollToFn:u1,...on(s)})))}function m1(){let s=jo();return ai(()=>s.dispose()),s}function _1(){let s=m1();return t=>{s.dispose(),s.nextFrame(t)}}var bh=(s=>(s[s.Left=0]="Left",s[s.Right=2]="Right",s))(bh||{});function g1(s,t){return s===t}var v1=(s=>(s[s.Open=0]="Open",s[s.Closed=1]="Closed",s))(v1||{}),y1=(s=>(s[s.Single=0]="Single",s[s.Multi=1]="Multi",s))(y1||{}),b1=(s=>(s[s.Pointer=0]="Pointer",s[s.Focus=1]="Focus",s[s.Other=2]="Other",s))(b1||{});let wh=Symbol("ComboboxContext");function cr(s){let t=Or(wh,null);if(t===null){let r=new Error(`<${s} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,cr),r}return t}let Sh=Symbol("VirtualContext"),w1=pt({name:"VirtualProvider",setup(s,{slots:t}){let r=cr("VirtualProvider"),p=be(()=>{let n=ke(r.optionsRef);if(!n)return{start:0,end:0};let c=window.getComputedStyle(n);return{start:parseFloat(c.paddingBlockStart||c.paddingTop),end:parseFloat(c.paddingBlockEnd||c.paddingBottom)}}),a=p1(be(()=>({scrollPaddingStart:p.value.start,scrollPaddingEnd:p.value.end,count:r.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return ke(r.optionsRef)},overscan:12}))),g=be(()=>{var n;return(n=r.virtual.value)==null?void 0:n.options}),v=$e(0);return cs([g],()=>{v.value+=1}),oi(Sh,r.virtual.value?a:null),()=>[us("div",{style:{position:"relative",width:"100%",height:`${a.value.getTotalSize()}px`},ref:n=>{if(n){if(typeof process!="undefined"&&{}.JEST_WORKER_ID!==void 0||r.activationTrigger.value===0)return;r.activeOptionIndex.value!==null&&r.virtual.value.options.length>r.activeOptionIndex.value&&a.value.scrollToIndex(r.activeOptionIndex.value)}}},a.value.getVirtualItems().map(n=>iy(t.default({option:r.virtual.value.options[n.index],open:r.comboboxState.value===0})[0],{key:`${v.value}-${n.index}`,"data-index":n.index,"aria-setsize":r.virtual.value.options.length,"aria-posinset":n.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${n.start}px)`,overflowAnchor:"none"}})))]}}),S1=pt({name:"Combobox",emits:{"update:modelValue":s=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(s,{slots:t,attrs:r,emit:p}){let a=$e(1),g=$e(null),v=$e(null),n=$e(null),c=$e(null),u=$e({static:!1,hold:!1}),w=$e([]),f=$e(null),y=$e(2),x=$e(!1);function T(B=U=>U){let U=f.value!==null?w.value[f.value]:null,z=B(w.value.slice()),q=z.length>0&&z[0].dataRef.order.value!==null?z.sort((se,ce)=>se.dataRef.order.value-ce.dataRef.order.value):ir(z,se=>ke(se.dataRef.domRef)),J=U?q.indexOf(U):null;return J===-1&&(J=null),{options:q,activeOptionIndex:J}}let b=be(()=>s.multiple?1:0),d=be(()=>s.nullable),[m,o]=lh(be(()=>s.modelValue),B=>p("update:modelValue",B),be(()=>s.defaultValue)),l=be(()=>m.value===void 0?ft(b.value,{[1]:[],[0]:void 0}):m.value),S=null,E=null;function L(B){return ft(b.value,{[0](){return o==null?void 0:o(B)},[1]:()=>{let U=ut(C.value.value).slice(),z=ut(B),q=U.findIndex(J=>C.compare(z,ut(J)));return q===-1?U.push(z):U.splice(q,1),o==null?void 0:o(U)}})}let D=be(()=>{});cs([D],([B],[U])=>{if(C.virtual.value&&B&&U&&f.value!==null){let z=B.indexOf(U[f.value]);z!==-1?f.value=z:f.value=null}});let C={comboboxState:a,value:l,mode:b,compare(B,U){if(typeof s.by=="string"){let z=s.by;return(B==null?void 0:B[z])===(U==null?void 0:U[z])}return s.by===null?g1(B,U):s.by(B,U)},calculateIndex(B){return C.virtual.value?s.by===null?C.virtual.value.options.indexOf(B):C.virtual.value.options.findIndex(U=>C.compare(U,B)):w.value.findIndex(U=>C.compare(U.dataRef.value,B))},defaultValue:be(()=>s.defaultValue),nullable:d,immediate:be(()=>!1),virtual:be(()=>null),inputRef:v,labelRef:g,buttonRef:n,optionsRef:c,disabled:be(()=>s.disabled),options:w,change(B){o(B)},activeOptionIndex:be(()=>{if(x.value&&f.value===null&&(C.virtual.value?C.virtual.value.options.length>0:w.value.length>0)){if(C.virtual.value){let U=C.virtual.value.options.findIndex(z=>{var q;return!((q=C.virtual.value)!=null&&q.disabled(z))});if(U!==-1)return U}let B=w.value.findIndex(U=>!U.dataRef.disabled);if(B!==-1)return B}return f.value}),activationTrigger:y,optionsPropsRef:u,closeCombobox(){x.value=!1,!s.disabled&&a.value!==1&&(a.value=1,f.value=null)},openCombobox(){if(x.value=!0,!s.disabled&&a.value!==0){if(C.value.value){let B=C.calculateIndex(C.value.value);B!==-1&&(f.value=B)}a.value=0}}
4,setActivationTrigger(B){y.value=B},goToOption(B,U,z){x.value=!1,S!==null&&cancelAnimationFrame(S),S=requestAnimationFrame(()=>{if(s.disabled||c.value&&!u.value.static&&a.value===1)return;if(C.virtual.value){f.value=B===Ye.Specific?U:Ko({focus:B},{resolveItems:()=>C.virtual.value.options,resolveActiveIndex:()=>{var se,ce;return(ce=(se=C.activeOptionIndex.value)!=null?se:C.virtual.value.options.findIndex(me=>{var pe;return!((pe=C.virtual.value)!=null&&pe.disabled(me))}))!=null?ce:null},resolveDisabled:se=>C.virtual.value.disabled(se),resolveId(){throw new Error("Function not implemented.")}}),y.value=z!=null?z:2;return}let q=T();if(q.activeOptionIndex===null){let se=q.options.findIndex(ce=>!ce.dataRef.disabled);se!==-1&&(q.activeOptionIndex=se)}let J=B===Ye.Specific?U:Ko({focus:B},{resolveItems:()=>q.options,resolveActiveIndex:()=>q.activeOptionIndex,resolveId:se=>se.id,resolveDisabled:se=>se.dataRef.disabled});f.value=J,y.value=z!=null?z:2,w.value=q.options})},selectOption(B){let U=w.value.find(q=>q.id===B);if(!U)return;let{dataRef:z}=U;L(z.value)},selectActiveOption(){if(C.activeOptionIndex.value!==null){if(C.virtual.value)L(C.virtual.value.options[C.activeOptionIndex.value]);else{let{dataRef:B}=w.value[C.activeOptionIndex.value];L(B.value)}C.goToOption(Ye.Specific,C.activeOptionIndex.value)}},registerOption(B,U){let z=eh({id:B,dataRef:U});if(C.virtual.value){w.value.push(z);return}E&&cancelAnimationFrame(E);let q=T(J=>(J.push(z),J));f.value===null&&C.isSelected(U.value.value)&&(q.activeOptionIndex=q.options.indexOf(z)),w.value=q.options,f.value=q.activeOptionIndex,y.value=2,q.options.some(J=>!ke(J.dataRef.domRef))&&(E=requestAnimationFrame(()=>{let J=T();w.value=J.options,f.value=J.activeOptionIndex}))},unregisterOption(B,U){if(S!==null&&cancelAnimationFrame(S),U&&(x.value=!0),C.virtual.value){w.value=w.value.filter(q=>q.id!==B);return}let z=T(q=>{let J=q.findIndex(se=>se.id===B);return J!==-1&&q.splice(J,1),q});w.value=z.options,f.value=z.activeOptionIndex,y.value=2},isSelected(B){return ft(b.value,{[0]:()=>C.compare(ut(C.value.value),ut(B)),[1]:()=>ut(C.value.value).some(U=>C.compare(ut(U),ut(B)))})},isActive(B){return f.value===C.calculateIndex(B)}};hh([v,n,c],()=>C.closeCombobox(),be(()=>a.value===0)),oi(wh,C),ph(be(()=>ft(a.value,{[0]:zs.Open,[1]:zs.Closed})));let I=be(()=>{var B;return(B=ke(v))==null?void 0:B.closest("form")});return hs(()=>{cs([I],()=>{if(!I.value||s.defaultValue===void 0)return;function B(){C.change(s.defaultValue)}return I.value.addEventListener("reset",B),()=>{var U;(U=I.value)==null||U.removeEventListener("reset",B)}},{immediate:!0})}),()=>{var B,U,z;let{name:q,disabled:J,form:se,...ce}=s,me={open:a.value===0,disabled:J,activeIndex:C.activeOptionIndex.value,activeOption:C.activeOptionIndex.value===null?null:C.virtual.value?C.virtual.value.options[(B=C.activeOptionIndex.value)!=null?B:0]:(z=(U=C.options.value[C.activeOptionIndex.value])==null?void 0:U.dataRef.value)!=null?z:null,value:l.value};return us(Me,[...q!=null&&l.value!=null?ch({[q]:l.value}).map(([pe,M])=>us(mn,uh({features:ga.Hidden,key:pe,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:se,disabled:J,name:pe,value:M}))):[],Ct({theirProps:{...r,...li(ce,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:me,slots:t,attrs:r,name:"Combobox"})])}}});pt({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(s,{attrs:t,slots:r}){var p;let a=(p=s.id)!=null?p:`headlessui-combobox-label-${rs()}`,g=cr("ComboboxLabel");function v(){var n;(n=ke(g.inputRef))==null||n.focus({preventScroll:!0})}return()=>{let n={open:g.comboboxState.value===0,disabled:g.disabled.value},{...c}=s,u={id:a,ref:g.labelRef,onClick:v};return Ct({ourProps:u,theirProps:c,slot:n,attrs:t,slots:r,name:"ComboboxLabel"})}}});let x1=pt({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(s,{attrs:t,slots:r,expose:p}){var a;let g=(a=s.id)!=null?a:`headlessui-combobox-button-${rs()}`,v=cr("ComboboxButton");p({el:v.buttonRef,$el:v.buttonRef});function n(w){v.disabled.value||(v.comboboxState.value===0?v.closeCombobox():(w.preventDefault(),v.openCombobox()),St(()=>{var f;return(f=ke(v.inputRef))==null?void 0:f.focus({preventScroll:!0})}
4))}function c(w){switch(w.key){case He.ArrowDown:w.preventDefault(),w.stopPropagation(),v.comboboxState.value===1&&v.openCombobox(),St(()=>{var f;return(f=v.inputRef.value)==null?void 0:f.focus({preventScroll:!0})});return;case He.ArrowUp:w.preventDefault(),w.stopPropagation(),v.comboboxState.value===1&&(v.openCombobox(),St(()=>{v.value.value||v.goToOption(Ye.Last)})),St(()=>{var f;return(f=v.inputRef.value)==null?void 0:f.focus({preventScroll:!0})});return;case He.Escape:if(v.comboboxState.value!==0)return;w.preventDefault(),v.optionsRef.value&&!v.optionsPropsRef.value.static&&w.stopPropagation(),v.closeCombobox(),St(()=>{var f;return(f=v.inputRef.value)==null?void 0:f.focus({preventScroll:!0})});return}}let u=da(be(()=>({as:s.as,type:t.type})),v.buttonRef);return()=>{var w,f;let y={open:v.comboboxState.value===0,disabled:v.disabled.value,value:v.value.value},{...x}=s,T={ref:v.buttonRef,id:g,type:u.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(w=ke(v.optionsRef))==null?void 0:w.id,"aria-expanded":v.comboboxState.value===0,"aria-labelledby":v.labelRef.value?[(f=ke(v.labelRef))==null?void 0:f.id,g].join(" "):void 0,disabled:v.disabled.value===!0?!0:void 0,onKeydown:c,onClick:n};return Ct({ourProps:T,theirProps:x,slot:y,attrs:t,slots:r,name:"ComboboxButton"})}}}),C1=pt({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:s=>!0},setup(s,{emit:t,attrs:r,slots:p,expose:a}){var g;let v=(g=s.id)!=null?g:`headlessui-combobox-input-${rs()}`,n=cr("ComboboxInput"),c=be(()=>dh(ke(n.inputRef))),u={value:!1};a({el:n.inputRef,$el:n.inputRef});function w(){n.change(null);let E=ke(n.optionsRef);E&&(E.scrollTop=0),n.goToOption(Ye.Nothing)}let f=be(()=>{var E;let L=n.value.value;return ke(n.inputRef)?typeof s.displayValue!="undefined"&&L!==void 0?(E=s.displayValue(L))!=null?E:"":typeof L=="string"?L:"":""});hs(()=>{cs([f,n.comboboxState,c],([E,L],[D,C])=>{if(u.value)return;let I=ke(n.inputRef);I&&((C===0&&L===1||E!==D)&&(I.value=E),requestAnimationFrame(()=>{var B;if(u.value||!I||((B=c.value)==null?void 0:B.activeElement)!==I)return;let{selectionStart:U,selectionEnd:z}=I;Math.abs((z!=null?z:0)-(U!=null?U:0))===0&&U===0&&I.setSelectionRange(I.value.length,I.value.length)}))},{immediate:!0}),cs([n.comboboxState],([E],[L])=>{if(E===0&&L===1){if(u.value)return;let D=ke(n.inputRef);if(!D)return;let C=D.value,{selectionStart:I,selectionEnd:B,selectionDirection:U}=D;D.value="",D.value=C,U!==null?D.setSelectionRange(I,B,U):D.setSelectionRange(I,B)}})});let y=$e(!1);function x(){y.value=!0}function T(){jo().nextFrame(()=>{y.value=!1})}let b=_1();function d(E){switch(u.value=!0,b(()=>{u.value=!1}),E.key){case He.Enter:if(u.value=!1,n.comboboxState.value!==0||y.value)return;if(E.preventDefault(),E.stopPropagation(),n.activeOptionIndex.value===null){n.closeCombobox();return}n.selectActiveOption(),n.mode.value===0&&n.closeCombobox();break;case He.ArrowDown:return u.value=!1,E.preventDefault(),E.stopPropagation(),ft(n.comboboxState.value,{[0]:()=>n.goToOption(Ye.Next),[1]:()=>n.openCombobox()});case He.ArrowUp:return u.value=!1,E.preventDefault(),E.stopPropagation(),ft(n.comboboxState.value,{[0]:()=>n.goToOption(Ye.Previous),[1]:()=>{n.openCombobox(),St(()=>{n.value.value||n.goToOption(Ye.Last)})}});case He.Home:if(E.shiftKey)break;return u.value=!1,E.preventDefault(),E.stopPropagation(),n.goToOption(Ye.First);case He.PageUp:return u.value=!1,E.preventDefault(),E.stopPropagation(),n.goToOption(Ye.First);case He.End:if(E.shiftKey)break;return u.value=!1,E.preventDefault(),E.stopPropagation(),n.goToOption(Ye.Last);case He.PageDown:return u.value=!1,E.preventDefault(),E.stopPropagation(),n.goToOption(Ye.Last);case He.Escape:if(u.value=!1,n.comboboxState.value!==0)return;E.preventDefault(),n.optionsRef.value&&!n.optionsPropsRef.value.static&&E.stopPropagation(),n.nullable.value&&n.mode.value===0&&n.value.value===null&&w(),n.closeCombobox();break;case He.Tab:if(u.value=!1,n.comboboxState.value!==0)return;n.mode.value===0&&n.activationTrigger.value!==1&&n.selectActiveOption(),n.closeCombobox();break}}function m(E){t("change",E),n.nullable.value&&n.mode.value===0&&E.target.value===""&&w(),n.openCombobox()}function o(E){var L,D,C;let I=(L=E.relatedTarget)!=null?L:au.find(B=>B!==E.currentTarget);if(u.value=!1,!((D=ke(n.optionsRef))!=null&&D.contains(I))&&!((C=ke(n.buttonRef))!=null&&C.contains(I))&&n.comboboxState.value===0)return E.preventDefault(),n.mode.value===0&&(n.nullable.value&&n.value.value===null?w():n.activationTrigger.value!==1&&n.selectActiveOption()),n.closeCombobox()}function l(E){var L,D,C;let I=(L=E.relatedTarget)!=null?L:au.find(B=>B!==E.currentTarget);(D=ke(n.buttonRef))!=null&&D.contains(I)||(C=ke(n.optionsRef))!=null&&C.contains(I)||n.disabled.value||n.immediate.value&&n.comboboxState.value!==0&&(n.openCombobox(),jo().nextFrame(()=>
4{n.setActivationTrigger(1)}))}let S=be(()=>{var E,L,D,C;return(C=(D=(L=s.defaultValue)!=null?L:n.defaultValue.value!==void 0?(E=s.displayValue)==null?void 0:E.call(s,n.defaultValue.value):null)!=null?D:n.defaultValue.value)!=null?C:""});return()=>{var E,L,D,C,I,B,U;let z={open:n.comboboxState.value===0},{displayValue:q,onChange:J,...se}=s,ce={"aria-controls":(E=n.optionsRef.value)==null?void 0:E.id,"aria-expanded":n.comboboxState.value===0,"aria-activedescendant":n.activeOptionIndex.value===null?void 0:n.virtual.value?(L=n.options.value.find(me=>!n.virtual.value.disabled(me.dataRef.value)&&n.compare(me.dataRef.value,n.virtual.value.options[n.activeOptionIndex.value])))==null?void 0:L.id:(D=n.options.value[n.activeOptionIndex.value])==null?void 0:D.id,"aria-labelledby":(B=(C=ke(n.labelRef))==null?void 0:C.id)!=null?B:(I=ke(n.buttonRef))==null?void 0:I.id,"aria-autocomplete":"list",id:v,onCompositionstart:x,onCompositionend:T,onKeydown:d,onInput:m,onFocus:l,onBlur:o,role:"combobox",type:(U=r.type)!=null?U:"text",tabIndex:0,ref:n.inputRef,defaultValue:S.value,disabled:n.disabled.value===!0?!0:void 0};return Ct({ourProps:ce,theirProps:se,slot:z,attrs:r,slots:p,features:Ws.RenderStrategy|Ws.Static,name:"ComboboxInput"})}}}),k1=pt({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(s,{attrs:t,slots:r,expose:p}){let a=cr("ComboboxOptions"),g=`headlessui-combobox-options-${rs()}`;p({el:a.optionsRef,$el:a.optionsRef}),Lr(()=>{a.optionsPropsRef.value.static=s.static}),Lr(()=>{a.optionsPropsRef.value.hold=s.hold});let v=mh(),n=be(()=>v!==null?(v.value&zs.Open)===zs.Open:a.comboboxState.value===0);Dy({container:be(()=>ke(a.optionsRef)),enabled:be(()=>a.comboboxState.value===0),accept(u){return u.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:u.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(u){u.setAttribute("role","none")}});function c(u){u.preventDefault()}return()=>{var u,w,f;let y={open:a.comboboxState.value===0},x={"aria-labelledby":(f=(u=ke(a.labelRef))==null?void 0:u.id)!=null?f:(w=ke(a.buttonRef))==null?void 0:w.id,id:g,ref:a.optionsRef,role:"listbox","aria-multiselectable":a.mode.value===1?!0:void 0,onMousedown:c},T=li(s,["hold"]);return Ct({ourProps:x,theirProps:T,slot:y,attrs:t,slots:a.virtual.value&&a.comboboxState.value===0?{...r,default:()=>[us(w1,{},r.default)]}:r,features:Ws.RenderStrategy|Ws.Static,visible:n.value,name:"ComboboxOptions"})}}}),E1=pt({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(s,{slots:t,attrs:r,expose:p}){let a=cr("ComboboxOption"),g=`headlessui-combobox-option-${rs()}`,v=$e(null),n=be(()=>s.disabled);p({el:v,$el:v});let c=be(()=>{var o;return a.virtual.value?a.activeOptionIndex.value===a.calculateIndex(s.value):a.activeOptionIndex.value===null?!1:((o=a.options.value[a.activeOptionIndex.value])==null?void 0:o.id)===g}),u=be(()=>a.isSelected(s.value)),w=Or(Sh,null),f=be(()=>({disabled:s.disabled,value:s.value,domRef:v,order:be(()=>s.order)}));hs(()=>a.registerOption(g,f)),ai(()=>a.unregisterOption(g,c.value)),Lr(()=>{let o=ke(v);o&&(w==null||w.value.measureElement(o))}),Lr(()=>{a.comboboxState.value===0&&c.value&&(a.virtual.value||a.activationTrigger.value!==0&&St(()=>{var o,l;return(l=(o=ke(v))==null?void 0:o.scrollIntoView)==null?void 0:l.call(o,{block:"nearest"})}))});function y(o){o.preventDefault(),o.button===bh.Left&&(n.value||(a.selectOption(g),Ty()||requestAnimationFrame(()=>{var l;return(l=ke(a.inputRef))==null?void 0:l.focus({preventScroll:!0})}),a.mode.value===0&&a.closeCombobox()))}function x(){var o;if(s.disabled||(o=a.virtual.value)!=null&&o.disabled(s.value))return a.goToOption(Ye.Nothing);let l=a.calculateIndex(s.value);a.goToOption(Ye.Specific,l)}let T=fh();function b(o){T.update(o)}function d(o){var l;if(!T.wasMoved(o)||s.disabled||(l=a.virtual.value)!=null&&l.disabled(s.value)||c.value)return;let S=a.calculateIndex(s.value);a.goToOption(Ye.Specific,S,0)}function m(o){var l;T.wasMoved(o)&&(s.disabled||(l=a.virtual.value)!=null&&l.disabled(s.value)||c.value&&(
4a.optionsPropsRef.value.hold||a.goToOption(Ye.Nothing)))}return()=>{let{disabled:o}=s,l={active:c.value,selected:u.value,disabled:o},S={id:g,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":u.value,disabled:void 0,onMousedown:y,onFocus:x,onPointerenter:b,onMouseenter:b,onPointermove:d,onMousemove:d,onPointerleave:m,onMouseleave:m},E=li(s,["order","value"]);return Ct({ourProps:S,theirProps:E,slot:l,attrs:r,slots:t,name:"ComboboxOption"})}}});function T1(s,t){return s===t}var R1=(s=>(s[s.Open=0]="Open",s[s.Closed=1]="Closed",s))(R1||{}),L1=(s=>(s[s.Single=0]="Single",s[s.Multi=1]="Multi",s))(L1||{}),D1=(s=>(s[s.Pointer=0]="Pointer",s[s.Other=1]="Other",s))(D1||{});function A1(s){requestAnimationFrame(()=>requestAnimationFrame(s))}let xh=Symbol("ListboxContext");function ci(s){let t=Or(xh,null);if(t===null){let r=new Error(`<${s} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ci),r}return t}let Ch=pt({name:"Listbox",emits:{"update:modelValue":s=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>T1},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(s,{slots:t,attrs:r,emit:p}){let a=$e(1),g=$e(null),v=$e(null),n=$e(null),c=$e([]),u=$e(""),w=$e(null),f=$e(1);function y(l=S=>S){let S=w.value!==null?c.value[w.value]:null,E=ir(l(c.value.slice()),D=>ke(D.dataRef.domRef)),L=S?E.indexOf(S):null;return L===-1&&(L=null),{options:E,activeOptionIndex:L}}let x=be(()=>s.multiple?1:0),[T,b]=lh(be(()=>s.modelValue),l=>p("update:modelValue",l),be(()=>s.defaultValue)),d=be(()=>T.value===void 0?ft(x.value,{[1]:[],[0]:void 0}):T.value),m={listboxState:a,value:d,mode:x,compare(l,S){if(typeof s.by=="string"){let E=s.by;return(l==null?void 0:l[E])===(S==null?void 0:S[E])}return s.by(l,S)},orientation:be(()=>s.horizontal?"horizontal":"vertical"),labelRef:g,buttonRef:v,optionsRef:n,disabled:be(()=>s.disabled),options:c,searchQuery:u,activeOptionIndex:w,activationTrigger:f,closeListbox(){s.disabled||a.value!==1&&(a.value=1,w.value=null)},openListbox(){s.disabled||a.value!==0&&(a.value=0)},goToOption(l,S,E){if(s.disabled||a.value===1)return;let L=y(),D=Ko(l===Ye.Specific?{focus:Ye.Specific,id:S}:{focus:l},{resolveItems:()=>L.options,resolveActiveIndex:()=>L.activeOptionIndex,resolveId:C=>C.id,resolveDisabled:C=>C.dataRef.disabled});u.value="",w.value=D,f.value=E!=null?E:1,c.value=L.options},search(l){if(s.disabled||a.value===1)return;let S=u.value!==""?0:1;u.value+=l.toLowerCase();let E=(w.value!==null?c.value.slice(w.value+S).concat(c.value.slice(0,w.value+S)):c.value).find(D=>D.dataRef.textValue.startsWith(u.value)&&!D.dataRef.disabled),L=E?c.value.indexOf(E):-1;L===-1||L===w.value||(w.value=L,f.value=1)},clearSearch(){s.disabled||a.value!==1&&u.value!==""&&(u.value="")},registerOption(l,S){let E=y(L=>[...L,{id:l,dataRef:S}]);c.value=E.options,w.value=E.activeOptionIndex},unregisterOption(l){let S=y(E=>{let L=E.findIndex(D=>D.id===l);return L!==-1&&E.splice(L,1),E});c.value=S.options,w.value=S.activeOptionIndex,f.value=1},theirOnChange(l){s.disabled||b(l)},select(l){s.disabled||b(ft(x.value,{[0]:()=>l,[1]:()=>{let S=ut(m.value.value).slice(),E=ut(l),L=S.findIndex(D=>m.compare(E,ut(D)));return L===-1?S.push(E):S.splice(L,1),S}}))}};hh([v,n],(l,S)=>{var E;m.closeListbox(),Ry(S,Ly.Loose)||(l.preventDefault(),(E=ke(v))==null||E.focus())},be(()=>a.value===0)),oi(xh,m),ph(be(()=>ft(a.value,{[0]:zs.Open,[1]:zs.Closed})));let o=be(()=>{var l;return(l=ke(v))==null?void 0:l.closest("form")});return hs(()=>{cs([o],()=>{if(!o.value||s.defaultValue===void 0)return;function l(){m.theirOnChange(s.defaultValue)}return o.value.addEventListener("reset",l),()=>{var S;(S=o.value)==null||S.removeEventListener("reset",l)}},{immediate:!0})}),()=>{let{name:l,modelValue:S,disabled:E,form:L,...D}=s,C={open:a.value===0,disabled:E,value:d.value};return us(Me,[...l!=null&&d.value!=null?ch({[l]:d.value}).map(([I,B])=>us(mn,uh({features:ga.Hidden,key:I,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:L,disabled:E,name:I,value:B}))):[],Ct({ourProps:{},theirProps:{...r,...li(D,["defaultValue","onUpdate:modelValue","horizontal","multiple","by"])},slot:C,slots:t,attrs:r,name:"Listbox"})])}}}),I1=pt({name:"ListboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(s,{attrs:t,slots:r}){var p;let a=(p=s.id)!=null?p:`headlessui-listbox-label-${rs()}`,g=ci("ListboxLabel");function v(){var n;(n=ke(g.buttonRef))==null||n.focus({preventScroll:!0})}return()=>{let n={open:g.listboxState.value===0,disabled:g.disabled.value},{...c}=s,u={id:a,ref:g.labelRef,onClick:v};return Ct({ourProps:u,theirProps:c,slot:n,attrs:t,slots:r,name:"ListboxLabel"})}}}),kh=pt({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(s,{attrs:t,slots:r,expose:p}){var a;let g=(a=s.id)!=null?a:`headlessui-listbox-button-${rs()}`,v=ci("ListboxButton");p({el:v.buttonRef,$el:v.buttonRef});
4function n(f){switch(f.key){case He.Space:case He.Enter:case He.ArrowDown:f.preventDefault(),v.openListbox(),St(()=>{var y;(y=ke(v.optionsRef))==null||y.focus({preventScroll:!0}),v.value.value||v.goToOption(Ye.First)});break;case He.ArrowUp:f.preventDefault(),v.openListbox(),St(()=>{var y;(y=ke(v.optionsRef))==null||y.focus({preventScroll:!0}),v.value.value||v.goToOption(Ye.Last)});break}}function c(f){switch(f.key){case He.Space:f.preventDefault();break}}function u(f){v.disabled.value||(v.listboxState.value===0?(v.closeListbox(),St(()=>{var y;return(y=ke(v.buttonRef))==null?void 0:y.focus({preventScroll:!0})})):(f.preventDefault(),v.openListbox(),A1(()=>{var y;return(y=ke(v.optionsRef))==null?void 0:y.focus({preventScroll:!0})})))}let w=da(be(()=>({as:s.as,type:t.type})),v.buttonRef);return()=>{var f,y;let x={open:v.listboxState.value===0,disabled:v.disabled.value,value:v.value.value},{...T}=s,b={ref:v.buttonRef,id:g,type:w.value,"aria-haspopup":"listbox","aria-controls":(f=ke(v.optionsRef))==null?void 0:f.id,"aria-expanded":v.listboxState.value===0,"aria-labelledby":v.labelRef.value?[(y=ke(v.labelRef))==null?void 0:y.id,g].join(" "):void 0,disabled:v.disabled.value===!0?!0:void 0,onKeydown:n,onKeyup:c,onClick:u};return Ct({ourProps:b,theirProps:T,slot:x,attrs:t,slots:r,name:"ListboxButton"})}}}),Eh=pt({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(s,{attrs:t,slots:r,expose:p}){var a;let g=(a=s.id)!=null?a:`headlessui-listbox-options-${rs()}`,v=ci("ListboxOptions"),n=$e(null);p({el:v.optionsRef,$el:v.optionsRef});function c(f){switch(n.value&&clearTimeout(n.value),f.key){case He.Space:if(v.searchQuery.value!=="")return f.preventDefault(),f.stopPropagation(),v.search(f.key);case He.Enter:if(f.preventDefault(),f.stopPropagation(),v.activeOptionIndex.value!==null){let y=v.options.value[v.activeOptionIndex.value];v.select(y.dataRef.value)}v.mode.value===0&&(v.closeListbox(),St(()=>{var y;return(y=ke(v.buttonRef))==null?void 0:y.focus({preventScroll:!0})}
4));break;case ft(v.orientation.value,{vertical:He.ArrowDown,horizontal:He.ArrowRight}):return f.preventDefault(),f.stopPropagation(),v.goToOption(Ye.Next);case ft(v.orientation.value,{vertical:He.ArrowUp,horizontal:He.ArrowLeft}):return f.preventDefault(),f.stopPropagation(),v.goToOption(Ye.Previous);case He.Home:case He.PageUp:return f.preventDefault(),f.stopPropagation(),v.goToOption(Ye.First);case He.End:case He.PageDown:return f.preventDefault(),f.stopPropagation(),v.goToOption(Ye.Last);case He.Escape:f.preventDefault(),f.stopPropagation(),v.closeListbox(),St(()=>{var y;return(y=ke(v.buttonRef))==null?void 0:y.focus({preventScroll:!0})});break;case He.Tab:f.preventDefault(),f.stopPropagation();break;default:f.key.length===1&&(v.search(f.key),n.value=setTimeout(()=>v.clearSearch(),350));break}}let u=mh(),w=be(()=>u!==null?(u.value&zs.Open)===zs.Open:v.listboxState.value===0);return()=>{var f,y;let x={open:v.listboxState.value===0},{...T}=s,b={"aria-activedescendant":v.activeOptionIndex.value===null||(f=v.options.value[v.activeOptionIndex.value])==null?void 0:f.id,"aria-multiselectable":v.mode.value===1?!0:void 0,"aria-labelledby":(y=ke(v.buttonRef))==null?void 0:y.id,"aria-orientation":v.orientation.value,id:g,onKeydown:c,role:"listbox",tabIndex:0,ref:v.optionsRef};return Ct({ourProps:b,theirProps:T,slot:x,attrs:t,slots:r,features:Ws.RenderStrategy|Ws.Static,visible:w.value,name:"ListboxOptions"})}}}),Th=pt({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(s,{slots:t,attrs:r,expose:p}){var a;let g=(a=s.id)!=null?a:`headlessui-listbox-option-${rs()}`,v=ci("ListboxOption"),n=$e(null);p({el:n,$el:n});let c=be(()=>v.activeOptionIndex.value!==null?v.options.value[v.activeOptionIndex.value].id===g:!1),u=be(()=>ft(v.mode.value,{[0]:()=>v.compare(ut(v.value.value),ut(s.value)),[1]:()=>ut(v.value.value).some(l=>v.compare(ut(l),ut(s.value)))})),w=be(()=>ft(v.mode.value,{[1]:()=>{var l;let S=ut(v.value.value);return((l=v.options.value.find(E=>S.some(L=>v.compare(ut(L),ut(E.dataRef.value)))))==null?void 0:l.id)===g},[0]:()=>u.value})),f=Ay(n),y=be(()=>({disabled:s.disabled,value:s.value,get textValue(){return f()},domRef:n}));hs(()=>v.registerOption(g,y)),ai(()=>v.unregisterOption(g)),hs(()=>{cs([v.listboxState,u],()=>{v.listboxState.value===0&&u.value&&ft(v.mode.value,{[1]:()=>{w.value&&v.goToOption(Ye.Specific,g)},[0]:()=>{v.goToOption(Ye.Specific,g)}})},{immediate:!0})}),Lr(()=>{v.listboxState.value===0&&c.value&&v.activationTrigger.value!==0&&St(()=>{var l,S;return(S=(l=ke(n))==null?void 0:l.scrollIntoView)==null?void 0:S.call(l,{block:"nearest"})})});function x(l){if(s.disabled)return l.preventDefault();v.select(s.value),v.mode.value===0&&(v.closeListbox(),St(()=>{var S;return(S=ke(v.buttonRef))==null?void 0:S.focus({preventScroll:!0})}
4))}function T(){if(s.disabled)return v.goToOption(Ye.Nothing);v.goToOption(Ye.Specific,g)}let b=fh();function d(l){b.update(l)}function m(l){b.wasMoved(l)&&(s.disabled||c.value||v.goToOption(Ye.Specific,g,0))}function o(l){b.wasMoved(l)&&(s.disabled||c.value&&v.goToOption(Ye.Nothing))}return()=>{let{disabled:l}=s,S={active:c.value,selected:u.value,disabled:l},{value:E,disabled:L,...D}=s,C={id:g,ref:n,role:"option",tabIndex:l===!0?void 0:-1,"aria-disabled":l===!0?!0:void 0,"aria-selected":u.value,disabled:void 0,onClick:x,onFocus:T,onPointerenter:d,onMouseenter:d,onPointermove:m,onMousemove:m,onPointerleave:o,onMouseleave:o};return Ct({ourProps:C,theirProps:D,slot:S,attrs:r,slots:t,name:"ListboxOption"})}}}),M1=pt({props:{onFocus:{type:Function,required:!0}},setup(s){let t=$e(!0);return()=>t.value?us(mn,{as:"button",type:"button",features:ga.Focusable,onFocus(r){r.preventDefault();let p,a=50;function g(){var v;if(a--<=0){p&&cancelAnimationFrame(p);return}if((v=s.onFocus)!=null&&v.call(s)){t.value=!1,cancelAnimationFrame(p);return}p=requestAnimationFrame(g)}p=requestAnimationFrame(g)}}):null}});var O1=(s=>(s[s.Forwards=0]="Forwards",s[s.Backwards=1]="Backwards",s))(O1||{}),P1=(s=>(s[s.Less=-1]="Less",s[s.Equal=0]="Equal",s[s.Greater=1]="Greater",s))(P1||{});let Rh=Symbol("TabsContext");function ui(s){let t=Or(Rh,null);if(t===null){let r=new Error(`<${s} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ui),r}return t}let ba=Symbol("TabsSSRContext"),B1=pt({name:"TabGroup",emits:{change:s=>!0},props:{as:{type:[Object,String],default:"template"},selectedIndex:{type:[Number],default:null},defaultIndex:{type:[Number],default:0},vertical:{type:[Boolean],default:!1},manual:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(s,{slots:t,attrs:r,emit:p}){var a;let g=$e((a=s.selectedIndex)!=null?a:s.defaultIndex),v=$e([]),n=$e([]),c=be(()=>s.selectedIndex!==null),u=be(()=>c.value?s.selectedIndex:g.value);function w(b){var d;let m=ir(f.tabs.value,ke),o=ir(f.panels.value,ke),l=m.filter(S=>{var E;return!((E=ke(S))!=null&&E.hasAttribute("disabled"))});if(b<0||b>m.length-1){let S=ft(g.value===null?0:Math.sign(b-g.value),{[-1]:()=>1,[0]:()=>ft(Math.sign(b),{[-1]:()=>0,[0]:()=>0,[1]:()=>1}),[1]:()=>0}),E=ft(S,{[0]:()=>m.indexOf(l[0]),[1]:()=>m.indexOf(l[l.length-1])});E!==-1&&(g.value=E),f.tabs.value=m,f.panels.value=o}else{let S=m.slice(0,b),E=[...m.slice(b),...S].find(D=>l.includes(D));if(!E)return;let L=(d=m.indexOf(E))!=null?d:f.selectedIndex.value;L===-1&&(L=f.selectedIndex.value),g.value=L,f.tabs.value=m,f.panels.value=o}}let f={selectedIndex:be(()=>{var b,d;return(d=(b=g.value)!=null?b:s.defaultIndex)!=null?d:null}),orientation:be(()=>s.vertical?"vertical":"horizontal"),activation:be(()=>s.manual?"manual":"auto"),tabs:v,panels:n,setSelectedIndex(b){u.value!==b&&p("change",b),c.value||w(b)},registerTab(b){var d;if(v.value.includes(b))return;let m=v.value[g.value];if(v.value.push(b),v.value=ir(v.value,ke),!c.value){let o=(d=v.value.indexOf(m))!=null?d:g.value;o!==-1&&(g.value=o)}},unregisterTab(b){let d=v.value.indexOf(b);d!==-1&&v.value.splice(d,1)},registerPanel(b){n.value.includes(b)||(n.value.push(b),n.value=ir(n.value,ke))},unregisterPanel(b){let d=n.value.indexOf(b);d!==-1&&n.value.splice(d,1)}};oi(Rh,f);let y=$e({tabs:[],panels:[]}),x=$e(!1);hs(()=>{x.value=!0}),oi(ba,be(()=>x.value?null:y.value));let T=be(()=>s.selectedIndex);return hs(()=>{cs([T],()=>{var b;return w((b=s.selectedIndex)!=null?b:s.defaultIndex)},{immediate:!0})}),Lr(()=>{if(!c.value||u.value==null||f.tabs.value.length<=0)return;let b=ir(f.tabs.value,ke);b.some((d,m)=>ke(f.tabs.value[m])!==ke(d))&&f.setSelectedIndex(b.findIndex(d=>ke(d)===ke(f.tabs.value[u.value])))}),()=>{let b={selectedIndex:g.value};return us(Me,[v.value.length<=0&&us(M1,{onFocus:()=>{for(let d of v.value){let m=ke(d);if((m==null?void 0:m.tabIndex)===0)return m.focus(),!0}return!1}}),Ct({theirProps:{...r,...li(s,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:b,slots:t,attrs:r,name:"TabGroup"})])}}}),H1=pt({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(s,{attrs:t,slots:r}){let p=ui("TabList");return()=>{let a={selectedIndex:p.selectedIndex.value},g={role:"tablist","aria-orientation":p.orientation.value};return Ct({ourProps:g,theirProps:s,slot:a,attrs:t,slots:r,name:"TabList"})}}}),q1=pt({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(s,{attrs:t,slots:r,expose:p}){var a;let g=(a=s.id)!=null?a:`headlessui-tabs-tab-${rs()}`,v=ui("Tab"),n=$e(null);p({el:n,$el:n}),hs(()=>v.registerTab(n)),ai(()=>v.unregisterTab(n));let c=Or(ba),u=be(()=>{if(c.value){let o=c.value.tabs.indexOf(g);return o===-1?c.value.tabs.push(g)-1:o}return-1}),w=be(()=>{let o=v.tabs.value.indexOf(n);return o===-1?u.value:o}),f=be(()=>w.value===v.selectedIndex.value);function y(o){var l;let S=o();if(S===sn.Success&&v.activation.value==="auto"){let E=(l=dh(n))==null?void 0:l.activeElement,L=v.tabs.value.findIndex(D=>ke(D)===E);L!==-1&&v.setSelectedIndex(L)}return S}function x(o){let l=v.tabs.value.map(S=>
4ke(S)).filter(Boolean);if(o.key===He.Space||o.key===He.Enter){o.preventDefault(),o.stopPropagation(),v.setSelectedIndex(w.value);return}switch(o.key){case He.Home:case He.PageUp:return o.preventDefault(),o.stopPropagation(),y(()=>Er(l,ls.First));case He.End:case He.PageDown:return o.preventDefault(),o.stopPropagation(),y(()=>Er(l,ls.Last))}if(y(()=>ft(v.orientation.value,{vertical(){return o.key===He.ArrowUp?Er(l,ls.Previous|ls.WrapAround):o.key===He.ArrowDown?Er(l,ls.Next|ls.WrapAround):sn.Error},horizontal(){return o.key===He.ArrowLeft?Er(l,ls.Previous|ls.WrapAround):o.key===He.ArrowRight?Er(l,ls.Next|ls.WrapAround):sn.Error}}))===sn.Success)return o.preventDefault()}let T=$e(!1);function b(){var o;T.value||(T.value=!0,!s.disabled&&((o=ke(n))==null||o.focus({preventScroll:!0}),v.setSelectedIndex(w.value),ky(()=>{T.value=!1})))}function d(o){o.preventDefault()}let m=da(be(()=>({as:s.as,type:t.type})),n);return()=>{var o,l;let S={selected:f.value,disabled:(o=s.disabled)!=null?o:!1},{...E}=s,L={ref:n,onKeydown:x,onMousedown:d,onClick:b,id:g,role:"tab",type:m.value,"aria-controls":(l=ke(v.panels.value[w.value]))==null?void 0:l.id,"aria-selected":f.value,tabIndex:f.value?0:-1,disabled:s.disabled?!0:void 0};return Ct({ourProps:L,theirProps:E,slot:S,attrs:t,slots:r,name:"Tab"})}}}),F1=pt({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(s,{slots:t,attrs:r}){let p=ui("TabPanels");return()=>{let a={selectedIndex:p.selectedIndex.value};return Ct({theirProps:s,ourProps:{},slot:a,attrs:r,slots:t,name:"TabPanels"})}}}),U1=pt({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null},tabIndex:{type:Number,default:0}},setup(s,{attrs:t,slots:r,expose:p}){var a;let g=(a=s.id)!=null?a:`headlessui-tabs-panel-${rs()}`,v=ui("TabPanel"),n=$e(null);p({el:n,$el:n}),hs(()=>v.registerPanel(n)),ai(()=>v.unregisterPanel(n));let c=Or(ba),u=be(()=>{if(c.value){let y=c.value.panels.indexOf(g);return y===-1?c.value.panels.push(g)-1:y}return-1}),w=be(()=>{let y=v.panels.value.indexOf(n);return y===-1?u.value:y}),f=be(()=>w.value===v.selectedIndex.value);return()=>{var y;let x={selected:f.value},{tabIndex:T,...b}=s,d={ref:n,id:g,role:"tabpanel","aria-labelledby":(y=ke(v.tabs.value[w.value]))==null?void 0:y.id,tabIndex:f.value?T:-1};return!f.value&&s.unmount&&!s.static?us(mn,{as:"span","aria-hidden":!0,...d}):Ct({ourProps:d,theirProps:b,slot:x,attrs:t,slots:r,features:Ws.Static|Ws.RenderStrategy,visible:f.value,name:"TabPanel"})}}});const N1={components:{DialogVue:fn,DialogTitle:pn,TransitionChild:ca,TransitionRoot:ua,ExclamationTriangleIcon:ny},props:{show:Boolean},emits:["close-delete-modal","confirm-delete-replay"],methods:{close(){this.$emit("close-delete-modal")},confirmDeleteReplay(){this.$emit("confirm-delete-replay")}}},$1={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},W1={class:"inline-block align-bottom bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:p-6"},z1={class:"sm:flex sm:items-start"},V1={class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10"},j1={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},K1={class:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse"};function G1(s,t,r,p,a,g){const v=re("TransitionChild"),n=re("ExclamationTriangleIcon"),c=re("DialogTitle"),u=re("DialogVue"),w=re("TransitionRoot");return F(),Ne(w,{as:"template",show:r.show},{default:ye(()=>
4[ee(u,{as:"div",class:"fixed z-10 inset-0 overflow-y-auto",onClose:g.close},{default:ye(()=>[R("div",$1,[ee(v,{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:ye(()=>[...t[2]||(t[2]=[R("div",{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"},null,-1)])]),_:1}),t[5]||(t[5]=R("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"\u200B",-1)),ee(v,{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:ye(()=>[R("div",W1,[R("div",z1,[R("div",V1,[ee(n,{class:"h-6 w-6 text-red-600","aria-hidden":"true"})]),R("div",j1,[ee(c,{as:"h3",class:"text-lg leading-6 text-gray-900"},{default:ye(()=>[...t[3]||(t[3]=[De(" Delete Clip ",-1)])]),_:1}),t[4]||(t[4]=R("div",{class:"mt-2"},[R("p",{class:"text-sm text-gray-500"}," Are you sure you want to delete this clip? This action cannot be undone. ")],-1))])]),R("div",K1,[R("button",{type:"button",class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm",onClick:t[0]||(t[0]=(...f)=>g.confirmDeleteReplay&&g.confirmDeleteReplay(...f))}," Delete "),R("button",{type:"button",class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-lime-500 sm:mt-0 sm:w-auto sm:text-sm",onClick:t[1]||(t[1]=(...f)=>g.close&&g.close(...f))}," Cancel ")])])]),_:1})])]),_:1},8,["onClose"])]),_:1},8,["show"])}var X1=st(N1,[["render",G1]]);const Y1={components:{DialogVue:fn,DialogPanel:ha,DialogTitle:pn,TransitionChild:ca,TransitionRoot:ua,FolderIcon:th,FolderOpenIcon:sh,XMarkIcon:ra},props:{show:Boolean,replay:Object},emits:["confirm-move-replay","close-replay-move-modal"],data(){return{selectedProject:null}},computed:{...rh(["projects"]),currentProject(){var s;return(s=this.replay)==null?void 0:s.project},projectsExcludingCurrent(){return this.projects.filter(s=>s.id!==this.currentProject.id)}},methods:{close(){this.$emit("close-replay-move-modal"),this.selectedProject=null},selectProject(s){this.selectedProject=s},confirmMoveReplay(){this.$emit("confirm-move-replay",this.selectedProject)}}}
4,J1={class:"fixed z-10 inset-0 overflow-y-auto"},Z1={class:"flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0"},Q1={class:"hidden sm:block absolute top-0 right-0 pt-4 pr-4"},eb={class:""},tb={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},sb={class:"mt-2 sm:ml-4"},rb={class:"text-sm text-gray-400 ml-5 py-2 sm:flex sm:items-center"},ib={class:"mt-2 sm:ml-4"},nb=["onClick"],ob={class:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse"},ab=["disabled"];function lb(s,t,r,p,a,g){const v=re("TransitionChild"),n=re("XMarkIcon"),c=re("DialogTitle"),u=re("FolderIcon"),w=re("FolderOpenIcon"),f=re("DialogPanel"),y=re("DialogVue"),x=re("TransitionRoot");return F(),Ne(x,{as:"template",show:r.show},{default:ye(()=>[ee(y,{as:"div",class:"relative z-10",onClose:g.close},{default:ye(()=>[ee(v,{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:ye(()=>[...t[3]||(t[3]=[R("div",{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"},null,-1)])]),_:1}),R("div",J1,[R("div",Z1,[ee(v,{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:ye(()=>[ee(f,{class:"relative bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-lg sm:w-full sm:p-6"},{default:ye(()=>{var T;return[R("div",Q1,[R("button",{type:"button",class:"bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-lime-500",onClick:t[0]||(t[0]=(...b)=>g.close&&g.close(...b))},[t[4]||(t[4]=R("span",{class:"sr-only"},"Close",-1)),ee(n,{class:"h-6 w-6","aria-hidden":"true"})])]),R("div",eb,[R("div",tb,[ee(c,{as:"h3",class:"text-lg leading-6 text-gray-900 py-2"},{default:ye(()=>[...t[5]||(t[5]=[De(" Move Clip ",-1)])]),_:1}),t[6]||(t[6]=R("hr",null,null,-1))])]),R("div",sb,[t[7]||(t[7]=R("p",{class:"text-sm text-slate-600 py-2"},"Currently in:",-1)),R("p",rb,[ee(u,{class:"h-6 w-6 mx-2 text-gray-400","aria-hidden":"true"}),De(" "+Z((T=g.currentProject)==null?void 0:T.name),1)])]),R("div",ib,[t[8]||(t[8]=R("p",{class:"text-sm text-slate-600 py-2"},"Move to:",-1)),(F(!0),N(Me,null,je(g.projectsExcludingCurrent,b=>{var d,m;return F(),N("p",{key:b.id,class:xe([b.id===((d=a.selectedProject)==null?void 0:d.id)?"bg-lime-600 text-white":"text-gray-500 hover:bg-gray-300","text-sm pl-5 py-2 sm:flex sm:items-center rounded-md hover:cursor-pointer"]),onClick:o=>g.selectProject(b)},[ee(w,{class:xe([b.id===((m=a.selectedProject)==null?void 0:m.id)?"text-white":"text-gray-500","h-6 w-6 mx-2"]),"aria-hidden":"true"},null,8,["class"]),De(" "+Z(b==null?void 0:b.name),1)],10,nb)}),128))]),R("div",ob,[R("button",{type:"button",disabled:!a.selectedProject,onClick:t[1]||(t[1]=(...b)=>g.confirmMoveReplay&&g.confirmMoveReplay(...b)),class:xe([a.selectedProject?"bg-lime-600 text-white hover:bg-lime-700 focus:ring-lime-500 focus:outline-none focus:ring-2 focus:ring-offset-2":"text-gray-500 bg-gray-200","w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base sm:ml-3 sm:w-auto sm:text-sm"])}," Move ",10,ab),R("button",{type:"button",class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base text-gray-700 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-lime-500 sm:mt-0 sm:w-auto sm:text-sm",onClick:t[2]||(t[2]=(...b)=>g.close&&g.close(...b))}," Cancel ")])]}),_:1})]),_:1})])])]),_:1},8,["onClose"])]),_:1},8,["show"])}var cb=st(Y1,[["render",lb]]);const ub={components:{DialogVue:fn,DialogPanel:ha,DialogTitle:pn,TransitionChild:ca,TransitionRoot:ua,FolderIcon:th,FolderOpenIcon:sh,XMarkIcon:ra,UserGroupIcon:oy},props:{show:Boolean,replay:Object},emits:["close-replay-clone-modal","confirm-clone-replay"],data(){return{selectedProject:null}},computed:{...rh(["projects","user"]),currentProject(){var s;return(s=this.replay)==null?void 0:s.project}},methods:{close(){this.$emit("close-replay-clone-modal"),this.selectedProject=null},selectProject(s){this.selectedProject=s},confirmCloneReplay(){this.$emit("confirm-clone-replay",this.selectedProject)}}}
4,hb={class:"fixed z-10 inset-0 overflow-y-auto"},db={class:"flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0"},fb={class:"hidden sm:block absolute top-0 right-0 pt-4 pr-4"},pb={class:""},mb={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},_b={class:"mt-2 sm:ml-4"},gb={class:"text-sm text-gray-400 ml-1 py-2 sm:flex sm:items-center"},vb={class:"text-sm text-gray-400 ml-5 py-2 sm:flex sm:items-center"},yb={class:"mt-2 sm:ml-4"},bb={class:"text-sm text-gray-400 ml-1 py-2 sm:flex sm:items-center"},wb=["onClick"],Sb={class:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse"},xb=["disabled"];function Cb(s,t,r,p,a,g){const v=re("TransitionChild"),n=re("XMarkIcon"),c=re("DialogTitle"),u=re("UserGroupIcon"),w=re("FolderIcon"),f=re("FolderOpenIcon"),y=re("DialogPanel"),x=re("DialogVue"),T=re("TransitionRoot");return F(),Ne(T,{as:"template",show:r.show},{default:ye(()=>[ee(x,{as:"div",class:"relative z-10",onClose:g.close},{default:ye(()=>[ee(v,{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:ye(()=>[...t[3]||(t[3]=[R("div",{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"},null,-1)])]),_:1}),R("div",hb,[R("div",db,[ee(v,{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:ye(()=>[ee(y,{class:"relative bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-lg sm:w-full sm:p-6"},{default:ye(()=>{var b,d,m,o,l;return[R("div",fb,[R("button",{type:"button",class:"bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-lime-500",onClick:t[0]||(t[0]=(...S)=>g.close&&g.close(...S))},[t[4]||(t[4]=R("span",{class:"sr-only"},"Close",-1)),ee(n,{class:"h-6 w-6","aria-hidden":"true"})])]),R("div",pb,[R("div",mb,[ee(c,{as:"h3",class:"text-lg leading-6 text-gray-900 py-2"},{default:ye(()=>[...t[5]||(t[5]=[De(" Clone Clip ",-1)])]),_:1}),t[6]||(t[6]=R("hr",null,null,-1))])]),R("div",_b,[t[7]||(t[7]=R("p",{class:"text-sm text-slate-600 py-2"},"Currently in:",-1)),R("p",gb,[ee(u,{class:"h-6 w-6 mx-2 text-gray-400","aria-hidden":"true"}),De(" "+Z((d=(b=g.currentProject)==null?void 0:b.team)==null?void 0:d.name),1)]),R("p",vb,[ee(w,{class:"h-6 w-6 mx-2 text-gray-400","aria-hidden":"true"}),De(" "+Z((m=g.currentProject)==null?void 0:m.name),1)])]),R("div",yb,[t[8]||(t[8]=R("p",{class:"text-sm text-slate-600 py-2"},"Clone to:",-1)),R("p",bb,[ee(u,{class:"h-6 w-6 mx-2 text-gray-400","aria-hidden":"true"}),De(" "+Z((l=(o=s.user)==null?void 0:o.team)==null?void 0:l.name),1)]),(F(!0),N(Me,null,je(s.projects,S=>{var E,L;return F(),N("p",{key:S.id,class:xe([S.id===((E=a.selectedProject)==null?void 0:E.id)?"bg-lime-600 text-white":"text-gray-500 hover:bg-gray-300","text-sm pl-5 py-2 sm:flex sm:items-center rounded-md hover:cursor-pointer"]),onClick:D=>g.selectProject(S)},[ee(f,{class:xe([S.id===((L=a.selectedProject)==null?void 0:L.id)?"text-white":"text-gray-500","h-6 w-6 mx-2"]),"aria-hidden":"true"},null,8,["class"]),De(" "+Z(S==null?void 0:S.name),1)],10,wb)}),128))]),R("div",Sb,[R("button",{type:"button",disabled:!a.selectedProject,onClick:t[1]||(t[1]=(...S)=>g.confirmCloneReplay&&g.confirmCloneReplay(...S)),class:xe([a.selectedProject?"bg-lime-600 text-white hover:bg-lime-700 focus:ring-lime-500 focus:outline-none focus:ring-2 focus:ring-offset-2":"text-gray-500 bg-gray-200","w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base sm:ml-3 sm:w-auto sm:text-sm"])}," Clone ",10,xb),R("button",{type:"button",class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base text-gray-700 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-lime-500 sm:mt-0 sm:w-auto
4sm:text-sm",onClick:t[2]||(t[2]=(...S)=>g.close&&g.close(...S))}," Cancel ")])]}),_:1})]),_:1})])])]),_:1},8,["onClose"])]),_:1},8,["show"])}var kb=st(ub,[["render",Cb]]);const Eb={name:"ReplayTimeline",props:{replay:{type:Object,required:!0},applicationLogs:{type:Array,required:!0},videoTime:{type:Number,required:!0},videoDuration:{type:Number,required:!0},isPlaying:{type:Boolean,required:!0},skipDowntime:{type:Boolean,default:!1}},emits:["setVideoTime","togglePlay"],data(){return{isDraggingTimeline:!1,interactions:[],clientStartDate:null}},computed:{filteredInteractions(){return this.interactions}},mounted(){window.addEventListener("mouseup",this.onTimelineMouseUp),this.loadInteractions()},beforeUnmount(){window.removeEventListener("mousemove",this.onTimelineMouseMove),window.removeEventListener("mouseup",this.onTimelineMouseUp)},methods:{async loadInteractions(){var s,t;try{await or();const r={};(t=(s=this.$store)==null?void 0:s.state)!=null&&t.token&&(r.Authorization=`Bearer ${this.$store.state.token}`);const p=await Cloud.replayGet.with({replayId:this.replay.id,shareKey:this.replay.shareKey}).headers(r);if(!p||!p.replay)return;this.clientStartDate=p.replay.clientStartDate||null;const a=p.replay.tdTestCase;if(!a)return;const g=await Cloud.testdriverInteractionsByTestcase.with({testCaseId:a}).headers(r);this.interactions=g.interactions||[]}catch(r){console.error("Failed to load interactions for timeline:",r)}},getTypeColor(s){return{click:{bg:"#1e3a5f",text:"#64b5f6"},type:{bg:"#2d3a1e",text:"#aed581"},pressKeys:{bg:"#3a2d1e",text:"#ffb74d"},scroll:{bg:"#2d1e3a",text:"#ba68c8"},hover:{bg:"#1e3a3a",text:"#4dd0e1"},drag:{bg:"#3a1e2d",text:"#f06292"},assert:{bg:"#1e3a2d",text:"#81c784"},remember:{bg:"#3a2d2d",text:"#ffab91"},wait:{bg:"#2d2d3a",text:"#9fa8da"},find:{bg:"#2a2a2a",text:"#888"},findAll:{bg:"#2a2a2a",text:"#888"}}[s]||{bg:"#2a2a2a",text:"#888"}},getTypeIcon(s){return{click:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"/>',type:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"/>',pressKeys:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"/>',scroll:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"/>',hover:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 11.5V14m0-2.5v-6a1.5 1.5 0 113 0m-3 6a1.5 1.5 0 00-3 0v2a7.5 7.5 0 0015 0v-5a1.5 1.5 0 00-3 0m-6-3V11m0-5.5v-1a1.5 1.5 0 013 0v1m0 0V11m0-5.5a1.5 1.5 0 013 0v3m0 0V11"/>',drag:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"/>',assert:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>',remember:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"/>',wait:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>',find:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>',findAll:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>'}[s]||'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>'},formatTime(s){const t=this.getRelativeTimestamp(s);if(t===void 0)return"--:--";const r=Math.floor(t/1e3),p=Math.floor(r/3600),a=Math.floor(r%3600/60),g=r%60;return p>0?`${p}
4:${String(a).padStart(2,"0")}:${String(g).padStart(2,"0")}`:`${a}:${String(g).padStart(2,"0")}`},getRelativeTimestamp(s){if(s.timestamp!==void 0&&this.clientStartDate){if(s.timestamp>1e12){const t=s.timestamp-this.clientStartDate;return Math.max(0,t)}if(s.timestamp>0)return s.timestamp}if(s.clientTimestamp!==void 0&&this.clientStartDate){if(s.clientTimestamp>1e12){const t=s.clientTimestamp-this.clientStartDate;return Math.max(0,t)}if(s.clientTimestamp>0&&s.clientTimestamp<1e9)return s.clientTimestamp}if(s.createdAt&&this.clientStartDate){const r=new Date(s.createdAt).getTime()-this.clientStartDate;return Math.max(0,r)}return 0},onTimelineMouseDown(s){!this.replay||!this.videoDuration||(this.isPlaying&&this.$emit("togglePlay"),this.isDraggingTimeline=!0,this.seekToTimelinePosition(s),window.addEventListener("mousemove",this.onTimelineMouseMove),window.addEventListener("mouseup",this.onTimelineMouseUp))},onTimelineMouseMove(s){!this.isDraggingTimeline||this.seekToTimelinePosition(s)},onTimelineMouseUp(){this.isDraggingTimeline=!1,window.removeEventListener("mousemove",this.onTimelineMouseMove),window.removeEventListener("mouseup",this.onTimelineMouseUp)},seekToTimelinePosition(s){const t=this.$refs.timelineBar;if(!t)return;const r=t.getBoundingClientRect();let p=s.clientX-r.left;p=Math.max(0,Math.min(p,r.width));const g=p/r.width*this.videoDuration*1e3;this.$emit("setVideoTime",g)},getInteractionDetail(s){var t,r;return s.type==="type"&&((t=s.input)==null?void 0:t.text)?s.input.text:s.type==="pressKeys"&&((r=s.input)==null?void 0:r.keys)?s.input.ke
4ys.join(" + "):null},isActiveInteraction(s){const t=this.getRelativeTimestamp(s);return t===void 0?!1:this.videoTime>=t&&this.videoTime<t+1e3}}},Tb={class:"relative w-full h-8 rounded select-none"},Rb={class:"flex flex-row h-full w-full gap-2"},Lb={class:"flex items-center justify-start h-full flex-shrink-0"},Db={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"w-5 h-5 text-white"},Ab={key:1,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"w-5 h-5 text-white"},Ib={class:"relative w-full h-8 overflow-visible"},Mb=["onClick"],Ob=["innerHTML"],Pb={class:"absolute left-1/2 text-center bottom-full mb-2 -translate-x-1/2 px-2 py-1 opacity-0 group-hover/marker:opacity-100 text-xs text-white rounded shadow-lg whitespace-nowrap z-40 transition-opacity duration-150 pointer-events-none",style:{background:"#1a1a1a"}},Bb={class:"capitalize"},Hb={key:0,class:"text-gray-300 max-w-xs truncate"},qb={key:1,class:"text-gray-300 max-w-xs truncate"},Fb={class:"text-gray-400"};function Ub(s,t,r,p,a,g){return F(),N("div",Tb,[R("div",Rb,[R("div",Lb,[R("button",{class:"w-8 h-8 flex items-center justify-center rounded-full shadow focus:outline-none transition-colors",style:{"margin-left":"4px",background:"#2a2a2a",border:"1px solid #3a3a3a"},onMouseover:t[0]||(t[0]=v=>v.target.style.background="#3a3a3a"),onMouseout:t[1]||(t[1]=v=>v.target.style.background="#2a2a2a"),onClick:t[2]||(t[2]=xt(v=>s.$emit("togglePlay"),["stop"])),tabindex:"0","aria-label":"Play/Pause"},[r.isPlaying?(F(),N("svg",Ab,[...t[5]||(t[5]=[R("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"},null,-1),R("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"},null,-1)])])):(F(),N("svg",Db,[...t[4]||(t[4]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 3v18l15-9-15-9z"},null,-1)])]))],32)]),R("div",{class:"flex items-center justify-center h-full relative flex-grow",ref:"timelineBar",onMousedown:t[3]||(t[3]=(...v)=>g.onTimelineMouseDown&&g.onTimelineMouseDown(...v)),style:{cursor:"pointer"}},[R("div",{class:"absolute top-1/2 z-20 left-0 h-2 rounded pointer-events-none -translate-y-1/2 opacity-90",style:qe({backgroundColor:"#b3d334",width:r.videoDuration?`${r.videoTime/1e3/r.videoDuration*100}%`:"0%",transition:a.isDraggingTimeline?"none":"width 0.1s linear"})},null,4),t[6]||(t[6]=R("div",{class:"absolute top-1/2 left-0 w-full h-2 rounded -translate-y-1/2 pointer-events-none",style:{background:"#2a2a2a"}},null,-1)),R("div",Ib,[(F(!0),N(Me,null,je(g.filteredInteractions,v=>(F(),N("div",{key:v.id,class:"absolute top-1/2 -translate-y-1/2 cursor-pointer group/marker z-30",style:qe({left:r.videoDuration&&g.getRelativeTimestamp(v)!==void 0?`${g.getRelativeTimestamp(v)/1e3/r.videoDuration*100}%`:"0%",transform:"translate(-50%, -50%)"}),onClick:xt(n=>s.$emit("setVideoTime",g.getRelativeTimestamp(v)),["stop"])},[R("div",{class:xe(["rounded-full flex items-center justify-center shadow-lg border-2 transition-all group-hover/marker:scale-125",{"w-8 h-8":g.isActiveInteraction(v),"w-6 h-6":!g.isActiveInteraction(v)}]),style:qe({background:g.getTypeColor(v.type).bg,borderColor:g.getTypeColor(v.type).text})},[(F(),N("svg",{class:xe(["transition-all",{"w-4 h-4":g.isActiveInteraction(v),"w-3 h-3":!g.isActiveInteraction(v)}]),style:qe({color:g.getTypeColor(v.type).text}),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",innerHTML:g.getTypeIcon(v.type)},null,14,Ob))],6),R("div",Pb,[R("div",Bb,Z(v.type),1),v.prompt?(F(),N("div",Hb,Z(v.prompt),1)):g.getInteractionDetail(v)?(F(),N("div",qb,Z(g.getInteractionDetail(v)),1)):Q("",!0),R("div",Fb,Z(g.formatTime(v)),1)])],12,Mb))),128))])],544)])])}var Nb=st(Eb,[["render",Ub]]);function wa(s){const t=Math.abs(s),r=Math.floor(t/60),p=Math.floor(t%60);return`${r}:${p<10?"0":""}${p}`}const $b={props:{timestamp:Number,replayId:String},emits:["commentCreated"],data(){return{timestampString:"",comment:""}},mounted(){or()},methods:{formatTimestamp(s){return wa(s)},mounted(){or()},async createComment(){const s=await Cloud.commentCreate({timestamp:this.timestamp,description:this.comment,replayId:this.replayId}).headers({Authorization:`Bearer ${this.$store.state.token}`}).tolerate(t=>{console.error(t)});s&&(this.$toast.info("Comment has been created"),this.comment="",this.$emit("commentCreated",s))}}},Wb={class:"flex items-center"};function zb(s,t,r,p,a,g){return F(),N("div",Wb,[dt(R("input",{class:"rounded flex-1 h-10 outline-none px-3",style:{background:"#1a1a1a",border:"1px solid #2a2a2a",color:"#ddd"},"onUpdate:modelValue":t[0]||(t[0]=v=>a.comment=v),placeholder:"Enter a comment",onKeyup:t[1]||(t[1]=ih((...v)=>g.createComment&&g.createComment(...v),["enter"])),onKeydown:t[2]||(t[2]=xt(()=>{},["stop"]))},null,544),[[Ns,a.comment]]),R("button",{onClick:t[3]||(t[3]=v=>g.createComment()),type:"button",class:"ml-2 inline-flex items-center px-4 py-2 text-sm rounded",style:{background:"#2a2a2a",color:"#ddd",border:"1px solid #3a3a3a"}}," Comment at "+Z(g.formatTimestamp(r.timestamp)),1)])}var Vb=st($b,[["render",zb]]);function jb(s,t){return F(),N("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
4currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"fill-rule":"evenodd",d:"M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})])}function Kb(s,t){return F(),N("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"})])}function Gb(s,t){return F(),N("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"fill-rule":"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z","clip-rule":"evenodd"})])}const Xb={components:{TrashIcon:Ey},props:{comments:Array,user:Object},emits:["commentDeleted","setVideoTime"],async mounted(){or()},methods:{formatTimeStamp(s){return wa(s)},formatAgo(s){return Nt(s).fromNow()},async deleteComment(s){await Cloud.commentDelete({id:s}).headers({Authorization:`Bearer ${this.$store.state.token}`}).switch({error:t=>{console.error("commentDelete error",t),this.$toast.open({message:"Failed to Delete Comment",type:"error"})},success:async()=>{this.$toast.info("Comment has been deleted"),this.$emit("commentDeleted",{id:s})}})},setVideoTime(s){this.$emit("setVideoTime",s)}}},Yb={class:"flex items-center"},Jb=["src"],Zb={class:"flex flex-col"},Qb={class:"font-normal mr-2",style:{color:"#ddd"}},ew=["onClick"],tw={class:"text-xs",style:{color:"#888"}},sw={class:"text-md ml-12 mb-6 font-ibmplexmono",style:{color:"#ddd"}},rw=["onClick"];function iw(s,t,r,p,a,g){const v=re("TrashIcon");return F(!0),N(Me,null,je(r.comments,n=>{var c;return F(),N("div",{key:n.id,class:"sm:text-sm my-2 flex items-center justify-between"},[R("div",null,[R("div",Yb,[R("img",{class:"h-10 w-10 rounded-full mr-2",src:n.user.profile.picture,alt:""},null,8,Jb),R("div",Zb,[R("div",Qb,[De(Z(n.user.profile.name)+" ",1),R("span",{class:"cursor-pointer select-none hover:underline",style:{color:"#888"},onClick:u=>g.setVideoTime(n.timestamp*1e3)},"(at "+Z(g.formatTimeStamp(n.timestamp))+")",9,ew)]),R("div",tw,Z(g.formatAgo(n.createdAt)),1)])]),R("div",sw,Z(n.description),1)]),((c=r.user)==null?void 0:c.id)===n.user.id?(F(),N("button",{key:0,onClick:xt(u=>g.deleteComment(n.id),["prevent"]),type:"button",class:"inline-flex items-center gap-x-1.5 rounded-md py-1.5 px-2.5 text-sm shadow-sm",style:{background:"#2a2a2a",color:"#888",border:"1px solid #3a3a3a"}},[ee(v,{class:"-ml-0.5 h-5 w-5","aria-hidden":"true"}),t[0]||(t[0]=De(" Remove ",-1))],8,rw)):Q("",!0)])}),128)}var nw=st(Xb,[["render",iw]]),Lh={},Cs={};const ow="\xC1",aw="\xE1",lw="\u0102",cw="\u0103",uw="\u223E",hw="\u223F",dw="\u223E\u0333",fw="\xC2",pw="\xE2",mw="\xB4",_w="\u0410",gw="\u0430",vw="\xC6",yw="\xE6",bw="\u2061",ww="\u{1D504}",Sw="\u{1D51E}",xw="\xC0",Cw="\xE0",kw="\u2135",Ew="\u2135",Tw="\u0391",Rw="\u03B1",Lw="\u0100",Dw="\u0101",Aw="\u2A3F",Iw="&",Mw="&",Ow="\u2A55",Pw="\u2A53",Bw="\u2227",Hw="\u2A5C",qw="\u2A58",Fw="\u2A5A",Uw="\u2220",Nw="\u29A4",$w="\u2220",Ww="\u29A8",zw="\u29A9",Vw="\u29AA",jw="\u29AB",Kw="\u29AC",Gw="\u29AD",Xw="\u29AE",Yw="\u29AF",Jw="\u2221",Zw="\u221F",Qw="\u22BE",eS="\u299D",tS="\u2222",sS="\xC5",rS="\u237C",iS="\u0104",nS="\u0105",oS="\u{1D538}",aS="\u{1D552}",lS="\u2A6F",cS="\u2248",uS="\u2A70",hS="\u224A",dS="\u224B",fS="'",pS="\u2061",mS="\u2248",_S="\u224A",gS="\xC5",vS="\xE5",yS="\u{1D49C}",bS="\u{1D4B6}",wS="\u2254",SS="*",xS="\u2248",CS="\u224D",kS="\xC3",ES="\xE3",TS="\xC4",RS="\xE4",LS="\u2233",DS="\u2A11",AS="\u224C",IS="\u03F6",MS="\u2035",OS="\u223D",PS="\u22CD",BS="\u2216",HS="\u2AE7",qS="\u22BD",FS="\u2305",US="\u2306",NS="\u2305",$S="\u23B5",WS="\u23B6",zS="\u224C",VS="\u0411",jS="\u0431",KS="\u201E",GS="\u2235",XS="\u2235",YS="\u2235",JS="\u29B0",ZS="\u03F6",QS="\u212C",ex="\u212C",tx="\u0392",sx="\u03B2",rx="\u2136",ix="\u226C",nx="\u{1D505}",ox="\u{1D51F}",ax="\u22C2",lx="\u25EF",cx="\u22C3",ux="\u2A00",hx="\u2A01",dx="\u2A02",fx="\u2A06",px="\u2605",mx="\u25BD",_x="\u25B3",gx="\u2A04",vx="\u22C1",yx="\u22C0",bx="\u290D",wx="\u29EB",Sx="\u25AA",xx="\u25B4",Cx="\u25BE",kx="\u25C2",Ex="\u25B8",Tx="\u2423",Rx="\u2592",Lx="\u2591",Dx="\u2593",Ax="\u2588",Ix="=\u20E5",Mx="\u2261\u20E5",Ox="\u2AED",Px="\u2310",Bx="\u{1D539}",Hx="\u{1D553}",qx="\u22A5",Fx="\u22A5",Ux="\u22C8",Nx="\u29C9",$x="\u2510",Wx="\u2555",zx="\u2556",Vx="\u2557",jx="\u250C",Kx="\u2552",Gx="\u2553",Xx="\u2554",Yx="\u2500",Jx="\u2550",Zx="\u252C",Qx="\u2564",eC="\u2565",tC="\u2566",
4sC="\u2534",rC="\u2567",iC="\u2568",nC="\u2569",oC="\u229F",aC="\u229E",lC="\u22A0",cC="\u2518",uC="\u255B",hC="\u255C",dC="\u255D",fC="\u2514",pC="\u2558",mC="\u2559",_C="\u255A",gC="\u2502",vC="\u2551",yC="\u253C",bC="\u256A",wC="\u256B",SC="\u256C",xC="\u2524",CC="\u2561",kC="\u2562",EC="\u2563",TC="\u251C",RC="\u255E",LC="\u255F",DC="\u2560",AC="\u2035",IC="\u02D8",MC="\u02D8",OC="\xA6",PC="\u{1D4B7}",BC="\u212C",HC="\u204F",qC="\u223D",FC="\u22CD",UC="\u29C5",NC="\\",$C="\u27C8",WC="\u2022",zC="\u2022",VC="\u224E",jC="\u2AAE",KC="\u224F",GC="\u224E",XC="\u224F",YC="\u0106",JC="\u0107",ZC="\u2A44",QC="\u2A49",e2="\u2A4B",t2="\u2229",s2="\u22D2",r2="\u2A47",i2="\u2A40",n2="\u2145",o2="\u2229\uFE00",a2="\u2041",l2="\u02C7",c2="\u212D",u2="\u2A4D",h2="\u010C",d2="\u010D",f2="\xC7",p2="\xE7",m2="\u0108",_2="\u0109",g2="\u2230",v2="\u2A4C",y2="\u2A50",b2="\u010A",w2="\u010B",S2="\xB8",x2="\xB8",C2="\u29B2",k2="\xA2",E2="\xB7",T2="\xB7",R2="\u{1D520}",L2="\u212D",D2="\u0427",A2="\u0447",I2="\u2713",M2="\u2713",O2="\u03A7",P2="\u03C7",B2="\u02C6",H2="\u2257",q2="\u21BA",F2="\u21BB",U2="\u229B",N2="\u229A",$2="\u229D",W2="\u2299",z2="\xAE",V2="\u24C8",j2="\u2296",K2="\u2295",G2="\u2297",X2="\u25CB",Y2="\u29C3",J2="\u2257",Z2="\u2A10",Q2="\u2AEF",ek="\u29C2",tk="\u2232",sk="\u201D",rk="\u2019",ik="\u2663",nk="\u2663",ok=":",ak="\u2237",lk="\u2A74",ck="\u2254",uk="\u2254",hk=",",dk="@",fk="\u2201",pk="\u2218",mk="\u2201",_k="\u2102",gk="\u2245",vk="\u2A6D",yk="\u2261",bk="\u222E",wk="\u222F",Sk="\u222E",xk="\u{1D554}",Ck="\u2102",kk="\u2210",Ek="\u2210",Tk="\xA9",Rk="\xA9",Lk="\u2117",Dk="\u2233",Ak="\u21B5",Ik="\u2717",Mk="\u2A2F",Ok="\u{1D49E}",Pk="\u{1D4B8}",Bk="\u2ACF",Hk="\u2AD1",qk="\u2AD0",Fk="\u2AD2",Uk="\u22EF",Nk="\u2938",$k="\u2935",Wk="\u22DE",zk="\u22DF",Vk="\u21B6",jk="\u293D",Kk="\u2A48",Gk="\u2A46",Xk="\u224D",Yk="\u222A",Jk="\u22D3",Zk="\u2A4A",Qk="\u228D",eE="\u2A45",tE="\u222A\uFE00",sE="\u21B7",rE="\u293C",iE="\u22DE",nE="\u22DF",oE="\u22CE",aE="\u22CF",lE="\xA4",cE="\u21B6",uE="\u21B7",hE="\u22CE",dE="\u22CF",fE="\u2232",pE="\u2231",mE="\u232D",_E="\u2020",gE="\u2021",vE="\u2138",yE="\u2193",bE="\u21A1",wE="\u21D3",SE="\u2010",xE="\u2AE4",CE="\u22A3",kE="\u290F",EE="\u02DD",TE="\u010E",RE="\u010F",LE="\u0414",DE="\u0434",AE="\u2021",IE="\u21CA",ME="\u2145",OE="\u2146",PE="\u2911",BE="\u2A77",HE="\xB0",qE="\u2207",FE="\u0394",UE="\u03B4",NE="\u29B1",$E="\u297F",WE="\u{1D507}",zE="\u{1D521}",VE="\u2965",jE="\u21C3",KE="\u21C2",GE="\xB4",XE="\u02D9",YE="\u02DD",JE="`",ZE="\u02DC",QE="\u22C4",eT="\u22C4",tT="\u22C4",sT="\u2666",rT="\u2666",iT="\xA8",nT="\u2146",oT="\u03DD",aT="\u22F2",lT="\xF7",cT="\xF7",uT="\u22C7",hT="\u22C7",dT="\u0402",fT="\u0452",pT="\u231E",mT="\u230D",_T="$",gT="\u{1D53B}",vT="\u{1D555}",yT="\xA8",bT="\u02D9",wT="\u20DC",ST="\u2250",xT="\u2251",CT="\u2250",kT="\u2238",ET="\u2214",TT="\u22A1",RT="\u2306",LT="\u222F",DT="\xA8",AT="\u21D3",IT="\u21D0",MT="\u21D4",OT="\u2AE4",PT="\u27F8",BT="\u27FA",HT="\u27F9",qT="\u21D2",FT="\u22A8",UT="\u21D1",NT="\u21D5",$T="\u2225",WT="\u2913",zT="\u2193",VT="\u2193",jT="\u21D3",KT="\u21F5",GT="\u0311",XT="\u21CA",YT="\u21C3",JT="\u21C2",ZT="\u2950",QT="\u295E",eR="\u2956",tR="\u21BD",sR="\u295F",rR="\u2957",iR="\u21C1",nR="\u21A7",oR="\u22A4",aR="\u2910",lR="\u231F",cR="\u230C",uR="\u{1D49F}",hR="\u{1D4B9}",dR="\u0405",fR="\u0455",pR="\u29F6",mR="\u0110",_R="\u0111",gR="\u22F1",vR="\u25BF",yR="\u25BE",bR="\u21F5",wR="\u296F",SR="\u29A6",xR="\u040F",CR="\u045F",kR="\u27FF",ER="\xC9",TR="\xE9",RR="\u2A6E",LR="\u011A",DR="\u011B",AR="\xCA",IR="\xEA",MR="\u2256",OR="\u2255",PR="\u042D",BR="\u044D",HR="\u2A77",qR="\u0116",FR="\u0117",UR="\u2251",NR="\u2147",$R="\u2252",WR="\u{1D508}",zR="\u{1D522}",VR="\u2A9A",jR="\xC8",KR="\xE8",GR="\u2A96",XR="\u2A98",YR="\u2A99",JR="\u2208",ZR="\u23E7",QR="\u2113",eL="\u2A95",tL="\u2A97",sL="\u0112",rL="\u0113",iL="\u2205",nL="\u2205",oL="\u25FB",aL="\u2205",lL="\u25AB",cL="\u2004",uL="\u2005",hL="\u2003",dL="\u014A",fL="\u014B",pL="\u2002",mL="\u0118",_L="\u0119",gL="\u{1D53C}",vL="\u{1D556}",yL="\u22D5",bL="\u29E3",wL="\u2A71",SL="\u03B5",xL="\u0395",CL="\u03B5",kL="\u03F5",EL="\u2256",TL="\u2255",RL="\u2242",LL="\u2A96",DL="\u2A95",AL="\u2A75",IL="=",ML="\u2242",OL="\u225F",PL="\u21CC",BL="\u2261",HL="\u2A78",qL="\u29E5",FL="\u2971",UL="\u2253",NL="\u212F",$L="\u2130",WL="\u2250",zL="\u2A73",VL="\u2242",jL="\u0397",KL="\u03B7",GL="\xD0",XL="\xF0",YL="\xCB",JL="\xEB",ZL="\u20AC",QL="!",eD="\u2203",tD="\u2203",sD="\u2130",rD="\u2147",iD="\u2147",nD="\u2252",oD="\u0424",aD="\u0444",lD="\u2640",cD="\uFB03",uD="\uFB00",hD="\uFB04",dD="\u{1D509}",fD="\u{1D523}",pD="\uFB01",mD="\u25FC",_D="\u25AA",gD="fj",vD="\u266D",yD="\uFB02",bD="\u25B1",wD="\u0192",SD="\u{1D53D}",xD="\u{1D557}",CD="\u2200",kD="\u2200",ED="\u22D4",TD="\u2AD9",RD="\u2131",LD="\u2A0D",DD="\xBD",AD="\u2153",ID="\xBC",MD="\u2155",OD="\u2159",PD="\u215B",BD="\u2154",HD="\u2156",qD="\xBE",FD="\u2157",UD="\u215C",ND="\u2158",$D="\u215A",WD="\u215D",zD="\u215E",VD="\u2044",jD="\u2322",KD="\u{1D4BB}",GD="\u2131",XD="\u01F5",YD="\u0393",JD="\u03B3",ZD="\u03DC",QD="\u03DD",e5="\u2A86",t5="\u011E",s5="\u011F",r5="\u0122",i5="\u011C",n5="\u011D",o5="\u0413",a5="\u0433",l5="\u0120",c5="\u0121",u5="\u2265",h5="\u2267",d5="\u2A8C",f5="\u22DB",p5="\u2265",m5="\u2267",_5="\u2A7E",g5="\u2AA9",v5="\u2A7E",y5="\u2A80",b5="\u2A82",w5="\u2A84",S5="\u22DB\uFE00",x5="\u2A94",C5="\u{1D50A}",k5="\u{1D524}",E5="\u226B",T5="\u22D9",R5="\u22D9",L5="\u2137",D5="\u0403",A5="\u0453",I5="\u2AA5",M5="\u2277",O5="\u2A92",P5="\u2AA4",B5="\u2A8A",H5="\u2A8A",q5="\u2A88",F5="\u2269",U5="\u2A88",N5="\u2269",$5="\u22E7",W5="\u{1D53E}",z5="\u{1D558}",V5="`",j5="\u2265",K5="\u22DB",G5="\u2267",X5="\u2AA2",Y5="\u2277",J5="\u2A7E",Z5="\u2273",Q5="\u{1D4A2}",eA="\u210A",tA="\u2273",sA="\u2A8E",rA="\u2A90",iA="\u2AA7",nA="\u2A7A",oA=">",aA=">",lA="\u226B",cA="\u22D7",uA="\u2995",hA="\u2A7C",dA="\u2A86",fA="\u2978",pA
4="\u22D7",mA="\u22DB",_A="\u2A8C",gA="\u2277",vA="\u2273",yA="\u2269\uFE00",bA="\u2269\uFE00",wA="\u02C7",SA="\u200A",xA="\xBD",CA="\u210B",kA="\u042A",EA="\u044A",TA="\u2948",RA="\u2194",LA="\u21D4",DA="\u21AD",AA="^",IA="\u210F",MA="\u0124",OA="\u0125",PA="\u2665",BA="\u2665",HA="\u2026",qA="\u22B9",FA="\u{1D525}",UA="\u210C",NA="\u210B",$A="\u2925",WA="\u2926",zA="\u21FF",VA="\u223B",jA="\u21A9",KA="\u21AA",GA="\u{1D559}",XA="\u210D",YA="\u2015",JA="\u2500",ZA="\u{1D4BD}",QA="\u210B",eI="\u210F",tI="\u0126",sI="\u0127",rI="\u224E",iI="\u224F",nI="\u2043",oI="\u2010",aI="\xCD",lI="\xED",cI="\u2063",uI="\xCE",hI="\xEE",dI="\u0418",fI="\u0438",pI="\u0130",mI="\u0415",_I="\u0435",gI="\xA1",vI="\u21D4",yI="\u{1D526}",bI="\u2111",wI="\xCC",SI="\xEC",xI="\u2148",CI="\u2A0C",kI="\u222D",EI="\u29DC",TI="\u2129",RI="\u0132",LI="\u0133",DI="\u012A",AI="\u012B",II="\u2111",MI="\u2148",OI="\u2110",PI="\u2111",BI="\u0131",HI="\u2111",qI="\u22B7",FI="\u01B5",UI="\u21D2",NI="\u2105",$I="\u221E",WI="\u29DD",zI="\u0131",VI="\u22BA",jI="\u222B",KI="\u222C",GI="\u2124",XI="\u222B",YI="\u22BA",JI="\u22C2",ZI="\u2A17",QI="\u2A3C",e3="\u2063",t3="\u2062",s3="\u0401",r3="\u0451",i3="\u012E",n3="\u012F",o3="\u{1D540}",a3="\u{1D55A}",l3="\u0399",c3="\u03B9",u3="\u2A3C",h3="\xBF",d3="\u{1D4BE}",f3="\u2110",p3="\u2208",m3="\u22F5",_3="\u22F9",g3="\u22F4",v3="\u22F3",y3="\u2208",b3="\u2062",w3="\u0128",S3="\u0129",x3="\u0406",C3="\u0456",k3="\xCF",E3="\xEF",T3="\u0134",R3="\u0135",L3="\u0419",D3="\u0439",A3="\u{1D50D}",I3="\u{1D527}",M3="\u0237",O3="\u{1D541}",P3="\u{1D55B}",B3="\u{1D4A5}",H3="\u{1D4BF}",q3="\u0408",F3="\u0458",U3="\u0404",N3="\u0454",$3="\u039A",W3="\u03BA",z3="\u03F0",V3="\u0136",j3="\u0137",K3="\u041A",G3="\u043A",X3="\u{1D50E}",Y3="\u{1D528}",J3="\u0138",Z3="\u0425",Q3="\u0445",eM="\u040C",tM="\u045C",sM="\u{1D542}",rM="\u{1D55C}",iM="\u{1D4A6}",nM="\u{1D4C0}",oM="\u21DA",aM="\u0139",lM="\u013A",cM="\u29B4",uM="\u2112",hM="\u039B",dM="\u03BB",fM="\u27E8",pM="\u27EA",mM="\u2991",_M="\u27E8",gM="\u2A85",vM="\u2112",yM="\xAB",bM="\u21E4",wM="\u291F",SM="\u2190",xM="\u219E",CM="\u21D0",kM="\u291D",EM="\u21A9",TM="\u21AB",RM="\u2939",LM="\u2973",DM="\u21A2",AM="\u2919",IM="\u291B",MM="\u2AAB",OM="\u2AAD",PM="\u2AAD\uFE00",BM="\u290C",HM="\u290E",qM="\u2772",FM="{",UM="[",NM="\u298B",$M="\u298F",WM="\u298D",zM="\u013D",VM="\u013E",jM="\u013B",KM="\u013C",GM="\u2308",XM="{",YM="\u041B",JM="\u043B",ZM="\u2936",QM="\u201C",e4="\u201E",t4="\u2967",s4="\u294B",r4="\u21B2",i4="\u2264",n4="\u2266",o4="\u27E8",a4="\u21E4",l4="\u2190",c4="\u2190",u4="\u21D0",h4="\u21C6",d4="\u21A2",f4="\u2308",p4="\u27E6",m4="\u2961",_4="\u2959",g4="\u21C3",v4="\u230A",y4="\u21BD",b4="\u21BC",w4="\u21C7",S4="\u2194",x4="\u2194",C4="\u21D4",k4="\u21C6",E4="\u21CB",T4="\u21AD",R4="\u294E",L4="\u21A4",D4="\u22A3",A4="\u295A",I4="\u22CB",M4="\u29CF",O4="\u22B2",P4="\u22B4",B4="\u2951",H4="\u2960",q4="\u2958",F4="\u21BF",U4="\u2952",N4="\u21BC",$4="\u2A8B",W4="\u22DA",z4="\u2264",V4="\u2266",j4="\u2A7D",K4="\u2AA8",G4="\u2A7D",X4="\u2A7F",Y4="\u2A81",J4="\u2A83",Z4="\u22DA\uFE00",Q4="\u2A93",eO="\u2A85",tO="\u22D6",sO="\u22DA",rO="\u2A8B",iO="\u22DA",nO="\u2266",oO="\u2276",aO="\u2276",lO="\u2AA1",cO="\u2272",uO="\u2A7D",hO="\u2272",dO="\u297C",fO="\u230A",pO="\u{1D50F}",mO="\u{1D529}",_O="\u2276",gO="\u2A91",vO="\u2962",yO="\u21BD",bO="\u21BC",wO="\u296A",SO="\u2584",xO="\u0409",CO="\u0459",kO="\u21C7",EO="\u226A",TO="\u22D8",RO="\u231E",LO="\u21DA",DO="\u296B",AO="\u25FA",IO="\u013F",MO="\u0140",OO="\u23B0",PO="\u23B0",BO="\u2A89",HO="\u2A89",qO="\u2A87",FO="\u2268",UO="\u2A87",NO="\u2268",$O="\u22E6",WO="\u27EC",zO="\u21FD",VO="\u27E6",jO="\u27F5",KO="\u27F5",GO="\u27F8",XO="\u27F7",YO="\u27F7",JO="\u27FA",ZO="\u27FC",QO="\u27F6",eP="\u27F6",tP="\u27F9",sP="\u21AB",rP="\u21AC",iP="\u2985",nP="\u{1D543}",oP="\u{1D55D}",aP="\u2A2D",lP="\u2A34",cP="\u2217",uP="_",hP="\u2199",dP="\u2198",fP="\u25CA",pP="\u25CA",mP="\u29EB",_P="(",gP="\u2993",vP="\u21C6",yP="\u231F",bP="\u21CB",wP="\u296D",SP="\u200E",xP="\u22BF",CP="\u2039",kP="\u{1D4C1}",EP="\u2112",TP="\u21B0",RP="\u21B0",LP="\u2272",DP="\u2A8D",AP="\u2A8F",IP="[",MP="\u2018",OP="\u201A",PP="\u0141",BP="\u0142",HP="\u2AA6",qP="\u2A79",FP="<",UP="<",NP="\u226A",$P="\u22D6",WP="\u22CB",zP="\u22C9",VP="\u2976",
4jP="\u2A7B",KP="\u25C3",GP="\u22B4",XP="\u25C2",YP="\u2996",JP="\u294A",ZP="\u2966",QP="\u2268\uFE00",eB="\u2268\uFE00",tB="\xAF",sB="\u2642",rB="\u2720",iB="\u2720",nB="\u21A6",oB="\u21A6",aB="\u21A7",lB="\u21A4",cB="\u21A5",uB="\u25AE",hB="\u2A29",dB="\u041C",fB="\u043C",pB="\u2014",mB="\u223A",_B="\u2221",gB="\u205F",vB="\u2133",yB="\u{1D510}",bB="\u{1D52A}",wB="\u2127",SB="\xB5",xB="*",CB="\u2AF0",kB="\u2223",EB="\xB7",TB="\u229F",RB="\u2212",LB="\u2238",DB="\u2A2A",AB="\u2213",IB="\u2ADB",MB="\u2026",OB="\u2213",PB="\u22A7",BB="\u{1D544}",HB="\u{1D55E}",qB="\u2213",FB="\u{1D4C2}",UB="\u2133",NB="\u223E",$B="\u039C",WB="\u03BC",zB="\u22B8",VB="\u22B8",jB="\u2207",KB="\u0143",GB="\u0144",XB="\u2220\u20D2",YB="\u2249",JB="\u2A70\u0338",ZB="\u224B\u0338",QB="\u0149",e6="\u2249",t6="\u266E",s6="\u2115",r6="\u266E",i6="\xA0",n6="\u224E\u0338",o6="\u224F\u0338",a6="\u2A43",l6="\u0147",c6="\u0148",u6="\u0145",h6="\u0146",d6="\u2247",f6="\u2A6D\u0338",p6="\u2A42",m6="\u041D",_6="\u043D",g6="\u2013",v6="\u2924",y6="\u2197",b6="\u21D7",w6="\u2197",S6="\u2260",x6="\u2250\u0338",C6="\u200B",k6="\u200B",E6="\u200B",T6="\u200B",R6="\u2262",L6="\u2928",D6="\u2242\u0338",A6="\u226B",I6="\u226A",M6=` 5`,O6="\u2204",P6="\u2204",B6="\u{1D511}",H6="\u{1D52B}",q6="\u2267\u0338",F6="\u2271",U6="\u2271",N6="\u2267\u0338",$6="\u2A7E\u0338",W6="\u2A7E\u0338",z6="\u22D9\u0338",V6="\u2275",j6="\u226B\u20D2",K6="\u226F",G6="\u226F",X6="\u226B\u0338",Y6="\u21AE",J6="\u21CE",Z6="\u2AF2",Q6="\u220B",e8="\u22FC",t8="\u22FA",s8="\u220B",r8="\u040A",i8="\u045A",n8="\u219A",o8="\u21CD",a8="\u2025",l8="\u2266\u0338",c8="\u2270",u8="\u219A",h8="\u21CD",d8="\u21AE",f8="\u21CE",p8="\u2270",m8="\u2266\u0338",_8="\u2A7D\u0338",g8="\u2A7D\u0338",v8="\u226E",y8="\u22D8\u0338",b8="\u2274",w8="\u226A\u20D2",S8="\u226E",x8="\u22EA",C8="\u22EC",k8="\u226A\u0338",E8="\u2224",T8="\u2060",R8="\xA0",L8="\u{1D55F}",D8="\u2115",A8="\u2AEC",I8="\xAC",M8="\u2262",O8="\u226D",P8="\u2226",B8="\u2209",H8="\u2260",q8="\u2242\u0338",F8="\u2204",U8="\u226F",N8="\u2271",$8="\u2267\u0338",W8="\u226B\u0338",z8="\u2279",V8="\u2A7E\u0338",j8="\u2275",K8="\u224E\u0338",G8="\u224F\u0338",X8="\u2209",Y8="\u22F5\u0338",J8="\u22F9\u0338",Z8="\u2209",Q8="\u22F7",e7="\u22F6",t7="\u29CF\u0338",s7="\u22EA",r7="\u22EC",i7="\u226E",n7="\u2270",o7="\u2278",a7="\u226A\u0338",l7="\u2A7D\u0338",c7="\u2274",u7="\u2AA2\u0338",h7="\u2AA1\u0338",d7="\u220C",f7="\u220C",p7="\u22FE",m7="\u22FD",_7="\u2280",g7="\u2AAF\u0338",v7="\u22E0",y7="\u220C",b7="\u29D0\u0338",w7="\u22EB",S7="\u22ED",x7="\u228F\u0338",C7="\u22E2",k7="\u2290\u0338",E7="\u22E3",T7="\u2282\u20D2",R7="\u2288",L7="\u2281",D7="\u2AB0\u0338",A7="\u22E1",I7="\u227F\u0338",M7="\u2283\u20D2",O7="\u2289",P7="\u2241",B7="\u2244",H7="\u2247",q7="\u2249",F7="\u2224",U7="\u2226",N7="\u2226",$7="\u2AFD\u20E5",W7="\u2202\u0338",z7="\u2A14",V7="\u2280",j7="\u22E0",K7="\u2280",G7="\u2AAF\u0338",X7="\u2AAF\u0338",Y7="\u2933\u0338",J7="\u219B",Z7="\u21CF",Q7="\u219D\u0338",eH="\u219B",tH="\u21CF",sH="\u22EB",rH="\u22ED",iH="\u2281",nH="\u22E1",oH="\u2AB0\u0338",aH="\u{1D4A9}",lH="\u{1D4C3}",cH="\u2224",uH="\u2226",hH="\u2241",dH="\u2244",fH="\u2244",pH="\u2224",mH="\u2226",_H="\u22E2",gH="\u22E3",vH="\u2284",yH="\u2AC5\u0338",bH="\u2288",wH="\u2282\u20D2",SH="\u2288",xH="\u2AC5\u0338",CH="\u2281",kH="\u2AB0\u0338",EH="\u2285",TH="\u2AC6\u0338",RH="\u2289",LH="\u2283\u20D2",DH="\u2289",AH="\u2AC6\u0338",IH="\u2279",MH="\xD1",OH="\xF1",PH="\u2278",BH="\u22EA",HH="\u22EC",qH="\u22EB",FH="\u22ED",UH="\u039D",NH="\u03BD",$H="#",WH="\u2116",zH="\u2007",VH="\u224D\u20D2",jH="\u22AC",KH="\u22AD",GH="\u22AE",XH="\u22AF",YH="\u2265\u20D2",JH=">\u20D2",ZH="\u2904",QH="\u29DE",eq="\u2902",tq="\u2264\u20D2",sq="<\u20D2",rq="\u22B4\u20D2",iq="\u2903",nq="\u22B5\u20D2",oq="\u223C\u20D2",aq="\u2923",lq="\u2196",cq="\u21D6",uq="\u2196",hq="\u2927",dq="\xD3",fq="\xF3",pq="\u229B",mq="\xD4",_q="\xF4",gq="\u229A",vq="\u041E",yq="\u043E",bq="\u229D",wq="\u0150",Sq="\u0151",xq="\u2A38",Cq="\u2299",kq="\u29BC",Eq="\u0152",Tq="\u0153",Rq="\u29BF",Lq="\u{1D512}",Dq="\u{1D52C}",Aq="\u02DB",Iq="\xD2",Mq="\xF2",Oq="\u29C1",Pq="\u29B5",Bq="\u
503A9",Hq="\u222E",qq="\u21BA",Fq="\u29BE",Uq="\u29BB",Nq="\u203E",$q="\u29C0",Wq="\u014C",zq="\u014D",Vq="\u03A9",jq="\u03C9",Kq="\u039F",Gq="\u03BF",Xq="\u29B6",Yq="\u2296",Jq="\u{1D546}",Zq="\u{1D560}",Qq="\u29B7",eF="\u201C",tF="\u2018",sF="\u29B9",rF="\u2295",iF="\u21BB",nF="\u2A54",oF="\u2228",aF="\u2A5D",lF="\u2134",cF="\u2134",uF="\xAA",hF="\xBA",dF="\u22B6",fF="\u2A56",pF="\u2A57",mF="\u2A5B",_F="\u24C8",gF="\u{1D4AA}",vF="\u2134",yF="\xD8",bF="\xF8",wF="\u2298",SF="\xD5",xF="\xF5",CF="\u2A36",kF="\u2A37",EF="\u2297",TF="\xD6",RF="\xF6",LF="\u233D",DF="\u203E",AF="\u23DE",IF="\u23B4",MF="\u23DC",OF="\xB6",PF="\u2225",BF="\u2225",HF="\u2AF3",qF="\u2AFD",FF="\u2202",UF="\u2202",NF="\u041F",$F="\u043F",WF="%",zF=".",VF="\u2030",jF="\u22A5",KF="\u2031",GF="\u{1D513}",XF="\u{1D52D}",YF="\u03A6",JF="\u03C6",ZF="\u03D5",QF="\u2133",e9="\u260E",t9="\u03A0",s9="\u03C0",r9="\u22D4",i9="\u03D6",n9="\u210F",o9="\u210E",a9="\u210F",l9="\u2A23",c9="\u229E",u9="\u2A22",h9="+",d9="\u2214",f9="\u2A25",p9="\u2A72",m9="\xB1",_9="\xB1",g9="\u2A26",v9="\u2A27",y9="\xB1",b9="\u210C",w9="\u2A15",S9="\u{1D561}",x9="\u2119",C9="\xA3",k9="\u2AB7",E9="\u2ABB",T9="\u227A",R9="\u227C",L9="\u2AB7",D9="\u227A",A9="\u227C",I9="\u227A",M9="\u2AAF",O9="\u227C",P9="\u227E",B9="\u2AAF",H9="\u2AB9",q9="\u2AB5",F9="\u22E8",U9="\u2AAF",N9="\u2AB3",$9="\u227E",W9="\u2032",z9="\u2033",V9="\u2119",j9="\u2AB9",K9="\u2AB5",G9="\u22E8",X9="\u220F",Y9="\u220F",J9="\u232E",Z9="\u2312",Q9="\u2313",eU="\u221D",tU="\u221D",sU="\u2237",rU="\u221D",iU="\u227E",nU="\u22B0",oU="\u{1D4AB}",aU="\u{1D4C5}",lU="\u03A8",cU="\u03C8",uU="\u2008",hU="\u{1D514}",dU="\u{1D52E}",fU="\u2A0C",pU="\u{1D562}",mU="\u211A",_U="\u2057",gU="\u{1D4AC}",vU="\u{1D4C6}",yU="\u210D",bU="\u2A16",wU="?",SU="\u225F",xU='"',CU='"',kU="\u21DB",EU="\u223D\u0331",TU="\u0154",RU="\u0155",LU="\u221A",DU="\u29B3",AU="\u27E9",IU="\u27EB",MU="\u2992",OU="\u29A5",PU="\u27E9",BU="\xBB",HU="\u2975",qU="\u21E5",FU="\u2920",UU="\u2933",NU="\u2192",$U="\u21A0",WU="\u21D2",zU="\u291E",VU="\u21AA",jU="\u21AC",KU="\u2945",GU="\u2974",XU="\u2916",YU="\u21A3",JU="\u219D",ZU="\u291A",QU="\u291C",eN="\u2236",tN="\u211A",sN="\u290D",rN="\u290F",iN="\u2910",nN="\u2773",oN="}",aN="]",lN="\u298C",cN="\u298E",uN="\u2990",hN="\u0158",dN="\u0159",fN="\u0156",pN="\u0157",mN="\u2309",_N="}",gN="\u0420",vN="\u0440",yN="\u2937",bN="\u2969",wN="\u201D",SN="\u201D",xN="\u21B3",CN="\u211C",kN="\u211B",EN="\u211C",TN="\u211D",RN="\u211C",
5LN="\u25AD",DN="\xAE",AN="\xAE",IN="\u220B",MN="\u21CB",ON="\u296F",PN="\u297D",BN="\u230B",HN="\u{1D52F}",qN="\u211C",FN="\u2964",UN="\u21C1",NN="\u21C0",$N="\u296C",WN="\u03A1",zN="\u03C1",VN="\u03F1",jN="\u27E9",KN="\u21E5",GN="\u2192",XN="\u2192",YN="\u21D2",JN="\u21C4",ZN="\u21A3",QN="\u2309",e$="\u27E7",t$="\u295D",s$="\u2955",r$="\u21C2",i$="\u230B",n$="\u21C1",o$="\u21C0",a$="\u21C4",l$="\u21CC",c$="\u21C9",u$="\u219D",h$="\u21A6",d$="\u22A2",f$="\u295B",p$="\u22CC",m$="\u29D0",_$="\u22B3",g$="\u22B5",v$="\u294F",y$="\u295C",b$="\u2954",w$="\u21BE",S$="\u2953",x$="\u21C0",C$="\u02DA",k$="\u2253",E$="\u21C4",T$="\u21CC",R$="\u200F",L$="\u23B1",D$="\u23B1",A$="\u2AEE",I$="\u27ED",M$="\u21FE",O$="\u27E7",P$="\u2986",B$="\u{1D563}",H$="\u211D",q$="\u2A2E",F$="\u2A35",U$="\u2970",N$=")",$$="\u2994",W$="\u2A12",z$="\u21C9",V$="\u21DB",j$="\u203A",K$="\u{1D4C7}",G$="\u211B",X$="\u21B1",Y$="\u21B1",J$="]",Z$="\u2019",Q$="\u2019",eW="\u22CC",tW="\u22CA",sW="\u25B9",rW="\u22B5",iW="\u25B8",nW="\u29CE",oW="\u29F4",aW="\u2968",lW="\u211E",cW="\u015A",uW="\u015B",hW="\u201A",dW="\u2AB8",fW="\u0160",pW="\u0161",mW="\u2ABC",_W="\u227B",gW="\u227D",vW="\u2AB0",yW="\u2AB4",bW="\u015E",wW="\u015F",SW="\u015C",xW="\u015D",CW="\u2ABA",kW="\u2AB6",EW="\u22E9",TW="\u2A13",RW="\u227F",LW="\u0421",DW="\u0441",AW="\u22A1",IW="\u22C5",MW="\u2A66",OW="\u2925",PW="\u2198",BW="\u21D8",HW="\u2198",qW="\xA7",FW=";",UW="\u2929",NW="\u2216",$W="\u2216",WW="\u2736",zW="\u{1D516}",VW="\u{1D530}",jW="\u2322",KW="\u266F",GW="\u0429",XW="\u0449",YW="\u0428",JW="\u0448",ZW="\u2193",QW="\u2190",ez="\u2223",tz="\u2225",sz="\u2192",rz="\u2191",iz="\xAD",nz="\u03A3",oz="\u03C3",az="\u03C2",lz="\u03C2",cz="\u223C",uz="\u2A6A",hz="\u2243",dz="\u2243",fz="\u2A9E",pz="\u2AA0",mz="\u2A9D",_z="\u2A9F",gz="\u2246",vz="\u2A24",yz="\u2972",bz="\u2190",wz="\u2218",Sz="\u2216",xz="\u2A33",Cz="\u29E4",kz="\u2223",Ez="\u2323",Tz="\u2AAA",Rz="\u2AAC",Lz="\u2AAC\uFE00",Dz="\u042C",Az="\u044C",Iz="\u233F",Mz="\u29C4",Oz="/",Pz="\u{1D54A}",Bz="\u{1D564}",Hz="\u2660",qz="\u2660",Fz="\u2225",Uz="\u2293",Nz="\u2293\uFE00",$z="\u2294",Wz="\u2294\uFE00",zz="\u221A",Vz="\u228F",jz="\u2291",Kz="\u228F",Gz="\u2291",Xz="\u2290",Yz="\u2292",Jz="\u2290",Zz="\u2292",Qz="\u25A1",eV="\u25A1",tV="\u2293",sV="\u228F",rV="\u2291",iV="\u2290",nV="\u2292",oV="\u2294",aV="\u25AA",lV="\u25A1",cV="\u25AA",uV="\u2192",hV="\u{1D4AE}",dV="\u{1D4C8}",fV="\u2216",pV="\u2323",mV="\u22C6",_V="\u22C6",gV="\u2606",vV="\u2605",yV="\u03F5",bV="\u03D5",wV="\xAF",SV="\u2282",xV="\u22D0",CV="\u2ABD",kV="\u2AC5",EV="\u2286",TV="\u2AC3",RV="\u2AC1",LV="\u2ACB",DV="\u228A",AV="\u2ABF",IV="\u2979",MV="\u2282",OV="\u22D0",PV="\u2286",BV="\u2AC5",HV="\u2286",qV="\u228A",FV="\u2ACB",UV="\u2AC7",NV="\u2AD5",$V="\u2AD3",WV="\u2AB8",zV="\u227B",VV="\u227D",jV="\u227B",KV="\u2AB0",GV="\u227D",XV="\u227F",YV="\u2AB0",JV="\u2ABA",ZV="\u2AB6",QV="\u22E9",ej="\u227F",tj="\u220B",sj="\u2211",rj="\u2211",ij="\u266A",nj="\xB9",oj="\xB2",aj="\xB3",lj="\u2283",cj="\u22D1",uj="\u2ABE",hj="\u2AD8",dj="\u2AC6",fj="\u2287",pj="\u2AC4",mj="\u2283",_j="\u2287",gj="\u27C9",vj="\u2AD7",yj="\u297B",bj="\u2AC2",wj="\u2ACC",Sj="\u228B",xj="\u2AC0",Cj="\u2283",kj="\u22D1",Ej="\u2287",Tj="\u2AC6",Rj="\u228B",Lj="\u2ACC",Dj="\u2AC8",Aj="\u2AD4",Ij="\u2AD6",Mj="\u2926",Oj="\u2199",Pj="\u21D9",Bj="\u2199",Hj="\u292A",qj="\xDF",Fj=" ",Uj="\u2316",Nj="\u03A4",$j="\u03C4",Wj="\u23B4",zj="\u0164",Vj="\u0165",jj="\u0162",Kj="\u0163",Gj="\u0422",Xj="\u0442",Yj="\u20DB",Jj="\u2315",Zj="\u{1D517}",Qj="\u{1D531}",eK="\u2234",tK="\u2234",sK="\u2234",rK="\u0398",iK="\u03B8",nK="\u03D1",oK="\u03D1",aK="\u2248",lK="\u223C",cK="\u205F\u200A",uK="\u2009",hK="\u2009",dK="\u2248",fK="\u223C",pK="\xDE",mK="\xFE",_K="\u02DC",gK="\u223C",vK="\u2243",yK="\u2245",bK="\u2248",wK="\u2A31",SK="\u22A0",xK="\xD7",CK="\u2A30",kK="\u222D",EK="\u2928",TK="\u2336",RK="\u2AF1",LK="\u22A4",DK="\u{1D54B}",AK="\u{1D565}",IK="\u2ADA",MK="\u2929",OK="\u2034",PK="\u2122",BK="\u2122",HK="\u25B5",qK="\u25BF",FK="\u25C3",UK="\u22B4",NK="\u225C",$K="\u25B9",WK="\u22B5",zK="\u25EC",VK="\u225C",jK="\u2A3A",KK="\u20DB",GK="\u2A39",XK="\u29CD",YK="\u2A3B",JK="\u23E2",ZK="\u{1D4AF}",QK="\u{1D4C9}
5",eG="\u0426",tG="\u0446",sG="\u040B",rG="\u045B",iG="\u0166",nG="\u0167",oG="\u226C",aG="\u219E",lG="\u21A0",cG="\xDA",uG="\xFA",hG="\u2191",dG="\u219F",fG="\u21D1",pG="\u2949",mG="\u040E",_G="\u045E",gG="\u016C",vG="\u016D",yG="\xDB",bG="\xFB",wG="\u0423",SG="\u0443",xG="\u21C5",CG="\u0170",kG="\u0171",EG="\u296E",TG="\u297E",RG="\u{1D518}",LG="\u{1D532}",DG="\xD9",AG="\xF9",IG="\u2963",MG="\u21BF",OG="\u21BE",PG="\u2580",BG="\u231C",HG="\u231C",qG="\u230F",FG="\u25F8",UG="\u016A",NG="\u016B",$G="\xA8",WG="_",zG="\u23DF",VG="\u23B5",jG="\u23DD",KG="\u22C3",GG="\u228E",XG="\u0172",YG="\u0173",JG="\u{1D54C}",ZG="\u{1D566}",QG="\u2912",eX="\u2191",tX="\u2191",sX="\u21D1",rX="\u21C5",iX="\u2195",nX="\u2195",oX="\u21D5",aX="\u296E",lX="\u21BF",cX="\u21BE",uX="\u228E",hX="\u2196",dX="\u2197",fX="\u03C5",pX="\u03D2",mX="\u03D2",_X="\u03A5",gX="\u03C5",vX="\u21A5",yX="\u22A5",bX="\u21C8",wX="\u231D",SX="\u231D",xX="\u230E",CX="\u016E",kX="\u016F",EX="\u25F9",TX="\u{1D4B0}",RX="\u{1D4CA}",LX="\u22F0",DX="\u0168",AX="\u0169",IX="\u25B5",MX="\u25B4",OX="\u21C8",PX="\xDC",BX="\xFC",HX="\u29A7",qX="\u299C",FX="\u03F5",UX="\u03F0",NX="\u2205",$X="\u03D5",WX="\u03D6",zX="\u221D",VX="\u2195",jX="\u21D5",KX="\u03F1",GX="\u03C2",XX="\u228A\uFE00",YX="\u2ACB\uFE00",JX="\u228B\uFE00",ZX="\u2ACC\uFE00",QX="\u03D1",eY="\u22B2",tY="\u22B3",sY="\u2AE8",rY="\u2AEB",iY="\u2AE9",nY="\u0412",oY="\u0432",aY="\u22A2",lY="\u22A8",cY="\u22A9",uY="\u22AB",hY="\u2AE6",dY="\u22BB",fY="\u2228",pY="\u22C1",mY="\u225A",_Y="\u22EE",gY="|",vY="\u2016",yY="|",bY="\u2016",wY="\u2223",SY="|",xY="\u2758",CY="\u2240",kY="\u200A",EY="\u{1D519}",TY="\u{1D533}",RY="\u22B2",LY="\u2282\u20D2",DY="\u2283\u20D2",AY="\u{1D54D}",IY="\u{1D567}",MY="\u221D",OY="\u22B3",PY="\u{1D4B1}",BY="\u{1D4CB}",HY="\u2ACB\uFE00",qY="\u228A\uFE00",FY="\u2ACC\uFE00",UY="\u228B\uFE00",NY="\u22AA",$Y="\u299A",WY="\u0174",zY="\u0175",VY="\u2A5F",jY="\u2227",KY="\u22C0",GY="\u2259",XY="\u2118",YY="\u{1D51A}",JY="\u{1D534}",ZY="\u{1D54E}",QY="\u{1D568}",eJ="\u2118",tJ="\u2240",sJ="\u2240",rJ="\u{1D4B2}",iJ="\u{1D4CC}",nJ="\u22C2",oJ="\u25EF",aJ="\u22C3",lJ="\u25BD",cJ="\u{1D51B}",uJ="\u{1D535}",hJ="\u27F7",dJ="\u27FA",fJ="\u039E",pJ="\u03BE",mJ="\u27F5",_J="\u27F8",gJ="\u27FC",vJ="\u22FB",yJ="\u2A00",bJ="\u{1D54F}",wJ="\u{1D569}",SJ="\u2A01",xJ="\u2A02",CJ="\u27F6",kJ="\u27F9",EJ="\u{1D4B3}",TJ="\u{1D4CD}",RJ="\u2A06",LJ="\u2A04",DJ="\u25B3",AJ="\u22C1",IJ="\u22C0",MJ="\xDD",OJ="\xFD",PJ="\u042F",BJ="\u044F",HJ="\u0176",qJ="\u0177",FJ="\u042B",UJ="\u044B",NJ="\xA5",$J="\u{1D51C}",WJ="\u{1D536}",zJ="\u0407",VJ="\u0457",jJ="\u{1D550}",KJ="\u{1D56A}",GJ="\u{1D4B4}",XJ="\u{1D4CE}",YJ="\u042E",JJ="\u044E",ZJ="\xFF",QJ="\u0178",eZ="\u0179",tZ="\u017A",sZ="\u017D",rZ="\u017E",iZ="\u0417",nZ="\u0437",oZ="\u017B",aZ="\u017C",lZ="\u2128",cZ="\u200B",uZ="\u0396",hZ="\u03B6",dZ="\u{1D537}",fZ="\u2128",pZ="\u0416",mZ="\u0436",_Z="\u21DD",gZ="\u{1D56B}",vZ="\u2124",yZ="\u{1D4B5}",bZ="\u{1D4CF}",wZ="\u200D",SZ="\u200C";var Dh={Aacute:ow,aacute:aw,Abreve:lw,abreve:cw,ac:uw,acd:hw,acE:dw,Acirc:fw,acirc:pw,acute:mw,Acy:_w,acy:gw,AElig:vw,aelig:yw,af:bw,Afr:ww,afr:Sw,Agrave:xw,agrave:Cw,alefsym:kw,aleph:Ew,Alpha:Tw,alpha:Rw,Amacr:Lw,amacr:Dw,amalg:Aw,amp:Iw,AMP:Mw,andand:Ow,And:Pw,and:Bw,andd:Hw,andslope:qw,andv:Fw,ang:Uw,ange:Nw,angle:$w,angmsdaa:Ww,angmsdab:zw,angmsdac:Vw,angmsdad:jw,angmsdae:Kw,angmsdaf:Gw,angmsdag:Xw,angmsdah:Yw,angmsd:Jw,angrt:Zw,angrtvb:Qw,angrtvbd:eS,angsph:tS,angst:sS,angzarr:rS,Aogon:iS,aogon:nS,Aopf:oS,aopf:aS,apacir:lS,ap:cS,apE:uS,ape:hS,apid:dS,apos:fS,ApplyFunction:pS,approx:mS,approxeq:_S,Aring:gS,aring:vS,Ascr:yS,ascr:bS,Assign:wS,ast:SS,asymp:xS,asympeq:CS,Atilde:kS,atilde:ES,Auml:TS,auml:RS,awconint:LS,awint:DS,backcong:AS,backepsilon:IS,backprime:MS,backsim:OS,backsimeq:PS,Backslash:BS,Barv:HS,barvee:qS,barwed:FS,Barwed:US,barwedge:NS,bbrk:$S,bbrktbrk:WS,bcong:zS,Bcy:VS,bcy:jS,bdquo:KS,becaus:GS,because:XS,Because:YS,bemptyv:JS,bepsi:ZS,bernou:QS,Bernoullis:ex,Beta:tx,beta:sx,beth:rx,between:ix,Bfr:nx,bfr:ox,bigcap:ax,bigcirc:lx,bigcup:cx,bigodot:ux,bigoplus:hx,bigotimes:dx,bigsqcup:fx,bigstar:px,bigtriangledown:mx,bigtriangleup:_x,biguplus:gx,bigvee:vx,bigwedge:yx,bkarow:bx,blacklozenge:wx,blacksquare:Sx,blacktriangle:xx,blacktriangledown:Cx,blacktriangleleft:kx,blacktriangleright:Ex,blank:Tx,blk12:Rx,blk14:Lx,blk34:Dx,block:Ax,bne:Ix,bnequiv:Mx,bNot:Ox,bnot:Px,Bopf:Bx,bopf:Hx,bot:qx,bottom:Fx,bowtie:Ux,boxbox:Nx,boxdl:$x,boxdL:Wx,boxDl:zx,boxDL:Vx,boxdr:jx,boxdR:Kx,boxDr:Gx,boxDR:Xx,boxh:Yx,boxH:Jx,boxhd:Zx,boxHd:Qx,boxhD:eC,boxHD:tC,boxhu:sC,boxHu:rC,boxhU:iC,boxHU:nC,boxminus:oC,boxplus:aC,boxtimes:lC,boxul:cC,boxuL:uC,boxUl:hC,boxUL:dC,boxur:fC,boxuR:pC,boxUr:mC,boxUR:_C,boxv:gC,boxV:vC,boxvh:yC,boxvH:bC,boxVh:wC,boxVH:SC,boxvl:xC,boxvL:CC,boxVl:kC,boxVL:EC,boxvr:TC,boxvR:RC,boxVr:LC,boxVR:DC,bprime:AC,breve:IC,Breve:MC,brvbar:OC,bscr:PC,Bscr:BC,bsemi:HC,bsim:qC,bsime:FC,bsolb:UC,bsol:NC,bsolhsub:$C,bull:WC,bullet:zC,bump:VC,bumpE:jC,bumpe:KC,Bumpeq:GC,bumpeq:XC,Cacute:YC,cacute:JC,capand:ZC,capbrcup:QC,capcap:e2,cap:t2,Cap:s2,capcup:r2,capdot:i2,CapitalDifferentialD:n2,caps:o2,caret:a2,caron:l2,Cayleys:c2,ccaps:u2,Ccaron:h2,ccaron:d2,Ccedil
5:f2,ccedil:p2,Ccirc:m2,ccirc:_2,Cconint:g2,ccups:v2,ccupssm:y2,Cdot:b2,cdot:w2,cedil:S2,Cedilla:x2,cemptyv:C2,cent:k2,centerdot:E2,CenterDot:T2,cfr:R2,Cfr:L2,CHcy:D2,chcy:A2,check:I2,checkmark:M2,Chi:O2,chi:P2,circ:B2,circeq:H2,circlearrowleft:q2,circlearrowright:F2,circledast:U2,circledcirc:N2,circleddash:$2,CircleDot:W2,circledR:z2,circledS:V2,CircleMinus:j2,CirclePlus:K2,CircleTimes:G2,cir:X2,cirE:Y2,cire:J2,cirfnint:Z2,cirmid:Q2,cirscir:ek,ClockwiseContourIntegral:tk,CloseCurlyDoubleQuote:sk,CloseCurlyQuote:rk,clubs:ik,clubsuit:nk,colon:ok,Colon:ak,Colone:lk,colone:ck,coloneq:uk,comma:hk,commat:dk,comp:fk,compfn:pk,complement:mk,complexes:_k,cong:gk,congdot:vk,Congruent:yk,conint:bk,Conint:wk,ContourIntegral:Sk,copf:xk,Copf:Ck,coprod:kk,Coproduct:Ek,copy:Tk,COPY:Rk,copysr:Lk,CounterClockwiseContourIntegral:Dk,crarr:Ak,cross:Ik,Cross:Mk,Cscr:Ok,cscr:Pk,csub:Bk,csube:Hk,csup:qk,csupe:Fk,ctdot:Uk,cudarrl:Nk,cudarrr:$k,cuepr:Wk,cuesc:zk,cularr:Vk,cularrp:jk,cupbrcap:Kk,cupcap:Gk,CupCap:Xk,cup:Yk,Cup:Jk,cupcup:Zk,cupdot:Qk,cupor:eE,cups:tE,curarr:sE,curarrm:rE,curlyeqprec:iE,curlyeqsucc:nE,curlyvee:oE,curlywedge:aE,curren:lE,curvearrowleft:cE,curvearrowright:uE,cuvee:hE,cuwed:dE,cwconint:fE,cwint:pE,cylcty:mE,dagger:_E,Dagger:gE,daleth:vE,darr:yE,Darr:bE,dArr:wE,dash:SE,Dashv:xE,dashv:CE,dbkarow:kE,dblac:EE,Dcaron:TE,dcaron:RE,Dcy:LE,dcy:DE,ddagger:AE,ddarr:IE,DD:ME,dd:OE,DDotrahd:PE,ddotseq:BE,deg:HE,Del:qE,Delta:FE,delta:UE,demptyv:NE,dfisht:$E,Dfr:WE,dfr:zE,dHar:VE,dharl:jE,dharr:KE,DiacriticalAcute:GE,DiacriticalDot:XE,DiacriticalDoubleAcute:YE,DiacriticalGrave:JE,DiacriticalTilde:ZE,diam:QE,diamond:eT,Diamond:tT,diamondsuit:sT,diams:rT,die:iT,DifferentialD:nT,digamma:oT,disin:aT,div:lT,divide:cT,divideontimes:uT,divonx:hT,DJcy:dT,djcy:fT,dlcorn:pT,dlcrop:mT,dollar:_T,Dopf:gT,dopf:vT,Dot:yT,dot:bT,DotDot:wT,doteq:ST,doteqdot:xT,DotEqual:CT,dotminus:kT,dotplus:ET,dotsquare:TT,doublebarwedge:RT,DoubleContourIntegral:LT,DoubleDot:DT,DoubleDownArrow:AT,DoubleLeftArrow:IT,DoubleLeftRightArrow:MT,DoubleLeftTee:OT,DoubleLongLeftArrow:PT,DoubleLongLeftRightArrow:BT,DoubleLongRightArrow:HT,DoubleRightArrow:qT,DoubleRightTee:FT,DoubleUpArrow:UT,DoubleUpDownArrow:NT,DoubleVerticalBar:$T,DownArrowBar:WT,downarrow:zT,DownArrow:VT,Downarrow:jT,DownArrowUpArrow:KT,DownBreve:GT,downdownarrows:XT,downharpoonleft:YT,downharpoonright:JT,DownLeftRightVector:ZT,DownLeftTeeVector:QT,DownLeftVectorBar:eR,DownLeftVector:tR,DownRightTeeVector:sR,DownRightVectorBar:rR,DownRightVector:iR,DownTeeArrow:nR,DownTee:oR,drbkarow:aR,drcorn:lR,drcrop:cR,Dscr:uR,dscr:hR,DScy:dR,dscy:fR,dsol:pR,Dstrok:mR,dstrok:_R,dtdot:gR,dtri:vR,dtrif:yR,duarr:bR,duhar:wR,dwangle:SR,DZcy:xR,dzcy:CR,dzigrarr:kR,Eacute:ER,eacute:TR,easter:RR,Ecaron:LR,ecaron:DR,Ecirc:AR,ecirc:IR,ecir:MR,ecolon:OR,Ecy:PR,ecy:BR,eDDot:HR,Edot:qR,edot:FR,eDot:UR,ee:NR,efDot:$R,Efr:WR,efr:zR,eg:VR,Egrave:jR,egrave:KR,egs:GR,egsdot:XR,el:YR,Element:JR,elinters:ZR,ell:QR,els:eL,elsdot:tL,Emacr:sL,emacr:rL,empty:iL,emptyset:nL,EmptySmallSquare:oL,emptyv:aL,EmptyVerySmallSquare:lL,emsp13:cL,emsp14:uL,emsp:hL,ENG:dL,eng:fL,ensp:pL,Eogon:mL,eogon:_L,Eopf:gL,eopf:vL,epar:yL,eparsl:bL,eplus:wL,epsi:SL,Epsilon:xL,epsilon:CL,epsiv:kL,eqcirc:EL,eqcolon:TL,eqsim:RL,eqslantgtr:LL,eqslantless:DL,Equal:AL,equals:IL,EqualTilde:ML,equest:OL,Equilibrium:PL,equiv:BL,equivDD:HL,eqvparsl:qL,erarr:FL,erDot:UL,escr:NL,Escr:$L,esdot:WL,Esim:zL,esim:VL,Eta:jL,eta:KL,ETH:GL,eth:XL,Euml:YL,euml:JL,euro:ZL,excl:QL,exist:eD,Exists:tD,expectation:sD,exponentiale:rD,ExponentialE:iD,fallingdotseq:nD,Fcy:oD,fcy:aD,female:lD,ffilig:cD,fflig:uD,ffllig:hD,Ffr:dD,ffr:fD,filig:pD,FilledSmallSquare:mD,FilledVerySmallSquare:_D,fjlig:gD,flat:vD,fllig:yD,fltns:bD,fnof:wD,Fopf:SD,fopf:xD,forall:CD,ForAll:kD,fork:ED,forkv:TD,Fouriertrf:RD,fpartint:LD,frac12:DD,frac13:AD,frac14:ID,frac15:MD,frac16:OD,frac18:PD,frac23:BD,frac25:HD,frac34:qD,frac35:FD,frac38:UD,frac45:ND,frac56:$D,frac58:WD,frac78:zD,frasl:VD,frown:jD,fscr:KD,Fscr:GD,gacute:XD,Gamma:YD,gamma:JD,Gammad:ZD,gammad:QD,gap:e5,Gbreve:t5,gbreve:s5,Gcedil:r5,Gcirc:i5,gcirc:n5,Gcy:o5,gcy:a5,Gdot:l5,gdot:c5,ge:u5,gE:h5,gEl:d5,gel:f5,geq:p5,geqq:m5,geqslant:_5,gescc:g5,ges:v5,gesdot:y5,gesdoto:b5,gesdotol:w5,gesl:S5,gesles:x5,Gfr:C5,gfr:k5,gg:E5,Gg:T5,ggg:R5,gimel:L5,GJcy:D5,gjcy:A5,gla:I5,gl:M5,glE:O5,glj:P5,gnap:B5,gnapprox:H5,gne:q5,gnE:F5,gneq:U5,gneqq:N5,gnsim:$5,Gopf:W5,gopf:z5,grave:V5,GreaterEqual:j5,GreaterEqualLess:K5,GreaterFullEqual:G5,GreaterGreater:X5,GreaterLess:Y5,GreaterSlantEqual:J5,GreaterTilde:Z5,Gscr:Q5,gscr:eA,gsim:tA,gsime:sA,gsiml:rA,gtcc:iA,gtcir:nA,gt:oA,GT:aA,Gt:lA,gtdot:cA,gtlPar:uA,gtquest:hA,gtrapprox:dA,gtrarr:fA,gtrdot:pA,gtreqless:mA,gtreqqless:_A,gtrless:gA,gtrsim:vA,gvertneqq:yA,gvnE:bA,Hacek:wA,hairsp:SA,half:xA,hamilt:CA,HARDcy:kA,hardcy:EA,harrcir:TA,harr:RA,hArr:LA,harrw:DA,Hat:AA,hbar:IA,Hcirc:MA,hcirc:OA,hearts:PA,heartsuit:BA,hellip:HA,hercon:qA,hfr:FA,Hfr:UA,HilbertSpace:NA,hksearow:$A,hkswarow:WA,hoarr:zA,homtht:VA,hookleftarrow:jA,hookrightarrow:KA,hopf:GA,Hopf:XA,horbar:YA,HorizontalLine:JA,hscr:ZA,Hscr:QA,hslash:eI,Hstrok:tI,hstrok:sI,HumpDownHump:rI,HumpEqual:iI,hybull:nI,hyphen:oI,Iacute:aI,iacute:lI,ic:cI,Icirc:uI,icirc:hI,Icy:dI,icy:fI,Idot:pI,IEcy:mI,iecy:_I,iexcl:gI,iff:vI,ifr:yI,Ifr:bI,Igrave:wI,igrave:SI,ii:xI,iiiint:CI,iiint:kI,iinfin:EI,iiota:TI,IJlig:RI,ijlig:LI,Imacr:DI,imacr:AI,image:II,ImaginaryI:MI,imagline:OI,imagpart:PI,imath:BI,Im
5:HI,imof:qI,imped:FI,Implies:UI,incare:NI,in:"\u2208",infin:$I,infintie:WI,inodot:zI,intcal:VI,int:jI,Int:KI,integers:GI,Integral:XI,intercal:YI,Intersection:JI,intlarhk:ZI,intprod:QI,InvisibleComma:e3,InvisibleTimes:t3,IOcy:s3,iocy:r3,Iogon:i3,iogon:n3,Iopf:o3,iopf:a3,Iota:l3,iota:c3,iprod:u3,iquest:h3,iscr:d3,Iscr:f3,isin:p3,isindot:m3,isinE:_3,isins:g3,isinsv:v3,isinv:y3,it:b3,Itilde:w3,itilde:S3,Iukcy:x3,iukcy:C3,Iuml:k3,iuml:E3,Jcirc:T3,jcirc:R3,Jcy:L3,jcy:D3,Jfr:A3,jfr:I3,jmath:M3,Jopf:O3,jopf:P3,Jscr:B3,jscr:H3,Jsercy:q3,jsercy:F3,Jukcy:U3,jukcy:N3,Kappa:$3,kappa:W3,kappav:z3,Kcedil:V3,kcedil:j3,Kcy:K3,kcy:G3,Kfr:X3,kfr:Y3,kgreen:J3,KHcy:Z3,khcy:Q3,KJcy:eM,kjcy:tM,Kopf:sM,kopf:rM,Kscr:iM,kscr:nM,lAarr:oM,Lacute:aM,lacute:lM,laemptyv:cM,lagran:uM,Lambda:hM,lambda:dM,lang:fM,Lang:pM,langd:mM,langle:_M,lap:gM,Laplacetrf:vM,laquo:yM,larrb:bM,larrbfs:wM,larr:SM,Larr:xM,lArr:CM,larrfs:kM,larrhk:EM,larrlp:TM,larrpl:RM,larrsim:LM,larrtl:DM,latail:AM,lAtail:IM,lat:MM,late:OM,lates:PM,lbarr:BM,lBarr:HM,lbbrk:qM,lbrace:FM,lbrack:UM,lbrke:NM,lbrksld:$M,lbrkslu:WM,Lcaron:zM,lcaron:VM,Lcedil:jM,lcedil:KM,lceil:GM,lcub:XM,Lcy:YM,lcy:JM,ldca:ZM,ldquo:QM,ldquor:e4,ldrdhar:t4,ldrushar:s4,ldsh:r4,le:i4,lE:n4,LeftAngleBracket:o4,LeftArrowBar:a4,leftarrow:l4,LeftArrow:c4,Leftarrow:u4,LeftArrowRightArrow:h4,leftarrowtail:d4,LeftCeiling:f4,LeftDoubleBracket:p4,LeftDownTeeVector:m4,LeftDownVectorBar:_4,LeftDownVector:g4,LeftFloor:v4,leftharpoondown:y4,leftharpoonup:b4,leftleftarrows:w4,leftrightarrow:S4,LeftRightArrow:x4,Leftrightarrow:C4,leftrightarrows:k4,leftrightharpoons:E4,leftrightsquigarrow:T4,LeftRightVector:R4,LeftTeeArrow:L4,LeftTee:D4,LeftTeeVector:A4,leftthreetimes:I4,LeftTriangleBar:M4,LeftTriangle:O4,LeftTriangleEqual:P4,LeftUpDownVector:B4,LeftUpTeeVector:H4,LeftUpVectorBar:q4,LeftUpVector:F4,LeftVectorBar:U4,LeftVector:N4,lEg:$4,leg:W4,leq:z4,leqq:V4,leqslant:j4,lescc:K4,les:G4,lesdot:X4,lesdoto:Y4,lesdotor:J4,lesg:Z4,lesges:Q4,lessapprox:eO,lessdot:tO,lesseqgtr:sO,lesseqqgtr:rO,LessEqualGreater:iO,LessFullEqual:nO,LessGreater:oO,lessgtr:aO,LessLess:lO,lesssim:cO,LessSlantEqual:uO,LessTilde:hO,lfisht:dO,lfloor:fO,Lfr:pO,lfr:mO,lg:_O,lgE:gO,lHar:vO,lhard:yO,lharu:bO,lharul:wO,lhblk:SO,LJcy:xO,ljcy:CO,llarr:kO,ll:EO,Ll:TO,llcorner:RO,Lleftarrow:LO,llhard:DO,lltri:AO,Lmidot:IO,lmidot:MO,lmoustache:OO,lmoust:PO,lnap:BO,lnapprox:HO,lne:qO,lnE:FO,lneq:UO,lneqq:NO,lnsim:$O,loang:WO,loarr:zO,lobrk:VO,longleftarrow:jO,LongLeftArrow:KO,Longleftarrow:GO,longleftrightarrow:XO,LongLeftRightArrow:YO,Longleftrightarrow:JO,longmapsto:ZO,longrightarrow:QO,LongRightArrow:eP,Longrightarrow:tP,looparrowleft:sP,looparrowright:rP,lopar:iP,Lopf:nP,lopf:oP,loplus:aP,lotimes:lP,lowast:cP,lowbar:uP,LowerLeftArrow:hP,LowerRightArrow:dP,loz:fP,lozenge:pP,lozf:mP,lpar:_P,lparlt:gP,lrarr:vP,lrcorner:yP,lrhar:bP,lrhard:wP,lrm:SP,lrtri:xP,lsaquo:CP,lscr:kP,Lscr:EP,lsh:TP,Lsh:RP,lsim:LP,lsime:DP,lsimg:AP,lsqb:IP,lsquo:MP,lsquor:OP,Lstrok:PP,lstrok:BP,ltcc:HP,ltcir:qP,lt:FP,LT:UP,Lt:NP,ltdot:$P,lthree:WP,ltimes:zP,ltlarr:VP,ltquest:jP,ltri:KP,ltrie:GP,ltrif:XP,ltrPar:YP,lurdshar:JP,luruhar:ZP,lvertneqq:QP,lvnE:eB,macr:tB,male:sB,malt:rB,maltese:iB,Map:"\u2905",map:nB,mapsto:oB,mapstodown:aB,mapstoleft:lB,mapstoup:cB,marker:uB,mcomma:hB,Mcy:dB,mcy:fB,mdash:pB,mDDot:mB,measuredangle:_B,MediumSpace:gB,Mellintrf:vB,Mfr:yB,mfr:bB,mho:wB,micro:SB,midast:xB,midcir:CB,mid:kB,middot:EB,minusb:TB,minus:RB,minusd:LB,minusdu:DB,MinusPlus:AB,mlcp:IB,mldr:MB,mnplus:OB,models:PB,Mopf:BB,mopf:HB,mp:qB,mscr:FB,Mscr:UB,mstpos:NB,Mu:$B,mu:WB,multimap:zB,mumap:VB,nabla:jB,Nacute:KB,nacute:GB,nang:XB,nap:YB,napE:JB,napid:ZB,napos:QB,napprox:e6,natural:t6,naturals:s6,natur:r6,nbsp:i6,nbump:n6,nbumpe:o6,ncap:a6,Ncaron:l6,ncaron:c6,Ncedil:u6,ncedil:h6,ncong:d6,ncongdot:f6,ncup:p6,Ncy:m6,ncy:_6,ndash:g6,nearhk:v6,nearr:y6,neArr:b6,nearrow:w6,ne:S6,nedot:x6,NegativeMediumSpace:C6,NegativeThickSpace:k6,NegativeThinSpace:E6,NegativeVeryThinSpace:T6,nequiv:R6,nesear:L6,nesim:D6,NestedGreaterGreater:A6,NestedLessLess:I6,NewLine:M6,nexist:O6,nexists:P6,Nfr:B6,nfr:H6,ngE:q6,nge:F6,ngeq:U6,ngeqq:N6,ngeqslant:$6,nges:W6,nGg:z6,ngsim:V6,nGt:j6,ngt:K6,ngtr:G6,nGtv:X6,nharr
5:Y6,nhArr:J6,nhpar:Z6,ni:Q6,nis:e8,nisd:t8,niv:s8,NJcy:r8,njcy:i8,nlarr:n8,nlArr:o8,nldr:a8,nlE:l8,nle:c8,nleftarrow:u8,nLeftarrow:h8,nleftrightarrow:d8,nLeftrightarrow:f8,nleq:p8,nleqq:m8,nleqslant:_8,nles:g8,nless:v8,nLl:y8,nlsim:b8,nLt:w8,nlt:S8,nltri:x8,nltrie:C8,nLtv:k8,nmid:E8,NoBreak:T8,NonBreakingSpace:R8,nopf:L8,Nopf:D8,Not:A8,not:I8,NotCongruent:M8,NotCupCap:O8,NotDoubleVerticalBar:P8,NotElement:B8,NotEqual:H8,NotEqualTilde:q8,NotExists:F8,NotGreater:U8,NotGreaterEqual:N8,NotGreaterFullEqual:$8,NotGreaterGreater:W8,NotGreaterLess:z8,NotGreaterSlantEqual:V8,NotGreaterTilde:j8,NotHumpDownHump:K8,NotHumpEqual:G8,notin:X8,notindot:Y8,notinE:J8,notinva:Z8,notinvb:Q8,notinvc:e7,NotLeftTriangleBar:t7,NotLeftTriangle:s7,NotLeftTriangleEqual:r7,NotLess:i7,NotLessEqual:n7,NotLessGreater:o7,NotLessLess:a7,NotLessSlantEqual:l7,NotLessTilde:c7,NotNestedGreaterGreater:u7,NotNestedLessLess:h7,notni:d7,notniva:f7,notnivb:p7,notnivc:m7,NotPrecedes:_7,NotPrecedesEqual:g7,NotPrecedesSlantEqual:v7,NotReverseElement:y7,NotRightTriangleBar:b7,NotRightTriangle:w7,NotRightTriangleEqual:S7,NotSquareSubset:x7,NotSquareSubsetEqual:C7,NotSquareSuperset:k7,NotSquareSupersetEqual:E7,NotSubset:T7,NotSubsetEqual:R7,NotSucceeds:L7,NotSucceedsEqual:D7,NotSucceedsSlantEqual:A7,NotSucceedsTilde:I7,NotSuperset:M7,NotSupersetEqual:O7,NotTilde:P7,NotTildeEqual:B7,NotTildeFullEqual:H7,NotTildeTilde:q7,NotVerticalBar:F7,nparallel:U7,npar:N7,nparsl:$7,npart:W7,npolint:z7,npr:V7,nprcue:j7,nprec:K7,npreceq:G7,npre:X7,nrarrc:Y7,nrarr:J7,nrArr:Z7,nrarrw:Q7,nrightarrow:eH,nRightarrow:tH,nrtri:sH,nrtrie:rH,nsc:iH,nsccue:nH,nsce:oH,Nscr:aH,nscr:lH,nshortmid:cH,nshortparallel:uH,nsim:hH,nsime:dH,nsimeq:fH,nsmid:pH,nspar:mH,nsqsube:_H,nsqsupe:gH,nsub:vH,nsubE:yH,nsube:bH,nsubset:wH,nsubseteq:SH,nsubseteqq:xH,nsucc:CH,nsucceq:kH,nsup:EH,nsupE:TH,nsupe:RH,nsupset:LH,nsupseteq:DH,nsupseteqq:AH,ntgl:IH,Ntilde:MH,ntilde:OH,ntlg:PH,ntriangleleft:BH,ntrianglelefteq:HH,ntriangleright:qH,ntrianglerighteq:FH,Nu:UH,nu:NH,num:$H,numero:WH,numsp:zH,nvap:VH,nvdash:jH,nvDash:KH,nVdash:GH,nVDash:XH,nvge:YH,nvgt:JH,nvHarr:ZH,nvinfin:QH,nvlArr:eq,nvle:tq,nvlt:sq,nvltrie:rq,nvrArr:iq,nvrtrie:nq,nvsim:oq,nwarhk:aq,nwarr:lq,nwArr:cq,nwarrow:uq,nwnear:hq,Oacute:dq,oacute:fq,oast:pq,Ocirc:mq,ocirc:_q,ocir:gq,Ocy:vq,ocy:yq,odash:bq,Odblac:wq,odblac:Sq,odiv:xq,odot:Cq,odsold:kq,OElig:Eq,oelig:Tq,ofcir:Rq,Ofr:Lq,ofr:Dq,ogon:Aq,Ograve:Iq,ograve:Mq,ogt:Oq,ohbar:Pq,ohm:Bq,oint:Hq,olarr:qq,olcir:Fq,olcross:Uq,oline:Nq,olt:$q,Omacr:Wq,omacr:zq,Omega:Vq,omega:jq,Omicron:Kq,omicron:Gq,omid:Xq,ominus:Yq,Oopf:Jq,oopf:Zq,opar:Qq,OpenCurlyDoubleQuote:eF,OpenCurlyQuote:tF,operp:sF,oplus:rF,orarr:iF,Or:nF,or:oF,ord:aF,order:lF,orderof:cF,ordf:uF,ordm:hF,origof:dF,oror:fF,orslope:pF,orv:mF,oS:_F,Oscr:gF,oscr:vF,Oslash:yF,oslash:bF,osol:wF,Otilde:SF,otilde:xF,otimesas:CF,Otimes:kF,otimes:EF,Ouml:TF,ouml:RF,ovbar:LF,OverBar:DF,OverBrace:AF,OverBracket:IF,OverParenthesis:MF,para:OF,parallel:PF,par:BF,parsim:HF,parsl:qF,part:FF,PartialD:UF,Pcy:NF,pcy:$F,percnt:WF,period:zF,permil:VF,perp:jF,pertenk:KF,Pfr:GF,pfr:XF,Phi:YF,phi:JF,phiv:ZF,phmmat:QF,phone:e9,Pi:t9,pi:s9,pitchfork:r9,piv:i9,planck:n9,planckh:o9,plankv:a9,plusacir:l9,plusb:c9,pluscir:u9,plus:h9,plusdo:d9,plusdu:f9,pluse:p9,PlusMinus:m9,plusmn:_9,plussim:g9,plustwo:v9,pm:y9,Poincareplane:b9,pointint:w9,popf:S9,Popf:x9,pound:C9,prap:k9,Pr:E9,pr:T9,prcue:R9,precapprox:L9,prec:D9,preccurlyeq:A9,Precedes:I9,PrecedesEqual:M9,PrecedesSlantEqual:O9,PrecedesTilde:P9,preceq:B9,precnapprox:H9,precneqq:q9,precnsim:F9,pre:U9,prE:N9,precsim:$9,prime:W9,Prime:z9,primes:V9,prnap:j9,prnE:K9,prnsim:G9,prod:X9,Product:Y9,profalar:J9,profline:Z9,profsurf:Q9,prop:eU,Proportional:tU,Proportion:sU,propto:rU,prsim:iU,prurel:nU,Pscr:oU,pscr:aU,Psi:lU,psi:cU,puncsp:uU,Qfr:hU,qfr:dU,qint:fU,qopf:pU,Qopf:mU,qprime:_U,Qscr:gU,qscr:vU,quaternions:yU,quatint:bU,quest:wU,questeq:SU,quot:xU,QUOT:CU,rAarr:kU,race:EU,Racute:TU,racute:RU,radic:LU,raemptyv:DU,rang:AU,Rang:IU,rangd:MU,range:OU,rangle:PU,raquo:BU,rarrap:HU,rarrb:qU,rarrbfs:FU,rarrc:UU,rarr:NU,Rarr:$U,rArr:WU,rarrfs:zU,rarrhk:VU,rarrlp:jU,rarrpl:KU,rarrsim:GU,Rarrtl:XU,rarrtl:YU,rarrw:JU,ratail:ZU,rAtail:QU,ratio:eN,rationals:tN,rbarr:sN,rBarr:rN,RBarr:iN,rbbrk:nN,rbrace:oN,rbrack:aN,rbrke:lN,rbrksld:cN,rbrkslu:uN,Rcaron:hN,rcaron:dN,Rcedil:fN,rcedil:pN,rceil:mN,rcub:_N,Rcy:gN,rcy:vN,rdca:yN,rdld
5har:bN,rdquo:wN,rdquor:SN,rdsh:xN,real:CN,realine:kN,realpart:EN,reals:TN,Re:RN,rect:LN,reg:DN,REG:AN,ReverseElement:IN,ReverseEquilibrium:MN,ReverseUpEquilibrium:ON,rfisht:PN,rfloor:BN,rfr:HN,Rfr:qN,rHar:FN,rhard:UN,rharu:NN,rharul:$N,Rho:WN,rho:zN,rhov:VN,RightAngleBracket:jN,RightArrowBar:KN,rightarrow:GN,RightArrow:XN,Rightarrow:YN,RightArrowLeftArrow:JN,rightarrowtail:ZN,RightCeiling:QN,RightDoubleBracket:e$,RightDownTeeVector:t$,RightDownVectorBar:s$,RightDownVector:r$,RightFloor:i$,rightharpoondown:n$,rightharpoonup:o$,rightleftarrows:a$,rightleftharpoons:l$,rightrightarrows:c$,rightsquigarrow:u$,RightTeeArrow:h$,RightTee:d$,RightTeeVector:f$,rightthreetimes:p$,RightTriangleBar:m$,RightTriangle:_$,RightTriangleEqual:g$,RightUpDownVector:v$,RightUpTeeVector:y$,RightUpVectorBar:b$,RightUpVector:w$,RightVectorBar:S$,RightVector:x$,ring:C$,risingdotseq:k$,rlarr:E$,rlhar:T$,rlm:R$,rmoustache:L$,rmoust:D$,rnmid:A$,roang:I$,roarr:M$,robrk:O$,ropar:P$,ropf:B$,Ropf:H$,roplus:q$,rotimes:F$,RoundImplies:U$,rpar:N$,rpargt:$$,rppolint:W$,rrarr:z$,Rrightarrow:V$,rsaquo:j$,rscr:K$,Rscr:G$,rsh:X$,Rsh:Y$,rsqb:J$,rsquo:Z$,rsquor:Q$,rthree:eW,rtimes:tW,rtri:sW,rtrie:rW,rtrif:iW,rtriltri:nW,RuleDelayed:oW,ruluhar:aW,rx:lW,Sacute:cW,sacute:uW,sbquo:hW,scap:dW,Scaron:fW,scaron:pW,Sc:mW,sc:_W,sccue:gW,sce:vW,scE:yW,Scedil:bW,scedil:wW,Scirc:SW,scirc:xW,scnap:CW,scnE:kW,scnsim:EW,scpolint:TW,scsim:RW,Scy:LW,scy:DW,sdotb:AW,sdot:IW,sdote:MW,searhk:OW,searr:PW,seArr:BW,searrow:HW,sect:qW,semi:FW,seswar:UW,setminus:NW,setmn:$W,sext:WW,Sfr:zW,sfr:VW,sfrown:jW,sharp:KW,SHCHcy:GW,shchcy:XW,SHcy:YW,shcy:JW,ShortDownArrow:ZW,ShortLeftArrow:QW,shortmid:ez,shortparallel:tz,ShortRightArrow:sz,ShortUpArrow:rz,shy:iz,Sigma:nz,sigma:oz,sigmaf:az,sigmav:lz,sim:cz,simdot:uz,sime:hz,simeq:dz,simg:fz,simgE:pz,siml:mz,simlE:_z,simne:gz,simplus:vz,simrarr:yz,slarr:bz,SmallCircle:wz,smallsetminus:Sz,smashp:xz,smeparsl:Cz,smid:kz,smile:Ez,smt:Tz,smte:Rz,smtes:Lz,SOFTcy:Dz,softcy:Az,solbar:Iz,solb:Mz,sol:Oz,Sopf:Pz,sopf:Bz,spades:Hz,spadesuit:qz,spar:Fz,sqcap:Uz,sqcaps:Nz,sqcup:$z,sqcups:Wz,Sqrt:zz,sqsub:Vz,sqsube:jz,sqsubset:Kz,sqsubseteq:Gz,sqsup:Xz,sqsupe:Yz,sqsupset:Jz,sqsupseteq:Zz,square:Qz,Square:eV,SquareIntersection:tV,SquareSubset:sV,SquareSubsetEqual:rV,SquareSuperset:iV,SquareSupersetEqual:nV,SquareUnion:oV,squarf:aV,squ:lV,squf:cV,srarr:uV,Sscr:hV,sscr:dV,ssetmn:fV,ssmile:pV,sstarf:mV,Star:_V,star:gV,starf:vV,straightepsilon:yV,straightphi:bV,strns:wV,sub:SV,Sub:xV,subdot:CV,subE:kV,sube:EV,subedot:TV,submult:RV,subnE:LV,subne:DV,subplus:AV,subrarr:IV,subset:MV,Subset:OV,subseteq:PV,subseteqq:BV,SubsetEqual:HV,subsetneq:qV,subsetneqq:FV,subsim:UV,subsub:NV,subsup:$V,succapprox:WV,succ:zV,succcurlyeq:VV,Succeeds:jV,SucceedsEqual:KV,SucceedsSlantEqual:GV,SucceedsTilde:XV,succeq:YV,succnapprox:JV,succneqq:ZV,succnsim:QV,succsim:ej,SuchThat:tj,sum:sj,Sum:rj,sung:ij,sup1:nj,sup2:oj,sup3:aj,sup:lj,Sup:cj,supdot:uj,supdsub:hj,supE:dj,supe:fj,supedot:pj,Superset:mj,SupersetEqual:_j,suphsol:gj,suphsub:vj,suplarr:yj,supmult:bj,supnE:wj,supne:Sj,supplus:xj,supset:Cj,Supset:kj,supseteq:Ej,supseteqq:Tj,supsetneq:Rj,supsetneqq:Lj,supsim:Dj,supsub:Aj,supsup:Ij,swarhk:Mj,swarr:Oj,swArr:Pj,swarrow:Bj,swnwar:Hj,szlig:qj,Tab:Fj,target:Uj,Tau:Nj,tau:$j,tbrk:Wj,Tcaron:zj,tcaron:Vj,Tcedil:jj,tcedil:Kj,Tcy:Gj,tcy:Xj,tdot:Yj,telrec:Jj,Tfr:Zj,tfr:Qj,there4:eK,therefore:tK,Therefore:sK,Theta:rK,theta:iK,thetasym:nK,thetav:oK,thickapprox:aK,thicksim:lK,ThickSpace:cK,ThinSpace:uK,thinsp:hK,thkap:dK,thksim:fK,THORN:pK,thorn:mK,tilde:_K,Tilde:gK,TildeEqual:vK,TildeFullEqual:yK,TildeTilde:bK,timesbar:wK,timesb:SK,times:xK,timesd:CK,tint:kK,toea:EK,topbot:TK,topcir:RK,top:LK,Topf:DK,topf:AK,topfork:IK,tosa:MK,tprime:OK,trade:PK,TRADE:BK,triangle:HK,triangledown:qK,triangleleft:FK,trianglelefteq:UK,triangleq:NK,triangleright:$K,trianglerighteq:WK,tridot:zK,trie:VK,triminus:jK,TripleDot:KK,triplus:GK,trisb:XK,tritime:YK,trpezium:JK,Tscr:ZK,tscr:QK,TScy:eG,tscy:tG,TSHcy:sG,tshcy:rG,Tstrok:iG,tstrok:nG,twixt:oG,twoheadleftarrow:aG,twoheadrightarrow:lG,Uacute:cG,uacute:uG,uarr:hG,Uarr:dG,uArr:fG,Uarrocir:pG,Ubrcy:mG,ubrcy:_G,Ubreve:gG,ubreve:vG,Ucirc:yG,ucirc:bG,Ucy:wG,u
5cy:SG,udarr:xG,Udblac:CG,udblac:kG,udhar:EG,ufisht:TG,Ufr:RG,ufr:LG,Ugrave:DG,ugrave:AG,uHar:IG,uharl:MG,uharr:OG,uhblk:PG,ulcorn:BG,ulcorner:HG,ulcrop:qG,ultri:FG,Umacr:UG,umacr:NG,uml:$G,UnderBar:WG,UnderBrace:zG,UnderBracket:VG,UnderParenthesis:jG,Union:KG,UnionPlus:GG,Uogon:XG,uogon:YG,Uopf:JG,uopf:ZG,UpArrowBar:QG,uparrow:eX,UpArrow:tX,Uparrow:sX,UpArrowDownArrow:rX,updownarrow:iX,UpDownArrow:nX,Updownarrow:oX,UpEquilibrium:aX,upharpoonleft:lX,upharpoonright:cX,uplus:uX,UpperLeftArrow:hX,UpperRightArrow:dX,upsi:fX,Upsi:pX,upsih:mX,Upsilon:_X,upsilon:gX,UpTeeArrow:vX,UpTee:yX,upuparrows:bX,urcorn:wX,urcorner:SX,urcrop:xX,Uring:CX,uring:kX,urtri:EX,Uscr:TX,uscr:RX,utdot:LX,Utilde:DX,utilde:AX,utri:IX,utrif:MX,uuarr:OX,Uuml:PX,uuml:BX,uwangle:HX,vangrt:qX,varepsilon:FX,varkappa:UX,varnothing:NX,varphi:$X,varpi:WX,varpropto:zX,varr:VX,vArr:jX,varrho:KX,varsigma:GX,varsubsetneq:XX,varsubsetneqq:YX,varsupsetneq:JX,varsupsetneqq:ZX,vartheta:QX,vartriangleleft:eY,vartriangleright:tY,vBar:sY,Vbar:rY,vBarv:iY,Vcy:nY,vcy:oY,vdash:aY,vDash:lY,Vdash:cY,VDash:uY,Vdashl:hY,veebar:dY,vee:fY,Vee:pY,veeeq:mY,vellip:_Y,verbar:gY,Verbar:vY,vert:yY,Vert:bY,VerticalBar:wY,VerticalLine:SY,VerticalSeparator:xY,VerticalTilde:CY,VeryThinSpace:kY,Vfr:EY,vfr:TY,vltri:RY,vnsub:LY,vnsup:DY,Vopf:AY,vopf:IY,vprop:MY,vrtri:OY,Vscr:PY,vscr:BY,vsubnE:HY,vsubne:qY,vsupnE:FY,vsupne:UY,Vvdash:NY,vzigzag:$Y,Wcirc:WY,wcirc:zY,wedbar:VY,wedge:jY,Wedge:KY,wedgeq:GY,weierp:XY,Wfr:YY,wfr:JY,Wopf:ZY,wopf:QY,wp:eJ,wr:tJ,wreath:sJ,Wscr:rJ,wscr:iJ,xcap:nJ,xcirc:oJ,xcup:aJ,xdtri:lJ,Xfr:cJ,xfr:uJ,xharr:hJ,xhArr:dJ,Xi:fJ,xi:pJ,xlarr:mJ,xlArr:_J,xmap:gJ,xnis:vJ,xodot:yJ,Xopf:bJ,xopf:wJ,xoplus:SJ,xotime:xJ,xrarr:CJ,xrArr:kJ,Xscr:EJ,xscr:TJ,xsqcup:RJ,xuplus:LJ,xutri:DJ,xvee:AJ,xwedge:IJ,Yacute:MJ,yacute:OJ,YAcy:PJ,yacy:BJ,Ycirc:HJ,ycirc:qJ,Ycy:FJ,ycy:UJ,yen:NJ,Yfr:$J,yfr:WJ,YIcy:zJ,yicy:VJ,Yopf:jJ,yopf:KJ,Yscr:GJ,yscr:XJ,YUcy:YJ,yucy:JJ,yuml:ZJ,Yuml:QJ,Zacute:eZ,zacute:tZ,Zcaron:sZ,zcaron:rZ,Zcy:iZ,zcy:nZ,Zdot:oZ,zdot:aZ,zeetrf:lZ,ZeroWidthSpace:cZ,Zeta:uZ,zeta:hZ,zfr:dZ,Zfr:fZ,ZHcy:pZ,zhcy:mZ,zigrarr:_Z,zopf:gZ,Zopf:vZ,Zscr:yZ,zscr:bZ,zwj:wZ,zwnj:SZ};const xZ="\xC1",CZ="\xE1",kZ="\xC2",EZ="\xE2",TZ="\xB4",RZ="\xC6",LZ="\xE6",DZ="\xC0",AZ="\xE0",IZ="&",MZ="&",OZ="\xC5",PZ="\xE5",BZ="\xC3",HZ="\xE3",qZ="\xC4",FZ="\xE4",UZ="\xA6",NZ="\xC7",$Z="\xE7",WZ="\xB8",zZ="\xA2",VZ="\xA9",jZ="\xA9",KZ="\xA4",GZ="\xB0",XZ="\xF7",YZ="\xC9",JZ="\xE9",ZZ="\xCA",QZ="\xEA",eQ="\xC8",tQ="\xE8",sQ="\xD0",rQ="\xF0",iQ="\xCB",nQ="\xEB",oQ="\xBD",aQ="\xBC",lQ="\xBE",cQ=">",uQ=">",hQ="\xCD",dQ="\xED",fQ="\xCE",pQ="\xEE",mQ="\xA1",_Q="\xCC",gQ="\xEC",vQ="\xBF",yQ="\xCF",bQ="\xEF",wQ="\xAB",SQ="<",xQ="<",CQ="\xAF",kQ="\xB5",EQ="\xB7",TQ="\xA0",RQ="\xAC",LQ="\xD1",DQ="\xF1",AQ="\xD3",IQ="\xF3",MQ="\xD4",OQ="\xF4",PQ="\xD2",BQ="\xF2",HQ="\xAA",qQ="\xBA",FQ="\xD8",UQ="\xF8",NQ="\xD5",$Q="\xF5",WQ="\xD6",zQ="\xF6",VQ="\xB6",jQ="\xB1",KQ="\xA3",GQ='"',XQ='"',YQ="\xBB",JQ="\xAE",ZQ="\xAE",QQ="\xA7",eee="\xAD",tee="\xB9",see="\xB2",ree="\xB3",iee="\xDF",nee="\xDE",oee="\xFE",aee="\xD7",lee="\xDA",cee="\xFA",uee="\xDB",hee="\xFB",dee="\xD9",fee="\xF9",pee="\xA8",mee="\xDC",_ee="\xFC",gee="\xDD",vee="\xFD",yee="\xA5",bee="\xFF";var wee={Aacute:xZ,aacute:CZ,Acirc:kZ,acirc:EZ,acute:TZ,AElig:RZ,aelig:LZ,Agrave:DZ,agrave:AZ,amp:IZ,AMP:MZ,Aring:OZ,aring:PZ,Atilde:BZ,atilde:HZ,Auml:qZ,auml:FZ,brvbar:UZ,Ccedil:NZ,ccedil:$Z,cedil:WZ,cent:zZ,copy:VZ,COPY:jZ,curren:KZ,deg:GZ,divide:XZ,Eacute:YZ,eacute:JZ,Ecirc:ZZ,ecirc:QZ,Egrave:eQ,egrave:tQ,ETH:sQ,eth:rQ,Euml:iQ,euml:nQ,frac12:oQ,frac14:aQ,frac34:lQ,gt:cQ,GT:uQ,Iacute:hQ,iacute:dQ,Icirc:fQ,icirc:pQ,iexcl:mQ,Igrave:_Q,igrave:gQ,iquest:vQ,Iuml:yQ,iuml:bQ,laquo:wQ,lt:SQ,LT:xQ,macr:CQ,micro:kQ,middot:EQ,nbsp:TQ,not:RQ,Ntilde:LQ,ntilde:DQ,Oacute:AQ,oacute:IQ,Ocirc:MQ,ocirc:OQ,Ograve:PQ,ograve:BQ,ordf:HQ,ordm:qQ,Oslash:FQ,oslash:UQ,Otilde:NQ,otilde:$Q,Ouml:WQ,ouml:zQ,para:VQ,plusmn:jQ,pound:KQ,quot:GQ,QUOT:XQ,raquo:YQ,reg:JQ,REG:ZQ,sect:QQ,shy:eee,sup1:tee,sup2:see,sup3:ree,szlig:iee,THORN:nee,thorn:oee,times:aee,Uacute:lee,uacute:cee,Ucirc:uee,ucirc:hee,Ugrave:dee,ugrave:fee,uml:pee,Uuml:mee,uuml:_ee,Yacute:gee,yacute:vee,yen:yee,yuml:bee};const See="&",xee="'",Cee=">
5",kee="<",Eee='"';var Ah={amp:See,apos:xee,gt:Cee,lt:kee,quot:Eee},Sa={},Tee={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},Ree=ts&&ts.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Sa,"__esModule",{value:!0});var gu=Ree(Tee),Lee=String.fromCodePoint||function(s){var t="";return s>65535&&(s-=65536,t+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),t+=String.fromCharCode(s),t};function Dee(s){return s>=55296&&s<=57343||s>1114111?"\uFFFD":(s in gu.default&&(s=gu.default[s]),Lee(s))}Sa.default=Dee;var gn=ts&&ts.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Cs,"__esModule",{value:!0});Cs.decodeHTML=Cs.decodeHTMLStrict=Cs.decodeXML=void 0;var Go=gn(Dh),Aee=gn(wee),Iee=gn(Ah),vu=gn(Sa),Mee=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;Cs.decodeXML=Ih(Iee.default);Cs.decodeHTMLStrict=Ih(Go.default);function Ih(s){var t=Mh(s);return function(r){return String(r).replace(Mee,t)}}var yu=function(s,t){return s<t?1:-1};Cs.decodeHTML=function(){for(var s=Object.keys(Aee.default).sort(yu),t=Object.keys(Go.default).sort(yu),r=0,p=0;r<t.length;r++)s[p]===t[r]?(t[r]+=";?",p++):t[r]+=";";var a=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),g=Mh(Go.default);function v(n){return n.substr(-1)!==";"&&(n+=";"),g(n)}return function(n){return String(n).replace(a,v)}}();function Mh(s){return function(r){if(r.charAt(1)==="#"){var p=r.charAt(2);return p==="X"||p==="x"?vu.default(parseInt(r.substr(3),16)):vu.default(parseInt(r.substr(2),10))}return s[r.slice(1,-1)]||r}}var Ut={},Oh=ts&&ts.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.escapeUTF8=Ut.escape=Ut.encodeNonAsciiHTML=Ut.encodeHTML=Ut.encodeXML=void 0;var Oee=Oh(Ah),Ph=Hh(Oee.default),Bh=qh(Ph);Ut.encodeXML=Nh(Ph);var Pee=Oh(Dh),xa=Hh(Pee.default),Bee=qh(xa);Ut.encodeHTML=qee(xa,Bee);Ut.encodeNonAsciiHTML=Nh(xa);function Hh(s){return Object.keys(s).sort().reduce(function(t,r){return t[s[r]]="&"+r+";",t},{})}function qh(s){for(var t=[],r=[],p=0,a=Object.keys(s);p<a.length;p++){var g=a[p];g.length===1?t.push("\\"+g):r.push(g)}t.sort();for(var v=0;v<t.length-1;v++){for(var n=v;n<t.length-1&&t[n].charCodeAt(1)+1===t[n+1].charCodeAt(1);)n+=1;var c=1+n-v;c<3||t.splice(v,c,t[v]+"-"+t[n])}return r.unshift("["+t.join("")+"]"),new RegExp(r.join("|"),"g")}var Fh=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,Hee=String.prototype.codePointAt!=null?function(s){return s.codePointAt(0)}:function(s){return(s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536};function vn(s){return"&#x"+(s.length>1?Hee(s):s.charCodeAt(0)).toString(16).toUpperCase()+";"}function qee(s,t){return function(r){return r.replace(t,function(p){return s[p]}).replace(Fh,vn)}}var Uh=new RegExp(Bh.source+"|"+Fh.source,"g");function Fee(s){return s.replace(Uh,vn)}Ut.escape=Fee;function Uee(s){return s.replace(Bh,vn)}Ut.escapeUTF8=Uee;function Nh(s){return function(t){return t.replace(Uh,function(r){return s[r]||vn(r)})}}(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.decodeXMLStrict=s.decodeHTML5Strict=s.decodeHTML4Strict=s.decodeHTML5=s.decodeHTML4=s.decodeHTMLStrict=s.decodeHTML=s.decodeXML=s.encodeHTML5=s.encodeHTML4=s.escapeUTF8=s.escape=s.encodeNonAsciiHTML=s.encodeHTML=s.encodeXML=s.encode=s.decodeStrict=s.decode=void 0;var t=Cs,r=Ut;function p(c,u){return(!u||u<=0?t.decodeXML:t.decodeHTML)(c)}s.decode=p;function a(c,u){return(!u||u<=0?t.decodeXML:t.decodeHTMLStrict)(c)}s.decodeStrict=a;function g(c,u){return(!u||u<=0?r.encodeXML:r.encodeHTML)(c)}s.encode=g;var v=Ut;Object.defineProperty(s,"encodeXML",{enumerable:!0,get:function(){return v.encodeXML}
5}),Object.defineProperty(s,"encodeHTML",{enumerable:!0,get:function(){return v.encodeHTML}}),Object.defineProperty(s,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return v.encodeNonAsciiHTML}}),Object.defineProperty(s,"escape",{enumerable:!0,get:function(){return v.escape}}),Object.defineProperty(s,"escapeUTF8",{enumerable:!0,get:function(){return v.escapeUTF8}}),Object.defineProperty(s,"encodeHTML4",{enumerable:!0,get:function(){return v.encodeHTML}}),Object.defineProperty(s,"encodeHTML5",{enumerable:!0,get:function(){return v.encodeHTML}});var n=Cs;Object.defineProperty(s,"decodeXML",{enumerable:!0,get:function(){return n.decodeXML}}),Object.defineProperty(s,"decodeHTML",{enumerable:!0,get:function(){return n.decodeHTML}}),Object.defineProperty(s,"decodeHTMLStrict",{enumerable:!0,get:function(){return n.decodeHTMLStrict}}),Object.defineProperty(s,"decodeHTML4",{enumerable:!0,get:function(){return n.decodeHTML}}),Object.defineProperty(s,"decodeHTML5",{enumerable:!0,get:function(){return n.decodeHTML}}),Object.defineProperty(s,"decodeHTML4Strict",{enumerable:!0,get:function(){return n.decodeHTMLStrict}}),Object.defineProperty(s,"decodeHTML5Strict",{enumerable:!0,get:function(){return n.decodeHTMLStrict}}),Object.defineProperty(s,"decodeXMLStrict",{enumerable:!0,get:function(){return n.decodeXML}})})(Lh);function Nee(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}function bu(s,t){for(var r=0;r<t.length;r++){var p=t[r];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}function $ee(s,t,r){return t&&bu(s.prototype,t),r&&bu(s,r),s}function $h(s,t){var r=typeof Symbol!="undefined"&&s[Symbol.iterator]||s["@@iterator"];if(!r){if(Array.isArray(s)||(r=Wee(s))||t&&s&&typeof s.length=="number"){r&&(s=r);var p=0,a=function(){};return{s:a,n:function(){return p>=s.length?{done:!0}:{done:!1,value:s[p++]}},e:function(u){throw u},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 6In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var g=!0,v=!1,n;return{s:function(){r=r.call(s)},n:function(){var u=r.next();return g=u.done,u},e:function(u){v=!0,n=u},f:function(){try{!g&&r.return!=null&&r.return()}finally{if(v)throw n}}}}function Wee(s,t){if(!!s){if(typeof s=="string")return wu(s,t);var r=Object.prototype.toString.call(s).slice(8,-1);if(r==="Object"&&s.constructor&&(r=s.constructor.name),r==="Map"||r==="Set")return Array.from(s);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wu(s,t)}}function wu(s,t){(t==null||t>s.length)&&(t=s.length);for(var r=0,p=new Array(t);r<t;r++)p[r]=s[r];return p}var zee=Lh,Su={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:Vee()};function Vee(){var s={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return nn(0,5).forEach(function(t){nn(0,5).forEach(function(r){nn(0,5).forEach(function(p){return jee(t,r,p,s)})})}),nn(0,23).forEach(function(t){var r=t+232,p=Wh(t*10+8);s[r]="#"+p+p+p}),s}function jee(s,t,r,p){var a=16+s*36+t*6+r,g=s>0?s*40+55:0,v=t>0?t*40+55:0,n=r>0?r*40+55:0;p[a]=Kee([g,v,n])}function Wh(s){for(var t=s.toString(16);t.length<2;)t="0"+t;return t}function Kee(s){var t=[],r=$h(s),p;try{for(r.s();!(p=r.n()).done;){var a=p.value;t.push(Wh(a))}}catch(g){r.e(g)}finally{r.f()}return"#"+t.join("")}function xu(s,t,r,p){var a;return t==="text"?a=Jee(r,p):t==="display"?a=Xee(s,r,p):t==="xterm256Foreground"?a=cn(s,p.colors[r]):t==="xterm256Background"?a=un(s,p.colors[r]):t==="rgb"&&(a=Gee(s,r)),a}function Gee(s,t){t=t.substring(2).slice(0,-1);var r=+t.substr(0,2),p=t.substring(5).split(";"),a=p.map(function(g){return("0"+Number(g).toString(16)).substr(-2)}).join("");return ln(s,(r===38?"color:#":"background-color:#")+a)}function Xee(s,t,r){t=parseInt(t,10);var p={"-1":function(){return"<br/>"},0:function(){return s.length&&zh(s)},1:function(){return Us(s,"b")},3:function(){return Us(s,"i")},4:function(){return Us(s,"u")},8:function(){return ln(s,"display:none")},9:function(){return Us(s,"strike")},22:function(){return ln(s,"font-weight:normal;text-decoration:none;font-style:normal")},23:function(){return ku(s,"i")},24:function(){return ku(s,"u")},39:function(){return cn(s,r.fg)},49:function(){return un(s,r.bg)},53:function(){return ln(s,"text-decoration:overline")}},a;return p[t]?a=p[t]():4<t&&t<7?a=Us(s,"blink"):29<t&&t<38?a=cn(s,r.colors[t-30]):39<t&&t<48?a=un(s,r.colors[t-40]):89<t&&t<98?a=cn(s,r.colors[8+(t-90)]):99<t&&t<108&&(a=un(s,r.colors[8+(t-100)])),a}function zh(s){var t=s.slice(0);return s.length=0,t.reverse().map(function(r){return"</"+r+">"}).join("")}function nn(s,t){for(var r=[],p=s;p<=t;p++)r.push(p);return r}function Yee(s){return function(t){return(s===null||t.category!==s)&&s!=="all"}}function Cu(s){s=parseInt(s,10);var t=null;return s===0?t="all":s===1?t="bold":2<s&&s<5?t="underline":4<s&&s<7?t="blink":s===8?t="hide":s===9?t="strike":29<s&&s<38||s===39||89<s&&s<98?t="foreground-color":(39<s&&s<48||s===49||99<s&&s<108)&&(t="background-color"),t}function Jee(s,t){return t.escapeXML?zee.encodeXML(s):s}function Us(s,t,r){return r||(r=""),s.push(t),"<".concat(t).concat(r?' style="'.concat(r,'"'):"",">")}function ln(s,t){return Us(s,"span",t)}function cn(s,t){return Us(s,"span","color:"+t)}function un(s,t){return Us(s,"span","background-color:"+t)}function ku(s,t){var r;if(s.slice(-1)[0]===t&&(r=s.pop()),r)return"</"+t+">"}function Zee(s,t,r){var p=!1,a=3;function g(){return""}
6function v(E,L){return r("xterm256Foreground",L),""}function n(E,L){return r("xterm256Background",L),""}function c(E){return t.newline?r("display",-1):r("text",E),""}function u(E,L){p=!0,L.trim().length===0&&(L="0"),L=L.trimRight(";").split(";");var D=$h(L),C;try{for(D.s();!(C=D.n()).done;){var I=C.value;r("display",I)}}catch(B){D.e(B)}finally{D.f()}return""}function w(E){return r("text",E),""}function f(E){return r("rgb",E),""}var y=[{pattern:/^\x08+/,sub:g},{pattern:/^\x1b\[[012]?K/,sub:g},{pattern:/^\x1b\[\(B/,sub:g},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:f},{pattern:/^\x1b\[38;5;(\d+)m/,sub:v},{pattern:/^\x1b\[48;5;(\d+)m/,sub:n},{pattern:/^\n/,sub:c},{pattern:/^\r+\n/,sub:c},{pattern:/^\r/,sub:c},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:u},{pattern:/^\x1b\[\d?J/,sub:g},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:g},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:g},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:w}];function x(E,L){L>a&&p||(p=!1,s=s.replace(E.pattern,E.sub))}var T=[],b=s,d=b.length;e:for(;d>0;){for(var m=0,o=0,l=y.length;o<l;m=++o){var S=y[m];if(x(S,m),s.length!==d){d=s.length;continue e}}if(s.length===d)break;T.push(0),d=s.length}return T}function Qee(s,t,r){return t!=="text"&&(s=s.filter(Yee(Cu(r))),s.push({token:t,data:r,category:Cu(r)})),s}var ete=function(){function s(t){Nee(this,s),t=t||{},t.colors&&(t.colors=Object.assign({},Su.colors,t.colors)),this.options=Object.assign({},Su,t),this.stack=[],this.stickyStack=[]}return $ee(s,[{key:"toHtml",value:function(r){var p=this;r=typeof r=="string"?[r]:r;var a=this.stack,g=this.options,v=[];return this.stickyStack.forEach(function(n){var c=xu(a,n.token,n.data,g);c&&v.push(c)}),Zee(r.join(""),g,function(n,c){var u=xu(a,n,c,g);u&&v.push(u),g.stream&&(p.stickyStack=Qee(p.stickyStack,n,c))}),a.length&&v.push(zh(a)),v.join("")}}]),s}(),tte=ete;const ste={components:{Listbox:Ch,ListboxButton:kh,ListboxOption:Th,ListboxOptions:Eh,CheckIcon:nh,ChevronDownIcon:ia},props:{items:Array},emits:["selected"],data(){return{selected:null}},watch:{selected(s){this.$emit("selected",s)}},mounted(){this.selected||([this.selected]=this.items)},methods:{}},rte={class:"relative"},ite={class:"block truncate"},nte={class:"cursor-pointer absolute inset-y-0 right-0 flex items-center pr-1.5"};function ote(s,t,r,p,a,g){const v=re("ChevronDownIcon"),n=re("ListboxButton"),c=re("CheckIcon"),u=re("ListboxOption"),w=re("ListboxOptions"),f=re("Listbox");return F(),Ne(f,{as:"div",modelValue:a.selected,"onUpdate:modelValue":t[0]||(t[0]=y=>a.selected=y)},{default:ye(()=>[R("div",rte,[ee(n,{class:"relative w-full cursor-pointer rounded text-xs px-2 py-1",style:{background:"#1a1a1a",border:"1px solid #2a2a2a",color:"#ddd","text-align":"left"}},{default:ye(()=>{var y,x;return[R("span",ite,Z((x=(y=a.selected)==null?void 0:y.log)==null?void 0:x.name),1),R("span",nte,[ee(v,{class:"h-4 w-4 text-gray-400","aria-hidden":"true"})])]}),_:1}),ee(Dr,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:ye(()=>[ee(w,{class:"absolute z-30 mt-1 max-h-60 w-full overflow-auto rounded shadow-lg py-1 text-xs",style:{background:"#1a1a1a",border:"1px solid #2a2a2a"}},{default:ye(()=>[(F(!0),N(Me,null,je(r.items,(y,x)=>(F(),Ne(u,{as:"template",key:x,value:y},{default:ye(({active:T,selected:b})=>[R("li",{class:xe(["relative select-none py-1.5 pl-6 pr-3 cursor-pointer"]),style:qe({background:T?"#4caf50":"transparent",color:T?"#fff":"#ddd","text-direction":"rtl"})},[R("span",{class:xe([b?"":"font-normal","block truncate"])},Z(y.log.name),3),b?(F(),N("span",{key:0,class:"absolute inset-y-0 left-0 flex items-center pl-1",style:qe({color:T?"#fff":"#4caf50"})},[ee(c,{class:"h-4 w-4","aria-hidden":"true"})],4)):Q("",!0)],4)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue"])}var ate=st(ste,[["render",ote]]);const lte={components:{Combobox:S1,ComboboxInput:C1,ComboboxOptions:k1,ComboboxOption:E1,ComboboxButton:x1,CheckIcon:nh,ChevronUpDownIcon:ay},props:{items:Object},emits:["selected"],data(){return{selectedOption:null,query:"",isFocused:!1}},computed:{filteredFiles(){return this.query===""?this.itemsAsArray:this.itemsAsArray.filter(s=>s.key.toLowerCase().includes(this.query.toLowerCase()))},itemsAsArray(){return Object.keys(this.items).map(s=>({logs:this.items[s],key:s}))}},watch:{items(){this.selectedOption=this.itemsAsArray[0].key},selectedOption(s){const t=this.items[s];this.$emit("selected",t)}},mounted(){this.selectedOption||(this.selectedOption=this.itemsAsArray[0].key)},methods:{}},cte={class:"relative"},ute={style:{direction:"rtl"},class:xe(["block truncate"])};function hte(s,t,r,p,a,g){const v=re("ComboboxInput"),n=re("ChevronUpDownIcon"),c=re("ComboboxButton"),u=re("CheckIcon"),w=re("ComboboxOption"),f=re("C
6omboboxOptions"),y=re("Combobox");return F(),Ne(y,{modelValue:a.selectedOption,"onUpdate:modelValue":[t[4]||(t[4]=x=>a.selectedOption=x),t[5]||(t[5]=x=>a.query="")]},{default:ye(()=>[R("div",cte,[ee(v,{style:qe([{direction:a.isFocused?"ltr":"rtl"},{background:"#1a1a1a",border:"1px solid #2a2a2a",color:"#ddd"}]),class:"w-full rounded text-xs px-2 py-1",onChange:t[0]||(t[0]=x=>a.query=x.target.value),onBlur:t[1]||(t[1]=x=>a.isFocused=!1),onFocus:t[2]||(t[2]=x=>{a.isFocused=!0,x.target.select()}),"display-value":x=>x},null,8,["style","display-value"]),ee(c,{class:"absolute inset-y-0 right-0 flex items-center rounded-r px-1.5 focus:outline-none",onMousedown:t[3]||(t[3]=x=>a.query=""),style:{color:"#888"}},{default:ye(()=>[ee(n,{class:"h-3.5 w-3.5","aria-hidden":"true"})]),_:1}),g.filteredFiles.length?(F(),Ne(f,{key:0,class:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded shadow-lg py-1 text-xs",style:{background:"#1a1a1a",border:"1px solid #2a2a2a"}},{default:ye(()=>[(F(!0),N(Me,null,je(g.filteredFiles,x=>(F(),Ne(w,{key:x.key,value:x.key,as:"template"},{default:ye(({active:T,selected:b})=>[R("li",{class:xe(["relative cursor-pointer select-none py-1.5 pl-6 pr-3 block truncate"]),style:qe({background:T?"#4caf50":"transparent",color:T?"#fff":"#ddd"})},[R("span",ute,Z(x.key),1),b?(F(),N("span",{key:0,class:"absolute inset-y-0 left-0 flex items-center pl-1",style:qe({color:T?"#fff":"#4caf50"})},[ee(u,{class:"h-4 w-4","aria-hidden":"true"})],4)):Q("",!0)],4)]),_:2},1032,["value"]))),128))]),_:1})):Q("",!0)])]),_:1},8,["modelValue"])}var dte=st(lte,[["render",hte]]),Vh={exports:{}};(function(s,t){(function(r,p){s.exports=p()})(globalThis,()=>(()=>{var r={4567:function(v,n,c){var u=this&&this.__decorate||function(o,l,S,E){var L,D=arguments.length,C=D<3?l:E===null?E=Object.getOwnPropertyDescriptor(l,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(o,l,S,E);else for(var I=o.length-1;I>=0;I--)(L=o[I])&&(C=(D<3?L(C):D>3?L(l,S,C):L(l,S))||C);return D>3&&C&&Object.defineProperty(l,S,C),C},w=this&&this.__param||function(o,l){return function(S,E){l(S,E,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const f=c(9042),y=c(9924),x=c(844),T=c(4725),b=c(2585),d=c(3656);let m=n.AccessibilityManager=class extends x.Disposable{constructor(o,l,S,E){super(),this._terminal=o,this._coreBrowserService=S,this._renderService=E,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let L=0;L<this._terminal.rows;L++)this._rowElements[L]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[L]);if(this._topBoundaryFocusListener=L=>this._handleBoundaryFocus(L,0),this._bottomBoundaryFocusListener=L=>this._handleBoundaryFocus(L,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new y.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(L=>this._handleResize(L.rows))),this.register(this._terminal.onRender(L=>this._refreshRows(L.start,L.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(L=>this._handleChar(L))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` 7`))),this.register(this._terminal.onA11yTab(L=>this._handleTab(L))),this.register(this._terminal.onKey(L=>this._handleKey(L.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,d.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,x.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(o){for(let l=0;l<o;l++)this._handleChar(" ")}_handleChar(o){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==o&&(this._charsToAnnounce+=o):this._charsToAnnounce+=o,o===` 8`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(o){this._clearLiveRegion(),/\p{Control}/u.test(o)||this._charsToConsume.push(o)}_refreshRows(o,l){this._liveRegionDebouncer.refresh(o,l,this._terminal.rows)}_renderRows(o,l){const S=this._terminal.buffer,E=S.lines.length.toString();for(let L=o;L<=l;L++){const D=S.lines.get(S.ydisp+L),C=[],I=(D==null?void 0:D.translateToString(!0,void 0,void 0,C))||"",B=(S.ydisp+L+1).toString(),U=this._rowElements[L];U&&(I.length===0?(U.innerText="\xA0",this._rowColumns.set(U,[0,1])):(U.textContent=I,this._rowColumns.set(U,C)),U.setAttribute("aria-posinset",B),U.setAttribute("aria-setsize",E))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce
8="")}_handleBoundaryFocus(o,l){const S=o.target,E=this._rowElements[l===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==E)return;let L,D;if(l===0?(L=S,D=this._rowElements.pop(),this._rowContainer.removeChild(D)):(L=this._rowElements.shift(),D=S,this._rowContainer.removeChild(L)),L.removeEventListener("focus",this._topBoundaryFocusListener),D.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const C=this._createAccessibilityTreeNode();this._rowElements.unshift(C),this._rowContainer.insertAdjacentElement("afterbegin",C)}else{const C=this._createAccessibilityTreeNode();this._rowElements.push(C),this._rowContainer.appendChild(C)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var I,B;if(this._rowElements.length===0)return;const o=document.getSelection();if(!o)return;if(o.isCollapsed)return void(this._rowContainer.contains(o.anchorNode)&&this._terminal.clearSelection());if(!o.anchorNode||!o.focusNode)return void console.error("anchorNode and/or focusNode are null");let l={node:o.anchorNode,offset:o.anchorOffset},S={node:o.focusNode,offset:o.focusOffset};if((l.node.compareDocumentPosition(S.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===S.node&&l.offset>S.offset)&&([l,S]=[S,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const E=this._rowElements.slice(-1)[0];if(S.node.compareDocumentPosition(E)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(S={node:E,offset:(B=(I=E.textContent)==null?void 0:I.length)!=null?B:0}),!this._rowContainer.contains(S.node))return;const L=({node:U,offset:z})=>{const q=U instanceof Text?U.parentNode:U;let J=parseInt(q==null?void 0:q.getAttribute("aria-posinset"),10)-1;if(isNaN(J))return console.warn("row is invalid. Race condition?"),null;const se=this._rowColumns.get(q);if(!se)return console.warn("columns is null. Race condition?"),null;let ce=z<se.length?se[z]:se.slice(-1)[0]+1;return ce>=this._terminal.cols&&(++J,ce=0),{row:J,column:ce}},D=L(l),C=L(S);if(D&&C){if(D.row>C.row||D.row===C.row&&D.column>=C.column)throw new Error("invalid range");this._terminal.select(D.column,D.row,(C.row-D.row)*this._terminal.cols-D.column+C.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);for(;this._rowElements.length>o;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const o=this._coreBrowserService.mainDocument.createElement("div");return o.setAttribute("role","listitem"),o.tabIndex=-1,this._refreshRowDimensions(o),o}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let o=0;o<this._terminal.rows;o++)this._refreshRowDimensions(this._rowElements[o])}}_refreshRowDimensions(o){o.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=m=u([w(1,b.IInstantiationService),w(2,T.ICoreBrowserService),w(3,T.IRenderService)],m)},3614:(v,n)=>{function c(y){return y.replace(/\r?\n/g,"\r")}function u(y,x){return x?"\x1B[200~"+y+"\x1B[201~":y}function w(y,x,T,b){y=u(y=c(y),T.decPrivateModes.bracketedPasteMode&&b.rawOptions.ignoreBracketedPasteMode!==!0),T.triggerDataEvent(y,!0),x.value=""}function f(y,x,T){const b=T.getBoundingClientRect(),d=y.clientX-b.left-10,m=y.clientY-b.top-10;x.style.width="20px",x.style.height="20px",x.style.left=`${d}px`,x.style.top=`${m}px`,x.style.zIndex="1000",x.focus()}Object.defineProperty(n,"__esModule",{value:!0}),n.rightClickHandler=n.moveTextAreaUnderMouseCursor=n.paste=n.handlePasteEvent=n.copyHandler=n.bracketTextForPaste=n.prepareTextForTerminal=void 0,n.prepareTextForTerminal=c,n.bracketTextForPaste=u,n.copyHandler=function(y,x){y.clipboardData&&y.clipboardData.setData("text/plain",x.selectionText),y.preventDefault()},n.handlePasteEvent=function(y,x,T,b){y.stopPropagation(),y.clipboardData&&w(y.clipboardData.getData("text/plain"),x,T,b)},n.paste=w,n.moveTextAreaUnderMouseCursor=f,n.rightClickHandler=function(y,x,T,b,d){f(y,x,T),d&&b.rightClickSelect(y),x.value=b.selectionText,x.select()}},7239:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const u=c(1505);n.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(w,f,y){this._css.set(w,f,y)}getCss(w,f){return this._css.get(w,f)}setColor(w,f,y){this._color.set(w,f,y)}getColor(w,f){return this._color.get(w,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(c,u,w,f){c.addEventListener(u,w,f);let y=!1;return{dispose:()=>{y||(y=!0,c.removeEventListener(u,w,f))}}}},3551:function(v,n,c){var u=this&&this.__decorate||function(m,o,l,S){var E,L=arguments.length,D=L<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;
8if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(m,o,l,S);else for(var C=m.length-1;C>=0;C--)(E=m[C])&&(D=(L<3?E(D):L>3?E(o,l,D):E(o,l))||D);return L>3&&D&&Object.defineProperty(o,l,D),D},w=this&&this.__param||function(m,o){return function(l,S){o(l,S,m)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const f=c(3656),y=c(8460),x=c(844),T=c(2585),b=c(4725);let d=n.Linkifier=class extends x.Disposable{get currentLink(){return this._currentLink}constructor(m,o,l,S,E){super(),this._element=m,this._mouseService=o,this._renderService=l,this._bufferService=S,this._linkProviderService=E,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new y.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new y.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,x.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,x.toDisposable)(()=>{var L;this._lastMouseEvent=void 0,(L=this._activeProviderReplies)==null||L.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(m){this._lastMouseEvent=m;const o=this._positionFromMouseEvent(m,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const l=m.composedPath();for(let S=0;S<l.length;S++){const E=l[S];if(E.classList.contains("xterm"))break;if(E.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(m){if(this._activeLine!==m.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(m,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,m)||(this._clearCurrentLink(),this._askForLink(m,!0))}_askForLink(m,o){var S,E;this._activeProviderReplies&&o||((S=this._activeProviderReplies)==null||S.forEach(L=>{L==null||L.forEach(D=>{D.link.dispose&&D.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=m.y);let l=!1;for(const[L,D]of this._linkProviderService.linkProviders.entries())o?(E=this._activeProviderReplies)!=null&&E.get(L)&&(l=this._checkLinkProviderResult(L,m,l)):D.provideLinks(m.y,C=>{var B,U;if(this._isMouseOut)return;const I=C==null?void 0:C.map(z=>({link:z}));(B=this._activeProviderReplies)==null||B.set(L,I),l=this._checkLinkProviderResult(L,m,l),((U=this._activeProviderReplies)==null?void 0:U.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(m.y,this._activeProviderReplies)})}_removeIntersectingLinks(m,o){const l=new Set;for(let S=0;S<o.size;S++){const E=o.get(S);if(E)for(let L=0;L<E.length;L++){const D=E[L],C=D.link.range.start.y<m?0:D.link.range.start.x,I=D.link.range.end.y>m?this._bufferService.cols:D.link.range.end.x;for(let B=C;B<=I;B++){if(l.has(B)){E.splice(L--,1);break}l.add(B)}}}}_checkLinkProviderResult(m,o,l){var L;if(!this._activeProviderReplies)return l;const S=this._activeProviderReplies.get(m);let E=!1;for(let D=0;D<m;D++)this._activeProviderReplies.has(D)&&!this._activeProviderReplies.get(D)||(E=!0);if(!E&&S){const D=S.find(C=>this._linkAtPosition(C.link,o));D&&(l=!0,this._handleNewLink(D))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let D=0;D<this._activeProviderReplies.size;D++){const C=(L=this._activeProviderReplies.get(D))==null?void 0:L.find(I=>this._linkAtPosition(I.link,o));if(C){l=!0,this._handleNewLink(C);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(m){if(!this._currentLink)return;const o=this._positionFromMouseEvent(m,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(m,this._currentLink.link.text)}_clearCurrentLink(m,o){this._currentLink&&this._lastMouseEvent&&(!m||!o||this._currentLink.link.range.start.y>=m&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,x.disposeArray)(this._linkCacheDisposables)
8)}_handleNewLink(m){if(!this._lastMouseEvent)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(m.link,o)&&(this._currentLink=m,this._currentLink.state={decorations:{underline:m.link.decorations===void 0||m.link.decorations.underline,pointerCursor:m.link.decorations===void 0||m.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,m.link,this._lastMouseEvent),m.link.decorations={},Object.defineProperties(m.link.decorations,{pointerCursor:{get:()=>{var l,S;return(S=(l=this._currentLink)==null?void 0:l.state)==null?void 0:S.decorations.pointerCursor},set:l=>{var S;((S=this._currentLink)==null?void 0:S.state)&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>{var l,S;return(S=(l=this._currentLink)==null?void 0:l.state)==null?void 0:S.decorations.underline},set:l=>{var S,E,L;((S=this._currentLink)==null?void 0:S.state)&&((L=(E=this._currentLink)==null?void 0:E.state)==null?void 0:L.decorations.underline)!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(m.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(l=>{if(!this._currentLink)return;const S=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,E=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=E&&(this._clearCurrentLink(S,E),this._lastMouseEvent)){const L=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);L&&this._askForLink(L,!1)}})))}_linkHover(m,o,l){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&m.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(l,o.text)}_fireUnderlineEvent(m,o){const l=m.range,S=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-S-1,l.end.x,l.end.y-S-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)}_linkLeave(m,o,l){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&m.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(l,o.text)}_linkAtPosition(m,o){const l=m.range.start.y*this._bufferService.cols+m.range.start.x,S=m.range.end.y*this._bufferService.cols+m.range.end.x,E=o.y*this._bufferService.cols+o.x;return l<=E&&E<=S}_positionFromMouseEvent(m,o,l){const S=l.getCoords(m,o,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(m,o,l,S,E){return{x1:m,y1:o,x2:l,y2:S,cols:this._bufferService.cols,fg:E}}};n.Linkifier=d=u([w(1,b.IMouseService),w(2,b.IRenderService),w(3,T.IBufferService),w(4,b.ILinkProviderService)],d)},9042:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tooMuchOutput=n.promptLabel=void 0,n.promptLabel="Terminal input",n.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(v,n,c){var u=this&&this.__decorate||function(b,d,m,o){var l,S=arguments.length,E=S<3?d:o===null?o=Object.getOwnPropertyDescriptor(d,m):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,d,m,o);else for(var L=b.length-1;L>=0;L--)(l=b[L])&&(E=(S<3?l(E):S>3?l(d,m,E):l(d,m))||E);return S>3&&E&&Object.defineProperty(d,m,E),E},w=this&&this.__param||function(b,d){return function(m,o){d(m,o,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const f=c(511),y=c(2585);let x=n.OscLinkProvider=class{constructor(b,d,m){this._bufferService=b,this._optionsService=d,this._oscLinkService=m}provideLinks(b,d){var I;const m=this._bufferService.buffer.lines.get(b-1);if(!m)return void d(void 0);const o=[],l=this._optionsService.rawOptions.linkHandler,S=new f.CellData,E=m.getTr
8immedLength();let L=-1,D=-1,C=!1;for(let B=0;B<E;B++)if(D!==-1||m.hasContent(B)){if(m.loadCell(B,S),S.hasExtendedAttrs()&&S.extended.urlId){if(D===-1){D=B,L=S.extended.urlId;continue}C=S.extended.urlId!==L}else D!==-1&&(C=!0);if(C||D!==-1&&B===E-1){const U=(I=this._oscLinkService.getLinkData(L))==null?void 0:I.uri;if(U){const z={start:{x:D+1,y:b},end:{x:B+(C||B!==E-1?0:1),y:b}};let q=!1;if(!(l!=null&&l.allowNonHttpProtocols))try{const J=new URL(U);["http:","https:"].includes(J.protocol)||(q=!0)}catch{q=!0}q||o.push({text:U,range:z,activate:(J,se)=>l?l.activate(J,se,z):T(0,se),hover:(J,se)=>{var ce;return(ce=l==null?void 0:l.hover)==null?void 0:ce.call(l,J,se,z)},leave:(J,se)=>{var ce;return(ce=l==null?void 0:l.leave)==null?void 0:ce.call(l,J,se,z)}})}C=!1,S.hasExtendedAttrs()&&S.extended.urlId?(D=B,L=S.extended.urlId):(D=-1,L=-1)}}d(o)}};function T(b,d){if(confirm(`Do you want to navigate to ${d}? 9 10WARNING: This link could potentially be dangerous`)){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=d}else console.warn("Opening link blocked as opener could not be cleared")}}n.OscLinkProvider=x=u([w(0,y.IBufferService),w(1,y.IOptionsService),w(2,y.IOscLinkService)],x)},6193:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(c,u){this._renderCallback=c,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(c,u,w){this._rowCount=w,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const u=c(3614),w=c(3656),f=c(3551),y=c(9042),x=c(3730),T=c(1680),b=c(3107),d=c(5744),m=c(2950),o=c(1296),l=c(428),S=c(4269),E=c(5114),L=c(8934),D=c(3230),C=c(9312),I=c(4725),B=c(6731),U=c(8055),z=c(8969),q=c(8460),J=c(844),se=c(6114),ce=c(8437),me=c(2584),pe=c(7399),M=c(5941),W=c(9074),V=c(2585),G=c(5435),fe=c(4567),_e=c(779);class Se extends z.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(K={}){super(K),this.browser=se,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new J.MutableDisposable),this._onCursorMove=this.register(new q.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new q.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new q.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new q.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new q.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new q.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new q.EventEmitter),this._onBlur=this.register(new q.EventEmitter),this._onA11yCharEmitter=this.register(new q.EventEmitter),this._onA11yTabEmitter=this.register(new q.EventEmitter),this._onWillOpen=this.register(new q.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(W.DecorationService),this._instantiationService.setService(V.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(_e.LinkProviderService),this._instantiationService.setService(I.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(x.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((H,de)=>this.refresh(H,de))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(H=>this._reportWindowsOptions(H))),this.register(this._inputHandler.onColor(H=>this._handleColorEvent(H))),this.register((0,q.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,q.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(H=>this._afterResize(H.cols,H.rows))),this.register((0,J.toDisposable)(()=>{var H,de;this._customKeyEventHandler=void 0,(de=(H=this.element)==null?void 0:H.parentNode)==null||de.removeChild(this.element)}))}_handleColorEvent(K){if(this._themeService)for(const H of K){let de,ue="";
10switch(H.index){case 256:de="foreground",ue="10";break;case 257:de="background",ue="11";break;case 258:de="cursor",ue="12";break;default:de="ansi",ue="4;"+H.index}switch(H.type){case 0:const ge=U.color.toColorRGB(de==="ansi"?this._themeService.colors.ansi[H.index]:this._themeService.colors[de]);this.coreService.triggerDataEvent(`${me.C0.ESC}]${ue};${(0,M.toRgbString)(ge)}${me.C1_ESCAPED.ST}`);break;case 1:if(de==="ansi")this._themeService.modifyColors(le=>le.ansi[H.index]=U.channels.toColor(...H.color));else{const le=de;this._themeService.modifyColors(Fe=>Fe[le]=U.channels.toColor(...H.color))}break;case 2:this._themeService.restoreColor(H.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(K){K?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(fe.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(K){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(me.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var K;return(K=this.textarea)==null?void 0:K.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(me.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const K=this.buffer.ybase+this.buffer.y,H=this.buffer.lines.get(K);if(!H)return;const de=Math.min(this.buffer.x,this.cols-1),ue=this._renderService.dimensions.css.cell.height,ge=H.getWidth(de),le=this._renderService.dimensions.css.cell.width*ge,Fe=this.buffer.y*this._renderService.dimensions.css.cell.height,Ve=de*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ve+"px",this.textarea.style.top=Fe+"px",this.textarea.style.width=le+"px",this.textarea.style.height=ue+"px",this.textarea.style.lineHeight=ue+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,w.addDisposableDomListener)(this.element,"copy",H=>{this.hasSelection()&&(0,u.copyHandler)(H,this._selectionService)}));const K=H=>(0,u.handlePasteEvent)(H,this.textarea,this.coreService,this.optionsService);this.register((0,w.addDisposableDomListener)(this.textarea,"paste",K)),this.register((0,w.addDisposableDomListener)(this.element,"paste",K)),se.isFirefox?this.register((0,w.addDisposableDomListener)(this.element,"mousedown",H=>{H.button===2&&(0,u.rightClickHandler)(H,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,w.addDisposableDomListener)(this.element,"contextmenu",H=>{(0,u.rightClickHandler)(H,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),se.isLinux&&this.register((0,w.addDisposableDomListener)(this.element,"auxclick",H=>{H.button===1&&(0,u.moveTextAreaUnderMouseCursor)(H,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,w.addDisposableDomListener)(this.textarea,"keyup",K=>this._keyUp(K),!0)),this.register((0,w.addDisposableDomListener)(this.textarea,"keydown",K=>this._keyDown(K),!0)),this.register((0,w.addDisposableDomListener)(this.textarea,"keypress",K=>this._keyPress(K),!0)),this.register((0,w.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,w.addDisposableDomListener)(this.textarea,"compositionupdate",K=>this._compositionHelper.compositionupdate(K))),this.register((0,w.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,w.addDisposableDomListener)(this.textarea,"input",K=>this._inputEvent(K),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(K){var de,ue,ge;if(!K)throw new Error("Terminal requires a parent element.");if(K.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((de=this.element)==null?void 0:de.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=K.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),K.appendChild(this.element);const H=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),H.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,w.addDisposableDomListener)(this.screenElement,"mousemove",le=>this.updateCursorStyle(le))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),H.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",y.promptLabel),se.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","fal
10se"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(E.CoreBrowserService,this.textarea,(ue=K.ownerDocument.defaultView)!=null?ue:window,((ge=this._document)!=null?ge:typeof window!="undefined")?window.document:null)),this._instantiationService.setService(I.ICoreBrowserService,this._coreBrowserService),this.register((0,w.addDisposableDomListener)(this.textarea,"focus",le=>this._handleTextAreaFocus(le))),this.register((0,w.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(I.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(B.ThemeService),this._instantiationService.setService(I.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S.CharacterJoinerService),this._instantiationService.setService(I.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(D.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(I.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(le=>this._onRender.fire(le))),this.onResize(le=>this._renderService.resize(le.cols,le.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(m.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(L.MouseService),this._instantiationService.setService(I.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(H);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(T.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(le=>this.scrollLines(le.amount,le.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),this.register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this.register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this.register(this.onBlur(()=>this._renderService.handleBlur())),this.register(this.onFocus(()=>this._renderService.handleFocus())),this.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(C.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(I.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(le=>this.scrollLines(le.amount,le.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}
10)),this.register(this._onScroll.event(le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,w.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(b.BufferDecorationRenderer,this.screenElement)),this.register((0,w.addDisposableDomListener)(this.element,"mousedown",le=>this._selectionService.handleMouseDown(le))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(fe.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",le=>this._handleScreenReaderModeOptionChange(le))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(d.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(d.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(o.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const K=this,H=this.element;function de(le){const Fe=K._mouseService.getMouseReportCoords(le,K.screenElement);if(!Fe)return!1;let Ve,Je;switch(le.overrideType||le.type){case"mousemove":Je=32,le.buttons===void 0?(Ve=3,le.button!==void 0&&(Ve=le.button<3?le.button:3)):Ve=1&le.buttons?0:4&le.buttons?1:2&le.buttons?2:3;break;case"mouseup":Je=0,Ve=le.button<3?le.button:3;break;
10case"mousedown":Je=1,Ve=le.button<3?le.button:3;break;case"wheel":if(K._customWheelEventHandler&&K._customWheelEventHandler(le)===!1||K.viewport.getLinesScrolled(le)===0)return!1;Je=le.deltaY<0?0:1,Ve=4;break;default:return!1}return!(Je===void 0||Ve===void 0||Ve>4)&&K.coreMouseService.triggerMouseEvent({col:Fe.col,row:Fe.row,x:Fe.x,y:Fe.y,button:Ve,action:Je,ctrl:le.ctrlKey,alt:le.altKey,shift:le.shiftKey})}const ue={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ge={mouseup:le=>(de(le),le.buttons||(this._document.removeEventListener("mouseup",ue.mouseup),ue.mousedrag&&this._document.removeEventListener("mousemove",ue.mousedrag)),this.cancel(le)),wheel:le=>(de(le),this.cancel(le,!0)),mousedrag:le=>{le.buttons&&de(le)},mousemove:le=>{le.buttons||de(le)}};this.register(this.coreMouseService.onProtocolChange(le=>{le?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(le)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&le?ue.mousemove||(H.addEventListener("mousemove",ge.mousemove),ue.mousemove=ge.mousemove):(H.removeEventListener("mousemove",ue.mousemove),ue.mousemove=null),16&le?ue.wheel||(H.addEventListener("wheel",ge.wheel,{passive:!1}),ue.wheel=ge.wheel):(H.removeEventListener("wheel",ue.wheel),ue.wheel=null),2&le?ue.mouseup||(ue.mouseup=ge.mouseup):(this._document.removeEventListener("mouseup",ue.mouseup),ue.mouseup=null),4&le?ue.mousedrag||(ue.mousedrag=ge.mousedrag):(this._document.removeEventListener("mousemove",ue.mousedrag),ue.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,w.addDisposableDomListener)(H,"mousedown",le=>{if(le.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(le))return de(le),ue.mouseup&&this._document.addEventListener("mouseup",ue.mouseup),ue.mousedrag&&this._document.addEventListener("mousemove",ue.mousedrag),this.cancel(le)})),this.register((0,w.addDisposableDomListener)(H,"wheel",le=>{if(!ue.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(le)===!1)return!1;if(!this.buffer.hasScrollback){const Fe=this.viewport.getLinesScrolled(le);if(Fe===0)return;const Ve=me.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(le.deltaY<0?"A":"B");let Je="";for(let vt=0;vt<Math.abs(Fe);vt++)Je+=Ve;return this.coreService.triggerDataEvent(Je,!0),this.cancel(le,!0)}return this.viewport.handleWheel(le)?this.cancel(le):void 0}},{passive:!1})),this.register((0,w.addDisposableDomListener)(H,"touchstart",le=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(le),this.cancel(le)},{passive:!0})),this.register((0,w.addDisposableDomListener)(H,"touchmove",le=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(le)?void 0:this.cancel(le)},{passive:!1}))}refresh(K,H){var de;(de=this._renderService)==null||de.refreshRows(K,H)}updateCursorStyle(K){var H;(H=this._selectionService)!=null&&H.shouldColumnSelect(K)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(K,H,de=0){var ue;de===1?(super.scrollLines(K,H,de),this.refresh(0,this.rows-1)):(ue=this.viewport)==null||ue.scrollLines(K)}paste(K){(0,u.paste)(K,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(K){this._customKeyEventHandler=K}attachCustomWheelEventHandler(K){this._customWheelEventHandler=K}registerLinkProvider(K){return this._linkProviderService.registerLinkProvider(K)}registerCharacterJoiner(K){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const H=this._characterJoinerService.register(K);return this.refresh(0,this.rows-1),H}deregisterCharacterJoiner(K){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(K)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(K){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+K)}registerDecoration(K){return this._decorationService.registerDecoration(K)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(K,H,de){this._selectionService.setSelection(K,H,de)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var K;(K=this._selectionService)==null||K.clearSelection()}selectAll(){var K;(K=this._selectionService)==null||K.selectAll()}selectLines(K,H){var de;(de=this._selectionService)==null||de.selectLines(K,H)}_keyDown(K){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;const H=this.browser.isMac&&this.options.macOptionIsMeta&&K.altKey;if(!H&&!this._compositionHelper.keydown(K))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;H||K.key!=="Dead"&&K.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const de=(0,pe.evaluateKeyboardEvent)(K,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(K),de.type===3||de.type===2){const ue=this.rows-1;return this.scrollLines(de.type===2?-ue:ue),this.cancel(K,!0)}return de.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,K)||(de.cancel&&this.cancel(K,!0),!de.key||!!(K.key&&!K.ctrlKey&&!K.altKey&&!K.metaKey&&K.key.length===1&&K.key.charCo
10deAt(0)>=65&&K.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(de.key!==me.C0.ETX&&de.key!==me.C0.CR||(this.textarea.value=""),this._onKey.fire({key:de.key,domEvent:K}),this._showCursor(),this.coreService.triggerDataEvent(de.key,!0),!this.optionsService.rawOptions.screenReaderMode||K.altKey||K.ctrlKey?this.cancel(K,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(K,H){const de=K.isMac&&!this.options.macOptionIsMeta&&H.altKey&&!H.ctrlKey&&!H.metaKey||K.isWindows&&H.altKey&&H.ctrlKey&&!H.metaKey||K.isWindows&&H.getModifierState("AltGraph");return H.type==="keypress"?de:de&&(!H.keyCode||H.keyCode>47)}_keyUp(K){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1||(function(H){return H.keyCode===16||H.keyCode===17||H.keyCode===18}(K)||this.focus(),this.updateCursorStyle(K),this._keyPressHandled=!1)}_keyPress(K){let H;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;if(this.cancel(K),K.charCode)H=K.charCode;else if(K.which===null||K.which===void 0)H=K.keyCode;else{if(K.which===0||K.charCode===0)return!1;H=K.which}return!(!H||(K.altKey||K.ctrlKey||K.metaKey)&&!this._isThirdLevelShift(this.browser,K)||(H=String.fromCharCode(H),this._onKey.fire({key:H,domEvent:K}),this._showCursor(),this.coreService.triggerDataEvent(H,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(K){if(K.data&&K.inputType==="insertText"&&(!K.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const H=K.data;return this.coreService.triggerDataEvent(H,!0),this.cancel(K),!0}return!1}resize(K,H){K!==this.cols||H!==this.rows?super.resize(K,H):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(K,H){var de,ue;(de=this._charSizeService)==null||de.measure(),(ue=this.viewport)==null||ue.syncScrollArea(!0)}clear(){var K;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let H=1;H<this.rows;H++)this.buffer.lines.push(this.buffer.getBlankLine(ce.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(K=this.viewport)==null||K.reset(),this.refresh(0,this.rows-1)}}reset(){var H,de;this.options.rows=this.rows,this.options.cols=this.cols;const K=this._customKeyEventHandler;this._setup(),super.reset(),(H=this._selectionService)==null||H.reset(),this._decorationService.reset(),(de=this.viewport)==null||de.reset(),this._customKeyEventHandler=K,this.refresh(0,this.rows-1)}clearTextureAtlas(){var K;(K=this._renderService)==null||K.clearTextureAtlas()}_reportFocus(){var K;(K=this.element)!=null&&K.classList.contains("focus")?this.coreService.triggerDataEvent(me.C0.ESC+"[I"):this.coreService.triggerDataEvent(me.C0.ESC+"[O")}_reportWindowsOptions(K){if(this._renderService)switch(K){case G.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const H=this._renderService.dimensions.css.canvas.width.toFixed(0),de=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${me.C0.ESC}[4;${de};${H}t`);break;case G.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ue=this._renderService.dimensions.css.cell.width.toFixed(0),ge=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${me.C0.ESC}[6;${ge};${ue}t`)}}cancel(K,H){if(this.options.cancelEvents||H)return K.preventDefault(),K.stopPropagation(),!1}}n.Terminal=Se},9924:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,w){this._rowCount=w,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const y=f-this._lastRefreshMs,x=this._debounceThresholdMS-y;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},x)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(v,n,c){var u=this&&this.__decorate||function(m,o,l,S){var E,L=arguments.length,D=L<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;
10if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(m,o,l,S);else for(var C=m.length-1;C>=0;C--)(E=m[C])&&(D=(L<3?E(D):L>3?E(o,l,D):E(o,l))||D);return L>3&&D&&Object.defineProperty(o,l,D),D},w=this&&this.__param||function(m,o){return function(l,S){o(l,S,m)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const f=c(3656),y=c(4725),x=c(8460),T=c(844),b=c(2585);let d=n.Viewport=class extends T.Disposable{constructor(m,o,l,S,E,L,D,C){super(),this._viewportElement=m,this._scrollArea=o,this._bufferService=l,this._optionsService=S,this._charSizeService=E,this._renderService=L,this._coreBrowserService=D,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(I=>this._activeBuffer=I.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(I=>this._renderDimensions=I)),this._handleThemeChange(C.colors),this.register(C.onChangeColors(I=>this._handleThemeChange(I))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(m){this._viewportElement.style.backgroundColor=m.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(m){if(m)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const o=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==o&&(this._lastRecordedBufferHeight=o,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const m=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==m&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=m),this._refreshAnimationFrame=null}syncScrollArea(m=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(m);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(m)}_handleScroll(m){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const o=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const m=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(m*(this._smoothScrollState.target-this._smoothScrollState.origin)),m<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(m,o){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHe
10ight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&l<this._lastRecordedBufferHeight)||(m.cancelable&&m.preventDefault(),!1)}handleWheel(m){const o=this._getPixelsScrolled(m);return o!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+o:this._smoothScrollState.target+=o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=o,this._bubbleScroll(m,o))}scrollLines(m){if(m!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=m*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:m,suppressScrollEvent:!1})}_getPixelsScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let o=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(m,o){var C;let l,S="";const E=[],L=o!=null?o:this._bufferService.buffer.lines.length,D=this._bufferService.buffer.lines;for(let I=m;I<L;I++){const B=D.get(I);if(!B)continue;const U=(C=D.get(I+1))==null?void 0:C.isWrapped;if(S+=B.translateToString(!U),!U||I===D.length-1){const z=document.createElement("div");z.textContent=S,E.push(z),S.length>0&&(l=z),S=""}}return{bufferElements:E,cursorElement:l}}getLinesScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let o=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=this._currentRowHeight+0,this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(m,o){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&o.altKey||l==="ctrl"&&o.ctrlKey||l==="shift"&&o.shiftKey?m*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:m*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(m){this._lastTouchY=m.touches[0].pageY}handleTouchMove(m){const o=this._lastTouchY-m.touches[0].pageY;return this._lastTouchY=m.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(m,o))}};n.Viewport=d=u([w(2,b.IBufferService),w(3,b.IOptionsService),w(4,y.ICharSizeService),w(5,y.IRenderService),w(6,y.ICoreBrowserService),w(7,y.IThemeService)],d)},3107:function(v,n,c){var u=this&&this.__decorate||function(b,d,m,o){var l,S=arguments.length,E=S<3?d:o===null?o=Object.getOwnPropertyDescriptor(d,m):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,d,m,o);else for(var L=b.length-1;L>=0;L--)(l=b[L])&&(E=(S<3?l(E):S>3?l(d,m,E):l(d,m))||E);return S>3&&E&&Object.defineProperty(d,m,E),E},w=this&&this.__param||function(b,d){return function(m,o){d(m,o,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const f=c(4725),y=c(844),x=c(2585);let T=n.BufferDecorationRenderer=class extends y.Disposable{constructor(b,d,m,o,l){super(),this._screenElement=b,this._bufferService=d,this._coreBrowserService=m,this._decorationService=o,this._renderService=l,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>
10this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(S=>this._removeDecoration(S))),this.register((0,y.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(const b of this._decorationService.decorations)this._renderDecoration(b);this._dimensionsChanged=!1}_renderDecoration(b){this._refreshStyle(b),this._dimensionsChanged&&this._refreshXPosition(b)}_createElement(b){var o,l;const d=this._coreBrowserService.mainDocument.createElement("div");d.classList.add("xterm-decoration"),d.classList.toggle("xterm-decoration-top-layer",((o=b==null?void 0:b.options)==null?void 0:o.layer)==="top"),d.style.width=`${Math.round((b.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,d.style.height=(b.options.height||1)*this._renderService.dimensions.css.cell.height+"px",d.style.top=(b.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",d.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const m=(l=b.options.x)!=null?l:0;return m&&m>this._bufferService.cols&&(d.style.display="none"),this._refreshXPosition(b,d),d}_refreshStyle(b){const d=b.marker.line-this._bufferService.buffers.active.ydisp;if(d<0||d>=this._bufferService.rows)b.element&&(b.element.style.display="none",b.onRenderEmitter.fire(b.element));else{let m=this._decorationElements.get(b);m||(m=this._createElement(b),b.element=m,this._decorationElements.set(b,m),this._container.appendChild(m),b.onDispose(()=>{this._decorationElements.delete(b),m.remove()})),m.style.top=d*this._renderService.dimensions.css.cell.height+"px",m.style.display=this._altBufferIsActive?"none":"block",b.onRenderEmitter.fire(m)}}_refreshXPosition(b,d=b.element){var o;if(!d)return;const m=(o=b.options.x)!=null?o:0;(b.options.anchor||"left")==="right"?d.style.right=m?m*this._renderService.dimensions.css.cell.width+"px":"":d.style.left=m?m*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(b){var d;(d=this._decorationElements.get(b))==null||d.remove(),this._decorationElements.delete(b),b.dispose()}};n.BufferDecorationRenderer=T=u([w(1,x.IBufferService),w(2,f.ICoreBrowserService),w(3,x.IDecorationService),w(4,f.IRenderService)],T)},5871:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorZoneStore=void 0,n.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,u){return u>=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,w){return u>=c.startBufferLine-this._linePadding[w||"full"]&&u<=c.endBufferLine+this._linePadding[w||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(v,n,c){var u=this&&this.__decorate||function(l,S,E,L){var D,C=arguments.length,I=C<3?S:L===null?L=Object.getOwnPropertyDescriptor(S,E):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(l,S,E,L);else for(var B=l.length-1;B>=0;
10B--)(D=l[B])&&(I=(C<3?D(I):C>3?D(S,E,I):D(S,E))||I);return C>3&&I&&Object.defineProperty(S,E,I),I},w=this&&this.__param||function(l,S){return function(E,L){S(E,L,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const f=c(5871),y=c(4725),x=c(844),T=c(2585),b={full:0,left:0,center:0,right:0},d={full:0,left:0,center:0,right:0},m={full:0,left:0,center:0,right:0};let o=n.OverviewRulerRenderer=class extends x.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,S,E,L,D,C,I){var U;super(),this._viewportElement=l,this._screenElement=S,this._bufferService=E,this._decorationService=L,this._renderService=D,this._optionsService=C,this._coreBrowserService=I,this._colorZoneStore=new f.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(U=this._viewportElement.parentElement)==null||U.insertBefore(this._canvas,this._viewportElement);const B=this._canvas.getContext("2d");if(!B)throw new Error("Ctx cannot be null");this._ctx=B,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,x.toDisposable)(()=>{var z;(z=this._canvas)==null||z.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>
10this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){const l=Math.floor(this._canvas.width/3),S=Math.ceil(this._canvas.width/3);d.full=this._canvas.width,d.left=l,d.center=S,d.right=l,this._refreshDrawHeightConstants(),m.full=0,m.left=0,m.center=d.left,m.right=d.left+d.center}_refreshDrawHeightConstants(){b.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,S=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);b.left=S,b.center=S,b.right=S}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const S of this._decorationService.decorations)this._colorZoneStore.addDecoration(S);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const S of l)S.position!=="full"&&this._renderColorZone(S);for(const S of l)S.position==="full"&&this._renderColorZone(S);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(m[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-b[l.position||"full"]/2),d[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+b[l.position||"full"]))}_queueRefresh(l,S){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=S||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};n.OverviewRulerRenderer=o=u([w(2,T.IBufferService),w(3,T.IDecorationService),w(4,y.IRenderService),w(5,T.IOptionsService),w(6,y.ICoreBrowserService)],o)},2950:function(v,n,c){var u=this&&this.__decorate||function(b,d,m,o){var l,S=arguments.length,E=S<3?d:o===null?o=Object.getOwnPropertyDescriptor(d,m):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,d,m,o);else for(var L=b.length-1;L>=0;L--)(l=b[L])&&(E=(S<3?l(E):S>3?l(d,m,E):l(d,m))||E);return S>3&&E&&Object.defineProperty(d,m,E),E},w=this&&this.__param||function(b,d){return function(m,o){d(m,o,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const f=c(4725),y=c(2585),x=c(2584);let T=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(b,d,m,o,l,S){this._textarea=b,this._compositionView=d,this._bufferService=m,this._optionsService=o,this._coreService=l,this._renderService=S,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}
10,this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(b){this._compositionView.textContent=b.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(b){if(this._isComposing||this._isSendingComposition){if(b.keyCode===229||b.keyCode===16||b.keyCode===17||b.keyCode===18)return!1;this._finalizeComposition(!1)}return b.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(b){if(this._compositionView.classList.remove("active"),this._isComposing=!1,b){const d={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let m;this._isSendingComposition=!1,d.start+=this._dataAlreadySent.length,m=this._isComposing?this._textarea.value.substring(d.start,d.end):this._textarea.value.substring(d.start),m.length>0&&this._coreService.triggerDataEvent(m,!0)}},0)}else{this._isSendingComposition=!1;const d=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(d,!0)}}_handleAnyTextareaChanges(){const b=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const d=this._textarea.value,m=d.replace(b,"");this._dataAlreadySent=m,d.length>b.length?this._coreService.triggerDataEvent(m,!0):d.length<b.length?this._coreService.triggerDataEvent(`${x.C0.DEL}`,!0):d.length===b.length&&d!==b&&this._coreService.triggerDataEvent(d,!0)}},0)}updateCompositionElements(b){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const d=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),m=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=d*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=m+"px",this._compositionView.style.lineHeight=m+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const S=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(S.width,1)+"px",this._textarea.style.height=Math.max(S.height,1)+"px",this._textarea.style.lineHeight=S.height+"px"}b||setTimeout(()=>this.updateCompositionElements(!0),0)}}};n.CompositionHelper=T=u([w(2,y.IBufferService),w(3,y.IOptionsService),w(4,y.ICoreService),w(5,f.IRenderService)],T)},9806:(v,n)=>{function c(u,w,f){const y=f.getBoundingClientRect(),x=u.getComputedStyle(f),T=parseInt(x.getPropertyValue("padding-left")),b=parseInt(x.getPropertyValue("padding-top"));return[w.clientX-y.left-T,w.clientY-y.top-b]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=c,n.getCoords=function(u,w,f,y,x,T,b,d,m){if(!T)return;const o=c(u,w,f);return o?(o[0]=Math.ceil((o[0]+(m?b/2:0))/b),o[1]=Math.ceil(o[1]/d),o[0]=Math.min(Math.max(o[0],1),y+(m?1:0)),o[1]=Math.min(Math.max(o[1],1),x),o):void 0}},9504:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const u=c(2584);function w(d,m,o,l){const S=d-f(d,o),E=m-f(m,o),L=Math.abs(S-E)-function(D,C,I){let B=0;const U=D-f(D,I),z=C-f(C,I);for(let q=0;q<Math.abs(U-z);q++){const J=y(D,C)==="A"?-1:1,se=I.buffer.lines.get(U+J*q);se!=null&&se.isWrapped&&B++}return B}(d,m,o);return b(L,T(y(d,m),l))}function f(d,m){let o=0,l=m.buffer.lines.get(d),S=l==null?void 0:l.isWrapped;for(;S&&d>=0&&d<m.rows;)o++,l=m.buffer.lines.get(--d),S=l==null?void 0:l.isWrapped;return o}function y(d,m){return d>m?"A":"B"}function x(d,m,o,l,S,E){let L=d,D=m,C="";for(;L!==o||D!==l;)L+=S?1:-1,S&&L>E.cols-1?(C+=E.buffer.translateBufferLineToString(D,!1,d,L),L=0,d=0,D++):!S&&L<0&&(C+=E.buffer.translateBufferLineToString(D,!1,0,d+1),L=E.cols-1,d=L,D--);return C+E.buffer.translateBufferLineToString(D,!1,d,L)}function T(d,m){const o=m?"O":"[";return u.C0.ESC+o+d}function b(d,m){d=Math.floor(d);let o="";for(let l=0;l<d;l++)o+=m;return o}n.moveToCellSequence=function(d,m,o,l){const S=o.buffer.x,E=o.buffer.y;if(!o.buffer.hasScrollback)return function(C,I,B,U,z,q){return w(I,U,z,q).length===0?"":b(x(C,I,C,I-f(I,z),!1,z).length,T("D",q))}(S,E,0,m,o,l)+w(E,m,o,l)+function(C,I,B,U,z,q){let J;J=w(I,U,z,q).length>0?U-f(U,z):I;const se=U,ce=function(me,pe,M,W,V,G){let fe;return fe=w(M,W,V,G).length>0?W-f(W,V):pe,me<M&&fe<=W||me>=M&&fe<W?"C":"D"}(C,I,B,U,z,q);return b(x(C,J,B,se,ce==="C",z).length,T(ce,q))}(S,E,d,m,o,l);let L;if(E===m)return L=S>d?"D":"C",b(Math.abs(S-d),T(L,l));L=E>m?"D":"C";
10const D=Math.abs(E-m);return b(function(C,I){return I.cols-C}(E>m?d:S,o)+(D-1)*o.cols+1+((E>m?S:d)-1),T(L,l))}},1296:function(v,n,c){var u=this&&this.__decorate||function(q,J,se,ce){var me,pe=arguments.length,M=pe<3?J:ce===null?ce=Object.getOwnPropertyDescriptor(J,se):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(q,J,se,ce);else for(var W=q.length-1;W>=0;W--)(me=q[W])&&(M=(pe<3?me(M):pe>3?me(J,se,M):me(J,se))||M);return pe>3&&M&&Object.defineProperty(J,se,M),M},w=this&&this.__param||function(q,J){return function(se,ce){J(se,ce,q)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const f=c(3787),y=c(2550),x=c(2223),T=c(6171),b=c(6052),d=c(4725),m=c(8055),o=c(8460),l=c(844),S=c(2585),E="xterm-dom-renderer-owner-",L="xterm-rows",D="xterm-fg-",C="xterm-bg-",I="xterm-focus",B="xterm-selection";let U=1,z=n.DomRenderer=class extends l.Disposable{constructor(q,J,se,ce,me,pe,M,W,V,G,fe,_e,Se){super(),this._terminal=q,this._document=J,this._element=se,this._screenElement=ce,this._viewportElement=me,this._helperContainer=pe,this._linkifier2=M,this._charSizeService=V,this._optionsService=G,this._bufferService=fe,this._coreBrowserService=_e,this._themeService=Se,this._terminalClass=U++,this._rowElements=[],this._selectionRenderModel=(0,b.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(L),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(B),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,T.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(ie=>this._injectCss(ie))),this._injectCss(this._themeService.colors),this._rowFactory=W.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(E+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(ie=>this._handleLinkHover(ie))),this.register(this._linkifier2.onHideLinkUnderline(ie=>this._handleLinkLeave(ie))),this.register((0,l.toDisposable)(()=>{this._element.classList.remove(E+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new y.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const q=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*q,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*q),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/q),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/q),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const se of this._rowElements)se.style.width=`${this.dimensions.css.
10canvas.width}px`,se.style.height=`${this.dimensions.css.cell.height}px`,se.style.lineHeight=`${this.dimensions.css.cell.height}px`,se.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const J=`${this._terminalSelector} .${L} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=J,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(q){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let J=`${this._terminalSelector} .${L} { color: ${q.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;J+=`${this._terminalSelector} .${L} .xterm-dim { color: ${m.color.multiplyOpacity(q.foreground,.5).css};}`,J+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const se=`blink_underline_${this._terminalClass}`,ce=`blink_bar_${this._terminalClass}`,me=`blink_block_${this._terminalClass}`;J+=`@keyframes ${se} { 50% { border-bottom-style: hidden; }}`,J+=`@keyframes ${ce} { 50% { box-shadow: none; }}`,J+=`@keyframes ${me} { 0% { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css}; } 50% { background-color: inherit; color: ${q.cursor.css}; }}`,J+=`${this._terminalSelector} .${L}.${I} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${se} 1s step-end infinite;}${this._terminalSelector} .${L}.${I} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${ce} 1s step-end infinite;}${this._terminalSelector} .${L}.${I} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${me} 1s step-end infinite;}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-block { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css};}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${q.cursor.css} !important; color: ${q.cursorAccent.css} !important;}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${q.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${q.cursor.css} inset;}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${q.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,J+=`${this._terminalSelector} .${B} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${B} div { position: absolute; background-color: ${q.selectionBackgroundOpaque.css};}${this._terminalSelector} .${B} div { position: absolute; background-color: ${q.selectionInactiveBackgroundOpaque.css};}`;for(const[pe,M]of q.ansi.entries())J+=`${this._terminalSelector} .${D}${pe} { color: ${M.css}; }${this._terminalSelector} .${D}${pe}.xterm-dim { color: ${m.color.multiplyOpacity(M,.5).css}; }${this._terminalSelector} .${C}${pe} { background-color: ${M.css}; }`;J+=`${this._terminalSelector} .${D}${x.INVERTED_DEFAULT_COLOR} { color: ${m.color.opaque(q.background).css}; }${this._terminalSelector} .${D}${x.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${m.color.multiplyOpacity(m.color.opaque(q.background),.5).css}; }${this._terminalSelector} .${C}${x.INVERTED_DEFAULT_COLOR} { background-color: ${q.foreground.css}; }`,this._themeStyleElement.textContent=J}_setDefaultSpacing(){const q=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${q}px`,this._rowFactory.defaultSpacing=q}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(q,J){for(let se=this._rowElements.length;se<=J;se++){const ce=this._document.createElement("div");this._rowContainer.appendChild(ce),this._rowElements.push(ce)}for(;this._rowElements.length>J;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(q,J){this._refreshRowElements(q,J),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(I),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(I),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(q,J,se){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(q,J,se),this.renderRows(0,this._bufferService.rows-1),!q||!J)return;this._selectionRenderModel.update(this._terminal,q,J,se);const ce=this._selectionRenderModel.viewportStartRow,me=this._selectionRenderModel.viewportEndRow,pe=this._selectionRenderModel.viewportCappedStartRow,M=this._selectionRenderModel.viewportCappedEndRow;if(pe>=this._bufferService.rows||M<0)return;const W=this._document.createDocumentFragment();if(se){const V=q[0]>J[0];W.appendChild(this._createSelectionElement(pe,V?J[0]:q[0],V?q[0]:J[0],M-pe+1))}else{const V=ce===pe?q[0]:0,G=pe===me?J[0]:this._bufferService.cols;W.appendChild(this._createSelectionElement(pe,V,G));const fe=M-pe-1;if(W.appendChild(this._createSelectionElement(pe+1,0,this._bufferService.cols,fe)),pe!==M){const _e=me===M?J[0]:this._bufferService.cols;W.appendChild(this._createSelectionElement(M,0,_e))}}this._selectionContainer.appendChild(W)}_createSelectionElement(q,J,se,ce=1){const me=this._document.createElement("div"),pe=J*this.dimensions.css.
10cell.width;let M=this.dimensions.css.cell.width*(se-J);return pe+M>this.dimensions.css.canvas.width&&(M=this.dimensions.css.canvas.width-pe),me.style.height=ce*this.dimensions.css.cell.height+"px",me.style.top=q*this.dimensions.css.cell.height+"px",me.style.left=`${pe}px`,me.style.width=`${M}px`,me}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const q of this._rowElements)q.replaceChildren()}renderRows(q,J){const se=this._bufferService.buffer,ce=se.ybase+se.y,me=Math.min(se.x,this._bufferService.cols-1),pe=this._optionsService.rawOptions.cursorBlink,M=this._optionsService.rawOptions.cursorStyle,W=this._optionsService.rawOptions.cursorInactiveStyle;for(let V=q;V<=J;V++){const G=V+se.ydisp,fe=this._rowElements[V],_e=se.lines.get(G);if(!fe||!_e)break;fe.replaceChildren(...this._rowFactory.createRow(_e,G,G===ce,M,W,me,pe,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${E}${this._terminalClass}`}_handleLinkHover(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!0)}_handleLinkLeave(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!1)}_setCellUnderline(q,J,se,ce,me,pe){se<0&&(q=0),ce<0&&(J=0);const M=this._bufferService.rows-1;se=Math.max(Math.min(se,M),0),ce=Math.max(Math.min(ce,M),0),me=Math.min(me,this._bufferService.cols);const W=this._bufferService.buffer,V=W.ybase+W.y,G=Math.min(W.x,me-1),fe=this._optionsService.rawOptions.cursorBlink,_e=this._optionsService.rawOptions.cursorStyle,Se=this._optionsService.rawOptions.cursorInactiveStyle;for(let ie=se;ie<=ce;++ie){const K=ie+W.ydisp,H=this._rowElements[ie],de=W.lines.get(K);if(!H||!de)break;H.replaceChildren(...this._rowFactory.createRow(de,K,K===V,_e,Se,G,fe,this.dimensions.css.cell.width,this._widthCache,pe?ie===se?q:0:-1,pe?(ie===ce?J:me)-1:-1))}}};n.DomRenderer=z=u([w(7,S.IInstantiationService),w(8,d.ICharSizeService),w(9,S.IOptionsService),w(10,S.IBufferService),w(11,d.ICoreBrowserService),w(12,d.IThemeService)],z)},3787:function(v,n,c){var u=this&&this.__decorate||function(L,D,C,I){var B,U=arguments.length,z=U<3?D:I===null?I=Object.getOwnPropertyDescriptor(D,C):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(L,D,C,I);else for(var q=L.length-1;q>=0;q--)(B=L[q])&&(z=(U<3?B(z):U>3?B(D,C,z):B(D,C))||z);return U>3&&z&&Object.defineProperty(D,C,z),z},w=this&&this.__param||function(L,D){return function(C,I){D(C,I,L)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const f=c(2223),y=c(643),x=c(511),T=c(2585),b=c(8055),d=c(4725),m=c(4269),o=c(6171),l=c(3734);let S=n.DomRendererRowFactory=class{constructor(L,D,C,I,B,U,z){this._document=L,this._characterJoinerService=D,this._optionsService=C,this._coreBrowserService=I,this._coreService=B,this._decorationService=U,this._themeService=z,this._workCell=new x.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(L,D,C){this._selectionStart=L,this._selectionEnd=D,this._columnSelectMode=C}createRow(L,D,C,I,B,U,z,q,J,se,ce){const me=[],pe=this._characterJoinerService.getJoinedCharacters(D),M=this._themeService.colors;let W,V=L.getNoBgTrimmedLength();C&&V<U+1&&(V=U+1);let G=0,fe="",_e=0,Se=0,ie=0,K=!1,H=0,de=!1,ue=0;const ge=[],le=se!==-1&&ce!==-1;for(let Fe=0;Fe<V;Fe++){L.loadCell(Fe,this._workCell);let Ve=this._workCell.getWidth();if(Ve===0)continue;let Je=!1,vt=Fe,Ee=this._workCell;if(pe.length>0&&Fe===pe[0][0]){Je=!0;const Ze=pe.shift();Ee=new m.JoinedCellData(this._workCell,L.translateToString(!0,Ze[0],Ze[1]),Ze[1]-Ze[0]),vt=Ze[1]-1,Ve=Ee.getWidth()}const Rs=this._isCellInSelection(Fe,D),qr=C&&Fe===U,ds=le&&Fe>=se&&Fe<=ce;let kt=!1;this._decorationService.forEachDecorationAtCell(Fe,D,void 0,Ze=>{kt=!0});let is=Ee.getChars()||y.WHITESPACE_CELL_CHAR;if(is===" "&&(Ee.isUnderline()||Ee.isOverline())&&(is="\xA0"),ue=Ve*q-J.get(is,Ee.isBold(),Ee.isItalic()),W){if(G&&(Rs&&de||!Rs&&!de&&Ee.bg===_e)&&(Rs&&de&&M.selectionForeground||Ee.fg===Se)&&Ee.extended.ext===ie&&ds===K&&ue===H&&!qr&&!Je&&!kt){Ee.isInvisible()?fe+=y.WHITESPACE_CELL_CHAR:fe+=is,G++;continue}G&&(W.textContent=fe),W=this._document.createElement("span"),G=0,fe=""}else W=this._document.createElement("span");if(_e=Ee.bg,Se=Ee.fg,ie=Ee.extended.ext,K=ds,H=ue,de=Rs,Je&&U>=Fe&&U<=vt&&(U=Fe),!this._coreService.isCursorHidden&&qr&&this._coreService.isCursorInitialized){if(ge.push("xterm-cursor"),this._coreBrowserService.isFocused)z&&ge.push("xterm-cursor-blink"),ge.push(I==="bar"?"xterm-cursor-bar":I==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(B)switch(B){case"outline":ge.push("xterm-cursor-outline");break;case"block":ge.push("xterm-cursor-block");break;case"bar":ge.push("xterm-cursor-bar");break;case"underline":ge.push("xterm-cursor-underline")}}if(Ee.isBold()&&ge.push("xterm-bold"),Ee.isItalic()&&ge.push("xterm-italic"),Ee.isDim()&&ge.push("xterm-dim"),fe=Ee.isInvisible()?y.WHITESPACE_CELL_CHAR:Ee.getChars()||y.WHITESPACE_CELL_CHAR,Ee.isUnderline()&&(ge.push(`xterm-underline-${Ee.extended.underlineStyle}`),fe===" "&&(fe="\xA0"),!Ee.isUnderlineColorDefault()))if(Ee.isUnderlineColorRGB())W.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(Ee.getUnderlineColor()).join(",")})`;else{let Ze=Ee.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ee.isBold()&&Ze<8&&(Ze+=8),W.style.textDecorationColor=M.ansi[Ze].css}Ee.isOverline()&&(ge.push("xterm-overline"),fe===" "&&(fe="\xA0")),Ee.isStrikethrough()&&ge.push("xterm-strikethrough"),ds&&(W.style.textDecoration="underline");let mt=Ee.getFgColor(),js=Ee.getFgColorMode(),yt=Ee.getBgColor(),Ks=Ee.getBgColorMode();const fs=!!Ee.isInverse();if(fs){const Ze=mt;mt=yt,yt=Ze;const Fr=js;js=Ks,Ks=Fr}let Et,Ls,$t,ps=!1;switch(this._decorationService.forEachDecorationAtCell(Fe,D,void 0,Ze=>{Ze.options.layer!=="top"&&ps||(Ze.backgroundColorRGB&&(Ks=50331648,yt=Ze.backgroundColorRGB.rgba>>8&16777215,Et=Ze.backgroundColorRGB),Ze.foregroundColorRGB&&(js=50331648,mt=Ze.foregroundColorRGB.rgba>>8&16777215,Ls=Ze.foregroundColorRGB),ps=Ze.options.layer==="top")}),!ps&&Rs&&(Et=this._coreBrowserService.isFocused?M.selectionBackgroun
vendor: 9,518 bytes, line 10
10dOpaque:M.selectionInactiveBackgroundOpaque,yt=Et.rgba>>8&16777215,Ks=50331648,ps=!0,M.selectionForeground&&(js=50331648,mt=M.selectionForeground.rgba>>8&16777215,Ls=M.selectionForeground)),ps&&ge.push("xterm-decoration-top"),Ks){case 16777216:case 33554432:$t=M.ansi[yt],ge.push(`xterm-bg-${yt}`);break;case 50331648:$t=b.channels.toColor(yt>>16,yt>>8&255,255&yt),this._addStyle(W,`background-color:#${E((yt>>>0).toString(16),"0",6)}`);break;default:fs?($t=M.foreground,ge.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):$t=M.background}switch(Et||Ee.isDim()&&(Et=b.color.multiplyOpacity($t,.5)),js){case 16777216:case 33554432:Ee.isBold()&&mt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(mt+=8),this._applyMinimumContrast(W,$t,M.ansi[mt],Ee,Et,void 0)||ge.push(`xterm-fg-${mt}`);break;case 50331648:const Ze=b.channels.toColor(mt>>16&255,mt>>8&255,255&mt);this._applyMinimumContrast(W,$t,Ze,Ee,Et,Ls)||this._addStyle(W,`color:#${E(mt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(W,$t,M.foreground,Ee,Et,Ls)||fs&&ge.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}ge.length&&(W.className=ge.join(" "),ge.length=0),qr||Je||kt?W.textContent=fe:G++,ue!==this.defaultSpacing&&(W.style.letterSpacing=`${ue}px`),me.push(W),Fe=vt}return W&&G&&(W.textContent=fe),me}_applyMinimumContrast(L,D,C,I,B,U){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(I.getCode()))return!1;const z=this._getContrastCache(I);let q;if(B||U||(q=z.getColor(D.rgba,C.rgba)),q===void 0){const J=this._optionsService.rawOptions.minimumContrastRatio/(I.isDim()?2:1);q=b.color.ensureContrastRatio(B||D,U||C,J),z.setColor((B||D).rgba,(U||C).rgba,q!=null?q:null)}return!!q&&(this._addStyle(L,`color:${q.css}`),!0)}_getContrastCache(L){return L.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(L,D){L.setAttribute("style",`${L.getAttribute("style")||""}${D};`)}_isCellInSelection(L,D){const C=this._selectionStart,I=this._selectionEnd;return!(!C||!I)&&(this._columnSelectMode?C[0]<=I[0]?L>=C[0]&&D>=C[1]&&L<I[0]&&D<=I[1]:L<C[0]&&D>=C[1]&&L>=I[0]&&D<=I[1]:D>C[1]&&D<I[1]||C[1]===I[1]&&D===C[1]&&L>=C[0]&&L<I[0]||C[1]<I[1]&&D===I[1]&&L<I[0]||C[1]<I[1]&&D===C[1]&&L>=C[0])}};function E(L,D,C){for(;L.length<C;)L=D+L;return L}n.DomRendererRowFactory=S=u([w(1,d.ICharacterJoinerService),w(2,T.IOptionsService),w(3,d.ICoreBrowserService),w(4,T.ICoreService),w(5,T.IDecorationService),w(6,d.IThemeService)],S)},2550:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const w=c.createElement("span");w.classList.add("xterm-char-measure-element");const f=c.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const y=c.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontStyle="italic";const x=c.createElement("span");x.classList.add("xterm-char-measure-element"),x.style.fontWeight="bold",x.style.fontStyle="italic",this._measureElements=[w,f,y,x],this._container.appendChild(w),this._container.appendChild(f),this._container.appendChild(y),this._container.appendChild(x),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,u,w,f){c===this._font&&u===this._fontSize&&w===this._weight&&f===this._weightBold||(this._font=c,this._fontSize=u,this._weight=w,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${w}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${w}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(c,u,w){let f=0;if(!u&&!w&&c.length===1&&(f=c.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const T=this._measure(c,0);return T>0&&(this._flat[f]=T),T}let y=c;u&&(y+="B"),w&&(y+="I");let x=this._holey.get(y);if(x===void 0){let T=0;u&&(T|=1),w&&(T|=2),x=this._measure(c,T),x>0&&this._holey.set(y,x)}return x}_measure(c,u){const w=this._measureElements[u];return w.textContent=c.repeat(32),w.offsetWidth/32}}},2223:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(v,n)=>{function c(w){return 57508<=w&&w<=57558}function u(w){return w>=128512&&w<=128591||w>=127744&&w<=128511||w>=128640&&w<=128767||w>=9728&&w<=9983||w>=9984&&w<=10175||w>=65024&&w<=65039||w>=129280&&w<=129535||w>=127462&&w<=127487}Object.defineProperty(n,"__esModule",{value:!0}),n.computeNextVariantOffset=n.createRenderDimensions=n.treatGlyphAsBackgroundColor=n.allowRescaling=n.isEmoji=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(w){if(!w)throw new Error("value must not be falsy");return w},n.isPowerlineGlyph=c,n.isRestrictedPowerlineGlyph=function(w){return 57520<=w&&w<=57527},n.isEmoji=u,n.allowRescaling=function(w,f,y,x){return f===1&&y>Math.ceil(1.5*x)&&w!==void 0&&w>255&&!u(w)&&!c(w)&&!function(T){return 57344<=T&&T<=63743}(w)},n.treatGlyphAsBackgroundColor=function(w){return c(w)||function(f){return 9472<=f&&f<=9631}(w)},n.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},n.computeNextVariantOffset=function(w,f,y=0){return(w-(2*Math.round(f)-y))%(2*Math.round(f))}},6052:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class c{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(w,f,y,x=!1){if(this.selectionStart=f,this.selectionEnd=y,!f||!y||f[0]===y[0]&&f[1]===y[1])return void this.clear();const T=w.buffers.active.ydisp,b=f[1]-T,d=y[1]-T,m=Math.max(b,0),o=Math.min(d,w.rows-1);m>=w.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=x,this.viewportStartRow=b,this.viewportEndRow=d,this.viewportCappedStartRow=m,this.viewportCappedEndRow=o,this.startCol=f[0],this.endCol=y[0])}isCellSelected(w,f,y){return!!this.hasSelection&&(y-=w.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&y>=this.viewportCappedStartRow&&f<this.endCol&&y<=this.viewportCappedEndRow:f<this.startCol&&y>=this.viewportCappedStartRow&&f>=this.endCol&&y<=this.viewportCappedEndRow:y>this.viewportStartRow&&y<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&y===this.viewportStartRow&&f>=this.startCol&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&y===this.viewportEndRow&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&y===this.viewportStartRow&&f>=this.startCol)}}n.createSelectionRenderModel=function(){return new c}},456:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.SelectionModel=class{constructor(c){this._bufferService=c,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(v,n,c){var u=this&&this.__decorate||function(o,l,S,E){var L,D=arguments.length,C=D<3?l:E===null?E=Object.getOwnPropertyDescriptor(l,S):E;
10if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(o,l,S,E);else for(var I=o.length-1;I>=0;I--)(L=o[I])&&(C=(D<3?L(C):D>3?L(l,S,C):L(l,S))||C);return D>3&&C&&Object.defineProperty(l,S,C),C},w=this&&this.__param||function(o,l){return function(S,E){l(S,E,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const f=c(2585),y=c(8460),x=c(844);let T=n.CharSizeService=class extends x.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,l,S){super(),this._optionsService=S,this.width=0,this.height=0,this._onCharSizeChange=this.register(new y.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new m(this._optionsService))}catch{this._measureStrategy=this.register(new d(o,l,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())}};n.CharSizeService=T=u([w(2,f.IOptionsService)],T);class b extends x.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,S){l!==void 0&&l>0&&S!==void 0&&S>0&&(this._result.width=l,this._result.height=S)}}class d extends b{constructor(l,S,E){super(),this._document=l,this._parentElement=S,this._optionsService=E,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class m extends b{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const S=this._ctx.measureText("W");if(!("width"in S&&"fontBoundingBoxAscent"in S&&"fontBoundingBoxDescent"in S))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function(v,n,c){var u=this&&this.__decorate||function(m,o,l,S){var E,L=arguments.length,D=L<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(m,o,l,S);else for(var C=m.length-1;C>=0;C--)(E=m[C])&&(D=(L<3?E(D):L>3?E(o,l,D):E(o,l))||D);return L>3&&D&&Object.defineProperty(o,l,D),D},w=this&&this.__param||function(m,o){return function(l,S){o(l,S,m)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const f=c(3734),y=c(643),x=c(511),T=c(2585);class b extends f.AttributeData{constructor(o,l,S){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=l,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=b;let d=n.CharacterJoinerService=class jh{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new x.CellData}register(o){const l={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(l),l.id}deregister(o){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===o)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(o);if(!l||l.length===0)return[];const S=[],E=l.translateToString(!0);let L=0,D=0,C=0,I=l.getFg(0),B=l.getBg(0);for(let U=0;
10U<l.getTrimmedLength();U++)if(l.loadCell(U,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==I||this._workCell.bg!==B){if(U-L>1){const z=this._getJoinedRanges(E,C,D,l,L);for(let q=0;q<z.length;q++)S.push(z[q])}L=U,C=D,I=this._workCell.fg,B=this._workCell.bg}D+=this._workCell.getChars().length||y.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-L>1){const U=this._getJoinedRanges(E,C,D,l,L);for(let z=0;z<U.length;z++)S.push(U[z])}return S}_getJoinedRanges(o,l,S,E,L){const D=o.substring(l,S);let C=[];try{C=this._characterJoiners[0].handler(D)}catch(I){console.error(I)}for(let I=1;I<this._characterJoiners.length;I++)try{const B=this._characterJoiners[I].handler(D);for(let U=0;U<B.length;U++)jh._mergeRanges(C,B[U])}catch(B){console.error(B)}return this._stringRangesToCellRanges(C,E,L),C}_stringRangesToCellRanges(o,l,S){let E=0,L=!1,D=0,C=o[E];if(C){for(let I=S;I<this._bufferService.cols;I++){const B=l.getWidth(I),U=l.getString(I).length||y.WHITESPACE_CELL_CHAR.length;if(B!==0){if(!L&&C[0]<=D&&(C[0]=I,L=!0),C[1]<=D){if(C[1]=I,C=o[++E],!C)break;C[0]<=D?(C[0]=I,L=!0):L=!1}D+=U}}C&&(C[1]=this._bufferService.cols)}}static _mergeRanges(o,l){let S=!1;for(let E=0;E<o.length;E++){const L=o[E];if(S){if(l[1]<=L[0])return o[E-1][1]=l[1],o;if(l[1]<=L[1])return o[E-1][1]=Math.max(l[1],L[1]),o.splice(E,1),o;o.splice(E,1),E--}else{if(l[1]<=L[0])return o.splice(E,0,l),o;if(l[1]<=L[1])return L[0]=Math.min(l[0],L[0]),o;l[0]<L[1]&&(L[0]=Math.min(l[0],L[0]),S=!0)}}return S?o[o.length-1][1]=l[1]:o.push(l),o}};n.CharacterJoinerService=d=u([w(0,T.IBufferService)],d)},5114:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;const u=c(844),w=c(8460),f=c(3656);class y extends u.Disposable{constructor(b,d,m){super(),this._textarea=b,this._window=d,this.mainDocument=m,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new x(this._window),this._onDprChange=this.register(new w.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new w.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(o=>this._screenDprMonitor.setWindow(o))),this.register((0,w.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}get window(){return this._window}set window(b){this._window!==b&&(this._window=b,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}n.CoreBrowserService=y;class x extends u.Disposable{constructor(b){super(),this._parentWindow=b,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new w.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)(()=>this.clearListener()))}setWindow(b){this._parentWindow=b,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,f.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var b;this._outerListener&&((b=this._resolutionMediaMatchList)==null||b.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkProviderService=void 0;const u=c(844);class w extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(y){return this.linkProviders.push(y),{dispose:()=>{const x=this.linkProviders.indexOf(y);
10x!==-1&&this.linkProviders.splice(x,1)}}}}n.LinkProviderService=w},8934:function(v,n,c){var u=this&&this.__decorate||function(T,b,d,m){var o,l=arguments.length,S=l<3?b:m===null?m=Object.getOwnPropertyDescriptor(b,d):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(T,b,d,m);else for(var E=T.length-1;E>=0;E--)(o=T[E])&&(S=(l<3?o(S):l>3?o(b,d,S):o(b,d))||S);return l>3&&S&&Object.defineProperty(b,d,S),S},w=this&&this.__param||function(T,b){return function(d,m){b(d,m,T)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const f=c(4725),y=c(9806);let x=n.MouseService=class{constructor(T,b){this._renderService=T,this._charSizeService=b}getCoords(T,b,d,m,o){return(0,y.getCoords)(window,T,b,d,m,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(T,b){const d=(0,y.getCoordsRelativeToElement)(window,T,b);if(this._charSizeService.hasValidSize)return d[0]=Math.min(Math.max(d[0],0),this._renderService.dimensions.css.canvas.width-1),d[1]=Math.min(Math.max(d[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(d[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(d[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(d[0]),y:Math.floor(d[1])}}};n.MouseService=x=u([w(0,f.IRenderService),w(1,f.ICharSizeService)],x)},3230:function(v,n,c){var u=this&&this.__decorate||function(o,l,S,E){var L,D=arguments.length,C=D<3?l:E===null?E=Object.getOwnPropertyDescriptor(l,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(o,l,S,E);else for(var I=o.length-1;I>=0;I--)(L=o[I])&&(C=(D<3?L(C):D>3?L(l,S,C):L(l,S))||C);return D>3&&C&&Object.defineProperty(l,S,C),C},w=this&&this.__param||function(o,l){return function(S,E){l(S,E,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const f=c(6193),y=c(4725),x=c(8460),T=c(844),b=c(7226),d=c(2585);let m=n.RenderService=class extends T.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,l,S,E,L,D,C,I){super(),this._rowCount=o,this._charSizeService=E,this._renderer=this.register(new T.MutableDisposable),this._pausedResizeTask=new b.DebouncedIdleTask,this._observerDisposable=this.register(new T.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new x.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new x.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new x.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new x.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer((B,U)=>this._renderRows(B,U),C),this.register(this._renderDebouncer),this.register(C.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(D.onResize(()=>
10this._fullRefresh())),this.register(D.buffers.onBufferActivate(()=>{var B;return(B=this._renderer.value)==null?void 0:B.clear()})),this.register(S.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(L.onDecorationRegistered(()=>this._fullRefresh())),this.register(L.onDecorationRemoved(()=>this._fullRefresh())),this.register(S.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(D.cols,D.rows),this._fullRefresh()})),this.register(S.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(D.buffer.y,D.buffer.y,!0))),this.register(I.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(C.window,l),this.register(C.onWindowChange(B=>this._registerIntersectionObserver(B,l)))}_registerIntersectionObserver(o,l){if("IntersectionObserver"in o){const S=new o.IntersectionObserver(E=>this._handleIntersectionChange(E[E.length-1]),{threshold:0});S.observe(l),this._observerDisposable.value=(0,T.toDisposable)(()=>S.disconnect())}}_handleIntersectionChange(o){this._isPaused=o.isIntersecting===void 0?o.intersectionRatio===0:!o.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(o,l,S=!1){this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,l,this._rowCount))}_renderRows(o,l){this._renderer.value&&(o=Math.min(o,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(o,l),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:o,end:l}),this._onRender.fire({start:o,end:l}),this._isNextRenderRedrawOnly=!0)}resize(o,l){this._rowCount=l,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(o){this._renderer.value=o,this._renderer.value&&(this._renderer.value.onRequestRedraw(l=>this.refreshRows(l.start,l.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(o){return this._renderDebouncer.addRefreshCallback(o)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var o,l;this._renderer.value&&((l=(o=this._renderer.value).clearTextureAtlas)==null||l.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var S;return(S=this._renderer.value)==null?void 0:S.handleResize(o,l)}):this._renderer.value.handleResize(o,l),this._fullRefresh())}handleCharSizeChanged(){var o;(o=this._renderer.value)==null||o.handleCharSizeChanged()}handleBlur(){var o;(o=this._renderer.value)==null||o.handleBlur()}handleFocus(){var o;(o=this._renderer.value)==null||o.handleFocus()}handleSelectionChanged(o,l,S){var E;this._selectionState.start=o,this._selectionState.end=l,this._selectionState.columnSelectMode=S,(E=this._renderer.value)==null||E.handleSelectionChanged(o,l,S)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};n.RenderService=m=u([w(2,d.IOptionsService),w(3,y.ICharSizeService),w(4,d.IDecorationService),w(5,d.IBufferService),w(6,y.ICoreBrowserService),w(7,y.IThemeService)],m)},9312:function(v,n,c){var u=this&&this.__decorate||function(C,I,B,U){var z,q=arguments.length,J=q<3?I:U===null?U=Object.getOwnPropertyDescriptor(I,B):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")J=Reflect.decorate(C,I,B,U);else for(var se=C.length-1;se>=0;se--)(z=C[se])&&(J=(q<3?z(J):q>3?z(I,B,J):z(I,B))||J);return q>3&&J&&Object.defineProperty(I,B,J),J},w=this&&this.__param||function(C,I){return function(B,U){I(B,U,C)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const f=c(9806),y=c(9504),x=c(456),T=c(4725),b=c(8460),d=c(844),m=c(6114),o=c(4841),l=c(511),S=c(2585),E=String.fromCharCode(160),L=new RegExp(E,"g");let D=n.SelectionService=class extends d.Disposable{constructor(C,I,B,U,z,q,J,se,ce){super(),this._element=C,this._screenElement=I,this._linkifier=B,this._bufferService=U,this._coreService=z,this._mouseService=q,this._optionsService=J,this._renderService=se,this._coreBrowserService=ce,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new b.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new b.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new b.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=me=>this._handleMouseMove(me),this._mouseUpListener=me=>this._handleMouseUp(me),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(me=>this._handleTrim(me)),this.register(this._bufferService.buffers.onBufferActivate(me=>this._handleBufferActivate(me))),this.enable(),this._model=new x.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,d.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const C=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!C||!I||C[0]===I[0]&&C[1]===I[1])}get selectionText(){const C=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;if(!C||!I)return"";const B=this._bufferService.buffer,U=[];if(this._activeSelectionMode===3){if(C[0]===I[0])return"";const z=C[0]<I[0]?C[0]:I[0],q=C[0]<I[0]?I[0]:C[0];for(let J=C[1];J<=I[1];J++){const se=B.translateBufferLineToString(J,!0,z,q);U.push(se)}}else{const z=C[1]===I[1]?I[0]:void 0;U.push(B.translateBufferLineToString(C[1],!0,C[0],z));for(let q=C[1]+1;q<=I[1]-1;q++){const J=B.lines.get(q),se=B.translateBufferLineToString(q,!0);J!=null&&J.isWrapped?U[U.length-1]+=se:U.push(se)}if(C[1]!==I[1]){const q=B.lines.get(I[1]),J=B.translateBufferLineToString(I[1],!0,0,I[0]);q&&q.isWrapped?U[U.length-1]+=J:U.push(J)}}return U.map(z=>z.replace(L," ")).join(m.isWindows?`\r 11`:` 12`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(C){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>
vendor: 5,323 bytes, line 12
12this._refresh())),m.isLinux&&C&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(C){const I=this._getMouseBufferCoords(C),B=this._model.finalSelectionStart,U=this._model.finalSelectionEnd;return!!(B&&U&&I)&&this._areCoordsInSelection(I,B,U)}isCellInSelection(C,I){const B=this._model.finalSelectionStart,U=this._model.finalSelectionEnd;return!(!B||!U)&&this._areCoordsInSelection([C,I],B,U)}_areCoordsInSelection(C,I,B){return C[1]>I[1]&&C[1]<B[1]||I[1]===B[1]&&C[1]===I[1]&&C[0]>=I[0]&&C[0]<B[0]||I[1]<B[1]&&C[1]===B[1]&&C[0]<B[0]||I[1]<B[1]&&C[1]===I[1]&&C[0]>=I[0]}_selectWordAtCursor(C,I){var z,q;const B=(q=(z=this._linkifier.currentLink)==null?void 0:z.link)==null?void 0:q.range;if(B)return this._model.selectionStart=[B.start.x-1,B.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(B,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const U=this._getMouseBufferCoords(C);return!!U&&(this._selectWordAt(U,I),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(C,I){this._model.clearSelection(),C=Math.max(C,0),I=Math.min(I,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,C],this._model.selectionEnd=[this._bufferService.cols,I],this.refresh(),this._onSelectionChange.fire()}_handleTrim(C){this._model.handleTrim(C)&&this.refresh()}_getMouseBufferCoords(C){const I=this._mouseService.getCoords(C,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(I)return I[0]--,I[1]--,I[1]+=this._bufferService.buffer.ydisp,I}_getMouseEventScrollAmount(C){let I=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,C,this._screenElement)[1];const B=this._renderService.dimensions.css.canvas.height;return I>=0&&I<=B?0:(I>B&&(I-=B),I=Math.min(Math.max(I,-50),50),I/=50,I/Math.abs(I)+Math.round(14*I))}shouldForceSelection(C){return m.isMac?C.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:C.shiftKey}handleMouseDown(C){if(this._mouseDownTimeStamp=C.timeStamp,(C.button!==2||!this.hasSelection)&&C.button===0){if(!this._enabled){if(!this.shouldForceSelection(C))return;C.stopPropagation()}C.preventDefault(),this._dragScrollAmount=0,this._enabled&&C.shiftKey?this._handleIncrementalClick(C):C.detail===1?this._handleSingleClick(C):C.detail===2?this._handleDoubleClick(C):C.detail===3&&this._handleTripleClick(C),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(C){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(C))}_handleSingleClick(C){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(C)?3:0,this._model.selectionStart=this._getMouseBufferCoords(C),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const I=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);I&&I.length!==this._model.selectionStart[0]&&I.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(C){this._selectWordAtCursor(C,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(C){const I=this._getMouseBufferCoords(C);I&&(this._activeSelectionMode=2,this._selectLineAt(I[1]))}shouldColumnSelect(C){return C.altKey&&!(m.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(C){if(C.stopImmediatePropagation(),!this._model.selectionStart)return;const I=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(C),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(C),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const B=this._bufferService.buffer;if(this._model.selectionEnd[1]<B.lines.length){const U=B.lines.get(this._model.selectionEnd[1]);U&&U.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}
12I&&I[0]===this._model.selectionEnd[0]&&I[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const C=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(C.ydisp+this._bufferService.rows,C.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=C.ydisp),this.refresh()}}_handleMouseUp(C){const I=C.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&I<500&&C.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const B=this._mouseService.getCoords(C,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(B&&B[0]!==void 0&&B[1]!==void 0){const U=(0,y.moveToCellSequence)(B[0]-1,B[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(U,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const C=this._model.finalSelectionStart,I=this._model.finalSelectionEnd,B=!(!C||!I||C[0]===I[0]&&C[1]===I[1]);B?C&&I&&(this._oldSelectionStart&&this._oldSelectionEnd&&C[0]===this._oldSelectionStart[0]&&C[1]===this._oldSelectionStart[1]&&I[0]===this._oldSelectionEnd[0]&&I[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(C,I,B)):this._oldHasSelection&&this._fireOnSelectionChange(C,I,B)}_fireOnSelectionChange(C,I,B){this._oldSelectionStart=C,this._oldSelectionEnd=I,this._oldHasSelection=B,this._onSelectionChange.fire()}_handleBufferActivate(C){this.clearSelection(),this._trimListener.dispose(),this._trimListener=C.activeBuffer.lines.onTrim(I=>this._handleTrim(I))}_convertViewportColToCharacterIndex(C,I){let B=I;for(let U=0;I>=U;U++){const z=C.loadCell(U,this._workCell).getChars().length;this._workCell.getWidth()===0?B--:z>1&&I!==U&&(B+=z-1)}return B}setSelection(C,I,B){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[C,I],this._model.selectionStartLength=B,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(C){this._isClickInSelection(C)||(this._selectWordAtCursor(C,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(C,I,B=!0,U=!0){if(C[0]>=this._bufferService.cols)return;const z=this._bufferService.buffer,q=z.lines.get(C[1]);if(!q)return;const J=z.translateBufferLineToString(C[1],!1);let se=this._convertViewportColToCharacterIndex(q,C[0]),ce=se;const me=C[0]-se;let pe=0,M=0,W=0,V=0;if(J.charAt(se)===" "){for(;se>0&&J.charAt(se-1)===" ";)se--;for(;ce<J.length&&J.charAt(ce+1)===" ";)ce++}else{let _e=C[0],Se=C[0];q.getWidth(_e)===0&&(pe++,_e--),q.getWidth(Se)===2&&(M++,Se++);const ie=q.getString(Se).length;for(ie>1&&(V+=ie-1,ce+=ie-1);_e>0&&se>0&&!this._isCharWordSeparator(q.loadCell(_e-1,this._workCell));){q.loadCell(_e-1,this._workCell);const K=this._workCell.getChars().length;this._workCell.getWidth()===0?(pe++,_e--):K>1&&(W+=K-1,se-=K-1),se--,_e--}for(;Se<q.length&&ce+1<J.length&&!this._isCharWordSeparator(q.loadCell(Se+1,this._workCell));){q.loadCell(Se+1,this._workCell);const K=this._workCell.getChars().length;this._workCell.getWidth()===2?(M++,Se++):K>1&&(V+=K-1,ce+=K-1),ce++,Se++}}ce++;let G=se+me-pe+W,fe=Math.min(this._bufferService.cols,ce-se+pe+M-W-V);if(I||J.slice(se,ce).trim()!==""){if(B&&G===0&&q.getCodePoint(0)!==32){const _e=z.lines.get(C[1]-1);if(_e&&q.isWrapped&&_e.getCodePoint(this._bufferService.cols-1)!==32){const Se=this._getWordAt([this._bufferService.cols-1,C[1]-1],!1,!0,!1);if(Se){const ie=this._bufferService.cols-Se.start;G-=ie,fe+=ie}}}if(U&&G+fe===this._bufferService.cols&&q.getCodePoint(this._bufferService.cols-1)!==32){const _e=z.lines.get(C[1]+1);if((_e==null?void 0:_e.isWrapped)&&_e.getCodePoint(0)!==32){const Se=this._getWordAt([0,C[1]+1],!1,!1,!0);Se&&(fe+=Se.length)}}return{start:G,length:fe}}}_selectWordAt(C,I){const B=this._getWordAt(C,I);if(B){for(;B.start<0;)B.start+=this._bufferService.cols,C[1]--;this._model.selectionStart=[B.start,C[1]],this._model.selectionStartLength=B.length}}
12_selectToWordAt(C){const I=this._getWordAt(C,!0);if(I){let B=C[1];for(;I.start<0;)I.start+=this._bufferService.cols,B--;if(!this._model.areSelectionValuesReversed())for(;I.start+I.length>this._bufferService.cols;)I.length-=this._bufferService.cols,B++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?I.start:I.start+I.length,B]}}_isCharWordSeparator(C){return C.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(C.getChars())>=0}_selectLineAt(C){const I=this._bufferService.buffer.getWrappedRangeForLine(C),B={start:{x:0,y:I.first},end:{x:this._bufferService.cols-1,y:I.last}};this._model.selectionStart=[0,I.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(B,this._bufferService.cols)}};n.SelectionService=D=u([w(3,S.IBufferService),w(4,S.ICoreService),w(5,T.IMouseService),w(6,S.IOptionsService),w(7,T.IRenderService),w(8,T.ICoreBrowserService)],D)},4725:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ILinkProviderService=n.IThemeService=n.ICharacterJoinerService=n.ISelectionService=n.IRenderService=n.IMouseService=n.ICoreBrowserService=n.ICharSizeService=void 0;const u=c(8343);n.ICharSizeService=(0,u.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),n.IMouseService=(0,u.createDecorator)("MouseService"),n.IRenderService=(0,u.createDecorator)("RenderService"),n.ISelectionService=(0,u.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,u.createDecorator)("ThemeService"),n.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(v,n,c){var u=this&&this.__decorate||function(D,C,I,B){var U,z=arguments.length,q=z<3?C:B===null?B=Object.getOwnPropertyDescriptor(C,I):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(D,C,I,B);else for(var J=D.length-1;J>=0;J--)(U=D[J])&&(q=(z<3?U(q):z>3?U(C,I,q):U(C,I))||q);return z>3&&q&&Object.defineProperty(C,I,q),q},w=this&&this.__param||function(D,C){return function(I,B){C(I,B,D)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const f=c(7239),y=c(8055),x=c(8460),T=c(844),b=c(2585),d=y.css.toColor("#ffffff"),m=y.css.toColor("#000000"),o=y.css.toColor("#ffffff"),l=y.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const D=[y.css.toColor("#2e3436"),y.css.toColor("#cc0000"),y.css.toColor("#4e9a06"),y.css.toColor("#c4a000"),y.css.toColor("#3465a4"),y.css.toColor("#75507b"),y.css.toColor("#06989a"),y.css.toColor("#d3d7cf"),y.css.toColor("#555753"),y.css.toColor("#ef2929"),y.css.toColor("#8ae234"),y.css.toColor("#fce94f"),y.css.toColor("#729fcf"),y.css.toColor("#ad7fa8"),y.css.toColor("#34e2e2"),y.css.toColor("#eeeeec")],C=[0,95,135,175,215,255];for(let I=0;I<216;I++){const B=C[I/36%6|0],U=C[I/6%6|0],z=C[I%6];D.push({css:y.channels.toCss(B,U,z),rgba:y.channels.toRgba(B,U,z)})}for(let I=0;I<24;I++){const B=8+10*I;D.push({css:y.channels.toCss(B,B,B),rgba:y.channels.toRgba(B,B,B)})}return D})());let E=n.ThemeService=class extends T.Disposable{get colors(){return this._colors}constructor(D){super(),this._optionsService=D,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new x.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:d,background:m,cursor:o,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:y.color.blend(m,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:y.color.blend(m,S),ansi:n.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(D={}){const C=this._colors;if(C.foreground=L(D.foreground,d),C.background=L(D.background,m),C.cursor=L(D.cursor,o),C.cursorAccent=L(D.cursorAccent,l),C.selectionBackgroun
vendor: 4,143 bytes, line 12
12dTransparent=L(D.selectionBackground,S),C.selectionBackgroundOpaque=y.color.blend(C.background,C.selectionBackgroundTransparent),C.selectionInactiveBackgroundTransparent=L(D.selectionInactiveBackground,C.selectionBackgroundTransparent),C.selectionInactiveBackgroundOpaque=y.color.blend(C.background,C.selectionInactiveBackgroundTransparent),C.selectionForeground=D.selectionForeground?L(D.selectionForeground,y.NULL_COLOR):void 0,C.selectionForeground===y.NULL_COLOR&&(C.selectionForeground=void 0),y.color.isOpaque(C.selectionBackgroundTransparent)&&(C.selectionBackgroundTransparent=y.color.opacity(C.selectionBackgroundTransparent,.3)),y.color.isOpaque(C.selectionInactiveBackgroundTransparent)&&(C.selectionInactiveBackgroundTransparent=y.color.opacity(C.selectionInactiveBackgroundTransparent,.3)),C.ansi=n.DEFAULT_ANSI_COLORS.slice(),C.ansi[0]=L(D.black,n.DEFAULT_ANSI_COLORS[0]),C.ansi[1]=L(D.red,n.DEFAULT_ANSI_COLORS[1]),C.ansi[2]=L(D.green,n.DEFAULT_ANSI_COLORS[2]),C.ansi[3]=L(D.yellow,n.DEFAULT_ANSI_COLORS[3]),C.ansi[4]=L(D.blue,n.DEFAULT_ANSI_COLORS[4]),C.ansi[5]=L(D.magenta,n.DEFAULT_ANSI_COLORS[5]),C.ansi[6]=L(D.cyan,n.DEFAULT_ANSI_COLORS[6]),C.ansi[7]=L(D.white,n.DEFAULT_ANSI_COLORS[7]),C.ansi[8]=L(D.brightBlack,n.DEFAULT_ANSI_COLORS[8]),C.ansi[9]=L(D.brightRed,n.DEFAULT_ANSI_COLORS[9]),C.ansi[10]=L(D.brightGreen,n.DEFAULT_ANSI_COLORS[10]),C.ansi[11]=L(D.brightYellow,n.DEFAULT_ANSI_COLORS[11]),C.ansi[12]=L(D.brightBlue,n.DEFAULT_ANSI_COLORS[12]),C.ansi[13]=L(D.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),C.ansi[14]=L(D.brightCyan,n.DEFAULT_ANSI_COLORS[14]),C.ansi[15]=L(D.brightWhite,n.DEFAULT_ANSI_COLORS[15]),D.extendedAnsi){const I=Math.min(C.ansi.length-16,D.extendedAnsi.length);for(let B=0;B<I;B++)C.ansi[B+16]=L(D.extendedAnsi[B],n.DEFAULT_ANSI_COLORS[B+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(D){this._restoreColor(D),this._onChangeColors.fire(this.colors)}_restoreColor(D){if(D!==void 0)switch(D){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[D]=this._restoreColors.ansi[D]}else for(let C=0;C<this._restoreColors.ansi.length;++C)this._colors.ansi[C]=this._restoreColors.ansi[C]}modifyColors(D){D(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function L(D,C){if(D!==void 0)try{return y.css.toColor(D)}catch{}return C}n.ThemeService=E=u([w(0,b.IOptionsService)],E)},6349:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const u=c(8460),w=c(844);class f extends w.Disposable{constructor(x){super(),this._maxLength=x,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(x){if(this._maxLength===x)return;const T=new Array(x);for(let b=0;b<Math.min(x,this.length);b++)T[b]=this._array[this._getCyclicIndex(b)];this._array=T,this._maxLength=x,this._startIndex=0}get length(){return this._length}set length(x){if(x>this._length)for(let T=this._length;T<x;T++)this._array[T]=void 0;this._length=x}get(x){return this._array[this._getCyclicIndex(x)]}set(x,T){this._array[this._getCyclicIndex(x)]=T}push(x){this._array[this._getCyclicIndex(this._length)]=x,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.f
12ire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(x,T,...b){if(T){for(let d=x;d<this._length-T;d++)this._array[this._getCyclicIndex(d)]=this._array[this._getCyclicIndex(d+T)];this._length-=T,this.onDeleteEmitter.fire({index:x,amount:T})}for(let d=this._length-1;d>=x;d--)this._array[this._getCyclicIndex(d+b.length)]=this._array[this._getCyclicIndex(d)];for(let d=0;d<b.length;d++)this._array[this._getCyclicIndex(x+d)]=b[d];if(b.length&&this.onInsertEmitter.fire({index:x,amount:b.length}),this._length+b.length>this._maxLength){const d=this._length+b.length-this._maxLength;this._startIndex+=d,this._length=this._maxLength,this.onTrimEmitter.fire(d)}else this._length+=b.length}trimStart(x){x>this._length&&(x=this._length),this._startIndex+=x,this._length-=x,this.onTrimEmitter.fire(x)}shiftElements(x,T,b){if(!(T<=0)){if(x<0||x>=this._length)throw new Error("start argument out of range");if(x+b<0)throw new Error("Cannot shift elements in list beyond index 0");if(b>0){for(let m=T-1;m>=0;m--)this.set(x+m+b,this.get(x+m));const d=x+T+b-this._length;if(d>0)for(this._length+=d;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let d=0;d<T;d++)this.set(x+d+b,this.get(x+d))}}_getCyclicIndex(x){return(this._startIndex+x)%this._maxLength}}n.CircularList=f},1439:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function c(u,w=5){if(typeof u!="object")return u;const f=Array.isArray(u)?[]:{};for(const y in u)f[y]=w<=1?u[y]:u[y]&&c(u[y],w-1);return f}},8055:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let c=0,u=0,w=0,f=0;var y,x,T,b,d;function m(l){const S=l.toString(16);return S.length<2?"0"+S:S}function o(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},function(l){l.toCss=function(S,E,L,D){return D!==void 0?`#${m(S)}${m(E)}${m(L)}${m(D)}`:`#${m(S)}${m(E)}${m(L)}`},l.toRgba=function(S,E,L,D=255){return(S<<24|E<<16|L<<8|D)>>>0},l.toColor=function(S,E,L,D){return{css:l.toCss(S,E,L,D),rgba:l.toRgba(S,E,L,D)}}}(y||(n.channels=y={})),function(l){function S(E,L){return f=Math.round(255*L),[c,u,w]=d.toChannels(E.rgba),{css:y.toCss(c,u,w,f),rgba:y.toRgba(c,u,w,f)}}l.blend=function(E,L){if(f=(255&L.rgba)/255,f===1)return{css:L.css,rgba:L.rgba};const D=L.rgba>>24&255,C=L.rgba>>16&255,I=L.rgba>>8&255,B=E.rgba>>24&255,U=E.rgba>>16&255,z=E.rgba>>8&255;return c=B+Math.round((D-B)*f),u=U+Math.round((C-U)*f),w=z+Math.round((I-z)*f),{css:y.toCss(c,u,w),rgba:y.toRgba(c,u,w)}},l.isOpaque=function(E){return(255&E.rgba)==255},l.ensureContrastRatio=function(E,L,D){const C=d.ensureContrastRatio(E.rgba,L.rgba,D);if(C)return y.toColor(C>>24&255,C>>16&255,C>>8&255)},l.opaque=function(E){const L=(255|E.rgba)>>>0;return[c,u,w]=d.toChannels(L),{css:y.toCss(c,u,w),rgba:L}},l.opacity=S,l.multiplyOpacity=function(E,L){return f=255&E.rgba,S(E,f*L/255)},l.toColorRGB=function(E){return[E.rgba>>24&255,E.rgba>>16&255,E.rgba>>8&255]}}(x||(n.color=x={})),function(l){let S,E;try{const L=document.createElement("canvas");L.width=1,L.height=1;const D=L.getContext("2d",{willReadFrequently:!0});D&&(S=D,S.globalCompositeOperation="copy",E=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(L){if(L.match(/#[\da-f]{3,8}/i))switch(L.length){case 4:return c=parseInt(L.slice(1,2).repeat(2),16),u=parseInt(L.slice(2,3).repeat(2),16),w=parseInt(L.slice(3,4).repeat(2),16),y.toColor(c,u,w);case 5:return c=parseInt(L.slice(1,2).repeat(2),16),u=parseInt(L.slice(2,3).repeat(2),16),w=parseInt(L.slice(3,4).repeat(2),16),f=parseInt(L.slice(4,5).repeat(2),16),y.toColor(c,u,w,f);case 7:return{css:L,rgba:(parseInt(L.slice(1),16)<<8|255)>>>0};case 9:return{css:L,rgba:parseInt(L.slice(1),16)>>>0}}const D=L.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(D)return c=parseInt(D[1]),u=parseInt(D[2]),w=parseInt(D[3]),f=Math.round(255*(D[5]===void 0?1:parseFloat(D[5]))),y.toColor(c,u,w,f);if(!S||!E)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=E,S.fillStyle=L,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[c,u,w,f]=S.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:y.toRgba(c,u,w,f),css:L}}}(T||(n.css=T={})),function(l){function S(E,L,D){const C=E/255,I=L/255,B=D/255;return .2126*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.7152*(I<=.03928?I/12.92:Math.pow((I+.
12055)/1.055,2.4))+.0722*(B<=.03928?B/12.92:Math.pow((B+.055)/1.055,2.4))}l.relativeLuminance=function(E){return S(E>>16&255,E>>8&255,255&E)},l.relativeLuminance2=S}(b||(n.rgb=b={})),function(l){function S(L,D,C){const I=L>>24&255,B=L>>16&255,U=L>>8&255;let z=D>>24&255,q=D>>16&255,J=D>>8&255,se=o(b.relativeLuminance2(z,q,J),b.relativeLuminance2(I,B,U));for(;se<C&&(z>0||q>0||J>0);)z-=Math.max(0,Math.ceil(.1*z)),q-=Math.max(0,Math.ceil(.1*q)),J-=Math.max(0,Math.ceil(.1*J)),se=o(b.relativeLuminance2(z,q,J),b.relativeLuminance2(I,B,U));return(z<<24|q<<16|J<<8|255)>>>0}function E(L,D,C){const I=L>>24&255,B=L>>16&255,U=L>>8&255;let z=D>>24&255,q=D>>16&255,J=D>>8&255,se=o(b.relativeLuminance2(z,q,J),b.relativeLuminance2(I,B,U));for(;se<C&&(z<255||q<255||J<255);)z=Math.min(255,z+Math.ceil(.1*(255-z))),q=Math.min(255,q+Math.ceil(.1*(255-q))),J=Math.min(255,J+Math.ceil(.1*(255-J))),se=o(b.relativeLuminance2(z,q,J),b.relativeLuminance2(I,B,U));return(z<<24|q<<16|J<<8|255)>>>0}l.blend=function(L,D){if(f=(255&D)/255,f===1)return D;const C=D>>24&255,I=D>>16&255,B=D>>8&255,U=L>>24&255,z=L>>16&255,q=L>>8&255;return c=U+Math.round((C-U)*f),u=z+Math.round((I-z)*f),w=q+Math.round((B-q)*f),y.toRgba(c,u,w)},l.ensureContrastRatio=function(L,D,C){const I=b.relativeLuminance(L>>8),B=b.relativeLuminance(D>>8);if(o(I,B)<C){if(B<I){const q=S(L,D,C),J=o(I,b.relativeLuminance(q>>8));if(J<C){const se=E(L,D,C);return J>o(I,b.relativeLuminance(se>>8))?q:se}return q}const U=E(L,D,C),z=o(I,b.relativeLuminance(U>>8));if(z<C){const q=S(L,D,C);return z>o(I,b.relativeLuminance(q>>8))?U:q}return U}},l.reduceLuminance=S,l.increaseLuminance=E,l.toChannels=function(L){return[L>>24&255,L>>16&255,L>>8&255,255&L]}}(d||(n.rgba=d={})),n.toPaddedHex=m,n.contrastRatio=o},8969:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const u=c(844),w=c(2585),f=c(4348),y=c(7866),x=c(744),T=c(7302),b=c(6975),d=c(8460),m=c(1753),o=c(1480),l=c(7994),S=c(9282),E=c(5435),L=c(5981),D=c(2660);let C=!1;class I extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new d.EventEmitter),this._onScroll.event(U=>{var z;(z=this._onScrollApi)==null||z.fire(U.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(U){for(const z in U)this.optionsService.options[z]=U[z]}constructor(U){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new d.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new d.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new d.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new d.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new d.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new T.OptionsService(U)),this._instantiationService.setService(w.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(x.BufferService)),this._instantiationService.setService(w.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(y.LogService)),this._instantiationService.setService(w.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(b.CoreService)),this._instantiationService.setService(w.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(m.CoreMouseService)),this._instantiationService.setService(w.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(w.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(w.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(D.OscLinkService),this._instantiationService.setService(w.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new E.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,d.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,d.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,d.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,d.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(z=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(z=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new L.WriteBuffer((z,q)=>this._inputHandler.parse(z,q))),this.register((0,d.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(U,z){this._writeBuffer.write(U,z)}writeSync(U,z){this._logService.logLevel<=w.LogLevelEnum.WARN&&!C&&(this._logService.warn("writeSync is unreliable and will be removed soon."),C=!0),this._writeBuffer.writeSync(U,z)}input(U,z=!0){this.coreService.triggerDataEvent(U,z)}resize(U,z){isNaN(U)||isNaN(z)||(U=Math.max(U,x.MINIMUM_COLS),z=Math.max(z,x.MINIMUM_ROWS),this._bufferService.resize(U,z))}scroll(U,z=!1){this._bufferService.scroll(U,z)}scrollLines(U,z,q){this._bufferService.scrollLines(U,z,q)}scrollPages(U){this.scrollLines(U*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(U){const z=U-this._bufferService.buffer.ydisp;z!==0&&this.scrollLines(z)}registerEscHandler(U,z){return this._inputHandler.registerEscHandler(U,z)}registerDcsHandler(U,z){return this._inputHandler.registerDcsHandler(U,z)}
12registerCsiHandler(U,z){return this._inputHandler.registerCsiHandler(U,z)}registerOscHandler(U,z){return this._inputHandler.registerOscHandler(U,z)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let U=!1;const z=this.optionsService.rawOptions.windowsPty;z&&z.buildNumber!==void 0&&z.buildNumber!==void 0?U=z.backend==="conpty"&&z.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(U=!0),U?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const U=[];U.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),U.push(this.registerCsiHandler({final:"H"},()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)(()=>{for(const z of U)z.dispose()})}}}n.CoreTerminal=I},8460:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;u<this._listeners.length;u++)if(this._listeners[u]===c)return void this._listeners.splice(u,1)}}})),this._event}fire(c,u){const w=[];for(let f=0;f<this._listeners.length;f++)w.push(this._listeners[f]);for(let f=0;f<w.length;f++)w[f].call(void 0,c,u)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(c,u){return c(w=>u.fire(w))},n.runAndSubscribe=function(c,u){return u(void 0),c(w=>u(w))}},5435:function(v,n,c){var u=this&&this.__decorate||function(pe,M,W,V){var G,fe=arguments.length,_e=fe<3?M:V===null?V=Object.getOwnPropertyDescriptor(M,W):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_e=Reflect.decorate(pe,M,W,V);else for(var Se=pe.length-1;Se>=0;Se--)(G=pe[Se])&&(_e=(fe<3?G(_e):fe>3?G(M,W,_e):G(M,W))||_e);return fe>3&&_e&&Object.defineProperty(M,W,_e),_e},w=this&&this.__param||function(pe,M){return function(W,V){M(W,V,pe)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const f=c(2584),y=c(7116),x=c(2015),T=c(844),b=c(482),d=c(8437),m=c(8460),o=c(643),l=c(511),S=c(3734),E=c(2585),L=c(1480),D=c(6242),C=c(6351),I=c(5941),B={"(":0,")":1,"*":2,"+":3,"-":1,".":2},U=131072;function z(pe,M){if(pe>24)return M.setWinLines||!1;switch(pe){case 1:return!!M.restoreWin;case 2:return!!M.minimizeWin;case 3:return!!M.setWinPosition;case 4:return!!M.setWinSizePixels;case 5:return!!M.raiseWin;case 6:return!!M.lowerWin;case 7:return!!M.refreshWin;case 8:return!!M.setWinSizeChars;case 9:return!!M.maximizeWin;case 10:return!!M.fullscreenWin;case 11:return!!M.getWinState;case 13:return!!M.getWinPosition;case 14:return!!M.getWinSizePixels;case 15:return!!M.getScreenSizePixels;case 16:return!!M.getCellSizePixels;case 18:return!!M.getWinSizeChars;case 19:return!!M.getScreenSizeChars;case 20:return!!M.getIconTitle;case 21:return!!M.getWinTitle;case 22:return!!M.pushTitle;case 23:return!!M.popTitle;case 24:return!!M.setWinLines}return!1}var q;(function(pe){pe[pe.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",pe[pe.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(q||(n.WindowsOptionsReportType=q={}));let J=0;class se extends T.Disposable{getAttrData(){return this._curAttrData}constructor(M,W,V,G,fe,_e,Se,ie,K=new x.EscapeSequenceParser){super(),this._bufferService=M,this._charsetService=W,this._coreService=V,this._logService=G,this._optionsService=fe,this._oscLinkService=_e,this._coreMouseService=Se,this._unicodeService=ie,this._parser=K,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new b.StringToUtf32,this._utf8Decoder=new b.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=d.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=d.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new m.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new m.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new m.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new m.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new m.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new m.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new m.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new m.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new m.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new m.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new m.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new m.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new m.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new ce(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(H=>
12this._activeBuffer=H.activeBuffer)),this._parser.setCsiHandlerFallback((H,de)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(H),params:de.toArray()})}),this._parser.setEscHandlerFallback(H=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(H)})}),this._parser.setExecuteHandlerFallback(H=>{this._logService.debug("Unknown EXECUTE code: ",{code:H})}),this._parser.setOscHandlerFallback((H,de,ue)=>{this._logService.debug("Unknown OSC code: ",{identifier:H,action:de,data:ue})}),this._parser.setDcsHandlerFallback((H,de,ue)=>{de==="HOOK"&&(ue=ue.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(H),action:de,payload:ue})}),this._parser.setPrintHandler((H,de,ue)=>this.print(H,de,ue)),this._parser.registerCsiHandler({final:"@"},H=>this.insertChars(H)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},H=>this.scrollLeft(H)),this._parser.registerCsiHandler({final:"A"},H=>this.cursorUp(H)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},H=>this.scrollRight(H)),this._parser.registerCsiHandler({final:"B"},H=>this.cursorDown(H)),this._parser.registerCsiHandler({final:"C"},H=>this.cursorForward(H)),this._parser.registerCsiHandler({final:"D"},H=>this.cursorBackward(H)),this._parser.registerCsiHandler({final:"E"},H=>this.cursorNextLine(H)),this._parser.registerCsiHandler({final:"F"},H=>this.cursorPrecedingLine(H)),this._parser.registerCsiHandler({final:"G"},H=>this.cursorCharAbsolute(H)),this._parser.registerCsiHandler({final:"H"},H=>this.cursorPosition(H)),this._parser.registerCsiHandler({final:"I"},H=>this.cursorForwardTab(H)),this._parser.registerCsiHandler({final:"J"},H=>this.eraseInDisplay(H,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},H=>this.eraseInDisplay(H,!0)),this._parser.registerCsiHandler({final:"K"},H=>this.eraseInLine(H,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},H=>this.eraseInLine(H,!0)),this._parser.registerCsiHandler({final:"L"},H=>this.insertLines(H)),this._parser.registerCsiHandler({final:"M"},H=>this.deleteLines(H)),this._parser.registerCsiHandler({final:"P"},H=>this.deleteChars(H)),this._parser.registerCsiHandler({final:"S"},H=>this.scrollUp(H)),this._parser.registerCsiHandler({final:"T"},H=>this.scrollDown(H)),this._parser.registerCsiHandler({final:"X"},H=>this.eraseChars(H)),this._parser.registerCsiHandler({final:"Z"},H=>this.cursorBackwardTab(H)),this._parser.registerCsiHandler({final:"`"},H=>this.charPosAbsolute(H)),this._parser.registerCsiHandler({final:"a"},H=>this.hPositionRelative(H)),this._parser.registerCsiHandler({final:"b"},H=>this.repeatPrecedingCharacter(H)),this._parser.registerCsiHandler({final:"c"},H=>this.sendDeviceAttributesPrimary(H)),this._parser.registerCsiHandler({prefix:">",final:"c"},H=>this.sendDeviceAttributesSecondary(H)),this._parser.registerCsiHandler({final:"d"},H=>this.linePosAbsolute(H)),this._parser.registerCsiHandler({final:"e"},H=>this.vPositionRelative(H)),this._parser.registerCsiHandler({final:"f"},H=>this.hVPosition(H)),this._parser.registerCsiHandler({final:"g"},H=>this.tabClear(H)),this._parser.registerCsiHandler({final:"h"},H=>this.setMode(H)),this._parser.registerCsiHandler({prefix:"?",final:"h"},H=>this.setModePrivate(H)),this._parser.registerCsiHandler({final:"l"},H=>this.resetMode(H)),this._parser.registerCsiHandler({prefix:"?",final:"l"},H=>this.resetModePrivate(H)),this._parser.registerCsiHandler({final:"m"},H=>this.charAttributes(H)),this._parser.registerCsiHandler({final:"n"},H=>this.deviceStatus(H)),this._parser.registerCsiHandler({prefix:"?",final:"n"},H=>this.deviceStatusPrivate(H)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},H=>this.softReset(H)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},H=>this.setCursorStyle(H)),this._parser.registerCsiHandler({final:"r"},H=>this.setScrollRegion(H)),this._parser.registerCsiHandler({final:"s"},H=>this.saveCursor(H)),this._parser.registerCsiHandler({final:"t"},H=>this.windowOptions(H)),this._parser.registerCsiHandler({final:"u"},H=>
12this.restoreCursor(H)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},H=>this.insertColumns(H)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},H=>this.deleteColumns(H)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},H=>this.selectProtected(H)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},H=>this.requestMode(H,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},H=>this.requestMode(H,!1)),this._parser.setExecuteHandler(f.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(f.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(f.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(f.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(f.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(f.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(f.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(f.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(f.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(f.C1.IND,()=>this.index()),this._parser.setExecuteHandler(f.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(f.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new D.OscHandler(H=>(this.setTitle(H),this.setIconName(H),!0))),this._parser.registerOscHandler(1,new D.OscHandler(H=>this.setIconName(H))),this._parser.registerOscHandler(2,new D.OscHandler(H=>this.setTitle(H))),this._parser.registerOscHandler(4,new D.OscHandler(H=>this.setOrReportIndexedColor(H))),this._parser.registerOscHandler(8,new D.OscHandler(H=>this.setHyperlink(H))),this._parser.registerOscHandler(10,new D.OscHandler(H=>this.setOrReportFgColor(H))),this._parser.registerOscHandler(11,new D.OscHandler(H=>this.setOrReportBgColor(H))),this._parser.registerOscHandler(12,new D.OscHandler(H=>this.setOrReportCursorColor(H))),this._parser.registerOscHandler(104,new D.OscHandler(H=>this.restoreIndexedColor(H))),this._parser.registerOscHandler(110,new D.OscHandler(H=>this.restoreFgColor(H))),this._parser.registerOscHandler(111,new D.OscHandler(H=>this.restoreBgColor(H))),this._parser.registerOscHandler(112,new D.OscHandler(H=>this.restoreCursorColor(H))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const H in y.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:H},()=>this.selectCharset("("+H)),this._parser.registerEscHandler({intermediates:")",final:H},()=>this.selectCharset(")"+H)),this._parser.registerEscHandler({intermediates:"*",final:H},()=>this.selectCharset("*"+H)),this._parser.registerEscHandler({intermediates:"+",final:H},()=>this.selectCharset("+"+H)),this._parser.registerEscHandler({intermediates:"-",final:H},()=>this.selectCharset("-"+H)),this._parser.registerEscHandler({intermediates:".",final:H},()=>this.selectCharset("."+H)),this._parser.registerEscHandler({intermediates:"/",final:H},()=>this.selectCharset("/"+H));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(H=>(this._logService.error("Parsing error: ",H),H)),this._parser.registerDcsHandler({intermediates:"$",final:"q"}
12,new C.DcsHandler((H,de)=>this.requestStatusString(H,de)))}_preserveStack(M,W,V,G){this._parseStack.paused=!0,this._parseStack.cursorStartX=M,this._parseStack.cursorStartY=W,this._parseStack.decodedLength=V,this._parseStack.position=G}_logSlowResolvingAsync(M){this._logService.logLevel<=E.LogLevelEnum.WARN&&Promise.race([M,new Promise((W,V)=>setTimeout(()=>V("#SLOW_TIMEOUT"),5e3))]).catch(W=>{if(W!=="#SLOW_TIMEOUT")throw W;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(M,W){let V,G=this._activeBuffer.x,fe=this._activeBuffer.y,_e=0;const Se=this._parseStack.paused;if(Se){if(V=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,W))return this._logSlowResolvingAsync(V),V;G=this._parseStack.cursorStartX,fe=this._parseStack.cursorStartY,this._parseStack.paused=!1,M.length>U&&(_e=this._parseStack.position+U)}if(this._logService.logLevel<=E.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof M=="string"?` "${M}"`:` "${Array.prototype.map.call(M,H=>String.fromCharCode(H)).join("")}"`),typeof M=="string"?M.split("").map(H=>H.charCodeAt(0)):M),this._parseBuffer.length<M.length&&this._parseBuffer.length<U&&(this._parseBuffer=new Uint32Array(Math.min(M.length,U))),Se||this._dirtyRowTracker.clearRange(),M.length>U)for(let H=_e;H<M.length;H+=U){const de=H+U<M.length?H+U:M.length,ue=typeof M=="string"?this._stringDecoder.decode(M.substring(H,de),this._parseBuffer):this._utf8Decoder.decode(M.subarray(H,de),this._parseBuffer);if(V=this._parser.parse(this._parseBuffer,ue))return this._preserveStack(G,fe,ue,H),this._logSlowResolvingAsync(V),V}else if(!Se){const H=typeof M=="string"?this._stringDecoder.decode(M,this._parseBuffer):this._utf8Decoder.decode(M,this._parseBuffer);if(V=this._parser.parse(this._parseBuffer,H))return this._preserveStack(G,fe,H,0),this._logSlowResolvingAsync(V),V}this._activeBuffer.x===G&&this._activeBuffer.y===fe||this._onCursorMove.fire();const ie=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),K=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);K<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(K,this._bufferService.rows-1),Math.min(ie,this._bufferService.rows-1))}print(M,W,V){let G,fe;const _e=this._charsetService.charset,Se=this._optionsService.rawOptions.screenReaderMode,ie=this._bufferService.cols,K=this._coreService.decPrivateModes.wraparound,H=this._coreService.modes.insertMode,de=this._curAttrData;let ue=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&V-W>0&&ue.getWidth(this._activeBuffer.x-1)===2&&ue.setCellFromCodepoint(this._activeBuffer.x-1,0,1,de);let ge=this._parser.precedingJoinState;for(let le=W;le<V;++le){if(G=M[le],G<127&&_e){const vt=_e[String.fromCharCode(G)];vt&&(G=vt.charCodeAt(0))}const Fe=this._unicodeService.charProperties(G,ge);fe=L.UnicodeService.extractWidth(Fe);const Ve=L.UnicodeService.extractShouldJoin(Fe),Je=Ve?L.UnicodeService.extractWidth(ge):0;if(ge=Fe,Se&&this._onA11yChar.fire((0,b.stringFromCodePoint)(G)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+fe-Je>ie){if(K){const vt=ue;let Ee=this._activeBuffer.x-Je;for(this._activeBuffer.x=Je,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ue=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Je>0&&ue instanceof d.BufferLine&&ue.copyCellsFrom(vt,Ee,0,Je,!1);Ee<ie;)vt.setCellFromCodepoint(Ee++,0,1,de)}else if(this._activeBuffer.x=ie-1,fe===2)continue}
12if(Ve&&this._activeBuffer.x){const vt=ue.getWidth(this._activeBuffer.x-1)?1:2;ue.addCodepointToCell(this._activeBuffer.x-vt,G,fe);for(let Ee=fe-Je;--Ee>=0;)ue.setCellFromCodepoint(this._activeBuffer.x++,0,0,de)}else if(H&&(ue.insertCells(this._activeBuffer.x,fe-Je,this._activeBuffer.getNullCell(de)),ue.getWidth(ie-1)===2&&ue.setCellFromCodepoint(ie-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,de)),ue.setCellFromCodepoint(this._activeBuffer.x++,G,fe,de),fe>0)for(;--fe;)ue.setCellFromCodepoint(this._activeBuffer.x++,0,0,de)}this._parser.precedingJoinState=ge,this._activeBuffer.x<ie&&V-W>0&&ue.getWidth(this._activeBuffer.x)===0&&!ue.hasContent(this._activeBuffer.x)&&ue.setCellFromCodepoint(this._activeBuffer.x,0,1,de),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(M,W){return M.final!=="t"||M.prefix||M.intermediates?this._parser.registerCsiHandler(M,W):this._parser.registerCsiHandler(M,V=>!z(V.params[0],this._optionsService.rawOptions.windowOptions)||W(V))}registerDcsHandler(M,W){return this._parser.registerDcsHandler(M,new C.DcsHandler(W))}registerEscHandler(M,W){return this._parser.registerEscHandler(M,W)}registerOscHandler(M,W){return this._parser.registerOscHandler(M,new D.OscHandler(W))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var M;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))==null?void 0:M.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);W.hasWidth(this._activeBuffer.x)&&!W.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const M=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-M),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(M=this._bufferService.cols-1){this._activeBuffer.x=Math.min(M,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(M,W){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=M,this._activeBuffer.y=this._activeBuffer.scrollTop+W):(this._activeBuffer.x=M,this._activeBuffer.y=W),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(M,W){this._restrictCursor(),this._setCursor(this._activeBuffer.x+M,this._activeBuffer.y+W)}cursorUp(M){const W=this._activeBuffer.y-this._activeBuffer.scrollTop;return W>=0?this._moveCursor(0,-Math.min(W,M.params[0]||1)):this._moveCursor(0,-(M.params[0]||1)),!0}cursorDown(M){const W=this._activeBuffer.scrollBottom-this._activeBuffer.y;return W>=0?this._moveCursor(0,Math.min(W,M.params[0]||1)):this._moveCursor(0,M.params[0]||1),!0}cursorForward(M){return this._moveCursor(M.params[0]||1,0),!0}cursorBackward(M){return this._moveCursor(-(M.params[0]||1),0),!0}cursorNextLine(M){return this.cursorDown(M),this._activeBuffer.x=0,!0}cursorPrecedingLine(M){return this.cursorUp(M),this._activeBuffer.x=0,!0}cursorCharAbsolute(M){return this._setCursor((M.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(M){return this._setCursor(M.length>=2?(M.params[1]||1)-1:0,(M.params[0]||1)-1),!0}charPosAbsolute(M){return this._setCursor((M.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(M){return this._moveCursor(M.params[0]||1,0),!0}linePosAbsolute(M){return this._setCursor(this._activeBuffer.x,(M.params[0]||1)-1),!0}vPositionRelative(M){return this._moveCursor(0,M.params[0]||1),!0}hVPosition(M){return this.cursorPosition(M),!0}tabClear(M){const W=M.params[0];return W===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:W===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(M){if(this._activeBuffer.x>
vendor: 17,196 bytes, line 12
12=this._bufferService.cols)return!0;let W=M.params[0]||1;for(;W--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(M){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let W=M.params[0]||1;for(;W--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(M){const W=M.params[0];return W===1&&(this._curAttrData.bg|=536870912),W!==2&&W!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(M,W,V,G=!1,fe=!1){const _e=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);_e.replaceCells(W,V,this._activeBuffer.getNullCell(this._eraseAttrData()),fe),G&&(_e.isWrapped=!1)}_resetBufferLine(M,W=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);V&&(V.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),W),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+M),V.isWrapped=!1)}eraseInDisplay(M,W=!1){let V;switch(this._restrictCursor(this._bufferService.cols),M.params[0]){case 0:for(V=this._activeBuffer.y,this._dirtyRowTracker.markDirty(V),this._eraseInBufferLine(V++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,W);V<this._bufferService.rows;V++)this._resetBufferLine(V,W);this._dirtyRowTracker.markDirty(V);break;case 1:for(V=this._activeBuffer.y,this._dirtyRowTracker.markDirty(V),this._eraseInBufferLine(V,0,this._activeBuffer.x+1,!0,W),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(V+1).isWrapped=!1);V--;)this._resetBufferLine(V,W);this._dirtyRowTracker.markDirty(0);break;case 2:for(V=this._bufferService.rows,this._dirtyRowTracker.markDirty(V-1);V--;)this._resetBufferLine(V,W);this._dirtyRowTracker.markDirty(0);break;case 3:const G=this._activeBuffer.lines.length-this._bufferService.rows;G>0&&(this._activeBuffer.lines.trimStart(G),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-G,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-G,0),this._onScroll.fire(0))}return!0}eraseInLine(M,W=!1){switch(this._restrictCursor(this._bufferService.cols),M.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,W);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,W);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,W)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(M){this._restrictCursor();let W=M.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const V=this._activeBuffer.ybase+this._activeBuffer.y,G=this._bufferService.rows-1-this._activeBuffer.scrollBottom,fe=this._bufferService.rows-1+this._activeBuffer.ybase-G+1;for(;W--;)this._activeBuffer.lines.splice(fe-1,1),this._activeBuffer.lines.splice(V,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(M){this._restrictCursor();let W=M.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const V=this._activeBuffer.ybase+this._activeBuffer.y;let G;for(G=this._bufferService.rows-1-this._activeBuffer.scrollBottom,G=this._bufferService.rows-1+this._activeBuffer.ybase-G;W--;)this._activeBuffer.lines.splice(V,1),this._activeBuffer.lines.splice(G,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(M){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.insertCells(this._activeBuffer.x,M.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(M){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.deleteCells(this._activeBuffer.x,M.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(M){let W=M.params[0]||1;for(;W--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(M){let W=M.params[0]||1;for(;W--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(d.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(M){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=M.params[0]||1;for(let V=this._activeBuffer.scrollTop;V<=this._activeBuffer.scrollBottom;++V){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);G.deleteCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(M){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=M.params[0]||1;for(let V=this._activeBuffer.scrollTop;V<=this._activeBuffer.scrollBottom;++V){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);G.insertCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(M){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=M.params[0]||1;for(let V=this._activeBuffer.scrollTop;V<=this._activeBuffer.scrollBottom;++V){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);G.insertCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(M){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=M.params[0]||1;for(let V=this._activeBuffer.scrollTop;V<=this._activeBuffer.scrollBottom;++V){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);G.deleteCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(M){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(M.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(M){const W=this._parser.precedingJoinState;if(!W)return!0;const V=M.params[0]||1,G=L.UnicodeService.extractWidth(W),fe=this._activeBuffer.x-G,_e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(fe),Se=new Uint32Array(_e.length*V);let ie=0;for(let H=0;H<_e.length;){const de=_e.codePointAt(H)||0;Se[ie++]=de,H+=de>65535?2:1}let K=ie;for(let H=1;H<V;++H)Se.copyWithin(K,0,ie),K+=ie;return this.print(Se,0,K),!0}sendDeviceAttributesPrimary(M){return M.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(M){return M.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(M.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(M){return(this._optionsService.rawOptions.termName+"").indexOf(M)===0}setMode(M){for(let W=0;W<M.length;W++)switch(M.params[W]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(M){for(let W=0;W<M.length;W++)switch(M.params[W]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,y.DEFAULT_CHARSET),this._charsetService.setgCharset(1,y.DEFAULT_CHARSET),this._charsetService.setgCharset(2,y.DEFAULT_CHARSET),this._charsetService.setgCharset(3,y.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(M){for(let W=0;W<M.length;W++)switch(M.params[W]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(M){for(let W=0;W<M.length;W++)switch(M.params[W]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),M.params[W]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(M,W){const V=this._coreService.decPrivateModes,{activeProtocol:G,activeEncoding:fe}=this._coreMouseService,_e=this._coreService,{buffers:Se,cols:ie}=this._bufferService,{active:K,alt:H}=Se,de=this._optionsService.rawOptions,ue=Ve=>Ve?1:2,ge=M.params[0];return le=ge,Fe=W?ge===2?4:ge===4?ue(_e.modes.insertMode):ge===12?3:ge===20?ue(de.convertEol):0:ge===1?ue(V.applicationCursorKeys):ge===3?de.windowOptions.setWinLines?ie===80?2:ie===132?1:0:0:ge===6?ue(V.origin):ge===7?ue(V.wraparound):ge===8?3:ge===9?ue(G==="X10"):ge===12?ue(de.cursorBlink):ge===25?ue(!_e.isCursorHidden):ge===45?ue(V.reverseWraparound):ge===66?ue(V.applicationKeypad):ge===67?4:ge===1e3?ue(G==="VT200"):ge===1002?ue(G==="DRAG"):ge===1003?ue(G==="ANY"):ge===1004?ue(V.sendFocus):ge===1005?4:ge===1006?ue(fe==="SGR"):ge===1015?4:ge===1016?ue(fe==="SGR_PIXELS"):ge===1048?1:ge===47||ge===1047||ge===1049?ue(K===H):ge===2004?ue(V.bracketedPasteMode):0,_e.triggerDataEvent(`${f.C0.ESC}[${W?"":"?"}${le};${Fe}$y`),!0;var le,Fe}_updateAttrColor(M,W,V,G,fe){return W===2?(M|=50331648,M&=-16777216,M|=S.AttributeData.fromColorRGB([V,G,fe])):W===5&&(M&=-50331904,M|=33554432|255&V),M}_extractColor(M,W,V){const G=[0,0,-1,0,0,0];let fe=0,_e=0;do{if(G[_e+fe]=M.params[W+_e],M.hasSubParams(W+_e)){const Se=M.getSubParams(W+_e);let ie=0;do G[1]===5&&(fe=1),G[_e+ie+1+fe]=Se[ie];while(++ie<Se.length&&ie+_e+1+fe<G.length);break}if(G[1]===5&&_e+fe>=2||G[1]===2&&_e+fe>=5)break;G[1]&&(fe=1)}while(++_e+W<M.length&&_e+fe<G.length);for(let Se=2;Se<G.length;++Se)G[Se]===-1&&(G[Se]=0);switch(G[0]){case 38:V.fg=this._updateAttrColor(V.fg,G[1],G[3],G[4],G[5]);break;case 48:V.bg=this._updateAttrColor(V.bg,G[1],G[3],G[4],G[5]);break;case 58:V.extended=V.extended.clone(),V.extended.underlineColor=this._updateAttrColor(V.extended.underlineColor,G[1],G[3],G[4],G[5])}return _e}_processUnderline(M,W){W.extended=W.extended.clone(),(!~M||M>5)&&(M=1),W.extended.underlineStyle=M,W.fg|=268435456,M===0&&(W.fg&=-268435457),W.updateExtended()}_processSGR0(M){M.fg=d.DEFAULT_ATTR_DATA.fg,M.bg=d.DEFAULT_ATTR_DATA.bg,M.extended=M.extended.clone(),M.extended.underlineStyle=0,M.extended.underlineColor&=-67108864,M.updateExtended()}charAttributes(M){if(M.length===1&&M.params[0]===0)return this._processSGR0(this._curAttrData),!0;const W=M.length;let V;const G=this._curAttrData;for(let fe=0;fe<W;fe++)V=M.params[fe],V>=30&&V<=37?(G.fg&=-50331904,G.fg|=16777216|V-30):V>=40&&V<=47?(G.bg&=-50331904,G.bg|=16777216|V-40):V>=90&&V<=97?(G.fg&=-50331904,G.fg|=16777224|V-90):V>=100&&V<=107?(G.bg&=-50331904,G.bg|=16777224|V-100):V===0?this._processSGR0(G):V===1?G.fg|=134217728:V===3?G.bg|=67108864:V===4?(G.fg|=268435456,this._processUnderline(M.hasSubParams(fe)?M.getSubParams(fe)[0]:1,G)):V===5?G.fg|=536870912:V===7?G.fg|=67108864:V===8?G.fg|=1073741824:V===9?G.fg|=2147483648:V===2?G.bg|=134217728:V===21?this._processUnderline(2,G):V===22?(G.fg&=-134217729,G.bg&=-134217729):V===23?G.bg&=-67108865:V===24?(G.fg&=-268435457,this._processUnderline(0,G)):V===25?G.fg&=-536870913:V===27?G.fg&=-67108865:V===28?G.fg&=-1073741825:V===29?G.fg&=2147483647:V===39?(G.fg&=-67108864,G.fg|=16777215&d.DEFAULT_ATTR_DATA.fg):V===49?(G.bg&=-67108864,G.bg|=16777215&d.DEFAULT_ATTR_DATA.bg):V===38||V===48||V===58?fe+=this._extractColor(M,fe,G):V===53?G.bg|=1073741824:V===55?G.bg&=-1073741825:V===59?(G.extended=G.extended.clone(),G.extended.underlineColor=-1,G.updateExtended()):V===100?(G.fg&=-67108864,G.fg|=16777215&d.DEFAULT_ATTR_DATA.fg,G.bg&=-67108864,G.bg|=16777215&d.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",V);return!0}deviceStatus(M){switch(M.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const W=this._activeBuffer.y+1,V=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${W};${V}R`)}return!0}deviceStatusPrivate(M){if(M.params[0]===6){const W=this._activeBuffer.y+1,V=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${W};${V}R`)}return!0}softReset(M){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=d.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(M){const W=M.params[0]||1;switch(W){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;
12case 5:case 6:this._optionsService.options.cursorStyle="bar"}const V=W%2==1;return this._optionsService.options.cursorBlink=V,!0}setScrollRegion(M){const W=M.params[0]||1;let V;return(M.length<2||(V=M.params[1])>this._bufferService.rows||V===0)&&(V=this._bufferService.rows),V>W&&(this._activeBuffer.scrollTop=W-1,this._activeBuffer.scrollBottom=V-1,this._setCursor(0,0)),!0}windowOptions(M){if(!z(M.params[0],this._optionsService.rawOptions.windowOptions))return!0;const W=M.length>1?M.params[1]:0;switch(M.params[0]){case 14:W!==2&&this._onRequestWindowsOptionsReport.fire(q.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(q.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:W!==0&&W!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),W!==0&&W!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:W!==0&&W!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),W!==0&&W!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(M){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(M){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(M){return this._windowTitle=M,this._onTitleChange.fire(M),!0}setIconName(M){return this._iconName=M,!0}setOrReportIndexedColor(M){const W=[],V=M.split(";");for(;V.length>1;){const G=V.shift(),fe=V.shift();if(/^\d+$/.exec(G)){const _e=parseInt(G);if(me(_e))if(fe==="?")W.push({type:0,index:_e});else{const Se=(0,I.parseColor)(fe);Se&&W.push({type:1,index:_e,color:Se})}}}return W.length&&this._onColor.fire(W),!0}setHyperlink(M){const W=M.split(";");return!(W.length<2)&&(W[1]?this._createHyperlink(W[0],W[1]):!W[0]&&this._finishHyperlink())}_createHyperlink(M,W){this._getCurrentLinkId()&&this._finishHyperlink();const V=M.split(":");let G;const fe=V.findIndex(_e=>_e.startsWith("id="));return fe!==-1&&(G=V[fe].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:G,uri:W}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(M,W){const V=M.split(";");for(let G=0;G<V.length&&!(W>=this._specialColors.length);++G,++W)if(V[G]==="?")this._onColor.fire([{type:0,index:this._specialColors[W]}]);else{const fe=(0,I.parseColor)(V[G]);fe&&this._onColor.fire([{type:1,index:this._specialColors[W],color:fe}])}return!0}setOrReportFgColor(M){return this._setOrReportSpecialColor(M,0)}setOrReportBgColor(M){return this._setOrReportSpecialColor(M,1)}setOrReportCursorColor(M){return this._setOrReportSpecialColor(M,2)}restoreIndexedColor(M){if(!M)return this._onColor.fire([{type:2}]),!0;const W=[],V=M.split(";");for(let G=0;G<V.length;++G)if(/^\d+$/.exec(V[G])){const fe=parseInt(V[G]);me(fe)&&W.push({type:2,index:fe})}return W.length&&this._onColor.fire(W),!0}restoreFgColor(M){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(M){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(M){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,y.DEFAULT_CHARSET),!0}selectCharset(M){return M.length!==2?(this.selectDefaultCharset(),!0):(M[0]==="/"||this._charsetService.setgCharset(B[M[0]],y.CHARSETS[M[1]]||y.DEFAULT_CHARSET),!0)}
12index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const M=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,M,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=d.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=d.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(M){return this._charsetService.setgLevel(M),!0}screenAlignmentPattern(){const M=new l.CellData;M.content=4194304|"E".charCodeAt(0),M.fg=this._curAttrData.fg,M.bg=this._curAttrData.bg,this._setCursor(0,0);for(let W=0;W<this._bufferService.rows;++W){const V=this._activeBuffer.ybase+this._activeBuffer.y+W,G=this._activeBuffer.lines.get(V);G&&(G.fill(M),G.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(M,W){const V=this._bufferService.buffer,G=this._optionsService.rawOptions;return(fe=>(this._coreService.triggerDataEvent(`${f.C0.ESC}${fe}${f.C0.ESC}\\`),!0))(M==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:M==='"p'?'P1$r61;1"p':M==="r"?`P1$r${V.scrollTop+1};${V.scrollBottom+1}r`:M==="m"?"P1$r0m":M===" q"?`P1$r${{block:2,underline:4,bar:6}[G.cursorStyle]-(G.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(M,W){this._dirtyRowTracker.markRangeDirty(M,W)}}n.InputHandler=se;let ce=class{constructor(pe){this._bufferService=pe,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(pe){pe<this.start?this.start=pe:pe>this.end&&(this.end=pe)}markRangeDirty(pe,M){pe>M&&(J=pe,pe=M,M=J),pe<this.start&&(this.start=pe),M>this.end&&(this.end=M)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function me(pe){return 0<=pe&&pe<256}ce=u([w(0,E.IBufferService)],ce)},844:(v,n)=>{function c(u){for(const w of u)w.dispose();u.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const w=this._disposables.indexOf(u);w!==-1&&this._disposables.splice(w,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var w;this._isDisposed||u===this._value||((w=this._value)==null||w.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},n.toDisposable=function(u){return{dispose:u}},n.disposeArray=c,n.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(w,f,y){this._data[w]||(this._data[w]={}),this._data[w][f]=y}get(w,f){return this._data[w]?this._data[w][f]:void 0}clear(){this._data={}}}n.TwoKeyMap=c,n.FourKeyMap=class{constructor(){this._data=new c}set(u,w,f,y,x){this._data.get(u,w)||this._data.set(u,w,new c),this._data.get(u,w).set(f,y,x)}get(u,w,f,y){var x;return(x=this._data.get(u,w))==null?void 0:x.get(f,y)}clear(){this._data.clear()}}}
12,6114:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof process!="undefined"&&"title"in process;const c=n.isNode?"node":navigator.userAgent,u=n.isNode?"node":navigator.platform;n.isFirefox=c.includes("Firefox"),n.isLegacyEdge=c.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(c),n.getSafariVersion=function(){if(!n.isSafari)return 0;const w=c.match(/Version\/(\d+)/);return w===null||w.length<2?0:parseInt(w[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),n.isIpad=u==="iPad",n.isIphone=u==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),n.isLinux=u.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(c)},6106:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let c=0;n.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const w=this._getKey(u);if(w===void 0||(c=this._search(w),c===-1)||this._getKey(this._array[c])!==w)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===w);return!1}*getKeyIterator(u){if(this._array.length!==0&&(c=this._search(u),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===u)}forEachByKey(u,w){if(this._array.length!==0&&(c=this._search(u),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===u))do w(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===u)}values(){return[...this._array].values()}_search(u){let w=0,f=this._array.length-1;for(;f>=w;){let y=w+f>>1;const x=this._getKey(this._array[y]);if(x>u)f=y-1;else{if(!(x<u)){for(;y>0&&this._getKey(this._array[y-1])===u;)y--;return y}w=y+1}}return w}}},7226:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const u=c(6114);class w{constructor(){this._tasks=[],this._i=0}enqueue(x){this._tasks.push(x),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(x){this._idleCallback=void 0;let T=0,b=0,d=x.timeRemaining(),m=0;for(;this._i<this._tasks.length;){if(T=Date.now(),this._tasks[this._i]()||this._i++,T=Math.max(1,Date.now()-T),b=Math.max(T,b),m=x.timeRemaining(),1.5*b>m)return d-T<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(d-T))}ms`),void this._start();d=m}this.clear()}}class f extends w{_requestCallback(x){return setTimeout(()=>x(this._createDeadline(16)))}_cancelCallback(x){clearTimeout(x)}_createDeadline(x){const T=Date.now()+x;return{timeRemaining:()=>Math.max(0,T-Date.now())}}}n.PriorityTaskQueue=f,n.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends w{_requestCallback(y){return requestIdleCallback(y)}_cancelCallback(y){cancelIdleCallback(y)}}:f,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(y){this._queue.clear(),this._queue.enqueue(y)}flush(){this._queue.flush()}}},9282:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const u=c(643);n.updateWindowsModeWrappedState=function(w){const f=w.buffer.lines.get(w.buffer.ybase+w.buffer.y-1),y=f==null?void 0:f.get(w.cols-1),x=w.buffer.lines.get(w.buffer.ybase+w.buffer.y);x&&y&&(x.isWrapped=y[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&y[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new c;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}
vendor: 4,184 bytes, line 12
12isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}n.AttributeData=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,y=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=y}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=u},9092:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const u=c(6349),w=c(7226),f=c(3734),y=c(8437),x=c(4634),T=c(511),b=c(643),d=c(4863),m=c(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(o,l,S){this._hasScrollback=o,this._optionsService=l,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=y.DEFAULT_ATTR_DATA.clone(),this.savedCharset=m.DEFAULT_CHARSET,this.markers=[],this._nullCell=T.CellData.fromCharData([0,b.NULL_CELL_CHAR,b.NULL_CELL_WIDTH,b.NULL_CELL_CODE]),this._whitespaceCell=T.CellData.fromCharData([0,b.WHITESPACE_CELL_CHAR,b.WHITESPACE_CELL_WIDTH,b.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new w.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(o){return o?(this._nullCell.fg=o.fg,this._nullCell.bg=o.bg,this._nullCell.extended=o.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(o){return o?(this._whitespaceCell.fg=o.fg,this._whitespaceCell.bg=o.bg,this._whitespaceCell.extended=o.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,l){return new y.BufferLine(this._bufferService.cols,this.getNull
12Cell(o),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const o=this.ybase+this.y-this.ydisp;return o>=0&&o<this._rows}_getCorrectBufferLength(o){if(!this._hasScrollback)return o;const l=o+this._optionsService.rawOptions.scrollback;return l>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:l}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=y.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,l){const S=this.getNullCell(y.DEFAULT_ATTR_DATA);let E=0;const L=this._getCorrectBufferLength(l);if(L>this.lines.maxLength&&(this.lines.maxLength=L),this.lines.length>0){if(this._cols<o)for(let C=0;C<this.lines.length;C++)E+=+this.lines.get(C).resize(o,S);let D=0;if(this._rows<l)for(let C=this._rows;C<l;C++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new y.BufferLine(o,S)):this.ybase>0&&this.lines.length<=this.ybase+this.y+D+1?(this.ybase--,D++,this.ydisp>0&&this.ydisp--):this.lines.push(new y.BufferLine(o,S)));else for(let C=this._rows;C>l;C--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(L<this.lines.maxLength){const C=this.lines.length-L;C>0&&(this.lines.trimStart(C),this.ybase=Math.max(this.ybase-C,0),this.ydisp=Math.max(this.ydisp-C,0),this.savedY=Math.max(this.savedY-C,0)),this.lines.maxLength=L}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,l-1),D&&(this.y+=D),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(o,l),this._cols>o))for(let D=0;D<this.lines.length;D++)E+=+this.lines.get(D).resize(o,S);this._cols=o,this._rows=l,this._memoryCleanupQueue.clear(),E>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let o=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,o=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return o}get _isReflowEnabled(){const o=this._optionsService.rawOptions.windowsPty;return o&&o.buildNumber?this._hasScrollback&&o.backend==="conpty"&&o.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(o,l){this._cols!==o&&(o>this._cols?this._reflowLarger(o,l):this._reflowSmaller(o,l))}_reflowLarger(o,l){const S=(0,x.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(y.DEFAULT_ATTR_DATA));if(S.length>0){const E=(0,x.reflowLargerCreateNewLayout)(this.lines,S);(0,x.reflowLargerApplyNewLayout)(this.lines,E.layout),this._reflowLargerAdjustViewport(o,l,E.countRemoved)}}_reflowLargerAdjustViewport(o,l,S){const E=this.getNullCell(y.DEFAULT_ATTR_DATA);let L=S;for(;L-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new y.BufferLine(o,E))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-S,0)}_reflowSmaller(o,l){const S=this.getNullCell(y.DEFAULT_ATTR_DATA),E=[];let L=0;for(let D=this.lines.length-1;D>=0;D--){let C=this.lines.get(D);if(!C||!C.isWrapped&&C.getTrimmedLength()<=o)continue;const I=[C];for(;C.isWrapped&&D>0;)C=this.lines.get(--D),I.unshift(C);const B=this.ybase+this.y;if(B>=D&&B<D+I.length)continue;const U=I[I.length-1].getTrimmedLength(),z=(0,x.reflowSmallerGetNewLineLengths)(I,this._cols,o),q=z.length-I.length;let J;J=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+q):Math.max(0,this.lines.length-this.lines.maxLength+q);const se=[];for(let V=0;V<q;V++){const G=this.getBlankLine(y.DEFAULT_ATTR_DATA,!0);se.push(G)}se.length>0&&(E.push({start:D+I.length+L,newLines:se}),L+=se.length),I.push(...se);let ce=z.length-1,me=z[ce];me===0&&(ce--,me=z[ce]);let pe=I.length-q-1,M=U;for(;pe>=0;){const V=Math.min(M,me);if(I[ce]===void 0)break;if(I[ce].copyCellsFrom(I[pe],M-V,me-V,V,!0),me-=V,me===0&&(ce--,me=z[ce]),M-=V,M===0){pe--;const G=Math.max(pe,0);M=(0,x.getWrappedLineTrimmedLength)(I,G,this._cols)}}for(let V=0;V<I.length;V++)z[V]<o&&I[V].setCell(z[V],S);let W=q-J;for(;W-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+L)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+q,this.ybase+l-1)}if(E.length>0){const D=[],C=[];for(let ce=0;ce<this.lines.length;ce++)C.push(this.lines.get(ce));const I=this.lines.length;let B=I-1,U=0,z=E[U];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+L);let q=0;for(let ce=Math.min(this.lines.maxLength-1,I+L-1);ce>=0;ce--)if(z&&z.start>B+q){for(let me=z.newLines.length-1;me>=0;me--)this.lines.set(ce--,z.newLines[me]);ce++,D.push({index:B+1,amount:z.newLines.length}),q+=z.newLines.length,z=E[++U]}
12else this.lines.set(ce,C[B--]);let J=0;for(let ce=D.length-1;ce>=0;ce--)D[ce].index+=J,this.lines.onInsertEmitter.fire(D[ce]),J+=D[ce].amount;const se=Math.max(0,I+L-this.lines.maxLength);se>0&&this.lines.onTrimEmitter.fire(se)}}translateBufferLineToString(o,l,S=0,E){const L=this.lines.get(o);return L?L.translateToString(l,S,E):""}getWrappedRangeForLine(o){let l=o,S=o;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;S+1<this.lines.length&&this.lines.get(S+1).isWrapped;)S++;return{first:l,last:S}}setupTabStops(o){for(o!=null?this.tabs[o]||(o=this.prevStop(o)):(this.tabs={},o=0);o<this._cols;o+=this._optionsService.rawOptions.tabStopWidth)this.tabs[o]=!0}prevStop(o){for(o==null&&(o=this.x);!this.tabs[--o]&&o>0;);return o>=this._cols?this._cols-1:o<0?0:o}nextStop(o){for(o==null&&(o=this.x);!this.tabs[++o]&&o<this._cols;);return o>=this._cols?this._cols-1:o<0?0:o}clearMarkers(o){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===o&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].dispose(),this.markers.splice(o--,1);this._isClearing=!1}
12addMarker(o){const l=new d.Marker(o);return this.markers.push(l),l.register(this.lines.onTrim(S=>{l.line-=S,l.line<0&&l.dispose()})),l.register(this.lines.onInsert(S=>{l.line>=S.index&&(l.line+=S.amount)})),l.register(this.lines.onDelete(S=>{l.line>=S.index&&l.line<S.index+S.amount&&l.dispose(),l.line>S.index&&(l.line-=S.amount)})),l.register(l.onDispose(()=>this._removeMarker(l))),l}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const u=c(3734),w=c(511),f=c(643),y=c(482);n.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let x=0;class T{constructor(d,m,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*d);const l=m||w.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let S=0;S<d;++S)this.setCell(S,l);this.length=d}get(d){const m=this._data[3*d+0],o=2097151&m;return[this._data[3*d+1],2097152&m?this._combined[d]:o?(0,y.stringFromCodePoint)(o):"",m>>22,2097152&m?this._combined[d].charCodeAt(this._combined[d].length-1):o]}set(d,m){this._data[3*d+1]=m[f.CHAR_DATA_ATTR_INDEX],m[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[d]=m[1],this._data[3*d+0]=2097152|d|m[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*d+0]=m[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|m[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(d){return this._data[3*d+0]>>22}hasWidth(d){return 12582912&this._data[3*d+0]}getFg(d){return this._data[3*d+1]}getBg(d){return this._data[3*d+2]}hasContent(d){return 4194303&this._data[3*d+0]}getCodePoint(d){const m=this._data[3*d+0];return 2097152&m?this._combined[d].charCodeAt(this._combined[d].length-1):2097151&m}isCombined(d){return 2097152&this._data[3*d+0]}getString(d){const m=this._data[3*d+0];return 2097152&m?this._combined[d]:2097151&m?(0,y.stringFromCodePoint)(2097151&m):""}isProtected(d){return 536870912&this._data[3*d+2]}loadCell(d,m){return x=3*d,m.content=this._data[x+0],m.fg=this._data[x+1],m.bg=this._data[x+2],2097152&m.content&&(m.combinedData=this._combined[d]),268435456&m.bg&&(m.extended=this._extendedAttrs[d]),m}setCell(d,m){2097152&m.content&&(this._combined[d]=m.combinedData),268435456&m.bg&&(this._extendedAttrs[d]=m.extended),this._data[3*d+0]=m.content,this._data[3*d+1]=m.fg,this._data[3*d+2]=m.bg}setCellFromCodepoint(d,m,o,l){268435456&l.bg&&(this._extendedAttrs[d]=l.extended),this._data[3*d+0]=m|o<<22,this._data[3*d+1]=l.fg,this._data[3*d+2]=l.bg}addCodepointToCell(d,m,o){let l=this._data[3*d+0];2097152&l?this._combined[d]+=(0,y.stringFromCodePoint)(m):2097151&l?(this._combined[d]=(0,y.stringFromCodePoint)(2097151&l)+(0,y.stringFromCodePoint)(m),l&=-2097152,l|=2097152):l=m|4194304,o&&(l&=-12582913,l|=o<<22),this._data[3*d+0]=l}insertCells(d,m,o){if((d%=this.length)&&this.getWidth(d-1)===2&&this.setCellFromCodepoint(d-1,0,1,o),m<this.length-d){const l=new w.CellData;for(let S=this.length-d-m-1;S>=0;--S)this.setCell(d+m+S,this.loadCell(d+S,l));for(let S=0;S<m;++S)this.setCell(d+S,o)}else for(let l=d;l<this.length;++l)this.setCell(l,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(d,m,o){if(d%=this.length,m<this.length-d){const l=new w.CellData;for(let S=0;S<this.length-d-m;++S)this.setCell(d+S,this.loadCell(d+m+S,l));for(let S=this.length-m;S<this.length;++S)this.setCell(S,o)}else for(let l=d;l<this.length;++l)this.setCell(l,o);d&&this.getWidth(d-1)===2&&this.setCellFromCodepoint(d-1,0,1,o),this.getWidth(d)!==0||this.hasContent(d)||this.setCellFromCodepoint(d,0,1,o)}replaceCells(d,m,o,l=!1){if(l)for(d&&this.getWidth(d-1)===2&&!this.isProtected(d-1)&&this.setCellFromCodepoint(d-1,0,1,o),m<this.length&&this.getWidth(m-1)===2&&!this.isProtected(m)&&this.setCellFromCodepoint(m,0,1,o);d<m&&d<this.length;)this.isProtected(d)||this.setCell(d,o),d++;else for(d&&this.getWidth(d-1)===2&&this.setCellFromCodepoint(d-1,0,1,o),m<this.length&&this.getWidth(m-1)===2&&this.setCellFromCodepoint(m,0,1,o);d<m&&d<this.length;)this.setCell(d++,o)}resize(d,m){if(d===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*d;if(d>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const l=new Uint32Array(o);l.set(this._data),this._data=l}for(let l=this.length;l<d;++l)this.setCell(l,m)}else{this._data=this._data.subarray(0,o);const l=Object.keys(this._combined);for(let E=0;E<l.length;E++){const L=parseInt(l[E],10);L>=d&&delete this._combined[L]}const S=Object.keys(this._extendedAttrs);for(let E=0;E<S.length;E++){const L=parseInt(S[E],10);L>=d&&delete this._extendedAttrs[L]}}return this.length=d,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const d=new Uint32Array(this._data.length);return d.set(this._data),this._data=d,1}return 0}fill(d,m=!1){if(m)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,d);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,d)}}copyFrom(d){this.length!==d.length?this._data=new Uint32Array(d._data):this._data.set(d._data),this.length=d.length,this._combined={};for(const m in d._combined)this._combined[m]=d._combined[m];this._extendedAttrs={};for(const m in d._extendedAttrs)this._extendedAttrs[m]=d._extendedAttrs[m];this.isWrapped=d.isWrapped}clone(){const d=new T(0);d._data=new Uint32Array(this._data),d.length=this.length;for(const m in this._combined)d._combined[m]=this._combined[m];for(const m in this._extendedAttrs)d._extendedAttrs[m]=this._extendedAttrs[m];return d.isWrapped=this.isWrapped,d}getTrimmedLength(){for(let d=this.length-1;d>=0;--d)if(4194303&this._data[3*d+0])return d+(this._data[3*d+0]>>22);return 0}getNoBgTrimmedLength(){for(let d=this.length-1;d>=0;--d)if(4194303&this._data[3*d+0]||50331648&this._data[3*d+2])return d+(this._data[3*d+0]>>22);return 0}copyCellsFrom(d,m,o,l,S){const E=d._data;if(S)for(let D=l-1;D>=0;D--){for(let C=0;C<3;C++)this._data[3*(o+D)+C]=E[3*(m+D)+C];268435456&E[3*(m+D)+2]&&(this._extendedAttrs[o+D]=d._extendedAttrs[m+D])}else for(let D=0;D<l;D++){for(let C=0;C<3;C++)this._data[3*(o+D)+C]=E[3*(m+D)+C];268435456&E[3*(m+D)+2]&&(this._extendedAttrs[o+D]=d._extendedAttrs[m+D])}const L=Object.keys(d._combined);for(let D=0;D<L.length;D++){const C=parseInt(L[D],10);C>=m&&(this._combined[C-m+o]=d._combined[C])}}translateToString(d,m,o,l){m=m!=null?m:0,o=o!=null?o:this.length,d&&(o=Math.min(o,this.getTrimmedLength())),l&&(l.length=0);let S="";for(;m<o;){const E=this._data[3*m+0],L=2097151&E,D=2097152&E?this._combined[m]:L?(0,y.stringFromCodePoint)(L):f.WHITESPACE_CELL_CHAR;if(S+=D,l)for(let C=0;C<D.length;
12++C)l.push(m);m+=E>>22||1}return l&&l.push(m),S}}n.BufferLine=T},4841:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(v,n)=>{function c(u,w,f){if(w===u.length-1)return u[w].getTrimmedLength();const y=!u[w].hasContent(f-1)&&u[w].getWidth(f-1)===1,x=u[w+1].getWidth(0)===2;return y&&x?f-1:f}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(u,w,f,y,x){const T=[];for(let b=0;b<u.length-1;b++){let d=b,m=u.get(++d);if(!m.isWrapped)continue;const o=[u.get(b)];for(;d<u.length&&m.isWrapped;)o.push(m),m=u.get(++d);if(y>=b&&y<d){b+=o.length-1;continue}let l=0,S=c(o,l,w),E=1,L=0;for(;E<o.length;){const C=c(o,E,w),I=C-L,B=f-S,U=Math.min(I,B);o[l].copyCellsFrom(o[E],L,S,U,!1),S+=U,S===f&&(l++,S=0),L+=U,L===C&&(E++,L=0),S===0&&l!==0&&o[l-1].getWidth(f-1)===2&&(o[l].copyCellsFrom(o[l-1],f-1,S++,1,!1),o[l-1].setCell(f-1,x))}o[l].replaceCells(S,f,x);let D=0;for(let C=o.length-1;C>0&&(C>l||o[C].getTrimmedLength()===0);C--)D++;D>0&&(T.push(b+o.length-D),T.push(D)),b+=o.length-1}return T},n.reflowLargerCreateNewLayout=function(u,w){const f=[];let y=0,x=w[y],T=0;for(let b=0;b<u.length;b++)if(x===b){const d=w[++y];u.onDeleteEmitter.fire({index:b-T,amount:d}),b+=d-1,T+=d,x=w[++y]}else f.push(b);return{layout:f,countRemoved:T}},n.reflowLargerApplyNewLayout=function(u,w){const f=[];for(let y=0;y<w.length;y++)f.push(u.get(w[y]));for(let y=0;y<f.length;y++)u.set(y,f[y]);u.length=w.length},n.reflowSmallerGetNewLineLengths=function(u,w,f){const y=[],x=u.map((m,o)=>c(u,o,w)).reduce((m,o)=>m+o);let T=0,b=0,d=0;for(;d<x;){if(x-d<f){y.push(x-d);break}T+=f;const m=c(u,b,w);T>m&&(T-=m,b++);const o=u[b].getWidth(T-1)===2;o&&T--;const l=o?f-1:f;y.push(l),d+=l}return y},n.getWrappedLineTrimmedLength=c},5295:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const u=c(8460),w=c(844),f=c(9092);class y extends w.Disposable{constructor(T,b){super(),this._optionsService=T,this._bufferService=b,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(T){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(T),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(T,b){this._normal.resize(T,b),this._alt.resize(T,b),this.setupTabStops(T)}setupTabStops(T){this._normal.setupTabStops(T),this._alt.setupTabStops(T)}}n.BufferSet=y},511:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const u=c(482),w=c(643),f=c(3734);class y extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(T){const b=new y;return b.setFromCharData(T),b}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(T){this.fg=T[w.CHAR_DATA_ATTR_INDEX],this.bg=0;let b=!1;if(T[w.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(T[w.CHAR_DATA_CHAR_INDEX].length===2){const d=T[w.CHAR_DATA_CHAR_INDEX].charCo
vendor: 4,229 bytes, lines 12-13
12deAt(0);if(55296<=d&&d<=56319){const m=T[w.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=m&&m<=57343?this.content=1024*(d-55296)+m-56320+65536|T[w.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=T[w.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|T[w.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=T[w.CHAR_DATA_CHAR_INDEX],this.content=2097152|T[w.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=y},643:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},4863:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const u=c(8460),w=c(844);class f{get id(){return this._id}constructor(x){this.line=x,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,w.disposeArray)(this._disposables),this._disposables.length=0)}register(x){return this._disposables.push(x),x}}n.Marker=f,f._nextId=1},7116:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_CHARSET=n.CHARSETS=void 0,n.CHARSETS={},n.DEFAULT_CHARSET=n.CHARSETS.B,n.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},n.CHARSETS.A={"#":"\xA3"},n.CHARSETS.B=void 0,n.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},n.CHARSETS.C=n.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},n.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},n.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},n.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},n.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},n.CHARSETS.E=n.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},n.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},n.CHARSETS.H=n.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},n.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(v,n)=>{var c,u,w;Object.defineProperty(n,"__esModule",{value:!0}),n.C1_ESCAPED=n.C1=n.C0=void 0,function(f){f.NUL="\0",f.SOH="�",f.STX="�",f.ETX="�",f.EOT="�",f.ENQ="�",f.ACK="�",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=` 13`,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="�",f.SI="�",f.DLE="�",f.DC1="�",f.DC2="�",f.DC3="�",f.DC4="�",f.NAK="�",f.SYN="�",f.ETB="�",f.CAN="�",f.EM="�",f.SUB="�",f.ESC="\x1B",f.FS="�",f.GS="�",f.RS="�",f.US="�",f.SP=" ",f.DEL="\x7F"}(c||(n.C0=c={})),function(f){f.PAD="\x80",f.HOP="\x81",f.BPH="\x82",f.NBH="\x83",f.IND="\x84",f.NEL="\x85",f.SSA="\x86",f.ESA="\x87",f.HTS="\x88",f.HTJ="\x89",f.VTS="\x8A",f.PLD="\x8B",f.PLU="\x8C",f.RI="\x8D",f.SS2="\x8E",f.SS3="\x8F",f.DCS="\x90",f.PU1="\x91",f.PU2="\x92",f.STS="\x93",f.CCH="\x94",f.MW="\x95",f.SPA="\x96",f.EPA="\x97",f.
13SOS="\x98",f.SGCI="\x99",f.SCI="\x9A",f.CSI="\x9B",f.ST="\x9C",f.OSC="\x9D",f.PM="\x9E",f.APC="\x9F"}(u||(n.C1=u={})),function(f){f.ST=`${c.ESC}\\`}(w||(n.C1_ESCAPED=w={}))},7399:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const u=c(2584),w={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};n.evaluateKeyboardEvent=function(f,y,x,T){const b={type:0,cancel:!1,key:void 0},d=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?b.key=y?u.C0.ESC+"OA":u.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?b.key=y?u.C0.ESC+"OD":u.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?b.key=y?u.C0.ESC+"OC":u.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(b.key=y?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:b.key=f.ctrlKey?"\b":u.C0.DEL,f.altKey&&(b.key=u.C0.ESC+b.key);break;case 9:if(f.shiftKey){b.key=u.C0.ESC+"[Z";break}b.key=u.C0.HT,b.cancel=!0;break;case 13:b.key=f.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,b.cancel=!0;break;case 27:b.key=u.C0.ESC,f.altKey&&(b.key=u.C0.ESC+u.C0.ESC),b.cancel=!0;break;case 37:if(f.metaKey)break;d?(b.key=u.C0.ESC+"[1;"+(d+1)+"D",b.key===u.C0.ESC+"[1;3D"&&(b.key=u.C0.ESC+(x?"b":"[1;5D"))):b.key=y?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(f.metaKey)break;d?(b.key=u.C0.ESC+"[1;"+(d+1)+"C",b.key===u.C0.ESC+"[1;3C"&&(b.key=u.C0.ESC+(x?"f":"[1;5C"))):b.key=y?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(f.metaKey)break;d?(b.key=u.C0.ESC+"[1;"+(d+1)+"A",x||b.key!==u.C0.ESC+"[1;3A"||(b.key=u.C0.ESC+"[1;5A")):b.key=y?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(f.metaKey)break;d?(b.key=u.C0.ESC+"[1;"+(d+1)+"B",x||b.key!==u.C0.ESC+"[1;3B"||(b.key=u.C0.ESC+"[1;5B")):b.key=y?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(b.key=u.C0.ESC+"[2~");break;case 46:b.key=d?u.C0.ESC+"[3;"+(d+1)+"~":u.C0.ESC+"[3~";break;case 36:b.key=d?u.C0.ESC+"[1;"+(d+1)+"H":y?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:b.key=d?u.C0.ESC+"[1;"+(d+1)+"F":y?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:f.shiftKey?b.type=2:f.ctrlKey?b.key=u.C0.ESC+"[5;"+(d+1)+"~":b.key=u.C0.ESC+"[5~";break;case 34:f.shiftKey?b.type=3:f.ctrlKey?b.key=u.C0.ESC+"[6;"+(d+1)+"~":b.key=u.C0.ESC+"[6~";break;case 112:b.key=d?u.C0.ESC+"[1;"+(d+1)+"P":u.C0.ESC+"OP";break;case 113:b.key=d?u.C0.ESC+"[1;"+(d+1)+"Q":u.C0.ESC+"OQ";break;case 114:b.key=d?u.C0.ESC+"[1;"+(d+1)+"R":u.C0.ESC+"OR";break;case 115:b.key=d?u.C0.ESC+"[1;"+(d+1)+"S":u.C0.ESC+"OS";break;case 116:b.key=d?u.C0.ESC+"[15;"+(d+1)+"~":u.C0.ESC+"[15~";break;case 117:b.key=d?u.C0.ESC+"[17;"+(d+1)+"~":u.C0.ESC+"[17~";break;case 118:b.key=d?u.C0.ESC+"[18;"+(d+1)+"~":u.C0.ESC+"[18~";break;case 119:b.key=d?u.C0.ESC+"[19;"+(d+1)+"~":u.C0.ESC+"[19~";break;case 120:b.key=d?u.C0.ESC+"[20;"+(d+1)+"~":u.C0.ESC+"[20~";break;case 121:b.key=d?u.C0.ESC+"[21;"+(d+1)+"~":u.C0.ESC+"[21~";break;case 122:b.key=d?u.C0.ESC+"[23;"+(d+1)+"~":u.C0.ESC+"[23~";break;case 123:b.key=d?u.C0.ESC+"[24;"+(d+1)+"~":u.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(x&&!T||!f.altKey||f.metaKey)!x||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?b.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(b.key=u.C0.US),f.key==="@"&&(b.key=u.C0.NUL)):f.keyCode===65&&(b.type=1);else{const m=w[f.keyCode],o=m==null?void 0:m[f.shiftKey?1:0];if(o)b.key=u.C0.ESC+o;else if(f.keyCode>=65&&f.keyCode<=90){const l=f.ctrlKey?f.keyCode-64:f.keyCode+32;let S=String.fromCharCode(l);f.shiftKey&&(S=S.toUpperCase()),b.key=u.C0.ESC+S}else if(f.keyCode===32)b.key=u.C0.ESC+(f.ctrlKey?u.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let l=f.code.slice(3,4);f.shiftKey||(l=l.toLowerCase()),b.key=u.C0.ESC+l,b.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?b.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?b.key=u.C0.NUL:f.keyCode>=51&&f.keyCode<=55?b.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?b.key=u.C0.DEL:f.keyCode===219?b.key=u.C0.ESC:f.keyCode===220?b.key=u.C0.FS:f.keyCode===221&&(b.key=u.C0.GS)}return b}},482:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(c){return c>
1365535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},n.utf32ToString=function(c,u=0,w=c.length){let f="";for(let y=u;y<w;++y){let x=c[y];x>65535?(x-=65536,f+=String.fromCharCode(55296+(x>>10))+String.fromCharCode(x%1024+56320)):f+=String.fromCharCode(x)}return f},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,u){const w=c.length;if(!w)return 0;let f=0,y=0;if(this._interim){const x=c.charCodeAt(y++);56320<=x&&x<=57343?u[f++]=1024*(this._interim-55296)+x-56320+65536:(u[f++]=this._interim,u[f++]=x),this._interim=0}for(let x=y;x<w;++x){const T=c.charCodeAt(x);if(55296<=T&&T<=56319){if(++x>=w)return this._interim=T,f;const b=c.charCodeAt(x);56320<=b&&b<=57343?u[f++]=1024*(T-55296)+b-56320+65536:(u[f++]=T,u[f++]=b)}else T!==65279&&(u[f++]=T)}return f}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,u){const w=c.length;if(!w)return 0;let f,y,x,T,b=0,d=0,m=0;if(this.interim[0]){let S=!1,E=this.interim[0];E&=(224&E)==192?31:(240&E)==224?15:7;let L,D=0;for(;(L=63&this.interim[++D])&&D<4;)E<<=6,E|=L;const C=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,I=C-D;for(;m<I;){if(m>=w)return 0;if(L=c[m++],(192&L)!=128){m--,S=!0;break}this.interim[D++]=L,E<<=6,E|=63&L}S||(C===2?E<128?m--:u[b++]=E:C===3?E<2048||E>=55296&&E<=57343||E===65279||(u[b++]=E):E<65536||E>1114111||(u[b++]=E)),this.interim.fill(0)}const o=w-4;let l=m;for(;l<w;){for(;
vendor: 4,191 bytes, line 13
13!(!(l<o)||128&(f=c[l])||128&(y=c[l+1])||128&(x=c[l+2])||128&(T=c[l+3]));)u[b++]=f,u[b++]=y,u[b++]=x,u[b++]=T,l+=4;if(f=c[l++],f<128)u[b++]=f;else if((224&f)==192){if(l>=w)return this.interim[0]=f,b;if(y=c[l++],(192&y)!=128){l--;continue}if(d=(31&f)<<6|63&y,d<128){l--;continue}u[b++]=d}else if((240&f)==224){if(l>=w)return this.interim[0]=f,b;if(y=c[l++],(192&y)!=128){l--;continue}if(l>=w)return this.interim[0]=f,this.interim[1]=y,b;if(x=c[l++],(192&x)!=128){l--;continue}if(d=(15&f)<<12|(63&y)<<6|63&x,d<2048||d>=55296&&d<=57343||d===65279)continue;u[b++]=d}else if((248&f)==240){if(l>=w)return this.interim[0]=f,b;if(y=c[l++],(192&y)!=128){l--;continue}if(l>=w)return this.interim[0]=f,this.interim[1]=y,b;if(x=c[l++],(192&x)!=128){l--;continue}if(l>=w)return this.interim[0]=f,this.interim[1]=y,this.interim[2]=x,b;if(T=c[l++],(192&T)!=128){l--;continue}if(d=(7&f)<<18|(63&y)<<12|(63&x)<<6|63&T,d<65536||d>1114111)continue;u[b++]=d}}return b}}},225:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const u=c(1480),w=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],f=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let y;n.UnicodeV6=class{constructor(){if(this.version="6",!y){y=new Uint8Array(65536),y.fill(1),y[0]=0,y.fill(0,1,32),y.fill(0,127,160),y.fill(2,4352,4448),y[9001]=2,y[9002]=2,y.fill(2,11904,42192),y[12351]=1,y.fill(2,44032,55204),y.fill(2,63744,64256),y.fill(2,65040,65050),y.fill(2,65072,65136),y.fill(2,65280,65377),y.fill(2,65504,65511);for(let x=0;x<w.length;++x)y.fill(0,w[x][0],w[x][1]+1)}}wcwidth(x){return x<32?0:x<127?1:x<65536?y[x]:function(T,b){let d,m=0,o=b.length-1;if(T<b[0][0]||T>b[o][1])return!1;for(;o>=m;)if(d=m+o>>1,T>b[d][1])m=d+1;else{if(!(T<b[d][0]))return!0;o=d-1}return!1}(x,f)?0:x>=131072&&x<=196605||x>=196608&&x<=262141?2:1}charProperties(x,T){let b=this.wcwidth(x),d=b===0&&T!==0;if(d){const m=u.UnicodeService.extractWidth(T);m===0?d=!1:m>b&&(b=m)}return u.UnicodeService.createPropertyValue(0,b,d)}}},5981:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const u=c(8460),w=c(844);class f extends w.Disposable{constructor(x){super(),this._action=x,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(x,T){if(T!==void 0&&this._syncCalls>T)return void(this._syncCalls=0);
13if(this._pendingData+=x.length,this._writeBuffer.push(x),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let b;for(this._isSyncWriting=!0;b=this._writeBuffer.shift();){this._action(b);const d=this._callbacks.shift();d&&d()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(x,T){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=x.length,this._writeBuffer.push(x),this._callbacks.push(T),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=x.length,this._writeBuffer.push(x),this._callbacks.push(T)}_innerWrite(x=0,T=!0){const b=x||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const d=this._writeBuffer[this._bufferOffset],m=this._action(d,T);if(m){const l=S=>Date.now()-b>=12?setTimeout(()=>this._innerWrite(0,S)):this._innerWrite(b,S);return void m.catch(S=>(queueMicrotask(()=>{throw S}),Promise.resolve(!1))).then(l)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=d.length,Date.now()-b>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}n.WriteBuffer=f},5941:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.parseColor=void 0;const c=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function w(f,y){const x=f.toString(16),T=x.length<2?"0"+x:x;switch(y){case 4:return x[0];case 8:return T;case 12:return(T+T).slice(0,3);default:return T+T}}n.parseColor=function(f){if(!f)return;let y=f.toLowerCase();if(y.indexOf("rgb:")===0){y=y.slice(4);const x=c.exec(y);if(x){const T=x[1]?15:x[4]?255:x[7]?4095:65535;return[Math.round(parseInt(x[1]||x[4]||x[7]||x[10],16)/T*255),Math.round(parseInt(x[2]||x[5]||x[8]||x[11],16)/T*255),Math.round(parseInt(x[3]||x[6]||x[9]||x[12],16)/T*255)]}}else if(y.indexOf("#")===0&&(y=y.slice(1),u.exec(y)&&[3,6,9,12].includes(y.length))){const x=y.length/3,T=[0,0,0];for(let b=0;b<3;++b){const d=parseInt(y.slice(x*b,x*b+x),16);T[b]=x===1?d<<4:x===2?d:x===3?d>>4:d>>8}return T}},n.toRgbString=function(f,y=16){const[x,T,b]=f;return`rgb:${w(x,y)}/${w(T,y)}/${w(b,y)}`}},5770:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const u=c(482),w=c(8742),f=c(5770),y=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=y,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=y}registerHandler(T,b){this._handlers[T]===void 0&&(this._handlers[T]=[]);const d=this._handlers[T];return d.push(b),{dispose:()=>{const m=d.indexOf(b);m!==-1&&d.splice(m,1)}}}clearHandler(T){this._handlers[T]&&delete this._handlers[T]}setHandlerFallback(T){this._handlerFb=T}reset(){if(this._active.length)for(let T=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;T>=0;--T)this._active[T].unhook(!1);this._stack.paused=!1,this._active=y,this._ident=0}hook(T,b){if(this.reset(),this._ident=T,this._active=this._handlers[T]||y,this._active.length)for(let d=this._active.length-1;d>=0;d--)this._active[d].hook(b);else this._handlerFb(this._ident,"HOOK",b)}put(T,b,d){if(this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].put(T,b,d);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(T,b,d))}unhook(T,b=!0){if(this._active.length){let d=!1,m=this._active.length-1,o=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,d=b,o=this._stack.fallThrough,this._stack.paused=!1),!o&&d===!1){for(;m>=0&&(d=this._active[m].unhook(T),d!==!0);m--)if(d instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,d;m--}for(;m>=0;m--)if(d=this._active[m].unhook(!1),d instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,d}else this._handlerFb(this._ident,"UNHOOK",T);this._active=y,this._ident=0}};const x=new w.Params;
13x.addParam(0),n.DcsHandler=class{constructor(T){this._handler=T,this._data="",this._params=x,this._hitLimit=!1}hook(T){this._params=T.length>1||T.params[0]?T.clone():x,this._data="",this._hitLimit=!1}put(T,b,d){this._hitLimit||(this._data+=(0,u.utf32ToString)(T,b,d),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(T){let b=!1;if(this._hitLimit)b=!1;else if(T&&(b=this._handler(this._data,this._params),b instanceof Promise))return b.then(d=>(this._params=x,this._data="",this._hitLimit=!1,d));return this._params=x,this._data="",this._hitLimit=!1,b}}},2015:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const u=c(844),w=c(8742),f=c(6242),y=c(6351);class x{constructor(m){this.table=new Uint8Array(m)}setDefault(m,o){this.table.fill(m<<4|o)}add(m,o,l,S){this.table[o<<8|m]=l<<4|S}addMany(m,o,l,S){for(let E=0;E<m.length;E++)this.table[o<<8|m[E]]=l<<4|S}}n.TransitionTable=x;const T=160;n.VT500_TRANSITION_TABLE=function(){const d=new x(4095),m=Array.apply(null,Array(256)).map((D,C)=>C),o=(D,C)=>m.slice(D,C),l=o(32,127),S=o(0,24);S.push(25),S.push.apply(S,o(28,32));const E=o(0,14);let L;for(L in d.setDefault(1,0),d.addMany(l,0,2,0),E)d.addMany([24,26,153,154],L,3,0),d.addMany(o(128,144),L,3,0),d.addMany(o(144,152),L,3,0),d.add(156,L,0,0),d.add(27,L,11,1),d.add(157,L,4,8),d.addMany([152,158,159],L,0,7),d.add(155,L,11,3),d.add(144,L,11,9);return d.addMany(S,0,3,0),d.addMany(S,1,3,1),d.add(127,1,0,1),d.addMany(S,8,0,8),d.addMany(S,3,3,3),d.add(127,3,0,3),d.addMany(S,4,3,4),d.add(127,4,0,4),d.addMany(S,6,3,6),d.addMany(S,5,3,5),d.add(127,5,0,5),d.addMany(S,2,3,2),d.add(127,2,0,2),d.add(93,1,4,8),d.addMany(l,8,5,8),d.add(127,8,5,8),d.addMany([156,27,24,26,7],8,6,0),d.addMany(o(28,32),8,0,8),d.addMany([88,94,95],1,0,7),d.addMany(l,7,0,7),d.addMany(S,7,0,7),d.add(156,7,0,0),d.add(127,7,0,7),d.add(91,1,11,3),d.addMany(o(64,127),3,7,0),d.addMany(o(48,60),3,8,4),d.addMany([60,61,62,63],3,9,4),d.addMany(o(48,60),4,8,4),d.addMany(o(64,127),4,7,0),d.addMany([60,61,62,63],4,0,6),d.addMany(o(32,64),6,0,6),d.add(127,6,0,6),d.addMany(o(64,127),6,0,0),d.addMany(o(32,48),3,9,5),d.addMany(o(32,48),5,9,5),d.addMany(o(48,64),5,0,6),d.addMany(o(64,127),5,7,0),d.addMany(o(32,48),4,9,5),d.addMany(o(32,48),1,9,2),d.addMany(o(32,48),2,9,2),d.addMany(o(48,127),2,10,0),d.addMany(o(48,80),1,10,0),d.addMany(o(81,88),1,10,0),d.addMany([89,90,92],1,10,0),d.addMany(o(96,127),1,10,0),d.add(80,1,11,9),d.addMany(S,9,0,9),d.add(127,9,0,9),d.addMany(o(28,32),9,0,9),d.addMany(o(32,48),9,9,12),d.addMany(o(48,60),9,8,10),d.addMany([60,61,62,63],9,9,10),d.addMany(S,11,0,11),d.addMany(o(32,128),11,0,11),d.addMany(o(28,32),11,0,11),d.addMany(S,10,0,10),d.add(127,10,0,10),d.addMany(o(28,32),10,0,10),d.addMany(o(48,60),10,8,10),d.addMany([60,61,62,63],10,0,11),d.addMany(o(32,48),10,9,12),d.addMany(S,12,0,12),d.add(127,12,0,12),d.addMany(o(28,32),12,0,12),d.addMany(o(32,48),12,9,12),d.addMany(o(48,64),12,0,11),d.addMany(o(64,127),12,12,13),d.addMany(o(64,127),10,12,13),d.addMany(o(64,127),9,12,13),d.addMany(S,13,13,13),d.addMany(l,13,13,13),d.add(127,13,0,13),d.addMany([27,156,24,26],13,14,0),d.add(T,0,2,0),d.add(T,8,5,8),d.add(T,6,0,6),d.add(T,11,0,11),d.add(T,13,13,13),d}();class b extends u.Disposable{constructor(m=n.VT500_TRANSITION_TABLE){super(),this._transitions=m,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new w.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(o,l,S)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,l)=>{},this._escHandlerFb=o=>{},this._errorHandlerFb=o=>o,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new y.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(m,o=[64,126]){let l=0;if(m.prefix){if(m.prefix.length>1)throw new Error("only one byte as prefix supported");
13if(l=m.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(m.intermediates){if(m.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let E=0;E<m.intermediates.length;++E){const L=m.intermediates.charCodeAt(E);if(32>L||L>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=L}}if(m.final.length!==1)throw new Error("final must be a single byte");const S=m.final.charCodeAt(0);if(o[0]>S||S>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return l<<=8,l|=S,l}identToString(m){const o=[];for(;m;)o.push(String.fromCharCode(255&m)),m>>=8;return o.reverse().join("")}setPrintHandler(m){this._printHandler=m}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(m,o){const l=this._identifier(m,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const S=this._escHandlers[l];return S.push(o),{dispose:()=>{const E=S.indexOf(o);E!==-1&&S.splice(E,1)}}}clearEscHandler(m){this._escHandlers[this._identifier(m,[48,126])]&&delete this._escHandlers[this._identifier(m,[48,126])]}setEscHandlerFallback(m){this._escHandlerFb=m}setExecuteHandler(m,o){this._executeHandlers[m.charCodeAt(0)]=o}clearExecuteHandler(m){this._executeHandlers[m.charCodeAt(0)]&&delete this._executeHandlers[m.charCodeAt(0)]}setExecuteHandlerFallback(m){this._executeHandlerFb=m}registerCsiHandler(m,o){const l=this._identifier(m);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const S=this._csiHandlers[l];return S.push(o),{dispose:()=>{const E=S.indexOf(o);E!==-1&&S.splice(E,1)}}}
13clearCsiHandler(m){this._csiHandlers[this._identifier(m)]&&delete this._csiHandlers[this._identifier(m)]}setCsiHandlerFallback(m){this._csiHandlerFb=m}registerDcsHandler(m,o){return this._dcsParser.registerHandler(this._identifier(m),o)}clearDcsHandler(m){this._dcsParser.clearHandler(this._identifier(m))}setDcsHandlerFallback(m){this._dcsParser.setHandlerFallback(m)}registerOscHandler(m,o){return this._oscParser.registerHandler(m,o)}clearOscHandler(m){this._oscParser.clearHandler(m)}setOscHandlerFallback(m){this._oscParser.setHandlerFallback(m)}setErrorHandler(m){this._errorHandler=m}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(m,o,l,S,E){this._parseStack.state=m,this._parseStack.handlers=o,this._parseStack.handlerPos=l,this._parseStack.transition=S,this._parseStack.chunkPos=E}parse(m,o,l){let S,E=0,L=0,D=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,D=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const C=this._parseStack.handlers;let I=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&I>-1){for(;I>=0&&(S=C[I](this._params),S!==!0);I--)if(S instanceof Promise)return this._parseStack.handlerPos=I,S}this._parseStack.handlers=[];break;case 4:if(l===!1&&I>-1){for(;I>=0&&(S=C[I](),S!==!0);I--)if(S instanceof Promise)return this._parseStack.handlerPos=I,S}this._parseStack.handlers=[];break;case 6:if(E=m[this._parseStack.chunkPos],S=this._dcsParser.unhook(E!==24&&E!==26,l),S)return S;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(E=m[this._parseStack.chunkPos],S=this._oscParser.end(E!==24&&E!==26,l),S)return S;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,D=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let C=D;C<o;++C){switch(E=m[C],L=this._transitions.table[this.currentState<<8|(E<160?E:T)],L>>4){case 2:for(let q=C+1;;++q){if(q>=o||(E=m[q])<32||E>126&&E<T){this._printHandler(m,C,q),C=q-1;break}if(++q>=o||(E=m[q])<32||E>126&&E<T){this._printHandler(m,C,q),C=q-1;break}if(++q>=o||(E=m[q])<32||E>126&&E<T){this._printHandler(m,C,q),C=q-1;break}if(++q>=o||(E=m[q])<32||E>126&&E<T){this._printHandler(m,C,q),C=q-1;break}}break;case 3:this._executeHandlers[E]?this._executeHandlers[E]():this._executeHandlerFb(E),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:C,code:E,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const I=this._csiHandlers[this._collect<<8|E];let B=I?I.length-1:-1;for(;B>=0&&(S=I[B](this._params),S!==!0);B--)if(S instanceof Promise)return this._preserveStack(3,I,B,L,C),S;B<0&&this._csiHandlerFb(this._collect<<8|E,this._params),this.precedingJoinState=0;break;case 8:do switch(E){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(E-48)}while(++C<o&&(E=m[C])>47&&E<60);C--;break;case 9:this._collect<<=8,this._collect|=E;break;case 10:const U=this._escHandlers[this._collect<<8|E];let z=U?U.length-1:-1;for(;z>=0&&(S=U[z](),S!==!0);z--)if(S instanceof Promise)return this._preserveStack(4,U,z,L,C),S;z<0&&this._escHandlerFb(this._collect<<8|E),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|E,this._params);break;case 13:for(let q=C+1;;++q)if(q>=o||(E=m[q])===24||E===26||E===27||E>127&&E<T){this._dcsParser.put(m,C,q),C=q-1;break}break;case 14:if(S=this._dcsParser.unhook(E!==24&&E!==26),S)return this._preserveStack(6,[],0,L,C),S;E===27&&(L|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let q=C+1;;q++)if(q>=o||(E=m[q])<32||E>127&&E<T){this._oscParser.put(m,C,q),C=q-1;break}break;case 6:if(S=this._oscParser.end(E!==24&&E!==26),S)return this._preserveStack(5,[],0,L,C),S;E===27&&(L|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&L}}}n.EscapeSequenceParser=b},6242:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const u=c(5770),w=c(482),f=[];n.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(y,x){this._handlers[y]===void 0&&(this._handlers[y]=[]);const T=this._handlers[y];return T.push(x),{dispose:()=>{const b=T.indexOf(x);b!==-1&&T.splice(b,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0}
13_start(){if(this._active=this._handlers[this._id]||f,this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].start();else this._handlerFb(this._id,"START")}_put(y,x,T){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(y,x,T);else this._handlerFb(this._id,"PUT",(0,w.utf32ToString)(y,x,T))}start(){this.reset(),this._state=1}put(y,x,T){if(this._state!==3){if(this._state===1)for(;x<T;){const b=y[x++];if(b===59){this._state=2,this._start();break}if(b<48||57<b)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+b-48}this._state===2&&T-x>0&&this._put(y,x,T)}}end(y,x=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let T=!1,b=this._active.length-1,d=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,T=x,d=this._stack.fallThrough,this._stack.paused=!1),!d&&T===!1){for(;b>=0&&(T=this._active[b].end(y),T!==!0);b--)if(T instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,T;b--}for(;b>=0;b--)if(T=this._active[b].end(!1),T instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,T}else this._handlerFb(this._id,"END",y);this._active=f,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(y){this._handler=y,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(y,x,T){this._hitLimit||(this._data+=(0,w.utf32ToString)(y,x,T),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(y){let x=!1;if(this._hitLimit)x=!1;else if(y&&(x=this._handler(this._data),x instanceof Promise))return x.then(T=>(this._data="",this._hitLimit=!1,T));return this._data="",this._hitLimit=!1,x}}},8742:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const c=2147483647;class u{static fromArray(f){const y=new u;if(!f.length)return y;for(let x=Array.isArray(f[0])?1:0;x<f.length;++x){const T=f[x];if(Array.isArray(T))for(let b=0;b<T.length;++b)y.addSubParam(T[b]);else y.addParam(T)}return y}constructor(f=32,y=32){if(this.maxLength=f,this.maxSubParamsLength=y,y>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(y),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new u(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let y=0;y<this.length;++y){f.push(this.params[y]);const x=this._subParamsIdx[y]>>8,T=255&this._subParamsIdx[y];T-x>0&&f.push(Array.prototype.slice.call(this._subParams,x,T))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>c?c:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>c?c:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const y=this._subParamsIdx[f]>>8,x=255&this._subParamsIdx[f];return x-y>0?this._subParams.subarray(y,x):null}getSubParamsAll(){const f={};for(let y=0;y<this.length;++y){const x=this._subParamsIdx[y]>>8,T=255&this._subParamsIdx[y];T-x>0&&(f[y]=this._subParams.slice(x,T))}return f}addDigit(f){let y;if(this._rejectDigits||!(y=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const x=this._digitIsSub?this._subParams:this.params,T=x[y-1];x[y-1]=~T?Math.min(10*T+f,c):f}}
13n.Params=u},5741:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,u){const w={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(w),u.dispose=()=>this._wrappedAddonDispose(w),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let w=0;w<this._addons.length;w++)if(this._addons[w]===c){u=w;break}if(u===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(u,1)}}},8771:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const u=c(3785),w=c(511);n.BufferApiView=class{constructor(f,y){this._buffer=f,this.type=y}init(f){return this._buffer=f,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(f){const y=this._buffer.lines.get(f);if(y)return new u.BufferLineApiView(y)}getNullCell(){return new w.CellData}}},3785:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const u=c(511);n.BufferLineApiView=class{constructor(w){this._line=w}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(w,f){if(!(w<0||w>=this._line.length))return f?(this._line.loadCell(w,f),f):this._line.loadCell(w,new u.CellData)}translateToString(w,f,y){return this._line.translateToString(w,f,y)}}},8285:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const u=c(8771),w=c(8460),f=c(844);class y extends f.Disposable{constructor(T){super(),this._core=T,this._onBufferChange=this.register(new w.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}n.BufferNamespaceApi=y},7975:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,u){return this._core.registerCsiHandler(c,w=>u(w.toArray()))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,(w,f)=>u(w,f.toArray()))}addDcsHandler(c,u){return this.registerDcsHandler(c,u)}registerEscHandler(c,u){return this._core.registerEscHandler(c,u)}addEscHandler(c,u){return this.registerEscHandler(c,u)}registerOscHandler(c,u){return this._core.registerOscHandler(c,u)}addOscHandler(c,u){return this.registerOscHandler(c,u)}}},7090:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(v,n,c){var u=this&&this.__decorate||function(d,m,o,l){var S,E=arguments.length,L=E<3?m:l===null?l=Object.getOwnPropertyDescriptor(m,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(d,m,o,l);else for(var D=d.length-1;D>=0;D--)(S=d[D])&&(L=(E<3?S(L):E>3?S(m,o,L):S(m,o))||L);return E>3&&L&&Object.defineProperty(m,o,L),L},w=this&&this.__param||function(d,m){return function(o,l){m(o,l,d)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const f=c(8460),y=c(844),x=c(5295),T=c(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let b=n.BufferService=class extends y.Disposable{get buffer(){return this.buffers.active}constructor(d){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(d.rawOptions.cols||0,n.MINIMUM_COLS),this.rows=Math.max(d.rawOptions.rows||0,n.MINIMUM_ROWS),this.buffers=this.register(new x.BufferSet(d,this))}resize(d,m){this.cols=d,this.rows=m,this.buffers.resize(d,m),this._onResize.fire({cols:d,rows:m})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(d,m=!1){const o=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===d.fg&&l.getBg(0)===d.bg||(l=o.getBlankLine(d,m),this._cachedBlankLine
13=l),l.isWrapped=m;const S=o.ybase+o.scrollTop,E=o.ybase+o.scrollBottom;if(o.scrollTop===0){const L=o.lines.isFull;E===o.lines.length-1?L?o.lines.recycle().copyFrom(l):o.lines.push(l.clone()):o.lines.splice(E+1,0,l.clone()),L?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const L=E-S+1;o.lines.shiftElements(S+1,L-1,-1),o.lines.set(E,l.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(d,m,o){const l=this.buffer;if(d<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else d+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const S=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+d,l.ybase),0),S!==l.ydisp&&(m||this._onScroll.fire(l.ydisp))}};n.BufferService=b=u([w(0,T.IOptionsService)],b)},7994:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CharsetService=void 0,n.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,u){this._charsets[c]=u,this.glevel===c&&(this.charset=u)}}},1753:function(v,n,c){var u=this&&this.__decorate||function(l,S,E,L){var D,C=arguments.length,I=C<3?S:L===null?L=Object.getOwnPropertyDescriptor(S,E):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(l,S,E,L);else for(var B=l.length-1;B>=0;B--)(D=l[B])&&(I=(C<3?D(I):C>3?D(S,E,I):D(S,E))||I);return C>3&&I&&Object.defineProperty(S,E,I),I},w=this&&this.__param||function(l,S){return function(E,L){S(E,L,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const f=c(2585),y=c(8460),x=c(844),T={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function b(l,S){let E=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(E|=64,E|=l.action):(E|=3&l.button,4&l.button&&(E|=64),8&l.button&&(E|=128),l.action===32?E|=32:l.action!==0||S||(E|=3)),E}const d=String.fromCharCode,m={DEFAULT:l=>{const S=[b(l,!1)+32,l.col+32,l.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${d(S[0])}${d(S[1])}${d(S[2])}`},SGR:l=>{const S=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${b(l,!0)};${l.col};${l.row}${S}`},SGR_PIXELS:l=>{const S=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${b(l,!0)};${l.x};${l.y}${S}`}};let o=n.CoreMouseService=class extends x.Disposable{constructor(l,S){super(),this._bufferService=l,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new y.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const E of Object.keys(T))this.addProtocol(E,T[E]);for(const E of Object.keys(m))this.addEncoding(E,m[E]);this.reset()}addProtocol(l,S){this._protocols[l]=S}addEncoding(l,S){this._encodings[l]=S}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const S=this._encodings[this._activeEncoding](l);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,S,E){if(E){if(l.x!==S.x||l.y!==S.y)return!1}else if(l.col!==S.col||l.row!==S.row)return!1;return l.button===S.button&&l.action===S.action&&l.ctrl===S.ctrl&&l.alt===S.alt&&l.shift===S.shift}};n.CoreMouseService=o=u([w(0,f.IBufferService),w(1,f.ICoreService)],o)},6975:function(v,n,c){var u=this&&this.__decorate||function(o,l,S,E){var L,D=arguments.length,C=D<3?l:E===null?E=Object.getOwnPropertyDescriptor(l,S):E;
13if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(o,l,S,E);else for(var I=o.length-1;I>=0;I--)(L=o[I])&&(C=(D<3?L(C):D>3?L(l,S,C):L(l,S))||C);return D>3&&C&&Object.defineProperty(l,S,C),C},w=this&&this.__param||function(o,l){return function(S,E){l(S,E,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const f=c(1439),y=c(8460),x=c(844),T=c(2585),b=Object.freeze({insertMode:!1}),d=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let m=n.CoreService=class extends x.Disposable{constructor(o,l,S){super(),this._bufferService=o,this._logService=l,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new y.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new y.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new y.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new y.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(b),this.decPrivateModes=(0,f.clone)(d)}reset(){this.modes=(0,f.clone)(b),this.decPrivateModes=(0,f.clone)(d)}triggerDataEvent(o,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.ydisp&&this._onRequestScrollToBottom.f
13ire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,()=>o.split("").map(E=>E.charCodeAt(0))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,()=>o.split("").map(l=>l.charCodeAt(0))),this._onBinary.fire(o))}};n.CoreService=m=u([w(0,T.IBufferService),w(1,T.ILogService),w(2,T.IOptionsService)],m)},9074:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const u=c(8055),w=c(8460),f=c(844),y=c(6106);let x=0,T=0;class b extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new y.SortedList(o=>o==null?void 0:o.marker.line),this._onDecorationRegistered=this.register(new w.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new w.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)(()=>this.reset()))}registerDecoration(o){if(o.marker.isDisposed)return;const l=new d(o);if(l){const S=l.marker.onDispose(()=>l.dispose());l.onDispose(()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),S.dispose())}),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,l,S){var D,C,I;let E=0,L=0;for(const B of this._decorations.getKeyIterator(l))E=(D=B.options.x)!=null?D:0,L=E+((C=B.options.width)!=null?C:1),o>=E&&o<L&&(!S||((I=B.options.layer)!=null?I:"bottom")===S)&&(yield B)}forEachDecorationAtCell(o,l,S,E){this._decorations.forEachByKey(l,L=>{var D,C,I;x=(D=L.options.x)!=null?D:0,T=x+((C=L.options.width)!=null?C:1),o>=x&&o<T&&(!S||((I=L.options.layer)!=null?I:"bottom")===S)&&E(L)})}}n.DecorationService=b;class d extends f.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=u.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=u.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(o){super(),this.options=o,this.onRenderEmitter=this.register(new w.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new w.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=o.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const u=c(2585),w=c(8343);class f{constructor(...x){this._entries=new Map;for(const[T,b]of x)this.set(T,b)}set(x,T){const b=this._entries.get(x);return this._entries.set(x,T),b}forEach(x){for(const[T,b]of this._entries.entries())x(T,b)}has(x){return this._entries.has(x)}get(x){return this._entries.get(x)}}n.ServiceCollection=f,n.InstantiationService=class{constructor(){this._services=new f,this._services.set(u.IInstantiationService,this)}setService(y,x){this._services.set(y,x)}getService(y){return this._services.get(y)}createInstance(y,...x){const T=(0,w.getServiceDependencies)(y).sort((m,o)=>m.index-o.index),b=[];for(const m of T){const o=this._services.get(m.id);if(!o)throw new Error(`[createInstance] ${y.name} depends on UNKNOWN service ${m.id}.`);b.push(o)}const d=T.length>0?T[0].index:x.length;if(x.length!==d)throw new Error(`[createInstance] First service dependency of ${y.name} at position ${d+1} conflicts with ${x.length} static arguments`);return new y(...x,...b)}}},7866:function(v,n,c){var u=this&&this.__decorate||function(d,m,o,l){var S,E=arguments.length,L=E<3?m:l===null?l=Object.getOwnPropertyDescriptor(m,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(d,m,o,l);else for(var D=d.length-1;D>=0;D--)(S=d[D])&&(L=(E<3?S(L):E>3?S(m,o,L):S(m,o))||L);return E>3&&L&&Object.defineProperty(m,o,L),L},w=this&&this.__param||function(d,m){return function(o,l){m(o,l,d)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const f=c(844),y=c(2585),x={trace:y.LogLevelEnum.TRACE,debug:y.LogLevelEnum.DEBUG,info:y.LogLevelEnum.INFO,warn:y.LogLevelEnum.WARN,error:y.LogLevelEnum.ERROR,off:y.LogLevelEnum.OFF};let T,b=n.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(d){super(),this._optionsService=d,this._logLevel=y.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),T=this}_updateLogLevel(){this._logLevel=x[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(d){for(let m=0;m<d.length;m++)typeof d[m]=="function"&&(d[m]=d[m]())}_log(d,m,o){this._evalLazyOptionalParams(o),d.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+m,...o)}trace(d,...m){var o,l;this._logLevel<=y.LogLevelEnum.TRACE&&this._log((l=(o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))!=null?l:console.log,d,m)}debug(d,...m){var o,l;this._logLevel<=y.LogLevelEnum.DEBUG&&this._log((l=(o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))!=null?l:console.log,d,m)}info(d,...m){var o,l;this._logLevel<=y.LogLevelEnum.INFO&&this._log((l=(o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))!=null?l:console.info,d,m)}warn(d,...m){var o,l;this._logLevel<=y.LogLevelEnum.WARN&&this._log((l=(o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))!=null?l:console.warn,d,m)}error(d,...m){var o,l;this._logLevel<=y.LogLevelEnum.ERROR&&this._log((l=(o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))!=null?l:console.error,d,m)}};n.LogService=b=u([w(0,y.IOptionsService)],b),n.setTraceLogger=function(d){T=d},n.traceCall=function(d,m,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...S){if(T.logLevel!==y.LogLevelEnum.TRACE)return l.apply(this,S);T.trace(`GlyphRenderer#${l.name}(${S.map(L=>JSON.stringify(L)).join(", ")})`);const E=l.apply(this,S);return T.trace(`GlyphRenderer#${l.name} return`,E),E}}},7302:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const u=c(8460),w=c(844),f=c(6114);n.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const y=["normal","bold","100","200","300","400","500","600","700","800","900"];class x extends w.Disposable{constructor(b){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const d={...n.DEFAULT_OPTIONS};for(const m in b)if(m in d)try{const o=b[m];d[m]=this._sanitizeAndValidateOption(m,o)}catch(o){console.error(o)}this.rawOptions=d,this.options={...d},this._setupOptions(),this.register((0,w.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(b,d){return this.onOptionChange(m=>{m===b&&d(this.rawOptions[b])})}onMultipleOptionChange(b,d){return this.onOptionChange(m=>{b.indexOf(m)!==-1&&d()})}_setupOptions(){const b=m=>{if(!(m in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);return this.rawOptions[m]},d=(m,o)=>{if(!(m in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);o=this._sanitizeAndValidateOption(m,o),this.rawOptions[m]!==o&&(this.rawOptions[m]=o,this._onOptionChange.fire(m))};for(const m in this.rawOptions){const o={get:b.bind(this,m),set:d.bind(this,m)};Object.defineProperty(this.options,m,o)}}_sanitizeAndValidateOption(b,d){switch(b){case"cursorStyle":if(d||(d=n.DEFAULT_OPTIONS[b]),!function(m){return m==="block"||m==="underline"||m==="bar"}(d))throw new Error(`"${d}" is not a valid value for ${b}`);break;case"wordSeparator":d||(d=n.DEFAULT_OPTIONS[b]);break;case"fontWeight":case"fontWeightBold":if(typeof d=="number"&&1<=d&&d<=1e3)break;d=y.includes(d)?d:n.DEFAULT_OPTIONS[b];break;case"cursorWidth":d=Math.floor(d);case"lineHeight":case"tabStopWidth":if(d<1)throw new Error(`${b} cannot be less than 1, value: ${d}`);break;case"minimumContrastRatio":d=Math.max(1,Math.min(21,Math.round(10*d)/10));break;case"scrollback":if((d=Math.min(d,4294967295))<0)throw new Error(`${b} cannot be less than 0, value: ${d}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(d<=0)throw new Error(`${b} cannot be less than or equal to 0, value: ${d}`);break;case"rows":case"cols":if(!d&&d!==0)throw new Error(`${b} must be numeric, value: ${d}`);break;case"windowsPty":d=d!=null?d:{}}return d}}n.OptionsService=x},2660:function(v,n,c){var u=this&&this.__decorate||function(x,T,b,d){var m,o=arguments.length,l=o<3?T:d===null?d=Object.getOwnPropertyDescriptor(T,b):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(x,T,b,d);else for(var S=x.length-1;S>=0;S--)(m=x[S])&&(l=(o<3?m(l):o>3?m(T,b,l):m(T,b))||l);return o>3&&l&&Object.defineProperty(T,b,l),l},w=this&&this.__param||function(x,T){return function(b,d){T(b,d,x)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const f=c(2585);
13let y=n.OscLinkService=class{constructor(x){this._bufferService=x,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(x){const T=this._bufferService.buffer;if(x.id===void 0){const S=T.addMarker(T.ybase+T.y),E={data:x,id:this._nextId++,lines:[S]};return S.onDispose(()=>this._removeMarkerFromLink(E,S)),this._dataByLinkId.set(E.id,E),E.id}const b=x,d=this._getEntryIdKey(b),m=this._entriesWithId.get(d);if(m)return this.addLineToLink(m.id,T.ybase+T.y),m.id;const o=T.addMarker(T.ybase+T.y),l={id:this._nextId++,key:this._getEntryIdKey(b),data:b,lines:[o]};return o.onDispose(()=>this._removeMarkerFromLink(l,o)),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(x,T){const b=this._dataByLinkId.get(x);if(b&&b.lines.every(d=>d.line!==T)){const d=this._bufferService.buffer.addMarker(T);b.lines.push(d),d.onDispose(()=>this._removeMarkerFromLink(b,d))}}getLinkData(x){var T;return(T=this._dataByLinkId.get(x))==null?void 0:T.data}_getEntryIdKey(x){return`${x.id};;${x.uri}`}_removeMarkerFromLink(x,T){const b=x.lines.indexOf(T);b!==-1&&(x.lines.splice(b,1),x.lines.length===0&&(x.data.id!==void 0&&this._entriesWithId.delete(x.key),this._dataByLinkId.delete(x.id)))}};n.OscLinkService=y=u([w(0,f.IBufferService)],y)},8343:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const c="di$target",u="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(w){return w[u]||[]},n.createDecorator=function(w){if(n.serviceRegistry.has(w))return n.serviceRegistry.get(w);const f=function(y,x,T){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(b,d,m){d[c]===d?d[u].push({id:b,index:m}):(d[u]=[{id:b,index:m}],d[c]=d)})(f,y,T)};return f.toString=()=>w,n.serviceRegistry.set(w,f),f}},2585:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const u=c(8343);var w;n.IBufferService=(0,u.createDecorator)("BufferService"),n.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),n.ICoreService=(0,u.createDecorator)("CoreService"),n.ICharsetService=(0,u.createDecorator)("CharsetService"),n.IInstantiationService=(0,u.createDecorator)("InstantiationService"),function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"}(w||(n.LogLevelEnum=w={})),n.ILogService=(0,u.createDecorator)("LogService"),n.IOptionsService=(0,u.createDecorator)("OptionsService"),n.IOscLinkService=(0,u.createDecorator)("OscLinkService"),n.IUnicodeService=(0,u.createDecorator)("UnicodeService"),n.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(v,n,c)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const u=c(8460),w=c(225);class f{static extractShouldJoin(x){return(1&x)!=0}static extractWidth(x){return x>>1&3}static extractCharKind(x){return x>>3}static createPropertyValue(x,T,b=!1){return(16777215&x)<<3|(3&T)<<1|(b?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const x=new w.UnicodeV6;this.register(x),this._active=x.version,this._activeProvider=x}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(x){if(!this._providers[x])throw new Error(`unknown Unicode version "${x}"`);this._active=x,this._activeProvider=this._providers[x],this._onChange.fire(x)}register(x){this._providers[x.version]=x}wcwidth(x){return this._activeProvider.wcwidth(x)}getStringCellWidth(x){let T=0,b=0;const d=x.length;for(let m=0;m<d;++m){let o=x.charCodeAt(m);if(55296<=o&&o<=56319){if(++m>=d)return T+this.wcwidth(o);const E=x.charCodeAt(m);56320<=E&&E<=57343?o=1024*(o-55296)+E-56320+65536:T+=this.wcwidth(E)}const l=this.charProperties(o,b);let S=f.extractWidth(l);f.extractShouldJoin(l)&&(S-=f.extractWidth(b)),T+=S,b=l}return T}charProperties(x,T){return this._activeProvider.charProperties(x,T)}}n.UnicodeService=f}},p={};function a(v){var n=p[v];if(n!==void 0)return n.exports;var c=p[v]={exports:{}};return r[v].call(c.exports,c,c.exports,a),c.exports}var g={};return(()=>{var v=g;
13Object.defineProperty(v,"__esModule",{value:!0}),v.Terminal=void 0;const n=a(9042),c=a(3236),u=a(844),w=a(5741),f=a(8285),y=a(7975),x=a(7090),T=["cols","rows"];class b extends u.Disposable{constructor(m){super(),this._core=this.register(new c.Terminal(m)),this._addonManager=this.register(new w.AddonManager),this._publicOptions={...this._core.options};const o=S=>this._core.options[S],l=(S,E)=>{this._checkReadonlyOptions(S),this._core.options[S]=E};for(const S in this._core.options){const E={get:o.bind(this,S),set:l.bind(this,S)};Object.defineProperty(this._publicOptions,S,E)}}_checkReadonlyOptions(m){if(T.includes(m))throw new Error(`Option "${m}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new y.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new x.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const m=this._core.coreService.decPrivateModes;let o="none";switch(this._core.coreMouseService.activeProtocol){case"X10":o="x10";break;case"VT200":o="vt200";break;case"DRAG":o="drag";break;case"ANY":o="any"}return{applicationCursorKeysMode:m.applicationCursorKeys,applicationKeypadMode:m.applicationKeypad,bracketedPasteMode:m.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:m.origin,reverseWraparoundMode:m.reverseWraparound,sendFocusMode:m.sendFocus,wraparoundMode:m.wraparound}}get options(){return this._publicOptions}set options(m){for(const o in m)this._publicOptions[o]=m[o]}blur(){this._core.blur()}focus(){this._core.focus()}input(m,o=!0){this._core.input(m,o)}resize(m,o){this._verifyIntegers(m,o),this._core.resize(m,o)}open(m){this._core.open(m)}attachCustomKeyEventHandler(m){this._core.attachCustomKeyEventHandler(m)}attachCustomWheelEventHandler(m){this._core.attachCustomWheelEventHandler(m)}registerLinkProvider(m){return this._core.registerLinkProvider(m)}registerCharacterJoiner(m){return this._checkProposedApi(),this._core.registerCharacterJoiner(m)}deregisterCharacterJoiner(m){this._checkProposedApi(),this._core.deregisterCharacterJoiner(m)}registerMarker(m=0){return this._verifyIntegers(m),this._core.registerMarker(m)}registerDecoration(m){var o,l,S;return this._checkProposedApi(),this._verifyPositiveIntegers((o=m.x)!=null?o:0,(l=m.width)!=null?l:0,(S=m.height)!=null?S:0),this._core.registerDecoration(m)}hasSelection(){return this._core.hasSelection()}select(m,o,l){this._verifyIntegers(m,o,l),this._core.select(m,o,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(m,o){this._verifyIntegers(m,o),this._core.selectLines(m,o)}dispose(){super.dispose()}scrollLines(m){this._verifyIntegers(m),this._core.scrollLines(m)}scrollPages(m){this._verifyIntegers(m),this._core.scrollPages(m)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(m){this._verifyIntegers(m),this._core.scrollToLine(m)}clear(){this._core.clear()}write(m,o){this._core.write(m,o)}writeln(m,o){this._core.write(m),this._core.write(`\r 14`,o)}paste(m){this._core.paste(m)}refresh(m,o){this._verifyIntegers(m,o),this._core.refresh(m,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(m){this._addonManager.loadAddon(this,m)}static get strings(){return n}_verifyIntegers(...m){for(const o of m)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...m){for(const o of m)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}v.Terminal=b})(),g})())})(Vh);
14var Kh={exports:{}};(function(s,t){(function(r,p){s.exports=p()})(self,function(){return(()=>{var r={};return(()=>{var p=r;Object.defineProperty(p,"__esModule",{value:!0}),p.FitAddon=void 0,p.FitAddon=class{constructor(){}activate(a){this._terminal=a}dispose(){}fit(){const a=this.proposeDimensions();if(!a||!this._terminal||isNaN(a.cols)||isNaN(a.rows))return;const g=this._terminal._core;this._terminal.rows===a.rows&&this._terminal.cols===a.cols||(g._renderService.clear(),this._terminal.resize(a.cols,a.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const a=this._terminal._core,g=a._renderService.dimensions;if(g.css.cell.width===0||g.css.cell.height===0)return;const v=this._terminal.options.scrollback===0?0:a.viewport.scrollBarWidth,n=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(n.getPropertyValue("height")),u=Math.max(0,parseInt(n.getPropertyValue("width"))),w=window.getComputedStyle(this._terminal.element),f=c-(parseInt(w.getPropertyValue("padding-top"))+parseInt(w.getPropertyValue("padding-bottom"))),y=u-(parseInt(w.getPropertyValue("padding-right"))+parseInt(w.getPropertyValue("padding-left")))-v;return{cols:Math.max(2,Math.floor(y/g.css.cell.width)),rows:Math.max(1,Math.floor(f/g.css.cell.height))}}}})(),r})()})})(Kh);var Gh={exports:{}};(function(s,t){(function(r,p){s.exports=p()})(self,()=>(()=>{var r={345:(v,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;u<this._listeners.length;u++)if(this._listeners[u]===c)return void this._listeners.splice(u,1)}}})),this._event}fire(c,u){const w=[];for(let f=0;f<this._listeners.length;f++)w.push(this._listeners[f]);for(let f=0;f<w.length;f++)w[f].call(void 0,c,u)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(c,u){return c(w=>u.fire(w))}},859:(v,n)=>{function c(u){for(const w of u)w.dispose();u.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const w=this._disposables.indexOf(u);w!==-1&&this._disposables.splice(w,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var w;this._isDisposed||u===this._value||((w=this._value)===null||w===void 0||w.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)===null||u===void 0||u.dispose(),this._value=void 0}},n.toDisposable=function(u){return{dispose:u}},n.disposeArray=c,n.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}}},p={};function a(v){var n=p[v];if(n!==void 0)return n.exports;var c=p[v]={exports:{}};return r[v](c,c.exports,a),c.exports}var g={};return(()=>{var v=g;Object.defineProperty(v,"__esModule",{value:!0}),v.SearchAddon=void 0;const n=a(345),c=a(859),u=" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?";class w extends c.Disposable{constructor(y){var x;super(),this._highlightedLines=new Set,this._highlightDecorations=[],this._selectedDecoration=this.register(new c.MutableDisposable),this._linesCacheTimeoutId=0,this._onDidChangeResults=this.register(new n.EventEmitter),this.onDidChangeResults=this._onDidChangeResults.event,this._highlightLimit=(x=y==null?void 0:y.highlightLimit)!==null&&x!==void 0?x:1e3}activate(y){this._terminal=y,this.register(this._terminal.onWriteParsed(()=>this._updateMatches())),this.register(this._terminal.onResize(()=>this._updateMatches())),this.register((0,c.toDisposable)(()=>this.clearDecorations()))}_updateMatches(){var y;this._highlightTimeout&&window.clearTimeout(this._highlightTimeout),this._cachedSearchTerm&&((y=this._lastSearchOptions)===null||y===void 0?void 0:y.decorations)&&(this._highlightTimeout=setTimeout(()=>{const x=this._cachedSearchTerm;this._cachedSearchTerm=void 0,this.findPrevious(x,Object.assign(Object.assign({},this._lastSearchOptions),{incremental:!0,noScroll:!0}))},200))}clearDecorations(y){this._selectedDecoration.clear(),(0,c.disposeArray)(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear(),y||(this._cachedSearchTerm=void 0)}findNext(y,x){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");this._lastSearchOptions=x,x!=null&&x.decorations&&(this._cachedSearchTerm!==void 0&&y===this._cachedSearchTerm||this._highlightAllMatches(y,x));const T=this._findNextAndSelect(y,x);return this._fireResults(x),this._cachedSearchTerm=y,T}_highlightAllMatches(y,x){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!y||y.length===0)return void this.clearDecorations();x=x||{},this.clearDecorations(!0);const T=[];let b,d=this._find(y,0,0,x);for(;d&&((b==null?void 0:b.row)!==d.row||(b==null?void 0:b.col)!==d.col)&&!(T.length>=this._highlightLimit);)b=d,T.push(b),d=this._find(y,b.col+b.term.length>=this._terminal.cols?b.row+1:b.row,b.col+b.term.length>=this._terminal.cols?0:b.col+1,x);for(const m of T){const o=this._createResultDecoration(m,x.decorations);o&&(this._highlightedLines.add(o.marker.line),this._highlightDecorations.push({decoration:o,match:m,dispose(){o.dispose()}}))}}_find(y,x,T,b){var d;if(!this._terminal||!y||y.length===0)return(d=this._terminal)===null||d===void 0||d.clearSelection(),void this.clearDecorations();if(T>this._terminal.cols)throw new Error(`Invalid col: ${T} to search in terminal of ${this._terminal.cols} cols`);let m;this._initLinesCache();const o={startRow:x,startCol:T};if(m=this._findInLine(y,o,b),!m)for(let l=x+1;l<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=l,o.startCol=0,m=this._findInLine(y,o,b),!m);l++);return m}_findNextAndSelect(y,x){var T;if(!this._terminal||!y||y.length===0)return(T=this._terminal)===null||T===void 0||T.clearSelection(),this.clearDecorations(),!1;const b=this._terminal.getSelectionPosition();this._terminal.clearSelection();let d=0,m=0;b&&(this._cachedSearchTerm===y?(d=b.end.x,m=b.end.y):(d=b.start.x,m=b.start.y)),this._initLinesCache();const o={startRow:m,startCol:d};let l=this._findInLine(y,o,x);if(!l)for(let S=m+1;S<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=S,o.startCol=0,l=this._findInLine(y,o,x),!l);S++);if(!l&&m!==0)for(let S=0;
14S<m&&(o.startRow=S,o.startCol=0,l=this._findInLine(y,o,x),!l);S++);return!l&&b&&(o.startRow=b.start.y,o.startCol=0,l=this._findInLine(y,o,x)),this._selectResult(l,x==null?void 0:x.decorations,x==null?void 0:x.noScroll)}findPrevious(y,x){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");this._lastSearchOptions=x,x!=null&&x.decorations&&(this._cachedSearchTerm!==void 0&&y===this._cachedSearchTerm||this._highlightAllMatches(y,x));const T=this._findPreviousAndSelect(y,x);return this._fireResults(x),this._cachedSearchTerm=y,T}_fireResults(y){if(y!=null&&y.decorations){let x=-1;if(this._selectedDecoration.value){const T=this._selectedDecoration.value.match;for(let b=0;b<this._highlightDecorations.length;b++){const d=this._highlightDecorations[b].match;if(d.row===T.row&&d.col===T.col&&d.size===T.size){x=b;break}}}this._onDidChangeResults.fire({resultIndex:x,resultCount:this._highlightDecorations.length})}}_findPreviousAndSelect(y,x){var T;if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!this._terminal||!y||y.length===0)return(T=this._terminal)===null||T===void 0||T.clearSelection(),this.clearDecorations(),!1;const b=this._terminal.getSelectionPosition();this._terminal.clearSelection();let d=this._terminal.buffer.active.baseY+this._terminal.rows-1,m=this._terminal.cols;const o=!0;this._initLinesCache();const l={startRow:d,startCol:m};let S;if(b&&(l.startRow=d=b.start.y,l.startCol=m=b.start.x,this._cachedSearchTerm!==y&&(S=this._findInLine(y,l,x,!1),S||(l.startRow=d=b.end.y,l.startCol=m=b.end.x))),S||(S=this._findInLine(y,l,x,o)),!S){l.startCol=Math.max(l.startCol,this._terminal.cols);for(let E=d-1;E>=0&&(l.startRow=E,S=this._findInLine(y,l,x,o),!S);E--);}if(!S&&d!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let E=this._terminal.buffer.active.baseY+this._terminal.rows-1;E>=d&&(l.startRow=E,S=this._findInLine(y,l,x,o),!S);E--);return this._selectResult(S,x==null?void 0:x.decorations,x==null?void 0:x.noScroll)}_initLinesCache(){const y=this._terminal;this._linesCache||(this._linesCache=new Array(y.buffer.active.length),this._cursorMoveListener=y.onCursorMove(()=>this._destroyLinesCache()),this._resizeListener=y.onResize(()=>this._destroyLinesCache())),window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=window.setTimeout(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._cursorMoveListener&&(this._cursorMoveListener.dispose(),this._cursorMoveListener=void 0),this._resizeListener&&(this._resizeListener.dispose(),this._resizeListener=void 0),this._linesCacheTimeoutId&&(window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=0)}_isWholeWord(y,x,T){return(y===0||u.includes(x[y-1]))&&(y+T.length===x.length||u.includes(x[y+T.length]))}_findInLine(y,x,T={},b=!1){var d;const m=this._terminal,o=x.startRow,l=x.startCol,S=m.buffer.active.getLine(o);if(S!=null&&S.isWrapped)return b?void(x.startCol+=m.cols):(x.startRow--,x.startCol+=m.cols,this._findInLine(y,x,T));let E=(d=this._linesCache)===null||d===void 0?void 0:d[o];E||(E=this._translateBufferLineToStringWithWrap(o,!0),this._linesCache&&(this._linesCache[o]=E));const[L,D]=E,C=this._bufferColsToStringOffset(o,l),I=T.caseSensitive?y:y.toLowerCase(),B=T.caseSensitive?L:L.toLowerCase();let U=-1;if(T.regex){const z=RegExp(I,"g");let q;if(b)for(;q=z.exec(B.slice(0,C));)U=z.lastIndex-q[0].length,y=q[0],z.lastIndex-=y.length-1;else q=z.exec(B.slice(C)),q&&q[0].length>0&&(U=C+(z.lastIndex-q[0].length),y=q[0])}else b?C-I.length>=0&&(U=B.lastIndexOf(I,C-I.length)):U=B.indexOf(I,C);if(U>=0){if(T.wholeWord&&!this._isWholeWord(U,B,y))return;let z=0;for(;z<D.length-1&&U>=D[z+1];)z++;let q=z;for(;q<D.length-1&&U+y.length>=D[q+1];)q++;const J=U-D[z],se=U+y.length-D[q],ce=this._stringLengthToBufferSize(o+z,J);return{term:y,col:ce,row:o+z,size:this._stringLengthToBufferSize(o+q,se)-ce+m.cols*(q-z)}}}_stringLengthToBufferSize(y,x){const T=this._terminal.buffer.active.getLine(y);if(!T)return 0;for(let b=0;b<x;b++){const d=T.getCell(b);if(!d)break;const m=d.getChars();m.length>1&&(x-=m.length-1);const o=T.getCell(b+1);o&&o.getWidth()===0&&x++}return x}_bufferColsToStringOffset(y,x){const T=this._terminal;let b=y,d=0,m=T.buffer.active.getLine(b);for(;x>0&&m;){for(let o=0;o<x&&o<T.cols;o++){const l=m.getCell(o);if(!l)break;l.getWidth()&&(d+=l.getCode()===0?1:l.getChars().length)}if(b++,m=T.buffer.active.getLine(b),m&&!m.isWrapped)break;x-=T.cols}return d}_translateBufferLineToStringWithWrap(y,x){var T;const b=this._terminal,d=[],m=[0];let o=b.buffer.active.getLine(y);for(;o;){const l=b.buffer.active.getLine(y+1),S=!!l&&l.isWrapped;let E=o.translateToString(!S&&x);if(S&&l){const L=o.getCell(o.length-1);L&&L.getCode()===0&&L.getWidth()===1&&((T=l.getCell(0))===null||T===void 0?void 0:T.getWidth())===2&&(E=E.slice(0,-1))}if(d.push(E),!S)break;m.push(m[m.length-1]+E.length),y++,o=l}return[d.join(""),m]}_selectResult(y,x,T){const b=this._terminal;if(this._selectedDecoration.clear(),!y)return b.clearSelection(),!1;if(b.select(y.col,y.row,y.size),x){const d=b.registerMarker(-b.buffer.active.baseY-b.buffer.active.cursorY+y.row);if(d){const m=b.registerDecoration({marker:d,x:y.col,width:y.size,backgroundColor:x.activeMatchBackgroun
14d,layer:"top",overviewRulerOptions:{color:x.activeMatchColorOverviewRuler}});if(m){const o=[];o.push(d),o.push(m.onRender(l=>this._applyStyles(l,x.activeMatchBorder,!0))),o.push(m.onDispose(()=>(0,c.disposeArray)(o))),this._selectedDecoration.value={decoration:m,match:y,dispose(){m.dispose()}}}}}if(!T&&(y.row>=b.buffer.active.viewportY+b.rows||y.row<b.buffer.active.viewportY)){let d=y.row-b.buffer.active.viewportY;d-=Math.floor(b.rows/2),b.scrollLines(d)}return!0}_applyStyles(y,x,T){y.classList.contains("xterm-find-result-decoration")||(y.classList.add("xterm-find-result-decoration"),x&&(y.style.outline=`1px solid ${x}`)),T&&y.classList.add("xterm-find-active-result-decoration")}_createResultDecoration(y,x){const T=this._terminal,b=T.registerMarker(-T.buffer.active.baseY-T.buffer.active.cursorY+y.row);if(!b)return;const d=T.registerDecoration({marker:b,x:y.col,width:y.size,backgroundColor:x.matchBackground,overviewRulerOptions:this._highlightedLines.has(b.line)?void 0:{color:x.matchOverviewRuler,position:"center"}});if(d){const m=[];m.push(b),m.push(d.onRender(o=>this._applyStyles(o,x.matchBorder,!1))),m.push(d.onDispose(()=>(0,c.disposeArray)(m)))}return d}}v.SearchAddon=w})(),g})())})(Gh);const Xh=1e3,fte={scrollback:Xh,cursorBlink:!1,fontFamily:'"IBM Plex Mono", monospace',fontSize:12,theme:{background:"#0a0a0a",foreground:"#ddd"},allowProposedApi:!0},pte={props:["items","time","filterText"],emits:["updated-results","set-video-time"],data(){return{currentItem:0,resizeObserver:null,terminal:null,fitAddon:null,searchAddon:null,scrollOffset:0,lineHeight:17,timestampMarkers:[],rowPositions:[]}},watch:{items(s,t){var r;s!==t&&((r=this.terminal)==null||r.reset(),this.currentItem=0,this.rowPositions=[],this.render(this.time))},time(s){this.render(s)},filterText(){this.findNext()}},mounted(){this.resizeObserver=new ResizeObserver(this.renderScrollingLogsSize),this.resizeObserver.observe(this.$refs.scrollerParent),this.terminal=new Vh.exports.Terminal(fte),this.fitAddon=new Kh.exports.FitAddon,this.searchAddon=new Gh.exports.SearchAddon,this.searchAddon.onDidChangeResults(this.updatedResults.bind(this)),this.terminal.loadAddon(this.fitAddon),this.terminal.loadAddon(this.searchAddon),this.terminal.open(this.$refs.scrollerParent);const s=this.$refs.scrollerParent.querySelector(".xterm-screen");s&&(this.lineHeight=s.clientHeight/this.terminal.rows),this.terminal.onScroll(t=>{this.scrollOffset=t*this.lineHeight})},beforeUnmount(){var s;(s=this.resizeObserver)==null||s.disconnect();try{this.terminal.dispose()}catch(t){console.error("When disposing of terminal, encountered error",t)}},methods:{findNext(){var s;(s=this.searchAddon)==null||s.findNext(this.filterText,{decorations:{matchBackground:"#2a2a2a",activeMatchBackground:"#4caf50"}})},findPrevious(){var s;(s=this.searchAddon)==null||s.findPrevious(this.filterText,{decorations:{matchBackground:"#2a2a2a",activeMatchBackground:"#4caf50"}})},render(s){if(!this.terminal)return;const t=s===0?this.items.length:this.items.findLastIndex(p=>p.time<=s)+1;let r=!1;if(this.currentItem>t&&(r=!0,this.terminal.reset(),this.currentItem=0,this.rowPositions=[]),this.currentItem<t){const p=Math.max(this.currentItem,t-Xh*2),a=t-1;for(let g=p;g<t;g+=1)g===a?this.terminal.writeln(this.items[g].line,()=>{this.computeRowPositions(t),this.updateTimestampMarkers(t)}):this.terminal.writeln(this.items[g].line)}else this.updateTimestampMarkers(t);this.currentItem=t,r&&this.findNext()},computeRowPositions(s){const t=this.terminal.buffer.active,r=t.baseY+t.cursorY;this.rowPositions=[];let p=0;for(let a=0;a<=r&&p<s;a+=1){const g=t.getLine(a);!g||g.isWrapped||(this.rowPositions[p]=a,p+=1)}},updateTimestampMarkers(s){var p;const t=[];let r=-1e3;for(let a=0;a<s&&a<this.items.length;a+=1){const g=this.items[a];if(g.time-r>=500){const v=(p=this.rowPositions[a])!=null?p:a;t.push({lineIndex:a,time:g.time,top:v*this.lineHeight}),r=g.time}}this.timestampMarkers=t},formatTime(s){let t=s;t<0&&(t=0);const r=Nt(t).minutes().toString().padStart(2,"0"),p=Nt(t).seconds().toString().padStart(2,"0");return`${r}:${p}`},renderScrollingLogsSize(){var s;(s=this.fitAddon)==null||s.fit()},updatedResults({resultIndex:s,resultCount:t}){this.$emit("updated-results",{index:s,count:t})}}},mte={class:"flex flex-1 overflow-hidden"},_te={class:"overflow-hidden relative",style:{width:"50px","flex-shrink":"0"}},gte=["onClick"],vte={ref:"scrollerParent",class:"flex-1"};function yte(s,t,r,p,a,g){return F(),N("div",mte,[R("div",_te,[R("div",{ref:"timestampContainer",class:"relative",style:qe({transform:`translateY(${-a.scrollOffset}px)`})},[(F(!0),N(Me,null,je(a.timestampMarkers,v=>(F(),N("div",{key:v.lineIndex,class:"absolute left-1 text-xs font-mono curs
14or-pointer hover:underline",style:qe([{color:"#888"},{top:`${v.top}px`}]),onClick:n=>s.$emit("set-video-time",v.time)},Z(g.formatTime(v.time)),13,gte))),128))],4)]),R("div",vte,null,512)])}var bte=st(pte,[["render",yte]]),Xo={exports:{}};/** 15 * @license 16 * Lodash <https://lodash.com/> 17 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> 18 * Released under MIT license <https://lodash.com/license> 19 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> 20 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 21 */(function(s,t){(function(){var r,p="4.17.23",a=200,g="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",n="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",u=500,w="__lodash_placeholder__",f=1,y=2,x=4,T=1,b=2,d=1,m=2,o=4,l=8,S=16,E=32,L=64,D=128,C=256,I=512,B=30,U="...",z=800,q=16,J=1,se=2,ce=3,me=1/0,pe=9007199254740991,M=17976931348623157e292,W=0/0,V=4294967295,G=V-1,fe=V>>>1,_e=[["ary",D],["bind",d],["bindKey",m],["curry",l],["curryRight",S],["flip",I],["partial",E],["partialRight",L],["rearg",C]],Se="[object Arguments]",ie="[object Array]",K="[object AsyncFunction]",H="[object Boolean]",de="[object Date]",ue="[object DOMException]",ge="[object Error]",le="[object Function]",Fe="[object GeneratorFunction]",Ve="[object Map]",Je="[object Number]",vt="[object Null]",Ee="[object Object]",Rs="[object Promise]",qr="[object Proxy]",ds="[object RegExp]",kt="[object Set]",is="[object String]",mt="[object Symbol]",js="[object Undefined]",yt="[object WeakMap]",Ks="[object WeakSet]",fs="[object ArrayBuffer]",Et="[object DataView]",Ls="[object Float32Array]",$t="[object Float64Array]",ps="[object Int8Array]",Ze="[object Int16Array]",Fr="[object Int32Array]",En="[object Uint8Array]",Tn="[object Uint8ClampedArray]",Rn="[object Uint16Array]",Ln="[object Uint32Array]",Sd=/\b__p \+= '';/g,xd=/\b(__p \+=) '' \+/g,Cd=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Aa=/&(?:amp|lt|gt|quot|#39);/g,Ia=/[&<>"']/g,kd=RegExp(Aa.source),Ed=RegExp(Ia.source),Td=/<%-([\s\S]+?)%>/g,Rd=/<%([\s\S]+?)%>/g,Ma=/<%=([\s\S]+?)%>/g,Ld=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dd=/^\w*$/,Ad=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dn=/[\\^$.*+?()[\]{}|]/g,Id=RegExp(Dn.source),An=/^\s+/,Md=/\s/,Od=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Pd=/\{\n\/\* \[wrapped with (.+)\] \*/,Bd=/,? & /,Hd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qd=/[()=,{}\[\]\/\s]/,Fd=/\\(\\)?/g,Ud=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Oa=/\w*$/,Nd=/^[-+]0x[0-9a-f]+$/i,$d=/^0b[01]+$/i,Wd=/^\[object .+?Constructor\]$/,zd=/^0o[0-7]+$/i,Vd=/^(?:0|[1-9]\d*)$/,jd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 69,563 bytes, lines 21-40
217f]/g,pi=/($^)/,Kd=/['\n\r\u2028\u2029\\]/g,mi="\\ud800-\\udfff",Gd="\\u0300-\\u036f",Xd="\\ufe20-\\ufe2f",Yd="\\u20d0-\\u20ff",Pa=Gd+Xd+Yd,Ba="\\u2700-\\u27bf",Ha="a-z\\xdf-\\xf6\\xf8-\\xff",Jd="\\xac\\xb1\\xd7\\xf7",Zd="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Qd="\\u2000-\\u206f",ef=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qa="A-Z\\xc0-\\xd6\\xd8-\\xde",Fa="\\ufe0e\\ufe0f",Ua=Jd+Zd+Qd+ef,In="['\u2019]",tf="["+mi+"]",Na="["+Ua+"]",_i="["+Pa+"]",$a="\\d+",sf="["+Ba+"]",Wa="["+Ha+"]",za="[^"+mi+Ua+$a+Ba+Ha+qa+"]",Mn="\\ud83c[\\udffb-\\udfff]",rf="(?:"+_i+"|"+Mn+")",Va="[^"+mi+"]",On="(?:\\ud83c[\\udde6-\\uddff]){2}",Pn="[\\ud800-\\udbff][\\udc00-\\udfff]",dr="["+qa+"]",ja="\\u200d",Ka="(?:"+Wa+"|"+za+")",nf="(?:"+dr+"|"+za+")",Ga="(?:"+In+"(?:d|ll|m|re|s|t|ve))?",Xa="(?:"+In+"(?:D|LL|M|RE|S|T|VE))?",Ya=rf+"?",Ja="["+Fa+"]?",of="(?:"+ja+"(?:"+[Va,On,Pn].join("|")+")"+Ja+Ya+")*",af="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Za=Ja+Ya+of,cf="(?:"+[sf,On,Pn].join("|")+")"+Za,uf="(?:"+[Va+_i+"?",_i,On,Pn,tf].join("|")+")",hf=RegExp(In,"g"),df=RegExp(_i,"g"),Bn=RegExp(Mn+"(?="+Mn+")|"+uf+Za,"g"),ff=RegExp([dr+"?"+Wa+"+"+Ga+"(?="+[Na,dr,"$"].join("|")+")",nf+"+"+Xa+"(?="+[Na,dr+Ka,"$"].join("|")+")",dr+"?"+Ka+"+"+Ga,dr+"+"+Xa,lf,af,$a,cf].join("|"),"g"),pf=RegExp("["+ja+mi+Pa+Fa+"]"),mf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_f=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],gf=-1,tt={};tt[Ls]=tt[$t]=tt[ps]=tt[Ze]=tt[Fr]=tt[En]=tt[Tn]=tt[Rn]=tt[Ln]=!0,tt[Se]=tt[ie]=tt[fs]=tt[H]=tt[Et]=tt[de]=tt[ge]=tt[le]=tt[Ve]=tt[Je]=tt[Ee]=tt[ds]=tt[kt]=tt[is]=tt[yt]=!1;var et={};et[Se]=et[ie]=et[fs]=et[Et]=et[H]=et[de]=et[Ls]=et[$t]=et[ps]=et[Ze]=et[Fr]=et[Ve]=et[Je]=et[Ee]=et[ds]=et[kt]=et[is]=et[mt]=et[En]=et[Tn]=et[Rn]=et[Ln]=!0,et[ge]=et[le]=et[yt]=!1;var vf={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},yf={"&":"&","<":"<",">":">",'"':""","'":"'"},bf={"&":"&","<":"<",">":">",""":'"',"'":"'"},wf={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Sf=parseFloat,xf=parseInt,Qa=typeof ts=="object"&&ts&&ts.Object===Object&&ts,Cf=typeof self=="object"&&self&&self.Object===Object&&self,_t=Qa||Cf||Function("return this")(),Hn=t&&!t.nodeType&&t,Gs=Hn&&!0&&s&&!s.nodeType&&s,el=Gs&&Gs.exports===Hn,qn=el&&Qa.process,Wt=function(){try{var X=Gs&&Gs.require&&Gs.require("util").types;return X||qn&&qn.binding&&qn.binding("util")}catch{}}(),tl=Wt&&Wt.isArrayBuffer,sl=Wt&&Wt.isDate,rl=Wt&&Wt.isMap,il=Wt&&Wt.isRegExp,nl=Wt&&Wt.isSet,ol=Wt&&Wt.isTypedArray;function Ot(X,ne,te){switch(te.length){case 0:return X.call(ne);case 1:return X.call(ne,te[0]);case 2:return X.call(ne,te[0],te[1]);case 3:return X.call(ne,te[0],te[1],te[2])}return X.apply(ne,te)}function kf(X,ne,te,we){for(var Ae=-1,Ke=X==null?0:X.length;++Ae<Ke;){var lt=X[Ae];ne(we,lt,te(lt),X)}return we}function zt(X,ne){for(var te=-1,we=X==null?0:X.length;++te<we&&ne(X[te],te,X)!==!1;);return X}function Ef(X,ne){for(var te=X==null?0:X.length;te--&&ne(X[te],te,X)!==!1;);return X}function al(X,ne){for(var te=-1,we=X==null?0:X.length;++te<we;)if(!ne(X[te],te,X))return!1;return!0}function Ds(X,ne){for(var te=-1,we=X==null?0:X.length,Ae=0,Ke=[];++te<we;){var lt=X[te];ne(lt,te,X)&&(Ke[Ae++]=lt)}return Ke}function gi(X,ne){var te=X==null?0:X.length;return!!te&&fr(X,ne,0)>-1}function Fn(X,ne,te){for(var we=-1,Ae=X==null?0:X.length;++we<Ae;)if(te(ne,X[we]))return!0;return!1}function rt(X,ne){for(var te=-1,we=X==null?0:X.length,Ae=Array(we);++te<we;)Ae[te]=ne(X[te],te,X);return Ae}function As(X,ne){for(var te=-1,we=ne.length,Ae=X.length;++te<we;)X[Ae+te]=ne[te];return X}function Un(X,ne,te,we){var Ae=-1,Ke=X==null?0:X.length;for(we&&Ke&&(te=X[++Ae]);++Ae<Ke;)te=ne(te,X[Ae],Ae,X);return te}function Tf(X,ne,te,we){var Ae=X==null?0:X.length;for(we&&Ae&&(te=X[--Ae]);Ae--;)te=ne(te,X[Ae],Ae,X);return te}function Nn(X,ne){for(var te=-1,we=X==null?0:X.length;++te<we;)if(ne(X[te],te,X))return!0;return!1}var Rf=$n("length");function Lf(X){return X.split("")}function Df(X){return X.match(Hd)||[]}function ll(X,ne,te){var we;return te(X,function(Ae,Ke,lt){if(ne(Ae,Ke,lt))return we=Ke,!1}),we}function vi(X,ne,te,we){for(var Ae=X.length,Ke=te+(we?1:-1);we?Ke--:++Ke<Ae;)if(ne(X[Ke],Ke,X))return Ke;return-1}function fr(X,ne,te){return ne===ne?$f(X,ne,te):vi(X,cl,te)}function Af(X,ne,te,we){for(var Ae=te-1,Ke=X.length;++Ae<Ke;)if(we(X[Ae],ne))return Ae;return-1}function cl(X){return X!==X}function ul(X,ne){var te=X==null?0:X.length;return te?zn(X,ne)/te:W}function $n(X){return function(ne){return ne==null?r:ne[X]}}function Wn(X){return function(ne){return X==null?r:X[ne]}}function hl(X,ne,te,we,Ae){return Ae(X,function(Ke,lt,Qe){te=we?(we=!1,Ke):ne(te,Ke,lt,Qe)}),te}function If(X,ne){var te=X.length;for(X.sort(ne);te--;)X[te]=X[te].value;return X}function zn(X,ne){for(var te,we=-1,Ae=X.length;++we<Ae;){var Ke=ne(X[we]);Ke!==r&&(te=te===r?Ke:te+Ke)}return te}function Vn(X,ne){for(var te=-1,we=Array(X);++te<X;)we[te]=ne(te);return we}function Mf(X,ne){return rt(ne,function(te){return[te,X[te]]})}function dl(X){return X&&X.slice(0,_l(X)+1).replace(An,"")}function Pt(X){return function(ne){return X(ne)}}function jn(X,ne){return rt(ne,function(te){return X[te]})}function Ur(X,ne){return X.has(ne)}function fl(X,ne){for(var te=-1,we=X.length;++te<we&&fr(ne,X[te],0)>-1;);return te}function pl(X,ne){for(var te=X.length;te--&&fr(ne,X[te],0)>-1;);return te}function Of(X,ne){for(var te=X.length,we=0;te--;)X[te]===ne&&++we;return we}var Pf=Wn(vf),Bf=Wn(yf);function Hf(X){return"\\"+wf[X]}function qf(X,ne){return X==null?r:X[ne]}function pr(X){return pf.test(X)}function Ff(X){return mf.test(X)}function Uf(X){for(var ne,te=[];!(ne=X.next()).done;)te.push(ne.value);return te}function Kn(X){var ne=-1,te=Array(X.size);return X.forEach(function(we,Ae){te[++ne]=[Ae,we]}),te}function ml(X,ne){return function(te){return X(ne(te))}}function Is(X,ne){for(var te=-1,we=X.length,Ae=0,Ke=[];++te<we;){var lt=X[te];(lt===ne||lt===w)&&(X[te]=w,Ke[Ae++]=te)}return Ke}function yi(X){var ne=-1,te=Array(X.size);return X.forEach(function(we){te[++ne]=we}),te}function Nf(X){var ne=-1,te=Array(X.size);return X.forEach(function(we){te[++ne]=[we,we]}),te}function $f(X,ne,te){for(var we=te-1,Ae=X.length;++we<Ae;)if(X[we]===ne)return we;return-1}function Wf(X,ne,te){for(var we=te+1;we--;)if(X[we]===ne)return we;return we}function mr(X){return pr(X)?Vf(X):Rf(X)}function Jt(X){return pr(X)?jf(X):Lf(X)}function _l(X){for(var ne=X.length;ne--&&Md.test(X.charAt(ne)););return ne}var zf=Wn(bf);function Vf(X){for(var ne=Bn.lastIndex=0;Bn.test(X);)++ne;return ne}function jf(X){return X.match(Bn)||[]}function Kf(X){return X.match(ff)||[]}var Gf=function X(ne){ne=ne==null?_t:_r.defaults(_t.Object(),ne,_r.pick(_t,_f));var te=ne.Array,we=ne.Date,Ae=ne.Error,Ke=ne.Function,lt=ne.Math,Qe=ne.Object,Gn=ne.RegExp,Xf=ne.String,Vt=ne.TypeError,bi=te.prototype,Yf=Ke.prototype,gr=Qe.prototype,wi=ne["__core-js_shared__"],Si=Yf.toString,Ge=gr.hasOwnProperty,Jf=0,gl=function(){var e=/[^.]+$/.exec(wi&&wi.keys&&wi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),xi=gr.toString,Zf=Si.call(Qe),Qf=_t._,ep=Gn("^"+Si.call(Ge).replace(Dn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ci=el?ne.Buffer:r,Ms=ne.Symbol,ki=ne.Uint8Array,vl=Ci?Ci.allocUnsafe:r,Ei=ml(Qe.getPrototypeOf,Qe),yl=Qe.create,bl=gr.propertyIsEnumerable,Ti=bi.splice,wl=Ms?Ms.isConcatSpreadable:r,Nr=Ms?Ms.iterator:r,Xs=Ms?Ms.toStringTag:r,Ri=function(){try{var e=er(Qe,"defineProperty");return e({},"",{}),e}catch{}}(),tp=ne.clearTimeout!==_t.clearTimeout&&ne.clearTimeout,sp=we&&we.now!==_t.Date.now&&we.now,rp=ne.setTimeout!==_t.setTimeout&&ne.setTimeout,Li=lt.ceil,Di=lt.floor,Xn=Qe.getOwnPropertySymbols,ip=Ci?Ci.isBuffer:r,Sl=ne.isFinite,np=bi.join,op=ml(Qe.keys,Qe),ct=lt.max,bt=lt.min,ap=we.now,lp=ne.parseInt,xl=lt.random,cp=bi.reverse,Yn=er(ne,"DataView"),$r=er(ne,"Map"),Jn=er(ne,"Promise"),vr=er(ne,"Set"),Wr=er(ne,"WeakMap"),zr=er(Qe,"create"),Ai=Wr&&new Wr,yr={},up=tr(Yn),hp=tr($r),dp=tr(Jn),fp=tr(vr),pp=tr(Wr),Ii=Ms?Ms.prototype:r,Vr=Ii?Ii.valueOf:r,Cl=Ii?Ii.toString:r;function O(e){if(nt(e)&&!Ie(e)&&!(e instanceof We)){if(e instanceof jt)return e;if(Ge.call(e,"__wrapped__"))return kc(e)}return new jt(e)}var br=function(){function e(){}return function(i){if(!it(i))return{};if(yl)return yl(i);e.prototype=i;var h=new e;return e.prototype=r,h}}();function Mi(){}function jt(e,i){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=r}O.templateSettings={escape:Td,evaluate:Rd,interpolate:Ma,variable:"",imports:{_:O}},O.prototype=Mi.prototype,O.prototype.constructor=O,jt.prototype=br(Mi.prototype),jt.prototype.constructor=jt;function We(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=V,this.__views__=[]}function mp(){var e=new We(this.__wrapped__);return e.__actions__=Dt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Dt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Dt(this.__views__),e}function _p(){if(this.__filtered__){var e=new We(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function gp(){var e=this.__wrapped__.value(),i=this.__dir__,h=Ie(e),k=i<0,A=h?e.length:0,P=Lm(0,A,this.__views__),$=P.start,j=P.end,Y=j-$,oe=k?j:$-1,ae=this.__iteratees__,he=ae.length,ve=0,Ce=bt(Y,this.__takeCount__);if(!h||!k&&A==Y&&Ce==Y)return Gl(e,this.__actions__);var Re=[];e:for(;Y--&&ve<Ce;){oe+=i;for(var Pe=-1,Le=e[oe];++Pe<he;){var Ue=ae[Pe],ze=Ue.iteratee,qt=Ue.type,Lt=ze(Le);if(qt==se)Le=Lt;else if(!Lt){if(qt==J)continue e;break e}}Re[ve++]=Le}return Re}We.prototype=br(Mi.prototype),We.prototype.constructor=We;function Ys(e){var i=-1,h=e==null?0:e.length;for(this.clear();++i<h;){var k=e[i];this.set(k[0],k[1])}}function vp(){this.__data__=zr?zr(null):{},this.size=0}function yp(e){var i=this.has(e)&&delete this.__data__[e];return this.size-=i?1:0,i}function bp(e){var i=this.__data__;if(zr){var h=i[e];return h===c?r:h}return Ge.call(i,e)?i[e]:r}function wp(e){var i=this.__data__;return zr?i[e]!==r:Ge.call(i,e)}function Sp(e,i){var h=this.__data__;return this.size+=this.has(e)?0:1,h[e]=zr&&i===r?c:i,this}Ys.prototype.clear=vp,Ys.prototype.delete=yp,Ys.prototype.get=bp,Ys.prototype.has=wp,Ys.prototype.set=Sp;function ms(e){var i=-1,h=e==null?0:e.length;for(this.clear();++i<h;){var k=e[i];this.set(k[0],k[1])}}function xp(){this.__data__=[],this.size=0}function Cp(e){var i=this.__data__,h=Oi(i,e);if(h<0)return!1;var k=i.length-1;return h==k?i.pop():Ti.call(i,h,1),--this.size,!0}function kp(e){var i=this.__data__,h=Oi(i,e);return h<0?r:i[h][1]}function Ep(e){return Oi(this.__data__,e)>-1}function Tp(e,i){var h=this.__data__,k=Oi(h,e);return k<0?(++this.size,h.push([e,i])):h[k][1]=i,this}ms.prototype.clear=xp,ms.prototype.delete=Cp,ms.prototype.get=kp,ms.prototype.has=Ep,ms.prototype.set=Tp;function _s(e){var i=-1,h=e==null?0:e.length;for(this.clear();++i<h;){var k=e[i];this.set(k[0],k[1])}}function Rp(){this.size=0,this.__data__={hash:new Ys,map:new($r||ms),string:new Ys}}function Lp(e){var i=ji(this,e).delete(e);return this.size-=i?1:0,i}function Dp(e){return ji(this,e).get(e)}function Ap(e){return ji(this,e).has(e)}function Ip(e,i){var h=ji(this,e),k=h.size;return h.set(e,i),this.size+=h.size==k?0:1,this}_s.prototype.clear=Rp,_s.prototype.delete=Lp,_s.prototype.get=Dp,_s.prototype.has=Ap,_s.prototype.set=Ip;function Js(e){var i=-1,h=e==null?0:e.length;for(this.__data__=new _s;++i<h;)this.add(e[i])}function Mp(e){return this.__data__.set(e,c),this}function Op(e){return this.__data__.has(e)}Js.prototype.add=Js.prototype.push=Mp,Js.prototype.has=Op;function Zt(e){var i=this.__data__=new ms(e);this.size=i.size}function Pp(){this.__data__=new ms,this.size=0}function Bp(e){var i=this.__data__,h=i.delete(e);return this.size=i.size,h}function Hp(e){return this.__data__.get(e)}function qp(e){return this.__data__.has(e)}function Fp(e,i){var h=this.__data__;if(h instanceof ms){var k=h.__data__;if(!$r||k.length<a-1)return k.push([e,i]),this.size=++h.size,this;h=this.__data__=new _s(k)}return h.set(e,i),this.size=h.size,this}Zt.prototype.clear=Pp,Zt.prototype.delete=Bp,Zt.prototype.get=Hp,Zt.prototype.has=qp,Zt.prototype.set=Fp;function kl(e,i){var h=Ie(e),k=!h&&sr(e),A=!h&&!k&&qs(e),P=!h&&!k&&!A&&Cr(e),$=h||k||A||P,j=$?Vn(e.length,Xf):[],Y=j.length;for(var oe in e)(i||Ge.call(e,oe))&&!($&&(oe=="length"||A&&(oe=="offset"||oe=="parent")||P&&(oe=="buffer"||oe=="byteLength"||oe=="byteOffset")||bs(oe,Y)))&&j.push(oe);return j}function El(e){var i=e.length;return i?e[lo(0,i-1)]:r}function Up(e,i){return Ki(Dt(e),Zs(i,0,e.length))}function Np(e){return Ki(Dt(e))}function Zn(e,i,h){(h!==r&&!Qt(e[i],h)||h===r&&!(i in e))&&gs(e,i,h)}function jr(e,i,h){var k=e[i];(!(Ge.call(e,i)&&Qt(k,h))||h===r&&!(i in e))&&gs(e,i,h)}function Oi(e,i){for(var h=e.length;h--;)if(Qt(e[h][0],i))return h;return-1}function $p(e,i,h,k){return Os(e,function(A,P,$){i(k,A,h(A),$)}),k}function Tl(e,i){return e&&os(i,ht(i),e)}function Wp(e,i){return e&&os(i,It(i),e)}function gs(e,i,h){i=="__proto__"&&Ri?Ri(e,i,{configurable:!0,enumerable:!0,value:h,writable:!0}):e[i]=h}function Qn(e,i){for(var h=-1,k=i.length,A=te(k),P=e==null;++h<k;)A[h]=P?r:Oo(e,i[h]);return A}function Zs(e,i,h){return e===e&&(h!==r&&(e=e<=h?e:h),i!==r&&(e=e>=i?e:i)),e}function Kt(e,i,h,k,A,P){var $,j=i&f,Y=i&y,oe=i&x;if(h&&($=A?h(e,k,A,P):h(e)),$!==r)return $;if(!it(e))return e;var ae=Ie(e);if(ae){if($=Am(e),!j)return Dt(e,$)}else{var he=wt(e),ve=he==le||he==Fe;if(qs(e))return Jl(e,j);if(he==Ee||he==Se||ve&&!A){if($=Y||ve?{}:_c(e),!j)return Y?bm(e,Wp($,e)):ym(e,Tl($,e))}else{if(!et[he])return A?e:{};$=Im(e,he,j)}}P||(P=new Zt);var Ce=P.get(e);if(Ce)return Ce;P.set(e,$),Vc(e)?e.forEach(function(Le){$.add(Kt(Le,i,h,Le,e,P))}):Wc(e)&&e.forEach(function(Le,Ue){$.set(Ue,Kt(Le,i,h,Ue,e,P))});var Re=oe?Y?bo:yo:Y?It:ht,Pe=ae?r:Re(e);return zt(Pe||e,function(Le,Ue){Pe&&(Ue=Le,Le=e[Ue]),jr($,Ue,Kt(Le,i,h,Ue,e,P))}),$}function zp(e){var i=ht(e);return function(h){return Rl(h,e,i)}}function Rl(e,i,h){var k=h.length;if(e==null)return!k;for(e=Qe(e);k--;){var A=h[k],P=i[A],$=e[A];if($===r&&!(A in e)||!P($))return!1}return!0}function Ll(e,i,h){if(typeof e!="function")throw new Vt(v);return Qr(function(){e.apply(r,h)},i)}function Kr(e,i,h,k){var A=-1,P=gi,$=!0,j=e.length,Y=[],oe=i.length;if(!j)return Y;h&&(i=rt(i,Pt(h))),k?(P=Fn,$=!1):i.length>=a&&(P=Ur,$=!1,i=new Js(i));e:for(;++A<j;){var ae=e[A],he=h==null?ae:h(ae);if(ae=k||ae!==0?ae:0,$&&he===he){for(var ve=oe;ve--;)if(i[ve]===he)continue e;Y.push(ae)}else P(i,he,k)||Y.push(ae)}return Y}var Os=sc(ns),Dl=sc(to,!0);function Vp(e,i){var h=!0;return Os(e,function(k,A,P){return h=!!i(k,A,P),h}),h}function Pi(e,i,h){for(var k=-1,A=e.length;++k<A;){var P=e[k],$=i(P);if($!=null&&(j===r?$===$&&!Ht($):h($,j)))var j=$,Y=P}return Y}function jp(e,i,h,k){var A=e.length;for(h=Oe(h),h<0&&(h=-h>A?0:A+h),k=k===r||k>A?A:Oe(k),k<0&&(k+=A),k=h>k?0:Kc(k);h<k;)e[h++]=i;return e}function Al(e,i){var h=[];return Os(e,function(k,A,P){i(k,A,P)&&h.push(k)}),h}function gt(e,i,h,k,A){var P=-1,$=e.length;for(h||(h=Om),A||(A=[]);++P<$;){var j=e[P];i>0&&h(j)?i>1?gt(j,i-1,h,k,A):As(A,j):k||(A[A.length]=j)}return A}var eo=rc(),Il=rc(!0);function ns(e,i){return e&&eo(e,i,ht)}function to(e,i){return e&&Il(e,i,ht)}function Bi(e,i){return Ds(i,function(h){return ws(e[h])})}function Qs(e,i){i=Bs(i,e);for(var h=0,k=i.length;e!=null&&h<k;)e=e[as(i[h++])];return h&&h==k?e:r}function Ml(e,i,h){var k=i(e);return Ie(e)?k:As(k,h(e))}function Tt(e){return e==null?e===r?js:vt:Xs&&Xs in Qe(e)?Rm(e):Nm(e)}function so(e,i){return e>i}function Kp(e,i){return e!=null&&Ge.call(e,i)}function Gp(e,i){return e!=null&&i in Qe(e)}function Xp(e,i,h){return e>=bt(i,h)&&e<ct(i,h)}function ro(e,i,h){for(var k=h?Fn:gi,A=e[0].length,P=e.length,$=P,j=te(P),Y=1/0,oe=[];$--;){var ae=e[$];$&&i&&(ae=rt(ae,Pt(i))),Y=bt(ae.length,Y),j[$]=!h&&(i||A>=120&&ae.length>=120)?new Js($&&ae):r}ae=e[0];var he=-1,ve=j[0];e:for(;++he<A&&oe.length<Y;){var Ce=ae[he],Re=i?i(Ce):Ce;if(Ce=h||Ce!==0?Ce:0,!(ve?Ur(ve,Re):k(oe,Re,h))){for($=P;--$;){var Pe=j[$];if(!(Pe?Ur(Pe,Re):k(e[$],Re,h)))continue e}ve&&ve.push(Re),oe.push(Ce)}}return oe}function Yp(e,i,h,k){return ns(e,function(A,P,$){i(k,h(A),P,$)}),k}function Gr(e,i,h){i=Bs(i,e),e=bc(e,i);var k=e==null?e:e[as(Xt(i))];return k==null?r:Ot(k,e,h)}function Ol(e){return nt(e)&&Tt(e)==Se}function Jp(e){return nt(e)&&Tt(e)==fs}function Zp(e){return nt(e)&&Tt(e)==de}function Xr(e,i,h,k,A){return e===i?!0:e==null||i==null||!nt(e)&&!nt(i)?e!==e&&i!==i:Qp(e,i,h,k,Xr,A)}function Qp(e,i,h,k,A,P){var $=Ie(e),j=Ie(i),Y=$?ie:wt(e),oe=j?ie:wt(i);Y=Y==Se?Ee:Y,oe=oe==Se?Ee:oe;var ae=Y==Ee,he=oe==Ee,ve=Y==oe;if(ve&&qs(e)){if(!qs(i))return!1;$=!0,ae=!1}if(ve&&!ae)return P||(P=new Zt),$||Cr(e)?fc(e,i,h,k,A,P):Em(e,i,Y,h,k,A,P);if(!(h&T)){var Ce=ae&&Ge.call(e,"__wrapped__"),Re=he&&Ge.call(i,"__wrapped__");if(Ce||Re){var Pe=Ce?e.value():e,Le=Re?i.value():i;return P||(P=new Zt),A(Pe,Le,h,k,P)}}return ve?(P||(P=new Zt),Tm(e,i,h,k,A,P)):!1}function em(e){return nt(e)&&wt(e)==Ve}function io(e,i,h,k){var A=h.length,P=A,$=!k;if(e==null)return!P;for(e=Qe(e);A--;){var j=h[A];if($&&j[2]?j[1]!==e[j[0]]:!(j[0]in e))return!1}for(;++A<P;){j=h[A];var Y=j[0],oe=e[Y],ae=j[1];if($&&j[2]){if(oe===r&&!(Y in e))return!1}else{var he=new Zt;if(k)var ve=k(oe,ae,Y,e,i,he);if(!(ve===r?Xr(ae,oe,T|b,k,he):ve))return!1}}return!0}function Pl(e){if(!it(e)||Bm(e))return!1;var i=ws(e)?ep:Wd;return i.test(tr(e))}function tm(e){return nt(e)&&Tt(e)==ds}function sm(e){return nt(e)&&wt(e)==kt}function rm(e){return nt(e)&&Qi(e.length)&&!!tt[Tt(e)]}function Bl(e){return typeof e=="function"?e:e==null?Mt:typeof e=="object"?Ie(e)?Fl(e[0],e[1]):ql(e):iu(e)}function no(e){if(!Zr(e))return op(e);var i=[];for(var h in Qe(e))Ge.call(e,h)&&h!="constructor"&&i.push(h);return i}function im(e){if(!it(e))return Um(e);var i=Zr(e),h=[];for(var k in e)k=="constructor"&&(i||!Ge.call(e,k))||h.push(k);return h}function oo(e,i){return e<i}function Hl(e,i){var h=-1,k=At(e)?te(e.length):[];return Os(e,function(A,P,$){k[++h]=i(A,P,$)}),k}function ql(e){var i=So(e);return i.length==1&&i[0][2]?vc(i[0][0],i[0][1]):function(h){return h===e||io(h,e,i)}}function Fl(e,i){return Co(e)&&gc(i)?vc(as(e),i):function(h){var k=Oo(h,e);return k===r&&k===i?Po(h,e):Xr(i,k,T|b)}}function Hi(e,i,h,k,A){e!==i&&eo(i,function(P,$){if(A||(A=new Zt),it(P))nm(e,i,$,h,Hi,k,A);else{var j=k?k(Eo(e,$),P,$+"",e,i,A):r;j===r&&(j=P),Zn(e,$,j)}},It)}function nm(e,i,h,k,A,P,$){var j=Eo(e,h),Y=Eo(i,h),oe=$.get(Y);if(oe){Zn(e,h,oe);return}var ae=P?P(j,Y,h+"",e,i,$):r,he=ae===r;if(he){var ve=Ie(Y),Ce=!ve&&qs(Y),Re=!ve&&!Ce&&Cr(Y);ae=Y,ve||Ce||Re?Ie(j)?ae=j:ot(j)?ae=Dt(j):Ce?(he=!1,ae=Jl(Y,!0)):Re?(he=!1,ae=Zl(Y,!0)):ae=[]:ei(Y)||sr(Y)?(ae=j,sr(j)?ae=Gc(j):(!it(j)||ws(j))&&(ae=_c(Y))):he=!1}he&&($.set(Y,ae),A(ae,Y,k,P,$),$.delete(Y)),Zn(e,h,ae)}function Ul(e,i){var h=e.length;if(!!h)return i+=i<0?h:0,bs(i,h)?e[i]:r}function Nl(e,i,h){i.length?i=rt(i,function(P){return Ie(P)?function($){return Qs($,P.length===1?P[0]:P)}:P}):i=[Mt];var k=-1;i=rt(i,Pt(Te()));var A=Hl(e,function(P,$,j){var Y=rt(i,function(oe){return oe(P)});return{criteria:Y,index:++k,value:P}});return If(A,function(P,$){return vm(P,$,h)})}function om(e,i){return $l(e,i,function(h,k){return Po(e,k)})}function $l(e,i,h){for(var k=-1,A=i.length,P={};++k<A;){var $=i[k],j=Qs(e,$);h(j,$)&&Yr(P,Bs($,e),j)}return P}function am(e){return function(i){return Qs(i,e)}}function ao(e,i,h,k){var A=k?Af:fr,P=-1,$=i.length,j=e;for(e===i&&(i=Dt(i)),h&&(j=rt(e,Pt(h)));++P<$;)for(var Y=0,oe=i[P],ae=h?h(oe):oe;(Y=A(j,ae,Y,k))>-1;)j!==e&&Ti.call(j,Y,1),Ti.call(e,Y,1);return e}function Wl(e,i){for(var h=e?i.length:0,k=h-1;h--;){var A=i[h];if(h==k||A!==P){var P=A;bs(A)?Ti.call(e,A,1):ho(e,A)}}return e}function lo(e,i){return e+Di(xl()*(i-e+1))}function lm(e,i,h,k){for(var A=-1,P=ct(Li((i-e)/(h||1)),0),$=te(P);P--;)$[k?P:++A]=e,e+=h;return $}function co(e,i){var h="";if(!e||i<1||i>pe)return h;do i%2&&(h+=e),i=Di(i/2),i&&(e+=e);while(i);return h}function Be(e,i){return To(yc(e,i,Mt),e+"")}function cm(e){return El(kr(e))}function um(e,i){var h=kr(e);return Ki(h,Zs(i,0,h.length))}function Yr(e,i,h,k){if(!it(e))return e;i=Bs(i,e);for(var A=-1,P=i.length,$=P-1,j=e;j!=null&&++A<P;){var Y=as(i[A]),oe=h;if(Y==="__proto__"||Y==="constructor"||Y==="prototype")return e;if(A!=$){var ae=j[Y];oe=k?k(ae,Y,j):r,oe===r&&(oe=it(ae)?ae:bs(i[A+1])?[]:{})}jr(j,Y,oe),j=j[Y]}return e}var zl=Ai?function(e,i){return Ai.set(e,i),e}:Mt,hm=Ri?function(e,i){return Ri(e,"toString",{configurable:!0,enumerable:!1,value:Ho(i),writable:!0})}:Mt;function dm(e){return Ki(kr(e))}function Gt(e,i,h){var k=-1,A=e.length;i<0&&(i=-i>A?0:A+i),h=h>A?A:h,h<0&&(h+=A),A=i>h?0:h-i>>>0,i>>>=0;for(var P=te(A);++k<A;)P[k]=e[k+i];return P}function fm(e,i){var h;return Os(e,function(k,A,P){return h=i(k,A,P),!h}),!!h}function qi(e,i,h){var k=0,A=e==null?k:e.length;if(typeof i=="number"&&i===i&&A<=fe){for(;k<A;){var P=k+A>>>1,$=e[P];$!==null&&!Ht($)&&(h?$<=i:$<i)?k=P+1:A=P}return A}return uo(e,i,Mt,h)}function uo(e,i,h,k){var A=0,P=e==null?0:e.length;if(P===0)return 0;i=h(i);for(var $=i!==i,j=i===null,Y=Ht(i),oe=i===r;A<P;){var ae=Di((A+P)/2),he=h(e[ae]),ve=he!==r,Ce=he===null,Re=he===he,Pe=Ht(he);if($)var Le=k||Re;else oe?Le=Re&&(k||ve):j?Le=Re&&ve&&(k||!Ce):Y?Le=Re&&ve&&!Ce&&(k||!Pe):Ce||Pe?Le=!1:Le=k?he<=i:he<i;Le?A=ae+1:P=ae}return bt(P,G)}function Vl(e,i){for(var h=-1,k=e.length,A=0,P=[];++h<k;){var $=e[h],j=i?i($):$;if(!h||!Qt(j,Y)){var Y=j;P[A++]=$===0?0:$}}return P}function jl(e){return typeof e=="number"?e:Ht(e)?W:+e}function Bt(e){if(typeof e=="string")return e;if(Ie(e))return rt(e,Bt)+"";if(Ht(e))return Cl?Cl.call(e):"";var i=e+"";return i=="0"&&1/e==-me?"-0":i}function Ps(e,i,h){var k=-1,A=gi,P=e.length,$=!0,j=[],Y=j;if(h)$=!1,A=Fn;else if(P>=a){var oe=i?null:Cm(e);if(oe)return yi(oe);$=!1,A=Ur,Y=new Js}else Y=i?[]:j;e:for(;++k<P;){var ae=e[k],he=i?i(ae):ae;if(ae=h||ae!==0?ae:0,$&&he===he){for(var ve=Y.length;ve--;)if(Y[ve]===he)continue e;i&&Y.push(he),j.push(ae)}else A(Y,he,h)||(Y!==j&&Y.push(he),j.push(ae))}return j}function ho(e,i){i=Bs(i,e);var h=-1,k=i.length;if(!k)return!0;for(var A=e==null||typeof e!="object"&&typeof e!="function";++h<k;){var P=i[h];if(typeof P=="string"){if(P==="__proto__"&&!Ge.call(e,"__proto__"))return!1;if(P==="constructor"&&h+1<k&&typeof i[h+1]=="string"&&i[h+1]==="prototype"){if(A&&h===0)continue;return!1}}}var $=bc(e,i);return $==null||delete $[as(Xt(i))]}function Kl(e,i,h,k){return Yr(e,i,h(Qs(e,i)),k)}function Fi(e,i,h,k){for(var A=e.length,P=k?A:-1;(k?P--:++P<A)&&i(e[P],P,e););return h?Gt(e,k?0:P,k?P+1:A):Gt(e,k?P+1:0,k?A:P)}function Gl(e,i){var h=e;return h instanceof We&&(h=h.value()),Un(i,function(k,A){return A.func.apply(A.thisArg,As([k],A.args))},h)}function fo(e,i,h){var k=e.length;if(k<2)return k?Ps(e[0]):[];for(var A=-1,P=te(k);++A<k;)for(var $=e[A],j=-1;++j<k;)j!=A&&(P[A]=Kr(P[A]||$,e[j],i,h));return Ps(gt(P,1),i,h)}function Xl(e,i,h){for(var k=-1,A=e.length,P=i.length,$={};++k<A;){var j=k<P?i[k]:r;h($,e[k],j)}return $}function po(e){return ot(e)?e:[]}function mo(e){return typeof e=="function"?e:Mt}function Bs(e,i){return Ie(e)?e:Co(e,i)?[e]:Cc(Xe(e))}var pm=Be;function Hs(e,i,h){var k=e.length;return h=h===r?k:h,!i&&h>=k?e:Gt(e,i,h)}var Yl=tp||function(e){return _t.clearTimeout(e)};function Jl(e,i){if(i)return e.slice();var h=e.length,k=vl?vl(h):new e.constructor(h);return e.copy(k),k}function _o(e){var i=new e.constructor(e.byteLength);return new ki(i).set(new ki(e)),i}function mm(e,i){var h=i?_o(e.buffer):e.buffer;return new e.constructor(h,e.byteOffset,e.byteLength)}function _m(e){var i=new e.constructor(e.source,Oa.exec(e));return i.lastIndex=e.lastIndex,i}function gm(e){return Vr?Qe(Vr.call(e)):{}}function Zl(e,i){var h=i?_o(e.buffer):e.buffer;return new e.constructor(h,e.byteOffset,e.length)}function Ql(e,i){if(e!==i){var h=e!==r,k=e===null,A=e===e,P=Ht(e),$=i!==r,j=i===null,Y=i===i,oe=Ht(i);if(!j&&!oe&&!P&&e>i||P&&$&&Y&&!j&&!oe||k&&$&&Y||!h&&Y||!A)return 1;if(!k&&!P&&!oe&&e<i||oe&&h&&A&&!k&&!P||j&&h&&A||!$&&A||!Y)return-1}return 0}function vm(e,i,h){for(var k=-1,A=e.criteria,P=i.criteria,$=A.length,j=h.length;++k<$;){var Y=Ql(A[k],P[k]);if(Y){if(k>=j)return Y;var oe=h[k];return Y*(oe=="desc"?-1:1)}}return e.index-i.index}function ec(e,i,h,k){for(var A=-1,P=e.length,$=h.length,j=-1,Y=i.length,oe=ct(P-$,0),ae=te(Y+oe),he=!k;++j<Y;)ae[j]=i[j];for(;++A<$;)(he||A<P)&&(ae[h[A]]=e[A]);for(;oe--;)ae[j++]=e[A++];return ae}function tc(e,i,h,k){for(var A=-1,P=e.length,$=-1,j=h.length,Y=-1,oe=i.length,ae=ct(P-j,0),he=te(ae+oe),ve=!k;++A<ae;)he[A]=e[A];for(var Ce=A;++Y<oe;)he[Ce+Y]=i[Y];for(;++$<j;)(ve||A<P)&&(he[Ce+h[$]]=e[A++]);return he}function Dt(e,i){var h=-1,k=e.length;for(i||(i=te(k));++h<k;)i[h]=e[h];return i}function os(e,i,h,k){var A=!h;h||(h={});for(var P=-1,$=i.length;++P<$;){var j=i[P],Y=k?k(h[j],e[j],j,h,e):r;Y===r&&(Y=e[j]),A?gs(h,j,Y):jr(h,j,Y)}return h}function ym(e,i){return os(e,xo(e),i)}function bm(e,i){return os(e,pc(e),i)}function Ui(e,i){return function(h,k){var A=Ie(h)?kf:$p,P=i?i():{};return A(h,e,Te(k,2),P)}}function wr(e){return Be(function(i,h){var k=-1,A=h.length,P=A>1?h[A-1]:r,$=A>2?h[2]:r;for(P=e.length>3&&typeof P=="function"?(A--,P):r,$&&Rt(h[0],h[1],$)&&(P=A<3?r:P,A=1),i=Qe(i);++k<A;){var j=h[k];j&&e(i,j,k,P)}return i})}function sc(e,i){return function(h,k){if(h==null)return h;if(!At(h))return e(h,k);for(var A=h.length,P=i?A:-1,$=Qe(h);(i?P--:++P<A)&&k($[P],P,$)!==!1;);return h}}function rc(e){return function(i,h,k){for(var A=-1,P=Qe(i),$=k(i),j=$.length;j--;){var Y=$[e?j:++A];if(h(P[Y],Y,P)===!1)break}return i}}function wm(e,i,h){var k=i&d,A=Jr(e);function P(){var $=this&&this!==_t&&this instanceof P?A:e;return $.apply(k?h:this,arguments)}return P}function ic(e){return function(i){i=Xe(i);var h=pr(i)?Jt(i):r,k=h?h[0]:i.charAt(0),A=h?Hs(h,1).join(""):i.slice(1);return k[e]()+A}}function Sr(e){return function(i){return Un(su(tu(i).replace(hf,"")),e,"")}}function Jr(e){return function(){var i=arguments;switch(i.length){case 0:return new e;case 1:return new e(i[0]);case 2:return new e(i[0],i[1]);case 3:return new e(i[0],i[1],i[2]);case 4:return new e(i[0],i[1],i[2],i[3]);case 5:return new e(i[0],i[1],i[2],i[3],i[4]);case 6:return new e(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new e(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var h=br(e.prototype),k=e.apply(h,i);return it(k)?k:h}}function Sm(e,i,h){var k=Jr(e);function A(){for(var P=arguments.length,$=te(P),j=P,Y=xr(A);j--;)$[j]=arguments[j];var oe=P<3&&$[0]!==Y&&$[P-1]!==Y?[]:Is($,Y);if(P-=oe.length,P<h)return cc(e,i,Ni,A.placeholder,r,$,oe,r,r,h-P);var ae=this&&this!==_t&&this instanceof A?k:e;return Ot(ae,this,$)}return A}function nc(e){return function(i,h,k){var A=Qe(i);if(!At(i)){var P=Te(h,3);i=ht(i),h=function(j){return P(A[j],j,A)}}var $=e(i,h,k);return $>-1?A[P?i[$]:$]:r}}function oc(e){return ys(function(i){var h=i.length,k=h,A=jt.prototype.thru;for(e&&i.reverse();k--;){var P=i[k];if(typeof P!="function")throw new Vt(v);if(A&&!$&&Vi(P)=="wrapper")var $=new jt([],!0)}for(k=$?k:h;++k<h;){P=i[k];var j=Vi(P),Y=j=="wrapper"?wo(P):r;Y&&ko(Y[0])&&Y[1]==(D|l|E|C)&&!Y[4].length&&Y[9]==1?$=$[Vi(Y[0])].apply($,Y[3]):$=P.length==1&&ko(P)?$[j]():$.thru(P)}return function(){var oe=arguments,ae=oe[0];if($&&oe.length==1&&Ie(ae))return $.plant(ae).value();for(var he=0,ve=h?i[he].apply(this,oe):ae;++he<h;)ve=i[he].call(this,ve);return ve}})}function Ni(e,i,h,k,A,P,$,j,Y,oe){var ae=i&D,he=i&d,ve=i&m,Ce=i&(l|S),Re=i&I,Pe=ve?r:Jr(e);function Le(){for(var Ue=arguments.length,ze=te(Ue),qt=Ue;qt--;)ze[qt]=arguments[qt];if(Ce)var Lt=xr(Le),Ft=Of(ze,Lt);if(k&&(ze=ec(ze,k,A,Ce)),P&&(ze=tc(ze,P,$,Ce)),Ue-=Ft,Ce&&Ue<oe){var at=Is(ze,Lt);return cc(e,i,Ni,Le.placeholder,h,ze,at,j,Y,oe-Ue)}var es=he?h:this,xs=ve?es[e]:e;return Ue=ze.length,j?ze=$m(ze,j):Re&&Ue>1&&ze.reverse(),ae&&Y<Ue&&(ze.length=Y),this&&this!==_t&&this instanceof Le&&(xs=Pe||Jr(xs)),xs.apply(es,ze)}return Le}function ac(e,i){return function(h,k){return Yp(h,e,i(k),{})}}function $i(e,i){return function(h,k){var A;if(h===r&&k===r)return i;if(h!==r&&(A=h),k!==r){if(A===r)return k;typeof h=="string"||typeof k=="string"?(h=Bt(h),k=Bt(k)):(h=jl(h),k=jl(k)),A=e(h,k)}return A}}function go(e){return ys(function(i){return i=rt(i,Pt(Te())),Be(function(h){var k=this;return e(i,function(A){return Ot(A,k,h)})})})}function Wi(e,i){i=i===r?" ":Bt(i);var h=i.length;if(h<2)return h?co(i,e):i;var k=co(i,Li(e/mr(i)));return pr(i)?Hs(Jt(k),0,e).join(""):k.slice(0,e)}function xm(e,i,h,k){var A=i&d,P=Jr(e);function $(){for(var j=-1,Y=arguments.length,oe=-1,ae=k.length,he=te(ae+Y),ve=this&&this!==_t&&this instanceof $?P:e;++oe<ae;)he[oe]=k[oe];for(;Y--;)he[oe++]=arguments[++j];return Ot(ve,A?h:this,he)}return $}function lc(e){return function(i,h,k){return k&&typeof k!="number"&&Rt(i,h,k)&&(h=k=r),i=Ss(i),h===r?(h=i,i=0):h=Ss(h),k=k===r?i<h?1:-1:Ss(k),lm(i,h,k,e)}}function zi(e){return function(i,h){return typeof i=="string"&&typeof h=="string"||(i=Yt(i),h=Yt(h)),e(i,h)}}function cc(e,i,h,k,A,P,$,j,Y,oe){var ae=i&l,he=ae?$:r,ve=ae?r:$,Ce=ae?P:r,Re=ae?r:P;i|=ae?E:L,i&=~(ae?L:E),i&o||(i&=~(d|m));var Pe=[e,i,A,Ce,he,Re,ve,j,Y,oe],Le=h.apply(r,Pe);return ko(e)&&wc(Le,Pe),Le.placeholder=k,Sc(Le,e,i)}function vo(e){var i=lt[e];return function(h,k){if(h=Yt(h),k=k==null?0:bt(Oe(k),292),k&&Sl(h)){var A=(Xe(h)+"e").split("e"),P=i(A[0]+"e"+(+A[1]+k));return A=(Xe(P)+"e").split("e"),+(A[0]+"e"+(+A[1]-k))}return i(h)}}var Cm=vr&&1/yi(new vr([,-0]))[1]==me?function(e){return new vr(e)}:Uo;function uc(e){return function(i){var h=wt(i);return h==Ve?Kn(i):h==kt?Nf(i):Mf(i,e(i))}}function vs(e,i,h,k,A,P,$,j){var Y=i&m;if(!Y&&typeof e!="function")throw new Vt(v);var oe=k?k.length:0;if(oe||(i&=~(E|L),k=A=r),$=$===r?$:ct(Oe($),0),j=j===r?j:Oe(j),oe-=A?A.length:0,i&L){var ae=k,he=A;k=A=r}var ve=Y?r:wo(e),Ce=[e,i,h,k,A,ae,he,P,$,j];if(ve&&Fm(Ce,ve),e=Ce[0],i=Ce[1],h=Ce[2],k=Ce[3],A=Ce[4],j=Ce[9]=Ce[9]===r?Y?0:e.length:ct(Ce[9]-oe,0),!j&&i&(l|S)&&(i&=~(l|S)),!i||i==d)var Re=wm(e,i,h);else i==l||i==S?Re=Sm(e,i,j):(i==E||i==(d|E))&&!A.length?Re=xm(e,i,h,k):Re=Ni.apply(r,Ce);var Pe=ve?zl:wc;return Sc(Pe(Re,Ce),e,i)}function hc(e,i,h,k){return e===r||Qt(e,gr[h])&&!Ge.call(k,h)?i:e}function dc(e,i,h,k,A,P){return it(e)&&it(i)&&(P.set(i,e),Hi(e,i,r,dc,P),P.delete(i)),e}function km(e){return ei(e)?r:e}function fc(e,i,h,k,A,P){var $=h&T,j=e.length,Y=i.length;if(j!=Y&&!($&&Y>j))return!1;var oe=P.get(e),ae=P.get(i);if(oe&&ae)return oe==i&&ae==e;var he=-1,ve=!0,Ce=h&b?new Js:r;for(P.set(e,i),P.set(i,e);++he<j;){var Re=e[he],Pe=i[he];if(k)var Le=$?k(Pe,Re,he,i,e,P):k(Re,Pe,he,e,i,P);if(Le!==r){if(Le)continue;ve=!1;break}if(Ce){if(!Nn(i,function(Ue,ze){if(!Ur(Ce,ze)&&(Re===Ue||A(Re,Ue,h,k,P)))return Ce.push(ze)})){ve=!1;break}}else if(!(Re===Pe||A(Re,Pe,h,k,P))){ve=!1;break}}return P.delete(e),P.delete(i),ve}function Em(e,i,h,k,A,P,$){switch(h){case Et:if(e.byteLength!=i.byteLength||e.byteOffset!=i.byteOffset)return!1;e=e.buffer,i=i.buffer;case fs:return!(e.byteLength!=i.byteLength||!P(new ki(e),new ki(i)));case H:case de:case Je:return Qt(+e,+i);case ge:return e.name==i.name&&e.message==i.message;case ds:case is:return e==i+"";case Ve:var j=Kn;case kt:var Y=k&T;if(j||(j=yi),e.size!=i.size&&!Y)return!1;var oe=$.get(e);if(oe)return oe==i;k|=b,$.set(e,i);var ae=fc(j(e),j(i),k,A,P,$);return $.delete(e),ae;case mt:if(Vr)return Vr.call(e)==Vr.call(i)}return!1}function Tm(e,i,h,k,A,P){var $=h&T,j=yo(e),Y=j.length,oe=yo(i),ae=oe.length;if(Y!=ae&&!$)return!1;for(var he=Y;he--;){var ve=j[he];if(!($?ve in i:Ge.call(i,ve)))return!1}var Ce=P.get(e),Re=P.get(i);if(Ce&&Re)return Ce==i&&Re==e;var Pe=!0;P.set(e,i),P.set(i,e);for(var Le=$;++he<Y;){ve=j[he];var Ue=e[ve],ze=i[ve];if(k)var qt=$?k(ze,Ue,ve,i,e,P):k(Ue,ze,ve,e,i,P);if(!(qt===r?Ue===ze||A(Ue,ze,h,k,P):qt)){Pe=!1;break}Le||(Le=ve=="constructor")}if(Pe&&!Le){var Lt=e.constructor,Ft=i.constructor;Lt!=Ft&&"constructor"in e&&"constructor"in i&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof Ft=="function"&&Ft instanceof Ft)&&(Pe=!1)}return P.delete(e),P.delete(i),Pe}function ys(e){return To(yc(e,r,Rc),e+"")}function yo(e){return Ml(e,ht,xo)}function bo(e){return Ml(e,It,pc)}var wo=Ai?function(e){return Ai.get(e)}:Uo;function Vi(e){for(var i=e.name+"",h=yr[i],k=Ge.call(yr,i)?h.length:0;k--;){var A=h[k],P=A.func;if(P==null||P==e)return A.name}return i}function xr(e){var i=Ge.call(O,"placeholder")?O:e;return i.placeholder}function Te(){var e=O.iteratee||qo;return e=e===qo?Bl:e,arguments.length?e(arguments[0],arguments[1]):e}function ji(e,i){var h=e.__data__;return Pm(i)?h[typeof i=="string"?"string":"hash"]:h.map}function So(e){for(var i=ht(e),h=i.length;h--;){var k=i[h],A=e[k];i[h]=[k,A,gc(A)]}return i}function er(e,i){var h=qf(e,i);return Pl(h)?h:r}function Rm(e){var i=Ge.call(e,Xs),h=e[Xs];try{e[Xs]=r;var k=!0}catch{}var A=xi.call(e);return k&&(i?e[Xs]=h:delete e[Xs]),A}var xo=Xn?function(e){return e==null?[]:(e=Qe(e),Ds(Xn(e),function(i){return bl.call(e,i)}))}:No,pc=Xn?function(e){for(var i=[];e;)As(i,xo(e)),e=Ei(e);return i}:No,wt=Tt;(Yn&&wt(new Yn(new ArrayBuffer(1)))!=Et||$r&&wt(new $r)!=Ve||Jn&&wt(Jn.resolve())!=Rs||vr&&wt(new vr)!=kt||Wr&&wt(new Wr)!=yt)&&(wt=function(e){var i=Tt(e),h=i==Ee?e.constructor:r,k=h?tr(h):"";if(k)switch(k){case up:return Et;case hp:return Ve;case dp:return Rs;case fp:return kt;case pp:return yt}return i});function Lm(e,i,h){for(var k=-1,A=h.length;++k<A;){var P=h[k],$=P.size;switch(P.type){case"drop":e+=$;break;case"dropRight":i-=$;break;case"take":i=bt(i,e+$);break;case"takeRight":e=ct(e,i-$);break}}return{start:e,end:i}}function Dm(e){var i=e.match(Pd);return i?i[1].split(Bd):[]}function mc(e,i,h){i=Bs(i,e);for(var k=-1,A=i.length,P=!1;++k<A;){var $=as(i[k]);if(!(P=e!=null&&h(e,$)))break;e=e[$]}return P||++k!=A?P:(A=e==null?0:e.length,!!A&&Qi(A)&&bs($,A)&&(Ie(e)||sr(e)))}function Am(e){var i=e.length,h=new e.constructor(i);return i&&typeof e[0]=="string"&&Ge.call(e,"index")&&(h.index=e.index,h.input=e.input),h}function _c(e){return typeof e.constructor=="function"&&!Zr(e)?br(Ei(e)):{}}function Im(e,i,h){var k=e.constructor;switch(i){case fs:return _o(e);case H:case de:return new k(+e);case Et:return mm(e,h);case Ls:case $t:case ps:case Ze:case Fr:case En:case Tn:case Rn:case Ln:return Zl(e,h);case Ve:return new k;case Je:case is:return new k(e);case ds:return _m(e);case kt:return new k;case mt:return gm(e)}}function Mm(e,i){var h=i.length;if(!h)return e;var k=h-1;return i[k]=(h>1?"& ":"")+i[k],i=i.join(h>2?", ":" "),e.replace(Od,`{ 22/* [wrapped with `+i+`] */ 23`)}function Om(e){return Ie(e)||sr(e)||!!(wl&&e&&e[wl])}function bs(e,i){var h=typeof e;return i=i==null?pe:i,!!i&&(h=="number"||h!="symbol"&&Vd.test(e))&&e>-1&&e%1==0&&e<i}function Rt(e,i,h){if(!it(h))return!1;var k=typeof i;return(k=="number"?At(h)&&bs(i,h.length):k=="string"&&i in h)?Qt(h[i],e):!1}function Co(e,i){if(Ie(e))return!1;var h=typeof e;return h=="number"||h=="symbol"||h=="boolean"||e==null||Ht(e)?!0:Dd.test(e)||!Ld.test(e)||i!=null&&e in Qe(i)}function Pm(e){var i=typeof e;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?e!=="__proto__":e===null}function ko(e){var i=Vi(e),h=O[i];if(typeof h!="function"||!(i in We.prototype))return!1;if(e===h)return!0;var k=wo(h);return!!k&&e===k[0]}function Bm(e){return!!gl&&gl in e}var Hm=wi?ws:$o;function Zr(e){var i=e&&e.constructor,h=typeof i=="function"&&i.prototype||gr;return e===h}function gc(e){return e===e&&!it(e)}function vc(e,i){return function(h){return h==null?!1:h[e]===i&&(i!==r||e in Qe(h))}}function qm(e){var i=Ji(e,function(k){return h.size===u&&h.clear(),k}),h=i.cache;return i}function Fm(e,i){var h=e[1],k=i[1],A=h|k,P=A<(d|m|D),$=k==D&&h==l||k==D&&h==C&&e[7].length<=i[8]||k==(D|C)&&i[7].length<=i[8]&&h==l;if(!(P||$))return e;k&d&&(e[2]=i[2],A|=h&d?0:o);var j=i[3];if(j){var Y=e[3];e[3]=Y?ec(Y,j,i[4]):j,e[4]=Y?Is(e[3],w):i[4]}return j=i[5],j&&(Y=e[5],e[5]=Y?tc(Y,j,i[6]):j,e[6]=Y?Is(e[5],w):i[6]),j=i[7],j&&(e[7]=j),k&D&&(e[8]=e[8]==null?i[8]:bt(e[8],i[8])),e[9]==null&&(e[9]=i[9]),e[0]=i[0],e[1]=A,e}function Um(e){var i=[];if(e!=null)for(var h in Qe(e))i.push(h);return i}function Nm(e){return xi.call(e)}function yc(e,i,h){return i=ct(i===r?e.length-1:i,0),function(){for(var k=arguments,A=-1,P=ct(k.length-i,0),$=te(P);++A<P;)$[A]=k[i+A];A=-1;for(var j=te(i+1);++A<i;)j[A]=k[A];return j[i]=h($),Ot(e,this,j)}}function bc(e,i){return i.length<2?e:Qs(e,Gt(i,0,-1))}function $m(e,i){for(var h=e.length,k=bt(i.length,h),A=Dt(e);k--;){var P=i[k];e[k]=bs(P,h)?A[P]:r}return e}function Eo(e,i){if(!(i==="constructor"&&typeof e[i]=="function")&&i!="__proto__")return e[i]}var wc=xc(zl),Qr=rp||function(e,i){return _t.setTimeout(e,i)},To=xc(hm);function Sc(e,i,h){var k=i+"";return To(e,Mm(k,Wm(Dm(k),h)))}function xc(e){var i=0,h=0;return function(){var k=ap(),A=q-(k-h);if(h=k,A>0){if(++i>=z)return arguments[0]}else i=0;return e.apply(r,arguments)}}function Ki(e,i){var h=-1,k=e.length,A=k-1;for(i=i===r?k:i;++h<i;){var P=lo(h,A),$=e[P];e[P]=e[h],e[h]=$}return e.length=i,e}var Cc=qm(function(e){var i=[];return e.charCodeAt(0)===46&&i.push(""),e.replace(Ad,function(h,k,A,P){i.push(A?P.replace(Fd,"$1"):k||h)}),i});function as(e){if(typeof e=="string"||Ht(e))return e;var i=e+"";return i=="0"&&1/e==-me?"-0":i}function tr(e){if(e!=null){try{return Si.call(e)}catch{}try{return e+""}catch{}}return""}function Wm(e,i){return zt(_e,function(h){var k="_."+h[0];i&h[1]&&!gi(e,k)&&e.push(k)}),e.sort()}function kc(e){if(e instanceof We)return e.clone();var i=new jt(e.__wrapped__,e.__chain__);return i.__actions__=Dt(e.__actions__),i.__index__=e.__index__,i.__values__=e.__values__,i}function zm(e,i,h){(h?Rt(e,i,h):i===r)?i=1:i=ct(Oe(i),0);var k=e==null?0:e.length;if(!k||i<1)return[];for(var A=0,P=0,$=te(Li(k/i));A<k;)$[P++]=Gt(e,A,A+=i);return $}function Vm(e){for(var i=-1,h=e==null?0:e.length,k=0,A=[];++i<h;){var P=e[i];P&&(A[k++]=P)}return A}function jm(){var e=arguments.length;if(!e)return[];for(var i=te(e-1),h=arguments[0],k=e;k--;)i[k-1]=arguments[k];return As(Ie(h)?Dt(h):[h],gt(i,1))}var Km=Be(function(e,i){return ot(e)?Kr(e,gt(i,1,ot,!0)):[]}),Gm=Be(function(e,i){var h=Xt(i);return ot(h)&&(h=r),ot(e)?Kr(e,gt(i,1,ot,!0),Te(h,2)):[]}),Xm=Be(function(e,i){var h=Xt(i);return ot(h)&&(h=r),ot(e)?Kr(e,gt(i,1,ot,!0),r,h):[]});function Ym(e,i,h){var k=e==null?0:e.length;return k?(i=h||i===r?1:Oe(i),Gt(e,i<0?0:i,k)):[]}function Jm(e,i,h){var k=e==null?0:e.length;return k?(i=h||i===r?1:Oe(i),i=k-i,Gt(e,0,i<0?0:i)):[]}function Zm(e,i){return e&&e.length?Fi(e,Te(i,3),!0,!0):[]}function Qm(e,i){return e&&e.length?Fi(e,Te(i,3),!0):[]}function e_(e,i,h,k){var A=e==null?0:e.length;return A?(h&&typeof h!="number"&&Rt(e,i,h)&&(h=0,k=A),jp(e,i,h,k)):[]}function Ec(e,i,h){var k=e==null?0:e.length;if(!k)return-1;var A=h==null?0:Oe(h);return A<0&&(A=ct(k+A,0)),vi(e,Te(i,3),A)}function Tc(e,i,h){var k=e==null?0:e.length;if(!k)return-1;var A=k-1;return h!==r&&(A=Oe(h),A=h<0?ct(k+A,0):bt(A,k-1)),vi(e,Te(i,3),A,!0)}function Rc(e){var i=e==null?0:e.length;return i?gt(e,1):[]}function t_(e){var i=e==null?0:e.length;return i?gt(e,me):[]}function s_(e,i){var h=e==null?0:e.length;return h?(i=i===r?1:Oe(i),gt(e,i)):[]}function r_(e){for(var i=-1,h=e==null?0:e.length,k={};++i<h;){var A=e[i];k[A[0]]=A[1]}return k}function Lc(e){return e&&e.length?e[0]:r}function i_(e,i,h){var k=e==null?0:e.length;if(!k)return-1;var A=h==null?0:Oe(h);return A<0&&(A=ct(k+A,0)),fr(e,i,A)}function n_(e){var i=e==null?0:e.length;return i?Gt(e,0,-1):[]}var o_=Be(function(e){var i=rt(e,po);return i.length&&i[0]===e[0]?ro(i):[]}),a_=Be(function(e){var i=Xt(e),h=rt(e,po);return i===Xt(h)?i=r:h.pop(),h.length&&h[0]===e[0]?ro(h,Te(i,2)):[]}),l_=Be(function(e){var i=Xt(e),h=rt(e,po);return i=typeof i=="function"?i:r,i&&h.pop(),h.length&&h[0]===e[0]?ro(h,r,i):[]});function c_(e,i){return e==null?"":np.call(e,i)}function Xt(e){var i=e==null?0:e.length;return i?e[i-1]:r}function u_(e,i,h){var k=e==null?0:e.length;if(!k)return-1;var A=k;return h!==r&&(A=Oe(h),A=A<0?ct(k+A,0):bt(A,k-1)),i===i?Wf(e,i,A):vi(e,cl,A,!0)}function h_(e,i){return e&&e.length?Ul(e,Oe(i)):r}var d_=Be(Dc);function Dc(e,i){return e&&e.length&&i&&i.length?ao(e,i):e}function f_(e,i,h){return e&&e.length&&i&&i.length?ao(e,i,Te(h,2)):e}function p_(e,i,h){return e&&e.length&&i&&i.length?ao(e,i,r,h):e}var m_=ys(function(e,i){var h=e==null?0:e.length,k=Qn(e,i);return Wl(e,rt(i,function(A){return bs(A,h)?+A:A}).sort(Ql)),k});function __(e,i){var h=[];if(!(e&&e.length))return h;var k=-1,A=[],P=e.length;for(i=Te(i,3);++k<P;){var $=e[k];i($,k,e)&&(h.push($),A.push(k))}return Wl(e,A),h}function Ro(e){return e==null?e:cp.call(e)}function g_(e,i,h){var k=e==null?0:e.length;return k?(h&&typeof h!="number"&&Rt(e,i,h)?(i=0,h=k):(i=i==null?0:Oe(i),h=h===r?k:Oe(h)),Gt(e,i,h)):[]}function v_(e,i){return qi(e,i)}function y_(e,i,h){return uo(e,i,Te(h,2))}function b_(e,i){var h=e==null?0:e.length;if(h){var k=qi(e,i);if(k<h&&Qt(e[k],i))return k}return-1}function w_(e,i){return qi(e,i,!0)}function S_(e,i,h){return uo(e,i,Te(h,2),!0)}function x_(e,i){var h=e==null?0:e.length;if(h){var k=qi(e,i,!0)-1;if(Qt(e[k],i))return k}return-1}function C_(e){return e&&e.length?Vl(e):[]}function k_(e,i){return e&&e.length?Vl(e,Te(i,2)):[]}function E_(e){var i=e==null?0:e.length;return i?Gt(e,1,i):[]}function T_(e,i,h){return e&&e.length?(i=h||i===r?1:Oe(i),Gt(e,0,i<0?0:i)):[]}function R_(e,i,h){var k=e==null?0:e.length;return k?(i=h||i===r?1:Oe(i),i=k-i,Gt(e,i<0?0:i,k)):[]}function L_(e,i){return e&&e.length?Fi(e,Te(i,3),!1,!0):[]}function D_(e,i){return e&&e.length?Fi(e,Te(i,3)):[]}var A_=Be(function(e){return Ps(gt(e,1,ot,!0))}),I_=Be(function(e){var i=Xt(e);return ot(i)&&(i=r),Ps(gt(e,1,ot,!0),Te(i,2))}),M_=Be(function(e){var i=Xt(e);return i=typeof i=="function"?i:r,Ps(gt(e,1,ot,!0),r,i)});function O_(e){return e&&e.length?Ps(e):[]}function P_(e,i){return e&&e.length?Ps(e,Te(i,2)):[]}function B_(e,i){return i=typeof i=="function"?i:r,e&&e.length?Ps(e,r,i):[]}function Lo(e){if(!(e&&e.length))return[];var i=0;return e=Ds(e,function(h){if(ot(h))return i=ct(h.length,i),!0}),Vn(i,function(h){return rt(e,$n(h))})}function Ac(e,i){if(!(e&&e.length))return[];var h=Lo(e);return i==null?h:rt(h,function(k){return Ot(i,r,k)})}var H_=Be(function(e,i){return ot(e)?Kr(e,i):[]}),q_=Be(function(e){return fo(Ds(e,ot))}),F_=Be(function(e){var i=Xt(e);return ot(i)&&(i=r),fo(Ds(e,ot),Te(i,2))}),U_=Be(function(e){var i=Xt(e);return i=typeof i=="function"?i:r,fo(Ds(e,ot),r,i)}),N_=Be(Lo);function $_(e,i){return Xl(e||[],i||[],jr)}function W_(e,i){return Xl(e||[],i||[],Yr)}var z_=Be(function(e){var i=e.length,h=i>1?e[i-1]:r;return h=typeof h=="function"?(e.pop(),h):r,Ac(e,h)});function Ic(e){var i=O(e);return i.__chain__=!0,i}function V_(e,i){return i(e),e}function Gi(e,i){return i(e)}var j_=ys(function(e){var i=e.length,h=i?e[0]:0,k=this.__wrapped__,A=function(P){return Qn(P,e)};return i>1||this.__actions__.length||!(k instanceof We)||!bs(h)?this.thru(A):(k=k.slice(h,+h+(i?1:0)),k.__actions__.push({func:Gi,args:[A],thisArg:r}),new jt(k,this.__chain__).thru(function(P){return i&&!P.length&&P.push(r),P}))});function K_(){return Ic(this)}function G_(){return new jt(this.value(),this.__chain__)}function X_(){this.__values__===r&&(this.__values__=jc(this.value()));var e=this.__index__>=this.__values__.length,i=e?r:this.__values__[this.__index__++];return{done:e,value:i}}function Y_(){return this}function J_(e){for(var i,h=this;h instanceof Mi;){var k=kc(h);k.__index__=0,k.__values__=r,i?A.__wrapped__=k:i=k;var A=k;h=h.__wrapped__}return A.__wrapped__=e,i}function Z_(){var e=this.__wrapped__;if(e instanceof We){var i=e;return this.__actions__.length&&(i=new We(this)),i=i.reverse(),i.__actions__.push({func:Gi,args:[Ro],thisArg:r}),new jt(i,this.__chain__)}return this.thru(Ro)}function Q_(){return Gl(this.__wrapped__,this.__actions__)}var eg=Ui(function(e,i,h){Ge.call(e,h)?++e[h]:gs(e,h,1)});function tg(e,i,h){var k=Ie(e)?al:Vp;return h&&Rt(e,i,h)&&(i=r),k(e,Te(i,3))}function sg(e,i){var h=Ie(e)?Ds:Al;return h(e,Te(i,3))}var rg=nc(Ec),ig=nc(Tc);function ng(e,i){return gt(Xi(e,i),1)}function og(e,i){return gt(Xi(e,i),me)}function ag(e,i,h){return h=h===r?1:Oe(h),gt(Xi(e,i),h)}function Mc(e,i){var h=Ie(e)?zt:Os;return h(e,Te(i,3))}function Oc(e,i){var h=Ie(e)?Ef:Dl;return h(e,Te(i,3))}var lg=Ui(function(e,i,h){Ge.call(e,h)?e[h].push(i):gs(e,h,[i])});function cg(e,i,h,k){e=At(e)?e:kr(e),h=h&&!k?Oe(h):0;var A=e.length;return h<0&&(h=ct(A+h,0)),en(e)?h<=A&&e.indexOf(i,h)>-1:!!A&&fr(e,i,h)>-1}var ug=Be(function(e,i,h){var k=-1,A=typeof i=="function",P=At(e)?te(e.length):[];return Os(e,function($){P[++k]=A?Ot(i,$,h):Gr($,i,h)}),P}),hg=Ui(function(e,i,h){gs(e,h,i)});function Xi(e,i){var h=Ie(e)?rt:Hl;return h(e,Te(i,3))}function dg(e,i,h,k){return e==null?[]:(Ie(i)||(i=i==null?[]:[i]),h=k?r:h,Ie(h)||(h=h==null?[]:[h]),Nl(e,i,h))}var fg=Ui(function(e,i,h){e[h?0:1].push(i)},function(){return[[],[]]});function pg(e,i,h){var k=Ie(e)?Un:hl,A=arguments.length<3;return k(e,Te(i,4),h,A,Os)}function mg(e,i,h){var k=Ie(e)?Tf:hl,A=arguments.length<3;return k(e,Te(i,4),h,A,Dl)}function _g(e,i){var h=Ie(e)?Ds:Al;return h(e,Zi(Te(i,3)))}function gg(e){var i=Ie(e)?El:cm;return i(e)}function vg(e,i,h){(h?Rt(e,i,h):i===r)?i=1:i=Oe(i);var k=Ie(e)?Up:um;return k(e,i)}function yg(e){var i=Ie(e)?Np:dm;return i(e)}function bg(e){if(e==null)return 0;if(At(e))return en(e)?mr(e):e.length;var i=wt(e);return i==Ve||i==kt?e.size:no(e).length}function wg(e,i,h){var k=Ie(e)?Nn:fm;return h&&Rt(e,i,h)&&(i=r),k(e,Te(i,3))}var Sg=Be(function(e,i){if(e==null)return[];var h=i.length;return h>1&&Rt(e,i[0],i[1])?i=[]:h>2&&Rt(i[0],i[1],i[2])&&(i=[i[0]]),Nl(e,gt(i,1),[])}),Yi=sp||function(){return _t.Date.now()};function xg(e,i){if(typeof i!="function")throw new Vt(v);return e=Oe(e),function(){if(--e<1)return i.apply(this,arguments)}}function Pc(e,i,h){return i=h?r:i,i=e&&i==null?e.length:i,vs(e,D,r,r,r,r,i)}function Bc(e,i){var h;if(typeof i!="function")throw new Vt(v);return e=Oe(e),function(){return--e>0&&(h=i.apply(this,arguments)),e<=1&&(i=r),h}}var Do=Be(function(e,i,h){var k=d;if(h.length){var A=Is(h,xr(Do));k|=E}return vs(e,k,i,h,A)}),Hc=Be(function(e,i,h){var k=d|m;if(h.length){var A=Is(h,xr(Hc));k|=E}return vs(i,k,e,h,A)});function qc(e,i,h){i=h?r:i;var k=vs(e,l,r,r,r,r,r,i);return k.placeholder=qc.placeholder,k}function Fc(e,i,h){i=h?r:i;var k=vs(e,S,r,r,r,r,r,i);return k.placeholder=Fc.placeholder,k}function Uc(e,i,h){var k,A,P,$,j,Y,oe=0,ae=!1,he=!1,ve=!0;if(typeof e!="function")throw new Vt(v);i=Yt(i)||0,it(h)&&(ae=!!h.leading,he="maxWait"in h,P=he?ct(Yt(h.maxWait)||0,i):P,ve="trailing"in h?!!h.trailing:ve);function Ce(at){var es=k,xs=A;return k=A=r,oe=at,$=e.apply(xs,es),$}function Re(at){return oe=at,j=Qr(Ue,i),ae?Ce(at):$}function Pe(at){var es=at-Y,xs=at-oe,nu=i-es;return he?bt(nu,P-xs):nu}function Le(at){var es=at-Y,xs=at-oe;return Y===r||es>=i||es<0||he&&xs>=P}function Ue(){var at=Yi();if(Le(at))return ze(at);j=Qr(Ue,Pe(at))}function ze(at){return j=r,ve&&k?Ce(at):(k=A=r,$)}function qt(){j!==r&&Yl(j),oe=0,k=Y=A=j=r}function Lt(){return j===r?$:ze(Yi())}function Ft(){var at=Yi(),es=Le(at);if(k=arguments,A=this,Y=at,es){if(j===r)return Re(Y);if(he)return Yl(j),j=Qr(Ue,i),Ce(Y)}return j===r&&(j=Qr(Ue,i)),$}return Ft.cancel=qt,Ft.flush=Lt,Ft}var Cg=Be(function(e,i){return Ll(e,1,i)}),kg=Be(function(e,i,h){return Ll(e,Yt(i)||0,h)});function Eg(e){return vs(e,I)}function Ji(e,i){if(typeof e!="function"||i!=null&&typeof i!="function")throw new Vt(v);var h=function(){var k=arguments,A=i?i.apply(this,k):k[0],P=h.cache;if(P.has(A))return P.get(A);var $=e.apply(this,k);return h.cache=P.set(A,$)||P,$};return h.cache=new(Ji.Cache||_s),h}Ji.Cache=_s;function Zi(e){if(typeof e!="function")throw new Vt(v);return function(){var i=arguments;switch(i.length){case 0:return!e.call(this);case 1:return!e.call(this,i[0]);case 2:return!e.call(this,i[0],i[1]);case 3:return!e.call(this,i[0],i[1],i[2])}return!e.apply(this,i)}}function Tg(e){return Bc(2,e)}var Rg=pm(function(e,i){i=i.length==1&&Ie(i[0])?rt(i[0],Pt(Te())):rt(gt(i,1),Pt(Te()));var h=i.length;return Be(function(k){for(var A=-1,P=bt(k.length,h);++A<P;)k[A]=i[A].call(this,k[A]);return Ot(e,this,k)})}),Ao=Be(function(e,i){var h=Is(i,xr(Ao));return vs(e,E,r,i,h)}),Nc=Be(function(e,i){var h=Is(i,xr(Nc));return vs(e,L,r,i,h)}),Lg=ys(function(e,i){return vs(e,C,r,r,r,i)});function Dg(e,i){if(typeof e!="function")throw new Vt(v);return i=i===r?i:Oe(i),Be(e,i)}function Ag(e,i){if(typeof e!="function")throw new Vt(v);return i=i==null?0:ct(Oe(i),0),Be(function(h){var k=h[i],A=Hs(h,0,i);return k&&As(A,k),Ot(e,this,A)})}function Ig(e,i,h){var k=!0,A=!0;if(typeof e!="function")throw new Vt(v);return it(h)&&(k="leading"in h?!!h.leading:k,A="trailing"in h?!!h.trailing:A),Uc(e,i,{leading:k,maxWait:i,trailing:A})}function Mg(e){return Pc(e,1)}function Og(e,i){return Ao(mo(i),e)}function Pg(){if(!arguments.length)return[];var e=arguments[0];return Ie(e)?e:[e]}function Bg(e){return Kt(e,x)}function Hg(e,i){return i=typeof i=="function"?i:r,Kt(e,x,i)}function qg(e){return Kt(e,f|x)}function Fg(e,i){return i=typeof i=="function"?i:r,Kt(e,f|x,i)}function Ug(e,i){return i==null||Rl(e,i,ht(i))}function Qt(e,i){return e===i||e!==e&&i!==i}var Ng=zi(so),$g=zi(function(e,i){return e>=i}),sr=Ol(function(){return arguments}())?Ol:function(e){return nt(e)&&Ge.call(e,"callee")&&!bl.call(e,"callee")},Ie=te.isArray,Wg=tl?Pt(tl):Jp;function At(e){return e!=null&&Qi(e.length)&&!ws(e)}function ot(e){return nt(e)&&At(e)}function zg(e){return e===!0||e===!1||nt(e)&&Tt(e)==H}var qs=ip||$o,Vg=sl?Pt(sl):Zp;function jg(e){return nt(e)&&e.nodeType===1&&!ei(e)}function Kg(e){if(e==null)return!0;if(At(e)&&(Ie(e)||typeof e=="string"||typeof e.splice=="function"||qs(e)||Cr(e)||sr(e)))return!e.length;var i=wt(e);if(i==Ve||i==kt)return!e.size;if(Zr(e))return!no(e).length;for(var h in e)if(Ge.call(e,h))return!1;return!0}function Gg(e,i){return Xr(e,i)}function Xg(e,i,h){h=typeof h=="function"?h:r;var k=h?h(e,i):r;return k===r?Xr(e,i,r,h):!!k}function Io(e){if(!nt(e))return!1;var i=Tt(e);return i==ge||i==ue||typeof e.message=="string"&&typeof e.name=="string"&&!ei(e)}function Yg(e){return typeof e=="number"&&Sl(e)}function ws(e){if(!it(e))return!1;var i=Tt(e);return i==le||i==Fe||i==K||i==qr}function $c(e){return typeof e=="number"&&e==Oe(e)}function Qi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=pe}function it(e){var i=typeof e;return e!=null&&(i=="object"||i=="function")}function nt(e){return e!=null&&typeof e=="object"}var Wc=rl?Pt(rl):em;function Jg(e,i){return e===i||io(e,i,So(i))}function Zg(e,i,h){return h=typeof h=="function"?h:r,io(e,i,So(i),h)}function Qg(e){return zc(e)&&e!=+e}function ev(e){if(Hm(e))throw new Ae(g);return Pl(e)}function tv(e){return e===null}function sv(e){return e==null}function zc(e){return typeof e=="number"||nt(e)&&Tt(e)==Je}function ei(e){if(!nt(e)||Tt(e)!=Ee)return!1;var i=Ei(e);if(i===null)return!0;var h=Ge.call(i,"constructor")&&i.constructor;return typeof h=="function"&&h instanceof h&&Si.call(h)==Zf}var Mo=il?Pt(il):tm;function rv(e){return $c(e)&&e>=-pe&&e<=pe}var Vc=nl?Pt(nl):sm;function en(e){return typeof e=="string"||!Ie(e)&&nt(e)&&Tt(e)==is}function Ht(e){return typeof e=="symbol"||nt(e)&&Tt(e)==mt}var Cr=ol?Pt(ol):rm;function iv(e){return e===r}function nv(e){return nt(e)&&wt(e)==yt}function ov(e){return nt(e)&&Tt(e)==Ks}var av=zi(oo),lv=zi(function(e,i){return e<=i});function jc(e){if(!e)return[];if(At(e))return en(e)?Jt(e):Dt(e);if(Nr&&e[Nr])return Uf(e[Nr]());var i=wt(e),h=i==Ve?Kn:i==kt?yi:kr;return h(e)}function Ss(e){if(!e)return e===0?e:0;if(e=Yt(e),e===me||e===-me){var i=e<0?-1:1;return i*M}return e===e?e:0}function Oe(e){var i=Ss(e),h=i%1;return i===i?h?i-h:i:0}function Kc(e){return e?Zs(Oe(e),0,V):0}function Yt(e){if(typeof e=="number")return e;if(Ht(e))return W;if(it(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=it(i)?i+"":i}if(typeof e!="string")return e===0?e:+e;e=dl(e);var h=$d.test(e);return h||zd.test(e)?xf(e.slice(2),h?2:8):Nd.test(e)?W:+e}function Gc(e){return os(e,It(e))}function cv(e){return e?Zs(Oe(e),-pe,pe):e===0?e:0}function Xe(e){return e==null?"":Bt(e)}var uv=wr(function(e,i){if(Zr(i)||At(i)){os(i,ht(i),e);return}for(var h in i)Ge.call(i,h)&&jr(e,h,i[h])}),Xc=wr(function(e,i){os(i,It(i),e)}),tn=wr(function(e,i,h,k){os(i,It(i),e,k)}),hv=wr(function(e,i,h,k){os(i,ht(i),e,k)}),dv=ys(Qn);function fv(e,i){var h=br(e);return i==null?h:Tl(h,i)}var pv=Be(function(e,i){e=Qe(e);var h=-1,k=i.length,A=k>2?i[2]:r;for(A&&Rt(i[0],i[1],A)&&(k=1);++h<k;)for(var P=i[h],$=It(P),j=-1,Y=$.length;++j<Y;){var oe=$[j],ae=e[oe];(ae===r||Qt(ae,gr[oe])&&!Ge.call(e,oe))&&(e[oe]=P[oe])}return e}),mv=Be(function(e){return e.push(r,dc),Ot(Yc,r,e)});function _v(e,i){return ll(e,Te(i,3),ns)}function gv(e,i){return ll(e,Te(i,3),to)}function vv(e,i){return e==null?e:eo(e,Te(i,3),It)}function yv(e,i){return e==null?e:Il(e,Te(i,3),It)}function bv(e,i){return e&&ns(e,Te(i,3))}function wv(e,i){return e&&to(e,Te(i,3))}function Sv(e){return e==null?[]:Bi(e,ht(e))}function xv(e){return e==null?[]:Bi(e,It(e))}function Oo(e,i,h){var k=e==null?r:Qs(e,i);return k===r?h:k}function Cv(e,i){return e!=null&&mc(e,i,Kp)}function Po(e,i){return e!=null&&mc(e,i,Gp)}var kv=ac(function(e,i,h){i!=null&&typeof i.toString!="function"&&(i=xi.call(i)),e[i]=h},Ho(Mt)),Ev=ac(function(e,i,h){i!=null&&typeof i.toString!="function"&&(i=xi.call(i)),Ge.call(e,i)?e[i].push(h):e[i]=[h]},Te),Tv=Be(Gr);function ht(e){return At(e)?kl(e):no(e)}function It(e){return At(e)?kl(e,!0):im(e)}function Rv(e,i){var h={};return i=Te(i,3),ns(e,function(k,A,P){gs(h,i(k,A,P),k)}),h}function Lv(e,i){var h={};return i=Te(i,3),ns(e,function(k,A,P){gs(h,A,i(k,A,P))}),h}var Dv=wr(function(e,i,h){Hi(e,i,h)}),Yc=wr(function(e,i,h,k){Hi(e,i,h,k)}),Av=ys(function(e,i){var h={};if(e==null)return h;var k=!1;i=rt(i,function(P){return P=Bs(P,e),k||(k=P.length>1),P}),os(e,bo(e),h),k&&(h=Kt(h,f|y|x,km));for(var A=i.length;A--;)ho(h,i[A]);return h});function Iv(e,i){return Jc(e,Zi(Te(i)))}var Mv=ys(function(e,i){return e==null?{}:om(e,i)});function Jc(e,i){if(e==null)return{};var h=rt(bo(e),function(k){return[k]});return i=Te(i),$l(e,h,function(k,A){return i(k,A[0])})}function Ov(e,i,h){i=Bs(i,e);var k=-1,A=i.length;for(A||(A=1,e=r);++k<A;){var P=e==null?r:e[as(i[k])];P===r&&(k=A,P=h),e=ws(P)?P.call(e):P}return e}function Pv(e,i,h){return e==null?e:Yr(e,i,h)}function Bv(e,i,h,k){return k=typeof k=="function"?k:r,e==null?e:Yr(e,i,h,k)}var Zc=uc(ht),Qc=uc(It);function Hv(e,i,h){var k=Ie(e),A=k||qs(e)||Cr(e);if(i=Te(i,4),h==null){var P=e&&e.constructor;A?h=k?new P:[]:it(e)?h=ws(P)?br(Ei(e)):{}:h={}}return(A?zt:ns)(e,function($,j,Y){return i(h,$,j,Y)}),h}function qv(e,i){return e==null?!0:ho(e,i)}function Fv(e,i,h){return e==null?e:Kl(e,i,mo(h))}function Uv(e,i,h,k){return k=typeof k=="function"?k:r,e==null?e:Kl(e,i,mo(h),k)}function kr(e){return e==null?[]:jn(e,ht(e))}function Nv(e){return e==null?[]:jn(e,It(e))}function $v(e,i,h){return h===r&&(h=i,i=r),h!==r&&(h=Yt(h),h=h===h?h:0),i!==r&&(i=Yt(i),i=i===i?i:0),Zs(Yt(e),i,h)}function Wv(e,i,h){return i=Ss(i),h===r?(h=i,i=0):h=Ss(h),e=Yt(e),Xp(e,i,h)}function zv(e,i,h){if(h&&typeof h!="boolean"&&Rt(e,i,h)&&(i=h=r),h===r&&(typeof i=="boolean"?(h=i,i=r):typeof e=="boolean"&&(h=e,e=r)),e===r&&i===r?(e=0,i=1):(e=Ss(e),i===r?(i=e,e=0):i=Ss(i)),e>i){var k=e;e=i,i=k}if(h||e%1||i%1){var A=xl();return bt(e+A*(i-e+Sf("1e-"+((A+"").length-1))),i)}return lo(e,i)}var Vv=Sr(function(e,i,h){return i=i.toLowerCase(),e+(h?eu(i):i)});function eu(e){return Bo(Xe(e).toLowerCase())}function tu(e){return e=Xe(e),e&&e.replace(jd,Pf).replace(df,"")}function jv(e,i,h){e=Xe(e),i=Bt(i);var k=e.length;h=h===r?k:Zs(Oe(h),0,k);var A=h;return h-=i.length,h>=0&&e.slice(h,A)==i}function Kv(e){return e=Xe(e),e&&Ed.test(e)?e.replace(Ia,Bf):e}function Gv(e){return e=Xe(e),e&&Id.test(e)?e.replace(Dn,"\\$&"):e}var Xv=Sr(function(e,i,h){return e+(h?"-":"")+i.toLowerCase()}),Yv=Sr(function(e,i,h){return e+(h?" ":"")+i.toLowerCase()}),Jv=ic("toLowerCase");function Zv(e,i,h){e=Xe(e),i=Oe(i);var k=i?mr(e):0;if(!i||k>=i)return e;var A=(i-k)/2;return Wi(Di(A),h)+e+Wi(Li(A),h)}function Qv(e,i,h){e=Xe(e),i=Oe(i);var k=i?mr(e):0;return i&&k<i?e+Wi(i-k,h):e}function e0(e,i,h){e=Xe(e),i=Oe(i);var k=i?mr(e):0;return i&&k<i?Wi(i-k,h)+e:e}function t0(e,i,h){return h||i==null?i=0:i&&(i=+i),lp(Xe(e).replace(An,""),i||0)}function s0(e,i,h){return(h?Rt(e,i,h):i===r)?i=1:i=Oe(i),co(Xe(e),i)}function r0(){var e=arguments,i=Xe(e[0]);return e.length<3?i:i.replace(e[1],e[2])}var i0=Sr(function(e,i,h){return e+(h?"_":"")+i.toLowerCase()});function n0(e,i,h){return h&&typeof h!="number"&&Rt(e,i,h)&&(i=h=r),h=h===r?V:h>>>0,h?(e=Xe(e),e&&(typeof i=="string"||i!=null&&!Mo(i))&&(i=Bt(i),!i&&pr(e))?Hs(Jt(e),0,h):e.split(i,h)):[]}var o0=Sr(function(e,i,h){return e+(h?" ":"")+Bo(i)});function a0(e,i,h){return e=Xe(e),h=h==null?0:Zs(Oe(h),0,e.length),i=Bt(i),e.slice(h,h+i.length)==i}function l0(e,i,h){var k=O.templateSettings;h&&Rt(e,i,h)&&(i=r),e=Xe(e),i=tn({},i,k,hc);var A=tn({},i.imports,k.imports,hc),P=ht(A),$=jn(A,P),j,Y,oe=0,ae=i.interpolate||pi,he="__p += '",ve=Gn((i.escape||pi).source+"|"+ae.source+"|"+(ae===Ma?Ud:pi).source+"|"+(i.evaluate||pi).source+"|$","g"),Ce="//# sourceURL="+(Ge.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++gf+"]")+` 24`;e.replace(ve,function(Le,Ue,ze,qt,Lt,Ft){return ze||(ze=qt),he+=e.slice(oe,Ft).replace(Kd,Hf),Ue&&(j=!0,he+=`' + 25__e(`+Ue+`) + 26'`),Lt&&(Y=!0,he+=`'; 27`+Lt+`; 28__p += '`),ze&&(he+=`' + 29((__t = (`+ze+`)) == null ? '' : __t) + 30'`),oe=Ft+Le.length,Le}),he+=`'; 31`;var Re=Ge.call(i,"variable")&&i.variable;if(!Re)he=`with (obj) { 32`+he+` 33} 34`;else if(qd.test(Re))throw new Ae(n);he=(Y?he.replace(Sd,""):he).replace(xd,"$1").replace(Cd,"$1;"),he="function("+(Re||"obj")+`) { 35`+(Re?"":`obj || (obj = {}); 36`)+"var __t, __p = ''"+(j?", __e = _.escape":"")+(Y?`, __j = Array.prototype.join; 37function print() { __p += __j.call(arguments, '') } 38`:`; 39`)+he+`return __p 40}`;var Pe=ru(function(){return Ke(P,Ce+"return "+he).apply(r,$)});if(Pe.source=he,Io(Pe))throw Pe;return Pe}function c0(e){return Xe(e).toLowerCase()}function u0(e){return Xe(e).toUpperCase()}function h0(e,i,h){if(e=Xe(e),e&&(h||i===r))return dl(e);if(!e||!(i=Bt(i)))return e;var k=Jt(e),A=Jt(i),P=fl(k,A),$=pl(k,A)+1;return Hs(k,P,$).join("")}function d0(e,i,h){if(e=Xe(e),e&&(h||i===r))return e.slice(0,_l(e)+1);if(!e||!(i=Bt(i)))return e;var k=Jt(e),A=pl(k,Jt(i))+1;return Hs(k,0,A).join("")}function f0(e,i,h){if(e=Xe(e),e&&(h||i===r))return e.replace(An,"");if(!e||!(i=Bt(i)))return e;var k=Jt(e),A=fl(k,Jt(i));return Hs(k,A).join("")}function p0(e,i){var h=B,k=U;if(it(i)){var A="separator"in i?i.separator:A;h="length"in i?Oe(i.length):h,k="omission"in i?Bt(i.omission):k}e=Xe(e);var P=e.length;if(pr(e)){var $=Jt(e);P=$.length}if(h>=P)return e;var j=h-mr(k);if(j<1)return k;var Y=$?Hs($,0,j).join(""):e.slice(0,j);if(A===r)return Y+k;if($&&(j+=Y.length-j),Mo(A)){if(e.slice(j).search(A)){var oe,ae=Y;for(A.global||(A=Gn(A.source,Xe(Oa.exec(A))+"g")),A.lastIndex=0;oe=A.exec(ae);)var he=oe.index;Y=Y.slice(0,he===r?j:he)}}else if(e.indexOf(Bt(A),j)!=j){var ve=Y.lastIndexOf(A);ve>-1&&(Y=Y.slice(0,ve))}return Y+k}function m0(e){return e=Xe(e),e&&kd.test(e)?e.replace(Aa,zf):e}var _0=Sr(function(e,i,h){return e+(h?" ":"")+i.toUpperCase()}),Bo=ic("toUpperCase");function su(e,i,h){return e=Xe(e),i=h?r:i,i===r?Ff(e)?Kf(e):Df(e):e.match(i)||[]}var ru=Be(function(e,i){try{return Ot(e,r,i)}catch(h){return Io(h)?h:new Ae(h)}}),g0=ys(function(e,i){return zt(i,function(h){h=as(h),gs(e,h,Do(e[h],e))}),e});function v0(e){var i=e==null?0:e.length,h=Te();return e=i?rt(e,function(k){if(typeof k[1]!="function")throw new Vt(v);return[h(k[0]),k[1]]}):[],Be(function(k){for(var A=-1;++A<i;){var P=e[A];if(Ot(P[0],this,k))return Ot(P[1],this,k)}})}function y0(e){return zp(Kt(e,f))}function Ho(e){return function(){return e}}function b0(e,i){return e==null||e!==e?i:e}var w0=oc(),S0=oc(!0);function Mt(e){return e}function qo(e){return Bl(typeof e=="function"?e:Kt(e,f))}function x0(e){return ql(Kt(e,f))}function C0(e,i){return Fl(e,Kt(i,f))}var k0=Be(function(e,i){return function(h){return Gr(h,e,i)}}),E0=Be(function(e,i){return function(h){return Gr(e,h,i)}});function Fo(e,i,h){var k=ht(i),A=Bi(i,k);h==null&&!(it(i)&&(A.length||!k.length))&&(h=i,i=e,e=this,A=Bi(i,ht(i)));var P=!(it(h)&&"chain"in h)||!!h.chain,$=ws(e);return zt(A,function(j){var Y=i[j];e[j]=Y,$&&(e.prototype[j]=function(){var oe=this.__chain__;if(P||oe){var ae=e(this.__wrapped__),he=ae.__actions__=Dt(this.__actions__);return he.push({func:Y,args:arguments,thisArg:e}),ae.__chain__=oe,ae}return Y.apply(e,As([this.value()],arguments))})}),e}function T0(){return _t._===this&&(_t._=Qf),this}function Uo(){}function R0(e){return e=Oe(e),Be(function(i){return Ul(i,e)})}var L0=go(rt),D0=go(al),A0=go(Nn);function iu(e){return Co(e)?$n(as(e)):am(e)}function I0(e){return function(i){return e==null?r:Qs(e,i)}}var M0=lc(),O0=lc(!0);function No(){return[]}function $o(){return!1}function P0(){return{}}function B0(){return""}function H0(){return!0}function q0(e,i){if(e=Oe(e),e<1||e>pe)return[];var h=V,k=bt(e,V);i=Te(i),e-=V;for(var A=Vn(k,i);++h<e;)i(h);return A}function F0(e){return Ie(e)?rt(e,as):Ht(e)?[e]:Dt(Cc(Xe(e)))}function U0(e){var i=++Jf;return Xe(e)+i}var N0=$i(function(e,i){return e+i},0),$0=vo("ceil"),W0=$i(function(e,i){return e/i},1),z0=vo("floor");function V0(e){return e&&e.length?Pi(e,Mt,so):r}function j0(e,i){return e&&e.length?Pi(e,Te(i,2),so):r}function K0(e){return ul(e,Mt)}function G0(e,i){return ul(e,Te(i,2))}function X0(e){return e&&e.length?Pi(e,Mt,oo):r}function Y0(e,i){return e&&e.length?Pi(e,Te(i,2),oo):r}var J0=$i(function(e,i){return e*i},1),Z0=vo("round"),Q0=$i(function(e,i){return e-i},0);function ey(e){return e&&e.length?zn(e,Mt):0}function ty(e,i){return e&&e.length?zn(e,Te(i,2)):0}return O.after=xg,O.ary=Pc,O.assign=uv,O.assignIn=Xc,O.assignInWith=tn,O.assignWith=hv,O.at=dv,O.before=Bc,O.bind=Do,O.bindAll=g0,O.bindKey=Hc,O.castArray=Pg,O.chain=Ic,O.chunk=zm,O.compact=Vm,O.concat=jm,O.cond=v0,O.conforms=y0,O.constant=Ho,O.countBy=eg,O.create=fv,O.curry=qc,O.curryRight=Fc,O.debounce=Uc,O.defaults=pv,O.defaultsDeep=mv,O.defer=Cg,O.delay=kg,O.difference=Km,O.differenceBy=Gm,O.differenceWith=Xm,O.drop=Ym,O.dropRight=Jm,O.dropRightWhile=Zm,O.dropWhile=Qm,O.fill=e_,O.filter=sg,O.flatMap=ng,O.flatMapDeep=og,O.flatMapDepth=ag,O.flatten=Rc,O.flattenDeep=t_,O.flattenDepth=s_,O.flip=Eg,O.flow=w0,O.flowRight=S0,O.fromPairs=r_,O.functions=Sv,O.functionsIn=xv,O.groupBy=lg,O.initial=n_,O.intersection=o_,O.intersectionBy=a_,O.intersectionWith=l_,O.invert=kv,O.invertBy=Ev,O.invokeMap=ug,O.iteratee=qo,O.keyBy=hg,O.keys=ht,O.keysIn=It,O.map=Xi,O.mapKeys=Rv,O.mapValues=Lv,O.matches=x0,O.matchesProperty=C0,O.memoize=Ji,O.merge=Dv,O.mergeWith=Yc,O.method=k0,O.methodOf=E0,O.mixin=Fo,O.negate=Zi,O.nthArg=R0,O.omit=Av,O.omitBy=Iv,O.once=Tg,O.orderBy=dg,O.over=L0,O.overArgs=Rg,O.overEvery=D0,O.overSome=A0,O.partial=Ao,O.partialRight=Nc,O.partition=fg,O.pick=Mv,O.pickBy=Jc,O.property=iu,O.propertyOf=I0,O.pull=d_,O.pullAll=Dc,O.pullAllBy=f_,O.pullAllWith=p_,O.pullAt=m_,O.range=M0,O.rangeRight=O0,O.rearg=Lg,O.reject=_g,O.remove=__,O.rest=Dg,O.reverse=Ro,O.sampleSize=vg,O.set=Pv,O.setWith=Bv,O.shuffle=yg,O.slice=g_,O.sortBy=Sg,O.sortedUniq=C_,O.sortedUniqBy=k_,O.split=n0,O.spread=Ag,O.tail=E_,O.take=T_,O.takeRight=R_,O.takeRightWhile=L_,O.takeWhile=D_,O.tap=V_,O.throttle=Ig,O.thru=Gi,O.toArray=jc,O.toPairs=Zc,O.toPairsIn=Qc,O.toPath=F0,O.toPlainObject=Gc,O.transform=Hv,O.unary=Mg,O.union=A_,O.unionBy=I_,O.unionWith=M_,O.uniq=O_,O.uniqBy=P_,O.uniqWith=B_,O.unset=qv,O.unzip=Lo,O.unzipWith=Ac,O.update=Fv,O.updateWith=Uv,O.values=kr,O.valuesIn=Nv,O.without=H_,O.words=su,O.wrap=Og,O.xor=q_,O.xorBy=F_,O.xorWith=U_,O.zip=N_,O.zipObject=$_,O.zipObjectDeep=W_,O.zipWith=z_,O.entries=Zc,O.entriesIn=Qc,O.extend=Xc,O.extendWith=tn,Fo(O,O),O.add=N0,O.attempt=ru,O.camelCase=Vv,O.capitalize=eu,O.ceil=$0,O.clamp=$v,O.clone=Bg,O.cloneDeep=qg,O.cloneDeepWith=Fg,O.cloneWith=Hg,O.conformsTo=Ug,O.deburr=tu,O.defaultTo=b0,O.divide=W0,O.endsWith=jv,O.eq=Qt,O.escape=Kv,O.escapeRegExp=Gv,O.every=tg,O.find=rg,O.findIndex=Ec,O.findKey=_v,O.findLast=ig,O.findLastIndex=Tc,O.findLastKey=gv,O.floor=z0,O.forEach=Mc,O.forEachRight=Oc,O.forIn=vv,O.forInRight=yv,O.forOwn=bv,O.forOwnRight=wv,O.get=Oo,O.gt=Ng,O.gte=$g,O.has=Cv,O.hasIn=Po,O.head=Lc,O.identity=Mt,O.includes=cg,O.indexOf=i_,O.inRange=Wv,O.invoke=Tv,O.isArguments=sr,O.isArray=Ie,O.isArrayBuffer=Wg,O.isArrayLike=At,O.isArrayLikeObject=ot,O.isBoolean=zg,O.isBuffer=qs,O.isDate=Vg,O.isElement=jg,O.isEmpty=Kg,O.isEqual=Gg,O.isEqualWith=Xg,O.isError=Io,O.isFinite=Yg,O.isFunction=ws,O.isInteger=$c,O.isLength=Qi,O.isMap=Wc,O.isMatch=Jg,O.isMatchWith=Zg,O.isNaN=Qg,O.isNative=ev,O.isNil=sv,O.isNull=tv,O.isNumber=zc,O.isObject=it,O.isObjectLike=nt,O.isPlainObject=ei,O.isRegExp=Mo,O.isSafeInteger=rv,O.isSet=Vc,O.isString=en,O.isSymbol=Ht,O.isTypedArray=Cr,O.isUndefined=iv,O.isWeakMap=nv,O.isWeakSet=ov,O.join=c_,O.kebabCase=Xv,O.last=Xt,O.lastIndexOf=u_,O.lowerCase=Yv,O.lowerFirst=Jv,O.lt=av,O.lte=lv,O.max=V0,O.maxBy=j0,O.mean=K0,O.meanBy=G0,O.min=X0,O.minBy=Y0,O.stubArray=No,O.stubFalse=$o,O.stubObject=P0,O.stubString=B0,O.stubTrue=H0,O.multiply=J0,O.nth=h_,O.noConflict=T0,O.noop=Uo,O.now=Yi,O.pad=Zv,O.padEnd=Qv,O.padStart=e0,O.parseInt=t0,O.random=zv,O.reduce=pg,O.reduceRight=mg,O.repeat=s0,O.replace=r0,O.result=Ov,O.round=Z0,O.runInContext=X,O.sample=gg,O.size=bg,O.snakeCase=i0,O.some=wg,O.sortedIndex=v_,O.sortedIndexBy=y_,O.sortedIndexOf=b_,O.sortedLastIndex=w_,O.sortedLastIndexBy=S_,O.sortedLastIndexOf=x_,O.startCase=o0,O.startsWith=a0,O.subtract=Q0,O.sum=ey,O.sumBy=ty,O.template=l0,O.times=q0,O.toFinite=Ss,O.toInteger=Oe,O.toLength=Kc,O.toLower=c0,O.toNumber=Yt,O.toSafeInteger=cv,O.toString=Xe,O.toUpper=u0,O.trim=h0,O.trimEnd=d0,O.trimStart=f0,O.truncate=p0,O.unescape=m0,O.uniqueId=U0,O.upperCase=_0,O.upperFirst=Bo,O.each=Mc,O.eachRight=Oc,O.first=Lc,Fo(O,function(){var e={};return ns(O,function(i,h){Ge.call(O.prototype,h)||(e[h]=i)}),e}(),{chain:!1}),O.VERSION=p,zt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){O[e].placeholder=O}),zt(["drop","take"],function(e,i){We.prototype[e]=function(h){h=h===r?1:ct(Oe(h),0);var k=this.__filtered__&&!i?new We(this):this.clone();return k.__filtered__?k.__takeCount__=bt(h,k.__takeCount__):k.__views__.push({size:bt(h,V),type:e+(k.__dir__<0?"Right":"")}),k},We.prototype[e+"Right"]=function(h){return this.reverse()[e](h).reverse()}}),zt(["filter","map","takeWhile"],function(e,i){var h=i+1,k=h==J||h==ce;We.prototype[e]=function(A){var P=this.clone();return P.__iteratees__.push({iteratee:Te(A,3),type:h}),P.__filtered__=P.__filtered__||k,P}}),zt(["head","last"],function(e,i){var h="take"+(i?"Right":"");
40We.prototype[e]=function(){return this[h](1).value()[0]}}),zt(["initial","tail"],function(e,i){var h="drop"+(i?"":"Right");We.prototype[e]=function(){return this.__filtered__?new We(this):this[h](1)}}),We.prototype.compact=function(){return this.filter(Mt)},We.prototype.find=function(e){return this.filter(e).head()},We.prototype.findLast=function(e){return this.reverse().find(e)},We.prototype.invokeMap=Be(function(e,i){return typeof e=="function"?new We(this):this.map(function(h){return Gr(h,e,i)})}),We.prototype.reject=function(e){return this.filter(Zi(Te(e)))},We.prototype.slice=function(e,i){e=Oe(e);var h=this;return h.__filtered__&&(e>0||i<0)?new We(h):(e<0?h=h.takeRight(-e):e&&(h=h.drop(e)),i!==r&&(i=Oe(i),h=i<0?h.dropRight(-i):h.take(i-e)),h)},We.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},We.prototype.toArray=function(){return this.take(V)},ns(We.prototype,function(e,i){var h=/^(?:filter|find|map|reject)|While$/.test(i),k=/^(?:head|last)$/.test(i),A=O[k?"take"+(i=="last"?"Right":""):i],P=k||/^find/.test(i);!A||(O.prototype[i]=function(){var $=this.__wrapped__,j=k?[1]:arguments,Y=$ instanceof We,oe=j[0],ae=Y||Ie($),he=function(Ue){var ze=A.apply(O,As([Ue],j));return k&&ve?ze[0]:ze};ae&&h&&typeof oe=="function"&&oe.length!=1&&(Y=ae=!1);var ve=this.__chain__,Ce=!!this.__actions__.length,Re=P&&!ve,Pe=Y&&!Ce;if(!P&&ae){$=Pe?$:new We(this);var Le=e.apply($,j);return Le.__actions__.push({func:Gi,args:[he],thisArg:r}),new jt(Le,ve)}return Re&&Pe?e.apply(this,j):(Le=this.thru(he),Re?k?Le.value()[0]:Le.value():Le)})}),zt(["pop","push","shift","sort","splice","unshift"],function(e){var i=bi[e],h=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",k=/^(?:pop|shift)$/.test(e);O.prototype[e]=function(){var A=arguments;if(k&&!this.__chain__){var P=this.value();return i.apply(Ie(P)?P:[],A)}return this[h](function($){return i.apply(Ie($)?$:[],A)})}}),ns(We.prototype,function(e,i){var h=O[i];if(h){var k=h.name+"";Ge.call(yr,k)||(yr[k]=[]),yr[k].push({name:i,func:h})}}),yr[Ni(r,m).name]=[{name:"wrapper",func:r}],We.prototype.clone=mp,We.prototype.reverse=_p,We.prototype.value=gp,O.prototype.at=j_,O.prototype.chain=K_,O.prototype.commit=G_,O.prototype.next=X_,O.prototype.plant=J_,O.prototype.reverse=Z_,O.prototype.toJSON=O.prototype.valueOf=O.prototype.value=Q_,O.prototype.first=O.prototype.head,Nr&&(O.prototype[Nr]=Y_),O},_r=Gf();Gs?((Gs.exports=_r)._=_r,Hn._=_r):_t._=_r}).call(ts)})(Xo,Xo.exports);var Eu=Xo.exports;const Tu=new tte,wte={components:{LogSelectorApp:ate,LogSelectorLines:dte,Spinner:la,Terminal:bte,ChevronLeftIcon:oh,ChevronRightIcon:na},props:["applicationLogs","isLoadingLogs","videoTime","isPlaying","isFullyLoaded"],emits:["setVideoTime","manualScroll"],data(){return{activeApp:null,activeLines:null,scrollerHeight:300,resizeInterval:null,filterText:"",ansiToHTML:Tu,searchResultIndex:0,searchResultCount:0}},computed:{isEmbedded(){return this.$route.query.embed==="true"},groupedLines(){return Eu.groupBy(this.activeApp.lines,s=>s.logFile)},lines(){var t,r,p;if(((r=(t=this.activeApp)==null?void 0:t.log)==null?void 0:r.type)==="cli")return;(p=this.activeLines)==null||p.forEach(a=>{var v,n;a.html=Tu.toHtml(a.line).replaceAll(/style="color:#FFF"/g,'style="color:#E15E7EB"');const g=((n=(v=a.line.match(/^ +/))==null?void 0:v[0])!=null?n:"").length;a.html=`<span style="width: ${g*8}px; display: inline-block;"></span>${a.html}`,a.past=!this.isPlaying||this.videoTime>=a.time});let s=this.activeLines;return this.activeLines&&(s=this.activeLines.filter(a=>{var g;return(g=a==null?void 0:a.line)==null?void 0:g.includes(this.filterText)})),s==null?void 0:s.filter(a=>a.past)}},watch:{videoTime:Eu.throttle(function(s){var t,r;try{((r=(t=this.activeApp)==null?void 0:t.log)==null?void 0:r.type)!=="cli"&&this.isPlaying&&this.lines&&this.lines.length>1&&this.$nextTick(()=>{var p;console.log("scroll to",this.lines.length-1),(p=this.$refs.scrollerChild)==null||p.scrollToItem(this.lines.length-1)})}catch(p){console.error("Error in videoTime watch:",p)}},50),isFullyLoaded(s){var t,r;s&&(this.renderScrollingLogsSize(),(r=this.$refs.scrollerChild)==null||r.scrollToItem((t=this.activeLines)!=null&&t.length?this.activeLines.length-1:0))}},mounted(){document.addEventListener("resize",this.renderScrollingLogsSize),this.resizeInterval=setInterval(()=>{this.renderScrollingLogsSize()},250)},unmounted(){document.removeEventListener("resize",this.renderScrollingLogsSize),clearInterval(this.resizeInterval)},methods:{searchPrevious(){this.$refs.terminal.findPrevious()}
40,searchNext(){this.$refs.terminal.findNext()},updatedSearchResults({index:s,count:t}){this.searchResultIndex=s,this.searchResultCount=t},manualScroll(){this.$emit("manualScroll")},renderScrollingLogsSize(){var s;this.scrollerHeight=((s=this.$refs.scrollerParent)==null?void 0:s.clientHeight)||300},setActiveApp(s){this.activeApp=s},setActiveLines(s){this.activeLines=this.filterText?s.filter(t=>{var r;return(r=t==null?void 0:t.line)==null?void 0:r.includes(this.filterText)}):s},timeDisplay(s){let t=s;t<0&&(t=0);const r=Nt(t).minutes().toString().padStart(2,0),p=Nt(t).seconds().toString().padStart(2,0);return`${r}:${p}`},setVideoTime(s){this.$emit("setVideoTime",s)}}},Ste={class:"flex flex-1 flex-col h-full"},xte={key:0,class:"w-full mt-32"},Cte={key:1,class:"flex flex-col flex-1"},kte={key:0,class:"p-20 h-full"},Ete={class:"text-center"},Tte={key:1,style:{padding:"0.5rem","border-bottom":"1px solid #1a1a1a"}},Rte={class:"flex gap-2"},Lte={class:"flex-1"},Dte={class:"flex-1"},Ate={key:0,class:"flex gap-2 mt-1.5"},Ite=["placeholder"],Mte=["disabled"],Ote=["disabled"],Pte={class:"flex flex-1 relative",style:{background:"#0a0a0a","border-top":"1px solid #1a1a1a"}},Bte={key:1,ref:"scrollerParent",id:"scrollerParent",class:"absolute left-0 top-0 right-0 bottom-0"},Hte=["onClick"],qte=["innerHTML"];function Fte(s,t,r,p,a,g){var b,d,m,o,l,S,E,L,D,C,I;const v=re("Spinner"),n=re("font-awesome-icon"),c=re("LogSelectorApp"),u=re("LogSelectorLines"),w=re("ChevronLeftIcon"),f=re("ChevronRightIcon"),y=re("Terminal"),x=re("DynamicScrollerItem"),T=re("DynamicScroller");return F(),N("div",Ste,[r.isLoadingLogs?(F(),N("div",xte,[ee(v)])):(F(),N("div",Cte,[r.applicationLogs.length?(F(),N("div",Tte,[R("div",Rte,[R("div",Lte,[r.applicationLogs.length?(F(),Ne(c,{key:0,items:r.applicationLogs,onSelected:g.setActiveApp},null,8,["items","onSelected"])):Q("",!0)]),R("div",Dte,[((d=(b=a.activeApp)==null?void 0:b.lines)==null?void 0:d.length)||((m=a.activeApp)==null?void 0:m.lines)?(F(),Ne(u,{key:0,items:g.groupedLines,onSelected:g.setActiveLines},null,8,["items","onSelected"])):Q("",!0)])]),g.isEmbedded?Q("",!0):(F(),N("div",Ate,[dt(R("input",{type:"text",name:"search","onUpdate:modelValue":t[0]||(t[0]=B=>a.filterText=B),placeholder:((l=(o=a.activeApp)==null?void 0:o.log)==null?void 0:l.type)==="cli"?"Search logs...":"Filter logs...",class:"flex-1 px-2 py-1 text-xs rounded",style:{background:"#1a1a1a",border:"1px solid #2a2a2a",color:"#ddd"}},null,8,Ite),[[Ns,a.filterText,void 0,{trim:!0}]]),((E=(S=a.activeApp)==null?void 0:S.log)==null?void 0:E.type)==="cli"?(F(),N("button",{key:0,class:"px-1.5 py-1 rounded disabled:opacity-30",style:{background:"#2a2a2a",color:"#ddd",border:"1px solid #3a3a3a"},disabled:a.searchResultCount===0||a.searchResultIndex===0,onClick:t[1]||(t[1]=(...B)=>g.searchPrevious&&g.searchPrevious(...B))},[ee(w,{class:"w-3.5 h-3.5"})],8,Mte)):Q("",!0),((D=(L=a.activeApp)==null?void 0:L.log)==null?void 0:D.type)==="cli"?(F(),N("button",{key:1,class:"px-1.5 py-1 rounded disabled:opacity-30",style:{background:"#2a2a2a",color:"#ddd",border:"1px solid #3a3a3a"},disabled:a.searchResultCount===0||a.searchResultIndex===a.searchResultCount-1,onClick:t[2]||(t[2]=(...B)=>g.searchNext&&g.searchNext(...B))},[ee(f,{class:"w-3.5 h-3.5"})],8,Ote)):Q("",!0)]))])):(F(),N("div",kte,[R("div",Ete,[ee(n,{icon:"fa-solid fa-terminal",class:"-ml-0.5 mr-1.5 mx-auto h-12 w-12",style:{color:"#666"},"aria-hidden":"true"}),t[3]||(t[3]=R("h3",{class:"mt-2 text-sm",style:{color:"#888"}}," Attach desktop logs here. ",-1)),t[4]||(t[4]=R("p",{class:"mt-1 text-sm",style:{color:"#666"}},[De(" Configure an "),R("strong",null,"application"),De(" pattern in Dashcam desktop. ")],-1)),t[5]||(t[5]=R("div",{class:"mt-6"},[R("a",{href:"https://docs.dashcam.io/replayable/log-and-error-tracking/getting-started",class:"inline-flex items-center rounded-md px-3 py-2 text-sm text-white shadow-sm",style:{background:"#4caf50"}}," Learn How ")],-1))])])),R("div",Pte,[((I=(C=a.activeApp)==null?void 0:C.log)==null?void 0:I.type)==="cli"?(F(),Ne(y,{key:0,ref:"terminal",items:a.activeLines,time:r.videoTime,"filter-text":a.filterText,onUpdatedResults:g.updatedSearchResults,onSetVideoTime:g.setVideoTime,class:"flex-1 m-2"},null,8,["items","time","filter-text","onUpdatedResults","onSetVideoTime"])):(F(),N("div",Bte,[g.lines?(F(),Ne(T,{key:0,ref:"scrollerChild",items:g.lines,"min-item-size":20,class:"scroller mx-4 font-ibmplexmono",style:qe([{height:`${a.scrollerHeight}px`},{"overflow-y":"auto"}]),onWheel:g.manualScroll},{default:ye(({item:B,index:U,active:z})=>[ee(x,{item:B,active:z,"size-dependencies":[B.html],"data-index":U},{default:ye(()=>[R("div",{class:xe(["p-.5 flex items-start hover:opacity-100 group",{"opacity-90":r.videoTime>B.time,"opacity-60":r.videoTime<B.time}])},[B.displayTime?(F(),N("span",{key:0,class:"select-none text-sm whitespace-nowrap rounded-md cursor-pointer hover:underline shrink-0 mr-2",style:{color:"#888","min-width":"45px"},onClick:q=>g.setVideoTime(B.time)},Z(g.timeDisplay(B.time)),9,Hte)):Q("",!0),R("span",{class:xe(["text-sm flex-1",{"opacity-90":r.videoTime>B.time,"opacity-60":r.videoTime<B.time}]),style:{color:"#aaa"}},[R("span",{innerHTML:s.$sanitize(B.html.replaceAll("<div>","").replaceAll("</div>",""))}
40,null,8,qte)],2)],2)]),_:2},1032,["item","active","size-dependencies","data-index"])]),_:1},8,["items","style","onWheel"])):Q("",!0)],512))])]))])}var Ute=st(wte,[["render",Fte]]);let Yh={};const Ru=new WeakMap,Lu={metric:[{from:0,to:1e3,unit:"B",long:"bytes"},{from:1e3,to:1e6,unit:"kB",long:"kilobytes"},{from:1e6,to:1e9,unit:"MB",long:"megabytes"},{from:1e9,to:1e12,unit:"GB",long:"gigabytes"},{from:1e12,to:1e15,unit:"TB",long:"terabytes"},{from:1e15,to:1e18,unit:"PB",long:"petabytes"},{from:1e18,to:1e21,unit:"EB",long:"exabytes"},{from:1e21,to:1e24,unit:"ZB",long:"zettabytes"},{from:1e24,to:1e27,unit:"YB",long:"yottabytes"}],metric_octet:[{from:0,to:1e3,unit:"o",long:"octets"},{from:1e3,to:1e6,unit:"ko",long:"kilooctets"},{from:1e6,to:1e9,unit:"Mo",long:"megaoctets"},{from:1e9,to:1e12,unit:"Go",long:"gigaoctets"},{from:1e12,to:1e15,unit:"To",long:"teraoctets"},{from:1e15,to:1e18,unit:"Po",long:"petaoctets"},{from:1e18,to:1e21,unit:"Eo",long:"exaoctets"},{from:1e21,to:1e24,unit:"Zo",long:"zettaoctets"},{from:1e24,to:1e27,unit:"Yo",long:"yottaoctets"}],iec:[{from:0,to:Math.pow(1024,1),unit:"B",long:"bytes"},{from:Math.pow(1024,1),to:Math.pow(1024,2),unit:"KiB",long:"kibibytes"},{from:Math.pow(1024,2),to:Math.pow(1024,3),unit:"MiB",long:"mebibytes"},{from:Math.pow(1024,3),to:Math.pow(1024,4),unit:"GiB",long:"gibibytes"},{from:Math.pow(1024,4),to:Math.pow(1024,5),unit:"TiB",long:"tebibytes"},{from:Math.pow(1024,5),to:Math.pow(1024,6),unit:"PiB",long:"pebibytes"},{from:Math.pow(1024,6),to:Math.pow(1024,7),unit:"EiB",long:"exbibytes"},{from:Math.pow(1024,7),to:Math.pow(1024,8),unit:"ZiB",long:"zebibytes"},{from:Math.pow(1024,8),to:Math.pow(1024,9),unit:"YiB",long:"yobibytes"}],iec_octet:[{from:0,to:Math.pow(1024,1),unit:"o",long:"octets"},{from:Math.pow(1024,1),to:Math.pow(1024,2),unit:"Kio",long:"kibioctets"},{from:Math.pow(1024,2),to:Math.pow(1024,3),unit:"Mio",long:"mebioctets"},{from:Math.pow(1024,3),to:Math.pow(1024,4),unit:"Gio",long:"gibioctets"},{from:Math.pow(1024,4),to:Math.pow(1024,5),unit:"Tio",long:"tebioctets"},{from:Math.pow(1024,5),to:Math.pow(1024,6),unit:"Pio",long:"pebioctets"},{from:Math.pow(1024,6),to:Math.pow(1024,7),unit:"Eio",long:"exbioctets"},{from:Math.pow(1024,7),to:Math.pow(1024,8),unit:"Zio",long:"zebioctets"},{from:Math.pow(1024,8),to:Math.pow(1024,9),unit:"Yio",long:"yobioctets"}]};class Nte{constructor(t,r){r=Object.assign({units:"metric",precision:1,locale:void 0},Yh,r),Ru.set(this,r),Object.assign(Lu,r.customUnits);const p=t<0?"-":"";t=Math.abs(t);const a=Lu[r.units];if(a){const g=a.find(v=>t>=v.from&&t<v.to);if(g){const v=new Intl.NumberFormat(r.locale,{style:"decimal",minimumFractionDigits:r.precision,maximumFractionDigits:r.precision}),n=g.from===0?p+t:p+v.format(t/g.from);this.value=n,this.unit=g.unit,this.long=g.long}else this.value=p+t,this.unit="",this.long=""}else throw new Error(`Invalid units specified: ${r.units}`)}toString(){const t=Ru.get(this);return t.toStringFn?t.toStringFn.bind(this)():`${this.value} ${this.unit}`}}function Jh(s,t){return new Nte(s,t)}Jh.defaultOptions=function(s){Yh=s};const $te={components:{Markdown:ly,Tab:q1,TabGroup:B1,TabList:H1,TabPanel:U1,TabPanels:F1,AtSymbolIcon:cy,CodeBracketIcon:oa,LinkIcon:aa},props:{text:String,editing:Boolean,canEdit:Boolean},emits:["save"],data(){return{isEditing:!1,tmpText:""}},computed:{selectedTab(){return this.isEditing?1:0}},mounted(){this.isEditing=this.editing||!this.text,this.tmpText=this.text},methods:{setText(s){this.tmpText=s.target.value},emitSubmit(){this.isEditing=0,this.$emit("save",this.tmpText)},changeTab(s){this.isEditing=s},showEditor(){this.isEditing=1},preserveWhitespace(s){return s.replace(/^\s+/gm,t=>" ".repeat(t.length))}}},Wte={class:"overflow-hidden"},zte=["readonly","value"],Vte={class:"flex justify-between mt-2"},jte={key:0},Kte={key:1},Gte={key:0},Xte={key:1};const Yte={key:0};function Jte(s,t,r,p,a,g){const v=re("Markdown"),n=re("TabPanel"),c=re("TabPanels"),u=re("Tab"),w=re("LinkIcon"),f=re("CodeBracketIcon"),y=re("AtSymbolIcon"),x=re("TabList"),T=re("TabGroup");return F(),N("form",{onSubmit:t[4]||(t[4]=xt((...b)=>
40g.emitSubmit&&g.emitSubmit(...b),["prevent"])),onChange:t[5]||(t[5]=(...b)=>g.changeTab&&g.changeTab(...b))},[R("div",Wte,[R("div",null,[ee(T,{"selected-index":g.selectedTab},{default:ye(()=>[ee(c,{class:"mt-2"},{default:ye(()=>[ee(n,{class:"-m-0.5 rounded-lg"},{default:ye(()=>[r.text?(F(),Ne(v,{key:0,source:g.preserveWhitespace(a.tmpText),linkify:!0,breaks:!0,typographer:!0,class:"font-ibmplexmono prose mx-px mt-px p-2 text-sm leading-5 break-words",style:{color:"#ddd"}},null,8,["source"])):Q("",!0)]),_:1}),ee(n,{class:"p-0.5 -m-0.5 rounded-lg"},{default:ye(()=>[t[6]||(t[6]=R("label",{for:"Markdown",class:"sr-only"},"markdown",-1)),R("div",null,[R("textarea",{readonly:!r.canEdit,rows:"6",name:"Markdown",value:a.tmpText,onChange:t[0]||(t[0]=(...b)=>g.setText&&g.setText(...b)),onKeydown:t[1]||(t[1]=xt(()=>{},["stop"])),id:"Markdown",class:"block font-ibmplexmono w-full h-32 rounded flex-1 outline-none p-2",style:{background:"#1a1a1a",border:"1px solid #2a2a2a",color:"#ddd"},placeholder:"Add your description, stacktrace, or logs. Supports markdown..."},null,40,zte)])]),_:1})]),_:1}),R("div",Vte,[ee(x,{class:"flex items-center"},{default:ye(()=>[ee(u,{onClick:t[2]||(t[2]=b=>a.isEditing=!1),class:"mr-2"},{default:ye(()=>[R("div",{class:xe([a.isEditing?"":"shadow-sm","inline-flex items-center gap-x-1.5 rounded-md py-1.5 px-2.5 text-sm"]),style:qe({background:a.isEditing?"#1a1a1a":"#2a2a2a",color:a.isEditing?"#888":"#fff",border:"1px solid #3a3a3a"})},[r.canEdit?(F(),N("span",jte,"Preview")):Q("",!0),r.canEdit?Q("",!0):(F(),N("span",Kte,"Markdown"))],6)]),_:1}),ee(u,{onClick:t[3]||(t[3]=b=>a.isEditing=!0)},{default:ye(()=>[R("div",{class:xe([a.isEditing?"shadow-sm":"","inline-flex items-center gap-x-1.5 rounded-md py-1.5 px-2.5 text-sm"]),style:qe({background:a.isEditing?"#2a2a2a":"#1a1a1a",color:a.isEditing?"#fff":"#888",border:"1px solid #3a3a3a"})},[r.canEdit?(F(),N("span",Gte,"Edit")):Q("",!0),r.canEdit?Q("",!0):(F(),N("span",Xte,"View Source"))],6)]),_:1}),Q("",!0)]),_:1}),r.canEdit?(F(),N("div",Yte,[...t[10]||(t[10]=[R("div",{class:"flex justify-end"},[R("button",{type:"submit",class:"inline-flex items-center gap-x-1.5 rounded-md py-1.5 px-2.5 text-sm shadow-sm",style:{background:"#2a2a2a",color:"#ddd",border:"1px solid #3a3a3a"}}," Save ")],-1)])])):Q("",!0)])]),_:1},8,["selected-index"])])])],32)}var Zte=st($te,[["render",Jte]]);const Qte={components:{CalendarIcon:uy,FolderIcon:hy,MarkdownEditor:Zte},props:["replay","isLoading","error","isEmbedded","canUpdateReplay","videoTime","videoDuration","errorCount"],emits:["updateReplay"],computed:{shareKeySupplied(){return this.$route.query.share||this.$route.params.shareKey}},methods:{byteSize(...s){return Jh(...s)},dateDisplay(s){return Nt(s).calendar(null,{lastDay:"[Yesterday at] LT",sameDay:"[Today at] LT",lastWeek:"dddd [at] LT",nextWeek:"dddd [at] LT",sameElse:"L"})},formatKey(s){return s.replace(/([A-Z])/g," $1").replace(/_/g," ").replace(/^./,t=>t.toUpperCase()).trim()},filterObject(s){return Object.entries(s||{}).filter(([,t])=>t)}
40,async saveReplayDescription(s){await Cloud.replayUpdate.with({replayId:this.replay.id,replay:{description:s}}).headers({Authorization:`Bearer ${this.$store.state.token}`}).switch({error:t=>{console.error("replayUpdate error",t),t.responseInfo.statusCode===401&&console.error("replayUpdate error. Unauthorized",{err:t}),this.$toast.open({message:"Failed to Update Replay Description",type:"error"})},success:t=>{const r=["description","updatedAt"],p=_.assign(this.replay,_.pick(t,r));this.$emit("updateReplay",p),console.log("Updated Replay",{replay:this.replay})}})}}},ese={class:"env-container"},tse={key:0},sse={key:0},rse={class:"env-section"},ise={class:"section-title"},nse={class:"metadata-grid"},ose={key:0,class:"metadata-item"},ase={class:"metadata-label"},lse=["src"],cse={class:"metadata-value"},use={class:"metadata-item"},hse={class:"metadata-label"},dse={class:"metadata-value"},fse={class:"metadata-item"},pse={class:"metadata-label"},mse={class:"metadata-value"},_se={key:1,class:"metadata-item"},gse={class:"metadata-label"},vse={class:"metadata-value text-red-500"},yse={key:0,class:"env-section"},bse={class:"section-title"},wse={class:"description-content"},Sse={key:1,class:"env-section"},xse={class:"section-title"},Cse={key:0,class:"system-overview"},kse={class:"system-badge"},Ese={class:"badge-content"},Tse={class:"badge-value"},Rse={key:0,class:"badge-meta"},Lse={key:1,class:"badge-tag"},Dse={key:1,class:"spec-table"},Ase={class:"spec-header"},Ise={class:"env-table"},Mse={class:"table-key"},Ose={class:"table-value"},Pse={key:2,class:"spec-table"},Bse={class:"spec-header"},Hse={class:"env-table"},qse={class:"table-key"},Fse={class:"table-value"},Use={key:3,class:"spec-table"},Nse={class:"spec-header"},$se={class:"env-table"},Wse={class:"table-key"},zse={class:"table-value"},Vse={key:4,class:"spec-table"},jse={class:"spec-header"},Kse={class:"graphics-content"},Gse={key:0,class:"graphics-item"},Xse={class:"graphics-key"},Yse={class:"graphics-value"},Jse={key:1},Zse={class:"graphics-subtitle"},Qse={class:"graphics-cards"},ere={class:"graphics-card-header"},tre={class:"env-table compact"},sre={class:"table-key"},rre={class:"table-value"},ire={key:2,class:"env-section"},nre={class:"section-title"},ore={class:"perf-grid"},are={class:"perf-card"},lre={class:"perf-card-header"},cre={class:"env-table compact"},ure={class:"table-value"},hre={class:"table-value"},dre={class:"table-value"},fre={class:"table-value"},pre={class:"perf-card"},mre={class:"perf-card-header"},_re={class:"env-table compact"},gre={class:"table-value"},vre={class:"table-value"},yre={class:"table-value"},bre={class:"perf-card"},wre={class:"perf-card-header"},Sre={class:"env-table compact"},xre={class:"table-value"},Cre={class:"table-value"},kre={class:"table-value"};function Ere(s,t,r,p,a,g){var w,f,y,x,T,b,d;const v=re("font-awesome-icon"),n=re("CalendarIcon"),c=re("FolderIcon"),u=re("MarkdownEditor");return F(),N("div",ese,[r.replay?(F(),N("div",tse,[!r.isLoading&&!r.error?(F(),N("div",sse,[R("div",rse,[R("h3",ise,[ee(v,{icon:"fa-solid fa-circle-info",class:"section-icon"}),t[0]||(t[0]=De(" Replay Information ",-1))]),R("div",nse,[((w=r.replay.user)==null?void 0:w.profile)&&!g.shareKeySupplied?(F(),N("div",ose,[R("div",ase,[R("img",{class:"author-avatar",src:(f=r.replay.user)==null?void 0:f.profile.picture,alt:"Author"},null,8,lse),t[1]||(t[1]=R("span",null,"Author",-1))]),R("div",cse,Z((y=r.replay.user)==null?void 0:y.profile.email),1)])):Q("",!0),R("div",use,[R("div",hse,[ee(n,{class:"metadata-icon"}),t[2]||(t[2]=R("span",null,"Created",-1))]),R("div",dse,Z(g.dateDisplay(r.replay.createdAt)),1)]),R("div",fse,[R("div",pse,[ee(c,{class:"metadata-icon"}),t[3]||(t[3]=R("span",null,"Project",-1))]),R("div",mse,Z((T=(x=r.replay)==null?void 0:x.project)==null?void 0:T.name),1)]),r.errorCount>0?(F(),N("div",_se,[R("div",gse,[ee(v,{icon:"fa-solid fa-bug",class:"metadata-icon"}),t[4]||(t[4]=R("span",null,"Errors",-1))]),R("div",vse,Z(r.errorCount),1)])):Q("",!0)])]),((b=r.replay)==null?void 0:b.description)||r.canUpdateReplay?(F(),N("div",yse,[R("h3",bse,[ee(v,{icon:"fa-brands fa-markdown",class:"section-icon"}),t[5]||(t[5]=De(" Description ",-1))]),R("div",wse,[ee(u,{ref:"description","can-edit":r.canUpdateReplay,text:(d=r.replay)==null?void 0:d.description,onSave:g.saveReplayDescription},null,8,["can-edit","text","onSave"])])])):Q("",!0),r.replay.system?(F(),N("div",Sse,[R("h3",xse,[ee(v,{icon:"fa-solid fa-laptop",class:"section-icon"}),t[6]||(t[6]=De(" System Information ",-1))]),r.replay.system.system?(F(),N("div",Cse,[R("div",kse,[ee(v,{icon:"fa-solid fa-desktop",class:"badge-icon"}),R("div",Ese,[t[7]||(t[7]=R("div",{class:"badge-label"},"Device",-1)),R("div",Tse,Z(r.replay.system.system.manufacturer)+" "+Z(r.replay.system.system.model),1),r.replay.system.system.version?(F(),N("div",Rse,Z(r.replay.system.system.version),1
40)):Q("",!0),r.replay.system.system.virtual?(F(),N("div",Lse," Virtual Machine ")):Q("",!0)])])])):Q("",!0),r.replay.system.osInfo?(F(),N("div",Dse,[R("div",Ase,[ee(v,{icon:"fa-solid fa-hard-drive",class:"spec-icon"}),t[8]||(t[8]=R("span",null,"Operating System",-1))]),R("table",Ise,[R("tbody",null,[(F(!0),N(Me,null,je(g.filterObject(r.replay.system.osInfo),([m,o])=>(F(),N("tr",{key:m},[R("td",Mse,Z(g.formatKey(m)),1),R("td",Ose,Z(o),1)]))),128))])])])):Q("",!0),r.replay.system.cpu?(F(),N("div",Pse,[R("div",Bse,[ee(v,{icon:"fa-solid fa-microchip",class:"spec-icon"}),t[9]||(t[9]=R("span",null,"Processor",-1))]),R("table",Hse,[R("tbody",null,[(F(!0),N(Me,null,je(g.filterObject(r.replay.system.cpu),([m,o])=>(F(),N("tr",{key:m},[R("td",qse,Z(g.formatKey(m)),1),R("td",Fse,Z(o),1)]))),128))])])])):Q("",!0),r.replay.system.mem?(F(),N("div",Use,[R("div",Nse,[ee(v,{icon:"fa-solid fa-memory",class:"spec-icon"}),t[10]||(t[10]=R("span",null,"Memory",-1))]),R("table",$se,[R("tbody",null,[(F(!0),N(Me,null,je(g.filterObject(r.replay.system.mem),([m,o])=>(F(),N("tr",{key:m},[R("td",Wse,Z(g.formatKey(m)),1),R("td",zse,Z(g.byteSize(o).value)+" "+Z(g.byteSize(o).unit),1)]))),128))])])])):Q("",!0),r.replay.system.graphics?(F(),N("div",Vse,[R("div",jse,[ee(v,{icon:"fa-solid fa-display",class:"spec-icon"}),t[11]||(t[11]=R("span",null,"Graphics",-1))]),R("div",Kse,[(F(!0),N(Me,null,je(r.replay.system.graphics,(m,o)=>(F(),N("div",{key:o},[m&&typeof m=="number"?(F(),N("div",Gse,[R("span",Xse,Z(g.formatKey(o))+":",1),R("span",Yse,Z(g.byteSize(m).value)+" "+Z(g.byteSize(m).unit),1)])):Q("",!0),m&&typeof m=="object"?(F(),N("div",Jse,[R("div",Zse,Z(g.formatKey(o)),1),R("div",Qse,[(F(!0),N(Me,null,je(m,(l,S)=>(F(),N("div",{key:S,class:"graphics-card"},[R("div",ere,[ee(v,{icon:"fa-solid fa-microchip"}),De(" GPU "+Z(S+1),1)]),R("table",tre,[R("tbody",null,[(F(!0),N(Me,null,je(l,(E,L)=>(F(),N("tr",{key:L},[R("td",sre,Z(g.formatKey(L)),1),R("td",rre,Z(E),1)]))),128))])])]))),128))])])):Q("",!0)]))),128))])])):Q("",!0)])):Q("",!0),r.replay.performance&&r.replay.performance.summary?(F(),N("div",ire,[R("h3",nre,[ee(v,{icon:"fa-solid fa-gauge-high",class:"section-icon"}),t[12]||(t[12]=De(" Recording Performance ",-1))]),R("div",ore,[R("div",are,[R("div",lre,[ee(v,{icon:"fa-solid fa-microchip",class:"perf-icon"}),t[13]||(t[13]=De(" Process Metrics ",-1))]),R("table",cre,[R("tbody",null,[R("tr",null,[t[14]||(t[14]=R("td",{class:"table-key"},"Avg CPU",-1)),R("td",ure,Z(r.replay.performance.summary.avgProcessCPU.toFixed(1))+"% ",1)]),R("tr",null,[t[15]||(t[15]=R("td",{class:"table-key"},"Max CPU",-1)),R("td",hre,Z(r.replay.performance.summary.maxProcessCPU.toFixed(1))+"% ",1)]),R("tr",null,[t[16]||(t[16]=R("td",{class:"table-key"},"Avg Memory",-1)),R("td",dre,Z(r.replay.performance.summary.avgProcessMemoryMB.toFixed(1))+" MB ",1)]),R("tr",null,[t[17]||(t[17]=R("td",{class:"table-key"},"Max Memory",-1)),R("td",fre,Z(r.replay.performance.summary.maxProcessMemoryMB.toFixed(1))+" MB ",1)])])])]),R("div",pre,[R("div",mre,[ee(v,{icon:"fa-solid fa-server",class:"perf-icon"}),t[18]||(t[18]=De(" System Metrics ",-1))]),R("table",_re,[R("tbody",null,[R("tr",null,[t[19]||(t[19]=R("td",{class:"table-key"},"Avg Memory Usage",-1)),R("td",gre,Z(r.replay.performance.summary.avgSystemMemoryUsagePercent.toFixed(1))+"% ",1)]),R("tr",null,[t[20]||(t[20]=R("td",{class:"table-key"},"Max Memory Usage",-1)),R("td",vre,Z(r.replay.performance.summary.maxSystemMemoryUsagePercent.toFixed(1))+"% ",1)]),R("tr",null,[t[21]||(t[21]=R("td",{class:"table-key"},"Total Memory",-1)),R("td",yre,Z(r.replay.performance.summary.totalSystemMemoryGB.toFixed(2))+" GB ",1)])])])]),R("div",bre,[R("div",wre,[ee(v,{icon:"fa-solid fa-clock",class:"perf-icon"}),t[22]||(t[22]=De(" Tracking Info ",-1))]),R("table",Sre,[R("tbody",null,[R("tr",null,[t[23]||(t[23]=R("td",{class:"table-key"},"Duration",-1)),R("td",xre,Z((r.replay.performance.summary.durationMs/1e3).toFixed(1))+"s ",1)]),R("tr",null,[t[24]||(t[24]=R("td",{class:"table-key"},"Samples",-1)),R("td",Cre,Z(r.replay.performance.summary.sampleCount),1)]),R("tr",null,[t[25]||(t[25]=R("td",{class:"table-key"},"Sample Interval",-1)),R("td",kre,Z(r.replay.performance.summary.monitorInterval)+"ms ",1)])])])])])])):Q("",!0)])):Q("",!0)])):Q("",!0)])}var Tre=st(Qte,[["render",Ere],["__scopeId","data-v-4e9e6364"]]);const Rre=s=>{const t={tabs:{},activeTabs:[]};
40return s.forEach((r,p)=>{var a,g,v,n,c,u;try{const{type:w,time:f,payload:y}=r||{};switch(w){case"INITIAL_TABS":y.forEach(({tabId:b,title:d,url:m,favIconUrl:o})=>{b=b===null?"0":parseInt(b,10),t.tabs[b]||(t.tabs[b]=[{time:0,url:m,title:d,favIconUrl:o,errors:[],logs:[],network:[],spaNavigation:[]}])});break;case"LOG_ERROR":y.type==="error"||y.error?_.last(t.tabs[y.tabId]).errors.push({time:f,error:y.error,type:y.type||"error"}):y.type==="unhandledrejection"&&_.last(t.tabs[y.tabId]).errors.push({time:f,type:y.type,reasonType:y.reasonType,reason:y.reason});break;case"LOG_EVENT":_.last(t.tabs[y.tabId]).logs.push({time:f,method:y.method,arguments:y.arguments});break;case"NETWORK_BEFORE_REQUEST":(g=(a=_.last(t.tabs[y.tabId]))==null?void 0:a.network)==null||g.push({time:f,status:"start",details:y});break;case"NETWORK_COMPLETED_REQUEST":(n=(v=_.last(t.tabs[y.tabId]))==null?void 0:v.network)==null||n.push({time:f,status:"completed",details:y});break;case"NETWORK_RESPONSE_BODY":const x=s.slice(0,p).find(b=>b.payload.requestId===y.requestId&&b.type==="NETWORK_COMPLETED_REQUEST");if(x){x.responseBody=y.responseBody;const b=t.tabs[y.tabId].find(d=>d.network.some(m=>m.status==="completed"&&m.details.requestId===y.requestId));b&&(b.network.find(d=>d.status==="completed"&&d.details.requestId===y.requestId).details.responseBody=y.responseBody)}break;case"NETWORK_ERROR_REQUEST":_.last(t.tabs[y.tabId]).network.push({time:f,status:"error",details:y});break;case"TAB_ACTIVATED":t.activeTabs.length&&(_.last(t.activeTabs).to=f),Object.keys(y).length&&t.activeTabs.push({tabId:y.tabId,from:f}),t.tabs[y.tabId]||(t.tabs[y.tabId]=[{time:f,url:y.url,title:y.title,favIconUrl:y.favIconUrl,errors:[],logs:[],network:[],spaNavigation:[]}]);break;case"SPA_NAVIGATION":(u=(c=_.last(t.tabs[y.tabId]))==null?void 0:c.spaNavigation)==null||u.push({time:f,url:y.url,title:y.title});break;case"NAVIGATION_STARTED":t.tabs[y.tabId]||(t.tabs[y.tabId]=[]),t.tabs[y.tabId].push({time:f,url:y.url,title:y.title,favIconUrl:y.favIconUrl,errors:[],logs:[],network:[],spaNavigation:[]});break;case"NAVIGATION_COMPLETED":const T=_.last(t.tabs[y.tabId]);if(!T||T.url!==y.url)break;T.title=y.title,T.favIconUrl=y.favIconUrl;break;default:console.error("Unrecognized weblogs event",r)}w&&w!=="TAB_ACTIVATED"&&w!=="INITIAL_TABS"&&w!=="NETWORK_RESPONSE_BODY"&&_.last(t.tabs[y.tabId])&&(_.last(t.tabs[y.tabId]).lastActivityTimestamp=f)}catch(w){console.log("Failed processing weblogs event",r.type,{err:w,event:r,result:t})}}),Object.keys(t.tabs).forEach(r=>{if(t.tabs[r]=t.tabs[r].filter(p=>!!p.url),t.tabs[r].length===0&&delete t.tabs[r],t.tabs[r]){const p=t.tabs[r].map(({errors:a,logs:g,network:v,spaNavigation:n})=>a.length+g.length+v.length+n.length).reduce((a,g)=>a+g)!==0;!t.activeTabs.find(a=>a.tabId===r)&&!p&&delete t.tabs[r]}}),t},Lre={props:{tabs:{type:Array,default:()=>[]},selectedTab:{type:Number,default:()=>null},currentTab:{type:Number,default:()=>null},videoTime:{type:Number,default:()=>0}},emits:["tabSelected"],data(){return{erroredFavIconUrls:{}}},computed:{timedTabs(){return this.tabs.map(s=>({id:s.id,..._.findLast(s.sessions,t=>t.time<=this.videoTime)||{}}))}},methods:{selectTab(s){this.$emit("tabSelected",s)},tabIconError(s){this.erroredFavIconUrls[s.favIconUrl]=!0}}},Dre={style:{"border-bottom":"1px solid #1a1a1a"}},Are={class:"flex flex-1 items-center","aria-label":"Tabs"},Ire=["onClick","title","aria-current"],Mre=["src","onError"],Ore={key:1};function Pre(s,t,r,p,a,g){const v=re("font-awesome-icon");return F(),N("div",Dre,[R("nav",Are,[(F(!0),N(Me,null,je(g.timedTabs,n=>(F(),N("span",{key:n.id,onClick:c=>g.selectTab(n),title:n.title,class:"group flex items-center shrink-0 py-1.5 px-2 text-xs cursor-pointer",style:qe({background:r.selectedTab===n.id?"#2a2a2a":"#1a1a1a",borderRight:"1px solid #2a2a2a",color:r.selectedTab===n.id?"#ddd":"#888"}),"aria-current":r.selectedTab===n.id?"page":void 0},[n.favIconUrl&&!a.erroredFavIconUrls[n.favIconUrl]&&n.favIconUrl.indexOf("localhost")==-1?(F(),N("img",{key:0,src:n.favIconUrl,onError:c=>g.tabIconError(n),class:"w-4 h-4 shrink-0"},null,40,Mre)):(F(),N("span",Ore,[ee(v,{class:"w-4 h-4",style:qe({color:r.selectedTab===n.id?"#4caf50":"#666"}),icon:"fa-solid fa-window-maximize"}
40,null,8,["style"])]))],12,Ire))),128))])])}var Bre=st(Lre,[["render",Pre]]);const Hre={components:{XCircleIcon:Gb,ExclamationTriangleIcon:Kb},props:["consoleEvents","videoTime","isPlaying"],emits:["setVideoTime"],data(){return{filterText:""}},computed:{searchTerms(){return this.filterText.split(" ").map(s=>s.trim().toLowerCase()).filter(s=>s.length)},filteredEvents(){return this.consoleEvents.filter(s=>{const t=this.titleText(s).toLowerCase();return this.searchTerms.every(r=>t.includes(r))&&(!this.isPlaying||s.time<=this.videoTime)})}},watch:{filteredEvents(){!this.isPlaying||this.$nextTick(()=>{this.$refs.scrollParent.scrollTop=this.$refs.scrollParent.scrollHeight})}},methods:{manualScroll(){this.$emit("manualScroll")},lineTextClasses(s){var p;const t={LOG_ERROR:"text-red-500",NAVIGATION_STARTED:"text-blue-400",SPA_NAVIGATION:"text-blue-400"},r={warn:"text-yellow-500",error:t.LOG_ERROR};switch(s.type){case"LOG_EVENT":return(p=r[s.payload.method])!=null?p:"";case"LOG_ERROR":case"SPA_NAVIGATION":case"NAVIGATION_STARTED":return t[s.type];default:return console.error(`event of type ${s.type} is not handled by the ConsoleTab.vue component`),""}},lineIcon(s){return s.type==="LOG_ERROR"?"error":s.type!=="LOG_EVENT"?"":["warn","error"].includes(s.payload.method)?s.payload.method:""},lineText(s){if(s.type==="LOG_ERROR"){if(s.payload.type==="error"||s.payload.error)return[`${s.payload.error.message.startsWith("Uncaught Error:")?"":"Uncaught Error: "}${s.payload.error.message||""}`];if(s.payload.type==="unhandledrejection")switch(s.payload.reasonType){case"error":return[`Uncaught (in promise) Error: ${s.payload.reason.message}`];case"string":case"number":case"boolean":case"undefined":case"null":return[`Uncaught (in promise) ${s.payload.reason}`];case"object":return["Uncaught (in promise) ",s.payload.reason];default:return console.error("Unrecognized reason type",s.payload.reasonType,reason),[""]}return console.error("Unrecognized error type",s.payload.error.type),[""]}return s.type==="SPA_NAVIGATION"?[`SPA pushed url: ${s.payload.url}`]:s.type==="NAVIGATION_STARTED"?[`Navigated to url: ${s.payload.url}`]:s.type==="LOG_EVENT"?s.payload.arguments.map(t=>["string","number","boolean","undefined"].includes(typeof t)?`${t}`:t===null?"null":t).reduce((t,r)=>{if(typeof r=="string"){const p=t.pop()||"";typeof p=="string"?t.push(`${p} ${r}`):t.push(p,r)}else t.push(r);return t},[]):[""]},titleText(s){return this.lineText(s).map(t=>typeof t=="string"?t:JSON.stringify(t,null,2)).join(` 41`)},setVideoTime(s){this.$emit("setVideoTime",s)},timeDisplay(s){let t=s;t<0&&(t=0);const r=Nt(t).minutes().toString().padStart(2,0),p=Nt(t).seconds().toString().padStart(2,0);return`${r}:${p}`}}},qre={style:{padding:"0.5rem","border-bottom":"1px solid #1a1a1a"}},Fre={ref:"scrollParent",class:"flex flex-1 min-h-0 flex-col font-ibmplexmono select-text overflow-y-auto",style:{background:"#0a0a0a"}},Ure=["onClick"],Nre=["href","target","title"],$re={class:"flex-1"},Wre=["title"],zre={class:"cursor-pointer",style:{color:"#aaa"}},Vre={style:{background:"#141414",color:"#aaa",padding:"0.5rem","border-radius":"4px",border:"1px solid #2a2a2a"}},jre={class:"json rounded cursor-default"};function Kre(s,t,r,p,a,g){const v=re("XCircleIcon"),n=re("ExclamationTriangleIcon"),c=ah("highlightjs");return F(),N(Me,null,[R("div",qre,[dt(R("input",{type:"text",name:"name","onUpdate:modelValue":t[0]||(t[0]=u=>a.filterText=u),id:"name",class:"block w-full px-2 py-1 text-xs rounded",style:{background:"#1a1a1a",border:"1px solid #2a2a2a",color:"#ddd"},placeholder:"Filter logs..."},null,512),[[Ns,a.filterText]])]),R("div",Fre,[(F(!0),N(Me,null,je(g.filteredEvents,(u,w)=>(F(),N("div",{key:u.time+"_"+w,class:xe(["flex items-start px-2 py-1 hover:opacity-100 group",{"opacity-90":r.videoTime>u.time,"opacity-60":r.videoTime<u.time}]),style:{"border-bottom":"1px solid #1a1a1a"}},[R("span",{class:"select-none text-sm whitespace-nowrap rounded-md cursor-pointer font-ibmplexmono hover:underline",style:{color:"#888","min-width":"45px"},onClick:f=>g.setVideoTime(u.time)},Z(g.timeDisplay(u.time)),9,Ure),R("a",{class:xe([g.lineIcon(u)===""?"pl-2":"py-1","flex flex-1 cursor-pointer items-start break-normal px-2",g.lineTextClasses(u)]),style:{color:"#aaa"},href:u.type==="NAVIGATION_STARTED"||u.type==="SPA_NAVIGATION"?u.payload.url:"#",target:u.type==="NAVIGATION_STARTED"||u.type==="SPA_NAVIGATION"?"_blank":"",title:g.titleText(u)},[g.lineIcon(u)==="error"?(F(),Ne(v,{key:0,class:"text-red-500 w-4 shrink-0 mr-1 mt-0.5"})):Q("",!0),g.lineIcon(u)==="warn"?(F(),Ne(n,{key:1,class:"text-yellow-500 w-4 shrink-0 mr-1 mt-0.5"})):Q("",!0),R("div",$re,[(F(!0),N(Me,null,je(g.lineText(u),f=>(F(),N("div",{key:f},[typeof f!="string"?(F(),N("details",{key:0,class:"inline-block",title:JSON.stringify(f,null,2)},[R("summary",zre,Z(Array.isArray(f)?"Array":"Object"),1),dt((F(),N("pre",Vre,[R("code",jre,Z(JSON.stringify(f,null,2)),1)])),[[c]])],8,Wre)):Q("",!0),De(" "+Z(typeof f=="string"?f:""),1)]))),128))])],10,Nre)],2))),128))],512)],64)}var Gre=st(Hre,[["render",Kre]]);const Du={main_frame:"doc",sub_frame:"doc",stylesheet:"css",script:"js",image:"img",font:"font",object:"",xmlhttprequest:"xhr",ping:"xhr",csp_report:"",media:"media",websocket:"ws",webbundle:"",other:"other"},Au=["documentId","documentLifecycle","frameId","frameType","parentFrameId","requestId","tabId","time","requestHeaders","responseHeaders"],Xre={components:{DialogVue:fn,DialogPanel:ha,DialogTitle:pn,XMarkIcon:ra},props:["networkEvents","videoTime","isPlaying"],emits:["setVideoTime","manualScroll"],data(){return{requestTypes:["all","xhr","js","css","img","media","font","doc","ws","other"],filterText:"",filterType:"all",currentRequest:!1,showCurrentRequest:!1}},computed:{isEmbedded(){return this.$route.query.embed==="true"},searchTerms(){return this.filterText.split(" ").map(s=>s.trim().toLowerCase()).filter(s=>s.length)},consolidatedEvents(){const s=this.networkEvents.reduce((t,r)=>{var a,g;let p;switch(r.type){case"NETWORK_BEFORE_REQUEST":p=_.omit(r.payload,Au),t[r.payload.requestId]={request:{...p,time:r.t
41ime,headers:(a=r.payload.requestHeaders)!=null?a:[]}};break;case"NETWORK_ERROR_REQUEST":case"NETWORK_COMPLETED_REQUEST":if(!t[r.payload.requestId])break;p=_.omit(r.payload,Au),t[r.payload.requestId].response={...p,time:r.time,headers:(g=r.payload.responseHeaders)!=null?g:[]};break;case"NETWORK_RESPONSE_BODY":if(!t[r.payload.requestId])break;t[r.payload.requestId].response.body=r.payload.responseBody;break;default:console.error(`event of type ${r.type} is not handled by the NetworkTab.vue component`);break}return t},{});return Object.values(s).map(t=>{var n,c,u,w,f,y,x;const r=(c=(n=t.response)==null?void 0:n.url)!=null?c:t.request.url;let p=new URL(r).host;const a=new URL(r).pathname.split("/").map(T=>T.trim()).filter(T=>T.length);a.length&&(p=_.last(a));const g=((u=t.response)==null?void 0:u.timeStamp)||null,v=(f=(w=t.response)==null?void 0:w.type)!=null?f:t.request.type;return{...t,url:r,name:p,from:t.request.time,to:(x=(y=t.response)==null?void 0:y.time)!=null?x:null,initiator:t.request.initiator,requestId:t.request.requestId,type:v==="main_frame"?"document":v,duration:g?g-t.request.timeStamp:null}}).sort((t,r)=>t.from-r.from)},filteredEvents(){return this.consolidatedEvents.filter(s=>this.searchTerms.every(t=>s.url.toLowerCase().includes(t))&&(this.filterType==="all"||Du[s.type]===this.filterType)&&(!this.isPlaying||s.from<=this.videoTime))}},methods:{selectType(s){this.filterType=s},setVideoTime(s){this.$emit("setVideoTime",s)},focusCurrentRequest(s){this.currentRequest=s,this.showCurrentRequest=!0},timeDisplay(s){let t=s;t<0&&(t=0);const r=Nt(t).minutes().toString().padStart(2,0),p=Nt(t).seconds().toString().padStart(2,0);return`${r}:${p}`},formatBody(s){if(!s)return"";if(typeof s=="object")return JSON.stringify(s,null,2);try{const t=JSON.parse(s);return JSON.stringify(t,null,2)}catch{return s}},getStatusColor(s){return s?s>=200&&s<300?"#4caf50":s>=300&&s<400?"#2196f3":s>=400&&s<500?"#ff9800":s>=500?"#f44336":"#888":"#888"},getTypeColor(s){const t=Du[s]||s;return{js:"#f7df1e",css:"#264de4",img:"#4caf50",xhr:"#e91e63",font:"#9c27b0",doc:"#ff5722",media:"#00bcd4",ws:"#8bc34a",other:"#888"}[t]||"#888"}}},Yre={class:"fixed inset-0"},Jre={class:"absolute inset-0"},Zre={class:"pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10 sm:pl-16"},Qre={class:"flex h-full flex-col overflow-y-auto py-6 shadow-xl",style:{background:"#141414","border-left":"1px solid #2a2a2a"}},eie={class:"px-4 sm:px-6"},tie={class:"flex items-start justify-between"},sie={class:"ml-3 flex h-7 items-center"},rie={class:"relative mt-6 px-4 sm:px-6 font-ibmplexmono"},iie={class:"mb-4"},nie={class:"text-xs break-all",style:{background:"#0a0a0a",color:"#aaa",padding:"0.75rem","border-radius":"4px",border:"1px solid #2a2a2a"}},oie={class:"mb-4"},aie={class:"text-xs",style:{background:"#0a0a0a",color:"#aaa",padding:"0.75rem","border-radius":"4px",border:"1px solid #2a2a2a"}},lie={key:0,class:"mb-4"},cie={style:{background:"#0a0a0a","border-radius":"4px",border:"1px solid #2a2a2a",overflow:"hidden"}},uie={class:"px-3 py-2",style:{color:"#888","min-width":"200px",background:"#050505"}},hie={class:"px-3 py-2 break-all flex-1",style:{color:"#aaa"}},die={key:1,class:"mb-4"},fie={style:{background:"#0a0a0a",color:"#aaa",padding:"0.75rem","border-radius":"4px",border:"1px solid #2a2a2a","overflow-x":"auto"}},pie={class:"json"},mie={key:0,class:"relative mt-6 px-4 sm:px-6 font-ibmplexmono"},_ie={class:"mb-4"},gie={class:"text-xs",style:{background:"#0a0a0a",padding:"0.75rem","border-radius":"4px",border:"1px solid #2a2a2a"}},vie={key:0,style:{color:"#888"}},yie={key:0,class:"mb-4"},bie={style:{background:"#0a0a0a","border-radius":"4px",border:"1px solid #2a2a2a",overflow:"hidden"}},wie={class:"px-3 py-2",style:{color:"#888","min-width":"200px",background:"#050505"}},Sie={class:"px-3 py-2 break-all flex-1",style:{color:"#aaa"}},xie={key:1,class:"mb-4"},Cie={style:{background:"#0a0a0a",color:"#aaa",padding:"0.75rem","border-radius":"4px",border:"1px solid #2a2a2a","overflow-x":"auto"}},kie={class:"json"},Eie={class:"flex flex-col flex-1 min-h-0"},Tie={key:0,class:"flex items-center justify-between",style:{padding:"0.5rem","border-bottom":"1px solid #1a1a1a"}},Rie={class:"flex-1"},Lie={class:"space-x-3 xl:block hidden mx-2 font-ibmplexmono"},Die=["onClick"],Aie={class:"flex grow overflow-y-auto p-2",style:{background:"#0a0a0a"}},Iie={class:"min-w-full font-ibmplexmono",style:{"border-collapse":"separate","border-spacing":"0"}},Mie=["onClick","title"],Oie={class:"whitespace-nowrap px-1 py-2 text-xs"},Pie=["onClick"],Bie=["onClick"],Hie={class:"whitespace-nowrap px-3 py-2 text-xs",style:{color:"#888"}},qie={class:"whitespace-nowrap px-3 py-2 text-xs",style:{color:"#888"}},Fie={class:"whitespace-nowrap px-3 py-2 text-xs text-end",style:{color:"#888"}};function Uie(s,t,r,p,a,g){const v=re("DialogTitle"),n=re("XMarkIcon"),
41c=re("DialogPanel"),u=re("DialogVue"),w=ah("highlightjs");return F(),N(Me,null,[ee(u,{as:"div",class:"relative z-10",onClose:t[1]||(t[1]=f=>a.showCurrentRequest=!1),open:a.showCurrentRequest},{default:ye(()=>[t[14]||(t[14]=R("div",{class:"fixed inset-0"},null,-1)),R("div",Yre,[R("div",Jre,[R("div",Zre,[ee(c,{class:"pointer-events-auto w-screen max-w-2xl"},{default:ye(()=>[R("div",Qre,[R("div",eie,[R("div",tie,[ee(v,{class:"text-lg",style:{color:"#ddd"}},{default:ye(()=>[...t[3]||(t[3]=[De("Request Information",-1)])]),_:1}),R("div",sie,[R("button",{type:"button",class:"rounded-md hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-lime-500 focus:ring-offset-2",style:{color:"#888"},onClick:t[0]||(t[0]=f=>a.showCurrentRequest=!1)},[t[4]||(t[4]=R("span",{class:"sr-only"},"Close panel",-1)),ee(n,{class:"h-6 w-6","aria-hidden":"true"})])])])]),R("div",rie,[t[9]||(t[9]=R("h3",{class:"text-sm mb-3",style:{color:"#4caf50"}}," Request ",-1)),R("div",iie,[t[5]||(t[5]=R("div",{class:"text-xs mb-1",style:{color:"#888"}}," URL ",-1)),R("div",nie,Z(a.currentRequest.request.url),1)]),R("div",oie,[t[6]||(t[6]=R("div",{class:"text-xs mb-1",style:{color:"#888"}}," Method ",-1)),R("div",aie,Z(a.currentRequest.request.method||"GET"),1)]),a.currentRequest.request.headers&&a.currentRequest.request.headers.length?(F(),N("div",lie,[t[7]||(t[7]=R("div",{class:"text-xs mb-1",style:{color:"#888"}}," Headers ",-1)),R("div",cie,[(F(!0),N(Me,null,je(a.currentRequest.request.headers,(f,y)=>(F(),N("div",{key:y,class:"flex text-xs border-b border-[#2a2a2a] last:border-b-0"},[R("div",uie,Z(f.name),1),R("div",hie,Z(f.value),1)]))),128))])])):Q("",!0),a.currentRequest.request.requestBody?(F(),N("div",die,[t[8]||(t[8]=R("div",{class:"text-xs mb-1",style:{color:"#888"}}," Request Body ",-1)),dt((F(),N("pre",fie,[R("code",pie,Z(g.formatBody(a.currentRequest.request.requestBody)),1)])),[[w]])])):Q("",!0)]),a.currentRequest.response?(F(),N("div",mie,[t[13]||(t[13]=R("h3",{class:"text-sm mb-3",style:{color:"#4caf50"}}," Response ",-1)),R("div",_ie,[t[10]||(t[10]=R("div",{class:"text-xs mb-1",style:{color:"#888"}}," Status ",-1)),R("div",gie,[R("span",{style:qe({color:g.getStatusColor(a.currentRequest.response.statusCode)})},Z(a.currentRequest.response.statusCode),5),a.currentRequest.response.statusLine?(F(),N("span",vie,Z(" - "+a.currentRequest.response.statusLine),1)):Q("",!0)])]),a.currentRequest.response.headers&&a.currentRequest.response.headers.length?(F(),N("div",yie,[t[11]||(t[11]=R("div",{class:"text-xs mb-1",style:{color:"#888"}}," Headers ",-1)),R("div",bie,[(F(!0),N(Me,null,je(a.currentRequest.response.headers,(f,y)=>(F(),N("div",{key:y,class:"flex text-xs border-b border-[#2a2a2a] last:border-b-0"},[R("div",wie,Z(f.name),1),R("div",Sie,Z(f.value),1)]))),128))])])):Q("",!0),a.currentRequest.response.body?(F(),N("div",xie,[t[12]||(t[12]=R("div",{class:"text-xs mb-1",style:{color:"#888"}}," Response Body ",-1)),dt((F(),N("pre",Cie,[R("code",kie,Z(g.formatBody(a.currentRequest.response.body)),1)])),[[w]])])):Q("",!0)])):Q("",!0)])]),_:1})])])])]),_:1},8,["open"]),R("div",Eie,[g.isEmbedded?Q("",!0):(F(),N("div",Tie,[R("div",Rie,[dt(R("input",{type:"text",name:"name","onUpdate:modelValue":t[2]||(t[2]=f=>a.filterText=f),id:"name",class:"block w-full px-2 py-1 text-xs rounded",style:{background:"#1a1a1a",border:"1px solid #2a2a2a",color:"#ddd"},placeholder:"Filter requests..."},null,512),[[Ns,a.filterText]])]),R("div",Lie,[(F(!0),N(Me,null,je(a.requestTypes,f=>(F(),N("a",{key:f,onClick:xt(y=>g.selectType(f),["prevent"]),class:xe([a.filterType===f?"border-b font-bold":"","text-xs cursor-pointer select-none"]),style:qe({borderBottomColor:a.filterType===f?"#4caf50":"transparent",color:a.filterType===f?"#4caf50":"#888"})},Z(f),15,Die))),128))])])),R("div",Aie,[R("table",Iie,[t[15]||(t[15]=R("thead",{style:{position:"sticky",top:"0",background:"#0a0a0a","z-index":"1"}},[R("tr",{style:{"border-bottom":"1px solid #1a1a1a"}},[R("th",{scope:"col",class:"py-2 pl-4 pr-3 text-left text-xs sm:pl-0",style:{color:"#888"}}," Time "),R("th",{scope:"col",class:"py-2 pl-4 pr-3 text-left text-xs sm:pl-0",style:{color:"#888"}}," Name "),R("th",{scope:"col",class:"px-3 py-2 text-left text-xs",style:{color:"#888"}}," Status "),R("th",{scope:"col",class:"px-3 py-2 text-left text-xs",style:{color:"#888"}}," Type "),R("th",{scope:"col",class:"px-3 py-2 text-left text-xs",style:{color:"#888"}}," Initiator "),R("th",{scope:"col",class:"px-3 py-2 text-left text-xs",style:{color:"#888"}}," MS ")])],-1)),R("tbody",null,[(F(!0),N(Me,null,je(g.filteredEvents,f=>{var y,x,T;return F(),N("tr",{key:f.requestId,onClick:b=>g.focusCurrentRequest(f),title:f.url,class:xe(["cursor-pointer group",{"opacity-90":f.from<=r.videoTime,"opacity-60":f.from>r.videoTime}]),style:{"border-bottom":"1px solid #1a1a1a"}},[R("td",Oie,[R("span",{class:"select-none whitespace-nowrap rounded-md cursor-pointer font-ibmplexmono hover:underline",style:{color:"#888"},onClick:b=>g.setVideoTime(f.from)},Z(g.timeDisplay(f.from)),9,Pie)]),R("td",{class:"group-hover:underline whitespace-nowrap py-2 pl-4 pr-3 text-xs sm:pl-0 overflow-hidden text-ellipsis cursor-pointer",style:qe({maxWidth:"200px",color:g.getTypeColor(f.type)}),onClick:b=>g.focusCurrentRequest(f)},Z(f.name),13,Bie),R("td",Hie,Z(r.isPlaying?f.to<=r.videoTime&&((x=f.response)==null?void 0:x.statusCode)?(T=f.response)==null?void 0:T.statusCode:"":(y=f.response)==null?void 0:y.statusCode),1),R("td",{class:"whitespace-nowrap px-3 py-2 text-xs",style:qe({color:g.getTypeColor(f.type)})},Z(f.type),5),R("td",qie,Z(f.initiator),1),R("td",Fie,Z(r.isPlaying?f.from>r.videoTime?"":f.to<=r.videoTime&&f.duration!==null?Math.round(f.duration):"Pending":f.duration!==null?Math.round(f.duration):"Pending"),1)],10,Mie)}),128))])])])])],64)}var Nie=st(Xre,[["render",Uie]]);const $ie={components:{Spinner:la,LogSelectorTabs:Bre,ConsoleTab:Gre,NetworkTab:Nie},props:["webLogs","videoTime","isLoadingLogs","isPlaying"],emits:["setVideoTime","manualScroll"],data(){return{displayCategory:"console",selectedTab:null}},computed:{processedLogs(){return this.webLogs?Rre(this.webLogs.lines):null},tabs(){return this.processedLogs?Object.entries(this.processedLogs.tabs).map(([s,t])=>({id:parseInt(s,10),sessions:t})).sort((s,t)=>{var r,p,a,g;return((p=(r=this.processedLogs.activeTabs.find(v=>v.tabId===s.id))==null?void 0:r.from)!=null?p:0)-((g=(a=this.processedLogs.activeTabs.find(v=>v.tabId===t.id))==null?void 0:a.from)!=null?g:0)}):[]},currentTab(){var t,r,p;const s=(r=(t=this.processedLogs)==null?void 0:t.activeTabs)==null?void 0:r.find(a=>{var g,v;return((g=a.from)!=null?g:-1/0)<=this.videoTime&&((v=a.to)!=null?v:1/0)>=this.videoTime});return(p=s==null?void 0:s.tabId)!=null?p:null},consoleEvents(){var s,t,r;return(s=this.webLogs)!=null&&s.lines?(r=(t=this.webLogs)==null?void 0:t.lines)==null?void 0:r.filter(p=>["LOG_EVENT","LOG_ERROR","NAVIGATION_STARTED","SPA_NAVIGATION"].includes(p.type)&&p.payload.tabId===this.selectedTab):[]},networkEvents(){var s,t,r;return(s=this.webLogs)!=null&&s.lines?(r=(t=this.webLogs)==null?void 0:t.lines)==null?void 0:r.filter(p=>p.type.startsWith("NETWORK_")&&p.payload.tabId===this.selectedTab):[]}},watch:{tabs(s){var t,r;s.find(p=>p.id===this.selectedTab)||(this.selectedTab=(r=(t=s[0])==null?void 0:t.id)!=null?r:null)}},mounted(){var s,t,r;(s=this.tabs)!=null&&s.length&&(this.selectedTab=(r=(t=this.tabs[0])==null?void 0:t.id)!=null?r:null)},methods:{manualScroll(){this.$emit("manualScroll")},setVideoTime(s){this.$emit("setVideoTime",s)},setActiveTab(s){this.selectedTab=s.id}}},Wie={key:0,class:"w-full mt-32"},zie={key:1,class:"flex flex-col min-h-0"},Vie={key:0,class:"p-20"},jie={class:"text-center"},Kie={key:1,class:"pb-0 min-h-0 flex flex-col"},Gie={style:{"border-bottom":"1px solid #2a2a2a"}},Xie={class:"cursor-pointer select-none"},Yie={style:{background:"#141414"},"aria-label":"Tabs"},Jie={class:"flex-1 min-h-0 flex flex-col"};function Zie(s,t,r,p,a,g){const v=re("Spinner"),n=re("font-awesome-icon"),c=re("LogSelectorTabs"),u=re("ConsoleTab"),w=re("NetworkTab");return F(),N("div",{class:"flex flex-1 flex-col min-h-0",onWheel:t[2]||(t[2]=(...f)=>g.manualScroll&&g.manualScroll(...f))},[r.isLoadingLogs?(F(),N("div",Wie,[ee(v)])):(F(),N("div",zie,[g.tabs.length?(F(),N("div",Kie,[g.tabs.length?(F(),Ne(c,{key:0,class:"cursor-pointer",tabs:g.tabs,"video-time":r.videoTime,"selected-tab":a.selectedTab,"current-tab":g.currentTab,onTabSelected:g.setActiveTab},null,8,["tabs","video-time","selected-tab","current-tab","onTabSelected"])):Q("",!0),R("div",Gie,[R("div",Xie,[R("nav",Yie,[R("span",{onClick:t[0]||(t[0]=f=>a.displayCategory="console"),class:xe(["group inline-flex items-center border-b-2 xl:py-4 xl:px-4 h-12 px-4 text-sm cursor-pointer border-r"]),style:qe({borderBottomColor:a.displayCategory=="console"?"#4caf50":"transparent",color:a.displayCategory=="console"?"#fff":"#888",borderRightColor:"#2a2a2a"})},[ee(n,{icon:"fa-solid fa-terminal",class:"-ml-0.5 mr-2 h-5 w-5",style:qe({color:a.displayCategory=="console"?"#4caf50":"#666"}),"aria-hidden":"true"},null,8,["style"]),t[6]||(t[6]=R("span",null,"Console",-1))],4),R("span",{onClick:t[1]||(t[1]=f=>a.displayCategory="network"),class:xe(["group inline-flex items-center border-b-2 xl:py-4 xl:px-4 h-12 px-4 text-sm cursor-pointer border-r"]),style:qe({borderBottomColor:a.displayCategory=="network"?"#4caf50":"transparent",color:a.displayCategory=="network"?"#fff":"#888",borderRightColor:"#2a2a2a"})},[ee(n,{icon:"fa-solid fa-network-wired",class:"-ml-0.5 mr-2 h-5 w-5",style:qe({color:a.displayCategory=="network"?"#4caf50":"#666"}),"aria-hidden":"true"}
41,null,8,["style"]),t[7]||(t[7]=R("span",null,"Network",-1))],4)])])]),R("div",Jie,[a.displayCategory==="console"?(F(),Ne(u,{key:0,"console-events":g.consoleEvents,"video-time":r.videoTime,"is-playing":r.isPlaying,onSetVideoTime:g.setVideoTime},null,8,["console-events","video-time","is-playing","onSetVideoTime"])):Q("",!0),a.displayCategory==="network"?(F(),Ne(w,{key:1,"network-events":g.networkEvents,"video-time":r.videoTime,"is-playing":r.isPlaying,onSetVideoTime:g.setVideoTime},null,8,["network-events","video-time","is-playing","onSetVideoTime"])):Q("",!0)])])):(F(),N("div",Vie,[R("div",jie,[ee(n,{icon:"fa-solid fa-window-maximize",class:"-ml-0.5 mr-1.5 mx-auto h-12 w-12",style:{color:"#666"},"aria-hidden":"true"}),t[3]||(t[3]=R("h3",{class:"mt-2 text-sm",style:{color:"#888"}}," Attach console logs and network requests here. ",-1)),t[4]||(t[4]=R("p",{class:"mt-1 text-sm",style:{color:"#666"}},[De(" Install the Dashcam Browser Extension and configure a "),R("strong",null,"web"),De(" pattern. ")],-1)),t[5]||(t[5]=R("div",{class:"mt-6"},[R("a",{href:"https://docs.dashcam.io/replayable/integrations/installation",class:"inline-flex items-center rounded-md px-3 py-2 text-sm text-white shadow-sm",style:{background:"#4caf50"}}," Learn How ")],-1))])]))]))],32)}var Qie=st($ie,[["render",Zie]]);const ene={components:{Listbox:Ch,ListboxButton:kh,ListboxLabel:I1,ListboxOption:Th,ListboxOptions:Eh,CheckIcon:Iy,ChevronUpDownIcon:jb},props:["label","options","selectedId","selectorClass"],emits:["option-selected"],data(){return{selectedOption:null}},computed:{},watch:{selectedOption(s){s&&this.$emit("option-selected",s.id)}},async mounted(){this.selectedId&&(this.selectedOption=this.options.find(s=>s.id===this.selectedId)),this.selectedOption||([this.selectedOption]=this.options)}},tne={class:"block truncate"},sne={class:"pointer-events-none absolute inset-y-0 right-0 ml-3 flex items-center pr-2"};function rne(s,t,r,p,a,g){const v=re("ListboxLabel"),n=re("ChevronUpDownIcon"),c=re("ListboxButton"),u=re("CheckIcon"),w=re("ListboxOption"),f=re("ListboxOptions"),y=re("Listbox");return a.selectedOption?(F(),Ne(y,{key:0,as:"div",modelValue:a.selectedOption,"onUpdate:modelValue":t[0]||(t[0]=x=>a.selectedOption=x)},{default:ye(()=>[ee(v,{class:"block text-sm text-gray-600 mr-4"},{default:ye(()=>[De(Z(r.label),1)]),_:1}),R("div",{class:xe(r.selectorClass||"relative w-40")},[ee(c,{class:"relative w-full cursor-default rounded-md bg-white py-1.5 pl-3 pr-10 text-left text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 focus:outline-none focus:ring-2 focus:ring-lime-500 sm:text-sm sm:leading-6"},{default:ye(()=>[R("span",tne,Z(a.selectedOption.name),1),R("span",sne,[ee(n,{class:"h-5 w-5 text-gray-400","aria-hidden":"true"})])]),_:1}),ee(Dr,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:ye(()=>[ee(f,{class:"absolute z-10 mt-1 max-h-56 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm"},{default:ye(()=>[(F(!0),N(Me,null,je(r.options,x=>(F(),Ne(w,{as:"template",key:x.id,value:x},{default:ye(({active:T,selected:b})=>[R("li",{class:xe([T?"bg-lime-600 text-white":"text-gray-900","relative cursor-default select-none py-2 pl-3 pr-9"])},[R("span",{class:xe([b?"":"font-normal","block truncate"])},Z(x.name),3),b?(F(),N("span",{key:0,class:xe([T?"text-white":"text-lime-600","absolute inset-y-0 right-0 flex items-center pr-4"])},[ee(u,{class:"h-5 w-5","aria-hidden":"true"})],2)):Q("",!0)],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})],2)]),_:1},8,["modelValue"])):Q("",!0)}var ine=st(ene,[["render",rne]]);const nne={components:{MenuVue:fa,MenuButton:pa,MenuItem:ma,MenuItems:_a,ChevronDownIcon:ia,ChevronRightIcon:na,LinkIcon:aa,CodeBracketIcon:oa},emits:["copy-link"],data(){return{copyModes:[{id:"markdown",name:"Markdown",children:[{id:"gif",name:"GIF"},{id:"image",name:"Image"}]},{id:"html",name:"HTML",children:[{id:"embed",name:"iFrame"},{id:"image",name:"Image"}]}]}},methods:{copyLink(){console.log("copy link"),this.$emit("copy-link",{name:"link",id:"link",parentId:"link"})},copyEmbed(s,t){console.log("copy link",s,t);const r=s.name+(t?`/${t.name}`:"");this.$emit("copy-link",{name:r,parentId:s.id,childId:t==null?void 0:t.id})}}},one={class:"py-1"},ane={class:"relative cursor-pointer"},lne=["onClick"],cne={class:"py-1"},une={class:"relative cursor-pointer"},hne=["onClick"];function dne(s,t,r,p,a,g){const v=re("LinkIcon"),n=re("MenuButton"),c=re("CodeBracketIcon"),u=re("ChevronDownIcon"),w=re("ChevronRightIcon"),f=re("MenuItem"),y=re("MenuItems"),x=re("MenuVue");return F(),N(Me,null,[ee(n,{onClick:t[0]||(t[0]=T=>g.copyLink()),class:"mr-2 relative inline-flex items-center justify-between px-2 py-2 rounded-md text-sm bg-lime-600 hover:bg-lime-700 focus:ring-2 focus:ring-offset-2 focus:ring-lime-500 text-white"},{default:ye(()=>[ee(v,{class:"mr-2 h-5 w-5"}),t[1]||(t[1]=De(" Copy Link ",-1))]),_:1}),ee(x,{as:"span",class:"-mr-px relative block"},{default:ye(()=>[ee(n,{class:"relative inline-flex items-center justify-between px-2 py-2 rounded-md text-sm bg-lime-600 hover:bg-lime-700 focus:ring-2 focus:ring-offset-2 focus:ring-lime-500 text-white"},{default:ye(()=>[ee(c,{class:"h-5 w-5 text-white mr-2"}
41),t[2]||(t[2]=De(" Embed ",-1)),ee(u,{class:"h-5 w-5 text-white","aria-hidden":"true"})]),_:1}),ee(Dr,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:ye(()=>[ee(y,{class:"mt-10 top-0 absolute left-1 -ml-1 w-32 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:ye(()=>[R("div",one,[(F(!0),N(Me,null,je(a.copyModes,T=>(F(),Ne(f,{key:T.id},{default:ye(({active:b})=>[R("div",ane,[T.children?(F(),Ne(x,{key:1,as:"span",class:"-mr-px relative block"},{default:ye(()=>[ee(n,{class:"w-full hover:bg-gray-300 hover:text-gray-800 flex items-center justify-between text-gray-700 px-4 py-2 text-sm"},{default:ye(()=>[De(Z(T.name)+" ",1),ee(w,{class:"h-5 w-5 text-gray-400","aria-hidden":"true"})]),_:2},1024),dt(ee(y,{static:"",class:"top-0 left-32 absolute w-32 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:ye(()=>[R("div",cne,[(F(!0),N(Me,null,je(T.children,d=>(F(),Ne(f,{key:d.id},{default:ye(()=>[R("div",une,[R("a",{class:"hover:bg-gray-300 hover:text-gray-800 flex items-center justify-between text-gray-700 px-4 py-2 text-sm",onClick:m=>g.copyEmbed(T,d)},Z(d.name),9,hne)])]),_:2},1024))),128))])]),_:2},1536),[[rr,b]])]),_:2},1024)):(F(),N("a",{key:0,class:"hover:bg-gray-300 hover:text-gray-800 flex items-center justify-between text-gray-700 px-4 py-2 text-sm",onClick:d=>g.copyEmbed(T)},Z(T.name),9,lne))])]),_:2},1024))),128))])]),_:1})]),_:1})]),_:1})],64)}var fne=st(nne,[["render",dne]]);const pne={props:{dark:{type:Boolean,default:!1}}},mne={class:"loader w-full"};function _ne(s,t,r,p,a,g){return F(),N("div",mne,[...t[0]||(t[0]=[R("div",{class:"loaderBar"},null,-1)])])}var gne=st(pne,[["render",_ne],["__scopeId","data-v-619d23b1"]]);const vne={components:{MenuVue:fa,MenuButton:pa,MenuItem:ma,MenuItems:_a,ChevronDownIcon:ia,LinkIcon:aa,BookOpenIcon:dy,CodeBracketIcon:oa,UserCircleIcon:fy,TrashIcon:py,Selector:ine,ReplayCopyDropdown:fne,BarLoader:gne},props:{canUpdateReplay:{type:Boolean,required:!0},activeAccessOption:{type:String,required:!0},replayId:{type:String,default:null},accessInvites:{type:Array,default:()=>[]}},emits:["copy-link","access-option-selected","invite-member","replay-updated"],data(){return{accessOptions:[{id:"team",name:"My Team"},{id:"unlisted",name:"Anyone with the link"}],inviteEmail:"",inviteEmailError:!1,copyMode:{parentId:"link",name:"Link"},isLoading:!1}},computed:{},mounted(){this.$route.query.invitee&&(this.$refs.menuButton.$el.click(),this.inviteUserForAccess(this.$route.query.invitee))},methods:{accessOptionSelected(s){this.$emit("access-option-selected",s)},copyLink(s){this.$emit("copy-link",s)},async inviteUserForAccess(s){if(!s){this.inviteEmailError="Email is required";return}if(!/^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/.test(s)){this.inviteEmailError="Email is invalid";return}this.isLoading=!0,this.inviteEmailError="";const t=await Cloud.replayAccessInvite({replayId:this.replayId,email:s}).headers({Authorization:`Bearer ${this.$store.state.token}`}).tolerate(r=>{console.error(r)});t&&(this.$toast.success(`${s} was invited to access this replay`),this.$emit("replay-updated",{replay:t,fields:["accessInvites"]}),this.inviteEmail=""),this.isLoading=!1},async deleteAccessInvite(s){if(!s){this.inviteEmailError="Email is required";return}if(!/^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/.test(s)){this.inviteEmailError="Email is invalid";return}this.isLoading=!0,this.inviteEmailError="";const t=await Cloud.replayAccessDelete({replayId:this.replayId,email:s}).headers({Authorization:`Bearer ${this.$store.state.token}`}).tolerate(r=>{console.error(r)});this.$toast.success(`${s} was deleted from replay access`),t&&(this.$emit("replay-updated",{replay:t,fields:["accessInvites"]}),this.inviteEmail=""),this.isLoading=!1}}},yne={key:0,class:"mb-6"},bne={class:"flex items-center justify-between"},wne={key:0,class:"text-red-500 text-xs italic pt-2"},Sne={key:1,class:"mb-4 text-sm",style:{color:"#ddd"}},xne={class:"divide-y",style:{"border-color":"#2a2a2a"}},Cne={class:"flex items-center"},kne=["onClick"],Ene={class:"flex items-center justify-between mt-6"},Tne={class:"flex items-center"};function Rne(s,t,r,p,a,g){const v=re("LinkIcon"),n=re("ChevronDownIcon"),c=re("MenuButton"),u=re("BarLoader"),w=re("UserCircleIcon"),f=re("TrashIcon"),y=re("Selector"),x=re("ReplayCopyDropdown"),T=re("MenuItems"),b=re("MenuVue");return F(),Ne(b,{as:"div",class:"relative inline-block text-left z-10"},{default:ye(()=>[R("div",null,[ee(c,{ref:"menuButton",class:"inline-flex items-center gap-2 rounded px-3 py-1.5 text-sm",style:{background:"#2a2a2a",color:"#ddd",border:"1px solid #3a3a3a"}},{default:ye(()=>[ee(v,{class:"h-4 w-4"}),t[2]||(t[2]=De(" Share ",-1)),ee(n,{class:"h-4 w-4","aria-hidden":"true"})]),_:1},512)]),ee(Dr,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:ye(()=>[ee(T,{style:{width:"500px",background:"#1a1a1a",border:"1px solid #2a2a2a"},class:"origin-top-right absolute right-0 mt-2 rounded shadow-lg focus:outline-none"},{default:ye(()=>{var d;return[a.isLoading?(F(),Ne(u,{key:0})):Q("",!0),R("div",{class:xe(["p-4 rounded",{"pointer-events-none":a.isLoading}])},[t[5]||(t[5]=R("div",{class:"mb-6"},[R("label",{class:"text-base",style:{color:"#fff"}}," Share this Dash ")],-1)),r.canUpdateReplay?(F(),N("div",yne,[t[3]||(t[3]=R("label",{id:"headlessui-listbox-label-232","data-headlessui-state":"",class:"block text-sm mb-2",style:{color:"#888"}},"Add People",-1)),R("div",bne,[dt(R("input",{placeholder:"Email Address",required:"","onUpdate:modelValue":t[0]||(t[0]=m=>a.inviteEmail=m),type:"email",name:"invite-email",id:"invite-email",class:xe([{"border-red-500":a.inviteEmailError},"block w-full rounded text-sm mr-2"]),style:{background:"#0a0a0a",border:"1px solid #2a2a2a",color:"#ddd",padding:"0.5rem"}},null,2),[[Ns,a.inviteEmail]]),R("button",{onClick:t[1]||(t[1]=m=>g.inviteUserForAccess(a.inviteEmail)),type:"button",class:"inline-flex items-center px-3 py-2 rounded text-sm text-white shadow-sm",style:{background:"#4caf50"}}," Invite ")]),a.inviteEmailError?(F(),N("p",wne,Z(a.inviteEmailError),1)):Q("",!0)])):Q("",!0),(d=r.accessInvites)!=null&&d.length?(F(),N("div",Sne,[t[4]||(t[4]=R("label",{class:"text-sm block",style:{color:"#888"}}," People with access ",-1)),R("div",xne,[(F(!0),N(Me,null,je(r.accessInvites,m=>(F(),N("div",{key:m,class:"flex items-center justify-between w-full py-2"},[R("div",Cne,[ee(w,{class:"h-10 w-10 rounded-full mr-1","aria-hidden":"true"}),De(" "+Z(m),1)]),R("button",{onClick:xt(o=>
41g.deleteAccessInvite(m),["prevent"]),type:"button",class:"inline-flex items-center gap-x-1.5 rounded-md bg-lime-600 py-1.5 px-2.5 text-sm text-white shadow-sm hover:bg-lime-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-lime-600"},[ee(f,{class:"-ml-0.5 h-5 w-5","aria-hidden":"true"})],8,kne)]))),128))])])):Q("",!0),ee(y,{disabled:!r.canUpdateReplay,options:a.accessOptions,"selected-id":r.activeAccessOption,onOptionSelected:g.accessOptionSelected,label:"General Access",class:xe({"opacity-50":!r.canUpdateReplay}),"selector-class":"relative w-full mt-2"},null,8,["disabled","options","selected-id","onOptionSelected","class"]),R("div",Ene,[R("div",Tne,[ee(x,{onCopyLink:g.copyLink},null,8,["onCopyLink"])])])],2)]}),_:1})]),_:1})]),_:1})}var Lne=st(vne,[["render",Rne]]);/*! 42* chartjs-plugin-annotation v3.1.0 43* https://www.chartjs.org/chartjs-plugin-annotation/index 44 * (c) 2024 chartjs-plugin-annotation Contributors 45 * Released under the MIT License 46 */const Iu={modes:{point(s,t){return hn(s,t,{intersect:!0})},nearest(s,t,r){return Ine(s,t,r)},x(s,t,r){return hn(s,t,{intersect:r.intersect,axis:"x"})},y(s,t,r){return hn(s,t,{intersect:r.intersect,axis:"y"})}}};function Ca(s,t,r){return(Iu.modes[r.mode]||Iu.modes.nearest)(s,t,r)}function Dne(s,t,r){return r!=="x"&&r!=="y"?s.inRange(t.x,t.y,"x",!0)||s.inRange(t.x,t.y,"y",!0):s.inRange(t.x,t.y,r,!0)}function Ane(s,t,r){return r==="x"?{x:s.x,y:t.y}:r==="y"?{x:t.x,y:s.y}:t}function hn(s,t,r){return s.filter(p=>r.intersect?p.inRange(t.x,t.y):Dne(p,t,r.axis))}function Ine(s,t,r){let p=Number.POSITIVE_INFINITY;return hn(s,t,r).reduce((a,g)=>{const v=g.getCenterPoint(),n=Ane(t,v,r.axis),c=ya(t,n);return c<p?(a=[g],p=c):c===p&&a.push(g),a},[]).sort((a,g)=>a._index-g._index).slice(0,1)}function ur(s,t,r){const p=Math.cos(r),a=Math.sin(r),g=t.x,v=t.y;return{x:g+p*(s.x-g)-a*(s.y-v),y:v+a*(s.x-g)+p*(s.y-v)}}const Mne=(s,t)=>t>s||s.length>t.length&&s.slice(0,t.length)===t,nr=.001,yn=(s,t,r)=>Math.min(r,Math.max(t,s)),Zh=(s,t)=>s.value>=s.start-t&&s.value<=s.end+t;function One(s,t,r){for(const p of Object.keys(s))s[p]=yn(s[p],t,r);return s}function Pne(s,t,r,p){return!s||!t||r<=0?!1:Math.pow(s.x-t.x,2)+Math.pow(s.y-t.y,2)<=Math.pow(r+p,2)}function Qh(s,{x:t,y:r,x2:p,y2:a},g,{borderWidth:v,hitTolerance:n}){const c=(v+n)/2,u=s.x>=t-c-nr&&s.x<=p+c+nr,w=s.y>=r-c-nr&&s.y<=a+c+nr;return g==="x"?u:(g==="y"||u)&&w}function ed(s,{rect:t,center:r},p,{rotation:a,borderWidth:g,hitTolerance:v}){const n=ur(s,r,Ts(-a));return Qh(n,t,p,{borderWidth:g,hitTolerance:v})}function hr(s,t){const{centerX:r,centerY:p}=s.getProps(["centerX","centerY"],t);return{x:r,y:p}}function Bne(s,t,r,p=!0){const a=r.split(".");let g=0;for(const v of t.split(".")){const n=a[g++];if(parseInt(v,10)<parseInt(n,10))break;if(Mne(n,v)){if(p)throw new Error(`${s} v${r} is not supported. v${t} or newer is required.`);return!1}}return!0}const td=s=>typeof s=="string"&&s.endsWith("%"),sd=s=>parseFloat(s)/100,rd=s=>yn(sd(s),0,1),si=(s,t)=>({x:s,y:t,x2:s,y2:t,width:0,height:0}),Hne={box:s=>si(s.centerX,s.centerY),doughnutLabel:s=>si(s.centerX,s.centerY),ellipse:s=>({centerX:s.centerX,centerY:s.centerX,radius:0,width:0,height:0}),label:s=>si(s.centerX,s.centerY),line:s=>si(s.x,s.y),point:s=>({centerX:s.centerX,centerY:s.centerY,radius:0,width:0,height:0}),polygon:s=>si(s.centerX,s.centerY)};function ka(s,t){return t==="start"?0:t==="end"?s:td(t)?rd(t)*s:s/2}function Vs(s,t,r=!0){return typeof t=="number"?t:td(t)?(r?rd(t):sd(t))*s:s}function qne(s,t){const{x:r,width:p}=s,a=t.textAlign;return a==="center"?r+p/2:a==="end"||a==="right"?r+p:r}function id(s,t,{borderWidth:r,position:p,xAdjust:a,yAdjust:g},v){const n=Ar(v),c=t.width+(n?v.width:0)+r,u=t.height+(n?v.height:0)+r,w=Ea(p),f=Mu(s.x,c,a,w.x),y=Mu(s.y,u,g,w.y);return{x:f,y,x2:f+c,y2:y+u,width:c,height:u,centerX:f+c/2,centerY:y+u/2}}function Ea(s,t="center"){return Ar(s)?{x:ni(s.x,t),y:ni(s.y,t)}:(s=ni(s,t),{x:s,y:s})}const nd=(s,t)=>s&&s.autoFit&&t<1;function od(s,t){const r=s.font,p=Ir(r)?r:[r];return nd(s,t)?p.map(function(a){const g=zo(a);return g.size=Math.floor(a.size*t),g.lineHeight=a.lineHeight,zo(g)}):p.map(a=>zo(a))}function ad(s){return s&&(ks(s.xValue)||ks(s.yValue))}function Mu(s,t,r=0,p){return s-ka(t,p)+r}function Pr(s,t,r){const p=r.init;if(p){if(p===!0)return cd(t,r)}else return;return Fne(s,t,r)}function ld(s,t,r){let p=!1;return t.forEach(a=>{Rr(s[a])?(p=!0,r[a]=s[a]):ks(r[a])&&delete r[a]}),p}function cd(s,t){const r=t.type||"line";return Hne[r](s)}function Fne(s,t,r){const p=va(r.init,[{chart:s,properties:t,options:r}]);if(p===!0)return cd(t,r);if(Ar(p))return p}const Vo=new Map,Une=s=>isNaN(s)||s<=0,Nne=s=>s.reduce(function(t,r){return t+=r.string,t},"");
46function bn(s){if(s&&typeof s=="object"){const t=s.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function wn(s,{x:t,y:r},p){p&&(s.translate(t,r),s.rotate(Ts(p)),s.translate(-t,-r))}function Es(s,t){if(t&&t.borderWidth)return s.lineCap=t.borderCapStyle||"butt",s.setLineDash(t.borderDash),s.lineDashOffset=t.borderDashOffset,s.lineJoin=t.borderJoinStyle||"miter",s.lineWidth=t.borderWidth,s.strokeStyle=t.borderColor,!0}function Br(s,t){s.shadowColor=t.backgroundShadowColor,s.shadowBlur=t.shadowBlur,s.shadowOffsetX=t.shadowOffsetX,s.shadowOffsetY=t.shadowOffsetY}function Sn(s,t){const r=t.content;if(bn(r))return{width:Vs(r.width,t.width),height:Vs(r.height,t.height)};const p=od(t),a=t.textStrokeWidth,g=Ir(r)?r:[r],v=g.join()+Nne(p)+a+(s._measureText?"-spriting":"");return Vo.has(v)||Vo.set(v,Vne(s,g,p,a)),Vo.get(v)}function ud(s,t,r){const{x:p,y:a,width:g,height:v}=t;s.save(),Br(s,r);const n=Es(s,r);s.fillStyle=r.backgroundColor,s.beginPath(),Fy(s,{x:p,y:a,w:g,h:v,radius:One(Uy(r.borderRadius),0,Math.min(g,v)/2)}),s.closePath(),s.fill(),n&&(s.shadowColor=r.borderShadowColor,s.stroke()),s.restore()}function hd(s,t,r,p){const a=r.content;if(bn(a)){s.save(),s.globalAlpha=Gne(r.opacity,a.style.opacity),s.drawImage(a,t.x,t.y,t.width,t.height),s.restore();return}const g=Ir(a)?a:[a],v=od(r,p),n=r.color,c=Ir(n)?n:[n],u=qne(t,r),w=t.y+r.textStrokeWidth/2;s.save(),s.textBaseline="middle",s.textAlign=r.textAlign,$ne(s,r)&&jne(s,{x:u,y:w},g,v),Kne(s,{x:u,y:w},g,{fonts:v,colors:c}),s.restore()}function $ne(s,t){if(t.textStrokeWidth>0)return s.lineJoin="round",s.miterLimit=2,s.lineWidth=t.textStrokeWidth,s.strokeStyle=t.textStrokeColor,!0}function Wne(s,t,r,p){const{radius:a,options:g}=t,v=g.pointStyle,n=g.rotation;let c=(n||0)*vh;if(bn(v)){s.save(),s.translate(r,p),s.rotate(c),s.drawImage(v,-v.width/2,-v.height/2,v.width,v.height),s.restore();return}Une(a)||zne(s,{x:r,y:p,radius:a,rotation:n,style:v,rad:c})}function zne(s,{x:t,y:r,radius:p,rotation:a,style:g,rad:v}){let n,c,u,w;switch(s.beginPath(),g){default:s.arc(t,r,p,0,gh),s.closePath();break;case"triangle":s.moveTo(t+Math.sin(v)*p,r-Math.cos(v)*p),v+=cu,s.lineTo(t+Math.sin(v)*p,r-Math.cos(v)*p),v+=cu,s.lineTo(t+Math.sin(v)*p,r-Math.cos(v)*p),s.closePath();break;case"rectRounded":w=p*.516,u=p-w,n=Math.cos(v+ti)*u,c=Math.sin(v+ti)*u,s.arc(t-n,r-c,w,v-ss,v-rn),s.arc(t+c,r-n,w,v-rn,v),s.arc(t+n,r+c,w,v,v+rn),s.arc(t-c,r+n,w,v+rn,v+ss),s.closePath();break;case"rect":if(!a){u=Math.SQRT1_2*p,s.rect(t-u,r-u,2*u,2*u);break}v+=ti;case"rectRot":n=Math.cos(v)*p,c=Math.sin(v)*p,s.moveTo(t-n,r-c),s.lineTo(t+c,r-n),s.lineTo(t+n,r+c),s.lineTo(t-c,r+n),s.closePath();break;case"crossRot":v+=ti;case"cross":n=Math.cos(v)*p,c=Math.sin(v)*p,s.moveTo(t-n,r-c),s.lineTo(t+n,r+c),s.moveTo(t+c,r-n),s.lineTo(t-c,r+n);break;case"star":n=Math.cos(v)*p,c=Math.sin(v)*p,s.moveTo(t-n,r-c),s.lineTo(t+n,r+c),s.moveTo(t+c,r-n),s.lineTo(t-c,r+n),v+=ti,n=Math.cos(v)*p,c=Math.sin(v)*p,s.moveTo(t-n,r-c),s.lineTo(t+n,r+c),s.moveTo(t+c,r-n),s.lineTo(t-c,r+n);break;case"line":n=Math.cos(v)*p,c=Math.sin(v)*p,s.moveTo(t-n,r-c),s.lineTo(t+n,r+c);break;case"dash":s.moveTo(t,r),s.lineTo(t+Math.cos(v)*p,r+Math.sin(v)*p);break}s.fill()}function Vne(s,t,r,p){s.save();const a=t.length;let g=0,v=p;for(let n=0;n<a;n++){const c=r[Math.min(n,r.length-1)];s.font=c.string;const u=t[n];g=Math.max(g,s.measureText(u).width+p),v+=c.lineHeight}return s.restore(),{width:g,height:v}}function jne(s,{x:t,y:r},p,a){s.beginPath();let g=0;p.forEach(function(v,n){const c=a[Math.min(n,a.length-1)],u=c.lineHeight;
46s.font=c.string,s.strokeText(v,t,r+u/2+g),g+=u}),s.stroke()}function Kne(s,{x:t,y:r},p,{fonts:a,colors:g}){let v=0;p.forEach(function(n,c){const u=g[Math.min(c,g.length-1)],w=a[Math.min(c,a.length-1)],f=w.lineHeight;s.beginPath(),s.font=w.string,s.fillStyle=u,s.fillText(n,t,r+f/2+v),v+=f,s.fill()})}function Gne(s,t){const r=uu(s)?s:t;return uu(r)?yn(r,0,1):1}const dd=["left","bottom","top","right"];function Xne(s,t){const{pointX:r,pointY:p,options:a}=t,g=a.callout,v=g&&g.display&&eoe(t,g);if(!v||soe(t,g,v))return;if(s.save(),s.beginPath(),!Es(s,g))return s.restore();const{separatorStart:c,separatorEnd:u}=Yne(t,v),{sideStart:w,sideEnd:f}=Zne(t,v,c);(g.margin>0||a.borderWidth===0)&&(s.moveTo(c.x,c.y),s.lineTo(u.x,u.y)),s.moveTo(w.x,w.y),s.lineTo(f.x,f.y);const y=ur({x:r,y:p},t.getCenterPoint(),Ts(-t.rotation));s.lineTo(y.x,y.y),s.stroke(),s.restore()}function Yne(s,t){const{x:r,y:p,x2:a,y2:g}=s,v=Jne(s,t);let n,c;return t==="left"||t==="right"?(n={x:r+v,y:p},c={x:n.x,y:g}):(n={x:r,y:p+v},c={x:a,y:n.y}),{separatorStart:n,separatorEnd:c}}function Jne(s,t){const{width:r,height:p,options:a}=s,g=a.callout.margin+a.borderWidth/2;return t==="right"?r+g:t==="bottom"?p+g:-g}function Zne(s,t,r){const{y:p,width:a,height:g,options:v}=s,n=v.callout.start,c=Qne(t,v.callout);let u,w;return t==="left"||t==="right"?(u={x:r.x,y:p+Vs(g,n)},w={x:u.x+c,y:u.y}):(u={x:r.x+Vs(a,n),y:r.y},w={x:u.x,y:u.y+c}),{sideStart:u,sideEnd:w}}function Qne(s,t){const r=t.side;return s==="left"||s==="top"?-r:r}function eoe(s,t){const r=t.position;return dd.includes(r)?r:toe(s,t)}function toe(s,t){const{x:r,y:p,x2:a,y2:g,width:v,height:n,pointX:c,pointY:u,centerX:w,centerY:f,rotation:y}=s,x={x:w,y:f},T=t.start,b=Vs(v,T),d=Vs(n,T),m=[r,r+b,r+b,a],o=[p+d,g,p,g],l=[];for(let S=0;S<4;S++){const E=ur({x:m[S],y:o[S]},x,Ts(y));l.push({position:dd[S],distance:ya(E,{x:c,y:u})})}return l.sort((S,E)=>S.distance-E.distance)[0].position}function soe(s,t,r){const{pointX:p,pointY:a}=s,g=t.margin;let v=p,n=a;return r==="left"?v+=g:r==="right"?v-=g:r==="top"?n+=g:r==="bottom"&&(n-=g),s.inRange(v,n)}const Ou={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function Mr(s,t,r){return t=typeof t=="number"?t:s.parse(t),_h(t)?s.getPixelForValue(t):r}function ar(s,t,r){const p=t[r];if(p||r==="scaleID")return p;const a=r.charAt(0),g=Object.values(s).filter(v=>v.axis&&v.axis===a);return g.length?g[0].id:a}function fd(s,t){if(s){const r=s.options.reverse,p=Mr(s,t.min,r?t.end:t.start),a=Mr(s,t.max,r?t.start:t.end);return{start:p,end:a}}}function pd(s,t){const{chartArea:r,scales:p}=s,a=p[ar(p,t,"xScaleID")],g=p[ar(p,t,"yScaleID")];let v=r.width/2,n=r.height/2;return a&&(v=Mr(a,t.xValue,a.left+a.width/2)),g&&(n=Mr(g,t.yValue,g.top+g.height/2)),{x:v,y:n}}function Ta(s,t){const r=s.scales,p=r[ar(r,t,"xScaleID")],a=r[ar(r,t,"yScaleID")];if(!p&&!a)return{};let{left:g,right:v}=p||s.chartArea,{top:n,bottom:c}=a||s.chartArea;const u=Pu(p,{min:t.xMin,max:t.xMax,start:g,end:v});g=u.start,v=u.end;const w=Pu(a,{min:t.yMin,max:t.yMax,start:c,end:n});return n=w.start,c=w.end,{x:g,y:n,x2:v,y2:c,width:v-g,height:c-n,centerX:g+(v-g)/2,centerY:n+(c-n)/2}}function md(s,t){if(!ad(t)){const r=Ta(s,t);let p=t.radius;(!p||isNaN(p))&&(p=Math.min(r.width,r.height)/2,t.radius=p);const a=p*2,g=r.centerX+t.xAdjust,v=r.centerY+t.yAdjust;return{x:g-p,y:v-p,x2:g+p,y2:v+p,centerX:g,centerY:v,width:a,height:a,radius:p}}return ioe(s,t)}function roe(s,t){const{scales:r,chartArea:p}=s,a=r[t.scaleID],g={x:p.left,y:p.top,x2:p.right,y2:p.bottom};return a?noe(a,g,t):ooe(r,g,t),g}function _d(s,t){const r=Ta(s,t);return r.initProperties=Pr(s,r,t),r.elements=[{type:"label",optionScope:"label",properties:coe(s,r,t),initProperties:r.initProperties}],r}function ioe(s,t){const r=pd(s,t),p=t.radius*2;return{x:r.x-t.radius+t.xAdjust,y:r.y-t.radius+t.yAdjust,x2:r.x+t.radius+t.xAdjust,y2:r.y+t.radius+t.yAdjust,centerX:r.x+t.xAdjust,centerY:r.y+t.yAdjust,radius:t.radius,width:p,height:p}}function Pu(s,t){const r=fd(s,t)||t;return{start:Math.min(r.start,r.end),end:Math.max(r.start,r.end)}}function noe(s,t,r){const p=Mr(s,r.value,NaN),a=Mr(s,r.endValue,p);s.isHorizontal()?(t.x=p,t.x2=a):(t.y=p,t.y2=a)}function ooe(s,t,r){for(const p of Object.keys(Ou)){const a=s[ar(s,r,p)];if(a){const{min:g,max:v,start:n,end:c,startProp:u,endProp:w}=Ou[p],f=fd(a,{min:r[g],max:r[v],start:a[n],end:a[c]});t[u]=f.start,t[w]=f.end}}}function aoe({properties:s,options:t},r,p,a){const{x:g,x2:v,width:n}=s;return gd({start:g,end:v,size:n,borderWidth:t.borderWidth},{position:p.x,padding:{start:a.left,end:a.right},adjust:t.label.xAdjust,size:r.width})}function loe({properties:s,options:t},r,p,a){const{y:g,y2:v,height:n}=s;return gd({start:g,end:v,size:n,borderWidth:t.borderWidth},{position:p.y,padding:{start:a.top,end:a.bottom},adjust:t.label.yAdjust,size:r.height})}function gd(s,t){const{start:r,end:p,borderWidth:a}=s,{position:g,padding:{start:v,end:n}
46,adjust:c}=t,u=p-a-r-v-n-t.size;return r+a/2+c+ka(u,g)}function coe(s,t,r){const p=r.label;p.backgroundColor="transparent",p.callout.display=!1;const a=Ea(p.position),g=_n(p.padding),v=Sn(s.ctx,p),n=aoe({properties:t,options:r},v,a,g),c=loe({properties:t,options:r},v,a,g),u=v.width+g.width,w=v.height+g.height;return{x:n,y:c,x2:n+u,y2:c+w,width:u,height:w,centerX:n+u/2,centerY:c+w/2,rotation:p.rotation}}const Yo=["enter","leave"],Ra=Yo.concat("click");function uoe(s,t,r){t.listened=ld(r,Ra,t.listeners),t.moveListened=!1,Yo.forEach(p=>{Rr(r[p])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(p=>{!t.listened&&Rr(p.click)&&(t.listened=!0),t.moveListened||Yo.forEach(a=>{Rr(p[a])&&(t.listened=!0,t.moveListened=!0)})})}function hoe(s,t,r){if(s.listened)switch(t.type){case"mousemove":case"mouseout":return doe(s,t,r);case"click":return foe(s,t,r)}}function doe(s,t,r){if(!s.moveListened)return;let p;t.type==="mousemove"?p=Ca(s.visibleElements,t,r.interaction):p=[];const a=s.hovered;s.hovered=p;const g={state:s,event:t};let v=Bu(g,"leave",a,p);return Bu(g,"enter",p,a)||v}function Bu({state:s,event:t},r,p,a){let g;for(const v of p)a.indexOf(v)<0&&(g=vd(v.options[r]||s.listeners[r],v,t)||g);return g}function foe(s,t,r){const p=s.listeners,a=Ca(s.visibleElements,t,r.interaction);let g;for(const v of a)g=vd(v.options.click||p.click,v,t)||g;return g}function vd(s,t,r){return va(s,[t.$context,r])===!0}const dn=["afterDraw","beforeDraw"];function poe(s,t,r){const p=t.visibleElements;t.hooked=ld(r,dn,t.hooks),t.hooked||p.forEach(a=>{t.hooked||dn.forEach(g=>{Rr(a.options[g])&&(t.hooked=!0)})})}function Hu(s,t,r){if(s.hooked){const p=t.options[r]||s.hooks[r];return va(p,[t.$context])}}function moe(s,t,r){const p=boe(s.scales,t,r);let a=qu(t,p,"min","suggestedMin");a=qu(t,p,"max","suggestedMax")||a,a&&Rr(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function _oe(s,t){for(const r of s)voe(r,t)}function qu(s,t,r,p){if(_h(t[r])&&!goe(s.options,r,p)){const a=s[r]!==t[r];return s[r]=t[r],a}}function goe(s,t,r){return ks(s[t])||ks(s[r])}function voe(s,t){for(const r of["scaleID","xScaleID","yScaleID"]){const p=ar(t,s,r);p&&!t[p]&&yoe(s,r)&&console.warn(`No scale found with id '${p}' for annotation '${s.id}'`)}}function yoe(s,t){if(t==="scaleID")return!0;const r=t.charAt(0);for(const p of["Min","Max","Value"])if(ks(s[r+p]))return!0;return!1}function boe(s,t,r){const p=t.axis,a=t.id,g=p+"ScaleID",v={min:ni(t.min,Number.NEGATIVE_INFINITY),max:ni(t.max,Number.POSITIVE_INFINITY)};for(const n of r)n.scaleID===a?Fu(n,t,["value","endValue"],v):ar(s,n,g)===a&&Fu(n,t,[p+"Min",p+"Max",p+"Value"],v);return v}function Fu(s,t,r,p){for(const a of r){const g=s[a];if(ks(g)){const v=t.parse(g);p.min=Math.min(p.min,v),p.max=Math.max(p.max,v)}}}class Hr extends lr{inRange(t,r,p,a){const{x:g,y:v}=ur({x:t,y:r},this.getCenterPoint(a),Ts(-this.options.rotation));return Qh({x:g,y:v},this.getProps(["x","y","x2","y2"],a),p,this.options)}getCenterPoint(t){return hr(this,t)}draw(t){t.save(),wn(t,this.getCenterPoint(),this.options.rotation),ud(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,r){return _d(t,r)}}Hr.id="boxAnnotation";Hr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,hitTolerance:0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,hitTolerance:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};Hr.defaultRoutes={borderColor:"color",backgroundColor:"color"};Hr.descriptors={label:{_fallback:!0}};class xn extends lr{inRange(t,r,p,a){return ed({x:t,y:r},{rect:this.getProps(["x","y","x2","y2"],a),center:this.getCenterPoint(a)},p,{rotation:this.rotation,borderWidth:0,hitTolerance:this.options.hitTolerance})}getCenterPoint(t){return hr(this,t)}draw(t){const r=this.options;!r.display||!r.content||(Eoe(t,this),t.save(),wn(t,this.getCenterPoint(),this.rotation),hd(t,this,r,this._fitRatio),t.restore(
46))}resolveElementProperties(t,r){const p=woe(t,r);if(!p)return{};const{controllerMeta:a,point:g,radius:v}=xoe(t,r,p);let n=Sn(t.ctx,r);const c=Coe(n,v);nd(r,c)&&(n={width:n.width*c,height:n.height*c});const{position:u,xAdjust:w,yAdjust:f}=r,y=id(g,n,{borderWidth:0,position:u,xAdjust:w,yAdjust:f});return{initProperties:Pr(t,y,r),...y,...a,rotation:r.rotation,_fitRatio:c}}}xn.id="doughnutLabelAnnotation";xn.defaults={autoFit:!0,autoHide:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderColor:"transparent",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:0,color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,hitTolerance:0,init:void 0,opacity:void 0,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,spacing:1,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0};xn.defaultRoutes={};function woe(s,t){return s.getSortedVisibleDatasetMetas().reduce(function(r,p){const a=p.controller;return a instanceof By&&Soe(s,t,p.data)&&(!r||a.innerRadius<r.controller.innerRadius)&&a.options.circumference>=90?p:r},void 0)}function Soe(s,t,r){if(!t.autoHide)return!0;for(let p=0;p<r.length;p++)if(!r[p].hidden&&s.getDataVisibility(p))return!0}function xoe({chartArea:s},t,r){const{left:p,top:a,right:g,bottom:v}=s,{innerRadius:n,offsetX:c,offsetY:u}=r.controller,w=(p+g)/2+c,f=(a+v)/2+u,y={left:Math.max(w-n,p),right:Math.min(w+n,g),top:Math.max(f-n,a),bottom:Math.min(f+n,v)},x={x:(y.left+y.right)/2,y:(y.top+y.bottom)/2},T=t.spacing+t.borderWidth/2,b=n-T,d=x.y>f,m=d?a+T:v-T,o=koe(m,w,f,b);return{controllerMeta:{_centerX:w,_centerY:f,_radius:b,_counterclockwise:d,...o},point:x,radius:Math.min(n,Math.min(y.right-y.left,y.bottom-y.top)/2)}}function Coe({width:s,height:t},r){const p=Math.sqrt(Math.pow(s,2)+Math.pow(t,2));return r*2/p}function koe(s,t,r,p){const a=Math.pow(r-s,2),g=Math.pow(p,2),v=t*-2,n=Math.pow(t,2)+a-g,c=Math.pow(v,2)-4*n;if(c<=0)return{_startAngle:0,_endAngle:gh};const u=(-v-Math.sqrt(c))/2,w=(-v+Math.sqrt(c))/2;return{_startAngle:lu({x:t,y:r},{x:u,y:s}).angle,_endAngle:lu({x:t,y:r},{x:w,y:s}).angle}}function Eoe(s,t){const{_centerX:r,_centerY:p,_radius:a,_startAngle:g,_endAngle:v,_counterclockwise:n,options:c}=t;s.save();const u=Es(s,c);s.fillStyle=c.backgroundColor,s.beginPath(),s.arc(r,p,a,g,v,n),s.closePath(),s.fill(),u&&s.stroke(),s.restore()}class hi extends lr{inRange(t,r,p,a){return ed({x:t,y:r},{rect:this.getProps(["x","y","x2","y2"],a),center:this.getCenterPoint(a)},p,{rotation:this.rotation,borderWidth:this.options.borderWidth,hitTolerance:this.options.hitTolerance})}getCenterPoint(t){return hr(this,t)}draw(t){const r=this.options,p=!ks(this._visible)||this._visible;!r.display||!r.content||!p||(t.save(),wn(t,this.getCenterPoint(),this.rotation),Xne(t,this),ud(t,this,r),hd(t,Toe(this),r),t.restore())}resolveElementProperties(t,r){let p;if(ad(r))p=pd(t,r);else{const{centerX:n,centerY:c}=Ta(t,r);p={x:n,y:c}}const a=_n(r.padding),g=Sn(t.ctx,r),v=id(p,g,r,a);return{initProperties:Pr(t,v,r),pointX:p.x,pointY:p.y,...v,rotation:r.rotation}}}hi.id="labelAnnotation";hi.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,hitTolerance:0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};hi.defaultRoutes={borderColor:"color"};function Toe({x:s,y:t,width:r,height:p,options:a}){const g=a.borderWidth/2,v=_n(a.padding);return{x:s+v.left+g,y:t+v.top+g,width:r-v.left-v.right-a.borderWidth,height:p-v.top-v.bottom-a.borderWidth}}const La=(s,t,r)=>({x:s.x+r*(t.x-s.x),y:s.y+r*(t.y-s.y)}),Jo=(s,t,r)=>La(t,r,Math.abs((s-t.y)/(r.y-t.y))).x,Uu=(s,t,r)=>La(t,r,Math.abs((s-t.x)/(r.x-t.x))).y,ii=s=>s*s,Roe=(s,t,{x:r,y:p,x2:a,y2:g},v)=>v==="y"?{start:Math.min(p,g),end:Math.max(p,g),value:t}:{start:Math.min(r,a),end:Math.max(r,a),value:s},Nu=(s,t,r,p)=>(1-p)*(1-p)*s+2*(1-p)*p*t+p*p*r,Zo=(s,t,r,p)=>({x:Nu(s.x,t.x,r.x,p),y:Nu(s.y,t.y,r.y,p)}),$u=(s,t,r,p)=>2*(1-p)*(t-s)+2*p*(r-t),Wu=(s,t,r,p)=>-Math.atan2($u(s.x,t.x,r.x,p),$u(s.y,t.y,r.y,p))+.5*ss;class di extends lr{inRange(t,r,p,a){const g=(this.options.borderWidth+this.options.hitTolerance)/2;if(p!=="x"&&p!=="y"){const v={mouseX:t,mouseY:r},{path:n,ctx:c}=this;if(n){Es(c,this.options),c.lineWidth+=this.options.hitTolerance;const{chart:w}
46=this.$context,f=t*w.currentDevicePixelRatio,y=r*w.currentDevicePixelRatio,x=c.isPointInStroke(n,f,y)||Qo(this,v,a);return c.restore(),x}const u=ii(g);return Ioe(this,v,u,a)||Qo(this,v,a)}return Loe(this,{mouseX:t,mouseY:r},p,{hitSize:g,useFinalPosition:a})}getCenterPoint(t){return hr(this,t)}draw(t){const{x:r,y:p,x2:a,y2:g,cp:v,options:n}=this;if(t.save(),!Es(t,n))return t.restore();Br(t,n);const c=Math.sqrt(Math.pow(a-r,2)+Math.pow(g-p,2));if(n.curve&&v)return Uoe(t,this,v,c),t.restore();const{startOpts:u,endOpts:w,startAdjust:f,endAdjust:y}=yd(this),x=Math.atan2(g-p,a-r);t.translate(r,p),t.rotate(x),t.beginPath(),t.moveTo(0+f,0),t.lineTo(c-y,0),t.shadowColor=n.borderShadowColor,t.stroke(),ea(t,0,f,u),ea(t,c,-y,w),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,r){const p=roe(t,r),{x:a,y:g,x2:v,y2:n}=p,c=Doe(p,t.chartArea),u=c?Aoe({x:a,y:g},{x:v,y:n},t.chartArea):{x:a,y:g,x2:v,y2:n,width:Math.abs(v-a),height:Math.abs(n-g)};if(u.centerX=(v+a)/2,u.centerY=(n+g)/2,u.initProperties=Pr(t,u,r),r.curve){const f={x:u.x,y:u.y},y={x:u.x2,y:u.y2};u.cp=Foe(u,r,ya(f,y))}const w=Moe(t,u,r.label);return w._visible=c,u.elements=[{type:"label",optionScope:"label",properties:w,initProperties:u.initProperties}],u}}di.id="lineAnnotation";const zu={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};di.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},zu),fill:!1,length:12,start:Object.assign({},zu),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,hitTolerance:0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},hi.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,hitTolerance:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};di.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}};di.defaultRoutes={borderColor:"color"};function Loe(s,{mouseX:t,mouseY:r},p,{hitSize:a,useFinalPosition:g}){const v=Roe(t,r,s.getProps(["x","y","x2","y2"],g),p);return Zh(v,a)||Qo(s,{mouseX:t,mouseY:r},g,p)}function Doe({x:s,y:t,x2:r,y2:p},{top:a,right:g,bottom:v,left:n}){return!(s<n&&r<n||s>g&&r>g||t<a&&p<a||t>v&&p>v)}function Vu({x:s,y:t},r,{top:p,right:a,bottom:g,left:v}){return s<v&&(t=Uu(v,{x:s,y:t},r),s=v),s>a&&(t=Uu(a,{x:s,y:t},r),s=a),t<p&&(s=Jo(p,{x:s,y:t},r),t=p),t>g&&(s=Jo(g,{x:s,y:t},r),t=g),{x:s,y:t}}function Aoe(s,t,r){const{x:p,y:a}=Vu(s,t,r),{x:g,y:v}=Vu(t,s,r);return{x:p,y:a,x2:g,y2:v,width:Math.abs(g-p),height:Math.abs(v-a)}}function Ioe(s,{mouseX:t,mouseY:r},p=nr,a){const{x:g,y:v,x2:n,y2:c}=s.getProps(["x","y","x2","y2"],a),u=n-g,w=c-v,f=ii(u)+ii(w),y=f===0?-1:((t-g)*u+(r-v)*w)/f;let x,T;return y<0?(x=g,T=v):y>1?(x=n,T=c):(x=g+y*u,T=v+y*w),ii(t-x)+ii(r-T)<=p}function Qo(s,{mouseX:t,mouseY:r},p,a){const g=s.label;return g.options.display&&g.inRange(t,r,a,p)}function Moe(s,t,r){const p=r.borderWidth,a=_n(r.padding),g=Sn(s.ctx,r),v=g.width+a.width+p,n=g.height+a.height+p;return Poe(t,r,{width:v,height:n,padding:a},s.chartArea)}function Ooe(s){const{x:t,y:r,x2:p,y2:a}=s,g=Math.atan2(a-r,p-t);return g>ss/2?g-ss:g<ss/-2?g+ss:g}function Poe(s,t,r,p){const{width:a,height:g,padding:v}=r,{xAdjust:n,yAdjust:c}=t,u={x:s.x,y:s.y},w={x:s.x2,y:s.y2},f=t.rotation==="auto"?Ooe(s):Ts(t.rotation),y=Boe(a,g,f),x=Hoe(s,t,{labelSize:y,padding:v},p),T=s.cp?Zo(u,s.cp,w,x):La(u,w,x),b={size:y.w,min:p.left,max:p.right,padding:v.left},d={size:y.h,min:p.top,max:p.bottom,padding:v.top},m=Ku(T.x,b)+n,o=Ku(T.y,d)+c;return{x:m-a/2,y:o-g/2,x2:m+a/2,y2:o+g/2,centerX:m,centerY:o,pointX:T.x,pointY:T.y,width:a,height:g,rotation:Hy(f)}}function Boe(s,t,r){const p=Math.cos(r),a=Math.sin(r);return{w:Math.abs(s*p)+Math.abs(t*a),h:Math.abs(s*a)+Math.abs(t*p)}}function Hoe(s,t,r,p){let a;const g=qoe(s,p);return t.position==="start"?a=ju({w:s.x2-s.x,h:s.y2-s.y},r,t,g):t.position==="end"?a=1-ju({w:s.x-s.x2,h:s.y-s.y2},r,t,g):a=ka(1,t.position),a}function ju(s,t,r,p){const{labelSize:a,padding:g}=t,v=s.w*p.dx,n=s.h*p.dy,c=v>0&&(a.w/2+g.left-p.x)/v,u=n>0&&(a.h/2+g.top-p.y)/n;return yn(Math.max(c,u),0,.25)}function qoe(s,t){const{x:r,x2:p,y:a,y2:g}
46=s,v=Math.min(a,g)-t.top,n=Math.min(r,p)-t.left,c=t.bottom-Math.max(a,g),u=t.right-Math.max(r,p);return{x:Math.min(n,u),y:Math.min(v,c),dx:n<=u?1:-1,dy:v<=c?1:-1}}function Ku(s,t){const{size:r,min:p,max:a,padding:g}=t,v=r/2;return r>a-p?(a+p)/2:(p>=s-g-v&&(s=p+g+v),a<=s+g+v&&(s=a-g-v),s)}function yd(s){const t=s.options,r=t.arrowHeads&&t.arrowHeads.start,p=t.arrowHeads&&t.arrowHeads.end;return{startOpts:r,endOpts:p,startAdjust:Gu(s,r),endAdjust:Gu(s,p)}}function Gu(s,t){if(!t||!t.display)return 0;const{length:r,width:p}=t,a=s.options.borderWidth/2,g={x:r,y:p+a};return Math.abs(Jo(0,g,{x:0,y:a}))}function ea(s,t,r,p){if(!p||!p.display)return;const{length:a,width:g,fill:v,backgroundColor:n,borderColor:c}=p,u=Math.abs(t-a)+r;s.beginPath(),Br(s,p),Es(s,p),s.moveTo(u,-g),s.lineTo(t+r,0),s.lineTo(u,g),v===!0?(s.fillStyle=n||c,s.closePath(),s.fill(),s.shadowColor="transparent"):s.shadowColor=p.borderShadowColor,s.stroke()}function Foe(s,t,r){const{x:p,y:a,x2:g,y2:v,centerX:n,centerY:c}=s,u=Math.atan2(v-a,g-p),w=Ea(t.controlPoint,0),f={x:n+Vs(r,w.x,!1),y:c+Vs(r,w.y,!1)};return ur(f,{x:n,y:c},u)}function Xu(s,{x:t,y:r},{angle:p,adjust:a},g){!g||!g.display||(s.save(),s.translate(t,r),s.rotate(p),ea(s,0,-a,g),s.restore())}function Uoe(s,t,r,p){const{x:a,y:g,x2:v,y2:n,options:c}=t,{startOpts:u,endOpts:w,startAdjust:f,endAdjust:y}=yd(t),x={x:a,y:g},T={x:v,y:n},b=Wu(x,r,T,0),d=Wu(x,r,T,1)-ss,m=Zo(x,r,T,f/p),o=Zo(x,r,T,1-y/p),l=new Path2D;s.beginPath(),l.moveTo(m.x,m.y),l.quadraticCurveTo(r.x,r.y,o.x,o.y),s.shadowColor=c.borderShadowColor,s.stroke(l),t.path=l,t.ctx=s,Xu(s,m,{angle:b,adjust:f},u),Xu(s,o,{angle:d,adjust:y},w)}class fi extends lr{inRange(t,r,p,a){const g=this.options.rotation,v=(this.options.borderWidth+this.options.hitTolerance)/2;if(p!=="x"&&p!=="y")return Noe({x:t,y:r},this.getProps(["width","height","centerX","centerY"],a),g,v);const{x:n,y:c,x2:u,y2:w}=this.getProps(["x","y","x2","y2"],a),f=p==="y"?{start:c,end:w}:{start:n,end:u},y=ur({x:t,y:r},this.getCenterPoint(a),Ts(-g));return y[p]>=f.start-v-nr&&y[p]<=f.end+v+nr}getCenterPoint(t){return hr(this,t)}draw(t){const{width:r,height:p,centerX:a,centerY:g,options:v}=this;t.save(),wn(t,this.getCenterPoint(),v.rotation),Br(t,this.options),t.beginPath(),t.fillStyle=v.backgroundColor;const n=Es(t,v);t.ellipse(a,g,p/2,r/2,ss/2,0,2*ss),t.fill(),n&&(t.shadowColor=v.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,r){return _d(t,r)}}fi.id="ellipseAnnotation";fi.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,label:Object.assign({},Hr.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};fi.defaultRoutes={borderColor:"color",backgroundColor:"color"};fi.descriptors={label:{_fallback:!0}};function Noe(s,t,r,p){const{width:a,height:g,centerX:v,centerY:n}=t,c=a/2,u=g/2;if(c<=0||u<=0)return!1;const w=Ts(r||0),f=Math.cos(w),y=Math.sin(w),x=Math.pow(f*(s.x-v)+y*(s.y-n),2),T=Math.pow(y*(s.x-v)-f*(s.y-n),2);return x/Math.pow(c+p,2)+T/Math.pow(u+p,2)<=1.0001}class Cn extends lr{inRange(t,r,p,a){const{x:g,y:v,x2:n,y2:c,width:u}=this.getProps(["x","y","x2","y2","width"],a),w=(this.options.borderWidth+this.options.hitTolerance)/2;return p!=="x"&&p!=="y"?Pne({x:t,y:r},this.getCenterPoint(a),u/2,w):Zh(p==="y"?{start:v,end:c,value:r}:{start:g,end:n,value:t},w)}getCenterPoint(t){return hr(this,t)}draw(t){const r=this.options,p=r.borderWidth;if(r.radius<.1)return;t.save(),t.fillStyle=r.backgroundColor,Br(t,r);const a=Es(t,r);Wne(t,this,this.centerX,this.centerY),a&&!bn(r.pointStyle)&&(t.shadowColor=r.borderShadowColor,t.stroke()),t.restore(),r.borderWidth=p}resolveElementProperties(t,r){const p=md(t,r);return p.initProperties=Pr(t,p,r),p}}Cn.id="pointAnnotation";Cn.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};Cn.defaultRoutes={borderColor:"color",backgroundColor:"color"};class kn extends lr{inRange(t,r,p,a){if(p!=="x"&&p!=="y")return this.options.radius>=.1&&this.elements.length>1&&Woe(this.elements,t,r,a);const g=ur({x:t,y:r},this.getCenterPoint(a),Ts(-this.options.rotation)),v=this.elements.map(u=>p==="y"?u.bY:u.bX),n=Math.min(...v),c=Math.max(...v);return g[p]>=n&&g[p]<=c}getCenterPoint(t){return hr(this,t)}draw(t){const{elements:r,options:p}=this;t.save(),t.beginPath(),t.fillStyle=p.backgroundColor,Br(t,p);const a=Es(t,p);let g=!0;for(const v of r)g?(t.moveTo(v.x,v.y),g=!1):t.lineTo(v.x,v.y);t.closePath(),t.fill(),a&&(t.shadowColor=p.borderShadowColor,t.stroke()),t.restore(
46)}resolveElementProperties(t,r){const p=md(t,r),{sides:a,rotation:g}=r,v=[],n=2*ss/a;let c=g*vh;for(let u=0;u<a;u++,c+=n){const w=$oe(p,r,c);w.initProperties=Pr(t,p,r),v.push(w)}return p.elements=v,p}}kn.id="polygonAnnotation";kn.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};kn.defaultRoutes={borderColor:"color",backgroundColor:"color"};function $oe({centerX:s,centerY:t},{radius:r,borderWidth:p,hitTolerance:a},g){const v=(p+a)/2,n=Math.sin(g),c=Math.cos(g),u={x:s+n*r,y:t-c*r};return{type:"point",optionScope:"point",properties:{x:u.x,y:u.y,centerX:u.x,centerY:u.y,bX:s+n*(r+v),bY:t-c*(r+v)}}}function Woe(s,t,r,p){let a=!1,g=s[s.length-1].getProps(["bX","bY"],p);for(const v of s){const n=v.getProps(["bX","bY"],p);n.bY>r!=g.bY>r&&t<(g.bX-n.bX)*(r-n.bY)/(g.bY-n.bY)+n.bX&&(a=!a),g=n}return a}const $s={box:Hr,doughnutLabel:xn,ellipse:fi,label:hi,line:di,point:Cn,polygon:kn};Object.keys($s).forEach(s=>{My.describe(`elements.${$s[s].id}`,{_fallback:"plugins.annotation.common"})});const zoe={update:Object.assign},Voe=Ra.concat(dn),Yu=(s,t)=>Ar(t)?sa(s,t):s,ta=s=>s==="color"||s==="font";function Da(s="line"){return $s[s]?s:(console.warn(`Unknown annotation type: '${s}', defaulting to 'line'`),"line")}function joe(s,t,r,p){const a=Goe(s,r.animations,p),g=t.annotations,v=Joe(t.elements,g);for(let n=0;n<g.length;n++){const c=g[n],u=bd(v,n,c.type),w=c.setContext(Yoe(s,u,v,c)),f=u.resolveElementProperties(s,w);f.skip=Koe(f),"elements"in f&&(Xoe(u,f.elements,w,a),delete f.elements),ks(u.x)||Object.assign(u,f),Object.assign(u,f.initProperties),f.options=wd(w),a.update(u,f)}}function Koe(s){return isNaN(s.x)||isNaN(s.y)}function Goe(s,t,r){return r==="reset"||r==="none"||r==="resize"?zoe:new qy(s,t)}function Xoe(s,t,r,p){const a=s.elements||(s.elements=[]);a.length=t.length;for(let g=0;g<t.length;g++){const v=t[g],n=v.properties,c=bd(a,g,v.type,v.initProperties),u=r[v.optionScope].override(v);n.options=wd(u),p.update(c,n)}}function bd(s,t,r,p){const a=$s[Da(r)];let g=s[t];return(!g||!(g instanceof a))&&(g=s[t]=new a,Object.assign(g,p)),g}function wd(s){const t=$s[Da(s.type)],r={};r.id=s.id,r.type=s.type,r.drawTime=s.drawTime,Object.assign(r,sa(s,t.defaults),sa(s,t.defaultRoutes));for(const p of Voe)r[p]=s[p];return r}function sa(s,t){const r={};for(const p of Object.keys(t)){const a=t[p],g=s[p];ta(p)&&Ir(g)?r[p]=g.map(v=>Yu(v,a)):r[p]=Yu(g,a)}return r}function Yoe(s,t,r,p){return t.$context||(t.$context=Object.assign(Object.create(s.getContext()),{element:t,get elements(){return r.filter(a=>a&&a.options)},id:p.id,type:"annotation"}))}function Joe(s,t){const r=t.length,p=s.length;if(p<r){const a=r-p;s.splice(p,0,...new Array(a))}else p>r&&s.splice(r,p-r);return s}var Zoe="3.1.0";const Fs=new Map,Ju=s=>s.type!=="doughnutLabel",Qoe=Ra.concat(dn);var eae={id:"annotation",version:Zoe,beforeRegister(){Bne("chart.js","4.0",an.version)},afterRegister(){an.register($s)},afterUnregister(){an.unregister($s)},beforeInit(s){Fs.set(s,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(s,t,r){const p=Fs.get(s),a=p.annotations=[];let g=r.annotations;Ar(g)?Object.keys(g).forEach(v=>{const n=g[v];Ar(n)&&(n.id=v,a.push(n))}):Ir(g)&&a.push(...g),_oe(a.filter(Ju),s.scales)},afterDataLimits(s,t){const r=Fs.get(s);moe(s,t.scale,r.annotations.filter(Ju).filter(p=>p.display&&p.adjustScaleRange))},afterUpdate(s,t,r){const p=Fs.get(s);uoe(s,p,r),joe(s,p,r,t.mode),p.visibleElements=p.elements.filter(a=>!a.skip&&a.options.display),poe(s,p,r)},beforeDatasetsDraw(s,t,r){ri(s,"beforeDatasetsDraw",r.clip)},afterDatasetsDraw(s,t,r){ri(s,"afterDatasetsDraw",r.clip)},beforeDatasetDraw(s,t,r){ri(s,t.index,r.clip)},beforeDraw(s,t,r){ri(s,"beforeDraw",r.clip)},afterDraw(s,t,r){ri(s,"afterDraw",r.clip)},beforeEvent(s,t,r){const p=Fs.get(s);hoe(p,t.event,r)&&(t.changed=!0)},afterDestroy(s){Fs.delete(s)},getAnnotations(s){const t=Fs.get(s);return t?t.elements:[]},_getAnnotationElementsAtEventForMode(s,t,r){return Ca(s,t,r)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"},colors:{properties:["backgroundColor","borderColor"],type:"color"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:s=>!Qoe.includes(s)&&s!=="init",annotations:{_allKeys:!1,_fallback:(s,t)=>`elements.${$s[Da(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:ta,_fallback:!0},_indexable:ta}},additionalOptionScopes:[""]};function ri(s,t,r){const{ctx:p,chartArea:a}=s,g=Fs.get(s);r&&Oy(p,a);const v=tae(g.visibleElements,t).sort((n,c)=>n.element.options.z-c.element.options.z);for(const n of v)sae(p,a,g,n);r&&Py(p)}function tae(s,t){const r=[];for(const p of s)if(p.options.drawTime===t&&r.push({element:p,main:!0}),p.elements&&p.elements.length)for(const a of p.elements)a.options.display&&a.options.drawTime===t&&r.push({element:a});return r}function sae(s,t,r,p){const a=p.element;p.main?(Hu(r,a,"beforeDraw"),a.draw(s,t),Hu(r,a,"afterDraw")):a.draw(s,t)}an.register(Ny,$y,Wy,zy,Vy,jy,Ky,Gy,eae);const rae={name:"PerformanceCharts",components:{Line:Xy},props:{performanceData:{type:Object,required:!0},videoTime:{type:Number,default:0},videoDuration:{type:Number,default:0}},computed:{samples(){var s;return((s=this.performanceData)==null?void 0:s.samples)||[]},timeLabels(){return this.samples.map(s=>`${(s.elapsedMs/1e3).toFixed(1)}s`)},currentSampleIndex(){const s=this.videoTime;if(this.samples.length===0)return 0;let t=0,r=0;for(let n=0;n<this.samples.length;n++)this.samples[n].elapsedMs<=s&&(t=n),this.samples[n].elapsedMs>=s&&r===0&&(r=n);if(s>=this.samples[this.samples.length-1].elapsedMs)return this.samples.length-1;if(s<=this.samples[0].elapsedMs)return 0;const p=this.samples[t].elapsedMs,g=this.samples[r].elapsedMs-p;if(g===0)return t;const v=(s-p)/g;return t+v},systemCpuChartData(){const s=this.samples.map((t,r)=>{var v;if(!t.system)return 0;if(t.system.cpuUsagePercent!=null)return t.system.cpuUsagePercent;if(r===0)return 0;const p=this.samples[r-1];if(!((v=p==null?void 0:p.system)!=null&&v.totalTick))return 0;const a=t.system.totalTick-p.system.totalTick,g=t.system.totalIdle-p.system.totalIdle;return a<=0?0:Math.min(100,Math.max(0,(a-g)/a*100))});return{labels:this.timeLabels,datasets:[{label:"System CPU Usage (%)",data:s,borderColor:"rgb(75, 192, 192)",backgroundColor:"rgba(75, 192, 192, 0.1)",tension:0,fill:!0}]}},systemMemoryChartData(){return{labels:this.timeLabels,datasets:[{label:"System Memory Usage (%)",data:this.samples.map(s=>{var t;return((t=s.system)==null?void 0:t.memoryUsagePercent)||0}),borderColor:"rgb(153, 102, 255)",backgroundColor:"rgba(153, 102, 255, 0.1)",tension:0,fill:!0}]}},networkChartData(){return{labels:this.timeLabels,datasets:[{label:"Download (MB/s)",data:this.samples.map(s=>{var t;return((t=s.network)==null?void 0:t.mbReceivedPerSec)||0}),borderColor:"rgb(54, 162, 235)",backgroundColor:"rgba(54, 162, 235, 0.1)",tension:0,fill:!0},{label:"Upload (MB/s)",data:this.samples.map(s=>{var t;return((t=s.network)==null?void 0:t.mbSentPerSec)||0}),borderColor:"rgb(255, 99, 132)",backgroundColor:"rgba(255, 99, 132, 0.1)",tension:0,fill:!0}]}},topProcessesAggregated(){const s=new Map;
46return this.samples.forEach(r=>{r.topProcesses&&r.topProcesses.forEach(p=>{const a=`${p.name}-${p.pid}`;s.has(a)||s.set(a,{name:p.name,pid:p.pid,cpuValues:[],memoryValues:[]});const g=s.get(a);g.cpuValues.push(p.cpu||0),g.memoryValues.push((p.memory||0)/(1024*1024))})}),Array.from(s.values()).map(r=>({name:r.name,pid:r.pid,avgCpu:r.cpuValues.reduce((p,a)=>p+a,0)/r.cpuValues.length,maxCpu:Math.max(...r.cpuValues),avgMemory:r.memoryValues.reduce((p,a)=>p+a,0)/r.memoryValues.length,maxMemory:Math.max(...r.memoryValues),samples:r.cpuValues.length})).sort((r,p)=>p.avgCpu-r.avgCpu).slice(0,10)},topProcessesCpuChartData(){const t=this.topProcessesAggregated.slice(0,10).map((r,p)=>{const a=["rgb(255, 99, 132)","rgb(54, 162, 235)","rgb(255, 206, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(255, 159, 64)","rgb(199, 199, 199)","rgb(83, 102, 255)","rgb(255, 99, 255)","rgb(99, 255, 132)"],g=this.samples.map(v=>{var c;const n=(c=v.topProcesses)==null?void 0:c.find(u=>u.name===r.name&&u.pid===r.pid);return(n==null?void 0:n.cpu)||null});return{label:`${r.name} (${r.pid})`,data:g,borderColor:a[p%a.length],backgroundColor:a[p%a.length].replace("rgb","rgba").replace(")",", 0.1)"),tension:0,spanGaps:!0}});return{labels:this.timeLabels,datasets:t}},percentChartOptions(){const s=this.chartOptions;return{...s,scales:{...s.scales,y:{...s.scales.y,min:0,max:100}}}},chartOptions(){return{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!0,labels:{color:"#ddd",font:{size:11}}},tooltip:{backgroundColor:"rgba(0, 0, 0, 0.8)",titleColor:"#fff",bodyColor:"#ddd",borderColor:"#444",borderWidth:1},annotation:{annotations:{currentTime:{type:"line",xMin:this.currentSampleIndex,xMax:this.currentSampleIndex,borderColor:"rgba(255, 99, 132, 0.8)",borderWidth:2,borderDash:[5,5],label:{display:!0,content:`${(this.videoTime/1e3).toFixed(1)}s`,position:"start",backgroundColor:"rgba(255, 99, 132, 0.8)",color:"#fff",font:{size:10},yAdjust:-10}}}}},scales:{x:{grid:{color:"rgba(255, 255, 255, 0.05)"},ticks:{color:"#888",font:{size:10}}},y:{grid:{color:"rgba(255, 255, 255, 0.05)"},ticks:{color:"#888",font:{size:10}}}}}}}},iae={key:0,class:"performance-charts"},nae={class:"chart-container"},oae={class:"chart-title"},aae={class:"chart-wrapper"},lae={class:"chart-container"},cae={class:"chart-title"},uae={class:"chart-wrapper"},hae={class:"chart-container"},dae={class:"chart-title"},fae={class:"chart-wrapper"},pae={key:0,class:"chart-container"},mae={class:"chart-title"},_ae={class:"chart-wrapper"},gae={key:1,class:"chart-container"},vae={class:"chart-title"},yae={class:"overflow-x-auto"},bae={class:"process-table"},wae={class:"process-name"};function Sae(s,t,r,p,a,g){const v=re("font-awesome-icon"),n=re("Line");return r.performanceData&&r.performanceData.samples&&r.performanceData.samples.length>0?(F(),N("div",iae,[R("div",nae,[R("h3",oae,[ee(v,{class:"w-4 h-4 mr-2",style:{color:"#666"},icon:"fa-solid fa-microchip"}),t[0]||(t[0]=De(" CPU Usage ",-1))]),R("div",aae,[ee(n,{data:g.systemCpuChartData,options:g.percentChartOptions},null,8,["data","options"])])]),R("div",lae,[R("h3",cae,[ee(v,{class:"w-4 h-4 mr-2",style:{color:"#666"},icon:"fa-solid fa-memory"}),t[1]||(t[1]=De(" Memory Usage ",-1))]),R("div",uae,[ee(n,{data:g.systemMemoryChartData,options:g.percentChartOptions},null,8,["data","options"])])]),R("div",hae,[R("h3",dae,[ee(v,{class:"w-4 h-4 mr-2",style:{color:"#666"},icon:"fa-solid fa-network-wired"}),t[2]||(t[2]=De(" Network Traffic ",-1))]),R("div",fae,[ee(n,{data:g.networkChartData,options:g.chartOptions},null,8,["data","options"])])]),g.topProcessesAggregated.length>0?(F(),N("div",pae,[R("h3",mae,[ee(v,{class:"w-4 h-4 mr-2",style:{color:"#666"},icon:"fa-solid fa-list"}),t[3]||(t[3]=De(" Top Processes - CPU Usage ",-1))]),R("div",_ae,[ee(n,{data:g.topProcessesCpuChartData,options:g.chartOptions},null,8,["data","options"])])])):Q("",!0),g.topProcessesAggregated.length>0?(F(),N("div",gae,[R("h3",vae,[ee(v,{class:"w-4 h-4 mr-2",style:{color:"#666"},icon:"fa-solid fa-table"}),t[4]||(t[4]=De(" Top 10 Processes by CPU Usage ",-1))]),R("div",yae,[R("table",bae,[t[5]||(t[5]=R("thead",null,[R("tr",null,[R("th",null,"Process Name"),R("th",null,"PID"),R("th",null,"Avg CPU (%)"),R("th",null,"Max CPU (%)"),R("th",null,"Avg Memory (MB)"),R("th",null,"Max Memory (MB)"),R("th",null,"Samples")])],-1)),R("tbody",null,[(F(!0),N(Me,null,je(g.topProcessesAggregated,c=>(F(),N("tr",{key:`${c.name}-${c.pid}`},[R("td",wae,Z(c.name),1),R("td",null,Z(c.pid),1),R("td",null,Z(c.avgCpu.toFixed(1)),1),R("td",null,Z(c.maxCpu.toFixed(1)),1),R("td",null,Z(c.avgMemory.toFixed(1)),1),R("td",null,Z(c.maxMemory.toFixed(1)),1),R("td",null,Z(c.samples),1)]))),128))])])])])):Q("",!0)])):Q("",!0)}var xae=st(rae,[["render",Sae],["__scopeId","data-v-75e4141c"]]);const Cae={name:"InteractionScreenshotModal",props:{interaction:{type:Object,default:null}},emits:["close"],setup(s){const t=$e(!1),r=$e({width:0,height:0}),p=u=>
46{u.target&&(r.value={width:u.target.naturalWidth,height:u.target.naturalHeight})},a=be(()=>{var y;const u=(y=s.interaction)==null?void 0:y.coordinates;if(!u||!r.value.width)return null;const w=u.x/r.value.width*100,f=u.y/r.value.height*100;return{left:`${w}%`,top:`${f}%`}}),g=be(()=>{var T,b;const u=(b=(T=s.interaction)==null?void 0:T.selector)==null?void 0:b.elementBounds;if(!u||!r.value.width)return null;const{left:w,top:f,width:y,height:x}=u;return w==null||f==null||!y||!x?null:{left:`${w/r.value.width*100}%`,top:`${f/r.value.height*100}%`,width:`${y/r.value.width*100}%`,height:`${x/r.value.height*100}%`}}),v=u=>u?`${u}x`:"off",n=be(()=>{const u=s.interaction;return u&&(u.signedEdgeDetectedImageUrl||u.signedCroppedImageUrl)||null});return{fullscreen:t,imageDimensions:r,onImageLoad:p,crosshairStyle:a,elementBoxStyle:g,formatZoom:v,referenceImageUrl:n,formatDate:u=>u?new Date(u).toLocaleString():"N/A"}}},kae={class:"relative max-w-full max-h-full"},Eae=["src","alt"],Tae={class:"absolute top-1/2 left-1/2 translate-x-4 -translate-y-1/2 whitespace-nowrap rounded bg-red-500/90 px-1.5 py-0.5 text-xs font-mono text-white"},Rae={class:"sticky top-0 bg-[#1a1a1a] border-b border-[#2a2a2a] p-6 z-10"},Lae={class:"flex justify-between items-start"},Dae={class:"flex-1"},Aae={class:"text-2xl font-bold text-white mb-3"},Iae={class:"capitalize"},Mae={key:0,class:"text-gray-400 font-normal"},Oae={class:"flex flex-wrap gap-3"},Pae={class:"px-3 py-1.5 text-sm rounded uppercase bg-gray-500/20 text-gray-400"},Bae={key:1,class:"px-3 py-1.5 bg-green-500/20 text-green-400 text-sm rounded"},Hae={key:2,class:"px-3 py-1.5 bg-[#2a2a2a] text-gray-400 text-sm rounded font-mono"},qae={key:0,class:"mt-3 grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-2 text-sm"},Fae={key:0},Uae={class:"text-gray-300 font-mono"},Nae={key:1},$ae={class:"text-gray-300 font-mono"},Wae={key:2},zae={class:"text-gray-300 font-mono"},Vae={key:3},jae={class:"text-gray-300 font-mono"},Kae={key:4},Gae={class:"text-gray-300"},Xae={key:5},Yae={class:"text-green-400"},Jae={key:6},Zae={class:"text-gray-300 font-mono"},Qae={key:7},ele={class:"text-gray-300 font-mono"},tle={key:1,class:"mt-3 text-sm text-gray-500"},sle={class:"flex items-center gap-2 flex-shrink-0 ml-4"},rle={class:"p-8"},ile={class:"grid grid-cols-1 lg:grid-cols-2 gap-8"},nle={class:"text-lg text-white mb-3"},ole={key:0,class:"text-sm text-gray-400 ml-2"},ale={class:"relative overflow-hidden rounded border border-[#2a2a2a] shadow-2xl bg-[#0a0a0a]"},lle=["src","alt"],cle={class:"absolute top-1/2 left-1/2 translate-x-3 -translate-y-1/2 whitespace-nowrap rounded bg-red-500/90 px-1.5 py-0.5 text-[11px] font-mono text-white"},ule={key:3,class:"w-full aspect-video flex items-center justify-center"},hle={key:0,class:"lg:col-span-2"},dle={class:"relative overflow-hidden rounded border border-[#2a2a2a] shadow-lg bg-[#0a0a0a] inline-block"},fle=["src","alt"],ple={class:"bg-[#1e1e1e] rounded border border-[#2a2a2a] p-4 overflow-auto",style:{"max-height":"600px"}},mle={key:0,class:"text-gray-300 whitespace-pre-wrap"},_le={key:1,class:"text-gray-500"},gle={key:0,class:"mt-4"},vle={class:"bg-[#1e1e1e] rounded border border-red-500/30 p-4"},yle={class:"text-red-300 whitespace-pre-wrap"};function ble(s,t,r,p,a,g){var v,n,c,u,w;return r.interaction?(F(),N("div",{key:0,onClick:t[6]||(t[6]=f=>s.$emit("close")),class:"fixed inset-0 bg-black bg-opacity-90 flex items-center justify-center z-50 p-8"},[p.fullscreen?(F(),N("div",{key:0,onClick:t[1]||(t[1]=xt(f=>p.fullscreen=!1,["stop"])),class:"fixed inset-0 z-60 bg-black flex items-center justify-center cursor-zoom-out"},[R("div",kae,[R("img",{src:r.interaction.signedScreenshotUrl,alt:r.interaction.prompt||r.interaction.type,class:"max-w-full max-h-full object-contain",onLoad:t[0]||(t[0]=(...f)=>p.onImageLoad&&p.onImageLoad(...f))},null,40,Eae),p.elementBoxStyle?(F(),N("div",{key:0,class:"absolute pointer-events-none border-2 border-red-500/70 bg-red-500/10 rounded-sm",style:qe(p.elementBoxStyle)},null,4)):Q("",!0),p.crosshairStyle?(F(),N("div",{key:1,class:"absolute pointer-events-none",style:qe(p.crosshairStyle)},[t[7]||(t[7]=R("div",{class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-10 h-[2px] bg-red-500 opacity-80"},null,-1)),t[8]||(t[8]=R("div",{class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 h-10 w-[2px] bg-red-500 opacity-80"},null,-1)),t[9]||(t[9]=R("div",{class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-3 h-3 rounded-full border-2 border-red-500 bg-red-500/30"},null,-1)),R("div",Tae,Z(r.interaction.coordinates.x)+", "+Z(r.interaction.coordinates.y),1)],4)):Q("",!0)])])):(F(),N("div",{key:1,onClick:t[5]||(t[5]=xt(()=>{},["stop"])),class:"bg-[#1a1a1a] rounded-lg max-w-5xl w-full max-h-[95vh] overflow-auto border border-[#2a2a2a]"},[R("div",Rae,[R("div",Lae,[R("div",Dae,[R("h3",Aae,[R("span",Iae,Z(r.interaction.type),1),r.interaction.prompt?(F(),N("span",Mae,' "'+Z(r.interaction.prompt)+'" ',1)):Q("",!0)]),R("div",Oae,[R("span",Pae,Z(r.interaction.type),1),R("span",{class:xe([r.interaction.success!==!1?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400","px-3 py-1.5 text-sm rounded uppercase"])},Z(r.interaction.success!==!1?"success":"failed"),3),r.interaction.confidence!=null?(F(),N("span",{key:0,class:xe(["px-3 py-1.5 text-sm rounded",r.interaction.confidence>=.8?"bg-green-500/20 text-green-400":r.interaction.confidence>=.5?"bg-yellow-500/20 text-yellow-400":"bg-red-500/20 text-red-400"])},Z((r.interaction.confidence*100).toFixed(0))+"% confidence ",3)):Q("",!0),r.interaction.duration?(F(),N("span",Bae,Z(r.interaction.duration)+"ms ",1)):Q("",!0),r.interaction.coordinates?(F(),N("span",Hae," ("+Z(r.interaction.coordinates.x)+", "+Z(r.interaction.coordinates.y)+") ",1)):Q("",!0),r.interaction.verify!=null?(F(),N("span",{key:3,class:xe(["px-3 py-1.5 text-sm rounded font-mono",r.interaction.verify?"bg-blue-500/20 text-blue-400":"bg-[#2a2a2a] text-gray-400"])}," verify "+Z(r.interaction.verify?"on":"off"),3)):Q("",!0),r.interaction.zoom!=null?(F(),N("span",{key:4,class:xe(["px-3 py-1.5 text-sm rounded font-mono",r.interaction.zoom?"bg-blue-500/20 text-blue-400":"bg-[#2a2a2a] text-gray-400"])}," zoom "+Z(p.formatZoom(r.interaction.zoom)),3)):Q("",!0)]),r.interaction.coordinates||r.interaction.duration||r.interaction.similarity!=null||((v=r.interaction.selector)==null?void 0:v.elementBounds)||r.interaction.verify!=null||r.interaction.zoom!=null?(F(),N("div",qae,[r.interaction.coordinates?(F(),N("div",Fae,[t[10]||(t[10]=R("span",{class:"text-gray-500"},"X",-1)),R("p",Uae,Z(r.interaction.coordinates.x),1)])):Q("",!0),r.interaction.coordinates?(F(),N("div",Nae,[t[11]||(t[11]=R("span",{class:"text-gray-500"},"Y",-1)),R("p",$ae,Z(r.interaction.coordinates.y),1)])):Q("",!0),(c=(n=r.interaction.selector)==null?void 0:n.elementBounds)!=null&&c.width?(F(),N("div",Wae,[t[12]||(t[12]=R("span",{class:"text-gray-500"},"Width",-1)),R("p",zae,Z(r.interaction.selector.elementBounds.width),1)])):Q("",!0),(w=(u=r.interaction.selector)==null?void 0:u.elementBounds)!=null&&w.height?(F(),N("div",Vae,[t[13]||(t[13]=R("span",{class:"text-gray-500"},"Height",-1)),R("p",jae,Z(r.interaction.selector.elementBounds.height),1)])):Q("",!0),r.interaction.similarity!=null?(F(),N("div",Kae,[t[14]||(t[14]=R("span",{class:"text-gray-500"},"Similarity",-1)),R("p",Gae,Z((r.interaction.similarity*100).toFixed(0))+"%",1)])):Q("",!0),r.interaction.duration?(F(),N("div",Xae,[t[15]||(t[15]=R("span",{class:"text-gray-500"},"Duration",-1)),R("p",Yae,Z(r.interaction.duration)+"ms",1)])):Q("",!0),r.interaction.verify!=null?(F(),N("div",Jae,[t[16]||(t[16]=R("span",{class:"text-gray-500"},"Verify",-1)),R("p",Zae,Z(r.interaction.verify?"on":"off"),1)])):Q("",!0),r.interaction.zoom!=null?(F(),N("div",Qae,[t[17]||(t[17]=R("span",{class:"text-gray-500"},"Zoom",-1)),R("p",ele,Z(p.formatZoom(r.interaction.zoom)),1)])):Q("",!0)])):Q("",!0),r.interaction.createdAt?(F(),N("p",tle,Z(p.formatDate(r.interaction.createdAt)),1)):Q("",!0)]),R("div",sle,[R("button",{onClick:t[2]||(t[2]=f=>s.$emit("close")),class:"text-gray-400 hover:text-white text-3xl leading-none w-10 h-10 flex items-center justify-center rounded hover:bg-[#2a2a2a] transition-colors"}," \xD7 ")])])]),R("div",rle,[R("div",ile,[R("div",null,[R("h4",nle,[t[18]||(t[18]=De(" Screenshot ",-1)),r.interaction.coordinates?(F(),N("span",ole," ("+Z(r.interaction.coordinates.x)+", "+Z(r.interaction.coordinates.y)+") ",1)):Q("",!0)]),R("div",ale,[r.interaction.signedScreenshotUrl?(F(),N("img",{key:0,src:r.interaction.signedScreenshotUrl,alt:r.interaction.prompt||r.interaction.type,class:"w-full h-auto cursor-zoom-in hover:opacity-80 transition-opacity",onClick:t[3]||(t[3]=f=>p.fullscreen=!0),onLoad:t[4]||(t[4]=(...f)=>p.onImageLoad&&p.onImageLoad(...f))},null,40,lle)):Q("",!0),p.elementBoxStyle?(F(),N("div",{key:1,class:"absolute pointer-events-none border-2 border-red-500/70 bg-red-500/10 rounded-sm",style:qe(p.elementBoxStyle)},null,4)):Q("",!0),p.crosshairStyle?(F(),N("div",{key:2,class:"absolute pointer-events-none",style:qe(p.crosshairStyle)},[t[19]||(t[19]=R("div",{class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-8 h-[2px] bg-red-500 opacity-80"},null,-1)),t[20]||(t[20]=R("div",{class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 h-8 w-[2px] bg-red-500 opacity-80"},null,-1)),t[21]||(t[21]=R("div",{class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-2.5 h-2.5 rounded-full border-2 border-red-500 bg-red-500/30"},null,-1)),R("div",cle,Z(r.interaction.coordinates.x)+", "+Z(r.interaction.coordinates.y),1)],4)):r.interaction.signedScreenshotUrl?Q("",!0):(F(),N("div",ule,[...t[22]||(t[22]=[R("span",{class:"text-gray-600 text-lg"},"No screenshot available",-1)])]))])]),p.referenceImageUrl?(F(),N("div",hle,[t[23]||(t[23]=R("h4",{class:"text-lg text-white mb-3"},"Reference Image",-1)),R("div",dle,[R("img",{src:p.referenceImageUrl,alt:"Reference: "+(r.interaction.prompt||r.interaction.type),class:"max-w-full max-h-64 h-auto object-contain"},null,8,fle)])])):Q("",!0),R("div",null,[t[26]||(t[26]=R("h4",{class:"text-lg text-white mb-3"},"AI Reasoning",-1)),R("div",ple,[r.interaction.reasoning?(F(),N("div",mle,Z(r.interaction.reasoning),1)):(F(),N("div",_le,[...t[24]||(t[24]=[R("p",null,"No reasoning available",-1)])]))]),r.interaction.error?(F(),N("div",gle,[t[25]||(t[25]=R("h4",{class:"text-lg text-red-400 mb-3"},"Error",-1)),R("div",vle,[R("div",yle,Z(r.interaction.error),1)])])):Q("",!0)])])])]))])):Q("",!0)}var wle=st(Cae,[["render",ble]]);const Sle=5e3,xle=500,Cle={name:"ReplayInteractions",components:{BoltIcon:my,CacheEntryModal:Yy,InteractionScreenshotModal:wle},props:{replayId:{type:String,required:!0},shareKey:{type:String,default:null},additionalHeaders:{type:Object,default:()=>({})},videoTime:{type:Number,default:0}},emits:["setVideoTime","interactionsLoaded","interactionHover"],data(){return{isLoading:!0,testCases:[],interactions:[],hasSession:!1,sessionId:null,
46selectedCacheEntry:null,selectedScreenshot:null,hoveredTime:null,anchorTimestamp:null,pendingScrollInteractionId:null}},computed:{filteredInteractions(){return this.interactions},activeInteractionId(){const s=this.findInteractionAt(this.videoTime);return s?s.id:null}},watch:{videoTime(){this.pendingScrollInteractionId&&this.scrollToPendingInteraction()}},created(){this.itemRefs={}},mounted(){console.log("ReplayInteractions mounted!",{replayId:this.replayId,shareKey:this.shareKey}),this.loadInteractions()},methods:{async loadInteractions(){var s,t,r,p,a,g,v,n,c,u,w;this.isLoading=!0;try{await or();const f={...this.additionalHeaders};(t=(s=this.$store)==null?void 0:s.state)!=null&&t.token&&(f.Authorization=`Bearer ${this.$store.state.token}`);const y=await Cloud.replayGet.with({replayId:this.replayId,...this.shareKey&&{shareKey:this.shareKey}}).headers(f);if(!y||!y.replay)throw new Error("Replay not found");const x=y.replay;x.clientStartDate&&(this.anchorTimestamp=x.clientStartDate,console.log("Anchor timestamp set from replay.clientStartDate:",this.anchorTimestamp));let T=x.tdTestCase;if(!T){console.log("No tdTestCase on replay, searching for test case...");const d=await Cloud.testdriverInteractionsByReplay.with({replayId:this.replayId,shareKey:this.shareKey}).headers(f);this.interactions=d.interactions||[],this.hasSession=d.hasSession,this.sessionId=d.sessionId,this.$emit("interactionsLoaded",this.interactions),this.queueDeepLinkScroll();return}console.log("Loading interactions for test case:",T);const b=await Cloud.testdriverInteractionsByTestcase.with({testCaseId:T}).headers(f);console.log("Interactions data:",b),console.log("Sample interaction:",(r=b.interactions)==null?void 0:r[0]),console.log("Interaction fields:",Object.keys(((p=b.interactions)==null?void 0:p[0])||{})),console.log("timestamp:",(g=(a=b.interactions)==null?void 0:a[0])==null?void 0:g.timestamp),console.log("time:",(n=(v=b.interactions)==null?void 0:v[0])==null?void 0:n.time),console.log("createdAt:",(u=(c=b.interactions)==null?void 0:c[0])==null?void 0:u.createdAt),this.interactions=b.interactions||[],this.hasSession=b.hasSession,this.sessionId=b.sessionId,this.$emit("interactionsLoaded",this.interactions),this.queueDeepLinkScroll()}catch(f){console.error("Failed to load interactions:",f),(w=this.$toast)==null||w.open({message:"Failed to load interactions",type:"error"})}finally{this.isLoading=!1}},getTypeColor:Jy,getTypeIcon:Zy,formatTime(s){const t=this.getRelativeTimestamp(s);if(t===void 0)return"--:--";const r=Math.floor(t/1e3),p=Math.floor(r/3600),a=Math.floor(r%3600/60),g=r%60;return p>0?`${p}:${String(a).padStart(2,"0")}:${String(g).padStart(2,"0")}`:`${a}:${String(g).padStart(2,"0")}`},formatInput(s){return typeof s=="string"?s:typeof s=="object"?s.text?s.text:s.keys?s.keys.join(" + "):s.direction?`${s.direction} (${s.amount||"default"})`:JSON.stringify(s):String(s)},openImageModal(s){var t;(t=s.selector)!=null&&t.id?this.selectedCacheEntry=s:this.selectedScreenshot=s},closeImageModal(){this.selectedCacheEntry=null,this.selectedScreenshot=null},async onModalDelete(s){var p,a,g,v,n,c;const t=((p=s.selector)==null?void 0:p.id)||s.id,r=s.cacheType||((a=s.selector)==null?void 0:a.cacheType)||"selector";if(!!confirm("Delete this cache entry?"))try{await or();const u={};(v=(g=this.$store)==null?void 0:g.state)!=null&&v.token&&(u.Authorization=`Bearer ${this.$store.state.token}`),await Cloud.cacheEntryDelete({id:t,cacheType:r}).headers(u),this.selectedCacheEntry=null,(n=this.$toast)==null||n.open({message:"Cache entry deleted",type:"success"})}catch(u){console.error("Failed to delete cache entry:",u),(c=this.$toast)==null||c.open({message:"Failed to delete cache entry",type:"error"})}},getElementType(s){var t;return((t=s.selector)==null?void 0:t.elementType)||s.elementType},getConfidenceStyle(s){return s>=.8?{color:"#4caf50"}:s>=.5?{color:"#ffc107"}:{color:"#f44336"}},getConfidenceLabelStyle(s){return s>=.8?{background:"#4caf5018"}:s>=.5?{background:"#ffc10718"}:{background:"#f4433618"}},getConfidenceValueStyle(s){return s>=.8?{background:"#4caf5010"}:s>
46=.5?{background:"#ffc10710"}:{background:"#f4433610"}},getInteractionDisplayValue(s){var t,r;return s.type==="type"&&((t=s.input)==null?void 0:t.text)?s.input.text:s.type==="pressKeys"&&Array.isArray((r=s.input)==null?void 0:r.keys)?s.input.keys.join(" + "):null},getInputAction(s){return typeof s=="object"&&s.action?s.action:null},getInputX(s){return typeof s=="object"&&s.x!=null?s.x:null},getInputY(s){return typeof s=="object"&&s.y!=null?s.y:null},formatZoom(s){return s?`${s}x`:"off"},getInputText(s){return typeof s=="string"?s:typeof s=="object"?s.text?s.text:s.keys?s.keys.join(" + "):s.direction?`${s.direction} (${s.amount||"default"})`:s.action||s.x!=null||s.y!=null?null:JSON.stringify(s):String(s)},getOs(s){var t;return((t=s.selector)==null?void 0:t.os)||s.os},getResolution(s){var t;return((t=s.selector)==null?void 0:t.resolution)||s.resolution},getRelativeTimestamp(s){if(s.timestamp!==void 0&&this.anchorTimestamp){if(s.timestamp>1e12){const t=s.timestamp-this.anchorTimestamp;return Math.max(0,t)}if(s.timestamp>0)return s.timestamp}if(s.clientTimestamp!==void 0&&this.anchorTimestamp){if(s.clientTimestamp>1e12){const t=s.clientTimestamp-this.anchorTimestamp;return Math.max(0,t)}if(s.clientTimestamp>0&&s.clientTimestamp<1e9)return s.clientTimestamp}if(s.createdAt&&this.anchorTimestamp){const r=new Date(s.createdAt).getTime()-this.anchorTimestamp;return Math.max(0,r)}return 0},findInteractionAt(s){const t=this.filteredInteractions;for(let r=t.length-1;r>=0;r-=1){const p=this.getRelativeTimestamp(t[r]);if(p<=s+xle)return s-p<=Sle?t[r]:null}return null},findNearestInteraction(s){let t=null,r=1/0;return this.filteredInteractions.forEach(p=>{const a=Math.abs(this.getRelativeTimestamp(p)-s);a<r&&(r=a,t=p)}),t},setItemRef(s,t){t?this.itemRefs[s]=t:delete this.itemRefs[s]},queueDeepLinkScroll(){const s=Number(this.$route.query.timestamp);if(!Number.isFinite(s)||s<=0)return;const t=this.findInteractionAt(s)||this.findNearestInteraction(s);!t||(this.pendingScrollInteractionId=t.id,this.$nextTick(()=>this.scrollToPendingInteraction()))},scrollToPendingInteraction(){const s=this.itemRefs[this.pendingScrollInteractionId],t=this.$refs.scrollContainer;if(!s||!t||!t.clientHeight)return;const r=s.getBoundingClientRect().top-t.getBoundingClientRect().top,p=t.scrollTop+r-(t.clientHeight-s.clientHeight)/2;t.scrollTo({top:Math.max(0,p),behavior:"smooth"}),this.pendingScrollInteractionId=null},async copyInteractionLink(s){var g,v,n;const t=this.getRelativeTimestamp(s),r={...this.$route.query};t!==void 0&&(r.timestamp=String(Math.round(t))),delete r.referrer;const{href:p}=this.$router.resolve({path:this.$route.path,query:r}),a=`${window.location.origin}${p}`;try{(g=navigator.clipboard)!=null&&g.writeText?await navigator.clipboard.writeText(a):await this.$copyText(a),(v=this.$toast)==null||v.open({message:"Link to step copied to clipboard",type:"info"})}catch(c){console.error("Failed to copy step link:",c),(n=this.$toast)==null||n.open({message:"Failed to copy link",type:"error"})}},onInteractionHover(s){const t=this.getRelativeTimestamp(s);this.$emit("interactionHover",!0),t!==void 0&&(this.hoveredTime=this.videoTime,this.$emit("setVideoTime",t))},onInteractionLeave(){this.$emit("interactionHover",!1),this.hoveredTime!==null&&(this.$emit("setVideoTime",this.hoveredTime),this.hoveredTime=null)},onInteractionClick(s){const t=this.getRelativeTimestamp(s);t!==void 0&&(this.hoveredTime=null,this.$emit("setVideoTime",t)),this.copyInteractionLink(s)}}},kle={class:"replay-interactions h-full flex flex-col"},Ele={key:0,class:"p-8 text-center"},Tle={key:1,class:"test-errors-empty-state"},Rle={key:2,class:"test-errors-empty-state"},Lle={key:3,class:"interactions-list flex-1 flex flex-col min-h-0 pt-2"},Dle={class:"interactions-sidebar-list",ref:"scrollContainer"},Ale={role:"list"},Ile=["onMouseenter","onClick"],Mle={class:"relative flex-shrink-0"},Ole=["innerHTML"],Ple={class:"min-w-0 flex-1"},Ble={class:"flex items-start gap-2"},Hle={class:"flex-1 min-w-0 pb-2"},qle={key:0,class:"text-gray-300"},Fle={key:1,class:"text-gray-300"},Ule={key:0,class:"flex flex-wrap gap-1.5"},Nle={key:0,class:"inline-flex items-center rounded overflow-hidden text-xs font-mono",style:{color:"#999"}},$le={class:"px-1.5 py-0.5",style:{background:"#2a2a2a"}},Wle={key:1,class:"inline-flex items-center rounded overflow-hidden text-xs font-mono",style:{color:"#999"}},zle={class:"px-1.5 py-0.5",style:{background:"#2a2a2a"}},Vle={key:2,class:"inline-flex items-center rounded overflow-hidden text-xs font-mono",style:{color:"#999"}},jle={class:"px-1.5 py-0.5",style:{background:"#2a2a2a"}},Kle={key:3,class:"inline-flex items-center rounded overflow-hidden text-xs font-mono",style:{color:"#999"}},Gle={class:"px-1.5 py-0.5",style:{background:"#2a2a2a"}},Xle={key:4,class:"inline-flex items-center rounded overflow-hidden text-xs font-mono",style:{color:"#999"}},Yle={class:"px-1.5 py-0.5",style:{background:"#2a2a2a"}},Jle={key:5,class:"inline-flex items-center rounded px-1.5 py-0.5 text-xs font-mono",style:{background:"#2a2a2a",color:"#999"}},Zle={key:6,class:"inline-flex items-center rounded px-1.5 py-0.5 text-xs font-mono",style:{background:"#2a2a2a",color:"#999"}},Qle={key:7,class:"inline-flex items-center rounded overflow-hidden text-xs font-mono",style:{color:"#999"}},ece={class:"px-1.5 py-0.5",style:{background:"#2a2a2a"}},tce={key:8,class:"inline-flex items-center rounded overflow-hidden text-xs font-mono",style:{color:"#999"}},sce={class:"px-1.5 py-0.5",style:{background:"#2a2a2a"}},rce={key:9,class:"inline-flex items-center rounded px-1.5 py-0.5 text-xs font-mono",style:{background:"#2a2a2a",color:"#999"}},ice={key:10,class:"inline-flex items-center rounded px-1.5 py-0.5 text-xs font-mono",style:{background:"#2a2a2a",color:"#999"}},nce={key:11,class:"inline-flex items-center rounded overflow-hidden text-xs font-mono",style:{color:"#f44336"}},oce={class:"px-1.5 py-0.5",style:{background:"#f4433610"}},ace={key:1,class:"mt-1 text-gray-500 italic",style:{"font-size":"13px"}},lce={class:"flex flex-col items-end gap-1 flex-shrink-0"},cce={class:"flex items-center gap-1"},uce={class:"text-xs text-gray-500"},hce={key:0,class:"relative"},dce={key:0,class:"absolute inset-0 z-10 flex items-center justify-center pointer-events-none"},fce={class:"inline-flex items-center justify-center rounded-full w-5 h-5 text-xs bg-yellow-900/80 text-yellow-400",title:"Cached"},pce=["src","alt","onClick"],mce=["src","alt","onClick"],_ce=["src","alt","onClick"];function gce(s,t,r,p,a,g){const v=re("BoltIcon"),n=re("CacheEntryModal"),c=re("InteractionScreenshotModal");return F(),N("div",kle,[a.isLoading?(F(),N("div",Ele,[...t[1]||(t[1]=[R("div",{class:"spinner"},null,-1),R("p",{class:"mt-4 text-gray-400"},"Loading interactions...",-1)])])):a.hasSession?a.interactions.length===0?(F(),N("div",Rle,[...t[3]||(t[3]=[R("svg",{class:"empty-icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"})],-1),R("h3",{class:"empty-title"},"No Interactions Yet",-1),R("p",{class:"empty-text"}," No interactions have been tracked for this test session. ",-1)])])):(F(),N("div",Lle,[R("div",Dle,[R("ul",Ale,[(F(!0),N(Me,null,je(g.filteredInteractions,(u,w)=>(F(),N("li",{key:u.id,ref_for:!0,ref:f=>g.setItemRef(u.id,f)},[R("div",{class:xe(["relative px-2 py-2 hover:bg-gray-900/50 transition-colors cursor-pointer",{"interaction-active":u.id===g.activeInteractionId}]),onMouseenter:f=>g.onInteractionHover(u),onMouseleave:t[0]||(t[0]=f=>g.onInteractionLeave()),onClick:f=>g.onInteractionClick(u)},[w!==a.interactions.length-1?(F(),N("span",{key:0,class:"absolute left-[28px] top-[52px] w-0.5",style:qe({height:"calc(100% - 52px)",background:g.getTypeColor(u.type).bg}),"aria-hidden":"true"},null,4)):Q("",!0),R("div",{class:"relative flex items-start gap-3",style:qe({opacity:g.getRelativeTimestamp(u)!==void 0&&r.videoTime<g.getRelativeTimestamp(u)&&g.getRelativeTimestamp(u)>0?.5:1})},[R("div",Mle,[R("div",{class:"interaction-icon flex w-10 h-10 items-center justify-center rounded-full ring-8",style:qe({background:g.getTypeColor(u.type).bg,borderColor:g.getTypeColor(u.type).bg,"--tw-ring-color":"rgb(10, 10, 10)"})},[(F(),N("svg",{class:"w-5 h-5",style:qe({color:g.getTypeColor(u.type).text}),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",innerHTML:g.getTypeIcon(u.type)},null,12,Ole))],4),R("span",{class:xe(["absolute -right-0.5 -bottom-0.5 rounded-full w-4 h-4 flex items-center justify-center text-xs font-bold",u.success!==!1?"bg-green-600 text-white":"bg-red-600 text-white"])},Z(u.success!==!1?"\u2713":"\u2715"),3)]),R("div",Ple,[R("div",Ble,[R("div",Hle,[R("p",{class:xe(["text-sm mb-1",{"mb-2":u.co
46ordinates||g.getElementType(u)||u.input||u.duration||u.similarity!=null||u.verify!=null||u.zoom!=null||u.error}])},[R("span",{class:"capitalize",style:qe({color:g.getTypeColor(u.type).text})},Z(u.type),5),u.prompt?(F(),N("span",qle,' "'+Z(u.prompt)+'" ',1)):g.getInteractionDisplayValue(u)?(F(),N("span",Fle,' "'+Z(g.getInteractionDisplayValue(u))+'" ',1)):Q("",!0)],2),u.coordinates||g.getElementType(u)||u.input||u.duration||u.similarity!=null||u.verify!=null||u.zoom!=null||u.error?(F(),N("div",Ule,[u.similarity!=null?(F(),N("span",Nle,[t[4]||(t[4]=R("span",{class:"px-1.5 py-0.5",style:{background:"#222"}},"similarity",-1)),R("span",$le,Z((u.similarity*100).toFixed(0))+"%",1)])):Q("",!0),u.verify!=null?(F(),N("span",Wle,[t[5]||(t[5]=R("span",{class:"px-1.5 py-0.5",style:{background:"#222"}},"verify",-1)),R("span",zle,Z(u.verify?"on":"off"),1)])):Q("",!0),u.zoom!=null?(F(),N("span",Vle,[t[6]||(t[6]=R("span",{class:"px-1.5 py-0.5",style:{background:"#222"}},"zoom",-1)),R("span",jle,Z(g.formatZoom(u.zoom)),1)])):Q("",!0),u.coordinates?(F(),N("span",Kle,[t[7]||(t[7]=R("span",{class:"px-1.5 py-0.5",style:{background:"#222"}},"x",-1)),R("span",Gle,Z(u.coordinates.x),1)])):Q("",!0),u.coordinates?(F(),N("span",Xle,[t[8]||(t[8]=R("span",{class:"px-1.5 py-0.5",style:{background:"#222"}},"y",-1)),R("span",Yle,Z(u.coordinates.y),1)])):Q("",!0),g.getElementType(u)?(F(),N("span",Jle,Z(g.getElementType(u)),1)):Q("",!0),u.input&&g.getInputAction(u.input)?(F(),N("span",Zle,Z(g.getInputAction(u.input)),1)):Q("",!0),u.input&&g.getInputX(u.input)!=null?(F(),N("span",Qle,[t[9]||(t[9]=R("span",{class:"px-1.5 py-0.5",style:{background:"#222"}},"input x",-1)),R("span",ece,Z(g.getInputX(u.input)),1)])):Q("",!0),u.input&&g.getInputY(u.input)!=null?(F(),N("span",tce,[t[10]||(t[10]=R("span",{class:"px-1.5 py-0.5",style:{background:"#222"}},"input y",-1)),R("span",sce,Z(g.getInputY(u.input)),1)])):Q("",!0),u.input&&g.getInputText(u.input)?(F(),N("span",rce,Z(g.getInputText(u.input)),1)):Q("",!0),u.duration?(F(),N("span",ice,Z((u.duration/1e3).toFixed(2))+"s ",1)):Q("",!0),u.error?(F(),N("span",nce,[t[11]||(t[11]=R("span",{class:"px-1.5 py-0.5",style:{background:"#f4433618"}},"error",-1)),R("span",oce,Z(u.error),1)])):Q("",!0)])):Q("",!0),u.reasoning?(F(),N("p",ace,Z(u.reasoning),1)):Q("",!0)]),R("div",lce,[R("div",cce,[R("span",uce,Z(g.formatTime(u)),1)]),u.signedCroppedImageUrl||u.signedImageUrl||u.signedScreenshotUrl?(F(),N("div",hce,[u.cacheHit?(F(),N("span",dce,[R("span",fce,[ee(v,{class:"w-3 h-3"})])])):Q("",!0),u.signedCroppedImageUrl?(F(),N("img",{key:1,src:u.signedCroppedImageUrl,alt:`Step ${w+1}`,class:"w-16 h-12 rounded border border-gray-700 object-contain bg-gray-900/50 hover:opacity-80 transition-opacity cursor-pointer",onClick:xt(f=>g.openImageModal(u),["stop"])},null,8,pce)):u.signedImageUrl?(F(),N("img",{key:2,src:u.signedImageUrl,alt:`Step ${w+1}`,class:"w-16 h-12 rounded border border-gray-700 object-contain bg-gray-900/50 hover:opacity-80 transition-opacity cursor-pointer",onClick:xt(f=>g.openImageModal(u),["stop"])},null,8,mce)):u.signedScreenshotUrl?(F(),N("img",{key:3,src:u.signedScreenshotUrl,alt:`Step ${w+1}`,class:"w-16 h-12 rounded border border-gray-700 object-contain bg-gray-900/50 hover:opacity-80 transition-opacity cursor-pointer",onClick:xt(f=>g.openImageModal(u),["stop"])},null,8,_ce)):Q("",!0)])):Q("",!0)])])])],4)],42,Ile)]))),128))])],512)])):(F(),N("div",Tle,[...t[2]||(t[2]=[R("svg",{class:"empty-icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1),R("h3",{class:"empty-title"},"No Test Session Found",-1),R("p",{class:"empty-text"}," This replay doesn't have an associated TestDriver session. ",-1)])])),ee(n,{entry:a.selectedCacheEntry,onClose:g.closeImageModal,onDelete:g.onModalDelete},null,8,["entry","onClose","onDelete"]),ee(c,{interaction:a.selectedScreenshot,onClose:g.closeImageModal},null,8,["interaction","onClose"])])}var vce=st(Cle,[["render",gce],["__scopeId","data-v-50d29c9e"]]);const yce={name:"TestErrorDisplay",props:{errorMessage:{type:String,default:null},errorStack:{type:String,default:null},repo:{type:String,default:null},branch:{type:String,default:null},commit:{type:String,default:null},projectRoot:{type:String,default:null}},computed:{parsedStackTrace(){if(!this.errorStack)return[];const s=this.errorStack.split(` 47`),t=[],r=/^\s*at\s+(?:(.+?)\s+\()?(.+?):(\d+)(?::(\d+))?\)?$/;for(const p of s){const a=p.match(r);if(a){const[,g,v,n,c]=a,u={type:"frame",function:(g==null?void 0:g.trim())||null,absolutePath:v.trim(),line:n,column:c}
47,w=this.getPathInfo(u.absolutePath);u.displayPath=w.displayPath,u.githubUrl=w.githubUrl,t.push(u)}else t.push({type:"text",text:p})}return t}},methods:{getPathInfo(s){let t=null,r=s;if(this.projectRoot&&s.startsWith(this.projectRoot))t=s.slice(this.projectRoot.length).replace(/^\//,""),r=t;else{const a=["/cli/","/api/","/web/","/app/"];for(const g of a){const v=s.indexOf(g);if(v!==-1){t=s.slice(v+g.length),r=t;break}}}let p=null;if(this.repo&&(this.commit||this.branch)&&t){const a=this.commit||this.branch;p=`https://github.com/${this.repo}/blob/${a}/${t}`}return{displayPath:r,githubUrl:p}}}},bce={key:0,class:"error-details-section w-full"},wce={key:0,class:"error-section"},Sce={class:"error-message"},xce={key:1,class:"error-section"},Cce={class:"error-stack"},kce={key:0,class:"stack-text"},Ece={key:0,class:"stack-function"},Tce={class:"stack-location"},Rce=["href","title"],Lce={key:0},Dce={key:0},Ace={key:1};function Ice(s,t,r,p,a,g){return r.errorMessage||r.errorStack?(F(),N("div",bce,[r.errorMessage?(F(),N("div",wce,[t[0]||(t[0]=R("div",{class:"error-header"},"Error Message",-1)),R("pre",Sce,Z(r.errorMessage),1)])):Q("",!0),r.errorStack?(F(),N("div",xce,[t[5]||(t[5]=R("div",{class:"error-header"},"Stack Trace",-1)),R("div",Cce,[(F(!0),N(Me,null,je(g.parsedStackTrace,(v,n)=>(F(),N("div",{key:n,class:"stack-line"},[v.type==="text"?(F(),N("span",kce,Z(v.text),1)):v.type==="frame"?(F(),N(Me,{key:1},[t[4]||(t[4]=R("span",{class:"stack-at"},"at ",-1)),v.function?(F(),N("span",Ece,Z(v.function),1)):Q("",!0),R("span",Tce,[v.githubUrl?(F(),N(Me,{key:0},[t[1]||(t[1]=De(" (",-1)),R("a",{href:v.githubUrl,target:"_blank",class:"github-link",title:v.absolutePath},[De(Z(v.displayPath)+":"+Z(v.line),1),v.column?(F(),N("span",Lce,":"+Z(v.column),1)):Q("",!0)],8,Rce),t[2]||(t[2]=De(") ",-1))],64)):(F(),N(Me,{key:1},[De(" ("+Z(v.displayPath),1),v.line?(F(),N("span",Dce,":"+Z(v.line),1)):Q("",!0),v.column?(F(),N("span",Ace,":"+Z(v.column),1)):Q("",!0),t[3]||(t[3]=De(") ",-1))],64))])],64)):Q("",!0)]))),128))])])):Q("",!0)])):Q("",!0)}var Mce=st(yce,[["render",Ice],["__scopeId","data-v-86547006"]]);const Zu={info:(...s)=>console.log("[INFO]",...s),warn:(...s)=>console.warn("[WARN]",...s),error:(...s)=>console.error("[ERROR]",...s),debug:(...s)=>console.debug("[DEBUG]",...s)};async function Qu(s,{retries:t=3,baseDelay:r=500,maxDelay:p=5e3,shouldRetry:a=()=>!0}={}){let g=0;for(;;)try{return await s(g)}catch(v){if(g+=1,g>t||!a(v))throw v;const n=Math.min(p,r*2**(g-1)),c=n*.2*Math.random();await new Promise(u=>setTimeout(u,n+c))}}const Oce=[],Pce=[{name:"Go to Dashboard",href:"/"}],Bce={components:{MenuVue:fa,MenuButton:pa,MenuItem:ma,MenuItems:_a,EllipsisVerticalIcon:_y,Disclosure:e1,DisclosureButton:t1,DisclosurePanel:s1,Bars3Icon:gy,XMarkIcon:vy,Spinner:la,ExclamationTriangleIcon:yy,DeleteReplayModal:X1,MoveReplayModal:cb,CloneReplayModal:kb,ReplayCommentCreate:Vb,ReplayComments:nw,ChevronDoubleLeftIcon:by,LinkIcon:wy,ArrowsPointingOutIcon:Sy,ChevronDoubleRightIcon:xy,ChevronRightIcon:na,ChevronLeftIcon:oh,ReplayDevice:Tre,ApplicationLogs:Ute,WebLogs:Qie,ReplayShareMenu:Lne,ReplayTimeline:Nb,PerformanceCharts:xae,ReplayInteractions:vce,TestErrorDisplay:Mce,TestHistorySidebar:Qy},inject:["auth"],props:{replayId:{type:String,default:null},shareKey:{type:String,default:null},isEmbedded:{type:Boolean,default:!1},errorMessage:{type:String,default:null},errorStack:{type:String,default:null}},setup(){const s=$e(!1),t=$e(!1),r=$e(!1),p=eh({title:"Replay - TestDriver",description:"Watch my desktop replay on TestDriver!",image:""}),a=Date.now();return Cy({title:be(()=>`TestDriver - ${p.title}`),meta:[{name:"description",content:be(()=>p.description?p.description:"Watch my desktop replay on TestDriver!")},{name:"og:site_name",content:be(()=>"TestDriver")},{name:"og:title",content:be(()=>p.title)},{name:"og:image",content:be(()=>p.image)},{name:"twitter:site",content:"testdriverai"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:be(()=>p.title)},{name:"twitter:description",content:be(()=>p.description?p.description:"Watch my replay on TestDriver!")},{name:"twitter:image",content:be(()=>p.image)}]}),{openDeleteModal:s,metaTags:p,navigation:Oce,openMoveReplayModal:t,openCloneReplayModal:r,userNavigation:Pce,t0:a}},data(){return{user:null,replay:null,replayUrl:null,optimizedReplayUrl:null,isLoading:!0,isMetaDataLoaded:!1,isConverting:!1,isPlaying:!1,hasPlayed:!1,loadedPreviewImage:!1,loadedReplayVideo:!1,triggeredVideoLoadError:!1,publicShare:!0,aditionalHeaders:{},loadAttempts:0,errorType:"",error:"",accessRequestSent:!1,isEditingTitle:!1,editReplay:{title:"",access:""},requestInProgress:!1,viewedReplayHalfway:!1,videoPlaybackRate:2,videoDuratoin:0,currentTab:"interactions",activeButtonClass:"text-white",inactiveButtonClass:"text-slate-400 hover:bg-slate-600",videoTime:0,canUpdateReplay:!1,showReplayMeta:!0,skipDowntime:!0,tabs:[{baseName:"Steps",name:"Steps",id:"interactions",href:"#",icon:"fa-solid fa-mouse-pointer"},{baseName:"Logs",name:"Logs",id:"application_logs",href:"#",icon:"fa-solid fa-terminal"},{baseName:"Browser",name:"Browser",id:"web_logs",href:"#",icon:"fa-solid fa-window-maximize"},{baseName:"Perf",name:"Perf",id:"Perf",href:"#",icon:"fa-solid fa-chart-line"},{baseName:"Env",name:"Env",id:"info",href:"#",icon:"fa-solid fa-server"},{baseName:"History",name:"History",id:"history",href:"#",icon:"fa-solid fa-clock-rotate-left"}],windowWidth:window.innerWidth,isLoadingLogs:!0,isLoadingPerformance:!1,performanceData:null,separatorLeft:7/12,isResizing:!1,timelineGroups:[],showVideoOverlay:!1,isMounted:!1,replayInteractions:[],testCases:[],isLoadingTestCases:!1,isInteractionHovered:!1,testHistoryData:null,isLoadingHistory:!1}},computed:{additionalHeaders(){const s={};return this.isEmbedded&&(s["X-Embedded"]="true"),s},deepLinkTimestamp(){const s=+this.$route.query.timestamp;return!Number.isFinite(s)||s<0?null:s},filteredTabs(){return this.isEmbedded?this.tabs.filter(s=>s.id!=="history"):this.tabs},isFullyLoaded(){return this.isMetaDataLoaded&&this.loadedReplayVideo&&!this.isLoadingLogs},videoWidth(){return this.showReplayMeta?this.isResizable?this.separatorLeft:this.screenIsAtLeastMd?7/12:1:1},metadataWidth(){return this.showReplayMeta?this.isResizable?1-this.separatorLeft:this.screenIsAtLeastMd?5/12:1:0},isResizable(){return this.screenIsAtLeastMd},screenIsAtLeastMd(){return this.windowWidth>=768},applicationLogs(){return this.renderLogs.filter(({log:t})=>t.type==="application"||t.type==="cli")},applicationLogsLength(){return this.applicationLogs.map(s=>Object.values(s.lines)).flat().flat().length},webLogs(){return this.renderLogs.find(({log:s})=>s.type==="web")},webLogsLength(){const s=["LOG_EVENT","LOG_ERROR","NAVIGATION_COMPLETED","SPA_NAVIGATION"];return this.webLogs?Object.values(this.webLogs.lines).flat().filter(t=>s.includes(t.type)).length:0},fullscreenLink(){return this.$route.href.replace("embed=true","")},showReplayLoadingDashed(){var s;return((s=this.replay)==null?void 0:s.status)!=="published"&&!this.loadedPreviewImage},showReplayPreview(){var s;return((s=this.replay)==null?void 0:s.status)==="draft"},replayScreenshotUrl(){var s,t,r;return(s=this.replay)!=null&&s.id?`${Wo()}/replay/${(t=this.replay)==null?void 0:t.id}/screenshot?shareKey=${(r=this.replay)==null?void 0:r.shareKey}`:""},replayGifUrl(){var s,t,r;return(s=this.replay)!=null&&s.id?`${Wo()}/replay/${(t=this.replay)==null?void 0:t.id}/gif?shareKey=${(r=this.replay)==null?void 0:r.shareKey}`:""},totalLogCount(){return this.renderLogs.length},failedTestCases(){const s=this.testCases.filter(t=>t.status==="failed"&&(t.errorMessage||t.errorStack));return this.errorMessage||this.errorStack?[{id:"current-test",errorMessage:this.errorMessage,errorStack:this.errorStack},...s]:s},errorCount(){var t;let s=this.failedTestCases.length;return((t=this.replay)==null?void 0:t.errorText)&&!this.failedTestCases.some(r=>r.errorMessage===this.replay.errorText)&&(s+=1),s},renderLogs(){if(!this.replay)return[];const s=[];return _.each(this.replay.logs,t=>{var p;let r=[];if(t.lines&&t.lines.length){try{r=t.lines.split(` 48`)}catch{return null}const a=_.map(r,(c,u)=>{if(!c)return null;try{const w=JSON.parse(c);return w.id=u,w}catch(w){return console.error(w),null}}),g=_.filter(a,c=>c);let v=0;g.length>0&&g[0].epoch&&((p=this.replay)==null?void 0:p.clientStartDate)&&(v=g[0].epoch-this.replay.clientStartDate);const n=_.map(g,(c,u)=>{const w={...c,displayTime:!0};return u!==0&&Math.abs(c.time-g[u-1].time)<500&&(w.displayTime=!1),w.time=c.time+v,w});s.push({lines:n,log:t})}}),s},replayIsInSameTeam(){var s,t,r,p,a;return((r=(t=(s=this.replay)==null?void 0:s.project)==null?void 0:t.team)==null?void 0:r.id)===((a=(p=this.user)==null?void 0:p.team)==null?void 0:a.id)}},watch:{replayInteractions(s){const t=this.tabs.find(r=>r.id==="interactions");t&&(t.count=s.length)},applicationLogsLength(s){const t=this.tabs.find(r=>r.id==="application_logs");t&&(t.count=Math.round(s))},webLogsLength(s){const t=this.tabs.find(r=>r.id==="web_logs");t&&(t.count=Math.round(s))},currentTab(s){s==="history"&&!this.testHistoryData&&!this.isLoadingHistory&&this.loadTestHistory()}},async mounted(){var s,t,r;document.addEventListener("keydown",this.handleKeyDown),window.addEventListener("resize",this.handleWindowResize),this.windowWidth=window.innerWidth,(s=window.analytics)==null||s.page(),await or(),typeof this.$route.query.skipDowntime!="undefined"?this.skipDowntime=this.$route.query.skipDowntime==="true"||this.$route.query.skipDowntime===!0:this.skipDowntime=!0,this.$store.state.token&&(this.aditionalHeaders=this.$store.state.token?{Authorization:`Bearer ${this.$store.state.token}`}:{},this.user=await Cloud.whoami().headers(this.aditionalHeaders).tolerate(p=>{console.error(p)})),this.isMounted=!0,await this.loadReplay({overWrite:!0}),((t=this.$route.query)==null?void 0:t.referrer)==="desktop"&&(this.editReplayT
48itle(!0),(r=this.$refs.description)==null||r.showEditor()),await this.autoCopyToClipboard()},beforeUnmount(){this.isMounted=!1,document.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("resize",this.handleWindowResize)},methods:{formatTimestamp(s){return wa(s)},getInteractionIcon(s){return{click:"fa-solid fa-mouse-pointer",type:"fa-solid fa-keyboard",pressKeys:"fa-solid fa-keyboard",scroll:"fa-solid fa-up-down-left-right",hover:"fa-solid fa-hand-pointer",drag:"fa-solid fa-hand-rock",assert:"fa-solid fa-check-circle",remember:"fa-solid fa-brain",wait:"fa-solid fa-clock",waitForText:"fa-solid fa-hourglass-half",waitForImage:"fa-solid fa-image",scrollUntilText:"fa-solid fa-search",scrollUntilImage:"fa-solid fa-search",focusApplication:"fa-solid fa-window-restore",find:"fa-solid fa-search",findAll:"fa-solid fa-search",exec:"fa-solid fa-code"}[s]||"fa-solid fa-circle"},formatInteractionInput(s){return s?typeof s=="string"?s:s.text?`"${s.text}"`:s.keys?s.keys.join(" + "):s.direction?`${s.direction} ${s.amount||""}`:JSON.stringify(s):""},resizePannels(s){!this.isResizing||s.clientX<576||this.windowWidth-s.clientX<450||(this.separatorLeft=s.clientX/this.windowWidth)},handleWindowResize(){this.windowWidth=window.innerWidth},getTabName(s,t){const r=t;return typeof r!="number"||Math.round(r)===0?s:`${s} (${Math.round(r).toLocaleString()})`},setPlaying(){var s;this.isPlaying=!0,(s=window.analytics)==null||s.track("Video is playing")},setPaused(){var s;(s=window.analytics)==null||s.track("Video is paused"),this.isPlaying=!1},onVideoSeeking(){var s;(s=window.analytics)==null||s.track("Video is being seeked")},onVideoSeeked(){var s;(s=window.analytics)==null||s.track("Video is seeked")},play(){this.$refs.videoReplay.play(),this.hasPlayed=!0},pause(){this.$refs.videoReplay.pause(),this.setPaused()},togglePlay(){this.isPlaying?this.pause():this.play()},setTab(s){s&&s.id&&(this.currentTab=s.id)},openDeleteReplayModal(){this.openDeleteModal=!0},closeReplayDeleteModal(){this.openDeleteModal=!1},openReplayMoveModal(){this.openMoveReplayModal=!0},openReplayCloneModal(){this.openCloneReplayModal=!0},closeReplayMoveModal(){this.openMoveReplayModal=!1},closeReplayCloneModal(){this.openCloneReplayModal=!1},setVideoPlaybackRate(s){this.$refs.videoReplay.playbackRate=s,this.videoPlaybackRate=s},async loadPerformanceData(){if(!!this.replay&&!!this.replay.performanceUrl){this.isLoadingPerformance=!0;try{const s=await Cloud.replayPerformanceDownload.with({replayId:this.replay.id,shareKey:this.shareKey}).headers(this.aditionalHeaders).tolerate(t=>(console.error("Failed to get performance download URL",t),null));if(s&&s.url){const r=(await fetch(s.url).then(p=>p.text())).trim().split(` 49`).filter(p=>p.length>0).map(p=>JSON.parse(p));if(r.length>0){const p=r[0],a=r[r.length-1];let g=0,v=0,n=0,c=0;r.forEach(w=>{var x,T;const f=((x=w.process)==null?void 0:x.cpu)||0,y=((T=w.process)==null?void 0:T.memory)||0;g+=f,v+=y,n=Math.max(n,f),c=Math.max(c,y)});const u=r.length;this.performanceData={samples:r,summary:{durationMs:a.timestamp-p.timestamp,sampleCount:u,avgProcessCPU:g/u,maxProcessCPU:n,avgProcessMemoryMB:v/u/(1024*1024),maxProcessMemoryMB:c/(1024*1024)}}}}}catch(s){console.error("Failed to load performance data from S3",s)}finally{this.isLoadingPerformance=!1}}},async loadTestCases(){var s;if(!!((s=this.replay)!=null&&s.id)){this.isLoadingTestCases=!0;try{const t=await Cloud.testdriverTestCasesByReplay.with({replayId:this.replay.id,...this.shareKey&&{shareKey:this.shareKey}}).headers(this.aditionalHeaders).tolerate(r=>(console.error("Failed to load test cases by replay",r),null));t&&t.testCases&&(this.testCases=t.testCases)}catch(t){console.error("Error loading test cases",t)}finally{this.isLoadingTestCases=!1}}},async loadReplay({overWrite:s,fields:t,trackedReplayView:r=!1}){var a,g,v,n,c,u,w,f,y,x,T,b,d,m;this.loadAttempts+=1;const p=await Cloud.replayGet.with({...this.replayId&&{replayId:this.replayId},...this.shareKey&&{shareKey:this.shareKey}}).headers(this.aditionalHeaders).tolerate(o=>(console.error(o),console.error(o.exit),{}));if(p!=null&&p.notFound){this.errorType="notFound",this.showReplayMeta=!1,this.isLoading=!1,(g=window.analytics)==null||g.track("Resource not found",{userId:(a=this.user)==null?void 0:a.id}),Zu.error("Replay.vue resource not found",{replay:this.replay,userId:(v=this.user)==null?void 0:v.id});return}if(p!=null&&p.notAllowed){this.errorType="notAllowed",this.showReplayMeta=!1,this.isLoading=!1;return}if(p!=null&&p.replay){if(this.replay&&!s){if(!t.length){this.isLoading=!1;return}this.replay=_.assign(this.replay,_.pick(p.replay,t))}else this.replay=p.replay;this.canUpdateReplay=p.canUpdateReplay}this.isLoading=!1,p.notFound?(this.errorType="notFound",this.showReplayMeta=!1,(c=window.analytics)==null||c.track("Resource not found",{userId:(n=this.user)==null?void 0:n.id}),console.error("Replay.vue resource not found",{replay:this.replay,userId:(u=this.user)==null?void 0:u.id})):p.notAllowed?(this.errorType="notAllowed",this.showReplayMeta=!1):(r||((y=window.analytics)==null||y.track("Replay View",{userId:(w=this.user)==null?void 0:w.id,canUpdateReplay:this.canUpdateReplay,replayId:(f=this.replay)==null?void 0:f.id}),console.log("Replay.vue Replay View",{replay:this.replay,canUpdateReplay:this.canUpdateReplay})),this.metaTags.title=this.replay.title,this.metaTags.description=this.replay.description,this.metaTags.image=this.replayGifUrl,this.editReplay.access=this.replay.access,window.prenderScrollingLogsSizeReady=!0,this.replay.status==="published"?((x=this.replay.logs)!=null&&x.length?Promise.allSettled(this.replay.logs.map(async o=>{var l;try{const S=await Qu(()=>Cloud.logDownload({logId:o.id,shareKey:this.shareKey}).headers(this.aditionalHeaders),{retries:3});o.lines=await Qu(()=>fetch(S.url).then(E=>E.text()),{retries:3})}catch(S){console.error("Failed to download replay log",o.id,S),Zu.error("Replay.vue log download failed",{logId:o.id,replayId:(l=this.replay)==null?void 0:l.id})}})).finally(()=>{this.isLoadingLogs=!1}):this.isLoadingLogs=!1,await this.loadPerformanceData(),this.loadTestCases(),await Cloud.replayVideoRedirect.with({replayId:(T=this.replay)==null?void 0:T.id,shareKey:(b=this.replay)==null?void 0:b.shareKey}).headers(this.aditionalHeaders).tolerate(o=>{console.error("replayVideoRedirect error",o)}).then(o=>{[this.optimizedReplayUrl,this.replayUrl]=o,St(()=>{this.isMounted&&this.$refs.videoReplay&&(this.$refs.videoReplay.currentTime=this.deepLinkTimestamp!==null?this.deepLinkTimestamp/1e3:0,this.setVideoPlaybackRate(this.$route.query.playbackRate?+this.$route.query.playbackRate:2))})})):(setTimeout(()=>{this.loadReplay({overWrite:!1,fields:["status","logs"],trackedReplayView:!0})},5e3),(m=window.analytics)==null||m.track("Replay.vue Replay Unpublished",{userId:(d=this.user)==null?void 0:d.id,canUpdateReplay:this.canUpdateReplay}),console.log("Replay.vue Trying To Load Unpublished Replay",{replay:this.replay})))},onReplayVideoLoaded(){var s,t;this.loadedReplayVideo=!0,(s=window.analytics)==null||s.track(`${this.isEmbedded?"Embedded ":""}Video Loaded`,{replay:this.replay,user:this.user}),this.videoPlaybackRate=(t=this.$refs.videoReplay)==null?void 0:t.playbackRate},onVideoMetadataLoaded(){if(console.info("Video metadata loaded"),this.isMetaDataLoaded=!0,!this.$refs.videoReplay){console.warn("Video ref is null when metadata loaded");return}this.videoDuration=this.$refs.videoReplay.duration,this.$refs.videoReplay.currentTime=this.deepLinkTimestamp!==null?Math.min(this.deepLinkTimestamp/1e3,this.$refs.videoReplay.duration):this.$refs.videoReplay.duration},async onVideoSourceLoadError(s){var t,r,p,a;if(console.warn("Main Video Load Source Error",s),(t=window.analytics)==null||t.track("Main Video Load Source Error",{replay:this.replay,user:this.user,err:s}),!this.triggeredVideoLoadError){if(this.triggeredVideoLoadError=!0,this.loadedReplayVideo){console.log("Replay video is already loaded so better to wait till it plays",s),(r=window.analytics)==null||r.track("Replay video is already loaded so better to wait till it plays",{replay:this.replay,user:this.user,err:s});return}this.replay.hasOptimizedVideo?(console.warn("Has optimized video"),(p=window.analytics)==null||p.track("Main video is failed to load so we try with the optimized video",{replay:this.replay,user:this.user}),await this.loadReplay({overWrite:!1,fields:["id","videoUrl"],trackedReplayView:!0})):(console.warn("Optimized video has not been created yet so we poll the status until it is created or for 15 minutes"),(a=window.analytics)==null||a.track("Optimized video has not been created yet so we poll the status until it is created or for 15 minutes",{replay:this.replay,user:this.user}),this.isConverting=!0,await this.checkVideoConvertStatus())}},onOptimizedVideoSourceLoadError(s){var t;console.warn("Optimized Video Load Source Error",s),(t=window.analytics)==null||t.track("Optimized Video Load Source Error",{replay:this.replay,user:this.user,err:s})},async checkVideoConvertStatus(s=1){var t;if(!this.loadedReplayVideo){console.warn(`Checking conversion status. Attempt ${s}`);const r=await Cloud.replayConvertStatus.with({replayId:this.replay.id}).headers(this.aditionalHeaders).tolerate(p=>{console.error("replayVideoCheck error",p)});if(r&&r.hasOptimizedVideo)console.warn("Polling the status has finished, optimized video is finally created"),(t=window.analytics)==null||t.track("Polling the status has finished, optimized video is finally created",{replay:this.replay,user:this.user}),this.isConverting=!1,await this.loadReplay({overwrite:!1,fields:["hasOptimizedVideo"]});else{const p=Nt(),a=this.replay.createdAt;Nt.duration(p.diff(a)).asMinutes()<15&&setTimeout(()=>{this.checkVideoConvertStatus(s+1)},5e3)}}},onReplayImageLoad(){var s,t;((s=this.$refs.replayPreviewImage)==null?void 0:s.complete)&&((t=this.$refs.replayPreviewImage)==null?void 0:t.naturalWi
49dth)&&(this.loadedPreviewImage=!0)},handleKeyDown(s){s.code==="Space"&&this.togglePlay()},async onVideoTimeUpdate(){var s,t,r,p,a,g,v,n,c,u,w;if(this.videoTime=(((s=this.$refs.videoReplay)==null?void 0:s.currentTime)||0)*1e3,this.isPlaying&&this.skipDowntime&&this.replayInteractions.length>0){const f=this.replayInteractions;if(console.log("Skip check - videoTime:",this.videoTime,"interactions:",f.length),f.length>0){const y=f.find(x=>this.getInteractionTimestamp(x)>this.videoTime);if(y){const x=this.getInteractionTimestamp(y);let T=null;for(let b=f.length-1;b>=0;b--)if(this.getInteractionTimestamp(f[b])<=this.videoTime){T=f[b];break}if(console.log("Next interaction at:",x),T){const b=this.getInteractionTimestamp(T),d=this.videoTime-b,m=x-b;if(console.log("Last interaction at:",b,"time since last:",d,"gap to next:",m),d>1e3&&this.videoTime<x){console.log("SKIPPING from",this.videoTime,"to",x),this.setVideoTime(x);return}}else if(console.log("Before first interaction"),this.videoTime>1e3){console.log("SKIPPING to first interaction at",x),this.setVideoTime(x);return}}else console.log("No next interaction found")}}if(!this.viewedReplayHalfway&&!this.canUpdateReplay){if(((r=(t=this.user)==null?void 0:t.profile)==null?void 0:r.email.indexOf("@dashcam.io"))>-1){console.info("Refusing to send view notification email because admin");return}if(((a=(p=this.user)==null?void 0:p.profile)==null?void 0:a.email.indexOf("@replayable.io"))>-1){console.info("Refusing to send view notification email because admin");return}if(((v=(g=this.user)==null?void 0:g.profile)==null?void 0:v.email.indexOf("@testdriver.ai"))>-1){console.info("Refusing to send view notification email because admin");return}((n=this.$refs.videoReplay)==null?void 0:n.currentTime)>.5*((u=(c=this.$refs.videoReplay)==null?void 0:c.duration)!=null?u:0)&&(this.viewedReplayHalfway=!0,console.log("Send Replay Viewed Notification",{replay:this.replay,user:this.user}),(w=window.analytics)==null||w.track("Send Replay Viewed Notification",{replay:this.replay,user:this.user}),await Cloud.replayViewNotification.with({replayId:this.replay.id}).headers(this.aditionalHeaders).switch({error:f=>{console.error("Send replay notification error",f)},success:()=>{console.log("Sent replay notification",{replay:this.replay,user:this.user})}}))}},dateDisplay(s){return Nt(s).calendar(null,{lastDay:"[Yesterday at] LT",sameDay:"[Today at] LT",lastWeek:"dddd [at] LT",nextWeek:"dddd [at] LT",sameElse:"L"})},trackShare(s){var t,r,p;(p=window.analytics)==null||p.track("Share Copied",{format:s,userId:(t=this.user)==null?void 0:t.id,replayId:(r=this.replay)==null?void 0:r.id,canUpdateReplay:this.canUpdateReplay})}
49,async editReplayTitle(s){var t;!this.canUpdateReplay||(this.isEditingTitle=!0,this.editReplay.title=this.replay.title,await St(),this.$refs.replayInput.focus(),s&&(this.$refs.replayInput.select(),this.$router.replace({query:{share:(t=this.$route.query)==null?void 0:t.share,referrer:void 0}})))},async saveReplayTitle(){if(this.isEditingTitle=!1,this.requestInProgress||this.editReplay.title===this.replay.title)return;this.requestInProgress=!0;const s=this.replay.title;this.replay.title=this.editReplay.title,await Cloud.replayUpdate.with({replayId:this.replay.id,replay:{title:this.editReplay.title}}).headers(this.aditionalHeaders).switch({error:t=>{console.error("replayUpdate error",t),t.responseInfo.statusCode===401&&console.error("replayUpdate error. Unauthorized",{err:t}),this.replay.title=s,this.$toast.open({message:"Failed to Update Replay Title",type:"error"})},success:t=>{const r=["title","updatedAt"];this.replay=_.assign(this.replay,_.pick(t,r)),console.log("Updated Replay",{replay:this.replay})}}),this.requestInProgress=!1},async updateReplayAccess(s){this.replay.access!==s&&await Cloud.replayUpdate.with({replayId:this.replay.id,replay:{access:s}}).headers(this.aditionalHeaders).switch({error:t=>{console.error("Replay access update error",t),this.$toast.open({message:"Failed to Update Replay access",type:"error"})},success:t=>{console.log("Updated Replay access",{replayId:t.id,access:t.access}),this.replay.access=t.access,this.editReplay.access=t.access,this.$toast.open({message:"Replay access updated",type:"success"})}})},async deleteReplay(){this.closeReplayDeleteModal(),await Cloud.replayDelete.with({replayId:this.replay.id}).headers(this.aditionalHeaders).switch({error:s=>{console.error("replayDelete error",s),this.$toast.open({message:"Failed to Delete Replay",type:"error"})},success:()=>{this.$toast.open({message:"Replay Deleted",type:"success"}),this.$router.push({name:"replays",params:{projectId:this.replay.project.id}})}})},async updateReplayProject(s){this.closeReplayMoveModal(),await Cloud.replayMove.with({replayId:this.replay.id,projectId:s==null?void 0:s.id}).headers(this.aditionalHeaders).switch({error:t=>{console.error("updateReplayProject error",t),this.$toast.open({message:"Failed to Move Replay",type:"error"})},success:t=>{this.$toast.open({message:"Successfully Moved Replay",type:"success"}),this.replay=t,console.log("Updated Replay",{replay:this.replay})}})},async cloneReplayIntoProject(s){this.closeReplayCloneModal(),await Cloud.replayClone.with({replayId:this.replay.id,projectId:s==null?void 0:s.id}).headers(this.aditionalHeaders).switch({error:t=>{console.error("cloneReplayProject error",t),this.$toast.open({message:"Failed to Clone Replay",type:"error"})},success:t=>{this.$toast.open({message:"Successfully Cloned Replay",type:"success"}),window.open(`${t.shareLink}`,"_blank")}})},async autoCopyToClipboard(){const{path:s,query:t}=this.$route;if(!!t.referrer)try{await navigator.clipboard.writeText(`${window.location.host}${s}`),this.$toast.success("Link copied to clipboard")}catch(r){console.error("autoCopyToClipboard error",{e:r})}},copyLink(s){let t="";s.parentId==="link"?t=this.replay.shareLink:s.parentId==="markdown"?s.childId==="gif"?t=this.replay.gifMarkdown:s.childId==="image"&&(t=this.replay.imageMarkdown):s.parentId==="html"&&(s.childId==="embed"?t=this.replay.embed:s.childId==="image"&&(t=this.replay.imageHtml)),t&&this.$copyText(t).then(()=>{this.$toast.open({message:"Copied To Clipboard!",type:"info"}),console.log("Copied Replay info",{replay:this.replay,canUpdateReplay:this.canUpdateReplay})},r=>{console.error("Problem copying Replay info to clipboard",{e:r}),this.$toast.open({message:"There was a problem copying Replay info to clipboard",type:"error"})})},onCommentCreated(s){this.replay.comments.push(s)},onCommentDeleted(s){this.replay.comments=this.replay.comments.filter(t=>t.id!==s.id)},setVideoTime(s){this.$refs.videoReplay.currentTime=Math.max(0,s/1e3)},updateReplay({replay:s,fields:t}){t?this.replay=_.assign(this.replay,_.pick(s,t)):this.replay=s},async requestAccess(){if(!this.user){if(!this.requestEmail){this.requestEmailError="Email is required";return}if(!/^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/.test(this.requestEmail)){this.requestEmailError="Email is invali
49d";return}}this.requestEmailError="",await Cloud.replayAccessRequest({...this.replayId&&{replayId:this.replayId},...this.shareKey&&{shareKey:this.shareKey},requestEmail:this.requestEmail,requestMessage:this.requestMessage}).headers(this.aditionalHeaders).tolerate(t=>{this.accessRequestSent=!1,console.error(t)})&&(this.accessRequestSent=!0,this.requestEmail="",this.requestMessage="")},jump(s=1){if(this.$refs.videoReplay){const t=Math.max((this.$refs.videoReplay.currentTime||0)+s,0);this.$refs.videoReplay.currentTime=t,this.videoTime=t*1e3}},enterFullscreen(){const s=this.$refs.videoReplay;s.requestFullscreen?s.requestFullscreen():s.webkitRequestFullscreen?s.webkitRequestFullscreen():s.mozRequestFullScreen?s.mozRequestFullScreen():s.msRequestFullscreen&&s.msRequestFullscreen()},getInteractionTimestamp(s){var t,r,p;if(s.timestamp!==void 0&&((t=this.replay)==null?void 0:t.clientStartDate)){if(s.timestamp>1e12){const a=s.timestamp-this.replay.clientStartDate;return Math.max(0,a)}if(s.timestamp>0)return s.timestamp}if(s.clientTimestamp!==void 0&&((r=this.replay)==null?void 0:r.clientStartDate)){if(s.clientTimestamp>1e12){const a=s.clientTimestamp-this.replay.clientStartDate;return Math.max(0,a)}if(s.clientTimestamp>0&&s.clientTimestamp<1e9)return s.clientTimestamp}if(s.createdAt&&((p=this.replay)==null?void 0:p.clientStartDate)){const g=new Date(s.createdAt).getTime()-this.replay.clientStartDate;return Math.max(0,g)}return 0},onInteractionsLoaded(s){this.replayInteractions=s,console.log("Interactions loaded:",s.length,"interactions"),s.length>0&&(console.log("First interaction:",s[0]),console.log("First interaction timestamp:",this.getInteractionTimestamp(s[0])))},onInteractionHover(s){this.isInteractionHovered=s},async loadTestHistory(){var s;if(!this.isEmbedded){if(!((s=this.replay)!=null&&s.tdTestCase)){console.log("No test case associated with this replay");return}this.isLoadingHistory=!0;try{const t=Wo(),r=new URLSearchParams;r.append("id",this.replay.tdTestCase);const p=`${t}/api/v1/testdriver/test-cases-list?${r.toString()}`,a=await fetch(p,{headers:hu(this.$store.state.token)});if(!a.ok)throw new Error("Failed to load test case details");const v=(await a.json()).testCases||[];if(v.length===0){console.log("No test case found with ID:",this.replay.tdTestCase);return}const n=v[0];if(!n.testName||!n.testFile){console.log("Test case data incomplete:",n);return}const c=new URLSearchParams;c.append("testFile",n.testFile),c.append("search",n.testName);const u=`${t}/api/v1/testdriver/test-cases-list?${c.toString()}`,w=await fetch(u,{headers:hu(this.$store.state.token)});if(!w.ok)throw new Error("Failed to load test history");const y=(await w.json()).testCases||[],x={};y.forEach(b=>{const d=b.testName+"::"+b.testFile;x[d]||(x[d]={testName:b.testName,testFile:b.testFile,totalRuns:0,passed:0,failed:0,skipped:0,history:[],replays:[]}),x[d].totalRuns+=1,b.status==="passed"?x[d].passed+=1:b.status==="failed"?x[d].failed+=1:b.status==="skipped"&&(x[d].skipped+=1),x[d].history.push({passRate:b.status==="passed"?100:0,date:b.createdAt,status:b.status}),b.replay&&x[d].replays.push({id:b.id,testRunId:b.testRun,status:b.status,duration:b.duration,createdAt:b.createdAt,branch:b.branch,commit:b.commit,gifUrl:b.replay.gifUrl})});const T=n.testName+"::"+n.testFile;this.testHistoryData=x[T]||null}catch(t){console.error("Failed to load test history:",t),this.testHistoryData=null}finally{this.isLoadingHistory=!1}}},viewTestRunDetail(s){this.$router.push({name:"test-run-detail",params:{runId:s.testRunId,testCaseId:s.id}})}}},Hce={key:0},qce={class:"p-20 sm:p-40"},Fce={key:1},Uce={key:0},Nce={class:""},$ce={class:"border-b",style:{"border-color":"#1a1a1a",background:"#0a0a0a"}},Wce={class:"flex items-center justify-between",style:{height:"48px",padding:"0 1rem"}},zce={class:"flex items-center"},Vce={class:"hidden md:block"},jce={class:"ml-5 flex items-baseline space-x-4"},Kce=["href","aria-current"],Gce={key:0,class:"mr-2"},Xce={key:0},Yce={key:1},Jce={class:"hidden md:block"},Zce={class:"ml-4 flex items-center md:ml-6"},Qce=["src"],eue=["href"],tue={class:"-mr-2 flex md:hidden"},sue={class:"px-2 py-3 space-y-1 sm:px-3"},rue={class:"pt-4 pb-3 border-t border-gray-700"},iue={class:"flex items-center px-5"},nue={class:"flex-shrink-0"},oue=["src"],aue={class:"ml-3"},lue={class:"text-base leading-none text-white"},cue={class:"mt-2 px-2 space-y-1"},uue={key:0,class:"py-40 px-0 sm:px-40 md:px-20 lg:px-40 md:w-2/3 xl:w-1/2 mx-auto"},hue={class:"rounded-md bg-yellow-50 p-4"},due={key:0,class:"flex"},fue={class:"flex-shrink-0"},pue={key:1,class:"flex flex-col items-center"},mue={key:0,class:"w-full max-w-sm"},_ue={class:"flex items-center justify-between"},gue={key:1,class:"text-red-500 text-xs italic pt-2"},vue={key:1,class:"w-full max-w-sm"},yue={key:1},bue={key:0,class:"replay-header"},wue={class:"flex items-center justify-between gap-4"},Sue={class:"flex items-center gap-3 flex-1 min-w-0"},xue={class:"flex-1"},Cue={class:"flex items-center gap-2"},kue={key:0,class:"py-1"},Eue={key:1,class:"py-1"},Tue={class:"relative bg-gray-900 overflow-hidden"},Rue=["src","onload"],Lue={class:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"},Due={key:0}
49,Aue={class:"border-2 border-slate-700 border-dashed m-2 rounded-lg p-12 text-center"},Iue=["href"],Mue={key:0,class:"flex items-center justify-center",style:{background:"#0a0a0a","min-height":"500px",width:"100%"}},Oue={class:"relative inline-block"},Pue=["src"],Bue=["src"],Hue={key:1,class:"absolute bottom-4 left-4 px-2 py-1 text-white text-sm font-mono rounded",style:{background:"rgba(0, 0, 0, 0.7)","backdrop-filter":"blur(4px)"}},que={key:0,style:{background:"#0a0a0a"}},Fue={class:"mt-2"},Uue={class:"py-2"},Nue={class:"flex justify-between items-center mt-2 relative",style:{padding:"0.75rem","border-top":"1px solid #1a1a1a"}},$ue={class:"flex items-center gap-4"},Wue={class:"flex items-center gap-2 text-sm cursor-pointer",style:{color:"#ddd"}},zue={class:"inline-flex rounded shadow absolute left-1/2 transform -translate-x-1/2",style:{gap:"1px"}},Vue={class:"inline-flex ml-2 align-middle"},jue={key:2,class:"w-full"},Kue={class:"m-2"},Gue={key:0,class:"border-red-500 border bg-slate-900 text-red-500 font-ibmplexmono p-4 rounded-lg mt-2 mx-2 flex items-start"},Xue={key:0},Yue={class:"p-20 sm:p-40"},Jue={key:1,class:"relative flex-col flex h-screen"},Zue={class:"flex flex-1 h-full flex-col",style:{background:"#0a0a0a","border-left":"1px solid #333"}},Que={class:"flex-col"},ehe={class:"border-b",style:{"border-color":"#2a2a2a"}},the={class:"h-10 shadow border-b select-none",style:{background:"#141414","border-color":"#2a2a2a"},"aria-label":"Tabs"},she=["onClick","aria-current"],rhe={class:"hidden 2xl:inline ml-2 text-xs"},ihe={class:"flex-1 overflow-hidden"},nhe={key:0,class:"flex flex-col flex-1 overflow-hidden"},ohe={class:"p-4 overflow-y-auto"},ahe={style:{"border-top":"1px solid #2a2a2a","margin-top":"auto"}},lhe={style:{"border-bottom":"1px solid #2a2a2a",padding:"1rem"}},che={class:"overflow-y-auto",style:{"max-height":"400px"}},uhe={key:1,class:"flex-1 overflow-y-auto"},hhe={key:2,class:"flex-1 overflow-y-auto"},dhe={key:3,class:"flex-1 overflow-y-auto"},fhe={key:0,class:"flex items-center justify-center h-32"},phe={key:2,class:"test-errors-empty-state"},mhe={key:4,class:"flex-1 overflow-hidden",style:{background:"#0a0a0a"}},_he={key:1,style:{display:"flex","align-items":"center","justify-content":"center",height:"100%",padding:"2rem"}},ghe={style:{display:"flex","flex-direction":"column","align-items":"center",gap:"1rem"}},vhe={key:2,class:"test-errors-empty-state"};function yhe(s,t,r,p,a,g){var V,G,fe,_e,Se;const v=re("Spinner"),n=re("MenuButton"),c=re("MenuItem"),u=re("MenuItems"),w=re("MenuVue"),f=re("Bars3Icon"),y=re("XMarkIcon"),x=re("DisclosureButton"),T=re("DisclosurePanel"),b=re("Disclosure"),d=re("ExclamationTriangleIcon"),m=re("ReplayShareMenu"),o=re("ChevronDoubleLeftIcon"),l=re("EllipsisVerticalIcon"),S=re("font-awesome-icon"),E=re("ReplayTimeline"),L=re("ChevronLeftIcon"),D=re("ChevronRightIcon"),C=re("ChevronDoubleRightIcon"),I=re("TestErrorDisplay"),B=re("ReplayInteractions"),U=re("ReplayDevice"),z=re("ReplayCommentCreate"),q=re("ReplayComments"),J=re("ApplicationLogs"),se=re("WebLogs"),ce=re("PerformanceCharts"),me=re("TestHistorySidebar"),pe=re("DeleteReplayModal"),M=re("MoveReplayModal"),W=re("CloneReplayModal");return F(),N(Me,null,[R("div",{class:xe(r.isEmbedded?"h-screen relative":"h-screen"),style:{background:"#0a0a0a",color:"#ddd"},onMouseup:t[35]||(t[35]=ie=>a.isResizing=!1),onMousemove:t[36]||(t[36]=(...ie)=>g.resizePannels&&g.resizePannels(...ie))},[R("main",null,[R("div",null,[a.isLoading?(F(),N("div",Hce,[R("div",qce,[ee(v,{dark:!0})])])):Q("",!0),a.isLoading?Q("",!0):(F(),N("div",Fce,[a.isLoading?Q("",!0):(F(),N("div",Uce,[R("div",{class:xe(["scrollbar-hide md:top-0 md:bottom-0 md:left-0 md:overflow-y-auto",r.isEmbedded?"md:absolute":"md:fixed"]),style:qe([{background:"#0d0d0d"},{width:`${g.videoWidth*100}%`}])},[R("div",null,[R("div",Nce,[r.isEmbedded?Q("",!0):(F(),Ne(b,{key:0,as:"nav"},{default:ye(({open:ie})=>[R("div",$ce,[R("div",Wce,[t[40]||(t[40]=R("div",{class:"flex items-center justify-start h-12"},[R("div",{class:"h-full flex"},[R("a",{href:"/",class:"px-2 flex justify-center items-center"},[R("img",{class:"h-7",src:du,alt:"TestDriver Logo"})])])],-1)),R("div",zce,[R("div",Vce,[R("div",jce,[(F(!0),N(Me,null,je(p.navigation,K=>(F(),N("a",{key:K.name,href:K.href,class:xe([K.current?"bg-blue-600 text-white":"text-gray-300 hover:bg-slate-700 hover:border-b-slate-800 hover:border-t-slate-600 hover:shadow hover:text-white","px-3 py-1 rounded-sm text-sm "]),"aria-current":K.current?"page":void 0},Z(K.name),11,Kce))),128))])])]),a.isLoading?Q("",!0):(F(),N("div",Gce,[a.user?Q("",!0):(F(),N("div",Xce,[...t[37]||(t[37]=[R("span",{class:"relative z-0 inline-flex shadow-sm rounded-sm"},[R("a",{href:"/",class:"relative inline-flex items-center px-4 py-2 rounded-l-md border border-gray-300 bg-white text-sm text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"}," Sign Up "),R("a",{href:"/",class:"-ml-px relative inline-flex items-center px-4 py-2 rounded-r-md border border-gray-300 bg-white text-sm text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"}," Log In ")],-1)])])),a.user?(F(),N("div",Yce,[R("div",Jce,[R("div",Zce,[ee(w,{as:"div",class:"ml-3 relative"},{default:ye(()=>[R("div",null,[ee(n,{class:"max-w-xs bg-gray-800 rounded-full flex items-center text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white"},{default:ye(()=>[t[38]||(t[38]=R("span",{class:"sr-only"},"Open user menu",-1)),R("img",{class:"h-8 w-8 rounded-full",src:a.user.profile.picture,alt:""},null,8,Qce)]),_:1})]),ee(Dr,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:ye(()=>[ee(u,{class:"origin-top-right absolute right-0 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:ye(()=>[(F(!0),N(Me,null,je(p.userNavigation,K=>(F(),Ne(c,{key:K.name},{default:ye(({active:H})=>[R("a",{href:K.href,class:xe([H?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700"])},Z(K.name),11,eue)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1}
49)])]),R("div",tue,[ee(x,{class:"bg-gray-800 inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white"},{default:ye(()=>[t[39]||(t[39]=R("span",{class:"sr-only"},"Open main menu",-1)),ie?(F(),Ne(y,{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(F(),Ne(f,{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])):Q("",!0)]))])]),ee(T,{class:"border-b border-gray-700 md:hidden"},{default:ye(()=>[R("div",sue,[(F(!0),N(Me,null,je(p.navigation,K=>(F(),Ne(x,{key:K.name,as:"a",href:K.href,class:xe([K.current?"bg-blue-600 text-white":"text-gray-300 hover:bg-gray-700 hover:text-white","block px-3 py-2 rounded-md text-base "]),"aria-current":K.current?"page":void 0},{default:ye(()=>[De(Z(K.name),1)]),_:2},1032,["href","class","aria-current"]))),128))]),R("div",rue,[R("div",iue,[R("div",nue,[R("img",{class:"h-10 w-10 rounded-full",src:a.user.profile.picture,alt:""},null,8,oue)]),R("div",aue,[R("div",lue,Z(a.user.profile.email),1)]),t[41]||(t[41]=R("button",{type:"button",class:"ml-auto bg-gray-800 flex-shrink-0 p-1 text-gray-400 rounded-full hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white"},[R("span",{class:"sr-only"},"View notifications")],-1))]),R("div",cue,[(F(!0),N(Me,null,je(p.userNavigation,K=>(F(),Ne(x,{key:K.name,as:"a",href:K.href,class:"block px-3 py-2 rounded-md text-base text-gray-400 hover:text-white hover:bg-gray-700"},{default:ye(()=>[De(Z(K.name),1)]),_:2},1032,["href"]))),128))])])]),_:1})]),_:1}))]),R("div",null,[R("div",null,[a.errorType?(F(),N("div",uue,[R("div",hue,[a.errorType==="notFound"?(F(),N("div",due,[R("div",fue,[ee(d,{class:"h-5 w-5 text-yellow-400","aria-hidden":"true"})]),t[42]||(t[42]=R("div",{class:"ml-3"},[R("h3",{class:"text-sm text-yellow-800"}," There was a problem "),R("div",{class:"mt-2 text-sm text-yellow-700"},[R("p",null," The resource does not exist. Please check the replay id or share key again. ")])],-1))])):Q("",!0),a.errorType==="notAllowed"?(F(),N("div",pue,[a.accessRequestSent?(F(),N("div",vue,[...t[44]||(t[44]=[R("h3",{class:"text-lg text-yellow-800"}," Request for access sent ",-1),R("div",{class:"mt-2 text-sm text-yellow-700"},[R("p",null," You'll get an email letting you know if your request was approved ")],-1)])])):(F(),N("div",mue,[t[43]||(t[43]=R("h3",{class:"text-lg text-yellow-800 mb-2"}," This replay is private, but you can request access. ",-1)),a.user?Q("",!0):dt((F(),N("input",{key:0,placeholder:"Your Email",required:"","onUpdate:modelValue":t[0]||(t[0]=ie=>s.requestEmail=ie),type:"email",name:"invite-email",id:"invite-email",class:xe([{"border-red-500":s.requestEmailError},"flex-1 font-ibmplexmono focus:ring-lime-500 focus:border-lime-500 block rounded-md sm:text-sm border-gray-300 text-gray-500 mr-4"])},null,2)),[[Ns,s.requestEmail]]),dt(R("textarea",{rows:"6",name:"requestMessage","onUpdate:modelValue":t[1]||(t[1]=ie=>s.requestMessage=ie),onKeydown:t[2]||(t[2]=xt(()=>{},["stop"])),id:"requestMessage",class:"mt-2 mb-2 block font-ibmplexmono w-full h-24 rounded flex-1 p-2 border-gray-300",placeholder:"Message (optional)"},null,544),[[Ns,s.requestMessage]]),R("div",_ue,[R("button",{onClick:t[3]||(t[3]=ie=>g.requestAccess()),type:"button",class:"inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm rounded-md text-white bg-lime-600 hover:bg-lime-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-lime-500"}," Request Access ")]),s.requestEmailError?(F(),N("p",gue,Z(s.requestEmailError),1)):Q("",!0)]))])):Q("",!0)])])):(F(),N("div",yue,[r.isEmbedded?Q("",!0):(F(),N("div",bue,[R("div",wue,[R("div",Sue,[dt(R("h2",{class:xe(["replay-title",{"replay-title-editable":a.canUpdateReplay}]),onClick:t[4]||(t[4]=(...ie)=>
49g.editReplayTitle&&g.editReplayTitle(...ie))},Z(a.replay.title),3),[[rr,!a.isEditingTitle]]),dt(R("div",xue,[dt(R("input",{ref:"replayInput",id:"replayInput",name:"replayInput",type:"text",class:"replay-title-input","onUpdate:modelValue":t[5]||(t[5]=ie=>a.editReplay.title=ie),onBlur:t[6]||(t[6]=(...ie)=>g.saveReplayTitle&&g.saveReplayTitle(...ie)),onKeyup:t[7]||(t[7]=ih((...ie)=>g.saveReplayTitle&&g.saveReplayTitle(...ie),["enter"])),onKeydown:t[8]||(t[8]=xt(()=>{},["stop"]))},null,544),[[Ns,a.editReplay.title]])],512),[[rr,a.isEditingTitle]])]),R("div",Cue,[ee(m,{"can-update-replay":a.canUpdateReplay,"active-access-option":a.editReplay.access,"access-invites":(V=a.replay)==null?void 0:V.accessInvites,"replay-id":(G=a.replay)==null?void 0:G.id,onAccessOptionSelected:g.updateReplayAccess,onCopyLink:g.copyLink,onReplayUpdated:g.updateReplay},null,8,["can-update-replay","active-access-option","access-invites","replay-id","onAccessOptionSelected","onCopyLink","onReplayUpdated"]),a.showReplayMeta?Q("",!0):(F(),N("button",{key:0,type:"button",class:"inline-flex items-center gap-1 px-3 py-1.5 rounded text-sm",style:{background:"#2a2a2a",color:"#ddd",border:"1px solid #3a3a3a"},onClick:t[9]||(t[9]=ie=>s.toggleReplayMeta())},[ee(o,{class:"w-4 h-4"}),t[45]||(t[45]=De(" Details ",-1))])),a.canUpdateReplay||!g.replayIsInSameTeam?(F(),Ne(w,{key:1,as:"div",class:"relative inline-block text-left"},{default:ye(()=>[R("div",null,[ee(n,{class:"rounded flex items-center p-2",style:{color:"#888",background:"transparent"}},{default:ye(()=>[t[46]||(t[46]=R("span",{class:"sr-only"},"Open options",-1)),ee(l,{class:"h-5 w-5 mx-1","aria-hidden":"true"})]),_:1})]),ee(Dr,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:ye(()=>[ee(u,{class:"origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none z-10"},{default:ye(()=>[a.canUpdateReplay?(F(),N("div",kue,[ee(c,null,{default:ye(({active:ie})=>[R("a",{href:"#",class:xe([ie?"bg-gray-100 text-gray-900":"text-gray-700","block px-4 py-2 text-sm"]),onClick:t[10]||(t[10]=(...K)=>g.openReplayMoveModal&&g.openReplayMoveModal(...K))},"Move...",2)]),_:1}),ee(c,null,{default:ye(({active:ie})=>[R("a",{href:"#",class:xe([ie?"bg-gray-100 text-gray-900":"text-gray-700","cursor-pointer block px-4 py-2 text-sm"]),onClick:t[11]||(t[11]=(...K)=>g.openDeleteReplayModal&&g.openDeleteReplayModal(...K))},"Delete ",2)]),_:1})])):Q("",!0),a.canUpdateReplay?Q("",!0):(F(),N("div",Eue,[ee(c,null,{default:ye(({active:ie})=>[R("a",{href:"#",class:xe([ie?"bg-gray-100 text-gray-900":"text-gray-700","block px-4 py-2 text-sm"]),onClick:t[12]||(t[12]=(...K)=>g.openReplayCloneModal&&g.openReplayCloneModal(...K))},"Clone...",2)]),_:1})]))]),_:1})]),_:1})]),_:1})):Q("",!0)])])]))])),R("div",{class:xe({"mt-2":!r.isEmbedded})},[dt(R("div",Tue,[R("img",{src:g.replayScreenshotUrl,onload:g.onReplayImageLoad,class:"w-full mx-auto opacity-30",ref:"replayPreviewImage"},null,8,Rue),R("div",Lue,[ee(v,{class:"mx-auto",dark:!0}),a.isConverting?(F(),N("div",Due,[...t[47]||(t[47]=[R("div",{class:"text-center text-lg text-gray-200 mt-3"}," Converting... ",-1),R("div",{class:"text-center text-sm text-gray-400"}," Your browser can not play this file. We are converting it for you, or you can try another browser. The video will play when conversion is complete. ",-1)])])):Q("",!0)])],512),[[rr,a.isConverting]]),dt(R("div",Aue,[ee(v,{dark:!0}),t[48]||(t[48]=R("div",null,[R("div",{class:"text-center text-lg text-gray-200 mt-3"}," Uploading... "),R("div",{class:"text-center text-sm text-gray-400"}," This video will play when uploading is complete. ")],-1))],512),[[rr,g.showReplayLoadingDashed||((fe=a.replay)==null?void 0:fe.status)=="draft"]]),((_e=a.replay)==null?void 0:_e.status)=="published"?(F(),N("div",{key:0,class:xe({"flex flex-col":!0,"embedded-video-container":r.isEmbedded&&g.screenIsAtLeastMd})},[r.isEmbedded?(F(),N("a",{key:0,href:a.replay.shareLink,target:"_top"},[...t[49]||(t[49]=[R("img",{class:"h-12 absolute top-4 right-4 z-10 opacity-0 bg-slate-900 rounded p-1 group-hover:opacity-70",src:du,alt:"Workflow"},null,-1)])],8,Iue)):Q("",!0),!a.isConverting&&((Se=a.replay)==null?void 0:Se.status)=="published"?(F(),N("div",{key:1,id:"videoWrap",class:xe(["relative p-2 rounded flex flex-col flex-1 w-full",{"mx-2":!r.isEmbedded}]),style:{background:"#0a0a0a"}},[a.isMetaDataLoaded?Q("",!0):(F(),N("div",Mue,[ee(v,{dark:!0})])),dt(R("div",{class:xe(["play-overlay group flex flex-col",{"cursor-pointer":!a.hasPlayed}]),style:{background:"#0a0a0a"},onClick:t[33]||(t[33]=ie=>!a.isPlaying&&!a.hasPlayed?g.play():null)},[R("div",{id:"videoOverlayInteractions",class:"relative overflow-auto",style:qe({maxHeight:r.isEmbedded?"100vh":"calc(100vh - 300px)",display:"flex",flexDirection:"column",justifyContent:r.isEmbedded?"flex-start":"center",alignItems:r.isEmbedded?"flex-start":"center"})},[R("div",Oue,[!a.isPlaying&&!a.hasPlayed&&!a.isInteractionHovered?(F(),Ne(S,{key:0,icon:"circle-play",class:"video-play-button"})):Q("",!0),R("video",{onKeydown:t[15]||(t[15]=xt(()=>{},["stop"])),onTimeupdate:t[16]||(t[16]=(...ie)=>g.onVideoTimeUpdate&&g.onVideoTimeUpdate(...ie)),onCanplay:t[17]||(t[17]=(...ie)=>g.onReplayVideoLoaded&&g.onReplayVideoLoaded(...ie)),onLoadedmetadata:t[18]||(t[18]=(...ie)=>g.onVideoMetadataLoaded&&g.onVideoMetadataLoaded(...ie)),onPlay:t[19]||(t[19]=(...ie)=>g.setPlaying&&g.setPlaying(...ie)),onPause:t[20]||(t[20]=(...ie)=>g.setPaused&&g.setPaused(...ie)),onSeeking:t[21]||(t[21]=(...ie)=>g.onVideoSeeking&&g.onVideoSeeking(...ie)),onSeeked:t[22]||(t[22]=(...ie)=>g.onVideoSeeked&&g.onVideoSeeked(...ie)),controls:!1,preload:"auto",ref:"videoReplay",id:"videoReplay",class:xe(["opacity-100",{"embedded-video-player":r.isEmbedded&&g.screenIsAtLeastMd,"opacity-50":!a.isPlaying&&!a.hasPlayed&&!a.isInteractionHovered&&g.screenIsAtLeastMd,"group-hover:opacity-60":!a.isPlaying&&!a.hasPlayed&&!a.isInteractionHovered&&g.screenIsAtLeastMd}]),style:{width:"100%",objectFit:"contain"},onMouseleave:t[23]||(t[23]=ie=>a.showVideoOverlay=!1)},[a.replayUrl?(F(),N("source",{key:0,src:a.replayUrl,onError:t[13]||(t[13]=(...ie)=>g.onVideoSourceLoadError&&g.onVideoSourceLoadError(...ie))},null,40,Pue)):Q("",!0),a.optimizedReplayUrl?(F(),N("source",{key:1,src:a.optimizedReplayUrl,onError:t[14]||(t[14]=(...ie)=>g.onOptimizedVideoSourceLoadError&&g.onOptimizedVideoSourceLoadError(...ie))},null,40,Bue)):Q("",!0)],34),a.loadedReplayVideo?(F(),N("div",Hue,Z(g.formatTimestamp(a.videoTime/1e3)),1)):Q("",!0)])],4),a.loadedReplayVideo?(F(),N("div",que,[R("div",Fue,[R("div",Uue,[ee(E,{replay:a.replay,"application-logs":g.applicationLogs,"video-time":
49a.videoTime,"video-duration":s.videoDuration,"is-playing":a.isPlaying,"skip-downtime":a.skipDowntime,onSetVideoTime:g.setVideoTime,onTogglePlay:g.togglePlay},null,8,["replay","application-logs","video-time","video-duration","is-playing","skip-downtime","onSetVideoTime","onTogglePlay"])])]),R("div",Nue,[R("div",$ue,[R("label",Wue,[t[50]||(t[50]=R("span",null,"Skip Downtime",-1)),R("button",{type:"button",class:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none",style:qe({background:a.skipDowntime?"#4caf50":"#555"}),onClick:t[24]||(t[24]=ie=>a.skipDowntime=!a.skipDowntime),"aria-pressed":"skipDowntime","aria-label":"Toggle Skip Downtime"},[R("span",{class:xe([a.skipDowntime?"translate-x-6":"translate-x-1","inline-block h-4 w-4 transform rounded-full bg-white transition-transform"])},null,2)],4)])]),R("span",zue,[R("button",{type:"button",class:xe([a.videoPlaybackRate===.5?a.activeButtonClass:a.inactiveButtonClass,"relative inline-flex items-center rounded-l-sm px-4 py-2 text-sm "]),onClick:t[25]||(t[25]=ie=>g.setVideoPlaybackRate(.5))}," .5x ",2),R("button",{type:"button",class:xe([a.videoPlaybackRate===1?a.activeButtonClass:a.inactiveButtonClass,"relative inline-flex items-center rounded-l-sm px-4 py-2 text-sm "]),onClick:t[26]||(t[26]=ie=>g.setVideoPlaybackRate(1))}," 1x ",2),R("button",{type:"button",class:xe([a.videoPlaybackRate===2?a.activeButtonClass:a.inactiveButtonClass,"relative inline-flex items-center px-4 py-2 text-sm "]),onClick:t[27]||
49(t[27]=ie=>g.setVideoPlaybackRate(2))}," 2x ",2),R("button",{type:"button",class:xe([a.videoPlaybackRate===5?a.activeButtonClass:a.inactiveButtonClass,"relative inline-flex items-center px-4 py-2 text-sm "]),onClick:t[28]||(t[28]=ie=>g.setVideoPlaybackRate(5))}," 5x ",2)]),R("span",Vue,[R("button",{type:"button",class:"rounded-l-sm px-2 py-2",style:{background:"#2a2a2a",color:"#888",border:"1px solid #3a3a3a"},onClick:t[29]||(t[29]=ie=>g.jump(-5))},[ee(o,{class:"h-5 w-5"})]),R("button",{type:"button",class:"rounded-l-sm px-2 py-2",style:{background:"#2a2a2a",color:"#888",border:"1px solid #3a3a3a"},onClick:t[30]||(t[30]=ie=>g.jump(-1))},[ee(L,{class:"h-5 w-5"})]),R("button",{type:"button",class:"rounded-r-sm px-2 py-2",style:{background:"#2a2a2a",color:"#888",border:"1px solid #3a3a3a"},onClick:t[31]||(t[31]=ie=>g.jump(1))},[ee(D,{class:"h-5 w-5"})]),R("button",{type:"button",class:"rounded-r-sm px-2 py-2",style:{background:"#2a2a2a",color:"#888",border:"1px solid #3a3a3a"},onClick:t[32]||(t[32]=ie=>g.jump(5))},[ee(C,{class:"h-5 w-5"})])])])])):Q("",!0)],2),[[rr,a.isMetaDataLoaded]])],2)):Q("",!0),g.failedTestCases.length>0?(F(),N("div",jue,[(F(!0),N(Me,null,je(g.failedTestCases,ie=>(F(),N("div",{key:ie.id,class:"mb-2 w-full"},[ee(I,{errorMessage:ie.errorMessage,errorStack:ie.errorStack},null,8,["errorMessage","errorStack"])]))),128))])):Q("",!0)],2)):Q("",!0)],2),R("div",Kue,[a.replay&&a.replay.errorText&&!g.failedTestCases.some(ie=>ie.errorMessage===a.replay.errorText)?(F(),N("div",Gue,[ee(S,{icon:"fa-solid fa-bug",class:"text-red-500 w-5 mr-3 mt-1"}),R("div",null,Z(a.replay.errorText),1)])):Q("",!0)])])])])],6)])),g.isResizable?(F(),N("div",{key:1,class:xe(["top-0 bottom-0 z-50 hover:cursor-col-resize select-none",r.isEmbedded?"absolute":"fixed"]),style:qe({left:`${a.separatorLeft*100}%`}),onMousedown:t[34]||(t[34]=ie=>a.isResizing=!0)},[...t[51]||(t[51]=[R("div",{class:"absolute top-0 -left-2 w-4 h-full"},null,-1)])],38)):Q("",!0),a.errorType?Q("",!0):(F(),N("div",{key:2,class:xe(["scrollbar-hide md:overflow-y-scroll md:top-0 md:right-0 md:bottom-0 md:pb-0 h-screen",{"text-sm":!r.isEmbedded,"text-xs":r.isEmbedded,"md:absolute":r.isEmbedded,"md:fixed":!r.isEmbedded}]),style:qe({background:r.isEmbedded?"#000":"#0a0a0a",color:"#ddd",width:`${g.metadataWidth*100}%`,minHeight:"auto"})},[a.isLoadingLogs?(F(),N("div",Xue,[R("div",Yue,[ee(v,{dark:!0})])])):Q("",!0),a.isLoadingLogs?Q("",!0):(F(),N("div",Jue,[R("div",Zue,[R("div",Que,[R("div",null,[R("div",ehe,[R("nav",the,[(F(!0),N(Me,null,je(g.filteredTabs,ie=>(F(),N("a",{key:ie.id,onClick:K=>g.setTab(ie),class:xe([a.currentTab===ie.id?"text-white":"hover:text-gray-300","group inline-flex items-center border-b-2 h-10 px-3 text-sm cursor-pointer border-r"]),style:qe({borderBottomColor:a.currentTab===ie.id?"#4caf50":"transparent",color:a.currentTab===ie.id?"#fff":"#888",borderRightColor:"#2a2a2a"}),"aria-current":a.currentTab===ie.id?"page":void 0},[ee(S,{icon:ie.icon,class:xe([a.currentTab===ie.id?"text-gray-200":"text-gray-500 group-hover:text-gray-300","-ml-0.5 h-4 w-4"]),"aria-hidden":"true"},null,8,["icon","class"]),R("span",rhe,Z(ie.baseName||ie.name),1),ie.count?(F(),N("span",{key:0,style:{"font-size":"8px"},class:xe(["hidden xl:inline-flex items-center px-1 py-0.5 rounded-sm text-xs ml-2",[a.currentTab===ie.id?"bg-green-600 text-white":"bg-gray-700 text-gray-300"]])},Z(ie.count.toLocaleString()),3)):Q("",!0)],14,she))),128))])])])]),dt(R("div",ihe,[ee(B,{"replay-id":r.replayId,"share-key":r.shareKey,"additional-headers":g.additionalHeaders,"video-time":a.videoTime,onSetVideoTime:g.setVideoTime,onInteractionsLoaded:g.onInteractionsLoaded,onInteractionHover:g.onInteractionHover},null,8,["replay-id","share-key","additional-headers","video-time","onSetVideoTime","onInteractionsLoaded","onInteractionHover"])],512),[[rr,a.currentTab==="interactions"]]),a.currentTab==="info"?(F(),N("div",nhe,[R("div",ohe,[ee(U,{replay:a.replay,"can-update-replay":a.canU
49pdateReplay,"is-loading":a.isLoading,error:a.error,"is-embedded":r.isEmbedded,"video-time":a.videoTime,"video-duration":s.videoDuration,"error-count":g.errorCount,onUpdateReplay:g.updateReplay},null,8,["replay","can-update-replay","is-loading","error","is-embedded","video-time","video-duration","error-count","onUpdateReplay"])]),R("div",ahe,[R("div",lhe,[a.user&&!r.isEmbedded?(F(),Ne(z,{key:0,"replay-id":a.replay.id,timestamp:a.videoTime/1e3,onCommentCreated:g.onCommentCreated},null,8,["replay-id","timestamp","onCommentCreated"])):Q("",!0)]),R("div",che,[a.loadedReplayVideo&&!r.isEmbedded?(F(),Ne(q,{key:0,comments:a.replay.comments,user:a.user,onCommentDeleted:g.onCommentDeleted,onSetVideoTime:g.setVideoTime},null,8,["comments","user","onCommentDeleted","onSetVideoTime"])):Q("",!0)])])])):Q("",!0),a.currentTab==="application_logs"?(F(),N("div",uhe,[ee(J,{"is-loading-logs":a.isLoadingLogs,"application-logs":g.applicationLogs,"video-time":a.videoTime,"is-playing":a.isPlaying,"is-fully-loaded":g.isFullyLoaded,onSetVideoTime:g.setVideoTime,onManualScroll:g.pause},null,8,["is-loading-logs","application-logs","video-time","is-playing","is-fully-loaded","onSetVideoTime","onManualScroll"])])):Q("",!0),a.currentTab==="web_logs"?(F(),N("div",hhe,[ee(se,{"is-loading-logs":a.isLoadingLogs,"web-logs":g.webLogs,"video-time":a.videoTime,"is-playing":a.isPlaying,onSetVideoTime:g.setVideoTime,onManualScroll:g.pause},null,8,["is-loading-logs","web-logs","video-time","is-playing","onSetVideoTime","onManualScroll"])])):Q("",!0),a.currentTab==="Perf"?(F(),N("div",dhe,[a.isLoadingPerformance?(F(),N("div",fhe,[ee(v,{class:"w-8 h-8"}),t[52]||(t[52]=R("span",{class:"ml-2 text-slate-400"},"Loading performance data...",-1))])):a.performanceData&&a.performanceData.samples?(F(),Ne(ce,{key:1,"performance-data":a.performanceData,"video-time":a.videoTime,"video-duration":s.videoDuration},null,8,["performance-data","video-time","video-duration"])):(F(),N("div",phe,[...t[53]||(t[53]=[R("svg",{class:"empty-icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})],-1),R("h3",{class:"empty-title"},"No Performance Data",-1),R("p",{class:"empty-text"}," This replay has no performance metrics available. ",-1)])]))])):Q("",!0),a.currentTab==="history"?(F(),N("div",mhe,[a.testHistoryData?(F(),Ne(me,{key:0,"test-data":a.testHistoryData,"show-close":!1,style:{position:"relative",width:"100%",height:"100%"},onViewTestRun:g.viewTestRunDetail},null,8,["test-data","onViewTestRun"])):a.isLoadingHistory?(F(),N("div",_he,[R("div",ghe,[ee(v),t[54]||(t[54]=R("span",{style:{color:"rgb(148 163 184)"}},"Loading test history...",-1))])])):(F(),N("div",vhe,[...t[55]||(t[55]=[R("svg",{class:"empty-icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1),R("h3",{class:"empty-title"},"No Test History",-1),R("p",{class:"empty-text"}," This replay is not associated with a test case. ",-1)])]))])):Q("",!0)])]))],6))]))])])],34),ee(pe,{show:p.openDeleteModal,onConfirmDeleteReplay:g.deleteReplay,onCloseDeleteModal:g.closeReplayDeleteModal},null,8,["show","onConfirmDeleteReplay","onCloseDeleteModal"]),ee(M,{show:p.openMoveReplayModal,onCloseReplayMoveModal:g.closeReplayMoveModal,onConfirmMoveReplay:g.updateReplayProject,replay:a.replay},null,8,["show","onCloseReplayMoveModal","onConfirmMoveReplay","replay"]),ee(W,{show:p.openCloneReplayModal,onCloseReplayCloneModal:g.closeReplayCloneModal,onConfirmCloneReplay:g.cloneReplayIntoProject,replay:a.replay},null,8,["show","onCloseReplayCloneModal","onConfirmCloneReplay","replay"])],64)}var bhe=st(Bce,[["render",yhe]]),$he=Object.freeze(Object.defineProperty({__proto__:null,default:bhe},Symbol.toStringTag,{value:"Module"}));
49export{bhe as R,Mce as T,$he as a,Qu as r}; 50//# sourceMappingURL=Replay.f18bca5c.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.