hive-react-kit 1.12.11 → 1.12.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1412,7 +1412,7 @@ ${we}
1412
1412
  transition-colors cursor-pointer`,children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:Nr.userAvatar(y.follower),alt:y.follower,className:"w-12 h-12 rounded-full object-cover",onError:w=>{w.target.src=`https://ui-avatars.com/api/?name=${y.follower}&background=random`}}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",y.follower]})})]})},`${y.follower}-${b}`))})})},LC=({username:a,onSelectUser:o})=>{const[l,u]=T.useState([]),[d,f]=T.useState(!0),[h,g]=T.useState(null),x=async()=>{try{f(!0),g(null);const y=await Nr.getFollowing(a);u(y)}catch(y){g(y instanceof Error?y.message:"Failed to load following list")}finally{f(!1)}};return T.useEffect(()=>{x()},[a]),d?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(X.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading following list..."]})}):h?e.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load following list"}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:h}),e.jsxs("button",{onClick:x,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[e.jsx(X.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):l.length===0?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user is not following anyone."})}):e.jsx("div",{className:"space-y-6",children:e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:l.map((y,b)=>e.jsx("div",{onClick:()=>o&&o(y.following),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1413
1413
  rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
1414
1414
  transition-colors cursor-pointer`,children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:Nr.userAvatar(y.following),alt:y.following,className:"w-12 h-12 rounded-full object-cover",onError:w=>{w.target.src=`https://ui-avatars.com/api/?name=${y.following}&background=random`}}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",y.following]})})]})},`${y.following}-${b}`))})})},zC=({username:a})=>{const[o,l]=T.useState(null),[u,d]=T.useState(!0),[f,h]=T.useState(null),g=async()=>{try{d(!0),h(null);const v=await Nr.getProfile(a);l(v)}catch(v){h(v instanceof Error?v.message:"Failed to load user details")}finally{d(!1)}};T.useEffect(()=>{g()},[a]);const x=v=>{try{return new Date(v).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return v}},y=v=>v.replace(/<[^>]*>/g,"");if(u)return e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(X.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading user details..."]})});if(f)return e.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load user details"}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:f}),e.jsxs("button",{onClick:g,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[e.jsx(X.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!o?.result)return e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No user details available"})});const b=o.result,w=b.metadata?.profile;return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[w?.about&&e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),e.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:y(w.about)})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Location"}),e.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:w?.location||"Not specified"})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Website"}),e.jsx("a",{href:w?.website,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-500 hover:underline",children:w?.website||"Not specified"})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Joined"}),e.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:b.created?x(b.created):"Unknown"})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Followers"}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:b.stats?.followers?.toLocaleString()||"0"})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Following"}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:b.stats?.following?.toLocaleString()||"0"})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Post Count"}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:b.post_count?.toLocaleString()||"0"})]})]})]})})},uU=({username:a,onVideoClick:o,onAuthorClick:l,onBack:u,onClickUserInfoTab:d,onClickFollowersTab:f,onClickFollowingTab:h,onBookmarkToggle:g,onRss:x,onShare:y,onMoreMenu:b,showMoreMenu:w=!1})=>{const[v,N]=T.useState("videos"),[C,R]=T.useState(null),[M,E]=T.useState(!1),[P,$]=T.useState(!0);T.useEffect(()=>{(async()=>{try{$(!0);const Y=await Nr.getProfile(a);R(Y)}catch(Y){console.error("Failed to fetch user details:",Y)}finally{$(!1)}})()},[a]);const H=()=>{if(y)y(a);else{const I=`https://3speak.tv/user/${a}`;navigator.share?navigator.share({title:C?.result?.name||a,url:I}):navigator.clipboard.writeText(I)}},z=()=>{x?x(a):window.open(`https://3speak.tv/rss/${a}.xml`,"_blank")},A=I=>{l(I)};if(P)return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"animate-pulse",children:[e.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),e.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[e.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),e.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),e.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((I,Y)=>e.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},Y))})]})]})});const q=C?.result,F=q?.metadata?.profile;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("button",{onClick:u,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[e.jsx(X.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsxs("div",{className:"relative bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl overflow-hidden",children:[e.jsx("img",{src:F.cover_image||Nr.userAvatar(a),alt:"Cover",className:"w-full h-48 object-cover",onError:I=>{I.target.src=Nr.userAvatar(a)}}),e.jsx("div",{className:"p-6",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[e.jsx("img",{src:F?.profile_image,alt:F?.name,className:"w-24 h-24 rounded-full object-cover border-4 border-white dark:border-gray-800 -mt-16",onError:I=>{I.target.src=Nr.userAvatar(a)}}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:F?.name||a}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:F?.about||"No description available"}),e.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(X.Users,{className:"w-4 h-4"}),e.jsxs("span",{children:[(q?.stats?.followers||0).toLocaleString()," Followers"]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(X.Users,{className:"w-4 h-4"}),e.jsxs("span",{children:[(q?.stats?.following||0).toLocaleString()," Following"]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[e.jsx(X.Calendar,{className:"w-4 h-4"}),e.jsxs("span",{children:["Joined"," ",q?.created?new Date(q.created).getFullYear():"Unknown"]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(DC,{id:a,toastType:"user",onAdd:(I,Y)=>{g?g(I,!0):console.log("Added:",I,Y)},onRemove:(I,Y)=>{g?g(I,!1):console.log("Removed:",I,Y)}}),e.jsx("button",{onClick:z,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:e.jsx(X.Rss,{className:"w-4 h-4"})}),e.jsx("button",{onClick:H,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:e.jsx(X.Share2,{className:"w-4 h-4"})}),w&&e.jsx("button",{onClick:()=>{b&&b(a)},className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:e.jsx(X.MoreVertical,{className:"w-4 h-4"})})]})]})})]}),e.jsxs("div",{children:[e.jsx("div",{className:"grid grid-cols-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[{key:"videos",label:"Videos"},{key:"about",label:"User Info",callback:d},{key:"followers",label:"Followers",callback:f},{key:"following",label:"Following",callback:h}].map((I,Y)=>e.jsx("button",{onClick:()=>{I.callback?I.callback():N(I.key)},className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${v===I.key?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:I.label},I.key))}),e.jsxs("div",{className:"mt-6",children:[v==="videos"&&e.jsx(Fk,{feedType:xo.USER,username:a,onVideoClick:o,onAuthorClick:l}),v==="about"&&e.jsx(zC,{username:a}),v==="followers"&&e.jsx(RC,{username:a,onSelectUser:A}),v==="following"&&e.jsx(LC,{username:a,onSelectUser:A})]})]})]})},cU=["Spam","Harassment or bullying","Hate speech","Violence or dangerous organizations","Intellectual property violation","Self-harm","Non-consensual intimate images","Doxxing","Minor safety","Other"],iA=({isOpen:a,onClose:o,onReport:l,reportType:u,targetUsername:d,targetPermlink:f})=>{const[h,g]=T.useState("select"),[x,y]=T.useState(""),[b,w]=T.useState(!1),v=M=>{y(M),g("confirm")},N=async()=>{if(x){w(!0);try{await l(x),o(),g("select"),y("")}catch(M){console.error("Report failed:",M)}finally{w(!1)}}},C=()=>{o(),g("select"),y("")},R=()=>{g("select"),y("")};return a?e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000] p-4",onClick:C,children:e.jsxs("div",{className:"bg-gray-900 rounded-xl shadow-xl max-w-md w-full max-h-[80vh] flex flex-col border border-gray-700",onClick:M=>M.stopPropagation(),children:[e.jsxs("div",{className:"px-6 py-4 border-b border-gray-700",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(X.Flag,{className:"h-5 w-5 text-red-500"}),e.jsxs("h3",{className:"text-lg font-semibold text-white",children:["Report ",u==="user"?"User":"Post"]})]}),e.jsx("button",{onClick:C,className:"p-1 hover:bg-gray-800 rounded transition-colors",children:e.jsx(X.X,{className:"h-5 w-5 text-gray-400"})})]}),e.jsxs("p",{className:"text-sm text-gray-400 mt-1",children:["@",d]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[h==="select"&&e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm text-gray-400 mb-4",children:["Why are you reporting this ",u,"?"]}),e.jsx("div",{className:"space-y-2",children:cU.map(M=>e.jsx("button",{onClick:()=>v(M),className:"w-full text-left px-4 py-3 border border-gray-700 rounded-lg text-gray-300 hover:bg-gray-800 hover:border-gray-600 transition-colors",children:M},M))})]}),h==="confirm"&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-start space-x-3 mb-4",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx(X.AlertTriangle,{className:"h-6 w-6 text-red-500"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"text-sm font-medium text-white mb-2",children:"Report Summary"}),e.jsxs("div",{className:"space-y-2 text-sm text-gray-400",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Type:"})," ",u==="user"?"User":"Post"]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Target:"})," @",d]}),u==="post"&&f&&e.jsxs("p",{children:[e.jsx("strong",{children:"Post:"})," ",f]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Reason:"})," ",x]})]})]})]}),e.jsx("div",{className:"bg-yellow-900/20 border border-yellow-800 rounded-lg p-3",children:e.jsx("p",{className:"text-xs text-yellow-200",children:"Reports are reviewed by our moderation team. False reports may result in action against your account."})})]})]}),e.jsxs("div",{className:"px-6 py-4 border-t border-gray-700 flex items-center justify-end space-x-3",children:[h==="select"&&e.jsx("button",{onClick:C,className:"px-4 py-2 border border-gray-600 text-gray-300 rounded-lg hover:bg-gray-800 transition-colors",children:"Cancel"}),h==="confirm"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:R,className:"px-4 py-2 border border-gray-600 text-gray-300 rounded-lg hover:bg-gray-800 transition-colors",children:"Back"}),e.jsx("button",{onClick:N,disabled:b,className:"px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:b?"Reporting...":"Submit Report"})]})]})]})}):null},dU=[{value:7,label:"7 Days"},{value:30,label:"30 Days"}],Hl=a=>Number.isFinite(a)?Math.abs(a)>=1e3?`${a.toLocaleString(void 0,{maximumFractionDigits:0})} HP`:`${a.toFixed(3)} HP`:"0 HP",Eg=a=>Number.isFinite(a)?Math.abs(a)>=1e3?`$${a.toLocaleString(void 0,{maximumFractionDigits:0})}`:`$${a.toFixed(2)}`:"$0",PC=({username:a,defaultRange:o=7,className:l})=>{const[u,d]=T.useState(o),[f,h]=T.useState(null),[g,x]=T.useState(!1),[y,b]=T.useState(null),[w,v]=T.useState(null),N=T.useRef(0);return T.useEffect(()=>{const C=a.replace(/^@/,"").trim();if(!C)return;v(null),h(null),b(null),x(!0);const R=++N.current,M=new AbortController;return Nr.getGrowthAnalytics(C,30,E=>{R===N.current&&v(E)},M.signal).then(E=>{R===N.current&&v(E)}).catch(E=>{R===N.current&&E?.name!=="AbortError"&&(console.error("Growth analytics error:",E),b("Failed to load growth analytics"))}).finally(()=>{R===N.current&&x(!1)}),()=>{M.abort()}},[a]),T.useEffect(()=>{if(!w)return;if(u>=w.series.length){h(w);return}const C={...w,days:w.days.slice(-u),series:w.series.slice(-u),totals:fU(w.series.slice(-u))};C.startHp=C.series[0]?.cumulativeHp!=null?Number((C.series[0].cumulativeHp-C.series[0].hpDelta).toFixed(3)):w.startHp,C.hpDelta=Number(C.series.reduce((R,M)=>R+(M.hpDelta||0),0).toFixed(3)),h(C)},[w,u]),y?e.jsxs("div",{className:`text-center py-12 ${l||""}`,children:[e.jsx(X.TrendingUp,{className:"h-10 w-10 text-[var(--hrk-text-tertiary)] mx-auto mb-2"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)] text-sm",children:y})]}):g&&!f?e.jsxs("div",{className:`max-w-3xl mx-auto space-y-4 animate-pulse ${l||""}`,children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"h-8 bg-[var(--hrk-bg-surface-raised)] rounded w-20"}),e.jsx("div",{className:"h-8 bg-[var(--hrk-bg-surface-raised)] rounded w-20"})]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:[0,1,2,3].map(C=>e.jsx("div",{className:"h-16 bg-[var(--hrk-bg-surface)] rounded-lg border border-[var(--hrk-border-subtle)]"},C))}),e.jsx("div",{className:"h-56 bg-[var(--hrk-bg-surface)] rounded-lg border border-[var(--hrk-border-subtle)]"}),e.jsx("div",{className:"h-56 bg-[var(--hrk-bg-surface)] rounded-lg border border-[var(--hrk-border-subtle)]"})]}):f?e.jsxs("div",{className:`max-w-3xl mx-auto space-y-4 ${l||""}`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"flex items-center gap-2",children:dU.map(C=>e.jsx("button",{onClick:()=>d(C.value),className:`px-3 py-1.5 text-xs sm:text-sm rounded-full font-medium transition-colors ${u===C.value?"bg-[var(--hrk-brand)] text-[var(--hrk-text-on-brand)]":"bg-[var(--hrk-bg-surface)] text-[var(--hrk-text-secondary)] border border-[var(--hrk-border-subtle)] hover:bg-[var(--hrk-bg-surface-raised)] hover:border-[var(--hrk-border-default)] hover:text-[var(--hrk-text-primary)]"}`,children:C.label},C.value))}),g&&e.jsx("span",{className:"text-xs text-[var(--hrk-text-tertiary)] animate-pulse",children:"Refreshing…"})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 sm:gap-3",children:[e.jsx(_w,{icon:e.jsx(X.Zap,{className:"h-4 w-4 text-orange-400"}),label:"HP Now",value:Hl(f.currentHp)}),e.jsx(_w,{icon:f.hpDelta>=0?e.jsx(X.TrendingUp,{className:"h-4 w-4 text-green-400"}):e.jsx(X.TrendingDown,{className:"h-4 w-4 text-red-400"}),label:`Δ HP (${u}d)`,value:`${f.hpDelta>=0?"+":""}${Hl(f.hpDelta)}`,tone:f.hpDelta>=0?"up":"down"}),e.jsx(_w,{icon:e.jsx(X.Award,{className:"h-4 w-4 text-sky-400"}),label:"Author + Curation",value:Hl(f.totals.authorHp+f.totals.curationHp),subValue:Eg(f.totals.authorUsd+f.totals.curationUsd)}),e.jsx(_w,{icon:e.jsx(X.Coins,{className:"h-4 w-4 text-purple-400"}),label:"Witness",value:Hl(f.totals.witnessHp),subValue:Eg(f.totals.witnessUsd)})]}),e.jsxs(hk,{title:`Account HP — last ${u} days`,children:[e.jsx(hU,{series:f.series}),e.jsx(oA,{items:[{color:"var(--hrk-success)",label:"Account HP"},{color:"rgba(34,197,94,0.6)",label:"Power Up"},{color:"rgba(239,68,68,0.7)",label:"Power Down"},{color:"rgba(125,211,252,0.7)",label:"Author + Curation"},{color:"rgba(167,139,250,0.8)",label:"Witness"},{color:"rgba(251,146,60,0.8)",label:"Benefactor"}]})]}),e.jsxs(hk,{title:`Earned per day — last ${u} days`,children:[e.jsx(mU,{series:f.series}),e.jsx(oA,{items:[{color:"rgba(34,197,94,0.85)",label:"Author"},{color:"rgba(56,189,248,0.85)",label:"Curation"},{color:"rgba(167,139,250,0.85)",label:"Witness"},{color:"rgba(251,146,60,0.85)",label:"Benefactor"}]})]}),e.jsx(hk,{title:"Daily breakdown",children:e.jsx("div",{className:"overflow-x-auto -mx-2 px-2",children:e.jsxs("table",{className:"w-full text-xs sm:text-sm text-left",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[var(--hrk-text-tertiary)] border-b border-[var(--hrk-border-subtle)]",children:[e.jsx("th",{className:"py-2 pr-3 font-medium",children:"Day"}),e.jsx("th",{className:"py-2 pr-3 font-medium text-right",children:"Author"}),e.jsx("th",{className:"py-2 pr-3 font-medium text-right",children:"Curation"}),e.jsx("th",{className:"py-2 pr-3 font-medium text-right",children:"Witness"}),e.jsx("th",{className:"py-2 pr-3 font-medium text-right",children:"Δ HP"})]})}),e.jsx("tbody",{children:f.series.slice().reverse().map(C=>e.jsxs("tr",{className:"border-b border-[var(--hrk-border-subtle)] last:border-0",children:[e.jsx("td",{className:"py-1.5 pr-3 text-[var(--hrk-text-secondary)] whitespace-nowrap",children:C.label}),e.jsx("td",{className:"py-1.5 pr-3 text-right text-green-300",children:C.authorHp?Hl(C.authorHp):"—"}),e.jsx("td",{className:"py-1.5 pr-3 text-right text-sky-300",children:C.curationHp?Hl(C.curationHp):"—"}),e.jsx("td",{className:"py-1.5 pr-3 text-right text-purple-300",children:C.witnessHp?Hl(C.witnessHp):"—"}),e.jsx("td",{className:`py-1.5 pr-3 text-right ${C.hpDelta>=0?"text-green-400":"text-red-400"}`,children:C.hpDelta?`${C.hpDelta>=0?"+":""}${C.hpDelta.toFixed(3)}`:"—"})]},C.key))})]})})})]}):null},_w=({icon:a,label:o,value:l,subValue:u,tone:d})=>e.jsxs("div",{className:"bg-[var(--hrk-bg-surface)] border border-[var(--hrk-border-subtle)] rounded-lg p-2.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-[var(--hrk-text-tertiary)] mb-0.5",children:[a,e.jsx("span",{className:"truncate",children:o})]}),e.jsx("div",{className:`text-sm sm:text-base font-semibold truncate ${d==="up"?"text-green-400":d==="down"?"text-red-400":"text-white"}`,children:l}),u&&e.jsx("div",{className:"text-[11px] text-[var(--hrk-text-tertiary)] truncate",children:u})]}),hk=({title:a,children:o})=>e.jsxs("div",{className:"bg-[var(--hrk-bg-surface)] border border-[var(--hrk-border-subtle)] rounded-lg p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm font-medium text-[var(--hrk-text-secondary)] mb-2",children:a}),o]}),oA=({items:a})=>e.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 mt-2 text-[11px] text-[var(--hrk-text-tertiary)]",children:a.map(o=>e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"inline-block w-2.5 h-2.5 rounded-sm",style:{background:o.color}}),o.label]},o.label))}),Jd=760,Ic=200,Qd=36,Iv=8,lc=10,Tg=22,BC=(a,o,l=4)=>{if(!Number.isFinite(a)||!Number.isFinite(o)||a===o)return[a];const u=(o-a)/l,d=[];for(let f=0;f<=l;f++)d.push(a+u*f);return d},UC=a=>Math.abs(a)>=1e3?`${(a/1e3).toFixed(1)}k`:Math.abs(a)>=10?a.toFixed(0):a.toFixed(2),fU=a=>a.reduce((o,l)=>(o.authorHp+=l.authorHp,o.curationHp+=l.curationHp,o.witnessHp+=l.witnessHp,o.benefactorHp+=l.benefactorHp,o.powerUp+=l.powerUp,o.powerDown+=l.powerDown,o.authorUsd+=l.authorUsd,o.curationUsd+=l.curationUsd,o.witnessUsd+=l.witnessUsd,o.benefactorUsd+=l.benefactorUsd,o),{authorHp:0,curationHp:0,witnessHp:0,benefactorHp:0,powerUp:0,powerDown:0,authorUsd:0,curationUsd:0,witnessUsd:0,benefactorUsd:0}),hU=({series:a})=>{const[o,l]=T.useState(null),u=T.useMemo(()=>{const d=a.length;if(!d)return null;const f=Math.min(...a.map(q=>q.cumulativeHp)),h=Math.max(...a.map(q=>q.cumulativeHp)),g=Math.max(1,(h-f)*.08)||1,x=Math.max(0,f-g),y=h+g,b=a.map(q=>q.powerUp+q.authorHp+q.curationHp+q.witnessHp+q.benefactorHp),w=a.map(q=>-q.powerDown),v=Math.max(0,...b)||1,N=Math.min(0,...w),C=(v-N)*.1||.5,R=(Jd-Qd-Iv)/Math.max(1,d-1),M=Ic-lc-Tg,E=q=>lc+(1-(q-x)/(y-x||1))*M,P=q=>lc+(1-(q-(N-C))/(v+C-(N-C)||1))*M,$=q=>Qd+q*R,H=a.map((q,F)=>`${F===0?"M":"L"} ${$(F).toFixed(1)} ${E(q.cumulativeHp).toFixed(1)}`).join(" "),z=Math.max(2,Math.min(18,R*.5)),A=BC(x,y,4);return{n:d,xStep:R,yLine:E,yBar:P,xAt:$,linePath:H,barWidth:z,ticks:A,yBarsMin:N,yBarsMax:v}},[a]);return u?e.jsxs("div",{className:"relative",onMouseLeave:()=>l(null),children:[e.jsxs("svg",{viewBox:`0 0 ${Jd} ${Ic}`,className:"w-full h-44 sm:h-56",children:[u.ticks.map((d,f)=>{const h=u.yLine(d);return e.jsxs("g",{children:[e.jsx("line",{x1:Qd,y1:h,x2:Jd-Iv,y2:h,stroke:"rgba(255,255,255,0.06)"}),e.jsx("text",{x:Qd-4,y:h+3,fontSize:"9",fill:"var(--hrk-text-secondary)",textAnchor:"end",children:UC(d)})]},f)}),e.jsx("line",{x1:Qd,y1:u.yBar(0),x2:Jd-Iv,y2:u.yBar(0),stroke:"rgba(255,255,255,0.12)"}),a.map((d,f)=>{const h=u.xAt(f)-u.barWidth/2,g=[{v:d.powerUp,color:"rgba(34,197,94,0.6)"},{v:d.authorHp+d.curationHp,color:"rgba(125,211,252,0.7)"},{v:d.witnessHp,color:"rgba(167,139,250,0.8)"},{v:d.benefactorHp,color:"rgba(251,146,60,0.8)"}];let x=0;const y=[];if(g.forEach((b,w)=>{if(b.v<=0)return;const v=u.yBar(x+b.v),N=u.yBar(x);x+=b.v,y.push(e.jsx("rect",{x:h,y:v,width:u.barWidth,height:Math.max(0,N-v),fill:b.color},`p-${f}-${w}`))}),d.powerDown>0){const b=u.yBar(0),w=u.yBar(-d.powerDown);y.push(e.jsx("rect",{x:h,y:b,width:u.barWidth,height:Math.max(0,w-b),fill:"rgba(239,68,68,0.7)"},`pd-${f}`))}return e.jsx("g",{children:y},d.key)}),e.jsx("path",{d:u.linePath,fill:"none",stroke:"var(--hrk-success)",strokeWidth:2}),a.map((d,f)=>{const h=Math.max(1,Math.ceil(a.length/7));return f%h!==0&&f!==a.length-1?null:e.jsx("text",{x:u.xAt(f),y:Ic-6,fontSize:"9",fill:"var(--hrk-text-secondary)",textAnchor:"middle",children:d.label},`xl-${f}`)}),a.map((d,f)=>e.jsx("rect",{x:u.xAt(f)-u.xStep/2,y:lc,width:Math.max(2,u.xStep),height:Ic-lc-Tg,fill:"transparent",onMouseEnter:()=>l({x:u.xAt(f),y:u.yLine(d.cumulativeHp),index:f,lines:[{color:"var(--hrk-success)",label:"Account HP",value:Hl(d.cumulativeHp)},{color:"rgba(34,197,94,0.6)",label:"Power Up",value:Hl(d.powerUp)},{color:"rgba(239,68,68,0.7)",label:"Power Down",value:Hl(d.powerDown)},{color:"rgba(125,211,252,0.7)",label:"Author + Curation",value:Hl(d.authorHp+d.curationHp)},{color:"rgba(167,139,250,0.8)",label:"Witness",value:Hl(d.witnessHp)},{color:"rgba(251,146,60,0.8)",label:"Benefactor",value:Hl(d.benefactorHp)}]})},`hov-${f}`)),o&&e.jsxs("g",{pointerEvents:"none",children:[e.jsx("line",{x1:o.x,y1:lc,x2:o.x,y2:Ic-Tg,stroke:"rgba(255,255,255,0.15)"}),e.jsx("circle",{cx:o.x,cy:o.y,r:3.5,fill:"var(--hrk-success)",stroke:"white",strokeWidth:1})]})]}),o&&e.jsx(HC,{x:o.x,chartW:Jd,dayLabel:a[o.index]?.label,lines:o.lines})]}):e.jsx("div",{className:"h-32 flex items-center justify-center text-xs text-[var(--hrk-text-tertiary)]",children:"No data"})},mU=({series:a})=>{const[o,l]=T.useState(null),u=T.useMemo(()=>{const d=a.length;if(!d)return null;const f=a.map(N=>N.authorUsd+N.curationUsd+N.witnessUsd+N.benefactorUsd),h=Math.max(.001,...f),g=(Jd-Qd-Iv)/Math.max(1,d),x=Ic-lc-Tg,y=N=>lc+(1-N/h)*x,b=N=>Qd+N*g+g/2,w=Math.max(2,g*.6),v=BC(0,h,4);return{n:d,xStep:g,y,xAt:b,barW:w,ticks:v,max:h}},[a]);return u?e.jsxs("div",{className:"relative",onMouseLeave:()=>l(null),children:[e.jsxs("svg",{viewBox:`0 0 ${Jd} ${Ic}`,className:"w-full h-44 sm:h-56",children:[u.ticks.map((d,f)=>e.jsxs("g",{children:[e.jsx("line",{x1:Qd,y1:u.y(d),x2:Jd-Iv,y2:u.y(d),stroke:"rgba(255,255,255,0.06)"}),e.jsxs("text",{x:Qd-4,y:u.y(d)+3,fontSize:"9",fill:"var(--hrk-text-secondary)",textAnchor:"end",children:["$",UC(d)]})]},f)),a.map((d,f)=>{const h=u.xAt(f)-u.barW/2,g=[{v:d.authorUsd,color:"rgba(34,197,94,0.85)",label:"Author"},{v:d.curationUsd,color:"rgba(56,189,248,0.85)",label:"Curation"},{v:d.witnessUsd,color:"rgba(167,139,250,0.85)",label:"Witness"},{v:d.benefactorUsd,color:"rgba(251,146,60,0.85)",label:"Benefactor"}];let x=0;return e.jsx("g",{children:g.map((y,b)=>{if(y.v<=0)return null;const w=u.y(x+y.v),v=u.y(x);return x+=y.v,e.jsx("rect",{x:h,y:w,width:u.barW,height:Math.max(0,v-w),fill:y.color},b)})},d.key)}),a.map((d,f)=>{const h=Math.max(1,Math.ceil(a.length/7));return f%h!==0&&f!==a.length-1?null:e.jsx("text",{x:u.xAt(f),y:Ic-6,fontSize:"9",fill:"var(--hrk-text-secondary)",textAnchor:"middle",children:d.label},`x-${f}`)}),a.map((d,f)=>e.jsx("rect",{x:u.xAt(f)-u.xStep/2,y:lc,width:Math.max(2,u.xStep),height:Ic-lc-Tg,fill:"transparent",onMouseEnter:()=>l({x:u.xAt(f),y:u.y(d.authorUsd+d.curationUsd+d.witnessUsd+d.benefactorUsd),index:f,lines:[{color:"rgba(34,197,94,0.85)",label:"Author",value:Eg(d.authorUsd)},{color:"rgba(56,189,248,0.85)",label:"Curation",value:Eg(d.curationUsd)},{color:"rgba(167,139,250,0.85)",label:"Witness",value:Eg(d.witnessUsd)},{color:"rgba(251,146,60,0.85)",label:"Benefactor",value:Eg(d.benefactorUsd)}]})},`hov-${f}`)),o&&e.jsx("line",{x1:o.x,y1:lc,x2:o.x,y2:Ic-Tg,stroke:"rgba(255,255,255,0.15)"})]}),o&&e.jsx(HC,{x:o.x,chartW:Jd,dayLabel:a[o.index]?.label,lines:o.lines})]}):e.jsx("div",{className:"h-32 flex items-center justify-center text-xs text-[var(--hrk-text-tertiary)]",children:"No data"})},HC=({x:a,chartW:o,dayLabel:l,lines:u})=>{const d=Math.min(85,Math.max(2,a/o*100));return e.jsxs("div",{className:"absolute top-1 z-10 pointer-events-none rounded-md bg-[var(--hrk-bg-app)]/95 border border-[var(--hrk-border-subtle)] px-2 py-1.5 shadow-lg text-[11px]",style:{left:`${d}%`,transform:"translateX(-50%)"},children:[l&&e.jsx("div",{className:"text-[var(--hrk-text-secondary)] font-semibold mb-0.5",children:l}),u.map(f=>e.jsxs("div",{className:"flex items-center gap-1.5 whitespace-nowrap",children:[e.jsx("span",{className:"inline-block w-2 h-2 rounded-sm",style:{background:f.color}}),e.jsxs("span",{className:"text-[var(--hrk-text-tertiary)]",children:[f.label,":"]}),e.jsx("span",{className:"text-[var(--hrk-text-primary)] font-medium",children:f.value})]},f.label))]})};function pU(a){return a<1?"text-emerald-400":a<2?"text-yellow-400":a<3?"text-orange-400":"text-red-400"}function gU(a){return Number.isFinite(a)?Math.abs(a)>=1e6?`${(a/1e6).toFixed(2)}M`:Math.abs(a)>=1e3?`${(a/1e3).toFixed(2)}K`:a.toFixed(2):"0"}const $C=({username:a,hideWhileLoading:o=!1,className:l=""})=>{const[u,d]=T.useState(null),[f,h]=T.useState(!0),[g,x]=T.useState(null),[y,b]=T.useState(!1);if(T.useEffect(()=>{if(!a)return;const v=new AbortController;return h(!0),x(null),hA(a,v.signal).then(N=>d(N)).catch(N=>{v.signal.aborted||x(N instanceof Error?N.message:"Failed to load KE ratio")}).finally(()=>{v.signal.aborted||h(!1)}),()=>v.abort()},[a]),f)return o?null:e.jsxs("span",{className:`inline-flex items-center gap-1 text-[11px] text-gray-400 ${l}`,children:[e.jsx(X.TrendingUp,{className:"h-3 w-3 opacity-60"}),"KE …"]});if(g||!u)return null;const w=pU(u.ke);return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:()=>b(!0),className:`inline-flex items-center gap-1 drop-shadow-md text-[11px] sm:text-xs text-gray-200 hover:text-white transition-colors ${l}`,"aria-label":`KE ratio ${u.ke.toFixed(2)}. Tap for details.`,children:[e.jsx(X.TrendingUp,{className:`h-3 w-3 ${w}`}),"KE ",u.ke.toFixed(2)]}),y&&e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>b(!1),"aria-hidden":!0}),e.jsxs("div",{className:"relative bg-gray-900 border border-gray-700 rounded-xl shadow-xl w-full mx-4 max-w-md max-h-[90vh] overflow-hidden",role:"dialog","aria-modal":"true","aria-label":`KE ratio details for @${a}`,children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-gray-800",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(X.TrendingUp,{className:`h-5 w-5 ${w}`}),e.jsxs("h2",{className:"text-base font-semibold text-white",children:["KE Ratio — @",a]})]}),e.jsx("button",{type:"button",onClick:()=>b(!1),className:"rounded-lg p-1.5 text-gray-400 hover:bg-gray-800 hover:text-white","aria-label":"Close",children:e.jsx(X.X,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"overflow-y-auto max-h-[calc(90vh-64px)] px-5 py-4 space-y-4",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:`text-4xl font-bold ${w}`,children:u.ke.toFixed(2)}),e.jsx("div",{className:"text-xs text-gray-400 mt-1",children:"posting + curation rewards relative to effective HP"})]}),e.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-950/50 divide-y divide-gray-800",children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 text-sm",children:[e.jsx("span",{className:"text-gray-400",children:"Effective Hive Power"}),e.jsxs("span",{className:"font-mono text-gray-100",children:[gU(u.currentHP)," HP"]})]}),e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 text-sm",children:[e.jsx("span",{className:"text-gray-400",children:"Posting rewards"}),e.jsx("span",{className:"font-mono text-gray-100",children:u.postingRewards.toLocaleString(void 0,{maximumFractionDigits:0})})]}),e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 text-sm",children:[e.jsx("span",{className:"text-gray-400",children:"Curation rewards"}),e.jsx("span",{className:"font-mono text-gray-100",children:u.curationRewards.toLocaleString(void 0,{maximumFractionDigits:0})})]}),e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 text-sm bg-gray-900/60",children:[e.jsx("span",{className:"text-gray-300 font-medium",children:"Total rewards"}),e.jsx("span",{className:"font-mono font-semibold text-gray-100",children:u.totalRewards.toLocaleString(void 0,{maximumFractionDigits:0})})]})]}),e.jsx("div",{className:"rounded-lg border border-blue-500/25 bg-blue-500/5 p-3 text-xs text-gray-300 leading-relaxed",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(X.Info,{className:"h-4 w-4 shrink-0 text-blue-400 mt-0.5"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-gray-100",children:"Formula:"})," ",e.jsx("span",{className:"font-mono text-blue-200",children:"(posting_rewards + curation_rewards in HP) ÷ own_HP"})]}),e.jsx("p",{children:"Own HP is the account's vesting_shares — received delegations and delegations-out are excluded, so the ratio reflects whether the account keeps its earnings staked."}),e.jsx("p",{className:"text-gray-400",children:"Lower is generally considered healthier for curators. The heuristic colors here (green < 1, yellow < 2, orange < 3, red ≥ 3) are a soft guide, not a strict rule."})]})]})})]})]})]})]})},lA=a=>{const o=new Date,l=new Date(a),u=Math.floor((o.getTime()-l.getTime())/1e3);return u<60?"just now":u<3600?`${Math.floor(u/60)}m ago`:u<86400?`${Math.floor(u/3600)}h ago`:u<2592e3?`${Math.floor(u/86400)}d ago`:l.toLocaleDateString()},bU=a=>{let o=a;return o=o.replace(/<[^>]*>/g,""),o=o.replace(/!\[.*?\]\([^\s)]+\)/g,""),o=o.replace(/\[([^\]]*)\]\([^\s)]+\)/g,"$1"),o=o.replace(/https?:\/\/[^\s)>\]]+/g,""),o=o.replace(/\[.*?\]/g,""),o=o.replace(/\(https?:\/\/[^\s)]*\)/g,""),o=o.replace(/[*_~`#>|]/g,""),o=o.replace(/^[-_*]{3,}\s*$/gm,""),o=o.replace(/\s+/g," ").trim(),o},qC=({poll:a,currentUsername:o,onVotePoll:l,onPollClick:u,onUpvote:d,onSubmitComment:f,onClickCommentUpvote:h,onReblog:g,isPostReblogged:x,onCheckReblogged:y,onTip:b,onSharePost:w,onCommentClick:v,onRequestReportPost:N,onUserClick:C,ecencyToken:R,threeSpeakApiKey:M,giphyApiKey:E,templateToken:P,templateApiBaseUrl:$,defaultVotePercent:H=100,voteWeightStep:z=.25,allowLandscapeVideos:A=!1})=>{const q=dj(),[F,I]=T.useState([]),[Y,Z]=T.useState([]),[J,te]=T.useState(!1),de=a.poll_stats?.total_voting_accounts_num||0,fe=a.status==="Active",Q=new Date(a.end_time)<new Date,se=T.useMemo(()=>a.post_body?bU(a.post_body):"",[a.post_body]),xe=a.max_choices_voted??1,be=xe>1,Oe=Q||!fe,Se=Y.length>0,me=o?a.poll_voters?.find(Fe=>Fe.name===o):void 0,ie=me?.choices?.length?me.choices:me?.choice_num!=null?[me.choice_num]:[],ye=Se||ie.length>0,Ee=a.allow_vote_changes??!1,Ie=Se?Y:ie,ge=!!o&&!Oe&&!!l&&(!ye||Ee),rt=ge,Le=ye&&Ee&&!Se,ue=a.poll_choices??[],He=ue.reduce((Fe,Ye)=>Fe+(Ye.votes?.total_votes??0),0),ve=(Fe,Ye)=>{Ye.stopPropagation(),!(!ge||J)&&I(mt=>be?mt.includes(Fe)?mt.filter(Ht=>Ht!==Fe):mt.length>=xe?mt:[...mt,Fe]:mt[0]===Fe?[]:[Fe])},We=async Fe=>{if(Fe.stopPropagation(),!(!ge||J||F.length===0)){te(!0);try{if(await Promise.resolve(l?.(a.author,a.permlink,F))===!1)return;Z(F),I([])}finally{te(!1)}}};return e.jsxs("div",{className:"border border-[var(--hrk-border-subtle)] rounded-[14px] bg-[var(--hrk-bg-surface)] transition-[background-color,border-color] duration-150 ease-out hover:bg-[var(--hrk-bg-surface-raised)] hover:border-[var(--hrk-border-default)] cursor-pointer",onClick:()=>u?.(a.author,a.permlink,a.question),children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:`https://images.hive.blog/u/${a.author}/avatar`,alt:a.author,className:"w-8 h-8 rounded-full bg-[var(--hrk-bg-surface-raised)]",onError:Fe=>{Fe.target.src=`https://ui-avatars.com/api/?name=${a.author}&background=random&size=32`}}),e.jsxs("div",{children:[e.jsxs("button",{onClick:Fe=>{Fe.stopPropagation(),C?.(a.author)},className:"text-sm font-medium text-white hover:text-blue-400",children:["@",a.author]}),e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)]",children:lA(a.created)})]})]}),e.jsx("span",{className:`text-[10px] font-semibold px-2 py-0.5 rounded-full ${Oe?"bg-[var(--hrk-bg-hover)]/30 text-[var(--hrk-text-tertiary)]":"bg-green-500/20 text-green-400"}`,children:q(Oe?"status.ended":"status.active")})]}),e.jsx("h3",{className:"text-sm font-semibold text-white mb-1",children:e.jsx(Gc,{text:a.question})}),se&&e.jsx("p",{className:"text-[var(--hrk-text-tertiary)] text-xs line-clamp-2 mb-2",children:e.jsx(Gc,{text:se.substring(0,150)})}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-[var(--hrk-text-tertiary)] mb-3",children:[e.jsxs("span",{children:[de," ",q(de!==1?"poll.voters":"poll.voter")]}),e.jsxs("span",{children:[ue.length," ",ue.length!==1?q("poll.options"):q("poll.option")]}),a.poll_stats?.total_hive_hp!=null&&a.poll_stats.total_hive_hp>0&&e.jsxs("span",{children:[(a.poll_stats.total_hive_hp/1e3).toFixed(1),"k HP"]}),a.end_time&&e.jsx("span",{children:Oe?q("status.ended"):q("poll.endsIn",{when:lA(a.end_time)})})]}),ge&&e.jsxs("p",{className:"mb-2 text-[11px] text-[var(--hrk-text-tertiary)]",children:[Le?q("poll.changeYourVote"):"",be?q("poll.selectUpTo",{count:xe}):q("poll.selectAnOption"),F.length>0&&e.jsxs("span",{className:"ml-1 text-blue-400",children:["· ",q("poll.selected",{count:F.length})]})]}),e.jsx("div",{className:"space-y-2",onClick:Fe=>Fe.stopPropagation(),children:ue.map(Fe=>{const Ye=Fe.votes?.total_votes??0,mt=He>0?Math.round(Ye/He*100):0,Ht=Ie.includes(Fe.choice_num),Mr=F.includes(Fe.choice_num),jt=be&&F.length>=xe&&!Mr,Et=ge&&!jt;let br="border-[var(--hrk-border-subtle)]",ar=e.jsx(X.Circle,{className:"w-3.5 h-3.5 text-[var(--hrk-text-tertiary)] flex-shrink-0"}),hr="bg-blue-600/20";return Mr?(br="border-blue-500/60",ar=e.jsx(X.CheckCircle2,{className:"w-3.5 h-3.5 text-blue-400 flex-shrink-0"})):Ht&&!Le?(br="border-green-600/60",ar=e.jsx(X.CheckCircle2,{className:"w-3.5 h-3.5 text-green-500 flex-shrink-0"}),hr="bg-green-600/20"):Ht&&Le&&(br="border-green-800/40",ar=e.jsx(X.CheckCircle2,{className:"w-3.5 h-3.5 text-green-700 flex-shrink-0"}),hr="bg-green-900/10"),e.jsxs("div",{className:`relative rounded-[10px] overflow-hidden border ${br} bg-[var(--hrk-bg-surface-sunken)] transition-colors duration-150 ease-out ${Et?"cursor-pointer hover:border-[var(--hrk-info)]":jt?"opacity-50 cursor-not-allowed":""}`,onClick:je=>ve(Fe.choice_num,je),children:[mt>0&&e.jsx("div",{className:`absolute inset-y-0 left-0 ${hr} transition-all duration-500`,style:{width:`${mt}%`}}),e.jsxs("div",{className:"relative flex items-center justify-between px-3 py-2 gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[ar,e.jsx("span",{className:`text-sm truncate ${Mr?"text-blue-300 font-medium":Ht&&!Le?"text-green-300 font-medium":Ht&&Le?"text-green-700":"text-[var(--hrk-text-primary)]"}`,children:e.jsx(Gc,{text:Fe.choice_text})})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0 text-[11px] text-[var(--hrk-text-tertiary)]",children:[e.jsxs("span",{children:[mt,"%"]}),e.jsx("span",{className:"text-[var(--hrk-text-tertiary)]",children:"·"}),e.jsxs("span",{children:[Ye," vote",Ye!==1?"s":""]})]})]})]},Fe.choice_num)})}),rt&&e.jsx("div",{className:"mt-3",onClick:Fe=>Fe.stopPropagation(),children:e.jsxs("button",{onClick:We,disabled:F.length===0||J,className:"flex items-center gap-2 px-4 py-2 bg-[var(--hrk-brand)] hover:bg-[var(--hrk-brand-hover)] disabled:bg-[var(--hrk-bg-surface-raised)] disabled:text-[var(--hrk-text-tertiary)] text-[var(--hrk-text-on-brand)] text-sm font-medium rounded-[10px] transition-colors w-full justify-center",children:[e.jsx(X.Send,{className:"w-3.5 h-3.5"}),J?q("poll.submitting"):Le?q("poll.changeVote"):F.length>1?q("poll.submitVotes"):q("poll.submitVote")]})}),ye&&e.jsxs("div",{className:"mt-2 text-[11px] text-green-500",children:[q("poll.voted"),Ee?` · ${q("poll.voteChangesAllowed")}`:""]})]}),e.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-[var(--hrk-border-subtle)]/50",onClick:Fe=>Fe.stopPropagation(),children:e.jsx(Lg,{author:a.author,permlink:a.permlink,currentUser:o,onUserClick:C,hiveIconUrl:"/images/hive_logo.png",initialVotes:[],initialCommentsCount:0,postCreatedAt:a.created,onUpvote:d?Fe=>d(a.author,a.permlink,Fe):void 0,onSubmitComment:f?(Fe,Ye,mt)=>f(Fe,Ye,mt):void 0,onClickCommentUpvote:h,onReblog:g?()=>g(a.author,a.permlink):void 0,isReblogged:x?x(a.author,a.permlink):!1,onCheckReblogged:y,onShare:w?()=>w(a.author,a.permlink):void 0,onTip:a.author!==o&&b?()=>b(a.author,a.permlink):void 0,onReport:a.author!==o&&N?()=>N(a.author,a.permlink):void 0,disableCommentsModal:!!v,onComments:v?()=>v(a.author,a.permlink):void 0,ecencyToken:R,threeSpeakApiKey:M,giphyApiKey:E,templateToken:P,templateApiBaseUrl:$,defaultVotePercent:H,voteWeightStep:z,allowLandscapeVideos:A})})]})},VC=["snaps","ecency","threads","liketu"],Ch={posts:[],nextStartId:null,loading:!1,loadingMore:!1,error:null},uA=()=>({snaps:{...Ch},ecency:{...Ch},threads:{...Ch},liketu:{...Ch}}),kw=new Map;function xU(a){return VC.some(o=>a[o].posts.length>0||a[o].nextStartId!==null||a[o].error!==null)}const vU=({username:a,currentUsername:o,reportedPosts:l=[],reportedAuthors:u=[],...d})=>{const[f,h]=T.useState(()=>kw.get(a)??uA()),g=T.useRef(a);T.useEffect(()=>{g.current!==a&&(g.current=a,h(kw.get(a)??uA()))},[a]),T.useEffect(()=>{g.current===a&&kw.set(a,f)},[a,f]);const x=T.useMemo(()=>new Set(l.map(N=>`${N.author}/${N.permlink}`)),[l]),y=T.useMemo(()=>new Set(u),[u]),b=T.useCallback(N=>N.filter(C=>!y.has(C.author)&&!x.has(`${C.author}/${C.permlink}`)),[x,y]);T.useEffect(()=>{const N=kw.get(a);if(N&&xU(N)){h(N);return}let C=!1;const R=new AbortController;h({snaps:{...Ch,loading:!0},ecency:{...Ch,loading:!0},threads:{...Ch,loading:!0},liketu:{...Ch,loading:!0}});const M=async E=>{try{const{snaps:P,nextStartId:$}=await Nr.getUserSnaps(a,void 0,o,R.signal,Gv[E]);if(C)return;h(H=>({...H,[E]:{posts:P,nextStartId:$,loading:!1,loadingMore:!1,error:null}}))}catch(P){if(C)return;const $=P;if($.name==="AbortError")return;h(H=>({...H,[E]:{...H[E],loading:!1,error:$.message??"Failed to load"}}))}};return Promise.all(VC.map(M)),()=>{C=!0,R.abort()}},[a,o]);const w=T.useCallback(async N=>{const C=f[N];if(!(!C||C.loadingMore||C.nextStartId===null)){h(R=>({...R,[N]:{...R[N],loadingMore:!0}}));try{const{snaps:R,nextStartId:M}=await Nr.getUserSnaps(a,C.nextStartId,o,void 0,Gv[N]);h(E=>({...E,[N]:{posts:[...E[N].posts,...R],nextStartId:M,loading:!1,loadingMore:!1,error:null}}))}catch(R){const M=R;if(M.name==="AbortError")return;h(E=>({...E,[N]:{...E[N],loadingMore:!1,error:M.message??"Failed to load"}}))}}},[f,a,o]),v=T.useMemo(()=>({snaps:{posts:b(f.snaps.posts),loading:f.snaps.loading,loadingMore:f.snaps.loadingMore,hasMore:f.snaps.nextStartId!==null,error:f.snaps.error,onLoadMore:()=>{w("snaps")}},ecency:{posts:b(f.ecency.posts),loading:f.ecency.loading,loadingMore:f.ecency.loadingMore,hasMore:f.ecency.nextStartId!==null,error:f.ecency.error,onLoadMore:()=>{w("ecency")}},threads:{posts:b(f.threads.posts),loading:f.threads.loading,loadingMore:f.threads.loadingMore,hasMore:f.threads.nextStartId!==null,error:f.threads.error,onLoadMore:()=>{w("threads")}},liketu:{posts:b(f.liketu.posts),loading:f.liketu.loading,loadingMore:f.liketu.loadingMore,hasMore:f.liketu.nextStartId!==null,error:f.liketu.error,onLoadMore:()=>{w("liketu")}},snapie:{posts:[],loading:!1,hasMore:!1,error:null},hivesuite:{posts:[],loading:!1,hasMore:!1,error:null}}),[f,b,w]);return e.jsx(Uj,{feeds:v,currentUser:o,...d})},cA=a=>{const o=/Z|[+-]\d{2}:?\d{2}$/.test(a)?a:`${a}Z`,l=new Date,u=new Date(o),d=Math.floor((l.getTime()-u.getTime())/1e3);return d<60?"just now":d<3600?`${Math.floor(d/60)}m ago`:d<86400?`${Math.floor(d/3600)}h ago`:d<2592e3?`${Math.floor(d/86400)}d ago`:u.toLocaleDateString()},jw=a=>{if(a==null||a==="")return{score:"25",formatted:"25.00"};const o=Number(a);if(isNaN(o)||o===0)return{score:"25",formatted:"25.00"};const l=o<0,u=Math.abs(o);if(u<1e3)return{score:Math.round(o).toString(),formatted:o.toFixed(2)};let d=Math.log10(u);d=Math.max(d-9,0);const f=(l?-1:1)*d*9+25;return{score:Math.round(f).toString(),formatted:f.toFixed(2)}},yU=a=>{try{return new Date(a).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return a}},wU=a=>{let o=a;return o=o.replace(/<[^>]*>/g,""),o=o.replace(/!\[.*?\]\([^\s)]+\)/g,""),o=o.replace(/\[([^\]]*)\]\([^\s)]+\)/g,"$1"),o=o.replace(/https?:\/\/[^\s)>\]]+/g,""),o=o.replace(/\[.*?\]/g,""),o=o.replace(/\(https?:\/\/[^\s)]*\)/g,""),o=o.replace(/[*_~`#>|]/g,""),o=o.replace(/^[-_*]{3,}\s*$/gm,""),o=o.replace(/\s+/g," ").trim(),o},Pl={},_U=({username:a,currentUsername:o,onBack:l,onOpenMenu:u,onOpenProfileMenu:d,showBackButton:f=!1,tabShown:h,ecencyToken:g,threeSpeakApiKey:x,giphyApiKey:y,templateToken:b,templateApiBaseUrl:w,reportedPosts:v=[],reportedAuthors:N=[],onFollow:C,onUnfollow:R,onIgnoreAuthor:M,onReportUser:E,onMute:P,onUnmute:$,onUpvote:H,onSubmitComment:z,onClickCommentUpvote:A,onReblog:q,isPostReblogged:F,onCheckReblogged:I,onTip:Y,onReportPost:Z,onToggleBookmark:J,isPostBookmarked:te,onToggleUserBookmark:de,isUserBookmarked:fe=!1,onDeletePost:W,onEditPost:Q,isCurator:se,onCurationRequest:xe,onFetchCurationStatus:be,onUpdateRcDelegation:Oe,onDeleteRcDelegation:Se,onCreateHpDelegation:me,onCreateRcDelegation:ie,onTransfer:ye,onPowerUp:Ee,onPowerDown:Ie,onTransferToSavings:ge,onTransferFromSavings:rt,onStopPowerDown:Le,onCancelSavingsWithdrawal:ue,onClaimRewards:He,onVotePoll:ve,onEditSnap:We,onUserClick:Fe,onPostClick:Ye,onSnapClick:mt,onPollClick:Ht,getPostUrl:Mr,getUserUrl:jt,getTagUrl:Et,getCommunityUrl:br,onActivityPermlink:ar,onActivitySelect:hr,onShare:je,onSharePost:Ft,onCommentClick:Xe,onClickSnapCommentIcon:Ct,onClickSnapCommentCount:pt,onFavouriteList:ze,onAddToFavourite:Je,isFavourited:At=!1,favouriteCount:st=0,defaultVotePercent:Lt=100,voteWeightStep:Zt=.25,allowLandscapeVideos:Vr=!1,awaitingWalletApproval:pa=!1,renderSnapHeaderActions:Kr,renderEngineTokens:ea,walletInitialView:ca="wallet",onWalletViewChange:ne,onEditProfile:oe,onPostingAuthority:_e,activeTab:Ue,onActiveTabChange:Tt,onSubTabChange:tr,initialSubTab:gt})=>{const Nt=dj(),Yr=iy(),ut=a.replace(/^@/,"").trim(),ur=Pl[ut],[nr,zr]=T.useState(ur?.profile||null),[Na,Xt]=T.useState(!ur?.profile),[Dt,Kt]=T.useState(null),cr=Ue!==void 0,mr=Ue??(h&&h.length>0?h[0]:"blogs"),Rr=T.useCallback(ae=>ae==="blogs"||ae==="posts"?"posts":ae==="comments"||ae==="replies"?"replies":ae==="authorRewards"||ae==="curationRewards"||ae==="rewards"?"rewards":ae==="followers"||ae==="following"||ae==="follows"?"followers":ae==="activities"||ae==="curation"?"activities":ae==="wallet"||ae==="votingPower"||ae==="tokens"?"wallet":ae,[]),Ir=Rr(mr),[ga,fn]=T.useState(Ir),vn=cr?Ue:ga,vr=Rr(vn),[Rt,ir]=T.useState(ur?.postsSubTab!==void 0?ur.postsSubTab:gt==="posts"||gt==="blogs"?gt:mr==="posts"?"posts":"blogs"),[Ar,Pr]=T.useState(ur?.repliesSubTab!==void 0?ur.repliesSubTab:gt==="replies"||gt==="comments"?gt:mr==="replies"?"replies":"comments"),[da,$r]=T.useState(ur?.rewardsSubTab!==void 0?ur.rewardsSubTab:gt==="authorRewards"||gt==="curationRewards"?gt:mr==="curationRewards"?"curationRewards":"authorRewards"),[dr,ia]=T.useState(ur?.followsSubTab!==void 0?ur.followsSubTab:gt==="following"||gt==="followers"?gt:mr==="following"?"following":"followers"),[Ae,et]=T.useState(ur?.activitiesSubTab!==void 0?ur.activitiesSubTab:gt==="curation"||gt==="activities"?gt:mr==="curation"?"curation":"activities"),[ot,Qt]=T.useState(ur?.walletSubTab!==void 0?ur.walletSubTab:gt==="votingPower"||gt==="tokens"||gt==="wallet"?gt:mr==="votingPower"?"votingPower":ca==="tokens"?"tokens":"wallet");T.useEffect(()=>{gt&&(gt==="blogs"||gt==="posts"?ir(gt):gt==="comments"||gt==="replies"?Pr(gt):gt==="authorRewards"||gt==="curationRewards"?$r(gt):gt==="followers"||gt==="following"?ia(gt):gt==="activities"||gt==="curation"?et(gt):(gt==="wallet"||gt==="tokens"||gt==="votingPower")&&Qt(gt))},[gt]);const Xr=Ue?Rr(Ue):null;T.useEffect(()=>{Xr&&Gr.current!==Xr&&(Gr.current!==null&&(Xr==="posts"&&(!gt||gt!=="blogs"&&gt!=="posts")?ir("blogs"):Xr==="replies"&&(!gt||gt!=="comments"&&gt!=="replies")?Pr("comments"):Xr==="rewards"&&(!gt||gt!=="authorRewards"&&gt!=="curationRewards")?$r("authorRewards"):Xr==="followers"&&(!gt||gt!=="followers"&&gt!=="following")?ia("followers"):Xr==="activities"&&(!gt||gt!=="activities"&&gt!=="curation")?et("activities"):Xr==="wallet"&&(!gt||gt!=="wallet"&&gt!=="tokens"&&gt!=="votingPower")&&Qt("wallet")),Gr.current=Xr)},[Xr,gt]),T.useEffect(()=>{ca==="tokens"?Qt("tokens"):ca==="wallet"&&ot==="tokens"&&Qt("wallet")},[ca]),T.useCallback(ae=>ae==="posts"?Rt:ae==="replies"?Ar:ae==="rewards"?da:ae==="followers"?dr:ae==="activities"?Ae:ae==="wallet"?ot:ae,[Rt,Ar,da,dr,Ae,ot]);const sr=T.useCallback(ae=>{const qe=Rr(ae),dt=Rr(vn);qe===dt&&(qe==="posts"&&Rt!==ae||qe==="replies"&&Ar!==ae||qe==="rewards"&&da!==ae||qe==="followers"&&dr!==ae||qe==="activities"&&Ae!==ae||qe==="wallet"&&ot!==ae)?(ae==="blogs"||ae==="posts"?(ir(ae),tr?.("posts",ae)):ae==="comments"||ae==="replies"?(Pr(ae),tr?.("replies",ae)):ae==="authorRewards"||ae==="curationRewards"?($r(ae),tr?.("rewards",ae)):ae==="followers"||ae==="following"?(ia(ae),tr?.("followers",ae)):ae==="activities"||ae==="curation"?(et(ae),tr?.("activities",ae)):(ae==="wallet"||ae==="tokens"||ae==="votingPower")&&(Qt(ae),tr?.("wallet",ae)),qe==="wallet"&&ae==="tokens"?ne?.("tokens"):qe==="wallet"&&ae==="wallet"&&ne?.("wallet")):qe!==dt&&(qe==="posts"?ir("blogs"):qe==="replies"?Pr("comments"):qe==="rewards"?$r("authorRewards"):qe==="followers"?ia("followers"):qe==="activities"?et("activities"):qe==="wallet"&&Qt("wallet"),cr||fn(qe),Tt?.(qe))},[cr,Tt,tr,ne,Rr,vn,Rt,Ar,da,dr,Ae,ot]),Lr=T.useRef(""),gr=T.useRef(0),Gr=T.useRef(null),er=T.useRef(vr);er.current=vr;const or=T.useRef(null),[Br,Ur]=T.useState(ur?.blogs||[]),[Vt,Wr]=T.useState(ur?.posts||[]),[qr,yn]=T.useState(ur?.comments||[]),[Fr,sn]=T.useState(ur?.replies||[]),[ba,wn]=T.useState(ur?.curations||[]),[xa,oa]=T.useState(ur?.lowestCurationIndex!==void 0?ur.lowestCurationIndex:-1),[ra,Ta]=T.useState(0),[Nn,Pn]=T.useState(ur?.polls||[]),[ha,Ia]=T.useState(ur?.authorRewards||[]),[Ka,en]=T.useState(ur?.authorRewardsTotals||{totalHbd:0,totalHpEq:0}),[ke,wt]=T.useState(ur?.curationRewards||[]),[_t,Pt]=T.useState(ur?.curationRewardsTotals||{totalHp:0,totalHbd:0}),[It,nt]=T.useState(!1),[lr,bt]=T.useState(ur?.followers||[]),[rr,pr]=T.useState(ur?.following||[]),[Sr,_a]=T.useState(ur?.badges||[]),[ja,on]=T.useState(ur?.badgeAccounts||[]),[hn,Ca]=T.useState(ur?.hivebuzzBadges||[]),[Ga,pe]=T.useState(ur?.hiveposh||{}),[Te,St]=T.useState(ur?.witnessVotes||[]),[Gt,Or]=T.useState(null),[Jr,Ba]=T.useState(100),[kr,ya]=T.useState(!1),[Sa,An]=T.useState(ca);T.useEffect(()=>{An(ca)},[ca]);const[fr,Ne]=T.useState(!1),[lt,Wt]=T.useState(ur?.hasMore||{blogs:!0,posts:!0,snaps:!0,polls:!1,comments:!0,replies:!0,activities:!1,authorRewards:!1,curationRewards:!1,followers:!0,following:!0,follows:!0,wallet:!1,votingPower:!1,badges:!1,witnessVotes:!1,growth:!1,curation:!0,rewards:!1,tokens:!1}),la=20,Ea=100,Wa=T.useRef(null),[za,Ua]=T.useState(!1),[Za,tn]=T.useState(!1),[Ja,ms]=T.useState(!1),[qs,To]=T.useState(!1),[Kn,js]=T.useState(null),ro=T.useRef(null),Vs=T.useRef(null),[gl,Tn]=T.useState(!1),[Ce,Bt]=T.useState(!1),xr=T.useCallback(()=>{const ae=Vs.current;ae&&(Tn(ae.scrollLeft>0),Bt(ae.scrollLeft+ae.clientWidth<ae.scrollWidth-1),ut&&(Pl[ut]?Pl[ut].tabScrollLeft=ae.scrollLeft:Pl[ut]={tab:er.current,scrollTop:0,tabScrollLeft:ae.scrollLeft}))},[ut]);T.useEffect(()=>{let ae;const qe=()=>{const Jt=Vs.current;if(!Jt){ae=setTimeout(qe,100);return}xr(),Jt.addEventListener("scroll",xr),window.addEventListener("resize",xr);const kt=new ResizeObserver(xr);kt.observe(Jt),dt.current=()=>{Jt.removeEventListener("scroll",xr),window.removeEventListener("resize",xr),kt.disconnect()}},dt={current:()=>{}};return qe(),()=>{clearTimeout(ae),dt.current()}},[xr,h,vr]);const aa=T.useCallback(ae=>{const qe=Vs.current;qe&&qe.scrollBy({left:ae==="left"?-150:150,behavior:"smooth"})},[]);Tj(),T.useEffect(()=>{if(!ut){pe({});return}let ae=!1;return pe({}),fetch(`https://hiveposh.com/api/v0/linked-accounts/${ut}`).then(qe=>qe.ok?qe.json():null).then(qe=>{ae||!qe||pe({twitter:qe.twitter_username||void 0,reddit:qe.reddit_username||void 0})}).catch(()=>{}),()=>{ae=!0}},[ut]);const Da=!!o&&o.toLowerCase()===ut.toLowerCase(),Ra=T.useMemo(()=>new Set(v.map(ae=>`${ae.author}/${ae.permlink}`)),[v]),Ns=T.useMemo(()=>new Set(N),[N]),Sn=T.useCallback(ae=>ae.filter(qe=>!Ns.has(qe.author)&&!Ra.has(`${qe.author}/${qe.permlink}`)),[Ra,Ns]);T.useEffect(()=>{const ae=qe=>{ro.current&&!ro.current.contains(qe.target)&&tn(!1)};return document.addEventListener("click",ae),()=>document.removeEventListener("click",ae)},[]),T.useEffect(()=>{(async()=>{if(ut){Xt(!0),Kt(null);try{const[qe,dt,Jt]=await Promise.all([Nr.getProfile(ut),Nr.getAccounts([ut]),Nr.getDynamicGlobalProperties()]),kt=qe?.result,Er=dt?.[0];if(!kt){Kt("User not found");return}let ma;if(Jt&&Er?.vesting_shares){const fs=parseFloat(Er.vesting_shares.split(" ")[0]),Es=parseFloat(Jt.total_vesting_shares.split(" ")[0]),is=parseFloat(Jt.total_vesting_fund_hive.split(" ")[0]);ma=fs/Es*is}let ns;Er?.voting_power&&(ns=Er.voting_power/1e4*100);let Ha=!1,Mn=!1;if(o&&o!==ut)try{const[fs,Es]=await Promise.all([Nr.getFollowing(o),Nr.getMuted(o)]);Ha=fs.some(is=>is.following===ut),Mn=Es.some(is=>is.following===ut)}catch{}let Fa=null;if(Er?.posting_json_metadata)try{Fa=JSON.parse(Er.posting_json_metadata)?.profile}catch{}let Wn=null;if(Er?.json_metadata)try{Wn=JSON.parse(Er.json_metadata)?.profile}catch{}const fa=kt.metadata?.profile,On={username:kt.name,name:Fa?.name||Wn?.name||fa?.name,about:Fa?.about||Wn?.about||fa?.about,location:Fa?.location||Wn?.location||fa?.location,website:Fa?.website||Wn?.website||fa?.website,profileImage:Fa?.profile_image||Wn?.profile_image||fa?.profile_image,coverImage:Fa?.cover_image||Wn?.cover_image||fa?.cover_image,followersCount:kt.stats?.followers||0,followingCount:kt.stats?.following||0,postsCount:kt.post_count||0,reputation:kt.reputation||0,isFollowing:Ha,isMuted:Mn,created:kt.created,lastActivity:Er?.last_post,hivePower:ma,votingPower:ns};zr(On)}catch(qe){console.error("Error fetching user profile:",qe),Kt("Failed to load user profile")}finally{Xt(!1)}}})()},[ut,o]);const ps=T.useRef({profile:nr,blogs:Br,posts:Vt,comments:qr,replies:Fr,curations:ba,lowestCurationIndex:xa,polls:Nn,authorRewards:ha,authorRewardsTotals:Ka,curationRewards:ke,curationRewardsTotals:_t,followers:lr,following:rr,badges:Sr,badgeAccounts:ja,hivebuzzBadges:hn,hiveposh:Ga,witnessVotes:Te,votingPowerData:Gt,hasMore:lt,postsSubTab:Rt,repliesSubTab:Ar,rewardsSubTab:da,followsSubTab:dr,activitiesSubTab:Ae,walletSubTab:ot});T.useEffect(()=>{ps.current={profile:nr,blogs:Br,posts:Vt,comments:qr,replies:Fr,curations:ba,lowestCurationIndex:xa,polls:Nn,authorRewards:ha,authorRewardsTotals:Ka,curationRewards:ke,curationRewardsTotals:_t,followers:lr,following:rr,badges:Sr,badgeAccounts:ja,hivebuzzBadges:hn,hiveposh:Ga,witnessVotes:Te,votingPowerData:Gt,hasMore:lt,postsSubTab:Rt,repliesSubTab:Ar,rewardsSubTab:da,followsSubTab:dr,activitiesSubTab:Ae,walletSubTab:ot}},[nr,Br,Vt,qr,Fr,ba,xa,Nn,ha,Ka,ke,_t,lr,rr,Sr,ja,hn,Ga,Te,Gt,lt,Rt,Ar,da,dr,Ae,ot]),T.useEffect(()=>{if(Lr.current&&Lr.current!==ut){const Jt=Pl[Lr.current];Pl[Lr.current]={tab:vr,scrollTop:or.current?.scrollTop!==void 0?or.current.scrollTop:Jt?.scrollTop||0,tabScrollLeft:Vs.current?.scrollLeft!==void 0?Vs.current.scrollLeft:Jt?.tabScrollLeft||0,...ps.current}}Lr.current=ut;const ae=Pl[ut];if(ae)zr(ae.profile||null),Xt(!ae.profile),Ur(ae.blogs||[]),Wr(ae.posts||[]),yn(ae.comments||[]),sn(ae.replies||[]),wn(ae.curations||[]),oa(ae.lowestCurationIndex!==void 0?ae.lowestCurationIndex:-1),Pn(ae.polls||[]),Ia(ae.authorRewards||[]),en(ae.authorRewardsTotals||{totalHbd:0,totalHpEq:0}),wt(ae.curationRewards||[]),Pt(ae.curationRewardsTotals||{totalHp:0,totalHbd:0}),bt(ae.followers||[]),pr(ae.following||[]),_a(ae.badges||[]),on(ae.badgeAccounts||[]),Ca(ae.hivebuzzBadges||[]),pe(ae.hiveposh||{}),St(ae.witnessVotes||[]),Or(ae.votingPowerData||null),Wt(ae.hasMore||{blogs:!0,posts:!0,snaps:!0,polls:!1,comments:!0,replies:!0,activities:!1,authorRewards:!1,curationRewards:!1,followers:!0,following:!0,follows:!0,wallet:!1,votingPower:!1,badges:!1,witnessVotes:!1,growth:!1,curation:!0,rewards:!1,tokens:!1}),ae.postsSubTab!==void 0&&ir(ae.postsSubTab),ae.repliesSubTab!==void 0&&Pr(ae.repliesSubTab),ae.rewardsSubTab!==void 0&&$r(ae.rewardsSubTab),ae.followsSubTab!==void 0&&ia(ae.followsSubTab),ae.activitiesSubTab!==void 0&&et(ae.activitiesSubTab),ae.walletSubTab!==void 0&&Qt(ae.walletSubTab);else{zr(null),Xt(!0),Ur([]),Wr([]),Pn([]),Ia([]),en({totalHbd:0,totalHpEq:0}),wt([]),Pt({totalHp:0,totalHbd:0}),yn([]),sn([]),bt([]),pr([]),wn([]),oa(-1),St([]),Or(null),_a([]),on([]),Ca([]),pe({}),Wt({blogs:!0,posts:!0,snaps:!0,polls:!1,comments:!0,replies:!0,activities:!1,authorRewards:!1,curationRewards:!1,followers:!0,following:!0,follows:!0,wallet:!1,votingPower:!1,badges:!1,witnessVotes:!1,growth:!1,curation:!0,rewards:!1,tokens:!1});const Jt=Ue??(h&&h.length>0?h[0]:"blogs");ir(gt==="posts"||gt==="blogs"?gt:Jt==="posts"?"posts":"blogs"),Pr(gt==="replies"||gt==="comments"?gt:Jt==="replies"?"replies":"comments"),$r(gt==="authorRewards"||gt==="curationRewards"?gt:Jt==="curationRewards"?"curationRewards":"authorRewards"),ia(gt==="following"||gt==="followers"?gt:Jt==="following"?"following":"followers"),et(gt==="curation"||gt==="activities"?gt:Jt==="curation"?"curation":"activities"),Qt(gt==="votingPower"||gt==="tokens"||gt==="wallet"?gt:Jt==="votingPower"?"votingPower":ca==="tokens"?"tokens":"wallet")}Ba(100);const qe=h&&h.length>0?h[0]:"blogs",dt=ae?.tab&&(!h||h.length===0||h.includes(ae.tab));if(!cr){const Jt=dt?ae.tab:qe;fn(Rr(Jt)),Tt?.(Jt)}},[ut]),T.useEffect(()=>{if(Na)return;const ae=Pl[ut];requestAnimationFrame(()=>{requestAnimationFrame(()=>{ae?(console.log("[HRK Scroll] Restoring scroll positions - username:",ut,"scrollTop:",ae.scrollTop,"tabScrollLeft:",ae.tabScrollLeft,"scrollHeight:",or.current?.scrollHeight,"clientHeight:",or.current?.clientHeight),or.current?.scrollTo({top:ae.scrollTop}),Vs.current?.scrollTo({left:ae.tabScrollLeft})):(console.log("[HRK Scroll] No cached state found for username:",ut),or.current?.scrollTo({top:0}),Vs.current?.scrollTo({left:0}))})})},[Na,ut]),T.useEffect(()=>()=>{const ae=Lr.current;if(ae){const qe=Pl[ae];Pl[ae]={tab:er.current,scrollTop:qe?.scrollTop!==void 0?qe.scrollTop:or.current?.scrollTop||0,tabScrollLeft:qe?.tabScrollLeft!==void 0?qe.tabScrollLeft:Vs.current?.scrollLeft||0,...ps.current}}},[]),T.useEffect(()=>{const ae=new AbortController,{signal:qe}=ae;return(async()=>{if(!ut)return;let Jt=!1;if(vr==="posts")Jt=Rt==="blogs"?Br.length>0:Vt.length>0;else if(vr==="replies")Jt=Ar==="comments"?qr.length>0:Fr.length>0;else if(vr==="polls")Jt=Nn.length>0;else if(vr==="followers")Jt=dr==="followers"?lr.length>0:rr.length>0;else if(vr==="activities"){if(Ae==="curation"){const kt=ra>gr.current;Jt=ba.length>0&&!kt}}else vr==="rewards"&&(Jt=da==="authorRewards"?ha.length>0:ke.length>0);Jt||(ya(!0),vr==="rewards"&&(Ia([]),en({totalHbd:0,totalHpEq:0}),wt([]),Pt({totalHp:0,totalHbd:0}))),nt(!1);try{switch(vr){case"activities":{if(Ae==="curation"){const kt=ra>gr.current;if(gr.current=ra,ba.length>0&&!kt){ya(!1);break}const Er=(1n<<0n).toString(),ma=await Ul.getAccountHistory(ut,-1,100,Er,"0"),Ha=Ul.convertToActivityListItems(ma,ut).filter(Fa=>Fa.type==="vote"&&Fa.voter===ut);Ha.sort((Fa,Wn)=>Wn.index-Fa.index),wn(Ha);const Mn=ma.length>0?Math.min(...ma.map(Fa=>Fa.index)):-1;oa(Mn),Wt(Fa=>({...Fa,curation:ma.length>0&&Mn>0}))}break}case"posts":{if(Rt==="blogs"){if(Br.length>0){ya(!1);break}const kt=Sn(await Nr.getUserBlogs(ut,la,void 0,void 0,qe));Ur(kt),Wt(Er=>({...Er,blogs:kt.length>=la}))}else{if(Vt.length>0){ya(!1);break}const kt=Sn(await Nr.getUserPosts(ut,la,void 0,void 0,qe));Wr(kt),Wt(Er=>({...Er,posts:kt.length>=la}))}break}case"snaps":break;case"polls":{if(Nn.length>0){ya(!1);break}const kt=Sn(await Nr.getUserPolls(ut,qe));Pn(kt),Wt(Er=>({...Er,polls:!1}));break}case"replies":{if(Ar==="comments"){if(qr.length>0){ya(!1);break}const kt=Sn(await Nr.getUserComments(ut,la,void 0,void 0,qe));yn(kt),Wt(Er=>({...Er,comments:kt.length>=la}))}else{if(Fr.length>0){ya(!1);break}const kt=await Nr.getUserReplies(ut,la,void 0,void 0,qe);sn(Sn(kt)),Wt(Er=>({...Er,replies:kt.length>=la}))}break}case"followers":{if(dr==="followers"){if(lr.length>0){ya(!1);break}const kt=await Nr.getFollowers(ut,null,Ea,qe);bt(kt),Wt(Er=>({...Er,followers:kt.length>=Ea}))}else{if(rr.length>0){ya(!1);break}const kt=await Nr.getFollowing(ut,null,Ea,qe);pr(kt),Wt(Er=>({...Er,following:kt.length>=Ea}))}break}case"rewards":{if(da==="authorRewards"){if(ha.length>0){ya(!1);break}nt(!0);const kt=await Nr.getPendingAuthorRewards(ut,(Er,ma,ns)=>{qe.aborted||(Ia([...Er]),en({totalHbd:ma,totalHpEq:ns}),ya(!1))},qe);Ia(kt.rows),en({totalHbd:kt.totalHbd,totalHpEq:kt.totalHpEq}),nt(!1)}else{if(ke.length>0){ya(!1);break}nt(!0);const kt=await Nr.getPendingCurationRewards(ut,(Er,ma,ns)=>{qe.aborted||(wt([...Er]),Pt({totalHp:ma,totalHbd:ns}),ya(!1))},qe);wt(kt.rows),Pt({totalHp:kt.totalHp,totalHbd:kt.totalHbd}),nt(!1)}break}case"wallet":{if(ot==="votingPower"){if(Gt!==null){ya(!1);break}const[kt,,Er]=await Promise.all([Nr.getAccounts([ut],qe),Nr.getDynamicGlobalProperties(qe),Nr.getFeedHistory(qe)]),ma=kt?.[0];if(ma){const Ha=ni=>parseFloat(String(ni).split(" ")[0])||0,Fa=(Ha(ma.vesting_shares)+Ha(ma.received_vesting_shares)-Ha(ma.delegated_vesting_shares))*1e6,Wn=Math.floor(Date.now()/1e3)-ma.voting_manabar.last_update_time;let fa=parseFloat(String(ma.voting_manabar.current_mana))+Wn*Fa/432e3;fa>Fa&&(fa=Fa);const On=Fa>0?fa/Fa*100:0,fs=Fa/4,Es=Math.floor(Date.now()/1e3)-ma.downvote_manabar.last_update_time;let is=parseFloat(String(ma.downvote_manabar.current_mana))+Es*fs/432e3;is>fs&&(is=fs);const tl=fs>0?is/fs*100:0;let Bi=0;try{const kn=(await(await fetch($l(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",method:"rc_api.find_rc_accounts",params:{accounts:[ut]},id:1}),signal:qe})).json())?.result?.rc_accounts?.[0];if(kn){const Ui=parseFloat(kn.rc_manabar.current_mana),ci=parseFloat(kn.max_rc);ci>0&&(Bi=Ui/ci*100)}}catch{}let Bn=0,Xs=0,Ws=0;try{const kn=(await(await fetch($l(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",method:"condenser_api.get_reward_fund",params:["post"],id:1}),signal:qe})).json())?.result;kn&&(Bn=Ha(kn.reward_balance),Xs=parseFloat(kn.recent_claims)||0)}catch{}if(Er?.current_median_history){const ni=Ha(Er.current_median_history.base),Un=Ha(Er.current_median_history.quote)||1;Ws=ni/Un}const gs=Math.min(On,100);Or({upvotePower:gs,downvotePower:Math.min(tl,100),resourceCredits:Math.min(Bi,100),maxMana:Fa,rewardBalance:Bn,recentClaims:Xs,feedPrice:Ws}),Ba(parseFloat(gs.toFixed(2)))}}break}case"badges":{if(Sr.length>0||hn.length>0){ya(!1);break}let kt=[],Er=null,ma=!0;for(;ma;){const Ha=await Nr.getFollowers(ut,Er,1e3,qe);kt=[...kt,...Ha],Ha.length<1e3?ma=!1:Er=Ha[Ha.length-1].follower}const ns=kt.map(Ha=>Ha.follower).filter(Ha=>Ha.startsWith("badge-"));if(_a(ns),ns.length>0){const Ha=await Nr.getAccounts(ns,qe);on(Ha)}else on([]);try{const Ha=await fetch(`https://hivebuzz.me/api/badges/${ut}`,{signal:qe});if(Ha.ok){const Mn=await Ha.json();if(Array.isArray(Mn)){const Fa=Mn.filter(Wn=>Wn.state==="on"||Wn.state==="exp");Ca(Fa)}}}catch(Ha){console.error("Failed to fetch HiveBuzz badges",Ha)}break}case"witnessVotes":{if(Te.length>0){ya(!1);break}const Er=(await Nr.getAccounts([ut],qe))?.[0];Er?.witness_votes&&St(Er.witness_votes);break}}}catch(kt){if(kt?.name==="AbortError")return;console.error(`Error fetching ${vr}:`,kt)}finally{qe.aborted||ya(!1)}})(),()=>{ae.abort()}},[ut,vr,ra,Rt,Ar,da,dr,Ae,ot]);const ss=T.useMemo(()=>Sn(Br),[Br,Sn]),Li=T.useMemo(()=>Sn(Vt),[Vt,Sn]),Xn=T.useMemo(()=>Sn(qr),[qr,Sn]),bl=T.useMemo(()=>Sn(Fr),[Fr,Sn]),Zi=T.useMemo(()=>Sn(Nn),[Nn,Sn]),ao=["posts","replies","activities","followers"],Co=T.useCallback(async()=>{if(!ao.includes(vr))return;let ae=!1;if(vr==="posts"?ae=lt[Rt]:vr==="replies"?ae=lt[Ar]:vr==="followers"?ae=lt[dr]:vr==="activities"&&(ae=lt[Ae]),!(fr||!ae||!ut)){Ne(!0);try{switch(vr){case"activities":{if(Ae==="curation"){if(xa<=0){Wt(ma=>({...ma,curation:!1}));break}const qe=(1n<<0n).toString(),dt=await Ul.getNextAccountHistoryPage(ut,xa,100,qe,"0"),kt=Ul.convertToActivityListItems(dt,ut).filter(ma=>ma.type==="vote"&&ma.voter===ut);kt.sort((ma,ns)=>ns.index-ma.index),wn(ma=>[...ma,...kt]);const Er=dt.length>0?Math.min(...dt.map(ma=>ma.index)):-1;oa(Er),Wt(ma=>({...ma,curation:dt.length>0&&Er>0}))}break}case"posts":{if(Rt==="blogs"){const qe=Br[Br.length-1];if(!qe)break;const dt=await Nr.getUserBlogs(ut,la,qe.author,qe.permlink),Jt=Sn(dt.length>0&&dt[0].permlink===qe.permlink?dt.slice(1):dt);Ur(kt=>[...kt,...Jt]),Wt(kt=>({...kt,blogs:Jt.length>=la-1}))}else{const qe=Vt[Vt.length-1];if(!qe)break;const dt=await Nr.getUserPosts(ut,la,qe.author,qe.permlink),Jt=Sn(dt.length>0&&dt[0].permlink===qe.permlink?dt.slice(1):dt);Wr(kt=>[...kt,...Jt]),Wt(kt=>({...kt,posts:Jt.length>=la-1}))}break}case"replies":{if(Ar==="comments"){const qe=qr[qr.length-1];if(!qe)break;const dt=await Nr.getUserComments(ut,la,qe.author,qe.permlink),Jt=Sn(dt.length>0&&dt[0].permlink===qe.permlink?dt.slice(1):dt);yn(kt=>[...kt,...Jt]),Wt(kt=>({...kt,comments:Jt.length>=la-1}))}else{const qe=Fr[Fr.length-1];if(!qe)break;const dt=await Nr.getUserReplies(ut,la,qe.author,qe.permlink),Jt=Sn(dt.length>0&&dt[0].permlink===qe.permlink?dt.slice(1):dt);sn(kt=>[...kt,...Jt]),Wt(kt=>({...kt,replies:dt.length>=la}))}break}case"followers":{if(dr==="followers"){const qe=lr[lr.length-1];if(!qe)break;const dt=await Nr.getFollowers(ut,qe.follower,Ea),Jt=dt.length>0&&dt[0].follower===qe.follower?dt.slice(1):dt;bt(kt=>[...kt,...Jt]),Wt(kt=>({...kt,followers:Jt.length>=Ea-1}))}else{const qe=rr[rr.length-1];if(!qe)break;const dt=await Nr.getFollowing(ut,qe.following,Ea),Jt=dt.length>0&&dt[0].following===qe.following?dt.slice(1):dt;pr(kt=>[...kt,...Jt]),Wt(kt=>({...kt,following:Jt.length>=Ea-1}))}break}}}catch(qe){console.error(`Error loading more ${vr}:`,qe)}finally{Ne(!1)}}},[vr,ut,o,fr,lt,Rt,Ar,dr,Ae,Br,Vt,qr,Fr,lr,rr,ba,xa]);T.useEffect(()=>{const ae=or.current;if(!ae)return;const qe=600;let dt=!1;const Jt=()=>{ut&&(Pl[ut]?Pl[ut].scrollTop=ae.scrollTop:Pl[ut]={tab:er.current,scrollTop:ae.scrollTop,tabScrollLeft:Vs.current?.scrollLeft||0}),!dt&&(dt=!0,requestAnimationFrame(()=>{dt=!1,ae.scrollTop+ae.clientHeight>=ae.scrollHeight-qe&&Co()}))};return ae.addEventListener("scroll",Jt,{passive:!0}),()=>ae.removeEventListener("scroll",Jt)},[Co,ut]),T.useEffect(()=>{const ae=vr==="posts"?lt[Rt]:vr==="replies"?lt[Ar]:vr==="followers"?lt[dr]:vr==="activities"?lt[Ae]:!1;if(fr||!ae)return;const qe=or.current;qe&&qe.scrollTop+qe.clientHeight>=qe.scrollHeight-600&&Co()},[fr,vr,lt,Rt,Ar,dr,Ae,Br.length,Vt.length,qr.length,Fr.length,lr.length,rr.length,ba.length,Co]);const Il=T.useCallback(async()=>{if(nr){Ua(!0),tn(!1);try{const ae=nr.isFollowing;ae&&R?await R(ut):!ae&&C&&await C(ut),zr(qe=>qe&&{...qe,isFollowing:!ae,followersCount:ae?Math.max(0,qe.followersCount-1):qe.followersCount+1}),setTimeout(async()=>{try{const qe=await Nr.getProfile(ut);qe?.result?.stats&&zr(dt=>dt&&{...dt,followersCount:qe.result.stats.followers??dt.followersCount,followingCount:qe.result.stats.following??dt.followingCount})}catch{}},3e3)}catch(ae){console.error("Follow/Unfollow error:",ae)}finally{Ua(!1)}}},[nr,ut,C,R]),Do=T.useCallback(async()=>{if(nr){Ua(!0),tn(!1);try{const ae=nr.isMuted,qe=ae?$:P;if(!qe||await qe(ut)===!1)return;zr(Jt=>Jt&&{...Jt,isMuted:!ae})}catch(ae){console.error("Mute/Unmute error:",ae)}finally{Ua(!1)}}},[nr,ut,P,$]),xi=T.useCallback(async()=>{Ua(!0);try{M&&await M(ut),ms(!1),tn(!1)}catch(ae){console.error("Error ignoring user:",ae)}finally{Ua(!1)}},[ut,M]),el=T.useCallback(async ae=>{Ua(!0);try{E&&await E(ut,ae),To(!1),tn(!1)}catch(qe){console.error("Error reporting user:",qe)}finally{Ua(!1)}},[ut,E]),Ou=T.useCallback(()=>{je?.(ut)},[ut,je]),Ss=T.useCallback(async()=>{ze&&await ze()},[ze]),Ru=T.useCallback(async()=>{Je&&await Je(ut)},[ut,Je]);if(Na)return e.jsxs("div",{className:"dark h-full overflow-y-auto animate-pulse bg-[var(--hrk-bg-app)]",children:[e.jsxs("div",{className:"sticky top-0 z-30 bg-[var(--hrk-bg-app)] border-b border-[var(--hrk-border-subtle)] px-4 pb-3 pt-[calc(0.75rem+env(safe-area-inset-top))] flex items-center gap-3",children:[f&&e.jsx("div",{className:"w-8 h-8 bg-[var(--hrk-bg-surface-raised)] rounded-full"}),e.jsx("div",{className:"w-9 h-9 bg-[var(--hrk-bg-surface-raised)] rounded-full"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-28 mb-1.5"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-36"})]}),e.jsx("div",{className:"w-8 h-8 bg-[var(--hrk-bg-surface-raised)] rounded-full"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"h-36 sm:h-44 bg-[var(--hrk-bg-surface)] w-full"}),e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-4",children:[e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-48 mb-2"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-64 mb-3"}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-20"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-24"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-28"})]})]})]}),e.jsx("div",{className:"border-b border-[var(--hrk-border-subtle)] px-2 py-2 flex gap-1 overflow-x-auto",children:[80,64,72,96,80,64,72].map((ae,qe)=>e.jsx("div",{className:"h-8 bg-[var(--hrk-bg-surface)] rounded-lg flex-shrink-0",style:{width:ae}},qe))}),e.jsx("div",{className:"p-4 space-y-3",children:[1,2,3,4].map(ae=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-[var(--hrk-bg-surface-raised)] rounded-full flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-3.5 bg-[var(--hrk-bg-surface-raised)] rounded w-24 mb-2"}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-4/5 mb-2"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-full mb-1.5"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-3/5 mb-3"}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-12"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-12"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-16"})]})]})]})},ae))})]});if(Dt||!nr)return e.jsx("div",{className:"dark flex items-center justify-center min-h-[400px] bg-[var(--hrk-bg-app)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx(X.User,{className:"h-14 w-14 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("h3",{className:"text-lg font-medium text-white mb-1",children:Nt("empty.userNotFound")}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Dt||"This user does not exist"}),f&&l&&e.jsxs("button",{onClick:l,className:"mt-4 inline-flex items-center px-4 py-2 text-sm font-medium rounded-lg border border-[var(--hrk-border-default)] text-[var(--hrk-text-secondary)] hover:bg-[var(--hrk-bg-surface-raised)]",children:[e.jsx(X.ArrowLeft,{className:"h-4 w-4 mr-2"}),"Go Back"]})]})});const $n=(ae,qe,dt)=>{const Jt=Pw(ae),kt=ae.json_metadata?.description||(ae.body?wU(ae.body):""),Er=ae.stats?.total_votes??ae.active_votes?.length??Math.max(0,ae.net_votes??0),ma=(ae.active_votes?.length??0)===0&&Er<=0&&(ae.children??0)===0,ns=ae.payout?ae.payout.toFixed(3):ae.pending_payout_value?ae.pending_payout_value.replace(/[^\d.]/g,""):"0.000",Ha=ns,Mn=[],Fa=ae.percent_hbd??1e4;if(Fa===0?Mn.push("Hive Rewards Payout 100% Powered Up"):Mn.push(`Hive Rewards Payout (${(Fa/200).toFixed(0)}%/${100-Fa/200}%)`),ae.is_paidout){const Bn=ae.author_payout_value?ae.author_payout_value.replace(/[^\d.]/g,""):"";Mn.push("Past payouts:"),Mn.push(`${ns} Hive Rewards${Bn?` (Author ${Bn})`:""}`)}else{if(ae.payout_at){const Bn=new Date(ae.payout_at),Xs=new Date,Ws=Bn.getTime()-Xs.getTime();if(Ws>0){const gs=Math.floor(Ws/36e5),ni=Math.floor(gs/24),Un=gs%24,kn=ni>0?`in ${ni} day${ni>1?"s":""}${Un>0?` ${Un} hour${Un>1?"s":""}`:""}`:`in ${gs} hour${gs>1?"s":""}`;Mn.push(`Payout will occur: ${kn}`)}}Fa===0?Mn.push(`${ns} Hive Rewards (100% Powered Up)`):Mn.push(`${ns} Hive Rewards (${(Fa/200).toFixed(0)}%/${100-Fa/200}%)`)}ae.beneficiaries?.length>0&&(Mn.push("Beneficiaries:"),ae.beneficiaries.forEach(Bn=>{Mn.push(`${Bn.account}: ${(Bn.weight/100).toFixed(0)}%`)}));const Wn=Mn.join(`
1415
- `),fa=Bn=>parseFloat((Bn??"").replace(/[^\d.]/g,""))||0,On=fa(ae.pending_payout_value),fs=fa(ae.author_payout_value),Es=fa(ae.curator_payout_value),is=ae.payout&&ae.payout>0?ae.payout:On>0?On:fs+Es,tl={pendingValue:On,authorValue:fs,curatorValue:Es,totalValue:is,isPaidout:!!ae.is_paidout,payoutAt:ae.payout_at,percentHbd:ae.percent_hbd??1e4,beneficiaries:(ae.beneficiaries??[]).map(Bn=>({account:Bn.account,weight:Bn.weight}))},Bi=!!se&&!!xe&&o?.toLowerCase()!==Og&&ae.author.toLowerCase()!==o?.toLowerCase()&&!hy(ae.active_votes)&&my(ae.json_metadata);return e.jsxs("div",{className:`rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] transition-colors hover:bg-[var(--hrk-bg-surface-raised)] ${dt?"cursor-pointer":""}`,onClick:dt,children:[e.jsxs("div",{className:"flex items-stretch",children:[e.jsxs("div",{className:"min-w-0 flex-1 p-2.5 sm:p-4",children:[e.jsxs("div",{className:"mb-1 flex items-center gap-2 sm:mb-1.5 sm:gap-3",children:[e.jsx("img",{src:`https://images.hive.blog/u/${ae.author}/avatar`,alt:ae.author,className:`h-7 w-7 flex-shrink-0 rounded-full bg-[var(--hrk-bg-surface-raised)] sm:h-9 sm:w-9 ${Zc(Yr[ae.author])}`,onError:Bn=>{Bn.target.src=`https://ui-avatars.com/api/?name=${ae.author}&background=random&size=40`}}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-x-1.5 gap-y-0 sm:gap-x-2 sm:gap-y-0.5",children:[e.jsx(ai,{href:jt?.(ae.author),onActivate:()=>Fe?.(ae.author),className:"text-[11px] font-medium text-white hover:text-blue-400 sm:text-sm",children:Yr[ae.author]?e.jsxs("span",{className:`inline-block rounded px-1 py-0.5 text-[10px] font-medium sm:text-xs ${ef(Yr[ae.author])}`,children:["@",ae.author]}):e.jsxs(e.Fragment,{children:["@",ae.author]})}),ae.author_reputation!==void 0&&e.jsxs("div",{className:"relative group inline-flex shrink-0",children:[e.jsxs("span",{className:"text-[10px] sm:text-xs text-[var(--hrk-text-tertiary)] cursor-pointer font-normal",children:["(",jw(ae.author_reputation).score,")"]}),e.jsxs("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 px-2.5 py-1 text-[10px] font-medium text-white bg-black border border-neutral-800 rounded-full shadow-xl opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto transition-opacity duration-150 z-50 whitespace-nowrap after:content-[''] after:absolute after:top-full after:left-1/2 after:-translate-x-1/2 after:border-[4px] after:border-transparent after:border-t-black",children:["Reputation: ",jw(ae.author_reputation).formatted]})]}),e.jsx(ai,{href:Mr?.(ae.author,ae.permlink),onActivate:()=>Ye?.(ae.author,ae.permlink,ae.title),className:"text-[10px] text-[var(--hrk-text-tertiary)] hover:text-blue-400 hover:underline sm:text-xs",children:cA(ae.created)}),ae.community_title&&e.jsxs(ai,{href:ae.community?br?.(ae.community):void 0,onActivate:()=>{ae.community&&Fe?.(ae.community)},className:"text-[10px] font-medium text-blue-400 hover:underline sm:text-xs",children:["#",ae.community_title]})]})]}),ae.title&&e.jsx(ai,{href:Mr?.(ae.author,ae.permlink),onActivate:()=>Ye?.(ae.author,ae.permlink,ae.title),className:"mb-0.5 line-clamp-2 block text-left text-[13px] font-semibold leading-snug text-white hover:text-blue-400 sm:mb-1 sm:text-base",children:ae.title}),kt&&e.jsx("p",{className:"line-clamp-2 text-[11px] leading-snug text-[var(--hrk-text-tertiary)] sm:line-clamp-3 sm:text-sm sm:leading-relaxed",children:kt.substring(0,240)})]}),e.jsx(jU,{media:Jt})]}),e.jsx("div",{className:"border-t border-[var(--hrk-border-subtle)]/50 px-2.5 py-2 sm:px-4 rounded-b-lg",onClick:Bn=>Bn.stopPropagation(),children:e.jsx(Lg,{author:ae.author,permlink:ae.permlink,currentUser:o,onUserClick:Fe,getUserUrl:jt,hiveValue:Ha,hiveIconUrl:"/images/hive_logo.png",payoutTooltip:Wn,payoutDetails:tl,initialVotes:ae.active_votes||[],initialVoteCount:ae.stats?.total_votes??ae.active_votes?.length??Math.max(0,ae.net_votes??0),initialFlagWeight:ae.stats?.flag_weight,initialCommentsCount:ae.children||0,postCreatedAt:ae.created,onUpvote:H?Bn=>H(ae.author,ae.permlink,Bn):void 0,curationEligible:Bi,curationType:"post",onCurationRequest:xe?(Bn,Xs)=>xe(ae.author,ae.permlink,Bn,"post",Xs):void 0,onFetchCurationStatus:be,onSubmitComment:z?(Bn,Xs,Ws)=>z(Bn,Xs,Ws):void 0,onClickCommentUpvote:A,onReblog:q?()=>q(ae.author,ae.permlink):void 0,isReblogged:F?F(ae.author,ae.permlink):!1,onCheckReblogged:I,onShare:Ft?()=>Ft(ae.author,ae.permlink):void 0,onTip:ae.author!==o&&Y?()=>Y(ae.author,ae.permlink):void 0,onReport:ae.author!==o&&Z?()=>js({author:ae.author,permlink:ae.permlink}):void 0,onToggleBookmark:J?()=>J(ae.author,ae.permlink):void 0,isBookmarked:te?te(ae.author,ae.permlink):!1,onDelete:ae.author===o&&ma&&W?()=>W(ae.author,ae.permlink):void 0,onEdit:ae.author===o&&Q?()=>Q({author:ae.author,permlink:ae.permlink,body:ae.body??"",title:ae.title??"",parent_author:ae.parent_author??"",parent_permlink:ae.parent_permlink??"",json_metadata:typeof ae.json_metadata=="string"?ae.json_metadata:ae.json_metadata?JSON.stringify(ae.json_metadata):""}):void 0,disableCommentsModal:!!Xe,onComments:Xe?()=>Xe(ae.author,ae.permlink):void 0,ecencyToken:g,threeSpeakApiKey:x,giphyApiKey:y,templateToken:b,templateApiBaseUrl:w,defaultVotePercent:Lt,voteWeightStep:Zt,allowLandscapeVideos:Vr,awaitingWalletApproval:pa})})]},`${ae.author}/${ae.permlink}`)},we=(ae,qe)=>e.jsx("div",{className:"border border-[var(--hrk-border-subtle)] rounded-lg p-4 bg-[var(--hrk-bg-surface)] hover:bg-[var(--hrk-bg-surface-raised)] transition-colors",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ai,{href:jt?.(ae),onActivate:()=>Fe?.(ae),className:"flex-shrink-0","aria-label":`@${ae} profile`,children:e.jsx("img",{src:`https://images.hive.blog/u/${ae}/avatar`,alt:ae,className:"w-10 h-10 rounded-full bg-[var(--hrk-bg-surface-raised)]",onError:dt=>{dt.target.src=`https://ui-avatars.com/api/?name=${ae}&background=random&size=40`}})}),e.jsxs(ai,{href:jt?.(ae),onActivate:()=>Fe?.(ae),className:"font-medium text-white hover:text-blue-400",children:["@",ae]})]})},`${ae}-${qe}`),tt=(ae,qe)=>{let dt=ae.name,Jt="",kt=`https://images.hive.blog/u/${ae.name}/avatar`;try{const Er=ae.posting_json_metadata?JSON.parse(ae.posting_json_metadata):ae.json_metadata?JSON.parse(ae.json_metadata):null;Er?.profile&&(Er.profile.name&&(dt=Er.profile.name),Er.profile.about&&(Jt=Er.profile.about),Er.profile.profile_image&&(kt=Er.profile.profile_image))}catch(Er){console.warn("Failed to parse metadata for badge",ae.name,Er)}return e.jsxs("div",{className:"border border-[var(--hrk-border-subtle)] rounded-lg p-4 bg-[var(--hrk-bg-surface)] hover:bg-[var(--hrk-bg-surface-raised)] transition-colors flex items-start gap-3",children:[e.jsx(ai,{href:jt?.(ae.name),onActivate:()=>Fe?.(ae.name),className:"flex-shrink-0","aria-label":`${dt} badge detail`,children:e.jsx("img",{src:kt,alt:dt,className:"w-12 h-12 rounded-lg bg-[var(--hrk-bg-surface-raised)] object-cover",onError:Er=>{Er.target.src=`https://images.hive.blog/u/${ae.name}/avatar`}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs(ai,{href:jt?.(ae.name),onActivate:()=>Fe?.(ae.name),className:"font-semibold text-white hover:text-blue-400 text-sm block truncate",children:["B/",dt]}),Jt&&e.jsx("p",{className:"text-xs text-[var(--hrk-text-tertiary)] mt-1 line-clamp-2",title:Jt,children:Jt})]})]},`${ae.name}-${qe}`)},Yt=(ae,qe)=>{const dt=ae.description?ae.description.replace(/<[^>]*>/g,""):"";return e.jsxs("div",{className:"border border-[var(--hrk-border-subtle)] rounded-lg p-4 bg-[var(--hrk-bg-surface)] hover:bg-[var(--hrk-bg-surface-raised)] transition-colors flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("img",{src:ae.url,alt:ae.title,className:"w-12 h-12 object-contain",onError:Jt=>{Jt.target.src="https://hivebuzz.me/badges/first-post.png"}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h4",{className:"font-semibold text-white text-sm truncate",children:ae.title}),dt&&e.jsx("p",{className:"text-xs text-[var(--hrk-text-tertiary)] mt-1 line-clamp-2",title:dt,children:dt})]})]},`${ae.name}-${ae.id}-${qe}`)},yr=(ae=5)=>e.jsx("div",{className:"space-y-3 animate-pulse",children:Array.from({length:ae},(qe,dt)=>e.jsxs("div",{className:"overflow-hidden rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)]",children:[e.jsxs("div",{className:"flex items-stretch",children:[e.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5 p-2.5 sm:space-y-2 sm:p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[e.jsx("div",{className:"h-7 w-7 flex-shrink-0 rounded-full bg-[var(--hrk-bg-surface-raised)] sm:h-9 sm:w-9"}),e.jsx("div",{className:"h-2.5 w-20 rounded bg-[var(--hrk-bg-surface-raised)] sm:h-3 sm:w-24"}),e.jsx("div",{className:"h-2 w-10 rounded bg-[var(--hrk-bg-surface-raised)]/70 sm:w-12"})]}),e.jsx("div",{className:"h-3 w-5/6 rounded bg-[var(--hrk-bg-surface-raised)] sm:h-4"}),e.jsx("div",{className:"h-2.5 w-full rounded bg-[var(--hrk-bg-surface-raised)]/70 sm:h-3"}),e.jsx("div",{className:"h-2.5 w-4/6 rounded bg-[var(--hrk-bg-surface-raised)]/70 sm:h-3"})]}),e.jsx("div",{className:"my-2 mr-2 h-20 w-28 flex-shrink-0 rounded-lg bg-[var(--hrk-bg-surface-raised)]/70 sm:my-3 sm:mr-3 sm:h-auto sm:w-32 sm:self-stretch md:w-40 lg:w-48"})]}),e.jsxs("div",{className:"flex gap-3 border-t border-[var(--hrk-border-subtle)]/50 px-2.5 py-2 sm:px-4",children:[e.jsx("div",{className:"h-3 w-10 rounded bg-[var(--hrk-bg-surface-raised)]/70"}),e.jsx("div",{className:"h-3 w-10 rounded bg-[var(--hrk-bg-surface-raised)]/70"}),e.jsx("div",{className:"h-3 w-10 rounded bg-[var(--hrk-bg-surface-raised)]/70"}),e.jsx("div",{className:"ml-auto h-3 w-12 rounded bg-[var(--hrk-bg-surface-raised)]/70"})]})]},dt))}),Cr=(ae=8)=>e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-3 animate-pulse",children:Array.from({length:ae},(qe,dt)=>e.jsx("div",{className:"border border-[var(--hrk-border-subtle)] rounded-lg p-4 bg-[var(--hrk-bg-surface)]",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-[var(--hrk-bg-surface-raised)] rounded-full flex-shrink-0"}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-28"})]})},dt))}),Tr=(ae=3)=>e.jsx("div",{className:"space-y-3 animate-pulse",children:Array.from({length:ae},(qe,dt)=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:"w-10 h-10 bg-[var(--hrk-bg-surface-raised)] rounded-full flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"h-3.5 bg-[var(--hrk-bg-surface-raised)] rounded w-24"}),e.jsx("div",{className:"h-5 bg-[var(--hrk-bg-surface-raised)] rounded-full w-14"})]}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-4/5 mb-3"}),e.jsxs("div",{className:"space-y-2 mb-3",children:[e.jsx("div",{className:"h-8 bg-[var(--hrk-bg-surface-raised)] rounded-lg w-full"}),e.jsx("div",{className:"h-8 bg-[var(--hrk-bg-surface-raised)] rounded-lg w-full"}),e.jsx("div",{className:"h-8 bg-[var(--hrk-bg-surface-raised)] rounded-lg w-3/4"})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-20"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-24"})]})]})]})},dt))}),Qr=()=>e.jsxs("div",{className:"space-y-3 animate-pulse",children:[e.jsxs("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"w-5 h-5 bg-[var(--hrk-bg-surface-raised)] rounded"}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-44"})]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[1,2,3,4].map(ae=>e.jsxs("div",{className:"bg-[var(--hrk-bg-app)]/50 rounded-lg p-2.5",children:[e.jsx("div",{className:"h-2.5 bg-[var(--hrk-bg-surface-raised)] rounded w-12 mb-2"}),e.jsx("div",{className:"h-5 bg-[var(--hrk-bg-surface-raised)] rounded w-16"})]},ae))})]}),[1,2,3,4,5].map(ae=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-7 h-7 bg-[var(--hrk-bg-surface-raised)] rounded-lg"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-3/4 mb-2"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-1/3 mb-3"}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-20"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-16"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-16"})]})]})]})},ae))]}),Cn=ae=>{if(!ae||!isFinite(ae)||ae<=0)return"—";const qe=Math.floor(ae/1e3),dt=Math.floor(qe/60),Jt=Math.floor(dt/60),kt=Math.floor(Jt/24);return kt>=1?`${kt}d ${Jt%24}h`:Jt>=1?`${Jt}h ${dt%60}m`:`${Math.max(1,dt)}m`},_n=(ae,qe=3)=>ae==null||isNaN(ae)?"—":Number(ae).toLocaleString(void 0,{maximumFractionDigits:qe,minimumFractionDigits:qe}),Dn=()=>{if(kr&&ha.length===0)return Qr();if(ha.length===0&&!It)return e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.Award,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.noPendingAuthor")}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)] text-xs mt-1",children:"Rewards appear for posts/comments with pending payouts"})]});const ae=ha.filter(dt=>!dt.isComment).length,qe=ha.length-ae;return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"bg-gradient-to-r from-amber-900/30 to-orange-900/30 rounded-xl p-4 border border-amber-700/40",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(X.Award,{className:"w-5 h-5 text-amber-400"}),e.jsx("h3",{className:"text-sm font-semibold text-amber-300",children:Nt("reward.pendingAuthor")})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.posts")}),e.jsx("p",{className:"text-lg font-bold text-white",children:ae})]}),e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.comments")}),e.jsx("p",{className:"text-lg font-bold text-white",children:qe})]}),e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.totalHbd")}),e.jsxs("p",{className:"text-lg font-bold text-amber-400",children:["$",_n(Ka.totalHbd)]})]}),e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.totalHp")}),e.jsx("p",{className:"text-lg font-bold text-orange-400",children:_n(Ka.totalHpEq)})]})]})]}),ha.map((dt,Jt)=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)] hover:border-[var(--hrk-border-default)] transition-colors cursor-pointer",onClick:()=>Ye?.(dt.author,dt.permlink,dt.title),children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0 ${dt.isComment?"bg-blue-900/40 text-blue-400":"bg-emerald-900/40 text-emerald-400"}`,children:dt.isComment?e.jsx(X.MessageCircle,{className:"w-3.5 h-3.5"}):e.jsx(X.FileText,{className:"w-3.5 h-3.5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("h4",{className:"text-sm font-medium text-white truncate",children:dt.title||`${dt.author}/${dt.permlink}`}),e.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded-full flex-shrink-0 ${dt.isComment?"bg-blue-900/40 text-blue-300":"bg-emerald-900/40 text-emerald-300"}`,children:dt.isComment?Nt("reward.comment"):Nt("reward.post")})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 mt-2 text-xs text-[var(--hrk-text-tertiary)]",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(X.Clock,{className:"w-3 h-3"}),"Payout in ",Cn(dt.payoutMs)]}),e.jsxs("span",{className:"text-amber-400 font-medium",children:["$",_n(dt.hbd)," HBD"]}),dt.hpEq!==null&&e.jsxs("span",{className:"text-orange-400 font-medium",children:[_n(dt.hpEq)," HP"]}),dt.beneficiaryCut>0&&e.jsxs("span",{className:"text-[var(--hrk-text-tertiary)]",children:["Beneficiary: ",(dt.beneficiaryCut*100).toFixed(0),"%"]})]})]})]})},`${dt.author}-${dt.permlink}-${Jt}`)),It&&e.jsx("div",{className:"animate-pulse space-y-3",children:[1,2].map(dt=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-7 h-7 bg-[var(--hrk-bg-surface-raised)] rounded-lg"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-3/4 mb-2"}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-20"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-16"})]})]})]})},dt))})]})},zi=()=>{if(kr&&ke.length===0)return Qr();if(ke.length===0&&!It)return e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.TrendingUp,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.noPendingCuration")}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)] text-xs mt-1",children:Nt("empty.curationHint")})]});const ae=ke.filter(kt=>!kt.isComment).length,qe=ke.length-ae,dt=ke.filter(kt=>kt.efficiency!==null),Jt=dt.length>0?dt.reduce((kt,Er)=>kt+(Er.efficiency||0),0)/dt.length:null;return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"bg-gradient-to-r from-blue-900/30 to-purple-900/30 rounded-xl p-4 border border-blue-700/40",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(X.TrendingUp,{className:"w-5 h-5 text-blue-400"}),e.jsx("h3",{className:"text-sm font-semibold text-blue-300",children:Nt("reward.pendingCuration")})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-5 gap-3",children:[e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.posts")}),e.jsx("p",{className:"text-lg font-bold text-white",children:ae})]}),e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.comments")}),e.jsx("p",{className:"text-lg font-bold text-white",children:qe})]}),e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.totalHp")}),e.jsx("p",{className:"text-lg font-bold text-blue-400",children:_n(_t.totalHp)})]}),e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.totalHbd")}),e.jsxs("p",{className:"text-lg font-bold text-purple-400",children:["$",_n(_t.totalHbd)]})]}),Jt!==null&&e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.avgEfficiency")}),e.jsxs("p",{className:`text-lg font-bold ${Jt>=100?"text-emerald-400":"text-amber-400"}`,children:[Jt.toFixed(1),"%"]})]})]})]}),ke.map((kt,Er)=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)] hover:border-[var(--hrk-border-default)] transition-colors cursor-pointer",onClick:()=>Ye?.(kt.author,kt.permlink,kt.title),children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0 ${kt.isComment?"bg-blue-900/40 text-blue-400":"bg-emerald-900/40 text-emerald-400"}`,children:kt.isComment?e.jsx(X.MessageCircle,{className:"w-3.5 h-3.5"}):e.jsx(X.FileText,{className:"w-3.5 h-3.5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h4",{className:"text-sm font-medium text-white truncate",children:kt.title||`${kt.author}/${kt.permlink}`}),e.jsxs("p",{className:"text-xs text-[var(--hrk-text-tertiary)] mt-0.5",children:["by @",kt.author]})]}),e.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded-full flex-shrink-0 ${kt.isComment?"bg-blue-900/40 text-blue-300":"bg-emerald-900/40 text-emerald-300"}`,children:kt.isComment?Nt("reward.comment"):Nt("reward.post")})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 mt-2 text-xs text-[var(--hrk-text-tertiary)]",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(X.Clock,{className:"w-3 h-3"}),"Payout in ",Cn(kt.payoutMs)]}),e.jsxs("span",{className:"text-blue-400 font-medium",children:[_n(kt.hp)," HP"]}),e.jsxs("span",{className:"text-purple-400 font-medium",children:["$",_n(kt.hbd)," HBD"]}),e.jsxs("span",{className:"text-[var(--hrk-text-tertiary)]",children:["Vote: ",kt.weightPct.toFixed(2),"%"]}),kt.efficiency!==null&&e.jsxs("span",{className:`font-medium ${kt.efficiency>=100?"text-emerald-400":"text-amber-400"}`,children:["Eff: ",kt.efficiency.toFixed(1),"%"]}),kt.votedAfterMs!==null&&e.jsxs("span",{className:"text-[var(--hrk-text-tertiary)]",children:["Voted after ",Cn(kt.votedAfterMs)]})]})]})]})},`${kt.author}-${kt.permlink}-${Er}`)),It&&e.jsx("div",{className:"animate-pulse space-y-3",children:[1,2].map(kt=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-7 h-7 bg-[var(--hrk-bg-surface-raised)] rounded-lg"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-3/4 mb-2"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-1/3 mb-3"}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-20"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-16"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-14"})]})]})]})},kt))})]})},Gl=()=>kr&&ba.length===0?yr():ba.length===0?e.jsx("div",{className:"space-y-3",children:e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.Heart,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.noCuration")})]})}):e.jsx("div",{className:"space-y-3",children:ba.map((ae,qe)=>{const dt=(ae.details?.weight??0)<0,Jt=(ae.details?.weight??0)===0,kt=Math.abs((ae.details?.weight??0)/100).toFixed(2);return e.jsx("div",{className:"overflow-hidden rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] p-4 transition-colors hover:bg-[var(--hrk-bg-surface-raised)] cursor-pointer",onClick:()=>{ae.author&&ae.permlink&&Ye?.(ae.author,ae.permlink,"")},children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative flex-shrink-0",children:[e.jsx("img",{src:`https://images.hive.blog/u/${ae.author}/avatar`,alt:ae.author,className:`w-10 h-10 rounded-full object-cover ${Zc(Yr[ae.author],"ring-1 ring-[var(--hrk-border-subtle)]")}`,onError:Er=>{Er.target.src=`https://ui-avatars.com/api/?name=${ae.author}&background=random&size=40`}}),e.jsx("div",{className:`absolute -bottom-1 -right-1 w-5 h-5 rounded-full flex items-center justify-center border-2 border-[var(--hrk-bg-surface)] ${Jt?"bg-gray-600 text-white":dt?"bg-red-500 text-white":"bg-green-500 text-white"}`,children:Jt?e.jsx(X.Heart,{className:"w-2.5 h-2.5 fill-current"}):dt?e.jsx(X.ArrowDown,{className:"w-2.5 h-2.5 stroke-[3px]"}):e.jsx(X.ArrowUp,{className:"w-2.5 h-2.5 stroke-[3px]"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-1.5 gap-y-0.5",children:[e.jsx("span",{className:"text-xs font-semibold text-white",children:Jt?"Removed vote on":dt?`Downvoted (${kt}%)`:`Upvoted (${kt}%)`}),e.jsx("span",{className:"text-xs text-[var(--hrk-text-tertiary)]",children:"post by"}),e.jsxs(ai,{href:jt?.(ae.author||""),onActivate:()=>Fe?.(ae.author||""),className:"text-xs font-medium text-blue-400 hover:underline",children:["@",ae.author]})]}),e.jsx("p",{className:"text-sm font-medium text-white truncate mt-1",children:ae.permlink}),e.jsxs("div",{className:"flex items-center gap-1 mt-1 text-xs text-[var(--hrk-text-tertiary)]",children:[e.jsx(X.Clock,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:Ul.getRelativeTime(ae.timestamp+"Z")})]})]})]})},`${ae.id}-${qe}`)})}),Pi=()=>{if(kr)return e.jsxs("div",{className:"max-w-lg mx-auto space-y-6 animate-pulse",children:[[1,2,3].map(On=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-32"}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded-full w-full"})]},On)),e.jsxs("div",{className:"mt-4 p-4 bg-[var(--hrk-bg-surface)] rounded-xl border border-[var(--hrk-border-subtle)]",children:[e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-40 mb-3"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded-full w-full"})]})]});if(!Gt)return e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.Gauge,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.votingPowerUnavailable")})]});const{maxMana:ae,rewardBalance:qe,recentClaims:dt,feedPrice:Jt}=Gt,kt=Jr,Er=300*60*24,ma=ae*(kt/100)*.02,ns=dt>0?ma/dt*qe:0,Ha=ns*Jt,Mn=(100-kt)/100*Er,Fa=On=>{if(On<=0)return Nt("common.fullyCharged");const fs=Math.floor(On/86400),Es=Math.floor(On%86400/3600),is=Math.floor(On%3600/60);return fs>0?`Full in ${fs} day${fs>1?"s":""} ${Es} hour${Es!==1?"s":""} ${is} minute${is!==1?"s":""}`:Es>0?`Full in ${Es} hour${Es!==1?"s":""} ${is} minute${is!==1?"s":""}`:`Full in ${is} minute${is!==1?"s":""}`},Wn=(On,fs=2)=>isNaN(On)?"—":On.toLocaleString(void 0,{minimumFractionDigits:fs,maximumFractionDigits:fs}),fa=[{label:Nt("vp.upvotePower"),value:Gt.upvotePower,color:"var(--hrk-success)"},{label:Nt("vp.downvotePower"),value:Gt.downvotePower,color:"var(--hrk-warning)"},{label:Nt("vp.resourceCredits"),value:Gt.resourceCredits,color:"var(--hrk-info)"}];return e.jsxs("div",{className:"max-w-lg mx-auto space-y-6",children:[e.jsxs("div",{className:"p-5 rounded-xl bg-[var(--hrk-bg-surface)] border border-[var(--hrk-border-subtle)] flex flex-col items-center",children:[e.jsxs("div",{className:"inline-flex flex-col items-center px-5 py-2.5 rounded-full bg-blue-600/20 border border-blue-500/40 mb-5",children:[e.jsxs("span",{className:"text-sm sm:text-base font-bold text-white tracking-wide",children:["VOTE VALUE: ",e.jsxs("span",{className:"text-blue-400",children:["$",Wn(Ha)]}),e.jsxs("span",{className:"text-[var(--hrk-text-tertiary)] ml-1.5",children:["(",kt.toFixed(2),"%)"]})]}),e.jsxs("span",{className:"text-xs text-[var(--hrk-text-tertiary)] mt-1",children:[e.jsxs("span",{className:"text-white font-medium",children:[Wn(Ha)," HBD"]}),e.jsx("span",{className:"mx-1.5",children:"·"}),e.jsxs("span",{className:"text-[var(--hrk-text-secondary)]",children:["~",Wn(ns,3)," HIVE"]})]})]}),e.jsxs("div",{className:"w-full flex items-center gap-3",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--hrk-text-tertiary)] whitespace-nowrap",children:"0%"}),e.jsx("input",{type:"range",min:0,max:100,step:.01,value:kt,onChange:On=>Ba(Number(On.target.value)),className:"flex-1 h-2.5 rounded-full appearance-none cursor-pointer [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-blue-500 [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg [&::-webkit-slider-thumb]:-mt-1 [&::-moz-range-thumb]:w-5 [&::-moz-range-thumb]:h-5 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-blue-500 [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-white",style:{background:`linear-gradient(to right, var(--hrk-info) 0%, var(--hrk-info) ${kt}%, var(--hrk-border-default) ${kt}%, var(--hrk-border-default) 100%)`}}),e.jsx("span",{className:"text-xs font-medium text-[var(--hrk-text-tertiary)] whitespace-nowrap",children:"100%"})]}),e.jsx("p",{className:"mt-3 text-sm text-[var(--hrk-text-tertiary)]",children:Fa(Mn)})]}),fa.map(On=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-[var(--hrk-text-secondary)]",children:On.label}),e.jsxs("span",{className:"text-sm font-bold text-white",children:[On.value.toFixed(2),"%"]})]}),e.jsx("div",{className:"w-full bg-[var(--hrk-bg-surface-raised)] rounded-full h-3",children:e.jsx("div",{className:"h-3 rounded-full transition-all duration-500 ease-out",style:{width:`${Math.min(On.value,100)}%`,backgroundColor:On.color}})})]},On.label))]})},Rs=ae=>`inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-all ${ae?"bg-[var(--hrk-brand)] text-white shadow-sm":"text-[var(--hrk-text-secondary)] hover:bg-[var(--hrk-bg-surface-raised)] hover:text-[var(--hrk-text-primary)]"}`,ui=(ae,qe)=>e.jsxs("div",{className:"flex items-center justify-between mb-3 w-full",children:[e.jsx("div",{className:"inline-flex rounded-lg border border-[var(--hrk-border-default)] bg-[var(--hrk-bg-surface)] p-0.5 gap-0.5",children:ae}),qe]}),Ls=()=>{if(vr==="growth")return e.jsx(PC,{username:ut});if(vr==="wallet")return e.jsxs("div",{className:"w-full space-y-2",children:[ui(e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:()=>sr("wallet"),className:Rs(ot==="wallet"),children:[e.jsx(X.Wallet,{className:"h-4 w-4"}),Nt("tab.wallet")||"Wallet"]}),ea&&e.jsxs("button",{type:"button",onClick:()=>sr("tokens"),className:Rs(ot==="tokens"),children:[e.jsx(X.Coins,{className:"h-4 w-4"}),Nt("tab.engineTokens")||"Tokens"]}),e.jsxs("button",{type:"button",onClick:()=>sr("votingPower"),className:Rs(ot==="votingPower"),children:[e.jsx(X.Gauge,{className:"h-4 w-4"}),Nt("tab.votingPower")||"Voting Power"]})]})),ot==="tokens"&&ea?ea(ut,ut===o):ot==="votingPower"?Pi():e.jsx(XT,{username:ut,currentUsername:o,scrollRootRef:or,onUpdateRcDelegation:Oe,onDeleteRcDelegation:Se,onCreateHpDelegation:me,onCreateRcDelegation:ie,onTransfer:ye,onPowerUp:Ee,onPowerDown:Ie,onTransferToSavings:ge,onTransferFromSavings:rt,onStopPowerDown:Le,onCancelSavingsWithdrawal:ue,onClaimRewards:He})]});if(vr==="activities"){const ae=()=>{Ta(dt=>dt+1)},qe=Ae==="curation"&&e.jsx("button",{type:"button",onClick:ae,disabled:kr,className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] px-3 py-1.5 text-xs font-medium text-[var(--hrk-text-secondary)] hover:bg-[var(--hrk-bg-surface-raised)] hover:text-[var(--hrk-text-primary)] disabled:opacity-50 transition-colors focus:outline-none cursor-pointer",title:"Refresh",children:e.jsx(X.RefreshCw,{className:`h-3.5 w-3.5 ${kr?"animate-spin":""}`})});return e.jsxs("div",{className:"w-full space-y-2",children:[ui(e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>sr("activities"),className:Rs(Ae==="activities"),children:Nt("tab.activities")||"Activities"}),e.jsx("button",{type:"button",onClick:()=>sr("curation"),className:Rs(Ae==="curation"),children:Nt("tab.curation")||"Curation"})]}),qe),Ae==="activities"?e.jsx(NC,{username:ut,onClickPermlink:ar,onSelectActivity:hr,scrollRootRef:or}):Gl()]})}if(vr==="rewards")return e.jsxs("div",{className:"w-full space-y-2",children:[ui(e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>sr("authorRewards"),className:Rs(da==="authorRewards"),children:Nt("tab.authorRewards")||"Author Rewards"}),e.jsx("button",{type:"button",onClick:()=>sr("curationRewards"),className:Rs(da==="curationRewards"),children:Nt("tab.curationRewards")||"Curation Rewards"})]})),kr?Qr():da==="authorRewards"?Dn():zi()]});if(vr==="followers")return e.jsxs("div",{className:"w-full space-y-2",children:[ui(e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:()=>sr("followers"),className:Rs(dr==="followers"),children:[Nt("tab.followers")||"Followers"," (",nr.followersCount,")"]}),e.jsxs("button",{type:"button",onClick:()=>sr("following"),className:Rs(dr==="following"),children:[Nt("tab.following")||"Following"," (",nr.followingCount,")"]})]})),kr?Cr():(dr==="followers"?lr:rr).length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.Users,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:dr==="followers"?Nt("empty.noFollowers")||"No followers yet.":Nt("empty.notFollowing")||"Not following anyone yet."})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-3",children:dr==="followers"?lr.map((ae,qe)=>we(ae.follower,qe)):rr.map((ae,qe)=>we(ae.following,qe))})]});if(vr==="posts"){const ae=Rt==="blogs"?ss:Li,qe=Rt==="blogs"?"blog":"post";return e.jsxs("div",{className:"w-full space-y-2",children:[ui(e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>sr("blogs"),className:Rs(Rt==="blogs"),children:Nt("tab.blogs")||"Blogs"}),e.jsx("button",{type:"button",onClick:()=>sr("posts"),className:Rs(Rt==="posts"),children:Nt("tab.posts")||"Posts"})]})),kr?yr():ae.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.FileText,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt(Rt==="blogs"?"empty.noBlogs":"empty.noPosts")})]}):e.jsx("div",{className:"space-y-3",children:ae.map(dt=>$n(dt,qe,Ye?()=>Ye(dt.author,dt.permlink,dt.title):void 0))})]})}if(vr==="replies"){const ae=Ar==="comments"?Xn:bl,qe=Ar==="comments"?"comment":"reply";return e.jsxs("div",{className:"w-full space-y-2",children:[ui(e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>sr("comments"),className:Rs(Ar==="comments"),children:Nt("tab.comments")||"Comments"}),e.jsx("button",{type:"button",onClick:()=>sr("replies"),className:Rs(Ar==="replies"),children:Nt("tab.replies")||"Replies"})]})),kr?yr():ae.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.MessageCircle,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt(Ar==="comments"?"empty.noComments":"empty.noReplies")})]}):e.jsx("div",{className:"space-y-3",children:ae.map(dt=>$n(dt,qe,void 0))})]})}return vr==="polls"?kr?Tr():Zi.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.BarChart3,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.noPolls")})]}):e.jsx("div",{className:"space-y-3",children:Zi.map(ae=>e.jsx(qC,{poll:ae,currentUsername:o,onVotePoll:ve,onPollClick:Ht,onUpvote:H,onSubmitComment:z,onClickCommentUpvote:A,onReblog:q,isPostReblogged:F,onCheckReblogged:I,onTip:Y,onSharePost:Ft,onCommentClick:Xe,onRequestReportPost:Z?(qe,dt)=>js({author:qe,permlink:dt}):void 0,onUserClick:Fe,ecencyToken:g,threeSpeakApiKey:x,giphyApiKey:y,templateToken:b,templateApiBaseUrl:w,defaultVotePercent:Lt,voteWeightStep:Zt,allowLandscapeVideos:Vr},`${ae.author}/${ae.permlink}`))}):vr==="badges"?kr?Cr():Sr.length===0&&hn.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.Award,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.noBadges")})]}):e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-white mb-3 tracking-wide uppercase opacity-90",children:"Community Badges"}),Sr.length===0?e.jsx("p",{className:"text-xs text-[var(--hrk-text-tertiary)] italic",children:"No community badges assigned"}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-3",children:ja.length>0?ja.map((ae,qe)=>tt(ae,qe)):Sr.map((ae,qe)=>we(ae,qe))})]}),e.jsxs("div",{className:"border-t border-[var(--hrk-border-subtle)] pt-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-white tracking-wide uppercase opacity-90",children:"HiveBuzz Badges"}),e.jsx("a",{href:`https://hivebuzz.me/@${ut}`,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-blue-400 hover:underline uppercase tracking-wider font-semibold",children:"powered by hivebuzz"})]}),hn.length===0?e.jsx("p",{className:"text-xs text-[var(--hrk-text-tertiary)] italic",children:"No HiveBuzz badges earned yet"}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",children:hn.map((ae,qe)=>Yt(ae,qe))})]})]}):vr==="witnessVotes"?kr?Cr():Te.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.Shield,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.noWitnessVotes")})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-3",children:Te.map((ae,qe)=>we(ae,qe))}):vr==="snaps"?e.jsx("div",{className:"h-[calc(100vh-260px)] min-h-[420px]",children:e.jsx(vU,{username:ut,currentUsername:o,reportedPosts:v,reportedAuthors:N,onUpvote:H,onSubmitComment:z,onClickCommentUpvote:A,onReblog:q,isPostReblogged:F,onCheckReblogged:I,onTip:Y,onSharePost:Ft,onCommentClick:Xe,onClickCommentIcon:Ct,onClickCommentCount:pt,onUserClick:Fe,onPostClick:mt?(ae,qe)=>mt(ae,qe):Ye?(ae,qe,dt)=>Ye(ae,qe,dt??""):void 0,onReportPost:Z?(ae,qe)=>js({author:ae,permlink:qe}):void 0,onDeletePost:W,isCurator:se,onCurationRequest:xe?(ae,qe,dt,Jt)=>xe(ae,qe,dt,"snap",Jt):void 0,onFetchCurationStatus:be,onVotePoll:ve,onEditSnap:We,getPostUrl:Mr,getUserUrl:jt,getTagUrl:Et,getCommunityUrl:br,ecencyToken:g,threeSpeakApiKey:x,giphyApiKey:y,templateToken:b,templateApiBaseUrl:w,defaultVotePercent:Lt,voteWeightStep:Zt,allowLandscapeVideos:Vr,awaitingWalletApproval:pa,renderHeaderActions:Kr},ut)}):null},vi=[{id:"posts",label:Nt("tab.posts")||"Posts",icon:X.FileText},{id:"snaps",label:Nt("tab.snaps"),icon:X.Camera},{id:"polls",label:Nt("tab.polls"),icon:X.BarChart3},{id:"replies",label:Nt("tab.replies")||"Replies",icon:X.Reply},{id:"activities",label:Nt("tab.activities")||"Activities",icon:X.Activity},{id:"rewards",label:Nt("tab.rewards")||"Rewards",icon:X.Award},{id:"growth",label:Nt("tab.growth"),icon:X.TrendingUp},{id:"followers",label:Nt("tab.followers")||"Followers",icon:X.Users},{id:"wallet",label:Nt("tab.wallet"),icon:X.Wallet},{id:"badges",label:Nt("tab.badges"),icon:X.Award},{id:"witnessVotes",label:Nt("tab.witnessVotes"),icon:X.Shield}],Zl=h&&h.length>0?Array.from(new Set(h.map(ae=>Rr(ae)))):void 0,Yl=Zl?Zl.map(ae=>vi.find(qe=>qe.id===ae)).filter(ae=>ae!==void 0):vi,Yi=o&&o!==ut;return e.jsx("div",{className:"dark flex flex-col h-full bg-[var(--hrk-bg-app)]",children:e.jsxs("div",{ref:or,className:"flex flex-col overflow-y-auto h-full scrollbar-hide",children:[e.jsx("div",{className:"sticky top-0 z-30 h-[calc(56px+env(safe-area-inset-top))] pt-[env(safe-area-inset-top)] bg-[var(--hrk-bg-surface)]/95 backdrop-blur-sm border-b border-[var(--hrk-border-subtle)] flex items-center",children:e.jsxs("div",{className:"px-4 py-2 flex items-center gap-2 w-full",children:[u&&e.jsx("button",{onClick:u,"aria-label":"Open menu",className:"p-1.5 hover:bg-[var(--hrk-bg-surface-raised)] rounded-lg transition-colors flex-shrink-0",children:e.jsx(X.Menu,{className:"h-5 w-5 text-[var(--hrk-text-secondary)]"})}),f&&l&&e.jsx("button",{onClick:l,className:"p-1.5 hover:bg-[var(--hrk-bg-surface-raised)] rounded-lg transition-colors flex-shrink-0",children:e.jsx(X.ArrowLeft,{className:"h-5 w-5 text-[var(--hrk-text-secondary)]"})}),e.jsx("img",{src:nr.profileImage||`https://images.hive.blog/u/${ut}/avatar`,alt:ut,className:"w-8 h-8 rounded-full flex-shrink-0 bg-[var(--hrk-bg-surface-raised)] object-cover",onError:ae=>{ae.target.src=`https://images.hive.blog/u/${ut}/avatar`}}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("h1",{className:"text-sm font-semibold text-white truncate",children:`@${ut}`})})}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[ze&&e.jsxs("button",{onClick:Ss,className:"p-2 bg-black/40 hover:bg-black/60 rounded-full transition-colors relative",title:"Favourite list",children:[e.jsx(X.Heart,{className:`h-4 w-4 ${At?"text-red-500":"text-white"}`,fill:At?"currentColor":"none"}),st>0&&e.jsx("span",{className:"absolute -top-1 -right-1 bg-red-500 text-white text-[10px] rounded-full h-4 w-4 flex items-center justify-center",children:st>99?"99+":st})]}),e.jsxs("div",{className:"relative",ref:ro,children:[e.jsx("button",{onClick:()=>tn(ae=>!ae),className:"p-2 bg-black/40 hover:bg-black/60 rounded-full transition-colors",title:"More actions",children:e.jsx(X.MoreVertical,{className:"h-4 w-4 text-white"})}),Za&&e.jsxs("div",{className:"absolute right-0 mt-1 w-48 rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] shadow-xl z-[100]",onClick:ae=>ae.stopPropagation(),children:[Yi&&(C||R)&&e.jsx("button",{onClick:()=>{tn(!1),Il()},disabled:za,className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)] disabled:opacity-50",children:e.jsxs("span",{className:"flex items-center gap-2",children:[nr.isFollowing?e.jsx(X.UserMinus,{className:"h-4 w-4 text-red-400"}):e.jsx(X.UserPlus,{className:"h-4 w-4 text-green-400"}),nr.isFollowing?Nt("action.unfollow"):Nt("action.follow")]})}),de&&e.jsx("button",{onClick:()=>{tn(!1),de(ut)},"aria-pressed":fe,className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)]",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(X.Bookmark,{className:`h-4 w-4 ${fe?"fill-current text-[var(--hrk-brand)]":"text-[var(--hrk-text-tertiary)]"}`}),fe?"Remove bookmark":"Bookmark user"]})}),Yi&&(P||$)&&e.jsx("button",{onClick:()=>{tn(!1),Do()},disabled:za||(nr.isMuted?!$:!P),className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)] disabled:opacity-50",children:e.jsxs("span",{className:"flex items-center gap-2",children:[nr.isMuted?e.jsx(X.Volume2,{className:"h-4 w-4 text-emerald-400"}):e.jsx(X.VolumeX,{className:"h-4 w-4 text-red-400"}),nr.isMuted?Nt("action.unmute"):Nt("action.mute")]})}),Yi&&M&&e.jsx("button",{onClick:()=>{tn(!1),ms(!0)},disabled:za,className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-gray-700disabled:opacity-50",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(X.Ban,{className:"h-4 w-4 text-red-400"})," ",Nt("action.ignoreAuthor")]})}),Yi&&E&&e.jsx("button",{onClick:()=>{tn(!1),To(!0)},disabled:za,className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-gray-700disabled:opacity-50 last:rounded-b-lg",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(X.Flag,{className:"h-4 w-4 text-orange-400"})," ",Nt("action.reportUser")]})}),e.jsx("button",{onClick:()=>{tn(!1),Ou()},className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)] first:rounded-t-lg",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(X.Share2,{className:"h-4 w-4 text-blue-400"})," ",Nt("action.shareProfile")]})}),Da&&_e&&e.jsx("button",{onClick:()=>{tn(!1),_e()},className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)]",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(X.Key,{className:"h-4 w-4 text-amber-400"})," Posting Authority"]})}),Da&&oe&&e.jsx("button",{onClick:()=>{tn(!1),oe()},className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)] last:rounded-b-lg",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(X.Pencil,{className:"h-4 w-4 text-emerald-400"})," Edit Profile"]})})]})]}),d&&e.jsxs("button",{onClick:d,className:"p-1.5 hover:bg-[var(--hrk-bg-surface-raised)] rounded-full transition-colors flex-shrink-0","aria-label":"Open user menu",children:[o?e.jsx("img",{src:`https://images.hive.blog/u/${o}/avatar`,alt:o,className:"h-6 w-6 rounded-full object-cover",onError:ae=>{ae.currentTarget.style.display="none";const qe=ae.currentTarget.nextSibling;qe&&(qe.style.display="block")}}):null,e.jsx(X.User,{className:"h-5 w-5 text-[var(--hrk-text-secondary)]",style:{display:o?"none":"block"}})]})]})]})}),e.jsxs("div",{className:"relative",children:[nr.coverImage?e.jsx("div",{className:`w-full bg-cover bg-center sm:h-52 md:h-60 ${(nr.about?.length??0)>50?"h-52":"h-44"}`,style:{backgroundImage:`url(${nr.coverImage})`}}):e.jsx("div",{className:`w-full bg-gradient-to-r from-blue-600 to-purple-700 sm:h-52 md:h-60 ${(nr.about?.length??0)>50?"h-52":"h-44"}`}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-gray-900 via-gray-900/60 to-transparent"}),Je&&e.jsx("button",{onClick:Ru,className:"absolute top-3 right-3 p-2 bg-black/40 hover:bg-black/60 rounded-full transition-colors z-10",title:At?"Remove from favourites":"Add to favourites",children:e.jsx(X.Heart,{className:`h-5 w-5 ${At?"text-red-500":"text-white"}`,fill:At?"currentColor":"none"})}),e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 px-4 sm:px-6 pb-4",children:[e.jsxs("div",{className:"flex items-end gap-3 sm:gap-4",children:[Da&&oe?e.jsxs("button",{type:"button",onClick:oe,"aria-label":"Edit profile",className:"group relative flex-shrink-0 rounded-full focus:outline-none focus:ring-2 focus:ring-white/60",children:[e.jsx("img",{src:nr.profileImage||`https://images.hive.blog/u/${ut}/avatar`,alt:ut,className:"w-16 h-16 sm:w-20 sm:h-20 md:w-24 md:h-24 rounded-full border-3 sm:border-4 border-gray-900 bg-[var(--hrk-bg-surface-raised)] object-cover",onError:ae=>{ae.target.src=`https://images.hive.blog/u/${ut}/avatar`}}),e.jsx("span",{className:"pointer-events-none absolute inset-0 flex items-center justify-center rounded-full bg-black/0 text-white opacity-0 transition-all duration-150 group-hover:bg-black/55 group-hover:opacity-100 group-focus:bg-black/55 group-focus:opacity-100",children:e.jsx(X.Pencil,{className:"h-5 w-5 sm:h-6 sm:w-6"})}),e.jsx("span",{className:"pointer-events-none absolute -bottom-0.5 -right-0.5 flex h-6 w-6 items-center justify-center rounded-full border-2 border-gray-900 bg-[var(--hrk-brand)] text-white shadow-md sm:h-7 sm:w-7","aria-hidden":!0,children:e.jsx(X.Pencil,{className:"h-3 w-3 sm:h-3.5 sm:w-3.5"})})]}):e.jsx("img",{src:nr.profileImage||`https://images.hive.blog/u/${ut}/avatar`,alt:ut,className:"w-16 h-16 sm:w-20 sm:h-20 md:w-24 md:h-24 rounded-full border-3 sm:border-4 border-gray-900 bg-[var(--hrk-bg-surface-raised)] object-cover flex-shrink-0",onError:ae=>{ae.target.src=`https://images.hive.blog/u/${ut}/avatar`}}),e.jsxs("div",{className:"flex-1 min-w-0 pb-0.5",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("h2",{className:"min-w-0 text-base sm:text-lg md:text-xl font-bold text-white drop-shadow-md flex items-center gap-1.5 flex-wrap",children:[e.jsx("span",{className:"truncate max-w-[150px] sm:max-w-[250px] md:max-w-[350px] inline-block",children:nr.name||ut}),nr.reputation!==void 0&&e.jsxs("div",{className:"relative group inline-flex shrink-0",children:[e.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-semibold rounded bg-gray-700/80 hover:bg-gray-700 text-white/95 border border-gray-600/50 cursor-pointer shrink-0 shadow-sm",style:{minWidth:"24px"},children:jw(nr.reputation).score}),e.jsxs("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2.5 py-1 text-[10px] font-medium text-white bg-black border border-neutral-800 rounded-full shadow-xl opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto transition-opacity duration-150 z-50 whitespace-nowrap after:content-[''] after:absolute after:top-full after:left-1/2 after:-translate-x-1/2 after:border-[4px] after:border-transparent after:border-t-black",children:["Reputation: ",jw(nr.reputation).formatted]})]}),e.jsxs("span",{className:"text-xs sm:text-sm font-normal text-[var(--hrk-text-secondary)]",children:[" (@",ut,")"]})]}),(Ga.twitter||Ga.reddit)&&e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[Ga.twitter&&e.jsx("a",{href:"https://hiveposh.com/",target:"_blank",rel:"noopener noreferrer",title:`X / Twitter: @${Ga.twitter}`,"aria-label":"X / Twitter (via HivePosh)",className:"flex h-6 w-6 items-center justify-center rounded-full bg-black/40 text-white transition-colors hover:bg-black/60",children:e.jsx("svg",{viewBox:"0 0 24 24",className:"h-3 w-3",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}),Ga.reddit&&e.jsx("a",{href:"https://hiveposh.com/",target:"_blank",rel:"noopener noreferrer",title:`Reddit: u/${Ga.reddit}`,"aria-label":"Reddit (via HivePosh)",className:"flex h-6 w-6 items-center justify-center rounded-full bg-[#ff4500] text-white transition-colors hover:opacity-90",children:e.jsx("svg",{viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0zm4.388 8.74c.654 0 1.184.53 1.184 1.184a1.18 1.18 0 0 1-.582 1.018c.012.092.018.185.018.28 0 1.83-2.143 3.314-4.788 3.314s-4.788-1.484-4.788-3.314c0-.094.006-.187.017-.278a1.18 1.18 0 0 1-.585-1.02 1.184 1.184 0 0 1 2.006-.852 5.86 5.86 0 0 1 3.184-1.008l.605-2.842a.26.26 0 0 1 .31-.2l2.005.426a.842.842 0 1 1-.087.41l-1.793-.382-.54 2.55a5.86 5.86 0 0 1 3.135 1.012 1.18 1.18 0 0 1 .963-.498zM9.747 11.84a.842.842 0 1 0 1.684 0 .842.842 0 0 0-1.684 0zm5.265.842a.842.842 0 1 0 0-1.684.842.842 0 0 0 0 1.684zm-.585 1.795a.26.26 0 0 0-.366.003c-.397.397-1.214.537-1.94.537s-1.543-.14-1.94-.537a.26.26 0 0 0-.367.367c.61.61 1.737.69 2.307.69s1.697-.08 2.307-.69a.26.26 0 0 0 .005-.366z"})})})]})]}),nr.about&&e.jsx("p",{className:"text-[var(--hrk-text-primary)] text-xs sm:text-sm leading-relaxed mt-1 line-clamp-2 drop-shadow-md",children:nr.about}),nr.location&&e.jsxs("span",{className:"flex items-center gap-1 text-[var(--hrk-text-secondary)] text-xs mt-1 drop-shadow-md whitespace-nowrap",children:[e.jsx(X.MapPin,{className:"h-3 w-3 text-rose-400 flex-shrink-0"})," ",nr.location.replace(/[\r\n]+/g," ").replace(/\s+/g," ").trim()]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1 mt-2 text-[11px] sm:text-xs text-[var(--hrk-text-primary)]",children:[nr.website&&e.jsxs("a",{href:nr.website.startsWith("http")?nr.website:`https://${nr.website}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-blue-300 hover:underline drop-shadow-md",children:[e.jsx(X.Globe,{className:"h-3 w-3 text-blue-400"})," ",nr.website]}),nr.created&&e.jsxs("span",{className:"flex items-center gap-1 drop-shadow-md",children:[e.jsx(X.Calendar,{className:"h-3 w-3 text-green-400"})," ",yU(nr.created)]}),nr.lastActivity&&e.jsxs("span",{className:"flex items-center gap-1 drop-shadow-md",children:[e.jsx(X.Clock,{className:"h-3 w-3 text-amber-400"})," ",cA(nr.lastActivity)]}),nr.votingPower!==void 0&&e.jsxs("span",{className:"flex items-center gap-1 drop-shadow-md",children:[e.jsx(X.Zap,{className:"h-3 w-3 text-yellow-400"})," VP ",nr.votingPower.toFixed(1),"%"]}),nr.hivePower!==void 0&&e.jsxs("span",{className:"flex items-center gap-1 drop-shadow-md",children:[e.jsx(X.Zap,{className:"h-3 w-3 text-orange-400"})," HP ",nr.hivePower.toFixed(0)]}),e.jsx($C,{username:ut,hideWhileLoading:!0})]}),e.jsxs("div",{className:"flex items-center gap-4 mt-2 text-[11px] sm:text-xs text-[var(--hrk-text-primary)]",children:[e.jsxs("button",{onClick:()=>sr("followers"),className:"hover:text-[var(--hrk-text-primary)] transition-colors drop-shadow-md",children:[e.jsx("span",{className:"font-semibold",children:nr.followersCount.toLocaleString()})," ",Nt("meta.followers")]}),e.jsxs("button",{onClick:()=>sr("following"),className:"hover:text-[var(--hrk-text-primary)] transition-colors drop-shadow-md",children:[e.jsx("span",{className:"font-semibold",children:nr.followingCount.toLocaleString()})," ",Nt("meta.following")]}),e.jsxs("span",{className:"drop-shadow-md",children:[e.jsx("span",{className:"font-semibold",children:nr.postsCount.toLocaleString()})," ",Nt("meta.posts")]})]})]})]}),e.jsxs("div",{className:"sticky top-[calc(56px+env(safe-area-inset-top))] z-20 bg-[var(--hrk-bg-surface)] border-b border-[var(--hrk-border-subtle)] relative flex items-center",children:[e.jsx("button",{onClick:()=>aa("left"),className:`absolute left-0 z-10 h-full px-2 bg-[var(--hrk-bg-surface-raised)] hover:bg-[var(--hrk-bg-hover)] flex items-center shadow-md transition-all ${gl?"opacity-100":"opacity-0 pointer-events-none"}`,children:e.jsx(X.ChevronLeft,{className:"h-4 w-4 text-white"})}),e.jsx("div",{ref:Vs,className:"flex overflow-x-auto scrollbar-hide px-1",children:Yl.map(ae=>{const qe=ae.icon;return e.jsxs("button",{onClick:()=>sr(ae.id),className:`flex items-center gap-1 px-3 sm:px-4 py-2.5 text-xs sm:text-sm font-medium whitespace-nowrap transition-colors border-b-2 ${vr===ae.id?"text-blue-400 border-blue-400":"text-[var(--hrk-text-tertiary)] border-transparent hover:text-[var(--hrk-text-secondary)] hover:border-[var(--hrk-border-default)]"}`,children:[e.jsx(qe,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:ae.label})]},ae.id)})}),e.jsx("button",{onClick:()=>aa("right"),className:`absolute right-0 z-10 h-full px-2 bg-[var(--hrk-bg-surface-raised)] hover:bg-[var(--hrk-bg-hover)] flex items-center shadow-md transition-all ${Ce?"opacity-100":"opacity-0 pointer-events-none"}`,children:e.jsx(X.ChevronRight,{className:"h-4 w-4 text-white"})})]}),e.jsxs("div",{className:"p-4 flex-1",children:[Ls(),vr!=="wallet"&&lt[vr]&&e.jsx("div",{ref:Wa,className:"min-h-[60px] py-2",children:fr?e.jsx("div",{className:"animate-pulse space-y-3",children:vr==="followers"||vr==="following"?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-3",children:[1,2].map(ae=>e.jsx("div",{className:"border border-[var(--hrk-border-subtle)] rounded-lg p-4 bg-[var(--hrk-bg-surface)]",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-[var(--hrk-bg-surface-raised)] rounded-full"}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-28"})]})},ae))}):e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-[var(--hrk-bg-surface-raised)] rounded-full flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-3.5 bg-[var(--hrk-bg-surface-raised)] rounded w-24 mb-2"}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-3/4 mb-2"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-1/2"})]})]})})}):e.jsx("div",{className:"h-1"})})]},vr),Ja&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000] p-4",onClick:()=>ms(!1),children:e.jsxs("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl shadow-xl max-w-sm w-full border border-[var(--hrk-border-subtle)] p-6",onClick:ae=>ae.stopPropagation(),children:[e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:Nt("modal.ignoreAuthorTitle")}),e.jsx("p",{className:"text-sm text-[var(--hrk-text-secondary)] mb-6",children:Nt("modal.ignoreAuthorBody",{username:ut})}),e.jsxs("div",{className:"flex items-center justify-end gap-3",children:[e.jsx("button",{onClick:()=>ms(!1),disabled:za,className:"px-4 py-2 text-sm font-medium rounded-lg border border-[var(--hrk-border-default)] text-[var(--hrk-text-secondary)] hover:bg-[var(--hrk-bg-surface-raised)] disabled:opacity-50",children:Nt("action.cancel")}),e.jsx("button",{onClick:xi,disabled:za,className:"px-4 py-2 text-sm font-medium rounded-lg text-white bg-red-600 hover:bg-red-700 disabled:opacity-50",children:Nt(za?"action.processing":"action.confirmIgnore")})]})]})}),e.jsx(iA,{isOpen:qs,onClose:()=>To(!1),onReport:el,reportType:"user",targetUsername:ut}),e.jsx(iA,{isOpen:!!Kn,onClose:()=>js(null),onReport:async ae=>{if(Kn&&Z){await Z(Kn.author,Kn.permlink,ae);const qe=dt=>dt.author===Kn.author&&dt.permlink===Kn.permlink;Ur(dt=>dt.filter(Jt=>!qe(Jt))),Wr(dt=>dt.filter(Jt=>!qe(Jt))),yn(dt=>dt.filter(Jt=>!qe(Jt))),sn(dt=>dt.filter(Jt=>!qe(Jt))),Pn(dt=>dt.filter(Jt=>!qe(Jt)))}js(null)},reportType:"post",targetUsername:Kn?.author||"",targetPermlink:Kn?.permlink})]})})},kU=({media:a})=>{const[o,l]=T.useState(!1),u=T.useRef(null),d=a.kind+":"+("url"in a?a.url:a.id);return T.useEffect(()=>{l(!1);const f=u.current;f&&f.complete&&f.naturalWidth>0&&l(!0)},[d]),a.kind==="image"?e.jsxs(e.Fragment,{children:[!o&&e.jsx("span",{className:"absolute inset-0 z-10 flex items-center justify-center bg-black/20 pointer-events-none",children:e.jsx(X.Loader2,{className:"h-5 w-5 animate-spin text-white/80"})}),e.jsx("img",{ref:u,src:a.url,alt:"",className:"absolute inset-0 h-full w-full object-cover",onLoad:()=>l(!0),onError:f=>{l(!0),f.target.style.display="none"}})]}):a.kind==="youtube"?e.jsxs(e.Fragment,{children:[!o&&e.jsx("span",{className:"absolute inset-0 z-10 flex items-center justify-center bg-black/20 pointer-events-none",children:e.jsx(X.Loader2,{className:"h-5 w-5 animate-spin text-white/80"})}),e.jsx("img",{ref:u,src:`https://i.ytimg.com/vi/${a.id}/hqdefault.jpg`,alt:"",className:"absolute inset-0 h-full w-full object-cover opacity-90",onLoad:()=>l(!0),onError:f=>{l(!0),f.target.style.display="none"}}),e.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-black/70 text-white",children:e.jsx(X.Play,{className:"h-5 w-5 fill-current"})})}),e.jsx("span",{className:"absolute bottom-1.5 left-1.5 rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-medium text-white",children:"YouTube"})]}):a.kind==="threespeak"?e.jsxs("span",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 bg-[var(--hrk-bg-surface-sunken)]",children:[e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[var(--hrk-brand)]/15 text-[var(--hrk-brand)]",children:e.jsx(X.Play,{className:"h-5 w-5 fill-current"})}),e.jsx("span",{className:"rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-medium text-white",children:"3Speak"})]}):e.jsxs("span",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 bg-[var(--hrk-bg-surface-sunken)] text-white",children:[e.jsx("span",{className:"text-3xl font-semibold",children:"𝕏"}),e.jsx("span",{className:"rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-medium",children:"Tweet"})]})},jU=({media:a})=>{const[o,l]=T.useState(0),[u,d]=T.useState(null);if(a.length===0)return null;const f=Math.min(o,a.length-1),h=a[f],g=x=>{if(x.stopPropagation(),h.kind==="twitter"){window.open(h.url,"_blank","noopener,noreferrer");return}d(f)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative my-2 mr-2 h-20 w-28 flex-shrink-0 overflow-hidden rounded-lg bg-[var(--hrk-bg-surface-raised)] sm:my-3 sm:mr-3 sm:h-auto sm:w-32 sm:self-stretch md:w-40 lg:w-48",children:[e.jsx("button",{onClick:g,className:"absolute inset-0 block cursor-pointer","aria-label":"Open media preview",children:e.jsx(kU,{media:h})}),a.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:x=>{x.stopPropagation(),l(y=>(y-1+a.length)%a.length)},className:"absolute left-1 top-1/2 -translate-y-1/2 rounded-full bg-black/60 p-1 text-white hover:bg-black/80",title:"Previous",children:e.jsx(X.ChevronLeft,{className:"h-4 w-4"})}),e.jsx("button",{onClick:x=>{x.stopPropagation(),l(y=>(y+1)%a.length)},className:"absolute right-1 top-1/2 -translate-y-1/2 rounded-full bg-black/60 p-1 text-white hover:bg-black/80",title:"Next",children:e.jsx(X.ChevronRight,{className:"h-4 w-4"})}),e.jsxs("span",{className:"absolute bottom-1.5 right-1.5 rounded-full bg-black/60 px-1.5 py-0.5 text-[10px] font-medium text-white",children:[f+1,"/",a.length]})]})]}),u!==null&&e.jsx(iC,{items:a.filter(x=>x.kind!=="twitter"),startIndex:Math.min(u,Math.max(0,a.slice(0,u+1).filter(x=>x.kind!=="twitter").length-1)),onClose:()=>d(null)})]})},NU=a=>{window.open(a,"_blank")},SU=({app:a,backgroundColor:o,boxShadow:l})=>{const u=()=>{NU(a.url)};return e.jsx("div",{className:"card hover-lift cursor-pointer transition-all duration-300 h-full",onClick:u,style:{backgroundColor:o??"rgba(15,23,42,0.9)",boxShadow:l??"0 18px 45px rgba(0,0,0,0.6)",border:"1px solid rgba(148,163,184,0.25)"},children:e.jsx("div",{className:"card-body p-6",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"flex-shrink-0",children:a.useCircleBackground!==!1?e.jsx("div",{className:"avatar",children:e.jsx("div",{className:"w-16 h-16 rounded-full",children:e.jsx("img",{src:a.imagePath,alt:`${a.name} logo`,className:"w-full h-full object-cover",onError:d=>{d.currentTarget.src="/placeholder.svg"}})})}):e.jsx("img",{src:a.imagePath,alt:`${a.name} logo`,className:"w-16 h-16 object-contain",onError:d=>{d.currentTarget.src="/placeholder.svg"}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("h3",{className:"card-title text-lg font-bold text-base-content mb-2 line-clamp-2",children:a.name}),a.isComingSoon&&e.jsx("div",{className:"badge badge-warning badge-sm",children:"Coming Soon"})]}),e.jsx("div",{className:"text-base-content/70 text-sm leading-relaxed",children:a.description.split(`
1415
+ `),fa=Bn=>parseFloat((Bn??"").replace(/[^\d.]/g,""))||0,On=fa(ae.pending_payout_value),fs=fa(ae.author_payout_value),Es=fa(ae.curator_payout_value),is=ae.payout&&ae.payout>0?ae.payout:On>0?On:fs+Es,tl={pendingValue:On,authorValue:fs,curatorValue:Es,totalValue:is,isPaidout:!!ae.is_paidout,payoutAt:ae.payout_at,percentHbd:ae.percent_hbd??1e4,beneficiaries:(ae.beneficiaries??[]).map(Bn=>({account:Bn.account,weight:Bn.weight}))},Bi=!!se&&!!xe&&o?.toLowerCase()!==Og&&ae.author.toLowerCase()!==o?.toLowerCase()&&!hy(ae.active_votes)&&my(ae.json_metadata);return e.jsxs("div",{className:`rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] transition-colors hover:bg-[var(--hrk-bg-surface-raised)] ${dt?"cursor-pointer":""}`,onClick:dt,children:[e.jsxs("div",{className:"flex items-stretch",children:[e.jsxs("div",{className:"min-w-0 flex-1 p-2.5 sm:p-4",children:[e.jsxs("div",{className:"mb-1 flex items-center gap-2 sm:mb-1.5 sm:gap-3",children:[e.jsx("img",{src:`https://images.hive.blog/u/${ae.author}/avatar`,alt:ae.author,className:`h-7 w-7 flex-shrink-0 rounded-full bg-[var(--hrk-bg-surface-raised)] sm:h-9 sm:w-9 ${Zc(Yr[ae.author])}`,onError:Bn=>{Bn.target.src=`https://ui-avatars.com/api/?name=${ae.author}&background=random&size=40`}}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-x-1.5 gap-y-0 sm:gap-x-2 sm:gap-y-0.5",children:[e.jsx(ai,{href:jt?.(ae.author),onActivate:()=>Fe?.(ae.author),className:"text-[11px] font-medium text-white hover:text-blue-400 sm:text-sm",children:Yr[ae.author]?e.jsxs("span",{className:`inline-block rounded px-1 py-0.5 text-[10px] font-medium sm:text-xs ${ef(Yr[ae.author])}`,children:["@",ae.author]}):e.jsxs(e.Fragment,{children:["@",ae.author]})}),ae.author_reputation!==void 0&&e.jsxs("div",{className:"relative group inline-flex shrink-0",children:[e.jsxs("span",{className:"text-[10px] sm:text-xs text-[var(--hrk-text-tertiary)] cursor-pointer font-normal",children:["(",jw(ae.author_reputation).score,")"]}),e.jsxs("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 px-2.5 py-1 text-[10px] font-medium text-white bg-black border border-neutral-800 rounded-full shadow-xl opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto transition-opacity duration-150 z-50 whitespace-nowrap after:content-[''] after:absolute after:top-full after:left-1/2 after:-translate-x-1/2 after:border-[4px] after:border-transparent after:border-t-black",children:["Reputation: ",jw(ae.author_reputation).formatted]})]}),e.jsx(ai,{href:Mr?.(ae.author,ae.permlink),onActivate:()=>Ye?.(ae.author,ae.permlink,ae.title),className:"text-[10px] text-[var(--hrk-text-tertiary)] hover:text-blue-400 hover:underline sm:text-xs",children:cA(ae.created)}),ae.community_title&&e.jsxs(ai,{href:ae.community?br?.(ae.community):void 0,onActivate:()=>{ae.community&&Fe?.(ae.community)},className:"text-[10px] font-medium text-blue-400 hover:underline sm:text-xs",children:["#",ae.community_title]})]})]}),ae.title&&e.jsx(ai,{href:Mr?.(ae.author,ae.permlink),onActivate:()=>Ye?.(ae.author,ae.permlink,ae.title),className:"mb-0.5 line-clamp-2 block text-left text-[13px] font-semibold leading-snug text-white hover:text-blue-400 sm:mb-1 sm:text-base",children:ae.title}),kt&&e.jsx("p",{className:"line-clamp-2 text-[11px] leading-snug text-[var(--hrk-text-tertiary)] sm:line-clamp-3 sm:text-sm sm:leading-relaxed",children:kt.substring(0,240)})]}),e.jsx(jU,{media:Jt})]}),e.jsx("div",{className:"border-t border-[var(--hrk-border-subtle)]/50 px-2.5 py-2 sm:px-4 rounded-b-lg",onClick:Bn=>Bn.stopPropagation(),children:e.jsx(Lg,{author:ae.author,permlink:ae.permlink,currentUser:o,onUserClick:Fe,getUserUrl:jt,hiveValue:Ha,hiveIconUrl:"/images/hive_logo.png",payoutTooltip:Wn,payoutDetails:tl,initialVotes:ae.active_votes||[],initialVoteCount:ae.stats?.total_votes??ae.active_votes?.length??Math.max(0,ae.net_votes??0),initialFlagWeight:ae.stats?.flag_weight,initialCommentsCount:ae.children||0,postCreatedAt:ae.created,onUpvote:H?Bn=>H(ae.author,ae.permlink,Bn):void 0,curationEligible:Bi,curationType:"post",onCurationRequest:xe?(Bn,Xs)=>xe(ae.author,ae.permlink,Bn,"post",Xs):void 0,onFetchCurationStatus:be,onSubmitComment:z?(Bn,Xs,Ws)=>z(Bn,Xs,Ws):void 0,onClickCommentUpvote:A,onReblog:q?()=>q(ae.author,ae.permlink):void 0,isReblogged:F?F(ae.author,ae.permlink):!1,onCheckReblogged:I,onShare:Ft?()=>Ft(ae.author,ae.permlink):void 0,onTip:ae.author!==o&&Y?()=>Y(ae.author,ae.permlink):void 0,onReport:ae.author!==o&&Z?()=>js({author:ae.author,permlink:ae.permlink}):void 0,onToggleBookmark:J?()=>J(ae.author,ae.permlink):void 0,isBookmarked:te?te(ae.author,ae.permlink):!1,onDelete:ae.author===o&&ma&&W?()=>W(ae.author,ae.permlink):void 0,onEdit:ae.author===o&&Q?()=>Q({author:ae.author,permlink:ae.permlink,body:ae.body??"",title:ae.title??"",parent_author:ae.parent_author??"",parent_permlink:ae.parent_permlink??"",json_metadata:typeof ae.json_metadata=="string"?ae.json_metadata:ae.json_metadata?JSON.stringify(ae.json_metadata):""}):void 0,disableCommentsModal:!!Xe,onComments:Xe?()=>Xe(ae.author,ae.permlink):void 0,ecencyToken:g,threeSpeakApiKey:x,giphyApiKey:y,templateToken:b,templateApiBaseUrl:w,defaultVotePercent:Lt,voteWeightStep:Zt,allowLandscapeVideos:Vr,awaitingWalletApproval:pa})})]},`${ae.author}/${ae.permlink}`)},we=(ae,qe)=>e.jsx("div",{className:"border border-[var(--hrk-border-subtle)] rounded-lg p-4 bg-[var(--hrk-bg-surface)] hover:bg-[var(--hrk-bg-surface-raised)] transition-colors",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ai,{href:jt?.(ae),onActivate:()=>Fe?.(ae),className:"flex-shrink-0","aria-label":`@${ae} profile`,children:e.jsx("img",{src:`https://images.hive.blog/u/${ae}/avatar`,alt:ae,className:"w-10 h-10 rounded-full bg-[var(--hrk-bg-surface-raised)]",onError:dt=>{dt.target.src=`https://ui-avatars.com/api/?name=${ae}&background=random&size=40`}})}),e.jsxs(ai,{href:jt?.(ae),onActivate:()=>Fe?.(ae),className:"font-medium text-white hover:text-blue-400",children:["@",ae]})]})},`${ae}-${qe}`),tt=(ae,qe)=>{let dt=ae.name,Jt="",kt=`https://images.hive.blog/u/${ae.name}/avatar`;try{const Er=ae.posting_json_metadata?JSON.parse(ae.posting_json_metadata):ae.json_metadata?JSON.parse(ae.json_metadata):null;Er?.profile&&(Er.profile.name&&(dt=Er.profile.name),Er.profile.about&&(Jt=Er.profile.about),Er.profile.profile_image&&(kt=Er.profile.profile_image))}catch(Er){console.warn("Failed to parse metadata for badge",ae.name,Er)}return e.jsxs("div",{className:"border border-[var(--hrk-border-subtle)] rounded-lg p-4 bg-[var(--hrk-bg-surface)] hover:bg-[var(--hrk-bg-surface-raised)] transition-colors flex items-start gap-3",children:[e.jsx(ai,{href:jt?.(ae.name),onActivate:()=>Fe?.(ae.name),className:"flex-shrink-0","aria-label":`${dt} badge detail`,children:e.jsx("img",{src:kt,alt:dt,className:"w-12 h-12 rounded-lg bg-[var(--hrk-bg-surface-raised)] object-cover",onError:Er=>{Er.target.src=`https://images.hive.blog/u/${ae.name}/avatar`}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs(ai,{href:jt?.(ae.name),onActivate:()=>Fe?.(ae.name),className:"font-semibold text-white hover:text-blue-400 text-sm block truncate",children:["B/",dt]}),Jt&&e.jsx("p",{className:"text-xs text-[var(--hrk-text-tertiary)] mt-1 line-clamp-2",title:Jt,children:Jt})]})]},`${ae.name}-${qe}`)},Yt=(ae,qe)=>{const dt=ae.description?ae.description.replace(/<[^>]*>/g,""):"";return e.jsxs("div",{className:"border border-[var(--hrk-border-subtle)] rounded-lg p-4 bg-[var(--hrk-bg-surface)] hover:bg-[var(--hrk-bg-surface-raised)] transition-colors flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("img",{src:ae.url,alt:ae.title,className:"w-12 h-12 object-contain",onError:Jt=>{Jt.target.src="https://hivebuzz.me/badges/first-post.png"}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h4",{className:"font-semibold text-white text-sm truncate",children:ae.title}),dt&&e.jsx("p",{className:"text-xs text-[var(--hrk-text-tertiary)] mt-1 line-clamp-2",title:dt,children:dt})]})]},`${ae.name}-${ae.id}-${qe}`)},yr=(ae=5)=>e.jsx("div",{className:"space-y-3 animate-pulse",children:Array.from({length:ae},(qe,dt)=>e.jsxs("div",{className:"overflow-hidden rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)]",children:[e.jsxs("div",{className:"flex items-stretch",children:[e.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5 p-2.5 sm:space-y-2 sm:p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[e.jsx("div",{className:"h-7 w-7 flex-shrink-0 rounded-full bg-[var(--hrk-bg-surface-raised)] sm:h-9 sm:w-9"}),e.jsx("div",{className:"h-2.5 w-20 rounded bg-[var(--hrk-bg-surface-raised)] sm:h-3 sm:w-24"}),e.jsx("div",{className:"h-2 w-10 rounded bg-[var(--hrk-bg-surface-raised)]/70 sm:w-12"})]}),e.jsx("div",{className:"h-3 w-5/6 rounded bg-[var(--hrk-bg-surface-raised)] sm:h-4"}),e.jsx("div",{className:"h-2.5 w-full rounded bg-[var(--hrk-bg-surface-raised)]/70 sm:h-3"}),e.jsx("div",{className:"h-2.5 w-4/6 rounded bg-[var(--hrk-bg-surface-raised)]/70 sm:h-3"})]}),e.jsx("div",{className:"my-2 mr-2 h-20 w-28 flex-shrink-0 rounded-lg bg-[var(--hrk-bg-surface-raised)]/70 sm:my-3 sm:mr-3 sm:h-auto sm:w-32 sm:self-stretch md:w-40 lg:w-48"})]}),e.jsxs("div",{className:"flex gap-3 border-t border-[var(--hrk-border-subtle)]/50 px-2.5 py-2 sm:px-4",children:[e.jsx("div",{className:"h-3 w-10 rounded bg-[var(--hrk-bg-surface-raised)]/70"}),e.jsx("div",{className:"h-3 w-10 rounded bg-[var(--hrk-bg-surface-raised)]/70"}),e.jsx("div",{className:"h-3 w-10 rounded bg-[var(--hrk-bg-surface-raised)]/70"}),e.jsx("div",{className:"ml-auto h-3 w-12 rounded bg-[var(--hrk-bg-surface-raised)]/70"})]})]},dt))}),Cr=(ae=8)=>e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-3 animate-pulse",children:Array.from({length:ae},(qe,dt)=>e.jsx("div",{className:"border border-[var(--hrk-border-subtle)] rounded-lg p-4 bg-[var(--hrk-bg-surface)]",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-[var(--hrk-bg-surface-raised)] rounded-full flex-shrink-0"}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-28"})]})},dt))}),Tr=(ae=3)=>e.jsx("div",{className:"space-y-3 animate-pulse",children:Array.from({length:ae},(qe,dt)=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:"w-10 h-10 bg-[var(--hrk-bg-surface-raised)] rounded-full flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"h-3.5 bg-[var(--hrk-bg-surface-raised)] rounded w-24"}),e.jsx("div",{className:"h-5 bg-[var(--hrk-bg-surface-raised)] rounded-full w-14"})]}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-4/5 mb-3"}),e.jsxs("div",{className:"space-y-2 mb-3",children:[e.jsx("div",{className:"h-8 bg-[var(--hrk-bg-surface-raised)] rounded-lg w-full"}),e.jsx("div",{className:"h-8 bg-[var(--hrk-bg-surface-raised)] rounded-lg w-full"}),e.jsx("div",{className:"h-8 bg-[var(--hrk-bg-surface-raised)] rounded-lg w-3/4"})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-20"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-24"})]})]})]})},dt))}),Qr=()=>e.jsxs("div",{className:"space-y-3 animate-pulse",children:[e.jsxs("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"w-5 h-5 bg-[var(--hrk-bg-surface-raised)] rounded"}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-44"})]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[1,2,3,4].map(ae=>e.jsxs("div",{className:"bg-[var(--hrk-bg-app)]/50 rounded-lg p-2.5",children:[e.jsx("div",{className:"h-2.5 bg-[var(--hrk-bg-surface-raised)] rounded w-12 mb-2"}),e.jsx("div",{className:"h-5 bg-[var(--hrk-bg-surface-raised)] rounded w-16"})]},ae))})]}),[1,2,3,4,5].map(ae=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-7 h-7 bg-[var(--hrk-bg-surface-raised)] rounded-lg"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-3/4 mb-2"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-1/3 mb-3"}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-20"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-16"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-16"})]})]})]})},ae))]}),Cn=ae=>{if(!ae||!isFinite(ae)||ae<=0)return"—";const qe=Math.floor(ae/1e3),dt=Math.floor(qe/60),Jt=Math.floor(dt/60),kt=Math.floor(Jt/24);return kt>=1?`${kt}d ${Jt%24}h`:Jt>=1?`${Jt}h ${dt%60}m`:`${Math.max(1,dt)}m`},_n=(ae,qe=3)=>ae==null||isNaN(ae)?"—":Number(ae).toLocaleString(void 0,{maximumFractionDigits:qe,minimumFractionDigits:qe}),Dn=()=>{if(kr&&ha.length===0)return Qr();if(ha.length===0&&!It)return e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.Award,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.noPendingAuthor")}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)] text-xs mt-1",children:"Rewards appear for posts/comments with pending payouts"})]});const ae=ha.filter(dt=>!dt.isComment).length,qe=ha.length-ae;return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"bg-gradient-to-r from-amber-900/30 to-orange-900/30 rounded-xl p-4 border border-amber-700/40",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(X.Award,{className:"w-5 h-5 text-amber-400"}),e.jsx("h3",{className:"text-sm font-semibold text-amber-300",children:Nt("reward.pendingAuthor")})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.posts")}),e.jsx("p",{className:"text-lg font-bold text-white notranslate",translate:"no",children:ae})]}),e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.comments")}),e.jsx("p",{className:"text-lg font-bold text-white notranslate",translate:"no",children:qe})]}),e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.totalHbd")}),e.jsxs("p",{className:"text-lg font-bold text-amber-400 notranslate",translate:"no",children:["$",_n(Ka.totalHbd)]})]}),e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.totalHp")}),e.jsx("p",{className:"text-lg font-bold text-orange-400 notranslate",translate:"no",children:_n(Ka.totalHpEq)})]})]})]}),ha.map((dt,Jt)=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)] hover:border-[var(--hrk-border-default)] transition-colors cursor-pointer",onClick:()=>Ye?.(dt.author,dt.permlink,dt.title),children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0 ${dt.isComment?"bg-blue-900/40 text-blue-400":"bg-emerald-900/40 text-emerald-400"}`,children:dt.isComment?e.jsx(X.MessageCircle,{className:"w-3.5 h-3.5"}):e.jsx(X.FileText,{className:"w-3.5 h-3.5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("h4",{className:"text-sm font-medium text-white truncate",children:dt.title||`${dt.author}/${dt.permlink}`}),e.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded-full flex-shrink-0 ${dt.isComment?"bg-blue-900/40 text-blue-300":"bg-emerald-900/40 text-emerald-300"}`,children:dt.isComment?Nt("reward.comment"):Nt("reward.post")})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 mt-2 text-xs text-[var(--hrk-text-tertiary)]",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(X.Clock,{className:"w-3 h-3"}),"Payout in ",Cn(dt.payoutMs)]}),e.jsxs("span",{className:"text-amber-400 font-medium notranslate",translate:"no",children:["$",_n(dt.hbd)," HBD"]}),dt.hpEq!==null&&e.jsxs("span",{className:"text-orange-400 font-medium notranslate",translate:"no",children:[_n(dt.hpEq)," HP"]}),dt.beneficiaryCut>0&&e.jsxs("span",{className:"text-[var(--hrk-text-tertiary)] notranslate",translate:"no",children:["Beneficiary: ",(dt.beneficiaryCut*100).toFixed(0),"%"]})]})]})]})},`${dt.author}-${dt.permlink}-${Jt}`)),It&&e.jsx("div",{className:"animate-pulse space-y-3",children:[1,2].map(dt=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-7 h-7 bg-[var(--hrk-bg-surface-raised)] rounded-lg"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-3/4 mb-2"}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-20"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-16"})]})]})]})},dt))})]})},zi=()=>{if(kr&&ke.length===0)return Qr();if(ke.length===0&&!It)return e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.TrendingUp,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.noPendingCuration")}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)] text-xs mt-1",children:Nt("empty.curationHint")})]});const ae=ke.filter(kt=>!kt.isComment).length,qe=ke.length-ae,dt=ke.filter(kt=>kt.efficiency!==null),Jt=dt.length>0?dt.reduce((kt,Er)=>kt+(Er.efficiency||0),0)/dt.length:null;return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"bg-gradient-to-r from-blue-900/30 to-purple-900/30 rounded-xl p-4 border border-blue-700/40",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(X.TrendingUp,{className:"w-5 h-5 text-blue-400"}),e.jsx("h3",{className:"text-sm font-semibold text-blue-300",children:Nt("reward.pendingCuration")})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-5 gap-3",children:[e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.posts")}),e.jsx("p",{className:"text-lg font-bold text-white notranslate",translate:"no",children:ae})]}),e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.comments")}),e.jsx("p",{className:"text-lg font-bold text-white notranslate",translate:"no",children:qe})]}),e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.totalHp")}),e.jsx("p",{className:"text-lg font-bold text-blue-400 notranslate",translate:"no",children:_n(_t.totalHp)})]}),e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.totalHbd")}),e.jsxs("p",{className:"text-lg font-bold text-purple-400 notranslate",translate:"no",children:["$",_n(_t.totalHbd)]})]}),Jt!==null&&e.jsxs("div",{className:"bg-black/30 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider",children:Nt("reward.avgEfficiency")}),e.jsxs("p",{className:`text-lg font-bold notranslate ${Jt>=100?"text-emerald-400":"text-amber-400"}`,translate:"no",children:[Jt.toFixed(1),"%"]})]})]})]}),ke.map((kt,Er)=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)] hover:border-[var(--hrk-border-default)] transition-colors cursor-pointer",onClick:()=>Ye?.(kt.author,kt.permlink,kt.title),children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0 ${kt.isComment?"bg-blue-900/40 text-blue-400":"bg-emerald-900/40 text-emerald-400"}`,children:kt.isComment?e.jsx(X.MessageCircle,{className:"w-3.5 h-3.5"}):e.jsx(X.FileText,{className:"w-3.5 h-3.5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h4",{className:"text-sm font-medium text-white truncate",children:kt.title||`${kt.author}/${kt.permlink}`}),e.jsxs("p",{className:"text-xs text-[var(--hrk-text-tertiary)] mt-0.5",children:["by @",kt.author]})]}),e.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded-full flex-shrink-0 ${kt.isComment?"bg-blue-900/40 text-blue-300":"bg-emerald-900/40 text-emerald-300"}`,children:kt.isComment?Nt("reward.comment"):Nt("reward.post")})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 mt-2 text-xs text-[var(--hrk-text-tertiary)]",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(X.Clock,{className:"w-3 h-3"}),"Payout in ",Cn(kt.payoutMs)]}),e.jsxs("span",{className:"text-blue-400 font-medium notranslate",translate:"no",children:[_n(kt.hp)," HP"]}),e.jsxs("span",{className:"text-purple-400 font-medium notranslate",translate:"no",children:["$",_n(kt.hbd)," HBD"]}),e.jsxs("span",{className:"text-[var(--hrk-text-tertiary)] notranslate",translate:"no",children:["Vote: ",kt.weightPct.toFixed(2),"%"]}),kt.efficiency!==null&&e.jsxs("span",{className:`font-medium notranslate ${kt.efficiency>=100?"text-emerald-400":"text-amber-400"}`,translate:"no",children:["Eff: ",kt.efficiency.toFixed(1),"%"]}),kt.votedAfterMs!==null&&e.jsxs("span",{className:"text-[var(--hrk-text-tertiary)]",children:["Voted after ",Cn(kt.votedAfterMs)]})]})]})]})},`${kt.author}-${kt.permlink}-${Er}`)),It&&e.jsx("div",{className:"animate-pulse space-y-3",children:[1,2].map(kt=>e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-7 h-7 bg-[var(--hrk-bg-surface-raised)] rounded-lg"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-3/4 mb-2"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-1/3 mb-3"}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-20"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-16"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-14"})]})]})]})},kt))})]})},Gl=()=>kr&&ba.length===0?yr():ba.length===0?e.jsx("div",{className:"space-y-3",children:e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.Heart,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.noCuration")})]})}):e.jsx("div",{className:"space-y-3",children:ba.map((ae,qe)=>{const dt=(ae.details?.weight??0)<0,Jt=(ae.details?.weight??0)===0,kt=Math.abs((ae.details?.weight??0)/100).toFixed(2);return e.jsx("div",{className:"overflow-hidden rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] p-4 transition-colors hover:bg-[var(--hrk-bg-surface-raised)] cursor-pointer",onClick:()=>{ae.author&&ae.permlink&&Ye?.(ae.author,ae.permlink,"")},children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative flex-shrink-0",children:[e.jsx("img",{src:`https://images.hive.blog/u/${ae.author}/avatar`,alt:ae.author,className:`w-10 h-10 rounded-full object-cover ${Zc(Yr[ae.author],"ring-1 ring-[var(--hrk-border-subtle)]")}`,onError:Er=>{Er.target.src=`https://ui-avatars.com/api/?name=${ae.author}&background=random&size=40`}}),e.jsx("div",{className:`absolute -bottom-1 -right-1 w-5 h-5 rounded-full flex items-center justify-center border-2 border-[var(--hrk-bg-surface)] ${Jt?"bg-gray-600 text-white":dt?"bg-red-500 text-white":"bg-green-500 text-white"}`,children:Jt?e.jsx(X.Heart,{className:"w-2.5 h-2.5 fill-current"}):dt?e.jsx(X.ArrowDown,{className:"w-2.5 h-2.5 stroke-[3px]"}):e.jsx(X.ArrowUp,{className:"w-2.5 h-2.5 stroke-[3px]"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-1.5 gap-y-0.5",children:[e.jsx("span",{className:"text-xs font-semibold text-white",children:Jt?"Removed vote on":dt?`Downvoted (${kt}%)`:`Upvoted (${kt}%)`}),e.jsx("span",{className:"text-xs text-[var(--hrk-text-tertiary)]",children:"post by"}),e.jsxs(ai,{href:jt?.(ae.author||""),onActivate:()=>Fe?.(ae.author||""),className:"text-xs font-medium text-blue-400 hover:underline",children:["@",ae.author]})]}),e.jsx("p",{className:"text-sm font-medium text-white truncate mt-1",children:ae.permlink}),e.jsxs("div",{className:"flex items-center gap-1 mt-1 text-xs text-[var(--hrk-text-tertiary)]",children:[e.jsx(X.Clock,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:Ul.getRelativeTime(ae.timestamp+"Z")})]})]})]})},`${ae.id}-${qe}`)})}),Pi=()=>{if(kr)return e.jsxs("div",{className:"max-w-lg mx-auto space-y-6 animate-pulse",children:[[1,2,3].map(On=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-32"}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded-full w-full"})]},On)),e.jsxs("div",{className:"mt-4 p-4 bg-[var(--hrk-bg-surface)] rounded-xl border border-[var(--hrk-border-subtle)]",children:[e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-40 mb-3"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded-full w-full"})]})]});if(!Gt)return e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.Gauge,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.votingPowerUnavailable")})]});const{maxMana:ae,rewardBalance:qe,recentClaims:dt,feedPrice:Jt}=Gt,kt=Jr,Er=300*60*24,ma=ae*(kt/100)*.02,ns=dt>0?ma/dt*qe:0,Ha=ns*Jt,Mn=(100-kt)/100*Er,Fa=On=>{if(On<=0)return Nt("common.fullyCharged");const fs=Math.floor(On/86400),Es=Math.floor(On%86400/3600),is=Math.floor(On%3600/60);return fs>0?`Full in ${fs} day${fs>1?"s":""} ${Es} hour${Es!==1?"s":""} ${is} minute${is!==1?"s":""}`:Es>0?`Full in ${Es} hour${Es!==1?"s":""} ${is} minute${is!==1?"s":""}`:`Full in ${is} minute${is!==1?"s":""}`},Wn=(On,fs=2)=>isNaN(On)?"—":On.toLocaleString(void 0,{minimumFractionDigits:fs,maximumFractionDigits:fs}),fa=[{label:Nt("vp.upvotePower"),value:Gt.upvotePower,color:"var(--hrk-success)"},{label:Nt("vp.downvotePower"),value:Gt.downvotePower,color:"var(--hrk-warning)"},{label:Nt("vp.resourceCredits"),value:Gt.resourceCredits,color:"var(--hrk-info)"}];return e.jsxs("div",{className:"max-w-lg mx-auto space-y-6",children:[e.jsxs("div",{className:"p-5 rounded-xl bg-[var(--hrk-bg-surface)] border border-[var(--hrk-border-subtle)] flex flex-col items-center",children:[e.jsxs("div",{className:"inline-flex flex-col items-center px-5 py-2.5 rounded-full bg-blue-600/20 border border-blue-500/40 mb-5",children:[e.jsxs("span",{className:"text-sm sm:text-base font-bold text-white tracking-wide",children:["VOTE VALUE: ",e.jsxs("span",{className:"text-blue-400",children:["$",Wn(Ha)]}),e.jsxs("span",{className:"text-[var(--hrk-text-tertiary)] ml-1.5",children:["(",kt.toFixed(2),"%)"]})]}),e.jsxs("span",{className:"text-xs text-[var(--hrk-text-tertiary)] mt-1",children:[e.jsxs("span",{className:"text-white font-medium",children:[Wn(Ha)," HBD"]}),e.jsx("span",{className:"mx-1.5",children:"·"}),e.jsxs("span",{className:"text-[var(--hrk-text-secondary)]",children:["~",Wn(ns,3)," HIVE"]})]})]}),e.jsxs("div",{className:"w-full flex items-center gap-3",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--hrk-text-tertiary)] whitespace-nowrap",children:"0%"}),e.jsx("input",{type:"range",min:0,max:100,step:.01,value:kt,onChange:On=>Ba(Number(On.target.value)),className:"flex-1 h-2.5 rounded-full appearance-none cursor-pointer [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-blue-500 [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg [&::-webkit-slider-thumb]:-mt-1 [&::-moz-range-thumb]:w-5 [&::-moz-range-thumb]:h-5 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-blue-500 [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-white",style:{background:`linear-gradient(to right, var(--hrk-info) 0%, var(--hrk-info) ${kt}%, var(--hrk-border-default) ${kt}%, var(--hrk-border-default) 100%)`}}),e.jsx("span",{className:"text-xs font-medium text-[var(--hrk-text-tertiary)] whitespace-nowrap",children:"100%"})]}),e.jsx("p",{className:"mt-3 text-sm text-[var(--hrk-text-tertiary)]",children:Fa(Mn)})]}),fa.map(On=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-[var(--hrk-text-secondary)]",children:On.label}),e.jsxs("span",{className:"text-sm font-bold text-white",children:[On.value.toFixed(2),"%"]})]}),e.jsx("div",{className:"w-full bg-[var(--hrk-bg-surface-raised)] rounded-full h-3",children:e.jsx("div",{className:"h-3 rounded-full transition-all duration-500 ease-out",style:{width:`${Math.min(On.value,100)}%`,backgroundColor:On.color}})})]},On.label))]})},Rs=ae=>`inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-all ${ae?"bg-[var(--hrk-brand)] text-white shadow-sm":"text-[var(--hrk-text-secondary)] hover:bg-[var(--hrk-bg-surface-raised)] hover:text-[var(--hrk-text-primary)]"}`,ui=(ae,qe)=>e.jsxs("div",{className:"flex items-center justify-between mb-3 w-full",children:[e.jsx("div",{className:"inline-flex rounded-lg border border-[var(--hrk-border-default)] bg-[var(--hrk-bg-surface)] p-0.5 gap-0.5",children:ae}),qe]}),Ls=()=>{if(vr==="growth")return e.jsx(PC,{username:ut});if(vr==="wallet")return e.jsxs("div",{className:"w-full space-y-2",children:[ui(e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:()=>sr("wallet"),className:Rs(ot==="wallet"),children:[e.jsx(X.Wallet,{className:"h-4 w-4"}),Nt("tab.wallet")||"Wallet"]}),ea&&e.jsxs("button",{type:"button",onClick:()=>sr("tokens"),className:Rs(ot==="tokens"),children:[e.jsx(X.Coins,{className:"h-4 w-4"}),Nt("tab.engineTokens")||"Tokens"]}),e.jsxs("button",{type:"button",onClick:()=>sr("votingPower"),className:Rs(ot==="votingPower"),children:[e.jsx(X.Gauge,{className:"h-4 w-4"}),Nt("tab.votingPower")||"Voting Power"]})]})),ot==="tokens"&&ea?ea(ut,ut===o):ot==="votingPower"?Pi():e.jsx(XT,{username:ut,currentUsername:o,scrollRootRef:or,onUpdateRcDelegation:Oe,onDeleteRcDelegation:Se,onCreateHpDelegation:me,onCreateRcDelegation:ie,onTransfer:ye,onPowerUp:Ee,onPowerDown:Ie,onTransferToSavings:ge,onTransferFromSavings:rt,onStopPowerDown:Le,onCancelSavingsWithdrawal:ue,onClaimRewards:He})]});if(vr==="activities"){const ae=()=>{Ta(dt=>dt+1)},qe=Ae==="curation"&&e.jsx("button",{type:"button",onClick:ae,disabled:kr,className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] px-3 py-1.5 text-xs font-medium text-[var(--hrk-text-secondary)] hover:bg-[var(--hrk-bg-surface-raised)] hover:text-[var(--hrk-text-primary)] disabled:opacity-50 transition-colors focus:outline-none cursor-pointer",title:"Refresh",children:e.jsx(X.RefreshCw,{className:`h-3.5 w-3.5 ${kr?"animate-spin":""}`})});return e.jsxs("div",{className:"w-full space-y-2",children:[ui(e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>sr("activities"),className:Rs(Ae==="activities"),children:Nt("tab.activities")||"Activities"}),e.jsx("button",{type:"button",onClick:()=>sr("curation"),className:Rs(Ae==="curation"),children:Nt("tab.curation")||"Curation"})]}),qe),Ae==="activities"?e.jsx(NC,{username:ut,onClickPermlink:ar,onSelectActivity:hr,scrollRootRef:or}):Gl()]})}if(vr==="rewards")return e.jsxs("div",{className:"w-full space-y-2",children:[ui(e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>sr("authorRewards"),className:Rs(da==="authorRewards"),children:Nt("tab.authorRewards")||"Author Rewards"}),e.jsx("button",{type:"button",onClick:()=>sr("curationRewards"),className:Rs(da==="curationRewards"),children:Nt("tab.curationRewards")||"Curation Rewards"})]})),kr?Qr():da==="authorRewards"?Dn():zi()]});if(vr==="followers")return e.jsxs("div",{className:"w-full space-y-2",children:[ui(e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:()=>sr("followers"),className:Rs(dr==="followers"),children:[Nt("tab.followers")||"Followers"," (",nr.followersCount,")"]}),e.jsxs("button",{type:"button",onClick:()=>sr("following"),className:Rs(dr==="following"),children:[Nt("tab.following")||"Following"," (",nr.followingCount,")"]})]})),kr?Cr():(dr==="followers"?lr:rr).length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.Users,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:dr==="followers"?Nt("empty.noFollowers")||"No followers yet.":Nt("empty.notFollowing")||"Not following anyone yet."})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-3",children:dr==="followers"?lr.map((ae,qe)=>we(ae.follower,qe)):rr.map((ae,qe)=>we(ae.following,qe))})]});if(vr==="posts"){const ae=Rt==="blogs"?ss:Li,qe=Rt==="blogs"?"blog":"post";return e.jsxs("div",{className:"w-full space-y-2",children:[ui(e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>sr("blogs"),className:Rs(Rt==="blogs"),children:Nt("tab.blogs")||"Blogs"}),e.jsx("button",{type:"button",onClick:()=>sr("posts"),className:Rs(Rt==="posts"),children:Nt("tab.posts")||"Posts"})]})),kr?yr():ae.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.FileText,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt(Rt==="blogs"?"empty.noBlogs":"empty.noPosts")})]}):e.jsx("div",{className:"space-y-3",children:ae.map(dt=>$n(dt,qe,Ye?()=>Ye(dt.author,dt.permlink,dt.title):void 0))})]})}if(vr==="replies"){const ae=Ar==="comments"?Xn:bl,qe=Ar==="comments"?"comment":"reply";return e.jsxs("div",{className:"w-full space-y-2",children:[ui(e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>sr("comments"),className:Rs(Ar==="comments"),children:Nt("tab.comments")||"Comments"}),e.jsx("button",{type:"button",onClick:()=>sr("replies"),className:Rs(Ar==="replies"),children:Nt("tab.replies")||"Replies"})]})),kr?yr():ae.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.MessageCircle,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt(Ar==="comments"?"empty.noComments":"empty.noReplies")})]}):e.jsx("div",{className:"space-y-3",children:ae.map(dt=>$n(dt,qe,void 0))})]})}return vr==="polls"?kr?Tr():Zi.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.BarChart3,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.noPolls")})]}):e.jsx("div",{className:"space-y-3",children:Zi.map(ae=>e.jsx(qC,{poll:ae,currentUsername:o,onVotePoll:ve,onPollClick:Ht,onUpvote:H,onSubmitComment:z,onClickCommentUpvote:A,onReblog:q,isPostReblogged:F,onCheckReblogged:I,onTip:Y,onSharePost:Ft,onCommentClick:Xe,onRequestReportPost:Z?(qe,dt)=>js({author:qe,permlink:dt}):void 0,onUserClick:Fe,ecencyToken:g,threeSpeakApiKey:x,giphyApiKey:y,templateToken:b,templateApiBaseUrl:w,defaultVotePercent:Lt,voteWeightStep:Zt,allowLandscapeVideos:Vr},`${ae.author}/${ae.permlink}`))}):vr==="badges"?kr?Cr():Sr.length===0&&hn.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.Award,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.noBadges")})]}):e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-white mb-3 tracking-wide uppercase opacity-90",children:"Community Badges"}),Sr.length===0?e.jsx("p",{className:"text-xs text-[var(--hrk-text-tertiary)] italic",children:"No community badges assigned"}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-3",children:ja.length>0?ja.map((ae,qe)=>tt(ae,qe)):Sr.map((ae,qe)=>we(ae,qe))})]}),e.jsxs("div",{className:"border-t border-[var(--hrk-border-subtle)] pt-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-white tracking-wide uppercase opacity-90",children:"HiveBuzz Badges"}),e.jsx("a",{href:`https://hivebuzz.me/@${ut}`,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-blue-400 hover:underline uppercase tracking-wider font-semibold",children:"powered by hivebuzz"})]}),hn.length===0?e.jsx("p",{className:"text-xs text-[var(--hrk-text-tertiary)] italic",children:"No HiveBuzz badges earned yet"}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",children:hn.map((ae,qe)=>Yt(ae,qe))})]})]}):vr==="witnessVotes"?kr?Cr():Te.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(X.Shield,{className:"h-12 w-12 text-[var(--hrk-text-tertiary)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--hrk-text-tertiary)]",children:Nt("empty.noWitnessVotes")})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-3",children:Te.map((ae,qe)=>we(ae,qe))}):vr==="snaps"?e.jsx("div",{className:"h-[calc(100vh-260px)] min-h-[420px]",children:e.jsx(vU,{username:ut,currentUsername:o,reportedPosts:v,reportedAuthors:N,onUpvote:H,onSubmitComment:z,onClickCommentUpvote:A,onReblog:q,isPostReblogged:F,onCheckReblogged:I,onTip:Y,onSharePost:Ft,onCommentClick:Xe,onClickCommentIcon:Ct,onClickCommentCount:pt,onUserClick:Fe,onPostClick:mt?(ae,qe)=>mt(ae,qe):Ye?(ae,qe,dt)=>Ye(ae,qe,dt??""):void 0,onReportPost:Z?(ae,qe)=>js({author:ae,permlink:qe}):void 0,onDeletePost:W,isCurator:se,onCurationRequest:xe?(ae,qe,dt,Jt)=>xe(ae,qe,dt,"snap",Jt):void 0,onFetchCurationStatus:be,onVotePoll:ve,onEditSnap:We,getPostUrl:Mr,getUserUrl:jt,getTagUrl:Et,getCommunityUrl:br,ecencyToken:g,threeSpeakApiKey:x,giphyApiKey:y,templateToken:b,templateApiBaseUrl:w,defaultVotePercent:Lt,voteWeightStep:Zt,allowLandscapeVideos:Vr,awaitingWalletApproval:pa,renderHeaderActions:Kr},ut)}):null},vi=[{id:"posts",label:Nt("tab.posts")||"Posts",icon:X.FileText},{id:"snaps",label:Nt("tab.snaps"),icon:X.Camera},{id:"polls",label:Nt("tab.polls"),icon:X.BarChart3},{id:"replies",label:Nt("tab.replies")||"Replies",icon:X.Reply},{id:"activities",label:Nt("tab.activities")||"Activities",icon:X.Activity},{id:"rewards",label:Nt("tab.rewards")||"Rewards",icon:X.Award},{id:"growth",label:Nt("tab.growth"),icon:X.TrendingUp},{id:"followers",label:Nt("tab.followers")||"Followers",icon:X.Users},{id:"wallet",label:Nt("tab.wallet"),icon:X.Wallet},{id:"badges",label:Nt("tab.badges"),icon:X.Award},{id:"witnessVotes",label:Nt("tab.witnessVotes"),icon:X.Shield}],Zl=h&&h.length>0?Array.from(new Set(h.map(ae=>Rr(ae)))):void 0,Yl=Zl?Zl.map(ae=>vi.find(qe=>qe.id===ae)).filter(ae=>ae!==void 0):vi,Yi=o&&o!==ut;return e.jsx("div",{className:"dark flex flex-col h-full bg-[var(--hrk-bg-app)]",children:e.jsxs("div",{ref:or,className:"flex flex-col overflow-y-auto h-full scrollbar-hide",children:[e.jsx("div",{className:"sticky top-0 z-30 h-[calc(56px+env(safe-area-inset-top))] pt-[env(safe-area-inset-top)] bg-[var(--hrk-bg-surface)]/95 backdrop-blur-sm border-b border-[var(--hrk-border-subtle)] flex items-center",children:e.jsxs("div",{className:"px-4 py-2 flex items-center gap-2 w-full",children:[u&&e.jsx("button",{onClick:u,"aria-label":"Open menu",className:"p-1.5 hover:bg-[var(--hrk-bg-surface-raised)] rounded-lg transition-colors flex-shrink-0",children:e.jsx(X.Menu,{className:"h-5 w-5 text-[var(--hrk-text-secondary)]"})}),f&&l&&e.jsx("button",{onClick:l,className:"p-1.5 hover:bg-[var(--hrk-bg-surface-raised)] rounded-lg transition-colors flex-shrink-0",children:e.jsx(X.ArrowLeft,{className:"h-5 w-5 text-[var(--hrk-text-secondary)]"})}),e.jsx("img",{src:nr.profileImage||`https://images.hive.blog/u/${ut}/avatar`,alt:ut,className:"w-8 h-8 rounded-full flex-shrink-0 bg-[var(--hrk-bg-surface-raised)] object-cover",onError:ae=>{ae.target.src=`https://images.hive.blog/u/${ut}/avatar`}}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("h1",{className:"text-sm font-semibold text-white truncate",children:`@${ut}`})})}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[ze&&e.jsxs("button",{onClick:Ss,className:"p-2 bg-black/40 hover:bg-black/60 rounded-full transition-colors relative",title:"Favourite list",children:[e.jsx(X.Heart,{className:`h-4 w-4 ${At?"text-red-500":"text-white"}`,fill:At?"currentColor":"none"}),st>0&&e.jsx("span",{className:"absolute -top-1 -right-1 bg-red-500 text-white text-[10px] rounded-full h-4 w-4 flex items-center justify-center",children:st>99?"99+":st})]}),e.jsxs("div",{className:"relative",ref:ro,children:[e.jsx("button",{onClick:()=>tn(ae=>!ae),className:"p-2 bg-black/40 hover:bg-black/60 rounded-full transition-colors",title:"More actions",children:e.jsx(X.MoreVertical,{className:"h-4 w-4 text-white"})}),Za&&e.jsxs("div",{className:"absolute right-0 mt-1 w-48 rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] shadow-xl z-[100]",onClick:ae=>ae.stopPropagation(),children:[Yi&&(C||R)&&e.jsx("button",{onClick:()=>{tn(!1),Il()},disabled:za,className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)] disabled:opacity-50",children:e.jsxs("span",{className:"flex items-center gap-2",children:[nr.isFollowing?e.jsx(X.UserMinus,{className:"h-4 w-4 text-red-400"}):e.jsx(X.UserPlus,{className:"h-4 w-4 text-green-400"}),nr.isFollowing?Nt("action.unfollow"):Nt("action.follow")]})}),de&&e.jsx("button",{onClick:()=>{tn(!1),de(ut)},"aria-pressed":fe,className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)]",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(X.Bookmark,{className:`h-4 w-4 ${fe?"fill-current text-[var(--hrk-brand)]":"text-[var(--hrk-text-tertiary)]"}`}),fe?"Remove bookmark":"Bookmark user"]})}),Yi&&(P||$)&&e.jsx("button",{onClick:()=>{tn(!1),Do()},disabled:za||(nr.isMuted?!$:!P),className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)] disabled:opacity-50",children:e.jsxs("span",{className:"flex items-center gap-2",children:[nr.isMuted?e.jsx(X.Volume2,{className:"h-4 w-4 text-emerald-400"}):e.jsx(X.VolumeX,{className:"h-4 w-4 text-red-400"}),nr.isMuted?Nt("action.unmute"):Nt("action.mute")]})}),Yi&&M&&e.jsx("button",{onClick:()=>{tn(!1),ms(!0)},disabled:za,className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-gray-700disabled:opacity-50",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(X.Ban,{className:"h-4 w-4 text-red-400"})," ",Nt("action.ignoreAuthor")]})}),Yi&&E&&e.jsx("button",{onClick:()=>{tn(!1),To(!0)},disabled:za,className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-gray-700disabled:opacity-50 last:rounded-b-lg",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(X.Flag,{className:"h-4 w-4 text-orange-400"})," ",Nt("action.reportUser")]})}),e.jsx("button",{onClick:()=>{tn(!1),Ou()},className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)] first:rounded-t-lg",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(X.Share2,{className:"h-4 w-4 text-blue-400"})," ",Nt("action.shareProfile")]})}),Da&&_e&&e.jsx("button",{onClick:()=>{tn(!1),_e()},className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)]",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(X.Key,{className:"h-4 w-4 text-amber-400"})," Posting Authority"]})}),Da&&oe&&e.jsx("button",{onClick:()=>{tn(!1),oe()},className:"w-full px-4 py-2.5 text-left text-sm text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)] last:rounded-b-lg",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(X.Pencil,{className:"h-4 w-4 text-emerald-400"})," Edit Profile"]})})]})]}),d&&e.jsxs("button",{onClick:d,className:"p-1.5 hover:bg-[var(--hrk-bg-surface-raised)] rounded-full transition-colors flex-shrink-0","aria-label":"Open user menu",children:[o?e.jsx("img",{src:`https://images.hive.blog/u/${o}/avatar`,alt:o,className:"h-6 w-6 rounded-full object-cover",onError:ae=>{ae.currentTarget.style.display="none";const qe=ae.currentTarget.nextSibling;qe&&(qe.style.display="block")}}):null,e.jsx(X.User,{className:"h-5 w-5 text-[var(--hrk-text-secondary)]",style:{display:o?"none":"block"}})]})]})]})}),e.jsxs("div",{className:"relative",children:[nr.coverImage?e.jsx("div",{className:`w-full bg-cover bg-center sm:h-52 md:h-60 ${(nr.about?.length??0)>50?"h-52":"h-44"}`,style:{backgroundImage:`url(${nr.coverImage})`}}):e.jsx("div",{className:`w-full bg-gradient-to-r from-blue-600 to-purple-700 sm:h-52 md:h-60 ${(nr.about?.length??0)>50?"h-52":"h-44"}`}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-gray-900 via-gray-900/60 to-transparent"}),Je&&e.jsx("button",{onClick:Ru,className:"absolute top-3 right-3 p-2 bg-black/40 hover:bg-black/60 rounded-full transition-colors z-10",title:At?"Remove from favourites":"Add to favourites",children:e.jsx(X.Heart,{className:`h-5 w-5 ${At?"text-red-500":"text-white"}`,fill:At?"currentColor":"none"})}),e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 px-4 sm:px-6 pb-4",children:[e.jsxs("div",{className:"flex items-end gap-3 sm:gap-4",children:[Da&&oe?e.jsxs("button",{type:"button",onClick:oe,"aria-label":"Edit profile",className:"group relative flex-shrink-0 rounded-full focus:outline-none focus:ring-2 focus:ring-white/60",children:[e.jsx("img",{src:nr.profileImage||`https://images.hive.blog/u/${ut}/avatar`,alt:ut,className:"w-16 h-16 sm:w-20 sm:h-20 md:w-24 md:h-24 rounded-full border-3 sm:border-4 border-gray-900 bg-[var(--hrk-bg-surface-raised)] object-cover",onError:ae=>{ae.target.src=`https://images.hive.blog/u/${ut}/avatar`}}),e.jsx("span",{className:"pointer-events-none absolute inset-0 flex items-center justify-center rounded-full bg-black/0 text-white opacity-0 transition-all duration-150 group-hover:bg-black/55 group-hover:opacity-100 group-focus:bg-black/55 group-focus:opacity-100",children:e.jsx(X.Pencil,{className:"h-5 w-5 sm:h-6 sm:w-6"})}),e.jsx("span",{className:"pointer-events-none absolute -bottom-0.5 -right-0.5 flex h-6 w-6 items-center justify-center rounded-full border-2 border-gray-900 bg-[var(--hrk-brand)] text-white shadow-md sm:h-7 sm:w-7","aria-hidden":!0,children:e.jsx(X.Pencil,{className:"h-3 w-3 sm:h-3.5 sm:w-3.5"})})]}):e.jsx("img",{src:nr.profileImage||`https://images.hive.blog/u/${ut}/avatar`,alt:ut,className:"w-16 h-16 sm:w-20 sm:h-20 md:w-24 md:h-24 rounded-full border-3 sm:border-4 border-gray-900 bg-[var(--hrk-bg-surface-raised)] object-cover flex-shrink-0",onError:ae=>{ae.target.src=`https://images.hive.blog/u/${ut}/avatar`}}),e.jsxs("div",{className:"flex-1 min-w-0 pb-0.5",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("h2",{className:"min-w-0 text-base sm:text-lg md:text-xl font-bold text-white drop-shadow-md flex items-center gap-1.5 flex-wrap",children:[e.jsx("span",{className:"truncate max-w-[150px] sm:max-w-[250px] md:max-w-[350px] inline-block",children:nr.name||ut}),nr.reputation!==void 0&&e.jsxs("div",{className:"relative group inline-flex shrink-0",children:[e.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-semibold rounded bg-gray-700/80 hover:bg-gray-700 text-white/95 border border-gray-600/50 cursor-pointer shrink-0 shadow-sm",style:{minWidth:"24px"},children:jw(nr.reputation).score}),e.jsxs("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2.5 py-1 text-[10px] font-medium text-white bg-black border border-neutral-800 rounded-full shadow-xl opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto transition-opacity duration-150 z-50 whitespace-nowrap after:content-[''] after:absolute after:top-full after:left-1/2 after:-translate-x-1/2 after:border-[4px] after:border-transparent after:border-t-black",children:["Reputation: ",jw(nr.reputation).formatted]})]}),e.jsxs("span",{className:"text-xs sm:text-sm font-normal text-[var(--hrk-text-secondary)]",children:[" (@",ut,")"]})]}),(Ga.twitter||Ga.reddit)&&e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[Ga.twitter&&e.jsx("a",{href:"https://hiveposh.com/",target:"_blank",rel:"noopener noreferrer",title:`X / Twitter: @${Ga.twitter}`,"aria-label":"X / Twitter (via HivePosh)",className:"flex h-6 w-6 items-center justify-center rounded-full bg-black/40 text-white transition-colors hover:bg-black/60",children:e.jsx("svg",{viewBox:"0 0 24 24",className:"h-3 w-3",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}),Ga.reddit&&e.jsx("a",{href:"https://hiveposh.com/",target:"_blank",rel:"noopener noreferrer",title:`Reddit: u/${Ga.reddit}`,"aria-label":"Reddit (via HivePosh)",className:"flex h-6 w-6 items-center justify-center rounded-full bg-[#ff4500] text-white transition-colors hover:opacity-90",children:e.jsx("svg",{viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0zm4.388 8.74c.654 0 1.184.53 1.184 1.184a1.18 1.18 0 0 1-.582 1.018c.012.092.018.185.018.28 0 1.83-2.143 3.314-4.788 3.314s-4.788-1.484-4.788-3.314c0-.094.006-.187.017-.278a1.18 1.18 0 0 1-.585-1.02 1.184 1.184 0 0 1 2.006-.852 5.86 5.86 0 0 1 3.184-1.008l.605-2.842a.26.26 0 0 1 .31-.2l2.005.426a.842.842 0 1 1-.087.41l-1.793-.382-.54 2.55a5.86 5.86 0 0 1 3.135 1.012 1.18 1.18 0 0 1 .963-.498zM9.747 11.84a.842.842 0 1 0 1.684 0 .842.842 0 0 0-1.684 0zm5.265.842a.842.842 0 1 0 0-1.684.842.842 0 0 0 0 1.684zm-.585 1.795a.26.26 0 0 0-.366.003c-.397.397-1.214.537-1.94.537s-1.543-.14-1.94-.537a.26.26 0 0 0-.367.367c.61.61 1.737.69 2.307.69s1.697-.08 2.307-.69a.26.26 0 0 0 .005-.366z"})})})]})]}),nr.about&&e.jsx("p",{className:"text-[var(--hrk-text-primary)] text-xs sm:text-sm leading-relaxed mt-1 line-clamp-2 drop-shadow-md",children:nr.about}),nr.location&&e.jsxs("span",{className:"flex items-center gap-1 text-[var(--hrk-text-secondary)] text-xs mt-1 drop-shadow-md whitespace-nowrap",children:[e.jsx(X.MapPin,{className:"h-3 w-3 text-rose-400 flex-shrink-0"})," ",nr.location.replace(/[\r\n]+/g," ").replace(/\s+/g," ").trim()]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1 mt-2 text-[11px] sm:text-xs text-[var(--hrk-text-primary)]",children:[nr.website&&e.jsxs("a",{href:nr.website.startsWith("http")?nr.website:`https://${nr.website}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-blue-300 hover:underline drop-shadow-md",children:[e.jsx(X.Globe,{className:"h-3 w-3 text-blue-400"})," ",nr.website]}),nr.created&&e.jsxs("span",{className:"flex items-center gap-1 drop-shadow-md",children:[e.jsx(X.Calendar,{className:"h-3 w-3 text-green-400"})," ",yU(nr.created)]}),nr.lastActivity&&e.jsxs("span",{className:"flex items-center gap-1 drop-shadow-md",children:[e.jsx(X.Clock,{className:"h-3 w-3 text-amber-400"})," ",cA(nr.lastActivity)]}),nr.votingPower!==void 0&&e.jsxs("span",{className:"flex items-center gap-1 drop-shadow-md",children:[e.jsx(X.Zap,{className:"h-3 w-3 text-yellow-400"})," VP ",nr.votingPower.toFixed(1),"%"]}),nr.hivePower!==void 0&&e.jsxs("span",{className:"flex items-center gap-1 drop-shadow-md",children:[e.jsx(X.Zap,{className:"h-3 w-3 text-orange-400"})," HP ",nr.hivePower.toFixed(0)]}),e.jsx($C,{username:ut,hideWhileLoading:!0})]}),e.jsxs("div",{className:"flex items-center gap-4 mt-2 text-[11px] sm:text-xs text-[var(--hrk-text-primary)]",children:[e.jsxs("button",{onClick:()=>sr("followers"),className:"hover:text-[var(--hrk-text-primary)] transition-colors drop-shadow-md",children:[e.jsx("span",{className:"font-semibold",children:nr.followersCount.toLocaleString()})," ",Nt("meta.followers")]}),e.jsxs("button",{onClick:()=>sr("following"),className:"hover:text-[var(--hrk-text-primary)] transition-colors drop-shadow-md",children:[e.jsx("span",{className:"font-semibold",children:nr.followingCount.toLocaleString()})," ",Nt("meta.following")]}),e.jsxs("span",{className:"drop-shadow-md",children:[e.jsx("span",{className:"font-semibold",children:nr.postsCount.toLocaleString()})," ",Nt("meta.posts")]})]})]})]}),e.jsxs("div",{className:"sticky top-[calc(56px+env(safe-area-inset-top))] z-20 bg-[var(--hrk-bg-surface)] border-b border-[var(--hrk-border-subtle)] relative flex items-center",children:[e.jsx("button",{onClick:()=>aa("left"),className:`absolute left-0 z-10 h-full px-2 bg-[var(--hrk-bg-surface-raised)] hover:bg-[var(--hrk-bg-hover)] flex items-center shadow-md transition-all ${gl?"opacity-100":"opacity-0 pointer-events-none"}`,children:e.jsx(X.ChevronLeft,{className:"h-4 w-4 text-white"})}),e.jsx("div",{ref:Vs,className:"flex overflow-x-auto scrollbar-hide px-1",children:Yl.map(ae=>{const qe=ae.icon;return e.jsxs("button",{onClick:()=>sr(ae.id),className:`flex items-center gap-1 px-3 sm:px-4 py-2.5 text-xs sm:text-sm font-medium whitespace-nowrap transition-colors border-b-2 ${vr===ae.id?"text-blue-400 border-blue-400":"text-[var(--hrk-text-tertiary)] border-transparent hover:text-[var(--hrk-text-secondary)] hover:border-[var(--hrk-border-default)]"}`,children:[e.jsx(qe,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:ae.label})]},ae.id)})}),e.jsx("button",{onClick:()=>aa("right"),className:`absolute right-0 z-10 h-full px-2 bg-[var(--hrk-bg-surface-raised)] hover:bg-[var(--hrk-bg-hover)] flex items-center shadow-md transition-all ${Ce?"opacity-100":"opacity-0 pointer-events-none"}`,children:e.jsx(X.ChevronRight,{className:"h-4 w-4 text-white"})})]}),e.jsxs("div",{className:"p-4 flex-1",children:[Ls(),vr!=="wallet"&&lt[vr]&&e.jsx("div",{ref:Wa,className:"min-h-[60px] py-2",children:fr?e.jsx("div",{className:"animate-pulse space-y-3",children:vr==="followers"||vr==="following"?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-3",children:[1,2].map(ae=>e.jsx("div",{className:"border border-[var(--hrk-border-subtle)] rounded-lg p-4 bg-[var(--hrk-bg-surface)]",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-[var(--hrk-bg-surface-raised)] rounded-full"}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-28"})]})},ae))}):e.jsx("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl p-4 border border-[var(--hrk-border-subtle)]",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-[var(--hrk-bg-surface-raised)] rounded-full flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-3.5 bg-[var(--hrk-bg-surface-raised)] rounded w-24 mb-2"}),e.jsx("div",{className:"h-4 bg-[var(--hrk-bg-surface-raised)] rounded w-3/4 mb-2"}),e.jsx("div",{className:"h-3 bg-[var(--hrk-bg-surface-raised)] rounded w-1/2"})]})]})})}):e.jsx("div",{className:"h-1"})})]},vr),Ja&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000] p-4",onClick:()=>ms(!1),children:e.jsxs("div",{className:"bg-[var(--hrk-bg-surface)] rounded-xl shadow-xl max-w-sm w-full border border-[var(--hrk-border-subtle)] p-6",onClick:ae=>ae.stopPropagation(),children:[e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:Nt("modal.ignoreAuthorTitle")}),e.jsx("p",{className:"text-sm text-[var(--hrk-text-secondary)] mb-6",children:Nt("modal.ignoreAuthorBody",{username:ut})}),e.jsxs("div",{className:"flex items-center justify-end gap-3",children:[e.jsx("button",{onClick:()=>ms(!1),disabled:za,className:"px-4 py-2 text-sm font-medium rounded-lg border border-[var(--hrk-border-default)] text-[var(--hrk-text-secondary)] hover:bg-[var(--hrk-bg-surface-raised)] disabled:opacity-50",children:Nt("action.cancel")}),e.jsx("button",{onClick:xi,disabled:za,className:"px-4 py-2 text-sm font-medium rounded-lg text-white bg-red-600 hover:bg-red-700 disabled:opacity-50",children:Nt(za?"action.processing":"action.confirmIgnore")})]})]})}),e.jsx(iA,{isOpen:qs,onClose:()=>To(!1),onReport:el,reportType:"user",targetUsername:ut}),e.jsx(iA,{isOpen:!!Kn,onClose:()=>js(null),onReport:async ae=>{if(Kn&&Z){await Z(Kn.author,Kn.permlink,ae);const qe=dt=>dt.author===Kn.author&&dt.permlink===Kn.permlink;Ur(dt=>dt.filter(Jt=>!qe(Jt))),Wr(dt=>dt.filter(Jt=>!qe(Jt))),yn(dt=>dt.filter(Jt=>!qe(Jt))),sn(dt=>dt.filter(Jt=>!qe(Jt))),Pn(dt=>dt.filter(Jt=>!qe(Jt)))}js(null)},reportType:"post",targetUsername:Kn?.author||"",targetPermlink:Kn?.permlink})]})})},kU=({media:a})=>{const[o,l]=T.useState(!1),u=T.useRef(null),d=a.kind+":"+("url"in a?a.url:a.id);return T.useEffect(()=>{l(!1);const f=u.current;f&&f.complete&&f.naturalWidth>0&&l(!0)},[d]),a.kind==="image"?e.jsxs(e.Fragment,{children:[!o&&e.jsx("span",{className:"absolute inset-0 z-10 flex items-center justify-center bg-black/20 pointer-events-none",children:e.jsx(X.Loader2,{className:"h-5 w-5 animate-spin text-white/80"})}),e.jsx("img",{ref:u,src:a.url,alt:"",className:"absolute inset-0 h-full w-full object-cover",onLoad:()=>l(!0),onError:f=>{l(!0),f.target.style.display="none"}})]}):a.kind==="youtube"?e.jsxs(e.Fragment,{children:[!o&&e.jsx("span",{className:"absolute inset-0 z-10 flex items-center justify-center bg-black/20 pointer-events-none",children:e.jsx(X.Loader2,{className:"h-5 w-5 animate-spin text-white/80"})}),e.jsx("img",{ref:u,src:`https://i.ytimg.com/vi/${a.id}/hqdefault.jpg`,alt:"",className:"absolute inset-0 h-full w-full object-cover opacity-90",onLoad:()=>l(!0),onError:f=>{l(!0),f.target.style.display="none"}}),e.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-black/70 text-white",children:e.jsx(X.Play,{className:"h-5 w-5 fill-current"})})}),e.jsx("span",{className:"absolute bottom-1.5 left-1.5 rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-medium text-white",children:"YouTube"})]}):a.kind==="threespeak"?e.jsxs("span",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 bg-[var(--hrk-bg-surface-sunken)]",children:[e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[var(--hrk-brand)]/15 text-[var(--hrk-brand)]",children:e.jsx(X.Play,{className:"h-5 w-5 fill-current"})}),e.jsx("span",{className:"rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-medium text-white",children:"3Speak"})]}):e.jsxs("span",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 bg-[var(--hrk-bg-surface-sunken)] text-white",children:[e.jsx("span",{className:"text-3xl font-semibold",children:"𝕏"}),e.jsx("span",{className:"rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-medium",children:"Tweet"})]})},jU=({media:a})=>{const[o,l]=T.useState(0),[u,d]=T.useState(null);if(a.length===0)return null;const f=Math.min(o,a.length-1),h=a[f],g=x=>{if(x.stopPropagation(),h.kind==="twitter"){window.open(h.url,"_blank","noopener,noreferrer");return}d(f)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative my-2 mr-2 h-20 w-28 flex-shrink-0 overflow-hidden rounded-lg bg-[var(--hrk-bg-surface-raised)] sm:my-3 sm:mr-3 sm:h-auto sm:w-32 sm:self-stretch md:w-40 lg:w-48",children:[e.jsx("button",{onClick:g,className:"absolute inset-0 block cursor-pointer","aria-label":"Open media preview",children:e.jsx(kU,{media:h})}),a.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:x=>{x.stopPropagation(),l(y=>(y-1+a.length)%a.length)},className:"absolute left-1 top-1/2 -translate-y-1/2 rounded-full bg-black/60 p-1 text-white hover:bg-black/80",title:"Previous",children:e.jsx(X.ChevronLeft,{className:"h-4 w-4"})}),e.jsx("button",{onClick:x=>{x.stopPropagation(),l(y=>(y+1)%a.length)},className:"absolute right-1 top-1/2 -translate-y-1/2 rounded-full bg-black/60 p-1 text-white hover:bg-black/80",title:"Next",children:e.jsx(X.ChevronRight,{className:"h-4 w-4"})}),e.jsxs("span",{className:"absolute bottom-1.5 right-1.5 rounded-full bg-black/60 px-1.5 py-0.5 text-[10px] font-medium text-white",children:[f+1,"/",a.length]})]})]}),u!==null&&e.jsx(iC,{items:a.filter(x=>x.kind!=="twitter"),startIndex:Math.min(u,Math.max(0,a.slice(0,u+1).filter(x=>x.kind!=="twitter").length-1)),onClose:()=>d(null)})]})},NU=a=>{window.open(a,"_blank")},SU=({app:a,backgroundColor:o,boxShadow:l})=>{const u=()=>{NU(a.url)};return e.jsx("div",{className:"card hover-lift cursor-pointer transition-all duration-300 h-full",onClick:u,style:{backgroundColor:o??"rgba(15,23,42,0.9)",boxShadow:l??"0 18px 45px rgba(0,0,0,0.6)",border:"1px solid rgba(148,163,184,0.25)"},children:e.jsx("div",{className:"card-body p-6",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"flex-shrink-0",children:a.useCircleBackground!==!1?e.jsx("div",{className:"avatar",children:e.jsx("div",{className:"w-16 h-16 rounded-full",children:e.jsx("img",{src:a.imagePath,alt:`${a.name} logo`,className:"w-full h-full object-cover",onError:d=>{d.currentTarget.src="/placeholder.svg"}})})}):e.jsx("img",{src:a.imagePath,alt:`${a.name} logo`,className:"w-16 h-16 object-contain",onError:d=>{d.currentTarget.src="/placeholder.svg"}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("h3",{className:"card-title text-lg font-bold text-base-content mb-2 line-clamp-2",children:a.name}),a.isComingSoon&&e.jsx("div",{className:"badge badge-warning badge-sm",children:"Coming Soon"})]}),e.jsx("div",{className:"text-base-content/70 text-sm leading-relaxed",children:a.description.split(`
1416
1416
  `).map((d,f)=>e.jsx("div",{className:"mb-1",children:d},f))})]})]})})})},EU=()=>{const[a,o]=T.useState({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0});T.useEffect(()=>{const f=()=>{o({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[]);const l=a.width<850,u=a.width<=1050&&a.width>=850,d=a.width>1050;return{isMobileView:l,isTabletView:u,isWebView:d,screenSize:a}},AU=({apps:a,cardBackgroundColor:o,cardShadow:l})=>{const{isMobileView:u,isTabletView:d}=EU(),f=()=>u?"grid-cols-1":d?"grid-cols-2":"grid-cols-3";return e.jsx("div",{className:"container mx-auto px-4 lg:px-16",children:e.jsx("div",{className:`grid ${f()} gap-6 lg:gap-8`,children:a.map((h,g)=>e.jsx(SU,{app:h,backgroundColor:o,boxShadow:l},g))})})},TU=[{imagePath:xn.hreplier,name:"hReplier",url:"https://hreplier.sagarkothari88.one/",description:`- Easily Manage your Hive Blog's replies
1417
1417
  - We are working on Hive Inbox as Key contributors`},{imagePath:xn.template,name:"hSnaps",url:"https://hsnaps.sagarkothari88.one/",description:`- A Snaps App for Hive Blockchain
1418
1418
  - We are working on Hive Snaps as Key contributors`},{imagePath:xn.hive_fest_fact_logo,name:"Hive Fest Fact",url:"https://hivefestfacts.sagarkothari88.one/",description:"- Hive Fest Facts is a platform dedicated to sharing interesting and informative facts about Hive Fest, the annual gathering of the Hive blockchain community."},{imagePath:xn.hpolls_logo,name:"hPolls",url:"https://hpolls.sagarkothari88.one/",description:`- Create and manage polls on the Hive blockchain
package/dist/index.esm.js CHANGED
@@ -86247,22 +86247,22 @@ const sH = ({
86247
86247
  /* @__PURE__ */ v("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-3", children: [
86248
86248
  /* @__PURE__ */ v("div", { className: "bg-black/30 rounded-lg p-2.5", children: [
86249
86249
  /* @__PURE__ */ n("p", { className: "text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider", children: Et("reward.posts") }),
86250
- /* @__PURE__ */ n("p", { className: "text-lg font-bold text-white", children: ae })
86250
+ /* @__PURE__ */ n("p", { className: "text-lg font-bold text-white notranslate", translate: "no", children: ae })
86251
86251
  ] }),
86252
86252
  /* @__PURE__ */ v("div", { className: "bg-black/30 rounded-lg p-2.5", children: [
86253
86253
  /* @__PURE__ */ n("p", { className: "text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider", children: Et("reward.comments") }),
86254
- /* @__PURE__ */ n("p", { className: "text-lg font-bold text-white", children: Ve })
86254
+ /* @__PURE__ */ n("p", { className: "text-lg font-bold text-white notranslate", translate: "no", children: Ve })
86255
86255
  ] }),
86256
86256
  /* @__PURE__ */ v("div", { className: "bg-black/30 rounded-lg p-2.5", children: [
86257
86257
  /* @__PURE__ */ n("p", { className: "text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider", children: Et("reward.totalHbd") }),
86258
- /* @__PURE__ */ v("p", { className: "text-lg font-bold text-amber-400", children: [
86258
+ /* @__PURE__ */ v("p", { className: "text-lg font-bold text-amber-400 notranslate", translate: "no", children: [
86259
86259
  "$",
86260
86260
  Cn(on.totalHbd)
86261
86261
  ] })
86262
86262
  ] }),
86263
86263
  /* @__PURE__ */ v("div", { className: "bg-black/30 rounded-lg p-2.5", children: [
86264
86264
  /* @__PURE__ */ n("p", { className: "text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider", children: Et("reward.totalHp") }),
86265
- /* @__PURE__ */ n("p", { className: "text-lg font-bold text-orange-400", children: Cn(on.totalHpEq) })
86265
+ /* @__PURE__ */ n("p", { className: "text-lg font-bold text-orange-400 notranslate", translate: "no", children: Cn(on.totalHpEq) })
86266
86266
  ] })
86267
86267
  ] })
86268
86268
  ] }),
@@ -86284,16 +86284,16 @@ const sH = ({
86284
86284
  "Payout in ",
86285
86285
  Bn(ft.payoutMs)
86286
86286
  ] }),
86287
- /* @__PURE__ */ v("span", { className: "text-amber-400 font-medium", children: [
86287
+ /* @__PURE__ */ v("span", { className: "text-amber-400 font-medium notranslate", translate: "no", children: [
86288
86288
  "$",
86289
86289
  Cn(ft.hbd),
86290
86290
  " HBD"
86291
86291
  ] }),
86292
- ft.hpEq !== null && /* @__PURE__ */ v("span", { className: "text-orange-400 font-medium", children: [
86292
+ ft.hpEq !== null && /* @__PURE__ */ v("span", { className: "text-orange-400 font-medium notranslate", translate: "no", children: [
86293
86293
  Cn(ft.hpEq),
86294
86294
  " HP"
86295
86295
  ] }),
86296
- ft.beneficiaryCut > 0 && /* @__PURE__ */ v("span", { className: "text-[var(--hrk-text-tertiary)]", children: [
86296
+ ft.beneficiaryCut > 0 && /* @__PURE__ */ v("span", { className: "text-[var(--hrk-text-tertiary)] notranslate", translate: "no", children: [
86297
86297
  "Beneficiary: ",
86298
86298
  (ft.beneficiaryCut * 100).toFixed(0),
86299
86299
  "%"
@@ -86333,26 +86333,26 @@ const sH = ({
86333
86333
  /* @__PURE__ */ v("div", { className: "grid grid-cols-2 sm:grid-cols-5 gap-3", children: [
86334
86334
  /* @__PURE__ */ v("div", { className: "bg-black/30 rounded-lg p-2.5", children: [
86335
86335
  /* @__PURE__ */ n("p", { className: "text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider", children: Et("reward.posts") }),
86336
- /* @__PURE__ */ n("p", { className: "text-lg font-bold text-white", children: ae })
86336
+ /* @__PURE__ */ n("p", { className: "text-lg font-bold text-white notranslate", translate: "no", children: ae })
86337
86337
  ] }),
86338
86338
  /* @__PURE__ */ v("div", { className: "bg-black/30 rounded-lg p-2.5", children: [
86339
86339
  /* @__PURE__ */ n("p", { className: "text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider", children: Et("reward.comments") }),
86340
- /* @__PURE__ */ n("p", { className: "text-lg font-bold text-white", children: Ve })
86340
+ /* @__PURE__ */ n("p", { className: "text-lg font-bold text-white notranslate", translate: "no", children: Ve })
86341
86341
  ] }),
86342
86342
  /* @__PURE__ */ v("div", { className: "bg-black/30 rounded-lg p-2.5", children: [
86343
86343
  /* @__PURE__ */ n("p", { className: "text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider", children: Et("reward.totalHp") }),
86344
- /* @__PURE__ */ n("p", { className: "text-lg font-bold text-blue-400", children: Cn(kt.totalHp) })
86344
+ /* @__PURE__ */ n("p", { className: "text-lg font-bold text-blue-400 notranslate", translate: "no", children: Cn(kt.totalHp) })
86345
86345
  ] }),
86346
86346
  /* @__PURE__ */ v("div", { className: "bg-black/30 rounded-lg p-2.5", children: [
86347
86347
  /* @__PURE__ */ n("p", { className: "text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider", children: Et("reward.totalHbd") }),
86348
- /* @__PURE__ */ v("p", { className: "text-lg font-bold text-purple-400", children: [
86348
+ /* @__PURE__ */ v("p", { className: "text-lg font-bold text-purple-400 notranslate", translate: "no", children: [
86349
86349
  "$",
86350
86350
  Cn(kt.totalHbd)
86351
86351
  ] })
86352
86352
  ] }),
86353
86353
  tr !== null && /* @__PURE__ */ v("div", { className: "bg-black/30 rounded-lg p-2.5", children: [
86354
86354
  /* @__PURE__ */ n("p", { className: "text-[10px] text-[var(--hrk-text-tertiary)] uppercase tracking-wider", children: Et("reward.avgEfficiency") }),
86355
- /* @__PURE__ */ v("p", { className: `text-lg font-bold ${tr >= 100 ? "text-emerald-400" : "text-amber-400"}`, children: [
86355
+ /* @__PURE__ */ v("p", { className: `text-lg font-bold notranslate ${tr >= 100 ? "text-emerald-400" : "text-amber-400"}`, translate: "no", children: [
86356
86356
  tr.toFixed(1),
86357
86357
  "%"
86358
86358
  ] })
@@ -86383,21 +86383,21 @@ const sH = ({
86383
86383
  "Payout in ",
86384
86384
  Bn(Nt.payoutMs)
86385
86385
  ] }),
86386
- /* @__PURE__ */ v("span", { className: "text-blue-400 font-medium", children: [
86386
+ /* @__PURE__ */ v("span", { className: "text-blue-400 font-medium notranslate", translate: "no", children: [
86387
86387
  Cn(Nt.hp),
86388
86388
  " HP"
86389
86389
  ] }),
86390
- /* @__PURE__ */ v("span", { className: "text-purple-400 font-medium", children: [
86390
+ /* @__PURE__ */ v("span", { className: "text-purple-400 font-medium notranslate", translate: "no", children: [
86391
86391
  "$",
86392
86392
  Cn(Nt.hbd),
86393
86393
  " HBD"
86394
86394
  ] }),
86395
- /* @__PURE__ */ v("span", { className: "text-[var(--hrk-text-tertiary)]", children: [
86395
+ /* @__PURE__ */ v("span", { className: "text-[var(--hrk-text-tertiary)] notranslate", translate: "no", children: [
86396
86396
  "Vote: ",
86397
86397
  Nt.weightPct.toFixed(2),
86398
86398
  "%"
86399
86399
  ] }),
86400
- Nt.efficiency !== null && /* @__PURE__ */ v("span", { className: `font-medium ${Nt.efficiency >= 100 ? "text-emerald-400" : "text-amber-400"}`, children: [
86400
+ Nt.efficiency !== null && /* @__PURE__ */ v("span", { className: `font-medium notranslate ${Nt.efficiency >= 100 ? "text-emerald-400" : "text-amber-400"}`, translate: "no", children: [
86401
86401
  "Eff: ",
86402
86402
  Nt.efficiency.toFixed(1),
86403
86403
  "%"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hive-react-kit",
3
3
  "private": false,
4
- "version": "1.12.11",
4
+ "version": "1.12.12",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.esm.js",