import{_ as x,d as y,E as g,c2 as k,F as b,o as l,c as u,L as C,M as T,J as E,T as B}from"./index.1417328f.js";const D={fixed:"","p-5":"","text-sm":"","font-bold":""},M=["onClick"],N=y({__name:"anchor",props:{map:{type:Map,required:!0}},setup(i){const n=i,r=g(null),{y:t}=k(r);b(()=>{r.value=document.getElementsByClassName("el-scrollbar__wrap")[1]});function d(s){const{top:e}=n.map.get(s);r.value.scrollTo({top:Number(e)})}function m(s){let e=0,o=0;const a=[...n.map.entries()],{top:v,index:c}=n.map.get(s);return a.forEach(([P,{index:p,top:_}])=>{const f=c+1===p,h=c-1===p;f&&(e=_),h&&(o=_)}),c===0?t.value>=0&&t.valueo&&t.value=v}return(s,e)=>(l(),u("ul",D,[(l(!0),u(C,null,T(i.map.entries(),([o],a)=>(l(),u("li",{class:E(["hover:text-blue hover:bg-#f7f7f7 cursor-pointer duration-200ms p-1.5 m-1 rounded",{"is-active":m(o)}]),onClick:()=>d(o),key:a},B(o),11,M))),128))]))}});var A=x(N,[["__scopeId","data-v-5d3b9dd1"],["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/search/standBook/components/anchor.vue"]]);export{A as default};