1import{u as g,_ as b}from"./COzqNNnf.js";import{cq as h,cv as c,cG as m,ab as w,a9 as v,ce as u,a7 as M,a8 as k,cp as x,bl as T,bz as f}from"./BPlt5jNJ.js";import{u as B}from"./D8EIqSaY.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="621ac3db-fa57-4e80-8fb7-87767ca77077",e._sentryDebugIdIdentifier="sentry-dbid-621ac3db-fa57-4e80-8fb7-87767ca77077")}catch{}{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:splash-application":!0})}const N={__name:"[...route]",async setup(e){let a,r;const t=h(),d=x(),y=c("countryCode",()=>t.query["cloudfront-viewer-country"]??d["cloudfront-viewer-country"]??void 0),s=c("customHostName",()=>d["x-splash-host"]);B();let l=null,n=null;s.value?n=t.params.route?t.params.route[0]:null:(l=t.params.route?t.params.route[0]:null,n=t.params.route?t.params.route[1]:null);const i=["get-campaign",s.value,l,n].filter(Boolean).join("-");c("data-key",()=>i);const{data:o,status:p}=([a,r]=m(()=>g("/api/campaign",{key:i,method:"POST",body:{custom:s.value,slug:l,path:n}},"$wnZxJGd7Hw")),a=await a,r(),a);if(p.value==="error")throw w({statusCode:404,message:"not found"});return p.value==="success"&&o.value.campaign.custom_host&&o.value.campaign.redirect&&!(s.value??"").includes(o.value.campaign.custom_host)&&([a,r]=m(()=>T(`https://${o.value.campaign.custom_host}`,{external:!0})),await a,r()),(C,E)=>{const _=b;return f(),v("div",null,[u(o)?(f(),M(_,{key:0,name:"campaign","campaign-data":u(o),path:u(n),"country-code":u(y),"custom-host-name":u(s)},null,8,["campaign-data","path","country-code","custom-host-name"])):k("",!0)])}}};export{N 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.