1import{ad as u,a9 as p,ae as j,af as L,t as S,r as d,j as e,ab as N,ac as x,ag as w}from"./index-BPhyI9hI.js";const k="https://d2xsxph8kpxj0f.cloudfront.net/310519663388282333/EzmAFjbk2vvMLzEmur4xqw/live-stream-card-AdpmeiZvK86PrNuoAyWCNU.webp",F="https://d2xsxph8kpxj0f.cloudfront.net/310519663388282333/EzmAFjbk2vvMLzEmur4xqw/translate-feature-n99JZ7uR6PF66h7cYGiqQZ.webp",v={"zh-CN":{EN:"è±è¯",ZH:"䏿",FR:"æ³è¯",DE:"å¾·è¯",AR:"é¿æä¼¯è¯",ES:"西ççè¯",JA:"æ¥è¯",KO:"é©è¯"},"zh-TW":{EN:"è±èª",ZH:"䏿",FR:"æ³èª",DE:"å¾·èª",AR:"é¿æä¼¯èª",ES:"西ççèª",JA:"æ¥èª",KO:"éèª"},en:{EN:"English",ZH:"Chinese",FR:"French",DE:"German",AR:"Arabic",ES:"Spanish",JA:"Japanese",KO:"Korean"},ja:{EN:"è±èª",ZH:"ä¸å½èª",FR:"ãã©ã³ã¹èª",DE:"ãã¤ãèª",AR:"ã¢ã©ãã¢èª",ES:"ã¹ãã¤ã³èª",JA:"æ¥æ¬èª",KO:"éå½èª"},ko:{EN:"ìì´",ZH:"ì¤êµì´",FR:"íëì¤ì´",DE:"ë
ì¼ì´",AR:"ìëì´",ES:"ì¤íì¸ì´",JA:"ì¼ë³¸ì´",KO:"íêµì´"},es:{EN:"Inglés",ZH:"Chino",FR:"Francés",DE:"Alemán",AR:"Ãrabe",ES:"Español",JA:"Japonés",KO:"Coreano"}},E={è±è¯:"EN",䏿:"ZH",æ³è¯:"FR",å¾·è¯:"DE",é¿æä¼¯è¯:"AR",西ççè¯:"ES",æ¥è¯:"JA",é©è¯:"KO"};function f(s,l){const t=v[l]||v.en;return s.split("/").map(a=>a.trim()).map(a=>{const r=a.toUpperCase();if(t[r])return t[r];const o=E[a];return o&&t[o]?t[o]:a}).join("/")}function b(s){const l=s.match(/(?:v=|\/)([\w-]{11})(?:\?|&|$)/);return l?l[1]:""}function C({stream:s,onClose:l}){const{t,locale:n}=p(),c=b(s.url),a=`https://www.youtube.com/embed/${c}?autoplay=1&rel=0`;return e.jsxs(x.div,{"data-loc":"client/src/components/LiveStreams.tsx:72",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-50 flex items-center justify-center p-4 md:p-8",onClick:l,children:[e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:81",className:"absolute inset-0 bg-black/80 backdrop-blur-sm"}),e.jsxs(x.div,{"data-loc":"client/src/components/LiveStreams.tsx:84",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{duration:.25,ease:"easeOut"},className:"relative w-full max-w-5xl z-10",onClick:r=>r.stopPropagation(),children:[e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:93",className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:94",className:"flex items-center gap-3",children:[e.jsx("h3",{"data-loc":"client/src/components/LiveStreams.tsx:95",className:"text-lg font-bold text-white truncate max-w-md",style:{fontFamily:"var(--font-display)"},children:s.name}),s.isLive&&e.jsxs("span",{"data-loc":"client/src/components/LiveStreams.tsx:102",className:"flex items-center gap-1.5 px-2 py-0.5 bg-crisis-red/90 rounded-sm",children:[e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:103",className:"relative flex h-1.5 w-1.5",children:e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:104",className:"animate-live-dot absolute inline-flex h-full w-full rounded-full bg-white"})}),e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:106",className:"text-xs text-white font-bold tracking-wider",style:{fontFamily:"var(--font-display)"},children:t("streams.live")})]}),s.language&&e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:115",className:"text-xs px-1.5 py-0.5 bg-blue-500/20 text-blue-300 border border-blue-500/30 rounded-sm",style:{fontFamily:"var(--font-mono)"},children:f(s.language,n)})]}),e.jsx("button",{"data-loc":"client/src/components/LiveStreams.tsx:125",onClick:l,className:"flex items-center justify-center w-9 h-9 rounded-full bg-white/10 hover:bg-white/20 transition-colors text-white","aria-label":"Close",children:e.jsx("svg",{"data-loc":"client/src/components/LiveStreams.tsx:130",className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{"data-loc":"client/src/components/LiveStreams.tsx:131",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:137",className:"relative aspect-video w-full bg-black rounded-sm overflow-hidden shadow-2xl border border-white/10",children:c?e.jsx("iframe",{"data-loc":"client/src/components/LiveStreams.tsx:139",src:a,title:s.name,className:"absolute inset-0 w-full h-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,frameBorder:"0"}):e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:148",className:"absolute inset-0 flex items-center justify-center text-muted-foreground",children:e.jsx("p",{"data-loc":"client/src/components/LiveStreams.tsx:149",className:"text-sm",children:t("streams.noStreams")})})}),e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:155",className:"flex items-center justify-between mt-3",children:[e.jsxs("p",{"data-loc":"client/src/components/LiveStreams.tsx:156",className:"text-xs text-white/50",style:{fontFamily:"var(--font-body)"},children:[t("streams.tip")," ",t("streams.tipContent")]}),e.jsxs("a",{"data-loc":"client/src/components/LiveStreams.tsx:159",href:s.url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-white/60 hover:text-white/90 transition-colors flex items-center gap-1",style:{fontFamily:"var(--font-mono)"},children:["YouTube",e.jsx("svg",{"data-loc":"client/src/components/LiveStreams.tsx:167",className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{"data-loc":"client/src/components/LiveStreams.tsx:168",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]})]})]})}
1function A({stream:s,index:l,onPlay:t}){const{trackStreamClick:n}=u(),{t:c,locale:a}=p(),r=b(s.url),o=d.useCallback(m=>{m.preventDefault(),n(s.name,s.url),t(s)},[s,n,t]);return e.jsxs(x.div,{"data-loc":"client/src/components/LiveStreams.tsx:200",onClick:o,initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:l*.08},className:"group block p-4 bg-card/50 border border-border rounded-sm hover:border-crisis-orange/40 transition-all duration-300 hover:bg-card/80 cursor-pointer",children:[e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:209",className:"relative aspect-video mb-3 bg-black rounded-sm overflow-hidden",children:[e.jsx("img",{"data-loc":"client/src/components/LiveStreams.tsx:210",src:s.thumbnailUrl||`https://img.youtube.com/vi/${r}/mqdefault.jpg`,alt:s.name,className:"w-full h-full object-cover opacity-80 group-hover:opacity-100 transition-opacity"}),e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:215",className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent"}),e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:218",className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:219",className:"w-12 h-12 rounded-full bg-crisis-red/90 flex items-center justify-center",children:e.jsx("svg",{"data-loc":"client/src/components/LiveStreams.tsx:220",className:"w-5 h-5 text-white ml-0.5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{"data-loc":"client/src/components/LiveStreams.tsx:221",d:"M8 5v14l11-7z"})})})}),s.isLive&&e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:228",className:"absolute top-2 left-2 flex items-center gap-1.5 px-2 py-0.5 bg-crisis-red/90 rounded-sm",children:[e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:229",className:"relative flex h-1.5 w-1.5",children:e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:230",className:"animate-live-dot absolute inline-flex h-full w-full rounded-full bg-white"})}),e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:232",className:"text-xs text-white font-bold tracking-wider",style:{fontFamily:"var(--font-display)"},children:c("streams.live")})]}),s.viewers&&e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:240",className:"absolute bottom-2 right-2 px-2 py-0.5 bg-black/70 rounded-sm",children:e.jsxs("span",{"data-loc":"client/src/components/LiveStreams.tsx:241",className:"text-xs text-muted-foreground",style:{fontFamily:"var(--font-mono)"},children:[s.viewers," ",c("streams.watching")]})})]}),e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:249",className:"flex items-start gap-2",children:[e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:250",className:"flex-1",children:[e.jsx("h4",{"data-loc":"client/src/components/LiveStreams.tsx:251",className:"text-base font-bold text-foreground mb-0.5",style:{fontFamily:"var(--font-body)"},children:s.name}),e.jsx("p",{"data-loc":"client/src/components/LiveStreams.tsx:254",className:"text-sm text-muted-foreground line-clamp-2",style:{fontFamily:"var(--font-body)"},children:c("streams.subtitle")})]}),e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:258",className:"flex-shrink-0 text-xs px-1.5 py-0.5 bg-blue-500/10 text-blue-400 border border-blue-500/30 rounded-sm",style:{fontFamily:"var(--font-mono)"},children:f(s.language,a)})]})]})}function R(){const{trackCTA:s,trackStreamClick:l}=u(),{t}=p(),n=j(),c=L("livestream_cta"),{data:a,isLoading:r}=S.streams.list.useQuery(void 0,{refetchInterval:300*1e3}),[o,m]=d.useState(null),h=d.useCallback(i=>{m(i)},[]),y=d.useCallback(()=>{m(null)},[]);return e.jsxs("section",{"data-loc":"client/src/components/LiveStreams.tsx:287",className:"py-8",children:[e.jsx(N,{"data-loc":"client/src/components/LiveStreams.tsx:289",children:o&&e.jsx(C,{"data-loc":"client/src/components/LiveStreams.tsx:291",stream:o,onClose:y})}),e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:296",className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:297",className:"w-1 h-6 bg-crisis-orange"}),e.jsx("h2",{"data-loc":"client/src/components/LiveStreams.tsx:298",className:"text-xl md:text-2xl font-bold text-foreground",style:{fontFamily:"var(--font-display)"},children:t("streams.title")}),e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:301",className:"text-sm text-muted-foreground ml-2",style:{fontFamily:"var(--font-body)"},children:t("streams.subtitle")})]}),e.jsxs(x.div,{"data-loc":"client/src/components/LiveStreams.tsx:307",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"relative mb-8 overflow-hidden rounded-sm border border-crisis-amber/30",children:[e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:313",className:"absolute inset-0",children:[e.jsx("img",{"data-loc":"client/src/components/LiveStreams.tsx:314",src:k,alt:"",className:"w-full h-full object-cover opacity-30"}),e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:315",className:"absolute inset-0 bg-gradient-to-r from-background via-background/95 to-background/70"})]}),e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:318",className:"relative flex flex-col lg:flex-row items-center gap-6 p-6 md:p-8",children:[e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:319",className:"flex-1",children:[e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:320",className:"flex items-center gap-2 mb-3",children:[e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:321",className:"text-xs px-2 py-0.5 bg-crisis-amber/20 text-crisis-amber border border-crisis-amber/30 rounded-sm font-bold tracking-wider",style:{fontFamily:"var(--font-display)"},children:t("streams.breakInfo")}),e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:324",className:"text-xs px-2 py-0.5 bg-blue-500/20 text-blue-400 border border-blue-500/30 rounded-sm font-bold tracking-wider",style:{fontFamily:"var(--font-display)"},children:t("streams.chromeAward")}),e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:327",className:"text-xs px-2 py-0.5 bg-emerald-500/20 text-emerald-400 border border-emerald-500/30 rounded-sm font-bold tracking-wider",style:{fontFamily:"var(--font-display)"},children:t("streams.userCount")})]}),e.jsx("h3",{"data-loc":"client/src/components/LiveStreams.tsx:331",className:"text-lg md:text-xl font-bold text-foreground mb-2",style:{fontFamily:"var(--font-display)"},children:n.isMobile&&t("streams.ctaTitleMobile")||t("streams.ctaTitle")}),e.jsxs("p",{"data-loc":"client/src/components/LiveStreams.tsx:334",className:"text-base text-muted-foreground mb-4 leading-relaxed max-w-xl",style:{fontFamily:"var(--font-body)"},children:[n.isMobile&&t("streams.ctaDescMobile")||t("streams.ctaDesc")," ",e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:337",className:"text-foreground font-medium",children:t("streams.ctaDescHighlight")})]}),e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:339",className:"flex flex-wrap gap-3",children:[e.jsxs("a",{"data-loc":"client/src/components/LiveStreams.tsx:340",href:c.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-2.5 bg-crisis-amber text-crisis-darker font-bold text-sm rounded-sm hover:bg-crisis-amber/90 transition-colors",style:{fontFamily:"var(--font-display)"},onClick:i=>{s("cta_livestream_install",`${n.isMobile?"mobile":"desktop"}|${c.target}|${n.isMobile?c.platform:n.browser}`),c.handleClick(i)},children:[e.jsx(w,{"data-loc":"client/src/components/LiveStreams.tsx:351",className:"w-4 h-4"}),n.isMobile&&t("streams.ctaInstallMobile")||t("streams.ctaInstall")]}),e.jsx("a",{"data-loc":"client/src/components/LiveStreams.tsx:354",href:"https://immersivetranslate.com/zh-Hans/docs/features/video-subtitles/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-2.5 border border-border text-foreground text-sm rounded-sm hover:bg-card/50 transition-colors",style:{fontFamily:"var(--font-display)"},onClick:()=>s("cta_livestream_tutorial","LiveStreams - Tutorial"),children:t("streams.ctaTutorial")})]})]}),e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:368",className:"flex-shrink-0 w-full lg:w-80",children:e.jsx("img",{"data-loc":"client/src/components/LiveStreams.tsx:369",src:F,alt:"Immersive Translate bilingual subtitles demo",className:"w-full rounded-sm border border-border shadow-2xl"})})]})]}),r&&e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:380",className:"flex items-center justify-center py-12",children:e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:381",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:382",className:"w-4 h-4 border-2 border-crisis-orange/30 border-t-crisis-orange rounded-full animate-spin"}),e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:383",className:"text-sm text-muted-foreground",style:{fontFamily:"var(--font-body)"},children:t("streams.detecting")})]})}),!r&&(a??[]).length>0&&e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:392",className:"flex items-center gap-2 mb-4",children:[e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:393",className:"relative flex h-2 w-2",children:e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:394",className:"animate-live-dot absolute inline-flex h-full w-full rounded-full bg-green-400"})}),e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:396",className:"text-sm text-green-400",style:{fontFamily:"var(--font-mono)"},children:t("streams.activeCount",{count:(a??[]).length})}),e.jsxs("span",{"data-loc":"client/src/components/LiveStreams.tsx:399",className:"text-sm text-muted-foreground",style:{fontFamily:"var(--font-body)"},children:["· ",t("streams.autoRefresh")]})]}),!r&&(a??[]).length===0&&e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:407",className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:408",className:"w-16 h-16 rounded-full bg-crisis-orange/10 flex items-center justify-center mb-4",children:e.jsx("svg",{"data-loc":"client/src/components/LiveStreams.tsx:409",className:"w-8 h-8 text-crisis-orange/50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{"data-loc":"client/src/components/LiveStreams.tsx:410",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),e.jsx("p",{"data-loc":"client/src/components/LiveStreams.tsx:413",className:"text-sm text-muted-foreground mb-1",style:{fontFamily:"var(--font-body)"},children:t("streams.noStreams")}),e.jsx("p",{"data-loc":"client/src/components/LiveStreams.tsx:416",className:"text-xs text-muted-foreground",style:{fontFamily:"var(--font-body)"},children:t("streams.noStreamsDesc")})]}),!r&&(a??[]).length>0&&e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:424",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:(a??[]).map((i,g)=>e.jsx(A,{"data-loc":"client/src/components/LiveStreams.tsx:426",stream
1:i,index:g,onPlay:h},i.id))}),e.jsxs("div",{"data-loc":"client/src/components/LiveStreams.tsx:432",className:"mt-6 p-4 bg-blue-500/5 border border-blue-500/20 rounded-sm flex items-start gap-3",children:[e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:433",className:"text-blue-400 text-lg flex-shrink-0",children:"ð¡"}),e.jsx("div",{"data-loc":"client/src/components/LiveStreams.tsx:434",children:e.jsxs("p",{"data-loc":"client/src/components/LiveStreams.tsx:435",className:"text-sm text-muted-foreground",style:{fontFamily:"var(--font-body)"},children:[e.jsx("span",{"data-loc":"client/src/components/LiveStreams.tsx:436",className:"font-bold text-blue-400",children:t("streams.tip")}),n.isMobile&&t("streams.tipContentMobile")||t("streams.tipContent")]})})]})]})}export{R as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.