1import{_ as V}from"./BSS67al9.js";import{_ as A}from"./CPOkjfV5.js";import{ba as P,e as $,c as R,b as B,f as w,g as I,k as o,w as t,V as v,B as M,q as d,aj as O,r as j,p as _,l as x,j as z,n,t as u,X as E,am as G,s as H,M as S,L as k}from"./DkI6cOfr.js";import"./Bq0SJq0f.js";import"./DQdvHCcE.js";import"./C9lMfmWk.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},m=new i.Error().stack;m&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[m]="3eb50f7d-d239-4e08-9055-c9d96ebb3688",i._sentryDebugIdIdentifier="sentry-dbid-3eb50f7d-d239-4e08-9055-c9d96ebb3688")}catch{}})();const U={class:"px-6 pt-6 pb-4"},F={class:"d-flex flex-column"},L={class:"text-subtitle-2 font-weight-medium"},X={class:"text-caption text-medium-emphasis"},Q={class:"text-subtitle-2 text-medium-emphasis"},ee=P({__name:"DNSPropagationChecker",props:{domain:{},domainSlug:{}},setup(i){$({title:"Propagation checker"}),R();const m=i,g=S(()=>m.domain?.domain||m.domainSlug||""),{$apiFetch:N}=B(),f=k(!1),c=k([]),y=k({recordType:"A"}),T=[{title:"Status",key:"status",sortable:!1,align:"start"},{title:"Server",key:"server",sortable:!1,align:"start"},{title:"Location",key:"location",sortable:!1,align:"start"},{title:"Response",key:"responseTime",sortable:!1,align:"end"}],D=[{server:"8.8.8.8",location:"Google (US)",provider:"Google"},{server:"1.1.1.1",location:"Cloudflare (US)",provider:"Cloudflare"},{server:"9.9.9.9",location:"Quad9 (Switzerland)",provider:"Quad9"},{server:"208.67.222.222",location:"OpenDNS (UK)",provider:"OpenDNS"},{server:"1.0.0.1",location:"Cloudflare (Asia)",provider:"Cloudflare"},{server:"8.8.4.4",location:"Google (Europe)",provider:"Google"},{server:"208.67.220.220",location:"OpenDNS (Australia)",provider:"OpenDNS"}],b=S(()=>{if(c.value.length===0)return{type:"info",title:"No Results",message:"Run a propagation check to see results."};const p=c.value.filter(a=>a.success).length,e=c.value.length,l=Math.round(p/e*100);return l===100?{type:"success",title:"Fully Propagated",message:`DNS records are consistent across all ${e} servers worldwide.`}:l>=70?{type:"warning",title:"Mostly Propagated",message:`${p}/${e} servers (${l}%) have the updated records. Propagation in progress.`}:{type:"error",title:"Propagation Issues",message:`${p}/${e} servers (${l}%) have updated records.`}}),C=async()=>{if(!g.value)return;const p=g.value;f.value=!0,c.value=[];try{const e=y.value.recordType,l=D.map(async a=>{const s=Date.now();try{const r=await N("/api/dns/lookup",{method:"POST",body:{hostname:p,recordType:e,server:a.server}}),h=Date.now()-s;return{server:a.server,location:a.location,provider:a.provider,success:r.success,value:r.success&&r.records?Array.isArray(r.records)?r.records.join(", "):r.records:null,error:r.success?null:r.error||"No records found",responseTime:h}}catch(r){const h=Date.now()-s;return{server:a.server,location:a.location,provider:a.provider,success:!1,error:r?.message||"DNS lookup failed",responseTime:h}}});c.value=await Promise.all(l)}catch(e){console.error("Propagation check failed:",e)}finally{f.value=!1}};return(p,e)=>{const l=V,a=A;return w(),I("div",U,[o(l,{title:"Propagation Checker",subtitle:"Check if your DNS changes have propagated worldwide.","show-divider":!1}),o(x,null,{default:t(()=>[o(v,{cols:"12",lg:"6",xl:"4"},{default:t(()=>[o(M,{class:"text-subtitle-2 text-medium-emphasis mb-2 d-inline-flex"},{default:t(()=>[...e[1]||(e[1]=[d("Record Type",-1)])]),_:1}),o(O,{modelValue:y.value.recordType,"onUpdate:modelValue":e[0]||(e[0]=s=>y.value.recordType=s),items:["A","AAAA","CNAME","MX","TXT","NS"],variant:"outlined",density:"comfortable",class:"mb-4","hide-details":"auto"},null,8,["modelValue"]),o(j,{color:"primaryButtons",block:"",height:"40",loading:f.value,disabled:!g.value,onClick:C},{default:t(()=>[o(_,{size:"small",class:"mr-1"},{default:t(()=>[...e[2]||(e[2]=[d(" $searchIcon ",-1)])]),_:1}),e[3]||(e[3]=d(" Check Propagation ",-1))]),_:1},8,["loading","disabled"])]),_:1})]),_:1}),c.value.length>0?(w(),z(x,{key:0},{default:t(()=>[o(v,{class:"d-flex align-center justify-space-between"},{default:t(()=>[...e[4]||(e[4]=[n("h2",{class:"text-h6 font-weight-medium text-medium-emphasis mb-8"},"Propagation Results",-1)])]),_:1}),o(v,{class:"pt-0",cols:"12"},{default:t(()=>[o(a,{plain:"",headers:T,items:c.value,loading:f.value,noActions:"","item-value":"server",hover:"","empty-state-icon":"$searchIcon","empty-state-title":"No Results","empty-state-message":"Run a propagation check to see results."},{"item.status":t(({item:s})=>[o(_,{color:s.success?"primary-dark":"error",size:"small"},{default:t(()=>[d(u(s.success?"$checkIcon":"$closeIcon"),1)]),_:2}
1,1032,["color"])]),"item.server":t(({item:s})=>[n("div",F,[n("span",L,u(s.server),1),n("span",X,u(s.value||s.error),1)])]),"item.location":t(({item:s})=>[o(E,{variant:"flat",size:"small",color:"secondary",density:"comfortable",label:""},{default:t(()=>[d(u(s.location),1)]),_:2},1024)]),"item.responseTime":t(({item:s})=>[n("div",Q,u(s.responseTime)+"ms",1)]),_:1},8,["items","loading"]),o(G,{type:b.value.type,variant:"tonal",class:"mt-3",density:"comfortable"},{default:t(()=>[n("strong",null,u(b.value.title),1),e[5]||(e[5]=n("br",null,null,-1)),d(" "+u(b.value.message),1)]),_:1},8,["type"])]),_:1}),o(v,{cols:"12",class:"py-4 d-flex align-start"},{default:t(()=>[o(_,{class:"mr-2"},{default:t(()=>[...e[6]||(e[6]=[d("$infoIcon",-1)])]),_:1}),e[7]||(e[7]=n("p",{class:"text-subtitle-2 font-weight-medium mb-1"},"DNS propagation can take up to 48 hours worldwide. If youâre seeing inconsistencies, keep monitoring.",-1))]),_:1})]),_:1})):H("",!0)])}}});export{ee 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.