1import{au as xe,$ as ee,U as De}from"./Dbck8wS-.js";import{i as s,e as i,t as l,f as e,g as b,P as T,Q as V,q as j,j as d,d as y,r as u,w as Ee,o as Me,K as Ie,v as ue,k as N,U as c,N as ce,Z as me,u as S,V as Ue}from"./Db2INZ8s.js";import{A as ze}from"./CsTa2v5O.js";import{_ as te}from"./BNespdj1.js";import{A as Oe}from"./BaPYhZeO.js";import{g as Be,a as Fe,b as Ve,c as je,r as qe}from"./BggFV09J.js";import{u as He}from"./DMADZucn.js";import"./g6Pe-GcS.js";import"./D3cle-cX.js";import"./C-KwH-Wp.js";import"./DeWPRm8k.js";import"./zBsGsvEz.js";import"./BQO3JFfR.js";import"./Bx1UdBN7.js";const Xe={class:"rounded-lg border border-voix-admin-100 bg-white max-h-[calc(100dvh-444px)] overflow-y-auto"},Ze={key:0,class:"px-5 py-8 text-center text-sm text-voix-admin-400"},Ke={key:1,class:"px-5 py-8 text-center text-sm text-voix-admin-400"},Ge={key:2,class:"w-full text-sm"},Qe={class:"text-left sticky top-0 bg-white z-10"},Ye={class:"border-b border-voix-admin-100 text-[11px] uppercase tracking-wider text-voix-admin-500"},Je={key:0,class:"px-4 py-3 font-semibold"},We={class:"px-4 py-3 font-mono text-[12.5px] text-voix-admin-800"},et={key:0,class:"px-4 py-3"},tt={class:"px-4 py-3 text-voix-admin-700"},nt={class:"px-4 py-3"},ot={class:"flex items-center justify-end gap-1"},st=["href"],at=["href"],ne={__name:"SeoPageIssueTable",props:{rows:{type:Array,required:!0},isLoading:{type:Boolean,required:!0},emptyLabel:{type:String,required:!1},showHttpStatus:{type:Boolean,required:!1}},setup(h){const R=h,w=y(()=>R.showHttpStatus&&R.rows.some(p=>p.http_status!=null));function m(p){return p==null?"":p>=500?"text-red-700 bg-red-50":p>=400?"text-amber-700 bg-amber-50":"text-voix-admin-700 bg-voix-admin-50"}return(p,x)=>{const v=xe;return s(),i("div",Xe,[h.isLoading?(s(),i("div",Ze," Loading⦠")):h.rows.length?(s(),i("table",Ge,[e("thead",Qe,[e("tr",Ye,[x[0]||(x[0]=e("th",{class:"px-4 py-3 font-semibold"}," URL ",-1)),w.value?(s(),i("th",Je," Status ")):b("",!0),x[1]||(x[1]=e("th",{class:"px-4 py-3 font-semibold"}," Reason ",-1)),x[2]||(x[2]=e("th",{class:"px-4 py-3 font-semibold text-right"}," Actions ",-1))])]),e("tbody",null,[(s(!0),i(T,null,V(h.rows,(r,f)=>(s(),i("tr",{key:`${r.url}-${f}`,class:"border-b border-voix-admin-100 last:border-b-0 hover:bg-voix-admin-50/40"},[e("td",We,l(r.url),1),w.value?(s(),i("td",et,[r.http_status!=null?(s(),i("span",{key:0,class:j(["inline-flex items-center px-2 py-0.5 rounded text-[11px] font-mono",m(r.http_status)])},l(r.http_status),3)):b("",!0)])):b("",!0),e("td",tt,l(r.reason),1),e("td",nt,[e("div",ot,[e("a",{href:`/voix/studio?editing=${r.url}`,class:"inline-flex items-center justify-center w-8 h-8 rounded-md text-voix-admin-500 hover:bg-voix-admin-100 hover:text-voix-admin-900 transition-colors",title:"Open in Studio editor"},[d(v,{name:"heroicons:pencil-square-20-solid",size:"16"})],8,st),e("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center justify-center w-8 h-8 rounded-md text-voix-admin-500 hover:bg-voix-admin-100 hover:text-voix-admin-900 transition-colors",title:"View page in new tab"},[d(v,{name:"heroicons:arrow-top-right-on-square-20-solid",size:"16"})],8,at)])])]))),128))])])):(s(),i("div",Ke,l(h.emptyLabel??"No issues found."),1))])}}};function it(){const h=u([]),R=u(null),w=u(!1),m=u(!1);async function p(){w.value=!0;try{const r=await ee("/api/admin/voix/seo/page-report-schedules");h.value=r.data,R.value=r.base_url??null}finally{w.value=!1}}async function x(r){m.value=!0;try{const f=await ee("/api/admin/voix/seo/page-report-schedules",{method:"POST",body:r});return h.value=[f.data,...h.value],f.data}finally{m.value=!1}}async function v(r){await ee(`/api/admin/voix/seo/page-report-schedules/${r}`,{method:"DELETE"}),h.value=h.value.filter(f=>f.id!==r)}return{schedules:h,baseUrl:R,isLoading:w,isSaving:m,fetchSchedules:p,createSchedule:x,deleteSchedule:v}}const lt={class:"inline-flex items-center rounded-md bg-voix-admin-100/70 p-0.5 text-sm"},rt={key:0,class:"inline-flex items-center justify-center min-w-[1.25rem] h-5 px-1.5 text-[11px] font-semibold rounded-full bg-voix-admin-200 text-voix-admin-700"},dt={class:"flex-1 min-w-0 flex flex-col"},ut={class:"px-8 pt-6 pb-4 border-b border-voix-admin-200 flex items-start justify-between gap-6"},ct={class:"text-base font-semibold text-voix-admin-900"},mt={class:"text-xs text-voix-admin-500 mt-1"},xt={key:0,class:"flex items-center gap-3 shrink-0"},pt={class:"text-xs text-voix-admin-500"},vt=["disabled"],ht={class:"flex-1 min-h-0 overflow-y-auto bg-voix-admin-50/40 p-6"},ft={key:0,class:"rounded-xl border border-voix-admin-200/70 bg-white shadow-sm px-5 py-5"},gt={class:"mb-4 flex gap-3 rounded-lg border border-voix-admin-100 bg-voix-admin-50/60 px-4 py-3"},bt={class:"text-sm text-voix-admin-700 leading-relaxed"},yt={key:0,class:"block mt-1 text-voix-admin-500"},_t={class:"mb-4 flex gap-3 rounded-lg border border-voix-admin-100 bg-voix-admin-50/60 px-4 py-3"},wt={class:"mb-4 flex gap-3 rounded-lg border border-voix-admin-100 bg-voix-admin-50/60 px-4 py-3"},kt={class:"text-sm text-voix-admin-700 leading-relaxed"},St={key:0,class:"block mt-1 text-voix-admin-500"},Rt={key:1,class:"space-y-5"}
1,Pt={class:"rounded-xl border border-voix-admin-200/70 bg-white shadow-sm"},Lt={class:"p-5 space-y-4"},At=["value"],Nt={class:"flex flex-wrap items-end gap-3"},Tt={class:"flex items-center gap-2"},Ct=["value"],$t={class:"flex items-center gap-1"},Dt=["value"],Et=["value"],Mt=["value"],It=["value"],Ut=["disabled","title"],zt={key:0,class:"text-xs text-rose-700 bg-rose-50 border border-rose-200 rounded-md px-3 py-2"},Ot={key:1,class:"text-xs text-emerald-700 bg-emerald-50 border border-emerald-200 rounded-md px-3 py-2"},Bt={class:"font-medium"},Ft={class:"rounded-xl border border-voix-admin-200/70 bg-white shadow-sm"},Vt={class:"p-5"},jt={key:0,class:"text-sm text-voix-admin-500 text-center py-8"},qt={key:1,class:"text-sm text-voix-admin-500 text-center py-8"},Ht={key:2,class:"divide-y divide-voix-admin-100"},Xt={class:"flex items-start gap-3"},Zt=["href","title"],Kt=["onClick"],Gt={class:"mt-2 flex flex-wrap gap-x-6 gap-y-2 text-xs"},Qt={class:"text-voix-admin-700 mt-0.5"},Yt={class:"text-voix-admin-500"},Jt={class:"text-voix-admin-700 mt-0.5"},Wt={key:0,class:"text-voix-admin-500"},en={class:"text-voix-admin-500 mt-0.5"},tn={key:0},nn={key:0,class:"fixed inset-0 z-[60]"},on={class:"absolute inset-0 flex items-center justify-center p-4 pointer-events-none"},sn={class:"relative w-full md:w-[480px] bg-white rounded-xl shadow-2xl border border-voix-admin-200 overflow-hidden pointer-events-auto flex flex-col max-h-[90vh]"},an={class:"flex items-center gap-3 px-5 py-4 border-b border-voix-admin-100 shrink-0"},ln={class:"w-7 h-7 rounded-md bg-rose-100 text-rose-700 flex items-center justify-center"},rn={class:"px-5 py-4 overflow-y-auto flex-1"},dn={class:"text-[13px] text-voix-admin-600 leading-relaxed"},un={class:"font-mono text-voix-admin-900"},cn=12,Pn={__name:"Index",setup(h){const R=/^\d{4}-\d{2}-\d{2}$/,w=/^https?:\/\//i,m=De(),p=u({"non-indexable":[],duplicate:[],"duplicate-canonical":[],orphaned:[]}),x=u({"non-indexable":!1,duplicate:!1,"duplicate-canonical":!1,orphaned:!1}),v=u({"non-indexable":null,duplicate:null,"duplicate-canonical":null,orphaned:null}),r=u(!1);let f=null,E=!1,M=0,oe=0;const{schedules:C,baseUrl:pe,isLoading:ve,isSaving:se,fetchSchedules:he,createSchedule:fe,deleteSchedule:ge}=it(),ae=He(),ie=y(()=>ae.get("system.runScheduledPageReports",!1)===!0),I=y(()=>v.value["non-indexable"]??v.value["duplicate-canonical"]??v.value.orphaned),U=y(()=>r.value||I.value?.is_crawling===!0),z=y(()=>pe.value??I.value?.base_url??""),be=y(()=>[...p.value.duplicate,...p.value["duplicate-canonical"]]),ye=y(()=>x.value.duplicate||x.value["duplicate-canonical"]),_e=y(()=>{const n=I.value?.last_run_at;if(!n)return"Never crawled";const t=Math.max(1,Math.round((Date.now()-new Date(n).getTime())/6e4));if(t<60)return`Last refreshed ${t} min ago`;const a=Math.round(t/60);return a<24?`Last refreshed ${a} h ago`:`Last refreshed ${Math.round(a/24)} d ago`});function we(n){if(!n)return null;const t=n.slice(0,10);return R.test(t)?t:n}async function _(n){x.value[n]=!0;try{const a=await(n==="duplicate"?Be:n==="duplicate-canonical"?Fe:n==="orphaned"?Ve:je)();p.value[n]=(a.data??[]).map(o=>({...o,last_crawled:we(o.last_crawled)})),v.value[n]=a.meta??null}catch(t){m.add(t?.data?.error||`Failed to load ${n} pages.`,"error")}finally{x.value[n]=!1}}function ke(){_("non-indexable"),_("duplicate"),_("duplicate-canonical"),_("orphaned")}async function Se(){if(!r.value){r.value=!0;try{await qe(),m.add("Page Report crawl in progress...","info"),q({alreadyRunning:!1})}catch(n){r.value=!1;const t=n?.response?.status??n?.status;t===409?(m.add("A crawl is already running. Polling for completion.","info"),q({alreadyRunning:!0})):t===429?m.add("Slow down â wait a minute before refreshing again.","warning"):m.add(n?.data?.error||"Failed to start crawl.","error")}}}function q({alreadyRunning:n}){f&&clearInterval(f),E=n,M=0,oe=Date.now(),f=setInterval(async()=>{M++,await _("non-indexable");const t=v.value["non-indexable"];if(t?.is_crawling===!0){E=!0;return}const g=(t?.last_run_at?new Date(t.last_run_at).getTime():0)>=oe;if(E||g){H(),ke();const A=t?.status;A==="completed"?m.add("Page Report crawl complete.","msg"):A==="failed"?m.add("Page Report crawl failed. Check the logs for details.","error"):A==="aborted"&&m.add("Page Report crawl aborted â too many pages to crawl.","warning");return}M>=cn&&(H(),m.add("Crawl didn't start â is the page-reports queue worker running?","warning"))},5e3)}function H(){f&&(clearInterval(f),f=null),E=!1,M=0,r.value=!1}const k=u("reports");function Re(){k.value="reports"}function Pe(){ie.value&&(k.value="schedules",he())}const X=u(7),$=u(3),Z=u(0),P=u((typeof Intl<"u"?Intl.DateTimeFormat().resolvedOptions().timeZone:"")||"UTC"),D=u(null),O=u(null),Le=["AM","PM"],B=u($.value>=12?"PM":"AM"),K=y({get(){const n=$.value;return n===0?12:n>12?n-12:n},set(n){$.value=le(n,B.value)}});Ee(B,n=>
1{$.value=le(K.value,n)});function le(n,t){const a=n%12;return t==="PM"?a+12:a}function G(n,t,a,o){const g=n.target,A=g.value===""?a:Number(g.value),W=Math.max(a,Math.min(o,Number.isFinite(A)?Math.floor(A):a));t(W),g.value!==String(W)&&(g.value=String(W))}const Ae=y(()=>{const n=["UTC","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","America/Phoenix","America/Anchorage","Pacific/Honolulu","Europe/London","Europe/Paris","Europe/Berlin","Europe/Madrid","Asia/Tokyo","Asia/Shanghai","Asia/Kolkata","Asia/Dubai","Australia/Sydney"];return P.value&&!n.includes(P.value)?[P.value,...n]:n}),re=y(()=>{if(!O.value)return"";const n=new Date(O.value);return Number.isNaN(n.getTime())?"":n.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"})});async function Ne(){if(D.value=null,O.value=null,!z.value.trim()){D.value="No base URL configured for this site. Set VOIX_PAGE_REPORTS_BASE_URL or add a domain to the site before scheduling.";return}try{const t=await fe({enabled:!0,interval_days:Math.max(0,X.value??0),hour:$.value,minute:Z.value,timezone:P.value});O.value=t.next_run_at,m.add("Scheduled crawl saved.","msg")}catch(t){D.value=t?.data?.error||t?.data?.message||"Failed to save schedule."}}const Q=u(null),Y=u(""),J=u(!1);function Te(n){Q.value=n.id,Y.value=n.base_url,J.value=!0}function F(){J.value=!1,Q.value=null,Y.value=""}async function Ce(){const n=Q.value;if(n!==null)try{await ge(n)}catch(t){console.warn("Failed to delete schedule",t)}finally{F()}}function L(n){if(!n)return{date:"â",time:""};const t=new Date(n);if(Number.isNaN(t.getTime()))return{date:"â",time:""};const a=t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),o=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",timeZoneName:"short"});return{date:a,time:o}}function de(n){const t=n.hour.toString().padStart(2,"0"),a=n.minute.toString().padStart(2,"0");let o;return n.interval_days===0?o="Once (today)":n.interval_days===1?o="Every day":o=`Every ${n.interval_days} days`,{primary:o,secondary:`${t}:${a} · ${n.timezone}`}}function $e(n){try{return new URL(n).hostname}catch{return n.replace(w,"").split("/")[0]??n}}return Me(async()=>{ae.ensureLoaded().catch(()=>{}),await _("non-indexable"),I.value?.is_crawling===!0&&q({alreadyRunning:!0}),_("duplicate"),_("duplicate-canonical"),_("orphaned")}),Ie(()=>H()),(n,t)=>{const a=xe;return s(),ue(ze,{title:"SEO ⺠Page Reports",permissions:["SEO"],"help-doc":"/voix/documentation/voixuserguide/seo/page-reports",fullbleed:""},{topbar:N(()=>[e("div",lt,[e("button",{type:"button",class:j(["inline-flex items-center gap-1.5 h-8 px-3 rounded font-medium transition-colors cursor-pointer",k.value==="reports"?"bg-white text-voix-admin-900 shadow-sm":"text-voix-admin-600 hover:text-voix-admin-800"]),onClick:Re},[d(a,{name:"heroicons:document-magnifying-glass-20-solid",size:"15"}),t[5]||(t[5]=c(" Page Reports ",-1))],2),ie.value?(s(),i("button",{key:0,type:"button",class:j(["inline-flex items-center gap-1.5 h-8 px-3 rounded font-medium transition-colors cursor-pointer",k.value==="schedules"?"bg-white text-voix-admin-900 shadow-sm":"text-voix-admin-600 hover:text-voix-admin-800"]),onClick:Pe},[d(a,{name:"heroicons:calendar-20-solid",size:"15"}),t[6]||(t[6]=c(" Scheduled Reports ",-1)),S(C).length>0?(s(),i("span",rt,l(S(C).length),1)):b("",!0)],2)):b("",!0)])]),default:N(()=>[e("section",dt,[e("header",ut,[e("div",null,[e("h2",ct,l(k.value==="schedules"?"Scheduled Page Reports":"Page Reports"),1),e("p",mt,[k.value==="schedules"?(s(),i(T,{key:0},[c(" Recurring Page Reports crawls configured for this site. ")],64)):(s(),i(T,{key:1},[c(" Pages that can't be indexed, share a title or canonical, or have no inbound links. ")],64))])]),k.value==="reports"?(s(),i("div",xt,[e("span",pt,l(_e.value),1),e("button",{type:"button",class:"inline-flex items-center gap-2 rounded-md border border-voix-admin-200 bg-white px-3 py-1.5 text-sm font-medium text-voix-admin-700 hover:bg-voix-admin-50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",disabled:U.value,onClick:Se},[d(a,{name:U.value?"heroicons:arrow-path":"heroicons:arrow-path-20-solid",size:"16",class:j({"animate-spin":U.value})},null,8,["name","class"]),c(" "+l(U.value?"Refreshingâ¦":"Refresh Page Reports"),1)],8,vt)])):b("",!0)]),e("div",ht,[k.value==="reports"?(s(),i("div",ft,[d(Oe,null,{default:N(()=>[d(te,{name:"Non-indexable"},{default:N(()=>[e("div",gt,[d(a,{name:"heroicons:information-circle",size:"20",class:"shrink-0 text-voix-admin-500 mt-0.5"}),e("p",bt,[t[7]||(t[7]=c(" Pages search engines won't index â flagged by a ",-1)),t[8]||(t[8]=e("co
1de",{class:"px-1 py-0.5 rounded bg-voix-admin-100 text-[12px] text-voix-admin-800"},"noindex",-1)),t[9]||(t[9]=c(" tag, a redirect, robots.txt block, a non-2xx HTTP response, or a discrepancy between CMS state and rendered HTML. ",-1)),v.value["non-indexable"]?.message?(s(),i("span",yt,l(v.value["non-indexable"].message),1)):b("",!0)])]),d(ne,{rows:p.value["non-indexable"],"is-loading":x.value["non-indexable"],"show-http-status":"","empty-label":"No non-indexable pages."},null,8,["rows","is-loading"])]),_:1}),d(te,{name:"Duplicates"},{default:N(()=>[e("div",_t,[d(a,{name:"heroicons:information-circle",size:"20",class:"shrink-0 text-voix-admin-500 mt-0.5"}),t[10]||(t[10]=e("p",{class:"text-sm text-voix-admin-700 leading-relaxed"},[c(" Pages that share a title or a "),e("code",{class:"px-1 py-0.5 rounded bg-voix-admin-100 text-[12px] text-voix-admin-800"},'<link rel="canonical">'),c(" with at least one other page. Detected at crawl time â click Refresh to update. ")],-1))]),d(ne,{rows:be.value,"is-loading":ye.value,"empty-label":"No duplicates. Click Refresh if you haven't crawled recently."},null,8,["rows","is-loading"])]),_:1}),d(te,{name:"Orphaned"},{default:N(()=>[e("div",wt,[d(a,{name:"heroicons:information-circle",size:"20",class:"shrink-0 text-voix-admin-500 mt-0.5"}),e("p",kt,[t[11]||(t[11]=c(" Published pages no internal link points to, and which aren't reachable through a redirect or language switcher. ",-1)),v.value.orphaned?.disclaimer?(s(),i("span",St,l(v.value.orphaned.disclaimer),1)):b("",!0)])]),d(ne,{rows:p.value.orphaned,"is-loading":x.value.orphaned,"empty-label":"No orphaned pages."},null,8,["rows","is-loading"])]),_:1})]),_:1})])):(s(),i("div",Rt,[e("div",Pt,[t[19]||(t[19]=e("div",{class:"px-5 py-4 border-b border-voix-admin-100 bg-voix-admin-50/40"},[e("h3",{class:"text-sm font-semibold text-voix-admin-700"}," Run a Page Reports crawl on a schedule "),e("p",{class:"text-xs text-voix-admin-500 mt-0.5"}," Re-crawls the site on the cadence below. Each run replaces the previous Page Reports snapshot. ")],-1)),e("div",Lt,[e("div",null,[t[12]||(t[12]=e("label",{class:"block text-sm font-medium text-voix-admin-700 mb-1"}," Base URL ",-1)),e("input",{value:z.value,type:"text",readonly:"",placeholder:"No base URL configured",class:"w-full rounded-md border border-voix-admin-200 bg-voix-admin-50 px-3 py-2 text-sm font-mono text-voix-admin-700 focus:outline-none cursor-default"},null,8,At)]),e("div",Nt,[e("div",null,[t[14]||(t[14]=e("label",{class:"block text-xs font-medium text-voix-admin-600 mb-1"}," Every ",-1)),e("div",Tt,[e("input",{value:X.value,type:"number",min:0,max:365,autocomplete:"off",class:"w-20 rounded-md border border-voix-admin-200 px-3 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-teal-500/30",onInput:t[0]||(t[0]=o=>G(o,g=>X.value=g,0,365))},null,40,Ct),t[13]||(t[13]=e("span",{class:"text-sm text-voix-admin-600"},"days",-1))])]),e("div",null,[t[16]||(t[16]=e("label",{class:"block text-xs font-medium text-voix-admin-600 mb-1"}," At ",-1)),e("div",$t,[e("input",{value:K.value,type:"number",min:1,max:12,autocomplete:"off",name:"page-reports-schedule-hour",class:"w-16 rounded-md border border-voix-admin-200 px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-teal-500/30",onInput:t[1]||(t[1]=o=>G(o,g=>K.value=g,1,12))},null,40,Dt),t[15]||(t[15]=e("span",{class:"text-sm text-voix-admin-600"},":",-1)),e("input",{value:Z.value,type:"number",min:0,max:59,autocomplete:"off",name:"page-reports-schedule-minute",class:"w-16 rounded-md border border-voix-admin-200 px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-teal-500/30",onInput:t[2]||(t[2]=o=>G(o,g=>Z.value=g,0,59))},null,40,Et),ce(e("select",{"onUpdate:modelValue":t[3]||(t[3]=o=>B.value=o),class:"ml-1 rounded-md border border-voix-admin-200 px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-teal-500/30"},[(s(),i(T,null,V(Le,o=>e("option",{key:o,value:o},l(o),9,Mt)),64))],512),[[me,B.value]])])]),e("div",null,[t[17]||(t[17]=e("label",{class:"block text-xs font-medium text-voix-admin-600 mb-1"}," Timezone ",-1)),ce(e("select",{"onUpdate:modelValue":t[4]||(t[4]=o=>P.value=o),class:"rounded-md border border-voix-admin-200 px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-teal-500/30 max-w-[220px]"},[(s(!0),i(T,null,V(Ae.value,o=>(s(),i("option",{key:o,value:o},l(o),9,It))),128))],512),[[me,P.value]])]),e("button",{type:"button",class:"inline-flex items-center gap-1.5 h-9 px-4 roun
1ded-md bg-teal-500 text-white text-sm font-medium hover:bg-teal-600 disabled:opacity-50 disabled:cursor-not-allowed",disabled:S(se)||!z.value,title:z.value?"":"No base URL configured for this site.",onClick:Ne},[d(a,{name:"heroicons:calendar",size:"16"}),c(" "+l(S(se)?"Savingâ¦":"Save schedule"),1)],8,Ut)]),D.value?(s(),i("p",zt,[d(a,{name:"heroicons:exclamation-circle",size:"14",class:"inline mr-1 align-text-bottom"}),c(" "+l(D.value),1)])):re.value?(s(),i("p",Ot,[d(a,{name:"heroicons:check-circle",size:"14",class:"inline mr-1 align-text-bottom"}),t[18]||(t[18]=c(" Saved. Next run: ",-1)),e("span",Bt,l(re.value),1)])):b("",!0)])]),e("div",Ft,[t[23]||(t[23]=e("div",{class:"px-5 py-4 border-b border-voix-admin-100 bg-voix-admin-50/40"},[e("h3",{class:"text-sm font-semibold text-voix-admin-700"}," Active schedules "),e("p",{class:"text-xs text-voix-admin-500 mt-0.5"}," Delete a schedule to stop it â you can re-create it from the form above. ")],-1)),e("div",Vt,[S(ve)&&S(C).length===0?(s(),i("div",jt," Loading schedules⦠")):S(C).length===0?(s(),i("div",qt," No scheduled crawls yet. ")):(s(),i("ul",Ht,[(s(!0),i(T,null,V(S(C),o=>(s(),i("li",{key:o.id,class:"py-4 first:pt-0 last:pb-0 hover:bg-voix-admin-50/40 -mx-1 px-1 rounded transition-colors"},[e("div",Xt,[e("a",{href:o.base_url,target:"_blank",rel:"noopener noreferrer",class:"flex-1 min-w-0 text-sm font-mono text-voix-admin-900 truncate hover:underline",title:o.base_url},l($e(o.base_url)),9,Zt),e("button",{type:"button",class:"shrink-0 p-1.5 rounded text-voix-admin-400 hover:text-rose-600 hover:bg-rose-50 transition-colors",title:"Delete scheduled crawl",onClick:g=>Te(o)},[d(a,{name:"heroicons:trash-20-solid",size:"16"})],8,Kt)]),e("dl",Gt,[e("div",null,[t[20]||(t[20]=e("dt",{class:"text-voix-admin-400 uppercase tracking-wide font-medium"}," Cadence ",-1)),e("dd",Qt,[c(l(de(o).primary)+" ",1),e("span",Yt,"· "+l(de(o).secondary),1)])]),e("div",null,[t[21]||(t[21]=e("dt",{class:"text-voix-admin-400 uppercase tracking-wide font-medium"}," Next run ",-1)),e("dd",Jt,[c(l(L(o.next_run_at).date)+" ",1),L(o.next_run_at).time?(s(),i("span",Wt,"· "+l(L(o.next_run_at).time),1)):b("",!0)])]),e("div",null,[t[22]||(t[22]=e("dt",{class:"text-voix-admin-400 uppercase tracking-wide font-medium"}," Last run ",-1)),e("dd",en,[c(l(L(o.last_run_at).date)+" ",1),L(o.last_run_at).time?(s(),i("span",tn,"· "+l(L(o.last_run_at).time),1)):b("",!0)])])])]))),128))]))])])]))])]),(s(),ue(Ue,{to:"#voix-admin-root"},[J.value?(s(),i("div",nn,[e("div",{class:"absolute inset-0 bg-voix-admin-900/60 backdrop-blur-sm",onClick:F}),e("div",on,[e("div",sn,[e("div",an,[e("div",ln,[d(a,{name:"heroicons:trash-20-solid",size:"15"})]),t[24]||(t[24]=e("div",{class:"flex-1 min-w-0"},[e("h3",{class:"text-[15px] font-semibold text-voix-admin-900 tracking-tight leading-tight"}," Delete this scheduled crawl? "),e("div",{class:"font-mono text-[11px] text-voix-admin-400 leading-tight mt-0.5"}," seo â page-reports â schedules ")],-1)),e("button",{type:"button",class:"w-7 h-7 rounded-md flex items-center justify-center text-voix-admin-400 hover:bg-voix-admin-100 hover:text-voix-admin-900 cursor-pointer",onClick:F},[d(a,{name:"heroicons:x-mark-20-solid",size:"14"})])]),e("div",rn,[e("p",dn,[t[25]||(t[25]=c(" The recurring Page Reports crawl for ",-1)),e("span",un,l(Y.value),1),t[26]||(t[26]=c(" will stop. You can re-create it from the form above. ",-1))])]),e("div",{class:"flex items-center justify-end gap-2 px-5 py-3 border-t border-voix-admin-100 bg-voix-admin-50/80 backdrop-blur shrink-0"},[e("button",{type:"button",class:"h-9 px-4 rounded-md text-[13px] font-medium text-voix-admin-700 hover:bg-voix-admin-100 cursor-pointer",onClick:F}," Cancel "),e("button",{type:"button",class:"h-9 px-4 rounded-md bg-rose-600 hover:bg-rose-700 text-white text-[13px] font-medium shadow-sm inline-flex items-center gap-1.5 cursor-pointer",onClick:Ce}," Delete ")])])])])):b("",!0)]))]),_:1})}}};export{Pn 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.