PageSourceSearch

https://www.sideprojectors.com/build/assets/Subscribe-DP6VKO9a.js

js sideprojectors.com collected 2026-09-24 08:46:19 UTC 4,388 bytes, 1 lines download raw bytes

1import{S as v}from"./SubmitButton-CwcskGz4.js";import{F as k}from"./Simple-BLjuFar5.js";import{i as g}from"./isEmailValid-Cq8bst8j.js";import{a as _}from"./apiPost-C4xD0A-h.js";import{_ as q,c as r,a as i,f as n,F as u,j as a,k as w,t as x,d as b,v as d,b as m,h as F,r as y,o as t}from"./app-D-cVr9vr.js";import"./getCSRF-7MinvhD0.js";const V={components:{SubmitButton:v,Footer:k},data(){return{loading:!1,emailError:null,subscribed:!1,subscriber:{email:null,frequency:"weekly",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}}},async mounted(){if(this.$route.params.key){let o=await F("/newsletter/subscriber-via-key",{key:this.$route.params.key});this.subscriber=await o.body}this.$nextTick(()=>{this.$refs.email!=null&&this.$refs.email.focus()})},methods:{async submit(){let o=!0;if(this.emailError=null,(this.subscriber.email==null||!g(this.subscriber.email))&&(this.emailError="Please type a valid email.",o=!1),o){this.loading=!0;const c=await(await _("/newsletter/subscribe",{subscriber:this.subscriber})).body;this.loading=!1,c.error!=null?this.emailError=c.error:this.subscribed=!0}}}},E={key:0,class:"max-w-lg mx-auto px-6 lg:px-8 mt-12"},S={class:"text-lg ml-2 dark:text-white"},B={class:"bg-white border border-gray-300 p-6 rounded-lg mt-4"},U={key:0,class:""},N={class:""},C={class:"form-line"},D=["disabled"],T={key:0,class:"input-error"},j={class:"form-line flex items-center space-x-4"},M={class:"flex items-center space-x-2"},P=["disabled"],W={class:"flex items-center space-x-2"},Y=["disabled"],G={class:"flex items-center space-x-2"},z=["disabled"],I={class:"flex items-center space-x-2"},O=["disabled"],R={class:"button-line"},Z={class:"mt-6"};function A(o,e,c,H,s,f){const p=y("SubmitButton"),h=y("Footer");return!o.$route.params.key||s.subscriber!=null&&s.subscriber.id!=null?(t(),r("div",E,[i("div",S,[e[5]||(e[5]=n(" 🗞️   ")),s.subscriber.id!=null?(t(),r(u,{key:0},[n(" Update your newsletter subscription ")],64)):(t(),r(u,{key:1},[n(" Sign up for our newsletter ")],64))]),i("div",B,[s.subscribed?(t(),r("div",U,[o.$route.params.key?(t(),r(u,{key:0},[n(" You have successfully updated your newsletter subscription. ")],64)):(t(),r(u,{key:1},[n(" We have sent you an email to validate your email. Please check and click on the link to complete your subscription. ")],64))])):(t(),r(u,{key:1},[i("div",N,[s.subscriber.id?(t(),r(u,{key:0},[n(" You can update your newsletter frequency below. ")],64)):(t(),r(u,{key:1},[n(" Get the latest projects looking for buyers and co-founders and also stats around the projects you posted. Your email is never shared with anybody else and you can unsubscribe any time. ")],64))]),e[10]||(e[10]=i("div",{class:"label-line"},"Email",-1)),i("div",C,[a(i("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=l=>s.subscriber.email=l),ref:"email",class:"input-standard",disabled:s.loading},null,8,D),[[w,s.subscriber.email]]),s.emailError!==null?(t(),r("div",T,x(s.emailError),1)):b("",!0)]),e[11]||(e[11]=i("div",{class:"label-line"},"Newsletter frequency",-1)),i("div",j,[i("div",M,[a(i("input",{type:"radio",id:"frequency-daily",name:"frequency","onUpdate:modelValue":e[1]||(e[1]=l=>s.subscriber.frequency=l),disabled:s.loading,value:"daily"},null,8,P),[[d,s.subscriber.frequency]]),e[6]||(e[6]=i("label",{for:"frequency-daily"},"Daily",-1))]),i("div",W,[a(i("input",{type:"radio",id:"frequency-weekly",name:"frequency","onUpdate:modelValue":e[2]||(e[2]=l=>s.subscriber.frequency=l),disabled:s.loading,value:"weekly"},null,8,Y),[[d,s.subscriber.frequency]]),e[7]||(e[7]=i("label",{for:"frequency-weekly"},"Weekly",-1))]),i("div",G,[a(i("input",{type:"radio",id:"frequency-fortnightly",name:"frequency","onUpdate:modelValue":e[3]||(e[3]=l=>s.subscriber.frequency=l),disabled:s.loading,value:"fortnightly"},null,8,z),[[d,s.subscriber.frequency]]),e[8]||(e[8]=i("label",{for:"frequency-fortnightly"},"Fortnightly",-1))]),i("div",I,[a(i("input",{type:"radio",id:"frequency-monthly",name:"frequency","onUpdate:modelValue":e[4]||(e[4]=l=>s.subscriber.frequency=l),disabled:s.loading,value:"monthly"},null,8,O),[[d,s.subscriber.frequency]]),e[9]||(e[9]=i("label",{for:"frequency-monthly"},"Monthly",-1))])]),i("div",R,[m(p,{onClick:f.submit,loading:s.loading,label:"Sign me up!",isFullWidth:!0},null,8,["onClick","loading"])])],64))]),i("div",Z,[m(h)])])):b("",!0)}const ee=q(V,[["render",A]]);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.