1import{E as U,a6 as P,R as x,V as e,aj as w,F as B,M as G,K as W,N as y,T as z,U as b,Z as k,$ as T,ar as C,aq as E,W as K,X,Y as Z,au as J,a1 as Q,aL as H,aM as M,a4 as R,a9 as ee,aa as ae,ab as te}from"./oFPiHDVt.js";import{_ as oe}from"./CfrOpOHJ.js";import{u as ie}from"./4OfAsc8y.js";import{u as se}from"./1T6kjwaE.js";import{_ as le}from"./BH_qJ_Vm.js";import{c as ne,d as ce}from"./CCPGUtx8.js";const re={props:["category"],methods:{clickAllCategory(){this.$emit("clicked","all")},clickFoodCategory(){this.$emit("clicked","food")},clickHealthCategory(){this.$emit("clicked","health")},clickLifestyleCategory(){this.$emit("clicked","lifestyle")},clickExperienceCategory(){this.$emit("clicked","experience")},clickEducationCategory(){this.$emit("clicked","education")}}},de={class:"sub-header__wrapper"},ue={class:"sub-header"},he={class:"sub-header__container"},me={class:"sub-header__item-container"},_e={class:"sub-header__item-container"},pe={class:"sub-header__item-container"},ve={class:"sub-header__item-container"},ge={class:"sub-header__item-container"},fe={class:"sub-header__item-container"};function ye(n,i,r,L,A,s){return P(),x("div",de,[e("div",ue,[e("div",he,[e("div",me,[e("div",{class:w(["sub-header__item",{"sub-header__item--active-sub-item":r.category==="all"}]),onClick:i[0]||(i[0]=(...l)=>s.clickAllCategory&&s.clickAllCategory(...l))}," All ",2)]),e("div",_e,[e("div",{class:w(["sub-header__item",{"sub-header__item--active-sub-item":r.category==="food"}]),onClick:i[1]||(i[1]=(...l)=>s.clickFoodCategory&&s.clickFoodCategory(...l))}," Food ",2)]),e("div",pe,[e("div",{class:w(["sub-header__item",{"sub-header__item--active-sub-item":r.category==="health"}]),onClick:i[2]||(i[2]=(...l)=>s.clickHealthCategory&&s.clickHealthCategory(...l))}," Health ",2)]),e("div",ve,[e("div",{class:w(["sub-header__item",{"sub-header__item--active-sub-item":r.category==="lifestyle"}]),onClick:i[3]||(i[3]=(...l)=>s.clickLifestyleCategory&&s.clickLifestyleCategory(...l))}," Lifestyle ",2)]),e("div",ge,[e("div",{class:w(["sub-header__item",{"sub-header__item--active-sub-item":r.category==="experience"}]),onClick:i[4]||(i[4]=(...l)=>s.clickExperienceCategory&&s.clickExperienceCategory(...l))}," Experience ",2)]),e("div",fe,[e("div",{class:w(["sub-header__item",{"sub-header__item--active-sub-item":r.category==="education"}]),onClick:i[5]||(i[5]=(...l)=>s.clickEducationCategory&&s.clickEducationCategory(...l))}," Education ",2)])])])])}const ze=U(re,[["render",ye],["__scopeId","data-v-dfdb5755"]]),g=n=>(ee("data-v-2984ecf2"),n=n(),ae(),n),be={class:"login-popup-container"},ke={class:"login-popup__image-section"},we=g(()=>e("img",{class:"login-popup__image",src:le},null,-1)),Ce=[we],Pe={class:"login-popup__text-section"},xe=Q('<div class="login-popup__title" data-v-2984ecf2> Login to redeem Our Tampines Hub deals </div><div class="privacy-terms" data-v-2984ecf2><div class="privacy-terms__description" data-v-2984ecf2> By continuing, you agree to Our Tampines Hub's <a target="_blank" href="/oth/privacy" data-v-2984ecf2>Privacy Policy</a>, Dive AR's <a target="_blank" href="/privacy" data-v-2984ecf2>Privacy Policy</a> and <a target="_blank" href="/terms" data-v-2984ecf2>Terms and Conditions</a>. </div></div>',2),Le={class:"user-details"},Se={class:"user-details__top"},Te=g(()=>e("label",null,"Year of Birth:",-1)),Ee=g(()=>e("label",null,"Gender:",-1)),Ae=["value"],Ie={class:"user-details__bottom"},Fe=g(()=>e("label",null,"Postal Code:",-1)),He=g(()=>e("img",{src:ne,class:"social-media-icon"},null,-1)),Me=[He],Re=g(()=>e("img",{src:ce,class:"social-media-icon"},null,-1)),Ue=[Re],Oe=g(()=>e("span",{class:"account-signup"},"or use your email account",-1)),Ve=g(()=>e("span",{class:"account-signup-details"},[te("A login link will be sent directly to your email"),e("br"),e("i",{class:"account-signup-note"},"please check your junk/spam folder")],-1)),qe={class:"container-login input-group"},Ne={__name:"OTHLoginPopup",props:["isDealPage","showPopup"],emits:["showLoginModal","loginLoading"],setup(n,{emit:i}){const{$auth:r}=B(),{createOTHSocialAccountWithId:L,getEmailSignInLinkFromFirebaseAdmin:A}=ie(),{sendEmailUpdateToDive:s}=se(),l=n,c=i,O=G().public,f=W(),m=y(""),d=y("2016-01"),u=y(""),V=y(["Male","Female"]),o=y(""),_=y(0),p=y(""),S=v=>/^-?\d+$/.test(v),q=()=>{c("showLoginModal",!1),!l.isDealPage&&(window.history.length>2?window.history.back():f.push(`/${O.othPath}`))},N=async()=>
1{if(d.value===""||u.value===""||o.value===""){_.value++,p.value="Please enter required fields";return}if(o.value.length!==6||!S(o.value)){_.value++,p.value="Please enter a valid postal code";return}const v={url:window.location.href.split("#")[0],handleCodeInApp:!0};try{c("showLoginModal",!1),c("loginLoading",!0);const h=(await A(m.value,v)).data.data;try{const t="Our Tampines Hub",I="[email protected]",F=[{email:m.value}],j="Sign in to Our Tampines Hub",D=`<html><body> 2 <p>Hello,</p> 3 <p>We received a request to sign in to Our Tampines Hub Coupons from ${m.value}. 4 To proceed, click this link:</p> 5 <a href=${h}>Sign in to Our Tampines Hub Coupons</a> 6 <p>If you did not request this link, you can safely ignore this email.</p> 7 <p>Thanks,</p> 8 <p>Our Tampines Hub, in collaboration with divedeals.sg</p> 9 </body></html>`,Ye=await s(t,I,F,j,D)}catch(t){console.error(t),alert("Failed to send email: "+t.message)}localStorage.setItem("emailForSignIn",m.value),localStorage.setItem("birthMonthYear",d.value),localStorage.setItem("selectedGender",u.value),localStorage.setItem("userPostalCode",o.value),_.value++,p.value="A login link has been successfully sent to "+m.value}catch(a){alert(a)}c("loginLoading",!1),window.location.hash==="#joinUs"&&f.push(f.currentRoute.value.fullPath.split("#")[0])},Y=async()=>{if(d.value===""||u.value===""||o.value===""){_.value++,p.value="Please enter required fields";return}if(o.value.length!==6||!S(o.value)){_.value++,p.value="Please enter a valid postal code";return}c("showLoginModal",!1),c("loginLoading",!0);const v=new H;M(r,v).then(async a=>{H.credentialFromResult(a).accessToken,a.user.uid,await L(a,d.value,u.value,o.value),alert("You are now logged in! Reloading page..."),window.location.reload()}).catch(a=>{c("loginLoading",!1);const h=a.code,t=a.message;a.email,a.credential,alert(h==="auth/account-exists-with-different-credential"?"You have already signed up with a different auth provider for that email.":t)}),window.location.hash==="#joinUs"&&f.push(f.currentRoute.value.fullPath.split("#")[0])},$=async()=>{if(d.value===""||u.value===""||o.value===""){_.value++,p.value="Please enter required fields";return}if(o.value.length!==6||!S(o.value)){_.value++,p.value="Please enter a valid postal code";return}c("showLoginModal",!1),c("loginLoading",!0);const v=new R;try{const a=await M(r,v),t=R.credentialFromResult(a).accessToken,F=a.user.uid;await L(a,d.value,u.value,o.value),alert("You are now logged in! Reloading page..."),window.location.reload()}catch(a){c("loginLoading",!1);const h=a.code,t=a.message;a.email,a.credential,alert(h==="auth/account-exists-with-different-credential"?"You have already signed up with a different auth provider for that email.":t)}window.location.hash==="#joinUs"&&f.push(f.currentRoute.value.fullPath.split("#")[0])};return(v,a)=>{const h=oe;return P(),x("div",be,[z(h,{showSnackbar:b(_),text:b(p)},null,8,["showSnackbar","text"]),k(e("div",{class:"login-popup__overlay",onClick:q},null,512),[[T,n.showPopup]]),e("div",{class:w(["login-popup",{"login-popup--hide":!n.showPopup}])},[k(e("div",ke,Ce,512),[[T,n.showPopup]]),k(e("div",Pe,[xe,e("div",Le,[e("div",Se,[Te,k(e("input",{class:"age-group","onUpdate:modelValue":a[0]||(a[0]=t=>C(d)?d.value=t:null),type:"month",min:"1900",max:"2023",step:"1"},null,512),[[E,b(d)]]),Ee,k(e("select",{"onUpdate:modelValue":a[1]||(a[1]=t=>C(u)?u.value=t:null)},[(P(!0),x(K,null,X(b(V),t=>(P(),x("option",{key:t,value:t},Z(t),9,Ae))),128))],512),[[J,b(u)]])]),e("div",Ie,[Fe,k(e("input",{"onUpdate:modelValue":a[2]||(a[2]=t=>C(o)?o.value=t:null),required:"",type:"text",pattern:"[0-9]{6}",title:"Six digit postal code"},null,512),[[E,b(o)]])])]),e("div",{class:"social-container"},[e("a",{class:"social",onClick:Y},Me),e("a",{class:"social",onClick:$},Ue)]),Oe,Ve,e("div",qe,[k(e("input",{"onUpdate:modelValue":a[3]||(a[3]=t=>C(m)?m.value=t:null),type:"email",class:"form-control",name:"email",placeholder:"Email","aria-label":"Email","aria-describedby":"basic-addon-email",value:"",required:""}
9,null,512),[[E,b(m)]]),e("button",{type:"button",class:"btn-signup","data-style":"zoom-in",onClick:N}," Continue ")])],512),[[T,n.showPopup]])],2)])}}},Ke=U(Ne,[["__scopeId","data-v-2984ecf2"]]);export{Ke as _,ze as a};
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.