1import J from"./BCMmXj-U.js";import{g as K,n as Q,t as X,_ as Y}from"./Cr4EeYuN.js";import{_ as Z}from"./D2WgBkHd.js";import{_ as ee}from"./CAMvtYGt.js";import{O as te,N as z,q as l,T as L,e as y,f as oe,h as se,c as u,o as a,b as m,u as o,i as p,a as t,B as r,t as d,w as g,j as k,F as V,r as ne,k as ae,aB as le,as as re,l as ie,H as ce,C as ue,U as me}from"./bogGBgDk.js";import{_ as de}from"./BQNo8Gu_.js";import{_ as _e}from"./Cgffu9hJ.js";import{P as fe}from"./GZaRN_3w.js";import{_ as pe}from"./D9447Jab.js";import{u as ve}from"./BKWfFULU.js";import"./Qrl6o1im.js";import"./4NQh0d-D.js";import"./DnNtQ3RH.js";import"./C-msk6Aq.js";const xe={key:0,class:"mx-auto max-w-screen-lg mb-10 flex justify-center"},he={key:1,class:"bg-paper"},ge={class:"mx-auto max-w-screen-lg py-12"},we={class:"flex flex-col md:flex-row md:items-start md:justify-between"},ye={class:"flex flex-col md:flex-row md:space-x-8"},ke={class:"mb-4 flex justify-center md:mb-0"},be={class:"text-center md:text-left"},Ce={class:"flex flex-col md:flex-row md:items-center"},Se={class:"font-medium text-2xl"},Ue={class:"text-secondary text-sm md:ml-4"},$e={key:0,class:"flex flex-col md:flex-row md:items-center md:gap-4 justify-center md:justify-start mt-2"},Pe={key:0,class:"flex space-x-2 items-center justify-center md:justify-start text-sm text-secondary"},je=["href"],Fe={class:"mt-6 md:mt-0"},ze={class:"text-center md:text-right"},Le={class:"text-2xl font-bold"},Ve={class:"text-sm text-secondary"},Be={class:"flex items-center justify-center space-x-2 mt-4"},De={key:2,class:"mx-auto max-w-screen-lg mb-20"},Me={class:"overflow-x-auto"},Ne={class:"mb-4 mx-4 md:mx-0"},Ee={class:"mt-10 mb-6"},Ie={class:"bg-gray-50 inline-block px-2 py-2 rounded-lg transition-all"},Te={class:"flex space-x-4"},st={__name:"[slug]",setup(Ae){const w=te(),i=z(),b=l(()=>e.value?e.value?.display_name+" | Vendor":"Vendor Profile"),B=l(()=>e.value?"See what events "+e.value?.display_name+" will be attending and order your books in advance.":"Vendor Profile"),D=l(()=>{if(!e.value)return"";const s=K(e.value?.photo_url);let n={...s?{avatar:s}:{},name:e.value?.display_name,username:e.value?.username};return"https://og.beventi.co/api/author?"+Object.keys(n).map(function(h){return encodeURIComponent(h)+"="+encodeURIComponent(n[h])}).join("&")}),C=()=>{ie({title:b,ogTitle:b,ogImage:D,ogType:"profile",ogUrl:"https://beventi.co/vendors/"+i.params.slug,description:B})},{data:e,error:v,pending:S,status:Re}=ve("author-profile"+i.params.slug,async()=>(await fe.getSellerProfile(i.params.slug)).data,"$2DLUpV1ec5");L(v,s=>{if(s)throw me({statusCode:s.statusCode,statusMessage:s.statusMessage})},{immediate:!0});const M=[{name:"Upcoming Events",href:"/vendors/"+i.params.slug,route:"vendors-slug",show:!0},{name:"Stores",href:"/vendors/"+i.params.slug+"/stores",route:"vendors-slug-stores",show:!0},{name:"About",href:"/vendors/"+i.params.slug+"/about",route:"vendors-slug-about",show:e.value?.about}],x=l(()=>Q(e.value?.website)),N=l(()=>{if(!x.value)return"";const s=new URL(x.value),n=s.pathname==="/"?"":s.pathname.replace(/\/$/,"");return`${s.host}${n}`}),U=l(()=>X(e.value?.photo_url)),_=y(0),E=y(!1),I=l(()=>_.value.toLocaleString()),$=async()=>{e.value.is_following=!0,_.value++},P=async()=>{e.value.is_following=!1,_.value--};L(e,s=>{s&&(C(),_.value=s.followers_count||0,E.value=s.is_following||!1)},{immediate:!0}),C();const f=y(!1);oe(()=>{z().query.follow==="true"&&(f.value=!0)});const T=l(()=>w.user&&e.value&&w.user.id===e.value.user_id);return(s,n)=>{const j=J,h=Y,A=Z,R=se("font-awesome-icon"),O=ee,F=ce,q=de,H=ue,W=le,G=_e;return a(),u(V,null,[o(S)&&!o(v)?(a(),u("div",xe,[p(j,{size:"2xl"})])):o(v)?m("",!0):(a(),u("div",he,[t("div",ge,[t("div",we,[t("div",ye,[t("div",ke,[U.value?(a(),r(h,{key:0,src:U.value,size:"xl"},null,8,["src"])):(a(),r(A,{key:1,name:o(e).display_name,size:"xl"},null,8,["name"]))]),t("div",be,[n[2]||(n[2]=t("div",null,"Vendor",-1)),t("div",Ce,[t("h1",Se,d(o(e).display_name),1),t("div",Ue,"@"+d(o(e).username),1)]),o(e).website||o(e).social_links&&o(e).social_links.length>0?(a(),u("div",$e,[x.value?(a(),u("div",Pe,[p(R,{icon:["fal","link-simple"],class:"text-secondary-soft fa-fw rotate-45",size:"xs"}),t("a",{href:x.value,class:"hover:underline",target:"_blank",rel:"noopener noreferrer"},d(N.value),9,je)])):m("",!0),p(O,{"social-links":o(e).social_links,class:"mt-3 md:mt-0"},null,8,["social-links"])])):m("",!0)])]),t("div",Fe,[t("div",ze,[t("p",Le,d(I.value),1),t("p",Ve,d(_.value===1?"Follower":"Followers"),1)]),t("div",Be,[T.value?(a(),r(F,{key:0,to:"/account/profile","btn-style":"black",size:"md"},{default:g(()=>[...n[3]||(n[3]=[k("Edit Profile",-1)])]),_:1})):(a(),r(q,{key:1,profile:o(e),onFollow:$,onUnfollow:P},null,8,["profile"])),o(w).user?(a(),r(F,{key:2,to:"mailto:"+o(e).contact_email,"btn-style":"secondary",size:"md"},{default:g(()=>[...n[4]||(n[4]=[k("Contact",-1)])]),_:1},8,["to"])):m("",!0)])])])])])),!o(S)&&!o(v)?(a(),u("div",De,[t("div",Me,[t("div",Ne,[t("div",Ee,[t("div",Ie,[t("ul",Te,[(a(),u(V,null,ne(M,c=>t("li",{key:c.path},[c.show?(a(),r(H,{key:0,to:c.href,class:ae([c.route==o(i).name?"bg-white font-medium shadow":"","block px-4 py-2 rounded-lg text-sm"])},{default:g(()=>[k(d(c.name),1)]),_:2},1032,["to","class"])):m("",!0)])),64))])])])])]),p(W,{profile:o(e),keepalive:""},null,8,["profile"]),(a(),r(re,{to:"body"},[f.value?(a(),r(G,{key:0,show:f.value,onClose:n[1]||(n[1]=c=>f.value=!1),size:"sm"},{default:g(()=>[p(pe,{profile:o(e),onFollow:$,onUnfollow:P,onClose:n[0]||(n[0]=c=>f.value=!1)},null,8,["profile"])]),_:1},8,["show"])):m("",!0)]))])):m("",!0)],64)}}};export{st 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.