1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7232],{7232:(e,t,i)=>{i.r(t),i.d(t,{default:()=>a});var l=i(5155),s=i(2115);let a=({youtubeVideos:e})=>{let[t,i]=(0,s.useState)(e||[]),[a,r]=(0,s.useState)(0),[c,n]=(0,s.useState)(!e||0===e.length);(0,s.useEffect)(()=>{if(e&&e.length>0){i(e),n(!1);return}(async()=>{try{let e=await fetch("http://192.168.1.12:8082/api/z/newsapi.php?youtube_videos=true"),t=(await e.json()).items.map(e=>({id:e.snippet.resourceId.videoId,thumbnailUrl:e?.snippet?.thumbnails?.medium?.url||e?.snippet?.thumbnails?.high?.url||e?.snippet?.thumbnails?.default?.url,title:e?.snippet?.title,author:e?.snippet?.channelTitle})).filter(e=>!e.title.toLowerCase().includes("private"));i(t)}catch(e){console.error("Error fetching videos",e)}finally{n(!1)}})()},[e]);let d=(0,s.useMemo)(()=>t[a]||null,[t,a]);return c?(0,l.jsx)("p",{children:"Loading videos..."}):t.length?(0,l.jsxs)("div",{className:"youtube-wrapper",children:[(0,l.jsx)("div",{className:"playlist-title",children:(0,l.jsx)("h4",{children:"Latest Video News"})}),(0,l.jsxs)("div",{className:"RYPP r16-9",children:[(0,l.jsx)("div",{className:"RYPP-playlist",children:(0,l.jsx)("div",{className:"RYPP-items",children:(0,l.jsx)("ol",{children:t.map((e,t)=>(0,l.jsxs)("li",{className:a===t?"selected":"",onClick:()=>r(t),children:[(0,l.jsx)("h5",{className:"title line-clamp-2",children:e.title}),(0,l.jsx)("img",{src:e.thumbnailUrl,className:"thumb",alt:e.title,loading:"lazy",width:"320",height:"180",style:{width:"100%",height:"auto",aspectRatio:"16/9"}})]},e.id))})})}),(0,l.jsx)("div",{className:"RYPP-video",children:d&&(0,l.jsx)("iframe",{className:"RYPP-video-player",src:`https://www.youtube-nocookie.com/embed/${d.id}`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,title:d.title,width:"640",height:"360",loading:"lazy"})})]})]}):(0,l.jsx)("p",{children:"No videos found."})}}}]);
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.