import{a as p,x as v}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{u as P}from"./keepAlive-0ac97bbd-1782572373740v=1.0.0.js";import{r as m,X as g}from"./vendor-866bb149-1782572373740v=1.0.0.js";function S({includeNames:i=[],mode:u="default"}={}){const f=m(u),l=m(i),o=P();p();const s=e=>{o.addKeepAliveName(e)},n=e=>{o.removeKeepAliveName(e)},h=e=>{let t=e.split("Index")[0],a=[];return t&&["Add","Edit","Detail"].forEach(r=>{a.push(t+r)}),f.value==="params"&&(a=l.value),a},d=()=>{let e=!1;try{sessionStorage.getItem("needRefresh")&&(sessionStorage.removeItem("needRefresh"),e=!0)}catch{}return e};return v((e,t,a)=>{let c=e.name,r=t.name;h(r).includes(c)?s(r):n(r),a()}),g(()=>{}),{cacheCurrent:s,uncacheCurrent:n,isNeedRefresh:d}}export{S as u};
