var Ae=Object.defineProperty;var Fe=Object.getOwnPropertySymbols;var Ze=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable;var Re=(h,H,d)=>H in h?Ae(h,H,{enumerable:!0,configurable:!0,writable:!0,value:d}):h[H]=d,Oe=(h,H)=>{for(var d in H||(H={}))Ze.call(H,d)&&Re(h,d,H[d]);if(Fe)for(var d of Fe(H))Ue.call(H,d)&&Re(h,d,H[d]);return h};var D=(h,H,d)=>new Promise(($,o)=>{var w=C=>{try{f(d.next(C))}catch(g){o(g)}},s=C=>{try{f(d.throw(C))}catch(g){o(g)}},f=C=>C.done?$(C.value):Promise.resolve(C.value).then(w,s);f((d=d.apply(h,H)).next())});import{_ as me,a as ie,i as O,dq as J,u as fe,f as B,A as He,T as Be}from"./index.CjrDwa0W.js";import{C as We}from"./CrossFade.B9Ap6pL9.js";import{q as le,h as n,v as Y,x as oe,f as i,g as M,i as e,t as m,k as t,F as ne,m as ce,T as Ye,y as ze,s as G,r as k,j as ve,A,J as re,l as z,B as Pe,o as Ce,n as de,e as ge,V as Se,b as _e,W as we,w as be}from"./vendor-vue.CmaRnji1.js";import{aC as Te}from"./vendor.DSdF8huI.js";import{U as De}from"./UploadPhoto.DgxGHiME.js";import{_ as je}from"./AiakosEmojiPicker.D8pZj3nB.js";import{G as Ge}from"./Givebadge.DFJBjPmb.js";import{_ as Xe}from"./NoInternet.dMK-ez9k.js";import"./swiper.tg5sgs8j.js";import"./UploadPhoto.Bqd-ApD8.js";const Qe={key:0,class:"w-[100%] h-[411em] absolute bottom-0 rounded-[22em] z-[9999] bg-[#1E1E1E]"},Ke={class:"w-full h-[50em] flex items-center justify-center relative"},Je={class:"w-[95%] h-[60%] pl-[10em] pr-[4em] flex items-center justify-between"},et={style:{"letter-spacing":"-0.23px"},class:"text-[16em] font-['SFPRO'] font-[400] text-white"},tt={class:"w-full h-[calc(100%-90em)] overflow-auto no-scrollbar"},st=["onClick"],ot={class:"w-[90%] h-[51%] flex justify-between"},lt={class:"h-full aspect-square rounded-full"},nt=["src"],it={class:"w-[70%] h-full flex flex-col justify-center"},at={class:"flex items-center gap-[0.5em]"},rt={style:{"letter-spacing":"-0.23px"},class:"text-[11em] font-['SFPRO'] font-[400] text-white leading-[1]"},ct=["src"],ut={style:{"letter-spacing":"-0.23px"},class:"text-[10em] font-['SFPRO'] font-[400] text-white/50"},dt=["onClick"],ft={__name:"Checklike",props:{show:Boolean,likedata:Array},emits:["cancel","selectprofile"],setup(h,{emit:H}){const{t:d}=ie(),$=h,o=H,w=()=>{o("cancel")};return(s,f)=>(n(),le(ze,{to:"#phone-screen"},[Y(Ye,{name:"slide-up"},{default:oe(()=>[$.show?(n(),i("div",Qe,[e("div",Ke,[f[1]||(f[1]=e("div",{class:"w-full h-[1%] absolute right-0 bottom-0 bg-white/10"},null,-1)),e("div",Je,[e("span",et,m(t(d)("twix.postLikedBy")),1),(n(),i("svg",{onClick:w,xmlns:"http://www.w3.org/2000/svg",class:"cursor-pointer anim-hover-1 h-[90%]",viewBox:"0 0 36 36",fill:"none"},f[0]||(f[0]=[e("rect",{width:"36",height:"36",rx:"18",fill:"#242424"},null,-1),e("path",{d:"M22.4 14L18.4 18L22.4 22M14 14L18 18L14 22",stroke:"#8D8D8D","stroke-width":"2","stroke-miterlimit":"16","stroke-linecap":"round"},null,-1)])))])]),e("div",tt,[(n(!0),i(ne,null,ce(h.likedata,C=>(n(),i("div",{onClick:g=>o("selectprofile",C.username),class:"w-full h-[64em] cursor-pointer anim-hover-1 flex items-center justify-center relative"},[f[3]||(f[3]=e("div",{class:"w-[95%] h-[1%] absolute right-0 bottom-0 bg-white/10"},null,-1)),e("div",ot,[e("div",lt,[e("img",{src:C.profilephoto,class:"h-full w-full object-cover object-center rounded-full",alt:""},null,8,nt)]),e("div",it,[e("div",at,[e("span",rt,m(C.name),1),C.badge>0?(n(),i("img",{key:0,src:t(O)["twix/"+C.badge+".svg"],class:"w-[6%] ml-[2em]",alt:""},null,8,ct)):M("",!0)]),e("span",ut,"@"+m(C.username),1)]),e("div",{onClick:g=>o("selectprofile",C.username),class:"w-[9%] h-full flex items-center justify-end"},f[2]||(f[2]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cursor-pointer anim-hover-1 h-[50%]",viewBox:"0 0 24 24",fill:"none"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.875 17.475C12.875 14.9345 14.9345 12.875 17.475 12.875C20.0155 12.875 22.075 14.9345 22.075 17.475C22.075 18.3798 21.8138 19.2237 21.3626 19.9351L22.5859 21.1717C22.9743 21.5643 22.9709 22.1975 22.5783 22.5859C22.1857 22.9743 21.5525 22.9709 21.1641 22.5783L19.9512 21.3523C19.2364 21.8098 18.3867 22.075 17.475 22.075C14.9345 22.075 12.875 20.0155 12.875 17.475ZM17.475 14.875C16.0391 14.875 14.875 16.0391 14.875 17.475C14.875 18.9109 16.0391 20.075 17.475 20.075C18.911 20.075 20.075 18.9109 20.075 17.475C20.075 16.0391 18.911 14.875 17.475 14.875Z",fill:"white"}),e("path",{d:"M5.625 6.375C5.625 3.4755 7.9755 1.125 10.875 1.125C13.7745 1.125 16.125 3.4755 16.125 6.375C16.125 9.27449 13.7745 11.625 10.875 11.625C7.9755 11.625 5.625 9.27449 5.625 6.375Z",fill:"white"}),e("path",{d:"M12.4795 13.2375C12.7084 13.2698 12.8018 13.5469 12.6597 13.7293C11.8543 14.7631 11.3745 16.063 11.3745 17.475C11.3745 18.9003 11.8634 20.2114 12.6825 21.2499C13.2278 21.9411 13.5004 22.2868 13.4185 22.4559C13.3365 22.625 12.9388 22.625 12.1436 22.625H6.46556C4.64725 22.625 3.24146 21.7306 2.07002 20.6146C1.391 19.9677 1.05254 19.2396 1.13734 18.4638C1.21709 17.7342 1.65574 17.1387 2.11741 16.6868C2.85558 15.9643 3.93309 15.3564 4.6459 14.9543C4.80852 14.8625 4.95227 14.7814 5.06855 14.7122C6.3734 13.9352 7.80547 13.4441 9.26995 13.2375C10.3338 13.0875 11.4156 13.0875 12.4795 13.2375Z",fill:"white"})],-1)]),8,dt)])],8,st))),256))])])):M("",!0)]),_:1})]))}},Me=me(ft,[["__scopeId","data-v-80ef95d5"]]),mt={class:"w-full h-full relative z-[2] bg-black flex flex-col"},ht={class:"w-full h-[40em] flex items-center px-[15em] justify-between"},xt=["src"],wt=["placeholder"],pt={style:{"letter-spacing":"-0.18px"},class:"text-[11em] font-['SFPRO'] text-black font-[400] leading-[100%] fixtext"},vt={class:"w-full h-[82em] flex items-end justify-start relative border-b-[1px] border-white/10"},gt={class:"w-full h-[30em] absolute bottom-0 flex items-start justify-center"},_t={class:"text-[14em] font-['SFPRO'] text-white font-[400] leading-[100%] fixtext cursor-pointer anim-hover-1"},Ct={class:"w-full inline-flex p-[10em] flex-shrink-0 border-b-[1px] border-white/10"},bt={class:"w-full h-full"},yt={class:"w-full h-[33em] flex justify-between items-center relative"},$t=["src"],kt={class:"flex-1 h-full flex flex-col justify-center mr-[5em] ml-[9em]"},Pt={class:"w-full flex"},St={class:"text-[11em] font-['SFPRO'] text-white font-[400] leading-[100%] fixtext cursor-pointer anim-hover-1"},Tt=["src"],jt={class:"text-[11em] font-['SFPRO'] text-white/50 font-[400] leading-[100%] fixtext cursor-pointer anim-hover-1 mt-[.1em]"},Mt={class:"w-full inline-flex items-center justify-start"},Lt={style:{"letter-spacing":"-0.32px"},class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[110%] overflow-hidden break-words py-[1em]"},Ft={class:"w-full h-[12em] flex"},Rt={style:{"letter-spacing":"-0.32px"},class:"text-[10em] font-['SFPRO'] text-white/50 font-[400] leading-[110%] overflow-hidden break-words pb-[1em]"},Ot={class:"w-full h-[10em] mt-[12em] flex items-center justify-between"},Ht={class:"flex-1 h-full flex items-center justify-start"},Dt={class:"flex items-center h-full"},Et=["src"],Nt={class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[100%] cursor-pointer max-w-[30px] min-w-[20px] fixtext ml-[.6em]"},It={class:"flex items-center h-full ml-[12em]"},qt=["src"],Vt={class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[100%] cursor-pointer max-w-[30px] min-w-[20px] fixtext ml-[.6em]"},At={class:"flex items-center h-full mr-[15em] ml-[12em]"},Zt=["src"],Ut={class:"min-w-[5em] h-full flex items-center justify-end"},Bt={class:"w-full flex-1 overflow-auto no-scrollbar"},Wt={class:"w-full inline-flex pl-[2px] justify-between border-b-[1px] border-white/10"},Yt={class:"w-[45em] h-full flex justify-center"},zt={class:"h-[33em] rounded-full aspect-square mt-[9px] ml-[1px]"},Gt=["src"],Xt={class:"w-[252em] inline-flex flex-col"},Qt={class:"w-full h-[10em] flex items-center justify-start mt-[12em]"},Kt={class:"text-[11em] font-['SFPRO'] text-white font-[400] leading-[100%] max-w-[7em] fixtext cursor-pointer anim-hover-1 truncate"},Jt=["src"],es={class:"text-[10em] font-['SFPRO'] text-white/50 font-[400] leading-[110%] max-w-[7em] fixtext mt-[0px] ml-[0.3em]"},ts={class:"text-[9em] font-['SFPRO'] text-white/50 font-[300] leading-[110%] max-w-[12em] fixtext ml-[3px]"},ss={class:"w-[95%] inline-flex mt-[6em]"},os={style:{"letter-spacing":"-0.32px"},class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[110%] overflow-hidden break-words pb-[1em]"},ls={class:"w-full h-[10em] mb-[px] flex items-center justify-start relative"},ns=["onClick"],is={class:"flex items-center h-full"},as=["onClick","src"],rs={class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[100%] cursor-pointer max-w-[30px] min-w-[20px] fixtext ml-[.6em]"},cs={__name:"Commentonthecomment",emits:["cancel","goback","selectprofile"],setup(h,{emit:H}){const d=J(),$=fe(),{Commentonthecomment:o,MyProfile:w}=G(d),{t:s}=ie(),f=k(""),C=k(null),g=k(!1),P=k(250),y=E=>{f.value+=E},v=()=>{g.value=!g.value},x=H,R=()=>D(this,null,function*(){if(f.value.trim()==="")return;g.value&&(g.value=!1);const E=yield B("TWIX_POST_COMMENT_ON_THE_COMMENT",{commentId:o.value.commentId,message:f.value});E.success?f.value="":$.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(E.message)||E.message||s("twix.failedPostComment")})}),a=E=>{const L=new Date(E),q=String(L.getHours()).padStart(2,"0"),j=String(L.getMinutes()).padStart(2,"0"),l=String(L.getDate()).padStart(2,"0"),c=String(L.getMonth()+1).padStart(2,"0"),b=L.getFullYear();return`${q}:${j} · ${l}.${c}.${b}`},u=E=>{let L=parseInt(E);if(L.toString().length===10&&(L*=1e3),isNaN(L)||L<=0)return s("twix.timeUnknown");const j=Date.now()-L;if(j<0)return s("twix.timeNow");const l=Math.floor(j/1e3),c=Math.floor(l/60),b=Math.floor(c/60),T=Math.floor(b/24),Z=Math.floor(T/7),X=Math.floor(T/30),Q=Math.floor(T/365);return l<10?s("twix.timeNow"):l<60?s("twix.timeSeconds",{count:l}):c<60?s("twix.timeMinutes",{count:c}):b<24?s("twix.timeHours",{count:b}):T<7?T===1?s("twix.timeYesterday"):s("twix.timeDays",{count:T}):Z<4?s("twix.timeWeeks",{count:Z}):X<12?s("twix.timeMonths",{count:X}):s("twix.timeYears",{count:Q})},r=E=>D(this,null,function*(){const L=yield B("TWIX_LIKE_COMMENT",{commentId:E});L.success||$.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(L.message)||L.message||s("twix.failedLikeComment")})}),S=k([]),V=()=>{S.value=[]},W=E=>D(this,null,function*(){let L=yield B("TWIX_GET_COMMENT_LIKES",{commentId:E});L.success?S.value=L.likes:(S.value=[],$.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(L.message)||L.message||s("twix.failedFetchLikes")}))}),ee=E=>{x("selectprofile",E)};return(E,L)=>(n(),i("div",mt,[Y(Me,{likedata:S.value,show:S.value.length>0,onCancel:V,onSelectprofile:ee},null,8,["likedata","show"]),g.value?(n(),i("div",{key:0,class:"absolute bottom-0 left-0 right-0 z-40 transition-transform duration-300 ease-out",style:ve({transform:g.value?"translateY(0)":`translateY(${P.value}em)`})},[e("div",{class:"w-full bg-white dark:bg-[#1a1a1a] shadow-[0px_-4px_20px_rgba(0,0,0,0.15)]",style:ve({height:`${P.value}em`})},[Y(je,{show:g.value,onSelectEmoji:y,onClose:v},null,8,["show"])],4)],4)):M("",!0),e("div",{class:z([g.value?"bottom-[240em]":"bottom-[0px]","w-full h-[60em] absolute bg-black border-t border-white/10 pt-[8px] z-[30]"])},[e("div",ht,[e("img",{src:t(w).profilephoto,class:"h-[80%] aspect-square rounded-full object-cover object-center flex-shrink-0",alt:""},null,8,xt),A(e("input",{ref_key:"textareaRef",ref:C,maxlength:200,"onUpdate:modelValue":L[0]||(L[0]=q=>f.value=q),placeholder:t(s)("twix.typeMessage"),class:"flex-1 min-w-0 bg-transparent text-[11em] mx-[1em] font-['SFPRO'] placeholder:text-white/40 text-white font-[400] outline-none leading-[1]"},null,8,wt),[[re,f.value]]),(n(),i("svg",{onClick:v,xmlns:"http://www.w3.org/2000/svg",class:"cursor-pointer anim-hover-1 h-[45%] mr-[10em]",viewBox:"0 0 20 21",fill:"none"},L[4]||(L[4]=[e("path",{d:"M9.99999 20.5C11.366 20.5 12.652 20.2385 13.8578 19.7156C15.0637 19.1928 16.1274 18.4706 17.049 17.549C17.9706 16.6274 18.6928 15.5637 19.2156 14.3578C19.7385 13.152 20 11.866 20 10.5C20 9.13398 19.7385 7.84803 19.2156 6.64214C18.6928 5.43627 17.9706 4.37255 17.049 3.45097C16.1274 2.52941 15.0621 1.80719 13.8529 1.28431C12.6438 0.761438 11.3562 0.5 9.99018 0.5C8.62417 0.5 7.33823 0.761438 6.13235 1.28431C4.92646 1.80719 3.86437 2.52941 2.94607 3.45097C2.02778 4.37255 1.30719 5.43627 0.784313 6.64214C0.261438 7.84803 0 9.13398 0 10.5C0 11.866 0.261438 13.152 0.784313 14.3578C1.30719 15.5637 2.02941 16.6274 2.95097 17.549C3.87255 18.4706 4.93627 19.1928 6.14214 19.7156C7.34803 20.2385 8.63398 20.5 9.99999 20.5ZM9.99999 18.8333C8.84313 18.8333 7.76143 18.6176 6.7549 18.1863C5.74836 17.7549 4.86437 17.1585 4.10293 16.3971C3.3415 15.6356 2.74673 14.7517 2.31862 13.7451C1.89052 12.7386 1.67647 11.6569 1.67647 10.5C1.67647 9.34313 1.89052 8.26143 2.31862 7.2549C2.74673 6.24836 3.33987 5.36274 4.09803 4.59803C4.8562 3.83333 5.73855 3.23692 6.74509 2.80882C7.75163 2.38072 8.83332 2.16667 9.99018 2.16667C11.1471 2.16667 12.2288 2.38072 13.2353 2.80882C14.2418 3.23692 15.1274 3.83333 15.8922 4.59803C16.6569 5.36274 17.2549 6.24836 17.6863 7.2549C18.1176 8.26143 18.3333 9.34313 18.3333 10.5C18.3333 11.6569 18.1193 12.7386 17.6912 13.7451C17.263 14.7517 16.6683 15.6356 15.9068 16.3971C15.1454 17.1585 14.2598 17.7549 13.2499 18.1863C12.2402 18.6176 11.1569 18.8333 9.99999 18.8333ZM9.99018 15.4117C10.6699 15.4117 11.268 15.2892 11.7843 15.0441C12.3007 14.799 12.701 14.518 12.9853 14.201C13.2696 13.884 13.4118 13.6176 13.4118 13.402C13.4118 13.2843 13.3644 13.2026 13.2696 13.1568C13.1748 13.1111 13.0752 13.1111 12.9705 13.1568C12.6176 13.3529 12.2108 13.5408 11.75 13.7205C11.2892 13.9003 10.7026 13.9902 9.99018 13.9902C9.27777 13.9902 8.69117 13.9003 8.23038 13.7205C7.7696 13.5408 7.35947 13.3529 7 13.1568C6.89542 13.1111 6.79738 13.1111 6.70588 13.1568C6.61437 13.2026 6.56862 13.2843 6.56862 13.402C6.56862 13.6176 6.71078 13.884 6.99509 14.201C7.2794 14.518 7.67973 14.799 8.19606 15.0441C8.71241 15.2892 9.31045 15.4117 9.99018 15.4117ZM7.07842 9.62744C7.39215 9.62744 7.66666 9.50163 7.90195 9.24999C8.13725 8.99835 8.2549 8.67646 8.2549 8.28431C8.2549 7.89215 8.13725 7.56862 7.90195 7.31372C7.66666 7.05882 7.39215 6.93136 7.07842 6.93136C6.77123 6.93136 6.50326 7.05882 6.2745 7.31372C6.04574 7.56862 5.93136 7.89215 5.93136 8.28431C5.93136 8.67646 6.04574 8.99835 6.2745 9.24999C6.50326 9.50163 6.77123 9.62744 7.07842 9.62744ZM12.8921 9.62744C13.2058 9.62744 13.4803 9.50163 13.7157 9.24999C13.951 8.99835 14.0686 8.67646 14.0686 8.28431C14.0686 7.89215 13.951 7.56862 13.7157 7.31372C13.4803 7.05882 13.2058 6.93136 12.8921 6.93136C12.5849 6.93136 12.317 7.05882 12.0882 7.31372C11.8594 7.56862 11.7451 7.89215 11.7451 8.28431C11.7451 8.67646 11.8594 8.99835 12.0882 9.24999C12.317 9.50163 12.5849 9.62744 12.8921 9.62744Z",fill:"white","fill-opacity":"0.5"},null,-1)]))),e("div",{onClick:R,class:"inline-flex h-[60%] items-center justify-center bg-white rounded-full cursor-pointer anim-hover-1 px-[9em] flex-shrink-0"},[e("span",pt,m(t(s)("twix.comment")),1)])])],2),e("div",vt,[e("div",gt,[e("span",_t,m(t(s)("twix.comments")),1)]),(n(),i("svg",{onClick:L[1]||(L[1]=q=>x("goback")),xmlns:"http://www.w3.org/2000/svg",class:"ml-[15em] h-[15%] mb-[15em] cursor-pointer anim-hover-1 z-[10]",viewBox:"0 0 18 16",fill:"none"},L[5]||(L[5]=[e("path",{d:"M4.41394 8.99906L9.45694 14.0391L8.04294 15.4591L0.585938 7.99906L8.04294 0.539062L9.45694 1.95906L4.41394 6.99906H17.9999V8.99906H4.41394Z",fill:"white"},null,-1)])))]),e("div",Ct,[e("div",bt,[e("div",yt,[e("img",{src:t(o).comment.profilephoto,class:"h-full rounded-full aspect-square object-cover object-center",alt:""},null,8,$t),e("div",kt,[e("div",Pt,[e("span",St,m(t(o).comment.name),1),e("img",{src:t(O)["twix/1.svg"],class:"ml-[4em] w-[5%]",alt:""},null,8,Tt)]),e("span",jt," @"+m(t(o).comment.username),1)])]),e("div",Mt,[e("span",Lt,m(t(o).comment.content),1)]),e("div",Ft,[e("span",Rt,m(a(t(o).comment.created_at)),1)]),e("div",Ot,[e("div",Ht,[e("div",Dt,[e("img",{src:t(O)["twix/comment.svg"],class:"h-full cursor-pointer anim-hover-1",alt:""},null,8,Et),e("span",Nt,m(t(o).replies.length),1)]),e("div",It,[e("img",{onClick:L[2]||(L[2]=q=>r(t(o).comment.comment_id)),class:"h-full cursor-pointer anim-hover-1",src:t(o).comment.user_liked?t(O)["twix/liked.svg"]:t(O)["twix/like.svg"],alt:""},null,8,qt),e("span",Vt,m(t(o).comment.like_count),1)]),e("div",At,[e("img",{src:t(O)["twix/delete.svg"],class:"h-full cursor-pointer anim-hover-1",alt:""},null,8,Zt)])]),e("div",Ut,[e("span",{onClick:L[3]||(L[3]=q=>W(t(o).comment.comment_id)),class:"text-[10em] font-['SFPRO'] text-white/50 font-[400] cursor-pointer hover:opacity-80"},m(t(s)("twix.likes")),1)])])])]),e("div",Bt,[(n(!0),i(ne,null,ce(t(o).replies,q=>(n(),i("div",Wt,[e("div",Yt,[e("div",zt,[e("img",{src:q.profilephoto,class:"w-full h-full rounded-full object-cover object-center",alt:""},null,8,Gt)])]),e("div",Xt,[e("div",Qt,[e("span",Kt,m(q.name),1),q.badge>0?(n(),i("img",{key:0,src:t(O)["twix/"+q.badge+".svg"],class:"ml-[4em] w-[5%]",alt:""},null,8,Jt)):M("",!0),e("span",es,"@"+m(q.username),1),e("span",ts,"· "+m(u(q.created_at)),1)]),e("div",ss,[e("p",os,m(q.content),1)]),e("div",ls,[q.like_count>0?(n(),i("span",{key:0,onClick:j=>W(q.comment_id),class:"text-[10em] font-['SFPRO'] text-white/50 absolute borderredfont-[400] leading-[100%] right-[10px] max-w-[80px] fixtext cursor-pointer anim-hover-1"},m(t(s)("twix.likes")),9,ns)):M("",!0),e("div",is,[e("img",{onClick:j=>r(q.comment_id),src:q.user_liked?t(O)["twix/liked.svg"]:t(O)["twix/like.svg"],class:"h-full cursor-pointer anim-hover-1",alt:""},null,8,as),e("span",rs,m(q.like_count),1)])]),L[6]||(L[6]=e("div",{class:"w-full h-[10em]"},null,-1))])]))),256)),L[7]||(L[7]=e("div",{class:"w-full h-[150em]"},null,-1))])]))}},us=me(cs,[["__scopeId","data-v-5029c8a3"]]),ds={class:"w-full h-full flex flex-wrap content-start px-[8em]"},fs={key:0,class:"w-full h-[15em] flex items-center mt-[12em]"},ms={class:"w-[45em] h-full flex justify-center"},hs={class:"h-[33em] rounded-full aspect-square mt-[9em] ml-[1em]"},xs=["src"],ws={class:"w-[230em] inline-flex flex-col"},ps={class:"w-full h-[15em] flex items-center justify-start mt-[12em]"},vs=["src"],gs={class:"text-[9em] font-['SFPRO'] text-white/50 font-[300] leading-[110%] max-w-[120em] fixtext ml-[0.4em]"},_s={class:"w-[95%] inline-flex mt-[9em]"},Cs=["innerHTML"],bs={key:0,class:"w-[100%] overflow-hidden rounded-[10em] max-h-[200em] inline-flex items-center justify-center relative"},ys={class:"absolute w-full h-[95%] bg-[#121212] z-[10] rounded-[10em] flex items-center justify-center flex-col"},$s={class:"text-[10px] font-['SFPRO'] text-white font-[400] mt-[6px] fixtext"},ks={class:"text-[10px] font-['SFPRO'] text-white font-[400] fixtext absolute bottom-[12px]"},Ps=["src"],Ss=["src"],Ts={class:"absolute inset-0 flex items-center justify-center pointer-events-none"},js={class:"w-[35px] h-[35px] rounded-full flex items-center justify-center group-hover:scale-110 transition-transform duration-200"},Ms=["src"],Ls={key:1,class:"w-full inline-flex items-center justify-center pb-[12em]"},Fs={class:"w-[100%] inline-flex flex-col rounded-[10em] border-[1px] pt-[7em] border-[#FFFFFF26] overflow-hidden"},Rs={class:"w-full h-[35em] flex items-center justify-start px-[10px]"},Os=["src"],Hs=["src"],Ds={class:"text-[10em] font-['SFPRO'] text-white/50 font-[400] leading-[110%] max-w-[8em] fixtext truncate mt-[0px] ml-[0.3em]"},Es={class:"text-[9em] font-['SFPRO'] text-white/50 font-[300] leading-[110%] max-w-[9em] fixtext ml-[0.3em]"},Ns={class:"w-full inline-flex px-[10em] mt-[6em]"},Is=["innerHTML"],qs={key:0,class:"w-full h-full"},Vs=["src"],As={key:1,class:"w-full h-full relative bg-black"},Zs=["src"],Us={class:"absolute inset-0 flex items-center justify-center pointer-events-none"},Bs={class:"w-[35px] h-[35px] rounded-full flex items-center justify-center group-hover:scale-110 transition-transform duration-200"},Ws=["src"],Ys={class:"w-[70%] h-[13em] mt-[4em] mb-[6em] flex items-center justify-between relative"},zs=["src"],Gs={class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[100%] cursor-pointer max-w-[3em] min-w-[1em] fixtext ml-[0.3em]"},Xs=["src"],Qs=["src"],Ks=["src"],Js={class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[100%] cursor-pointer max-w-[3em] min-w-[1em] fixtext ml-[0.3em]"},eo=["src"],to={class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[100%] cursor-pointer max-w-[3em] min-w-[1em] fixtext ml-[0.3em]"},so=["src"],$e={__name:"Post",props:{postdata:{type:Object,required:!0},commentcount:{type:Number,required:!1,default:-1}},emits:["selectprofile","opencomments","selecthashtag"],setup(h,{emit:H}){const d=J(),$=fe(),{MyProfile:o}=G(d),{PhoneData:w}=G($),{t:s}=ie(),f=j=>{x("selecthashtag",j)},C=j=>{x("selectprofile",j.replace("@",""))};window.handleHashtagClick=f,window.handleMentionClick=C;const g=h,P=j=>{let l=parseInt(j);if(l.toString().length===10&&(l*=1e3),isNaN(l)||l<=0)return s("twix.timeUnknown");const b=Date.now()-l;if(b<0)return s("twix.timeNow");const T=Math.floor(b/1e3),Z=Math.floor(T/60),X=Math.floor(Z/60),Q=Math.floor(X/24),te=Math.floor(Q/7),he=Math.floor(Q/30),pe=Math.floor(Q/365);return T<10?s("twix.timeNow"):T<60?s("twix.timeSeconds",{count:T}):Z<60?s("twix.timeMinutes",{count:Z}):X<24?s("twix.timeHours",{count:X}):Q<7?Q===1?s("twix.timeYesterday"):s("twix.timeDays",{count:Q}):te<4?s("twix.timeWeeks",{count:te}):he<12?s("twix.timeMonths",{count:he}):s("twix.timeYears",{count:pe})},y=j=>{if(!j||j.length===0)return"";const l=/(#\w+|@\w+)/g,c=T=>{const Z=document.createElement("div");return Z.textContent=T,Z.innerHTML};return j.split(l).map(T=>T.match(l)?T.startsWith("#")?`${c(T)}`:T.startsWith("@")?`${c(T)}`:`${c(T)}`:c(T)).join("")},v=j=>{const l=$.isVideo(j);$.setPhotoViewerData({image:j,type:l?"video":"image"})},x=H,R=j=>D(this,null,function*(){let l=yield B("TWIX_LIKE_POST",{postId:j});l.success||$.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(l.message)||l.message||s("twix.failedLikePost")})}),a=k([]),u=j=>D(this,null,function*(){let l=yield B("TWIX_GET_LIKES",{postId:j});l.success?a.value=l.likes:(a.value=[],$.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(l.message)||l.message||s("twix.failedFetchLikes")}))}),r=()=>{a.value=[]},S=j=>D(this,null,function*(){if(!j||g.commentcount!==-1)return;(yield d.getPostComment(j))||$.TriggerNotification({appname:"twix",header:s("twix.title"),message:s("twix.failedLoadComments")}),x("opencomments")}),V=k(!1),W=()=>D(this,null,function*(){let j=yield B("TWIX_DELETE",{action:"post",id:g.postdata.post_id,repost_id:g.postdata.repost_id||null});j.success||$.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(j.message)||j.message||s("twix.failedDeletePost")}),V.value=!1}),ee=()=>{V.value=!1},E=j=>{j&&x("selectprofile",j)},L=j=>D(this,null,function*(){let l=yield B("TWIX_REPOST",{postId:j});l&&l.success?$.TriggerNotification({appname:"twix",header:s("twix.title"),message:s("twix.repostSuccess")}):$.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(l.message)||l.message||s("twix.failedRepost")})}),q=j=>{x("quotepost",j)};return(j,l)=>{var c;return n(),i(ne,null,[Y(Me,{likedata:a.value,show:a.value.length>0,onCancel:r,onSelectprofile:E},null,8,["likedata","show"]),V.value?(n(),le(He,{key:0,onCancel:ee,onSubmit:W,header:t(s)("general.areYouSure"),label:t(s)("twix.confirmDeletePost"),buttons:{cancel:t(s)("general.cancel"),submit:t(s)("general.delete")}},null,8,["header","label","buttons"])):M("",!0),e("div",ds,[h.postdata.repost_is_repost?(n(),i("div",fs,[l[17]||(l[17]=e("svg",{class:"ml-[35em] h-[70%]",viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M3.74997 0.234375L7.44331 3.68438L6.30664 4.90104L4.58331 3.29271V10.3344C4.58331 11.251 5.32997 12.001 6.24997 12.001H10.8333V13.6677H6.24997C4.40914 13.6677 2.91664 12.176 2.91664 10.3344V3.29271L1.19331 4.90104L0.0566406 3.68438L3.74997 0.234375ZM13.75 2.00104H9.16664V0.334375H13.75C15.5908 0.334375 17.0833 1.82604 17.0833 3.66771V10.7094L18.8066 9.10104L19.9433 10.3177L16.25 13.7677L12.5566 10.3177L13.6933 9.10104L15.4166 10.7094V3.66771C15.4166 2.75104 14.67 2.00104 13.75 2.00104Z",fill:"white","fill-opacity":"0.5"})],-1)),e("span",{onClick:l[0]||(l[0]=b=>x("selectprofile",h.postdata.repost_by_username)),class:"text-[10em] font-['SFPRO'] ml-[5px] text-white/50 font-[400] fixtext cursor-pointer"},m(t(s)("twix.reposted",{name:h.postdata.repost_by_name})),1)])):M("",!0),e("div",ms,[e("div",hs,[e("img",{onClick:l[1]||(l[1]=b=>v(h.postdata.profilephoto)),src:h.postdata.profilephoto,class:"w-full h-full rounded-full object-cover object-center cursor-pointer",alt:""},null,8,xs)])]),e("div",ws,[e("div",ps,[e("span",{onClick:l[2]||(l[2]=b=>x("selectprofile",h.postdata.username)),class:"text-[11em] font-['SFPRO'] text-white font-[400] leading-[100%] max-w-[10em ml-[.2em] fixtext cursor-pointer"},m(h.postdata.name),1),h.postdata.badge>0?(n(),i("img",{key:0,src:t(O)["twix/"+h.postdata.badge+".svg"],class:"ml-[2em] w-[5%]",alt:""},null,8,vs)):M("",!0),e("span",{onClick:l[3]||(l[3]=b=>x("selectprofile",h.postdata.username)),class:"text-[10em] cursor-pointer font-['SFPRO'] text-white/50 font-[400] leading-[110%] max-w-[70em] fixtext mt-[0px] ml-[0.2em]"}," @"+m(h.postdata.username),1),e("span",gs,"· "+m(P(h.postdata.date)),1)]),e("div",_s,[h.postdata.content.length>0?(n(),i("p",{key:0,class:"text-[11em] font-['SFPRO'] text-white font-[400] leading-[110%] overflow-hidden break-words mt-[-.4em] ml-[.2em] pb-[1em]",innerHTML:y(h.postdata.content)},null,8,Cs)):M("",!0)]),h.postdata.media&&h.postdata.media.length>0?(n(),i("div",bs,[A(e("div",ys,[l[18]||(l[18]=e("svg",{width:"29",height:"28",viewBox:"0 0 29 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.44265 1.05849C2.92194 0.537795 2.07773 0.537795 1.55702 1.05849C1.03633 1.5792 1.03633 2.42341 1.55702 2.94412L5.64329 7.03037C5.63403 7.03772 5.62478 7.04506 5.61554 7.05242C3.19665 8.97902 1.33517 11.4278 0.272074 13.5541C0.131314 13.8356 0.131314 14.167 0.272074 14.4485C1.33517 16.5748 3.19665 19.0236 5.61554 20.9502C8.03643 22.8784 11.083 24.3346 14.4998 24.3346C16.9182 24.3346 19.1512 23.6052 21.108 22.495L25.557 26.9441C26.0777 27.4648 26.922 27.4648 27.4426 26.9441C27.9633 26.4234 27.9633 25.5792 27.4426 25.0585L3.44265 1.05849ZM16.9206 18.3078L10.1934 11.5805C9.75329 12.316 9.49983 13.1769 9.49983 14.0961C9.49983 16.8052 11.696 19.0013 14.405 19.0013C15.3242 19.0013 16.1852 18.7478 16.9206 18.3078ZM24.8602 19.6477C26.5642 17.9886 27.8924 16.119 28.7276 14.4485C28.8684 14.167 28.8684 13.8356 28.7276 13.5541C27.6645 11.4278 25.803 8.97902 23.3841 7.05242C20.9633 5.12424 17.9166 3.66797 14.4998 3.66797C12.8364 3.66797 11.2608 4.0131 9.80231 4.58981L24.8602 19.6477Z",fill:"white"})],-1)),e("span",$s,m(t(s)("twix.sensitiveContent")),1),l[19]||(l[19]=e("div",{class:"w-full h-[1px] mt-[20px] absolute bottom-[40px] flex items-center justify-center"},[e("div",{class:"w-[90%] h-full bg-white/30"})],-1)),e("span",ks,m(t(s)("twix.seeContent")),1)],512),[[Pe,!1]]),t($).isVideo(h.postdata.media)?(n(),i("div",{key:1,onClick:l[5]||(l[5]=b=>v(h.postdata.media)),class:"w-full h-full relative bg-black"},[e("video",{class:"w-full h-full object-cover rounded-[10px] transition-all duration-300",src:h.postdata.media,preload:"metadata",muted:""}," Your browser does not support the video tag. ",8,Ss),e("div",Ts,[e("div",js,[e("img",{src:t(O)["photos/play.svg"],class:"h-[80%]",alt:""},null,8,Ms)])])])):(n(),i("img",{key:0,onClick:l[4]||(l[4]=b=>v(h.postdata.media)),src:h.postdata.media,class:"w-full h-full object-cover cursor-pointer anim-hover-1 object-center rounded-[10px] transition-all duration-300"},null,8,Ps))])):M("",!0),h.postdata.quote_id>0?(n(),i("div",Ls,[e("div",Fs,[e("div",Rs,[e("img",{onClick:l[6]||(l[6]=b=>v(h.postdata.quoted_profilephoto)),src:h.postdata.quoted_profilephoto,class:"aspect-square h-[80%] rounded-full object-cover object-center cursor-pointer",alt:""},null,8,Os),e("span",{onClick:l[7]||(l[7]=b=>x("selectprofile",h.postdata.quoted_username)),class:"text-[11em] font-['SFPRO'] text-white font-[400] leading-[100%] max-w-[6em] truncate cursor-pointer ml-[5px]"},m(h.postdata.quoted_name),1),h.postdata.badge>0?(n(),i("img",{key:0,src:t(O)["twix/"+h.postdata.badge+".svg"],class:"h-[30%] cursor-pointe anim-hover-1 ml-[4em] flex-shrink-0",alt:""},null,8,Hs)):M("",!0),e("span",Ds,"@"+m(h.postdata.quoted_username),1),e("span",Es,"· "+m(P(h.postdata.quoted_date)),1)]),e("div",Ns,[((c=h.postdata.quoted_content)==null?void 0:c.length)>0?(n(),i("p",{key:0,style:{"letter-spacing":"-0.32px"},class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[110%] overflow-hidden break-words pb-[12px]",innerHTML:y(h.postdata.quoted_content)},null,8,Is)):M("",!0)]),h.postdata.quoted_media?(n(),i("div",qs,[t($).isVideo(h.postdata.quoted_media)?(n(),i("div",As,[e("video",{onClick:l[9]||(l[9]=b=>v(h.postdata.quoted_media)),class:"w-full h-full object-cover max-h-[150em] cursor-pointer",src:h.postdata.quoted_media,preload:"metadata",muted:""}," Your browser does not support the video tag. ",8,Zs),e("div",Us,[e("div",Bs,[e("img",{src:t(O)["photos/play.svg"],class:"h-[80%]",alt:""},null,8,Ws)])])])):(n(),i("img",{key:0,onClick:l[8]||(l[8]=b=>v(h.postdata.quoted_media)),src:h.postdata.quoted_media,class:"w-full h-full max-h-[150em] object-cover object-center cursor-pointer",loading:"lazy"},null,8,Vs))])):M("",!0)])])):M("",!0),l[20]||(l[20]=e("div",{class:"w-full h-[5%]"},null,-1)),e("div",Ys,[h.postdata.like_count>0?(n(),i("span",{key:0,onClick:l[10]||(l[10]=b=>u(h.postdata.post_id)),class:"text-[10em] font-['SFPRO'] text-white/50 absolute font-[400] leading-[100%] right-[-6.5em] max-w-[10em] fixtext hover:text-white cursor-pointer anim-hover-1"},m(t(s)("twix.likes")),1)):M("",!0),e("img",{src:t(O)["twix/comment.svg"],onClick:l[11]||(l[11]=b=>S(h.postdata.post_id)),class:"h-full cursor-pointer anim-hover-1",alt:""},null,8,zs),e("span",Gs,m(g.commentcount>-1?g.commentcount:h.postdata.comment_count),1),h.postdata.user_reposted?(n(),i("img",{key:2,onClick:l[13]||(l[13]=b=>L(h.postdata.post_id)),src:t(O)["twix/userretweet.svg"],class:"h-full ml-[8em] cursor-pointer anim-hover-1",alt:""},null,8,Qs)):(n(),i("img",{key:1,onClick:l[12]||(l[12]=b=>L(h.postdata.post_id)),src:t(O)["twix/retweet.svg"],class:"h-full ml-[8em] cursor-pointer anim-hover-1",alt:""},null,8,Xs)),e("span",{class:z([h.postdata.user_reposted?"text-[#53FE84]":"text-white","text-[10em] font-['SFPRO'] text-white font-[400] leading-[100%] cursor-pointer max-w-[3em] min-w-[1em] fixtext ml-[0.3em]"])},m(h.postdata.repost_count||0),3),e("img",{onClick:l[14]||(l[14]=b=>q(h.postdata.post_id)),src:t(O)["twix/quote.svg"],class:"h-full ml-[8em] cursor-pointer anim-hover-1",alt:""},null,8,Ks),e("span",Js,m(h.postdata.quote_count||0),1),e("img",{onClick:l[15]||(l[15]=b=>R(h.postdata.post_id)),src:h.postdata.user_liked?t(O)["twix/liked.svg"]:t(O)["twix/like.svg"],class:"h-full ml-[8em] cursor-pointer anim-hover-1",alt:""},null,8,eo),e("span",to,m(h.postdata.like_count),1),t(o).username==h.postdata.username||t(w).isAdmin?(n(),i("img",{key:3,onClick:l[16]||(l[16]=b=>V.value=!0),src:t(O)["twix/delete.svg"],class:"h-full ml-[8em] cursor-pointer anim-hover-1",alt:""},null,8,so)):M("",!0)]),l[21]||(l[21]=e("div",{class:"w-full h-[10px]"},null,-1))])])],64)}}},oo={class:"w-full h-full relative z-[2] bg-black flex flex-col"},lo={class:"w-full h-[82em] flex items-end justify-start relative border-b-[1px] border-white/10"},no={class:"w-full h-[30em] absolute bottom-0 flex items-start justify-center"},io={class:"text-[14em] font-['SFPRO'] text-white font-[400] leading-[100%] fixtext cursor-pointer anim-hover-1"},ao={class:"w-full h-[calc(100%-82em)] overflow-auto no-scrollbar"},ro={class:"w-full inline-flex flex-wrap content-start border-b-[1px] border-white/10"},co={__name:"HashtagsPost",emits:["goback","selectcomments","ChangeTwixPage","quotepost","selectprofile"],setup(h,{emit:H}){const d=J(),{HashtagsPosts:$}=G(d),o=H,w=s=>D(this,null,function*(){s&&o("selectprofile",s)});return(s,f)=>(n(),i("div",oo,[e("div",lo,[e("div",no,[e("span",io,m(t($).hashtag),1)]),(n(),i("svg",{onClick:f[0]||(f[0]=C=>o("goback")),xmlns:"http://www.w3.org/2000/svg",class:"ml-[16em] mb-[16em] h-[15%] relative z-[4] cursor-pointer anim-hover-1",viewBox:"0 0 18 16",fill:"none"},f[2]||(f[2]=[e("path",{d:"M4.41394 8.99906L9.45694 14.0391L8.04294 15.4591L0.585938 7.99906L8.04294 0.539062L9.45694 1.95906L4.41394 6.99906H17.9999V8.99906H4.41394Z",fill:"white"},null,-1)])))]),e("div",ao,[(n(!0),i(ne,null,ce(t($).posts,C=>(n(),i("div",ro,[Y($e,{postdata:C,onOpencomments:f[1]||(f[1]=g=>o("ChangeTwixPage","comment")),onSelectprofile:w},null,8,["postdata"])]))),256))])]))}},uo={class:"w-full h-full bg-black"},fo={class:"w-full h-[81em] flex items-end justify-center border-b-[1px] mt-[4em] px-[10em] border-white/10"},mo={class:"w-[96%] h-[50%]"},ho={class:"w-full h-[80%] flex relative"},xo={class:"h-full aspect-square rounded-full z-[2] cursor-pointer anim-hover-1",initial:{opacity:0,scale:.8},enter:{opacity:1,scale:1,transition:{delay:100,duration:300}}},wo=["src"],po={class:"w-full h-full absolute flex items-center justify-center",initial:{opacity:0,y:-10},enter:{opacity:1,y:0,transition:{delay:150,duration:300}}},vo=["src"],go={class:"w-full h-full flex items-center justify-end absolute"},_o=["src"],Co=["src"],bo={class:"w-full inline-flex flex-wrap content-start border-b-[1px] border-white/10"},yo=["enter"],$o={key:1,class:"w-full h-[300em] flex items-center justify-center"},ko={class:"text-[11em] cursor-pointer anim-hover-1 font-['SFPRO'] text-white font-[400] fixtext ml-[1em]"},Po={key:2,class:"w-full h-[80em]"},So={__name:"Home",emits:["ChangeTwixPage","selectprofile","opencomments","quotepost","selecthashtag"],setup(h,{emit:H}){const d=J(),{ScrollPage:$,MyProfile:o}=G(d),{t:w}=ie(),s=H,f=R=>D(this,null,function*(){R&&s("selectprofile",R)}),C=R=>{s("quotepost",R)},g=R=>{if(!R)return console.log("No hashtag provided to SelectHashtag 2");s("selecthashtag",R)},P=k(null),y=k(0),v=k("top"),x=Te(()=>{if(!P.value)return;const R=P.value,a=R.scrollTop,u=R.scrollHeight,r=R.clientHeight,S=u-r;y.value=S>0?a/S:0,a<=5?v.value="top":a>=S-60?v.value="bottom":v.value="middle",(a+r)/u>=.5&&d.LoadTwixMore()},100);return Ce(()=>{P.value&&(P.value.addEventListener("scroll",x),setTimeout(()=>D(this,null,function*(){yield de(),x()}),100))}),ge(()=>{P.value&&P.value.removeEventListener("scroll",x)}),(R,a)=>{const u=Se("motion");return n(),i("div",uo,[A((n(),i("div",{onClick:a[0]||(a[0]=r=>s("ChangeTwixPage","createpost")),class:"h-[50em] aspect-square rounded-full absolute bottom-[10em] right-[14em] z-[5] bg-white flex items-center justify-center cursor-pointer anim-hover-1",initial:{opacity:0,scale:0},enter:{opacity:1,scale:1,transition:{delay:300,duration:400,type:"spring",stiffness:200,damping:15}}},a[5]||(a[5]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-[30%]",viewBox:"0 0 20 20",fill:"none"},[e("path",{d:"M10 0.5C10.8285 0.5 11.5 1.17157 11.5 2V8.5H18C18.8285 8.5 19.5 9.17153 19.5 10C19.5 10.8285 18.8285 11.5 18 11.5H11.5V18C11.5 18.8285 10.8285 19.5 10 19.5C9.17153 19.5 8.5 18.8285 8.5 18V11.5H2C1.17157 11.5 0.5 10.8285 0.5 10C0.5 9.17152 1.17157 8.5 2 8.5H8.5V2C8.5 1.17157 9.17152 0.5 10 0.5Z",fill:"black",stroke:"black","stroke-width":"0.5"})],-1)]))),[[u]]),e("div",fo,[e("div",mo,[e("div",ho,[A((n(),i("div",xo,[e("img",{onClick:a[1]||(a[1]=r=>s("selectprofile",t(o).username)),src:t(o).profilephoto,alt:"",class:"w-full h-full rounded-full object-cover object-center"},null,8,wo)])),[[u]]),A((n(),i("div",po,[e("img",{src:t(O)["twix/twixlogo.svg"],class:"h-[70%]",alt:""},null,8,vo)])),[[u]]),e("div",go,[A(e("img",{onClick:a[2]||(a[2]=r=>s("ChangeTwixPage","topics")),src:t(O)["twix/search.svg"],class:"h-[60%] cursor-pointer anim-hover-1 mr-[15em]",alt:"",initial:{opacity:0,scale:.8},enter:{opacity:1,scale:1,transition:{delay:200,duration:300}}},null,8,_o),[[u]]),A(e("img",{onClick:a[3]||(a[3]=r=>s("ChangeTwixPage","notification")),src:t(O)["twix/notification.svg"],class:"h-[60%] cursor-pointer anim-hover-1 mr-[7em]",alt:"",initial:{opacity:0,scale:.8},enter:{opacity:1,scale:1,transition:{delay:250,duration:300}}},null,8,Co),[[u]])])])])]),e("div",{class:z(["w-full h-[calc(100%-81em)] overflow-auto no-scrollbar",[v.value==="top"?"mask-bottom":"",v.value==="middle"?"mask-both":"",v.value==="bottom"?"mask-top":""]]),ref_key:"scrollContainer",ref:P},[t($).twix.loadedData.length>0?(n(!0),i(ne,{key:0},ce(t($).twix.loadedData,(r,S)=>(n(),i("div",bo,[A((n(),i("div",{class:"w-full",initial:{opacity:0,y:15},enter:{opacity:1,y:0,transition:{delay:100+S*50,duration:300}}},[Y($e,{postdata:r,onSelectprofile:f,onOpencomments:a[4]||(a[4]=V=>s("ChangeTwixPage","comment")),onQuotepost:C,onSelecthashtag:g},null,8,["postdata"])],8,yo)),[[u]])]))),256)):M("",!0),t($).twix.loadedData.length===0?(n(),i("div",$o,[e("p",ko,m(t(w)("twix.noPostsYet")),1)])):M("",!0),t($).twix.loadedData.length>0?(n(),i("div",Po)):M("",!0)],2)])}}},To=me(So,[["__scopeId","data-v-ae326d21"]]),jo={class:"w-full h-full"},Mo={class:"w-full h-full"},Lo={class:"w-full h-[124em] flex items-end justify-center"},Fo=["src"],Ro={class:"w-full h-[88em] flex items-end justify-center"},Oo={style:{"letter-spacing":"0.6px"},class:"text-[26em] font-['SFPRO'] text-white font-[400] uppercase text-center leading-[100%]"},Ho={class:"w-full h-[56em] flex items-center justify-center"},Do={style:{"letter-spacing":"-0.2px"},class:"text-[12.5em] font-['SFPRO'] text-white font-[500] text-center leading-[100%]"},Eo={class:"w-full h-[185em] flex flex-col justify-start"},No={class:"w-full"},Io={class:"w-full h-[32em] flex items-center justify-center"},qo=["placeholder"],Vo={class:"w-full"},Ao={class:"w-full h-[32em] flex mt-[12em] items-center justify-center"},Zo=["placeholder"],Uo={class:"w-full"},Bo={class:"w-full h-[32em] mt-[12em] flex items-center justify-center"},Wo=["placeholder"],Yo={class:"w-full"},zo={class:"w-full h-[32em] mt-[12em] flex items-center justify-center"},Go=["placeholder"],Xo={class:"w-full h-[185em] flex flex-col justify-start"},Qo={class:"w-full"},Ko={class:"w-full h-[32em] flex items-center justify-center"},Jo=["placeholder"],el={class:"w-full"},tl={class:"w-full h-[32em] mt-[10em] flex items-center justify-center"},sl=["placeholder"],ol={class:"w-full h-[30em] flex items-center justify-center"},ll={class:"text-[10em] font-['SFPRO'] text-[#3A91FF] font-[400] text-center leading-[100%] cursor-pointer anim-hover-1",style:{"letter-spacing":"-0.23px"}},nl={class:"w-full h-[10em] flex items-center justify-center"},il={class:"text-[10em] font-['SFPRO'] text-white/50 font-[400] text-center leading-[100%] cursor-pointer anim-hover-1",style:{"letter-spacing":"-0.23px"}},al={key:0,class:"w-full h-[50em] flex items-center justify-center"},rl={class:"text-[11em] font-['SFPRO'] text-white/50 font-[300] text-center leading-[100%] cursor-pointer anim-hover-1"},cl={class:"text-[12em] font-['SFPRO'] text-black font-[400] text-center leading-[100%] mt-[1px]",style:{"letter-spacing":"-0.23px"}},ul={__name:"LoginAndSign",emits:["ChangeTwixPage"],setup(h,{emit:H}){const d=fe(),$=J(),{t:o}=ie(),w=k({name:"",username:"",password:"",passwordConfirm:""}),s=k({username:"",password:""}),f=k(!1),C=k({register:{},login:{}}),g=()=>{C.value.register={};let a=!0;return w.value.name.trim()||(d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o("twix.nameRequired")}),a=!1),w.value.username.trim()||(d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o("twix.usernameRequired")}),a=!1),w.value.password?w.value.password.length<6&&(d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o("twix.passwordTooShort")}),a=!1):(d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o("twix.passwordRequired")}),a=!1),w.value.passwordConfirm||(d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o("twix.confirmPassword")}),a=!1),w.value.password&&w.value.passwordConfirm&&w.value.password!==w.value.passwordConfirm&&(d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o("twix.passwordsDoNotMatch")}),a=!1),a},P=()=>{C.value.login={};let a=!0;return s.value.username.trim()||(d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o("twix.usernameRequired")}),a=!1),s.value.password||(d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o("twix.passwordRequired")}),a=!1),a},y=()=>D(this,null,function*(){if(f.value){if(g()){let a=yield B("TWIX_REGISTER",w.value);a&&a.success?(w.value={name:"",username:"",password:"",passwordConfirm:""},f.value=!1):a&&!a.success&&a.message?d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o(a.message)||a.message||o("twix.registrationError")}):d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o("twix.registrationError")})}}else if(P()){let a=yield B("TWIX_LOGIN",s.value);a&&a.success?($.SetUserData(a.data),s.value={username:"",password:""},R("ChangeTwixPage","home")):a&&!a.success&&a.message?d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o(a.message)||a.message||o("general.loginError")}):d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o("general.loginError")})}}),v=()=>{f.value=!f.value,C.value={register:{},login:{}}},x=_e(()=>!w.value.password||!w.value.passwordConfirm?null:w.value.password===w.value.passwordConfirm),R=H;return(a,u)=>(n(),i("div",jo,[e("div",Mo,[e("div",Lo,[e("img",{src:t(O)["twix/twixlogo.svg"],alt:"",class:"h-[41%]"},null,8,Fo)]),e("div",Ro,[e("span",Oo,[we(m(t(o)("twix.happening"))+" ",1),u[6]||(u[6]=e("br",null,null,-1)),we(" "+m(t(o)("twix.now")),1)])]),e("div",Ho,[e("span",Do,m(t(o)("twix.joinTwixToday")),1)]),A(e("div",Eo,[e("div",No,[e("div",Io,[e("div",{class:z(["w-[83%] h-full flex items-center outline outline-1 outline-offset-[-2px] rounded-[10em]",C.value.register.name?"outline-red-500":"outline-white/20"])},[A(e("input",{"onUpdate:modelValue":u[0]||(u[0]=r=>w.value.name=r),maxlength:15,placeholder:t(o)("twix.name"),type:"text",class:"w-full h-full border-none outline-none bg-transparent text-[12em] text-white ml-[1em] placeholder:text-white/50",style:{"letter-spacing":"-0.23px"}},null,8,qo),[[re,w.value.name]])],2)])]),e("div",Vo,[e("div",Ao,[e("div",{class:z(["w-[83%] h-full flex items-center outline outline-1 outline-offset-[-2px] rounded-[10em]",C.value.register.username?"outline-red-500":"outline-white/20"])},[A(e("input",{"onUpdate:modelValue":u[1]||(u[1]=r=>w.value.username=r),placeholder:t(o)("twix.username"),maxlength:15,type:"text",class:"w-full h-full border-none outline-none bg-transparent text-[12em] text-white ml-[1em] placeholder:text-white/50",style:{"letter-spacing":"-0.23px"}},null,8,Zo),[[re,w.value.username]])],2)])]),e("div",Uo,[e("div",Bo,[e("div",{class:z(["w-[83%] h-full flex items-center outline outline-1 outline-offset-[-2px] rounded-[10em]",C.value.register.password?"outline-red-500":"outline-white/20"])},[A(e("input",{"onUpdate:modelValue":u[2]||(u[2]=r=>w.value.password=r),placeholder:t(o)("twix.password"),maxlength:15,type:"password",class:"w-full h-full border-none outline-none bg-transparent text-[12em] text-white ml-[1em] placeholder:text-white/50",style:{"letter-spacing":"-0.23px"}},null,8,Wo),[[re,w.value.password]])],2)])]),e("div",Yo,[e("div",zo,[e("div",{class:z(["w-[83%] h-full flex items-center outline outline-1 outline-offset-[-2px] rounded-[10em]",C.value.register.passwordConfirm||x.value===!1?"outline-red-500":x.value===!0?"outline-green-500":"outline-white/20"])},[A(e("input",{"onUpdate:modelValue":u[3]||(u[3]=r=>w.value.passwordConfirm=r),placeholder:t(o)("twix.passwordAgain"),type:"password",maxlength:15,class:"w-full h-full border-none outline-none bg-transparent text-[12em] text-white ml-[1em] placeholder:text-white/50",style:{"letter-spacing":"-0.23px"}},null,8,Go),[[re,w.value.passwordConfirm]])],2)])])],512),[[Pe,f.value]]),A(e("div",Xo,[e("div",Qo,[e("div",Ko,[e("div",{class:z(["w-[83%] h-full flex items-center outline outline-1 outline-offset-[-2px] rounded-[10em]",C.value.login.username?"outline-red-500":"outline-white/20"])},[A(e("input",{"onUpdate:modelValue":u[4]||(u[4]=r=>s.value.username=r),placeholder:t(o)("twix.username"),type:"text",maxlength:15,class:"w-full h-full border-none outline-none bg-transparent text-[12em] text-white ml-[1em] placeholder:text-white/50",style:{"letter-spacing":"-0.23px"}},null,8,Jo),[[re,s.value.username]])],2)])]),e("div",el,[e("div",tl,[e("div",{class:z(["w-[83%] h-full flex items-center outline outline-1 outline-offset-[-2px] rounded-[10em]",C.value.login.password?"outline-red-500":"outline-white/20"])},[A(e("input",{"onUpdate:modelValue":u[5]||(u[5]=r=>s.value.password=r),placeholder:t(o)("twix.password"),type:"password",maxlength:15,class:"w-full h-full border-none outline-none bg-transparent text-[12em] text-white ml-[1em] placeholder:text-white/50",style:{"letter-spacing":"-0.23px"}},null,8,sl),[[re,s.value.password]])],2)])]),e("div",ol,[e("span",ll,m(t(o)("twix.forgotPassword")),1)]),e("div",nl,[e("p",il,[we(m(t(o)("twix.dontHaveAccount"))+" ",1),e("span",{class:"text-white font-[500]",onClick:v},m(t(o)("twix.signUp")),1)])])],512),[[Pe,!f.value]]),f.value?(n(),i("div",al,[e("p",rl,[we(m(t(o)("twix.alreadyHaveAccount"))+" ",1),e("span",{class:"text-white font-[400]",onClick:v},m(t(o)("twix.signIn")),1)])])):M("",!0),e("div",{class:z([f.value?"mt-[30em]":"mt-[80em]","w-full h-[84em] flex items-end justify-center"])},[e("div",{class:"w-[83%] h-[45%] rounded-[8em] bg-white flex items-center justify-center cursor-pointer anim-hover-1",onClick:y},[e("span",cl,m(f.value?t(o)("twix.signUp"):t(o)("twix.signIn")),1)])],2)])]))}},dl={class:"w-full h-full relative bg-black"},fl={class:"w-full h-[13%] flex items-end border-b-[1px] border-white/10"},ml={class:"w-full h-[50%] flex items-center justify-center relative"},hl=["src"],xl={class:"text-[13em] font-['SFPRO'] text-white font-[700] text-center leading-[100%] mt-[1px]",initial:{opacity:0,y:-10},enter:{opacity:1,y:0,transition:{delay:150,duration:300}}},wl={class:"w-full h-[calc(100%-8em)] z-[20] relative overflow-auto no-scrollbar"},pl={class:"w-[47em] h-full flex items-start justify-center pt-[13em] pl-[7em]"},vl={key:0,class:"h-[16em]",viewBox:"0 0 23 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},gl={key:1,class:"h-[16em]",viewBox:"0 0 27 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_l={key:2,class:"h-[20em]",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Cl={key:3,class:"h-[15em]",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},bl={class:"w-[180em] h-full"},yl=["onClick"],$l=["src"],kl=["onClick"],Pl={class:"w-full h-[20em] flex items-end min-w-0"},Sl={class:"text-[11em] font-['SFPRO'] text-white font-[400] leading-[100%] whitespace-nowrap flex-shrink-0"},Tl={class:"text-[10em] font-['SFPRO'] text-white/50 font-[400] leading-[100%] ml-[0.5em] truncate min-w-0"},jl={class:"w-[62em] h-[63em] flex items-end justify-end"},Ml={class:"text-[9em] font-['SFPRO'] text-white/50 font-[400] overflow-hidden break-words leading-[100%]"},Ll={__name:"Notification",emits:["ChangeTwixPage","opencomments","selectprofile"],setup(h,{emit:H}){const d=H,$=fe(),o=J(),{Activities:w}=G(o),{t:s}=ie(),f=v=>{let x=parseInt(v);if(x.toString().length===10&&(x*=1e3),isNaN(x)||x<=0)return s("twix.timeUnknown");const a=Date.now()-x;if(a<0)return s("twix.timeNow");const u=Math.floor(a/1e3),r=Math.floor(u/60),S=Math.floor(r/60),V=Math.floor(S/24),W=Math.floor(V/7),ee=Math.floor(V/30),E=Math.floor(V/365);return u<10?s("twix.timeNow"):u<60?s("twix.timeSeconds",{count:u}):r<60?s("twix.timeMinutes",{count:r}):S<24?s("twix.timeHours",{count:S}):V<7?V===1?s("twix.timeYesterday"):s("twix.timeDays",{count:V}):W<4?s("twix.timeWeeks",{count:W}):ee<12?s("twix.timeMonths",{count:ee}):s("twix.timeYears",{count:E})},C=v=>{switch(v){case"follow":return s("twix.notificationFollowedYou");case"post_like":return s("twix.notificationLikedYourPost");case"reposted":return s("twix.notificationRepostedYourPost");case"quote":return s("twix.notificationQuotedYourPost");default:return s("twix.notificationUnknownAction")}},g=v=>D(this,null,function*(){if(!v)return;(yield o.getPostComment(v))||$.TriggerNotification({appname:"twix",header:s("twix.title"),message:s("twix.failedLoadComments")}),d("opencomments")}),P=v=>{switch(v.action){case"follow":d("selectprofile",v.username);break;case"post_like":g(v.post_id);break;case"reposted":g(v.post_id);break;case"quote":g(v.post_id);break;default:console.log("Unknown action type in OpenAction:",v.action);break}},y=v=>{v&&d("selectprofile",v)};return(v,x)=>{const R=Se("motion");return n(),i("div",dl,[e("div",fl,[e("div",ml,[A(e("img",{onClick:x[0]||(x[0]=a=>d("ChangeTwixPage","home")),src:t(O)["icons/goback.svg"],class:"absolute left-[20em] h-[30%] cursor-pointer anim-hover-1",alt:"",initial:{opacity:0,x:-10},enter:{opacity:1,x:0,transition:{delay:100,duration:300}}},null,8,hl),[[R]]),A((n(),i("span",xl,[we(m(t(s)("notifications.title")),1)])),[[R]])])]),e("div",wl,[(n(!0),i(ne,null,ce(t(w),(a,u)=>(n(),i("div",{key:a.id||u,class:"w-full inline-flex border-b-[1px] border-white/10"},[e("div",pl,[a.action==="follow"?(n(),i("svg",vl,x[1]||(x[1]=[e("path",{d:"M19.2907 15.2533C21.26 17.36 22.4453 20.32 22.8 23.8667L22.9467 25.3333H0L0.146667 23.8667C0.501333 20.32 1.68667 17.36 3.656 15.2533C5.64267 13.1333 8.33733 12 11.4733 12C14.6093 12 17.304 13.1333 19.2907 15.2533ZM11.4733 0C8.528 0 6.14 2.38667 6.14 5.33333C6.14 8.28 8.528 10.6667 11.4733 10.6667C14.4187 10.6667 16.8067 8.28 16.8067 5.33333C16.8067 2.38667 14.4187 0 11.4733 0Z",fill:"#0A84FF"},null,-1)]))):M("",!0),a.action==="post_like"?(n(),i("svg",gl,x[2]||(x[2]=[e("path",{d:"M25.1791 12.9176C23.3777 16.2243 19.8444 19.7443 14.0071 23.1443L13.3364 23.5443L12.6644 23.1443C6.82574 19.7443 3.29241 16.2243 1.48841 12.9176C-0.324921 9.58426 -0.391588 6.43759 0.803079 4.02426C1.98575 1.63759 4.33241 0.144261 6.93775 0.010928C9.13908 -0.109072 11.4284 0.757595 13.3351 2.69093C15.2404 0.757595 17.5297 -0.109072 19.7297 0.010928C22.3351 0.144261 24.6817 1.63759 25.8644 4.02426C27.0591 6.43759 26.9924 9.58426 25.1791 12.9176Z",fill:"#F91880"},null,-1)]))):M("",!0),a.action==="reposted"?(n(),i("svg",_l,x[3]||(x[3]=[e("path",{d:"M5.99967 5.17188L11.909 10.6919L10.0903 12.6385L7.333 10.0652V21.3319C7.333 22.7985 8.52767 23.9985 9.99967 23.9985H17.333V26.6652H9.99967C7.05433 26.6652 4.66633 24.2785 4.66633 21.3319V10.0652L1.909 12.6385L0.090332 10.6919L5.99967 5.17188ZM21.9997 7.99854H14.6663V5.33187H21.9997C24.945 5.33187 27.333 7.71854 27.333 10.6652V21.9319L30.0903 19.3585L31.909 21.3052L25.9997 26.8252L20.0903 21.3052L21.909 19.3585L24.6663 21.9319V10.6652C24.6663 9.19854 23.4717 7.99854 21.9997 7.99854Z",fill:"#53FE84"},null,-1)]))):M("",!0),a.action==="quote"?(n(),i("svg",Cl,x[4]||(x[4]=[e("path",{d:"M14.9733 0.977C16.28 -0.325667 18.3867 -0.325667 19.6933 0.977L24.2 5.481C25.4933 6.78367 25.4933 8.893 24.2 10.1957L9.21333 25.1717H0V15.953L14.9733 0.977ZM17.8 2.86233C17.5467 2.60233 17.12 2.60233 16.8667 2.86233L2.66667 17.057V22.505H8.12L22.3067 8.31033C22.5733 8.049 22.5733 7.62767 22.3067 7.36633L17.8 2.86233ZM15.6667 22.505L13 25.1717H24V22.505H15.6667Z",fill:"#53FE84"},null,-1)]))):M("",!0)]),e("div",bl,[e("div",{onClick:r=>y(a.username),class:"w-full h-[44em] flex items-end justify-start cursor-pointer anim-hover-1"},[e("img",{src:a.profilephoto,class:"h-[32em] aspect-square rounded-full object-cover object-center",alt:""},null,8,$l)],8,yl),e("div",{onClick:r=>P(a),class:"w-full flex flex-col items-start justify-start pb-[10em] cursor-pointer anim-hover-1"},[e("div",Pl,[e("span",Sl,m(a.name),1),e("span",Tl,m(C(a.action)),1)])],8,kl)]),e("div",jl,[e("span",Ml,m(f(a.created_at)),1)])]))),128)),x[5]||(x[5]=e("div",{class:"w-full h-[60em]"},null,-1))])])}}},Fl={class:"w-full h-full relative bg-black overflow-auto no-scrollbar"},Rl={class:"w-full bg-white dark:bg-[#1a1a1a] shadow-[0px_-4px_20px_rgba(0,0,0,0.15)]",style:{height:"250em"}},Ol={class:"w-full h-[80em] flex items-end justify-between px-[14em] border-b-[1px] border-white/10"},Hl={style:{"letter-spacing":"-0.28px"},class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[100%]"},Dl={style:{"letter-spacing":"-0.28px"},class:"text-[10em] font-['SFPRO'] text-black font-[700] leading-[100%]"},El={class:"w-full inline-flex flex-col"},Nl={class:"w-full h-[130em] flex"},Il={class:"w-[16.5%] h-full flex justify-center"},ql=["src"],Vl={class:"w-[82%] h-full flex items-center justify-center py-[10em] relative"},Al=["data-placeholder"],Zl={key:0,class:"flex items-center justify-center px-4 py-3"},Ul={class:"text-white/50 font-['SFPRO'] text-[10px] ml-2"},Bl={key:1,class:"px-4 py-3"},Wl={class:"text-white/50 font-['SFPRO'] text-[10px] text-center"},Yl={key:2,class:"px-4 py-3"},zl={class:"text-white/50 font-['SFPRO'] text-[10px] text-center"},Gl=["onClick"],Xl={class:"w-6 h-6 rounded-full bg-gray-600 flex items-center justify-center mr-2"},Ql=["src","alt"],Kl=["src"],Jl={class:"flex items-center flex-1 min-w-0"},en={class:"text-white font-['SFPRO'] text-[11px] truncate"},tn=["src"],sn={class:"text-white/50 font-['SFPRO'] text-[9px] ml-[4px] truncate"},on={key:0,class:"w-full inline-flex items-center justify-center py-[10em] pb-[25em]"},ln={class:"w-[90%] inline-flex flex-col rounded-[15em] border-[1px] pt-[7px] border-[#FFFFFF26] overflow-hidden"},nn={class:"w-full h-[35em] flex items-center justify-start px-[10px]"},an=["src"],rn={class:"text-[11em] font-['SFPRO'] text-white font-[400] leading-[100%] max-w-[10em] truncate cursor-pointer anim-hover-1 ml-[5px]"},cn=["src"],un={class:"text-[10em] font-['SFPRO'] text-white/50 font-[400] leading-[110%] max-w-[10em] fixtext mt-[0px] ml-[3px]"},dn={class:"text-[9em] font-['SFPRO'] text-white/50 font-[300] leading-[110%] max-w-[10em] fixtext ml-[3px]"},fn={class:"w-full inline-flex px-[10px] mt-[6px]"},mn=["innerHTML"],hn={key:0,class:"w-full h-full"},xn=["src"],wn={key:1,class:"w-full h-full relative bg-black"},pn=["src"],vn={class:"absolute inset-0 flex items-center justify-center pointer-events-none"},gn={class:"w-[35px] h-[35px] rounded-full flex items-center justify-center group-hover:scale-110 transition-transform duration-200"},_n=["src"],Cn={class:"w-full h-[30em] flex items-center justify-between border-b-[1px] border-white/10"},bn={class:"w-[50%] h-full flex cursor-pointer anim-hover-1 items-center"},yn={xmlns:"http://www.w3.org/2000/svg",class:"ml-[13em] h-[50%]",viewBox:"0 0 18 18",fill:"none"},$n=["fill"],kn={class:"w-[50%] h-full flex items-center justify-end"},Pn={class:"mr-[30em] flex items-center space-x-2"},Sn={key:1,class:"w-full h-[150em] bordered flex items-center justify-center mt-[10em] px-[10em]"},Tn=["src"],jn={key:1,class:"w-full h-full relative bg-black"},Mn=["src"],Ln={class:"absolute inset-0 flex items-center justify-center pointer-events-none"},Fn={class:"w-[35px] h-[35px] rounded-full flex items-center justify-center group-hover:scale-110 transition-transform duration-200"},Rn=["src"],On=300,Hn={__name:"CreatePost",props:{quotePostId:{type:[String,Number,null],default:null}},emits:["cancel","ChangeTwixPage","goback"],setup(h,{emit:H}){const d=fe(),$=J(),{t:o}=ie(),{ScrollPage:w,MyProfile:s}=G($),f=k(!1),C=H,g=k(null),P=k(""),y=k(!1),v=h,x=k(null),R=k(!1),a=k(""),u=k({top:0,left:0}),r=k(0),S=k([]),V=k(!1),W=k(null),ee=p=>D(this,null,function*(){if(p.length<2){S.value=[];return}try{V.value=!0;const _=yield B("SEARCH_USERS_TWIX",{query:p,limit:10});_.success&&_.users?S.value=_.users:S.value=[]}catch(_){console.error("Kullanıcı arama hatası:",_),S.value=[]}finally{V.value=!1}}),E=p=>{W.value&&clearTimeout(W.value),W.value=setTimeout(()=>{ee(p)},On)};be(a,p=>{p.length>=2?E(p):(S.value=[],W.value&&clearTimeout(W.value))});const L=_e(()=>S.value.slice(0,5)),q=p=>{g.value=p},j=p=>p?[".mp4",".webm",".ogg",".mov",".avi",".mkv",".flv",".wmv"].some(F=>p.toLowerCase().includes(F)):!1,l=()=>D(this,null,function*(){if(y.value)return;y.value=!0;let p=yield B("CREATE_TWIX_POST",{content:P.value,media:g.value,quotePostId:v.quotePostId||null});p.success?(C("goback"),ue.value=!1,y.value=!1,x.value.innerHTML="",P.value="",g.value=null):(y.value=!1,d.TriggerNotification({appname:"twix",header:o("twix.title"),message:o(p==null?void 0:p.message)||(p==null?void 0:p.message)||o("twix.postCreateError")}))}),c=p=>{const _=document.createElement("div");return _.innerHTML=p,_.textContent||_.innerText||""},b=p=>{if(!p)return"";let F=c(p).replace(/(#[a-zA-Z0-9_üğıöçşÜĞİÖÇŞ]+)/g,'$1');return F=F.replace(/(@[a-zA-Z0-9_üğıöçşÜĞİÖÇŞ]+)/g,'$1'),F},T=()=>{const p=window.getSelection();if(p.rangeCount===0)return 0;const _=p.getRangeAt(0),F=_.cloneRange();return F.selectNodeContents(x.value),F.setEnd(_.endContainer,_.endOffset),F.toString().length},Z=p=>{const _=window.getSelection(),F=document.createRange();let N=0;const I=document.createTreeWalker(x.value,NodeFilter.SHOW_TEXT,null,!1);let U;for(;U=I.nextNode();){const se=N+U.textContent.length;if(p<=se){F.setStart(U,p-N),F.setEnd(U,p-N),_.removeAllRanges(),_.addRange(F);return}N=se}},X=(p,_)=>{let F=-1;for(let N=_-1;N>=0;N--){if(p[N]==="@"){F=N;break}if(p[N]===" "||p[N]===`
`)break}if(F!==-1){const N=p.substring(F+1,_);if(/^[a-zA-Z0-9_üğıöçşÜĞİÖÇŞ]*$/.test(N))return{isActive:!0,query:N,startPos:F}}return{isActive:!1}},Q=()=>{const p=window.getSelection();if(p.rangeCount===0)return{top:0,left:0};const F=p.getRangeAt(0).getBoundingClientRect(),N=x.value.getBoundingClientRect();let I=F.bottom-N.top+5,U=F.left-N.left;const se=Math.min(L.value.length*10,100),ae=200,xe=x.value.clientWidth,ye=x.value.clientHeight;return I+se>ye&&(I=F.top-N.top-se-5,I<0&&(I=5)),U+ae>xe&&(U=xe-ae-10,U<0&&(U=5)),{top:I,left:U}},te=p=>{const _=P.value,F=T();let N=-1;for(let I=F-1;I>=0;I--)if(_[I]==="@"){N=I;break}if(N!==-1){const I=_.substring(0,N),U=_.substring(F),se=I+"@"+p.username+" "+U;P.value=se;const ae=b(se);x.value.innerHTML=ae;const xe=N+p.username.length+2;de(()=>{Z(xe)})}R.value=!1,a.value="",r.value=0,S.value=[]},he=p=>{const _=p.target.innerText||"";if(_.length>800){const I=_.substring(0,800);p.target.innerText=I,P.value=I;return}P.value=_;const F=T(),N=X(_,F);if(N.isActive?(a.value=N.query,N.query.length>=2||S.value.length>0?(R.value=!0,r.value=0,de(()=>{const I=Q();u.value=I})):R.value=!1):(R.value=!1,a.value="",S.value=[]),_.includes("#")||_.includes("@")){const I=b(_);if(p.target.innerHTML!==I){const U=T();p.target.innerHTML=I,de(()=>{Z(U)})}}},pe=p=>{p.preventDefault();const _=p.clipboardData.getData("text/plain");document.execCommand("insertText",!1,_)},ke=p=>{if(R.value){switch(p.key){case"ArrowDown":p.preventDefault(),r.value=Math.min(r.value+1,L.value.length-1);break;case"ArrowUp":p.preventDefault(),r.value=Math.max(r.value-1,0);break;case"Enter":case"Tab":p.preventDefault(),L.value[r.value]&&te(L.value[r.value]);break;case"Escape":p.preventDefault(),R.value=!1,a.value="",S.value=[];break}return}p.target.innerText.length>=800&&p.key.length===1&&!p.ctrlKey&&!p.metaKey&&p.preventDefault()},Le=p=>{p.target.closest(".mention-dropdown")||(R.value=!1,a.value="",S.value=[])};Ce(()=>{document.addEventListener("click",Le)}),ge(()=>{document.removeEventListener("click",Le),ue.value=!1,W.value&&clearTimeout(W.value)});const Ee=p=>{if(!p||p.length===0)return"";const _=/(#\w+|@\w+)/g,F=I=>{const U=document.createElement("div");return U.textContent=I,U.innerHTML};return p.split(_).map(I=>I.match(_)?`${F(I)}`:F(I)).join("")},K=_e(()=>v.quotePostId&&w.value.twix.loadedData.find(_=>_.post_id===v.quotePostId)||null),Ne=p=>{let _=parseInt(p);if(_.toString().length===10&&(_*=1e3),isNaN(_)||_<=0)return o("twix.timeUnknown");const N=Date.now()-_;if(N<0)return o("twix.timeNow");const I=Math.floor(N/1e3),U=Math.floor(I/60),se=Math.floor(U/60),ae=Math.floor(se/24),xe=Math.floor(ae/7),ye=Math.floor(ae/30),Ve=Math.floor(ae/365);return I<10?o("twix.timeNow"):I<60?o("twix.timeSeconds",{count:I}):U<60?o("twix.timeMinutes",{count:U}):se<24?o("twix.timeHours",{count:se}):ae<7?ae===1?o("twix.timeYesterday"):o("twix.timeDays",{count:ae}):xe<4?o("twix.timeWeeks",{count:xe}):ye<12?o("twix.timeMonths",{count:ye}):o("twix.timeYears",{count:Ve})},ue=k(!1),Ie=p=>{if(!x.value)return;const _=P.value,F=T(),N=_.substring(0,F)+p+_.substring(F);P.value=N;const I=b(N);x.value.innerHTML=I,de(()=>{Z(F+p.length),x.value.focus()})},qe=()=>{ue.value=!ue.value,ue.value&&de(()=>{x.value.focus()})};return(p,_)=>(n(),i("div",Fl,[ue.value?(n(),i("div",{key:0,class:"absolute bottom-0 left-0 right-0 z-40 transition-transform duration-300 ease-out",style:ve({transform:ue.value?"translateY(0)":"translateY(250px)"})},[e("div",Rl,[Y(je,{show:ue.value,onSelectEmoji:Ie,onClose:qe},null,8,["show"])])],4)):M("",!0),e("div",Ol,[e("div",{onClick:_[0]||(_[0]=F=>C("ChangeTwixPage","home")),class:"inline-flex h-[26%] px-[10em] mb-[12em] items-center justify-center border-[1px] border-white/30 rounded-full cursor-pointer anim-hover-1"},[e("p",Hl,m(t(o)("general.cancel")),1)]),g.value||P.value.length>3?(n(),i("div",{key:0,onClick:l,class:"inline-flex h-[26%] px-[10em] mb-[12em] items-center justify-center bg-white rounded-full cursor-pointer anim-hover-1"},[e("p",Dl,m(t(o)("twix.post")),1)])):M("",!0)]),e("div",El,[e("div",Nl,[e("div",Il,[e("img",{src:t(s).profilephoto,class:"h-[26%] rounded-full object-cover object-center aspect-square mt-[7em]",alt:""},null,8,ql)]),e("div",Vl,[e("div",{ref_key:"contentEditor",ref:x,onInput:he,onPaste:pe,onKeydown:ke,contenteditable:"true",maxlength:800,"data-placeholder":t(o)("twix.whatsHappening"),style:{resize:"none","white-space":"pre-wrap","word-wrap":"break-word","overflow-wrap":"break-word","letter-spacing":"-0.1px","min-height":"100%"},class:"w-full h-full bg-transparent text-[12em] pt-[0.6em] font-['SFPRO'] text-white font-[400] leading-[100%] fixtext pl-[3px] outline-none overflow-y-auto no-scrollbar contenteditable-placeholder"},null,40,Al),R.value?(n(),i("div",{key:0,class:"mention-dropdown absolute bg-[#1E1E1E] rounded-[20px] shadow-lg z-50 overflow-y-auto no-scrollbar",style:ve({top:u.value.top+20+"px",left:u.value.left-20+"px",maxHeight:"200px",width:"200px"})},[V.value&&a.value.length>=2?(n(),i("div",Zl,[_[5]||(_[5]=e("div",{class:"w-4 h-4 border-2 border-white/20 border-t-white rounded-full animate-spin"},null,-1)),e("p",Ul,m(t(o)("twix.searching")),1)])):a.value.length<2?(n(),i("div",Bl,[e("p",Wl,m(t(o)("twix.typeAtLeast2Chars")),1)])):!V.value&&L.value.length===0&&a.value.length>=2?(n(),i("div",Yl,[e("p",zl,m(t(o)("twix.userNotFound")),1)])):(n(!0),i(ne,{key:3},ce(L.value,(F,N)=>(n(),i("div",{key:F.id,onClick:I=>te(F),class:z(["flex items-center px-2 py-2 cursor-pointer transition-colors border-b border-white/10 last:border-b-0",r.value===N?"bg-white/10":"hover:bg-white/5"])},[e("div",Xl,[F.avatar?(n(),i("img",{key:0,src:F.avatar,alt:F.displayName,class:"w-full h-full rounded-full object-cover"},null,8,Ql)):(n(),i("img",{key:1,src:t(O)["testlogo.png"],alt:"",class:"w-full h-full rounded-full object-cover"},null,8,Kl))]),e("div",Jl,[e("p",en,m(F.displayName||F.username),1),F.badge>0?(n(),i("img",{key:0,src:t(O)["twix/"+F.badge+".svg"],class:"h-[30%] ml-[4px] flex-shrink-0",alt:""},null,8,tn)):M("",!0),e("p",sn,"@"+m(F.username),1)])],10,Gl))),128))],4)):M("",!0)])]),K.value?(n(),i("div",on,[e("div",ln,[e("div",nn,[e("img",{src:K.value.profilephoto,class:"aspect-square h-[80%] rounded-full object-cover object-center",alt:""},null,8,an),e("span",rn,m(K.value.name),1),K.value.badge>0?(n(),i("img",{key:0,src:t(O)["twix/"+K.value.badge+".svg"],class:"h-[30%] ml-[4px] flex-shrink-0",alt:""},null,8,cn)):M("",!0),e("span",un,"@"+m(K.value.username),1),e("span",dn,"· "+m(Ne(K.value.date)),1)]),e("div",fn,[K.value.content.length>0?(n(),i("p",{key:0,style:{"letter-spacing":"-0.32px"},class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[110%] overflow-hidden break-words pb-[1em]",innerHTML:Ee(K.value.content)},null,8,mn)):M("",!0)]),K.value.media?(n(),i("div",hn,[t(d).isVideo(K.value.media)?(n(),i("div",wn,[e("video",{class:"w-full h-full object-cover max-h-[150px]",src:K.value.media,preload:"metadata",muted:""},"Your browser does not support the video tag.",8,pn),e("div",vn,[e("div",gn,[e("img",{src:t(O)["photos/play.svg"],class:"h-[80%]",alt:""},null,8,_n)])])])):(n(),i("img",{key:0,src:K.value.media,class:"w-full h-full max-h-[150em] object-cover object-center",loading:"lazy"},null,8,xn))])):M("",!0)])])):M("",!0),e("div",Cn,[e("div",bn,[(n(),i("svg",yn,[e("path",{d:"M0 2.5C0 1.119 1.119 0 2.5 0H15.5C16.881 0 18 1.119 18 2.5V15.5C18 16.881 16.881 18 15.5 18H2.5C1.119 18 0 16.881 0 15.5V2.5ZM2.5 2C2.224 2 2 2.224 2 2.5V11.586L5 8.586L8 11.586L13 6.586L16 9.586V2.5C16 2.224 15.776 2 15.5 2H2.5ZM16 12.414L13 9.414L8 14.414L5 11.414L2 14.414V15.5C2 15.776 2.224 16 2.5 16H15.5C15.776 16 16 15.776 16 15.5V12.414ZM6.75 4C5.784 4 5 4.784 5 5.75C5 6.716 5.784 7.5 6.75 7.5C7.716 7.5 8.5 6.716 8.5 5.75C8.5 4.784 7.716 4 6.75 4Z",fill:g.value?"#ED6A6A":"#FFFFFF"},null,8,$n)])),g.value?(n(),i("p",{key:1,onClick:_[2]||(_[2]=F=>g.value=null),style:{"letter-spacing":"-0.28px"},class:"text-[10em] font-['SFPRO'] text-[#ED6A6A] font-[500] leading-[100%] ml-[0.7em] cursor-pointer anim-hover-1"},m(t(o)("twix.removePicture")),1)):(n(),i("p",{key:0,onClick:_[1]||(_[1]=F=>f.value=!0),style:{"letter-spacing":"-0.28px"},class:"text-[11.4em] font-['SFPRO'] text-white font-[500] leading-[100%] ml-[0.7em]"},m(t(o)("twix.addPicture")),1))]),e("div",kn,[e("div",Pn,[e("p",{class:z([P.value.length>750?"text-red-400":"text-white/50","text-[9em] font-['SFPRO'] mt-[0.1em] font-[400]"])},m(P.value.length)+"/800",3)]),(n(),i("svg",{onClick:_[3]||(_[3]=F=>ue.value=!ue.value),class:"mr-[10em] absolute right-0 cursor-pointer anim-hover-1 h-[2%]",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_[6]||(_[6]=[e("path",{d:"M9.99999 20C11.366 20 12.652 19.7385 13.8578 19.2156C15.0637 18.6928 16.1274 17.9706 17.049 17.049C17.9706 16.1274 18.6928 15.0637 19.2156 13.8578C19.7385 12.652 20 11.366 20 9.99999C20 8.63398 19.7385 7.34803 19.2156 6.14214C18.6928 4.93627 17.9706 3.87255 17.049 2.95097C16.1274 2.02941 15.0621 1.30719 13.8529 0.784313C12.6438 0.261438 11.3562 0 9.99018 0C8.62417 0 7.33823 0.261438 6.13235 0.784313C4.92646 1.30719 3.86437 2.02941 2.94607 2.95097C2.02778 3.87255 1.30719 4.93627 0.784313 6.14214C0.261438 7.34803 0 8.63398 0 9.99999C0 11.366 0.261438 12.652 0.784313 13.8578C1.30719 15.0637 2.02941 16.1274 2.95097 17.049C3.87255 17.9706 4.93627 18.6928 6.14214 19.2156C7.34803 19.7385 8.63398 20 9.99999 20ZM9.99999 18.3333C8.84313 18.3333 7.76143 18.1176 6.7549 17.6863C5.74836 17.2549 4.86437 16.6585 4.10293 15.8971C3.3415 15.1356 2.74673 14.2517 2.31862 13.2451C1.89052 12.2386 1.67647 11.1569 1.67647 9.99999C1.67647 8.84313 1.89052 7.76143 2.31862 6.7549C2.74673 5.74836 3.33987 4.86274 4.09803 4.09803C4.8562 3.33333 5.73855 2.73692 6.74509 2.30882C7.75163 1.88072 8.83332 1.66667 9.99018 1.66667C11.1471 1.66667 12.2288 1.88072 13.2353 2.30882C14.2418 2.73692 15.1274 3.33333 15.8922 4.09803C16.6569 4.86274 17.2549 5.74836 17.6863 6.7549C18.1176 7.76143 18.3333 8.84313 18.3333 9.99999C18.3333 11.1569 18.1193 12.2386 17.6912 13.2451C17.263 14.2517 16.6683 15.1356 15.9068 15.8971C15.1454 16.6585 14.2598 17.2549 13.2499 17.6863C12.2402 18.1176 11.1569 18.3333 9.99999 18.3333ZM9.99018 14.9117C10.6699 14.9117 11.268 14.7892 11.7843 14.5441C12.3007 14.299 12.701 14.018 12.9853 13.701C13.2696 13.384 13.4118 13.1176 13.4118 12.902C13.4118 12.7843 13.3644 12.7026 13.2696 12.6568C13.1748 12.6111 13.0752 12.6111 12.9705 12.6568C12.6176 12.8529 12.2108 13.0408 11.75 13.2205C11.2892 13.4003 10.7026 13.4902 9.99018 13.4902C9.27777 13.4902 8.69117 13.4003 8.23038 13.2205C7.7696 13.0408 7.35947 12.8529 7 12.6568C6.89542 12.6111 6.79738 12.6111 6.70588 12.6568C6.61437 12.7026 6.56862 12.7843 6.56862 12.902C6.56862 13.1176 6.71078 13.384 6.99509 13.701C7.2794 14.018 7.67973 14.299 8.19606 14.5441C8.71241 14.7892 9.31045 14.9117 9.99018 14.9117ZM7.07842 9.12744C7.39215 9.12744 7.66666 9.00163 7.90195 8.74999C8.13725 8.49835 8.2549 8.17646 8.2549 7.78431C8.2549 7.39215 8.13725 7.06862 7.90195 6.81372C7.66666 6.55882 7.39215 6.43136 7.07842 6.43136C6.77123 6.43136 6.50326 6.55882 6.2745 6.81372C6.04574 7.06862 5.93136 7.39215 5.93136 7.78431C5.93136 8.17646 6.04574 8.49835 6.2745 8.74999C6.50326 9.00163 6.77123 9.12744 7.07842 9.12744ZM12.8921 9.12744C13.2058 9.12744 13.4803 9.00163 13.7157 8.74999C13.951 8.49835 14.0686 8.17646 14.0686 7.78431C14.0686 7.39215 13.951 7.06862 13.7157 6.81372C13.4803 6.55882 13.2058 6.43136 12.8921 6.43136C12.5849 6.43136 12.317 6.55882 12.0882 6.81372C11.8594 7.06862 11.7451 7.39215 11.7451 7.78431C11.7451 8.17646 11.8594 8.49835 12.0882 8.74999C12.317 9.00163 12.5849 9.12744 12.8921 9.12744Z",fill:"white"},null,-1)])))])])]),g.value?(n(),i("div",Sn,[j(g.value)?(n(),i("div",jn,[e("video",{class:"w-full h-full object-cover rounded-[10px]",src:g.value,preload:"metadata",muted:""},"Your browser does not support the video tag.",8,Mn),e("div",Ln,[e("div",Fn,[e("img",{src:t(O)["photos/play.svg"],class:"h-[80%]",alt:""},null,8,Rn)])])])):(n(),i("img",{key:0,src:g.value,class:"w-full h-full object-cover object-center rounded-[10px]",loading:"lazy"},null,8,Tn))])):M("",!0),Y(De,{show:f.value,onSelectPhoto:q,onCancel:_[4]||(_[4]=F=>f.value=!1)},null,8,["show"]),_[7]||(_[7]=e("div",{class:"w-full h-[150px]"},null,-1))]))}},Dn=me(Hn,[["__scopeId","data-v-703eee8c"]]),En={class:"w-full h-full bg-black"},Nn={class:"w-full h-[82em] flex items-end border-b border-white/10"},In={class:"w-full h-[48%]"},qn={class:"w-full h-[83%] flex"},Vn={class:"w-[16.5%] h-full flex items-center justify-center"},An={class:"w-[78%] h-full rounded-full overflow-hidden flex bg-white/10"},Zn={class:"w-[80%] h-full"},Un=["placeholder"],Bn={class:"w-full h-[35em] flex items-end justify-start"},Wn={class:"text-white font-['SFPRO'] text-[15em] leading-[1] font-[400] ml-[0.9em]"},Yn={key:0,class:"w-full h-[calc(100%-110em)] overflow-auto no-scrollbar"},zn=["onClick"],Gn={class:"w-[90%] h-[50%] flex flex-col justify-between"},Xn={class:"text-white font-['SFPRO'] text-[11em] leading-[1] font-[400]"},Qn={class:"text-white/50 font-['SFPRO'] text-[11em] leading-[1] font-[400]"},Kn={key:1,class:"w-full h-[calc(100%-117em)] overflow-auto no-scrollbar"},Jn={class:"w-full h-[64em] flex items-center justify-center relative"},ei=["onClick"],ti={class:"h-full aspect-square rounded-full"},si=["src"],oi={class:"w-[70%] h-full flex flex-col justify-center"},li={style:{"letter-spacing":"-0.23px"},class:"text-[11em] font-['SFPRO'] font-[400] text-white leading-[1]"},ni={style:{"letter-spacing":"-0.23px"},class:"text-[10em] font-['SFPRO'] font-[400] text-white/50"},ii={class:"w-[9%] h-full flex items-center justify-end"},ai=["onClick"],ri={__name:"Topics",emits:["ChangeTwixPage","selectprofile","selecthashtag"],setup(h,{emit:H}){const d=H,$=J(),{Hashtags:o}=G($),{t:w}=ie(),s=k(""),f=k([]);k(!1);const C=k(!1),g=Te(P=>D(this,null,function*(){if(P.length>=2){C.value=!0;try{let y=yield B("SEARCH_TWIX_PROFILES",{query:P});y&&y.success&&(f.value=y.results)}catch(y){console.log("Error searching profiles:",y)}finally{C.value=!1}}else f.value=[]}),300);return be(()=>s.value,(P,y)=>{g(P)},{immediate:!1}),(P,y)=>(n(),i("div",En,[e("div",Nn,[e("div",In,[e("div",qn,[e("div",Vn,[(n(),i("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:y[0]||(y[0]=v=>d("ChangeTwixPage","home")),class:"cursor-pointer anim-hover-1 h-[40%]",viewBox:"0 0 18 16",fill:"none"},y[2]||(y[2]=[e("path",{d:"M4.41394 8.99906L9.45694 14.0391L8.04294 15.4591L0.585938 7.99906L8.04294 0.539062L9.45694 1.95906L4.41394 6.99906H17.9999V8.99906H4.41394Z",fill:"white"},null,-1)])))]),e("div",An,[y[3]||(y[3]=e("div",{class:"w-[15%] h-full flex items-center justify-center"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-[45%]",viewBox:"0 0 21 21",fill:"none"},[e("path",{d:"M9.25 2.75C5.66 2.75 2.75 5.66 2.75 9.25C2.75 12.84 5.66 15.75 9.25 15.75C11.045 15.75 12.669 15.024 13.846 13.846C15.024 12.669 15.75 11.045 15.75 9.25C15.75 5.66 12.84 2.75 9.25 2.75ZM0.75 9.25C0.75 4.556 4.556 0.75 9.25 0.75C13.944 0.75 17.75 4.556 17.75 9.25C17.75 11.236 17.068 13.065 15.926 14.512L20.707 19.293L19.293 20.707L14.512 15.926C13.065 17.068 11.236 17.75 9.25 17.75C4.556 17.75 0.75 13.944 0.75 9.25Z",fill:"white"})])],-1)),e("div",Zn,[A(e("input",{placeholder:t(w)("twix.searchProfiles"),"onUpdate:modelValue":y[1]||(y[1]=v=>s.value=v),type:"text",class:"w-full h-full mt-[-.05em] border-none outline-none bg-transparent text-[12em] text-white placeholder:text-white/40"},null,8,Un),[[re,s.value]])])])])])]),e("div",Bn,[e("p",Wn,m(s.value.length>0?t(w)("twix.searchResult"):t(w)("twix.topics")),1)]),s.value.length<=0?(n(),i("div",Yn,[(n(!0),i(ne,null,ce(t(o),v=>(n(),i("div",{onClick:x=>d("selecthashtag",v.hashtag),class:"w-full cursor-pointer anim-hover-1 h-[59em] flex items-center justify-center relative"},[y[4]||(y[4]=e("div",{class:"w-[96%] h-[1%] bg-white/20 absolute bottom-0 right-0"},null,-1)),e("div",Gn,[e("p",Xn,"#"+m(v.hashtag),1),e("p",Qn,m(t(w)("twix.postsCount",{count:v.post_count})),1)])],8,zn))),256))])):(n(),i("div",Kn,[(n(!0),i(ne,null,ce(f.value,v=>(n(),i("div",Jn,[y[6]||(y[6]=e("div",{class:"w-[95%] h-[1%] absolute right-0 bottom-0 bg-white/10"},null,-1)),e("div",{class:"w-[90%] h-[51%] cursor-pointer anim-hover-1 flex justify-between",onClick:x=>d("selectprofile",v.username)},[e("div",ti,[e("img",{class:"h-full w-full object-cover object-center rounded-full",src:v.profilephoto,alt:""},null,8,si)]),e("div",oi,[e("span",li,m(v.name),1),e("span",ni,"@"+m(v.username),1)]),e("div",ii,[(n(),i("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cursor-pointer anim-hover-1 h-[45%]",onClick:x=>d("selectprofile",v.username),viewBox:"0 0 24 24",fill:"none"},y[5]||(y[5]=[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.875 17.475C12.875 14.9345 14.9345 12.875 17.475 12.875C20.0155 12.875 22.075 14.9345 22.075 17.475C22.075 18.3798 21.8138 19.2237 21.3626 19.9351L22.5859 21.1717C22.9743 21.5643 22.9709 22.1975 22.5783 22.5859C22.1857 22.9743 21.5525 22.9709 21.1641 22.5783L19.9512 21.3523C19.2364 21.8098 18.3867 22.075 17.475 22.075C14.9345 22.075 12.875 20.0155 12.875 17.475ZM17.475 14.875C16.0391 14.875 14.875 16.0391 14.875 17.475C14.875 18.9109 16.0391 20.075 17.475 20.075C18.911 20.075 20.075 18.9109 20.075 17.475C20.075 16.0391 18.911 14.875 17.475 14.875Z",fill:"white"},null,-1),e("path",{d:"M5.625 6.375C5.625 3.4755 7.9755 1.125 10.875 1.125C13.7745 1.125 16.125 3.4755 16.125 6.375C16.125 9.27449 13.7745 11.625 10.875 11.625C7.9755 11.625 5.625 9.27449 5.625 6.375Z",fill:"white"},null,-1),e("path",{d:"M12.4795 13.2375C12.7084 13.2698 12.8018 13.5469 12.6597 13.7293C11.8543 14.7631 11.3745 16.063 11.3745 17.475C11.3745 18.9003 11.8634 20.2114 12.6825 21.2499C13.2278 21.9411 13.5004 22.2868 13.4185 22.4559C13.3365 22.625 12.9388 22.625 12.1436 22.625H6.46556C4.64725 22.625 3.24146 21.7306 2.07002 20.6146C1.391 19.9677 1.05254 19.2396 1.13734 18.4638C1.21709 17.7342 1.65574 17.1387 2.11741 16.6868C2.85558 15.9643 3.93309 15.3564 4.6459 14.9543C4.80852 14.8625 4.95227 14.7814 5.06855 14.7122C6.3734 13.9352 7.80547 13.4441 9.26995 13.2375C10.3338 13.0875 11.4156 13.0875 12.4795 13.2375Z",fill:"white"},null,-1)]),8,ai))])],8,ei)]))),256))]))]))}},ci={class:"w-full h-full bg-black"},ui={class:"h-[52em] rounded-full absolute top-[90em] left-[10em] aspect-square border-4 border-black z-[10]",initial:{opacity:0,scale:.8},enter:{opacity:1,scale:1,transition:{delay:200,duration:300}}},di=["src"],fi={class:"h-[105em] w-full flex items-center justify-center"},mi=["src"],hi=["src"],xi={key:0,class:"h-[32em] flex items-end justify-end",initial:{opacity:0,x:20},enter:{opacity:1,x:0,transition:{delay:250,duration:300}}},wi=["src"],pi={style:{"letter-spacing":"-0.28px"},class:"text-[9em] font-['SFPRO'] text-white font-[400] leading-[100%] fixtext"},vi=["src"],gi={key:1,class:"h-[32em] flex items-end justify-end",initial:{opacity:0,x:20},enter:{opacity:1,x:0,transition:{delay:250,duration:300}}},_i=["src"],Ci={style:{"letter-spacing":"-0.28px"},class:"text-[9em] font-['SFPRO'] text-black font-[400] leading-[100%] fixtext"},bi={class:"h-[29em] flex items-end",initial:{opacity:0,y:10},enter:{opacity:1,y:0,transition:{delay:300,duration:300}}},yi={style:{"letter-spacing":"-0.28px"},class:"text-[12em] font-['SFPRO'] text-white font-[400] leading-[100%] fixtext ml-[1em]"},$i=["src"],ki={class:"h-[15em] mt-[4em] flex items-center",initial:{opacity:0,y:10},enter:{opacity:1,y:0,transition:{delay:350,duration:300}}},Pi={style:{"letter-spacing":"-0.28px"},class:"text-[11em] font-['SFPRO'] text-white/50 font-[400] leading-[100%] fixtext ml-[1em]"},Si={key:2,class:"inline-flex mt-[2em] items-center",initial:{opacity:0,y:10},enter:{opacity:1,y:0,transition:{delay:400,duration:300}}},Ti={style:{"letter-spacing":"-0.28px"},class:"text-[11em] font-['SFPRO'] text-white font-[400] overflow-hidden break-words ml-[1em] leading-[2]"},ji={class:"text-[11em] cursor-pointer anim-hover-1 font-['SFPRO'] text-white font-[400] fixtext ml-[1em]"},Mi={class:"font-[300] text-white/50"},Li={class:"text-[11em] font-['SFPRO'] cursor-pointer anim-hover-1 text-white font-[400] fixtext ml-[7px]"},Fi={class:"font-[300] text-white/50"},Ri=["enter"],Oi={__name:"Profile",props:{show:{type:Boolean,default:!1}},emits:["ChangeTwixPage","goback","selectprofile","logout"],setup(h,{emit:H}){const d=fe(),$=k(!1),o=J(),{MyProfile:w}=o,{t:s}=ie(),{SelectedProfile:f}=G(o),{PhoneData:C}=G(d),g=k(!1),P=()=>{g.value=!1},y=h;be(()=>y.show,(l,c)=>D(this,null,function*(){l&&!c?yield v():!l&&c&&x()}));const v=()=>D(this,null,function*(){if(!$.value)try{$.value=!0,E.value&&(E.value.addEventListener("scroll",j),setTimeout(()=>D(this,null,function*(){yield de(),j()}),100))}catch(l){console.log("Error fetching contacts:",l)}}),x=()=>{var l;E.value&&E.value.removeEventListener("scroll",j),(l=j.cancel)==null||l.call(j)},R=H;ge(()=>{x()});const a=k(!1),u=l=>D(this,null,function*(){const c=yield B("TWIX_FOLLOW_USER",{username:l});c.success?o.FollowUserStore(l,c.followed):d.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(c.message)||c.message||s("twix.failedFollowUser")})}),r=l=>{l&&R("selectprofile",l)},S=l=>{const c=d.isVideo(l);d.setPhotoViewerData({image:l,type:c?"video":"image"})},V=()=>D(this,null,function*(){g.value=!1;const l=yield B("TWIX_LOGOUT");l.success?(o.ResetTwixData(),R("logout")):d.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(l.message)||l.message||s("twix.failedLogout")})}),W=l=>D(this,null,function*(){if(!l||l<=0){d.TriggerNotification({appname:"twix",header:s("twix.title"),message:s("twix.invalidBadge")});return}const c=yield B("TWIX_VERIFY_BADGE",{badge:l,username:f.value.profileData.username});d.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(c.message)||c.message})}),ee=()=>D(this,null,function*(){const l=yield B("TWIX_VERIFY_BADGE",{username:f.value.profileData.username,badge:0});d.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(l.message)||l.message})}),E=k(null),L=k(0),q=k("top"),j=Te(()=>{if(!E.value)return;const l=E.value,c=l.scrollTop,b=l.scrollHeight,T=l.clientHeight,Z=b-T;L.value=Z>0?c/Z:0,c<=5?q.value="top":c>=Z-60?q.value="bottom":q.value="middle",(c+T)/b>=.5&&o.LoadSelectedProfileMorePosts()},100);return Ce(()=>{E.value&&(E.value.addEventListener("scroll",j),setTimeout(()=>D(this,null,function*(){yield de(),j()}),100))}),ge(()=>{E.value&&E.value.removeEventListener("scroll",j)}),(l,c)=>{const b=Se("motion");return n(),i("div",ci,[A((n(),i("div",ui,[e("img",{src:t(f).profileData.profilephoto,class:"h-full object-cover w-full object-center anim-hover-1 rounded-full cursor-pointer",onClick:c[0]||(c[0]=T=>S(t(f).profileData.profilephoto)),alt:""},null,8,di)])),[[b]]),e("div",fi,[A(e("img",{src:t(O)["twix/back.svg"],class:"absolute left-[10em] h-[3%] cursor-pointer anim-hover-1 z-[5]",onClick:c[1]||(c[1]=T=>R("goback")),alt:"",initial:{opacity:0,x:-10},enter:{opacity:1,x:0,transition:{delay:100,duration:300}}},null,8,mi),[[b]]),e("img",{src:t(f).profileData.banner,class:"h-full object-cover w-full object-center cursor-pointer",onClick:c[2]||(c[2]=T=>S(t(f).profileData.banner)),alt:""},null,8,hi)]),t(f).profileData.username===t(w).username?A((n(),i("div",xi,[t(C).isAdmin?(n(),i("img",{key:0,onClick:c[3]||(c[3]=T=>a.value=!0),src:t(O)["twix/givebadgeadmin.svg"],class:"h-[38%] mr-[10em] cursor-pointer anim-hover-1 mb-[3em]",alt:""},null,8,wi)):M("",!0),e("div",{onClick:c[4]||(c[4]=T=>R("ChangeTwixPage","profileedit")),class:"inline-flex cursor-pointer anim-hover-1 h-[60%] items-center justify-center px-[10em] mr-[10em] rounded-full outline outline-1 outline-offset-[-1px] outline-white/20"},[e("span",pi,m(t(s)("twix.editProfile")),1)]),e("img",{onClick:c[5]||(c[5]=T=>g.value=!0),src:t(O)["twix/logout.svg"],class:"h-[38%] mr-[10em] cursor-pointer anim-hover-1 mb-[3em]",alt:""},null,8,vi)])),[[b]]):A((n(),i("div",gi,[e("img",{onClick:c[6]||(c[6]=T=>a.value=!0),src:t(O)["twix/givebadgeadmin.svg"],class:"h-[40%] mr-[10em] cursor-pointer anim-hover-1 mb-[3em]",alt:""},null,8,_i),e("div",{onClick:c[7]||(c[7]=T=>u(t(f).profileData.username)),class:"inline-flex cursor-pointer anim-hover-1 h-[60%] bg-white items-center justify-center px-[10em] mr-[10em] rounded-full outline outline-1 outline-offset-[-1px] outline-white/20"},[e("span",Ci,m(t(f).profileData.is_following?t(s)("twix.unfollow"):t(s)("twix.follow")),1)])])),[[b]]),A((n(),i("div",bi,[e("span",yi,m(t(f).profileData.name||t(s)("twix.unknown")),1),t(f).profileData.badge>0?(n(),i("img",{key:0,src:t(O)["twix/"+t(f).profileData.badge+".svg"],class:"h-[45%] ml-[4em]",alt:""},null,8,$i)):M("",!0)])),[[b]]),A((n(),i("div",ki,[e("span",Pi," @"+m(t(f).profileData.username||t(s)("twix.unknown")),1)])),[[b]]),t(f)&&t(f).profileData.bio&&t(f).profileData.bio.length>0?A((n(),i("div",Si,[e("span",Ti,m(t(f).profileData.bio),1)])),[[b]]):M("",!0),A((n(),i("div",{class:"h-[29em] flex items-center cursor-pointer",onClick:c[8]||(c[8]=T=>R("ChangeTwixPage","follow",{username:t(f).profileData.username})),initial:{opacity:0,y:10},enter:{opacity:1,y:0,transition:{delay:450,duration:300}}},[e("p",ji,[we(m(t(f).profileData.followers_count||0)+" ",1),e("span",Mi,m(t(s)("twix.followers")),1)]),c[11]||(c[11]=e("span",{style:{scale:"2"},class:"text-[10em] font-['SFPRO'] text-white/50 font-[400] leading-[100%] max-w-[120px] fixtext ml-[6px] mt-[-5px]"},"·",-1)),e("p",Li,[we(m(t(f).profileData.following_count||0)+" ",1),e("span",Fi,m(t(s)("twix.following")),1)])])),[[b]]),c[13]||(c[13]=e("div",{class:"h-[5em] border-b-[1px] border-white/20"},null,-1)),e("div",{class:z(["w-full h-[410em] overflow-auto no-scrollbar",[q.value==="top"?"mask-bottom":"",q.value==="middle"?"mask-both":"",q.value==="bottom"?"mask-top":""]]),ref_key:"scrollContainer",ref:E},[(n(!0),i(ne,null,ce(t(f).loadedData,(T,Z)=>(n(),i("div",{key:T.post_id,class:"w-full inline-flex flex-wrap content-start border-b-[1px] border-white/10"},[A((n(),i("div",{class:"w-full",initial:{opacity:0,y:15},enter:{opacity:1,y:0,transition:{delay:100+Z*50,duration:300}}},[Y($e,{postdata:T,onSelectprofile:r,onOpencomments:c[9]||(c[9]=X=>R("ChangeTwixPage","comment"))},null,8,["postdata"])],8,Ri)),[[b]])]))),128)),c[12]||(c[12]=e("div",{class:"w-full h-[150px]"},null,-1))],2),Y(Ge,{show:a.value,onCancel:c[10]||(c[10]=T=>a.value=!1),onVerify:W,onTakebadge:ee},null,8,["show"]),g.value?(n(),le(He,{key:3,header:t(s)("general.areYouSure"),label:t(s)("twix.confirmLogout"),buttons:{submit:t(s)("twix.logout"),cancel:t(s)("general.cancel")},onSubmit:V,onCancel:P},null,8,["header","label","buttons"])):M("",!0)])}}},Hi=me(Oi,[["__scopeId","data-v-aeef7201"]]),Di={key:0,class:"w-full h-full relative bg-black"},Ei={class:"w-full h-[55em] absolute bottom-0 flex items-start justify-center"},Ni={class:"text-[11em] font-['SFPRO'] text-black font-[400] fixtext"},Ii={class:"h-[48em] rounded-full absolute top-[90em] left-[10em] aspect-square border-2 border-black flex items-center justify-center"},qi=["src"],Vi=["src"],Ai={class:"h-[105em] w-full flex items-center justify-center"},Zi=["src"],Ui=["src"],Bi=["src"],Wi={class:"h-[32em] flex items-end justify-end"},Yi={class:"text-[11em] font-['SFPRO'] text-black font-[400] leading-[100%] fixtext"},zi={class:"h-[22em] flex items-end"},Gi={style:{"letter-spacing":"-0.28px"},class:"text-[11em] font-['SFPRO'] text-white font-[400] leading-[100%] fixtext ml-[1.3em]"},Xi=["src"],Qi={class:"h-[15em] flex items-center"},Ki={class:"text-[11em] font-['SFPRO'] text-white/50 font-[400] leading-[100%] fixtext ml-[1.2em]"},Ji={class:"inline-flex items-center"},e1={class:"text-[11em] font-['SFPRO'] text-white font-[400] overflow-hidden break-words ml-[1.2em] leading-[2]"},t1={class:"w-full h-[350em] px-[12em]"},s1={class:"w-full h-full"},o1={class:"w-full h-[28em] flex items-center"},l1={class:"text-[12em] font-['SFPRO'] text-white font-[400] leading-[100%] fixtext mt-[7px] ml-[2px]"},n1={class:"w-full h-[37em] outline outline-1 outline-offset-[-2px] outline-white/20 rounded-[10em]"},i1=["placeholder"],a1={class:"w-full h-[85em] outline outline-1 outline-offset-[-2px] outline-white/20 rounded-[10em] py-[10em]"},r1=["placeholder"],c1={__name:"ProfileEdit",props:{show:{type:Boolean,default:!1}},emits:["cancel"],setup(h,{emit:H}){const d=fe(),$=J(),{MyProfile:o}=G($),{t:w}=ie(),s=k(!1),f=k(!1),C=H,g=h,P=k(null),y=u=>{let r=u.name,S=u.phone;if(o.value.password!==r){d.TriggerNotification({appname:"twix",header:w("twix.title"),message:w("twix.incorrectPassword")});return}if(S.length<4||S.length>20){d.TriggerNotification({appname:"twix",header:w("twix.title"),message:w("twix.passwordLengthError")});return}$.UpdateProfileInfo("password",S),f.value=!1,d.TriggerNotification({appname:"twix",header:w("twix.title"),message:w("twix.passwordChangedSuccess")})},v=k(""),x=k(""),R=()=>D(this,null,function*(){v.value.length>0&&v.value!==o.value.name&&(yield $.UpdateProfileInfo("name",v.value)),x.value.length>0&&x.value!==o.value.bio&&(yield $.UpdateProfileInfo("bio",x.value)),C("goback")}),a=u=>D(this,null,function*(){P.value==="profile"?yield $.UpdateProfileInfo("profilephoto",u):P.value==="banner"&&(yield $.UpdateProfileInfo("banner",u))});return(u,r)=>g.show?(n(),i("div",Di,[f.value?(n(),le(Be,{key:0,onBack:r[0]||(r[0]=S=>f.value=!1),onAdd:y,header:t(w)("twix.changePassword"),label:t(w)("twix.fillPasswordDetails"),fields:{name:{placeholder:t(w)("twix.currentPassword"),value:""},phone:{placeholder:t(w)("twix.newPassword"),value:""}},buttons:{cancel:t(w)("general.cancel"),submit:t(w)("general.add")}},null,8,["header","label","fields","buttons"])):M("",!0),e("div",Ei,[e("div",{onClick:r[1]||(r[1]=S=>f.value=!0),class:"w-[90%] h-[70%] rounded-full bg-white flex items-center justify-center cursor-pointer anim-hover-1"},[e("span",Ni,m(t(w)("twix.changePassword")),1)])]),e("div",Ii,[e("img",{onClick:r[2]||(r[2]=S=>{s.value=!0,P.value="profile"}),src:t(O)["twix/newphoto.svg"],class:"absolute h-[60%] z-[2] cursor-pointer anim-hover-1",alt:""},null,8,qi),e("img",{src:t(o).profilephoto,class:"h-full object-cover w-full object-center rounded-full",alt:""},null,8,Vi)]),e("div",Ai,[e("img",{onClick:r[3]||(r[3]=S=>C("goback")),src:t(O)["twix/back.svg"],class:"absolute left-[10em] h-[3%] cursor-pointer anim-hover-1",alt:""},null,8,Zi),e("img",{onClick:r[4]||(r[4]=S=>{s.value=!0,P.value="banner"}),src:t(O)["twix/newphoto.svg"],class:"absolute h-[4%] z-[2] cursor-pointer anim-hover-1",alt:""},null,8,Ui),e("img",{src:t(o).banner,class:"h-full object-cover w-full object-center",alt:""},null,8,Bi)]),e("div",Wi,[e("div",{onClick:R,class:"inline-flex cursor-pointer anim-hover-1 bg-white h-[60%] items-center justify-center px-[10em] mr-[10em] rounded-full outline outline-1 outline-offset-[-1px] outline-white/20"},[e("span",Yi,m(t(w)("general.done")),1)])]),e("div",zi,[e("span",Gi,m(t(o).name||t(w)("twix.unknown")),1),t(o).badge>0?(n(),i("img",{key:0,src:t(O)["twix/"+t(o).badge+".svg"],class:"h-[50%] ml-[4em]",alt:""},null,8,Xi)):M("",!0)]),e("div",Qi,[e("span",Ki,"@"+m(t(o).username),1)]),e("div",Ji,[e("span",e1,m(t(o).bio),1)]),r[10]||(r[10]=e("div",{class:"h-[5px] border-b-[1px] border-white/20"},null,-1)),e("div",t1,[e("div",s1,[e("div",o1,[e("span",l1,m(t(w)("twix.editYourProfile")),1)]),r[8]||(r[8]=e("div",{class:"w-full h-[8em]"},null,-1)),e("div",n1,[A(e("input",{maxlength:20,type:"text","onUpdate:modelValue":r[5]||(r[5]=S=>v.value=S),class:"w-full h-full bg-transparent text-[11em] font-['SFPRO'] text-white font-[400] leading-[100%] fixtext pl-[12px] outline-none",placeholder:t(o).name},null,8,i1),[[re,v.value]])]),r[9]||(r[9]=e("div",{class:"w-full h-[15.5em]"},null,-1)),e("div",a1,[A(e("textarea",{maxlength:100,"onUpdate:modelValue":r[6]||(r[6]=S=>x.value=S),style:{resize:"none","white-space":"pre-wrap","word-wrap":"break-word","overflow-wrap":"break-word"},class:"w-full h-full bg-transparent text-[11em] font-['SFPRO'] text-white font-[400] leading-[100%] fixtext px-[0.8em] outline-none",placeholder:t(o).bio.length>0?t(o).bio:t(w)("twix.bio")},null,8,r1),[[re,x.value]])])])]),Y(De,{show:s.value,onSelectPhoto:a,onCancel:r[7]||(r[7]=S=>s.value=!1),onlyphoto:!0},null,8,["show"])])):M("",!0)}},u1=me(c1,[["__scopeId","data-v-fe60564f"]]),d1={class:"w-full h-full relative z-[2] flex flex-col"},f1={class:"w-full h-[40em] flex items-center px-[15em] justify-between"},m1=["src"],h1=["placeholder"],x1={style:{"letter-spacing":"-0.18px"},class:"text-[11em] font-['SFPRO'] text-black font-[400] leading-[100%] fixtext"},w1={class:"w-full h-[82em] flex items-end justify-start relative border-b-[1px] border-white/10"},p1={class:"w-full h-[30em] absolute bottom-0 flex items-start justify-center"},v1={class:"text-[14em] font-['SFPRO'] text-white font-[400] leading-[100%] fixtext cursor-pointer anim-hover-1"},g1={class:"w-full h-[calc(100%-82px)] overflow-auto no-scrollbar"},_1={class:"w-full inline-flex flex-wrap content-start border-b-[1px] border-white/10"},C1={class:"w-full flex-1"},b1={class:"w-full inline-flex pl-[2px] justify-between border-b-[1px] border-white/10"},y1={class:"w-[45em] h-full flex justify-center"},$1={class:"h-[33em] rounded-full aspect-square mt-[9em] ml-[1px]"},k1=["src"],P1={class:"w-[255em] inline-flex gap-3 flex-col"},S1={class:"w-full h-[15em] flex items-center justify-start mt-[12px]"},T1={class:"text-[11em] font-['SFPRO'] text-white font-[400] leading-[100%] max-w-[9em] fixtext cursor-pointer anim-hover-1"},j1=["src"],M1={class:"text-[10em] font-['SFPRO'] text-white/50 font-[400] leading-[110%] max-w-[9em] fixtext mt-[0px] ml-[3px]"},L1={class:"text-[9em] font-['SFPRO'] text-white/50 font-[300] leading-[110%] max-w-[9em] fixtext ml-[3px]"},F1={class:"w-[95%] inline-flex mt-[6px]"},R1={style:{"letter-spacing":"-0.32px"},class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[110%] overflow-hidden break-words pb-[12px]"},O1={class:"w-full h-[12em] flex items-center justify-start relative"},H1=["onClick"],D1={class:"flex items-center h-full"},E1=["onClick","src"],N1={class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[100%] cursor-pointer max-w-[1em] min-w-[2em] fixtext ml-[.6em]"},I1={class:"flex items-center h-full"},q1=["onClick","src"],V1={class:"text-[10em] font-['SFPRO'] text-white font-[400] leading-[100%] cursor-pointer max-w-[30px] min-w-[20px] fixtext ml-[.6em]"},A1={__name:"Comment",emits:["goback","selectcomments","ChangeTwixPage","quotepost","selectprofile"],setup(h,{emit:H}){const d=fe(),$=J(),{SelectedPost:o,MyProfile:w}=G($),{t:s}=ie(),f=k(""),C=k(null),g=k(60),P=()=>D(this,null,function*(){if(yield de(),C.value){C.value.style.height="20px";const l=20,c=100,b=C.value.scrollHeight,T=Math.min(Math.max(b,l),c);C.value.style.height=`${T}px`,g.value=T+39}}),y=k(!1),v=k(250);be(f,()=>{P()});const x=H,R=l=>{f.value+=l},a=()=>{y.value=!y.value},u=()=>D(this,null,function*(){if(f.value.trim()==="")return;if(!o.value||!o.value.post.post_id){d.TriggerNotification({appname:"twix",header:s("twix.title"),message:s("twix.noPostSelected")});return}P(),y.value&&(y.value=!1);const l=yield B("TWIX_POST_COMMENT",{message:f.value,postId:o.value.post.post_id});l.success?(d.TriggerNotification({appname:"twix",header:s("twix.title"),message:s("twix.commentPostedSuccess")}),f.value=""):d.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(l.message)||l.message||s("twix.failedPostComment")})}),r=k([]),S=()=>{r.value=[]},V=l=>D(this,null,function*(){let c=yield B("TWIX_GET_COMMENT_LIKES",{commentId:l});c.success?r.value=c.likes:(r.value=[],d.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(c.message)||c.message}))}),W=l=>{let c=parseInt(l);if(c.toString().length===10&&(c*=1e3),isNaN(c)||c<=0)return s("twix.timeUnknown");const T=Date.now()-c;if(T<0)return s("twix.timeNow");const Z=Math.floor(T/1e3),X=Math.floor(Z/60),Q=Math.floor(X/60),te=Math.floor(Q/24),he=Math.floor(te/7),pe=Math.floor(te/30),ke=Math.floor(te/365);return Z<10?s("twix.timeNow"):Z<60?s("twix.timeSeconds",{count:Z}):X<60?s("twix.timeMinutes",{count:X}):Q<24?s("twix.timeHours",{count:Q}):te<7?te===1?s("twix.timeYesterday"):s("twix.timeDays",{count:te}):he<4?s("twix.timeWeeks",{count:he}):pe<12?s("twix.timeMonths",{count:pe}):s("twix.timeYears",{count:ke})},ee=l=>D(this,null,function*(){const c=yield B("TWIX_LIKE_COMMENT",{commentId:l});c.success||d.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(c.message)||c.message||s("twix.failedLikeComment")})}),E=l=>D(this,null,function*(){let c=yield $.GetCommentOnTheComment(l);c&&c.success?x("ChangeTwixPage","commentonthecomment"):d.TriggerNotification({appname:"twix",header:s("twix.title"),message:s(c.message)||c.message||s("twix.failedLoadReplies")})}),L=l=>{x("quotepost",l)},q=l=>{l&&x("selectprofile",l)},j=k(_e(()=>{let l=0;return o.value&&o.value.post&&(l=o.value.comments.length||0),!o.value||!o.value.comments||o.value.comments.forEach(c=>{l+=c.reply_count||0}),l}));return(l,c)=>(n(),i("div",d1,[Y(Me,{likedata:r.value,show:r.value.length>0,onCancel:S,onSelectprofile:q},null,8,["likedata","show"]),y.value?(n(),i("div",{key:0,class:"absolute bottom-0 left-0 right-0 z-40 transition-transform duration-300 ease-out",style:ve({transform:y.value?"translateY(0)":`translateY(${v.value}em)`})},[e("div",{class:"w-full bg-white dark:bg-[#1a1a1a] shadow-[0px_-4px_20px_rgba(0,0,0,0.15)]",style:ve({height:`${v.value}em`})},[Y(je,{show:y.value,onSelectEmoji:R,onClose:a},null,8,["show"])],4)],4)):M("",!0),e("div",{class:z([y.value?"bottom-[240em]":"bottom-[0px]","w-full h-[60em] absolute bg-black border-t border-white/10 pt-[8px] z-[30]"])},[e("div",f1,[e("img",{src:t(w).profilephoto,class:"h-[80%] aspect-square rounded-full object-cover object-center flex-shrink-0",alt:""},null,8,m1),A(e("input",{ref_key:"textareaRef",ref:C,maxlength:200,"onUpdate:modelValue":c[0]||(c[0]=b=>f.value=b),placeholder:t(s)("twix.typeMessage"),class:"flex-1 min-w-0 bg-transparent text-[11em] mx-[1em] placeholder:text-white/40 font-['SFPRO'] text-white font-[400] outline-none leading-[1]"},null,8,h1),[[re,f.value]]),(n(),i("svg",{onClick:a,xmlns:"http://www.w3.org/2000/svg",class:"cursor-pointer anim-hover-1 h-[45%] mr-[10em]",viewBox:"0 0 20 21",fill:"none"},c[2]||(c[2]=[e("path",{d:"M9.99999 20.5C11.366 20.5 12.652 20.2385 13.8578 19.7156C15.0637 19.1928 16.1274 18.4706 17.049 17.549C17.9706 16.6274 18.6928 15.5637 19.2156 14.3578C19.7385 13.152 20 11.866 20 10.5C20 9.13398 19.7385 7.84803 19.2156 6.64214C18.6928 5.43627 17.9706 4.37255 17.049 3.45097C16.1274 2.52941 15.0621 1.80719 13.8529 1.28431C12.6438 0.761438 11.3562 0.5 9.99018 0.5C8.62417 0.5 7.33823 0.761438 6.13235 1.28431C4.92646 1.80719 3.86437 2.52941 2.94607 3.45097C2.02778 4.37255 1.30719 5.43627 0.784313 6.64214C0.261438 7.84803 0 9.13398 0 10.5C0 11.866 0.261438 13.152 0.784313 14.3578C1.30719 15.5637 2.02941 16.6274 2.95097 17.549C3.87255 18.4706 4.93627 19.1928 6.14214 19.7156C7.34803 20.2385 8.63398 20.5 9.99999 20.5ZM9.99999 18.8333C8.84313 18.8333 7.76143 18.6176 6.7549 18.1863C5.74836 17.7549 4.86437 17.1585 4.10293 16.3971C3.3415 15.6356 2.74673 14.7517 2.31862 13.7451C1.89052 12.7386 1.67647 11.6569 1.67647 10.5C1.67647 9.34313 1.89052 8.26143 2.31862 7.2549C2.74673 6.24836 3.33987 5.36274 4.09803 4.59803C4.8562 3.83333 5.73855 3.23692 6.74509 2.80882C7.75163 2.38072 8.83332 2.16667 9.99018 2.16667C11.1471 2.16667 12.2288 2.38072 13.2353 2.80882C14.2418 3.23692 15.1274 3.83333 15.8922 4.59803C16.6569 5.36274 17.2549 6.24836 17.6863 7.2549C18.1176 8.26143 18.3333 9.34313 18.3333 10.5C18.3333 11.6569 18.1193 12.7386 17.6912 13.7451C17.263 14.7517 16.6683 15.6356 15.9068 16.3971C15.1454 17.1585 14.2598 17.7549 13.2499 18.1863C12.2402 18.6176 11.1569 18.8333 9.99999 18.8333ZM9.99018 15.4117C10.6699 15.4117 11.268 15.2892 11.7843 15.0441C12.3007 14.799 12.701 14.518 12.9853 14.201C13.2696 13.884 13.4118 13.6176 13.4118 13.402C13.4118 13.2843 13.3644 13.2026 13.2696 13.1568C13.1748 13.1111 13.0752 13.1111 12.9705 13.1568C12.6176 13.3529 12.2108 13.5408 11.75 13.7205C11.2892 13.9003 10.7026 13.9902 9.99018 13.9902C9.27777 13.9902 8.69117 13.9003 8.23038 13.7205C7.7696 13.5408 7.35947 13.3529 7 13.1568C6.89542 13.1111 6.79738 13.1111 6.70588 13.1568C6.61437 13.2026 6.56862 13.2843 6.56862 13.402C6.56862 13.6176 6.71078 13.884 6.99509 14.201C7.2794 14.518 7.67973 14.799 8.19606 15.0441C8.71241 15.2892 9.31045 15.4117 9.99018 15.4117ZM7.07842 9.62744C7.39215 9.62744 7.66666 9.50163 7.90195 9.24999C8.13725 8.99835 8.2549 8.67646 8.2549 8.28431C8.2549 7.89215 8.13725 7.56862 7.90195 7.31372C7.66666 7.05882 7.39215 6.93136 7.07842 6.93136C6.77123 6.93136 6.50326 7.05882 6.2745 7.31372C6.04574 7.56862 5.93136 7.89215 5.93136 8.28431C5.93136 8.67646 6.04574 8.99835 6.2745 9.24999C6.50326 9.50163 6.77123 9.62744 7.07842 9.62744ZM12.8921 9.62744C13.2058 9.62744 13.4803 9.50163 13.7157 9.24999C13.951 8.99835 14.0686 8.67646 14.0686 8.28431C14.0686 7.89215 13.951 7.56862 13.7157 7.31372C13.4803 7.05882 13.2058 6.93136 12.8921 6.93136C12.5849 6.93136 12.317 7.05882 12.0882 7.31372C11.8594 7.56862 11.7451 7.89215 11.7451 8.28431C11.7451 8.67646 11.8594 8.99835 12.0882 9.24999C12.317 9.50163 12.5849 9.62744 12.8921 9.62744Z",fill:"white","fill-opacity":"0.5"},null,-1)]))),e("div",{onClick:u,class:"inline-flex h-[60%] items-center justify-center bg-white rounded-full cursor-pointer anim-hover-1 px-[9em] flex-shrink-0"},[e("span",x1,m(t(s)("twix.comment")),1)])])],2),e("div",w1,[e("div",p1,[e("span",v1,m(t(s)("twix.post")),1)]),(n(),i("svg",{onClick:c[1]||(c[1]=b=>x("goback")),xmlns:"http://www.w3.org/2000/svg",style:{zoom:"0.7"},class:"ml-[25em] mb-[23em] h-[16%] relative z-[4] cursor-pointer anim-hover-1",viewBox:"0 0 18 16",fill:"none"},c[3]||(c[3]=[e("path",{d:"M4.41394 8.99906L9.45694 14.0391L8.04294 15.4591L0.585938 7.99906L8.04294 0.539062L9.45694 1.95906L4.41394 6.99906H17.9999V8.99906H4.41394Z",fill:"white"},null,-1)])))]),e("div",g1,[e("div",_1,[Y($e,{postdata:t(o).post,commentcount:j.value,onQuotepost:L},null,8,["postdata","commentcount"])]),e("div",C1,[(n(!0),i(ne,null,ce(t(o).comments,b=>(n(),i("div",b1,[e("div",y1,[e("div",$1,[e("img",{src:b.profilephoto,class:"w-full h-full rounded-full object-cover object-center",alt:""},null,8,k1)])]),e("div",P1,[e("div",S1,[e("span",T1,m(b.name),1),b.badge>0?(n(),i("img",{key:0,src:t(O)["twix/"+b.badge+".svg"],class:"ml-[4px] w-[5%]",alt:""},null,8,j1)):M("",!0),e("span",M1,"@"+m(b.username),1),e("span",L1,"· "+m(W(b.created_at)),1)]),e("div",F1,[e("p",R1,m(b.content),1)]),e("div",O1,[b.like_count>0?(n(),i("span",{key:0,onClick:T=>V(b.comment_id),class:"text-[10em] font-['SFPRO'] text-white/50 absolute font-[400] leading-[100%] right-[1em] max-w-[8em] fixtext cursor-pointer anim-hover-1"},m(t(s)("twix.likes")),9,H1)):M("",!0),e("div",D1,[e("img",{onClick:T=>E(b.comment_id),src:t(O)["twix/comment.svg"],class:"h-full cursor-pointer anim-hover-1",alt:""},null,8,E1),e("span",N1,m(b.reply_count),1)]),e("div",I1,[e("img",{onClick:T=>ee(b.comment_id),src:b.user_liked?t(O)["twix/liked.svg"]:t(O)["twix/like.svg"],class:"h-full cursor-pointer anim-hover-1",alt:""},null,8,q1),e("span",V1,m(b.like_count),1)])]),c[4]||(c[4]=e("div",{class:"w-full h-[10px]"},null,-1))])]))),256)),c[5]||(c[5]=e("div",{class:"w-full h-[60px]"},null,-1))])])]))}},Z1=me(A1,[["__scopeId","data-v-3c7ad8fa"]]),U1={class:"w-full h-full relative bg-black"},B1={class:"w-full h-[81em] flex items-end border-b-[1px] border-white/10"},W1={class:"w-full h-[44em] flex items-center justify-center relative"},Y1=["src"],z1={class:"text-[13em] font-['SFPRO'] text-white font-[400] text-center leading-[100%] mt-[1px]"},G1={class:"w-full h-[42em] flex items-center justify-center border-b-[1px] border-white/10"},X1=["onClick"],Q1={class:"w-full h-[34em] flex"},K1={class:"h-full aspect-square rounded-full"},J1=["src"],ea={class:"w-[68%] h-full ml-[14em] flex flex-col items-start justify-center"},ta={class:"flex items-center gap-[0.5em]"},sa={style:{"letter-spacing":"-0.28px"},class:"text-[10.5em] font-['SFPRO'] text-white font-[400] leading-[100%]"},oa=["src"],la={style:{"letter-spacing":"-0.28px"},class:"text-[10.5em] font-['SFPRO'] text-white/50 font-[400] leading-[100%] mt-[3px]"},na={class:"w-[13%] h-full flex items-center justify-end"},ia=["onClick","src"],aa={__name:"Follow",emits:["goback","selectprofile"],setup(h,{emit:H}){const{t:d}=ie(),$=J(),{SelectedProfile:o}=G($),w=k(null),s=k(0),f=k("top"),C=H,g=()=>{if(!w.value)return;const a=w.value,u=a.scrollTop,r=a.scrollHeight,S=a.clientHeight,V=r-S;s.value=V>0?u/V:0,u<=5?f.value="top":u>=V-5?f.value="bottom":f.value="middle"},P=k([]),y=k([]),v=()=>D(this,null,function*(){if(!o.value||!o.value.profileData)return;let a=yield B("TWIX_GET_FOLLOWERS",{username:o.value.profileData.username});a&&a.success?(P.value=a.followers||[],y.value=a.following||[]):console.log("Failed to fetch followers:",a==null?void 0:a.message)});Ce(()=>D(this,null,function*(){yield v(),w.value&&(w.value.addEventListener("scroll",g),setTimeout(()=>D(this,null,function*(){yield de(),g()}),100))})),be(()=>{var a,u;return(u=(a=o.value)==null?void 0:a.profileData)==null?void 0:u.username},a=>D(this,null,function*(){a&&(yield v())})),ge(()=>{w.value&&w.value.removeEventListener("scroll",g)});const x=k("followers"),R=_e(()=>x.value==="followers"?P.value:y.value);return(a,u)=>(n(),i("div",U1,[e("div",B1,[e("div",W1,[e("img",{onClick:u[0]||(u[0]=r=>C("goback")),src:t(O)["icons/goback.svg"],class:"absolute left-[15px] h-[25%] cursor-pointer anim-hover-1",alt:""},null,8,Y1),e("span",z1,m(t(o).profileData.name),1)])]),e("div",G1,[e("span",{onClick:u[1]||(u[1]=r=>x.value="followers"),class:z([{"text-white font-[400]":x.value==="followers","text-white/30 font-[400]":x.value!=="followers"},"text-[13em] font-['SFPRO'] text-white font-[400] text-center leading-[100%] cursor-pointer anim-hover-1 mt-[1px]"]),style:{"letter-spacing":"-0.28px"}},m(t(d)("twix.followers")),3),e("span",{onClick:u[2]||(u[2]=r=>x.value="following"),class:z([{"text-white font-[400]":x.value==="following","text-white/30 font-[400]":x.value!=="following"},"text-[13em] font-['SFPRO'] text-white font-[400] text-center leading-[100%] mt-[1px] cursor-pointer anim-hover-1 ml-[1em]"])},m(t(d)("twix.following")),3)]),e("div",{class:z([[f.value==="top"?"mask-bottom":"",f.value==="middle"?"mask-both":"",f.value==="bottom"?"mask-top":""],"w-full h-[calc(100%-123px)] overflow-auto no-scrollbar"]),ref_key:"scrollContainer",ref:w},[(n(!0),i(ne,null,ce(R.value,r=>(n(),i("div",{onClick:S=>C("selectprofile",r.username),class:"w-full h-[65em] cursor-pointer anim-hover-1 flex items-center justify-center px-[13em] border-b-[1px] border-white/10"},[e("div",Q1,[e("div",K1,[e("img",{src:r.profilephoto,class:"w-full h-full rounded-full object-cover object-center",alt:""},null,8,J1)]),e("div",ea,[e("div",ta,[e("span",sa,m(r.name),1),r.badge>0?(n(),i("img",{key:0,src:t(O)["twix/"+r.badge+".svg"],class:"h-[12em] ml-[3em]",alt:""},null,8,oa)):M("",!0)]),e("span",la,"@"+m(r.username),1)]),e("div",na,[e("img",{onClick:S=>C("selectprofile",r.username),src:t(O)["twix/gotoprofile.svg"],class:"h-[50%] cursor-pointer anim-hover-1",alt:""},null,8,ia)])])],8,X1))),256))],2)]))}},ra=me(aa,[["__scopeId","data-v-a8950ceb"]]),ca={class:"w-full h-full rounded-[44em] overflow-hidden bg-black"},Ca={__name:"TwixApp",setup(h){const H=fe(),d=J(),{TwixPage:$}=G(d),{networkSignal:o,appConfig:w}=G(H),s=_e(()=>{var r,S,V;const u=((V=(S=(r=w.value)==null?void 0:r.TowerConfig)==null?void 0:S.AppRequirements)==null?void 0:V.twix)||2;return o.value>=u}),f=k([{key:"home"},{key:"notification"},{key:"createpost"},{key:"topics"},{key:"login"},{key:"profile"},{key:"profileedit"},{key:"comment"},{key:"commentonthecomment"},{key:"follow"},{key:"hashtagspost"}]);Ce(()=>D(this,null,function*(){const u=yield d.GetMyProfile();u&&u.success===!0?(d.TwixPage="home",d.LoadActites()):d.TwixPage="login"}));const C=k([{page:"home"}]),g=(u,r={})=>{u==="home"&&(C.value=[],v.value=null,d.ClearSelectedProfile(),d.ClearSelectedProfileData()),C.value.push(Oe({page:u},r)),d.TwixPage=u},P=u=>D(this,null,function*(){if(!u)return;let r=yield d.getProfileByUsername(u);r&&r.success&&(C.value.push({page:"profile",username:u}),d.TwixPage="profile")}),y=()=>D(this,null,function*(){if(C.value.length>1){C.value.pop();const u=C.value[C.value.length-1];u.page==="createpost"&&(v.value=null),u.page==="profile"&&u.username?yield d.getProfileByUsername(u.username):u.page==="follow"&&u.username&&(yield d.getProfileByUsername(u.username)),(u.page=="topics"||u.page=="home"||u.page=="hashtagspost")&&(d.ClearSelectedProfile(),d.ClearSelectedProfileData()),d.TwixPage=u.page}}),v=k(null),x=u=>{u&&(v.value=u,g("createpost"))},R=u=>D(this,null,function*(){if(!u)return console.log("No hashtag provided to SelectHashtag");let r=yield d.GetPostsByHashtag(u);r&&r.success?(C.value.push({page:"hashtagspost",hashtag:u}),d.TwixPage="hashtagspost"):H.TriggerNotification({appname:"twix",header:"Twix",message:r.message})}),a=()=>{C.value=[{page:"login"}],d.Logout()};return ge(()=>{d.ClearSelectedProfileData()}),(u,r)=>(n(),i("div",ca,[s.value?M("",!0):(n(),le(Xe,{key:0})),Y(We,{"current-key":t($),items:f.value,duration:300,easing:"ease-in-out"},{home:oe(()=>[t($)=="home"?(n(),le(To,{key:0,onChangeTwixPage:g,onSelectprofile:P,onQuotepost:x,onSelecthashtag:R})):M("",!0)]),notification:oe(()=>[Y(Ll,{onChangeTwixPage:g,onOpencomments:r[0]||(r[0]=S=>g("comment")),onSelectprofile:P})]),createpost:oe(()=>[Y(Dn,{onChangeTwixPage:g,quotePostId:v.value,onGoback:y},null,8,["quotePostId"])]),topics:oe(()=>[Y(ri,{onChangeTwixPage:g,onSelectprofile:P,onSelecthashtag:R})]),login:oe(()=>[Y(ul,{onChangeTwixPage:g})]),profile:oe(()=>[t($)=="profile"?(n(),le(Hi,{key:0,onChangeTwixPage:g,onGoback:y,onSelectprofile:P,onLogout:a})):M("",!0)]),profileedit:oe(()=>[t($)=="profileedit"?(n(),le(u1,{key:0,onChangeTwixPage:g,onGoback:y,show:t($)=="profileedit"},null,8,["show"])):M("",!0)]),comment:oe(()=>[t($)=="comment"?(n(),le(Z1,{key:0,onChangeTwixPage:g,onGoback:y,onQuotepost:x,onSelectprofile:P})):M("",!0)]),commentonthecomment:oe(()=>[t($)=="commentonthecomment"?(n(),le(us,{key:0,onChangeTwixPage:g,onGoback:y,onSelectprofile:P})):M("",!0)]),follow:oe(()=>[t($)=="follow"?(n(),le(ra,{key:0,onChangeTwixPage:g,onGoback:y,onSelectprofile:P})):M("",!0)]),hashtagspost:oe(()=>[t($)=="hashtagspost"?(n(),le(co,{key:0,onChangeTwixPage:g,onGoback:y,onSelectprofile:P,onSelecthashtag:R})):M("",!0)]),_:1},8,["current-key","items"])]))}};export{Ca as default};