import{E as e,W as t,Y as n,_ as r,c as i,g as a,h as o,tn as s,v as c}from"./vendor/json-editor-vue-eojr4v24.js";import{w as l}from"./utils-jupbrzo6.js";import{t as u}from"./filepath-item-h3i1tz3s.js";var d={mt2:``,grid:`~ cols-[max-content_1fr] gap-x-4`,"font-mono":``},f={"text-right":``},p={"ws-nowrap":``},m=e({__name:`StacktraceList`,props:{stacktrace:{}},setup(e){let m=/\.m?js$/,h=l();function g(e){try{let t=new URL(e).pathname;return t.startsWith(`/_nuxt/`)&&(t=t.slice(6)),t.startsWith(`/@id/virtual:nuxt:`)?`#build/${t.split(`/.nuxt/`)[1]}`.replace(m,``):t.includes(`/@fs/`)?`/${t.split(`/@fs/`)[1]}`:(h.value?.rootDir||``)+t}catch{return e}}return(l,m)=>{let h=u;return t(),c(`div`,d,[(t(!0),c(i,null,n(e.stacktrace,(e,n)=>(t(),c(i,{key:n},[o(`div`,f,s(e.functionName||`(anonymous)`),1),o(`div`,p,[e.fileName?(t(),a(h,{key:0,filepath:`${g(e.fileName)}:${e.lineNumber}:${e.columnNumber}`,subpath:``},null,8,[`filepath`])):r(``,!0)])],64))),128))])}}}),h=Object.assign(m,{__name:`StacktraceList`});export{h as t};