import{shallowRef as m,watch as y}from"vue";function w(a,n,u){const o=m({});y([a,n,u],()=>{const e=new Map,c=u.value,i=n.value;function p(l){l.forEach((t,f)=>{const v=c(t,f);e.set(v,t),t&&typeof t=="object"&&i in t&&p(t[i]||[])})}p(a.value),o.value={kvMap:e}},{deep:!0,immediate:!0});function s(e){return o.value.kvMap.get(e)}return[s]}export{w as default};
