-
Notifications
You must be signed in to change notification settings - Fork 4
/
app.018d5756.js
2 lines (2 loc) · 68.3 KB
/
app.018d5756.js
1
2
(function(t){function e(e){for(var a,o,i=e[0],c=e[1],u=e[2],p=0,m=[];p<i.length;p++)o=i[p],r[o]&&m.push(r[o][0]),r[o]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(t[a]=c[a]);l&&l(e);while(m.length)m.shift()();return s.push.apply(s,u||[]),n()}function n(){for(var t,e=0;e<s.length;e++){for(var n=s[e],a=!0,i=1;i<n.length;i++){var c=n[i];0!==r[c]&&(a=!1)}a&&(s.splice(e--,1),t=o(o.s=n[0]))}return t}var a={},r={0:0},s=[];function o(e){if(a[e])return a[e].exports;var n=a[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=a,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)o.d(n,a,function(e){return t[e]}.bind(null,a));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],c=i.push.bind(i);i.push=e,i=i.slice();for(var u=0;u<i.length;u++)e(i[u]);var l=c;s.push([0,1]),n()})({0:function(t,e,n){t.exports=n("Vtdi")},"0RCh":function(t){t.exports=[{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_voterInitialTokens",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{constant:!1,inputs:[],name:"lockRegistration",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"startVoting",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"stopVoting",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getTotalSupply",outputs:[{name:"_totalSupply",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_user",type:"address"}],name:"isPlayer",outputs:[{name:"_bPlayer",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_user",type:"address"},{name:"_teamName",type:"string"}],name:"isPlayerInTeam",outputs:[{name:"_bTeamPlayer",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_player",type:"address"}],name:"getPlayerName",outputs:[{name:"_name",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_player",type:"address"}],name:"getTeamNamePlayerJoined",outputs:[{name:"_name",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_player",type:"address"},{name:"_playerName",type:"string"},{name:"_teamName",type:"string"}],name:"registerPlayer",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_player",type:"address"},{name:"_teamName",type:"string"}],name:"kickPlayer",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getTotalPlayers",outputs:[{name:"_total",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_startSearchingIndex",type:"uint256"}],name:"getFirstFoundPlayerInfo",outputs:[{name:"_endOfList",type:"bool"},{name:"_nextStartSearchingIndex",type:"uint256"},{name:"_player",type:"address"},{name:"_name",type:"string"},{name:"_tokensBalance",type:"uint256"},{name:"_teamName",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_player",type:"address"}],name:"getTotalTeamsVotedByPlayer",outputs:[{name:"_total",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_player",type:"address"},{name:"_votingIndex",type:"uint256"}],name:"getVoteResultAtIndexByPlayer",outputs:[{name:"_endOfList",type:"bool"},{name:"_team",type:"string"},{name:"_voteWeight",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_player",type:"address"}],name:"getTokenBalance",outputs:[{name:"_tokenBalance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_teamName",type:"string"},{name:"_player",type:"address"},{name:"_votingWeight",type:"uint256"}],name:"commitToVote",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},10:function(t,e){},11:function(t,e){},12:function(t,e){},"7wvV":function(t,e,n){},9:function(t,e){},"A0++":function(t,e,n){"use strict";var a=n("BPUQ"),r=n.n(a);r.a},A5AY:function(t,e,n){},BPUQ:function(t,e,n){},GKLD:function(t,e,n){},JBT8:function(t,e,n){"use strict";var a=n("UC0k"),r=n.n(a);r.a},RLnt:function(t){t.exports=[{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_voterInitialTokens",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{constant:!1,inputs:[],name:"lockRegistration",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"startVoting",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"stopVoting",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getTotalSupply",outputs:[{name:"_totalSupply",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_user",type:"address"}],name:"isStaff",outputs:[{name:"_bStaff",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_staff",type:"address"}],name:"getStaffName",outputs:[{name:"_name",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_staff",type:"address"},{name:"_staffName",type:"string"}],name:"registerStaff",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_staff",type:"address"}],name:"kickStaff",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getTotalStaffs",outputs:[{name:"_total",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_startSearchingIndex",type:"uint256"}],name:"getFirstFoundStaffInfo",outputs:[{name:"_endOfList",type:"bool"},{name:"_nextStartSearchingIndex",type:"uint256"},{name:"_staff",type:"address"},{name:"_name",type:"string"},{name:"_tokensBalance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_staff",type:"address"}],name:"getTotalTeamsVotedByStaff",outputs:[{name:"_total",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_staff",type:"address"},{name:"_votingIndex",type:"uint256"}],name:"getVoteResultAtIndexByStaff",outputs:[{name:"_endOfList",type:"bool"},{name:"_team",type:"string"},{name:"_voteWeight",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_staff",type:"address"}],name:"getTokenBalance",outputs:[{name:"_tokenBalance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_teamName",type:"string"},{name:"_staff",type:"address"},{name:"_votingWeight",type:"uint256"}],name:"commitToVote",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},RPpN:function(t){t.exports=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_ownerName",type:"string"},{name:"_voterInitialTokens",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[],name:"StateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_contract",type:"address"}],name:"ChildContractCreated",type:"event"},{anonymous:!1,inputs:[],name:"StaffRegistered",type:"event"},{anonymous:!1,inputs:[],name:"StaffKicked",type:"event"},{anonymous:!1,inputs:[],name:"PlayerRegistered",type:"event"},{anonymous:!1,inputs:[],name:"TeamCreated",type:"event"},{anonymous:!1,inputs:[],name:"PlayerKicked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"_nextStartSearchingIndex",type:"uint256"}],name:"FirstFoundPlayerInTeamKicked",type:"event"},{anonymous:!1,inputs:[],name:"TeamKicked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"_teamName",type:"string"},{indexed:!1,name:"_totalVoted",type:"uint256"}],name:"TeamVoted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"tokens",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"tokenOwner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"tokens",type:"uint256"}],name:"Approval",type:"event"},{constant:!0,inputs:[],name:"getContractState",outputs:[{name:"_state",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"startRegistration",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"lockRegistration",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"startVoting",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"stopVoting",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"createStaffContract",outputs:[{name:"_contract",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"createPlayerContract",outputs:[{name:"_contract",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"createTeamContract",outputs:[{name:"_contract",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_newStaff",type:"address"},{name:"_newStaffName",type:"string"}],name:"registerStaff",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_staff",type:"address"}],name:"kickStaff",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_teamName",type:"string"},{name:"_creatorName",type:"string"}],name:"createTeam",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_teamName",type:"string"}],name:"kickTeam",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_playerName",type:"string"},{name:"_teamName",type:"string"}],name:"registerPlayer",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_player",type:"address"},{name:"_teamName",type:"string"}],name:"kickPlayer",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_teamName",type:"string"},{name:"_startSearchingIndex",type:"uint256"}],name:"kickFirstFoundPlayerInTeam",outputs:[{name:"_nextStartSearchingIndex",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_teamName",type:"string"},{name:"_votingWeight",type:"uint256"}],name:"voteTeam",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"_totalSupply",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_tokenOwner",type:"address"}],name:"balanceOf",outputs:[{name:"_balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_tokenOwner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_tokens",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_tokens",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokens",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]},RnhZ:function(t,e,n){var a={"./af":"K/tc","./af.js":"K/tc","./ar":"jnO4","./ar-dz":"o1bE","./ar-dz.js":"o1bE","./ar-kw":"Qj4J","./ar-kw.js":"Qj4J","./ar-ly":"HP3h","./ar-ly.js":"HP3h","./ar-ma":"CoRJ","./ar-ma.js":"CoRJ","./ar-sa":"gjCT","./ar-sa.js":"gjCT","./ar-tn":"bYM6","./ar-tn.js":"bYM6","./ar.js":"jnO4","./az":"SFxW","./az.js":"SFxW","./be":"H8ED","./be.js":"H8ED","./bg":"hKrs","./bg.js":"hKrs","./bm":"p/rL","./bm.js":"p/rL","./bn":"kEOa","./bn.js":"kEOa","./bo":"0mo+","./bo.js":"0mo+","./br":"aIdf","./br.js":"aIdf","./bs":"JVSJ","./bs.js":"JVSJ","./ca":"1xZ4","./ca.js":"1xZ4","./cs":"PA2r","./cs.js":"PA2r","./cv":"A+xa","./cv.js":"A+xa","./cy":"l5ep","./cy.js":"l5ep","./da":"DxQv","./da.js":"DxQv","./de":"tGlX","./de-at":"s+uk","./de-at.js":"s+uk","./de-ch":"u3GI","./de-ch.js":"u3GI","./de.js":"tGlX","./dv":"WYrj","./dv.js":"WYrj","./el":"jUeY","./el.js":"jUeY","./en-au":"Dmvi","./en-au.js":"Dmvi","./en-ca":"OIYi","./en-ca.js":"OIYi","./en-gb":"Oaa7","./en-gb.js":"Oaa7","./en-ie":"4dOw","./en-ie.js":"4dOw","./en-il":"czMo","./en-il.js":"czMo","./en-nz":"b1Dy","./en-nz.js":"b1Dy","./eo":"Zduo","./eo.js":"Zduo","./es":"iYuL","./es-do":"CjzT","./es-do.js":"CjzT","./es-us":"Vclq","./es-us.js":"Vclq","./es.js":"iYuL","./et":"7BjC","./et.js":"7BjC","./eu":"D/JM","./eu.js":"D/JM","./fa":"jfSC","./fa.js":"jfSC","./fi":"gekB","./fi.js":"gekB","./fo":"ByF4","./fo.js":"ByF4","./fr":"nyYc","./fr-ca":"2fjn","./fr-ca.js":"2fjn","./fr-ch":"Dkky","./fr-ch.js":"Dkky","./fr.js":"nyYc","./fy":"cRix","./fy.js":"cRix","./gd":"9rRi","./gd.js":"9rRi","./gl":"iEDd","./gl.js":"iEDd","./gom-latn":"DKr+","./gom-latn.js":"DKr+","./gu":"4MV3","./gu.js":"4MV3","./he":"x6pH","./he.js":"x6pH","./hi":"3E1r","./hi.js":"3E1r","./hr":"S6ln","./hr.js":"S6ln","./hu":"WxRl","./hu.js":"WxRl","./hy-am":"1rYy","./hy-am.js":"1rYy","./id":"UDhR","./id.js":"UDhR","./is":"BVg3","./is.js":"BVg3","./it":"bpih","./it.js":"bpih","./ja":"B55N","./ja.js":"B55N","./jv":"tUCv","./jv.js":"tUCv","./ka":"IBtZ","./ka.js":"IBtZ","./kk":"bXm7","./kk.js":"bXm7","./km":"6B0Y","./km.js":"6B0Y","./kn":"PpIw","./kn.js":"PpIw","./ko":"Ivi+","./ko.js":"Ivi+","./ky":"lgnt","./ky.js":"lgnt","./lb":"RAwQ","./lb.js":"RAwQ","./lo":"sp3z","./lo.js":"sp3z","./lt":"JvlW","./lt.js":"JvlW","./lv":"uXwI","./lv.js":"uXwI","./me":"KTz0","./me.js":"KTz0","./mi":"aIsn","./mi.js":"aIsn","./mk":"aQkU","./mk.js":"aQkU","./ml":"AvvY","./ml.js":"AvvY","./mn":"lYtQ","./mn.js":"lYtQ","./mr":"Ob0Z","./mr.js":"Ob0Z","./ms":"6+QB","./ms-my":"ZAMP","./ms-my.js":"ZAMP","./ms.js":"6+QB","./mt":"G0Uy","./mt.js":"G0Uy","./my":"honF","./my.js":"honF","./nb":"bOMt","./nb.js":"bOMt","./ne":"OjkT","./ne.js":"OjkT","./nl":"+s0g","./nl-be":"2ykv","./nl-be.js":"2ykv","./nl.js":"+s0g","./nn":"uEye","./nn.js":"uEye","./pa-in":"8/+R","./pa-in.js":"8/+R","./pl":"jVdC","./pl.js":"jVdC","./pt":"8mBD","./pt-br":"0tRk","./pt-br.js":"0tRk","./pt.js":"8mBD","./ro":"lyxo","./ro.js":"lyxo","./ru":"lXzo","./ru.js":"lXzo","./sd":"Z4QM","./sd.js":"Z4QM","./se":"//9w","./se.js":"//9w","./si":"7aV9","./si.js":"7aV9","./sk":"e+ae","./sk.js":"e+ae","./sl":"gVVK","./sl.js":"gVVK","./sq":"yPMs","./sq.js":"yPMs","./sr":"zx6S","./sr-cyrl":"E+lV","./sr-cyrl.js":"E+lV","./sr.js":"zx6S","./ss":"Ur1D","./ss.js":"Ur1D","./sv":"X709","./sv.js":"X709","./sw":"dNwA","./sw.js":"dNwA","./ta":"PeUW","./ta.js":"PeUW","./te":"XLvN","./te.js":"XLvN","./tet":"V2x9","./tet.js":"V2x9","./tg":"Oxv6","./tg.js":"Oxv6","./th":"EOgW","./th.js":"EOgW","./tl-ph":"Dzi0","./tl-ph.js":"Dzi0","./tlh":"z3Vd","./tlh.js":"z3Vd","./tr":"DoHr","./tr.js":"DoHr","./tzl":"z1FC","./tzl.js":"z1FC","./tzm":"wQk9","./tzm-latn":"tT3J","./tzm-latn.js":"tT3J","./tzm.js":"wQk9","./ug-cn":"YRex","./ug-cn.js":"YRex","./uk":"raLr","./uk.js":"raLr","./ur":"UpQW","./ur.js":"UpQW","./uz":"Loxo","./uz-latn":"AQ68","./uz-latn.js":"AQ68","./uz.js":"Loxo","./vi":"KSF8","./vi.js":"KSF8","./x-pseudo":"/X5v","./x-pseudo.js":"/X5v","./yo":"fzPg","./yo.js":"fzPg","./zh-cn":"XDpg","./zh-cn.js":"XDpg","./zh-hk":"SatO","./zh-hk.js":"SatO","./zh-tw":"kOpN","./zh-tw.js":"kOpN"};function r(t){var e=s(t);return n(e)}function s(t){var e=a[t];if(!(e+1)){var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}return e}r.keys=function(){return Object.keys(a)},r.resolve=s,t.exports=r,r.id="RnhZ"},TDkX:function(t,e,n){"use strict";var a=n("GKLD"),r=n.n(a);r.a},UC0k:function(t,e,n){},Vpyg:function(t,e,n){},Vtdi:function(t,e,n){"use strict";n.r(e);var a=n("a94B"),r=(n("ls82"),n("MECJ")),s=(n("yt8O"),n("VRzm"),n("Kw5r")),o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("div",{staticClass:"nav-bar",attrs:{id:"nav"}},[n("nav",{staticClass:"navbar is-transparent is-warning"},[n("div",{staticClass:"navbar-brand"},[n("router-link",{staticClass:"navbar-item",attrs:{to:"/"}},[n("img",{staticClass:"logo",attrs:{src:"https://p-u.popcdn.net/attachments/images/000/010/730/large/Pizza_Hackathon_Logo.png?1532094493",alt:"Pizza Hackathon",width:"50",height:"50"}})])],1),n("div",{staticClass:"navbar-menu"},[n("div",{staticClass:"navbar-start"},[n("div",{staticClass:"navbar-item"},[n("router-link",{staticClass:"navbar-item link-item",attrs:{to:"/"}},[t._v("\n Home\n ")]),n("router-link",{staticClass:"navbar-item link-item",attrs:{to:"/leader-board"}},[t._v("\n Leader board\n ")]),n("router-link",{staticClass:"navbar-item link-item",attrs:{to:"/livefeed"}},[t._v("\n Live feed\n ")]),n("router-link",{staticClass:"navbar-item link-item",attrs:{to:"/github"}},[t._v("\n Github\n ")])],1)]),n("div",{staticClass:"navbar-end"},[n("div",{staticClass:"navbar-item"},[t._v("\n "+t._s(t.playerInfo)+"\n ")]),n("div",{staticClass:"navbar-item"},[n("a",{staticClass:"bd-tw-button button is-info",attrs:{href:t.$store.state.system.etherscanPrefix+"/token/"+t.$store.state.system.pizzaCoinAddr+"?a="+t.$pizzaCoin.account,target:"_blank"}},[t._v(" You have "+t._s(t.tokenBalance)+" PZC")])]),n("div",{staticClass:"navbar-item"},[n("div",{staticClass:"field is-grouped"},[t.isStaffLoggedIn&&"Registration"===t.stateContract?n("p",{staticClass:"control"},[n("a",{staticClass:"bd-tw-button button",on:{click:function(e){t.lockRegistration()}}},[t._v("\n Freeze & Transfer\n ")])]):t._e(),n("p",{staticClass:"control"},[t.isStaffLoggedIn&&"Registration Locked"===t.stateContract?n("a",{staticClass:"bd-tw-button button",on:{click:function(e){t.startVote()}}},[t._v("\n Start Vote\n ")]):t._e(),t.isStaffLoggedIn&&"Voting"===t.stateContract?n("a",{staticClass:"bd-tw-button button",on:{click:function(e){t.stopVote()}}},[t._v("\n Stop Vote\n ")]):t._e()])])])])])])]),n("section",[n("span",{staticClass:"icon",on:{click:function(e){t.isComponentModalActive=!0}}},[n("i",{staticClass:"fas fa-plus-circle fa fa-3x"})]),n("b-modal",{attrs:{active:t.isComponentModalActive,"has-modal-card":""},on:{"update:active":function(e){t.isComponentModalActive=e}}},[n("form",{on:{submit:function(e){e.preventDefault(),t.onCreateTeam()}}},[n("div",{staticClass:"modal-card",staticStyle:{width:"auto"}},[n("header",{staticClass:"modal-card-head"},[n("p",{staticClass:"modal-card-title"},[t._v("Place your name")])]),n("section",{staticClass:"modal-card-body"},[n("b-field",{attrs:{label:"User name"}},[n("b-input",{attrs:{type:"text",placeholder:"Your name",required:""},model:{value:t.creatorName,callback:function(e){t.creatorName=e},expression:"creatorName"}})],1),n("b-field",{attrs:{label:"teamname"}},[n("b-input",{attrs:{type:"text",placeholder:"Your team name",required:""},model:{value:t.teamname,callback:function(e){t.teamname=e},expression:"teamname"}})],1)],1),n("footer",{staticClass:"modal-card-foot"},[n("button",{staticClass:"button",attrs:{type:"button"},on:{click:function(e){t.onCancel()}}},[t._v("Cancel")]),n("button",{staticClass:"button is-primary"},[t._v("Submit")])])])])])],1),n("router-view",{staticClass:"main"})],1)},i=[],c=n("yT7P"),u=(n("f3/d"),n("L2JU")),l={data:function(){return{isComponentModalActive:!1,creatorName:"",teamname:"",account:null}},mounted:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return console.log("check route --\x3e "+this.$route.name),t.prev=1,t.t0=this.$pizzaCoin,t.next=5,this.$pizzaCoin.account;case 5:return t.t1=t.sent,t.next=8,t.t0.getContractState.call(t.t0,t.t1);case 8:e=t.sent,console.log("check state --\x3e "+e),this.$store.dispatch("staff/getContractState",e),t.next=16;break;case 13:t.prev=13,t.t2=t["catch"](1),console.error(t.t2);case 16:case"end":return t.stop()}},t,this,[[1,13]])}));return function(){return t.apply(this,arguments)}}(),computed:Object(c["a"])({},Object(u["d"])("auth",["isStaffLoggedIn","tokenBalance","isPlayerLoggedIn","playerInfo"]),Object(u["d"])("staff",["stateContract"]),Object(u["d"])("team",["teamCount"])),methods:Object(c["a"])({},Object(u["b"])("auth",["isStaffLogin"]),Object(u["b"])("team",["creatTeam"]),{onCreateTeam:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.isComponentModalActive=!1,t.next=4,this.$pizzaCoin.createTeam(this.creatorName,this.teamname);case 4:return t.t0=this.$store,t.next=7,this.$pizzaCoin.getTeamsProfile();case 7:t.t1=t.sent,t.t0.dispatch.call(t.t0,"team/getTeamsProfile",t.t1),this.creatorName="",this.teamname="",t.next=16;break;case 13:t.prev=13,t.t2=t["catch"](0),console.error(t.t2);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),onCancel:function(){this.teamname="",this.isComponentModalActive=!1},startVote:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.t0=console,t.next=3,this.$pizzaCoin.account;case 3:return t.t1=t.sent,t.t2="start vote"+t.t1,t.t0.log.call(t.t0,t.t2),t.prev=6,t.t3=this.$pizzaCoin,t.next=10,this.$pizzaCoin.account;case 10:return t.t4=t.sent,t.next=13,t.t3.startVoting.call(t.t3,t.t4);case 13:t.next=18;break;case 15:t.prev=15,t.t5=t["catch"](6),console.error(t.t5);case 18:case"end":return t.stop()}},t,this,[[6,15]])}));return function(){return t.apply(this,arguments)}}(),isPlayer:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.$pizzaCoin.isPlayer(this.$pizzaCoin.account);case 3:return t.abrupt("return",t.sent);case 6:t.prev=6,t.t0=t["catch"](0),console.error(t.t0);case 9:case"end":return t.stop()}},t,this,[[0,6]])}));return function(){return t.apply(this,arguments)}}(),stopVote:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return console.log("stop vote"+this.$pizzaCoin.account),t.prev=1,t.t0=this.$pizzaCoin,t.next=5,this.$pizzaCoin.account;case 5:return t.t1=t.sent,t.next=8,t.t0.stopVoting.call(t.t0,t.t1);case 8:t.next=13;break;case 10:t.prev=10,t.t2=t["catch"](1),console.error(t.t2);case 13:case"end":return t.stop()}},t,this,[[1,10]])}));return function(){return t.apply(this,arguments)}}(),lockRegistration:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=this.$pizzaCoin,t.next=4,this.$pizzaCoin.account;case 4:return t.t1=t.sent,t.next=7,t.t0.lockRegistration.call(t.t0,t.t1);case 7:t.next=12;break;case 9:t.prev=9,t.t2=t["catch"](0),console.error(t.t2);case 12:case"end":return t.stop()}},t,this,[[0,9]])}));return function(){return t.apply(this,arguments)}}()})},p=l,m=(n("A0++"),n("Z1vA"),n("KHd+")),y=Object(m["a"])(p,o,i,!1,null,"3a428246",null),d=y.exports,f={user:{},isStaffLoggedIn:!1,isPlayerLoggedIn:!1,isLoading:0,userAddress:"",userName:"",tokenBalance:0,playerInfo:"You haven't registered"},h={setLoading:function(t,e){t.isLoading+=e},isStaffLogin:function(t,e){console.log(" payload >> ".concat(e)),t.isStaffLoggedIn=!0,t.isPlayerLoggedIn=!1},isPlayerLogin:function(t,e){console.log(" payload >> ".concat(e)),t.isStaffLoggedIn=!1,t.isPlayerLoggedIn=!0},getTokenBalance:function(t,e){var n=e.isPlayer,a=e.tokenBalance;console.log(" isPlayer >> ".concat(n)),n||t.isStaffLoggedIn?t.tokenBalance=a:t.tokenBalance=0},playerInfo:function(t,e){var n=e.role,a=e.name;console.log(n+"playerInfo"+a),t.playerInfo=n+" : "+a}},g={isStaffLogin:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e,n){var a;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:a=e.commit,console.log("actions isStaffLogin >> ".concat(n)),a("isStaffLogin",n);case 3:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),isPlayerLogin:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e,n){var a;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:a=e.commit,console.log("actions isPlayerLogin >> ".concat(n)),a("isPlayerLogin",n);case 3:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),setIsLoading:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e,n){var a;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:a=e.commit,a("setLoading",n);case 2:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),getTokenBalance:function(t,e){var n=t.commit;console.log(" getTokenBalance >> ".concat(e)),n("getTokenBalance",e)},playerInfo:function(t,e){var n=t.commit;n("playerInfo",e)}},b={namespaced:!0,state:f,actions:g,mutations:h},v={teams:[],teamCount:0},k={getTeamsProfile:function(t,e){console.log("action --\x3e getTeamsProfile"),t.commit("getTeamsProfile",e)},creatTeam:function(t,e){t.commit("creatTeam",e)},addMember:function(t,e){t.commit("addMember",e)},removePlayer:function(t,e){console.log("removePlayer --\x3e ".concat(e.address)),t.commit("removePlayer",e)},voteTeam:function(t,e){console.log("voteTeam --\x3e "+e)},getTeamCount:function(t,e){t.commit("setTeamCount",e)}},w={getTeamsProfile:function(t,e){console.log("mutations --\x3e getTeamsProfile"+e),t.teams=e},voteTeam:function(t,e){},addScore:function(t,e){console.log(e.groupId),t.teams.map(function(n,a){n.groupId===e.groupId&&console.log(t.teams[a].score++)})},removePlayer:function(t,e){console.log(e.address)},creatTeam:function(t,e){console.log(e),console.log(t.teams.push({groupId:e,groupName:e,score:3,detail:[]}))},addMember:function(t,e){var n=e.memberName,a=e.teamMebers;console.log(a.groupName),t.teams.map(function(e,r){e.groupId===a.groupId&&console.log(t.teams[r].detail.push({name:n,address:n}))})},setTeamCount:function(t,e){t.teamCount=e}},x={namespaced:!0,state:v,actions:k,mutations:w},j={stateContract:""},C={getContractState:function(t,e){console.log("action --\x3e getContractState"),t.commit("getContractState",e)}},_={getContractState:function(t,e){console.log("mutations --\x3e getContractState"),t.stateContract=e}},T={namespaced:!0,state:j,actions:C,mutations:_},z={network:"kovan",etherscanPrefix:"https://kovan.etherscan.io",ethereumNode:"wss://kovan.infura.io/ws",pizzaCoinAddr:"0xe960868fa9e521f853ade9d5b40088b6387592f0",pizzaCoinStaffAddr:"0x0C7FfBfAB626dDB6278CC1a20BA471981d1C8048",pizzaCoinPlayerAddr:"0xfD4B7211Abb8b41bf45805A8F177FF4f22F52E36",pizzaCoinTeamAddr:"0x156e3718c6F8EF104141f147FDd79775B7085783"},P={namespaced:!0,state:z};s["a"].use(u["a"]);var R=new u["a"].Store({modules:{auth:b,team:x,staff:T,system:P},state:{teamname:""}}),O=n("jE9Z"),S=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"home"},[n("span",{staticStyle:{"text-align":"center","justify-content":"center",width:"100%",display:"block","font-size":"4em","margin-bottom":"33px","margin-top":"-27px"}},[t._v("\n Teams\n ")]),n("div",{staticClass:"container"},[n("div",{staticClass:"is-mobile"},[n("div",[n("div",{staticClass:"columns is-multiline"},t._l(t.dataTeam,function(t){return n("TeamCard",{key:t.name,attrs:{team:t,score:t.score}})}))])]),t._v("\n\n Team count "+t._s(t.teamCount)+"\n ")])])},M=[],N=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"column is-4"},["Voting"===t.stateContract?n("a",{staticClass:"badge1",attrs:{href:t.$store.state.system.etherscanPrefix+"/address/"+t.$store.state.system.pizzaCoinAddr+"#events","data-badge":t.score,target:"_blank"}}):t._e(),n("div",{staticClass:"box content shadow"},[n("article",{staticClass:"post"},[n("h2",{},[t._v("\n "+t._s(t.team.name)+"\n ")]),n("hr"),n("div",{},[n("TeamProfile",{attrs:{team:t.dataTeam}})],1)])])])},I=[],A=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{},[t._l(t.dataTeam,function(e){return n("div",{key:e.address,staticClass:"is-mobile"},[n("div",{staticClass:"media content-margin"},[n("div",{staticClass:"media-left"},[n("a",{attrs:{href:t.$store.state.system.etherscanPrefix+"/address/"+e.address,target:"_blank"}},[n("p",{staticClass:"image is-48x48"},[n("img",{staticClass:"img-player",attrs:{src:t.playerAvatarImage(e.address),alt:""}})])])]),n("div",{staticClass:"media-content"},[n("div",[n("div",{staticClass:"playerName"},[n("h4",[t._v(t._s(e.name))])]),n("h6",{staticClass:"userAdress"},[t._v(t._s(e.address))])])]),t.isStaffLoggedIn&&"Registration"===t.stateContract?n("div",{staticClass:"media-right"},[n("div",[n("button",{staticClass:"button is-danger",on:{click:function(n){t.removePlayer(t.team,e)}}},[t._v("\n Kick\n ")])])]):t._e()])])}),"Voting"===t.stateContract&&parseInt(t.tokenBalance)>0&&t.canVote?n("button",{staticClass:"button is-primary is-fullwidth",on:{click:function(e){t.onVote(t.team)}}},[t._v("\n VOTE\n ")]):t._e(),t.isStaffLoggedIn||"Registration"!==t.stateContract?t._e():n("div",{staticClass:"join"},[t.isJoined&&!t.isPlayerLoggedIn?n("button",{staticClass:"button is-success is-fullwidth",attrs:{disabled:t.dataTeam.length>4},on:{click:function(e){t.onJoin()}}},[t._v("\n Join\n ")]):t._e(),n("form",{on:{submit:function(e){e.preventDefault(),t.onAddPlayer(t.team)}}},[t.isJoined?t._e():n("b-input",{attrs:{type:"text",placeholder:"Your name",required:""},model:{value:t.playerName,callback:function(e){t.playerName=e},expression:"playerName"}})],1),t.isJoined?t._e():n("button",{staticClass:"button is-primary is-fullwidth join",on:{click:function(e){t.onAddPlayer(t.team)}}},[t._v("\n Submit\n ")])]),0===t.dataTeam.length&&t.isStaffLoggedIn&&"Registration"===t.stateContract?n("button",{staticClass:"button is-danger is-fullwidth join",on:{click:function(e){t.removeTeam(t.team.name)}}},[t._v("\n Kick team\n ")]):t._e()],2)},V=[],L=(n("a1Th"),n("NvOG")),B=n.n(L),$={data:function(){return{isJoined:!0,playerName:"",pizzaCoin:null,pizzaCoinSymbol:"",userAddress:"",dataTeam:null,canVote:null}},created:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),mounted:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e,n,a,r,s;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.loadPizzaCoinSymbol();case 2:if("Registration"===this.stateContract){t.next=11;break}return t.next=5,this.$pizzaCoin.getPlayersProfile(this.team.name);case 5:e=t.sent,n=e.teams,a=e.canVote,this.dataTeam=n,this.canVote=a,console.log("test"+this.dataTeam.length);case 11:console.log("stateContract"+this.stateContract);case 12:if("Registration"!==this.stateContract){t.next=20;break}return t.next=15,this.$pizzaCoin.getPlayersProfile(this.team.name);case 15:r=t.sent,s=r.teams,this.dataTeam=s,t.next=12;break;case 20:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),props:["team"],computed:Object(c["a"])({},Object(u["d"])("auth",["user","isStaffLoggedIn","tokenBalance","isPlayerLoggedIn"]),Object(u["d"])("staff",["stateContract"])),methods:Object(c["a"])({},Object(u["b"])("team",["addMember"]),Object(u["c"])("team",["addScore"]),{onVote:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n,a,r,s;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(n=e.name,a=this.$loading.open({container:null}),console.log("onVote --\x3e "+n),!(this.tokenBalance<1)){t.next=7;break}alert("Your toker is not enough."),t.next=23;break;case 7:return t.prev=7,r={voterAddr:this.userAddress,teamName:n,votingWeight:1},t.next=11,this.$pizzaCoin.voteTeam(r);case 11:return s=t.sent,s&&this.$toast.open({duration:5e3,message:"Successfully vote 1 PZC for ".concat(n),type:"is-success"}),t.t0=this.$store,t.next=16,this.$pizzaCoin.getTeamsProfile();case 16:t.t1=t.sent,t.t0.dispatch.call(t.t0,"team/getTeamsProfile",t.t1),t.next=23;break;case 20:t.prev=20,t.t2=t["catch"](7),console.error(t.t2);case 23:a.close();case 24:case"end":return t.stop()}},t,this,[[7,20]])}));return function(e){return t.apply(this,arguments)}}(),onJoin:function(){this.playerName="",this.isJoined=!1},onAddPlayer:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n,a;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=e.name,this.isJoined=!0,t.t0=console,t.next=5,n;case 5:return t.t1=t.sent,t.t2="onAddPlayer --\x3e "+t.t1,t.t0.log.call(t.t0,t.t2),console.log("playerName --\x3e "+this.playerName),a={playerAddr:this.userAddress,playerName:this.playerName,teamName:n},t.prev=10,t.next=13,this.$pizzaCoin.registerPlayer(a);case 13:return this.isJoined=!0,t.t3=this.$store,t.next=17,this.$pizzaCoin.getTeamsProfile();case 17:t.t4=t.sent,t.t3.dispatch.call(t.t3,"team/getTeamsProfile",t.t4),t.next=24;break;case 21:t.prev=21,t.t5=t["catch"](10),console.error(t.t5);case 24:case"end":return t.stop()}},t,this,[[10,21]])}));return function(e){return t.apply(this,arguments)}}(),loadPizzaCoinSymbol:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.$pizzaCoin.main.methods.symbol().call();case 3:return this.pizzaCoinSymbol=t.sent,t.next=6,this.$pizzaCoin.account;case 6:this.userAddress=t.sent,t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.log(t.t0);case 12:case"end":return t.stop()}},t,this,[[0,9]])}));return function(){return t.apply(this,arguments)}}(),removePlayer:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e,n){var a,r,s,o;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return a=e.name,r=n.address,console.log("removePlayer --\x3e ".concat(r," in team ").concat(a)),s={kickerAddr:this.userAddress,playerAddr:r,teamName:a},t.prev=4,t.next=7,this.$pizzaCoin.kickPlayer(s);case 7:return o=t.sent,console.log("After delete ->> ".concat(o)),t.t0=this.$store,t.next=12,this.$pizzaCoin.getTeamsProfile();case 12:t.t1=t.sent,t.t0.dispatch.call(t.t0,"team/getTeamsProfile",t.t1),t.next=19;break;case 16:t.prev=16,t.t2=t["catch"](4),console.error(t.t2);case 19:case"end":return t.stop()}},t,this,[[4,16]])}));return function(e,n){return t.apply(this,arguments)}}(),removeTeam:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return console.log("teamName: ".concat(e)),t.prev=1,t.next=4,this.$pizzaCoin.kickTeam(e);case 4:return n=t.sent,console.log("After delete ->> ".concat(n)),t.t0=this.$store,t.next=9,this.$pizzaCoin.getTeamsProfile();case 9:t.t1=t.sent,t.t0.dispatch.call(t.t0,"team/getTeamsProfile",t.t1),t.next=16;break;case 13:t.prev=13,t.t2=t["catch"](1),console.error(t.t2);case 16:case"end":return t.stop()}},t,this,[[1,13]])}));return function(e){return t.apply(this,arguments)}}(),playerAvatarImage:function(t){var e=new B.a(t,120).toString();return"data:image/png;base64,".concat(e)},loadTeam:function(){console.log("loadTeam")}})},F=$,D=(n("TDkX"),n("Zcxv"),n("ZWa3"),n("JBT8"),Object(m["a"])(F,A,V,!1,null,"7faac29f",null)),E=D.exports,W={name:"TeamProfileCard",computed:Object(c["a"])({},Object(u["d"])("staff",["stateContract"])),props:["team","score"],data:function(){return{dataTeam:null}},components:{TeamProfile:E},mounted:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:this.dataTeam=this.team,console.log(this.dataTeam.name+"props"+this.team.name);case 2:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},J=W,Y=(n("wSfI"),Object(m["a"])(J,N,I,!1,null,null,null)),U=Y.exports,Z={data:function(){return{dataTeam:null}},name:"home",computed:Object(c["a"])({},Object(u["d"])("team",["teams","teamCount"]),Object(u["d"])("staff",["stateContract"])),methods:{},components:{TeamCard:U},created:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:console.log("mounted"+this.teams);case 1:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),mounted:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e,n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.$pizzaCoin.validateWeb3Connection(this.$toast);case 3:return t.next=5,this.$pizzaCoin.validateWallet(this.$toast);case 5:return t.next=7,this.$pizzaCoin.getTeamsProfile();case 7:e=t.sent,this.dataTeam=e;case 9:if("Registration"!==this.stateContract){t.next=17;break}return t.next=12,this.$pizzaCoin.getTeamsProfile();case 12:n=t.sent,this.dataTeam=n,console.log("home"),t.next=9;break;case 17:t.next=22;break;case 19:t.prev=19,t.t0=t["catch"](0),console.error(t.t0);case 22:case"end":return t.stop()}},t,this,[[0,19]])}));return function(){return t.apply(this,arguments)}}()},K=Z,Q=(n("zMuA"),Object(m["a"])(K,S,M,!1,null,null,null)),X=Q.exports,G=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t._v("\n Leader board\n "),n("canvas",{attrs:{id:"leader-board-chart"}}),t._v("\n Team count "+t._s(t.teamCount)+"\n")])},H=[],q=(n("rGqo"),n("WyAD")),tt=n.n(q),et=n("YxRf"),nt=n.n(et),at=n("RPpN"),rt=n("LvDl"),st=n.n(rt),ot={name:"LeaderBoardComponent",computed:Object(c["a"])({},Object(u["d"])("team",["teams","teamCount"])),data:function(){return{leaderBoardData:null,pizzaCoin:null,teamNames:[],teamScore:[],showTeamNameOnState:"Voting Finished",currentState:""}},mounted:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.createWeb3(),this.subscribeEvent(),t.next=4,this.loadData();case 4:this.initChartInstance(),this.initialLabels(),this.createChart("leader-board-chart",this.leaderBoardData);case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),methods:{loadData:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$pizzaCoin.getContractState(this.$pizzaCoin.account);case 2:return this.currentState=t.sent,t.t0=this.$store,t.next=6,this.$pizzaCoin.getTeamsProfile();case 6:return t.t1=t.sent,t.next=9,t.t0.dispatch.call(t.t0,"team/getTeamsProfile",t.t1);case 9:st.a.forEach(this.teams,function(t,n){console.log("team: ",t),console.log("teamName: ",t.name),console.log("total vote: ",t.score),e.currentState===e.showTeamNameOnState?e.teamNames.push(t.name):e.teamNames.push(""),e.teamScore.push(t.score)});case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),initChartInstance:function(t,e){this.leaderBoardData={type:"bar",data:{labels:this.teamNames,datasets:[{label:"",data:this.teamScore,backgroundColor:["rgba(255, 0, 0, 0.5)","rgba(85, 0, 255, 0.5)","rgba(64, 255, 0, 0.5)","rgba(236, 66, 249, 0.5)","rgba(84, 23, 167, 0.5)","rgba(206, 31, 147, 0.5)","rgba(203, 133, 246, 0.5)","rgba(166, 159, 22, 0.5)","rgba(31, 215, 109, 0.5)","rgba(107, 203, 204, 0.5)","rgba(29, 61,1 45, 0.5)","rgba(174, 99, 20 , 0.5)","rgba(26, 123, 92 , 0.5)","rgba(64, 97, 253, 0.5)","rgba(35, 176, 25, 0.5)"],borderColor:["rgba(255, 0, 0)","rgba(85, 0, 255)","rgba(64, 255, 0)","rgba(236, 66, 249)","rgba(84, 23, 167)","rgba(206, 31, 147)","rgba(203, 133, 246)","rgba(166, 159, 22)","rgba(31, 215, 109)","rgba(107, 203, 204)","rgba(29, 61,1 45)","rgba(174, 99, 20 )","rgba(26, 123, 92 )","rgba(64, 97, 253)","rgba(35, 176, 25)"],borderWidth:3}]},options:{responsive:!0,lineTension:1,scales:{yAxes:[{ticks:{beginAtZero:!0,padding:25}}]}}}},initialLabels:function(){var t=this;tt.a.plugins.register({afterDatasetsDraw:function(e){var n=e.ctx;e.data.datasets.forEach(function(a,r){var s=e.getDatasetMeta(r);s.hidden||s.data.forEach(function(r,s){n.fillStyle="rgb(0, 0, 0)";var o=25,i="normal",c="Helvetica Neue";n.font=tt.a.helpers.fontString(o,i,c);var u=a.data[s].toString();if(0!==parseInt(u)){n.textAlign="center",n.textBaseline="middle";var l=5,p=r.tooltipPosition();n.fillText(u,p.x,p.y-o/2-l),t.currentState===t.showTeamNameOnState&&(n.font=tt.a.helpers.fontString(20,i,c),n.fillText(e.data.labels[s].substring(0,4),p.x,p.y-o/2-l+50))}})})}})},createWeb3:function(){var t=new nt.a(new nt.a.providers.WebsocketProvider(this.$store.state.system.ethereumNode));this.pizzaCoin=new t.eth.Contract(at,this.$pizzaCoin.pizzaCoinAddr)},createChart:function(t,e){if(e){var n=document.getElementById(t);this.leaderBoardChart=new tt.a(n,{type:e.type,data:e.data,options:e.options})}},subscribeEvent:function(){var t=this,e=this.pizzaCoin.events.TeamVoted(null,function(e,n){if(e)throw new Error(e);var a,r;a=n.returnValues._teamName,r=n.returnValues._totalVoted,st.a.forEach(t.teams,function(e,n){e.name===a&&(t.leaderBoardChart.data.datasets[0].data[n]=r,t.leaderBoardChart.update())}),console.log("***** Event catched *****"),console.log("teamName: "+a),console.log("totalVoted: "+r)});return e}}},it=ot,ct=Object(m["a"])(it,G,H,!1,null,null,null),ut=ct.exports;s["a"].use(O["a"]);var lt=new O["a"]({routes:[{path:"/",name:"home",component:X},{path:"/leader-board",name:"leader-board",component:ut},{path:"/livefeed",beforeEnter:function(){window.open("https://pizzahackathon.github.io/livefeed/","_blank")}},{path:"/github",beforeEnter:function(){window.open("https://github.com/pizzahackathon/","_blank")}}]}),pt=(n("jgpq"),n("P6ep")),mt=n.n(pt),yt=(n("/SS/"),n("k5N+")),dt=(n("rE2o"),n("ioFf"),n("xmWZ")),ft=n("qpph"),ht=n("RLnt"),gt=n("c0zv"),bt=n("0RCh"),vt={validateWeb3Connection:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n,a,r;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if("undefined"!==typeof window.web3){t.next=4;break}throw n="Please install MetaMask, Cipher or Trust wallet.",this.showToastError(e,n,6e4),Error(n);case 4:return t.next=6,this.getNetworkName();case 6:if(a=t.sent,console.log("currentNetwork ".concat(this.network)),a===this.network){t.next=12;break}throw r="Wrong network! Please switch to **".concat(this.capitalize(this.network),"** on Metamask."),this.showToastError(e,r,6e4),Error(r);case 12:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),validateWallet:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n,a,s=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.web3.eth.getAccounts();case 2:if(n=t.sent,console.log("accounts ".concat(n)),0!==n.length){t.next=9;break}throw setInterval(Object(r["a"])(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,s.web3.eth.getAccounts();case 2:e=t.sent,e.length>0&&(console.log("refresh"),location.reload());case 4:case"end":return t.stop()}},t,this)})),100),a="Please unlock your MetaMask.",this.showToastError(e,a,6e4),Error(a);case 9:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),showToastError:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e,n){var a,r=arguments;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:a=r.length>2&&void 0!==r[2]?r[2]:5e3,e.open({duration:a,message:n,type:"is-danger"});case 2:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}},kt=vt,wt=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rinkeby",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wss://rinkeby.infura.io/_ws",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0x5aa5bf8f1a386f6f3cc564548890ee9a7382718d",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"0xb25eE5C4d11F9D934f2642d30c99319708e615D4",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"0x164d120357CAc5Cea08c201D719c7D48b2054b8e",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"0xD1571785b4309F55294EF7593276B7B5505F103A";Object(dt["a"])(this,t),this.network=n,"undefined"===typeof window.web3?this.web3=new nt.a(new nt.a.providers.WebsocketProvider(a)):this.web3=new nt.a(window.web3.currentProvider),this.pizzaCoinAddr=r,this.pizzaCoinStaffAddr=s,this.pizzaCoinTeamAddr=o,this.pizzaCoinPlayerAddr=i,this.loadUserAddress().then(function(t){e.account=t}),this.main=new this.web3.eth.Contract(at,this.pizzaCoinAddr),this.staff=new this.web3.eth.Contract(ht,this.pizzaCoinStaffAddr),this.team=new this.web3.eth.Contract(gt,this.pizzaCoinTeamAddr),this.player=new this.web3.eth.Contract(bt,this.pizzaCoinPlayerAddr),console.log(this.main.methods),console.log(this.staff.methods),console.log(this.team.methods),console.log(this.player.methods)}return Object(ft["a"])(t,[{key:"loadUserAddress",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.web3.eth.getAccounts();case 2:return e=t.sent,console.log("loadUserAddress >> "+e[0]),t.abrupt("return",e[0]);case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getTokenBalance",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.main.methods.balanceOf(e).call();case 3:n=t.sent,console.log("playerAddr --\x3e"+e+": tokenBalance = "+n),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),console.error(t.t0);case 10:return t.abrupt("return",n);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"createTeam",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e,n){var a;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return console.log('Creating a new team --\x3e "'+n+'" ...'),t.next=3,this.main.methods.createTeam(n,e).send({from:this.account,gas:5e5,gasPrice:1e10});case 3:a=t.sent,console.log("... succeeded"),console.log(a);case 6:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}()},{key:"getTeamCount",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.team.methods.getTotalTeams().call();case 2:return e=t.sent,t.abrupt("return",e);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getTeamArrayLength",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.team.methods.getTeamArrayLength().call();case 2:return e=t.sent,t.abrupt("return",e);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getPlayerCountInTeam",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.team.methods.getTotalPlayersInTeam(e).call();case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getTeamsProfile",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e,n,a,s,o,i,c,u,l,p,m,y,d,f,h,g,b,v=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getTeamArrayLength();case 3:for(e=t.sent,console.log("teamArrayLength: "+e+"\n"),a=[],s=0;s<e;s++)a.push(this.getFirstFoundTeamInfo(s));return t.next=9,Promise.all(a);case 9:if(o=t.sent,o=o.filter(function(t){var e=t[2];return""!==e}),console.log("teamInfos ".concat(JSON.stringify(o))),!(o.length>0)){t.next=37;break}if(i=o[o.length-1][0],!1!==i){t.next=37;break}for(c=[],u=[],l=!0,p=!1,m=void 0,t.prev=20,y=o[Symbol.iterator]();!(l=(d=y.next()).done);l=!0)f=d.value,h=f[2],-1===u.indexOf(h)&&(c.push(f),u.push(h));t.next=28;break;case 24:t.prev=24,t.t0=t["catch"](20),p=!0,m=t.t0;case 28:t.prev=28,t.prev=29,l||null==y.return||y.return();case 31:if(t.prev=31,!p){t.next=34;break}throw m;case 34:return t.finish(31);case 35:return t.finish(28);case 36:o=c;case 37:return console.log("unique teamInfos ".concat(JSON.stringify(o))),g=o.map(function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var a,r,s,o,i,c;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return a=Object(yt["a"])(e,4),r=a[0],s=a[1],o=a[2],i=a[3],console.log("nextStartSearchingIndex ".concat(s)),r&&console.log("endOfList ".concat(r)),console.log("teamName: "+o),console.log("totalVoted: "+i+"\n"),t.next=7,v.getVotingPointForTeam(o);case 7:return t.t0=t.sent,n={score:t.t0},c={name:o,score:n.score},console.log("profile >> "+JSON.stringify(c)),t.abrupt("return",c);case 12:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()),t.next=41,Promise.all(g);case 41:return b=t.sent,console.log("dataTeams >> "+JSON.stringify(b)),t.abrupt("return",b);case 46:t.prev=46,t.t1=t["catch"](0),console.error(t.t1);case 49:case"end":return t.stop()}},t,this,[[0,46],[20,24,28,36],[29,,31,35]])}));return function(){return t.apply(this,arguments)}}()},{key:"getFirstFoundTeamInfo",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.team.methods.getFirstFoundTeamInfo(e).call();case 2:return n=t.sent,t.abrupt("return",[n._endOfList,n._nextStartSearchingIndex,n._teamName,n._totalVoted]);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"registerPlayerToTeam",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(n,a,r){var s;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return console.log('\nRegistering a staff --\x3e "'+a+'" ...'),e.prev=1,e.next=4,t.methods.registerPlayerToTeam(a,r).send({from:n,gas:35e4,gasPrice:1e10});case 4:s=e.sent,console.log(s),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](1),console.error(e.t0);case 11:console.log("... succeeded");case 12:case"end":return e.stop()}},e,this,[[1,8]])}));return function(t,n,a){return e.apply(this,arguments)}}()},{key:"getTotalVotersToTeam",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=0,console.log('\nQuerying for a total number of voters to the specific team --\x3e "'+e+'" ...'),t.prev=2,t.next=5,this.team.methods.getTotalVotersToTeam(e).call({});case 5:n=t.sent,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](2),console.error(t.t0);case 11:return t.abrupt("return",n);case 12:case"end":return t.stop()}},t,this,[[2,8]])}));return function(e){return t.apply(this,arguments)}}()},{key:"getVotingPointForTeam",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=0,console.log('\nQuerying for a total number of voters to the specific team --\x3e "'+e+'" ...'),t.prev=2,t.next=5,this.team.methods.getVotingPointForTeam(e).call({});case 5:n=t.sent,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](2),console.error(t.t0);case 11:return t.abrupt("return",n);case 12:case"end":return t.stop()}},t,this,[[2,8]])}));return function(e){return t.apply(this,arguments)}}()},{key:"startVoting",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return console.log("\nChanging the contracts' state to Voting ..."),t.prev=1,t.next=4,this.main.methods.startVoting().send({from:e,gas:1e6,gasPrice:1e10});case 4:console.log("... succeeded"),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](1),console.error(t.t0);case 10:return t.prev=10,console.log("\nValidating the contracts' state ..."),t.next=14,this.main.methods.getContractState().call({from:e});case 14:n=t.sent,console.log("... succeeded --\x3e "+n),t.next=21;break;case 18:t.prev=18,t.t1=t["catch"](10),console.error(t.t1);case 21:case"end":return t.stop()}},t,this,[[1,7],[10,18]])}));return function(e){return t.apply(this,arguments)}}()},{key:"stopVoting",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return console.log("\nChanging the contracts' state to Voting ..."),t.prev=1,t.next=4,this.main.methods.stopVoting().send({from:e,gas:1e6,gasPrice:1e10});case 4:console.log("... succeeded"),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](1),console.error(t.t0);case 10:return t.prev=10,console.log("\nValidating the contracts' state ..."),t.next=14,this.main.methods.getContractState().call({from:e});case 14:n=t.sent,console.log("... succeeded --\x3e "+n),t.next=21;break;case 18:t.prev=18,t.t1=t["catch"](10),console.error(t.t1);case 21:case"end":return t.stop()}},t,this,[[1,7],[10,18]])}));return function(e){return t.apply(this,arguments)}}()},{key:"voteTeam",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n,a,r;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=e.voterAddr,a=e.teamName,r=e.votingWeight,console.log('\nVoting to a team --\x3e team: "'+a+'" weight: "'+r+'" form '+n),t.prev=2,t.next=5,this.main.methods.voteTeam(a,parseInt(r)).send({from:n,gas:1e6,gasPrice:1e10});case 5:return console.log("... succeeded voteTeam"),t.abrupt("return",!0);case 9:return t.prev=9,t.t0=t["catch"](2),console.error(t.t0),t.abrupt("return",!1);case 13:case"end":return t.stop()}},t,this,[[2,9]])}));return function(e){return t.apply(this,arguments)}}()},{key:"kickTeam",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return console.log('\nKicking team --\x3e "'+e+'" ...'),t.prev=1,t.next=4,this.main.methods.kickTeam(e).send({from:this.account,gas:1e6,gasPrice:1e10});case 4:t.next=9;break;case 6:t.prev=6,t.t0=t["catch"](1),console.error(t.t0);case 9:case"end":return t.stop()}},t,this,[[1,6]])}));return function(e){return t.apply(this,arguments)}}()},{key:"getPlayersProfile",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n,a,r,s,o,i,c,u,l;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.getPlayerCountInTeam(e);case 2:n=t.sent,console.log("playerCount: ".concat(n)),a=[],r=0,i=!0;case 7:return t.next=10,this.getFirstFoundPlayer(e,r);case 10:if(c=t.sent,u=Object(yt["a"])(c,3),s=u[0],r=u[1],o=u[2],console.log("endOfList >> ".concat(s)),console.log("myAccount >> ".concat(this.account)),!s){t.next=19;break}return t.abrupt("break",28);case 19:return console.log("playerAddress >> : "+o),t.next=22,this.getPlayerName(o);case 22:l=t.sent,console.log("playerName >> : ".concat(l)),o===this.account&&(i=!1,console.log(o+"booommm"+this.account)),a.push({name:l,address:o}),t.next=7;break;case 28:return t.abrupt("return",{teams:a,canVote:i});case 29:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"isPlayer",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return console.log("isPlayer >> ".concat(e)),t.next=3,this.player.methods.isPlayer(e).call();case 3:return n=t.sent,console.log("isPlayer >> ".concat(n)),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getFirstFoundPlayer",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e,n){var a;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.team.methods.getFirstFoundPlayerInTeam(e,n).call();case 2:return a=t.sent,t.abrupt("return",[a._endOfList,a._nextStartSearchingIndex,a._player]);case 4:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}()},{key:"getPlayerName",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.player.methods.getPlayerName(e).call();case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"registerPlayer",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n,a,r;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=e.playerAddr,a=e.playerName,r=e.teamName,console.log('\nRegistering a player --\x3e "'+r+'" ...'),t.prev=2,t.next=5,this.main.methods.registerPlayer(a,r).send({from:n,gas:1e6,gasPrice:1e10});case 5:console.log("... succeeded"),t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](2),console.error(t.t0);case 11:case"end":return t.stop()}},t,this,[[2,8]])}));return function(e){return t.apply(this,arguments)}}()},{key:"kickPlayer",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n,a,r;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=e.kickerAddr,a=e.playerAddr,r=e.teamName,console.log('\nKicking a player --\x3e "'+a+'" ...'),t.prev=2,t.next=5,this.main.methods.kickPlayer(a,r).send({from:n,gas:1e6,gasPrice:1e10});case 5:t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](2),console.error(t.t0);case 10:case"end":return t.stop()}},t,this,[[2,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"getStaffName",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.staff.methods.getStaffName(e).call();case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"isStaff",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return console.log("ddd >> ".concat(e)),t.next=3,this.staff.methods.isStaff(e).call();case 3:return n=t.sent,console.log("dddIs >> ".concat(n)),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"lockRegistration",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return console.log("lockRegis"),t.prev=1,t.next=4,this.main.methods.lockRegistration().send({from:e,gas:1e6,gasPrice:1e10});case 4:t.next=9;break;case 6:t.prev=6,t.t0=t["catch"](1),console.error(t.t0);case 9:case"end":return t.stop()}},t,this,[[1,6]])}));return function(e){return t.apply(this,arguments)}}()},{key:"getContractState",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,console.log("\nValidating the contracts' state ..."),t.next=4,this.main.methods.getContractState().call({from:e});case 4:n=t.sent,console.log("check state --\x3e "+n),console.log("... succeeded --\x3e "+n),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.error(t.t0);case 12:return t.abrupt("return",n);case 13:case"end":return t.stop()}},t,this,[[0,9]])}));return function(e){return t.apply(this,arguments)}}()},{key:"getNetworkName",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.web3.eth.net.getNetworkType();case 2:return e=t.sent,t.abrupt("return",e);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}();Object.setPrototypeOf(wt.prototype,Object(c["a"])({},kt));var xt=wt,jt=new xt(R.state.system.network,R.state.system.ethereumNode,R.state.system.pizzaCoinAddr,R.state.system.pizzaCoinStaffAddr,R.state.system.pizzaCoinTeamAddr,R.state.system.pizzaCoinPlayerAddr);s["a"].prototype.$pizzaCoin=jt,s["a"].prototype.$store=R;var Ct=1e3;setInterval(Object(r["a"])(regeneratorRuntime.mark(function t(){var e,n,r,s,o,i,c,u;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,jt.account;case 2:return e=t.sent,console.log("service >> "+e),t.next=6,jt.isStaff(e);case 6:return n=t.sent,t.next=9,jt.isPlayer(e);case 9:return r=t.sent,t.next=12,jt.getTokenBalance(e);case 12:return s=t.sent,t.next=15,jt.getContractState(e);case 15:if(o=t.sent,console.log("check state --\x3e "+o),console.log("isStaff >> ".concat(n)),console.log("isPlayer >> ".concat(r)),!n&&!r){t.next=39;break}if(n?R.dispatch("auth/isStaffLogin",e):R.dispatch("auth/isPlayerLogin",e),t.prev=21,!n){t.next=28;break}return t.next=25,jt.getStaffName(e);case 25:t.t0=t.sent,t.next=31;break;case 28:return t.next=30,jt.getPlayerName(e);case 30:t.t0=t.sent;case 31:i=t.t0,c={role:n?"Staff":"Player",name:i},R.dispatch("auth/playerInfo",c),t.next=39;break;case 36:t.prev=36,t.t1=t["catch"](21),console.error(t.t1);case 39:return console.log("check tokenBalance --\x3e "+Object(a["a"])(parseInt(s))),u={isPlayer:r,tokenBalance:s},R.dispatch("staff/getContractState",o),"Voting"===o&&(Ct=100),"Voting Finished"===o&&(Ct=1e5),R.dispatch("auth/getTokenBalance",u),t.t2=R,t.next=48,jt.getTeamCount();case 48:t.t3=t.sent,t.t2.dispatch.call(t.t2,"team/getTeamCount",t.t3),console.log("inteval"+Ct);case 51:case"end":return t.stop()}},t,this,[[21,36]])})),Ct),s["a"].use(mt.a),s["a"].config.productionTip=!1,new s["a"]({store:R,router:lt,render:function(t){return t(d)}}).$mount("#app")},Z1vA:function(t,e,n){"use strict";var a=n("A5AY"),r=n.n(a);r.a},ZWa3:function(t,e,n){"use strict";var a=n("bOi7"),r=n.n(a);r.a},Zcxv:function(t,e,n){"use strict";var a=n("7wvV"),r=n.n(a);r.a},bOi7:function(t,e,n){},c0zv:function(t){t.exports=[{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{constant:!1,inputs:[],name:"lockRegistration",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"startVoting",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"stopVoting",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_teamName",type:"string"}],name:"doesTeamExist",outputs:[{name:"bTeamExist",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_teamName",type:"string"}],name:"createTeam",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_player",type:"address"},{name:"_teamName",type:"string"}],name:"registerPlayerToTeam",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_teamName",type:"string"}],name:"kickTeam",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_player",type:"address"},{name:"_teamName",type:"string"}],name:"kickPlayerOutOffTeam",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_teamName",type:"string"}],name:"getArrayLengthOfPlayersInTeam",outputs:[{name:"_length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_teamName",type:"string"}],name:"getTotalPlayersInTeam",outputs:[{name:"_total",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_teamName",type:"string"},{name:"_startSearchingIndex",type:"uint256"}],name:"getFirstFoundPlayerInTeam",outputs:[{name:"_endOfList",type:"bool"},{name:"_nextStartSearchingIndex",type:"uint256"},{name:"_player",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_teamName",type:"string"},{name:"_playerIndex",type:"uint256"}],name:"getPlayerInTeamAtIndex",outputs:[{name:"_endOfList",type:"bool"},{name:"_player",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getTotalTeams",outputs:[{name:"_total",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getTeamArrayLength",outputs:[{name:"_length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_startSearchingIndex",type:"uint256"}],name:"getFirstFoundTeamInfo",outputs:[{name:"_endOfList",type:"bool"},{name:"_nextStartSearchingIndex",type:"uint256"},{name:"_teamName",type:"string"},{name:"_totalVoted",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_teamName",type:"string"}],name:"getVotingPointForTeam",outputs:[{name:"_totalVoted",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_teamName",type:"string"}],name:"getTotalVotersToTeam",outputs:[{name:"_total",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_teamName",type:"string"},{name:"_voterIndex",type:"uint256"}],name:"getVoteResultAtIndexToTeam",outputs:[{name:"_endOfList",type:"bool"},{name:"_voter",type:"address"},{name:"_voteWeight",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_teamName",type:"string"},{name:"_voter",type:"address"},{name:"_votingWeight",type:"uint256"}],name:"voteToTeam",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getMaxTeamVotingPoint",outputs:[{name:"_maxTeamVotingPoint",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getTotalWinnerTeams",outputs:[{name:"_total",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_startSearchingIndex",type:"uint256"}],name:"getFirstFoundWinnerTeam",outputs:[{name:"_endOfList",type:"bool"},{name:"_nextStartSearchingIndex",type:"uint256"},{name:"_teamName",type:"string"},{name:"_totalVoted",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}]},uGFv:function(t,e,n){},wSfI:function(t,e,n){"use strict";var a=n("Vpyg"),r=n.n(a);r.a},zMuA:function(t,e,n){"use strict";var a=n("uGFv"),r=n.n(a);r.a}});
//# sourceMappingURL=app.018d5756.js.map