PageSourceSearch

https://simcardtraveller.com/_nuxt/DWfvaMIz.js

js simcardtraveller.com collected 2026-10-09 00:57:55 UTC 11,450 bytes, 1 lines download raw bytes

1import{_ as te}from"./B42JCU26.js";import{e as se,u as ae,aa as oe,B as le,f as re,l as ne,I as k,o as a,c as d,a as s,t as n,g as e,F as V,j as U,b as r,w as u,h as y,J as ie,m as p,a0 as H,d as m,y as j,Z as de,n as g,i as f}from"./Dqk0Ip7M.js";import{u as ce}from"./BC3D6GR5.js";import{_ as M}from"./99X42Skp.js";import{_ as A}from"./Bo0svCUv.js";import{L as F}from"./I1yz3cz8.js";import{_ as me}from"./CntA9Oa1.js";import{A as ue,b as pe,a as ge}from"./DOriYaLn.js";import{L as z}from"./BUUsnhXc.js";import{S as O}from"./dqzWahzc.js";import{c as B}from"./DrjM5afW.js";import{P as ye}from"./B8zOD-oA.js";import{C as fe}from"./C5mFe6la.js";import{S as xe}from"./BjTnzAAR.js";import{L as R}from"./BB5afbIt.js";import{C as he}from"./DcLZH4eu.js";import{P as ve}from"./BymytnBA.js";import{C as be}from"./LO9DOs2S.js";import"./B7i4XTrb.js";import"./DCADjnpI.js";import"./DFDkc69a.js";import"./CvHQ5aBi.js";import"./C6yH9d_t.js";const _e=B("life-buoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);const ke=B("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);const we=B("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),Ce={class:"mx-auto max-w-3xl space-y-5 px-4 py-8 sm:px-6 sm:py-12"},Se={class:"sr-only"},Le={key:0,class:"space-y-5"},Ne={class:"grid grid-cols-2 gap-3 sm:grid-cols-4"},Ve={class:"rounded-2xl border border-gray-200 bg-white p-5 shadow-sm sm:p-6"},Me={class:"flex flex-col gap-5 sm:flex-row sm:items-center"},Fe={class:"min-w-0 flex-1"},Pe={class:"truncate text-xl font-semibold text-gray-900 sm:text-2xl"},Ue={key:0,class:"truncate text-sm text-gray-500"},Ae={class:"mt-2.5 flex flex-wrap items-center gap-2"},Be={key:0,class:"text-xs text-gray-400"},Ee={key:0,class:"grid grid-cols-2 gap-3 sm:grid-cols-4"},Ie={class:"flex items-center gap-1.5 text-xs font-medium text-gray-500"},Te={class:"mt-1.5 text-xl font-semibold text-gray-900"},De={class:"overflow-hidden rounded-2xl border border-gray-200 bg-white"},He={class:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-amber-50 text-amber-700"},je={class:"min-w-0 flex-1"},ze={class:"block text-sm font-semibold text-gray-900"},Oe={class:"block truncate text-xs text-gray-500"},Re={class:"rounded-2xl border border-gray-200 bg-white"},qe={class:"flex items-center justify-between gap-3 border-b border-gray-100 px-5 py-4"},Ge={key:0,class:"divide-y divide-gray-100"},$e={class:"grid grid-cols-3 gap-3 px-5 py-3.5"},Ye={class:"col-span-2 truncate text-sm font-medium text-gray-900"},Je={class:"grid grid-cols-3 gap-3 px-5 py-3.5"},Qe={class:"col-span-2 min-w-0"},Ze={class:"block truncate text-sm font-medium text-gray-900"},Ke={class:"mt-0.5 inline-flex items-center gap-1 text-xs text-gray-400"},We={key:0,class:"grid grid-cols-3 gap-3 px-5 py-3.5"},Xe={key:1,class:"grid grid-cols-3 gap-3 px-5 py-3.5"},et={class:"space-y-1.5"},tt={class:"space-y-1.5"},st={class:"flex items-center gap-1 text-xs text-gray-400"},at={class:"space-y-1.5"},ot={class:"space-y-1.5"},lt={class:"flex flex-col-reverse gap-2 pt-1 sm:flex-row sm:justify-end"},Ft=se({__name:"index",setup(rt){ae({meta:[{name:"robots",content:"noindex, nofollow"}]});const{t:h}=oe(),w=le(),q=re(),{getProfile:G,updateProfile:$,getStatistics:Y}=ce(),v=g(()=>w.getCurrentUser),b=g(()=>w.userType==="customer"),P=f(!1),_=f(!1),x=f(!1),C=f(!1),i=f(null),E=f(null),c=f({name:"",phone:"",address:""}),S=g(()=>i.value?.name||v.value?.name||"Traveller"),L=g(()=>i.value?.email||v.value?.email||""),I=g(()=>i.value?.avatar||v.value?.avatar||null),J=g(()=>S.value.split(/\s+/).filter(Boolean).map(o=>o[0]).join("").toUpperCase().slice(0,2)||"T"),T=g(()=>{const o=i.value?.created_at||v.value?.created_at;if(!o)return"";const t=new Date(o);return Number.isNaN(t.getTime())?"":t.toLocaleDateString("en-US",{month:"long",year:"numeric"})}),D=g(()=>{const o=E.value;return o?[{label:"Orders",value:Number(o.total_orders||0).toLocaleStr
1ing(),icon:O},{label:"Total spent",value:`$${Number(o.total_spent||0).toFixed(2)}`,icon:we},{label:"Pending",value:Number(o.pending_orders||0).toLocaleString(),icon:ye},{label:"Completed",value:Number(o.completed_orders||0).toLocaleString(),icon:fe}]:[]}),Q=g(()=>[{to:"/orders",label:h("common.myOrders"),hint:"Track orders and get your eSIM QR codes",icon:O},{to:"/top-up",label:h("navigation.topUp"),hint:"Add data to a SIM you already have",icon:xe},{to:"/support",label:h("navigation.helpCenter"),hint:"Installation guides and support",icon:_e}]),N=()=>{c.value={name:i.value?.name||v.value?.name||"",phone:i.value?.phone||"",address:i.value?.address||""}};ne(async()=>{if(!b.value){N();return}P.value=!0;try{const[o,t]=await Promise.allSettled([G(),Y()]);o.status==="fulfilled"?i.value=o.value:k.error("Failed to load your profile"),t.status==="fulfilled"&&(E.value=t.value)}finally{N(),P.value=!1}});const Z=()=>{N(),_.value=!0},K=()=>{N(),_.value=!1},W=async()=>{if(!c.value.name.trim()){k.error("Please enter your name");return}x.value=!0;try{const o={name:c.value.name.trim()};c.value.phone.trim()&&(o.phone=c.value.phone.trim()),c.value.address.trim()&&(o.address=c.value.address.trim()),i.value=await $(o),w.updateCurrentUser(i.value),_.value=!1,k.success("Contact details updated")}catch(o){const t=o?.response?.data?.message;k.error(t||"Failed to update your details")}finally{x.value=!1}},X=async()=>{C.value=!0;try{await w.logout(),q.push("/")}catch{k.error("Sign out failed, please try again")}finally{C.value=!1}};return(o,t)=>{const ee=te;return a(),d("div",Ce,[s("h1",Se,n(e(h)("common.myAccount")),1),e(P)?(a(),d("div",Le,[t[3]||(t[3]=s("div",{class:"h-32 animate-pulse rounded-2xl bg-gray-200/70"},null,-1)),s("div",Ne,[(a(),d(V,null,U(4,l=>s("div",{key:l,class:"h-20 animate-pulse rounded-xl bg-gray-200/70"})),64))]),t[4]||(t[4]=s("div",{class:"h-48 animate-pulse rounded-2xl bg-gray-200/70"},null,-1))])):(a(),d(V,{key:1},[s("section",Ve,[s("div",Me,[r(e(ue),{class:"h-16 w-16 shrink-0 ring-4 ring-amber-50 sm:h-20 sm:w-20"},{default:u(()=>[e(I)?(a(),p(e(pe),{key:0,src:e(I),alt:e(S),referrerpolicy:"no-referrer"},null,8,["src","alt"])):y("",!0),r(e(ge),{class:"bg-amber-100 text-xl font-semibold text-amber-800"},{default:u(()=>[m(n(e(J)),1)]),_:1})]),_:1}),s("div",Fe,[s("h2",Pe,n(e(S)),1),e(L)?(a(),d("p",Ue,n(e(L)),1)):y("",!0),s("div",Ae,[t[5]||(t[5]=ie('<span class="inline-flex items-center gap-1.5 rounded-full border border-gray-200 bg-white px-2.5 py-1 text-xs font-medium text-gray-700"><svg class="h-3.5 w-3.5" viewBox="0 0 48 48" aria-hidden="true"><path fill="#FFC107" d="M43.6 20.5H42V20H24v8h11.3C33.7 32.7 29.2 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 12.9 4 4 12.9 4 24s8.9 20 20 20 20-8.9 20-20c0-1.3-.1-2.4-.4-3.5z"></path><path fill="#FF3D00" d="M6.3 14.7l6.6 4.8C14.7 15.1 19 12 24 12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 16.3 4 9.7 8.3 6.3 14.7z"></path><path fill="#4CAF50" d="M24 44c5.2 0 9.9-2 13.4-5.2l-6.2-5.2C29.2 35.1 26.7 36 24 36c-5.2 0-9.6-3.3-11.3-8l-6.5 5C9.5 39.6 16.2 44 24 44z"></path><path fill="#1976D2" d="M43.6 20.5H42V20H24v8h11.3c-.8 2.2-2.2 4.2-4.1 5.6l6.2 5.2C37 39.2 44 34 44 24c0-1.3-.1-2.4-.4-3.5z"></path></svg> Signed in with Google </span>',1)),e(T)?(a(),d("span",Be,"Member since "+n(e(T)),1)):y("",!0)])]),r(M,{variant:"outline",class:"w-full shrink-0 sm:w-auto",disabled:e(C),onClick:X},{default:u(()=>[e(C)?(a(),p(e(R),{key:0,class:"mr-2 h-4 w-4 animate-spin"})):(a(),p(e(ke),{key:1,class:"mr-2 h-4 w-4"})),m(" "+n(e(h)("common.signOut")),1)]),_:1},8,["disabled"])])]),e(b)&&e(D).length?(a(),d("section",Ee,[(a(!0),d(V,null,U(e(D),l=>(a(),d("div",{key:l.label,class:"rounded-xl border border-gray-200 bg-white p-4"},[s("div",Ie,[(a(),p(H(l.icon),{class:"h-3.5 w-3.5"})),m(" "+n(l.label),1)]),s("p",Te,n(l.value),1)]))),128))])):y("",!0),s("section",De,[(a(!0),d(V,null,U(e(Q),l=>(a(),p(ee,{key:l.to,to:l.to,class:"flex items-center gap-4 border-b border-gray-100 px-5 py-4 transition-colors last:border-0 hover:bg-gray-50"},{default:u(()=>[s("span",He,[(a(),p(H(l.icon),{class:"h-5 w-5"}))]),s("span",je,[s("span",ze,n(l.label),1),s("span",Oe,n(l.hint),1)]),r(e(he),{class:"h-4 w-4 shrink-0 text-gray-400"})]),_:2},1032,["to"]))),128))]),s("section",Re,[s("div",qe,[t[7]||(t[7]=s("div",null,[s("h2",{class:"text-base font-semibold text-gray-900"},"Contact details"),s("p",{class:"text-xs text-gray-500"},"Used for delivery and order updates")],-1)),e(b)&&!e(_)?(a(),p(M,{key:0,variant:"outline",size:"sm",onClick:Z},{default:u(()=>[r(e(ve),{class:"mr-1.5 h-3.5 w-3.5"}),t[6]||(t[6]=m(" Edit ",-1))]),_:1})):y("",!0)]),e(_)?(a(),d("form",{key:1,class:"space-y-4 px-5 py-5",onSubmit:de(W,["prevent"])},[s("div",et,[r(e(F),{for:"account-name"},{default:u(()=>[...t[13]||(t[13]=[m("Name",-1)])]),_:1}),r(e(A),{id:"account-name",modelValue:e(c).name,"onUpdate:modelValue":t[0]||(t[0]=l=>e(c).name=l),autocomplete:"name",placeholder:"Your full name"},null,8,["modelValue"])]),s("div",tt,[r(e(F),{for:"account-email"},{default:u(()=>[...t[14]||(t[14]=[m("Email",-1)])]),_:1}),r(e(A),{id:"account-email","model-value":e(L),disabled:""},null,8,["model-value"]),s("p",st,[r(e(z),{class:"h-3 w-3"}),t[15]||(t[15]=m(" Your email comes from Google and can't be changed here. ",-1))])]),s("div",at,[r(e(F),{for:"account-phone"},{default:u(()=>[...t[16]||(t[16]=[m("Phone",-1)])]),_:1}),r(e(A),{id:"account-phone",modelValue:e(c).phone,"onUpdate:modelValue":t[1]||(t[1]=l=>e(c).phone=l),type:"tel",autocomplete:"tel",placeholder:"+855 12 345 678"},null,8,["modelValue"])]),s("div",ot,[r(e(F),{for:"account-address"},{default:u(()=>[...t[17]||(t[17]=[m("Address",-1)])]),_:1}),r(e(me),{id:"account-address",modelValue:e(c).address,"onUpdate:modelValue":t[2]||(t[2]=l=>e(c).address=l),rows:"3",autocomplete:"street-address",placeholder:"Delivery address for physical SIM cards"},null,8,["modelValue"])]),s("div",lt,[r(M,{type:"button",variant:"outline",disabled:e(x),onClick:K},{default:u(()=>[...t[18]||(t[18]=[m("Cancel",-1)])]),_:1},8,["disabled"]),r(M,{type:"submit",disabled:e(x)},{default:u(()=>[e(x)?(a(),p(e(R),{key:0,class:"mr-2 h-4 w-4 animate-spin"})):(a(),p(e(be),{key:1,class:"mr-2 h-4 w-4"})),m(" "+n(e(x)?"Saving…":"Save changes"),1)]),_:1},8,["disabled"])])],32)):(a(),d("dl",Ge,[s("div",$e,[t[8]||(t[8]=s("dt",{class:"text-sm text-gray-500"},"Name",-1)),s("dd",Ye,n(e(S)),1)]),s("div",Je,[t[10]||(t[10]=s("dt",{class:"text-sm text-gray-500"}
1,"Email",-1)),s("dd",Qe,[s("span",Ze,n(e(L)||"—"),1),s("span",Ke,[r(e(z),{class:"h-3 w-3"}),t[9]||(t[9]=m(" Managed by your Google account ",-1))])])]),e(b)?(a(),d("div",We,[t[11]||(t[11]=s("dt",{class:"text-sm text-gray-500"},"Phone",-1)),s("dd",{class:j(["col-span-2 text-sm",e(i)?.phone?"font-medium text-gray-900":"text-gray-400"])},n(e(i)?.phone||"Not added"),3)])):y("",!0),e(b)?(a(),d("div",Xe,[t[12]||(t[12]=s("dt",{class:"text-sm text-gray-500"},"Address",-1)),s("dd",{class:j(["col-span-2 whitespace-pre-line text-sm",e(i)?.address?"font-medium text-gray-900":"text-gray-400"])},n(e(i)?.address||"Not added"),3)])):y("",!0)]))])],64))])}}});export{Ft 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.