manifest
Version:
Self-hosted Manifest LLM router with embedded server, SQLite database, and dashboard
2 lines (1 loc) • 1.43 kB
JavaScript
import{a as m,i as y,h as v,s as d,t as x,d as h}from"./vendor-C-Y5oNOq.js";import"./index-C4Qw7vZo.js";import{i as g,h as k,s as b,e as w}from"./routing-utils-CHapjwyd.js";var _=x('<span class=info-tooltip tabindex=0 role=button><svg class=info-tooltip__icon width=13 height=13 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><circle cx=12 cy=12 r=10></circle><line x1=12 y1=16 x2=12 y2=12></line><line x1=12 y1=8 x2=12.01 y2=8></line></svg><span class=info-tooltip__bubble role=tooltip>');const I=t=>{const[a,n]=m(!1),f=e=>{e.key==="Enter"||e.key===" "?(e.preventDefault(),n(!a())):e.key==="Escape"&&n(!1)};return(()=>{var e=_(),u=e.firstChild,p=u.nextSibling;return e.$$focusout=()=>n(!1),e.$$click=()=>n(!a()),e.$$keydown=f,y(p,()=>t.text),v(o=>{var l=!!a(),s=`Info: ${t.text}`,c=a();return l!==o.e&&e.classList.toggle("info-tooltip--active",o.e=l),s!==o.t&&d(e,"aria-label",o.t=s),c!==o.a&&d(e,"aria-expanded",o.a=c),o},{e:void 0,t:void 0,a:void 0}),e})()};h(["keydown","click","focusout"]);let i=null,r=null;function $(t){const a=new Map;for(const n of t)n.display_name&&a.set(n.model_name,n.display_name);return a}async function M(){if(!i)return r||(r=(async()=>{try{const t=await w();i=$(t.models)}catch{i=new Map}})(),r)}function P(){M()}function L(t){if(i){const n=i.get(t);if(n)return n}const a=g(t);return a?k(a,t):b(t)}export{I,L as g,P as p};