1System.register(["./index-legacy-DtXVSfTX.js"],function(e,t){"use strict";var a,n,l,o,i,s,r,u,c,d,p,h,v,g,m,f,b,_,y,P,C,k,S,D,x,w,L,T,A,I,U,$,V;return{setters:[e=>{a=e._,n=e.C,l=e.e,o=e.f,i=e.D,s=e.q,r=e.n,u=e.t,c=e.r,d=e.y,p=e.ab,h=e.v,v=e.a8,g=e.a$,m=e.b0,f=e.K,b=e.M,_=e.J,y=e.I,P=e.G,C=e.H,k=e.U,S=e.O,D=e.R,x=e.S,w=e.T,L=e.ae,T=e.j,A=e.k,I=e.u,U=e.m,$=e.Q,V=e.g}],execute:function(){var j=document.createElement("style");j.textContent=".title{background:var(--theme-primary)}.header-label{font-weight:700;border-color:#fff;border-bottom:1px solid rgba(255,255,255,.2)}.banded-list .stat{padding:10px}.panel{color:#fff;background-color:#2f27d4}.v-toolbar__title:not(:first-child){margin-left:0}.rightPanel{padding:20px 10px;background:#fff;border:solid 1px #eaeaea;margin-bottom:10px}.rightPanel h3{font-size:16px;color:#555}.rightPanel p{margin:6px 0;color:#4b4b4b}\n/*$vite$:1*/",document.head.appendChild(j);const N=n(()=>$(()=>t.import("./details-legacy-DOXl13I2.js"),void 0)),z=n(()=>$(()=>t.import("./invoiceList-legacy--ZDCmi_P.js"),void 0)),O={class:"rightPanel"};e("default",a({name:"accountDashboard",components:{accountDetails:N,invoiceList:z},data:()=>({account:{},activeTab:0,card:[],customer:null,invoices:[],leaguesDue:[],settings:{},stripeKey:"pk_live_DT9Z2DVsAUNaDaLbTMadBfdU00Gc0QLtKM",total:0,venue:{},allLeagues:{},promise:null,stripeCustomerInitialized:!1,planChangeDialog:!1,prevPlan:""}),watch:{venue(){this.venue.plan||(this.venue.plan="ppp")}},setup:()=>({userStore:A(),venueStore:I(),generalStore:U()}),computed:{helpPortalUrl:()=>T()},methods:{subscribe(){let e="https://us-central1-forged-7adb7.cloudfunctions.net/payments/subscribe?customer="+this.venue.customer;L.get(e).then(function(e){console.log("subscribed")})},cancelSubscribe(){let e="https://us-central1-forged-7adb7.cloudfunctions.net/payments/subscribe?customer="+this.venue.customer;L.post(e).then(function(e){console.log("subscribed")})},changePlan(){"sub"===this.venue.plan?(this.prevPlan="ppp",this.subscribe()):this.prevPlan="sub",this.planChangeDialog=!0},confirmPlanChange(){this.planChangeDialog=!1,P(C("/venues/"+this.venue.locationSlug),{plan:this.venue.plan})},cancelPlanChange(){"sub"===this.venue.plan?this.venue.plan="ppp":this.venue.plan="sub",this.planChangeDialog=!1},openCustomerPortal(){let e="https://us-central1-forged-7adb7.cloudfunctions.net/payments/portal?customer="+this.venue.customer;L.get(e).then(function(e){window.open(e.data.url,"_blank")})},openLink(e){window.open(e,"_blank")},getAccountDetails(){this.account=this.userStore.user,this.venue=this.venueStore.venue},getTotal(){let e=this.venueStore.venue;if("watl"===e.locationSlug)return 0;const t=D(C("/watl/allLeagues/2021_spring"),w("venue"),x(e.locationSlug));S(t,e=>{if(e.exists()){let t=this.allLeagues=e.val();for(let e in t)Promise.all([this.leagueNrPlayers(this.venue.locationSlug,t[e].slug,e)]).then(e=>{this.total+=5*e[0]})}})},leagueNrPlayers(e,t,a){return new Promise((n,l)=>{const o=k(`/venues/${e}/league/${t}/Season3/standings`);S(o,e=>{e.exists()?(this.allLeagues[a].players=Object.keys(e.val()).length,n(Object.keys(e.val()).length)):n(0)})})},addCustomerID(e){let t=this.venueStore.venue.locationSlug;P(C("/venues/"+t),{customer:e})},addCustomer(){let e=this.account.first+" "+this.account.last;y(_(f,"stripe_customers",this.$firebaseAuth.currentUser.uid),{name:e,description:this.venue.company,email:this.account.email}).then(()=>{})},checkCustomer(){return new Promise((e,t)=>{b(_(f,"stripe_customers",`${this.$firebaseAuth.currentUser.uid}`),t=>{this.stripeCustomerInitialized=!1!==t.exists,!1===t.exists&&this.addCustomer(),null!==t.data()&&void 0!==t.data().customer_id&&(this.customer={id:t.data().customer_id}),e(!0)},()=>{this.stripeCustomerInitialized=!1,e(!1)})})},getInvoices(){if("watl"===this.venueStore.venue.locationSlug)return!1;let e=this;g(m(f,"stripe_invoices",this.venueStore.venue.locationSlug,"invoices")).then(t=>{t.docs.map(t=>{e.invoices.push(t.data())})})}},mounted(){this.getAccountDetails(),this.promise=this.checkCustomer(),Promise.all([this.promise]).then(e=>{this.getTotal(),this.getInvoices()}).catch(e=>{console.error("Error",e)})}},[["render",function(e,t,a,n,g,m){const f=c("v-tab"),b=c("v-tabs"),_=c("v-toolbar-title"),y=c("v-spacer"),P=c("v-icon"),C=c("v-tooltip"),k=c("v-btn"),S=c("v-toolbar"),D=c("accountDetails"),x=c("invoiceList"),w=c("v-col"),L=c("v-row"),T=c("v-layout"),A=c("v-card-title"),I=c("v-card-text"),U=c("v-divider"),$=c("v-card-actions"),j=c("v-card"),N=c("v-dialog");return V(),l("div",null,[o(S,{tabs:"",app:"",card:"",height:"64",class:"toolbar-color"},{default:s(()=>[o(_,null,{default:s(()=>[o(b,{"bg-color":"transparent","slider-color":"primary",modelValue:g.activeTab,"onUpdate:modelValue":t[0]||(t[0]=e=>g.activeTab=e),height:"64"},{default:s(()=>[o(f,null,{default:s(()=>[...t[6]||(t[6]=[d("Payments",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),o(y),o(C,{location:"bottom",text:"Incoming invoices"},{activator:s(({props:e})=>[o(P,p(e,{class:"bookingNoti",color:"primary",title:0}),{default:s(()=>[...t[7]||(t[7]=[d("mdi-clipboard-arrow-down",-1)])]),_:1},16)]),_:1}),o(C,{location:"bottom",text:"FAQs"},{activator:s(({props:e})=>[o(k,p(e,{color:"light",class:"icon",variant:"flat",onClick:t[1]||(t[1]=e=>m.openLink(m.helpPortalUrl))}),{default:s(()=>[...t[8]||(t[8]=[h("i",{class:"icon-info"},null,-1)])]),_:1},16)]),_:1}),n.generalStore.notifications.bookings>0?(V(),r(P,{key:0,class:"bookingNoti",color:"primary",title:n.generalStore.notifications.bookings},{default:s(()=>[...t[9]||(t[9]=[d("mdi-email",-1)])]),_:1},8,["title"])):u("",!0)]),_:1}),i(o(T,null,{default:s(()=>[o(L,null,{default:s(()=>[o(w,{cols:"12",class:"pr-2"},{default:s(()=>[o(D,{account:g.account,venue:g.venue,total:g.total,leagues:g.allLeagues,plan:g.venue.plan},null,8,["account","venue","total","leagues","plan"]),o(L,null,{default:s(()=>[o(w,{cols:"12",md:"8"},{default:s(()=>[o(x,{customer:g.venue.customer},null,8,["customer"])]),_:1}),o(w,{cols:"12",md:"4",class:"pa-2"},{default:s(()=>[h("div",O,[t[11]||(t[11]=h("h3",null,[h("strong",null,"Credit card and payments")],-1)),t[12]||(t[12]=h("p",null," Access all payment information. Add, edit or remove credit card information. Check current subscription status. ",-1)),o(k,{onClick:t[2]||(t[2]=e=>
1m.openCustomerPortal())},{default:s(()=>[...t[10]||(t[10]=[d("Open customer portal",-1)])]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},512),[[v,0===g.activeTab]]),o(N,{modelValue:g.planChangeDialog,"onUpdate:modelValue":t[5]||(t[5]=e=>g.planChangeDialog=e),persistent:"",width:"500"},{default:s(()=>[o(j,null,{default:s(()=>[o(A,{class:"headline grey lighten-2","primary-title":""},{default:s(()=>[...t[13]||(t[13]=[d(" Confirmation ",-1)])]),_:1}),"sub"===g.prevPlan?(V(),r(I,{key:0},{default:s(()=>[...t[14]||(t[14]=[d(" Do you want to change plan from Subscription to Pay Per Player? ",-1)])]),_:1})):u("",!0),"ppp"===g.prevPlan?(V(),r(I,{key:1},{default:s(()=>[...t[15]||(t[15]=[d(" Do you want to change plan from Pay Per Player to Subscription? ",-1)])]),_:1})):u("",!0),"ppp"!==g.prevPlan||g.venue.hadTrial?u("",!0):(V(),r(I,{key:2},{default:s(()=>[...t[16]||(t[16]=[d(" You are eligible for free trial. ",-1)])]),_:1})),o(U),o($,null,{default:s(()=>[o(y),o(k,{color:"primary",variant:"flat",onClick:t[3]||(t[3]=e=>m.confirmPlanChange())},{default:s(()=>[...t[17]||(t[17]=[d(" I confirm ",-1)])]),_:1}),o(k,{color:"error",variant:"flat",onClick:t[4]||(t[4]=e=>m.cancelPlanChange())},{default:s(()=>[...t[18]||(t[18]=[d(" Cancel ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])])}]]))}}});
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.