import{a as p,x as v}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{u as P}from"./keepAlive-20a782c5-1782729249161v=1.0.0.js";import{r as m,X as g}from"./vendor-1e24e3ad-1782729249161v=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};
