PageSourceSearch

https://viberank.dev/assets/AppCard-DykWQ6_P.js

js viberank.dev collected 2026-10-07 11:11:12 UTC 8,263 bytes, 7 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ConfirmDeleteModal-C8tDCxP_.js","assets/chunk-LFPYN7LY-0V9Ouenh.js","assets/alert-triangle-DOXEk0MB.js","assets/createLucideIcon-DydsfW6r.js","assets/x-TALoS3bc.js","assets/ReviewModal-G3HaWCWk.js","assets/ConfirmationModal-BhyA-fSc.js","assets/message-square-BjyX8d_g.js","assets/send-B_oRGAWA.js","assets/clock-DWYjczjl.js","assets/thumbs-up-DZ1rrSMn.js","assets/thumbs-down-Dy5CCAe9.js","assets/trash-2-Tn-IVTbe.js","assets/external-link-mgLIg5N3.js","assets/ShareAppModal-BoO6mMBw.js","assets/index-LH_zTLyb.js","assets/iconBase-Bvdjejg3.js","assets/index-DuC5hf20.js","assets/share-2-DT04EifQ.js","assets/check-D1j_YTXx.js","assets/copy-BzNkqadG.js"])))=>i.map(i=>d[i]);
2import{c as V,_ as x}from"./createLucideIcon-DydsfW6r.js";import{r as a,j as e}from"./chunk-LFPYN7LY-0V9Ouenh.js";import{C as N}from"./chevron-up-saOR8yxj.js";import{C}from"./chevron-down-YvvwCGMw.js";import{M as W}from"./message-square-BjyX8d_g.js";import{E as X}from"./external-link-mgLIg5N3.js";import{S as Y}from"./share-2-DT04EifQ.js";import{T as F}from"./trash-2-Tn-IVTbe.js";import{X as G}from"./x-TALoS3bc.js";/**
3 * @license lucide-react v0.344.0 - ISC
4 *
5 * This source code is licensed under the ISC license.
6 * See the LICENSE file in the root directory of this source tree.
7 */const J=V("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]),K=a.lazy(()=>x(()=>import("./ConfirmDeleteModal-C8tDCxP_.js"),__vite__mapDeps([0,1,2,3,4]))),Q=a.lazy(()=>x(()=>import("./ReviewModal-G3HaWCWk.js"),__vite__mapDeps([5,1,3,6,2,4,7,8,9,10,11,12,13]))),Z=a.lazy(()=>x(()=>import("./ShareAppModal-BoO6mMBw.js"),__vite__mapDeps([14,1,15,16,17,18,3,4,19,20]))),ce=({app:t,rank:o,timeFrame:_,className:z="",onVote:m,onDelete:D,onAddReview:B,userVote:r,isOwner:n,currentUser:i,onOpenLoginModal:h,onUpdateUserVibes:M,hideVoteCount:R=!1,hideVoteButtons:u=!1,alwaysShowActions:S=!1,hidePositionChange:f=!1,isSponsored:l=!1})=>{const[A,g]=a.useState(!1),[E,v]=a.useState(!1),[b,p]=a.useState(!1),[w,y]=a.useState(!1),[j,k]=a.useState(!1),P=a.useRef(null),I=t.upvotes-t.downvotes,d=()=>{switch(_){case"week":return t.positionChangeWeek??0;case"month":return t.positionChangeMonth??0;case"all-time":default:return t.positionChangeAllTime??0}},O=()=>{const s=new Date,c=new Date(t.dateAdded),q=Math.abs(s.getTime()-c.getTime());return Math.ceil(q/(1e3*60*60))<=24},$=()=>{const s=d();return s===0?"text-gray-400":s>0?"text-green-500":"text-red-500"},T=()=>{const s=d();return s===0?"—":s>0?`+${s}`:s.toString()},L=()=>{p(!0)},U=async()=>{await D(t.id)},H=()=>{y(!0)};return e.jsxs("div",{ref:P,className:`rounded-md p-2 mb-2 transition-all duration-200 relative h-[85px] ${l?"bg-gradient-to-br from-yellow-100 via-amber-100 to-yellow-200 dark:from-yellow-900/40 dark:via-amber-900/40 dark:to-yellow-800/40 border border-amber-400/70 dark:border-amber-500/60 shadow-lg shadow-yellow-500/20 dark:shadow-yellow-400/15 hover:shadow-yellow-500/30 dark:hover:shadow-yellow-400/20":"bg-white dark:bg-gray-800 shadow-sm hover:shadow-md"} ${z}`,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[e.jsxs("div",{className:"flex items-start h-full",children:[o>=0&&e.jsx("div",{className:`text-base font-semibold text-gray-700 dark:text-gray-300 mr-2 ${o>=1e3?"w-10":"w-6"}`,children:o}),e.jsxs("div",{className:"flex-shrink-0 relative",children:[e.jsx("div",{className:"relative w-8 h-8",children:e.jsx("img",{src:t.logo.replace("/storage/v1/object/public/","/storage/v1/render/image/public/")+"?width=64&height=64&quality=75",alt:`${t.name} logo`,className:"w-full h-full rounded object-cover",loading:"lazy"})}),t.videoUrl&&e.jsx("button",{onClick:()=>v(!0),className:"absolute top-0 right-0 -mt-1.5 -mr-1.5 bg-teal-500 hover:bg-teal-600 rounded-full p-0.5 text-white transition-colors shadow-md z-10","aria-label":"Play video",children:e.jsx(J,{size:8})})]}),e.jsxs("div",{className:"flex-grow min-w-0 ml-2 mr-8",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("a",{href:`/apps/${encodeURIComponent(t.name)}`,className:`font-medium text-sm text-gray-900 dark:text-white hover:text-teal-500 dark:hover:text-teal-400 truncate transition-colors ${l?"max-w-[65px] xl:max-w-[100px]":"max-w-[100px] xl:max-w-[160px]"}`,children:t.name}),l&&e.jsx("span",{className:"ml-1.5 px-1 py-0.5 text-[10px] font-semibold bg-gradient-to-r from-yellow-700 to-amber-700 text-white rounded flex-shrink-0 hidden xl:inline-flex shadow-sm",children:"SPONSOR"}),O()&&!l&&t.name.length<=15&&e.jsx("span",{className:"ml-1.5 px-1 py-0.5 text-[10px] font-semibold bg-teal-500 text-white rounded flex-shrink-0 hidden xl:inline-flex",children:"NEW"}),e.jsxs("div",{className:`ml-1.5 text-xs font-medium flex items-center ${$()} flex-shrink-0`,children:[(()=>{if(f)return null;const s=d();return s>0?e.jsx(N,{size:12}):s<0?e.jsx(C,{size:12}):null})(),!f&&e.jsx("span",{children:T()})]})]}),e.jsx("p",{className:"text-[11px] sm:text-xs text-gray-500 dark:text-gray-400 line-clamp-1 h-[14px] sm:h-[18px] mt-0.5 leading-tight",children:t.tagline}),e.jsx("div",{className:"mt-2.5 sm:mt-1.5 flex flex-wrap gap-0.5",children:t.tags.slice(0,2).map((s,c)=>e.jsx("span",{className:"inline-flex items-center px-1 text-[10.48px] bg-gray-200 dark:bg-gray-600 text-gray-500 dark:text-gray-300 rounded whitespace-nowrap leading-3",children:s},c))})]}),e.jsxs("div",{className:"flex flex-col items-center space-y-0.5 absolute right-2 top-2",children:[!u&&e.jsx("button",{onClick:()=>{i?m(t.id,r==="up"?null:"up"):h()},className:`p-0.5 rounded-full transition-colors ${r==="up"?"text-green-500 bg-green-50 dark:bg-green-900/30":"text-gray-400 hover:text-green-500 hover:bg-green-50 dark:hover:bg-green-900/30"}`,"aria-label":"Upvote",children:e.jsx(N,{size:16})}),!R&&e.jsx("span",{className:"text-xs font-medium text-gray-700 dark:text-gray-300",children:I}),!u&&e.jsx("button",{onClick:()=>{i?m(t.id,r==="down"?null:"down"):h()},className:`p-0.5 rounded-full transition-colors ${r==="down"?"text-red-500 bg-red-50 dark:bg-red-900/30":"text-gray-400 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/30"}`,"aria-label":"Downvote",children:e.jsx(C,{size:16})})]})]}),(S||A)&&e.jsxs("div",{className:"absolute top-1 right-8 flex items-center space-x-0.5",children:[e.jsxs("button",{onClick:H,className:"p-0.5 rounded-full text-gray-400 hover:text-blue-500 active:text-blue-600 transition-colors flex items-center touch-manipulation","aria-label":"Add review",children:[e.jsx(W,{size:14,className:"flex-shrink-0"}),(t.total_reviews??0)>0&&e.jsx("span",{className:"ml-0.5 text-[9px] font-medium bg-gray-100 dark:bg-gray-700 rounded-full px-1 py-0.5 leading-none",children:t.total_reviews})]}),e.jsx("a",{href:`/apps/${encodeURIComponent(t.name)}`,className:"p-0.5 rounded-full text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 active:text-gray-800 dark:active:text-gray-100 transition-colors touch-manipulation","aria-label":"View app details",children:e.jsx(X,{size:14})}),e.jsx("button",{onClick:()=>k(!0),className:"p-0.5 rounded-full text-gray-400 hover:text-teal-500 active:text-teal-600 transition-colors touch-manipulation","aria-label":"Share app",children:e.jsx(Y,{size:14})}),n&&e.jsx("button",{onClick:L,className:"p-0.5 rounded-full text-gray-400 hover:text-red-500 active:text-red-600 transition-colors touch-manipulation","aria-label":"Delete app",children:e.jsx(F,{size:14})})]}),e.jsxs(a.Suspense,{fallback:null,children:[n&&b&&e.jsx(K,{isOpen:b,onClose:()=>p(!1),onConfirm:U,appName:t.name}),w&&e.jsx(Q,{isOpen:w,onClose:()=>y(!1),app:t,currentUser:i,onUpdateUserVibes:M}),j&&e.jsx(Z,{isOpen:j,onClose:()=>k(!1),app:t,isOwner:n})]}),E&&t.videoUrl&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80",children:e.jsxs("div",{className:"relative w-full max-w-4xl bg-black rounded-lg overflow-hidden",children:[e.jsx("button",{onClick:()=>v(!1),className:"absolute top-2 right-2 text-white hover:text-gray-300 transition-colors z-10","aria-label":"Close video",children:e.jsx(G,{size:24})}),e.jsx("video",{src:t.videoUrl,controls:!0,className:"w-full aspect-video",autoPlay:!0,playsInl
7ine:!0,children:"Your browser does not support the video tag."})]})})]})};export{ce as A,J as P};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.