MCPcopy
hub / github.com/vitest-dev/vitest / f1

Function f1

test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:47–47  ·  view source on GitHub ↗
(e,t)

Source from the content-addressed store, hash-verified

45 L${r.x},${r.y}`}function kge(e){const{start:t,end:r}=l1(e),o=r.subtract(t).multiply(.5),s=t.add(o);return`translate(${s.x-8},${s.y-4})`}function Sge({config:e,source:t,target:r}){const{s:o,t:s,dist:c,norm:f,endNorm:d}=$p({source:t,target:r}),h=10,p=f.rotateByDegrees(-h).multiply(mo(e,t)-1).add(o),g=d.rotateByDegrees(h).multiply(mo(e,r)).add(s).add(d.rotateByDegrees(h).multiply(2*e.marker.size)),v=1.2*c;return`M${p.x},${p.y}
46 A${v},${v},0,0,1,${g.x},${g.y}`}function _ge({center:e,config:t,node:r}){const{n:o,c:s}=s1({center:e,node:r}),c=mo(t,r),f=o.subtract(s),d=f.multiply(1/f.length()),h=40,p=d.rotateByDegrees(h).multiply(c-1).add(o),g=d.rotateByDegrees(-h).multiply(c).add(o).add(d.rotateByDegrees(-h).multiply(2*t.marker.size));return`M${p.x},${p.y}
47 A${c},${c},0,1,0,${g.x},${g.y}`}function Tge({config:e,source:t,target:r}){const{t:o,dist:s,endNorm:c}=$p({source:t,target:r}),f=c.rotateByDegrees(10).multiply(.5*s).add(o);return`translate(${f.x},${f.y})`}function Cge({center:e,config:t,node:r}){const{n:o,c:s}=s1({center:e,node:r}),c=o.subtract(s),f=c.multiply(1/c.length()).multiply(3*mo(t,r)+8).add(o);return`translate(${f.x},${f.y})`}const Vs={line:{labelTransform:kge,path:xge},arc:{labelTransform:Tge,path:Sge},reflexive:{labelTransform:Cge,path:_ge}};function Ege(e){return e.append("g").classed("links",!0).selectAll("path")}function Age({config:e,graph:t,selection:r,showLabels:o}){const s=r?.data(t.links,c=>lge(c)).join(c=>{const f=c.append("g"),d=f.append("path").classed("link",!0).style("marker-end",p=>age(p)).style("stroke",p=>p.color);e.modifiers.link?.(d);const h=f.append("text").classed("link__label",!0).style("fill",p=>p.label?p.label.color:null).style("font-size",p=>p.label?p.label.fontSize:null).text(p=>p.label?p.label.text:null);return e.modifiers.linkLabel?.(h),f});return s?.select(".link__label").attr("opacity",c=>c.label&&o?1:0),s}function Lge(e){Mge(e),Nge(e)}function Mge({center:e,config:t,graph:r,selection:o}){o?.selectAll("path").attr("d",s=>s.source.x===void 0||s.source.y===void 0||s.target.x===void 0||s.target.y===void 0?"":s.source.id===s.target.id?Vs.reflexive.path({config:t,node:s.source,center:e}):a1(r,s.source,s.target)?Vs.arc.path({config:t,source:s.source,target:s.target}):Vs.line.path({config:t,source:s.source,target:s.target}))}function Nge({config:e,center:t,graph:r,selection:o}){o?.select(".link__label").attr("transform",s=>s.source.x===void 0||s.source.y===void 0||s.target.x===void 0||s.target.y===void 0?"translate(0, 0)":s.source.id===s.target.id?Vs.reflexive.labelTransform({config:e,node:s.source,center:t}):a1(r,s.source,s.target)?Vs.arc.labelTransform({config:e,source:s.source,target:s.target}):Vs.line.labelTransform({config:e,source:s.source,target:s.target}))}function a1(e,t,r){return t.id!==r.id&&e.links.some(o=>o.target.id===t.id&&o.source.id===r.id)&&e.links.some(o=>o.target.id===r.id&&o.source.id===t.id)}function Oge(e){return e.append("defs").selectAll("marker")}function Pge({config:e,graph:t,selection:r}){return r?.data(Rge(t),o=>o).join(o=>{const s=o.append("marker").attr("id",c=>r1(c)).attr("markerHeight",4*e.marker.size).attr("markerWidth",4*e.marker.size).attr("markerUnits","userSpaceOnUse").attr("orient","auto").attr("refX",e.marker.ref[0]).attr("refY",e.marker.ref[1]).attr("viewBox",e.marker.viewBox).style("fill",c=>c);return s.append("path").attr("d",$ge(e.marker.path)),s})}function Rge(e){return[...new Set(e.links.map(t=>t.color))]}function $ge(e){const[t,...r]=e;if(!t)return"M0,0";const[o,s]=t;return r.reduce((c,[f,d])=>`${c}L${f},${d}`,`M${o},${s}`)}function Ige(e){return e.append("g").classed("nodes",!0).selectAll("circle")}function Dge({config:e,drag:t,graph:r,onNodeContext:o,onNodeSelected:s,selection:c,showLabels:f}){const d=c?.data(r.nodes,h=>h.id).join(h=>{const p=h.append("g");t!==void 0&&p.call(t);const g=p.append("circle").classed("node",!0).attr("r",b=>mo(e,b)).on("contextmenu",(b,w)=>{t1(b),o(w)}).on("pointerdown",(b,w)=>Fge(b,w,s??o)).style("fill",b=>b.color);e.modifiers.node?.(g);const v=p.append("text").classed("node__label",!0).attr("dy","0.33em").style("fill",b=>b.label?b.label.color:null).style("font-size",b=>b.label?b.label.fontSize:null).style("stroke","none").text(b=>b.label?b.label.text:null);return e.modifiers.nodeLabel?.(v),p});return d?.select(".node").classed("focused",h=>h.isFocused),d?.select(".node__label").attr("opacity",f?1:0),d}const zge=500;function Fge(e,t,r){if(e.button!==void 0&&e.button!==0)return;const o=t.lastInteractionTimestamp,s=Date.now();if(o===void 0||s-o>zge){t.lastInteractionTimestamp=s;return}t.lastInteractionTimestamp=void 0,r(t)}function Hge(e){e?.attr("transform",t=>`translate(${t.x??0},${t.y??0})`)}function Bge({center:e,config:t,graph:r,onTick:o}){const s=Qpe(r.nodes),c=t.simulation.forces.centering;if(c&&c.enabled){const p=c.strength;s.force("x",tge(()=>e().x).strength(p)).force("y",nge(()=>e().y).strength(p))}const f=t.simulation.forces.charge;f&&f.enabled&&s.force("charge",ege().strength(f.strength));const d=t.simulation.forces.collision;d&&d.enabled&&s.force("collision",qpe().radius(p=>d.radiusMultiplier*mo(t,p)));const h=t.simulation.forces.link;return h&&h.enabled&&s.force("link",Upe(r.links).id(p=>p.id).distance(t.simulation.forces.link.length).strength(h.strength)),s.on("tick",()=>o()),t.modifiers.simulation?.(s),s}function Wge({canvasContainer:e,config:t,min:r,max:o,onZoom:s}){const c=_pe().scaleExtent([r,o]).filter(f=>f.button===0||f.touches?.length>=2).on("start",()=>e().classed("grabbed",!0)).on("zoom",f=>s(f)).on("end",()=>e().classed("grabbed",!1));return t.modifiers.zoom?.(c),c}var qge=class{nodeTypes;_nodeTypeFilter;_includeUnlinked=!0;_linkFilter=()=>!0;_showLinkLabels=!0;_showNodeLabels=!0;filteredGraph;width=0;height=0;simulation;canvas;linkSelection;nodeSelection;markerSelection;zoom;drag;xOffset=0;yOffset=0;scale;focusedNode=void 0;resizeObserver;container;graph;config;constructor(e,t,r){if(this.container=e,this.graph=t,this.config=r,this.scale=r.zoom.initial,this.resetView(),this.graph.nodes.forEach(o=>{const[s,c]=r.positionInitializer(o,this.effectiveWidth,this.effectiveHeight);o.x=o.x??s,o.y=o.y??c}),this.nodeTypes=[...new Set(t.nodes.map(o=>o.type))],this._nodeTypeFilter=[...this.nodeTypes],r.initial){const{includeUnlinked:o,nodeTypeFilter:s,linkFilter:c,showLinkLabels:f,showNodeLabels:d}=r.initial;this._includeUnlinked=o??this._includeUnlinked,this._showLinkLabels=f??this._showLinkLabels,this._showNodeLabels=d??this._showNodeLabels,this._nodeTypeFilter=s??this._nodeTypeFilter,this._linkFilter=c??this._linkFilter}this.filterGraph(void 0),this.initGraph(),this.restart(r.simulation.alphas.initialize),r.autoResize&&(this.resizeObserver=new ResizeObserver(Vue(()=>this.resize())),this.resizeObserver.observe(this.container))}get nodeTypeFilter(){return this._nodeTypeFilter}get includeUnlinked(){return this._includeUnlinked}set includeUnlinked(e){this._includeUnlinked=e,this.filterGraph(this.focusedNode);const{include:t,exclude:r}=this.config.simulation.alphas.filter.unlinked,o=e?t:r;this.restart(o)}set linkFilter(e){this._linkFilter=e,this.filterGraph(this.focusedNode),this.restart(this.config.simulation.alphas.filter.link)}get linkFilter(){return this._linkFilter}get showNodeLabels(){return this._showNodeLabels}set showNodeLabels(e){this._showNodeLabels=e;const{hide:t,show:r}=this.config.simulation.alphas.labels.nodes,o=e?r:t;this.restart(o)}get showLinkLabels(){return this._showLinkLabels}set showLinkLabels(e){this._showLinkLabels=e;const{hide:t,show:r}=this.config.simulation.alphas.labels.links,o=e?r:t;this.restart(o)}get effectiveWidth(){return this.width/this.scale}get effectiveHeight(){return this.height/this.scale}get effectiveCenter(){return tl.of([this.width,this.height]).divide(2).subtract(tl.of([this.xOffset,this.yOffset])).divide(this.scale)}resize(){const e=this.width,t=this.height,r=this.container.getBoundingClientRect().width,o=this.container.getBoundingClientRect().height,s=e.toFixed()!==r.toFixed(),c=t.toFixed()!==o.toFixed();if(!s&&!c)return;this.width=this.container.getBoundingClientRect().width,this.height=this.container.getBoundingClientRect().height;const f=this.config.simulation.alphas.resize;this.restart(n1(f)?f:f({oldWidth:e,oldHeight:t,newWidth:r,newHeight:o}))}restart(e){this.markerSelection=Pge({config:this.config,graph:this.filteredGraph,selection:this.markerSelection}),this.linkSelection=Age({config:this.config,graph:this.filteredGraph,selection:this.linkSelection,showLabels:this._showLinkLabels}),this.nodeSelection=Dge({config:this.config,drag:this.drag,graph:this.filteredGraph,onNodeContext:t=>this.toggleNodeFocus(t),onNodeSelected:this.config.callbacks.nodeClicked,selection:this.nodeSelection,showLabels:this._showNodeLabels}),this.simulation?.stop(),this.simulation=Bge({center:()=>this.effectiveCenter,config:this.config,graph:this.filteredGraph,onTick:()=>this.onTick()}).alpha(e).restart()}filterNodesByType(e,t){e?this._nodeTypeFilter.push(t):this._nodeTypeFilter=this._nodeTypeFilter.filter(r=>r!==t),this.filterGraph(this.focusedNode),this.restart(this.config.simulation.alphas.filter.type)}shutdown(){this.focusedNode!==void 0&&(this.focusedNode.isFocused=!1,this.focusedNode=void 0),this.resizeObserver?.unobserve(this.container),this.simulation?.stop()}initGraph(){this.zoom=Wge({config:this.config,canvasContainer:()=>Kn(this.container).select("svg"),min:this.config.zoom.min,max:this.config.zoom.max,onZoom:e=>this.onZoom(e)}),this.canvas=pge({applyZoom:this.scale!==1,container:Kn(this.container),offset:[this.xOffset,this.yOffset],scale:this.scale,zoom:this.zoom}),this.applyZoom(),this.linkSelection=Ege(this.canvas),this.nodeSelection=Ige(this.canvas),this.markerSelection=Oge(this.canvas),this.drag=mge({config:this.config,onDragStart:()=>this.simulation?.alphaTarget(this.config.simulation.alphas.drag.start).restart(),onDragEnd:()=>this.simulation?.alphaTarget(this.config.simulation.alphas.drag.end).restart()})}onTick(){Hge(this.nodeSelection),Lge({config:this.config,center:this.effectiveCenter,graph:this.filteredGraph,selection:this.linkSelection})}resetView(){this.simulation?.stop(),Kn(this.container).selectChildren().remove(),this.zoom=void 0,this.canvas=void 0,this.linkSelection=void 0,this.nodeSelection=void 0,this.markerSelection=void 0,this.simulation=void 0,this.width=this.container.getBoundingClientRect().width,this.height=this.container.getBoundingClientRect().height}onZoom(e){this.xOffset=e.transform.x,this.yOffset=e.transform.y,this.scale=e.transform.k,this.applyZoom(),this.config.hooks.afterZoom?.(this.scale,this.xOffset,this.yOffset),this.simulation?.restart()}applyZoom(){gge({canvas:this.canvas,scale:this.scale,xOffset:this.xOffset,yOffset:this.yOffset})}toggleNodeFocus(e){e.isFocused?(this.filterGraph(void 0),this.restart(this.config.simulation.alphas.focus.release(e))):this.focusNode(e)}focusNode(e){this.filterGraph(e),this.restart(this.config.simulation.alphas.focus.acquire(e))}filterGraph(e){this.focusedNode!==void 0&&(this.focusedNode.isFocused=!1,this.focusedNode=void 0),e!==void 0&&this._nodeTypeFilter.includes(e.type)&&(e.isFocused=!0,this.focusedNode=e),this.filteredGraph=vge({graph:this.graph,filter:this._nodeTypeFilter,focusedNode:this.focusedNode,includeUnlinked:this._includeUnlinked,linkFilter:this._linkFilter})}};function s0({nodes:e,links:t}){return{nodes:e??[],links:t??[]}}function jge(e){return{...e}}function Ip(e){return{...e,isFocused:!1,lastInteractionTimestamp:void 0}}function Uge(e){const t=e.map(o=>Jw(o)),r=eL(t);return t.map(({raw:o,id:s,splits:c})=>Ip({color:"var(--color-node-external)",label:{color:"var(--color-node-external)",fontSize:"0.875rem",text:s.includes("node_modules")?r.get(o)??o:c.pop()},isFocused:!1,id:s,type:"external"}))}function Vge(e,t){return Ip({color:t?"var(--color-node-root)":"var(--color-node-inline)",label:{color:t?"var(--color-node-root)":"var(--color-node-inline)",fontSize:"0.875rem",text:e.split(/\//g).pop()},isFocused:!1,id:e,type:"inline"})}function Gge(e,t){if(!e)return s0({});const r=Uge(e.externalized),o=e.inlined.map(d=>Vge(d,d===t))??[],s=[...r,...o],c=Object.fromEntries(s.map(d=>[d.id,d])),f=Object.entries(e.graph).flatMap(([d,h])=>h.map(p=>{const g=c[d],v=c[p];if(!(g===void 0||v===void 0))return jge({source:g,target:v,color:"var(--color-link)",label:!1})}).filter(p=>p!==void 0));return s0({nodes:s,links:f})}const Kge={key:0,"text-green-500":"","flex-shrink-0":"","i-carbon:checkmark":""},Xge={key:1,"text-red-500":"","flex-shrink-0":"","i-carbon:compare":""},Yge={key:2,"text-red-500":"","flex-shrink-0":"","i-carbon:close":""},Zge={key:3,"text-gray-500":"","flex-shrink-0":"","i-carbon:document-blank":""},Jge={key:4,"text-gray-500":"","flex-shrink-0":"","i-carbon:redo":"","rotate-90":""},Qge={key:5,"text-yellow-500":"","flex-shrink-0":"","i-carbon:circle-dash":"","animate-spin":""},c1=rt({__name:"StatusIcon",props:{state:{},mode:{},failedSnapshot:{type:Boolean}},setup(e){return(t,r)=>{const o=vr("tooltip");return e.state==="pass"?(ie(),ve("div",Kge)):e.failedSnapshot?at((ie(),ve("div",Xge,null,512)),[[o,"Contains failed snapshot",void 0,{right:!0}]]):e.state==="fail"?(ie(),ve("div",Yge)):e.mode==="todo"?at((ie(),ve("div",Zge,null,512)),[[o,"Todo",void 0,{right:!0}]]):e.mode==="skip"||e.state==="skip"?at((ie(),ve("div",Jge,null,512)),[[o,"Skipped",void 0,{right:!0}]]):(ie(),ve("div",Qge))}}}),ol=zE(),eme=xE(ol),tme={border:"b base","p-4":""},nme=["innerHTML"],rme=rt({__name:"ViewConsoleOutputEntry",props:{taskName:{},type:{},time:{},content:{}},setup(e){function t(r){return new Date(r).toLocaleTimeString()}return(r,o)=>(ie(),ve("div",tme,[X("div",{"text-xs":"","mb-1":"",class:ot(e.type==="stderr"?"text-red-600 dark:text-red-300":"op30")},Re(t(e.time))+" | "+Re(e.taskName)+" | "+Re(e.type),3),X("pre",{"data-type":"html",innerHTML:e.content},null,8,nme)]))}}),ime={key:0,"h-full":"",class:"scrolls",flex:"","flex-col":"","data-testid":"logs"},ome={key:1,p6:""},sme=rt({__name:"ViewConsoleOutput",setup(e){const t=ke(()=>{const o=Tx.value;if(o){const s=wp(ol.value);return o.map(({taskId:c,type:f,time:d,content:h})=>({taskId:c,type:f,time:d,content:s.toHtml(oa(h))}))}});function r(o){const s=o&&ft.state.idMap.get(o);return s&&"filepath"in s?s.name:(s?$A(s).slice(1).join(" > "):"-")||"-"}return(o,s)=>t.value?.length?(ie(),ve("div",ime,[(ie(!0),ve(nt,null,$n(t.value,({taskId:c,type:f,time:d,content:h})=>(ie(),ve("div",{key:c,"font-mono":""},[Ne(rme,{"task-name":r(c),type:f,time:d,content:h},null,8,["task-name","type","time","content"])]))),128))])):(ie(),ve("div",ome,[...s[0]||(s[0]=[Qe(" Log something in your test and it would print here. (e.g. ",-1),X("pre",{inline:""},"console.log(foo)",-1),Qe(") ",-1)])]))}}),u1={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(u1);var fr=function(e,t,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(e):o?o.value:t.get(e)},As,Kl,Do;class lme{constructor(...t){As.set(this,new Map),Kl.set(this,new Map),Do.set(this,new Map);for(const r of t)this.define(r)}define(t,r=!1){for(let[o,s]of Object.entries(t)){o=o.toLowerCase(),s=s.map(d=>d.toLowerCase()),fr(this,Do,"f").has(o)||fr(this,Do,"f").set(o,new Set);const c=fr(this,Do,"f").get(o);let f=!0;for(let d of s){const h=d.startsWith("*");if(d=h?d.slice(1):d,c?.add(d),f&&fr(this,Kl,"f").set(o,d),f=!1,h)continue;const p=fr(this,As,"f").get(d);if(p&&p!=o&&!r)throw new Error(`"${o} -> ${d}" conflicts with "${p} -> ${d}". Pass \`force=true\` to override this definition.`);fr(this,As,"f").set(d,o)}}return this}getType(t){if(typeof t!="string")return null;const r=t.replace(/^.*[/\\]/s,"").toLowerCase(),o=r.replace(/^.*\./s,"").toLowerCase(),s=r.length<t.length;return!(o.length<r.length-1)&&s?null:fr(this,As,"f").get(o)??null}getExtension(t){return typeof t!="string"?null:(t=t?.split?.(";")[0],(t&&fr(this,Kl,"f").get(t.trim().toLowerCase()))??null)}getAllExtensions(t){return typeof t!="string"?null:fr(this,Do,"f").get(t.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const t of fr(this,Do,"f").values())Object.freeze(t);return this}_getTestState(){return{types:fr(this,As,"f"),extensions:fr(this,Kl,"f")}}}As=new WeakMap,Kl=new WeakMap,Do=new WeakMap;const ame=new lme(u1)._freeze();function Ma(e){if(gr)return`/data/${e.path}`;const t=e.contentType??"application/octet-stream";return e.path?`/__vitest_attachment__?path=${encodeURIComponent(e.path)}&contentType=${t}&token=${window.VITEST_API_TOKEN}`:`data:${t};base64,${e.body}`}function f1(e,t){const r=t?ame.getExtension(t):null;return e.replace(/[\x00-\x2C\x2E\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]+/g,"-")+(r?`.${r}`:"")}function d1(e){const t=e.path||e.body;return typeof t=="string"&&(t.startsWith("http://")||t.startsWith("https://"))}function Mh(e){const t=e.path||e.body;return typeof t=="string"&&(t.startsWith("http://")||t.startsWith("https://"))?t:Ma(e)}const tu=rt({__name:"CodeMirrorContainer",props:da({mode:{},readOnly:{type:Boolean},saving:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:da(["save","codemirror"],["update:modelValue"]),setup(e,{emit:t}){const r=t,o=Yu(e,"modelValue"),s=U_(),c={html:"htmlmixed",vue:"htmlmixed",svelte:"htmlmixed",js:"javascript",mjs:"javascript",cjs:"javascript",ts:{name:"javascript",typescript:!0},mts:{name:"javascript",typescript:!0},cts:{name:"javascript",typescript:!0},jsx:{name:"javascript",jsx:!0},tsx:{name:"javascript",typescript:!0,jsx:!0}},f=Ge();return Mi(async()=>{const d=hce(f,o,{...s,mode:c[e.mode||""]||e.mode,readOnly:e.readOnly?!0:void 0,extraKeys:{"Cmd-S":function(h){h.getOption("readOnly")||r("save",h.getValue())},"Ctrl-S":function(h){h.getOption("readOnly")||r("save",h.getValue())}}});d.on("refresh",()=>{r("codemirror",d)}),d.on("change",()=>{r("codemirror",d)}),d.setSize("100%","100%"),d.clearHistory(),Nn.value=d,setTimeout(()=>Nn.value?.refresh(),100)}),(d,h)=>(ie(),ve("div",{relative:"","font-mono":"","text-sm":"",class:ot(["codemirror-scrolls",e.saving?"codemirror-busy":void 0])},[X("textarea",{ref_key:"el",ref:f},null,512)],2))}}),cme=rt({__name:"ViewEditor",props:{file:{}},emits:["draft"],setup(e,{emit:t}){const r=e,o=t,s=Ge(""),c=Ft(void 0),f=Ge(!1),d=Ge(!0),h=Ge(!1),p=Ge();xt(()=>r.file,async()=>{if(!h.value){d.value=!0;try{if(!r.file||!r.file?.filepath){s.value="",c.value=s.value,f.value=!1,d.value=!1;return}s.value=await ft.rpc.readTestFile(r.file.filepath)||"",c.value=s.value,f.value=!1}catch(Z){console.error("cannot fetch file",Z)}await Et(),d.value=!1}},{immediate:!0}),xt(()=>[d.value,h.value,r.file,hx.value,px.value],([Z,G,j,N,O])=>{!Z&&!G&&(N!=null?Et(()=>{const C=p.value,k=C??{line:(N??1)-1,ch:O??0};C?p.value=void 0:(Nn.value?.scrollIntoView(k,100),Et(()=>{Nn.value?.focus(),Nn.value?.setCursor(k)}))}):Et(()=>{Nn.value?.focus()}))},{flush:"post"});const g=ke(()=>r.file?.filepath?.split(/\./g).pop()||"js"),v=Ge(),b=ke(()=>{const Z=[];function G(j){j.result?.errors&&Z.push(...j.result.errors),j.type==="suite"&&j.tasks.forEach(G)}return r.file?.tasks.forEach(G),Z}),w=ke(()=>{const Z=[];function G(j){j.type==="test"&&Z.push(...j.annotations),j.type==="suite"&&j.tasks.forEach(G)}return r.file?.tasks.forEach(G),Z}),E=[],L=[],P=[],M=Ge(!1);function R(){P.forEach(([Z,G,j])=>{Z.removeEventListener("click",G),j()}),P.length=0}Ow(v,()=>{Nn.value?.refresh()});function I(){f.value=c.value!==Nn.value.getValue()}xt(f,Z=>{o("draft",Z)},{immediate:!0});function _(Z){const j=(Z?.stacks||[]).filter(z=>z.file&&z.file===r.file?.filepath)?.[0];if(!j)return;const N=document.createElement("div");N.className="op80 flex gap-x-2 items-center";const O=document.createElement("pre");O.className="c-red-600 dark:c-red-400",O.textContent=`${" ".repeat(j.column)}^ ${Z.name}: ${Z?.message||""}`,N.appendChild(O);const C=document.createElement("span");C.className="i-carbon-launch c-red-600 dark:c-red-400 hover:cursor-pointer min-w-1em min-h-1em",C.tabIndex=0,C.ariaLabel="Open in Editor",bw(C,{content:"Open in Editor",placement:"bottom"},!1);const k=async()=>{await bp(j.file,j.line,j.column)};C.addEventListener("click",k),N.appendChild(C),P.push([C,k,()=>ap(C)]),L.push(Nn.value.addLineClass(j.line-1,"wrap","bg-red-500/10")),E.push(Nn.value.addLineWidget(j.line-1,N))}function $(Z){if(!Z.location)return;const{line:G,file:j}=Z.location;if(j!==r.file?.filepath)return;const N=document.createElement("div");N.classList.add("wrap","bg-active","py-3","px-6","my-1"),N.role="note";const O=document.createElement("div");O.classList.add("block","text-black","dark:text-white");const C=document.createElement("span");C.textContent=`${Z.type}: `,C.classList.add("font-bold");const k=document.createElement("span");k.classList.add("whitespace-pre"),k.textContent=Z.message.replace(/[^\r]\n/,`\r
48`),O.append(C,k),N.append(O);const z=Z.attachment;if(z?.path||z?.body)if(z.contentType?.startsWith("image/")){const B=document.createElement("a"),ce=document.createElement("img");B.classList.add("inline-block","mt-3"),B.style.maxWidth="50vw";const be=z.path||z.body;typeof be=="string"&&(be.startsWith("http://")||be.startsWith("https://"))?(ce.setAttribute("src",be),B.referrerPolicy="no-referrer"):ce.setAttribute("src",Ma(z)),B.target="_blank",B.href=ce.src,B.append(ce),N.append(B)}else{const B=document.createElement("a");B.href=Ma(z),B.download=f1(Z.message,z.contentType),B.classList.add("flex","w-min","gap-2","items-center","font-sans","underline","cursor-pointer");const ce=document.createElement("div");ce.classList.add("i-carbon:download","block");const be=document.createElement("span");be.textContent="Download",B.append(ce,be),N.append(B)}E.push(Nn.value.addLineWidget(G-1,N))}const{pause:W,resume:ne}=xt([Nn,b,w,Ms],([Z,G,j,N])=>{if(!Z){E.length=0,L.length=0,R();return}N&&(Z.off("changes",I),R(),E.forEach(O=>O.clear()),L.forEach(O=>Z?.removeLineClass(O,"wrap")),E.length=0,L.length=0,setTimeout(()=>{G.forEach(_),j.forEach($),M.value||Z.clearHistory(),Z.on("changes",I)},100))},{flush:"post"});hp(()=>[Ms.value,h.value,p.value],([Z,G],j)=>{Z&&!G&&j&&j[2]&&Nn.value?.setCursor(j[2])},{debounce:100,flush:"post"});async function ee(Z){if(h.value)return;W(),h.value=!0,await Et();const G=Nn.value;G&&(G.setOption("readOnly",!0),await Et(),G.refresh()),p.value=G?.getCursor(),G?.off("changes",I),R(),E.forEach(j=>j.clear()),L.forEach(j=>G?.removeLineClass(j,"wrap")),E.length=0,L.length=0;try{M.value=!0,await ft.rpc.saveTestFile(r.file.filepath,Z),c.value=Z,f.value=!1}catch(j){console.error("error saving file",j)}M.value||G?.clearHistory();try{await Uv(Ms).toBe(!1,{flush:"sync",timeout:1e3,throwOnTimeout:!0}),await Uv(Ms).toBe(!0,{flush:"sync",timeout:1e3,throwOnTimeout:!1})}catch{}b.value.forEach(_),w.value.forEach($),G?.on("changes",I),h.value=!1,await Et(),G&&(G.setOption("readOnly",!1),await Et(),G.refresh()),ne()}return $a(R),(Z,G)=>(ie(),Ve(tu,ki({ref_key:"editor",ref:v,modelValue:s.value,"onUpdate:modelValue":G[0]||(G[0]=j=>s.value=j),"h-full":""},{lineNumbers:!0,readOnly:K(gr),saving:h.value},{mode:g.value,"data-testid":"code-mirror",onSave:ee}),null,16,["modelValue","mode"]))}}),Dp=rt({__name:"Modal",props:da({direction:{default:"bottom"}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Yu(e,"modelValue"),r=ke(()=>{switch(e.direction){case"bottom":return"bottom-0 left-0 right-0 border-t";case"top":return"top-0 left-0 right-0 border-b";case"left":return"bottom-0 left-0 top-0 border-r";case"right":return"bottom-0 top-0 right-0 border-l";default:return""}}),o=ke(()=>{switch(e.direction){case"bottom":return"translateY(100%)";case"top":return"translateY(-100%)";case"left":return"translateX(-100%)";case"right":return"translateX(100%)";default:return""}}),s=()=>t.value=!1;return(c,f)=>(ie(),ve("div",{class:ot(["fixed inset-0 z-40",t.value?"":"pointer-events-none"])},[X("div",{class:ot(["bg-base inset-0 absolute transition-opacity duration-500 ease-out",t.value?"opacity-50":"opacity-0"]),onClick:s},null,2),X("div",{class:ot(["bg-base border-base absolute transition-all duration-200 ease-out scrolls",[r.value]]),style:zt(t.value?{}:{transform:o.value})},[Dt(c.$slots,"default")],6)],2))}}),ume={class:"overflow-auto max-h-120"},fme={"my-2":"","mx-4":""},dme={"op-70":""},hme={"my-2":"","mx-4":"","text-sm":"","font-light":"","op-90":""},pme=["onClick"],gme=rt({__name:"ModuleGraphImportBreakdown",emits:["select"],setup(e,{emit:t}){const r=t,o=Ge(10),s=ke(()=>{const h=pr.value?.importDurations;if(!h)return[];const p=ei.value.root,g=[];for(const b in h){const w=h[b],E=w.external?tL(b):af(p,b);g.push({importedFile:b,relativeFile:f(E),selfTime:w.selfTime,totalTime:w.totalTime,formattedSelfTime:Fo(w.selfTime),formattedTotalTime:Fo(w.totalTime),selfTimeClass:_u(w.selfTime),totalTimeClass:_u(w.totalTime),external:w.external})}return g.sort((b,w)=>w.totalTime-b.totalTime)}),c=ke(()=>s.value.slice(0,o.value));function f(d){return d.length<=45?d:`...${d.slice(-45)}`}return(d,h)=>(ie(),ve("div",ume,[X("h1",fme,[h[1]||(h[1]=Qe(" Import Duration Breakdown ",-1)),X("span",dme,"(ordered by Total Time) (Top "+Re(Math.min(o.value,c.value.length))+")",1)]),X("table",hme,[h[2]||(h[2]=X("thead",null,[X("tr",null,[X("th",null," Module "),X("th",null," Self "),X("th",null," Total "),X("th",null," % ")])],-1)),X("tbody",null,[(ie(!0),ve(nt,null,$n(c.value,p=>(ie(),ve("tr",{key:p.importedFile},[X("td",{class:"cursor-pointer pr-2",style:zt({color:p.external?"var(--color-node-external)":void 0}),onClick:g=>r("select",p.importedFile,p.external?"external":"inline")},Re(p.relativeFile),13,pme),X("td",{"pr-2":"",class:ot(p.selfTimeClass)},Re(p.formattedSelfTime),3),X("td",{"pr-2":"",class:ot(p.totalTimeClass)},Re(p.formattedTotalTime),3),X("td",{"pr-2":"",class:ot(p.totalTimeClass)},Re(Math.round(p.totalTime/s.value[0].totalTime*100))+"% ",3)]))),128))])]),o.value<s.value.length?(ie(),ve("button",{key:0,class:"flex w-full justify-center h-8 text-sm z-10 relative font-light",onClick:h[0]||(h[0]=p=>o.value+=5)}," Show more ")):He("",!0)]))}}),Cs=rt({__name:"Badge",props:{type:{default:"info"}},setup(e){return(t,r)=>(ie(),ve("span",{class:ot(["rounded-full py-0.5 px-2 text-xs text-white select-none",{"bg-red":e.type==="danger","bg-orange":e.type==="warning","bg-gray":e.type==="info","bg-indigo/60":e.type==="tip"}])},[Dt(t.$slots,"default")],2))}}),mme={"w-350":"","max-w-screen":"","h-full":"",flex:"","flex-col":""},vme={"p-4":"",relative:""},yme={flex:"","justify-between":""},bme={"mr-8":"",flex:"","gap-2":"","items-center":""},wme={op50:"","font-mono":"","text-sm":""},xme={key:0,"p-5":""},kme={key:0,p:"x3 y-1","bg-overlay":"",border:"base b t"},Sme={key:0},_me={p:"x3 y-1","bg-overlay":"",border:"base b t"},Tme=rt({__name:"ModuleTransformResultView",props:{id:{},projectName:{},type:{},canUndo:{type:Boolean}},emits:["close","select","back"],setup(e,{emit:t}){const r=e,o=t,s=TE(()=>{if(pr.value?.id){if(r.type==="inline")return ft.rpc.getTransformResult(r.projectName,r.id,pr.value.id,!!Zn);if(r.type==="external")return ft.rpc.getExternalResult(r.id,pr.value.id)}}),c=ke(()=>{const I=pr.value?.importDurations||{};return I[r.id]||I[NA("/@fs/",r.id)]||{}}),f=ke(()=>r.id?.split(/\./g).pop()||"js"),d=ke(()=>s.value?.source?.trim()||""),h=ke(()=>!s.value||!("code"in s.value)||!ei.value.experimental?.fsModuleCache?void 0:s.value.code.lastIndexOf("vitestCache=")!==-1),p=ke(()=>!s.value||!("code"in s.value)?null:s.value.code.replace(/\/\/# sourceMappingURL=.*\n/,"").replace(/\/\/# sourceMappingSource=.*\n/,"").replace(/\/\/# vitestCache=.*\n?/,"").trim()||""),g=ke(()=>!s.value||!("map"in s.value)?{mappings:""}:{mappings:s.value?.map?.mappings??"",version:s.value?.map?.version}),v=[],b=[],w=[];function E(I,_){const $=I.coordsChar({left:_.clientX,top:_.clientY}),W=I.findMarksAt($);if(W.length!==1)return;const ne=W[0].title;if(ne){const ee=W[0].attributes?.["data-external"]==="true"?"external":"inline";o("select",ne,ee)}}function L(I){const _=document.createElement("div");return _.classList.add("mb-5"),I.forEach(({resolvedId:$,totalTime:W,external:ne})=>{const ee=document.createElement("div");ee.append(document.createTextNode("import "));const Z=document.createElement("span"),G=af(ei.value.root,$);Z.textContent=`"/${G}"`,Z.className="hover:underline decoration-gray cursor-pointer select-none",ee.append(Z),Z.addEventListener("click",()=>{o("select",$,ne?"external":"inline")});const j=document.createElement("span");j.textContent=` ${Fo(W)}`;const N=_u(W);N&&j.classList.add(N),ee.append(j),_.append(ee)}),_}function P(I){const _=document.createElement("div");_.className="flex ml-2",_.textContent=Fo(I);const $=_u(I);return $&&_.classList.add($),_}function M(I){if(w.forEach(_=>_.clear()),w.length=0,v.forEach(_=>_.remove()),v.length=0,b.forEach(_=>_.clear()),b.length=0,s.value&&"modules"in s.value){I.off("mousedown",E),I.on("mousedown",E);const _=s.value.untrackedModules;if(_?.length){const $=L(_);v.push($),w.push(I.addLineWidget(0,$,{above:!0}))}s.value.modules?.forEach($=>{const W={line:$.start.line-1,ch:$.start.column},ne={line:$.end.line-1,ch:$.end.column},ee=I.markText(W,ne,{title:$.resolvedId,attributes:{"data-external":String($.external===!0)},className:"hover:underline decoration-red cursor-pointer select-none"});b.push(ee);const Z=P($.totalTime+($.transformTime||0));_?.length||Z.classList.add("-mt-5"),v.push(Z),I.addWidget({line:$.end.line-1,ch:$.end.column+1},Z,!1)})}}function R(){o("back")}return Cw("Escape",()=>{o("close")}),(I,_)=>{const $=vr("tooltip");return ie(),ve("div",mme,[X("div",vme,[X("div",yme,[X("p",null,[e.canUndo?at((ie(),Ve(_t,{key:0,icon:"i-carbon-arrow-left",class:"flex-inline",onClick:_[0]||(_[0]=W=>R())},null,512)),[[$,"Go Back",void 0,{bottom:!0}]]):He("",!0),_[7]||(_[7]=Qe(" Module Info ",-1)),Ne(K(Qi),{class:"inline","cursor-help":""},{popper:We(()=>[Qe(" This is module is "+Re(e.type==="external"?"externalized":"inlined")+". ",1),e.type==="external"?(ie(),ve(nt,{key:0},[Qe(" It means that the module was not processed by Vite plugins, but instead was directly imported by the environment. ")],64)):(ie(),ve(nt,{key:1},[Qe(" It means that the module was processed by Vite plugins. ")],64))]),default:We(()=>[Ne(Cs,{type:"custom","ml-1":"",style:zt({backgroundColor:`var(--color-node-${e.type})`})},{default:We(()=>[Qe(Re(e.type),1)]),_:1},8,["style"])]),_:1}),h.value===!0?(ie(),Ve(K(Qi),{key:1,class:"inline","cursor-help":""},{popper:We(()=>[..._[4]||(_[4]=[Qe(' This module is cached on the file system under `experimental.fsModuleCachePath` ("node_modules/.exprtimental-vitest-cache" by default). ',-1)])]),default:We(()=>[Ne(Cs,{type:"tip","ml-2":""},{default:We(()=>[..._[3]||(_[3]=[Qe(" cached ",-1)])]),_:1})]),_:1})):He("",!0),h.value===!1?(ie(),Ve(K(Qi),{key:2,class:"inline","cursor-help":""},{popper:We(()=>[..._[6]||(_[6]=[X("p",null,"This module is not cached on the file system. It might be the first test run after cache invalidation or",-1),X("p",null,"it was excluded manually via `experimental_defineCacheKeyGenerator`, or it cannot be cached (modules with `import.meta.glob`, for example).",-1)])]),default:We(()=>[Ne(Cs,{type:"warning","ml-2":""},{default:We(()=>[..._[5]||(_[5]=[Qe(" not cached ",-1)])]),_:1})]),_:1})):He("",!0)]),X("div",bme,[c.value.selfTime!=null&&c.value.external!==!0?(ie(),Ve(K(Qi),{key:0,class:"inline","cursor-help":""},{popper:We(()=>[Qe(" It took "+Re(K(Ed)(c.value.selfTime))+" to import this module, excluding static imports. ",1)]),default:We(()=>[Ne(Cs,{type:K(Xc)(c.value.selfTime)},{default:We(()=>[Qe(" self: "+Re(K(Fo)(c.value.selfTime)),1)]),_:1},8,["type"])]),_:1})):He("",!0),c.value.totalTime!=null?(ie(),Ve(K(Qi),{key:1,class:"inline","cursor-help":""},{popper:We(()=>[Qe(" It took "+Re(K(Ed)(c.value.totalTime))+" to import the whole module, including static imports. ",1)]),default:We(()=>[Ne(Cs,{type:K(Xc)(c.value.totalTime)},{default:We(()=>[Qe(" total: "+Re(K(Fo)(c.value.totalTime)),1)]),_:1},8,["type"])]),_:1})):He("",!0),K(s)&&"transformTime"in K(s)&&K(s).transformTime?(ie(),Ve(K(Qi),{key:2,class:"inline","cursor-help":""},{popper:We(()=>[Qe(" It took "+Re(K(Ed)(K(s).transformTime))+" to transform this module by Vite plugins. ",1)]),default:We(()=>[Ne(Cs,{type:K(Xc)(K(s).transformTime)},{default:We(()=>[Qe(" transform: "+Re(K(Fo)(K(s).transformTime)),1)]),_:1},8,["type"])]),_:1})):He("",!0)])]),X("p",wme,Re(e.id),1),Ne(_t,{icon:"i-carbon-close",absolute:"","top-5px":"","right-5px":"","text-2xl":"",onClick:_[1]||(_[1]=W=>o("close"))})]),K(s)?(ie(),ve(nt,{key:1},[X("div",{grid:"~ rows-[min-content_auto]","overflow-hidden":"","flex-auto":"",class:ot({"cols-2":p.value!=null})},[_[8]||(_[8]=X("div",{p:"x3 y-1","bg-overlay":"",border:"base b t r"}," Source ",-1)),p.value!=null?(ie(),ve("div",kme," Transformed ")):He("",!0),(ie(),Ve(tu,ki({key:e.id,"h-full":"","model-value":d.value,"read-only":""},{lineNumbers:!0},{mode:f.value,onCodemirror:_[2]||(_[2]=W=>M(W))}),null,16,["model-value","mode"])),p.value!=null?(ie(),Ve(tu,ki({key:1,"h-full":"","model-value":p.value,"read-only":""},{lineNumbers:!0},{mode:"js"}),null,16,["model-value"])):He("",!0)],2),g.value.mappings!==""?(ie(),ve("div",Sme,[X("div",_me," Source map (v"+Re(g.value.version)+") ",1),Ne(tu,ki({"model-value":g.value.mappings,"read-only":""},{lineNumbers:!0}),null,16,["model-value"])])):He("",!0)],64)):(ie(),ve("div",xme," No transform result found for this module. "))])}}}),Cme={"h-full":"","min-h-75":"","flex-1":"",overflow:"hidden"},Eme={flex:"","items-center":"","gap-2":"","px-3":"","py-2":""},Ame={flex:"~ gap-1","items-center":"","select-none":""},Lme={class:"pr-2"},Mme=["id","checked","onChange"],Nme=["for"],Ome={key:0,class:"absolute bg-[#eee] dark:bg-[#222] border-base right-0 mr-2 rounded-xl mt-2"},Pme=rt({__name:"ViewModuleGraph",props:da({graph:{},projectName:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,r=Yu(e,"modelValue"),{graph:o}=v_(t),s=Ge(),c=Ge(!1),f=Ge(),d=qE(f),h=Ge(),p=Ge(null),g=Ft(o.value),v=ke(()=>{let j="";const N=pr.value?.importDurations||{};for(const O in N){const{totalTime:C}=N[O];if(C>=500){j="text-red";break}else C>=100&&(j="text-orange")}return j}),b=Ge(ei.value?.experimental?.printImportBreakdown??v.value==="text-red");Mi(()=>{g.value=L(o.value,null,2),ne()}),Ia(()=>{h.value?.shutdown()}),xt(o,()=>{g.value=L(o.value,p.value,2),ne()});function w(){g.value=o.value,ne()}function E(){b.value=!b.value}function L(j,N,O=2){if(!j.nodes.length||j.nodes.length<=50)return j;const C=new Map;j.nodes.forEach(Ae=>C.set(Ae.id,new Set)),j.links.forEach(Ae=>{const Ke=typeof Ae.source=="object"?Ae.source.id:String(Ae.source),je=typeof Ae.target=="object"?Ae.target.id:String(Ae.target);C.get(Ke)?.add(je),C.get(je)?.add(Ke)});let k;if(N)k=[N];else{const Ae=new Set(j.links.map(je=>typeof je.target=="object"?je.target.id:String(je.target))),Ke=j.nodes.filter(je=>je.type==="inline"&&!Ae.has(je.id));k=Ke.length>0?[Ke[0].id]:[j.nodes[0].id]}const z=new Set,B=k.map(Ae=>({id:Ae,level:0}));for(;B.length>0;){const{id:Ae,level:Ke}=B.shift();z.has(Ae)||Ke>O||(z.add(Ae),Ke<O&&(C.get(Ae)||new Set).forEach(Fe=>{z.has(Fe)||B.push({id:Fe,level:Ke+1})}))}const ce=new Map(j.nodes.map(Ae=>[Ae.id,Ae])),be=Array.from(z).map(Ae=>ce.get(Ae)).filter(Ae=>Ae!==void 0),Se=new Map(be.map(Ae=>[Ae.id,Ae])),Be=j.links.map(Ae=>{const Ke=typeof Ae.source=="object"?Ae.source.id:String(Ae.source),je=typeof Ae.target=="object"?Ae.target.id:String(Ae.target);if(z.has(Ke)&&z.has(je)){const Fe=Se.get(Ke),Pe=Se.get(je);if(Fe&&Pe)return{...Ae,source:Fe,target:Pe}}return null}).filter(Ae=>Ae!==null);return{nodes:be,links:Be}}function P(j,N){h.value?.filterNodesByType(N,j)}function M(j,N){f.value={id:j,type:N},c.value=!0}function R(){d.undo()}function I(){c.value=!1,d.clear()}function _(j){p.value=j,g.value=L(o.value,j,2),W(),ne()}function $(){p.value=null,g.value=L(o.value,null,2),W(),ne()}function W(){const j=g.value.nodes.map(C=>{let k,z;return C.id===p.value?(k="var(--color-node-focused)",z="var(--color-node-focused)"):C.type==="inline"?(k=C.color==="var(--color-node-root)"?"var(--color-node-root)":"var(--color-node-inline)",z=k):(k="var(--color-node-external)",z="var(--color-node-external)"),Ip({...C,color:k,label:C.label?{...C.label,color:z}:C.label})}),N=new Map(j.map(C=>[C.id,C])),O=g.value.links.map(C=>{const k=typeof C.source=="object"?C.source.id:String(C.source),z=typeof C.target=="object"?C.target.id:String(C.target);return{...C,source:N.get(k),target:N.get(z)}});g.value={nodes:j,links:O}}function ne(j=!1){if(h.value?.shutdown(),j&&!r.value){r.value=!0;return}if(!g.value||!s.value)return;const N=g.value.nodes.length;let O=1,C=.5;N>300?(O=.3,C=.2):N>200?(O=.4,C=.3):N>100?(O=.5,C=.3):N>50&&(O=.7,O=.4),h.value=new qge(s.value,g.value,hge({nodeRadius:10,autoResize:!0,simulation:{alphas:{initialize:1,resize:({newHeight:k,newWidth:z})=>k===0&&z===0?0:.05},forces:{collision:{radiusMultiplier:10},link:{length:140}}},marker:i1.Arrow(2),modifiers:{node:G},positionInitializer:o.value.nodes.length===1?Eh.Centered:Eh.Randomized,zoom:{initial:O,min:C,max:1.5}}))}const ee=j=>j.button===0,Z=j=>j.button===2;function G(j){if(gr)return;let N=0,O=0,C=0,k=!1;j.on("pointerdown",(z,B)=>{!B.x||!B.y||(k=Z(z),!(!ee(z)&&!k)&&(N=B.x,O=B.y,C=Date.now()))}).on("pointerup",(z,B)=>{if(!B.x||!B.y)return;const ce=Z(z);if(!ee(z)&&!ce||Date.now()-C>500)return;const be=B.x-N,Se=B.y-O;be**2+Se**2<100&&(!ce&&!z.shiftKey?M(B.id,B.type):(ce||z.shiftKey)&&(z.preventDefault(),B.type==="inline"&&_(B.id)))}).on("contextmenu",z=>{z.preventDefault()})}return(j,N)=>{const O=vr("tooltip");return ie(),ve("div",Cme,[X("div",null,[X("div",Eme,[X("div",Ame,[X("div",Lme,Re(g.value.nodes.length)+"/"+Re(K(o).nodes.length)+" "+Re(g.value.nodes.length===1?"module":"modules"),1),at(X("input",{id:"hide-node-modules","onUpdate:modelValue":N[0]||(N[0]=C=>r.value=C),type:"checkbox"},null,512),[[Zb,r.value]]),N[9]||(N[9]=X("label",{"font-light":"","text-sm":"","ws-nowrap":"","overflow-hidden":"","select-none":"",truncate:"",for:"hide-node-modules","border-b-2":"",border:"$cm-namespace"},"Hide node_modules",-1))]),(ie(!0),ve(nt,null,$n(h.value?.nodeTypes.sort(),C=>(ie(),ve("div",{key:C,flex:"~ gap-1","items-center":"","select-none":""},[X("input",{id:`type-${C}`,type:"checkbox",checked:h.value?.nodeTypeFilter.includes(C),onChange:k=>P(C,k.target.checked)},null,40,Mme),X("label",{"font-light":"","text-sm":"","ws-nowrap":"","overflow-hidden":"",capitalize:"","select-none":"",truncate:"",for:`type-${C}`,"border-b-2":"",style:zt({"border-color":`var(--color-node-${C})`})},Re(C)+" Modules",13,Nme)]))),128)),N[10]||(N[10]=X("div",{"flex-auto":""},null,-1)),N[11]||(N[11]=X("div",{flex:"~ gap-2","items-center":"","text-xs":"","opacity-60":""},[X("span",null,"Click on node: details • Right-click/Shift: expand graph")],-1)),X("div",null,[at(Ne(_t,{icon:"i-carbon-notebook",class:ot(v.value),onClick:N[1]||(N[1]=C=>E())},null,8,["class"]),[[O,`${b.value?"Hide":"Show"} Import Breakdown`,void 0,{bottom:!0}]])]),X("div",null,[at(Ne(_t,{icon:"i-carbon-ibm-cloud-direct-link-2-connect",onClick:N[2]||(N[2]=C=>w())},null,512),[[O,"Show Full Graph",void 0,{bottom:!0}]])]),X("div",null,[at(Ne(_t,{icon:"i-carbon-reset",onClick:N[3]||(N[3]=C=>$())},null,512),[[O,"Reset",void 0,{bottom:!0}]])])])]),b.value?(ie(),ve("div",Ome,[Ne(gme,{onSelect:N[4]||(N[4]=(C,k)=>M(C,k))})])):He("",!0),X("div",{ref_key:"el",ref:s},null,512),Ne(Dp,{modelValue:c.value,"onUpdate:modelValue":N[8]||(N[8]=C=>c.value=C),direction:"right"},{default:We(()=>[f.value?(ie(),Ve(np,{key:0},{default:We(()=>[Ne(Tme,{id:f.value.id,"project-name":e.projectName,type:f.value.type,"can-undo":K(d).undoStack.value.length>1,onClose:N[5]||(N[5]=C=>I()),onSelect:N[6]||(N[6]=(C,k)=>M(C,k)),onBack:N[7]||(N[7]=C=>R())},null,8,["id","project-name","type","can-undo"])]),_:1})):He("",!0)]),_:1},8,["modelValue"])])}}});function h1(e){const t=e.meta?.failScreenshotPath;t&&fetch(`/__open-in-editor?file=${encodeURIComponent(t)}`)}function p1(){const e=Ge(!1),t=Ge(Date.now()),r=Ge(),o=ke(()=>{const c=r.value?.id,f=t.value;return c?`/__screenshot-error?id=${encodeURIComponent(c)}&t=${f}`:void 0});function s(c){r.value=c,t.value=Date.now(),e.value=!0}return{currentTask:r,showScreenshot:e,currentScreenshotUrl:o,showScreenshotModal:s}}const Rme={"w-350":"","max-w-screen":"","h-full":"",flex:"","flex-col":""},$me={"p-4":"",relative:"",border:"base b"},Ime={op50:"","font-mono":"","text-sm":""},Dme={op50:"","font-mono":"","text-sm":""},zme={class:"scrolls",grid:"~ cols-1 rows-[min-content]","p-4":""},Fme=["src","alt"],Hme={key:1},Bme=rt({__name:"ScreenshotError",props:{file:{},name:{},url:{}},emits:["close"],setup(e,{emit:t}){const r=t;return Cw("Escape",()=>{r("close")}),(o,s)=>(ie(),ve("div",Rme,[X("div",$me,[s[1]||(s[1]=X("p",null,"Screenshot error",-1)),X("p",Ime,Re(e.file),1),X("p",Dme,Re(e.name),1),Ne(_t,{icon:"i-carbon:close",title:"Close",absolute:"","top-5px":"","right-5px":"","text-2xl":"",onClick:s[0]||(s[0]=c=>r("close"))})]),X("div",zme,[e.url?(ie(),ve("img",{key:0,src:e.url,alt:`Screenshot error for '${e.name}' test in file '${e.file}'`,border:"base t r b l dotted red-500"},null,8,Fme)):(ie(),ve("div",Hme," Something was wrong, the image cannot be resolved. "))])]))}}),g1=Ni(Bme,[["__scopeId","data-v-08ce44b7"]]),Wme={class:"scrolls scrolls-rounded task-error"},qme=["onClickPassive"],jme=["innerHTML"],Ume=rt({__name:"ViewReportError",props:{fileId:{},root:{},filename:{},error:{}},setup(e){const t=e;function r(d){return d.startsWith(t.root)?d.slice(t.root.length):d}const o=ke(()=>wp(ol.value)),s=ke(()=>!!t.error?.diff),c=ke(()=>t.error.diff?o.value.toHtml(oa(t.error.diff)):void 0);function f(d){return oce(d.file,t.filename)?pce(t.fileId,d):bp(d.file,d.line,d.column)}return(d,h)=>{const p=vr("tooltip");return ie(),ve("div",Wme,[X("pre",null,[X("b",null,Re(e.error.name),1),Qe(": "+Re(e.error.message),1)]),(ie(!0),ve(nt,null,$n(e.error.stacks,(g,v)=>(ie(),ve("div",{key:v,class:"op80 flex gap-x-2 items-center","data-testid":"stack"},[X("pre",null," - "+Re(r(g.file))+":"+Re(g.line)+":"+Re(g.column),1),at(X("div",{class:"i-carbon-launch c-red-600 dark:c-red-400 hover:cursor-pointer min-w-1em min-h-1em",tabindex:"0","aria-label":"Open in Editor",onClickPassive:b=>f(g)},null,40,qme),[[p,"Open in Editor",void 0,{bottom:!0}]])]))),128)),s.value?(ie(),ve("pre",{key:0,"data-testid":"diff",innerHTML:c.value},null,8,jme)):He("",!0)])}}}),m1=Ni(Ume,[["__scopeId","data-v-1fcfe7a4"]]),Vme={"h-full":"",class:"scrolls"},Gme=["id"],Kme={flex:"~ gap-2 items-center"},Xme={key:0,class:"scrolls scrolls-rounded task-error","data-testid":"task-error"},Yme=["innerHTML"],Zme={key:1,bg:"green-500/10",text:"green-500 sm",p:"x4 y2","m-2":"",rounded:""},Jme=rt({__name:"ViewReport",props:{file:{}},setup(e){const t=e;function r(h,p){return h.result?.state!=="fail"?[]:h.type==="test"?[{...h,level:p}]:[{...h,level:p},...h.tasks.flatMap(g=>r(g,p+1))]}const o=ke(()=>{const h=t.file,p=h.tasks?.flatMap(b=>r(b,0))??[],g=h.result;if(g?.errors?.[0]){const b={id:h.id,file:h,name:h.name,fullName:h.name,level:0,type:"suite",mode:"run",meta:{},tasks:[],result:g};p.unshift(b)}return p.length>0?dx(ol.value,p):p}),{currentTask:s,showScreenshot:c,showScreenshotModal:f,currentScreenshotUrl:d}=p1();return(h,p)=>{const g=vr("tooltip");return ie(),ve("div",Vme,[o.value.length?(ie(!0),ve(nt,{key:0},$n(o.value,v=>(ie(),ve("div",{id:v.id,key:v.id},[X("div",{bg:"red-500/10",text:"red-500 sm",p:"x3 y2","m-2":"",rounded:"",style:zt({"margin-left":`${v.result?.htmlError?.5:2*v.level+.5}rem`})},[X("div",Kme,[X("span",null,Re(v.name),1),K(Zn)&&v.meta?.failScreenshotPath?(ie(),ve(nt,{key:0},[at(Ne(_t,{class:"!op-100",icon:"i-carbon:image",title:"View screenshot error",onClick:b=>K(f)(v)},null,8,["onClick"]),[[g,"View screenshot error",void 0,{bottom:!0}]]),at(Ne(_t,{class:"!op-100",icon:"i-carbon:image-reference",title:"Open screenshot error in editor",onClick:b=>K(h1)(v)},null,8,["onClick"]),[[g,"Open screenshot error in editor",void 0,{bottom:!0}]])],64)):He("",!0)]),v.result?.htmlError?(ie(),ve("div",Xme,[X("pre",{innerHTML:v.result.htmlError},null,8,Yme)])):v.result?.errors?(ie(!0),ve(nt,{key:1},$n(v.result.errors,(b,w)=>(ie(),Ve(m1,{key:w,error:b,filename:e.file.name,root:K(ei).root,"file-id":e.file.id},null,8,["error","filename","root","file-id"]))),128)):He("",!0)],4)],8,Gme))),128)):(ie(),ve("div",Zme," All tests passed in this file ")),K(Zn)?(ie(),Ve(Dp,{key:2,modelValue:K(c),"onUpdate:modelValue":p[1]||(p[1]=v=>Mt(c)?c.value=v:null),direction:"right"},{default:We(()=>[K(s)?(ie(),Ve(np,{key:0},{default:We(()=>[Ne(g1,{file:K(s).file.filepath,name:K(s).name,url:K(d),onClose:p[0]||(p[0]=v=>c.value=!1)},null,8,["file","name","url"])]),_:1})):He("",!0)]),_:1},8,["modelValue"])):He("",!0)])}}}),Qme=Ni(Jme,[["__scopeId","data-v-9d875d6e"]]),eve=["href","referrerPolicy"],tve=["src"],nve=rt({__name:"AnnotationAttachmentImage",props:{annotation:{}},setup(e){const t=e,r=ke(()=>{const o=t.annotation.attachment,s=o.path||o.body;return typeof s=="string"&&(s.startsWith("http://")||s.startsWith("https://"))?s:Ma(o)});return(o,s)=>e.annotation.attachment&&e.annotation.attachment.contentType?.startsWith("image/")?(ie(),ve("a",{key:0,target:"_blank",class:"inline-block mt-2",style:{maxWidth:"600px"},href:r.value,referrerPolicy:K(d1)(e.annotation.attachment)?"no-referrer":void 0},[X("img",{src:r.value},null,8,tve)],8,eve)):He("",!0)}}),rve={class:"flex flex-col gap-4"},ive={key:0},ove=rt({__name:"ArtifactTemplate",setup(e){const t=yb();return(r,o)=>(ie(),ve("article",rve,[X("h1",null,[Dt(r.$slots,"title")]),K(t).message?(ie(),ve("p",ive,[Dt(r.$slots,"message")])):He("",!0),Dt(r.$slots,"default")]))}}),v1=Symbol("tabContext"),Ru={tab:(e,t)=>`${t}-${e}-tab`,tabpanel:(e,t)=>`${t}-${e}-tabpanel`},sve={class:"flex flex-col items-center gap-6"},lve={role:"tablist","aria-orientation":"horizontal",class:"flex gap-4"},ave=["id","aria-selected","aria-controls","onClick"],cve=rt({__name:"SmallTabs",setup(e){const t=Ge(null),r=Ge([]),o=Yh();return dr(v1,{id:o,activeTab:t,registerTab:s=>{r.value.some(({id:c})=>c===s.id)||r.value.push(s),r.value.length===1&&(t.value=s.id)},unregisterTab:s=>{const c=r.value.findIndex(({id:f})=>f===s.id);c>-1&&r.value.splice(c,1),t.value===s.id&&(t.value=r.value[0]?.id??null)}}),(s,c)=>(ie(),ve("div",sve,[X("div",lve,[(ie(!0),ve(nt,null,$n(r.value,f=>(ie(),ve("button",{id:K(Ru).tab(f.id,K(o)),key:f.id,role:"tab","aria-selected":t.value===f.id,"aria-controls":K(Ru).tabpanel(f.id,K(o)),type:"button",class:"aria-[selected=true]:underline underline-offset-4",onClick:d=>t.value=f.id},Re(f.title),9,ave))),128))]),Dt(s.$slots,"default")]))}}),uve=["id","aria-labelledby","hidden"],Bc=rt({__name:"SmallTabsPane",props:{title:{}},setup(e){const t=e,r=pn(v1);if(!r)throw new Error("TabPane must be used within Tabs");const o=Yh(),s=ke(()=>r.activeTab.value===o);return Mi(()=>{r.registerTab({...t,id:o})}),Ia(()=>{r.unregisterTab({...t,id:o})}),(c,f)=>(ie(),ve("div",{id:K(Ru).tabpanel(K(o),K(r).id),role:"tabpanel","aria-labelledby":K(Ru).tab(K(o),K(r).id),hidden:!s.value,class:"max-w-full"},[Dt(c.$slots,"default")],8,uve))}}),y1=rt({__name:"VisualRegressionImageContainer",setup(e){const t=`url("${CSS.escape('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><path d="M1 2V0h1v1H0v1z" fill-opacity=".05"/></svg>')}")`;return(r,o)=>(ie(),ve("div",{class:"max-w-full w-fit mx-auto bg-[size:16px_16px] bg-[#fafafa] dark:bg-[#3a3a3a] bg-center p-4 rounded user-select-none outline-0 outline-black dark:outline-white outline-offset-4 outline-solid focus-within:has-focus-visible:outline-2",style:zt({backgroundImage:t})},[Dt(r.$slots,"default")],4))}}),fve=["href","referrerPolicy"],dve=["src"],zd=rt({__name:"VisualRegressionImage",props:{attachment:{}},setup(e){const t=ke(()=>Mh(e.attachment));return(r,o)=>(ie(),Ve(y1,null,{default:We(()=>[X("a",{target:"_blank",href:t.value,referrerPolicy:K(d1)(e.attachment)?"no-referrer":void 0},[X("img",{src:t.value},null,8,dve)],8,fve)]),_:1}))}}),hve={class:"absolute w-full h-full place-content-center place-items-center [clip-path:polygon(0%_0%,var(--split)_0%,var(--split)_100%,0%_100%)]","aria-hidden":"true",role:"presentation"},pve=["src"],gve={class:"absolute w-full h-full place-content-center place-items-center [clip-path:polygon(var(--split)_0%,100%_0%,100%_100%,var(--split)_100%)]","aria-hidden":"true",role:"presentation"},mve=["src"],vve=["id"],yve=["for"],bve=rt({__name:"VisualRegressionSlider",props:{reference:{},actual:{}},setup(e){const t=ke(()=>Mh(e.reference)),r=ke(()=>Mh(e.actual)),o=ke(()=>Math.max(e.reference.width,e.actual.width)),s=ke(()=>Math.max(e.reference.height,e.actual.height)),c=Ge(50),f=Yh();return(d,h)=>(ie(),Ve(y1,null,{default:We(()=>[X("div",{"aria-label":"Image comparison slider showing reference and actual screenshots",class:"relative max-w-full h-full overflow-hidden",style:zt({"--split":`${c.value}%`,aspectRatio:`${o.value} / ${s.value}`,width:`${o.value}px`})},[X("div",hve,[X("img",{src:t.value},null,8,pve)]),X("div",gve,[X("img",{src:r.value},null,8,mve)]),h[1]||(h[1]=X("div",{class:"absolute left-[--split] h-full w-[2px] -translate-x-1/2 bg-white shadow-[0_0_3px_rgb(0_0_0/.2),0_0_10px_rgb(0_0_0/.5)] before:content-[''] before:absolute before:top-1/2 before:size-[16px] before:bg-white before:border-[2px] before:border-black before:rounded-full before:-translate-y-1/2 before:translate-x-[calc(-50%+1px)]","aria-hidden":"true",role:"presentation"},null,-1)),at(X("input",{id:K(f),"onUpdate:modelValue":h[0]||(h[0]=p=>c.value=p),type:"range",min:"0",max:"100",step:"0.1","aria-label":"Adjust slider to compare reference and actual images",class:"absolute inset-0 opacity-0 cursor-col-resize"},null,8,vve),[[Yb,c.value]]),X("output",{for:K(f),class:"sr-only"}," Showing "+Re(c.value)+"% reference, "+Re(100-c.value)+"% actual ",9,yve)],4)]),_:1}))}}),wve=rt({__name:"VisualRegression",props:{regression:{}},setup(e){const t=ke(()=>({diff:e.regression.attachments.find(r=>r.name==="diff"),reference:e.regression.attachments.find(r=>r.name==="reference"),actual:e.regression.attachments.find(r=>r.name==="actual")}));return(r,o)=>(ie(),Ve(ove,null,{title:We(()=>[...o[0]||(o[0]=[Qe(" Visual Regression ",-1)])]),message:We(()=>[Qe(Re(e.regression.message),1)]),default:We(()=>[Ne(cve,null,{default:We(()=>[t.value.diff?(ie(),Ve(Bc,{key:t.value.diff.path,title:"Diff"},{default:We(()=>[Ne(zd,{attachment:t.value.diff},null,8,["attachment"])]),_:1})):He("",!0),t.value.reference?(ie(),Ve(Bc,{key:t.value.reference.path,title:"Reference"},{default:We(()=>[Ne(zd,{attachment:t.value.reference},null,8,["attachment"])]),_:1})):He("",!0),t.value.actual?(ie(),Ve(Bc,{key:t.value.actual.path,title:"Actual"},{default:We(()=>[Ne(zd,{attachment:t.value.actual},null,8,["attachment"])]),_:1})):He("",!0),t.value.reference&&t.value.actual?(ie(),Ve(Bc,{key:(t.value.reference.path??"")+(t.value.actual.path??""),title:"Slider"},{default:We(()=>[Ne(bve,{actual:t.value.actual,reference:t.value.reference},null,8,["actual","reference"])]),_:1})):He("",!0)]),_:1})]),_:1}))}}),xve={"h-full":"",class:"scrolls"},kve={key:0},Sve={bg:"red-500/10",text:"red-500 sm",p:"x3 y2","m-2":"",rounded:""},_ve={flex:"~ gap-2 items-center"},Tve={key:0,class:"scrolls scrolls-rounded task-error","data-testid":"task-error"},Cve=["innerHTML"],Eve={key:1,bg:"green-500/10",text:"green-500 sm",p:"x4 y2","m-2":"",rounded:""},Ave={flex:"~ gap-2 items-center justify-between","overflow-hidden":""},Lve={class:"flex gap-2","overflow-hidden":""},Mve={class:"font-bold","ws-nowrap":"",truncate:""},Nve=["href","download"],Ove=["onClick"],Pve={key:1,class:"flex gap-1 text-yellow-500/80","ws-nowrap":""},Rve={class:"scrolls scrolls-rounded task-error","data-testid":"task-error"},$ve={flex:"~ gap-2 items-center justify-between","overflow-hidden":""},Ive=["onClick"],Dve={key:1,class:"flex gap-1 text-yellow-500/80","ws-nowrap":""},zve={bg:"gray/10",text:"black-100 sm",p:"x3 y2","m-2":"",rounded:"",class:"grid grid-cols-1 md:grid-cols-[200px_1fr] gap-2","overflow-hidden":""},Fve={"font-bold":"","ws-nowrap":"",truncate:"","py-2":""},Hve={"overflow-auto":"",bg:"gray/30",rounded:"","p-2":""},Bve=rt({__name:"ViewTestReport",props:{test:{}},setup(e){const t=e,r=ke(()=>!t.test.result||!t.test.result.errors?.length?null:dx(ol.value,[t.test])[0]);function o(v){return gce(t.test,v)}const{currentTask:s,showScreenshot:c,showScreenshotModal:f,currentScreenshotUrl:d}=p1();function h(v){return`${af(ei.value.root,v.file)}:${v.line}:${v.column}`}const p=new Set(["benchmark","typecheck","failScreenshotPath"]),g=ke(()=>Object.entries(t.test.meta).filter(([v])=>!p.has(v)));return(v,b)=>{const w=vr("tooltip");return ie(),ve("div",xve,[r.value?(ie(),ve("div",kve,[X("div",Sve,[X("div",_ve,[K(Zn)&&e.test.meta?.failScreenshotPath?(ie(),ve(nt,{key:0},[at(Ne(_t,{class:"!op-100",icon:"i-carbon:image",title:"View screenshot error",onClick:b[0]||(b[0]=E=>K(f)(e.test))},null,512),[[w,"View screenshot error",void 0,{bottom:!0}]]),at(Ne(_t,{class:"!op-100",icon:"i-carbon:image-reference",title:"Open screenshot error in editor",onClick:b[1]||(b[1]=E=>K(h1)(e.test))},null,512),[[w,"Open screenshot error in editor",void 0,{bottom:!0}]])],64)):He("",!0)]),e.test.result?.htmlError?(ie(),ve("div",Tve,[X("pre",{innerHTML:e.test.result.htmlError},null,8,Cve)])):e.test.result?.errors?(ie(!0),ve(nt,{key:1},$n(e.test.result.errors,(E,L)=>(ie(),Ve(m1,{key:L,"file-id":e.test.file.id,error:E,filename:e.test.file.name,root:K(ei).root},null,8,["file-id","error","filename","root"]))),128)):He("",!0)])])):(ie(),ve("div",Eve," All tests passed in this file ")),e.test.annotations.length?(ie(),ve(nt,{key:2},[b[5]||(b[5]=X("h1",{"m-2":""}," Test Annotations ",-1)),(ie(!0),ve(nt,null,$n(e.test.annotations,E=>(ie(),ve("div",{key:E.type+E.message,bg:"yellow-500/10",text:"yellow-500 sm",p:"x3 y2","m-2":"",rounded:"",role:"note"},[X("div",Ave,[X("div",Lve,[X("span",Mve,Re(E.type),1),E.attachment&&!E.attachment.contentType?.startsWith("image/")?(ie(),ve("a",{key:0,class:"flex gap-1 items-center text-yellow-500/80 cursor-pointer",href:K(Ma)(E.attachment),download:K(f1)(E.message,E.attachment.contentType)},[...b[4]||(b[4]=[X("span",{class:"i-carbon:download block"},null,-1),Qe(" Download ",-1)])],8,Nve)):He("",!0)]),X("div",null,[E.location&&E.location.file===e.test.file.filepath?at((ie(),ve("span",{key:0,title:"Open in Editor",class:"flex gap-1 text-yellow-500/80 cursor-pointer","ws-nowrap":"",onClick:L=>o(E.location)},[Qe(Re(h(E.location)),1)],8,Ove)),[[w,"Open in Editor",void 0,{bottom:!0}]]):E.location&&E.location.file!==e.test.file.filepath?(ie(),ve("span",Pve,Re(h(E.location)),1)):He("",!0)])]),X("div",Rve,Re(E.message),1),Ne(nve,{annotation:E},null,8,["annotation"])]))),128))],64)):He("",!0),e.test.artifacts.length?(ie(),ve(nt,{key:3},[b[6]||(b[6]=X("h1",{"m-2":""}," Test Artifacts ",-1)),(ie(!0),ve(nt,null,$n(e.test.artifacts,(E,L)=>(ie(),ve("div",{key:E.type+L,bg:"yellow-500/10",text:"yellow-500 sm",p:"x3 y2","m-2":"",rounded:"",role:"note"},[X("div",$ve,[X("div",null,[E.location&&E.location.file===e.test.file.filepath?at((ie(),ve("span",{key:0,title:"Open in Editor",class:"flex gap-1 text-yellow-500/80 cursor-pointer","ws-nowrap":"",onClick:P=>o(E.location)},[Qe(Re(h(E.location)),1)],8,Ive)),[[w,"Open in Editor",void 0,{bottom:!0}]]):E.location&&E.location.file!==e.test.file.filepath?(ie(),ve("span",Dve,Re(h(E.location)),1)):He("",!0)])]),E.type==="internal:toMatchScreenshot"&&E.kind==="visual-regression"?(ie(),Ve(wve,{key:0,regression:E},null,8,["regression"])):He("",!0)]))),128))],64)):He("",!0),g.value.length?(ie(),ve(nt,{key:4},[b[7]||(b[7]=X("h1",{"m-2":""}," Test Meta ",-1)),X("div",zve,[(ie(!0),ve(nt,null,$n(g.value,([E,L])=>(ie(),ve(nt,{key:E},[X("div",Fve,Re(E),1),X("pre",Hve,Re(L),1)],64))),128))])],64)):He("",!0),K(Zn)?(ie(),Ve(Dp,{key:5,modelValue:K(c),"onUpdate:modelValue":b[3]||(b[3]=E=>Mt(c)?c.value=E:null),direction:"right"},{default:We(()=>[K(s)?(ie(),Ve(np,{key:0},{default:We(()=>[Ne(g1,{file:K(s).file.filepath,name:K(s).name,url:K(d),onClose:b[2]||(b[2]=E=>c.value=!1)},null,8,["file","name","url"])]),_:1})):He("",!0)]),_:1},8,["modelValue"])):He("",!0)])}}}),Wve=Ni(Bve,[["__scopeId","data-v-1a68630b"]]),qve={key:0,flex:"","flex-col":"","h-full":"","max-h-full":"","overflow-hidden":"","data-testid":"file-detail"},jve={p:"2","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},Uve={key:0,class:"i-logos:typescript-icon","flex-shrink-0":""},Vve={"flex-1":"","font-light":"","op-50":"","ws-nowrap":"",truncate:"","text-sm":""},Gve={class:"flex text-lg"},Kve={flex:"~","items-center":"","bg-header":"",border:"b-2 base","text-sm":"","h-41px":""},Xve={key:0,class:"block w-1.4em h-1.4em i-carbon:circle-dash animate-spin animate-2s"},Yve={key:1,class:"block w-1.4em h-1.4em i-carbon:chart-relationship"},Zve={flex:"","flex-col":"","flex-1":"",overflow:"hidden"},Jve=["flex-1"],l0=rt({__name:"FileDetails",setup(e){const t=Ge({nodes:[],links:[]}),r=Ge(!1),o=Ge(!1),s=Ge(!1),c=Ge(void 0),f=Ge(!0),d=ke(()=>Bs.value?ft.state.idMap.get(Bs.value):void 0),h=ke(()=>{const _=Gt.value;if(!(!_||!_.filepath))return{filepath:_.filepath,projectName:_.file.projectName||""}}),p=ke(()=>Gt.value&&yp(Gt.value)),g=ke(()=>!!Gt.value?.meta?.typecheck);function v(){const _=Gt.value?.filepath;_&&fetch(`/__open-in-editor?file=${encodeURIComponent(_)}`)}function b(_){_==="graph"&&(o.value=!0),hn.value=_}const w=ke(()=>Tx.value?.reduce((_,{size:$})=>_+$,0)??0);function E(_){r.value=_}const L=/[/\\]node_modules[/\\]/;async function P(_=!1){if(!(s.value||h.value?.filepath===c.value&&!_)){s.value=!0,await Et();try{const $=h.value;if(!$){s.value=!1;return}if(_||!c.value||$.filepath!==c.value||!t.value.nodes.length&&!t.value.links.length){let W=await ft.rpc.getModuleGraph($.projectName,$.filepath,!!Zn);f.value&&(gr&&(W=typeof window.structuredClone<"u"?window.structuredClone(W):KA(W)),W.inlined=W.inlined.filter(ne=>!L.test(ne)),W.externalized=W.externalized.filter(ne=>!L.test(ne))),t.value=Gge(W,$.filepath),c.value=$.filepath}b("graph")}finally{await new Promise($=>setTimeout($,100)),s.value=!1}}}hp(()=>[h.value,hn.value,f.value],([,_,$],W)=>{_==="graph"&&P(W&&$!==W[2])},{debounce:100,immediate:!0});const M=ke(()=>{const _=Gt.value?.file.projectName||"";return Oe.colors.get(_)||Qw(Gt.value?.file.projectName)}),R=ke(()=>ex(M.value)),I=ke(()=>{const _=Bs.value;if(!_)return Gt.value?.name;const $=[];let W=ft.state.idMap.get(_);for(;W;)$.push(W.name),W=W.suite?W.suite:W===W.file?void 0:W.file;return $.reverse().join(" > ")});return(_,$)=>{const W=vr("tooltip");return K(Gt)?(ie(),ve("div",qve,[X("div",null,[X("div",jve,[Ne(c1,{state:K(Gt).result?.state,mode:K(Gt).mode,"failed-snapshot":p.value},null,8,["state","mode","failed-snapshot"]),g.value?at((ie(),ve("div",Uve,null,512)),[[W,"This is a typecheck test. It won't report results of the runtime tests",void 0,{bottom:!0}]]):He("",!0),K(Gt)?.file.projectName?(ie(),ve("span",{key:1,class:"rounded-full py-0.5 px-2 text-xs font-light",style:zt({backgroundColor:M.value,color:R.value})},Re(K(Gt).file.projectName),5)):He("",!0),X("div",Vve,Re(I.value),1),X("div",Gve,[K(gr)?He("",!0):at((ie(),Ve(_t,{key:0,title:"Open in editor",icon:"i-carbon-launch",disabled:!K(Gt)?.filepath,onClick:v},null,8,["disabled"])),[[W,"Open in editor",void 0,{bottom:!0}]])])]),X("div",Kve,[X("button",{"tab-button":"",class:ot(["flex items-center gap-2",{"tab-button-active":K(hn)==null}]),"data-testid":"btn-report",onClick:$[0]||($[0]=ne=>b(null))},[...$[5]||($[5]=[X("span",{class:"block w-1.4em h-1.4em i-carbon:report"},null,-1),Qe(" Report ",-1)])],2),X("button",{"tab-button":"","data-testid":"btn-graph",class:ot(["flex items-center gap-2",{"tab-button-active":K(hn)==="graph"}]),onClick:$[1]||($[1]=ne=>b("graph"))},[s.value?(ie(),ve("span",Xve)):(ie(),ve("span",Yve)),$[6]||($[6]=Qe(" Module Graph ",-1))],2),X("button",{"tab-button":"","data-testid":"btn-code",class:ot(["flex items-center gap-2",{"tab-button-active":K(hn)==="editor"}]),onClick:$[2]||($[2]=ne=>b("editor"))},[$[7]||($[7]=X("span",{class:"block w-1.4em h-1.4em i-carbon:code"},null,-1)),Qe(" "+Re(r.value?"* ":"")+"Code ",1)],2),X("button",{"tab-button":"","data-testid":"btn-console",class:ot(["flex items-center gap-2",{"tab-button-active":K(hn)==="console",op20:K(hn)!=="console"&&w.value===0}]),onClick:$[3]||($[3]=ne=>b("console"))},[$[8]||($[8]=X("span",{class:"block w-1.4em h-1.4em i-carbon:terminal-3270"},null,-1)),Qe(" Console ("+Re(w.value)+") ",1)],2)])]),X("div",Zve,[o.value?(ie(),ve("div",{key:0,"flex-1":K(hn)==="graph"&&""},[at(Ne(Pme,{modelValue:f.value,"onUpdate:modelValue":$[4]||($[4]=ne=>f.value=ne),graph:t.value,"data-testid":"graph","project-name":K(Gt).file.projectName||""},null,8,["modelValue","graph","project-name"]),[[ro,K(hn)==="graph"&&!s.value]])],8,Jve)):He("",!0),K(hn)==="editor"?(ie(),Ve(cme,{key:K(Gt).id,file:K(Gt),"data-testid":"editor",onDraft:E},null,8,["file"])):K(hn)==="console"?(ie(),Ve(sme,{key:2,file:K(Gt),"data-testid":"console"},null,8,["file"])):!K(hn)&&!d.value&&K(Gt)?(ie(),Ve(Qme,{key:3,file:K(Gt),"data-testid":"report"},null,8,["file"])):!K(hn)&&d.value?(ie(),Ve(Wve,{key:4,test:d.value,"data-testid":"report"},null,8,["test"])):He("",!0)])])):He("",!0)}}}),Qve=""+new URL("../favicon.svg",import.meta.url).href;function eye(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var r=e.indexOf("Trident/");if(r>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var s=e.indexOf("Edge/");return s>0?parseInt(e.substring(s+5,e.indexOf(".",s)),10):-1}let nu;function Nh(){Nh.init||(Nh.init=!0,nu=eye()!==-1)}var pf={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Nh(),Et(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",nu&&this.$el.appendChild(e),e.data="about:blank",nu||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!nu&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const tye=lb();ob("data-v-b329ee4c");const nye={class:"resize-observer",tabindex:"-1"};sb();const rye=tye((e,t,r,o,s,c)=>(ie(),Ve("div",nye)));pf.render=rye;pf.__scopeId="data-v-b329ee4c";pf.__file="src/components/ResizeObserver.vue";function ru(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ru=function(t){return typeof t}:ru=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(e)}function iye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oye(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function sye(e,t,r){return t&&oye(e.prototype,t),e}function a0(e){return lye(e)||aye(e)||cye(e)||uye()}function lye(e){if(Array.isArray(e))return Oh(e)}function aye(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function cye(e,t){if(e){if(typeof e=="string")return Oh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Oh(e,t)}}function Oh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function uye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
49In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fye(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function dye(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,s,c,f=function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),v=1;v<p;v++)g[v-1]=arguments[v];if(c=g,!(o&&h===s)){var b=r.leading;typeof b=="function"&&(b=b(h,s)),(!o||h!==s)&&b&&e.apply(void 0,[h].concat(a0(c))),s=h,clearTimeout(o),o=setTimeout(function(){e.apply(void 0,[h].concat(a0(c))),o=0},t)}};return f._clear=function(){clearTimeout(o),o=null},f}function b1(e,t){if(e===t)return!0;if(ru(e)==="object"){for(var r in e)if(!b1(e[r],t[r]))return!1;return!0}return!1}var hye=(function(){function e(t,r,o){iye(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(r,o)}return sye(e,[{key:"createObserver",value:function(r,o){var s=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=fye(r),this.callback=function(d,h){s.options.callback(d,h),d&&s.options.once&&(s.frozen=!0,s.destroyObserver())},this.callback&&this.options.throttle){var c=this.options.throttleOptions||{},f=c.leading;this.callback=dye(this.callback,this.options.throttle,{leading:function(h){return f==="both"||f==="visible"&&h||f==="hidden"&&!h}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(d){var h=d[0];if(d.length>1){var p=d.find(function(v){return v.isIntersecting});p&&(h=p)}if(s.callback){var g=h.isIntersecting&&h.intersectionRatio>=s.threshold;if(g===s.oldResult)return;s.oldResult=g,s.callback(g,h)}},this.options.intersection),Et(function(){s.observer&&s.observer.observe(s.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e})();function w1(e,t,r){var o=t.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var s=new hye(e,o,r);e._vue_visibilityState=s}}function pye(e,t,r){var o=t.value,s=t.oldValue;if(!b1(o,s)){var c=e._vue_visibilityState;if(!o){x1(e);return}c?c.createObserver(o,r):w1(e,{value:o},r)}}function x1(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var gye={beforeMount:w1,updated:pye,unmounted:x1},mye={itemsLimit:1e3},vye=/(auto|scroll)/;function k1(e,t){return e.parentNode===null?t:k1(e.parentNode,t.concat([e]))}var Fd=function(t,r){return getComputedStyle(t,null).getPropertyValue(r)},yye=function(t){return Fd(t,"overflow")+Fd(t,"overflow-y")+Fd(t,"overflow-x")},bye=function(t){return vye.test(yye(t))};function c0(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=k1(e.parentNode,[]),r=0;r<t.length;r+=1)if(bye(t[r]))return t[r];return document.scrollingElement||document.documentElement}}function Ph(e){"@babel/helpers - typeof";return Ph=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ph(e)}var wye={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function xye(){return this.items.length&&Ph(this.items[0])!=="object"}var Rh=!1;if(typeof window<"u"){Rh=!1;try{var kye=Object.defineProperty({},"passive",{get:function(){Rh=!0}});window.addEventListener("test",null,kye)}catch{}}let Sye=0;var zp={name:"RecycleScroller",components:{ResizeObserver:pf},directives:{ObserveVisibility:gye},props:{...wye,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,r=this.sizeField,o=this.minItemSize;let s=1e4,c=0,f;for(let d=0,h=t.length;d<h;d++)f=t[d][r]||o,f<s&&(s=f),c+=f,e[d]={accumulator:c,size:f};return this.$_computedMinItemSize=s,e}return[]},simpleArray:xye,itemIndexByKey(){const{keyField:e,items:t}=this,r={};for(let o=0,s=t.length;o<s;o++)r[t[o][e]]=o;return r}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,r,o,s){const c=Uu({id:Sye++,index:t,used:!0,key:o,type:s}),f=Gh({item:r,position:0,nr:c});return e.push(f),f},unuseView(e,t=!1){const r=this.$_unusedViews,o=e.nr.type;let s=r.get(o);s||(s=[],r.set(o,s)),s.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:r}=this.updateVisibleItems(!1,!0);r||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const r=this.itemSize,o=this.gridItems||1,s=this.itemSecondarySize||r,c=this.$_computedMinItemSize,f=this.typeField,d=this.simpleArray?null:this.keyField,h=this.items,p=h.length,g=this.sizes,v=this.$_views,b=this.$_unusedViews,w=this.pool,E=this.itemIndexByKey;let L,P,M,R,I;if(!p)L=P=R=I=M=0;else if(this.$_prerender)L=R=0,P=I=Math.min(this.prerender,h.length),M=null;else{const G=this.getScroll();if(t){let O=G.start-this.$_lastUpdateScrollPosition;if(O<0&&(O=-O),r===null&&O<c||O<r)return{continuous:!0}}this.$_lastUpdateScrollPosition=G.start;const j=this.buffer;G.start-=j,G.end+=j;let N=0;if(this.$refs.before&&(N=this.$refs.before.scrollHeight,G.start-=N),this.$refs.after){const O=this.$refs.after.scrollHeight;G.end+=O}if(r===null){let O,C=0,k=p-1,z=~~(p/2),B;do B=z,O=g[z].accumulator,O<G.start?C=z:z<p-1&&g[z+1].accumulator>G.start&&(k=z),z=~~((C+k)/2);while(z!==B);for(z<0&&(z=0),L=z,M=g[p-1].accumulator,P=z;P<p&&g[P].accumulator<G.end;P++);for(P===-1?P=h.length-1:(P++,P>p&&(P=p)),R=L;R<p&&N+g[R].accumulator<G.start;R++);for(I=R;I<p&&N+g[I].accumulator<G.end;I++);}else{L=~~(G.start/r*o);const O=L%o;L-=O,P=Math.ceil(G.end/r*o),R=Math.max(0,Math.floor((G.start-N)/r*o)),I=Math.floor((G.end-N)/r*o),L<0&&(L=0),P>p&&(P=p),R<0&&(R=0),I>p&&(I=p),M=Math.ceil(p/o)*r}}P-L>mye.itemsLimit&&this.itemsLimitError(),this.totalSize=M;let _;const $=L<=this.$_endIndex&&P>=this.$_startIndex;if($)for(let G=0,j=w.length;G<j;G++)_=w[G],_.nr.used&&(e&&(_.nr.index=E[_.item[d]]),(_.nr.index==null||_.nr.index<L||_.nr.index>=P)&&this.unuseView(_));const W=$?null:new Map;let ne,ee,Z;for(let G=L;G<P;G++){ne=h[G];const j=d?ne[d]:ne;if(j==null)throw new Error(`Key is ${j} on item (keyField is '${d}')`);if(_=v.get(j),!r&&!g[G].size){_&&this.unuseView(_);continue}ee=ne[f];let N=b.get(ee),O=!1;if(!_)$?N&&N.length?_=N.pop():_=this.addView(w,G,ne,j,ee):(Z=W.get(ee)||0,(!N||Z>=N.length)&&(_=this.addView(w,G,ne,j,ee),this.unuseView(_,!0),N=b.get(ee)),_=N[Z],W.set(ee,Z+1)),v.delete(_.nr.key),_.nr.used=!0,_.nr.index=G,_.nr.key=j,_.nr.type=ee,v.set(j,_),O=!0;else if(!_.nr.used&&(_.nr.used=!0,O=!0,N)){const C=N.indexOf(_);C!==-1&&N.splice(C,1)}_.item=ne,O&&(G===h.length-1&&this.$emit("scroll-end"),G===0&&this.$emit("scroll-start")),r===null?(_.position=g[G-1].accumulator,_.offset=0):(_.position=Math.floor(G/o)*r,_.offset=G%o*s)}return this.$_startIndex=L,this.$_endIndex=P,this.emitUpdate&&this.$emit("update",L,P,R,I),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:$}},getListenerTarget(){let e=c0(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,r=t==="vertical";let o;if(this.pageMode){const s=e.getBoundingClientRect(),c=r?s.height:s.width;let f=-(r?s.top:s.left),d=r?window.innerHeight:window.innerWidth;f<0&&(d+=f,f=0),f+d>c&&(d=c-f),o={start:f,end:f+d}}else r?o={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:o={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,Rh?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const r=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/r)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let r,o,s;if(this.pageMode){const c=c0(this.$el),f=c.tagName==="HTML"?0:c[t.scroll],d=c.getBoundingClientRect(),p=this.$el.getBoundingClientRect()[t.start]-d[t.start];r=c,o=t.scroll,s=e+f+p}else r=this.$el,o=t.scroll,s=e;r[o]=s},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const _ye={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Tye={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Cye(e,t,r,o,s,c){const f=Go("ResizeObserver"),d=vr("observe-visibility");return at((ie(),ve("div",{class:ot(["vue-recycle-scroller",{ready:s.ready,"page-mode":r.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...h)=>c.handleScroll&&c.handleScroll(...h))},[e.$slots.before?(ie(),ve("div",_ye,[Dt(e.$slots,"before")],512)):He("v-if",!0),(ie(),Ve(Xd(r.listTag),{ref:"wrapper",style:zt({[e.direction==="vertical"?"minHeight":"minWidth"]:s.totalSize+"px"}),class:ot(["vue-recycle-scroller__item-wrapper",r.listClass])},{default:We(()=>[(ie(!0),ve(nt,null,$n(s.pool,h=>(ie(),Ve(Xd(r.itemTag),ki({key:h.nr.id,style:s.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${h.position}px) translate${e.direction==="vertical"?"X":"Y"}(${h.offset}px)`,width:r.gridItems?`${e.direction==="vertical"&&r.itemSecondarySize||r.itemSize}px`:void 0,height:r.gridItems?`${e.direction==="horizontal"&&r.itemSecondarySize||r.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[r.itemClass,{hover:!r.skipHover&&s.hoverKey===h.nr.key}]]},q_(r.skipHover?{}:{mouseenter:()=>{s.hoverKey=h.nr.key},mouseleave:()=>{s.hoverKey=null}})),{default:We(()=>[Dt(e.$slots,"default",{item:h.item,index:h.nr.index,active:h.nr.used})]),_:2},1040,["style","class"]))),128)),Dt(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(ie(),ve("div",Tye,[Dt(e.$slots,"after")],512)):He("v-if",!0),Ne(f,{onNotify:c.handleResize},null,8,["onNotify"])],34)),[[d,c.handleVisibilityChange]])}zp.render=Cye;zp.__file="src/components/RecycleScroller.vue";function Eye(e){const t=ke(()=>hh.value?!1:!it.onlyTests),r=ke(()=>Vn.value===""),o=Ge(Vn.value);hp(()=>Vn.value,h=>{o.value=h?.trim()??""},{debounce:256});function s(h){Vn.value="",h&&e.value?.focus()}function c(h){it.failed=!1,it.success=!1,it.skipped=!1,it.onlyTests=!1,h&&e.value?.focus()}function f(){c(!1),s(!0)}function d(h,p,g,v,b){Qs.value&&(gn.value.search=h?.trim()??"",gn.value.failed=p,gn.value.success=g,gn.value.skipped=v,gn.value.onlyTests=b)}return xt(()=>[o.value,it.failed,it.success,it.skipped,it.onlyTests],([h,p,g,v,b])=>{d(h,p,g,v,b),Oe.filterNodes()},{flush:"post"}),xt(()=>Dr.value.length,h=>{h&&(gn.value.expandAll=void 0)},{flush:"post"}),{initialized:Qs,filter:it,search:Vn,disableFilter:t,isFiltered:Zw,isFilteredByStatus:hh,disableClearSearch:r,clearAll:f,clearSearch:s,clearFilter:c,filteredFiles:cf,testsTotal:JA,uiEntries:Jn}}const Aye=["open"],Lye=rt({__name:"DetailsPanel",props:{color:{}},setup(e){const t=Ge(!0);return(r,o)=>(ie(),ve("div",{open:t.value,class:"details-panel","data-testid":"details-panel",onToggle:o[0]||(o[0]=s=>t.value=s.target.open)},[X("div",{p:"y1","text-sm":"","bg-base":"","items-center":"","z-5":"","gap-2":"",class:ot(e.color),"w-full":"",flex:"","select-none":"",sticky:"",top:"-1"},[o[1]||(o[1]=X("div",{"flex-1":"","h-1px":"",border:"base b",op80:""},null,-1)),Dt(r.$slots,"summary",{open:t.value}),o[2]||(o[2]=X("div",{"flex-1":"","h-1px":"",border:"base b",op80:""},null,-1))],2),Dt(r.$slots,"default")],40,Aye))}}),Mye={"flex-1":"","ms-2":"","select-none":""},Wc=rt({__name:"FilterStatus",props:da({label:{}},{modelValue:{type:[Boolean,null]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Yu(e,"modelValue");return(r,o)=>(ie(),ve("label",ki({class:"font-light text-sm checkbox flex items-center cursor-pointer py-1 text-sm w-full gap-y-1 mb-1px"},r.$attrs,{onClick:o[1]||(o[1]=Gc(s=>t.value=!t.value,["prevent"]))}),[X("span",{class:ot([t.value?"i-carbon:checkbox-checked-filled":"i-carbon:checkbox"]),"text-lg":"","aria-hidden":"true"},null,2),at(X("input",{"onUpdate:modelValue":o[0]||(o[0]=s=>t.value=s),type:"checkbox","sr-only":""},null,512),[[Zb,t.value]]),X("span",Mye,Re(e.label),1)],16))}}),Nye={type:"button",dark:"op75",bg:"gray-200 dark:#111",hover:"op100","rounded-1":"","p-0.5":""},Oye=rt({__name:"IconAction",props:{icon:{}},setup(e){return(t,r)=>(ie(),ve("button",Nye,[X("span",{block:"",class:ot([e.icon,"dark:op85 hover:op100"]),op65:""},null,2)]))}}),Pye=["aria-label","data-current"],Rye={key:1,"w-4":""},$ye={flex:"","items-end":"","gap-2":"","overflow-hidden":""},Iye={key:0,class:"i-logos:typescript-icon","flex-shrink-0":""},Dye={"text-sm":"",truncate:"","font-light":""},zye=["text","innerHTML"],Fye={key:1,text:"xs",op20:"",style:{"white-space":"nowrap"}},Hye={"gap-1":"","justify-end":"","flex-grow-1":"","pl-1":"",class:"test-actions"},Bye={key:0,class:"op100 gap-1 p-y-1",grid:"~ items-center cols-[1.5em_1fr]"},Wye={key:1},qye=rt({__name:"ExplorerItem",props:{taskId:{},name:{},indent:{},typecheck:{type:Boolean},duration:{},state:{},current:{type:Boolean},type:{},opened:{type:Boolean},expandable:{type:Boolean},search:{},projectName:{},projectNameColor:{},disableTaskLocation:{type:Boolean},onItemClick:{type:Function}},setup(e){const t=ke(()=>ft.state.idMap.get(e.taskId)),r=ke(()=>{if(gr)return!1;const P=t.value;return P&&yp(P)});function o(){if(!e.expandable){e.onItemClick?.(t.value);return}e.opened?Oe.collapseNode(e.taskId):Oe.expandNode(e.taskId)}async function s(P){e.onItemClick?.(P),Os.value&&(Cu.value=!0,await Et()),e.type==="file"?await _p([P.file]):await Xce(P)}function c(P){return ft.rpc.updateSnapshot(P.file)}const f=ke(()=>e.indent<=0?[]:Array.from({length:e.indent},(P,M)=>`${e.taskId}-${M}`)),d=ke(()=>{const P=f.value,M=[];return(e.type==="file"||e.type==="suite")&&M.push("min-content"),M.push("min-content"),e.type==="suite"&&e.typecheck&&M.push("min-content"),M.push("minmax(0, 1fr)"),M.push("min-content"),`grid-template-columns: ${P.map(()=>"1rem").join(" ")} ${M.join(" ")};`}),h=ke(()=>e.type==="file"?"Run current file":e.type==="suite"?"Run all tests in this suite":"Run current test"),p=ke(()=>Yw(e.name)),g=ke(()=>{const P=ZA.value,M=p.value;return P?M.replace(P,R=>`<span class="highlight">${R}</span>`):M}),v=ke(()=>e.type!=="file"&&e.disableTaskLocation),b=ke(()=>e.type==="file"?"Open test details":e.type==="suite"?"View Suite Source Code":"View Test Source Code"),w=ke(()=>v.value?"color-red5 dark:color-#f43f5e":null);function E(){const P=t.value;e.type==="file"?e.onItemClick?.(P):gx(P)}const L=ke(()=>ex(e.projectNameColor));return(P,M)=>{const R=vr("tooltip");return t.value?(ie(),ve("div",{key:0,"items-center":"",p:"x-2 y-1",grid:"~ rows-1 items-center gap-x-2","w-full":"","h-28px":"","border-rounded":"",hover:"bg-active","cursor-pointer":"",class:"item-wrapper",style:zt(d.value),"aria-label":e.name,"data-current":e.current,onClick:M[2]||(M[2]=I=>o())},[e.indent>0?(ie(!0),ve(nt,{key:0},$n(f.value,I=>(ie(),ve("div",{key:I,border:"solid gray-500 dark:gray-400",class:"vertical-line","h-28px":"","inline-flex":"","mx-2":"",op20:""}))),128)):He("",!0),e.type==="file"||e.type==="suite"?(ie(),ve("div",Rye,[X("div",{class:ot(e.opened?"i-carbon:chevron-down":"i-carbon:chevron-right op20"),op20:""},null,2)])):He("",!0),Ne(c1,{state:e.state,mode:t.value.mode,"failed-snapshot":r.value,"w-4":""},null,8,["state","mode","failed-snapshot"]),X("div",$ye,[e.type==="file"&&e.typecheck?at((ie(),ve("div",Iye,null,512)),[[R,"This is a typecheck test. It won't report results of the runtime tests",void 0,{bottom:!0}]]):He("",!0),X("span",Dye,[e.type==="file"&&e.projectName?(ie(),ve("span",{key:0,class:"rounded-full py-0.5 px-2 mr-1 text-xs",style:zt({backgroundColor:e.projectNameColor,color:L.value})},Re(e.projectName),5)):He("",!0),X("span",{text:e.state==="fail"?"red-500":"",innerHTML:g.value},null,8,zye)]),typeof e.duration=="number"?(ie(),ve("span",Fye,Re(e.duration>0?e.duration:"< 1")+"ms ",1)):He("",!0)]),X("div",Hye,[!K(gr)&&r.value?at((ie(),Ve(Oye,{key:0,"data-testid":"btn-fix-snapshot",title:"Fix failed snapshot(s)",icon:"i-carbon:result-old",onClick:M[0]||(M[0]=Gc(I=>c(t.value),["prevent","stop"]))},null,512)),[[R,"Fix failed snapshot(s)",void 0,{bottom:!0}]]):He("",!0),Ne(K(Qi),{placement:"bottom",class:ot(["w-1.4em h-1.4em op100 rounded flex",w.value])},{popper:We(()=>[v.value?(ie(),ve("div",Bye,[M[5]||(M[5]=X("div",{class:"i-carbon:information-square w-1.5em h-1.5em"},null,-1)),X("div",null,[Qe(Re(b.value)+": this feature is not available, you have disabled ",1),M[3]||(M[3]=X("span",{class:"text-[#add467]"},"includeTaskLocation",-1)),M[4]||(M[4]=Qe(" in your configuration file.",-1))]),M[6]||(M[6]=X("div",{style:{"grid-column":"2"}}," Clicking this button the code tab will position the cursor at first line in the source code since the UI doesn't have the information available. ",-1))])):(ie(),ve("div",Wye,Re(b.value),1))]),default:We(()=>[Ne(_t,{"data-testid":"btn-open-details",icon:e.type==="file"?"i-carbon:intrusion-prevention":"i-carbon:code-reference",onClick:Gc(E,["prevent","stop"])},null,8,["icon"])]),_:1},8,["class"]),K(gr)?He("",!0):at((ie(),Ve(_t,{key:1,"data-testid":"btn-run-test",title:h.value,icon:"i-carbon:play-filled-alt","text-green5":"",onClick:M[1]||(M[1]=Gc(I=>s(t.value),["prevent","stop"]))},null,8,["title"])),[[R,h.value,void 0,{bottom:!0}]])])],12,Pye)):He("",!0)}}}),jye=Ni(qye,[["__scopeId","data-v-58d301d8"]]),Uye={p:"2","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},Vye={p:"l3 y2 r2",flex:"~ gap-2","items-center":"","bg-header":"",border:"b-2 base"},Gye=["op"],Kye={grid:"~ items-center gap-x-1 cols-[auto_min-content_auto] rows-[min-content_min-content]"},Xye={"text-red5":""},Yye={"text-yellow5":""},Zye={"text-green5":""},Jye={class:"text-purple5:50"},Qye={key:0,flex:"~ col","items-center":"",p:"x4 y4","font-light":""},e0e=["disabled"],t0e=["disabled"],n0e={key:1,flex:"~ col","items-center":"",p:"x4 y4","font-light":""},r0e=rt({inheritAttrs:!1,__name:"Explorer",props:{onItemClick:{type:Function}},emits:["item-click","run"],setup(e,{emit:t}){const r=t,o=ke(()=>ei.value.includeTaskLocation),s=Ge(),{initialized:c,filter:f,search:d,disableFilter:h,isFiltered:p,isFilteredByStatus:g,disableClearSearch:v,clearAll:b,clearSearch:w,clearFilter:E,filteredFiles:L,testsTotal:P,uiEntries:M}=Eye(s),R=Ge("grid-cols-2"),I=Ge("grid-col-span-2"),_=Ge();return Ow(()=>_.value,([{contentRect:$}])=>{$.width<420?(R.value="grid-cols-2",I.value="grid-col-span-2"):(R.value="grid-cols-4",I.value="grid-col-span-4")}),($,W)=>{const ne=vr("tooltip");return ie(),ve("div",{ref_key:"testExplorerRef",ref:_,h:"full",flex:"~ col"},[X("div",null,[X("div",Uye,[Dt($.$slots,"header",{filteredFiles:K(p)||K(g)?K(L):void 0})]),X("div",Vye,[W[13]||(W[13]=X("div",{class:"i-carbon:search","flex-shrink-0":""},null,-1)),at(X("input",{ref_key:"searchBox",ref:s,"onUpdate:modelValue":W[0]||(W[0]=ee=>Mt(d)?d.value=ee:null),placeholder:"Search...",outline:"none",bg:"transparent",font:"light",text:"sm","flex-1":"","pl-1":"",op:K(d).length?"100":"50",onKeydown:[W[1]||(W[1]=ih(ee=>K(w)(!1),["esc"])),W[2]||(W[2]=ih(ee=>r("run",K(p)||K(g)?K(L):void 0),["enter"]))]},null,40,Gye),[[Yb,K(d)]]),at(Ne(_t,{disabled:K(v),title:"Clear search",icon:"i-carbon:filter-remove",onClickPassive:W[3]||(W[3]=ee=>K(w)(!0))},null,8,["disabled"]),[[ne,"Clear search",void 0,{bottom:!0}]])]),X("div",{p:"l3 y2 r2","items-center":"","bg-header":"",border:"b-2 base",grid:"~ items-center gap-x-2 rows-[auto_auto]",class:ot(R.value)},[X("div",{class:ot(I.value),flex:"~ gap-2 items-center"},[W[14]||(W[14]=X("div",{"aria-hidden":"true",class:"i-carbon:filter"},null,-1)),W[15]||(W[15]=X("div",{"flex-grow-1":"","text-sm":""}," Filter ",-1)),at(Ne(_t,{disabled:K(h),title:"Clear search",icon:"i-carbon:filter-remove",onClickPassive:W[4]||(W[4]=ee=>K(E)(!1))},null,8,["disabled"]),[[ne,"Clear Filter",void 0,{bottom:!0}]])],2),Ne(Wc,{modelValue:K(f).failed,"onUpdate:modelValue":W[5]||(W[5]=ee=>K(f).failed=ee),label:"Fail"},null,8,["modelValue"]),Ne(Wc,{modelValue:K(f).success,"onUpdate:modelValue":W[6]||(W[6]=ee=>K(f).success=ee),label:"Pass"},null,8,["modelValue"]),Ne(Wc,{modelValue:K(f).skipped,"onUpdate:modelValue":W[7]||(W[7]=ee=>K(f).skipped=ee),label:"Skip"},null,8,["modelValue"]),Ne(Wc,{modelValue:K(f).onlyTests,"onUpdate:modelValue":W[8]||(W[8]=ee=>K(f).onlyTests=ee),label:"Only Tests"},null,8,["modelValue"])],2)]),X("div",{class:"scrolls","flex-auto":"","py-1":"",onScrollPassive:W[12]||(W[12]=(...ee)=>K(Bv)&&K(Bv)(...ee))},[Ne(Lye,null,W_({default:We(()=>[(K(p)||K(g))&&K(M).length===0?(ie(),ve(nt,{key:0},[K(c)?(ie(),ve("div",Qye,[W[18]||(W[18]=X("div",{op30:""}," No matched test ",-1)),X("button",{type:"button","font-light":"","text-sm":"",border:"~ gray-400/50 rounded",p:"x2 y0.5",m:"t2",op:"50",class:ot(K(v)?null:"hover:op100"),disabled:K(v),onClickPassive:W[9]||(W[9]=ee=>K(w)(!0))}," Clear Search ",42,e0e),X("button",{type:"button","font-light":"","text-sm":"",border:"~ gray-400/50 rounded",p:"x2 y0.5",m:"t2",op:"50",class:ot(K(h)?null:"hover:op100"),disabled:K(h),onClickPassive:W[10]||(W[10]=ee=>K(E)(!0))}," Clear Filter ",42,t0e),X("button",{type:"button","font-light":"",op:"50 hover:100","text-sm":"",border:"~ gray-400/50 rounded",p:"x2 y0.5",m:"t2",onClickPassive:W[11]||(W[11]=(...ee)=>K(b)&&K(b)(...ee))}," Clear All ",32)])):(ie(),ve("div",n0e,[...W[19]||(W[19]=[X("div",{class:"i-carbon:circle-dash animate-spin"},null,-1),X("div",{op30:""}," Loading... ",-1)])]))],64)):(ie(),Ve(K(zp),{key:1,"page-mode":"","key-field":"id","item-size":28,items:K(M),buffer:100},{default:We(({item:ee})=>[Ne(jye,{class:ot(["h-28px m-0 p-0",K(po)===ee.id?"bg-active":""]),"task-id":ee.id,expandable:ee.expandable,type:ee.type,current:K(po)===ee.id,indent:ee.indent,name:ee.name,typecheck:ee.typecheck===!0,"project-name":ee.projectName??"","project-name-color":ee.projectNameColor??"",state:ee.state,duration:ee.duration,opened:ee.expanded,"disable-task-location":!o.value,"on-item-click":e.onItemClick},null,8,["task-id","expandable","type","current","indent","name","typecheck","project-name","project-name-color","state","duration","opened","disable-task-location","class","on-item-click"])]),_:1},8,["items"]))]),_:2},[K(c)?{name:"summary",fn:We(()=>[X("div",Kye,[X("span",Xye," FAIL ("+Re(K(P).failed)+") ",1),W[16]||(W[16]=X("span",null,"/",-1)),X("span",Yye," RUNNING ("+Re(K(P).running)+") ",1),X("span",Zye," PASS ("+Re(K(P).success)+") ",1),W[17]||(W[17]=X("span",null,"/",-1)),X("span",Jye," SKIP ("+Re(K(f).onlyTests?K(P).skipped:"--")+") ",1)])]),key:"0"}:void 0]),1024)],32)],512)}}}),i0e={class:"flex text-lg"},o0e=rt({__name:"Navigation",setup(e){function t(){return ft.rpc.updateSnapshot()}const r=ke(()=>ol.value?"light":"dark");async function o(f){Os.value&&(Cu.value=!0,await Et(),go.value&&(Eu(!0),await Et())),f?.length?await _p(f):await Gce()}function s(){Oe.collapseAllNodes()}function c(){Oe.expandAllNodes()}return(f,d)=>{const h=vr("tooltip");return ie(),Ve(r0e,{border:"r base","on-item-click":K(vce),nested:!0,onRun:o},{header:We(({filteredFiles:p})=>[d[8]||(d[8]=X("img",{"w-6":"","h-6":"",src:Qve,alt:"Vitest logo"},null,-1)),d[9]||(d[9]=X("span",{"font-light":"","text-sm":"","flex-1":""},"Vitest",-1)),X("div",i0e,[at(Ne(_t,{title:"Collapse tests",disabled:!K(Qs),"data-testid":"collapse-all",icon:"i-carbon:collapse-all",onClick:d[0]||(d[0]=g=>s())},null,8,["disabled"]),[[ro,!K(sy)],[h,"Collapse tests",void 0,{bottom:!0}]]),at(Ne(_t,{disabled:!K(Qs),title:"Expand tests","data-testid":"expand-all",icon:"i-carbon:expand-all",onClick:d[1]||(d[1]=g=>c())},null,8,["disabled"]),[[ro,K(sy)],[h,"Expand tests",void 0,{bottom:!0}]]),at(Ne(_t,{title:"Show dashboard",class:"!animate-100ms","animate-count-1":"",icon:"i-carbon:dashboard",onClick:d[2]||(d[2]=g=>K(Eu)(!0))},null,512),[[ro,K(mh)&&!K(Os)||!K(Ws)],[h,"Dashboard",void 0,{bottom:!0}]]),K(mh)&&!K(Os)?(ie(),Ve(K(Qi),{key:0,title:"Coverage enabled but missing html reporter",class:"w-1.4em h-1.4em op100 rounded flex color-red5 dark:color-#f43f5e cursor-help"},{popper:We(()=>[...d[6]||(d[6]=[X("div",{class:"op100 gap-1 p-y-1",grid:"~ items-center cols-[1.5em_1fr]"},[X("div",{class:"i-carbon:information-square w-1.5em h-1.5em"}),X("div",null,"Coverage enabled but missing html reporter."),X("div",{style:{"grid-column":"2"}}," Add html reporter to your configuration to see coverage here. ")],-1)])]),default:We(()=>[d[7]||(d[7]=X("div",{class:"i-carbon:folder-off ma"},null,-1))]),_:1})):He("",!0),K(Os)?at((ie(),Ve(_t,{key:1,disabled:K(Cu),title:"Show coverage",class:"!animate-100ms","animate-count-1":"",icon:"i-carbon:folder-details-reference",onClick:d[3]||(d[3]=g=>K(yce)())},null,8,["disabled"])),[[ro,!K(go)],[h,"Coverage",void 0,{bottom:!0}]]):He("",!0),K(Oe).summary.failedSnapshot&&!K(gr)?at((ie(),Ve(_t,{key:2,icon:"i-carbon:result-old",disabled:!K(Oe).summary.failedSnapshotEnabled,onClick:d[4]||(d[4]=g=>K(Oe).summary.failedSnapshotEnabled&&t())},null,8,["disabled"])),[[h,"Update all failed snapshot(s)",void 0,{bottom:!0}]]):He("",!0),K(gr)?He("",!0):at((ie(),Ve(_t,{key:3,disabled:p?.length===0,icon:"i-carbon:play",onClick:g=>o(p)},null,8,["disabled","onClick"])),[[h,p?p.length===0?"No test to run (clear filter)":"Rerun filtered":"Rerun all",void 0,{bottom:!0}]]),at(Ne(_t,{icon:"dark:i-carbon-moon i-carbon:sun",onClick:d[5]||(d[5]=g=>K(eme)())},null,512),[[h,`Toggle to ${r.value} mode`,void 0,{bottom:!0}]])])]),_:1},8,["on-item-click"])}}}),s0e={"h-3px":"",relative:"","overflow-hidden":"",class:"px-0","w-screen":""},l0e=rt({__name:"ProgressBar",setup(e){const{width:t}=Pw(),r=ke(()=>[Oe.summary.files===0&&"!bg-gray-4 !dark:bg-gray-7",!Ms.value&&"in-progress"].filter(Boolean).join(" ")),o=ke(()=>{const d=Oe.summary.files;return d>0?t.value*Oe.summary.filesSuccess/d:0}),s=ke(()=>{const d=Oe.summary.files;return d>0?t.value*Oe.summary.filesFailed/d:0}),c=ke(()=>Oe.summary.files-Oe.summary.filesFailed-Oe.summary.filesSuccess),f=ke(()=>{const d=Oe.summary.files;return d>0?t.value*c.value/d:0});return(d,h)=>(ie(),ve("div",{absolute:"","t-0":"","l-0":"","r-0":"","z-index-1031":"","pointer-events-none":"","p-0":"","h-3px":"",grid:"~ auto-cols-max","justify-items-center":"","w-screen":"",class:ot(r.value)},[X("div",s0e,[X("div",{absolute:"","l-0":"","t-0":"","bg-red5":"","h-3px":"",class:ot(r.value),style:zt(`width: ${s.value}px;`)},"   ",6),X("div",{absolute:"","l-0":"","t-0":"","bg-green5":"","h-3px":"",class:ot(r.value),style:zt(`left: ${s.value}px; width: ${o.value}px;`)},"   ",6),X("div",{absolute:"","l-0":"","t-0":"","bg-yellow5":"","h-3px":"",class:ot(r.value),style:zt(`left: ${o.value+s.value}px; width: ${f.value}px;`)},"   ",6)])],2))}}),a0e=Ni(l0e,[["__scopeId","data-v-5320005b"]]),c0e={"h-screen":"","w-screen":"",overflow:"hidden"},u0e=rt({__name:"index",setup(e){const t=mce(),r=Nc(({panes:g})=>{h(),d(g)},0),o=Nc(({panes:g})=>{g.forEach((v,b)=>{qs.value[b]=v.size}),f(g),p()},0),s=Nc(({panes:g})=>{g.forEach((v,b)=>{co.value[b]=v.size}),d(g),p()},0),c=Nc(({panes:g})=>{f(g),h()},0);function f(g){At.navigation=g[0].size,At.details.size=g[1].size}function d(g){At.details.browser=g[0].size,At.details.main=g[1].size}function h(){const g=document.querySelector("#tester-ui");g&&(g.style.pointerEvents="none")}function p(){const g=document.querySelector("#tester-ui");g&&(g.style.pointerEvents="")}return(g,v)=>(ie(),ve(nt,null,[Ne(a0e),X("div",c0e,[Ne(K(Gv),{class:"pt-4px",onResized:K(o),onResize:K(c)},{default:We(()=>[Ne(K(Rc),{size:K(qs)[0]},{default:We(()=>[Ne(o0e)]),_:1},8,["size"]),Ne(K(Rc),{size:K(qs)[1]},{default:We(()=>[K(Zn)?(ie(),Ve(K(Gv),{id:"details-splitpanes",key:"browser-detail",onResize:K(r),onResized:K(s)},{default:We(()=>[Ne(K(Rc),{size:K(co)[0],"min-size":"10"},{default:We(()=>[v[0]||(Ys(-1,!0),(v[0]=Ne(sue)).cacheIndex=0,Ys(1),v[0])]),_:1},8,["size"]),Ne(K(Rc),{size:K(co)[1]},{default:We(()=>[K(t)?(ie(),Ve(Iy,{key:"summary"})):K(go)?(ie(),Ve($y,{key:"coverage",src:K(Oy)},null,8,["src"])):(ie(),Ve(l0,{key:"details"}))]),_:1},8,["size"])]),_:1},8,["onResize","onResized"])):(ie(),Ve(BT,{key:"ui-detail"},{default:We(()=>[K(t)?(ie(),Ve(Iy,{key:"summary"})):K(go)?(ie(),Ve($y,{key:"coverage",src:K(Oy)},null,8,["src"])):(ie(),Ve(l0,{key:"details"}))]),_:1}))]),_:1},8,["size"])]),_:1},8,["onResized","onResize"])]),Ne(cue)],64))}}),f0e=[{name:"index",path:"/",component:u0e,props:!0}];/*!
50 * vue-router v4.6.3

Callers 1

$Function · 0.70

Calls 1

getExtensionMethod · 0.45

Tested by

no test coverage detected