1import{d as Y,a6 as $,u as G,b as c,c as b,w as T,g as _,n as w,D as J,v as u,i as o,f,t as C,l as y,k as Q,m as h,N as X,ac as V,ai as Z,F as ee,af as E,h as x,aj as te,ak as ae,j as O,_ as A,al as oe,a as g}from"./index.16ba4ea0.js";const le={class:"mt-4 space-y-4"},se={key:0,class:"bg-green-900/30 border border-green-500 text-green-200 px-4 py-3 rounded"},re={key:1,class:"bg-red-900/30 border border-red-500 text-red-200 px-4 py-3 rounded"},ie={class:"space-y-2"},ne=["value"],ue={class:"text-sm text-zinc-300"},de={key:0},ce={class:"flex gap-3 pt-2"},ve=Y({__name:"ReportDialog",props:{modelValue:{type:Boolean},videoId:{},contentId:{},contentType:{},title:{}},emits:["update:modelValue"],setup(I,{emit:M}){const d=I,N=M,{isAuthorized:k}=$(G()),p=c(d.modelValue),n=c(!1),v=c(""),r=c(""),i=c(null),R=oe,s=b(()=>d.contentType||"video"),m=b(()=>d.contentId||d.videoId||""),D=b(()=>d.title||(s.value==="comment"?"Report this Comment":s.value==="tag"?"Report this Tag":s.value==="performer"?"Report this Performer":s.value==="playlist"?"Report Playlist":"Submit a Report")),t=c({reason:"",details:"",email:""}),B=["Prohibited or illegal content (e.g. child exploitation, CSAM, incest, bestiality, etc.)","Non-consensual or revenge porn","Copyright infringement","Source not found","Other video playback issue (e.g. out of sync, poor quality, low resolution, buffering, no audio)","Hate speech or harassment","Impersonation"],H=["Prohibited or illegal content (e.g. CSAM, bestiality, etc.)","Hate speech or harassment","Impersonation","Spam or unauthorized advertising"],q=["Prohibited or illegal content (e.g. CSAM, incest, bestiality, etc.)","Non-consensual or revenge porn","Hate speech or harassment","Spam or misleading tag"],U=["Prohibited or illegal content (e.g. CSAM, incest, bestiality, etc.)","Non-consensual or revenge porn","Copyright infringement","Hate speech or harassment","Spam or misleading performer"],F=["Prohibited or illegal content","Copyright infringement","Spam, misleading or deceptive content","Hate speech or harassment","Impersonation","Other"],j=b(()=>s.value==="comment"?H:s.value==="tag"?q:s.value==="performer"?U:s.value==="playlist"?F:B);T(()=>d.modelValue,a=>{p.value=a,a&&L()}),T(p,a=>{N("update:modelValue",a)});const L=()=>{var a;t.value={reason:"",details:"",email:""},v.value="",r.value="",(a=i.value)!=null&&a.reset&&i.value.reset()},S=()=>{p.value=!1},K=()=>{if(!t.value.reason){r.value="Please select a reason for your report";return}if(!k.value&&!t.value.email){r.value="Email is required for anonymous reports";return}if(!R){n.value=!0,z("");return}i.value?(n.value=!0,i.value.execute()):r.value="Captcha error (Internal)"},z=async a=>{var e;r.value="",v.value="";try{s.value==="comment"?await g.comments.reportComment(m.value,t.value.reason,t.value.details||void 0,t.value.email||void 0,a):s.value==="tag"?await g.tags.reportTag(m.value,t.value.reason,t.value.details||void 0,t.value.email||void 0,a):s.value==="performer"?await g.performers.reportPerformer(m.value,t.value.reason,t.value.details||void 0,t.value.email||void 0,a):s.value==="playlist"?await g.playlists.reportPlaylist(m.value,t.value.reason,t.value.details||void 0,t.value.email||void 0,a):await g.videos.reportVideo(m.value,t.value.reason,t.value.details||void 0,t.value.email||void 0,a),v.value="Thank you for your report. We will review it shortly.",setTimeout(()=>{S()},2e3)}catch(l){r.value=(l==null?void 0:l.message)||"Failed to submit report. Please try again.",(e=i.value)!=null&&e.reset&&i.value.reset()}finally{n.value=!1}},P=a=>{var e;console.error("Captcha error:",a),r.value="Captcha verification failed.",n.value=!1,(e=i.value)!=null&&e.reset&&i.value.reset()};return(a,e)=>(u(),_(J,{modelValue:p.value,"onUpdate:modelValue":e[3]||(e[3]=l=>p.value=l),title:D.value,wide:""},{default:w(()=>[o("div",le,[v.value?(u(),f("div",se,C(v.value),1)):y("",!0),r.value?(u(),f("div",re,C(r.value),1)):y("",!0),o("form",{onSubmit:Q(K,["prevent"]),class:"space-y-4"},[o("div",null,[e[4]||(e[4]=o("label",{class:"block text-sm font-medium text-white mb-2"},[h(" Reason "),o("span",{class:"text-red-500"},"*")],-1)),o("div",ie,[(u(!0),f(ee,null,X(j.value,l=>(u(),f("label",{key:l,class:"flex items-start gap-2 p-3 rounded hover:bg-zinc-800 cursor-pointer transition-colors"},[V(o("input",{type:"radio","onUpdate:modelValue":e[0]||(e[0]=W=>t.value.reason=W),value:l,class:"mt-1 h-4 w-4 text-blue-500 focus:ring-blue-500 focus:ring-offset-zinc-900",required:""},null,8,ne),[[Z,t.value.reason]]),o("span",ue,C(l),1)]))),128))])]),o("div",null,[e[5]||
1(e[5]=o("label",{for:"details",class:"block text-sm font-medium text-white mb-2"}," Additional Details (Optional) ",-1)),V(o("textarea",{id:"details","onUpdate:modelValue":e[1]||(e[1]=l=>t.value.details=l),rows:"4",class:"w-full px-3 py-2 bg-zinc-800 border border-zinc-700 rounded-md text-white placeholder-zinc-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Provide any additional context about this report..."},null,512),[[E,t.value.details]])]),x(k)?y("",!0):(u(),f("div",de,[e[6]||(e[6]=o("label",{for:"email",class:"block text-sm font-medium text-white mb-2"},[h(" Your Email "),o("span",{class:"text-red-500"},"*")],-1)),V(o("input",{id:"email",type:"email","onUpdate:modelValue":e[2]||(e[2]=l=>t.value.email=l),required:"",class:"w-full px-3 py-2 bg-zinc-800 border border-zinc-700 rounded-md text-white placeholder-zinc-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"[email protected]"},null,512),[[E,t.value.email]]),e[7]||(e[7]=o("p",{class:"mt-1 text-xs text-zinc-500"}," Email is required to follow up on your report when needed ",-1))])),x(R)?(u(),_(x(te),{key:1,ref_key:"captcha",ref:i,onVerify:z,onError:P,onExpired:P,class:"absolute",size:"invisible",sitekey:x(ae),theme:"dark"},null,8,["sitekey"])):y("",!0),o("div",ce,[O(A,{type:"submit",theme:"blue",loading:n.value,disabled:!t.value.reason||n.value,class:"flex-1"},{default:w(()=>[...e[8]||(e[8]=[h(" Submit Report ",-1)])]),_:1},8,["loading","disabled"]),O(A,{type:"button",onClick:S,disabled:n.value,class:"flex-1"},{default:w(()=>[...e[9]||(e[9]=[h(" Cancel ",-1)])]),_:1},8,["disabled"])])],32)])]),_:1},8,["modelValue","title"]))}});export{ve as _};
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.