PageSourceSearch

https://shawprize.org/_next/static/chunks/7890-30f4d85a5a08ebaa.js

js shawprize.org collected 2026-10-02 03:06:40 UTC 13,211 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7890],{36355:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(95155),o=l(12115),r=l(42398),i=l(44352);let s=e=>{let{url:t,width:l="100%",height:s="auto",title:c="Video",className:n="",description:u="",autoplay:d=!1,mode:m="inline",defaultOpen:p=!1,thumbnailUrl:h}=e,[b,x]=o.useState(p),[f,y]=o.useState(!1);console.log("thumbnailUrl",h,"url",t);let v=(e=>{let t=e.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([^&\n?#]+)/);if(t){let l=t[1],a=e.match(/[?&]si=([^&]+)/),o=a?"&si=".concat(a[1]):"";return{embedUrl:"https://www.youtube.com/embed/".concat(l).concat("?rel=0").concat(o).concat(d?"&autoplay=1&mute=1":""),platform:"YouTube"}}let l=e.match(/bilibili\.com\/video\/(BV[a-zA-Z0-9]+|av\d+)/);if(l){let e=l[1],t="";if(e.startsWith("BV"))t="https://player.bilibili.com/player.html?bvid=".concat(e,"&page=1&as_wide=1&high_quality=1&danmaku=0");else if(e.startsWith("av")){let l=e.replace("av","");t="https://player.bilibili.com/player.html?aid=".concat(l,"&page=1&as_wide=1&high_quality=1&danmaku=0")}return d&&(t+="&autoplay=1"),{embedUrl:t,platform:"Bilibili"}}return null})(t),g=h;if(!h&&(null==v?void 0:v.platform)==="YouTube"){var w;let e=null==(w=t.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([^&\n?#]+)/))?void 0:w[1];e&&(g="https://img.youtube.com/vi/".concat(e,"/hqdefault.jpg"))}let j={width:"number"==typeof l?"".concat(l,"px"):l,height:"number"==typeof s?"".concat(s,"px"):s};if(!v)return(0,a.jsx)("div",{className:"flex items-center justify-center bg-gray-100 border-2 border-dashed max-w-[1131px] mx-auto border-gray-300 ".concat(n),style:j,children:(0,a.jsxs)("div",{className:"text-center p-6",children:[(0,a.jsx)("svg",{className:"mx-auto h-10 w-10 text-gray-400 mb-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),(0,a.jsx)("p",{className:"text-gray-600 text-sm font-medium",children:"无法识别的视频链接"}),(0,a.jsx)("p",{className:"text-gray-500 text-xs mt-1",children:"请使用 YouTube 或 Bilibili 视频链接"})]})});if("inline"===m){let e="YouTube"===v.platform?v.embedUrl.includes("autoplay=1")?v.embedUrl:"".concat(v.embedUrl,"&autoplay=1&mute=1"):"Bilibili"===v.platform?v.embedUrl.includes("autoplay=1")?v.embedUrl:"".concat(v.embedUrl,"&autoplay=1"):v.embedUrl;return g?(0,a.jsxs)("div",{className:"relative overflow-hidden aspect-video max-w-[1131px] mx-auto ".concat(n),style:j,children:[(0,a.jsx)("iframe",{src:e,title:c,width:"100%",height:"100%",frameBorder:"0",allowFullScreen:!0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",className:"absolute inset-0 transition-opacity duration-300 ".concat(f?"opacity-100 z-10":"opacity-0 -z-10 pointer-events-none"),loading:"eager",style:{border:"none",outline:"none"}}),(0,a.jsxs)("div",{className:"group absolute inset-0 cursor-pointer flex items-center justify-center transition-opacity duration-300 ".concat(f?"opacity-0 pointer-events-none":"opacity-100"),onClick:()=>y(!0),role:"button","aria-label":"播放视频",children:[(0,a.jsx)("img",{src:g,alt:c,className:"w-full h-full object-cover group-hover:scale-105 transition duration-300"}),(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,a.jsx)(i.O2,{className:"text-white w-24 h-24"})})]})]}):(0,a.jsx)("div",{className:"relative overflow-hidden aspect-video max-w-[1131px] mx-auto ".concat(n),style:j,children:(0,a.jsx)("iframe",{src:e,title:c,width:"100%",height:"100%",frameBorder:"0",allowFullScreen:!0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",className:"absolute inset-0",loading:"lazy",style:{border:"none",outline:"none"}})})}let N=()=>x(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"group relative cursor-pointer overflow-hidden flex items-center justify-center aspect-video ".concat(n),style:j,onClick:()=>x(!0),role:"button","aria-label":"播放视频",children:[g?(0,a.jsx)("img",{src:g,alt:c,className:"w-full h-full object-cover group-hover:scale-105 group-hover:opacity-100 transition duration-300"}):(0,a.jsxs)("div",{className:"flex flex-col items-center text-white",children:[(0,a.jsx)("span",{className:"text-sm opacity-80 mb-2",children:"点击播放"}),(0,a.jsx)("span",{className:"text-xs opacity-60",children:v.platform})]}),(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,a.jsx)(i.O2,{className:"text-white w-24 h-24"})})]}),b&&(0,a.jsx)(r.A,{isOpen:b,onClose:N,className:"w-full h-full max-w-none max-h-none bg-black/80 top-0 left-0",showCloseButton:!1,closeOnOverlayClick:!0,closeOnEsc:!0,children:(0,a.jsxs)("div",{className:"w-full h-full flex items-center justify-center p-4 md:p-10 flex-col",children:[(0,a.jsxs)("div",{className:"relative md:w-[60%] w-full aspect-video bg-black",children:[(0,a.jsx)("button",{onClick:N,className:"absolute -top-10 right-4 z-10 w-10 h-10 flex items-center justify-center\n                     bg-opacity-20 hover:bg-opacity-30 rounded-full cursor-pointer\n                     transition-all duration-200 ease-out hover:scale-110\n                     focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-50 text-white bg-black hover:text-gray-200\n                     ","aria-label":"Close popup",children:(0,a.jsx)("svg",{width:"19.2",height:"19.2",viewBox:"0 0 19.2 19.2",fill:"
1currentColor",xmlns:"http://www.w3.org/2000/svg",className:"transition-transform duration-200 hover:rotate-90",children:(0,a.jsx)("path",{d:"M1 1L18.2 18.2M1 18.2L18.2 1",stroke:"currentColor",strokeWidth:"1.33",strokeLinecap:"round"})})}),(0,a.jsx)("iframe",{src:v.embedUrl,title:c,width:"100%",height:"100%",frameBorder:"0",allowFullScreen:!0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",className:"absolute inset-0",loading:"eager",style:{border:"none",outline:"none"}})]}),(0,a.jsx)("p",{className:"text-base font-[Sohne] text-white mt-4",children:c})]})})]})}},57890:(e,t,l)=>{l.d(t,{pf:()=>r.p,w4:()=>c.A,n5:()=>s});var a=l(95155),o=l(12115),r=l(85270),i=l(15239);let s=e=>{let{videoUrl:t,width:l="100%",height:r=315,className:s="",title:c="Video Player",autoplay:n=!1,muted:u=!1,showThumbnail:d=!1,onLoad:m,onError:p}=e,[h,b]=(0,o.useState)(!1),[x,f]=(0,o.useState)(!1),[y,v]=(0,o.useState)(!d),g=(e=>{for(let t of[/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([^&\n?#]+)/,/youtube\.com\/watch\?.*v=([^&\n?#]+)/]){let l=e.match(t);if(l){let e=l[1],t=new URLSearchParams({...n&&{autoplay:"1"},...u&&{mute:"1"}});return{type:"youtube",id:e,embedUrl:"https://www.youtube.com/embed/".concat(e,"?").concat(t.toString()),thumbnailUrl:"https://img.youtube.com/vi/".concat(e,"/maxresdefault.jpg")}}}for(let t of[/bilibili\.com\/video\/(BV[a-zA-Z0-9]+)/,/bilibili\.com\/video\/(av\d+)/,/b23\.tv\/([a-zA-Z0-9]+)/]){let l=e.match(t);if(l){let e=l[1],t="";if(e.startsWith("BV"))t="https://player.bilibili.com/player.html?bvid=".concat(e);else if(e.startsWith("av")){let l=e.replace("av","");t="https://player.bilibili.com/player.html?aid=".concat(l)}return n&&(t+="&autoplay=1"),{type:"bilibili",id:e,embedUrl:t,thumbnailUrl:null}}}return{type:"unknown",id:null,embedUrl:null,thumbnailUrl:null}})(t);return"unknown"!==g.type&&g.embedUrl?x?(0,a.jsx)("div",{className:"flex items-center justify-center bg-red-50 border-2 border-red-200 rounded-lg ".concat(s),children:(0,a.jsxs)("div",{className:"text-center p-8",children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)("svg",{className:"mx-auto h-12 w-12 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.99-.833-2.828 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})})}),(0,a.jsx)("h3",{className:"text-lg font-medium text-red-900 mb-2",children:"视频加载失败"}),(0,a.jsxs)("p",{className:"text-sm text-red-600",children:["无法加载 ","youtube"===g.type?"YouTube":"Bilibili"," 视频"]}),(0,a.jsx)("button",{onClick:()=>window.open(t,"_blank"),className:"mt-4 px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors",children:"在新窗口中打开"})]})}):(0,a.jsx)("div",{className:"relative ".concat(s),children:d&&!y&&g.thumbnailUrl?(0,a.jsxs)("div",{className:"relative cursor-pointer group",onClick:()=>{v(!0)},children:[(0,a.jsx)(i.default,{src:g.thumbnailUrl,alt:c,fill:!0,className:"object-cover rounded-lg"}),(0,a.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-30 flex items-center justify-center group-hover:bg-opacity-50 transition-all duration-200 rounded-lg",children:(0,a.jsx)("div",{className:"w-16 h-16 bg-red-600 rounded-full flex items-center justify-center group-hover:scale-110 transition-transform duration-200",children:(0,a.jsx)("svg",{className:"w-8 h-8 text-white ml-1",fill:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})}),(0,a.jsx)("div",{className:"absolute bottom-4 left-4 bg-black bg-opacity-75 text-white px-2 py-1 rounded text-sm",children:"youtube"===g.type?"YouTube":"Bilibili"})]}):(0,a.jsxs)("div",{className:"relative w-full h-full",children:[!h&&(0,a.jsx)("div",{className:"absolute inset-0 bg-gray-100 flex items-center justify-center rounded-lg",children:(0,a.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}),(0,a.jsx)("iframe",{src:g.embedUrl,title:c,width:"100%",height:"100%",frameBorder:"0",allowFullScreen:!0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",className:"rounded-lg",onLoad:()=>{b(!0),f(!1),null==m||m()},onError:()=>{f(!0);let e="无法加载 ".concat(g.type," 视频");null==p||p(e)}}),g.type&&(0,a.jsx)("div",{className:"absolute top-2 right-2 bg-black bg-opacity-75 text-white px-2 py-1 rounded text-xs",children:"youtube"===g.type?"YouTube":"Bilibili"})]})}):(0,a.jsx)("div",{className:"flex items-center justify-center bg-gray-100 border-2 border-dashed border-gray-300 rounded-lg ".concat(s),children:(0,a.jsxs)("div",{className:"text-center p-8",children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})})}),(0,a.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"无法
1识别的视频链接"}),(0,a.jsx)("p",{className:"text-sm text-gray-500",children:"支持的平台:YouTube、Bilibili"}),(0,a.jsxs)("p",{className:"text-xs text-gray-400 mt-2",children:["URL: ",t]})]})})};var c=l(36355)},85270:(e,t,l)=>{l.d(t,{p:()=>i});var a=l(95155),o=l(15239),r=l(12115);let i=e=>{let{mediaSource:t,children:l,autoHeight:i=!1,contentAlignCenter:s=!0,className:c="",mediaClassName:n=""}=e,[u,d]=(0,r.useState)(!1),[m,p]=(0,r.useState)("unknown"),h=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!t)return void console.warn("No media source provided for MediaBackground component.");d(!1),console.log("Media source: ".concat(t)),(e=>{let t=e.toLowerCase().split(".").pop();return[".jpg",".jpeg",".png",".gif",".webp",".bmp",".svg"].includes(".".concat(t))})(t)?p("image"):(e=>{let t=e.toLowerCase().split(".").pop();return[".mp4",".webm",".ogg",".avi",".mov"].includes(".".concat(t))})(t)?p("video"):(p("unknown"),console.warn("Unknown media type for: ".concat(t)))},[t]);let b=()=>{d(!0),h.current&&"video"===m&&h.current.play().catch(e=>{console.warn("Video autoplay failed:",e)})};return(0,a.jsxs)("div",{className:"relative w-full ".concat(i?"h-auto":"h-screen"," overflow-hidden ").concat(c),children:[!u&&(0,a.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-gray-200 animate-pulse"}),"image"===m&&(0,a.jsx)("div",{className:"".concat(n," absolute top-0 left-0 w-full h-full"),children:(0,a.jsx)(o.default,{src:t,alt:"Background",fill:!0,className:"object-cover transition-opacity duration-500 ".concat(u?"opacity-100":"opacity-0"),onLoad:b,priority:!0})}),"video"===m&&(0,a.jsxs)("video",{ref:h,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"".concat(n," absolute top-0 left-0 w-full h-full object-cover transition-opacity duration-500 ").concat(u?"opacity-100":"opacity-0"),onLoadedData:b,children:[(0,a.jsx)("source",{src:t,type:"video/mp4"}),"Your browser does not support the video tag."]},t),"unknown"===m&&(0,a.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-gray-300 flex items-center justify-center"}),(0,a.jsx)("div",{className:"relative z-10 flex flex-col ".concat(s?"items-center":""," justify-center h-full text-white text-center text-shadow-md"),children:l})]})}}}]);

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.