import{B as e,Bt as t,Ct as n,F as r,L as i,N as a,Nt as o,Pt as s,R as c,U as l,Vt as u,W as d,X as f,Y as p,_t as m,a as h,at as g,ft as _,g as v,it as y,o as b,ot as x,pt as S,u as C,v as w,vt as T,z as E}from"./BT3KAag_.js";import{r as D}from"./DqZmeWn2.js";import"./t62M88qj.js";import"./wcGRWqFZ.js";import{i as O,t as k}from"./Brnt5OaR.js";import"./BZnJ8tbJ.js";import{n as A}from"./C9mSWIDl2.js";var j=e(`<title> </title>`),M=e(`<svg><!><path d="M28,8H16L12.5857,4.5857A2,2,0,0,0,11.1716,4H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H16a2,2,0,0,0,2-2V16.83l2.59,2.58L22,18l-5-5-5,5,1.41,1.41L16,16.83V26H4V6h7.1716l4,4H28V26H22v2h6a2,2,0,0,0,2-2V10A2,2,0,0,0,28,8Z"></path></svg>`);function N(e,n){let c=h(n,[`children`,`$$slots`,`$$events`,`$$legacy`]),l=h(c,[`size`,`title`]);s(n,!1);let d=m(),S=m(),w=b(n,`size`,8,16),E=b(n,`title`,8,void 0);y(()=>(p(c),p(E())),()=>{T(d,c[`aria-label`]||c[`aria-labelledby`]||E())}),y(()=>(f(d),p(c)),()=>{T(S,{"aria-hidden":f(d)?void 0:!0,role:f(d)?`img`:void 0,focusable:Number(c.tabindex)===0?!0:void 0})}),g(),C();var D=M();v(D,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:w(),height:w(),...f(S),...l}));var O=_(D),k=e=>{var t=j(),n=_(t,!0);u(t),x(()=>r(n,E())),i(e,t)};a(O,e=>{E()&&e(k)}),t(),u(D),i(e,D),o()}var P=E(`<button type="button" class="toolbar-icon-btn"><!></button>`);function F(e,t){s(t,!0);let r=n(()=>t.currentPath?t.currentPath.split(`/`):[]),l=n(()=>f(r).slice(0,-1)),p=n(()=>f(l).join(`/`)),m=n(()=>O.repos.find(e=>e.name===t.repoName)),h=n(()=>f(m)?.displayName??t.repoName),g=n(()=>{if(f(l).length===0)return f(h);let e=k(f(m)?.subfolders??[],f(p));return e[e.length-1]??f(l)[f(l).length-1]}),v=n(()=>A(t.repoName,f(p)));var y=c(),b=S(y),C=e=>{var t=P();N(_(t),{size:16}),u(t),x(()=>{w(t,`title`,`Up to ${f(g)??``}`),w(t,`aria-label`,`Up to ${f(g)??``}`)}),d(`click`,t,()=>D(f(v))),i(e,t)};a(b,e=>{t.currentPath&&e(C)}),i(e,y),o()}l([`click`]);export{F as t};