@websublime/vite-plugin-open-api-devtools 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/ModelsPage-CSuUHUuV.js +629 -0
  2. package/dist/ModelsPage-CSuUHUuV.js.map +1 -0
  3. package/dist/RoutesPage-D3FSr2Y6.js +520 -0
  4. package/dist/RoutesPage-D3FSr2Y6.js.map +1 -0
  5. package/dist/SimulatorPage-CzJrwWzc.js +425 -0
  6. package/dist/SimulatorPage-CzJrwWzc.js.map +1 -0
  7. package/dist/{TimelinePage-CMchXIlE.js → TimelinePage-HGh13pF3.js} +25 -23
  8. package/dist/TimelinePage-HGh13pF3.js.map +1 -0
  9. package/dist/check-BLIoatWd.js +6 -0
  10. package/dist/check-BLIoatWd.js.map +1 -0
  11. package/dist/devtools.css +1 -1
  12. package/dist/devtools.js +1 -1
  13. package/dist/devtools.umd.cjs +3 -1
  14. package/dist/devtools.umd.cjs.map +1 -1
  15. package/dist/{format-CE7KDbll.js → format-lBEBG5Y6.js} +11 -16
  16. package/dist/format-lBEBG5Y6.js.map +1 -0
  17. package/dist/{main-AUiFaD93.js → main-DKt7pJsx.js} +5 -5
  18. package/dist/{main-AUiFaD93.js.map → main-DKt7pJsx.js.map} +1 -1
  19. package/dist/registry-BQhccWMq.js +153 -0
  20. package/dist/registry-BQhccWMq.js.map +1 -0
  21. package/dist/trash-2-RxS9jzWT.js +12 -0
  22. package/dist/trash-2-RxS9jzWT.js.map +1 -0
  23. package/dist/triangle-alert-gLhIcFT5.js +16 -0
  24. package/dist/triangle-alert-gLhIcFT5.js.map +1 -0
  25. package/dist/x-UqfnjULc.js +9 -0
  26. package/dist/x-UqfnjULc.js.map +1 -0
  27. package/package.json +14 -13
  28. package/dist/ModelsPage-D-qLEz14.js +0 -93
  29. package/dist/ModelsPage-D-qLEz14.js.map +0 -1
  30. package/dist/RoutesPage-D7H_CupP.js +0 -665
  31. package/dist/RoutesPage-D7H_CupP.js.map +0 -1
  32. package/dist/SimulatorPage-9sBeAxQI.js +0 -229
  33. package/dist/SimulatorPage-9sBeAxQI.js.map +0 -1
  34. package/dist/TimelinePage-CMchXIlE.js.map +0 -1
  35. package/dist/format-CE7KDbll.js.map +0 -1
  36. package/dist/triangle-alert-ZH4fYFnz.js +0 -24
  37. package/dist/triangle-alert-ZH4fYFnz.js.map +0 -1
@@ -1,2 +1,4 @@
1
- (function(q,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("pinia"),require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","pinia","vue","vue-router"],G):(q=typeof globalThis<"u"?globalThis:q||self,G(q.ViteOpenApiDevtools={},q.Pinia,q.Vue,q.VueRouter))})(this,(function(q,G,e,oe){"use strict";const De=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Oe=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,l)=>l?l.toUpperCase():o.toLowerCase()),Pe=n=>{const t=Oe(n);return t.charAt(0).toUpperCase()+t.slice(1)},je=(...n)=>n.filter((t,o,l)=>!!t&&t.trim()!==""&&l.indexOf(t)===o).join(" ").trim();var se={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const Qe=({size:n,strokeWidth:t=2,absoluteStrokeWidth:o,color:l,iconNode:p,name:s,class:u,..._},{slots:f})=>e.h("svg",{...se,width:n||se.width,height:n||se.height,stroke:l||se.stroke,"stroke-width":o?Number(t)*24/Number(n):t,class:je("lucide",...s?[`lucide-${De(Pe(s))}-icon`,`lucide-${De(s)}`]:["lucide-icon"]),..._},[...p.map(c=>e.h(...c)),...f.default?[f.default()]:[]]);const S=(n,t)=>(o,{slots:l})=>e.h(Qe,{...o,iconNode:t,name:n},l);const pe=S("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const j=S("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Z=S("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const we=S("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Ue=S("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const R=S("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const ue=S("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);const _e=S("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const fe=S("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);const ye=S("file-json",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const Te=S("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const We=S("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const Ge=S("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Je=S("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const he=S("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);const le=S("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const Ke=S("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);const ke=S("sprout",[["path",{d:"M7 20h10",key:"e6iznv"}],["path",{d:"M10 20c5.5-2.5.8-6.4 3-10",key:"161w41"}],["path",{d:"M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z",key:"9gtqwd"}],["path",{d:"M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z",key:"bkxnd2"}]]);const Ze=S("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);const ge=S("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const Ee=S("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Ye=S("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const Xe=S("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);const ae=S("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const Y=S("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),ze=[{path:"/",redirect:"/routes"},{path:"/routes",name:"routes",component:()=>Promise.resolve().then(()=>On),meta:{title:"Routes",icon:"route"}},{path:"/timeline",name:"timeline",component:()=>Promise.resolve().then(()=>Ss),meta:{title:"Timeline",icon:"clock"}},{path:"/models",name:"models",component:()=>Promise.resolve().then(()=>Ps),meta:{title:"Models",icon:"database"}},{path:"/simulator",name:"simulator",component:()=>Promise.resolve().then(()=>rl),meta:{title:"Simulator",icon:"zap"}},{path:"/:pathMatch(.*)*",name:"not-found",redirect:"/routes"}],ve=oe.createRouter({history:oe.createWebHashHistory(),routes:ze}),et={class:"app"},tt={class:"app-header"},nt={class:"app-header__brand"},ot={class:"app-nav",role:"tablist","aria-label":"DevTools navigation"},st=["aria-selected","aria-current","aria-controls","onClick"],lt={class:"app-nav__label"},at={class:"app-header__status"},it={class:"connection-status"},rt={class:"connection-status__text"},ct={class:"app-main"},dt=e.defineComponent({__name:"App",setup(n){const t=oe.useRoute(),o=oe.useRouter(),l=e.computed(()=>ze.filter(c=>c.name&&c.meta?.title).map(c=>({name:c.name,path:c.path,title:c.meta?.title,icon:c.meta?.icon}))),p=e.computed(()=>t.name);function s(c){o.push(c)}const u={route:he,clock:R,database:fe,zap:Y};function _(c){return u[c]??he}const f=e.computed(()=>!1);return(c,g)=>{const $=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",et,[e.createElementVNode("header",tt,[e.createElementVNode("div",nt,[e.createVNode(e.unref(Y),{class:"app-header__logo",size:20}),g[0]||(g[0]=e.createElementVNode("span",{class:"app-header__title"},"OpenAPI DevTools",-1))]),e.createElementVNode("nav",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,E=>(e.openBlock(),e.createElementBlock("button",{key:E.name,role:"tab","aria-selected":p.value===E.name,"aria-current":p.value===E.name?"true":void 0,"aria-controls":`panel-${E.name}`,tabindex:0,class:e.normalizeClass(["app-nav__tab",{"app-nav__tab--active":p.value===E.name}]),onClick:k=>s(E.path)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_(E.icon)),{size:16,class:"app-nav__icon"})),e.createElementVNode("span",lt,e.toDisplayString(E.title),1)],10,st))),128))]),e.createElementVNode("div",at,[e.createElementVNode("div",it,[e.createElementVNode("span",{class:e.normalizeClass(["connection-status__dot",f.value?"connection-status__dot--connected":"connection-status__dot--disconnected"])},null,2),e.createElementVNode("span",rt,e.toDisplayString(f.value?"Connected":"Disconnected"),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.value?e.unref(Xe):e.unref(Ye)),{size:14,class:"connection-status__icon"}))])])]),e.createElementVNode("main",ct,[e.createVNode($,null,{default:e.withCtx(({Component:E})=>[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E)))]),_:2},1024)]),_:1})])])}}}),L=(n,t)=>{const o=n.__vccOpts||n;for(const[l,p]of t)o[l]=p;return o},mt=L(dt,[["__scopeId","data-v-513332df"]]),pt=G.defineStore("registry",()=>{const n=e.ref([]),t=e.ref({totalEndpoints:0,withCustomHandler:0,totalSchemas:0,withCustomSeed:0,autoGenerated:0}),o=e.ref(!1),l=e.ref(null),p=e.ref(""),s=e.ref({methods:[],hasHandler:null,hasSeed:null,tags:[]}),u=e.ref(null),_=e.ref(new Set),f=e.computed(()=>{const a=new Set;for(const r of n.value)for(const N of r.tags)a.add(N);return Array.from(a).sort()}),c=e.computed(()=>{const a=new Set;for(const r of n.value)r.responseSchema&&a.add(r.responseSchema);return Array.from(a).sort()}),g=e.computed(()=>{let a=n.value;if(p.value.trim()){const r=p.value.toLowerCase().trim();a=a.filter(N=>N.path.toLowerCase().includes(r)||N.operationId.toLowerCase().includes(r)||N.summary?.toLowerCase().includes(r)||N.tags.some(i=>i.toLowerCase().includes(r)))}return s.value.methods.length>0&&(a=a.filter(r=>s.value.methods.includes(r.method))),s.value.hasHandler!==null&&(a=a.filter(r=>r.hasHandler===s.value.hasHandler)),s.value.hasSeed!==null&&(a=a.filter(r=>r.hasSeed===s.value.hasSeed)),s.value.tags.length>0&&(a=a.filter(r=>r.tags.some(N=>s.value.tags.includes(N)))),a}),$=e.computed(()=>{const a=new Map;for(const r of g.value){let N;r.tags.length>0?N=r.tags[0]:r.responseSchema?N=r.responseSchema:N=r.path.split("/").filter(Boolean)[0]||"Other",a.has(N)||a.set(N,[]),a.get(N)?.push(r)}return Array.from(a.entries()).map(([r,N])=>({tag:r,endpoints:N.sort((i,m)=>i.path.localeCompare(m.path)),isExpanded:_.value.has(r)})).sort((r,N)=>r.tag.localeCompare(N.tag))}),E=e.computed(()=>u.value?n.value.find(a=>a.key===u.value)??null:null),k=e.computed(()=>n.value.filter(a=>a.hasHandler).length),y=e.computed(()=>n.value.filter(a=>a.hasSeed).length);function M(a){n.value=a.endpoints,t.value=a.stats,l.value=null;for(const r of a.endpoints)r.tags.length>0&&_.value.add(r.tags[0])}function D(a){o.value=a}function d(a){l.value=a,o.value=!1}function b(){l.value=null}function w(a){p.value=a}function I(a){const r=s.value.methods.indexOf(a);r===-1?s.value.methods.push(a):s.value.methods.splice(r,1)}function Q(a){s.value.hasHandler=a}function U(a){s.value.hasSeed=a}function A(a){const r=s.value.tags.indexOf(a);r===-1?s.value.tags.push(a):s.value.tags.splice(r,1)}function C(){s.value={methods:[],hasHandler:null,hasSeed:null,tags:[]},p.value=""}function h(){return p.value.trim()!==""||s.value.methods.length>0||s.value.hasHandler!==null||s.value.hasSeed!==null||s.value.tags.length>0}function z(a){u.value=a}function K(a){_.value.has(a)?_.value.delete(a):_.value.add(a)}function v(){for(const a of $.value)_.value.add(a.tag)}function ee(){_.value.clear()}function te(a){const r=new Set(a);for(const N of n.value)N.hasHandler=r.has(N.operationId)}function B(a){const r=new Set(a);for(const N of n.value)N.hasSeed=N.responseSchema?r.has(N.responseSchema):!1}return{endpoints:n,stats:t,isLoading:o,error:l,searchQuery:p,filter:s,selectedEndpointKey:u,expandedTags:_,allTags:f,allSchemas:c,filteredEndpoints:g,groupedEndpoints:$,selectedEndpoint:E,handlerCount:k,seedCount:y,setRegistryData:M,setLoading:D,setError:d,clearError:b,setSearchQuery:w,toggleMethodFilter:I,setHandlerFilter:Q,setSeedFilter:U,toggleTagFilter:A,clearFilters:C,hasActiveFilters:h,selectEndpoint:z,toggleGroup:K,expandAllGroups:v,collapseAllGroups:ee,updateHandlerStatus:te,updateSeedStatus:B}}),ut=G.defineStore("timeline",()=>{const n=e.ref([]),t=e.ref(!1),o=e.ref(null),l=e.ref({methods:[],statusCodes:[],searchQuery:"",simulatedOnly:null}),p=e.ref(null),s=e.ref(500),u=new Map;function _(i){return i<200?"1xx":i<300?"2xx":i<400?"3xx":i<500?"4xx":"5xx"}const f=e.computed(()=>{let i=n.value;if(l.value.searchQuery.trim()){const m=l.value.searchQuery.toLowerCase().trim();i=i.filter(V=>V.request.path.toLowerCase().includes(m)||V.request.operationId.toLowerCase().includes(m))}return l.value.methods.length>0&&(i=i.filter(m=>l.value.methods.includes(m.request.method.toUpperCase()))),l.value.statusCodes.length>0&&(i=i.filter(m=>{if(m.status===null)return!1;const V=_(m.status);return l.value.statusCodes.includes(V)})),l.value.simulatedOnly!==null&&(i=i.filter(m=>m.simulated===l.value.simulatedOnly)),i}),c=e.computed(()=>p.value?n.value.find(i=>i.id===p.value)??null:null),g=e.computed(()=>n.value.length),$=e.computed(()=>n.value.filter(i=>i.response!==null).length),E=e.computed(()=>n.value.filter(i=>i.response===null).length),k=e.computed(()=>{const i={"1xx":0,"2xx":0,"3xx":0,"4xx":0,"5xx":0};for(const m of n.value)if(m.status!==null){const V=_(m.status);i[V]++}return i}),y=e.computed(()=>{const i=n.value.filter(V=>V.duration!==null);if(i.length===0)return 0;const m=i.reduce((V,O)=>V+(O.duration??0),0);return Math.round(m/i.length)});function M(i){const m={id:i.id,request:i,response:null,status:null,duration:null,simulated:!1},V=u.get(i.id);V&&(d(m,V),u.delete(i.id)),n.value.unshift(m),n.value.length>s.value&&(n.value=n.value.slice(0,s.value))}function D(i){const m=n.value.find(V=>V.id===i.requestId);if(m)d(m,i),u.delete(i.requestId);else if(u.set(i.requestId,i),u.size>100){const V=b(i);n.value.unshift(V),u.delete(i.requestId),n.value.length>s.value&&(n.value=n.value.slice(0,s.value))}}function d(i,m){i.response=m,i.status=m.status,i.duration=m.duration,i.simulated=m.simulated}function b(i){const m={id:i.requestId,method:"UNKNOWN",path:"/unknown",operationId:"unknown",timestamp:Date.now(),headers:{},query:{},body:void 0};return{id:i.requestId,request:m,response:i,status:i.status,duration:i.duration,simulated:i.simulated}}function w(i){for(const[m,V]of u){const O=i.get(m);O?(d(O,V),u.delete(m)):(i.set(m,b(V)),u.delete(m))}}function I(i,m){for(const[V,O]of m){const P=i.get(V);P?d(P,O):u.set(V,O)}}function Q(i){for(const[m,V]of u)i.has(m)||(i.set(m,b(V)),u.delete(m))}function U(i){const m=new Map,V=new Map;for(const P of i.entries)if(P.type==="request"){const W=P.data;m.set(W.id,{id:W.id,request:W,response:null,status:null,duration:null,simulated:!1})}else if(P.type==="response"){const W=P.data;V.set(W.requestId,W)}w(m),I(m,V),Q(m);const O=Array.from(m.values()).sort((P,W)=>W.request.timestamp-P.request.timestamp);n.value=O.slice(0,s.value),o.value=null}function A(){n.value=[],p.value=null,u.clear()}function C(i){t.value=i}function h(i){o.value=i,t.value=!1}function z(){o.value=null}function K(i){l.value.searchQuery=i}function v(i){const m=l.value.methods.indexOf(i);m===-1?l.value.methods.push(i):l.value.methods.splice(m,1)}function ee(i){const m=l.value.statusCodes.indexOf(i);m===-1?l.value.statusCodes.push(i):l.value.statusCodes.splice(m,1)}function te(i){l.value.simulatedOnly=i}function B(){l.value={methods:[],statusCodes:[],searchQuery:"",simulatedOnly:null}}function a(){return l.value.searchQuery.trim()!==""||l.value.methods.length>0||l.value.statusCodes.length>0||l.value.simulatedOnly!==null}function r(i){p.value=i}function N(i){const m=Math.max(1,i);s.value=m,n.value.length>m&&(n.value=n.value.slice(0,m))}return{entries:n,isLoading:t,error:o,filter:l,selectedEntryId:p,maxEntries:s,filteredEntries:f,selectedEntry:c,totalCount:g,completedCount:$,pendingCount:E,statusCounts:k,averageDuration:y,addRequest:M,addResponse:D,setTimelineData:U,clearTimeline:A,setLoading:C,setError:h,clearError:z,setSearchQuery:K,toggleMethodFilter:v,toggleStatusFilter:ee,setSimulatedFilter:te,clearFilters:B,hasActiveFilters:a,selectEntry:r,setMaxEntries:N}}),_t=["light","dark","system"];function qe(n){return typeof n=="string"&&_t.includes(n)}const Ne="openapi-devtools-theme",H=e.ref("system"),J=e.ref(!1);let ie=null,re=null;function ce(){return typeof window<"u"&&typeof document<"u"}function ft(){return e.getCurrentInstance()!==null}function yt(){const n=e.computed(()=>H.value==="system"?J.value?"dark":"light":H.value),t=e.computed(()=>n.value==="dark");function o(){if(!ce())return;const c=document.documentElement;n.value==="dark"?(c.classList.add("dark"),c.classList.remove("light")):(c.classList.add("light"),c.classList.remove("dark"))}function l(c){if(!qe(c)){console.warn(`[DevTools] Invalid theme mode: ${c}`);return}if(H.value=c,ce())try{localStorage.setItem(Ne,c)}catch{console.warn("[DevTools] Unable to persist theme preference")}}function p(){H.value==="system"?l(J.value?"light":"dark"):l(H.value==="dark"?"light":"dark")}function s(){l("system")}function u(){ie&&re&&(ie.removeEventListener("change",re),ie=null,re=null)}function _(){if(!ce())return;u();const c=window.matchMedia("(prefers-color-scheme: dark)");J.value=c.matches;const g=$=>{J.value=$.matches};c.addEventListener("change",g),ie=c,re=g;try{const $=localStorage.getItem(Ne);qe($)&&(H.value=$)}catch{}o()}function f(){if(u(),H.value="system",J.value=!1,ce()){document.documentElement.classList.remove("dark","light");try{localStorage.removeItem(Ne)}catch{}}}return e.watch([H,J],()=>{o()}),ft()&&(e.onMounted(()=>{_()}),e.onUnmounted(()=>{u()})),{themeMode:e.computed(()=>H.value),effectiveTheme:n,isDark:t,systemPrefersDark:e.computed(()=>J.value),setTheme:l,toggleTheme:p,resetToSystem:s,initialize:_,resetState:f}}const Ve={path:"/_ws",reconnectDelay:2e3,maxReconnectAttempts:Number.POSITIVE_INFINITY,autoConnect:!0},T=e.ref("disconnected"),be=e.ref(null),ne=e.ref(0);let x=null,de=null,X={...Ve},Be=!1;const F=new Map;function Me(){return typeof window<"u"&&typeof WebSocket<"u"}function ht(){return e.getCurrentInstance()!==null}function kt(n){return Me()?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${n}`:`ws://localhost${n}`}function Fe(){de!==null&&(clearTimeout(de),de=null)}function gt(n,t){const o=F.get(n);if(o)for(const p of o)try{p(t)}catch(s){console.error(`[DevTools WebSocket] Error in event handler for '${n}':`,s)}const l=F.get("*");if(l)for(const p of l)try{p({type:n,data:t})}catch(s){console.error("[DevTools WebSocket] Error in wildcard event handler:",s)}}function Et(){T.value="connected",ne.value=0,Fe()}function Nt(n){try{const t=JSON.parse(n.data);if(t.type==="connected"){const o=t.data;be.value=o.serverVersion}gt(t.type,t.data)}catch(t){console.error("[DevTools WebSocket] Failed to parse message:",t)}}function Vt(){T.value,T.value="disconnected",x=null,ne.value<X.maxReconnectAttempts&&(T.value="reconnecting",ne.value++,de=setTimeout(()=>{Se()},X.reconnectDelay))}function bt(n){console.error("[DevTools WebSocket] Error:",n)}function Se(){if(!Me()||T.value==="connecting"||T.value==="connected"||x&&(x.readyState===WebSocket.CONNECTING||x.readyState===WebSocket.OPEN))return;Ie(),T.value="connecting";const n=kt(X.path);try{x=new WebSocket(n),x.onopen=Et,x.onmessage=Nt,x.onclose=Vt,x.onerror=bt}catch(t){console.error("[DevTools WebSocket] Failed to create WebSocket:",t),T.value="disconnected"}}function Ie(){x&&(x.onopen=null,x.onmessage=null,x.onclose=null,x.onerror=null,(x.readyState===WebSocket.OPEN||x.readyState===WebSocket.CONNECTING)&&x.close(),x=null)}function Re(){Fe(),Ie(),T.value="disconnected",ne.value=0}function Bt(n){if(!x||x.readyState!==WebSocket.OPEN)return!1;try{return x.send(JSON.stringify(n)),!0}catch(t){return console.error("[DevTools WebSocket] Failed to send command:",t),!1}}function Ce(n,t){F.has(n)||F.set(n,new Set);const o=F.get(n);return o&&o.add(t),()=>{const l=F.get(n);l&&(l.delete(t),l.size===0&&F.delete(n))}}function $e(n,t){const o=F.get(n);o&&(o.delete(t),o.size===0&&F.delete(n))}function St(n,t){const o=l=>{$e(n,o),t(l)};return Ce(n,o)}function Ct(n,t){const o=l=>{t(l)===!0&&$e(n,o)};return Ce(n,o)}function $t(){Re(),be.value=null,F.clear(),X={...Ve},Be=!1}function xe(n={}){(!Be||T.value==="disconnected")&&(X={...Ve,...n},Be=!0);const t=e.computed(()=>T.value==="connected"),o=e.computed(()=>T.value==="reconnecting");return ht()&&e.onMounted(()=>{X.autoConnect&&Se()}),{connectionState:e.computed(()=>T.value),connected:t,isReconnecting:o,serverVersion:e.computed(()=>be.value),reconnectAttempts:e.computed(()=>ne.value),connect:Se,disconnect:Re,send:Bt,on:Ce,off:$e,once:St,onUntil:Ct,resetState:$t}}let Le=!1,He=null;function Ae(){if(Le)return He;const n=e.createApp(mt),t=G.createPinia();return n.use(t),n.use(ve),n.mount("#app"),Le=!0,He=n,n}typeof window<"u"&&document.getElementById("app")&&Ae();function me(n){return n.toUpperCase()}const xt={class:"endpoint-detail"},Dt={key:0,class:"endpoint-detail__empty"},wt={key:1,class:"endpoint-detail__content"},Tt={class:"endpoint-detail__header"},zt={class:"endpoint-detail__path font-mono"},qt={class:"endpoint-detail__status"},Mt={key:0,class:"endpoint-detail__status-item endpoint-detail__status-item--handler"},Ft={key:1,class:"endpoint-detail__status-item endpoint-detail__status-item--seed"},It={key:2,class:"endpoint-detail__status-item endpoint-detail__status-item--security"},Rt={key:3,class:"endpoint-detail__status-item endpoint-detail__status-item--auto"},Lt={class:"endpoint-detail__sections"},Ht={class:"endpoint-detail__section"},At={class:"endpoint-detail__section-content font-mono"},Ot={key:0,class:"endpoint-detail__section"},Pt={class:"endpoint-detail__section-title"},jt={class:"endpoint-detail__tags"},Qt={key:1,class:"endpoint-detail__section"},Ut={class:"endpoint-detail__section-content"},Wt={key:2,class:"endpoint-detail__section"},Gt={class:"endpoint-detail__section-content endpoint-detail__description"},Jt={key:3,class:"endpoint-detail__section"},Kt={class:"endpoint-detail__section-title"},Zt={class:"endpoint-detail__section-content font-mono"},Yt={key:4,class:"endpoint-detail__section"},Xt={class:"endpoint-detail__section-title"},vt={class:"endpoint-detail__security"},en={class:"endpoint-detail__security-name font-mono"},tn={class:"endpoint-detail__security-scopes text-muted"},nn=L(e.defineComponent({__name:"EndpointDetail",props:{endpoint:{}},setup(n){const t=n,o=e.computed(()=>t.endpoint?.security&&t.endpoint.security.length>0),l=e.computed(()=>t.endpoint?.security?t.endpoint.security.map(p=>({name:p.name,scopes:p.scopes.length>0?p.scopes.join(", "):"No scopes"})):[]);return(p,s)=>(e.openBlock(),e.createElementBlock("div",xt,[n.endpoint?(e.openBlock(),e.createElementBlock("div",wt,[e.createElementVNode("header",Tt,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge","method-badge--large",`method-badge--${n.endpoint.method}`])},e.toDisplayString(e.unref(me)(n.endpoint.method)),3),e.createElementVNode("h2",zt,e.toDisplayString(n.endpoint.path),1)]),e.createElementVNode("div",qt,[n.endpoint.hasHandler?(e.openBlock(),e.createElementBlock("div",Mt,[e.createVNode(e.unref(ue),{size:14}),s[2]||(s[2]=e.createElementVNode("span",null,"Has custom handler",-1))])):e.createCommentVNode("",!0),n.endpoint.hasSeed?(e.openBlock(),e.createElementBlock("div",Ft,[e.createVNode(e.unref(ke),{size:14}),s[3]||(s[3]=e.createElementVNode("span",null,"Has seed data",-1))])):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",It,[e.createVNode(e.unref(We),{size:14}),s[4]||(s[4]=e.createElementVNode("span",null,"Requires authentication",-1))])):e.createCommentVNode("",!0),!n.endpoint.hasHandler&&!n.endpoint.hasSeed?(e.openBlock(),e.createElementBlock("div",Rt,[e.createVNode(e.unref(ye),{size:14}),s[5]||(s[5]=e.createElementVNode("span",null,"Auto-generated response",-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Lt,[e.createElementVNode("section",Ht,[s[6]||(s[6]=e.createElementVNode("h3",{class:"endpoint-detail__section-title"},"Operation",-1)),e.createElementVNode("p",At,e.toDisplayString(n.endpoint.operationId),1)]),n.endpoint.tags.length>0?(e.openBlock(),e.createElementBlock("section",Ot,[e.createElementVNode("h3",Pt,[e.createVNode(e.unref(Ze),{size:14}),s[7]||(s[7]=e.createTextVNode(" Tags ",-1))]),e.createElementVNode("div",jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.endpoint.tags,u=>(e.openBlock(),e.createElementBlock("span",{key:u,class:"endpoint-detail__tag"},e.toDisplayString(u),1))),128))])])):e.createCommentVNode("",!0),n.endpoint.summary?(e.openBlock(),e.createElementBlock("section",Qt,[s[8]||(s[8]=e.createElementVNode("h3",{class:"endpoint-detail__section-title"},"Summary",-1)),e.createElementVNode("p",Ut,e.toDisplayString(n.endpoint.summary),1)])):e.createCommentVNode("",!0),n.endpoint.description?(e.openBlock(),e.createElementBlock("section",Wt,[s[9]||(s[9]=e.createElementVNode("h3",{class:"endpoint-detail__section-title"},"Description",-1)),e.createElementVNode("p",Gt,e.toDisplayString(n.endpoint.description),1)])):e.createCommentVNode("",!0),n.endpoint.responseSchema?(e.openBlock(),e.createElementBlock("section",Jt,[e.createElementVNode("h3",Kt,[e.createVNode(e.unref(ye),{size:14}),s[10]||(s[10]=e.createTextVNode(" Response Schema ",-1))]),e.createElementVNode("p",Zt,e.toDisplayString(n.endpoint.responseSchema),1)])):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("section",Yt,[e.createElementVNode("h3",Xt,[e.createVNode(e.unref(Ke),{size:14}),s[11]||(s[11]=e.createTextVNode(" Security ",-1))]),e.createElementVNode("div",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,u=>(e.openBlock(),e.createElementBlock("div",{key:u.name,class:"endpoint-detail__security-item"},[e.createElementVNode("span",en,e.toDisplayString(u.name),1),e.createElementVNode("span",tn,e.toDisplayString(u.scopes),1)]))),128))])])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",Dt,[e.createVNode(e.unref(ye),{size:48,class:"endpoint-detail__empty-icon"}),s[0]||(s[0]=e.createElementVNode("h3",{class:"endpoint-detail__empty-title"},"No endpoint selected",-1)),s[1]||(s[1]=e.createElementVNode("p",{class:"endpoint-detail__empty-text text-muted"}," Select an endpoint from the list to view its details ",-1))]))]))}}),[["__scopeId","data-v-c66a0f52"]]),on={class:"endpoint-list"},sn={key:0,class:"endpoint-list__empty"},ln={key:1,class:"endpoint-list__groups"},an=["aria-expanded","aria-controls","onClick"],rn={class:"endpoint-group__tag"},cn={class:"endpoint-group__count text-muted"},dn=["id","aria-label"],mn=["aria-selected","onClick"],pn={class:"endpoint-item__path font-mono"},un={class:"endpoint-item__indicators"},_n={key:0,class:"endpoint-item__indicator endpoint-item__indicator--handler",title:"Has custom handler"},fn={key:1,class:"endpoint-item__indicator endpoint-item__indicator--seed",title:"Has seed data"},yn=L(e.defineComponent({__name:"EndpointList",props:{groups:{},selectedKey:{}},emits:["select","toggle-group"],setup(n,{emit:t}){const o=n,l=t;function p(_){l("select",_.key)}function s(_){l("toggle-group",_)}function u(_){return o.selectedKey===_.key}return(_,f)=>(e.openBlock(),e.createElementBlock("div",on,[n.groups.length===0?(e.openBlock(),e.createElementBlock("div",sn,[...f[0]||(f[0]=[e.createElementVNode("p",{class:"text-muted"},"No endpoints found",-1)])])):(e.openBlock(),e.createElementBlock("div",ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.groups,c=>(e.openBlock(),e.createElementBlock("div",{key:c.tag,class:"endpoint-group"},[e.createElementVNode("button",{type:"button",class:"endpoint-group__header","aria-expanded":c.isExpanded,"aria-controls":`group-${c.tag}`,onClick:g=>s(c.tag)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.isExpanded?e.unref(j):e.unref(Z)),{size:16,class:"endpoint-group__chevron"})),e.createElementVNode("span",rn,e.toDisplayString(c.tag),1),e.createElementVNode("span",cn," ("+e.toDisplayString(c.endpoints.length)+") ",1)],8,an),e.withDirectives(e.createElementVNode("div",{id:`group-${c.tag}`,class:"endpoint-group__items",role:"group","aria-label":`${c.tag} endpoints`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.endpoints,g=>(e.openBlock(),e.createElementBlock("button",{key:g.key,type:"button",class:e.normalizeClass(["endpoint-item",{"endpoint-item--selected":u(g)}]),"aria-selected":u(g),onClick:$=>p(g)},[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${g.method}`])},e.toDisplayString(e.unref(me)(g.method)),3),e.createElementVNode("span",pn,e.toDisplayString(g.path),1),e.createElementVNode("div",un,[g.hasHandler?(e.openBlock(),e.createElementBlock("span",_n,[e.createVNode(e.unref(ue),{size:12})])):e.createCommentVNode("",!0),g.hasSeed?(e.openBlock(),e.createElementBlock("span",fn,[e.createVNode(e.unref(ke),{size:12})])):e.createCommentVNode("",!0)])],10,mn))),128))],8,dn),[[e.vShow,c.isExpanded]])]))),128))]))]))}}),[["__scopeId","data-v-554ffe63"]]),hn={class:"routes-page"},kn={class:"routes-toolbar"},gn={class:"routes-search"},En=["value"],Nn=["aria-expanded"],Vn={key:0,class:"routes-filter-toggle__badge"},bn={class:"routes-stats"},Bn={class:"routes-stats__item"},Sn={class:"routes-stats__item"},Cn={key:0,class:"routes-filters"},$n={class:"routes-filters__section"},xn={class:"routes-filters__methods"},Dn=["onClick"],wn={class:"routes-filters__section"},Tn={class:"routes-filters__status"},zn={key:0,class:"routes-filters__actions"},qn={class:"routes-content"},Mn={key:0,class:"routes-loading"},Fn={key:1,class:"routes-error"},In={class:"routes-error__message"},Rn={key:2,class:"routes-empty empty-state"},Ln={key:3,class:"routes-empty empty-state"},Hn={class:"routes-list-panel"},An={class:"routes-detail-panel"},On=Object.freeze(Object.defineProperty({__proto__:null,default:L(e.defineComponent({__name:"RoutesPage",setup(n){const t=pt(),{send:o,on:l,connected:p}=xe(),s=e.ref(!1),u=e.ref(null),_=["get","post","put","patch","delete","options","head","trace"];function f(){p.value&&(t.setLoading(!0),o({type:"get:registry"}))}function c(C){t.setRegistryData(C),t.setLoading(!1)}function g(C){t.selectEndpoint(C)}function $(C){t.toggleGroup(C)}function E(C){const h=C.target;t.setSearchQuery(h.value)}function k(){t.setSearchQuery(""),u.value?.focus()}function y(C){t.toggleMethodFilter(C)}function M(C){return t.filter.methods.includes(C)}function D(){const C=t.filter.hasHandler;t.setHandlerFilter(C===!0?null:!0)}function d(){const C=t.filter.hasSeed;t.setSeedFilter(C===!0?null:!0)}function b(){t.clearFilters()}function w(){s.value=!s.value}const I=e.computed(()=>t.hasActiveFilters());let Q=null,U=null,A=null;return e.onMounted(()=>{Q=l("registry",c),U=l("handlers:updated",()=>f()),A=l("seeds:updated",()=>f()),p.value&&f()}),e.onUnmounted(()=>{Q?.(),U?.(),A?.()}),e.watch(p,C=>{C&&f()}),(C,h)=>(e.openBlock(),e.createElementBlock("div",hn,[e.createElementVNode("div",kn,[e.createElementVNode("div",gn,[e.createVNode(e.unref(le),{size:16,class:"routes-search__icon"}),e.createElementVNode("input",{ref_key:"searchInputRef",ref:u,type:"text",class:"routes-search__input input",placeholder:"Search endpoints...",value:e.unref(t).searchQuery,onInput:E},null,40,En),e.unref(t).searchQuery?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"routes-search__clear btn btn--ghost btn--icon",title:"Clear search",onClick:k},[e.createVNode(e.unref(ae),{size:14})])):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["routes-filter-toggle btn btn--secondary",{"routes-filter-toggle--active":I.value}]),"aria-expanded":s.value,onClick:w},[e.createVNode(e.unref(Te),{size:16}),h[0]||(h[0]=e.createElementVNode("span",null,"Filters",-1)),I.value?(e.openBlock(),e.createElementBlock("span",Vn,e.toDisplayString(e.unref(t).filter.methods.length+(e.unref(t).filter.hasHandler?1:0)+(e.unref(t).filter.hasSeed?1:0)),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value?e.unref(we):e.unref(j)),{size:14}))],10,Nn),e.createElementVNode("div",bn,[e.createElementVNode("span",Bn,e.toDisplayString(e.unref(t).filteredEndpoints.length)+" endpoints ",1),h[1]||(h[1]=e.createElementVNode("span",{class:"routes-stats__separator"},"|",-1)),e.createElementVNode("span",Sn,e.toDisplayString(e.unref(t).allTags.length)+" tags ",1)])]),s.value?(e.openBlock(),e.createElementBlock("div",Cn,[e.createElementVNode("div",$n,[h[2]||(h[2]=e.createElementVNode("h4",{class:"routes-filters__title"},"Methods",-1)),e.createElementVNode("div",xn,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,z=>e.createElementVNode("button",{key:z,type:"button",class:e.normalizeClass(["method-badge",`method-badge--${z}`,{"method-badge--inactive":!M(z)&&e.unref(t).filter.methods.length>0}]),onClick:K=>y(z)},e.toDisplayString(z.toUpperCase()),11,Dn)),64))])]),e.createElementVNode("div",wn,[h[5]||(h[5]=e.createElementVNode("h4",{class:"routes-filters__title"},"Status",-1)),e.createElementVNode("div",Tn,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["routes-filters__status-btn",{"routes-filters__status-btn--active":e.unref(t).filter.hasHandler}]),onClick:D},[e.createVNode(e.unref(ue),{size:14}),h[3]||(h[3]=e.createElementVNode("span",null,"Has Handler",-1))],2),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["routes-filters__status-btn",{"routes-filters__status-btn--active":e.unref(t).filter.hasSeed}]),onClick:d},[e.createVNode(e.unref(ke),{size:14}),h[4]||(h[4]=e.createElementVNode("span",null,"Has Seed",-1))],2)])]),I.value?(e.openBlock(),e.createElementBlock("div",zn,[e.createElementVNode("button",{type:"button",class:"btn btn--ghost",onClick:b},[e.createVNode(e.unref(ae),{size:14}),h[6]||(h[6]=e.createTextVNode(" Clear all filters ",-1))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",qn,[e.unref(t).isLoading?(e.openBlock(),e.createElementBlock("div",Mn,[...h[7]||(h[7]=[e.createElementVNode("div",{class:"routes-loading__spinner"},null,-1),e.createElementVNode("span",{class:"text-muted"},"Loading endpoints...",-1)])])):e.unref(t).error?(e.openBlock(),e.createElementBlock("div",Fn,[e.createElementVNode("p",In,e.toDisplayString(e.unref(t).error),1),e.createElementVNode("button",{type:"button",class:"btn btn--primary",onClick:f}," Retry ")])):e.unref(t).endpoints.length===0?(e.openBlock(),e.createElementBlock("div",Rn,[e.createVNode(e.unref(he),{size:48,class:"empty-state__icon"}),h[8]||(h[8]=e.createElementVNode("h3",{class:"empty-state__title"},"No endpoints found",-1)),h[9]||(h[9]=e.createElementVNode("p",{class:"empty-state__description"}," No API endpoints are available. Make sure your OpenAPI spec is loaded. ",-1))])):e.unref(t).filteredEndpoints.length===0?(e.openBlock(),e.createElementBlock("div",Ln,[e.createVNode(e.unref(le),{size:48,class:"empty-state__icon"}),h[10]||(h[10]=e.createElementVNode("h3",{class:"empty-state__title"},"No matching endpoints",-1)),h[11]||(h[11]=e.createElementVNode("p",{class:"empty-state__description"}," Try adjusting your search or filters. ",-1)),I.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn--secondary",onClick:b}," Clear filters ")):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",Hn,[e.createVNode(yn,{groups:e.unref(t).groupedEndpoints,"selected-key":e.unref(t).selectedEndpointKey,onSelect:g,onToggleGroup:$},null,8,["groups","selected-key"])]),e.createElementVNode("div",An,[e.createVNode(nn,{endpoint:e.unref(t).selectedEndpoint},null,8,["endpoint"])])],64))])]))}}),[["__scopeId","data-v-bdd419e3"]])},Symbol.toStringTag,{value:"Module"})),Pn={class:"timeline-detail"},jn={key:0,class:"timeline-detail__empty"},Qn={key:1,class:"timeline-detail__content"},Un={class:"timeline-detail__header"},Wn={class:"timeline-detail__summary"},Gn={class:"timeline-detail__path font-mono"},Jn={class:"timeline-detail__meta"},Kn={key:1,class:"status-badge status-badge--pending"},Zn={class:"timeline-detail__duration"},Yn={key:2,class:"timeline-detail__simulated",title:"Simulated response"},Xn={class:"timeline-detail__actions"},vn={class:"timeline-detail__info"},eo={class:"timeline-detail__info-item"},to={class:"timeline-detail__info-value font-mono"},no={class:"timeline-detail__info-item"},oo={class:"timeline-detail__info-value font-mono"},so={class:"timeline-detail__info-item"},lo={class:"timeline-detail__info-value font-mono"},ao={class:"timeline-detail__section"},io={key:0,class:"timeline-detail__subsection"},ro=["aria-expanded"],co={class:"text-muted"},mo={id:"requestQuery-panel",class:"timeline-detail__subsection-content"},po={class:"timeline-detail__kv-key font-mono"},uo={class:"timeline-detail__kv-value font-mono"},_o={key:1,class:"timeline-detail__subsection"},fo=["aria-expanded"],yo={class:"text-muted"},ho={id:"requestHeaders-panel",class:"timeline-detail__subsection-content"},ko={class:"timeline-detail__kv-key font-mono"},go={class:"timeline-detail__kv-value font-mono"},Eo={key:2,class:"timeline-detail__subsection"},No={class:"timeline-detail__subsection-header",role:"group"},Vo=["aria-expanded"],bo={id:"requestBody-panel",class:"timeline-detail__subsection-content"},Bo={class:"timeline-detail__json"},So={key:0,class:"timeline-detail__section"},Co={key:0,class:"timeline-detail__subsection"},$o=["aria-expanded"],xo={class:"text-muted"},Do={id:"responseHeaders-panel",class:"timeline-detail__subsection-content"},wo={class:"timeline-detail__kv-key font-mono"},To={class:"timeline-detail__kv-value font-mono"},zo={key:1,class:"timeline-detail__subsection"},qo={class:"timeline-detail__subsection-header",role:"group"},Mo=["aria-expanded"],Fo={id:"responseBody-panel",class:"timeline-detail__subsection-content"},Io={class:"timeline-detail__json"},Ro={key:1,class:"timeline-detail__section timeline-detail__section--pending"},Lo={class:"timeline-detail__pending"},Ho=L(e.defineComponent({__name:"TimelineDetail",props:{entry:{}},setup(n){const t=n,o=e.ref({requestHeaders:!0,requestQuery:!0,requestBody:!0,responseHeaders:!0,responseBody:!0}),l=e.ref(null),p=e.computed(()=>t.entry?new Date(t.entry.request.timestamp).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1}):""),s=e.computed(()=>t.entry?.duration==null?"pending...":t.entry.duration<1e3?`${t.entry.duration}ms`:`${(t.entry.duration/1e3).toFixed(2)}s`),u=e.computed(()=>t.entry?.status?t.entry.status<200?"status-badge--1xx":t.entry.status<300?"status-badge--2xx":t.entry.status<400?"status-badge--3xx":t.entry.status<500?"status-badge--4xx":"status-badge--5xx":"status-badge--pending"),_=e.computed(()=>t.entry?.request.query?Object.keys(t.entry.request.query).length>0:!1),f=e.computed(()=>t.entry?.request.headers?Object.keys(t.entry.request.headers).length>0:!1),c=e.computed(()=>t.entry?.request.body!==void 0&&t.entry?.request.body!==null),g=e.computed(()=>t.entry?.response?.headers?Object.keys(t.entry.response.headers).length>0:!1),$=e.computed(()=>t.entry?.response?.body!==void 0&&t.entry?.response?.body!==null);function E(D){try{return JSON.stringify(D,null,2)}catch{return String(D)}}function k(D){o.value[D]=!o.value[D]}async function y(D,d){try{await navigator.clipboard.writeText(D),l.value=d,setTimeout(()=>{l.value=null},2e3)}catch(b){console.error("Failed to copy:",b)}}async function M(){if(!t.entry)return;const D={request:t.entry.request,response:t.entry.response};await y(JSON.stringify(D,null,2),"full")}return(D,d)=>(e.openBlock(),e.createElementBlock("div",Pn,[n.entry?(e.openBlock(),e.createElementBlock("div",Qn,[e.createElementVNode("div",Un,[e.createElementVNode("div",Wn,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${n.entry.request.method.toLowerCase()}`])},e.toDisplayString(e.unref(me)(n.entry.request.method)),3),e.createElementVNode("span",Gn,e.toDisplayString(n.entry.request.path),1)]),e.createElementVNode("div",Jn,[n.entry.status!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["status-badge",u.value])},e.toDisplayString(n.entry.status),3)):(e.openBlock(),e.createElementBlock("span",Kn,"pending")),e.createElementVNode("span",Zn,[e.createVNode(e.unref(R),{size:14}),e.createTextVNode(" "+e.toDisplayString(s.value),1)]),n.entry.simulated?(e.openBlock(),e.createElementBlock("span",Yn,[e.createVNode(e.unref(Y),{size:14}),d[9]||(d[9]=e.createTextVNode(" Simulated ",-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Xn,[e.createElementVNode("button",{type:"button",class:"btn btn--ghost btn--sm",title:"Copy as JSON",onClick:M},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value==="full"?e.unref(pe):e.unref(_e)),{size:14})),e.createTextVNode(" "+e.toDisplayString(l.value==="full"?"Copied!":"Copy JSON"),1)])])]),e.createElementVNode("div",vn,[e.createElementVNode("div",eo,[d[10]||(d[10]=e.createElementVNode("span",{class:"timeline-detail__info-label"},"Timestamp",-1)),e.createElementVNode("span",to,e.toDisplayString(p.value),1)]),e.createElementVNode("div",no,[d[11]||(d[11]=e.createElementVNode("span",{class:"timeline-detail__info-label"},"Operation ID",-1)),e.createElementVNode("span",oo,e.toDisplayString(n.entry.request.operationId),1)]),e.createElementVNode("div",so,[d[12]||(d[12]=e.createElementVNode("span",{class:"timeline-detail__info-label"},"Request ID",-1)),e.createElementVNode("span",lo,e.toDisplayString(n.entry.id),1)])]),e.createElementVNode("div",ao,[d[16]||(d[16]=e.createElementVNode("h3",{class:"timeline-detail__section-title"},"Request",-1)),_.value?(e.openBlock(),e.createElementBlock("div",io,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-header","aria-expanded":o.value.requestQuery,"aria-controls":"requestQuery-panel",onClick:d[0]||(d[0]=b=>k("requestQuery"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value.requestQuery?e.unref(j):e.unref(Z)),{size:16})),d[13]||(d[13]=e.createElementVNode("span",null,"Query Parameters",-1)),e.createElementVNode("span",co,"("+e.toDisplayString(Object.keys(n.entry.request.query).length)+")",1)],8,ro),e.withDirectives(e.createElementVNode("div",mo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entry.request.query,(b,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"timeline-detail__kv-row"},[e.createElementVNode("span",po,e.toDisplayString(w),1),e.createElementVNode("span",uo,e.toDisplayString(Array.isArray(b)?b.join(", "):b),1)]))),128))],512),[[e.vShow,o.value.requestQuery]])])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("div",_o,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-header","aria-expanded":o.value.requestHeaders,"aria-controls":"requestHeaders-panel",onClick:d[1]||(d[1]=b=>k("requestHeaders"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value.requestHeaders?e.unref(j):e.unref(Z)),{size:16})),d[14]||(d[14]=e.createElementVNode("span",null,"Headers",-1)),e.createElementVNode("span",yo,"("+e.toDisplayString(Object.keys(n.entry.request.headers).length)+")",1)],8,fo),e.withDirectives(e.createElementVNode("div",ho,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entry.request.headers,(b,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"timeline-detail__kv-row"},[e.createElementVNode("span",ko,e.toDisplayString(w),1),e.createElementVNode("span",go,e.toDisplayString(b),1)]))),128))],512),[[e.vShow,o.value.requestHeaders]])])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("div",Eo,[e.createElementVNode("div",No,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-toggle","aria-expanded":o.value.requestBody,"aria-controls":"requestBody-panel",onClick:d[2]||(d[2]=b=>k("requestBody"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value.requestBody?e.unref(j):e.unref(Z)),{size:16})),d[15]||(d[15]=e.createElementVNode("span",null,"Body",-1))],8,Vo),e.createElementVNode("button",{type:"button",class:"btn btn--ghost btn--icon btn--sm",title:"Copy body",onClick:d[3]||(d[3]=e.withModifiers(b=>y(E(n.entry.request.body),"reqBody"),["stop"]))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value==="reqBody"?e.unref(pe):e.unref(_e)),{size:12}))])]),e.withDirectives(e.createElementVNode("div",bo,[e.createElementVNode("pre",Bo,e.toDisplayString(E(n.entry.request.body)),1)],512),[[e.vShow,o.value.requestBody]])])):e.createCommentVNode("",!0)]),n.entry.response?(e.openBlock(),e.createElementBlock("div",So,[d[19]||(d[19]=e.createElementVNode("h3",{class:"timeline-detail__section-title"},"Response",-1)),g.value?(e.openBlock(),e.createElementBlock("div",Co,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-header","aria-expanded":o.value.responseHeaders,"aria-controls":"responseHeaders-panel",onClick:d[4]||(d[4]=b=>k("responseHeaders"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value.responseHeaders?e.unref(j):e.unref(Z)),{size:16})),d[17]||(d[17]=e.createElementVNode("span",null,"Headers",-1)),e.createElementVNode("span",xo,"("+e.toDisplayString(Object.keys(n.entry.response.headers).length)+")",1)],8,$o),e.withDirectives(e.createElementVNode("div",Do,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entry.response.headers,(b,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"timeline-detail__kv-row"},[e.createElementVNode("span",wo,e.toDisplayString(w),1),e.createElementVNode("span",To,e.toDisplayString(b),1)]))),128))],512),[[e.vShow,o.value.responseHeaders]])])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("div",zo,[e.createElementVNode("div",qo,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-toggle","aria-expanded":o.value.responseBody,"aria-controls":"responseBody-panel",onClick:d[5]||(d[5]=b=>k("responseBody"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value.responseBody?e.unref(j):e.unref(Z)),{size:16})),d[18]||(d[18]=e.createElementVNode("span",null,"Body",-1))],8,Mo),e.createElementVNode("button",{type:"button",class:"btn btn--ghost btn--icon btn--sm",title:"Copy body",onClick:d[6]||(d[6]=e.withModifiers(b=>y(E(n.entry.response.body),"resBody"),["stop"]))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value==="resBody"?e.unref(pe):e.unref(_e)),{size:12}))])]),e.withDirectives(e.createElementVNode("div",Fo,[e.createElementVNode("pre",Io,e.toDisplayString(E(n.entry.response.body)),1)],512),[[e.vShow,o.value.responseBody]])])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Ro,[d[21]||(d[21]=e.createElementVNode("h3",{class:"timeline-detail__section-title"},"Response",-1)),e.createElementVNode("div",Lo,[e.createVNode(e.unref(R),{size:24,class:"timeline-detail__pending-icon"}),d[20]||(d[20]=e.createElementVNode("span",{class:"text-muted"},"Waiting for response...",-1))])]))])):(e.openBlock(),e.createElementBlock("div",jn,[e.createVNode(e.unref(R),{size:48,class:"timeline-detail__empty-icon"}),d[7]||(d[7]=e.createElementVNode("h3",{class:"timeline-detail__empty-title"},"Select an entry",-1)),d[8]||(d[8]=e.createElementVNode("p",{class:"timeline-detail__empty-description"}," Click on a timeline entry to view its details. ",-1))]))]))}}),[["__scopeId","data-v-b4bdd2d2"]]),Ao={class:"timeline-entry__time font-mono text-muted"},Oo={class:"timeline-entry__method"},Po={class:"timeline-entry__path font-mono"},jo={class:"timeline-entry__status"},Qo={key:1,class:"status-badge status-badge--pending"},Uo={class:"timeline-entry__duration font-mono text-muted"},Wo={key:0,class:"timeline-entry__simulated",title:"Simulated response"},Go=L(e.defineComponent({__name:"TimelineEntry",props:{entry:{},isSelected:{type:Boolean,default:!1}},emits:["select"],setup(n,{emit:t}){const o=n,l=t,p=e.computed(()=>new Date(o.entry.request.timestamp).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})),s=e.computed(()=>o.entry.duration===null?"pending...":o.entry.duration<1e3?`${o.entry.duration}ms`:`${(o.entry.duration/1e3).toFixed(2)}s`),u=e.computed(()=>o.entry.status===null?"status-badge--pending":o.entry.status<200?"status-badge--1xx":o.entry.status<300?"status-badge--2xx":o.entry.status<400?"status-badge--3xx":o.entry.status<500?"status-badge--4xx":"status-badge--5xx"),_=e.computed(()=>o.entry.status===null?R:o.entry.status<400?Ue:Ee),f=e.computed(()=>o.entry.response===null);function c(){l("select",o.entry.id)}return(g,$)=>(e.openBlock(),e.createElementBlock("button",{type:"button",class:e.normalizeClass(["timeline-entry",{"timeline-entry--selected":n.isSelected},{"timeline-entry--pending":f.value},{"timeline-entry--simulated":n.entry.simulated}]),onClick:c},[e.createElementVNode("div",Ao,e.toDisplayString(p.value),1),e.createElementVNode("div",Oo,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${n.entry.request.method.toLowerCase()}`])},e.toDisplayString(e.unref(me)(n.entry.request.method)),3)]),e.createElementVNode("div",Po,e.toDisplayString(n.entry.request.path),1),e.createElementVNode("div",jo,[n.entry.status!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["status-badge",u.value])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_.value),{size:12})),e.createTextVNode(" "+e.toDisplayString(n.entry.status),1)],2)):(e.openBlock(),e.createElementBlock("span",Qo,[e.createVNode(e.unref(R),{size:12}),$[0]||($[0]=e.createTextVNode(" pending ",-1))]))]),e.createElementVNode("div",Uo,e.toDisplayString(s.value),1),n.entry.simulated?(e.openBlock(),e.createElementBlock("div",Wo,[e.createVNode(e.unref(Y),{size:14})])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-a073dbdf"]]),Jo={class:"timeline-page"},Ko={class:"timeline-toolbar"},Zo={class:"timeline-search"},Yo=["value"],Xo=["aria-expanded"],vo={key:0,class:"timeline-filter-toggle__badge"},es={class:"timeline-stats"},ts={class:"timeline-stats__item"},ns={key:0,class:"timeline-stats__separator"},os={key:1,class:"timeline-stats__item"},ss=["disabled"],ls={key:0,class:"timeline-filters"},as={class:"timeline-filters__section"},is={class:"timeline-filters__methods"},rs=["onClick"],cs={class:"timeline-filters__section"},ds={class:"timeline-filters__status"},ms=["onClick"],ps={class:"timeline-filters__status-count"},us={class:"timeline-filters__section"},_s={class:"timeline-filters__type"},fs={key:0,class:"timeline-filters__actions"},ys={class:"timeline-content"},hs={key:0,class:"timeline-loading"},ks={key:1,class:"timeline-error"},gs={class:"timeline-error__message"},Es={key:2,class:"timeline-empty empty-state"},Ns={key:3,class:"timeline-empty empty-state"},Vs={class:"timeline-list-panel"},bs={class:"timeline-list"},Bs={class:"timeline-detail-panel"},Ss=Object.freeze(Object.defineProperty({__proto__:null,default:L(e.defineComponent({__name:"TimelinePage",setup(n){const t=ut(),{send:o,on:l,connected:p}=xe(),s=e.ref(!1),u=e.ref(null),_=["GET","POST","PUT","PATCH","DELETE","OPTIONS","HEAD","TRACE"],f=["2xx","3xx","4xx","5xx"];function c(){p.value&&(t.setLoading(!0),o({type:"get:timeline"}))}function g(B){t.setTimelineData(B),t.setLoading(!1)}function $(B){t.addRequest(B)}function E(B){t.addResponse(B)}function k(){t.clearTimeline()}function y(){o({type:"clear:timeline"}),t.clearTimeline()}function M(B){t.selectEntry(B)}function D(B){const a=B.target;t.setSearchQuery(a.value)}function d(){t.setSearchQuery(""),u.value?.focus()}function b(B){t.toggleMethodFilter(B)}function w(B){return t.filter.methods.includes(B)}function I(B){t.toggleStatusFilter(B)}function Q(B){return t.filter.statusCodes.includes(B)}function U(){const B=t.filter.simulatedOnly;t.setSimulatedFilter(B===!0?null:!0)}function A(){t.clearFilters()}function C(){s.value=!s.value}const h=e.computed(()=>t.hasActiveFilters()),z=e.computed(()=>t.filter.methods.length+t.filter.statusCodes.length+(t.filter.simulatedOnly!==null?1:0));let K=null,v=null,ee=null,te=null;return e.onMounted(()=>{K=l("timeline",g),v=l("request",$),ee=l("response",E),te=l("timeline:cleared",k),p.value&&c()}),e.onUnmounted(()=>{K?.(),v?.(),ee?.(),te?.()}),e.watch(p,B=>{B&&c()}),(B,a)=>(e.openBlock(),e.createElementBlock("div",Jo,[e.createElementVNode("div",Ko,[e.createElementVNode("div",Zo,[e.createVNode(e.unref(le),{size:16,class:"timeline-search__icon"}),e.createElementVNode("input",{ref_key:"searchInputRef",ref:u,type:"text",class:"timeline-search__input input",placeholder:"Search by path or operation...",value:e.unref(t).filter.searchQuery,onInput:D},null,40,Yo),e.unref(t).filter.searchQuery?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"timeline-search__clear btn btn--ghost btn--icon",title:"Clear search",onClick:d},[e.createVNode(e.unref(ae),{size:14})])):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["timeline-filter-toggle btn btn--secondary",{"timeline-filter-toggle--active":h.value}]),"aria-expanded":s.value,onClick:C},[e.createVNode(e.unref(Te),{size:16}),a[0]||(a[0]=e.createElementVNode("span",null,"Filters",-1)),z.value>0?(e.openBlock(),e.createElementBlock("span",vo,e.toDisplayString(z.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value?e.unref(we):e.unref(j)),{size:14}))],10,Xo),e.createElementVNode("div",es,[e.createElementVNode("span",ts,e.toDisplayString(e.unref(t).filteredEntries.length)+" requests ",1),e.unref(t).averageDuration>0?(e.openBlock(),e.createElementBlock("span",ns,"|")):e.createCommentVNode("",!0),e.unref(t).averageDuration>0?(e.openBlock(),e.createElementBlock("span",os," avg "+e.toDisplayString(e.unref(t).averageDuration)+"ms ",1)):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:"btn btn--secondary btn--icon",title:"Clear timeline",disabled:e.unref(t).entries.length===0,onClick:y},[e.createVNode(e.unref(ge),{size:16})],8,ss)]),s.value?(e.openBlock(),e.createElementBlock("div",ls,[e.createElementVNode("div",as,[a[1]||(a[1]=e.createElementVNode("h4",{class:"timeline-filters__title"},"Methods",-1)),e.createElementVNode("div",is,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,r=>e.createElementVNode("button",{key:r,type:"button",class:e.normalizeClass(["method-badge",`method-badge--${r.toLowerCase()}`,{"method-badge--inactive":!w(r)&&e.unref(t).filter.methods.length>0}]),onClick:N=>b(r)},e.toDisplayString(r),11,rs)),64))])]),e.createElementVNode("div",cs,[a[2]||(a[2]=e.createElementVNode("h4",{class:"timeline-filters__title"},"Status",-1)),e.createElementVNode("div",ds,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(f,r=>e.createElementVNode("button",{key:r,type:"button",class:e.normalizeClass(["timeline-filters__status-btn",`timeline-filters__status-btn--${r}`,{"timeline-filters__status-btn--active":Q(r)}]),onClick:N=>I(r)},[e.createTextVNode(e.toDisplayString(r)+" ",1),e.createElementVNode("span",ps," ("+e.toDisplayString(e.unref(t).statusCounts[r])+") ",1)],10,ms)),64))])]),e.createElementVNode("div",us,[a[3]||(a[3]=e.createElementVNode("h4",{class:"timeline-filters__title"},"Type",-1)),e.createElementVNode("div",_s,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["timeline-filters__status-btn",{"timeline-filters__status-btn--active":e.unref(t).filter.simulatedOnly}]),onClick:U}," Simulated only ",2)])]),h.value?(e.openBlock(),e.createElementBlock("div",fs,[e.createElementVNode("button",{type:"button",class:"btn btn--ghost",onClick:A},[e.createVNode(e.unref(ae),{size:14}),a[4]||(a[4]=e.createTextVNode(" Clear all filters ",-1))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ys,[e.unref(t).isLoading?(e.openBlock(),e.createElementBlock("div",hs,[...a[5]||(a[5]=[e.createElementVNode("div",{class:"timeline-loading__spinner"},null,-1),e.createElementVNode("span",{class:"text-muted"},"Loading timeline...",-1)])])):e.unref(t).error?(e.openBlock(),e.createElementBlock("div",ks,[e.createElementVNode("p",gs,e.toDisplayString(e.unref(t).error),1),e.createElementVNode("button",{type:"button",class:"btn btn--primary",onClick:c}," Retry ")])):e.unref(t).entries.length===0?(e.openBlock(),e.createElementBlock("div",Es,[e.createVNode(e.unref(R),{size:48,class:"empty-state__icon"}),a[6]||(a[6]=e.createElementVNode("h3",{class:"empty-state__title"},"No requests yet",-1)),a[7]||(a[7]=e.createElementVNode("p",{class:"empty-state__description"}," API requests will appear here in real-time as they are made. ",-1))])):e.unref(t).filteredEntries.length===0?(e.openBlock(),e.createElementBlock("div",Ns,[e.createVNode(e.unref(le),{size:48,class:"empty-state__icon"}),a[8]||(a[8]=e.createElementVNode("h3",{class:"empty-state__title"},"No matching requests",-1)),a[9]||(a[9]=e.createElementVNode("p",{class:"empty-state__description"}," Try adjusting your search or filters. ",-1)),h.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn--secondary",onClick:A}," Clear filters ")):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",Vs,[e.createElementVNode("div",bs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).filteredEntries,r=>(e.openBlock(),e.createBlock(Go,{key:r.id,entry:r,"is-selected":e.unref(t).selectedEntryId===r.id,onSelect:M},null,8,["entry","is-selected"]))),128))])]),e.createElementVNode("div",Bs,[e.createVNode(Ho,{entry:e.unref(t).selectedEntry},null,8,["entry"])])],64))])]))}}),[["__scopeId","data-v-a5c73778"]])},Symbol.toStringTag,{value:"Module"})),Cs={class:"models-page"},$s={class:"models-sidebar"},xs={class:"models-sidebar__header"},Ds={class:"models-sidebar__list"},ws=["onClick"],Ts={class:"models-sidebar__name"},zs={class:"models-sidebar__count"},qs={class:"models-content"},Ms={class:"models-toolbar"},Fs={class:"models-toolbar__title"},Is={class:"font-mono"},Rs={class:"text-muted"},Ls={class:"models-toolbar__actions"},Hs={class:"models-data"},As={class:"models-data__json font-mono"},Os={key:1,class:"empty-state"},Ps=Object.freeze(Object.defineProperty({__proto__:null,default:L(e.defineComponent({__name:"ModelsPage",setup(n){const t=e.ref("Pet"),o=e.ref([{name:"Pet",count:5},{name:"Category",count:3},{name:"Order",count:2},{name:"User",count:1}]),l=e.ref([{id:1,name:"Fluffy",category:{id:1,name:"Dogs"},status:"available"},{id:2,name:"Whiskers",category:{id:2,name:"Cats"},status:"pending"},{id:3,name:"Goldie",category:{id:3,name:"Fish"},status:"available"},{id:4,name:"Tweety",category:{id:4,name:"Birds"},status:"sold"},{id:5,name:"Hoppy",category:{id:5,name:"Rabbits"},status:"available"}]);function p(u){t.value=u}function s(){console.log("Reseeding schema:",t.value)}return(u,_)=>(e.openBlock(),e.createElementBlock("div",Cs,[e.createElementVNode("aside",$s,[e.createElementVNode("div",xs,[e.createVNode(e.unref(fe),{size:18}),_[0]||(_[0]=e.createElementVNode("span",null,"Schemas",-1))]),e.createElementVNode("div",Ds,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,f=>(e.openBlock(),e.createElementBlock("button",{key:f.name,class:e.normalizeClass(["models-sidebar__item",{"models-sidebar__item--active":t.value===f.name}]),onClick:c=>p(f.name)},[e.createElementVNode("span",Ts,e.toDisplayString(f.name),1),e.createElementVNode("span",zs,e.toDisplayString(f.count),1)],10,ws))),128))])]),e.createElementVNode("main",qs,[t.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Ms,[e.createElementVNode("div",Fs,[e.createElementVNode("span",Is,e.toDisplayString(t.value),1),e.createElementVNode("span",Rs,"("+e.toDisplayString(l.value.length)+" items)",1)]),e.createElementVNode("div",Ls,[e.createElementVNode("button",{class:"btn btn--secondary",title:"Reseed with generated data",onClick:s},[e.createVNode(e.unref(Je),{size:16}),_[1]||(_[1]=e.createElementVNode("span",null,"Reseed",-1))])])]),e.createElementVNode("div",Hs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,f=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"models-data__item card"},[e.createElementVNode("pre",As,e.toDisplayString(JSON.stringify(f,null,2)),1)]))),128))])],64)):(e.openBlock(),e.createElementBlock("div",Os,[e.createVNode(e.unref(fe),{size:48,class:"empty-state__icon"}),_[2]||(_[2]=e.createElementVNode("h3",{class:"empty-state__title"},"Select a schema",-1)),_[3]||(_[3]=e.createElementVNode("p",{class:"empty-state__description"}," Choose a schema from the sidebar to view and edit its data. ",-1))]))])]))}}),[["__scopeId","data-v-6373fe56"]])},Symbol.toStringTag,{value:"Module"})),js={class:"simulator-page"},Qs={class:"simulator-form card"},Us={class:"simulator-form__header"},Ws={class:"simulator-form__body"},Gs={class:"simulator-form__row"},Js=["value"],Ks={class:"simulator-presets"},Zs=["onClick"],Ys={class:"simulator-preset__label"},Xs=["disabled"],vs={class:"simulator-active"},el={class:"simulator-active__header"},tl={class:"simulator-active__title"},nl={class:"simulator-active__list"},ol={class:"simulator-simulation__info"},sl={class:"simulator-simulation__path font-mono"},ll={class:"simulator-simulation__preset"},al=["onClick"],il={key:0,class:"empty-state"},rl=Object.freeze(Object.defineProperty({__proto__:null,default:L(e.defineComponent({__name:"SimulatorPage",setup(n){const t=[{id:"slow",label:"Slow Response",description:"Add 2 second delay",type:"delay",delay:2e3},{id:"very-slow",label:"Very Slow",description:"Add 5 second delay",type:"delay",delay:5e3},{id:"timeout",label:"Timeout",description:"Simulate request timeout (30s)",type:"delay",delay:3e4},{id:"error-400",label:"Bad Request",description:"Return 400 status",type:"error",status:400},{id:"error-401",label:"Unauthorized",description:"Return 401 status",type:"error",status:401},{id:"error-403",label:"Forbidden",description:"Return 403 status",type:"error",status:403},{id:"error-404",label:"Not Found",description:"Return 404 status",type:"error",status:404},{id:"error-429",label:"Rate Limited",description:"Return 429 status",type:"error",status:429},{id:"error-500",label:"Server Error",description:"Return 500 status",type:"error",status:500},{id:"error-503",label:"Unavailable",description:"Return 503 status",type:"error",status:503}],o=e.ref([{id:"1",path:"/pets",method:"GET",preset:t[0]},{id:"2",path:"/pets/{petId}",method:"GET",preset:t[6]}]),l=e.ref(""),p=e.ref("GET"),s=e.ref(null),u=["GET","POST","PUT","PATCH","DELETE"];function _(E){return t.find(k=>k.id===E)}const f=e.computed(()=>l.value.trim()!==""&&s.value!==null);function c(){if(!f.value||!s.value)return;const E=_(s.value);E&&(o.value.push({id:Date.now().toString(),path:l.value.trim(),method:p.value,preset:E}),l.value="",s.value=null)}function g(E){o.value=o.value.filter(k=>k.id!==E)}function $(){o.value=[]}return(E,k)=>(e.openBlock(),e.createElementBlock("div",js,[e.createElementVNode("div",Qs,[e.createElementVNode("div",Us,[e.createVNode(e.unref(Y),{size:18}),k[2]||(k[2]=e.createElementVNode("span",null,"Add Simulation",-1))]),e.createElementVNode("div",Ws,[e.createElementVNode("div",Gs,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":k[0]||(k[0]=y=>p.value=y),class:"simulator-form__method input"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(u,y=>e.createElementVNode("option",{key:y,value:y},e.toDisplayString(y),9,Js)),64))],512),[[e.vModelSelect,p.value]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":k[1]||(k[1]=y=>l.value=y),type:"text",class:"simulator-form__path input",placeholder:"/api/path or * for all"},null,512),[[e.vModelText,l.value]])]),e.createElementVNode("div",Ks,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(t,y=>e.createElementVNode("button",{key:y.id,class:e.normalizeClass(["simulator-preset",{"simulator-preset--selected":s.value===y.id},y.type==="delay"?"simulator-preset--delay":"simulator-preset--error"]),onClick:M=>s.value=y.id},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.type==="delay"?e.unref(R):e.unref(Ee)),{size:14})),e.createElementVNode("span",Ys,e.toDisplayString(y.label),1)],10,Zs)),64))]),e.createElementVNode("button",{class:"btn btn--primary",disabled:!f.value,onClick:c},[e.createVNode(e.unref(Ge),{size:16}),k[3]||(k[3]=e.createElementVNode("span",null,"Add Simulation",-1))],8,Xs)])]),e.createElementVNode("div",vs,[e.createElementVNode("div",el,[e.createElementVNode("span",tl," Active Simulations ("+e.toDisplayString(o.value.length)+") ",1),o.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn--ghost",onClick:$},[e.createVNode(e.unref(ge),{size:14}),k[4]||(k[4]=e.createElementVNode("span",null,"Clear All",-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:"simulator-simulation card"},[e.createElementVNode("div",ol,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${y.method.toLowerCase()}`])},e.toDisplayString(y.method),3),e.createElementVNode("span",sl,e.toDisplayString(y.path),1)]),e.createElementVNode("div",ll,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.preset.type==="delay"?e.unref(R):e.unref(Ee)),{size:14,class:e.normalizeClass(y.preset.type==="delay"?"text-warning":"text-error")},null,8,["class"])),e.createElementVNode("span",null,e.toDisplayString(y.preset.label),1)]),e.createElementVNode("button",{class:"btn btn--ghost btn--icon",title:"Remove simulation",onClick:M=>g(y.id)},[e.createVNode(e.unref(ge),{size:14})],8,al)]))),128)),o.value.length===0?(e.openBlock(),e.createElementBlock("div",il,[e.createVNode(e.unref(Y),{size:48,class:"empty-state__icon"}),k[5]||(k[5]=e.createElementVNode("h3",{class:"empty-state__title"},"No active simulations",-1)),k[6]||(k[6]=e.createElementVNode("p",{class:"empty-state__description"}," Add a simulation above to test error handling and slow responses. ",-1))])):e.createCommentVNode("",!0)])])]))}}),[["__scopeId","data-v-cf6df4d2"]])},Symbol.toStringTag,{value:"Module"}));q.bootstrap=Ae,q.useTheme=yt,q.useWebSocket=xe,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(j,W){typeof exports=="object"&&typeof module<"u"?W(exports,require("pinia"),require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","pinia","vue","vue-router"],W):(j=typeof globalThis<"u"?globalThis:j||self,W(j.ViteOpenApiDevtools={},j.Pinia,j.Vue,j.VueRouter))})(this,(function(j,W,e,ce){"use strict";const Fe=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ze=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,l,a)=>a?a.toUpperCase():l.toLowerCase()),Ye=n=>{const t=Ze(n);return t.charAt(0).toUpperCase()+t.slice(1)},Xe=(...n)=>n.filter((t,l,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===l).join(" ").trim();var de={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const ve=({size:n,strokeWidth:t=2,absoluteStrokeWidth:l,color:a,iconNode:m,name:o,class:p,...g},{slots:y})=>e.h("svg",{...de,width:n||de.width,height:n||de.height,stroke:a||de.stroke,"stroke-width":l?Number(t)*24/Number(n):t,class:Xe("lucide",...o?[`lucide-${Fe(Ye(o))}-icon`,`lucide-${Fe(o)}`]:["lucide-icon"]),...g},[...m.map(d=>e.h(...d)),...y.default?[y.default()]:[]]);const z=(n,t)=>(l,{slots:a})=>e.h(ve,{...l,iconNode:t,name:n},a);const me=z("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const X=z("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const te=z("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Le=z("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const et=z("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const tt=z("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const G=z("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Ne=z("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);const Ve=z("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const be=z("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);const Se=z("file-json",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const Ae=z("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const nt=z("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const ot=z("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const st=z("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const Ce=z("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);const lt=z("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const pe=z("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const at=z("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);const Be=z("sprout",[["path",{d:"M7 20h10",key:"e6iznv"}],["path",{d:"M10 20c5.5-2.5.8-6.4 3-10",key:"161w41"}],["path",{d:"M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z",key:"9gtqwd"}],["path",{d:"M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z",key:"bkxnd2"}]]);const rt=z("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);const ue=z("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const $e=z("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const it=z("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const ct=z("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);const le=z("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const ne=z("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Re=[{path:"/",redirect:"/routes"},{path:"/routes",name:"routes",component:()=>Promise.resolve().then(()=>vn),meta:{title:"Routes",icon:"route"}},{path:"/timeline",name:"timeline",component:()=>Promise.resolve().then(()=>Ls),meta:{title:"Timeline",icon:"clock"}},{path:"/models",name:"models",component:()=>Promise.resolve().then(()=>Bl),meta:{title:"Models",icon:"database"}},{path:"/simulator",name:"simulator",component:()=>Promise.resolve().then(()=>Zl),meta:{title:"Simulator",icon:"zap"}},{path:"/:pathMatch(.*)*",name:"not-found",redirect:"/routes"}],dt=ce.createRouter({history:ce.createWebHashHistory(),routes:Re}),mt={class:"app"},pt={class:"app-header"},ut={class:"app-header__brand"},ft={class:"app-nav",role:"tablist","aria-label":"DevTools navigation"},ht=["aria-selected","aria-current","aria-controls","onClick"],yt={class:"app-nav__label"},_t={class:"app-header__status"},gt={class:"connection-status"},kt={class:"connection-status__text"},Et={class:"app-main"},Nt=e.defineComponent({__name:"App",setup(n){const t=ce.useRoute(),l=ce.useRouter(),a=e.computed(()=>Re.filter(d=>d.name&&d.meta?.title).map(d=>({name:d.name,path:d.path,title:d.meta?.title,icon:d.meta?.icon}))),m=e.computed(()=>t.name);function o(d){l.push(d)}const p={route:Ce,clock:G,database:be,zap:ne};function g(d){return p[d]??Ce}const y=e.computed(()=>!1);return(d,V)=>{const $=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",mt,[e.createElementVNode("header",pt,[e.createElementVNode("div",ut,[e.createVNode(e.unref(ne),{class:"app-header__logo",size:20}),V[0]||(V[0]=e.createElementVNode("span",{class:"app-header__title"},"OpenAPI DevTools",-1))]),e.createElementVNode("nav",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,B=>(e.openBlock(),e.createElementBlock("button",{key:B.name,role:"tab","aria-selected":m.value===B.name,"aria-current":m.value===B.name?"true":void 0,"aria-controls":`panel-${B.name}`,tabindex:0,class:e.normalizeClass(["app-nav__tab",{"app-nav__tab--active":m.value===B.name}]),onClick:x=>o(B.path)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(B.icon)),{size:16,class:"app-nav__icon"})),e.createElementVNode("span",yt,e.toDisplayString(B.title),1)],10,ht))),128))]),e.createElementVNode("div",_t,[e.createElementVNode("div",gt,[e.createElementVNode("span",{class:e.normalizeClass(["connection-status__dot",y.value?"connection-status__dot--connected":"connection-status__dot--disconnected"])},null,2),e.createElementVNode("span",kt,e.toDisplayString(y.value?"Connected":"Disconnected"),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.value?e.unref(ct):e.unref(it)),{size:14,class:"connection-status__icon"}))])])]),e.createElementVNode("main",Et,[e.createVNode($,null,{default:e.withCtx(({Component:B})=>[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(B)))]),_:2},1024)]),_:1})])])}}}),Q=(n,t)=>{const l=n.__vccOpts||n;for(const[a,m]of t)l[a]=m;return l},Vt=Q(Nt,[["__scopeId","data-v-513332df"]]);function fe(n){try{return structuredClone(e.toRaw(n))}catch{return JSON.parse(JSON.stringify(n))}}const bt=W.defineStore("models",()=>{const n=e.ref([]),t=e.ref(null),l=e.ref([]),a=e.ref([]),m=e.ref(!1),o=e.ref(null),p=e.computed(()=>t.value?n.value.find(r=>r.name===t.value)??null:null),g=e.ref(!1),y=e.computed(()=>g.value),d=e.computed(()=>n.value.length),V=e.computed(()=>n.value.reduce((r,f)=>r+f.count,0));async function $(){m.value=!0,o.value=null;try{const r=await fetch("/_api/store");if(!r.ok)throw new Error(`Failed to fetch schemas: ${r.statusText}`);const f=await r.json();n.value=f.schemas??[]}catch(r){o.value=r instanceof Error?r.message:"Failed to fetch schemas",console.error("[ModelsStore] Error fetching schemas:",r)}finally{m.value=!1}}async function B(r){t.value!==r&&(t.value=r,await x(r))}async function x(r){m.value=!0,o.value=null;try{const f=await fetch(`/_api/store/${encodeURIComponent(r)}`);if(!f.ok)throw new Error(`Failed to fetch schema data: ${f.statusText}`);const b=await f.json(),S=b.items??[];l.value=fe(S),a.value=fe(S),g.value=!1;const A=n.value.findIndex(h=>h.name===r);A!==-1&&(n.value[A].count=b.count)}catch(f){o.value=f instanceof Error?f.message:"Failed to fetch schema data",console.error("[ModelsStore] Error fetching schema data:",f)}finally{m.value=!1}}function F(r){if(!Array.isArray(r)){o.value="Invalid data: Expected an array of items",console.error("[ModelsStore] updateItems received non-array value:",typeof r);return}l.value=r,o.value=null,g.value=!0}async function C(){if(!t.value)return o.value="No schema selected",!1;m.value=!0,o.value=null;try{const r=await fetch(`/_api/store/${encodeURIComponent(t.value)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l.value)});if(!r.ok){const S=await r.json().catch(()=>({}));throw new Error(S.error||`Failed to save items: ${r.statusText}`)}const f=await r.json();a.value=fe(l.value),g.value=!1;const b=n.value.findIndex(S=>S.name===t.value);return b!==-1&&(n.value[b].count=f.created??l.value.length),!0}catch(r){return o.value=r instanceof Error?r.message:"Failed to save items",console.error("[ModelsStore] Error saving items:",r),!1}finally{m.value=!1}}async function u(){if(!t.value)return o.value="No schema selected",!1;m.value=!0,o.value=null;try{const r=await fetch(`/_api/store/${encodeURIComponent(t.value)}`,{method:"DELETE"});if(!r.ok)throw new Error(`Failed to clear schema: ${r.statusText}`);l.value=[],a.value=[],g.value=!1;const f=n.value.findIndex(b=>b.name===t.value);return f!==-1&&(n.value[f].count=0),!0}catch(r){return o.value=r instanceof Error?r.message:"Failed to clear schema",console.error("[ModelsStore] Error clearing schema:",r),!1}finally{m.value=!1}}function s(){l.value=fe(a.value),g.value=!1}async function N(){t.value?await x(t.value):await $()}function D(){n.value=[],t.value=null,l.value=[],a.value=[],m.value=!1,o.value=null,g.value=!1}function L(r){const f=n.value.findIndex(b=>b.name===r.schema);f!==-1&&(n.value[f].count=r.count),t.value===r.schema&&(y.value?console.warn(`[ModelsStore] Skipping auto-refresh for schema "${r.schema}" - unsaved changes exist`):x(r.schema))}function k(r){r.success&&($(),t.value&&(y.value?console.warn(`[ModelsStore] Skipping auto-refresh after reseed for schema "${t.value}" - unsaved changes exist`):x(t.value)))}return{schemas:n,selectedSchema:t,currentItems:l,loading:m,error:o,currentSchema:p,isDirty:y,schemaCount:d,totalItems:V,fetchSchemas:$,selectSchemaByName:B,fetchSchemaData:x,updateItems:F,saveItems:C,clearSchema:u,discardChanges:s,refresh:N,reset:D,handleStoreUpdate:L,handleReseedComplete:k}}),Oe=W.defineStore("registry",()=>{const n=e.ref([]),t=e.ref({totalEndpoints:0,withCustomHandler:0,totalSchemas:0,withCustomSeed:0,autoGenerated:0}),l=e.ref(!1),a=e.ref(null),m=e.ref(""),o=e.ref({methods:[],hasHandler:null,hasSeed:null,tags:[]}),p=e.ref(null),g=e.ref(new Set),y=e.computed(()=>{const i=new Set;for(const _ of n.value)for(const w of _.tags)i.add(w);return Array.from(i).sort()}),d=e.computed(()=>{const i=new Set;for(const _ of n.value)_.responseSchema&&i.add(_.responseSchema);return Array.from(i).sort()}),V=e.computed(()=>{let i=n.value;if(m.value.trim()){const _=m.value.toLowerCase().trim();i=i.filter(w=>w.path.toLowerCase().includes(_)||w.operationId.toLowerCase().includes(_)||w.summary?.toLowerCase().includes(_)||w.tags.some(c=>c.toLowerCase().includes(_)))}return o.value.methods.length>0&&(i=i.filter(_=>o.value.methods.includes(_.method))),o.value.hasHandler!==null&&(i=i.filter(_=>_.hasHandler===o.value.hasHandler)),o.value.hasSeed!==null&&(i=i.filter(_=>_.hasSeed===o.value.hasSeed)),o.value.tags.length>0&&(i=i.filter(_=>_.tags.some(w=>o.value.tags.includes(w)))),i}),$=e.computed(()=>{const i=new Map;for(const _ of V.value){let w;_.tags.length>0?w=_.tags[0]:_.responseSchema?w=_.responseSchema:w=_.path.split("/").filter(Boolean)[0]||"Other",i.has(w)||i.set(w,[]),i.get(w)?.push(_)}return Array.from(i.entries()).map(([_,w])=>({tag:_,endpoints:w.sort((c,E)=>c.path.localeCompare(E.path)),isExpanded:g.value.has(_)})).sort((_,w)=>_.tag.localeCompare(w.tag))}),B=e.computed(()=>p.value?n.value.find(i=>i.key===p.value)??null:null),x=e.computed(()=>n.value.filter(i=>i.hasHandler).length),F=e.computed(()=>n.value.filter(i=>i.hasSeed).length);function C(i){n.value=i.endpoints,t.value=i.stats,a.value=null;for(const _ of i.endpoints)_.tags.length>0&&g.value.add(_.tags[0])}function u(i){l.value=i}function s(i){a.value=i,l.value=!1}function N(){a.value=null}function D(i){m.value=i}function L(i){const _=o.value.methods.indexOf(i);_===-1?o.value.methods.push(i):o.value.methods.splice(_,1)}function k(i){o.value.hasHandler=i}function r(i){o.value.hasSeed=i}function f(i){const _=o.value.tags.indexOf(i);_===-1?o.value.tags.push(i):o.value.tags.splice(_,1)}function b(){o.value={methods:[],hasHandler:null,hasSeed:null,tags:[]},m.value=""}function S(){return m.value.trim()!==""||o.value.methods.length>0||o.value.hasHandler!==null||o.value.hasSeed!==null||o.value.tags.length>0}function A(i){p.value=i}function h(i){g.value.has(i)?g.value.delete(i):g.value.add(i)}function T(){for(const i of $.value)g.value.add(i.tag)}function R(){g.value.clear()}function H(i){const _=new Set(i);for(const w of n.value)w.hasHandler=_.has(w.operationId)}function I(i){const _=new Set(i);for(const w of n.value)w.hasSeed=w.responseSchema?_.has(w.responseSchema):!1}return{endpoints:n,stats:t,isLoading:l,error:a,searchQuery:m,filter:o,selectedEndpointKey:p,expandedTags:g,allTags:y,allSchemas:d,filteredEndpoints:V,groupedEndpoints:$,selectedEndpoint:B,handlerCount:x,seedCount:F,setRegistryData:C,setLoading:u,setError:s,clearError:N,setSearchQuery:D,toggleMethodFilter:L,setHandlerFilter:k,setSeedFilter:r,toggleTagFilter:f,clearFilters:b,hasActiveFilters:S,selectEndpoint:A,toggleGroup:h,expandAllGroups:T,collapseAllGroups:R,updateHandlerStatus:H,updateSeedStatus:I}}),xe=[{id:"slow-network",label:"Slow Network",description:"3000ms delay (3G simulation)",type:"delay",status:200,delay:3e3},{id:"server-error",label:"Server Error",description:"Returns HTTP 500",type:"error",status:500,body:{error:"Internal Server Error",message:"Simulated server error"}},{id:"rate-limit",label:"Rate Limited",description:"Returns HTTP 429",type:"error",status:429,body:{error:"Too Many Requests",message:"Rate limit exceeded"}},{id:"not-found",label:"Not Found",description:"Returns HTTP 404",type:"error",status:404,body:{error:"Not Found",message:"Resource not found"}},{id:"request-timeout",label:"Request Timeout",description:"30000ms delay (simulates timeout)",type:"delay",status:200,delay:3e4},{id:"empty-response",label:"Empty Response",description:"Returns HTTP 200 with empty body",type:"empty",status:200,body:null},{id:"unauthorized",label:"Unauthorized",description:"Returns HTTP 401",type:"error",status:401,body:{error:"Unauthorized",message:"Authentication required"}}],St=W.defineStore("simulation",()=>{const n=e.ref(new Map),t=e.ref(new Map),l=e.ref(!1),a=e.ref(null),m=e.computed(()=>Array.from(n.value.values())),o=e.computed(()=>n.value.size),p=e.computed(()=>xe),g=e.computed(()=>n.value.size>0),y=e.computed(()=>{const h={delay:[],error:[],empty:[]};for(const T of n.value.values()){const R=d(T);h[R].push(T)}return h});function d(h){const T=h.presetId?xe.find(R=>R.id===h.presetId):null;return T?T.type:h.delay&&h.delay>0?"delay":h.body===null?"empty":"error"}function V(h){n.value.clear();for(const T of h)n.value.set(T.path,T);a.value=null}function $(h,T=!1){if(T){const R=n.value.get(h.path)||null;t.value.set(h.path,R)}n.value.set(h.path,h)}function B(h,T=!1){if(T){const R=n.value.get(h)||null;t.value.set(h,R)}return n.value.delete(h)}function x(){n.value.clear()}function F(h){return n.value.get(h)}function C(h){return n.value.has(h)}function u(h){return xe.find(T=>T.id===h)}function s(h,T,R){const H=u(T);return H?{path:h,operationId:R,status:H.status,delay:H.delay,body:H.body,presetId:H.id}:(a.value=`Preset not found: ${T}`,null)}function N(h){l.value=h}function D(h){a.value=h,l.value=!1}function L(){a.value=null}function k(h){if(!t.value.has(h))return;const T=t.value.get(h);T==null?n.value.delete(h):n.value.set(h,T),t.value.delete(h)}function r(h){console.log("[Simulation] Added:",h.path)}function f(h){B(h.path),console.log("[Simulation] Removed:",h.path)}function b(h){x(),console.log("[Simulation] Cleared all:",h.count)}function S(h){h.success?(t.value.delete(h.path),console.log("[Simulation] Set successfully:",h.path)):(k(h.path),D(`Failed to set simulation for ${h.path}`)),N(!1)}function A(h){h.success?(t.value.delete(h.path),console.log("[Simulation] Cleared successfully:",h.path)):(k(h.path),D(`Failed to clear simulation for ${h.path}`)),N(!1)}return{simulations:n,isLoading:l,error:a,activeSimulations:m,count:o,presets:p,hasActiveSimulations:g,simulationsByType:y,setSimulations:V,addSimulationLocal:$,removeSimulationLocal:B,clearSimulationsLocal:x,getSimulation:F,hasSimulation:C,getPreset:u,createSimulationFromPreset:s,setLoading:N,setError:D,clearError:L,rollbackSimulation:k,handleSimulationAdded:r,handleSimulationRemoved:f,handleSimulationsCleared:b,handleSimulationSet:S,handleSimulationCleared:A}}),Ct=W.defineStore("timeline",()=>{const n=e.ref([]),t=e.ref(!1),l=e.ref(null),a=e.ref({methods:[],statusCodes:[],searchQuery:"",simulatedOnly:null}),m=e.ref(null),o=e.ref(500),p=new Map;function g(c){return c<200?"1xx":c<300?"2xx":c<400?"3xx":c<500?"4xx":"5xx"}const y=e.computed(()=>{let c=n.value;if(a.value.searchQuery.trim()){const E=a.value.searchQuery.toLowerCase().trim();c=c.filter(M=>M.request.path.toLowerCase().includes(E)||M.request.operationId.toLowerCase().includes(E))}return a.value.methods.length>0&&(c=c.filter(E=>a.value.methods.includes(E.request.method.toUpperCase()))),a.value.statusCodes.length>0&&(c=c.filter(E=>{if(E.status===null)return!1;const M=g(E.status);return a.value.statusCodes.includes(M)})),a.value.simulatedOnly!==null&&(c=c.filter(E=>E.simulated===a.value.simulatedOnly)),c}),d=e.computed(()=>m.value?n.value.find(c=>c.id===m.value)??null:null),V=e.computed(()=>n.value.length),$=e.computed(()=>n.value.filter(c=>c.response!==null).length),B=e.computed(()=>n.value.filter(c=>c.response===null).length),x=e.computed(()=>{const c={"1xx":0,"2xx":0,"3xx":0,"4xx":0,"5xx":0};for(const E of n.value)if(E.status!==null){const M=g(E.status);c[M]++}return c}),F=e.computed(()=>{const c=n.value.filter(M=>M.duration!==null);if(c.length===0)return 0;const E=c.reduce((M,Z)=>M+(Z.duration??0),0);return Math.round(E/c.length)});function C(c){const E={id:c.id,request:c,response:null,status:null,duration:null,simulated:!1},M=p.get(c.id);M&&(s(E,M),p.delete(c.id)),n.value.unshift(E),n.value.length>o.value&&(n.value=n.value.slice(0,o.value))}function u(c){const E=n.value.find(M=>M.id===c.requestId);if(E)s(E,c),p.delete(c.requestId);else if(p.set(c.requestId,c),p.size>100){const M=N(c);n.value.unshift(M),p.delete(c.requestId),n.value.length>o.value&&(n.value=n.value.slice(0,o.value))}}function s(c,E){c.response=E,c.status=E.status,c.duration=E.duration,c.simulated=E.simulated}function N(c){const E={id:c.requestId,method:"UNKNOWN",path:"/unknown",operationId:"unknown",timestamp:Date.now(),headers:{},query:{},body:void 0};return{id:c.requestId,request:E,response:c,status:c.status,duration:c.duration,simulated:c.simulated}}function D(c){for(const[E,M]of p){const Z=c.get(E);Z?(s(Z,M),p.delete(E)):(c.set(E,N(M)),p.delete(E))}}function L(c,E){for(const[M,Z]of E){const Y=c.get(M);Y?s(Y,Z):p.set(M,Z)}}function k(c){for(const[E,M]of p)c.has(E)||(c.set(E,N(M)),p.delete(E))}function r(c){const E=new Map,M=new Map;for(const Y of c.entries)if(Y.type==="request"){const v=Y.data;E.set(v.id,{id:v.id,request:v,response:null,status:null,duration:null,simulated:!1})}else if(Y.type==="response"){const v=Y.data;M.set(v.requestId,v)}D(E),L(E,M),k(E);const Z=Array.from(E.values()).sort((Y,v)=>v.request.timestamp-Y.request.timestamp);n.value=Z.slice(0,o.value),l.value=null}function f(){n.value=[],m.value=null,p.clear()}function b(c){t.value=c}function S(c){l.value=c,t.value=!1}function A(){l.value=null}function h(c){a.value.searchQuery=c}function T(c){const E=a.value.methods.indexOf(c);E===-1?a.value.methods.push(c):a.value.methods.splice(E,1)}function R(c){const E=a.value.statusCodes.indexOf(c);E===-1?a.value.statusCodes.push(c):a.value.statusCodes.splice(E,1)}function H(c){a.value.simulatedOnly=c}function I(){a.value={methods:[],statusCodes:[],searchQuery:"",simulatedOnly:null}}function i(){return a.value.searchQuery.trim()!==""||a.value.methods.length>0||a.value.statusCodes.length>0||a.value.simulatedOnly!==null}function _(c){m.value=c}function w(c){const E=Math.max(1,c);o.value=E,n.value.length>E&&(n.value=n.value.slice(0,E))}return{entries:n,isLoading:t,error:l,filter:a,selectedEntryId:m,maxEntries:o,filteredEntries:y,selectedEntry:d,totalCount:V,completedCount:$,pendingCount:B,statusCounts:x,averageDuration:F,addRequest:C,addResponse:u,setTimelineData:r,clearTimeline:f,setLoading:b,setError:S,clearError:A,setSearchQuery:h,toggleMethodFilter:T,toggleStatusFilter:R,setSimulatedFilter:H,clearFilters:I,hasActiveFilters:i,selectEntry:_,setMaxEntries:w}}),Bt=["light","dark","system"];function Pe(n){return typeof n=="string"&&Bt.includes(n)}const we="openapi-devtools-theme",K=e.ref("system"),ee=e.ref(!1);let he=null,ye=null;function _e(){return typeof window<"u"&&typeof document<"u"}function $t(){return e.getCurrentInstance()!==null}function xt(){const n=e.computed(()=>K.value==="system"?ee.value?"dark":"light":K.value),t=e.computed(()=>n.value==="dark");function l(){if(!_e())return;const d=document.documentElement;n.value==="dark"?(d.classList.add("dark"),d.classList.remove("light")):(d.classList.add("light"),d.classList.remove("dark"))}function a(d){if(!Pe(d)){console.warn(`[DevTools] Invalid theme mode: ${d}`);return}if(K.value=d,_e())try{localStorage.setItem(we,d)}catch{console.warn("[DevTools] Unable to persist theme preference")}}function m(){K.value==="system"?a(ee.value?"light":"dark"):a(K.value==="dark"?"light":"dark")}function o(){a("system")}function p(){he&&ye&&(he.removeEventListener("change",ye),he=null,ye=null)}function g(){if(!_e())return;p();const d=window.matchMedia("(prefers-color-scheme: dark)");ee.value=d.matches;const V=$=>{ee.value=$.matches};d.addEventListener("change",V),he=d,ye=V;try{const $=localStorage.getItem(we);Pe($)&&(K.value=$)}catch{}l()}function y(){if(p(),K.value="system",ee.value=!1,_e()){document.documentElement.classList.remove("dark","light");try{localStorage.removeItem(we)}catch{}}}return e.watch([K,ee],()=>{l()}),$t()&&(e.onMounted(()=>{g()}),e.onUnmounted(()=>{p()})),{themeMode:e.computed(()=>K.value),effectiveTheme:n,isDark:t,systemPrefersDark:e.computed(()=>ee.value),setTheme:a,toggleTheme:m,resetToSystem:o,initialize:g,resetState:y}}const De={path:"/_ws",reconnectDelay:2e3,maxReconnectAttempts:Number.POSITIVE_INFINITY,autoConnect:!0},O=e.ref("disconnected"),Te=e.ref(null),ae=e.ref(0);let q=null,ge=null,oe={...De},Me=!1;const J=new Map;function He(){return typeof window<"u"&&typeof WebSocket<"u"}function wt(){return e.getCurrentInstance()!==null}function Dt(n){return He()?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${n}`:`ws://localhost${n}`}function je(){ge!==null&&(clearTimeout(ge),ge=null)}function Tt(n,t){const l=J.get(n);if(l)for(const m of l)try{m(t)}catch(o){console.error(`[DevTools WebSocket] Error in event handler for '${n}':`,o)}const a=J.get("*");if(a)for(const m of a)try{m({type:n,data:t})}catch(o){console.error("[DevTools WebSocket] Error in wildcard event handler:",o)}}function Mt(){O.value="connected",ae.value=0,je()}function zt(n){try{const t=JSON.parse(n.data);if(t.type==="connected"){const l=t.data;Te.value=l.serverVersion}Tt(t.type,t.data)}catch(t){console.error("[DevTools WebSocket] Failed to parse message:",t)}}function It(){O.value,O.value="disconnected",q=null,ae.value<oe.maxReconnectAttempts&&(O.value="reconnecting",ae.value++,ge=setTimeout(()=>{ze()},oe.reconnectDelay))}function qt(n){console.error("[DevTools WebSocket] Error:",n)}function ze(){if(!He()||O.value==="connecting"||O.value==="connected"||q&&(q.readyState===WebSocket.CONNECTING||q.readyState===WebSocket.OPEN))return;Ue(),O.value="connecting";const n=Dt(oe.path);try{q=new WebSocket(n),q.onopen=Mt,q.onmessage=zt,q.onclose=It,q.onerror=qt}catch(t){console.error("[DevTools WebSocket] Failed to create WebSocket:",t),O.value="disconnected"}}function Ue(){q&&(q.onopen=null,q.onmessage=null,q.onclose=null,q.onerror=null,(q.readyState===WebSocket.OPEN||q.readyState===WebSocket.CONNECTING)&&q.close(),q=null)}function Qe(){je(),Ue(),O.value="disconnected",ae.value=0}function Ft(n){if(!q||q.readyState!==WebSocket.OPEN)return!1;try{return q.send(JSON.stringify(n)),!0}catch(t){return console.error("[DevTools WebSocket] Failed to send command:",t),!1}}function Ie(n,t){J.has(n)||J.set(n,new Set);const l=J.get(n);return l&&l.add(t),()=>{const a=J.get(n);a&&(a.delete(t),a.size===0&&J.delete(n))}}function qe(n,t){const l=J.get(n);l&&(l.delete(t),l.size===0&&J.delete(n))}function Lt(n,t){const l=a=>{qe(n,l),t(a)};return Ie(n,l)}function At(n,t){const l=a=>{t(a)===!0&&qe(n,l)};return Ie(n,l)}function Rt(){Qe(),Te.value=null,J.clear(),oe={...De},Me=!1}function re(n={}){(!Me||O.value==="disconnected")&&(oe={...De,...n},Me=!0);const t=e.computed(()=>O.value==="connected"),l=e.computed(()=>O.value==="reconnecting");return wt()&&e.onMounted(()=>{oe.autoConnect&&ze()}),{connectionState:e.computed(()=>O.value),connected:t,isReconnecting:l,serverVersion:e.computed(()=>Te.value),reconnectAttempts:e.computed(()=>ae.value),connect:ze,disconnect:Qe,send:Ft,on:Ie,off:qe,once:Lt,onUntil:At,resetState:Rt}}let Je=!1,We=null;function Ge(){if(Je)return We;const n=e.createApp(Vt),t=W.createPinia();return n.use(t),n.use(dt),n.mount("#app"),Je=!0,We=n,n}typeof window<"u"&&document.getElementById("app")&&Ge();function ke(n){return n.toUpperCase()}const Ot={class:"endpoint-detail"},Pt={key:0,class:"endpoint-detail__empty"},Ht={key:1,class:"endpoint-detail__content"},jt={class:"endpoint-detail__header"},Ut={class:"endpoint-detail__path font-mono"},Qt={class:"endpoint-detail__status"},Jt={key:0,class:"endpoint-detail__status-item endpoint-detail__status-item--handler"},Wt={key:1,class:"endpoint-detail__status-item endpoint-detail__status-item--seed"},Gt={key:2,class:"endpoint-detail__status-item endpoint-detail__status-item--security"},Kt={key:3,class:"endpoint-detail__status-item endpoint-detail__status-item--auto"},Zt={class:"endpoint-detail__sections"},Yt={class:"endpoint-detail__section"},Xt={class:"endpoint-detail__section-content font-mono"},vt={key:0,class:"endpoint-detail__section"},en={class:"endpoint-detail__section-title"},tn={class:"endpoint-detail__tags"},nn={key:1,class:"endpoint-detail__section"},on={class:"endpoint-detail__section-content"},sn={key:2,class:"endpoint-detail__section"},ln={class:"endpoint-detail__section-content endpoint-detail__description"},an={key:3,class:"endpoint-detail__section"},rn={class:"endpoint-detail__section-title"},cn={class:"endpoint-detail__section-content font-mono"},dn={key:4,class:"endpoint-detail__section"},mn={class:"endpoint-detail__section-title"},pn={class:"endpoint-detail__security"},un={class:"endpoint-detail__security-name font-mono"},fn={class:"endpoint-detail__security-scopes text-muted"},hn=Q(e.defineComponent({__name:"EndpointDetail",props:{endpoint:{}},setup(n){const t=n,l=e.computed(()=>t.endpoint?.security&&t.endpoint.security.length>0),a=e.computed(()=>t.endpoint?.security?t.endpoint.security.map(m=>({name:m.name,scopes:m.scopes.length>0?m.scopes.join(", "):"No scopes"})):[]);return(m,o)=>(e.openBlock(),e.createElementBlock("div",Ot,[n.endpoint?(e.openBlock(),e.createElementBlock("div",Ht,[e.createElementVNode("header",jt,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge","method-badge--large",`method-badge--${n.endpoint.method}`])},e.toDisplayString(e.unref(ke)(n.endpoint.method)),3),e.createElementVNode("h2",Ut,e.toDisplayString(n.endpoint.path),1)]),e.createElementVNode("div",Qt,[n.endpoint.hasHandler?(e.openBlock(),e.createElementBlock("div",Jt,[e.createVNode(e.unref(Ne),{size:14}),o[2]||(o[2]=e.createElementVNode("span",null,"Has custom handler",-1))])):e.createCommentVNode("",!0),n.endpoint.hasSeed?(e.openBlock(),e.createElementBlock("div",Wt,[e.createVNode(e.unref(Be),{size:14}),o[3]||(o[3]=e.createElementVNode("span",null,"Has seed data",-1))])):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",Gt,[e.createVNode(e.unref(nt),{size:14}),o[4]||(o[4]=e.createElementVNode("span",null,"Requires authentication",-1))])):e.createCommentVNode("",!0),!n.endpoint.hasHandler&&!n.endpoint.hasSeed?(e.openBlock(),e.createElementBlock("div",Kt,[e.createVNode(e.unref(Se),{size:14}),o[5]||(o[5]=e.createElementVNode("span",null,"Auto-generated response",-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Zt,[e.createElementVNode("section",Yt,[o[6]||(o[6]=e.createElementVNode("h3",{class:"endpoint-detail__section-title"},"Operation",-1)),e.createElementVNode("p",Xt,e.toDisplayString(n.endpoint.operationId),1)]),n.endpoint.tags.length>0?(e.openBlock(),e.createElementBlock("section",vt,[e.createElementVNode("h3",en,[e.createVNode(e.unref(rt),{size:14}),o[7]||(o[7]=e.createTextVNode(" Tags ",-1))]),e.createElementVNode("div",tn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.endpoint.tags,p=>(e.openBlock(),e.createElementBlock("span",{key:p,class:"endpoint-detail__tag"},e.toDisplayString(p),1))),128))])])):e.createCommentVNode("",!0),n.endpoint.summary?(e.openBlock(),e.createElementBlock("section",nn,[o[8]||(o[8]=e.createElementVNode("h3",{class:"endpoint-detail__section-title"},"Summary",-1)),e.createElementVNode("p",on,e.toDisplayString(n.endpoint.summary),1)])):e.createCommentVNode("",!0),n.endpoint.description?(e.openBlock(),e.createElementBlock("section",sn,[o[9]||(o[9]=e.createElementVNode("h3",{class:"endpoint-detail__section-title"},"Description",-1)),e.createElementVNode("p",ln,e.toDisplayString(n.endpoint.description),1)])):e.createCommentVNode("",!0),n.endpoint.responseSchema?(e.openBlock(),e.createElementBlock("section",an,[e.createElementVNode("h3",rn,[e.createVNode(e.unref(Se),{size:14}),o[10]||(o[10]=e.createTextVNode(" Response Schema ",-1))]),e.createElementVNode("p",cn,e.toDisplayString(n.endpoint.responseSchema),1)])):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("section",dn,[e.createElementVNode("h3",mn,[e.createVNode(e.unref(at),{size:14}),o[11]||(o[11]=e.createTextVNode(" Security ",-1))]),e.createElementVNode("div",pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,p=>(e.openBlock(),e.createElementBlock("div",{key:p.name,class:"endpoint-detail__security-item"},[e.createElementVNode("span",un,e.toDisplayString(p.name),1),e.createElementVNode("span",fn,e.toDisplayString(p.scopes),1)]))),128))])])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",Pt,[e.createVNode(e.unref(Se),{size:48,class:"endpoint-detail__empty-icon"}),o[0]||(o[0]=e.createElementVNode("h3",{class:"endpoint-detail__empty-title"},"No endpoint selected",-1)),o[1]||(o[1]=e.createElementVNode("p",{class:"endpoint-detail__empty-text text-muted"}," Select an endpoint from the list to view its details ",-1))]))]))}}),[["__scopeId","data-v-c66a0f52"]]),yn={class:"endpoint-list"},_n={key:0,class:"endpoint-list__empty"},gn={key:1,class:"endpoint-list__groups"},kn=["aria-expanded","aria-controls","onClick"],En={class:"endpoint-group__tag"},Nn={class:"endpoint-group__count text-muted"},Vn=["id","aria-label"],bn=["aria-selected","onClick"],Sn={class:"endpoint-item__path font-mono"},Cn={class:"endpoint-item__indicators"},Bn={key:0,class:"endpoint-item__indicator endpoint-item__indicator--handler",title:"Has custom handler"},$n={key:1,class:"endpoint-item__indicator endpoint-item__indicator--seed",title:"Has seed data"},xn=Q(e.defineComponent({__name:"EndpointList",props:{groups:{},selectedKey:{}},emits:["select","toggle-group"],setup(n,{emit:t}){const l=n,a=t;function m(g){a("select",g.key)}function o(g){a("toggle-group",g)}function p(g){return l.selectedKey===g.key}return(g,y)=>(e.openBlock(),e.createElementBlock("div",yn,[n.groups.length===0?(e.openBlock(),e.createElementBlock("div",_n,[...y[0]||(y[0]=[e.createElementVNode("p",{class:"text-muted"},"No endpoints found",-1)])])):(e.openBlock(),e.createElementBlock("div",gn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.groups,d=>(e.openBlock(),e.createElementBlock("div",{key:d.tag,class:"endpoint-group"},[e.createElementVNode("button",{type:"button",class:"endpoint-group__header","aria-expanded":d.isExpanded,"aria-controls":`group-${d.tag}`,onClick:V=>o(d.tag)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.isExpanded?e.unref(X):e.unref(te)),{size:16,class:"endpoint-group__chevron"})),e.createElementVNode("span",En,e.toDisplayString(d.tag),1),e.createElementVNode("span",Nn," ("+e.toDisplayString(d.endpoints.length)+") ",1)],8,kn),e.withDirectives(e.createElementVNode("div",{id:`group-${d.tag}`,class:"endpoint-group__items",role:"group","aria-label":`${d.tag} endpoints`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.endpoints,V=>(e.openBlock(),e.createElementBlock("button",{key:V.key,type:"button",class:e.normalizeClass(["endpoint-item",{"endpoint-item--selected":p(V)}]),"aria-selected":p(V),onClick:$=>m(V)},[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${V.method}`])},e.toDisplayString(e.unref(ke)(V.method)),3),e.createElementVNode("span",Sn,e.toDisplayString(V.path),1),e.createElementVNode("div",Cn,[V.hasHandler?(e.openBlock(),e.createElementBlock("span",Bn,[e.createVNode(e.unref(Ne),{size:12})])):e.createCommentVNode("",!0),V.hasSeed?(e.openBlock(),e.createElementBlock("span",$n,[e.createVNode(e.unref(Be),{size:12})])):e.createCommentVNode("",!0)])],10,bn))),128))],8,Vn),[[e.vShow,d.isExpanded]])]))),128))]))]))}}),[["__scopeId","data-v-554ffe63"]]),wn={class:"routes-page"},Dn={class:"routes-toolbar"},Tn={class:"routes-search"},Mn=["value"],zn=["aria-expanded"],In={key:0,class:"routes-filter-toggle__badge"},qn={class:"routes-stats"},Fn={class:"routes-stats__item"},Ln={class:"routes-stats__item"},An={key:0,class:"routes-filters"},Rn={class:"routes-filters__section"},On={class:"routes-filters__methods"},Pn=["onClick"],Hn={class:"routes-filters__section"},jn={class:"routes-filters__status"},Un={key:0,class:"routes-filters__actions"},Qn={class:"routes-content"},Jn={key:0,class:"routes-loading"},Wn={key:1,class:"routes-error"},Gn={class:"routes-error__message"},Kn={key:2,class:"routes-empty empty-state"},Zn={key:3,class:"routes-empty empty-state"},Yn={class:"routes-list-panel"},Xn={class:"routes-detail-panel"},vn=Object.freeze(Object.defineProperty({__proto__:null,default:Q(e.defineComponent({__name:"RoutesPage",setup(n){const t=Oe(),{send:l,on:a,connected:m}=re(),o=e.ref(!1),p=e.ref(null),g=["get","post","put","patch","delete","options","head","trace"];function y(){m.value&&(t.setLoading(!0),l({type:"get:registry"}))}function d(b){t.setRegistryData(b),t.setLoading(!1)}function V(b){t.selectEndpoint(b)}function $(b){t.toggleGroup(b)}function B(b){const S=b.target;t.setSearchQuery(S.value)}function x(){t.setSearchQuery(""),p.value?.focus()}function F(b){t.toggleMethodFilter(b)}function C(b){return t.filter.methods.includes(b)}function u(){const b=t.filter.hasHandler;t.setHandlerFilter(b===!0?null:!0)}function s(){const b=t.filter.hasSeed;t.setSeedFilter(b===!0?null:!0)}function N(){t.clearFilters()}function D(){o.value=!o.value}const L=e.computed(()=>t.hasActiveFilters());let k=null,r=null,f=null;return e.onMounted(()=>{k=a("registry",d),r=a("handlers:updated",()=>y()),f=a("seeds:updated",()=>y()),m.value&&y()}),e.onUnmounted(()=>{k?.(),r?.(),f?.()}),e.watch(m,b=>{b&&y()}),(b,S)=>(e.openBlock(),e.createElementBlock("div",wn,[e.createElementVNode("div",Dn,[e.createElementVNode("div",Tn,[e.createVNode(e.unref(pe),{size:16,class:"routes-search__icon"}),e.createElementVNode("input",{ref_key:"searchInputRef",ref:p,type:"text",class:"routes-search__input input",placeholder:"Search endpoints...",value:e.unref(t).searchQuery,onInput:B},null,40,Mn),e.unref(t).searchQuery?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"routes-search__clear btn btn--ghost btn--icon",title:"Clear search",onClick:x},[e.createVNode(e.unref(le),{size:14})])):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["routes-filter-toggle btn btn--secondary",{"routes-filter-toggle--active":L.value}]),"aria-expanded":o.value,onClick:D},[e.createVNode(e.unref(Ae),{size:16}),S[0]||(S[0]=e.createElementVNode("span",null,"Filters",-1)),L.value?(e.openBlock(),e.createElementBlock("span",In,e.toDisplayString(e.unref(t).filter.methods.length+(e.unref(t).filter.hasHandler?1:0)+(e.unref(t).filter.hasSeed?1:0)),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value?e.unref(Le):e.unref(X)),{size:14}))],10,zn),e.createElementVNode("div",qn,[e.createElementVNode("span",Fn,e.toDisplayString(e.unref(t).filteredEndpoints.length)+" endpoints ",1),S[1]||(S[1]=e.createElementVNode("span",{class:"routes-stats__separator"},"|",-1)),e.createElementVNode("span",Ln,e.toDisplayString(e.unref(t).allTags.length)+" tags ",1)])]),o.value?(e.openBlock(),e.createElementBlock("div",An,[e.createElementVNode("div",Rn,[S[2]||(S[2]=e.createElementVNode("h4",{class:"routes-filters__title"},"Methods",-1)),e.createElementVNode("div",On,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(g,A=>e.createElementVNode("button",{key:A,type:"button",class:e.normalizeClass(["method-badge",`method-badge--${A}`,{"method-badge--inactive":!C(A)&&e.unref(t).filter.methods.length>0}]),onClick:h=>F(A)},e.toDisplayString(A.toUpperCase()),11,Pn)),64))])]),e.createElementVNode("div",Hn,[S[5]||(S[5]=e.createElementVNode("h4",{class:"routes-filters__title"},"Status",-1)),e.createElementVNode("div",jn,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["routes-filters__status-btn",{"routes-filters__status-btn--active":e.unref(t).filter.hasHandler}]),onClick:u},[e.createVNode(e.unref(Ne),{size:14}),S[3]||(S[3]=e.createElementVNode("span",null,"Has Handler",-1))],2),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["routes-filters__status-btn",{"routes-filters__status-btn--active":e.unref(t).filter.hasSeed}]),onClick:s},[e.createVNode(e.unref(Be),{size:14}),S[4]||(S[4]=e.createElementVNode("span",null,"Has Seed",-1))],2)])]),L.value?(e.openBlock(),e.createElementBlock("div",Un,[e.createElementVNode("button",{type:"button",class:"btn btn--ghost",onClick:N},[e.createVNode(e.unref(le),{size:14}),S[6]||(S[6]=e.createTextVNode(" Clear all filters ",-1))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Qn,[e.unref(t).isLoading?(e.openBlock(),e.createElementBlock("div",Jn,[...S[7]||(S[7]=[e.createElementVNode("div",{class:"routes-loading__spinner"},null,-1),e.createElementVNode("span",{class:"text-muted"},"Loading endpoints...",-1)])])):e.unref(t).error?(e.openBlock(),e.createElementBlock("div",Wn,[e.createElementVNode("p",Gn,e.toDisplayString(e.unref(t).error),1),e.createElementVNode("button",{type:"button",class:"btn btn--primary",onClick:y}," Retry ")])):e.unref(t).endpoints.length===0?(e.openBlock(),e.createElementBlock("div",Kn,[e.createVNode(e.unref(Ce),{size:48,class:"empty-state__icon"}),S[8]||(S[8]=e.createElementVNode("h3",{class:"empty-state__title"},"No endpoints found",-1)),S[9]||(S[9]=e.createElementVNode("p",{class:"empty-state__description"}," No API endpoints are available. Make sure your OpenAPI spec is loaded. ",-1))])):e.unref(t).filteredEndpoints.length===0?(e.openBlock(),e.createElementBlock("div",Zn,[e.createVNode(e.unref(pe),{size:48,class:"empty-state__icon"}),S[10]||(S[10]=e.createElementVNode("h3",{class:"empty-state__title"},"No matching endpoints",-1)),S[11]||(S[11]=e.createElementVNode("p",{class:"empty-state__description"}," Try adjusting your search or filters. ",-1)),L.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn--secondary",onClick:N}," Clear filters ")):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",Yn,[e.createVNode(xn,{groups:e.unref(t).groupedEndpoints,"selected-key":e.unref(t).selectedEndpointKey,onSelect:V,onToggleGroup:$},null,8,["groups","selected-key"])]),e.createElementVNode("div",Xn,[e.createVNode(hn,{endpoint:e.unref(t).selectedEndpoint},null,8,["endpoint"])])],64))])]))}}),[["__scopeId","data-v-bdd419e3"]])},Symbol.toStringTag,{value:"Module"})),eo={class:"timeline-detail"},to={key:0,class:"timeline-detail__empty"},no={key:1,class:"timeline-detail__content"},oo={class:"timeline-detail__header"},so={class:"timeline-detail__summary"},lo={class:"timeline-detail__path font-mono"},ao={class:"timeline-detail__meta"},ro={key:1,class:"status-badge status-badge--pending"},io={class:"timeline-detail__duration"},co={key:2,class:"timeline-detail__simulated",title:"Simulated response"},mo={class:"timeline-detail__actions"},po={class:"timeline-detail__info"},uo={class:"timeline-detail__info-item"},fo={class:"timeline-detail__info-value font-mono"},ho={class:"timeline-detail__info-item"},yo={class:"timeline-detail__info-value font-mono"},_o={class:"timeline-detail__info-item"},go={class:"timeline-detail__info-value font-mono"},ko={class:"timeline-detail__section"},Eo={key:0,class:"timeline-detail__subsection"},No=["aria-expanded"],Vo={class:"text-muted"},bo={id:"requestQuery-panel",class:"timeline-detail__subsection-content"},So={class:"timeline-detail__kv-key font-mono"},Co={class:"timeline-detail__kv-value font-mono"},Bo={key:1,class:"timeline-detail__subsection"},$o=["aria-expanded"],xo={class:"text-muted"},wo={id:"requestHeaders-panel",class:"timeline-detail__subsection-content"},Do={class:"timeline-detail__kv-key font-mono"},To={class:"timeline-detail__kv-value font-mono"},Mo={key:2,class:"timeline-detail__subsection"},zo={class:"timeline-detail__subsection-header",role:"group"},Io=["aria-expanded"],qo={id:"requestBody-panel",class:"timeline-detail__subsection-content"},Fo={class:"timeline-detail__json"},Lo={key:0,class:"timeline-detail__section"},Ao={key:0,class:"timeline-detail__subsection"},Ro=["aria-expanded"],Oo={class:"text-muted"},Po={id:"responseHeaders-panel",class:"timeline-detail__subsection-content"},Ho={class:"timeline-detail__kv-key font-mono"},jo={class:"timeline-detail__kv-value font-mono"},Uo={key:1,class:"timeline-detail__subsection"},Qo={class:"timeline-detail__subsection-header",role:"group"},Jo=["aria-expanded"],Wo={id:"responseBody-panel",class:"timeline-detail__subsection-content"},Go={class:"timeline-detail__json"},Ko={key:1,class:"timeline-detail__section timeline-detail__section--pending"},Zo={class:"timeline-detail__pending"},Yo=Q(e.defineComponent({__name:"TimelineDetail",props:{entry:{}},setup(n){const t=n,l=e.ref({requestHeaders:!0,requestQuery:!0,requestBody:!0,responseHeaders:!0,responseBody:!0}),a=e.ref(null),m=e.computed(()=>t.entry?new Date(t.entry.request.timestamp).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1}):""),o=e.computed(()=>t.entry?.duration==null?"pending...":t.entry.duration<1e3?`${t.entry.duration}ms`:`${(t.entry.duration/1e3).toFixed(2)}s`),p=e.computed(()=>t.entry?.status?t.entry.status<200?"status-badge--1xx":t.entry.status<300?"status-badge--2xx":t.entry.status<400?"status-badge--3xx":t.entry.status<500?"status-badge--4xx":"status-badge--5xx":"status-badge--pending"),g=e.computed(()=>t.entry?.request.query?Object.keys(t.entry.request.query).length>0:!1),y=e.computed(()=>t.entry?.request.headers?Object.keys(t.entry.request.headers).length>0:!1),d=e.computed(()=>t.entry?.request.body!==void 0&&t.entry?.request.body!==null),V=e.computed(()=>t.entry?.response?.headers?Object.keys(t.entry.response.headers).length>0:!1),$=e.computed(()=>t.entry?.response?.body!==void 0&&t.entry?.response?.body!==null);function B(u){try{return JSON.stringify(u,null,2)}catch{return String(u)}}function x(u){l.value[u]=!l.value[u]}async function F(u,s){try{await navigator.clipboard.writeText(u),a.value=s,setTimeout(()=>{a.value=null},2e3)}catch(N){console.error("Failed to copy:",N)}}async function C(){if(!t.entry)return;const u={request:t.entry.request,response:t.entry.response};await F(JSON.stringify(u,null,2),"full")}return(u,s)=>(e.openBlock(),e.createElementBlock("div",eo,[n.entry?(e.openBlock(),e.createElementBlock("div",no,[e.createElementVNode("div",oo,[e.createElementVNode("div",so,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${n.entry.request.method.toLowerCase()}`])},e.toDisplayString(e.unref(ke)(n.entry.request.method)),3),e.createElementVNode("span",lo,e.toDisplayString(n.entry.request.path),1)]),e.createElementVNode("div",ao,[n.entry.status!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["status-badge",p.value])},e.toDisplayString(n.entry.status),3)):(e.openBlock(),e.createElementBlock("span",ro,"pending")),e.createElementVNode("span",io,[e.createVNode(e.unref(G),{size:14}),e.createTextVNode(" "+e.toDisplayString(o.value),1)]),n.entry.simulated?(e.openBlock(),e.createElementBlock("span",co,[e.createVNode(e.unref(ne),{size:14}),s[9]||(s[9]=e.createTextVNode(" Simulated ",-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",mo,[e.createElementVNode("button",{type:"button",class:"btn btn--ghost btn--sm",title:"Copy as JSON",onClick:C},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value==="full"?e.unref(me):e.unref(Ve)),{size:14})),e.createTextVNode(" "+e.toDisplayString(a.value==="full"?"Copied!":"Copy JSON"),1)])])]),e.createElementVNode("div",po,[e.createElementVNode("div",uo,[s[10]||(s[10]=e.createElementVNode("span",{class:"timeline-detail__info-label"},"Timestamp",-1)),e.createElementVNode("span",fo,e.toDisplayString(m.value),1)]),e.createElementVNode("div",ho,[s[11]||(s[11]=e.createElementVNode("span",{class:"timeline-detail__info-label"},"Operation ID",-1)),e.createElementVNode("span",yo,e.toDisplayString(n.entry.request.operationId),1)]),e.createElementVNode("div",_o,[s[12]||(s[12]=e.createElementVNode("span",{class:"timeline-detail__info-label"},"Request ID",-1)),e.createElementVNode("span",go,e.toDisplayString(n.entry.id),1)])]),e.createElementVNode("div",ko,[s[16]||(s[16]=e.createElementVNode("h3",{class:"timeline-detail__section-title"},"Request",-1)),g.value?(e.openBlock(),e.createElementBlock("div",Eo,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-header","aria-expanded":l.value.requestQuery,"aria-controls":"requestQuery-panel",onClick:s[0]||(s[0]=N=>x("requestQuery"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value.requestQuery?e.unref(X):e.unref(te)),{size:16})),s[13]||(s[13]=e.createElementVNode("span",null,"Query Parameters",-1)),e.createElementVNode("span",Vo,"("+e.toDisplayString(Object.keys(n.entry.request.query).length)+")",1)],8,No),e.withDirectives(e.createElementVNode("div",bo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entry.request.query,(N,D)=>(e.openBlock(),e.createElementBlock("div",{key:D,class:"timeline-detail__kv-row"},[e.createElementVNode("span",So,e.toDisplayString(D),1),e.createElementVNode("span",Co,e.toDisplayString(Array.isArray(N)?N.join(", "):N),1)]))),128))],512),[[e.vShow,l.value.requestQuery]])])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("div",Bo,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-header","aria-expanded":l.value.requestHeaders,"aria-controls":"requestHeaders-panel",onClick:s[1]||(s[1]=N=>x("requestHeaders"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value.requestHeaders?e.unref(X):e.unref(te)),{size:16})),s[14]||(s[14]=e.createElementVNode("span",null,"Headers",-1)),e.createElementVNode("span",xo,"("+e.toDisplayString(Object.keys(n.entry.request.headers).length)+")",1)],8,$o),e.withDirectives(e.createElementVNode("div",wo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entry.request.headers,(N,D)=>(e.openBlock(),e.createElementBlock("div",{key:D,class:"timeline-detail__kv-row"},[e.createElementVNode("span",Do,e.toDisplayString(D),1),e.createElementVNode("span",To,e.toDisplayString(N),1)]))),128))],512),[[e.vShow,l.value.requestHeaders]])])):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("div",Mo,[e.createElementVNode("div",zo,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-toggle","aria-expanded":l.value.requestBody,"aria-controls":"requestBody-panel",onClick:s[2]||(s[2]=N=>x("requestBody"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value.requestBody?e.unref(X):e.unref(te)),{size:16})),s[15]||(s[15]=e.createElementVNode("span",null,"Body",-1))],8,Io),e.createElementVNode("button",{type:"button",class:"btn btn--ghost btn--icon btn--sm",title:"Copy body",onClick:s[3]||(s[3]=e.withModifiers(N=>F(B(n.entry.request.body),"reqBody"),["stop"]))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value==="reqBody"?e.unref(me):e.unref(Ve)),{size:12}))])]),e.withDirectives(e.createElementVNode("div",qo,[e.createElementVNode("pre",Fo,e.toDisplayString(B(n.entry.request.body)),1)],512),[[e.vShow,l.value.requestBody]])])):e.createCommentVNode("",!0)]),n.entry.response?(e.openBlock(),e.createElementBlock("div",Lo,[s[19]||(s[19]=e.createElementVNode("h3",{class:"timeline-detail__section-title"},"Response",-1)),V.value?(e.openBlock(),e.createElementBlock("div",Ao,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-header","aria-expanded":l.value.responseHeaders,"aria-controls":"responseHeaders-panel",onClick:s[4]||(s[4]=N=>x("responseHeaders"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value.responseHeaders?e.unref(X):e.unref(te)),{size:16})),s[17]||(s[17]=e.createElementVNode("span",null,"Headers",-1)),e.createElementVNode("span",Oo,"("+e.toDisplayString(Object.keys(n.entry.response.headers).length)+")",1)],8,Ro),e.withDirectives(e.createElementVNode("div",Po,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.entry.response.headers,(N,D)=>(e.openBlock(),e.createElementBlock("div",{key:D,class:"timeline-detail__kv-row"},[e.createElementVNode("span",Ho,e.toDisplayString(D),1),e.createElementVNode("span",jo,e.toDisplayString(N),1)]))),128))],512),[[e.vShow,l.value.responseHeaders]])])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("div",Uo,[e.createElementVNode("div",Qo,[e.createElementVNode("button",{type:"button",class:"timeline-detail__subsection-toggle","aria-expanded":l.value.responseBody,"aria-controls":"responseBody-panel",onClick:s[5]||(s[5]=N=>x("responseBody"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value.responseBody?e.unref(X):e.unref(te)),{size:16})),s[18]||(s[18]=e.createElementVNode("span",null,"Body",-1))],8,Jo),e.createElementVNode("button",{type:"button",class:"btn btn--ghost btn--icon btn--sm",title:"Copy body",onClick:s[6]||(s[6]=e.withModifiers(N=>F(B(n.entry.response.body),"resBody"),["stop"]))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value==="resBody"?e.unref(me):e.unref(Ve)),{size:12}))])]),e.withDirectives(e.createElementVNode("div",Wo,[e.createElementVNode("pre",Go,e.toDisplayString(B(n.entry.response.body)),1)],512),[[e.vShow,l.value.responseBody]])])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Ko,[s[21]||(s[21]=e.createElementVNode("h3",{class:"timeline-detail__section-title"},"Response",-1)),e.createElementVNode("div",Zo,[e.createVNode(e.unref(G),{size:24,class:"timeline-detail__pending-icon"}),s[20]||(s[20]=e.createElementVNode("span",{class:"text-muted"},"Waiting for response...",-1))])]))])):(e.openBlock(),e.createElementBlock("div",to,[e.createVNode(e.unref(G),{size:48,class:"timeline-detail__empty-icon"}),s[7]||(s[7]=e.createElementVNode("h3",{class:"timeline-detail__empty-title"},"Select an entry",-1)),s[8]||(s[8]=e.createElementVNode("p",{class:"timeline-detail__empty-description"}," Click on a timeline entry to view its details. ",-1))]))]))}}),[["__scopeId","data-v-b4bdd2d2"]]),Xo={class:"timeline-entry__time font-mono text-muted"},vo={class:"timeline-entry__method"},es={class:"timeline-entry__path font-mono"},ts={class:"timeline-entry__status"},ns={key:1,class:"status-badge status-badge--pending"},os={class:"timeline-entry__duration font-mono text-muted"},ss={key:0,class:"timeline-entry__simulated",title:"Simulated response"},ls=Q(e.defineComponent({__name:"TimelineEntry",props:{entry:{},isSelected:{type:Boolean,default:!1}},emits:["select"],setup(n,{emit:t}){const l=n,a=t,m=e.computed(()=>new Date(l.entry.request.timestamp).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})),o=e.computed(()=>l.entry.duration===null?"pending...":l.entry.duration<1e3?`${l.entry.duration}ms`:`${(l.entry.duration/1e3).toFixed(2)}s`),p=e.computed(()=>l.entry.status===null?"status-badge--pending":l.entry.status<200?"status-badge--1xx":l.entry.status<300?"status-badge--2xx":l.entry.status<400?"status-badge--3xx":l.entry.status<500?"status-badge--4xx":"status-badge--5xx"),g=e.computed(()=>l.entry.status===null?G:l.entry.status<400?tt:$e),y=e.computed(()=>l.entry.response===null);function d(){a("select",l.entry.id)}return(V,$)=>(e.openBlock(),e.createElementBlock("button",{type:"button",class:e.normalizeClass(["timeline-entry",{"timeline-entry--selected":n.isSelected},{"timeline-entry--pending":y.value},{"timeline-entry--simulated":n.entry.simulated}]),onClick:d},[e.createElementVNode("div",Xo,e.toDisplayString(m.value),1),e.createElementVNode("div",vo,[e.createElementVNode("span",{class:e.normalizeClass(["method-badge",`method-badge--${n.entry.request.method.toLowerCase()}`])},e.toDisplayString(e.unref(ke)(n.entry.request.method)),3)]),e.createElementVNode("div",es,e.toDisplayString(n.entry.request.path),1),e.createElementVNode("div",ts,[n.entry.status!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["status-badge",p.value])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.value),{size:12})),e.createTextVNode(" "+e.toDisplayString(n.entry.status),1)],2)):(e.openBlock(),e.createElementBlock("span",ns,[e.createVNode(e.unref(G),{size:12}),$[0]||($[0]=e.createTextVNode(" pending ",-1))]))]),e.createElementVNode("div",os,e.toDisplayString(o.value),1),n.entry.simulated?(e.openBlock(),e.createElementBlock("div",ss,[e.createVNode(e.unref(ne),{size:14})])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-a073dbdf"]]),as={class:"timeline-page"},rs={class:"timeline-toolbar"},is={class:"timeline-search"},cs=["value"],ds=["aria-expanded"],ms={key:0,class:"timeline-filter-toggle__badge"},ps={class:"timeline-stats"},us={class:"timeline-stats__item"},fs={key:0,class:"timeline-stats__separator"},hs={key:1,class:"timeline-stats__item"},ys=["disabled"],_s={key:0,class:"timeline-filters"},gs={class:"timeline-filters__section"},ks={class:"timeline-filters__methods"},Es=["onClick"],Ns={class:"timeline-filters__section"},Vs={class:"timeline-filters__status"},bs=["onClick"],Ss={class:"timeline-filters__status-count"},Cs={class:"timeline-filters__section"},Bs={class:"timeline-filters__type"},$s={key:0,class:"timeline-filters__actions"},xs={class:"timeline-content"},ws={key:0,class:"timeline-loading"},Ds={key:1,class:"timeline-error"},Ts={class:"timeline-error__message"},Ms={key:2,class:"timeline-empty empty-state"},zs={key:3,class:"timeline-empty empty-state"},Is={class:"timeline-list-panel"},qs={class:"timeline-list"},Fs={class:"timeline-detail-panel"},Ls=Object.freeze(Object.defineProperty({__proto__:null,default:Q(e.defineComponent({__name:"TimelinePage",setup(n){const t=Ct(),{send:l,on:a,connected:m}=re(),o=e.ref(!1),p=e.ref(null),g=["GET","POST","PUT","PATCH","DELETE","OPTIONS","HEAD","TRACE"],y=["2xx","3xx","4xx","5xx"];function d(){m.value&&(t.setLoading(!0),l({type:"get:timeline"}))}function V(I){t.setTimelineData(I),t.setLoading(!1)}function $(I){t.addRequest(I)}function B(I){t.addResponse(I)}function x(){t.clearTimeline()}function F(){l({type:"clear:timeline"}),t.clearTimeline()}function C(I){t.selectEntry(I)}function u(I){const i=I.target;t.setSearchQuery(i.value)}function s(){t.setSearchQuery(""),p.value?.focus()}function N(I){t.toggleMethodFilter(I)}function D(I){return t.filter.methods.includes(I)}function L(I){t.toggleStatusFilter(I)}function k(I){return t.filter.statusCodes.includes(I)}function r(){const I=t.filter.simulatedOnly;t.setSimulatedFilter(I===!0?null:!0)}function f(){t.clearFilters()}function b(){o.value=!o.value}const S=e.computed(()=>t.hasActiveFilters()),A=e.computed(()=>t.filter.methods.length+t.filter.statusCodes.length+(t.filter.simulatedOnly!==null?1:0));let h=null,T=null,R=null,H=null;return e.onMounted(()=>{h=a("timeline",V),T=a("request",$),R=a("response",B),H=a("timeline:cleared",x),m.value&&d()}),e.onUnmounted(()=>{h?.(),T?.(),R?.(),H?.()}),e.watch(m,I=>{I&&d()}),(I,i)=>(e.openBlock(),e.createElementBlock("div",as,[e.createElementVNode("div",rs,[e.createElementVNode("div",is,[e.createVNode(e.unref(pe),{size:16,class:"timeline-search__icon"}),e.createElementVNode("input",{ref_key:"searchInputRef",ref:p,type:"text",class:"timeline-search__input input",placeholder:"Search by path or operation...",value:e.unref(t).filter.searchQuery,onInput:u},null,40,cs),e.unref(t).filter.searchQuery?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"timeline-search__clear btn btn--ghost btn--icon",title:"Clear search",onClick:s},[e.createVNode(e.unref(le),{size:14})])):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["timeline-filter-toggle btn btn--secondary",{"timeline-filter-toggle--active":S.value}]),"aria-expanded":o.value,onClick:b},[e.createVNode(e.unref(Ae),{size:16}),i[0]||(i[0]=e.createElementVNode("span",null,"Filters",-1)),A.value>0?(e.openBlock(),e.createElementBlock("span",ms,e.toDisplayString(A.value),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value?e.unref(Le):e.unref(X)),{size:14}))],10,ds),e.createElementVNode("div",ps,[e.createElementVNode("span",us,e.toDisplayString(e.unref(t).filteredEntries.length)+" requests ",1),e.unref(t).averageDuration>0?(e.openBlock(),e.createElementBlock("span",fs,"|")):e.createCommentVNode("",!0),e.unref(t).averageDuration>0?(e.openBlock(),e.createElementBlock("span",hs," avg "+e.toDisplayString(e.unref(t).averageDuration)+"ms ",1)):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:"btn btn--secondary btn--icon",title:"Clear timeline",disabled:e.unref(t).entries.length===0,onClick:F},[e.createVNode(e.unref(ue),{size:16})],8,ys)]),o.value?(e.openBlock(),e.createElementBlock("div",_s,[e.createElementVNode("div",gs,[i[1]||(i[1]=e.createElementVNode("h4",{class:"timeline-filters__title"},"Methods",-1)),e.createElementVNode("div",ks,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(g,_=>e.createElementVNode("button",{key:_,type:"button",class:e.normalizeClass(["method-badge",`method-badge--${_.toLowerCase()}`,{"method-badge--inactive":!D(_)&&e.unref(t).filter.methods.length>0}]),onClick:w=>N(_)},e.toDisplayString(_),11,Es)),64))])]),e.createElementVNode("div",Ns,[i[2]||(i[2]=e.createElementVNode("h4",{class:"timeline-filters__title"},"Status",-1)),e.createElementVNode("div",Vs,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(y,_=>e.createElementVNode("button",{key:_,type:"button",class:e.normalizeClass(["timeline-filters__status-btn",`timeline-filters__status-btn--${_}`,{"timeline-filters__status-btn--active":k(_)}]),onClick:w=>L(_)},[e.createTextVNode(e.toDisplayString(_)+" ",1),e.createElementVNode("span",Ss," ("+e.toDisplayString(e.unref(t).statusCounts[_])+") ",1)],10,bs)),64))])]),e.createElementVNode("div",Cs,[i[3]||(i[3]=e.createElementVNode("h4",{class:"timeline-filters__title"},"Type",-1)),e.createElementVNode("div",Bs,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["timeline-filters__status-btn",{"timeline-filters__status-btn--active":e.unref(t).filter.simulatedOnly}]),onClick:r}," Simulated only ",2)])]),S.value?(e.openBlock(),e.createElementBlock("div",$s,[e.createElementVNode("button",{type:"button",class:"btn btn--ghost",onClick:f},[e.createVNode(e.unref(le),{size:14}),i[4]||(i[4]=e.createTextVNode(" Clear all filters ",-1))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",xs,[e.unref(t).isLoading?(e.openBlock(),e.createElementBlock("div",ws,[...i[5]||(i[5]=[e.createElementVNode("div",{class:"timeline-loading__spinner"},null,-1),e.createElementVNode("span",{class:"text-muted"},"Loading timeline...",-1)])])):e.unref(t).error?(e.openBlock(),e.createElementBlock("div",Ds,[e.createElementVNode("p",Ts,e.toDisplayString(e.unref(t).error),1),e.createElementVNode("button",{type:"button",class:"btn btn--primary",onClick:d}," Retry ")])):e.unref(t).entries.length===0?(e.openBlock(),e.createElementBlock("div",Ms,[e.createVNode(e.unref(G),{size:48,class:"empty-state__icon"}),i[6]||(i[6]=e.createElementVNode("h3",{class:"empty-state__title"},"No requests yet",-1)),i[7]||(i[7]=e.createElementVNode("p",{class:"empty-state__description"}," API requests will appear here in real-time as they are made. ",-1))])):e.unref(t).filteredEntries.length===0?(e.openBlock(),e.createElementBlock("div",zs,[e.createVNode(e.unref(pe),{size:48,class:"empty-state__icon"}),i[8]||(i[8]=e.createElementVNode("h3",{class:"empty-state__title"},"No matching requests",-1)),i[9]||(i[9]=e.createElementVNode("p",{class:"empty-state__description"}," Try adjusting your search or filters. ",-1)),S.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn--secondary",onClick:f}," Clear filters ")):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",Is,[e.createElementVNode("div",qs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).filteredEntries,_=>(e.openBlock(),e.createBlock(ls,{key:_.id,entry:_,"is-selected":e.unref(t).selectedEntryId===_.id,onSelect:C},null,8,["entry","is-selected"]))),128))])]),e.createElementVNode("div",Fs,[e.createVNode(Yo,{entry:e.unref(t).selectedEntry},null,8,["entry"])])],64))])]))}}),[["__scopeId","data-v-a5c73778"]])},Symbol.toStringTag,{value:"Module"})),As={class:"json-editor"},Rs={class:"json-editor__container"},Os={class:"json-editor__lines","aria-hidden":"true"},Ps=["value","readonly","placeholder"],Hs={class:"json-editor__status"},js={class:"json-editor__status-left"},Us={key:0,class:"json-editor__valid"},Qs={key:1,class:"json-editor__error"},Js={class:"json-editor__status-right"},Ws={class:"json-editor__info"},Gs=Q(e.defineComponent({__name:"JsonEditor",props:{modelValue:{},readonly:{type:Boolean,default:!1},placeholder:{default:"Enter JSON data..."},minHeight:{default:200}},emits:["update:modelValue"],setup(n,{expose:t,emit:l}){const a=n,m=l,o=e.ref(""),p=e.ref(null),g=e.computed(()=>p.value===null),y=e.computed(()=>o.value.split(`
2
+ `).length),d=e.computed(()=>Array.from({length:y.value},(C,u)=>u+1));function V(){try{o.value=JSON.stringify(a.modelValue,null,2),p.value=null}catch{o.value="",p.value="Invalid initial value"}}V(),e.watch(()=>a.modelValue,()=>{try{const C=JSON.parse(o.value);JSON.stringify(C)!==JSON.stringify(a.modelValue)&&V()}catch{V()}});function $(C){const u=C.target;o.value=u.value,B()}function B(){if(o.value.trim()===""){p.value=null,m("update:modelValue",[]);return}try{const C=JSON.parse(o.value);p.value=null,m("update:modelValue",C)}catch(C){if(C instanceof Error){const u=C.message.match(/position (\d+)/);if(u){const s=Number.parseInt(u[1],10),N=o.value.substring(0,s).split(`
3
+ `),D=N.length,L=N[N.length-1].length+1;p.value=`Line ${D}, Column ${L}: ${C.message}`}else p.value=C.message}else p.value="Invalid JSON"}}function x(){try{const C=JSON.parse(o.value);o.value=JSON.stringify(C,null,2),p.value=null,m("update:modelValue",C)}catch{}}function F(C){if(C.key==="Tab"){C.preventDefault();const u=C.target,s=u.selectionStart,N=u.selectionEnd,D=`${o.value.substring(0,s)} ${o.value.substring(N)}`;o.value=D,setTimeout(()=>{u.selectionStart=u.selectionEnd=s+2},0),B()}}return t({formatJson:x,isValid:g}),(C,u)=>(e.openBlock(),e.createElementBlock("div",As,[e.createElementVNode("div",Rs,[e.createElementVNode("div",Os,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,s=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"json-editor__line-number"},e.toDisplayString(s),1))),128))]),e.createElementVNode("textarea",{value:o.value,readonly:n.readonly,placeholder:n.placeholder,style:e.normalizeStyle({minHeight:`${n.minHeight}px`}),class:"json-editor__textarea",spellcheck:"false",onInput:$,onKeydown:F},null,44,Ps)]),e.createElementVNode("div",Hs,[e.createElementVNode("div",js,[g.value?(e.openBlock(),e.createElementBlock("div",Us,[e.createVNode(e.unref(me),{size:14}),u[0]||(u[0]=e.createElementVNode("span",null,"Valid JSON",-1))])):p.value?(e.openBlock(),e.createElementBlock("div",Qs,[e.createVNode(e.unref(et),{size:14}),e.createElementVNode("span",null,e.toDisplayString(p.value),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Js,[e.createElementVNode("span",Ws,e.toDisplayString(y.value)+" lines",1)])])]))}}),[["__scopeId","data-v-dbd5ce20"]]),ie=e.ref([]),U=e.reactive({visible:!1,title:"",message:"",confirmText:"Confirm",cancelText:"Cancel",onConfirm:null,onCancel:null}),se=new Map;let P=null,Ks=0;function Zs(){return`toast-${Date.now()}-${Ks++}`}function Ee(n,t,l=3e3){const a=Zs(),m={id:a,type:n,message:t,duration:l,timestamp:Date.now()};if(ie.value.push(m),l>0){const o=setTimeout(()=>{Ke(a),se.delete(a)},l);se.set(a,o)}return a}function Ke(n){const t=se.get(n);t!==void 0&&(clearTimeout(t),se.delete(n));const l=ie.value.findIndex(a=>a.id===n);l!==-1&&ie.value.splice(l,1)}function Ys(){function n(y,d){return Ee("success",y,d)}function t(y,d){return Ee("error",y,d)}function l(y,d){return Ee("info",y,d)}function a(y,d){return Ee("warning",y,d)}function m(y,d){return new Promise(V=>{P&&(P(!1),P=null),P=V,U.visible=!0,U.title=d?.title||"Confirm",U.message=y,U.confirmText=d?.confirmText||"Confirm",U.cancelText=d?.cancelText||"Cancel",U.onConfirm=()=>{U.visible=!1,P&&(P(!0),P=null)},U.onCancel=()=>{U.visible=!1,P&&(P(!1),P=null)}})}function o(){U.visible=!1,P&&(P(!1),P=null)}function p(y){Ke(y)}function g(){for(const y of se.values())clearTimeout(y);se.clear(),ie.value=[]}return{toasts:ie,confirmDialog:U,success:n,error:t,info:l,warning:a,dismiss:p,clearAll:g,confirm:m,closeConfirm:o}}const Xs={class:"models-page"},vs={class:"models-sidebar"},el={class:"models-sidebar__header"},tl={class:"models-sidebar__badge"},nl={key:0,class:"models-sidebar__loading"},ol={key:1,class:"models-sidebar__list"},sl=["onClick"],ll={class:"models-sidebar__name"},al={class:"models-sidebar__count"},rl={class:"models-sidebar__footer"},il={class:"models-sidebar__stat"},cl={class:"font-mono"},dl={class:"models-content"},ml={class:"models-toolbar"},pl={class:"models-toolbar__title"},ul={class:"font-mono"},fl={class:"text-muted"},hl={key:0,class:"models-toolbar__badge models-toolbar__badge--warning"},yl={class:"models-toolbar__actions"},_l=["disabled"],gl=["disabled"],kl={key:0,class:"models-error"},El={class:"models-editor"},Nl={key:1,class:"models-loading-overlay"},Vl={key:1,class:"empty-state"},bl={key:0,class:"models-error"},Sl={class:"modal__body"},Cl={class:"modal__footer"},Bl=Object.freeze(Object.defineProperty({__proto__:null,default:Q(e.defineComponent({__name:"ModelsPage",setup(n){const t=bt(),{send:l,on:a,connected:m}=re(),{success:o,error:p,confirm:g}=Ys(),y=e.ref(null),d=e.ref(!1);e.onMounted(async()=>{try{await t.fetchSchemas(),t.schemas.length>0&&!t.selectedSchema&&await t.selectSchemaByName(t.schemas[0].name)}catch(u){t.error||(t.error=u instanceof Error?u.message:"Failed to load schemas")}}),a("store:updated",u=>{const s=u;if(typeof u!="object"||u===null||typeof s.schema!="string"||typeof s.action!="string"||typeof s.count!="number"){console.warn("[ModelsPage] Invalid store:updated payload:",u);return}t.handleStoreUpdate(u)}),a("reseeded",u=>{const s=u;if(typeof u!="object"||u===null||typeof s.success!="boolean"||!Array.isArray(s.schemas)){console.warn("[ModelsPage] Invalid reseeded payload:",u);return}t.handleReseedComplete(u)}),e.watch(()=>t.selectedSchema,async()=>{y.value&&t.currentItems.length>0&&(await e.nextTick(),y.value?.formatJson())});async function V(u){t.isDirty&&!await g("You have unsaved changes. Are you sure you want to switch schemas?",{title:"Unsaved Changes",confirmText:"Switch Schema",cancelText:"Cancel"})||await t.selectSchemaByName(u)}async function $(){if(!y.value?.isValid){p("Cannot save invalid JSON. Please fix the errors first.");return}if(await t.saveItems())o("Items saved successfully");else{const s=t.error||"Failed to save items";p(s)}}async function B(){if(!t.isDirty)return;await g("Discard all changes and revert to saved data?",{title:"Discard Changes",confirmText:"Discard",cancelText:"Cancel"})&&(t.discardChanges(),o("Changes discarded"))}async function x(){d.value=!1;try{if(await t.clearSchema())o("Schema cleared successfully");else{const s=t.error||"Failed to clear schema";p(s)}}catch(u){const s=u instanceof Error?u.message:"Failed to clear schema";p(s)}}async function F(){if(!m.value){p("WebSocket not connected. Cannot trigger reseed.");return}await g("This will regenerate all seed data and replace existing items. Continue?",{title:"Reseed All Schemas",confirmText:"Reseed",cancelText:"Cancel"})&&(l({type:"reseed"}),o("Reseed command sent"))}function C(u){t.updateItems(u)}return(u,s)=>(e.openBlock(),e.createElementBlock("div",Xs,[e.createElementVNode("aside",vs,[e.createElementVNode("div",el,[e.createVNode(e.unref(be),{size:18}),s[4]||(s[4]=e.createElementVNode("span",null,"Schemas",-1)),e.createElementVNode("span",tl,e.toDisplayString(e.unref(t).schemaCount),1)]),e.unref(t).loading&&e.unref(t).schemas.length===0?(e.openBlock(),e.createElementBlock("div",nl,[...s[5]||(s[5]=[e.createElementVNode("div",{class:"spinner"},null,-1),e.createElementVNode("span",null,"Loading...",-1)])])):(e.openBlock(),e.createElementBlock("div",ol,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).schemas,N=>(e.openBlock(),e.createElementBlock("button",{key:N.name,class:e.normalizeClass(["models-sidebar__item",{"models-sidebar__item--active":e.unref(t).selectedSchema===N.name}]),onClick:D=>V(N.name)},[e.createElementVNode("span",ll,e.toDisplayString(N.name),1),e.createElementVNode("span",al,e.toDisplayString(N.count),1)],10,sl))),128))])),e.createElementVNode("div",rl,[e.createElementVNode("div",il,[s[6]||(s[6]=e.createElementVNode("span",{class:"text-muted"},"Total Items:",-1)),e.createElementVNode("span",cl,e.toDisplayString(e.unref(t).totalItems),1)])])]),e.createElementVNode("main",dl,[e.unref(t).selectedSchema?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",ml,[e.createElementVNode("div",pl,[e.createElementVNode("span",ul,e.toDisplayString(e.unref(t).selectedSchema),1),e.createElementVNode("span",fl,"("+e.toDisplayString(e.unref(t).currentItems.length)+" items)",1),e.unref(t).isDirty?(e.openBlock(),e.createElementBlock("span",hl," Unsaved ")):e.createCommentVNode("",!0)]),e.createElementVNode("div",yl,[e.unref(t).isDirty?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn--ghost",title:"Discard changes",onClick:B},[e.createVNode(e.unref(le),{size:16}),s[7]||(s[7]=e.createElementVNode("span",null,"Discard",-1))])):e.createCommentVNode("",!0),e.createElementVNode("button",{disabled:!e.unref(t).isDirty||e.unref(t).loading,class:"btn btn--primary",title:"Save changes",onClick:$},[e.createVNode(e.unref(lt),{size:16}),s[8]||(s[8]=e.createElementVNode("span",null,"Save",-1))],8,_l),e.createElementVNode("button",{class:"btn btn--danger",title:"Clear all items",onClick:s[0]||(s[0]=N=>d.value=!0)},[e.createVNode(e.unref(ue),{size:16}),s[9]||(s[9]=e.createElementVNode("span",null,"Clear",-1))]),e.createElementVNode("button",{disabled:!e.unref(m),class:"btn btn--secondary",title:"Reseed all schemas with generated data",onClick:F},[e.createVNode(e.unref(st),{size:16}),s[10]||(s[10]=e.createElementVNode("span",null,"Reseed All",-1))],8,gl)])]),e.unref(t).error?(e.openBlock(),e.createElementBlock("div",kl,[e.createElementVNode("span",null,"⚠️ "+e.toDisplayString(e.unref(t).error),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",El,[e.createVNode(Gs,{ref_key:"jsonEditorRef",ref:y,"model-value":e.unref(t).currentItems,readonly:e.unref(t).loading,"min-height":400,"onUpdate:modelValue":C},null,8,["model-value","readonly"])]),e.unref(t).loading?(e.openBlock(),e.createElementBlock("div",Nl,[...s[11]||(s[11]=[e.createElementVNode("div",{class:"spinner"},null,-1),e.createElementVNode("span",null,"Loading...",-1)])])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",Vl,[e.unref(t).error?(e.openBlock(),e.createElementBlock("div",bl,[e.createElementVNode("span",null,"⚠️ "+e.toDisplayString(e.unref(t).error),1)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(be),{size:48,class:"empty-state__icon"}),s[12]||(s[12]=e.createElementVNode("h3",{class:"empty-state__title"},"Select a schema",-1)),s[13]||(s[13]=e.createElementVNode("p",{class:"empty-state__description"}," Choose a schema from the sidebar to view and edit its data. ",-1))],64))]))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal-overlay",onClick:s[3]||(s[3]=N=>d.value=!1)},[e.createElementVNode("div",{class:"modal",onClick:s[2]||(s[2]=e.withModifiers(()=>{},["stop"]))},[s[17]||(s[17]=e.createElementVNode("div",{class:"modal__header"},[e.createElementVNode("h3",null,"Clear Schema Data")],-1)),e.createElementVNode("div",Sl,[e.createElementVNode("p",null,[s[14]||(s[14]=e.createTextVNode(" Are you sure you want to clear all items for ",-1)),e.createElementVNode("strong",null,e.toDisplayString(e.unref(t).selectedSchema),1),s[15]||(s[15]=e.createTextVNode("? ",-1))]),s[16]||(s[16]=e.createElementVNode("p",{class:"text-muted"},"This action cannot be undone.",-1))]),e.createElementVNode("div",Cl,[e.createElementVNode("button",{class:"btn btn--ghost",onClick:s[1]||(s[1]=N=>d.value=!1)}," Cancel "),e.createElementVNode("button",{class:"btn btn--danger",onClick:x}," Clear Schema ")])])])):e.createCommentVNode("",!0)]))]))}}),[["__scopeId","data-v-b06706f4"]])},Symbol.toStringTag,{value:"Module"})),$l={class:"simulator-page"},xl={class:"simulator-form card"},wl={class:"simulator-form__header"},Dl={class:"simulator-form__body"},Tl={key:0,class:"simulator-form__row"},Ml=["value"],zl={class:"simulator-form__row"},Il=["value"],ql={class:"simulator-presets"},Fl=["title","onClick"],Ll={class:"simulator-preset__label"},Al=["disabled"],Rl={class:"simulator-active"},Ol={class:"simulator-active__header"},Pl={class:"simulator-active__title"},Hl=["disabled"],jl={class:"simulator-active__list"},Ul={class:"simulator-simulation__info"},Ql={class:"simulator-simulation__path font-mono"},Jl={class:"simulator-simulation__preset"},Wl={key:0,class:"text-muted"},Gl=["disabled","onClick"],Kl={key:0,class:"empty-state"},Zl=Object.freeze(Object.defineProperty({__proto__:null,default:Q(e.defineComponent({__name:"SimulatorPage",setup(n){const t=St(),l=Oe(),{send:a,on:m}=re(),o=e.ref(""),p=e.ref("GET"),g=e.ref(null),y=e.ref(null),d=["GET","POST","PUT","PATCH","DELETE","OPTIONS","HEAD"];let V=[];const $=e.ref(new Set),B=e.computed(()=>l.endpoints.map(k=>({key:k.key,label:`${k.method.toUpperCase()} ${k.path}`,method:k.method.toUpperCase(),path:k.path,operationId:k.operationId}))),x=e.computed(()=>{const k=o.value.trim()!=="",r=g.value!==null;return k&&r}),F=e.computed(()=>t.activeSimulations.map(k=>{const r=k.presetId?t.getPreset(k.presetId):null;return{...k,preset:r}})),C=e.computed(()=>t.count);function u(){if(!x.value||!g.value||!t.getPreset(g.value))return;const r=o.value.trim();if(!r.startsWith("/")){t.setError("Path must start with /");return}if(r.length>500){t.setError("Path is too long (max 500 characters)");return}if(!/^\/[\w\-/{}:.]*$/.test(r)){t.setError("Path contains invalid characters");return}const f=`${p.value.toLowerCase()}:${r}`,b=t.createSimulationFromPreset(f,g.value,void 0);b&&(t.addSimulationLocal(b,!0),t.setLoading(!0),a({type:"set:simulation",data:{path:b.path,status:b.status,delay:b.delay,body:b.body}}),o.value="",g.value=null,y.value=null)}function s(k){t.removeSimulationLocal(k,!0),t.setLoading(!0),a({type:"clear:simulation",data:{path:k}})}function N(){if(C.value!==0){for(const k of t.activeSimulations)$.value.add(k.path),t.removeSimulationLocal(k.path,!0),a({type:"clear:simulation",data:{path:k.path}});t.setLoading(!0)}}function D(){if(!y.value)return;const k=l.endpoints.find(r=>r.key===y.value);k&&(p.value=k.method.toUpperCase(),o.value=k.path)}function L(){y.value=null}return e.onMounted(()=>{V=[m("simulation:active",k=>{t.setSimulations(k.simulations)}),m("simulation:added",k=>{t.handleSimulationAdded(k)}),m("simulation:removed",k=>{t.handleSimulationRemoved(k)}),m("simulations:cleared",k=>{t.handleSimulationsCleared(k)}),m("simulation:set",k=>{t.handleSimulationSet(k)}),m("simulation:cleared",k=>{$.value.has(k.path)&&$.value.delete(k.path),t.handleSimulationCleared(k)})],a({type:"get:registry"})}),e.onUnmounted(()=>{for(const k of V)k()}),(k,r)=>(e.openBlock(),e.createElementBlock("div",$l,[e.createElementVNode("div",xl,[e.createElementVNode("div",wl,[e.createVNode(e.unref(ne),{size:18}),r[3]||(r[3]=e.createElementVNode("span",null,"Add Simulation",-1))]),e.createElementVNode("div",Dl,[B.value.length>0?(e.openBlock(),e.createElementBlock("div",Tl,[r[5]||(r[5]=e.createElementVNode("label",{class:"simulator-form__label"},"Select Endpoint (optional):",-1)),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":r[0]||(r[0]=f=>y.value=f),class:"input",onChange:D},[r[4]||(r[4]=e.createElementVNode("option",{value:null},"Manual entry...",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,f=>(e.openBlock(),e.createElementBlock("option",{key:f.key,value:f.key},e.toDisplayString(f.label),9,Ml))),128))],544),[[e.vModelSelect,y.value]])])):e.createCommentVNode("",!0),e.createElementVNode("div",zl,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":r[1]||(r[1]=f=>p.value=f),class:"simulator-form__method input",onChange:L},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(d,f=>e.createElementVNode("option",{key:f,value:f},e.toDisplayString(f),9,Il)),64))],544),[[e.vModelSelect,p.value]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":r[2]||(r[2]=f=>o.value=f),type:"text",class:"simulator-form__path input",placeholder:"/api/path",onInput:L},null,544),[[e.vModelText,o.value]])]),e.createElementVNode("div",ql,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).presets,f=>(e.openBlock(),e.createElementBlock("button",{key:f.id,class:e.normalizeClass(["simulator-preset",{"simulator-preset--selected":g.value===f.id},`simulator-preset--${f.type}`]),title:f.description,onClick:b=>g.value=f.id},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.type==="delay"?e.unref(G):e.unref($e)),{size:14})),e.createElementVNode("span",Ll,e.toDisplayString(f.label),1)],10,Fl))),128))]),e.createElementVNode("button",{class:"btn btn--primary",disabled:!x.value||e.unref(t).isLoading,onClick:u},[e.createVNode(e.unref(ot),{size:16}),r[6]||(r[6]=e.createElementVNode("span",null,"Add Simulation",-1))],8,Al)])]),e.createElementVNode("div",Rl,[e.createElementVNode("div",Ol,[e.createElementVNode("span",Pl," Active Simulations ("+e.toDisplayString(C.value)+") ",1),C.value>0?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn--ghost",disabled:e.unref(t).isLoading,onClick:N},[e.createVNode(e.unref(ue),{size:14}),r[7]||(r[7]=e.createElementVNode("span",null,"Clear All",-1))],8,Hl)):e.createCommentVNode("",!0)]),e.createElementVNode("div",jl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,f=>(e.openBlock(),e.createElementBlock("div",{key:f.path,class:"simulator-simulation card"},[e.createElementVNode("div",Ul,[e.createElementVNode("span",Ql,e.toDisplayString(f.path),1)]),e.createElementVNode("div",Jl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.preset?.type==="delay"?e.unref(G):e.unref($e)),{size:14,class:e.normalizeClass({"text-warning":f.preset?.type==="delay","text-error":f.preset?.type==="error","text-muted":f.preset?.type==="empty"})},null,8,["class"])),e.createElementVNode("span",null,e.toDisplayString(f.preset?.label||`HTTP ${f.status}`),1),f.delay?(e.openBlock(),e.createElementBlock("span",Wl," ("+e.toDisplayString(f.delay)+"ms) ",1)):e.createCommentVNode("",!0)]),e.createElementVNode("button",{class:"btn btn--ghost btn--icon",title:"Remove simulation",disabled:e.unref(t).isLoading,onClick:b=>s(f.path)},[e.createVNode(e.unref(ue),{size:14})],8,Gl)]))),128)),C.value===0?(e.openBlock(),e.createElementBlock("div",Kl,[e.createVNode(e.unref(ne),{size:48,class:"empty-state__icon"}),r[8]||(r[8]=e.createElementVNode("h3",{class:"empty-state__title"},"No active simulations",-1)),r[9]||(r[9]=e.createElementVNode("p",{class:"empty-state__description"}," Add a simulation above to test error handling and slow responses. ",-1))])):e.createCommentVNode("",!0)])])]))}}),[["__scopeId","data-v-e5fd28b0"]])},Symbol.toStringTag,{value:"Module"}));j.bootstrap=Ge,j.useTheme=xt,j.useWebSocket=re,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})}));
2
4
  //# sourceMappingURL=devtools.umd.cjs.map