PageSourceSearch

https://static.alugha.com/assets/VideoCard-index-BJ8aUnmg.js

js alugha.com collected 2026-10-02 11:20:29 UTC 4,047 bytes, 1 lines download raw bytes

1import{p as P,r,H as a,gR as R,N as k,j as o,b9 as G,x as J,ak as K,q as Q,i as U,iR as X,dY as Z,z as l}from"./index-B-8CDiEL.js";import{a as ee}from"./VideoPageQuery-DhRteSV-.js";import{C as te}from"./Card-index-Z4ltd4kr.js";import{W as ne}from"./WatchlistMenu-index-B8cKkmnC.js";import{m as x,A as ie}from"./InfoBar-index-DialLV9J.js";import{I as se}from"./IconLock-Cid9l6sy.js";const S=a.div.withConfig({componentId:"sc-c27d221d-0"})(["width:30px;height:30px;border-radius:0.2em;display:flex;align-items:center;font-size:20px;justify-content:center;overflow:hidden;background-color:rgba(20,26,32,0.3);pointer-events:auto;",";> div{color:",";display:flex;margin:0;font-size:22px;}"],G(J(8)),t=>t.theme.colors.textPrimary),M=()=>null,oe=({state:t,type:e})=>{const i=P(),[c,d,u]=r.useMemo(()=>t===0?[S,se,e===R.VIDEO?i.formatMessage(x.privateVideo):i.formatMessage(x.privateImage)]:t===2?[S,k,i.formatMessage(x.unlistedVideo)]:[M,M,""],[i,t,e]);return o.jsx(c,{children:o.jsx(ie,{title:u,children:o.jsx(d,{})})})},re=a.div.withConfig({componentId:"sc-ed6399be-0"})(["pointer-events:none;width:100%;z-index:1;position:absolute;top:5px;",";height:30px;display:flex;justify-content:flex-end;"],t=>t.theme.dir==="rtl"?l(["left:5px;"]):l(["right:5px;"])),ae=a.div.withConfig({componentId:"sc-ed6399be-1"})(["font-size:1rem;z-index:2;padding:0.75rem 0.5rem;display:none;position:absolute;right:0;bottom:0;:hover{cursor:pointer;}"]),le=a.div.withConfig({componentId:"sc-ed6399be-2"})(["background-color:",";border-radius:0.5rem;font-size:1.5rem;height:30px;padding:0 0.5rem;"],({theme:t})=>t.colors.productsHostingPurple),ce=a.div.withConfig({componentId:"sc-ed6399be-3"})(["",";",";:hover{","{display:flex;}}"],t=>t.isRelative&&l(["position:relative;"]),t=>t.width&&l(["width:","px;"],t.width),ae),de=t=>t.asset?.duration||t.duration||0,be=({user:t,video:e,track:i,watchlists:c,podcasts:d,noOverlayPlay:u,portrait:h,isMobile:V,width:z,getVideoCardWidth:p,getVideoCardHeight:m,updateDeleteVideo:H,verticalsSource:T,compact:E})=>{const w=K(),g=Q(),{formatDisplayName:N}=P(),f=U(),[W,q]=r.useState(!1),C=r.useCallback(n=>{n?.stopPropagation(),q(s=>!s)},[]),O=r.useMemo(()=>{let n=!1;return()=>{n||(n=!0,X.preload(),w.query({query:ee,variables:{videoId:e.id,preferredLanguages:f,videoLanguage:f}}))}},[w,f,e.id]),b=r.useRef(null);r.useEffect(()=>{if(!p||!m)return;const n=()=>
1{if(!b.current)return;const s=b.current.getBoundingClientRect();p(s.width),m(s.height)};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[m,p]);const I=i.thumbnail||e.thumbnail||{href:void 0},y=i.thumbnailHigh||e.thumbnailHigh||void 0,v=y&&`${I.href}, ${y.href} 2x`,j=i?.portraitThumbnail||e?.portraitThumbnail||i.thumbnail||e.thumbnail||{href:void 0},L=i?.portraitThumbnailHigh||e?.portraitThumbnailHigh||i.thumbnailHigh||e.thumbnailHigh||void 0,A=L&&`${j.href}, ${L.href} 2x`,$=e?.languages?.map(n=>({key:n,langCode:n,name:n.startsWith("c-")?"":N(n,{fallback:"none",type:"language"})||"",to:g.toVideoLang(e.id,n)})).sort((n,s)=>n.langCode.localeCompare(s.langCode)),D=e.state===0||e.state===2,B=c?.filter(n=>!n.videos.find(s=>s&&s.id===e.id)),_=r.useMemo(()=>t&&Object.prototype.hasOwnProperty.call(t,"watchlists")?t:null,[t]),F=o.jsx(ne,{toggleMenu:C,owner:_,video:e,track:i,watchlists:B,podcasts:d?.slice(0),updateDeleteVideo:H}),Y=!!t?.id;return o.jsxs(ce,{ref:b,isRelative:!0,...Z("producer-page-videos-card"),width:z,children:[o.jsxs(re,{children:[e?.asset?.type==="audio"&&o.jsx(le,{children:"♪"}),D&&o.jsx(oe,{state:e.state,type:R.VIDEO})]}),o.jsx(te,{to:e.isVertical?g.toVerticals(e.id,T||"public"):g.toVideo(e.id),title:i.title,description:i.description||"",langCode:i.langCode,duration:de(e),authorName:e.owner.name,authorId:e.owner.id,thumbnailSrc:h?j.href:I.href,thumbnailSrcSet:h?A:v,languages:$,onPreloadRequested:O,toggleMenu:C,showMenu:W,noOverlayPlay:u,isMobile:V,isViewer:Y,cardMenu:F,portrait:h,compact:E,isLivestream:e.isLivestream,isLive:e.isLive,isAudio:e?.asset?.type==="audio"})]})};export{oe as S,be as V};

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.