import{_ as X}from"./B8SxLQeB.js";import{_ as W}from"./auXz1x8i.js";import{P as R}from"./CVVeeLZD.js";import{_ as H,c as l,F as N,i as O,f as ,γγ«g as h,e as I,o,r as k,b as s,w as a,a as r,t as n,d,h as L,q as Q}from"./Cmgq8IVP.js";import{C as P}from"./CqnOP4IQ.js";import{_ as V}from"./QZD-h4NL.js";import{_ as j}from"./D1WaFvI5.js";import{_ as z}from"./DKWg3psS.js";import{_ as F}from"./DzNgMInn.js";import{_ as Z}from"./DCjGJM2Q.js";import"./B7vWr9dW.js";import"./Cj7GpkX3.js";import"./D6K0jHqp.js";import"./CJEz0Sdj.js";import"./OtVwhkKS.js";import"./TwQxvKcL.js";import"./D3QohQNI.js";import"./DTg9vkjf.js";import"./pkEvmI4J.js";import"./BLdAhwbP.js";const x=I({name:"PeopleWritingList",components:{PeopleWritingRow:R},props:{entry_details:{type:Array,required:!0}}}),ee={id:"entry_details_list_container"};function te(e,t,i,c,m,y){const b=R;return o(),l("div",ee,[(o(!0),l(N,null,O(e.entry_details,u=>(o(),l("div",{key:u.id,class:"mb-5"},[u.num_words>0?(o(),$(b,{key:0,entry_detail:u},null,8,["entry_detail"])):h("",!0)]))),128))])}const K=H(x,[["render",te],["__scopeId","data-v-6121945e"]]),se=I({name:"HomePage",auth:!1,components:{PeopleWritingList:K,LoggedOutHomepage:j,LoggedOutHomepageV3:z,NotesList:V,HandleAndMembershipType:W,BaseButton:Z,AuthLoadingWrapper:F,CirclePostsList:P},data(){return{date:null,todays_message:null,word_count:null,num_writing:null,num_started_writing:null,num_finished_writing:null,started_writing:null,finished_writing:null,current_page:1,wordcount:null,badges:[],notes:[],display_notes:!1,can_give_speech:!1,news:[],current_status:null,percent_complete:0,wotd:null,phoenixes:null,num_phoenixes:null,paying_v2_members:null,paying_v1_members:null,paying_v1_members_on_v2:null,paying_v1_members_on_v1:null,total_paying_members:null,homepage_variant:null,creatingSpaceCourse:null,creatingSpaceCohort:null,creatingSpaceEnrollment:null,creatingSpaceLoading:!1}},computed:{authStore(){return Q()},time_left(){var e;if(this.date&&((e=this.authStore.user)==null?void 0:e.extra_utc_offset)!==void 0){const t=new Date,i=new Date(this.date);i.setHours(23,59,59,999),i.setMinutes(i.getMinutes()+this.authStore.user.extra_utc_offset);const c=i.getTime()-t.getTime();if(c<=0)return"0 hours 0 minutes";const m=Math.floor(c/(1e3*60*60)),y=Math.floor(c%(1e3*60*60)/(1e3*60));return`${m} hours ${y} minutes`}else return null},this_month_number(){return this.date?new Date(this.date).getDate():null},this_month_name(){return this.date?new Date(this.date).toLocaleDateString("en-US",{month:"long"}):null},next_month_name(){if(this.date){const e=new Date(this.date);return e.setMonth(e.getMonth()+1),e.toLocaleDateString("en-US",{month:"long"})}else return null},days_til_next_month(){if(this.date){const e=new Date(this.date),i=new Date(e.getFullYear(),e.getMonth()+1,0).getTime()-e.getTime();return Math.ceil(i/(1e3*60*60*24))}else return null},shouldShowCreatingSpace(){return this.creatingSpaceCohort&&this.creatingSpaceCohort.registration_open===!0&&this.creatingSpaceCourse}},methods:{getOrdinalText(e){try{const t=Number(e)||1;return t===1?"1st time":t===2?"2nd time":t===3?"3rd time":`${t}th time`}catch{return"1st time"}},getBadgeName(e){try{return this.$t("pages.home.badge_name",{name:e})||`${e} badge`}catch(t){return console.error("Error in getBadgeName:",t),`${e} badge`}},async loadCurrentStatus(){var e;if(this.authStore.isLoggedIn)try{const t=L(),i=await $fetch("/api/v1/account/current_status",{baseURL:t.public.railsApiUrl||"http://localhost:8080",headers:{Authorization:`Bearer ${this.authStore.token}`,"Content-Type":"application/json"}});i.status=="OK"&&(this.current_status=i.current_status,this.current_status&&this.current_status.entry&&(this.percent_complete=(((e=this.current_status.entry.entry_detail)==null?void 0:e.num_words)||0)/750*100))}catch(t){console.error("Error loading current status:",t),(t.status===401||t.statusCode===401)&&(await this.authStore.logout(),await this.$router.push("/login"))}},async recentStats(e,t){try{const i=L(),c=await $fetch(`/api/v1/entries/recent_stats/${e}/${t}`,{baseURL:i.public.railsApiUrl||"http://localhost:8080",headers:{Authorization:`Bearer ${this.authStore.token}`,"Content-Type":"application/json"}});c.status=="OK"&&(this.word_count=c.word_count,this.num_writing=c.num_writing,this.num_started_writing=c.num_started_writing,this.num_finished_writing=c.num_finished_writing,this.started_writing=c.started_writing,this.finished_writing=c.finished_writing,this.current_page=c.current_page,this.num_pages=c.pages,this.wotd=c.wotd,this.todays_message=`In the last day, ${Number(this.num_writing).toLocaleString()} people have written ${Number(this.word_count).toLocaleString()} words.`)}catch(i){console.error("Error loading recent stats:",i),(i.status===401||i.statusCode===401)&&(await this.authStore.logout(),await this.$router.push("/login"))}},async recentHallOfPhoenixes(){try{const e=L(),t=await $fetch("/api/v1/person/hall_of_phoenixes_recent/",{baseURL:e.public.railsApiUrl||"http://localhost:8080",headers:{Authorization:`Bearer ${this.authStore.token}`,"Content-Type":"application/json"}});t.status=="OK"&&(this.phoenixes=(t.phoenixes||[]).map((i,c)=>{var m,y,b,u,S,v,p;try{return{id:i.id||((m=i.user)==null?void 0:m.writer_handle)||`phoenix-${c}`,user:{writer_handle:((y=i.user)==null?void 0:y.writer_handle)||"",member_type:((b=i.user)==null?void 0:b.member_type)||"",paid_membership_level:((u=i.user)==null?void 0:u.paid_membership_level)||""},interview:{local_image:((S=i.interview)==null?void 0:S.local_image)||null,date_submitted:((v=i.interview)==null?void 0:v.date_submitted)||null,phoenix_date:((p=i.interview)==null?void 0:p.phoenix_date)||null}}}catch{return null}}).filter(i=>i&&i.user.writer_handle),this.num_phoenixes=t.num_phoenixes||0)}catch(e){console.error("Error loading hall of phoenixes:",e),this.phoenixes=[],this.num_phoenixes=0}},async recentBadges(e,t){try{const i=L(),c=await $fetch(`/api/v1/badges/recent/${e}/${t}`,{baseURL:i.public.railsApiUrl||"http://localhost:8080",headers:{Authorization:`Bearer ${this.authStore.token}`,"Content-Type":"application/json"}});c.status=="OK"&&(this.badges=(c.badges||[]).map((m,y)=>{var b,u,S,v;try{return{badge_info:{token:((b=m.badge_info)==null?void 0:b.token)||`badge-${y}`,name:((u=m.badge_info)==null?void 0:u.name)||"Unknown Badge",desc:((S=m.badge_info)==null?void 0:S.desc)||"",img:((v=m.badge_info)==null?void 0:v.img)||"default.png"},earners:(m.earners||[]).map((g,T)=>{var A,C,w;try{return{id:g.id||`earner-${y}-${T}`,number:g.number||1,speech:g.speech||null,reaction_handles:g.reaction_handles||[],user_info:{writer_handle:((A=g.user_info)==null?void 0:A.writer_handle)||"",member_type:((C=g.user_info)==null?void 0:C.member_type)||"",paid_membership_level:((w=g.user_info)==null?void 0:w.paid_membership_level)||""}}}catch{return null}}).filter(g=>g&&g.user_info.writer_handle)}}catch{return null}}).filter(m=>m&&m.badge_info.token))}catch(i){console.error("Error loading recent badges:",i),this.badges=[],(i.status===401||i.statusCode===401)&&(await this.authStore.logout(),await this.$router.push("/login"))}},async recentNotes(){try{const e=L(),t=await $fetch("/api/v1/badges/top_testimonials/7/5",{baseURL:e.public.railsApiUrl||"http://localhost:8080",headers:{Authorization:`Bearer ${this.authStore.token}`,"Content-Type":"application/json"}});t.status=="OK"&&(this.notes=t.badges,this.display_notes=!0)}catch(e){console.error("Error loading recent notes:",e),(e.status===401||e.statusCode===401)&&(await this.authStore.logout(),await this.$router.push("/login"))}},async loadBadgesThatCanReceiveSpeeches(){try{const e=L(),t=await $fetch("/api/v1/badges/can_give_speech",{baseURL:e.public.railsApiUrl||"http://localhost:8080",headers:{Authorization:`Bearer ${this.authStore.token}`,"Content-Type":"application/json"}});t.status=="OK"&&t.badges.length>0&&(this.can_give_speech=!0)}catch(e){console.error("Error loading speech badges:",e)}},async membershipStats(){try{const e=L(),t=await $fetch("/api/v1/billing/membership_stats/",{baseURL:e.public.railsApiUrl||"http://localhost:8080",headers:{Authorization:`Bearer ${this.authStore.token}`,"Content-Type":"application/json"}});t.status=="OK"&&(this.paying_v2_members=t.paying_v2_members,this.paying_v1_members=t.paying_v1_members,this.paying_v1_members_on_v2=t.paying_v1_members_on_v2,this.paying_v1_members_on_v1=t.paying_v1_members_on_v1,this.total_paying_members=t.total_paying_members)}catch(e){console.error("Error loading membership stats:",e)}},async loadCreatingSpaceCohort(){try{this.creatingSpaceLoading=!0;const e=L(),[t,i]=await Promise.all([$fetch("/api/v1/courses/show/creating-space/current/0/1",{baseURL:e.public.railsApiUrl||"http://localhost:8080",headers:{Authorization:`Bearer ${this.authStore.token}`,"Content-Type":"application/json"}}),$fetch("/api/v1/courses/creating-space/cohorts?filter=all&limit=10",{baseURL:e.public.railsApiUrl||"http://localhost:8080",headers:{Authorization:`Bearer ${this.authStore.token}`,"Content-Type":"application/json"}})]);if(t.status==="OK"){const c=t.course_info.course;this.creatingSpaceCourse={id:c.id,name:c.name,token:"creating-space",course_type:c.course_type,fancy:c.fancy,airtable_info:c.airtable_info||{}},this.creatingSpaceEnrollment=t.course_info.current_user_active||t.course_info.current_user_signed_up}if(i.status==="OK"&&i.data.cohorts){const m=i.data.cohorts.find(y=>y.registration_open===!0);m&&(this.creatingSpaceCohort=m)}}catch(e){console.error("Error loading Creating Space cohort:",e)}finally{this.creatingSpaceLoading=!1}},loadNews(){this.news=[{id:1,name:this.$t("pages.home.news_welcome_title")||"Welcome to the new 750 Words!",note:this.$t("pages.home.news_welcome_text")||"We're excited to launch the new version of 750 Words with improved performance and features.",link:null,date:new Date}]},formatNewsDate(e){if(!e)return"";const t=new Date(e),c=Math.abs(new Date-t),m=Math.ceil(c/(1e3*60*60*24));return m===1?"1 day ago":m<7?`${m} days ago`:m<30?`${math.floor(m/7)} weeks ago`:t.toLocaleDateString()},handleShowLoginDialog(){this.$router.push("/login")}},async created(){var e;this.authStore.authInitialized||await this.authStore.initializeAuth(),this.authStore.isLoggedIn&&(this.date=new Date,(e=this.authStore.user)!=null&&e.extra_utc_offset&&this.date.setMinutes(this.date.getMinutes()-this.authStore.user.extra_utc_offset),await this.loadCurrentStatus(),await this.recentHallOfPhoenixes(),await this.recentStats(24,1),await this.recentBadges(24,50),await this.recentNotes(),await this.loadBadgesThatCanReceiveSpeeches(),await this.loadCreatingSpaceCohort(),this.loadNews())},mounted(){const e=setTimeout(()=>{this.homepage_variant===null&&(this.homepage_variant="v1")},2e3);!this.authStore.isLoggedIn&&typeof window<"u"&&window.posthog?window.posthog.onfeatureflags(()=>{clearTimeout(e);const t=window.posthog.getFeatureFlag("new-homepage-feel-alive-inside");t==="new-homepage-feel-alive-inside"?this.homepage_variant="v3":this.homepage_variant="v1",console.log("homepage_variant set to:",this.homepage_variant,"from variant:",t)}):(clearTimeout(e),this.homepage_variant===null&&(this.homepage_variant="v1"))},head(){return{title:"750 Words - Write Every Day",meta:[{name:"description",content:"The simple, private way to practice writing 750 words every day. Build a consistent writing habit and clear your mind through daily journaling."}]}}}),ae={class:"page-title"},ne=["innerHTML"],oe={key:0,id:"hall-of-phoenix",class:"mb-10"},re={class:"section-header mb-4 mt-2"},ie={key:1,id:"badges",class:"mb-10 mt-5"},le={class:"section-header mb-4 mt-2"},de={class:"badge-header"},ue=["src"],ce={class:"badge-info"},_e={class:"badge-title-line"},he={class:"badge-name"},me={class:"badge-description"},pe={class:"badge-earners"},ge={key:0,class:"repeat-count"},fe={key:1},we={key:2},ye={key:2,id:"entry_details",class:"mb-10 mt-5"},ve={class:"section-header mb-4 mt-2"},be={key:0,id:"time_left_to_write",class:"mb-4"},ke={key:0},$e={key:0},Se={key:1},Le={key:2},Ce={key:3},Te={key:1},Ne={key:0},Oe={key:1},Ae={key:2},Be={key:3},De={key:2},Ee={key:0},Ue={key:1},Me={key:1,id:"circle-posts",class:"mb-4"},We={key:2,id:"creating_space_promo",class:"mb-4"},Re={id:"prompts-box",class:"mb-4"},He={id:"report-box",class:"mb-4"},Ie={id:"this_month_challenge",class:"mt-4"},Pe={key:3,id:"next_month_challenge",class:"mt-4"},Ve={key:4,id:"wotd",class:"mt-4"},je={class:"card-text-md card-weight-bold card-text-primary card-spacing-xs"},ze={class:"card-text-sm card-weight-normal card-text-secondary"},Fe={class:"card-text-md card-weight-bold card-text-primary card-spacing-xs"},Ke={class:"card-text-sm card-weight-normal card-text-secondary"},Ye={key:5,id:"notes"},qe={class:"section-header mt-4 pl-2 mb-2"},Ge={key:1,class:"mt-3"},Je={class:"mt-3"},Xe={id:"status",style:{display:"none"}},Qe={class:"section-header mt-4 pl-2 pb-1"},Ze=["innerHTML"],xe={key:0},et=["href"],tt={class:"news-date"},st={key:6,id:"sustainability",class:"mt-4"},at={class:"section-header pl-2 pb-1"},nt={class:"mb-3"},ot={class:"mb-3"},rt={class:"mb-3"},it={class:"mb-3"},lt={class:"mb-3"};function dt(e,t,i,c,m,y){const b=k("v-img"),u=X,S=W,v=k("v-card-title"),p=k("v-card"),g=k("v-col"),T=k("v-row"),A=K,C=k("v-progress-linear"),w=k("v-card-text"),D=P,Y=V,B=k("BaseButton"),E=k("v-container"),q=j,G=z,J=F;return o(),l("div",null,[s(J,{"message-context":"general","allow-logged-out":!0},{default:a(()=>[s(E,{id:"index-container"},{default:a(()=>{var U,M;return[r("h1",ae,n(e.$t("pages.home.greeting",{handle:(U=e.authStore.user)==null?void 0:U.writer_handle})||`Hello, ${(M=e.authStore.user)==null?void 0:M.writer_handle}!`),1),e.todays_message?(o(),l("h2",{key:0,class:"todays-message",innerHTML:e.todays_message},null,8,ne)):h("",!0),s(T,null,{default:a(()=>[s(g,{cols:"12",sm:"6"},{default:a(()=>[e.phoenixes&&e.phoenixes.length>0?(o(),l("div",oe,[r("div",re,n("π¦βπ₯ "+(e.$t("pages.home.hall_of_phoenixes")||"HALL OF PHOENIXES")),1),s(T,null,{default:a(()=>[(o(!0),l(N,null,O(e.phoenixes,f=>(o(),$(g,{cols:"6",key:f.id},{default:a(()=>[s(p,{class:"theme-aware phoenix-card",variant:"outlined"},{default:a(()=>[f.interview.local_image?(o(),$(u,{key:0,to:"/hall-of-phoenixes/"+f.user.writer_handle,class:"phoenix-image-link"},{default:a(()=>[s(b,{src:f.interview.local_image},null,8,["src"])]),_:2},1032,["to"])):h("",!0),s(v,{class:"phoenix-card-title"},{default:a(()=>[s(S,{handle:f.user.writer_handle,member_type:f.user.member_type,paid_membership_level:f.user.paid_membership_level,link:"/hall-of-phoenixes/"+f.user.writer_handle},null,8,["handle","member_type","paid_membership_level","link"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})])):h("",!0),e.badges&&e.badges.length>0?(o(),l("div",ie,[r("div",le,n(e.$t("pages.home.shoutouts_header")||"π SHOUTOUTS"),1),(o(!0),l(N,null,O(e.badges,f=>(o(),l("div",{key:f.badge_info.token,class:"mb-5"},[r("div",de,[r("img",{src:"/images/badges/"+f.badge_info.img,height:"50",width:"50",align:"left",class:"badge-image"},null,8,ue),r("div",ce,[r("div",_e,[r("strong",he,n(e.getBadgeName(f.badge_info.name)),1),r("em",me," - "+n(f.badge_info.desc),1)]),r("div",pe,[(o(!0),l(N,null,O(f.earners,_=>(o(),l("div",{key:_.id,class:"earner"},[s(S,{handle:_.user_info.writer_handle,member_type:_.user_info.member_type,paid_membership_level:_.user_info.paid_membership_level,link:"/person/"+_.user_info.writer_handle},null,8,["handle","member_type","paid_membership_level","link"]),_.number>1?(o(),l("span",ge," ("+n(e.getOrdinalText(_.number))+") ",1)):h("",!0),_.speech?(o(),l("span",fe,[s(u,{to:"/person/"+_.user_info.writer_handle+"#note-"+_.id,class:"speech-link"},{default:a(()=>[...t[5]||(t[5]=[d("π¬",-1)])]),_:1},8,["to"])])):h("",!0),_.reaction_handles.length>0?(o(),l("span",we,[t[6]||(t[6]=d(" β’ ",-1)),s(u,{to:"/person/"+_.user_info.writer_handle+"#note-"+_.id,class:"reaction-link"},{default:a(()=>[d(" β€οΈ "+n(_.reaction_handles.length),1)]),_:2},1032,["to"])])):h("",!0)]))),128))])])])]))),128))])):h("",!0),e.finished_writing&&e.num_writing&&e.num_writing>0?(o(),l("div",ye,[r("div",ve,n(e.$t("pages.home.people_writing_today",{count:e.$n(Number(e.num_finished_writing),"integer")||Number(e.num_finished_writing).toLocaleString()})||`βοΈ ${e.$n(Number(e.num_finished_writing),"integer")||Number(e.num_finished_writing).toLocaleString()} PEOPLE HAVE WRITTEN 750 WORDS TODAY`),1),s(A,{entry_details:e.finished_writing},null,8,["entry_details"])])):h("",!0)]),_:1}),s(g,{cols:"12",sm:"6"},{default:a(()=>{var f;return[e.current_status?(o(),l("div",be,[!e.current_status.entry||e.current_status.entry.entry_detail.num_words==0?(o(),l("div",ke,[s(p,{class:"theme-aware status-card",variant:"elevated",color:"surface-variant",elevation:"1"},{default:a(()=>[s(w,{class:"card-content"},{default:a(()=>[d(n(e.$t("pages.home.time_left_to_write",{time_left:e.time_left})||`You have ${e.time_left} to write your words today.`)+" ",1),e.current_status.active_badges&&e.current_status.active_badges.stats.completed_streak>0?(o(),l("span",$e,[s(u,{to:"/write",class:"card-link"},{default:a(()=>[d(n(e.$t("pages.home.continue_streak",{streak:e.current_status.active_badges.stats.completed_streak})||`Continue your ${e.current_status.active_badges.stats.completed_streak} day streak!`),1)]),_:1})])):e.current_status.active_badges&&e.current_status.active_badges.stats.show_up_streak>0?(o(),l("span",Se,[s(u,{to:"/write",class:"card-link"},{default:a(()=>[d(n(e.$t("pages.home.continue_writing_streak",{streak:e.current_status.active_badges.stats.show_up_streak})||`Continue your ${e.current_status.active_badges.stats.show_up_streak} day writing streak!`),1)]),_:1})])):e.current_status.active_badges&&e.current_status.active_badges.stats.show_up_total>0?(o(),l("span",Le,[d(n(e.$t("pages.home.written_days_count",{days:e.current_status.active_badges.stats.show_up_total})||`You've written on ${e.current_status.active_badges.stats.show_up_total} days.`)+" ",1),s(u,{to:"/write",class:"card-link"},{default:a(()=>[d(n(e.$t("pages.home.begin_another")||"Let's begin another!"),1)]),_:1})])):(o(),l("span",Ce,[s(u,{to:"/write",class:"card-link"},{default:a(()=>[d(n(e.$t("pages.home.lets_write")||"Let's write!"),1)]),_:1})])),e.percent_complete>0?(o(),$(C,{key:4,modelValue:e.percent_complete,"onUpdate:modelValue":t[0]||(t[0]=_=>e.percent_complete=_),color:"success",height:"10",rounded:"",class:"mt-4"},null,8,["modelValue"])):h("",!0)]),_:1})]),_:1})])):h("",!0),e.current_status.entry&&e.current_status.entry.entry_detail.num_words>0&&e.current_status.entry.entry_detail.num_words<750?(o(),l("div",te,[s(p,{class:"theme-aware status-card",variant:"elevated",color:"success-container",elevation:"1"},{default:a(()=>[s(w,{class:"card-content"},{default:a(()=>[d(n(e.$t("pages.home.partial_entry",{time_left:e.time_left,remaining:750-e.current_status.entry.entry_detail.num_words})||`π± You have ${e.time_left} to write ${750-e.current_status.entry.entry_detail.num_words} more words.`)+" ",1),e.current_status.active_badges&&e.current_status.active_badges.stats.completed_streak>0?(o(),l("span",Ne,[s(u,{to:"/write",class:"card-link"},{default:a(()=>[d(n(e.$t("pages.home.build_on_streak",{streak:e.current_status.active_badges.stats.completed_streak})||`Keep writing to build on your ${e.current_status.active_badges.stats.completed_streak} day streak!`),1)]),_:1})])):e.current_status.active_badges&&e.current_status.active_badges.stats.show_up_streak>0?(o(),l("span",Oe,[d(n(e.$t("pages.home.got_streak",{streak:e.current_status.active_badges.stats.show_up_streak})||`You've got a ${e.current_status.active_badges.stats.show_up_streak} day writing streak.`)+" ",1),s(u,{to:"/write",class:"card-link"},{default:a(()=>[d(n(e.$t("pages.home.continue_writing")||"Continue writing!"),1)]),_:1})])):e.current_status.active_badges&&e.current_status.active_badges.stats.show_up_total>0?(o(),l("span",Ae,[d(n(e.$t("pages.home.written_days_count",{days:e.current_status.active_badges.stats.show_up_total})||`You've written on ${e.current_status.active_badges.stats.show_up_total} days.`)+" ",1),s(u,{to:"/write",class:"card-link"},{default:a(()=>[d(n(e.$t("pages.home.continue_entry")||"Let's continue!"),1)]),_:1})])):(o(),l("span",Be,[s(u,{to:"/write",class:"card-link"},{default:a(()=>[d(n(e.$t("pages.home.lets_write")||"Let's write!"),1)]),_:1})])),s(C,{modelValue:e.percent_complete,"onUpdate:modelValue":t[1]||(t[1]=_=>e.percent_complete=_),color:"success",height:"10",rounded:"",class:"mt-4"},null,8,["modelValue"])]),_:1})]),_:1})])):h("",!0),e.current_status.entry&&e.current_status.entry.entry_detail.num_words>750?(o(),l("div",De,[s(p,{class:"theme-aware status-card",variant:"elevated",color:"success-container",elevation:"1"},{default:a(()=>[s(w,{class:"card-content"},{default:a(()=>[d(n(e.$t("pages.home.completed_entry",{words:e.current_status.entry.entry_detail.num_words})||`π΅ Congrats! You've written ${e.current_status.entry.entry_detail.num_words} words today,`)+" ",1),e.current_status.active_badges&&e.current_status.active_badges.stats.completed_streak>1?(o(),l("span",Ee,n(e.$t("pages.home.current_streak",{streak:e.current_status.active_badges.stats.completed_streak})||`and now have a ${e.current_status.active_badges.stats.completed_streak} day streak.`),1)):(o(),l("span",Ue,n(e.$t("pages.home.first_streak")||"the first step towards a new streak."),1)),s(u,{to:"/write",class:"card-link"},{default:a(()=>[d(n(e.$t("pages.home.have_more")||"Have more to say?"),1)]),_:1}),s(C,{modelValue:e.percent_complete,"onUpdate:modelValue":t[2]||(t[2]=_=>e.percent_complete=_),color:"success",height:"10",rounded:"",class:"mt-4"},null,8,["modelValue"])]),_:1})]),_:1})])):h("",!0)])):h("",!0),(f=e.$auth)!=null&&f.isLoggedIn?(o(),l("div",Me,[s(p,{class:"theme-aware prominent-card",variant:"elevated",color:"tertiary-container",elevation:"3"},{default:a(()=>[s(w,{class:"card-content"},{default:a(()=>[s(D,{"space-id":"73534",limit:3,"max-body-length":80,"show-view-more":!0,"auto-load":!0,"compact-mode":""})]),_:1})]),_:1})])):h("",!0),e.shouldShowCreatingSpace&&!e.creatingSpaceEnrollment?(o(),l("div",We,[s(p,{class:"theme-aware",variant:"elevated",color:"tertiary-container",elevation:"1"},{default:a(()=>[s(w,null,{default:a(()=>[s(u,{to:"/play/creating-space"},{default:a(()=>[...t[7]||(t[7]=[r("img",{src:"/images/courses/creating-space/creating-space-banner.png",style:{width:"100%"}},null,-1)])]),_:1})]),_:1}),s(w,{class:"card-content"},{default:a(()=>[t[10]||(t[10]=d(" The ",-1)),r("strong",null,n(e.creatingSpaceCohort.name||"latest cohort"),1),t[11]||(t[11]=d(" cohort of ",-1)),s(u,{to:"/play/creating-space",class:"card-link"},{default:a(()=>[...t[8]||(t[8]=[d("Creating Space",-1)])]),_:1}),t[12]||(t[12]=d(" is officially open. This is a new self-paced course designed to help you step back, breathe, and reconnect with what truly matters. ",-1)),s(u,{to:"/play/creating-space",class:"card-link"},{default:a(()=>[...t[9]||(t[9]=[d("Learn more & join!",-1)])]),_:1})]),_:1})]),_:1})])):h("",!0),r("div",Re,[s(p,{class:"theme-aware prominent-card",variant:"elevated",color:"secondary-container",elevation:"3"},{default:a(()=>[s(v,{class:"prominent-card-title"},{default:a(()=>[t[13]||(t[13]=d(" βοΈ ",-1)),s(u,{to:"/play",class:"sidebar-big-link"},{default:a(()=>[d(n(e.$t("pages.home.writing_prompts_title")||"Writing Prompts"),1)]),_:1})]),_:1})]),_:1})]),r("div",He,[s(p,{class:"theme-aware prominent-card",variant:"elevated",color:"primary-container",elevation:"3"},{default:a(()=>[s(v,{class:"prominent-card-title"},{default:a(()=>[t[14]||(t[14]=d(" π ",-1)),s(u,{to:"/report",class:"sidebar-big-link"},{default:a(()=>[d(n(e.$t("pages.home.custom_report_title")||"Custom Reports"),1)]),_:1})]),_:1})]),_:1})]),r("div",Ie,[s(p,{class:"theme-aware",variant:"elevated",color:"tertiary-container",elevation:"1"},{default:a(()=>[s(w,{class:"card-content"},{default:a(()=>[d(n(e.$t("pages.home.monthly_challenge",{day:e.this_month_number,month:e.this_month_name})||`We're on day ${e.this_month_number} of ${e.this_month_name}'s one month challenge.`)+" ",1),s(u,{to:"/play/one-month",class:"card-link"},{default:a(()=>[d(n(e.$t("pages.home.monthly_challenge_check")||"Check it out!"),1)]),_:1})]),_:1})]),_:1})]),e.days_til_next_month&&e.days_til_next_month<8?(o(),l("div",pe,[s(p,{class:"theme-aware",variant:"elevated",color:"warning-container",elevation:"1"},{default:a(()=>[s(w,{class:"card-content"},{default:a(()=>[d(n(e.$t("pages.home.next_month_challenge",{month:e.next_month_name,days:e.days_til_next_month})||`${e.next_month_name}'s one month challenge begins in ${e.days_til_next_month} days.`)+" ",1),s(u,{to:"/play/join/one-month",class:"card-link"},{default:a(()=>[d(n(e.$t("pages.home.next_month_signup")||"Sign up!"),1)]),_:1})]),_:1})]),_:1})])):h("",!0),e.wotd&&e.wotd[0]&&e.wotd[1]?(o(),l("div",Ve,[s(p,{class:"theme-aware",variant:"elevated",color:"surface-variant",elevation:"1"},{default:a(()=>[s(v,{class:"card-text-lg card-weight-normal card-text-primary"},{default:a(()=>[d(n(e.$t("pages.home.words_of_day")||"Words of the Day"),1)]),_:1}),s(w,{class:"card-content"},{default:a(()=>[s(T,{class:"card-two-columns-tight"},{default:a(()=>[s(g,{cols:"6",class:"card-column"},{default:a(()=>[s(u,{to:"/play/word-of-the-day-2",class:"card-link card-text-base card-weight-semibold card-spacing-xs"},{default:a(()=>[...t[15]||(t[15]=[d(" Merriam-Webster ",-1)])]),_:1}),r("div",je,n(e.wotd[1].prompt_data.word_of_the_day),1),r("div",ze,n(e.$t("pages.home.word_people_count",{count:e.wotd[1].num_completed_prompts})||`${e.wotd[1].num_completed_prompts} people`),1)]),_:1}),s(g,{cols:"6",class:"card-column"},{default:a(()=>[s(u,{to:"/play/word-of-the-day",class:"card-link card-text-base card-weight-semibold card-spacing-xs"},{default:a(()=>[...t[16]||(t[16]=[d(" Wordnik ",-1)])]),_:1}),r("div",Fe,n(e.wotd[0].prompt_data.word_of_the_day),1),r("div",Ke,n(e.$t("pages.home.word_people_count",{count:e.wotd[0].num_completed_prompts})||`${e.wotd[0].num_completed_prompts} people`),1)]),_:1})]),_:1})]),_:1})]),_:1})])):h("",!0),e.display_notes?(o(),l("div",Ye,[r("div",qe,n(e.$t("pages.home.notes_of_inspiration")||"ποΈ NOTES OF INSPIRATION"),1),e.notes&&e.notes.length>0?(o(),$(Y,{key:0,notes:e.notes,show_dates:!0},null,8,["notes"])):h("",!0),e.can_give_speech?(o(),l("div",Ge,[s(B,{type:"achievement",block:"",onClick:t[3]||(t[3]=_=>e.$router.push("/badges/note")),class:"inspiration-btn"},{default:a(()=>[r("strong",null,n(e.$t("pages.home.write_inspiration_note")||"Write a note of inspiration!"),1)]),_:1})])):h("",!0),r("div",Je,[s(B,{type:"secondary",block:"",onClick:t[4]||(t[4]=_=>e.$router.push("/notes")),class:"more-notes-btn"},{default:a(()=>[r("strong",null,n(e.$t("pages.home.read_more_notes")||"Read more notes"),1)]),_:1})])])):h("",!0),r("div",Xe,[r("div",Qe,n(e.$t("pages.home.latest_news")||"π° LATEST NEWS"),1),s(p,{class:"theme-aware",variant:"outlined",color:"surface-container"},{default:a(()=>[e.news?(o(),$(w,{key:0,class:"news-content"},{default:a(()=>[(o(!0),l(N,null,O(e.news,_=>(o(),l("div",{class:"news-item",key:_.id},[r("span",{innerHTML:_.note},null,8,Ze),_.link?(o(),l("span",xe,[r("a",{href:_.link,target:"_news",class:"news-link"},n(e.$t("pages.home.read_more")||"Read more..."),9,et)])):h("",!0),r("div",tt,[r("strong",null,n(e.formatNewsDate(_.date)),1)])]))),128))]),_:1})):h("",!0),e.news?(o(),$(w,{key:1,class:"news-footer"},{default:a(()=>[...t[17]||(t[17]=[r("div",{class:"news-item"},[r("small",{class:"news-link-small"},[r("a",{href:"https://community.750words.com",target:"_blank",class:"community-link"},"COMMUNITY.750WORDS.COM")])],-1),r("div",{class:"news-item"},[r("small",{class:"news-link-small"},[r("a",{href:"https://750words.notion.site/",target:"_new",class:"changelog-link"},"BUGS, FEATURES, CHANGELOG")])],-1)])]),_:1})):h("",!0)]),_:1})]),e.total_paying_members?(o(),l("div",st,[r("div",at,n(e.$t("pages.home.sustainability_header")||"π HELP 750 BECOME SUSTAINABLE!"),1),s(p,{class:"theme-aware",variant:"elevated",color:"warning-container",elevation:"1"},{default:a(()=>[s(w,{class:"pa-4"},{default:a(()=>[r("div",nt,[r("strong",null,n(e.$t("pages.home.sustainability_need_help")||"We need your help!"),1)]),r("div",ot,n(e.$t("pages.home.sustainability_background")||"Between the fall of 2024 and the summer of 2025, Buster is going to be working hard to try to grow 750 Words enough so he can work on the site full-time in a sustainable way (it currently requires dipping deeply into savings)."),1),r("div",rt,n(e.$t("pages.home.sustainability_goal",{current:e.$n(Number(e.total_paying_members),"integer")||Number(e.total_paying_members).toLocaleString(),remaining:e.$n(Number(8500-e.total_paying_members),"integer")||Number(8500-e.total_paying_members).toLocaleString()})||`We're trying to grow 750 Words from 4,500 to 8,500 paying members by summer of 2025. That's almost double, which is a lot, but then again we've never done any marketing or sales or anything like that since this launched in 2009. Now that we're almost 15 years into this, I guess it's time to give it a swing? At the moment, we have ${e.$n(Number(e.total_paying_members),"integer")||Number(e.total_paying_members).toLocaleString()}, which means we have ${e.$n(Number(8500-e.total_paying_members),"integer")||Number(8500-e.total_paying_members).toLocaleString()} to go.`),1),r("div",it,[d(n(e.$t("pages.home.percentage_complete",{percent:Math.round(e.total_paying_members*100/8500)})||`We're ${Math.round(e.total_paying_members*100/8500)}% of the way there!`)+" ",1),s(C,{rounded:"",striped:"",height:"10",color:"success","model-value":e.total_paying_members*100/8500,class:"mt-2"},null,8,["model-value"])]),r("div",lt,n(e.$t("pages.home.sustainability_transparency")||"We're doing this all out in the open since we're a tiny business and all of this is really built on top of the good will of the people who've been members for the last many years. If you'd like to see how you can help us reach this goal, come join the discussion in our community here: "),1),r("div",null,[s(B,{type:"primary",block:"",href:"https://community.750words.com/c/blog/?topics=99178",target:"community",class:"discussion-btn"},{default:a(()=>[r("strong",null,n(e.$t("pages.home.join_discussion")||"JOIN THE DISCUSSION!"),1)]),_:1})])]),_:1})]),_:1})])):h("",!0)]}),_:1})]),_:1})]}),_:1})]),"logged-out":a(()=>[e.homepage_variant=="v1"?(o(),$(E,{key:0,id:"index-container"},{default:a(()=>[s(q,{onShowLoginDialog:e.handleShowLoginDialog},null,8,["onShowLoginDialog"])]),_:1})):h("",!0),e.homepage_variant=="v3"?(o(),$(G,{key:1,onShowLoginDialog:e.handleShowLoginDialog},null,8,["onShowLoginDialog"])):h("",!0)]),_:1})])}const At=H(se,[["render",dt],["__scopeId","data-v-e553a64d"]]);export{At as default};