import{ae as o,y as i}from"./index-BKKvzUDD.js";import{g as f}from"./model-gCK34aBo.js";const g=o("models",()=>{const n=i([]),a=i(!1);let t=null;async function l(e=!1){if(!(a.value&&!e))return t&&!e||(t=(async()=>{try{n.value=await f()||[],a.value=!0}catch{n.value=[]}finally{t=null}})()),t}function s(e){if(!e)return"-";const u=n.value.find(r=>r.id==e||r.id===String(e)||r.id===Number(e));return u?u.name:`模型${e}`}return{list:n,loaded:a,load:l,getModelName:s}});export{g as u};
