1import{_ as D,I as J,j as v,J as M,l as U,a as g,d as s,u as c,b as e,w as f,g as A,a6 as W,F as G,r as K,q as Q,am as R,o as p,e as u,an as Z,t as m,H as $,h as O,f as C,ao as N,s as ee,p as oe,i as ae}from"./index-DbI8qXff.js";import{S as te,t as le}from"./section-navigation-BJGx4hOd.js";import{s as j}from"./index-BP5LkFUS.js";import{s as T}from"./index-BzspaYgf.js";import{s as z}from"./index-BrSIyZNY.js";import{s as se}from"./index-CL1T964V.js";const h=y=>(oe("data-v-860c6200"),y=y(),ae(),y),ie={class:"card"},ne={class:"flex justify-center gap-4 p-4"},ce={class:"flex flex-col gap-4"},ue=h(()=>e("b",null,[e("u",null,"20 accounts")],-1)),re=h(()=>e("div",{class:"flex flex-col gap-2"},[e("div",null,[e("i",{class:"pi pi-thumbs-up"}),u(' Good : If the AI-recommended account matches your account, click the "Good" button. ')]),e("div",null,[e("i",{class:"pi pi-thumbs-down"}),u(' Bad : If not, click the "Bad" button. ')]),e("div",null,[e("i",{class:"pi pi-step-forward"}),u(' Skip : If youâre unsure about the suitability of AI recommendation, you can choose to "Skip". ')])],-1)),de={class:"flex justify-center gap-4 mt-8"},ve={class:"flex items-center font-semibold bg-sky-200 dark:bg-sky-800 p-2 h-10"},pe={class:"grow flex flex-col gap-2 p-4"},fe={class:"flex flex-row gap-2 place-items-center"},me={class:"flex flex-col grow text-ellipsis overflow-hidden"},ge={class:"font-bold text-lg"},he={class:"text-sm text-gray-400"},_e={key:0,class:"border rounded-xl px-2 py-1"},be={class:"gap-1"},ye={class:"grow"},we={class:"flex flex-row gap-8 mt-8"},xe={class:"font-bold"},ke={class:"font-bold"},Se={class:"flex justify-around border-t p-1"},Ie=["id"],Be=h(()=>e("span",null,"Good",-1)),Fe=h(()=>e("span",{class:"pi pi-step-forward"},null,-1)),Ae=h(()=>e("span",null,"Skip",-1)),Ce=["id"],Te=h(()=>e("span",null,"Bad",-1)),Le={class:"flex flex-col items-center justify-center gap-2 mt-8"},Xe={key:1,class:"flex flex-wrap items-center gap-2"},Ge={class:"flex flex-col items-center gap-2"},$e={__name:"FollowHub",setup(y){const w=J(),S=v(),r=v(""),x=v(!0);async function V(){try{r.value=localStorage.getItem("current_x_account"),r.value!=null&&r.value!=""&&(S.value=await Q(r.value),console.log("fetchCurrentXAccountInfo:",S.value),console.log("xuser status:",S.value.status))}catch(t){console.error("Get X Info failed:",t)}finally{}}const i=v([]);async function Y(){x.value=!0;try{if(r.value=localStorage.getItem("current_x_account"),r.value!=""){const t=await R(r.value);console.log(t),t!=null?i.value=t:i.value=[]}}catch(t){console.log(t),i.value=null}finally{x.value=!1}}const a=v(null),l=v(0),o=v({goodIcon:"pi pi-thumbs-up",goodSeverity:"info",badIcon:"pi pi-thumbs-down",badSeverity:"info"});function I(){o.value={goodIcon:"pi pi-thumbs-up",goodSeverity:"info",badIcon:"pi pi-thumbs-down",badSeverity:"info"}}function E(t){if(a){const n=document.querySelector(`#goodIcon-${t}`);if(n){n.classList.add("thumb-up-animated");const d={account_id:r.value,target_account_id:a.value.id_str,positive:!0};N(d),setTimeout(()=>{n.classList.remove("thumb-up-animated"),o.value.goodIcon==="pi pi-thumbs-up"?(o.value.goodIcon="pi pi-thumbs-up-fill",o.value.goodSeverity="danger",i.value[l.value].goodOrBadState="Good",_(),w.add({severity:"success",summary:"Feedback Sent",detail:"Your feedback has been sent to the AI, which will help it find more suitable X accounts for you to follow.",life:3e3})):(o.value.goodIcon="pi pi-thumbs-up",o.value.goodSeverity="info",i.value[l.value].goodOrBadState="notSet",_(),w.add({severity:"info",summary:"Feedback Caceled",detail:"Your feedback has been canceled.",life:3e3})),setTimeout(()=>{B()},1e3)},500)}}}function q(t){const n=document.querySelector(`#badIcon-${t}`);if(n){n.classList.add("thumb-up-animated");const d={account_id:r.value,target_account_id:a.value.id_str,positive:!1};N(d),setTimeout(()=>{n.classList.remove("thumb-up-animated"),o.value.badIcon==="pi pi-thumbs-down"?(o.value.badIcon="pi pi-thumbs-down-fill",o.value.badSeverity="secondary",i.value[l.value].goodOrBadState="Bad",_(),w.add({severity:"success",summary:"Feedback Sent",detail:"This account will be removed from waitlist and will no longer be followed.our feedback will help improve AI analysis and matching accuracy.",life:3e3})):(o.value.badIcon="pi pi-thumbs-down",o.value.badSeverity="info",i.value[l.value].goodOrBadState="notSet",_(),w.add({severity:"info",summary:"Feedback Caceled",detail
1:"Your feedback has been canceled.",life:3e3})),setTimeout(()=>{B()},1e3)},500)}}M(l,t=>{console.log(`Current account index changed to: ${t}`),a.value=i.value[l.value],_(),X()});function _(){const t=i.value[l.value].goodOrBadState;t==="Good"?(o.value.goodIcon="pi pi-thumbs-up-fill",o.value.goodSeverity="danger",o.value.badIcon="pi pi-thumbs-down",o.value.badSeverity="info"):t==="Bad"?(o.value.badIcon="pi pi-thumbs-down-fill",o.value.badSeverity="secondary",o.value.goodIcon="pi pi-thumbs-up",o.value.goodSeverity="info"):I()}function B(){l.value<i.value.length-1?l.value++:console.log("No more accounts to load.")}function H(t){l.value!=t&&(I(),l.value=t)}function P(){B(),I()}const L=v(0),k=v(0);function X(){k.value||(k.value=i.value.length),L.value=(l.value+1)/k.value*100}return U(async()=>{await V(),await Y(),i.value.length>0&&(a.value=i.value[l.value],X())}),(t,n)=>{const d=ee;return p(),g(G,null,[s(te,{items:c(le),"aria-label":"Targeting navigation"},null,8,["items"]),e("div",ie,[s(c(T),{severity:"secondary",icon:"pi pi-info-circle"},{default:f(()=>[u(" Your feedback on XGrowing AI will help us find and follow more precisely matched accounts for you in the future. This ensures your connections align closely with your interests and goals. ")]),_:1}),e("div",ne,[e("div",ce,[s(c(T),{severity:"secondary",icon:"pi pi-info-circle",class:"max-w-screen-lg",style:{"background-color":"transparent"},variant:"simple"},{default:f(()=>[u(" Each time you load this page, we select "),ue,u(" from the WaitingList and Todayâs Following List. You can provide your feedback to the AI, which greatly helps in optimizing its understanding of your needs. ")]),_:1}),s(c(T),{severity:"secondary",icon:"pi pi-info-circle",class:"max-w-screen-lg",style:{"background-color":"transparent"},variant:"simple"},{default:f(()=>[re]),_:1})])]),e("div",de,[x.value?(p(),A(c(j),{key:0,height:"20rem",width:"24rem",class:"mb-2"})):(p(),A(W,{key:1,name:"fade",mode:"out-in"},{default:f(()=>[a.value?(p(),g("div",{key:a.value.id_str,class:"flex flex-col max-w-md h-auto border-solid border-2 rounded-lg shadow hover:shadow-lg bg-white dark:border-sky-800 dark:bg-gray-800"},[e("div",ve,[s(c(Z),{class:"mr-2",size:"large",value:l.value+1,severity:"success"},null,8,["value"]),u("From: "+m(a.value.xg_source),1)]),e("div",pe,[e("div",fe,[e("div",null,[s(c($),{image:a.value.avatar,shape:"circle"},null,8,["image"])]),e("div",me,[e("div",ge,m(a.value.name),1),e("div",he,"@"+m(a.value.screen_name),1)]),a.value.following?(p(),g("div",_e,"Following")):O("",!0),e("div",be,[s(d,{icon:"pi pi-twitter",as:"a",target:"_blank",rel:"noopener",href:a.value.profile_url,text:"",rounded:"","aria-label":"X Link"},null,8,["href"])])]),e("div",ye,m(a.value.description),1),e("div",we,[e("div",null,[e("span",xe,m(a.value.friends_count),1),u(" Following ")]),e("div",null,[e("span",ke,m(a.value.followers_count),1),u(" Followers ")])])]),e("div",Se,[s(d,{severity:o.value.goodSeverity,text:"","aria-label":"good",onClick:n[0]||(n[0]=()=>E(a.value.xaccount_id))},{default:f(()=>[e("span",{id:"goodIcon-"+a.value.xaccount_id,class:C(o.value.goodIcon)},null,10,Ie),Be]),_:1},8,["severity"]),s(c(z),{layout:"vertical"}),s(d,{severity:"info",text:"","aria-label":"skip",onClick:P},{default:f(()=>[Fe,Ae]),_:1}),s(c(z),{layout:"vertical"}),s(d,{severity:o.value.badSeverity,text:"","aria-label":"bad",onClick:n[1]||(n[1]=()=>q(a.value.xaccount_id))},{default:f(()=>[e("span",{id:"badIcon-"+a.value.xaccount_id,class:C(o.value.badIcon)},null,10,Ce),Te]),_:1},8,["severity"])])])):O("",!0)]),_:1}))]),e("div",Le,[x.value?(p(),A(c(j),{key:0,width:"24rem",class:"mb-2"})):(p(),g("div",Xe,[(p(!0),g(G,null,K(i.value,(b,F)=>(p(),g("div",Ge,[s(c($),{image:b.avatar,size:F===l.value?"large":"normal",shape:"circle",class:C(F===l.value?"cursor-pointer outline outline-offset-2 outline-1":"cursor-pointer"),onClick:Oe=>H(F)},null,8,["image","size","class","onClick"]),s(d,{icon:b.goodOrBadState==="Good"?"pi pi-thumbs-up-fill":b.goodOrBadState==="Bad"?"pi pi-thumbs-down-fill":"",severity:b.goodOrBadState==="Good"?"danger":b.goodOrBadState==="Bad"?"secondary":"",text:"",rounded:"","aria-label":"Filter"},null,8,["icon","severity"])]))),256))])),s(c(se),{class:"w-2/3",value:L.value},{default:f(()=>[u(m(l.value+1)+"/"+m(k.value),1)]),_:1},8,["value"])])])],64)}}},qe=D($e,[["__scopeId","data-v-860c6200"]]);export{qe 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.