1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[227],{13933:e=>{e.exports={video_downloader_section:"imagedownloader_video_downloader_section__tov37",pages_heading:"imagedownloader_pages_heading__IKBVY",form:"imagedownloader_form__Zx0cw",form_group:"imagedownloader_form_group__k9NTx",form_group_error:"imagedownloader_form_group_error__OzfKL",btn:"imagedownloader_btn___RQgf",btn_disabled:"imagedownloader_btn_disabled__ZQ3mL",save_button:"imagedownloader_save_button__Ymcgb",results_container:"imagedownloader_results_container__Dea2T",results:"imagedownloader_results__FRsAM",dimensions:"imagedownloader_dimensions__sT62Z",links_container:"imagedownloader_links_container__s6Z2x",link:"imagedownloader_link__yNfav",error_text:"imagedownloader_error_text__JulVf",image_preview_container:"imagedownloader_image_preview_container__f_Ouj"}},92608:(e,n,s)=>{"use strict";s.r(n),s.d(n,{default:()=>p,getServerSideProps:()=>h});var a=s(37876),r=s(77328),i=s.n(r),l=s(14232),o=s(5068),t=s(56216),d=s(59084),_=s(13933),c=s.n(_),u=s(53981),m=s(75461);let{useState:g}=l;async function h(e){return e.req.session.user||res.redirect(302,e.req.url),{props:{auth:"OK"}}}let p=e=>{let{content:n}=e,{pageVisitId:s}=(0,t.P)(),[r,l]=g(null),[_,h]=g(null),[p,x]=g(null),[w,j]=g(!1),[v,b]=g(!0),[f,N]=g(""),[k,y]=g(!1),T=/^(?=.*(?:youtube|youtu.be))(?=.*https:\/\/).*/i,O=()=>{y(!0)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i(),{}),(0,a.jsx)("section",{className:c().video_downloader_section,children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:c().pages_heading,children:[(0,a.jsx)("strong",{children:n.title}),(0,a.jsx)("h3",{children:n.description})]}),(0,a.jsx)("div",{className:c().form,children:(0,a.jsxs)("div",{className:w?c().form_group_error:c().form_group,children:[(0,a.jsx)("input",{type:"text",placeholder:"Enter video url",onChange:e=>{j(!1),b(!0);let{name:n,value:s}=e.target;""!==s?(l(s),s.includes("twitter")?N("Twitter"):s.includes("facebook")||s.includes("fb.watch")?N("Facebook"):s.includes("instagram")?N("Instagram"):s.includes("tiktok")?N("Tiktok"):(s.includes("youtube")||s.includes("youtu.be"))&&N("Youtube")):l(null)},onKeyDown:e=>null!==r&&!_&&!1!==v&&"Enter"===e.key&&O()}),(0,a.jsxs)("button",{className:_?c().btn_disabled:c().btn,onClick:()=>O(),disabled:_,children:[(0,a.jsx)("span",{translate:"no",children:"DOWNLOAD"}),_?(0,a.jsx)("img",{src:"/spinner.svg",alt:"me",width:"40"}):(0,a.jsx)("img",{src:"/cloud_download.svg",alt:"download"})]})]})}),(0,a.jsx)(u.A,{pageData:n}),(0,a.jsx)("div",{className:c().download,children:w?(0,a.jsxs)("p",{className:c().error_text,children:[(0,a.jsx)("img",{src:"/alert.svg",alt:"image",width:30,height:30}),(0,a.jsx)("span",{children:"Something went wrong. Please enter a valid video Url!"})]}):v?(0,a.jsx)(a.Fragment,{children:null!==p?(0,a.jsx)("div",{className:c().results_container,children:(0,a.jsxs)("div",{className:c().results,children:[(0,a.jsx)("div",{className:c().image_preview_container,children:(0,a.jsx)("img",{src:p.url,alt:"thumbnail"})}),(0,a.jsx)("div",{className:c().dimensions,children:p.dimensions}),(0,a.jsxs)("a",{href:p.url,download:"thumbnail_image.jpg",className:c().save_button,children:[(0,a.jsx)("img",{src:"/mouse.svg",alt:"image"}),"Right click to save"]})]})}):null}):(0,a.jsxs)("p",{className:c().error_text,children:[(0,a.jsx)("img",{src:"/alert.svg",alt:"image",width:30,height:30}),"youtube_thumbnail"===n.featureType?(0,a.jsx)("span",{children:"Please enter a valid URL."}):(0,a.jsx)("span",{children:"Invalid URL! Please enter a valid video Url!"})]})})]})}),(0,a.jsx)("section",{className:c().links_container,children:n?.links?.map((e,n)=>(0,a.jsx)("a",{className:c().link,href:e.url,children:(0,a.jsxs)("span",{children:[e.title1," ",(0,a.jsx)("strong",{children:e.title2})," ",e.title3]})},n))}),k&&(0,a.jsx)(m.P,{open:k,onOpenChange:y,closable:!0,continueProcess:function(){if(x(null),!T.test(r))return void b(!1);b(!0),h(!0),x(null),fetch("youtube_thumbnail"===n.featureType?"/api/imagedownloader":"/api/downloader",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:r,downloadType:n.downloadType,featureType:n.featureType})}).then(e=>e.json()).then(e=>{"error"===e.status?(j(!0),h(!1)):(j(!1),h(!1),x(e))}),o.A.post("/api/log/create-action-log",{pageVisitId:s,actionTypeId:n?.title==="Download YouTube Thumbnail Free"?d.q.THUMBNAIL_DOWNLOADER:d.q.VIDEO_DOWNLOADER,extendedProperties:{page:n?.title}}
1)}})]})}}}]);
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.