1import{_,A as d,H as u,r as p,D as h,J as t,K as c,s as f,i as k,o as g,c as v,b as A,n as x,q as y,L as C}from"./BQTrDalH.js";const I={key:0,class:"admin"},N={__name:"Admin",setup(R){const l=y(),a=d(),i=u("im_auth_token",{maxAge:2*60*60*1e3}),r=u("im_auth_state"),o=p(!1);return h(()=>{if(i.value||l.public.noauth){o.value=!0,a.name==="Admin"&&t("/admin/posts");return}const{code:n}=a.query,s=a.query.state;if(!n||!s||!r.value||s!==r.value){c().$toast.error("Invalid authentication"),t("/");return}f("/login",{method:"POST",params:{callback:`${encodeURI(window.location.origin)}/admin`,code:n}}).then(e=>{if(!e||!e.access_token){c().$toast.error("Invalid token response"),t("/");return}i.value=e.access_token,o.value=!0,a.name==="Admin"&&t("/admin/posts")}).catch(e=>{console.log(e),c().$toast.error("Error loading the admin panel, please contact the developer."),t("/")})}),(n,s)=>{const e=C;return k(o)?(g(),v("div",I,[A(e,{"page-key":m=>m.fullPath},null,8,["page-key"])])):x("",!0)}}},b=_(N,[["__scopeId","data-v-56465971"]]);export{b as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.