From 736d534870b2d29adafbe124be5099a4af80db0a Mon Sep 17 00:00:00 2001 From: sadiabbasi Date: Wed, 14 Feb 2024 19:36:33 +0300 Subject: [PATCH] rebuild --- dist/spa/index.html | 2 +- dist/spa/js/247.559216c1.js | 1 + dist/spa/js/247.ae4a7f96.js | 1 - dist/spa/js/371.006261cc.js | 1 + dist/spa/js/371.7ed30e64.js | 1 - dist/spa/js/{475.a179fd0b.js => 475.fd8562d4.js} | 2 +- dist/spa/js/{753.d4ec7ee6.js => 753.cf805fe1.js} | 2 +- dist/spa/js/{793.9b1d8490.js => 793.76d1f2fe.js} | 2 +- dist/spa/js/827.e1c79409.js | 1 + dist/spa/js/827.eb5aa052.js | 1 - dist/spa/js/862.56c8f538.js | 1 + dist/spa/js/862.91e04a74.js | 1 - dist/spa/js/895.2c5dce85.js | 1 + dist/spa/js/895.ebdf0705.js | 1 - dist/spa/js/app.a88db939.js | 1 - dist/spa/js/app.cd6a50f9.js | 1 + dist/spa/js/chunk-common.1609122f.js | 1 + dist/spa/js/chunk-common.cac51e83.js | 1 - 18 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 dist/spa/js/247.559216c1.js delete mode 100644 dist/spa/js/247.ae4a7f96.js create mode 100644 dist/spa/js/371.006261cc.js delete mode 100644 dist/spa/js/371.7ed30e64.js rename dist/spa/js/{475.a179fd0b.js => 475.fd8562d4.js} (88%) rename dist/spa/js/{753.d4ec7ee6.js => 753.cf805fe1.js} (52%) rename dist/spa/js/{793.9b1d8490.js => 793.76d1f2fe.js} (88%) create mode 100644 dist/spa/js/827.e1c79409.js delete mode 100644 dist/spa/js/827.eb5aa052.js create mode 100644 dist/spa/js/862.56c8f538.js delete mode 100644 dist/spa/js/862.91e04a74.js create mode 100644 dist/spa/js/895.2c5dce85.js delete mode 100644 dist/spa/js/895.ebdf0705.js delete mode 100644 dist/spa/js/app.a88db939.js create mode 100644 dist/spa/js/app.cd6a50f9.js create mode 100644 dist/spa/js/chunk-common.1609122f.js delete mode 100644 dist/spa/js/chunk-common.cac51e83.js diff --git a/dist/spa/index.html b/dist/spa/index.html index 22140ef..aea09d3 100644 --- a/dist/spa/index.html +++ b/dist/spa/index.html @@ -1 +1 @@ -Open Block Explorer
\ No newline at end of file +Open Block Explorer
\ No newline at end of file diff --git a/dist/spa/js/247.559216c1.js b/dist/spa/js/247.559216c1.js new file mode 100644 index 0000000..9b3b271 --- /dev/null +++ b/dist/spa/js/247.559216c1.js @@ -0,0 +1 @@ +"use strict";(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[247],{35622:(e,t,o)=>{o.r(t),o.d(t,{default:()=>Ye});var r=o(59835),n=o(86970);const i={class:"row"},a={class:"col-12"},s={key:0,class:"items-center arrow-button"},l=(0,r._)("div",{class:"full-width text-center justify-center actor-font"},null,-1),c={class:"col-12"},p=(0,r._)("div",{class:"full-width text-center justify-center actor-font"},null,-1),d={key:0,class:"items-center arrow-button"},u={key:1,class:"col-12 map-data-position overlap-map"},h={key:0,class:"col-12 map-data-position"};function v(e,t,o,v,w,g){const m=(0,r.up)("q-icon"),f=(0,r.up)("WorldMap"),x=(0,r.up)("MapData"),y=(0,r.up)("PriceChart"),P=(0,r.up)("TransactionsTable");return(0,r.wg)(),(0,r.iD)("div",i,[(0,r._)("div",a,[e.mapDisplay?((0,r.wg)(),(0,r.iD)("div",{key:0,class:(0,n.C_)(["row header-support justify-center render-container",{"show-map":e.showMap}])},[(0,r._)("div",{class:"row full-width chevron-toggle hide",onClick:t[0]||(t[0]=(...t)=>e.toggleMap&&e.toggleMap(...t))},[e.showMap?((0,r.wg)(),(0,r.iD)("div",s,[(0,r.Wm)(m,{class:"fas fa-chevron-up q-pr-lg chevron",size:"17px"})])):(0,r.kq)("",!0),l]),(0,r._)("div",c,[(0,r.Wm)(f)])],2)):(0,r.kq)("",!0)]),e.mapDisplay?((0,r.wg)(),(0,r.iD)("div",{key:0,class:"row full-width chevron-toggle",onClick:t[1]||(t[1]=(...t)=>e.toggleMap&&e.toggleMap(...t))},[p,e.showMap?(0,r.kq)("",!0):((0,r.wg)(),(0,r.iD)("div",d,[(0,r.Wm)(m,{class:"fas fa-chevron-down q-pr-lg chevron",size:"17px"})])),(0,r._)("div",{class:(0,n.C_)(["map-hint",{"fade-in":e.showMapHint,"fade-out":!e.showMapHint}])},"(click or scroll to view producer map)",2)])):(0,r.kq)("",!0),e.mapDisplay&&e.showMap?((0,r.wg)(),(0,r.iD)("div",u,[(0,r.Wm)(x,{mapVisible:e.showMap},null,8,["mapVisible"])])):(0,r.kq)("",!0),(0,r._)("div",{class:(0,n.C_)(["container-max-width",{"container-margin":!e.showMap}])},[e.mapDisplay&&!e.showMap?((0,r.wg)(),(0,r.iD)("div",h,[(0,r.Wm)(x,{mapVisible:e.showMap},null,8,["mapVisible"])])):(0,r.kq)("",!0),(0,r.Wm)(y,{class:(0,n.C_)(["price-box-position",{"overlap-map":e.mapDisplay&&e.showMap}])},null,8,["class"]),(0,r.Wm)(P)],2)])}var w=o(60499);const g=e=>((0,r.dD)("data-v-6f5e07aa"),e=e(),(0,r.Cn)(),e),m={class:"price-chart row col-12 justify-center actor-font",align:"center"},f={class:"row col-11 price-box flex"},x={class:"col-xs-12 col-sx-12 col-md-8 col-lg-8 col-xs-8 q-pa-md"},y={class:"col-xs-12 col-sx-12 col-md-4 col-lg-4 col-xs-4 q-pa-md"},P={class:"col-12 flex row q-mt-md"},b={class:"col-6 chart-info"},_=g((()=>(0,r._)("p",null,"TOKEN PRICE",-1))),k={class:"sub-title"},Z=g((()=>(0,r._)("p",{class:"border-line"},null,-1))),H={class:"col-6 chart-info"},M=g((()=>(0,r._)("p",null,"MARKETCAP",-1))),T={class:"sub-title"},F=g((()=>(0,r._)("p",{class:"border-line"},null,-1)));function C(e,t,o,i,a,s){const l=(0,r.up)("Highcharts");return(0,r.wg)(),(0,r.iD)("div",m,[(0,r._)("div",f,[(0,r._)("div",x,[(0,r.Wm)(l,{class:"highcharts-description col-12",options:e.chartOptions,highcharts:e.hcInstance},null,8,["options","highcharts"])]),(0,r._)("div",y,[(0,r._)("div",P,[(0,r._)("div",b,[_,(0,r._)("p",k,(0,n.zw)(e.tokenPrice),1),Z]),(0,r._)("div",H,[M,(0,r._)("p",T,(0,n.zw)(e.marketCap),1),F])])])])])}var I=o(15581),D=o(82341),S=o.n(D),B=o(15192),L=o.n(B),q=o(30229),$=o(52729),V=function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r["throw"](e))}catch(t){i(t)}}function l(e){e.done?o(e.value):n(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const E=(0,q.z)(),W=1e6,z=1e9;L()(S());const A=(0,r.aZ)({name:"PriceChart",components:{Highcharts:I.Chart},setup(){const e=S(),t=(0,w.iH)({chart:{type:"area"},title:{text:"Past 24h"},xAxis:{dateTimeLabelFormats:{day:"%A, %b %e, %l %p",millisecond:"%A, %b %e, %l %p"},type:"datetime"},yAxis:{title:{text:"Price"}},legend:{enabled:!0},plotOptions:{area:{fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,(0,$.Z)("color-graph-shadow")]]},marker:{radius:.5},lineWidth:2,states:{hover:{lineWidth:4}},threshold:null}},series:[{name:E.getSystemToken().symbol,color:(0,$.Z)("primary"),data:[]}],tooltip:{dateTimeLabelFormats:{hour:"%A, %b %e, %l %p"}}}),o=(0,w.iH)(0),n=(0,w.iH)(""),i=(0,w.iH)(""),a=(0,w.iH)(""),s=(0,w.iH)(""),l=(0,w.iH)(""),c=()=>V(this,void 0,void 0,(function*(){const e=yield E.getPriceData();o.value=e.lastUpdated,n.value=d(e.tokenPrice),l.value=p(e.dayChange),s.value=d(e.dayVolume),i.value=d(e.marketCap),t.value.series[0].data=e.prices})),p=e=>`${e.toFixed(2)} %`,d=e=>e<1?`$${e.toFixed(3)}`:eV(this,void 0,void 0,(function*(){yield c()})))),{hcInstance:e,chartOptions:t,lastUpdated:o,tokenPrice:n,marketCap:i,rank:a,dayVolume:s,dayChange:l,fetchPriceChartData:c,formatPercentage:p,formatCurrencyValue:d}}});var N=o(11639);const j=(0,N.Z)(A,[["render",C],["__scopeId","data-v-6f5e07aa"]]),G=j;var O=o(59311),R=o(61957);const U={class:"absolute q-pa-md producer-toggle text-white"},K={class:"map-container",id:"map",ref:"map-root"},Q={class:"ol-popup",id:"popup",ref:"popup"},X={class:"ol-popup-closer",href:"#",id:"popup-closer",ref:"popup-closer"},Y={id:"popup-content",ref:"popup-content"},J={class:"ol-popup",id:"producerPopup",ref:"producerPopup"},ee={class:"ol-popup-closer",href:"#",id:"producerPopup-closer",ref:"producerPopup-closer"},te={id:"producerPopup-content",ref:"producerPopup-content"};function oe(e,t,o,n,i,a){const s=(0,r.up)("q-toggle");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r._)("div",U,[(0,r.Wm)(s,{modelValue:e.producerToggle,"onUpdate:modelValue":[t[0]||(t[0]=t=>e.producerToggle=t),t[1]||(t[1]=t=>e.updateToggleOption(t))],label:"Show Active BP","left-label":"",color:"white"},null,8,["modelValue"])]),(0,r._)("div",K,null,512),(0,r._)("div",Q,[(0,r.wy)((0,r._)("a",X,null,512),[[R.F8,e.$q.platform.is.mobile]]),(0,r._)("div",Y,null,512)],512),(0,r._)("div",J,[(0,r._)("a",ee,null,512),(0,r._)("div",te,null,512)],512)],64)}var re=o(21308),ne=o(54312),ie=o(57617),ae=o(3244),se=(o(1811),o(24553)),le=o(98723),ce=o(95695),pe=o(3038),de=o(33410),ue=o(95347),he=o(73504),ve=o(79100),we=o(55335),ge=o(36907),me=o(51317),fe=o(6884),xe=o(33100),ye=o(78504),Pe=o(98453),be=function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r["throw"](e))}catch(t){i(t)}}function l(e){e.done?o(e.value):n(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const _e=(0,r.aZ)({name:"WorldMap",components:{Map:re.Z,View:ne.ZP},setup(){const e=(0,ye.useStore)(),t=(0,w.iH)([40,40]),o=(0,w.iH)("EPSG:4326"),n=(0,w.iH)(8),i=(0,w.iH)(0),a=(0,w.iH)(Boolean(Number(localStorage.getItem("mapBP-toggle")))),s=(0,r.Fl)((()=>e.state.chain.bpList)),l=(0,r.Fl)((()=>e.state.chain.producerSchedule)),c=(0,r.Fl)((()=>e.state.chain.head_block_producer)),p=(0,w.iH)("");function d(e){localStorage.setItem("mapBP-toggle",Number(e).toString())}return{center:t,projection:o,zoom:n,rotation:i,BPlist:s,HeadProducer:c,currentHeadProducer:p,schedule:l,producerToggle:a,updateToggleOption:d}},data(){return{map:null,flashGeom:null,listenerKey:null,duration:2600,MapSource:null}},methods:Object.assign({},(0,xe.nv)("chain",["updateBpList"])),mounted(){return be(this,void 0,void 0,(function*(){yield this.updateBpList();const e=new le.ZP({image:new ce.Z({fill:new pe.Z({color:"#FFFFFF"}),radius:5}),fill:new pe.Z({color:(0,$.Z)("color-map")}),stroke:new de.Z({color:(0,$.Z)("color-map"),width:1}),zIndex:50}),t=new le.ZP({image:new ce.Z({fill:new pe.Z({color:"#8276d2"}),stroke:new de.Z({color:"#63C9EF",width:3}),radius:5}),zIndex:51}),o=new le.ZP({image:new ce.Z({fill:new pe.Z({color:"#8276d2"}),stroke:new de.Z({color:"#FFFFFF",width:3}),radius:5}),zIndex:51}),r=new ue.Z({wrapX:!1,url:"https://openlayers.org/data/vector/ecoregions.json",format:new se.Z}),n=new Pe.Z({imageRatio:1,source:r,style:e}),i=new ue.Z({wrapX:!1}),a=new he.Z({source:i}),s=this.$refs["popup"],l=this.$refs["popup-content"],c=this.$refs["popup-closer"],p=this.$refs["producerPopup"],d=this.$refs["producerPopup-content"],u=this.$refs["producerPopup-closer"],h=new ae.Z({element:s,autoPan:{animation:{duration:250}}}),v=new ae.Z({element:p});c.onclick=function(){return h.setPosition(void 0),c.blur(),!1},u.onclick=function(){return v.setPosition(void 0),u.blur(),!1};const w=new re.Z({layers:[n,a],overlays:[h,v],target:"map",view:new ne.ZP({center:[0,0],zoom:0}),controls:[],interactions:[]});let g=null;function m(t,r){for(const n of t)if(n.org&&n.org.location){const t=n.org.location.longitude,a=n.org.location.latitude,s=new ie.Z((0,ve.mi)([t,a])),l=new we.Z(s);r.includes(n.owner)?l.setStyle(o):l.setStyle(e),l.setId(n.owner),l.setProperties({type:"bp",country:n.org.location.name}),i.addFeature(l)}else{const t=360*Math.random()-180,a=15*Math.random()-89,s=new ie.Z((0,ve.mi)([t,a])),l=new we.Z(s);r.includes(n.owner)?l.setStyle(o):l.setStyle(e),l.setId(n.owner),l.setProperties({type:"bp",country:"unknown"}),i.addFeature(l)}}w.on("singleclick",(e=>{null!==g&&g.getProperties().type&&"bp"===g.getProperties().type&&(h.setPosition(void 0),c.blur(),l.innerHTML=" ",g=null),w.forEachFeatureAtPixel(e.pixel,(function(e){e.getProperties().type&&"bp"===e.getProperties().type&&(g=e)})),g&&g.getProperties().type&&"bp"===g.getProperties().type?(l.innerHTML=(g.getId()===this.HeadProducer?'
Producing
':"")+'
'+g.getId()+'
'+g.getProperties().country+"
",h.setPosition(g.getGeometry().getCoordinates())):l.innerHTML=" "})),w.on("pointermove",(e=>{null!==g&&g.getProperties().type&&"bp"===g.getProperties().type&&(h.setPosition(void 0),c.blur(),l.innerHTML=" ",g=null),w.forEachFeatureAtPixel(e.pixel,(function(e){e.getProperties().type&&"bp"===e.getProperties().type&&(g=e)})),g&&g.getProperties().type&&"bp"===g.getProperties().type?(l.innerHTML=(g.getId()===this.HeadProducer?'
Producing
':"")+'
'+g.getId()+'
'+g.getProperties().country+"
",h.setPosition(g.getGeometry().getCoordinates())):l.innerHTML=" "}));const f=2600;function x(e){const t=Date.now(),o=e.getGeometry().clone(),r=a.on("postrender",n);function n(e){const n=e.frameState,i=n.time-t;if(i>=f)return void(0,fe.B)(r);const a=(0,me.u3)(e),s=i/f,l=25*(0,ge.Vv)(s)+5,c=(0,ge.Vv)(1-s),p=new le.ZP({image:new ce.Z({radius:l,stroke:new de.Z({color:"rgba(255, 255, 255, "+c+")",width:.25+c})})});a.setStyle(p),a.drawGeometry(o),w.render()}}const y=()=>{if(this.HeadProducer!==this.currentHeadProducer){v.setPosition(void 0);let r=i.getFeatureById(this.HeadProducer),n=i.getFeatureById(this.currentHeadProducer);this.currentHeadProducer=this.HeadProducer,this.MapSource,null!==r&&(d.innerHTML=(r.getId()===this.HeadProducer?'
Producing
':"")+'
'+r.getId()+'
'+r.getProperties().country+"
",this.producerToggle&&v.setPosition(r.getGeometry().getCoordinates()),r.setStyle(t),x(r)),null!==n&&(this.schedule.includes(this.currentHeadProducer)?n.setStyle(o):n.setStyle(e))}};i.on("addfeature",(function(e){x(e.feature)})),window.setInterval((()=>{y()}),1e3),m(this.BPlist,this.schedule),this.map=w,this.MapSource=r}))}});var ke=o(23175),Ze=o(69984),He=o.n(Ze);const Me=(0,N.Z)(_e,[["render",oe],["__scopeId","data-v-9c30d6a4"]]),Te=Me;He()(_e,"components",{QToggle:ke.Z});const Fe=e=>((0,r.dD)("data-v-8161cf88"),e=e(),(0,r.Cn)(),e),Ce={class:"col-3"},Ie={class:"row"},De=Fe((()=>(0,r._)("div",{class:"col-12 text-subtitle1 text-weight-thin text-uppercase"},"Head Block",-1))),Se={class:"col-12 text-subtitle1 text-bold"},Be=Fe((()=>(0,r._)("div",{class:"col-1"},[(0,r._)("div",{class:"hr-vertical"})],-1))),Le={class:"col-3"},qe={class:"row"},$e=Fe((()=>(0,r._)("div",{class:"col-12 text-subtitle1 text-weight-thin text-uppercase"},"Producing",-1))),Ve={class:"col-12 text-subtitle1 text-bold"},Ee=Fe((()=>(0,r._)("div",{class:"col-1"},[(0,r._)("div",{class:"hr-vertical"})],-1))),We={class:"col-3"},ze={class:"row"},Ae=Fe((()=>(0,r._)("div",{class:"col-12 text-subtitle1 text-weight-thin text-uppercase"},"Irreversible Block",-1))),Ne={class:"col-12 text-subtitle1 text-bold"};function je(e,t,o,i,a,s){return(0,r.wg)(),(0,r.iD)("div",{class:(0,n.C_)(["row full-width text-center justify-center actor-font",{"text-grey-3":e.mapVisible}])},[(0,r._)("div",Ce,[(0,r._)("div",Ie,[De,(0,r._)("div",Se,(0,n.zw)(e.HeadBlock.toLocaleString()),1)])]),Be,(0,r._)("div",Le,[(0,r._)("div",qe,[$e,(0,r._)("div",Ve,(0,n.zw)(e.HeadBlockProducer),1)])]),Ee,(0,r._)("div",We,[(0,r._)("div",ze,[Ae,(0,r._)("div",Ne,(0,n.zw)(e.lastIrreversibleBlock.toLocaleString()),1)])])],2)}const Ge=(0,r.aZ)({name:"MapData",props:{mapVisible:{type:Boolean,required:!0}},setup(){const e=(0,ye.useStore)(),t=(0,r.Fl)((()=>e.state.chain.head_block_producer)),o=(0,r.Fl)((()=>e.state.chain.head_block_num)),n=(0,r.Fl)((()=>e.state.chain.last_irreversible_block_num));return{HeadBlock:o,HeadBlockProducer:t,lastIrreversibleBlock:n}}}),Oe=(0,N.Z)(Ge,[["render",je],["__scopeId","data-v-8161cf88"]]),Re=Oe;var Ue;(function(e){e[e["Reveal"]=0]="Reveal",e[e["Top"]=1]="Top",e[e["None"]=2]="None"})(Ue||(Ue={}));const Ke=(0,r.aZ)({name:"PageNetwork",components:{PriceChart:G,TransactionsTable:O.Z,WorldMap:Te,MapData:Re},setup(){const e=(0,ye.useStore)(),t=q.Z.get().getCurrentChain().getMapDisplay(),o=(0,w.iH)(!1),n=(0,w.iH)(!1),i=100;let a,s=(0,w.iH)(Ue.None);const l=()=>{o.value=!o.value,o.value||s.value===Ue.None||(s.value=Ue.None)},c=()=>{if(0===document.documentElement.scrollTop){if(!o.value){if(s.value===Ue.None)return void(s.value=Ue.Top);s.value===Ue.Top&&(s.value=Ue.Reveal,l())}}else s.value=Ue.None};(0,r.YP)(s,(e=>{e===Ue.Top&&(n.value=!0,setTimeout((()=>{n.value=!1}),2e3))}));const p=function(){window.clearTimeout(a),a=setTimeout(c,i)},d=function(e){"ArrowUp"===e.key&&p()},u=()=>{window.removeEventListener("scroll",p),window.removeEventListener("wheel",p),window.removeEventListener("keyup",d)};return(0,r.bv)((()=>{t&&(window.addEventListener("scroll",p,!1),window.addEventListener("wheel",p,!1),window.addEventListener("keyup",d,!1),window.setInterval((()=>{e.dispatch("chain/updateBlockData")}),2e3))})),(0,r.Jd)((()=>{u()})),{mapDisplay:t,showMap:o,showMapHint:n,toggleMap:l}}});var Qe=o(22857);const Xe=(0,N.Z)(Ke,[["render",v]]),Ye=Xe;He()(Ke,"components",{QIcon:Qe.Z})}}]); \ No newline at end of file diff --git a/dist/spa/js/247.ae4a7f96.js b/dist/spa/js/247.ae4a7f96.js deleted file mode 100644 index 43c04fd..0000000 --- a/dist/spa/js/247.ae4a7f96.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[247],{35622:(e,t,o)=>{o.r(t),o.d(t,{default:()=>Ye});var r=o(59835),n=o(86970);const i={class:"row"},a={class:"col-12"},s={key:0,class:"items-center arrow-button"},l=(0,r._)("div",{class:"full-width text-center justify-center actor-font"},null,-1),c={class:"col-12"},p=(0,r._)("div",{class:"full-width text-center justify-center actor-font"},null,-1),d={key:0,class:"items-center arrow-button"},u={key:1,class:"col-12 map-data-position overlap-map"},h={key:0,class:"col-12 map-data-position"};function v(e,t,o,v,w,g){const m=(0,r.up)("q-icon"),f=(0,r.up)("WorldMap"),x=(0,r.up)("MapData"),y=(0,r.up)("PriceChart"),P=(0,r.up)("TransactionsTable");return(0,r.wg)(),(0,r.iD)("div",i,[(0,r._)("div",a,[e.mapDisplay?((0,r.wg)(),(0,r.iD)("div",{key:0,class:(0,n.C_)(["row header-support justify-center render-container",{"show-map":e.showMap}])},[(0,r._)("div",{class:"row full-width chevron-toggle hide",onClick:t[0]||(t[0]=(...t)=>e.toggleMap&&e.toggleMap(...t))},[e.showMap?((0,r.wg)(),(0,r.iD)("div",s,[(0,r.Wm)(m,{class:"fas fa-chevron-up q-pr-lg chevron",size:"17px"})])):(0,r.kq)("",!0),l]),(0,r._)("div",c,[(0,r.Wm)(f)])],2)):(0,r.kq)("",!0)]),e.mapDisplay?((0,r.wg)(),(0,r.iD)("div",{key:0,class:"row full-width chevron-toggle",onClick:t[1]||(t[1]=(...t)=>e.toggleMap&&e.toggleMap(...t))},[p,e.showMap?(0,r.kq)("",!0):((0,r.wg)(),(0,r.iD)("div",d,[(0,r.Wm)(m,{class:"fas fa-chevron-down q-pr-lg chevron",size:"17px"})])),(0,r._)("div",{class:(0,n.C_)(["map-hint",{"fade-in":e.showMapHint,"fade-out":!e.showMapHint}])},"(click or scroll to view producer map)",2)])):(0,r.kq)("",!0),e.mapDisplay&&e.showMap?((0,r.wg)(),(0,r.iD)("div",u,[(0,r.Wm)(x,{mapVisible:e.showMap},null,8,["mapVisible"])])):(0,r.kq)("",!0),(0,r._)("div",{class:(0,n.C_)(["container-max-width",{"container-margin":!e.showMap}])},[e.mapDisplay&&!e.showMap?((0,r.wg)(),(0,r.iD)("div",h,[(0,r.Wm)(x,{mapVisible:e.showMap},null,8,["mapVisible"])])):(0,r.kq)("",!0),(0,r.Wm)(y,{class:(0,n.C_)(["price-box-position",{"overlap-map":e.mapDisplay&&e.showMap}])},null,8,["class"]),(0,r.Wm)(P)],2)])}var w=o(60499);const g=e=>((0,r.dD)("data-v-6f5e07aa"),e=e(),(0,r.Cn)(),e),m={class:"price-chart row col-12 justify-center actor-font",align:"center"},f={class:"row col-11 price-box flex"},x={class:"col-xs-12 col-sx-12 col-md-8 col-lg-8 col-xs-8 q-pa-md"},y={class:"col-xs-12 col-sx-12 col-md-4 col-lg-4 col-xs-4 q-pa-md"},P={class:"col-12 flex row q-mt-md"},b={class:"col-6 chart-info"},_=g((()=>(0,r._)("p",null,"TOKEN PRICE",-1))),k={class:"sub-title"},Z=g((()=>(0,r._)("p",{class:"border-line"},null,-1))),H={class:"col-6 chart-info"},M=g((()=>(0,r._)("p",null,"MARKETCAP",-1))),T={class:"sub-title"},F=g((()=>(0,r._)("p",{class:"border-line"},null,-1)));function C(e,t,o,i,a,s){const l=(0,r.up)("Highcharts");return(0,r.wg)(),(0,r.iD)("div",m,[(0,r._)("div",f,[(0,r._)("div",x,[(0,r.Wm)(l,{class:"highcharts-description col-12",options:e.chartOptions,highcharts:e.hcInstance},null,8,["options","highcharts"])]),(0,r._)("div",y,[(0,r._)("div",P,[(0,r._)("div",b,[_,(0,r._)("p",k,(0,n.zw)(e.tokenPrice),1),Z]),(0,r._)("div",H,[M,(0,r._)("p",T,(0,n.zw)(e.marketCap),1),F])])])])])}var I=o(15581),D=o(82341),B=o.n(D),S=o(15192),L=o.n(S),q=o(30229),$=o(52729),V=function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r["throw"](e))}catch(t){i(t)}}function l(e){e.done?o(e.value):n(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const E=(0,q.z)(),W=1e6,z=1e9;L()(B());const A=(0,r.aZ)({name:"PriceChart",components:{Highcharts:I.Chart},setup(){const e=B(),t=(0,w.iH)({chart:{type:"area"},title:{text:"Past 24h"},xAxis:{dateTimeLabelFormats:{day:"%A, %b %e, %l %p",millisecond:"%A, %b %e, %l %p"},type:"datetime"},yAxis:{title:{text:"Price"}},legend:{enabled:!0},plotOptions:{area:{fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,(0,$.Z)("color-graph-shadow")]]},marker:{radius:.5},lineWidth:2,states:{hover:{lineWidth:4}},threshold:null}},series:[{name:E.getSystemToken().symbol,color:(0,$.Z)("primary"),data:[]}],tooltip:{dateTimeLabelFormats:{hour:"%A, %b %e, %l %p"}}}),o=(0,w.iH)(0),n=(0,w.iH)(""),i=(0,w.iH)(""),a=(0,w.iH)(""),s=(0,w.iH)(""),l=(0,w.iH)(""),c=()=>V(this,void 0,void 0,(function*(){const e=yield E.getPriceData();o.value=e.lastUpdated,n.value=d(e.tokenPrice),l.value=p(e.dayChange),s.value=d(e.dayVolume),i.value=d(e.marketCap),t.value.series[0].data=e.prices})),p=e=>`${e.toFixed(2)} %`,d=e=>e<1?`$${e.toFixed(3)}`:eV(this,void 0,void 0,(function*(){yield c()})))),{hcInstance:e,chartOptions:t,lastUpdated:o,tokenPrice:n,marketCap:i,rank:a,dayVolume:s,dayChange:l,fetchPriceChartData:c,formatPercentage:p,formatCurrencyValue:d}}});var N=o(11639);const R=(0,N.Z)(A,[["render",C],["__scopeId","data-v-6f5e07aa"]]),j=R;var G=o(59311),O=o(61957);const U={class:"absolute q-pa-md producer-toggle text-white"},K={class:"map-container",id:"map",ref:"map-root"},Q={class:"ol-popup",id:"popup",ref:"popup"},X={class:"ol-popup-closer",href:"#",id:"popup-closer",ref:"popup-closer"},Y={id:"popup-content",ref:"popup-content"},J={class:"ol-popup",id:"producerPopup",ref:"producerPopup"},ee={class:"ol-popup-closer",href:"#",id:"producerPopup-closer",ref:"producerPopup-closer"},te={id:"producerPopup-content",ref:"producerPopup-content"};function oe(e,t,o,n,i,a){const s=(0,r.up)("q-toggle");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r._)("div",U,[(0,r.Wm)(s,{modelValue:e.producerToggle,"onUpdate:modelValue":[t[0]||(t[0]=t=>e.producerToggle=t),t[1]||(t[1]=t=>e.updateToggleOption(t))],label:"Show Active BP","left-label":"",color:"white"},null,8,["modelValue"])]),(0,r._)("div",K,null,512),(0,r._)("div",Q,[(0,r.wy)((0,r._)("a",X,null,512),[[O.F8,e.$q.platform.is.mobile]]),(0,r._)("div",Y,null,512)],512),(0,r._)("div",J,[(0,r._)("a",ee,null,512),(0,r._)("div",te,null,512)],512)],64)}var re=o(21308),ne=o(54312),ie=o(57617),ae=o(3244),se=(o(1811),o(24553)),le=o(98723),ce=o(95695),pe=o(3038),de=o(33410),ue=o(95347),he=o(73504),ve=o(79100),we=o(55335),ge=o(36907),me=o(51317),fe=o(6884),xe=o(33100),ye=o(78504),Pe=o(98453),be=function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r["throw"](e))}catch(t){i(t)}}function l(e){e.done?o(e.value):n(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const _e=(0,r.aZ)({name:"WorldMap",components:{Map:re.Z,View:ne.ZP},setup(){const e=(0,ye.oR)(),t=(0,w.iH)([40,40]),o=(0,w.iH)("EPSG:4326"),n=(0,w.iH)(8),i=(0,w.iH)(0),a=(0,w.iH)(Boolean(Number(localStorage.getItem("mapBP-toggle")))),s=(0,r.Fl)((()=>e.state.chain.bpList)),l=(0,r.Fl)((()=>e.state.chain.producerSchedule)),c=(0,r.Fl)((()=>e.state.chain.head_block_producer)),p=(0,w.iH)("");function d(e){localStorage.setItem("mapBP-toggle",Number(e).toString())}return{center:t,projection:o,zoom:n,rotation:i,BPlist:s,HeadProducer:c,currentHeadProducer:p,schedule:l,producerToggle:a,updateToggleOption:d}},data(){return{map:null,flashGeom:null,listenerKey:null,duration:2600,MapSource:null}},methods:Object.assign({},(0,xe.nv)("chain",["updateBpList"])),mounted(){return be(this,void 0,void 0,(function*(){yield this.updateBpList();const e=new le.ZP({image:new ce.Z({fill:new pe.Z({color:"#FFFFFF"}),radius:5}),fill:new pe.Z({color:(0,$.Z)("color-map")}),stroke:new de.Z({color:(0,$.Z)("color-map"),width:1}),zIndex:50}),t=new le.ZP({image:new ce.Z({fill:new pe.Z({color:"#8276d2"}),stroke:new de.Z({color:"#63C9EF",width:3}),radius:5}),zIndex:51}),o=new le.ZP({image:new ce.Z({fill:new pe.Z({color:"#8276d2"}),stroke:new de.Z({color:"#FFFFFF",width:3}),radius:5}),zIndex:51}),r=new ue.Z({wrapX:!1,url:"https://openlayers.org/data/vector/ecoregions.json",format:new se.Z}),n=new Pe.Z({imageRatio:1,source:r,style:e}),i=new ue.Z({wrapX:!1}),a=new he.Z({source:i}),s=this.$refs["popup"],l=this.$refs["popup-content"],c=this.$refs["popup-closer"],p=this.$refs["producerPopup"],d=this.$refs["producerPopup-content"],u=this.$refs["producerPopup-closer"],h=new ae.Z({element:s,autoPan:{animation:{duration:250}}}),v=new ae.Z({element:p});c.onclick=function(){return h.setPosition(void 0),c.blur(),!1},u.onclick=function(){return v.setPosition(void 0),u.blur(),!1};const w=new re.Z({layers:[n,a],overlays:[h,v],target:"map",view:new ne.ZP({center:[0,0],zoom:0}),controls:[],interactions:[]});let g=null;function m(t,r){for(const n of t)if(n.org&&n.org.location){const t=n.org.location.longitude,a=n.org.location.latitude,s=new ie.Z((0,ve.mi)([t,a])),l=new we.Z(s);r.includes(n.owner)?l.setStyle(o):l.setStyle(e),l.setId(n.owner),l.setProperties({type:"bp",country:n.org.location.name}),i.addFeature(l)}else{const t=360*Math.random()-180,a=15*Math.random()-89,s=new ie.Z((0,ve.mi)([t,a])),l=new we.Z(s);r.includes(n.owner)?l.setStyle(o):l.setStyle(e),l.setId(n.owner),l.setProperties({type:"bp",country:"unknown"}),i.addFeature(l)}}w.on("singleclick",(e=>{null!==g&&g.getProperties().type&&"bp"===g.getProperties().type&&(h.setPosition(void 0),c.blur(),l.innerHTML=" ",g=null),w.forEachFeatureAtPixel(e.pixel,(function(e){e.getProperties().type&&"bp"===e.getProperties().type&&(g=e)})),g&&g.getProperties().type&&"bp"===g.getProperties().type?(l.innerHTML=(g.getId()===this.HeadProducer?'
Producing
':"")+'
'+g.getId()+'
'+g.getProperties().country+"
",h.setPosition(g.getGeometry().getCoordinates())):l.innerHTML=" "})),w.on("pointermove",(e=>{null!==g&&g.getProperties().type&&"bp"===g.getProperties().type&&(h.setPosition(void 0),c.blur(),l.innerHTML=" ",g=null),w.forEachFeatureAtPixel(e.pixel,(function(e){e.getProperties().type&&"bp"===e.getProperties().type&&(g=e)})),g&&g.getProperties().type&&"bp"===g.getProperties().type?(l.innerHTML=(g.getId()===this.HeadProducer?'
Producing
':"")+'
'+g.getId()+'
'+g.getProperties().country+"
",h.setPosition(g.getGeometry().getCoordinates())):l.innerHTML=" "}));const f=2600;function x(e){const t=Date.now(),o=e.getGeometry().clone(),r=a.on("postrender",n);function n(e){const n=e.frameState,i=n.time-t;if(i>=f)return void(0,fe.B)(r);const a=(0,me.u3)(e),s=i/f,l=25*(0,ge.Vv)(s)+5,c=(0,ge.Vv)(1-s),p=new le.ZP({image:new ce.Z({radius:l,stroke:new de.Z({color:"rgba(255, 255, 255, "+c+")",width:.25+c})})});a.setStyle(p),a.drawGeometry(o),w.render()}}const y=()=>{if(this.HeadProducer!==this.currentHeadProducer){v.setPosition(void 0);let r=i.getFeatureById(this.HeadProducer),n=i.getFeatureById(this.currentHeadProducer);this.currentHeadProducer=this.HeadProducer,this.MapSource,null!==r&&(d.innerHTML=(r.getId()===this.HeadProducer?'
Producing
':"")+'
'+r.getId()+'
'+r.getProperties().country+"
",this.producerToggle&&v.setPosition(r.getGeometry().getCoordinates()),r.setStyle(t),x(r)),null!==n&&(this.schedule.includes(this.currentHeadProducer)?n.setStyle(o):n.setStyle(e))}};i.on("addfeature",(function(e){x(e.feature)})),window.setInterval((()=>{y()}),1e3),m(this.BPlist,this.schedule),this.map=w,this.MapSource=r}))}});var ke=o(23175),Ze=o(69984),He=o.n(Ze);const Me=(0,N.Z)(_e,[["render",oe],["__scopeId","data-v-9c30d6a4"]]),Te=Me;He()(_e,"components",{QToggle:ke.Z});const Fe=e=>((0,r.dD)("data-v-8161cf88"),e=e(),(0,r.Cn)(),e),Ce={class:"col-3"},Ie={class:"row"},De=Fe((()=>(0,r._)("div",{class:"col-12 text-subtitle1 text-weight-thin text-uppercase"},"Head Block",-1))),Be={class:"col-12 text-subtitle1 text-bold"},Se=Fe((()=>(0,r._)("div",{class:"col-1"},[(0,r._)("div",{class:"hr-vertical"})],-1))),Le={class:"col-3"},qe={class:"row"},$e=Fe((()=>(0,r._)("div",{class:"col-12 text-subtitle1 text-weight-thin text-uppercase"},"Producing",-1))),Ve={class:"col-12 text-subtitle1 text-bold"},Ee=Fe((()=>(0,r._)("div",{class:"col-1"},[(0,r._)("div",{class:"hr-vertical"})],-1))),We={class:"col-3"},ze={class:"row"},Ae=Fe((()=>(0,r._)("div",{class:"col-12 text-subtitle1 text-weight-thin text-uppercase"},"Irreversible Block",-1))),Ne={class:"col-12 text-subtitle1 text-bold"};function Re(e,t,o,i,a,s){return(0,r.wg)(),(0,r.iD)("div",{class:(0,n.C_)(["row full-width text-center justify-center actor-font",{"text-grey-3":e.mapVisible}])},[(0,r._)("div",Ce,[(0,r._)("div",Ie,[De,(0,r._)("div",Be,(0,n.zw)(e.HeadBlock.toLocaleString()),1)])]),Se,(0,r._)("div",Le,[(0,r._)("div",qe,[$e,(0,r._)("div",Ve,(0,n.zw)(e.HeadBlockProducer),1)])]),Ee,(0,r._)("div",We,[(0,r._)("div",ze,[Ae,(0,r._)("div",Ne,(0,n.zw)(e.lastIrreversibleBlock.toLocaleString()),1)])])],2)}const je=(0,r.aZ)({name:"MapData",props:{mapVisible:{type:Boolean,required:!0}},setup(){const e=(0,ye.oR)(),t=(0,r.Fl)((()=>e.state.chain.head_block_producer)),o=(0,r.Fl)((()=>e.state.chain.head_block_num)),n=(0,r.Fl)((()=>e.state.chain.last_irreversible_block_num));return{HeadBlock:o,HeadBlockProducer:t,lastIrreversibleBlock:n}}}),Ge=(0,N.Z)(je,[["render",Re],["__scopeId","data-v-8161cf88"]]),Oe=Ge;var Ue;(function(e){e[e["Reveal"]=0]="Reveal",e[e["Top"]=1]="Top",e[e["None"]=2]="None"})(Ue||(Ue={}));const Ke=(0,r.aZ)({name:"PageNetwork",components:{PriceChart:j,TransactionsTable:G.Z,WorldMap:Te,MapData:Oe},setup(){const e=(0,ye.oR)(),t=q.Z.get().getCurrentChain().getMapDisplay(),o=(0,w.iH)(!1),n=(0,w.iH)(!1),i=100;let a,s=(0,w.iH)(Ue.None);const l=()=>{o.value=!o.value,o.value||s.value===Ue.None||(s.value=Ue.None)},c=()=>{if(0===document.documentElement.scrollTop){if(!o.value){if(s.value===Ue.None)return void(s.value=Ue.Top);s.value===Ue.Top&&(s.value=Ue.Reveal,l())}}else s.value=Ue.None};(0,r.YP)(s,(e=>{e===Ue.Top&&(n.value=!0,setTimeout((()=>{n.value=!1}),2e3))}));const p=function(){window.clearTimeout(a),a=setTimeout(c,i)},d=function(e){"ArrowUp"===e.key&&p()},u=()=>{window.removeEventListener("scroll",p),window.removeEventListener("wheel",p),window.removeEventListener("keyup",d)};return(0,r.bv)((()=>{t&&(window.addEventListener("scroll",p,!1),window.addEventListener("wheel",p,!1),window.addEventListener("keyup",d,!1),window.setInterval((()=>{e.dispatch("chain/updateBlockData")}),2e3))})),(0,r.Jd)((()=>{u()})),{mapDisplay:t,showMap:o,showMapHint:n,toggleMap:l}}});var Qe=o(22857);const Xe=(0,N.Z)(Ke,[["render",v]]),Ye=Xe;He()(Ke,"components",{QIcon:Qe.Z})}}]); \ No newline at end of file diff --git a/dist/spa/js/371.006261cc.js b/dist/spa/js/371.006261cc.js new file mode 100644 index 0000000..ef609df --- /dev/null +++ b/dist/spa/js/371.006261cc.js @@ -0,0 +1 @@ +"use strict";(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[371],{40281:(e,t,o)=>{o.r(t),o.d(t,{default:()=>Re});var n=o(59835);function a(e,t,o,a,l,c){const s=(0,n.up)("AppHeader"),r=(0,n.up)("q-header"),i=(0,n.up)("router-view"),u=(0,n.up)("q-page-container"),d=(0,n.up)("AppFooter"),p=(0,n.up)("q-footer"),h=(0,n.up)("q-layout");return(0,n.wg)(),(0,n.j4)(h,{view:"lHh lpR lff"},{default:(0,n.w5)((()=>[(0,n.Wm)(r,null,{default:(0,n.w5)((()=>[(0,n.Wm)(s)])),_:1}),(0,n.Wm)(u,null,{default:(0,n.w5)((()=>[(0,n.Wm)(i)])),_:1}),(0,n.Wm)(p,null,{default:(0,n.w5)((()=>[(0,n.Wm)(d)])),_:1})])),_:1})}var l=o(86970);const c={class:"row footer-background justify-center text-center q-py-md"},s=["href"];function r(e,t,o,a,r,i){return(0,n.wg)(),(0,n.iD)("div",c,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(a.footerLinks,(e=>((0,n.wg)(),(0,n.iD)("div",{key:e.label,class:"col-lg-1 col-md-2 col-sm-2 col-xs-4 q-pa-md"},[(0,n._)("a",{class:"no-dec",href:e.url,target:"_blank"},(0,l.zw)(e.label),9,s)])))),128))])}var i=o(30229);const u={name:"AppFooter",setup(){const e=(0,n.Fl)((()=>i.Z.get().getCurrentChain().getFooterLinks()));return{footerLinks:e}}};var d=o(11639),p=o(77741),h=o(69984),g=o.n(h);const m=(0,d.Z)(u,[["render",r],["__scopeId","data-v-211b25c8"]]),f=m;g()(u,"components",{QColor:p.Z});const v={class:"header-background"},w={class:"row text-center q-pt-sm justify-between q-pt-md"},b={class:"logo-container col-xs-3 col-sm-2 col-md-2 col-lg-2"},y={class:"q-px-xs-xs q-px-sm-xs q-px-md-md q-px-lg-md"},_={class:"logo-header-container"},k={class:"logo-chain-selector-container"},Z={class:"float-left",href:"/"},q=["src"],L=["src"],x={key:0,class:"testnet-text"},C={class:"col-xs-4 col-sm-6 col-md-4 col-lg-6"},S={class:"q-px-xs-xs q-px-sm-xs q-px-md-md q-px-lg-md"},H={class:"row justify-center full-width"},W={class:"col-12"},I={class:"row justify-center col-12 q-pt-sm"};function T(e,t,o,a,l,c){const s=(0,n.up)("ChainsMenu"),r=(0,n.up)("HeaderSearch"),i=(0,n.up)("LoginHandler"),u=(0,n.up)("q-route-tab"),d=(0,n.up)("q-tabs");return(0,n.wg)(),(0,n.iD)("div",v,[(0,n._)("div",w,[(0,n._)("div",b,[(0,n._)("div",y,[(0,n._)("div",_,[(0,n._)("div",k,[(0,n._)("a",Z,[e.isLarge?((0,n.wg)(),(0,n.iD)("img",{key:0,class:"logo",src:e.largeLogoPath},null,8,q)):((0,n.wg)(),(0,n.iD)("img",{key:1,class:"logo-token",src:e.smallLogoPath},null,8,L))]),e.showMultichainSelector?((0,n.wg)(),(0,n.j4)(s,{key:0})):(0,n.kq)("",!0)]),e.isTestnet?((0,n.wg)(),(0,n.iD)("div",x,"TESTNET")):(0,n.kq)("",!0)])])]),(0,n._)("div",C,[(0,n._)("div",S,[(0,n._)("div",H,[(0,n._)("div",W,[(0,n.Wm)(r)])])])]),e.headerSettings.hideLoginHandler?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(i,{key:0}))]),(0,n._)("div",I,[(0,n.Wm)(d,{"active-class":"active-tab","indicator-color":"white",align:"justify","narrow-indicator":"",color:"white"},{default:(0,n.w5)((()=>[e.headerSettings.hideNetworkTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(u,{key:0,class:"deactive",name:"network",label:"Network",to:"/network"})),!e.headerSettings.hideWalletTab&&e.account?((0,n.wg)(),(0,n.j4)(u,{key:1,class:"deactive",name:"wallet",label:"Wallet",to:"/account/"+e.account},null,8,["to"])):(0,n.kq)("",!0),e.headerSettings.hideVoteTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(u,{key:2,class:"deactive",name:"vote",label:"Vote",to:"/vote"})),e.headerSettings.hideProposalTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(u,{key:3,class:"deactive",name:"proposal",label:"Proposal",to:"/proposal"}))])),_:1})])])}var Q=o(60499),j=o(19302);const M={class:"col-xs-5 col-sm-3 col-md-2 col-lg-2"},P={class:"q-px-xs-xs q-px-sm-xs q-px-md-md q-px-lg-md"};function A(e,t,o,a,l,c){const s=(0,n.up)("LoginHandlerDropdown"),r=(0,n.up)("q-btn"),i=(0,n.up)("WalletModal");return(0,n.wg)(),(0,n.iD)("div",M,[(0,n._)("div",P,[e.account?((0,n.wg)(),(0,n.j4)(s,{key:0})):((0,n.wg)(),(0,n.j4)(r,{key:1,class:"button-primary btn-login",label:"Connect",onClick:t[0]||(t[0]=t=>e.showModal=!0)})),(0,n.Wm)(i,{modelValue:e.showModal,"onUpdate:modelValue":t[1]||(t[1]=t=>e.showModal=t)},null,8,["modelValue"])])])}const z=e=>((0,n.dD)("data-v-f3dc15d6"),e=e(),(0,n.Cn)(),e),D=["href"],N=z((()=>(0,n._)("div",{class:"row"},[(0,n._)("div",{class:"col-12"}," View my account ")],-1))),V=[N],F={class:"q-px-sm q-pb-sm"};function E(e,t,o,a,l,c){const s=(0,n.up)("q-card-section"),r=(0,n.up)("q-separator"),i=(0,n.up)("q-btn"),u=(0,n.up)("q-card"),d=(0,n.up)("q-btn-dropdown"),p=(0,n.up)("WalletModal");return(0,n.wg)(),(0,n.iD)(n.HY,null,[(0,n.Wm)(d,{class:"connect-button",color:"primary",label:e.account,"content-style":{backgroundColor:"#172c6c"}},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{class:"buttons-container"},{default:(0,n.w5)((()=>[(0,n.Wm)(s,{class:"account-link"},{default:(0,n.w5)((()=>[(0,n._)("a",{class:"text-white",href:"/account/"+e.account},V,8,D)])),_:1}),(0,n.Wm)(r,{dark:""}),(0,n.Wm)(s,null,{default:(0,n.w5)((()=>[(0,n._)("div",F,[(0,n.Wm)(i,{class:"full-width",color:"primary",label:"Disconnect",onClick:e.onLogout},null,8,["onClick"])])])),_:1})])),_:1})])),_:1},8,["label"]),(0,n.Wm)(p,{modelValue:e.showModal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showModal=t)},null,8,["modelValue"])],64)}var O=o(79870),U=o(78504),B=o(84284),G=o(17779),R=function(e,t,o,n){function a(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,l){function c(e){try{r(n.next(e))}catch(t){l(t)}}function s(e){try{r(n["throw"](e))}catch(t){l(t)}}function r(e){e.done?o(e.value):a(e.value).then(c,s)}r((n=n.apply(e,t||[])).next())}))};const $=(0,n.aZ)({name:"LoginHandlerDropdown",components:{WalletModal:O.Z},setup(){const e=(0,B.getAuthenticators)(),t=(0,U.useStore)(),o=(0,n.Fl)((()=>t.state.account.accountName)),a=(0,Q.iH)(!1),l=()=>{const t=localStorage.getItem("autoLogin_"+(0,i.z)().getChainId()),o=e.find((e=>e.getName()===t));return o},c=()=>R(this,void 0,void 0,(function*(){const e=l();try{e&&(yield e.logout()),s()}catch(t){G.error("Authenticator logout error",t),s()}})),s=()=>{t.dispatch("account/logout")};return{account:o,showModal:a,disconnectLabel:"Disconnect",onLogout:c}}});var Y=o(18479),K=o(44458),J=o(63190),X=o(50926),ee=o(68879),te=o(56362),oe=o(13246);const ne=(0,d.Z)($,[["render",E],["__scopeId","data-v-f3dc15d6"]]),ae=ne;g()($,"components",{QBtnDropdown:Y.Z,QCard:K.Z,QCardSection:J.Z,QSeparator:X.Z,QBtn:ee.Z,QMenu:te.Z,QList:oe.Z,QColor:p.Z});const le=(0,n.aZ)({name:"LoginHandler",components:{LoginHandlerDropdown:ae,WalletModal:O.Z},setup(){const e=(0,B.getAuthenticators)(),t=(0,U.useStore)(),o=(0,Q.iH)(!1),a=(0,Q.iH)(!1),l=(0,n.Fl)((()=>t.state.account.accountName));return(0,n.bv)((()=>{const o=localStorage.getItem("account_"+(0,i.z)().getChainId());if(o){t.commit("account/setAccountName",o);const n=localStorage.getItem("autoLogin_"+(0,i.z)().getChainId()),a=e.find((e=>e.getName()===n));t.dispatch("account/login",{account:o,authenticator:a})}})),{showDropdown:o,showModal:a,account:l}}}),ce=(0,d.Z)(le,[["render",A],["__scopeId","data-v-77aac5ae"]]),se=ce;g()(le,"components",{QBtn:ee.Z});var re=o(61957);const ie=(0,n.Uk)("Searching...");function ue(e,t,o,a,c,s){const r=(0,n.up)("q-icon"),i=(0,n.up)("q-item-label"),u=(0,n.up)("q-item-section"),d=(0,n.up)("q-item"),p=(0,n.up)("q-select");return(0,n.wg)(),(0,n.j4)(p,{borderless:"",dense:"",filled:"","use-input":"","hide-selected":"","fill-input":"","hide-bottom-space":"","input-style":"color:white",color:"white",loading:e.isLoading,"model-value":e.inputValue,options:e.options,"option-disable":e=>e.isHeader,class:"search-input",onInputValue:t[0]||(t[0]=t=>e.inputValue=t),onKeyup:(0,re.D2)(e.handleGoTo,["enter"])},{prepend:(0,n.w5)((()=>[(0,n.Wm)(r,{class:"rotate-90",name:"search",color:"white",size:"20px"})])),"no-option":(0,n.w5)((()=>[(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[(0,n.Wm)(u,{class:"text-center"},{default:(0,n.w5)((()=>[e.isLoading?((0,n.wg)(),(0,n.j4)(i,{key:0},{default:(0,n.w5)((()=>[ie])),_:1})):((0,n.wg)(),(0,n.j4)(i,{key:1},{default:(0,n.w5)((()=>[(0,n.Uk)((0,l.zw)(e.inputValue?"Nothing found":"Search by accounts, keys, proposals and transactions"),1)])),_:1}))])),_:1})])),_:1})])),option:(0,n.w5)((t=>[t.opt.isHeader?((0,n.wg)(),(0,n.j4)(i,{key:0,header:""},{default:(0,n.w5)((()=>[(0,n.Uk)((0,l.zw)(t.opt.label),1)])),_:2},1024)):((0,n.wg)(),(0,n.j4)(d,(0,n.dG)({key:1},t.itemProps,{exact:"exact",clickable:"clickable",onClick:o=>e.handleGoTo(t.opt.to)}),{default:(0,n.w5)((()=>[(0,n.Wm)(u,null,{default:(0,n.w5)((()=>[(0,n.Wm)(i,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,l.zw)(t.opt.label),1)])),_:2},1024)])),_:2},1024)])),_:2},1040,["onClick"]))])),_:1},8,["loading","model-value","options","option-disable","onKeyup"])}var de=o(18910),pe=o(21889),he=o(90347),ge=o(71130),me=function(e,t,o,n){function a(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,l){function c(e){try{r(n.next(e))}catch(t){l(t)}}function s(e){try{r(n["throw"](e))}catch(t){l(t)}}function r(e){e.done?o(e.value):a(e.value).then(c,s)}r((n=n.apply(e,t||[])).next())}))};const fe=(0,n.aZ)({name:"HeaderSearch",setup(){const e=(0,de.tv)(),t=(0,j.Z)(),o=(0,Q.iH)(""),a=(0,Q.iH)([]),l=(0,Q.iH)(!1),c=()=>me(this,void 0,void 0,(function*(){if(""===o.value)return void(a.value=[]);l.value=!0;const e=o.value.toLowerCase();yield Promise.all([r(e),i(e),d(e)]).then((e=>{a.value=[].concat.apply([],e)})),l.value=!1})),s=(0,ge.D)(c,200);function r(e){return me(this,void 0,void 0,(function*(){try{const t=[],o={code:"eosio",limit:5,lower_bound:u(e),table:"userres",upper_bound:e.padEnd(12,"z")},n=yield pe.h.getTableByScope(o);return e.includes("eosio")&&n.unshift({payer:"eosio"}),n.length>0&&(t.push({label:"Accounts",to:"",isHeader:!0}),n.forEach((o=>{o.payer.includes(e)&&t.push({label:o.payer,to:`/account/${o.payer}`,isHeader:!1})}))),t}catch(t){return}}))}function i(e){return me(this,void 0,void 0,(function*(){try{const t=[],{proposals:o}=yield pe.h.getProposals({proposal:e});return o.length>0&&(t.push({label:"Proposals",to:"",isHeader:!0}),o.forEach((e=>{t.push({label:e.proposal_name,to:`/proposal/${e.proposal_name}`,isHeader:!1})}))),t}catch(t){return}}))}function u(e){return e.replace(/^[\s.]+|[\s.]+$/g,"")}function d(e){return me(this,void 0,void 0,(function*(){const t=[];if(64!==e.length)return t;try{const o=yield pe.h.getTransaction(e);return(null===o||void 0===o?void 0:o.actions)&&(t.push({label:"Transactions",to:"",isHeader:!0}),t.push({label:e,to:`/transaction/${e}`,isHeader:!1})),t}catch(o){return}}))}function p(n){return me(this,void 0,void 0,(function*(){if(o.value)if("string"===typeof n&&(yield e.push(n),e.go(0)),(0,he.RJ)(o.value))yield e.push({name:"transaction",params:{transaction:o.value}}),e.go(0);else if(53===o.value.length&&o.value.startsWith("EOS")||57===o.value.length&&o.value.startsWith("PUB_K1"))yield e.push({name:"key",params:{key:o.value}}),e.go(0);else if(o.value.length<=13)try{return yield pe.h.getAccount(o.value.toLowerCase()),yield e.push({name:"account",params:{account:o.value.toLowerCase()}}),void e.go(0)}catch(a){t.notify(`account ${o.value} not found!`)}}))}return(0,n.YP)(o,s),{inputValue:o,options:a,isLoading:l,handleGoTo:p}}});var ve=o(32259),we=o(22857),be=o(490),ye=o(76749),_e=o(33115);const ke=(0,d.Z)(fe,[["render",ue]]),Ze=ke;g()(fe,"components",{QSelect:ve.Z,QIcon:we.Z,QItem:be.Z,QItemSection:ye.Z,QItemLabel:_e.Z});const qe={class:"chains-menu"};function Le(e,t,o,a,l,c){const s=(0,n.up)("q-icon"),r=(0,n.up)("ChainsListSelector"),i=(0,n.up)("q-menu"),u=(0,n.up)("q-btn");return e.hasChainsInstalled?((0,n.wg)(),(0,n.j4)(u,{key:0,flat:"",class:"chain-button"},{default:(0,n.w5)((()=>[(0,n.Wm)(s,{name:e.menuIcon,size:"md"},null,8,["name"]),(0,n.Wm)(i,{modelValue:e.menuOpened,"onUpdate:modelValue":t[0]||(t[0]=t=>e.menuOpened=t)},{default:(0,n.w5)((()=>[(0,n._)("div",qe,[(0,n.Wm)(r,{"on-chain-selected":e.chainSelected,"is-chain-selected":e.isChainSelected},null,8,["on-chain-selected","is-chain-selected"])])])),_:1},8,["modelValue"])])),_:1})):(0,n.kq)("",!0)}var xe=o(54397);const Ce=i.Z.get(),Se=(0,n.aZ)({name:"ChainsMenu",components:{ChainsListSelector:xe.Z},setup(){const e=(0,Q.iH)(!1),t=(0,de.yj)(),o=(0,de.tv)(),a=(0,n.Fl)((()=>e.value?"expand_less":"expand_more")),l=(0,n.Fl)((()=>Ce.getAllChains().length>0));function c(){e.value=!1}function s(e){return sessionStorage.getItem(i.Z.CHAIN_LOCAL_STORAGE)===e.getName()}return(0,n.bv)((()=>{const e=sessionStorage.getItem(i.Z.CHAIN_LOCAL_STORAGE);if(null===e){const e=Ce.getMainnets(),n=e.filter((e=>"telos"===e.getName()))[0];s(n)||o.push({path:t.path,query:{network:n.getName()}})}})),{menuOpened:e,menuIcon:a,chainSelected:c,isChainSelected:s,hasChainsInstalled:l}}}),He=(0,d.Z)(Se,[["render",Le],["__scopeId","data-v-92d31b56"]]),We=He;g()(Se,"components",{QBtn:ee.Z,QIcon:we.Z,QMenu:te.Z});var Ie=o(91669),Te=o(3168);const Qe=(0,n.aZ)({name:"AppHeader",components:{LoginHandler:se,HeaderSearch:Ze,ChainsMenu:We},setup(){const e=(0,j.Z)(),t=(0,U.useStore)(),o=(0,n.Fl)((()=>i.Z.get().getCurrentChain().getUiCustomization().headerSettings)),a=(0,n.Fl)((()=>t.state.account.accountName)),l=(0,n.Fl)((()=>e.screen.gt.sm)),c=(0,n.Fl)((()=>"true"===Te.env.SHOW_MULTICHAIN_SELECTOR)),s=(0,Q.iH)((0,i.z)().isTestnet()),r=(0,Q.iH)((0,i.z)().getSmallLogoPath()),u=(0,Q.iH)((0,i.z)().getLargeLogoPath()),d=(0,Ie.c)();return(0,n.YP)(d,(()=>{r.value=(0,i.z)().getSmallLogoPath(),u.value=(0,i.z)().getLargeLogoPath(),s.value=(0,i.z)().isTestnet()})),{headerSettings:o,account:a,isLarge:l,showMultichainSelector:c,smallLogoPath:r,largeLogoPath:u,isTestnet:s}}});var je=o(47817),Me=o(73333),Pe=o(57661);const Ae=(0,d.Z)(Qe,[["render",T],["__scopeId","data-v-56ed5d95"]]),ze=Ae;g()(Qe,"components",{QTabs:je.Z,QRouteTab:Me.Z,QTab:Pe.Z,QColor:p.Z});var De=o(57674);const Ne=["primary","secondary","accent","dark","positive","negative","info","warning","color-map","color-primary-gradient","color-secondary-gradient","color-tertiary-gradient","color-progress-gradient","color-producer-card-background","color-select-box-background","color-header-background","color-header-text","color-header-border","color-header-support-background","color-graph-shadow","color-footer-background"];var Ve=o(76510);const Fe=(0,n.aZ)({name:"MainLayout",components:{AppHeader:ze,AppFooter:f},setup(){const e=(0,Ie.c)();function t(){const e=(0,i.z)().getTheme();for(let t of Ne)e[t]?(0,De.Z)(t,e[t]):(0,De.Z)(t,Ve.t0[t])}function o(){const e=(0,i.z)().getName();let t=document.querySelector('link[rel~="icon"]');t.href=`chains/${e}/favicon.png`,document.title=e}return(0,n.YP)(e,(()=>{t(),o()})),(0,n.bv)((()=>{t(),o()})),{networkChain:e}}});var Ee=o(77605),Oe=o(16602),Ue=o(12133),Be=o(71378);const Ge=(0,d.Z)(Fe,[["render",a]]),Re=Ge;g()(Fe,"components",{QLayout:Ee.Z,QHeader:Oe.Z,QPageContainer:Ue.Z,QFooter:Be.Z})}}]); \ No newline at end of file diff --git a/dist/spa/js/371.7ed30e64.js b/dist/spa/js/371.7ed30e64.js deleted file mode 100644 index 2314b1b..0000000 --- a/dist/spa/js/371.7ed30e64.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[371],{40281:(e,t,o)=>{o.r(t),o.d(t,{default:()=>Ge});var n=o(59835);function a(e,t,o,a,l,c){const s=(0,n.up)("AppHeader"),r=(0,n.up)("q-header"),i=(0,n.up)("router-view"),u=(0,n.up)("q-page-container"),d=(0,n.up)("AppFooter"),p=(0,n.up)("q-footer"),h=(0,n.up)("q-layout");return(0,n.wg)(),(0,n.j4)(h,{view:"lHh lpR lff"},{default:(0,n.w5)((()=>[(0,n.Wm)(r,null,{default:(0,n.w5)((()=>[(0,n.Wm)(s)])),_:1}),(0,n.Wm)(u,null,{default:(0,n.w5)((()=>[(0,n.Wm)(i)])),_:1}),(0,n.Wm)(p,null,{default:(0,n.w5)((()=>[(0,n.Wm)(d)])),_:1})])),_:1})}var l=o(86970);const c={class:"row footer-background justify-center text-center q-py-md"},s=["href"];function r(e,t,o,a,r,i){return(0,n.wg)(),(0,n.iD)("div",c,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(a.footerLinks,(e=>((0,n.wg)(),(0,n.iD)("div",{key:e.label,class:"col-lg-1 col-md-2 col-sm-2 col-xs-4 q-pa-md"},[(0,n._)("a",{class:"no-dec",href:e.url,target:"_blank"},(0,l.zw)(e.label),9,s)])))),128))])}var i=o(30229);const u={name:"AppFooter",setup(){const e=(0,n.Fl)((()=>i.Z.get().getCurrentChain().getFooterLinks()));return{footerLinks:e}}};var d=o(11639),p=o(77741),h=o(69984),g=o.n(h);const m=(0,d.Z)(u,[["render",r],["__scopeId","data-v-211b25c8"]]),f=m;g()(u,"components",{QColor:p.Z});const v={class:"header-background"},w={class:"row text-center q-pt-sm justify-between q-pt-md"},b={class:"logo-container col-xs-3 col-sm-2 col-md-2 col-lg-2"},y={class:"q-px-xs-xs q-px-sm-xs q-px-md-md q-px-lg-md"},_={class:"logo-header-container"},k={class:"logo-chain-selector-container"},Z={class:"float-left",href:"/"},q=["src"],L=["src"],x={key:0,class:"testnet-text"},C={class:"col-xs-4 col-sm-6 col-md-4 col-lg-6"},H={class:"q-px-xs-xs q-px-sm-xs q-px-md-md q-px-lg-md"},S={class:"row justify-center full-width"},W={class:"col-12"},I={class:"row justify-center col-12 q-pt-sm"};function T(e,t,o,a,l,c){const s=(0,n.up)("ChainsMenu"),r=(0,n.up)("HeaderSearch"),i=(0,n.up)("LoginHandler"),u=(0,n.up)("q-route-tab"),d=(0,n.up)("q-tabs");return(0,n.wg)(),(0,n.iD)("div",v,[(0,n._)("div",w,[(0,n._)("div",b,[(0,n._)("div",y,[(0,n._)("div",_,[(0,n._)("div",k,[(0,n._)("a",Z,[e.isLarge?((0,n.wg)(),(0,n.iD)("img",{key:0,class:"logo",src:e.largeLogoPath},null,8,q)):((0,n.wg)(),(0,n.iD)("img",{key:1,class:"logo-token",src:e.smallLogoPath},null,8,L))]),e.showMultichainSelector?((0,n.wg)(),(0,n.j4)(s,{key:0})):(0,n.kq)("",!0)]),e.isTestnet?((0,n.wg)(),(0,n.iD)("div",x,"TESTNET")):(0,n.kq)("",!0)])])]),(0,n._)("div",C,[(0,n._)("div",H,[(0,n._)("div",S,[(0,n._)("div",W,[(0,n.Wm)(r)])])])]),e.headerSettings.hideLoginHandler?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(i,{key:0}))]),(0,n._)("div",I,[(0,n.Wm)(d,{"active-class":"active-tab","indicator-color":"white",align:"justify","narrow-indicator":"",color:"white"},{default:(0,n.w5)((()=>[e.headerSettings.hideNetworkTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(u,{key:0,class:"deactive",name:"network",label:"Network",to:"/network"})),!e.headerSettings.hideWalletTab&&e.account?((0,n.wg)(),(0,n.j4)(u,{key:1,class:"deactive",name:"wallet",label:"Wallet",to:"/account/"+e.account},null,8,["to"])):(0,n.kq)("",!0),e.headerSettings.hideVoteTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(u,{key:2,class:"deactive",name:"vote",label:"Vote",to:"/vote"})),e.headerSettings.hideProposalTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(u,{key:3,class:"deactive",name:"proposal",label:"Proposal",to:"/proposal"}))])),_:1})])])}var Q=o(60499),j=o(19302);const M={class:"col-xs-5 col-sm-3 col-md-2 col-lg-2"},P={class:"q-px-xs-xs q-px-sm-xs q-px-md-md q-px-lg-md"};function A(e,t,o,a,l,c){const s=(0,n.up)("LoginHandlerDropdown"),r=(0,n.up)("q-btn"),i=(0,n.up)("WalletModal");return(0,n.wg)(),(0,n.iD)("div",M,[(0,n._)("div",P,[e.account?((0,n.wg)(),(0,n.j4)(s,{key:0})):((0,n.wg)(),(0,n.j4)(r,{key:1,class:"button-primary btn-login",label:"Connect",onClick:t[0]||(t[0]=t=>e.showModal=!0)})),(0,n.Wm)(i,{modelValue:e.showModal,"onUpdate:modelValue":t[1]||(t[1]=t=>e.showModal=t)},null,8,["modelValue"])])])}const z=e=>((0,n.dD)("data-v-f3dc15d6"),e=e(),(0,n.Cn)(),e),D=["href"],N=z((()=>(0,n._)("div",{class:"row"},[(0,n._)("div",{class:"col-12"}," View my account ")],-1))),V=[N],F={class:"q-px-sm q-pb-sm"};function E(e,t,o,a,l,c){const s=(0,n.up)("q-card-section"),r=(0,n.up)("q-separator"),i=(0,n.up)("q-btn"),u=(0,n.up)("q-card"),d=(0,n.up)("q-btn-dropdown"),p=(0,n.up)("WalletModal");return(0,n.wg)(),(0,n.iD)(n.HY,null,[(0,n.Wm)(d,{class:"connect-button",color:"primary",label:e.account,"content-style":{backgroundColor:"#172c6c"}},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{class:"buttons-container"},{default:(0,n.w5)((()=>[(0,n.Wm)(s,{class:"account-link"},{default:(0,n.w5)((()=>[(0,n._)("a",{class:"text-white",href:"/account/"+e.account},V,8,D)])),_:1}),(0,n.Wm)(r,{dark:""}),(0,n.Wm)(s,null,{default:(0,n.w5)((()=>[(0,n._)("div",F,[(0,n.Wm)(i,{class:"full-width",color:"primary",label:"Disconnect",onClick:e.onLogout},null,8,["onClick"])])])),_:1})])),_:1})])),_:1},8,["label"]),(0,n.Wm)(p,{modelValue:e.showModal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showModal=t)},null,8,["modelValue"])],64)}var O=o(79870),U=o(78504),R=o(84284),B=o(17779),G=function(e,t,o,n){function a(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,l){function c(e){try{r(n.next(e))}catch(t){l(t)}}function s(e){try{r(n["throw"](e))}catch(t){l(t)}}function r(e){e.done?o(e.value):a(e.value).then(c,s)}r((n=n.apply(e,t||[])).next())}))};const $=(0,n.aZ)({name:"LoginHandlerDropdown",components:{WalletModal:O.Z},setup(){const e=(0,R.getAuthenticators)(),t=(0,U.oR)(),o=(0,n.Fl)((()=>t.state.account.accountName)),a=(0,Q.iH)(!1),l=()=>{const t=localStorage.getItem("autoLogin_"+(0,i.z)().getChainId()),o=e.find((e=>e.getName()===t));return o},c=()=>G(this,void 0,void 0,(function*(){const e=l();try{e&&(yield e.logout()),s()}catch(t){B.error("Authenticator logout error",t),s()}})),s=()=>{t.dispatch("account/logout")};return{account:o,showModal:a,disconnectLabel:"Disconnect",onLogout:c}}});var Y=o(18479),K=o(44458),J=o(63190),X=o(50926),ee=o(68879),te=o(56362),oe=o(13246);const ne=(0,d.Z)($,[["render",E],["__scopeId","data-v-f3dc15d6"]]),ae=ne;g()($,"components",{QBtnDropdown:Y.Z,QCard:K.Z,QCardSection:J.Z,QSeparator:X.Z,QBtn:ee.Z,QMenu:te.Z,QList:oe.Z,QColor:p.Z});const le=(0,n.aZ)({name:"LoginHandler",components:{LoginHandlerDropdown:ae,WalletModal:O.Z},setup(){const e=(0,R.getAuthenticators)(),t=(0,U.oR)(),o=(0,Q.iH)(!1),a=(0,Q.iH)(!1),l=(0,n.Fl)((()=>t.state.account.accountName));return(0,n.bv)((()=>{const o=localStorage.getItem("account_"+(0,i.z)().getChainId());if(o){t.commit("account/setAccountName",o);const n=localStorage.getItem("autoLogin_"+(0,i.z)().getChainId()),a=e.find((e=>e.getName()===n));t.dispatch("account/login",{account:o,authenticator:a})}})),{showDropdown:o,showModal:a,account:l}}}),ce=(0,d.Z)(le,[["render",A],["__scopeId","data-v-77aac5ae"]]),se=ce;g()(le,"components",{QBtn:ee.Z});var re=o(61957);const ie=(0,n.Uk)("Searching...");function ue(e,t,o,a,c,s){const r=(0,n.up)("q-icon"),i=(0,n.up)("q-item-label"),u=(0,n.up)("q-item-section"),d=(0,n.up)("q-item"),p=(0,n.up)("q-select");return(0,n.wg)(),(0,n.j4)(p,{borderless:"",dense:"",filled:"","use-input":"","hide-selected":"","fill-input":"","hide-bottom-space":"","input-style":"color:white",color:"white",loading:e.isLoading,"model-value":e.inputValue,options:e.options,"option-disable":e=>e.isHeader,class:"search-input",onInputValue:t[0]||(t[0]=t=>e.inputValue=t),onKeyup:(0,re.D2)(e.handleGoTo,["enter"])},{prepend:(0,n.w5)((()=>[(0,n.Wm)(r,{class:"rotate-90",name:"search",color:"white",size:"20px"})])),"no-option":(0,n.w5)((()=>[(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[(0,n.Wm)(u,{class:"text-center"},{default:(0,n.w5)((()=>[e.isLoading?((0,n.wg)(),(0,n.j4)(i,{key:0},{default:(0,n.w5)((()=>[ie])),_:1})):((0,n.wg)(),(0,n.j4)(i,{key:1},{default:(0,n.w5)((()=>[(0,n.Uk)((0,l.zw)(e.inputValue?"Nothing found":"Search by accounts, keys, proposals and transactions"),1)])),_:1}))])),_:1})])),_:1})])),option:(0,n.w5)((t=>[t.opt.isHeader?((0,n.wg)(),(0,n.j4)(i,{key:0,header:""},{default:(0,n.w5)((()=>[(0,n.Uk)((0,l.zw)(t.opt.label),1)])),_:2},1024)):((0,n.wg)(),(0,n.j4)(d,(0,n.dG)({key:1},t.itemProps,{exact:"exact",clickable:"clickable",onClick:o=>e.handleGoTo(t.opt.to)}),{default:(0,n.w5)((()=>[(0,n.Wm)(u,null,{default:(0,n.w5)((()=>[(0,n.Wm)(i,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,l.zw)(t.opt.label),1)])),_:2},1024)])),_:2},1024)])),_:2},1040,["onClick"]))])),_:1},8,["loading","model-value","options","option-disable","onKeyup"])}var de=o(18910),pe=o(21889),he=o(90347),ge=o(71130),me=function(e,t,o,n){function a(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,l){function c(e){try{r(n.next(e))}catch(t){l(t)}}function s(e){try{r(n["throw"](e))}catch(t){l(t)}}function r(e){e.done?o(e.value):a(e.value).then(c,s)}r((n=n.apply(e,t||[])).next())}))};const fe=(0,n.aZ)({name:"HeaderSearch",setup(){const e=(0,de.tv)(),t=(0,j.Z)(),o=(0,Q.iH)(""),a=(0,Q.iH)([]),l=(0,Q.iH)(!1),c=()=>me(this,void 0,void 0,(function*(){if(""===o.value)return void(a.value=[]);l.value=!0;const e=o.value.toLowerCase();yield Promise.all([r(e),i(e),d(e)]).then((e=>{a.value=[].concat.apply([],e)})),l.value=!1})),s=(0,ge.D)(c,200);function r(e){return me(this,void 0,void 0,(function*(){try{const t=[],o={code:"eosio",limit:5,lower_bound:u(e),table:"userres",upper_bound:e.padEnd(12,"z")},n=yield pe.h.getTableByScope(o);return e.includes("eosio")&&n.unshift({payer:"eosio"}),n.length>0&&(t.push({label:"Accounts",to:"",isHeader:!0}),n.forEach((o=>{o.payer.includes(e)&&t.push({label:o.payer,to:`/account/${o.payer}`,isHeader:!1})}))),t}catch(t){return}}))}function i(e){return me(this,void 0,void 0,(function*(){try{const t=[],{proposals:o}=yield pe.h.getProposals({proposal:e});return o.length>0&&(t.push({label:"Proposals",to:"",isHeader:!0}),o.forEach((e=>{t.push({label:e.proposal_name,to:`/proposal/${e.proposal_name}`,isHeader:!1})}))),t}catch(t){return}}))}function u(e){return e.replace(/^[\s.]+|[\s.]+$/g,"")}function d(e){return me(this,void 0,void 0,(function*(){const t=[];if(64!==e.length)return t;try{const o=yield pe.h.getTransaction(e);return(null===o||void 0===o?void 0:o.actions)&&(t.push({label:"Transactions",to:"",isHeader:!0}),t.push({label:e,to:`/transaction/${e}`,isHeader:!1})),t}catch(o){return}}))}function p(n){return me(this,void 0,void 0,(function*(){if(o.value)if("string"===typeof n&&(yield e.push(n),e.go(0)),(0,he.RJ)(o.value))yield e.push({name:"transaction",params:{transaction:o.value}}),e.go(0);else if(53===o.value.length&&o.value.startsWith("EOS")||57===o.value.length&&o.value.startsWith("PUB_K1"))yield e.push({name:"key",params:{key:o.value}}),e.go(0);else if(o.value.length<=13)try{return yield pe.h.getAccount(o.value.toLowerCase()),yield e.push({name:"account",params:{account:o.value.toLowerCase()}}),void e.go(0)}catch(a){t.notify(`account ${o.value} not found!`)}}))}return(0,n.YP)(o,s),{inputValue:o,options:a,isLoading:l,handleGoTo:p}}});var ve=o(32259),we=o(22857),be=o(490),ye=o(76749),_e=o(33115);const ke=(0,d.Z)(fe,[["render",ue]]),Ze=ke;g()(fe,"components",{QSelect:ve.Z,QIcon:we.Z,QItem:be.Z,QItemSection:ye.Z,QItemLabel:_e.Z});const qe={class:"chains-menu"};function Le(e,t,o,a,l,c){const s=(0,n.up)("q-icon"),r=(0,n.up)("ChainsListSelector"),i=(0,n.up)("q-menu"),u=(0,n.up)("q-btn");return e.hasChainsInstalled?((0,n.wg)(),(0,n.j4)(u,{key:0,flat:"",class:"chain-button"},{default:(0,n.w5)((()=>[(0,n.Wm)(s,{name:e.menuIcon,size:"md"},null,8,["name"]),(0,n.Wm)(i,{modelValue:e.menuOpened,"onUpdate:modelValue":t[0]||(t[0]=t=>e.menuOpened=t)},{default:(0,n.w5)((()=>[(0,n._)("div",qe,[(0,n.Wm)(r,{"on-chain-selected":e.chainSelected,"is-chain-selected":e.isChainSelected},null,8,["on-chain-selected","is-chain-selected"])])])),_:1},8,["modelValue"])])),_:1})):(0,n.kq)("",!0)}var xe=o(54397);const Ce=i.Z.get(),He=(0,n.aZ)({name:"ChainsMenu",components:{ChainsListSelector:xe.Z},setup(){const e=(0,Q.iH)(!1),t=(0,de.yj)(),o=(0,de.tv)(),a=(0,n.Fl)((()=>e.value?"expand_less":"expand_more")),l=(0,n.Fl)((()=>Ce.getAllChains().length>0));function c(){e.value=!1}function s(e){return sessionStorage.getItem(i.Z.CHAIN_LOCAL_STORAGE)===e.getName()}return(0,n.bv)((()=>{const e=sessionStorage.getItem(i.Z.CHAIN_LOCAL_STORAGE);if(null===e){const e=Ce.getMainnets(),n=e.filter((e=>"telos"===e.getName()))[0];s(n)||o.push({path:t.path,query:{network:n.getName()}})}})),{menuOpened:e,menuIcon:a,chainSelected:c,isChainSelected:s,hasChainsInstalled:l}}}),Se=(0,d.Z)(He,[["render",Le],["__scopeId","data-v-92d31b56"]]),We=Se;g()(He,"components",{QBtn:ee.Z,QIcon:we.Z,QMenu:te.Z});var Ie=o(91669),Te=o(3168);const Qe=(0,n.aZ)({name:"AppHeader",components:{LoginHandler:se,HeaderSearch:Ze,ChainsMenu:We},setup(){const e=(0,j.Z)(),t=(0,U.oR)(),o=(0,n.Fl)((()=>i.Z.get().getCurrentChain().getUiCustomization().headerSettings)),a=(0,n.Fl)((()=>t.state.account.accountName)),l=(0,n.Fl)((()=>e.screen.gt.sm)),c=(0,n.Fl)((()=>"true"===Te.env.SHOW_MULTICHAIN_SELECTOR)),s=(0,Q.iH)((0,i.z)().isTestnet()),r=(0,Q.iH)((0,i.z)().getSmallLogoPath()),u=(0,Q.iH)((0,i.z)().getLargeLogoPath()),d=(0,Ie.c)();return(0,n.YP)(d,(()=>{r.value=(0,i.z)().getSmallLogoPath(),u.value=(0,i.z)().getLargeLogoPath(),s.value=(0,i.z)().isTestnet()})),{headerSettings:o,account:a,isLarge:l,showMultichainSelector:c,smallLogoPath:r,largeLogoPath:u,isTestnet:s}}});var je=o(47817),Me=o(73333),Pe=o(57661);const Ae=(0,d.Z)(Qe,[["render",T],["__scopeId","data-v-56ed5d95"]]),ze=Ae;g()(Qe,"components",{QTabs:je.Z,QRouteTab:Me.Z,QTab:Pe.Z,QColor:p.Z});var De=o(57674);const Ne=["primary","secondary","accent","dark","positive","negative","info","warning","color-map","color-primary-gradient","color-secondary-gradient","color-tertiary-gradient","color-progress-gradient","color-producer-card-background","color-select-box-background","color-header-background","color-header-text","color-header-border","color-header-support-background","color-graph-shadow","color-footer-background"];var Ve=o(76510);const Fe=(0,n.aZ)({name:"MainLayout",components:{AppHeader:ze,AppFooter:f},setup(){const e=(0,Ie.c)();function t(){const e=(0,i.z)().getTheme();for(let t of Ne)e[t]?(0,De.Z)(t,e[t]):(0,De.Z)(t,Ve.t0[t])}function o(){const e=(0,i.z)().getName();let t=document.querySelector('link[rel~="icon"]');t.href=`chains/${e}/favicon.png`,document.title=e}return(0,n.YP)(e,(()=>{t(),o()})),(0,n.bv)((()=>{t(),o()})),{networkChain:e}}});var Ee=o(77605),Oe=o(16602),Ue=o(12133),Re=o(71378);const Be=(0,d.Z)(Fe,[["render",a]]),Ge=Be;g()(Fe,"components",{QLayout:Ee.Z,QHeader:Oe.Z,QPageContainer:Ue.Z,QFooter:Re.Z})}}]); \ No newline at end of file diff --git a/dist/spa/js/475.a179fd0b.js b/dist/spa/js/475.fd8562d4.js similarity index 88% rename from dist/spa/js/475.a179fd0b.js rename to dist/spa/js/475.fd8562d4.js index 5d15c7e..b4b9e26 100644 --- a/dist/spa/js/475.a179fd0b.js +++ b/dist/spa/js/475.fd8562d4.js @@ -1 +1 @@ -"use strict";(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[475],{44475:(e,o,t)=>{t.r(o),t.d(o,{default:()=>Qo});var a=t(59835);const l={class:"row justify-between items-center q-py-lg"},n=(0,a._)("h1",{class:"text-h5 q-ma-none"},"New Proposal Multisig Transaction",-1),s={class:"row"},i=(0,a._)("span",{class:"text-h6 text-weight-regular"},"Proposal Info",-1),r={class:"row q-col-gutter-md q-pa-md"},c={class:"col-12 col-sm-6"},u=(0,a._)("ul",{class:"q-px-lg q-py-none"},[(0,a._)("li",null,"Minimum of 2 characters"),(0,a._)("li",null,"Maximum of 13 characters"),(0,a._)("li",null,'First 12 characters can be “a-z” or “1-5" or “.”'),(0,a._)("li",null,"13th character can only be “a-j” or “1-5”"),(0,a._)("li",null,"Last character can not be “.”")],-1),d={class:"col-12 col-sm-6"},m=(0,a._)("span",{class:"text-h6 text-weight-regular"},"Requested approvals",-1),p={class:"q-pa-md"},f={class:"q-pb-md"},v=(0,a._)("span",{class:"text-body1"},"All block producers need approvals",-1),h=(0,a._)("span",{class:"text-h6 text-weight-regular"},"Advanced transaction settings",-1),w={class:"row q-col-gutter-md q-pa-md"},_={class:"col-12 col-sm-6"},b={class:"col-12 col-sm-6"},g={class:"col-12 col-sm-6"},x={class:"col-12 col-sm-6"},y={class:"col-12 col-sm-6"},q={class:"col-12 col-sm-6"},V={class:"row items-center justify-end"},k={class:"col"},W={class:"row items-center justify-end"},D={class:"col-12 col-sm-6"},U={class:"col-12 col-sm-6"},Z={class:"row justify-center items-center q-py-lg"};function A(e,o,t,A,S,P){const Q=(0,a.up)("ProposalSuccess"),z=(0,a.up)("q-btn"),T=(0,a.up)("q-separator"),C=(0,a.up)("q-icon"),j=(0,a.up)("q-tooltip"),I=(0,a.up)("q-input"),H=(0,a.up)("q-expansion-item"),Y=(0,a.up)("q-card"),N=(0,a.up)("ProposalAuthorization"),O=(0,a.up)("q-checkbox"),M=(0,a.up)("q-item-section"),F=(0,a.up)("q-item"),E=(0,a.up)("q-date"),B=(0,a.up)("q-popup-proxy"),L=(0,a.up)("q-time"),R=(0,a.up)("ProposalAction"),K=(0,a.up)("q-tab"),$=(0,a.up)("q-tabs"),J=(0,a.up)("q-tab-panel"),G=(0,a.up)("ProposalUploadCSV"),X=(0,a.up)("q-tab-panels"),ee=(0,a.up)("q-form"),oe=(0,a.up)("q-page"),te=(0,a.Q2)("ripple"),ae=(0,a.Q2)("close-popup");return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a.Wm)(Q,{modelValue:e.success.showModal,"onUpdate:modelValue":o[0]||(o[0]=o=>e.success.showModal=o),transactionId:e.success.transactionId,proposalName:e.success.proposalName},null,8,["modelValue","transactionId","proposalName"]),(0,a.Wm)(oe,{padding:""},{default:(0,a.w5)((()=>[(0,a.Wm)(ee,{greedy:"",onSubmit:e.onSubmit},{default:(0,a.w5)((()=>[(0,a._)("div",l,[n,(0,a._)("div",s,[(0,a.Wm)(z,{outline:"",class:"q-mr-sm",padding:"sm md",color:"white","text-color":"primary",label:"Cancel",to:"/proposal"}),(0,a.Wm)(z,{unelevated:"",padding:"sm md",color:"primary",label:"Send proposal",type:"submit"})])]),(0,a.Wm)(T),(0,a.Wm)(Y,{flat:"",class:"q-mt-md proposal-success__card--background"},{default:(0,a.w5)((()=>[(0,a.Wm)(H,{"switch-toggle-side":"","default-opened":""},{header:(0,a.w5)((()=>[i])),default:(0,a.w5)((()=>[(0,a._)("div",r,[(0,a._)("div",c,[(0,a.Wm)(I,{modelValue:e.formData.proposal_name,"onUpdate:modelValue":o[1]||(o[1]=o=>e.formData.proposal_name=o),outlined:"",dense:"","hide-bottom-space":"","lazy-rules":"","bg-color":"white",label:"Proposal Name",maxlength:"13",rules:[e=>!!e||"Field is required",e=>/(^[a-z1-5.]{1,11}[a-z1-5]$)|(^[a-z1-5.]{12}[a-j1-5]$)/.test(e)||"Must be up to 12 characters (a-z, 1-5, .) and cannot end with a ."]},{append:(0,a.w5)((()=>[(0,a.Wm)(C,{name:"info"}),(0,a.Wm)(j,{class:"text-body2"},{default:(0,a.w5)((()=>[u])),_:1})])),_:1},8,["modelValue","rules"])]),(0,a._)("div",d,[(0,a.Wm)(I,{modelValue:e.formData.proposer,"onUpdate:modelValue":o[2]||(o[2]=o=>e.formData.proposer=o),outlined:"",dense:"","hide-bottom-space":"","lazy-rules":"",readonly:"","bg-color":"white",label:"Proposer",maxlength:"12",rules:[e=>!!e||"Field is required"]},null,8,["modelValue","rules"])])])])),_:1})])),_:1}),(0,a.Wm)(Y,{flat:"",class:"q-mt-xs proposal-success__card--background"},{default:(0,a.w5)((()=>[(0,a.Wm)(H,{"switch-toggle-side":"","default-opened":""},{header:(0,a.w5)((()=>[m])),default:(0,a.w5)((()=>[(0,a._)("div",p,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.formData.requested,((o,t)=>((0,a.wg)(),(0,a.j4)(N,{key:t,actor:o.actor,"onUpdate:actor":e=>o.actor=e,permission:o.permission,"onUpdate:permission":e=>o.permission=e,onRemove:o=>e.formData.requested.splice(t,1)},null,8,["actor","onUpdate:actor","permission","onUpdate:permission","onRemove"])))),128)),(0,a.Wm)(z,{outline:"",padding:"sm md",color:"white","text-color":"primary",label:"Add",onClick:o[3]||(o[3]=o=>e.formData.requested.push({actor:"",permission:""}))})]),(0,a.Wm)(T,{class:"q-my-md"}),(0,a._)("div",f,[e.blockProducers.length?(0,a.wy)(((0,a.wg)(),(0,a.j4)(F,{key:0,tag:"label"},{default:(0,a.w5)((()=>[(0,a.Wm)(M,{side:"",top:""},{default:(0,a.w5)((()=>[(0,a.Wm)(O,{modelValue:e.areBlockProducersApproving,"onUpdate:modelValue":o[4]||(o[4]=o=>e.areBlockProducersApproving=o)},null,8,["modelValue"])])),_:1}),(0,a.Wm)(M,null,{default:(0,a.w5)((()=>[v])),_:1})])),_:1})),[[te]]):(0,a.kq)("",!0)])])),_:1})])),_:1}),(0,a.Wm)(Y,{flat:"",class:"q-mt-xs proposal-success__card--background"},{default:(0,a.w5)((()=>[(0,a.Wm)(H,{"switch-toggle-side":""},{header:(0,a.w5)((()=>[h])),default:(0,a.w5)((()=>[(0,a._)("div",w,[(0,a._)("div",_,[(0,a.Wm)(I,{modelValue:e.formData.trx.max_net_usage_words,"onUpdate:modelValue":o[5]||(o[5]=o=>e.formData.trx.max_net_usage_words=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"max_net_usage_words"},null,8,["modelValue"])]),(0,a._)("div",b,[(0,a.Wm)(I,{modelValue:e.formData.trx.max_cpu_usage_ms,"onUpdate:modelValue":o[6]||(o[6]=o=>e.formData.trx.max_cpu_usage_ms=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"max_cpu_usage_ms"},null,8,["modelValue"])]),(0,a._)("div",g,[(0,a.Wm)(I,{modelValue:e.formData.trx.delay_sec,"onUpdate:modelValue":o[7]||(o[7]=o=>e.formData.trx.delay_sec=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"delay_sec"},null,8,["modelValue"])]),(0,a._)("div",x,[(0,a.Wm)(I,{modelValue:e.context_free_actions_input,"onUpdate:modelValue":o[8]||(o[8]=o=>e.context_free_actions_input=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"context_free_actions"},null,8,["modelValue"])]),(0,a._)("div",y,[(0,a.Wm)(I,{modelValue:e.transaction_extensions_input,"onUpdate:modelValue":o[9]||(o[9]=o=>e.transaction_extensions_input=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"transaction_extensions"},null,8,["modelValue"])]),(0,a._)("div",q,[(0,a.Wm)(I,{modelValue:e.formData.trx.expiration,"onUpdate:modelValue":[o[13]||(o[13]=o=>e.formData.trx.expiration=o),e.onExpiration],outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"expiration",rules:[e=>!!e||"Field is required",e=>!isNaN(new Date(e).getTime())||"Invalid date",e=>new Date(e)>new Date||"Date must be greater than today"]},{prepend:(0,a.w5)((()=>[(0,a.Wm)(C,{class:"cursor-pointer",name:"event",size:"20px"},{default:(0,a.w5)((()=>[(0,a.Wm)(B,{cover:"cover","transition-show":"scale","transition-hide":"scale"},{default:(0,a.w5)((()=>[(0,a.Wm)(E,{modelValue:e.formData.trx.expiration,"onUpdate:modelValue":[o[11]||(o[11]=o=>e.formData.trx.expiration=o),e.onExpiration],mask:"YYYY-MM-DDTHH:mm:ss",options:e=>e>="2022/07/05"},{default:(0,a.w5)((()=>[(0,a._)("div",V,[(0,a._)("div",k,[(0,a.Wm)(I,{modelValue:e.amountOfDaysToExpire,"onUpdate:modelValue":[o[10]||(o[10]=o=>e.amountOfDaysToExpire=o),e.onAmountOfDaysToExpire],outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",type:"number",min:"1",label:"Amount of days to expire"},null,8,["modelValue","onUpdate:modelValue"])]),(0,a.wy)((0,a.Wm)(z,{flat:"",label:"Close",color:"primary"},null,512),[[ae]])])])),_:1},8,["modelValue","options","onUpdate:modelValue"])])),_:1})])),_:1})])),append:(0,a.w5)((()=>[(0,a.Wm)(C,{class:"cursor-pointer",name:"access_time",size:"20px"},{default:(0,a.w5)((()=>[(0,a.Wm)(B,{cover:"cover","transition-show":"scale","transition-hide":"scale"},{default:(0,a.w5)((()=>[(0,a.Wm)(L,{modelValue:e.formData.trx.expiration,"onUpdate:modelValue":[o[12]||(o[12]=o=>e.formData.trx.expiration=o),e.onExpiration],mask:"YYYY-MM-DDTHH:mm:ss"},{default:(0,a.w5)((()=>[(0,a._)("div",W,[(0,a.wy)((0,a.Wm)(z,{flat:"",label:"Close",color:"primary"},null,512),[[ae]])])])),_:1},8,["modelValue","onUpdate:modelValue"])])),_:1})])),_:1})])),_:1},8,["modelValue","rules","onUpdate:modelValue"])]),(0,a._)("div",D,[(0,a.Wm)(I,{modelValue:e.formData.trx.ref_block_num,"onUpdate:modelValue":o[14]||(o[14]=o=>e.formData.trx.ref_block_num=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"ref_block_num"},null,8,["modelValue"])]),(0,a._)("div",U,[(0,a.Wm)(I,{modelValue:e.formData.trx.ref_block_prefix,"onUpdate:modelValue":o[15]||(o[15]=o=>e.formData.trx.ref_block_prefix=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"ref_block_prefix"},null,8,["modelValue"])])])])),_:1})])),_:1}),((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.formData.trx.actions,((o,t)=>((0,a.wg)(),(0,a.j4)(R,{key:o.renderKey,modelValue:e.formData.trx.actions[t],"onUpdate:modelValue":o=>e.formData.trx.actions[t]=o,onRemove:o=>e.formData.trx.actions.splice(t,1)},null,8,["modelValue","onUpdate:modelValue","onRemove"])))),128)),(0,a.Wm)(Y,{class:"q-my-md"},{default:(0,a.w5)((()=>[(0,a.Wm)($,{modelValue:e.actionsTab,"onUpdate:modelValue":o[16]||(o[16]=o=>e.actionsTab=o)},{default:(0,a.w5)((()=>[(0,a.Wm)(K,{name:"one",label:"One action"}),(0,a.Wm)(K,{name:"batch",label:"Transfer in batch"})])),_:1},8,["modelValue"]),(0,a.Wm)(T),(0,a.Wm)(X,{modelValue:e.actionsTab,"onUpdate:modelValue":o[17]||(o[17]=o=>e.actionsTab=o)},{default:(0,a.w5)((()=>[(0,a.Wm)(J,{name:"one"},{default:(0,a.w5)((()=>[(0,a._)("div",Z,[(0,a.Wm)(z,{outline:"",padding:"sm md",color:"white","text-color":"primary",label:"Add action",onClick:e.onAddAction},null,8,["onClick"])])])),_:1}),(0,a.Wm)(J,{name:"batch"},{default:(0,a.w5)((()=>[(0,a.Wm)(G,{onActions:e.onUploadCSV},null,8,["onActions"])])),_:1})])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["onSubmit"])])),_:1})],64)}var S=t(60499),P=t(18910),Q=t(43878),z=t.n(Q),T=t(86970),C=t(77122),j=t.n(C);const I={class:"proposal-success__section-wrapper"},H=(0,a._)("header",{class:"q-mb-lg"},[(0,a._)("img",{class:"inline-block vertical-middle q-mr-md q-mb-md",src:j()}),(0,a._)("span",{class:"text-h4 text-white inline-block vertical-middle q-mb-md"},"Proposal sent successfully")],-1),Y={class:"text-h6 text-white q-ma-none q-mb-xl"},N=(0,a.Uk)(" Check proposal at "),O=(0,a.Uk)(" and transaction at ");function M(e,o,t,l,n,s){const i=(0,a.up)("router-link"),r=(0,a.up)("q-btn"),c=(0,a.up)("q-card-section"),u=(0,a.up)("q-card"),d=(0,a.up)("q-dialog");return(0,a.wg)(),(0,a.j4)(d,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=o=>e.value=o),maximized:""},{default:(0,a.w5)((()=>[(0,a.Wm)(u,{class:"header-support"},{default:(0,a.w5)((()=>[(0,a.Wm)(c,{class:"full-height row justify-center items-center"},{default:(0,a.w5)((()=>[(0,a._)("div",I,[H,(0,a._)("p",Y,[N,(0,a.Wm)(i,{to:"/proposal/"+e.proposalName,class:"text-primary text-white cursor-pointer"},{default:(0,a.w5)((()=>[(0,a.Uk)((0,T.zw)(e.proposalName),1)])),_:1},8,["to"]),O,(0,a.Wm)(i,{to:"/transaction/"+e.transactionId,class:"text-primary text-white cursor-pointer"},{default:(0,a.w5)((()=>[(0,a.Uk)((0,T.zw)(e.transactionId),1)])),_:1},8,["to"])]),(0,a.Wm)(r,{class:"full-width",unelevated:"",padding:"sm md",color:"primary",label:"Close and check proposal",type:"submit",to:"/proposal/"+e.proposalName},null,8,["to"])])])),_:1})])),_:1})])),_:1},8,["modelValue"])}const F=(0,a.aZ)({name:"ProposalSuccess",props:{modelValue:{type:Boolean,default:!1},transactionId:{type:String},proposalName:{type:String}},emits:["update:modelValue"],setup(e,o){const t=(0,a.Fl)({get:()=>e.modelValue,set:e=>{o.emit("update:modelValue",e)}});return{value:t}}});var E=t(11639),B=t(87743),L=t(44458),R=t(63190),K=t(68879),$=t(69984),J=t.n($);const G=(0,E.Z)(F,[["render",M]]),X=G;J()(F,"components",{QDialog:B.Z,QCard:L.Z,QCardSection:R.Z,QBtn:K.Z});const ee={class:"row q-col-gutter-md q-mb-md"},oe={class:"col-6 col-sm"},te=(0,a.Uk)("Searching..."),ae={class:"col-6 col-sm"},le=(0,a.Uk)("Searching..."),ne={key:0,class:"col-auto"},se={class:"text-body1 text-weight-bold text-center"},ie={class:"text-body2"},re={class:"text-body2 text-weight-bold q-px-md"},ce={class:"text-body2"},ue={class:"col-auto"};function de(e,o,t,l,n,s){var i,r;const c=(0,a.up)("q-item-label"),u=(0,a.up)("q-item-section"),d=(0,a.up)("q-item"),m=(0,a.up)("q-select"),p=(0,a.up)("q-icon"),f=(0,a.up)("q-separator"),v=(0,a.up)("q-card-section"),h=(0,a.up)("q-card"),w=(0,a.up)("q-popup-proxy"),_=(0,a.up)("q-btn");return(0,a.wg)(),(0,a.iD)("div",ee,[(0,a._)("div",oe,[(0,a.Wm)(m,{outlined:"",dense:"","use-input":"","hide-selected":"","fill-input":"","hide-bottom-space":"","reactive-rules":"","bg-color":"white",label:"Actor",loading:e.isLoading,"model-value":e.actorValue,options:e.actorsOptions,rules:[e=>!!e||"Field is required",o=>e.isLoading||e.actorsOptions.includes(o)||"Field invalid"],error:e.isActorError,onInputValue:o[0]||(o[0]=o=>e.actorValue=o)},{"no-option":(0,a.w5)((()=>[(0,a.Wm)(d,null,{default:(0,a.w5)((()=>[(0,a.Wm)(u,{class:"text-center"},{default:(0,a.w5)((()=>[e.isLoading?((0,a.wg)(),(0,a.j4)(c,{key:0},{default:(0,a.w5)((()=>[te])),_:1})):((0,a.wg)(),(0,a.j4)(c,{key:1},{default:(0,a.w5)((()=>[(0,a.Uk)((0,T.zw)(e.actor?"Nothing found":"Search by actor"),1)])),_:1}))])),_:1})])),_:1})])),_:1},8,["loading","model-value","options","rules","error"])]),(0,a._)("div",ae,[(0,a.Wm)(m,{modelValue:e.permissionValue,"onUpdate:modelValue":o[1]||(o[1]=o=>e.permissionValue=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"Permission",loading:e.isLoading,options:e.permissionsOptions,rules:[e=>!!e||"Field is required"]},{"no-option":(0,a.w5)((()=>[(0,a.Wm)(d,null,{default:(0,a.w5)((()=>[(0,a.Wm)(u,{class:"text-center"},{default:(0,a.w5)((()=>[e.isLoading?((0,a.wg)(),(0,a.j4)(c,{key:0},{default:(0,a.w5)((()=>[le])),_:1})):((0,a.wg)(),(0,a.j4)(c,{key:1},{default:(0,a.w5)((()=>[(0,a.Uk)((0,T.zw)(e.actor?"Nothing found":"Search by actor before"),1)])),_:1}))])),_:1})])),_:1})])),_:1},8,["modelValue","loading","options","rules"])]),(null===(r=null===(i=e.requiredAccounts)||void 0===i?void 0:i.accounts)||void 0===r?void 0:r.length)>0?((0,a.wg)(),(0,a.iD)("div",ne,[(0,a.Wm)(_,{flat:"",padding:"sm md",color:"white","text-color":"primary",title:"Required accounts"},{default:(0,a.w5)((()=>[(0,a.Wm)(p,{class:"cursor-pointer",name:"people",size:"20px"}),(0,a.Wm)(w,{"transition-show":"scale","transition-hide":"scale"},{default:(0,a.w5)((()=>[(0,a.Wm)(h,null,{default:(0,a.w5)((()=>[(0,a.Wm)(v,null,{default:(0,a.w5)((()=>[(0,a._)("div",se,(0,T.zw)(e.requiredAccounts.permissionName)+" ("+(0,T.zw)(e.requiredAccounts.threshold)+")",1),(0,a.Wm)(f,{class:"q-my-sm"}),(0,a._)("table",null,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.requiredAccounts.accounts,((e,o)=>((0,a.wg)(),(0,a.iD)("tr",{key:o,class:"q-pb-xs"},[(0,a._)("td",ie,(0,T.zw)(e.weight),1),(0,a._)("td",re,(0,T.zw)(e.actor),1),(0,a._)("td",ce,(0,T.zw)(e.permission),1)])))),128))])])),_:1})])),_:1})])),_:1})])),_:1})])):(0,a.kq)("",!0),(0,a._)("div",ue,[(0,a.Wm)(_,{outline:"",padding:"sm md",color:"white","text-color":"primary",label:"Remove",disabled:e.disabledRemoveButton,onClick:o[2]||(o[2]=o=>e.$emit("remove"))},null,8,["disabled"])])])}var me=t(21889),pe=function(e,o,t,a){function l(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,n){function s(e){try{r(a.next(e))}catch(o){n(o)}}function i(e){try{r(a["throw"](e))}catch(o){n(o)}}function r(e){e.done?t(e.value):l(e.value).then(s,i)}r((a=a.apply(e,o||[])).next())}))};const fe=(0,a.aZ)({name:"ProposalAuthorization",props:{actor:{type:String,default:""},permission:{type:String,default:""},disabledRemoveButton:{type:Boolean,default:!1}},emits:["update:actor","update:permission","remove"],setup(e,o){const t=(0,S.iH)([]),l=(0,S.iH)([]),n=(0,S.iH)([]),s=(0,S.iH)(!1),i=(0,S.iH)(!1),r=(0,S.iH)(null),c=(0,a.Fl)({get:()=>e.actor,set:e=>{o.emit("update:actor",e)}}),u=(0,a.Fl)({get:()=>e.permission,set:e=>{o.emit("update:permission",e)}});function d(e){return pe(this,void 0,void 0,(function*(){try{const a=yield me.h.getTableByScope({code:"eosio",limit:5,lower_bound:e,table:"userres",upper_bound:e.padEnd(12,"z")});if(a.length>0){"eosio".includes(e)&&t.value.push("eosio"),a.forEach((e=>{t.value.push(e.payer)}));const s=yield me.h.getAccount(e);"undefined"!==typeof s&&(n.value=s.permissions.map((e=>({permissionName:e.perm_name,threshold:e.required_auth.threshold,accounts:e.required_auth.accounts.map((e=>({weight:`+ ${e.weight.toString()}`,actor:e.permission.actor,permission:e.permission.permission})))}))),l.value=s.permissions.map((e=>e.perm_name)),o.emit("update:permission",l.value[0]))}else s.value=!0}catch(a){s.value=!0,o.emit("update:permission","")}}))}(0,a.bv)((()=>pe(this,void 0,void 0,(function*(){e.actor&&(yield d(e.actor))})))),(0,a.YP)(c,(e=>{if(i.value=!0,s.value=!1,r.value&&clearTimeout(r.value),""===e)return t.value=[],i.value=!1,void o.emit("update:permission","");r.value=setTimeout((()=>{r.value=null}),1e3)})),(0,a.YP)(r,(o=>pe(this,void 0,void 0,(function*(){if(o)return;const a=e.actor.toLowerCase();t.value=[],yield d(a),i.value=!1}))));const m=(0,a.Fl)((()=>u.value?n.value.find((e=>e.permissionName.toString()===u.value)):null));return{actorValue:c,permissionValue:u,isActorError:s,requiredAccounts:m,actorsOptions:t,permissionsOptions:l,isLoading:i}}});var ve=t(32259),he=t(490),we=t(76749),_e=t(33115),be=t(22857),ge=t(52765),xe=t(50926);const ye=(0,E.Z)(fe,[["render",de]]),qe=ye;J()(fe,"components",{QSelect:ve.Z,QItem:he.Z,QItemSection:we.Z,QItemLabel:_e.Z,QBtn:K.Z,QIcon:be.Z,QPopupProxy:ge.Z,QCard:L.Z,QCardSection:R.Z,QSeparator:xe.Z});var Ve=t(61957);const ke={class:"proposal-action__header full-width row items-center justify-between"},We={class:"col-auto"},De={class:"text-h6 text-weight-regular"},Ue={class:"col-auto"},Ze={class:"q-pa-md"},Ae={class:"row q-col-gutter-md q-mb-md"},Se={class:"col-6"},Pe={key:0,class:"col-6"},Qe=(0,a.Uk)("No option"),ze={key:1,class:"row q-col-gutter-md"},Te=(0,a._)("p",{class:"text-body1 q-my-md q-mb-none"},"Authorization",-1);function Ce(e,o,t,l,n,s){const i=(0,a.up)("q-btn"),r=(0,a.up)("q-input"),c=(0,a.up)("q-item-label"),u=(0,a.up)("q-item-section"),d=(0,a.up)("q-item"),m=(0,a.up)("q-select"),p=(0,a.up)("TransferAction"),f=(0,a.up)("ProposalAuthorization"),v=(0,a.up)("q-expansion-item"),h=(0,a.up)("q-card");return(0,a.wg)(),(0,a.j4)(h,{class:"q-mt-md"},{default:(0,a.w5)((()=>[(0,a.Wm)(v,{"switch-toggle-side":"","default-opened":""},{header:(0,a.w5)((()=>[(0,a._)("div",ke,[(0,a._)("div",We,[(0,a._)("span",De,(0,T.zw)(e.action.account&&e.action.name?`${e.action.account} - ${e.action.name}`:"Action"),1)]),(0,a._)("div",Ue,[(0,a.Wm)(i,{outline:"",padding:"sm md",color:"white","text-color":"primary",label:"Remove",onClick:o[0]||(o[0]=(0,Ve.iM)((o=>e.$emit("remove")),["stop"]))})])])])),default:(0,a.w5)((()=>{var t,l;return[(0,a._)("div",Ze,[(0,a._)("div",Ae,[(0,a._)("div",Se,[(0,a.Wm)(r,{modelValue:e.action.account,"onUpdate:modelValue":o[1]||(o[1]=o=>e.action.account=o),outlined:"",dense:"","hide-bottom-space":"","lazy-rules":"",label:"account",error:e.isAccountError,loading:e.isAccountLoading,rules:[e=>!!e||"Account is required"]},null,8,["modelValue","error","loading","rules"])]),e.actionOptions.length>0?((0,a.wg)(),(0,a.iD)("div",Pe,[(0,a.Wm)(m,{modelValue:e.action.name,"onUpdate:modelValue":o[2]||(o[2]=o=>e.action.name=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"Action",options:e.actionOptions,rules:[e=>!!e||"Field is required"]},{"no-option":(0,a.w5)((()=>[(0,a.Wm)(d,null,{default:(0,a.w5)((()=>[(0,a.Wm)(u,{class:"text-center"},{default:(0,a.w5)((()=>[(0,a.Wm)(c,null,{default:(0,a.w5)((()=>[Qe])),_:1})])),_:1})])),_:1})])),_:1},8,["modelValue","options","rules"])])):(0,a.kq)("",!0)]),"eosio.token"===(null===(t=e.action)||void 0===t?void 0:t.account)&&"transfer"===(null===(l=e.action)||void 0===l?void 0:l.name)?((0,a.wg)(),(0,a.j4)(p,{key:0,modelValue:e.action,"onUpdate:modelValue":o[3]||(o[3]=o=>e.action=o),fields:e.fields},null,8,["modelValue","fields"])):e.fields?((0,a.wg)(),(0,a.iD)("div",ze,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.fields,(o=>((0,a.wg)(),(0,a.iD)("div",{key:o.name,class:"col-12 col-sm-4"},[(0,a.Wm)(r,{modelValue:e.action.data[o.name],"onUpdate:modelValue":t=>e.action.data[o.name]=t,outlined:"",dense:"","hide-bottom-space":"","lazy-rules":"",label:o.name},null,8,["modelValue","onUpdate:modelValue","label"])])))),128))])):(0,a.kq)("",!0),(0,a._)("div",null,[Te,((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.action.authorization,((o,t)=>((0,a.wg)(),(0,a.j4)(f,{key:t,actor:o.actor,"onUpdate:actor":e=>o.actor=e,permission:o.permission,"onUpdate:permission":e=>o.permission=e,disabledRemoveButton:1===e.action.authorization.length,onRemove:o=>e.action.authorization.splice(t,1)},null,8,["actor","onUpdate:actor","permission","onUpdate:permission","disabledRemoveButton","onRemove"])))),128)),(0,a.Wm)(i,{outline:"",padding:"sm md",color:"white","text-color":"primary",label:"Add",onClick:o[4]||(o[4]=(0,Ve.iM)((o=>e.action.authorization.push({actor:"",permission:""})),["stop"]))})])])]})),_:1})])),_:1})}const je={key:0,class:"row q-col-gutter-md"};function Ie(e,o,t,l,n,s){const i=(0,a.up)("AccountSearch"),r=(0,a.up)("q-input");return e.fields?((0,a.wg)(),(0,a.iD)("div",je,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.fields,(o=>((0,a.wg)(),(0,a.iD)("div",{key:o.name,class:"col-12 col-sm-6"},["name"===o.type?((0,a.wg)(),(0,a.j4)(i,{key:0,modelValue:e.action.data[o.name],"onUpdate:modelValue":t=>e.action.data[o.name]=t,emitUpdateOnInput:"",outlined:"",filled:!1,"with-validation":"","remove-search-icon":"","bg-color":"white","lazy-rules":"",label:o.name},null,8,["modelValue","onUpdate:modelValue","label"])):"quantity"===o.name?((0,a.wg)(),(0,a.j4)(r,{key:1,modelValue:e.action.data[o.name],"onUpdate:modelValue":t=>e.action.data[o.name]=t,mask:e.mask,suffix:e.token,"fill-mask":"0","reverse-fill-mask":"",outlined:"",dense:"","hide-bottom-space":"","lazy-rules":"",label:o.name},null,8,["modelValue","onUpdate:modelValue","mask","suffix","label"])):((0,a.wg)(),(0,a.j4)(r,{key:2,modelValue:e.action.data[o.name],"onUpdate:modelValue":t=>e.action.data[o.name]=t,outlined:"",dense:"","hide-bottom-space":"","lazy-rules":"",label:o.name},null,8,["modelValue","onUpdate:modelValue","label"]))])))),128))])):(0,a.kq)("",!0)}var He=t(52783),Ye=t(30229);const Ne=(0,Ye.z)(),Oe=(0,a.aZ)({name:"TransferAction",components:{AccountSearch:He.Z},props:{modelValue:{type:Object},fields:{type:Object}},setup(e,o){const t=(0,S.qj)(e.modelValue),l=(0,a.Fl)((()=>{const{precision:e}=Ne.getSystemToken();let o="#";return e>0&&(o+=`.${"#".repeat(e)}`),o})),n=(0,a.Fl)((()=>Ne.getSystemToken().symbol)),s=e=>{var o;let a=Object.assign({},e);const{precision:l}=Ne.getSystemToken(),n=a.data.quantity.match(/\d+/g);let s="0",i="";(null===n||void 0===n?void 0:n.length)>0&&(s=n[0]+".",i=null!==(o=n[1])&&void 0!==o?o:""),s+=i.slice(0,l).padEnd(l,"0"),a.data.quantity=s,t.data=Object.assign({},a.data)};return(0,a.bv)((()=>{s(e.modelValue)})),(0,a.YP)((()=>e.modelValue),(e=>{s(e)})),(0,a.YP)(t,(e=>{e.data.quantity.includes(n.value)||(e.data.quantity=`${e.data.quantity} ${n.value}`),o.emit("update:modelValue",e)})),{mask:l,token:n,action:t}}});var Me=t(13119);const Fe=(0,E.Z)(Oe,[["render",Ie]]),Ee=Fe;J()(Oe,"components",{QInput:Me.Z});var Be=function(e,o,t,a){function l(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,n){function s(e){try{r(a.next(e))}catch(o){n(o)}}function i(e){try{r(a["throw"](e))}catch(o){n(o)}}function r(e){e.done?t(e.value):l(e.value).then(s,i)}r((a=a.apply(e,o||[])).next())}))};const Le=(0,a.aZ)({name:"ProposalAction",components:{ProposalAuthorization:qe,TransferAction:Ee},props:{modelValue:{type:Object}},emits:["update:modelValue","remove"],setup(e,o){const t=(0,S.iH)([]),l=(0,S.iH)(!1),n=(0,S.iH)(!1),s=(0,S.iH)(null),i=(0,a.Fl)({get:()=>e.modelValue,set:e=>{o.emit("update:modelValue",e)}});(0,a.YP)((()=>i.value.account),(e=>{l.value=!0,n.value=!1,t.value.length>0&&(t.value=[]),s.value&&clearTimeout(s.value),""!==e?s.value=setTimeout((()=>{s.value=null}),1e3):l.value=!1})),(0,a.YP)(s,(e=>Be(this,void 0,void 0,(function*(){if(e)return;const o=i.value.account.toLowerCase();try{const{abi:e}=yield me.h.getABI(o);i.value.name=e.structs[0].name,t.value=e.structs}catch(a){n.value=!0}l.value=!1})))),(0,a.bv)((()=>Be(this,void 0,void 0,(function*(){if(!e.modelValue.account||!e.modelValue.name)return;const o=e.modelValue.account.toLowerCase();try{const{abi:a}=yield me.h.getABI(o),l=a.structs.findIndex((o=>e.modelValue.name===o.name));i.value.name=a.structs[null!==l&&void 0!==l?l:0].name,t.value=a.structs}catch(a){n.value=!0}l.value=!1}))));const r=(0,a.Fl)((()=>0===t.value.length?[]:t.value.map((e=>e.name)))),c=(0,a.Fl)((()=>{if(0===t.value.length)return[];const{fields:e}=t.value.find((e=>e.name===i.value.name));return e}));return(0,a.YP)(c,(o=>{var t;const a={};for(let l=0;le.file=o),outlined:"",dense:"","hide-bottom-space":"",class:"q-mt-xs",label:"Select the CSV File",accept:".csv","max-files":"1"},{append:(0,a.w5)((()=>[null!==e.file?((0,a.wg)(),(0,a.j4)(r,{key:0,class:"cursor-pointer",name:"close",onClick:o[0]||(o[0]=(0,Ve.iM)((o=>e.file=null),["stop","prevent"]))})):(0,a.kq)("",!0)])),after:(0,a.w5)((()=>[(0,a.Wm)(i,{outline:"",padding:"sm md",color:"white","text-color":"primary",label:"Upload",disabled:null===e.file,onClick:e.handleUploadCSV},null,8,["disabled","onClick"])])),_:1},8,["modelValue"])])])}var so=t(69064),io=t.n(so),ro=t(19302),co=t(13385),uo=function(e,o,t,a){function l(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,n){function s(e){try{r(a.next(e))}catch(o){n(o)}}function i(e){try{r(a["throw"](e))}catch(o){n(o)}}function r(e){e.done?t(e.value):l(e.value).then(s,i)}r((a=a.apply(e,o||[])).next())}))};const mo=(0,a.aZ)({name:"ProposalUploadCSV",emits:["actions"],setup(e,o){const t=(0,ro.Z)(),a=(0,S.iH)(null),l=(0,co.p)().state.account.accountPermission;function n(e){t.notify({color:"negative",message:e,actions:[{label:"Dismiss",color:"white"}]})}function s(){return uo(this,void 0,void 0,(function*(){const e=yield a.value.text(),t=yield io()().fromString(e);if(0===t.length)return void n("CSV Invalid");const s=["from","to","quantity","memo"],i=Object.keys(t[0]),r=s.every((e=>i.includes(e)));if(!r||s.length!==i.length)return void n("CSV Invalid");const c=t.map((e=>({account:"eosio.token",name:"transfer",authorization:[{actor:e.from.toLowerCase(),permission:l}],data:{from:e.from.toLowerCase(),to:e.to.toLowerCase(),quantity:e.quantity,memo:e.memo}})));o.emit("actions",c),a.value=null}))}return{handleUploadCSV:s,file:a}}});var po=t(33837);const fo=(0,E.Z)(mo,[["render",no]]),vo=fo;function ho(e=12){let o="";const t="12345abcdefghijklmnopqrstuvxyz";for(let a=0;ao.state.account.accountName)),n=(0,a.Fl)((()=>o.state.account.isAuthenticated)),s=(0,S.iH)("one"),i=(0,S.iH)(7),r=(0,S.iH)([]),c=(0,S.iH)(!1),u=(0,S.iH)(""),d=(0,S.iH)(""),m=(0,S.qj)({proposalName:"",transactionId:"",showModal:!1}),p=(0,S.qj)({proposer:"",proposal_name:"",requested:[{actor:"",permission:""}],trx:{expiration:z()().add(i.value,"days").format("YYYY-MM-DDTHH:mm:ss"),ref_block_num:0,ref_block_prefix:0,max_net_usage_words:0,max_cpu_usage_ms:0,delay_sec:0,context_free_actions:[""],transaction_extensions:[""],actions:[]}});function f(e){t.notify({color:"negative",message:e,actions:[{label:"Dismiss",color:"white"}]})}function v(){var e,t,a;return _o(this,void 0,void 0,(function*(){const n=JSON.parse(JSON.stringify(p));if(c.value&&(n.requested=n.requested.concat(JSON.parse(JSON.stringify(r.value)))),0!==n.requested.length)if(0!==n.trx.actions.length){n.trx.transaction_extensions=d.value?d.value.split(","):[],n.trx.context_free_actions=u.value?u.value.split(","):[];try{for(let o=0;o{var a,l;return Object.assign(Object.assign({},e),{renderKey:(null!==(l=null===(a=p.trx.actions[o-1])||void 0===a?void 0:a.renderKey)&&void 0!==l?l:0)+1+t})}));p.trx.actions=[...p.trx.actions,...t]}return(0,a.bv)((()=>{p.proposal_name=ho(),p.proposer=l.value})),(0,a.bv)((()=>_o(this,void 0,void 0,(function*(){n.value||(yield e.push("/proposal"))})))),(0,a.bv)((()=>_o(this,void 0,void 0,(function*(){const e=yield me.h.getProducers(),t=[];for(let a=0;a{t.r(o),t.d(o,{default:()=>Qo});var a=t(59835);const l={class:"row justify-between items-center q-py-lg"},n=(0,a._)("h1",{class:"text-h5 q-ma-none"},"New Proposal Multisig Transaction",-1),s={class:"row"},i=(0,a._)("span",{class:"text-h6 text-weight-regular"},"Proposal Info",-1),r={class:"row q-col-gutter-md q-pa-md"},c={class:"col-12 col-sm-6"},u=(0,a._)("ul",{class:"q-px-lg q-py-none"},[(0,a._)("li",null,"Minimum of 2 characters"),(0,a._)("li",null,"Maximum of 13 characters"),(0,a._)("li",null,'First 12 characters can be “a-z” or “1-5" or “.”'),(0,a._)("li",null,"13th character can only be “a-j” or “1-5”"),(0,a._)("li",null,"Last character can not be “.”")],-1),d={class:"col-12 col-sm-6"},m=(0,a._)("span",{class:"text-h6 text-weight-regular"},"Requested approvals",-1),p={class:"q-pa-md"},f={class:"q-pb-md"},v=(0,a._)("span",{class:"text-body1"},"All block producers need approvals",-1),h=(0,a._)("span",{class:"text-h6 text-weight-regular"},"Advanced transaction settings",-1),w={class:"row q-col-gutter-md q-pa-md"},_={class:"col-12 col-sm-6"},b={class:"col-12 col-sm-6"},g={class:"col-12 col-sm-6"},x={class:"col-12 col-sm-6"},y={class:"col-12 col-sm-6"},q={class:"col-12 col-sm-6"},V={class:"row items-center justify-end"},k={class:"col"},W={class:"row items-center justify-end"},D={class:"col-12 col-sm-6"},U={class:"col-12 col-sm-6"},Z={class:"row justify-center items-center q-py-lg"};function A(e,o,t,A,S,P){const Q=(0,a.up)("ProposalSuccess"),z=(0,a.up)("q-btn"),T=(0,a.up)("q-separator"),C=(0,a.up)("q-icon"),j=(0,a.up)("q-tooltip"),I=(0,a.up)("q-input"),H=(0,a.up)("q-expansion-item"),Y=(0,a.up)("q-card"),N=(0,a.up)("ProposalAuthorization"),O=(0,a.up)("q-checkbox"),M=(0,a.up)("q-item-section"),F=(0,a.up)("q-item"),E=(0,a.up)("q-date"),B=(0,a.up)("q-popup-proxy"),L=(0,a.up)("q-time"),R=(0,a.up)("ProposalAction"),K=(0,a.up)("q-tab"),$=(0,a.up)("q-tabs"),J=(0,a.up)("q-tab-panel"),G=(0,a.up)("ProposalUploadCSV"),X=(0,a.up)("q-tab-panels"),ee=(0,a.up)("q-form"),oe=(0,a.up)("q-page"),te=(0,a.Q2)("ripple"),ae=(0,a.Q2)("close-popup");return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a.Wm)(Q,{modelValue:e.success.showModal,"onUpdate:modelValue":o[0]||(o[0]=o=>e.success.showModal=o),transactionId:e.success.transactionId,proposalName:e.success.proposalName},null,8,["modelValue","transactionId","proposalName"]),(0,a.Wm)(oe,{padding:""},{default:(0,a.w5)((()=>[(0,a.Wm)(ee,{greedy:"",onSubmit:e.onSubmit},{default:(0,a.w5)((()=>[(0,a._)("div",l,[n,(0,a._)("div",s,[(0,a.Wm)(z,{outline:"",class:"q-mr-sm",padding:"sm md",color:"white","text-color":"primary",label:"Cancel",to:"/proposal"}),(0,a.Wm)(z,{unelevated:"",padding:"sm md",color:"primary",label:"Send proposal",type:"submit"})])]),(0,a.Wm)(T),(0,a.Wm)(Y,{flat:"",class:"q-mt-md proposal-success__card--background"},{default:(0,a.w5)((()=>[(0,a.Wm)(H,{"switch-toggle-side":"","default-opened":""},{header:(0,a.w5)((()=>[i])),default:(0,a.w5)((()=>[(0,a._)("div",r,[(0,a._)("div",c,[(0,a.Wm)(I,{modelValue:e.formData.proposal_name,"onUpdate:modelValue":o[1]||(o[1]=o=>e.formData.proposal_name=o),outlined:"",dense:"","hide-bottom-space":"","lazy-rules":"","bg-color":"white",label:"Proposal Name",maxlength:"13",rules:[e=>!!e||"Field is required",e=>/(^[a-z1-5.]{1,11}[a-z1-5]$)|(^[a-z1-5.]{12}[a-j1-5]$)/.test(e)||"Must be up to 12 characters (a-z, 1-5, .) and cannot end with a ."]},{append:(0,a.w5)((()=>[(0,a.Wm)(C,{name:"info"}),(0,a.Wm)(j,{class:"text-body2"},{default:(0,a.w5)((()=>[u])),_:1})])),_:1},8,["modelValue","rules"])]),(0,a._)("div",d,[(0,a.Wm)(I,{modelValue:e.formData.proposer,"onUpdate:modelValue":o[2]||(o[2]=o=>e.formData.proposer=o),outlined:"",dense:"","hide-bottom-space":"","lazy-rules":"",readonly:"","bg-color":"white",label:"Proposer",maxlength:"12",rules:[e=>!!e||"Field is required"]},null,8,["modelValue","rules"])])])])),_:1})])),_:1}),(0,a.Wm)(Y,{flat:"",class:"q-mt-xs proposal-success__card--background"},{default:(0,a.w5)((()=>[(0,a.Wm)(H,{"switch-toggle-side":"","default-opened":""},{header:(0,a.w5)((()=>[m])),default:(0,a.w5)((()=>[(0,a._)("div",p,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.formData.requested,((o,t)=>((0,a.wg)(),(0,a.j4)(N,{key:t,actor:o.actor,"onUpdate:actor":e=>o.actor=e,permission:o.permission,"onUpdate:permission":e=>o.permission=e,onRemove:o=>e.formData.requested.splice(t,1)},null,8,["actor","onUpdate:actor","permission","onUpdate:permission","onRemove"])))),128)),(0,a.Wm)(z,{outline:"",padding:"sm md",color:"white","text-color":"primary",label:"Add",onClick:o[3]||(o[3]=o=>e.formData.requested.push({actor:"",permission:""}))})]),(0,a.Wm)(T,{class:"q-my-md"}),(0,a._)("div",f,[e.blockProducers.length?(0,a.wy)(((0,a.wg)(),(0,a.j4)(F,{key:0,tag:"label"},{default:(0,a.w5)((()=>[(0,a.Wm)(M,{side:"",top:""},{default:(0,a.w5)((()=>[(0,a.Wm)(O,{modelValue:e.areBlockProducersApproving,"onUpdate:modelValue":o[4]||(o[4]=o=>e.areBlockProducersApproving=o)},null,8,["modelValue"])])),_:1}),(0,a.Wm)(M,null,{default:(0,a.w5)((()=>[v])),_:1})])),_:1})),[[te]]):(0,a.kq)("",!0)])])),_:1})])),_:1}),(0,a.Wm)(Y,{flat:"",class:"q-mt-xs proposal-success__card--background"},{default:(0,a.w5)((()=>[(0,a.Wm)(H,{"switch-toggle-side":""},{header:(0,a.w5)((()=>[h])),default:(0,a.w5)((()=>[(0,a._)("div",w,[(0,a._)("div",_,[(0,a.Wm)(I,{modelValue:e.formData.trx.max_net_usage_words,"onUpdate:modelValue":o[5]||(o[5]=o=>e.formData.trx.max_net_usage_words=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"max_net_usage_words"},null,8,["modelValue"])]),(0,a._)("div",b,[(0,a.Wm)(I,{modelValue:e.formData.trx.max_cpu_usage_ms,"onUpdate:modelValue":o[6]||(o[6]=o=>e.formData.trx.max_cpu_usage_ms=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"max_cpu_usage_ms"},null,8,["modelValue"])]),(0,a._)("div",g,[(0,a.Wm)(I,{modelValue:e.formData.trx.delay_sec,"onUpdate:modelValue":o[7]||(o[7]=o=>e.formData.trx.delay_sec=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"delay_sec"},null,8,["modelValue"])]),(0,a._)("div",x,[(0,a.Wm)(I,{modelValue:e.context_free_actions_input,"onUpdate:modelValue":o[8]||(o[8]=o=>e.context_free_actions_input=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"context_free_actions"},null,8,["modelValue"])]),(0,a._)("div",y,[(0,a.Wm)(I,{modelValue:e.transaction_extensions_input,"onUpdate:modelValue":o[9]||(o[9]=o=>e.transaction_extensions_input=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"transaction_extensions"},null,8,["modelValue"])]),(0,a._)("div",q,[(0,a.Wm)(I,{modelValue:e.formData.trx.expiration,"onUpdate:modelValue":[o[13]||(o[13]=o=>e.formData.trx.expiration=o),e.onExpiration],outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"expiration",rules:[e=>!!e||"Field is required",e=>!isNaN(new Date(e).getTime())||"Invalid date",e=>new Date(e)>new Date||"Date must be greater than today"]},{prepend:(0,a.w5)((()=>[(0,a.Wm)(C,{class:"cursor-pointer",name:"event",size:"20px"},{default:(0,a.w5)((()=>[(0,a.Wm)(B,{cover:"cover","transition-show":"scale","transition-hide":"scale"},{default:(0,a.w5)((()=>[(0,a.Wm)(E,{modelValue:e.formData.trx.expiration,"onUpdate:modelValue":[o[11]||(o[11]=o=>e.formData.trx.expiration=o),e.onExpiration],mask:"YYYY-MM-DDTHH:mm:ss",options:e=>e>="2022/07/05"},{default:(0,a.w5)((()=>[(0,a._)("div",V,[(0,a._)("div",k,[(0,a.Wm)(I,{modelValue:e.amountOfDaysToExpire,"onUpdate:modelValue":[o[10]||(o[10]=o=>e.amountOfDaysToExpire=o),e.onAmountOfDaysToExpire],outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",type:"number",min:"1",label:"Amount of days to expire"},null,8,["modelValue","onUpdate:modelValue"])]),(0,a.wy)((0,a.Wm)(z,{flat:"",label:"Close",color:"primary"},null,512),[[ae]])])])),_:1},8,["modelValue","options","onUpdate:modelValue"])])),_:1})])),_:1})])),append:(0,a.w5)((()=>[(0,a.Wm)(C,{class:"cursor-pointer",name:"access_time",size:"20px"},{default:(0,a.w5)((()=>[(0,a.Wm)(B,{cover:"cover","transition-show":"scale","transition-hide":"scale"},{default:(0,a.w5)((()=>[(0,a.Wm)(L,{modelValue:e.formData.trx.expiration,"onUpdate:modelValue":[o[12]||(o[12]=o=>e.formData.trx.expiration=o),e.onExpiration],mask:"YYYY-MM-DDTHH:mm:ss"},{default:(0,a.w5)((()=>[(0,a._)("div",W,[(0,a.wy)((0,a.Wm)(z,{flat:"",label:"Close",color:"primary"},null,512),[[ae]])])])),_:1},8,["modelValue","onUpdate:modelValue"])])),_:1})])),_:1})])),_:1},8,["modelValue","rules","onUpdate:modelValue"])]),(0,a._)("div",D,[(0,a.Wm)(I,{modelValue:e.formData.trx.ref_block_num,"onUpdate:modelValue":o[14]||(o[14]=o=>e.formData.trx.ref_block_num=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"ref_block_num"},null,8,["modelValue"])]),(0,a._)("div",U,[(0,a.Wm)(I,{modelValue:e.formData.trx.ref_block_prefix,"onUpdate:modelValue":o[15]||(o[15]=o=>e.formData.trx.ref_block_prefix=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"ref_block_prefix"},null,8,["modelValue"])])])])),_:1})])),_:1}),((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.formData.trx.actions,((o,t)=>((0,a.wg)(),(0,a.j4)(R,{key:o.renderKey,modelValue:e.formData.trx.actions[t],"onUpdate:modelValue":o=>e.formData.trx.actions[t]=o,onRemove:o=>e.formData.trx.actions.splice(t,1)},null,8,["modelValue","onUpdate:modelValue","onRemove"])))),128)),(0,a.Wm)(Y,{class:"q-my-md"},{default:(0,a.w5)((()=>[(0,a.Wm)($,{modelValue:e.actionsTab,"onUpdate:modelValue":o[16]||(o[16]=o=>e.actionsTab=o)},{default:(0,a.w5)((()=>[(0,a.Wm)(K,{name:"one",label:"One action"}),(0,a.Wm)(K,{name:"batch",label:"Transfer in batch"})])),_:1},8,["modelValue"]),(0,a.Wm)(T),(0,a.Wm)(X,{modelValue:e.actionsTab,"onUpdate:modelValue":o[17]||(o[17]=o=>e.actionsTab=o)},{default:(0,a.w5)((()=>[(0,a.Wm)(J,{name:"one"},{default:(0,a.w5)((()=>[(0,a._)("div",Z,[(0,a.Wm)(z,{outline:"",padding:"sm md",color:"white","text-color":"primary",label:"Add action",onClick:e.onAddAction},null,8,["onClick"])])])),_:1}),(0,a.Wm)(J,{name:"batch"},{default:(0,a.w5)((()=>[(0,a.Wm)(G,{onActions:e.onUploadCSV},null,8,["onActions"])])),_:1})])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["onSubmit"])])),_:1})],64)}var S=t(60499),P=t(18910),Q=t(43878),z=t.n(Q),T=t(86970),C=t(77122),j=t.n(C);const I={class:"proposal-success__section-wrapper"},H=(0,a._)("header",{class:"q-mb-lg"},[(0,a._)("img",{class:"inline-block vertical-middle q-mr-md q-mb-md",src:j()}),(0,a._)("span",{class:"text-h4 text-white inline-block vertical-middle q-mb-md"},"Proposal sent successfully")],-1),Y={class:"text-h6 text-white q-ma-none q-mb-xl"},N=(0,a.Uk)(" Check proposal at "),O=(0,a.Uk)(" and transaction at ");function M(e,o,t,l,n,s){const i=(0,a.up)("router-link"),r=(0,a.up)("q-btn"),c=(0,a.up)("q-card-section"),u=(0,a.up)("q-card"),d=(0,a.up)("q-dialog");return(0,a.wg)(),(0,a.j4)(d,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=o=>e.value=o),maximized:""},{default:(0,a.w5)((()=>[(0,a.Wm)(u,{class:"header-support"},{default:(0,a.w5)((()=>[(0,a.Wm)(c,{class:"full-height row justify-center items-center"},{default:(0,a.w5)((()=>[(0,a._)("div",I,[H,(0,a._)("p",Y,[N,(0,a.Wm)(i,{to:"/proposal/"+e.proposalName,class:"text-primary text-white cursor-pointer"},{default:(0,a.w5)((()=>[(0,a.Uk)((0,T.zw)(e.proposalName),1)])),_:1},8,["to"]),O,(0,a.Wm)(i,{to:"/transaction/"+e.transactionId,class:"text-primary text-white cursor-pointer"},{default:(0,a.w5)((()=>[(0,a.Uk)((0,T.zw)(e.transactionId),1)])),_:1},8,["to"])]),(0,a.Wm)(r,{class:"full-width",unelevated:"",padding:"sm md",color:"primary",label:"Close and check proposal",type:"submit",to:"/proposal/"+e.proposalName},null,8,["to"])])])),_:1})])),_:1})])),_:1},8,["modelValue"])}const F=(0,a.aZ)({name:"ProposalSuccess",props:{modelValue:{type:Boolean,default:!1},transactionId:{type:String},proposalName:{type:String}},emits:["update:modelValue"],setup(e,o){const t=(0,a.Fl)({get:()=>e.modelValue,set:e=>{o.emit("update:modelValue",e)}});return{value:t}}});var E=t(11639),B=t(87743),L=t(44458),R=t(63190),K=t(68879),$=t(69984),J=t.n($);const G=(0,E.Z)(F,[["render",M]]),X=G;J()(F,"components",{QDialog:B.Z,QCard:L.Z,QCardSection:R.Z,QBtn:K.Z});const ee={class:"row q-col-gutter-md q-mb-md"},oe={class:"col-6 col-sm"},te=(0,a.Uk)("Searching..."),ae={class:"col-6 col-sm"},le=(0,a.Uk)("Searching..."),ne={key:0,class:"col-auto"},se={class:"text-body1 text-weight-bold text-center"},ie={class:"text-body2"},re={class:"text-body2 text-weight-bold q-px-md"},ce={class:"text-body2"},ue={class:"col-auto"};function de(e,o,t,l,n,s){var i,r;const c=(0,a.up)("q-item-label"),u=(0,a.up)("q-item-section"),d=(0,a.up)("q-item"),m=(0,a.up)("q-select"),p=(0,a.up)("q-icon"),f=(0,a.up)("q-separator"),v=(0,a.up)("q-card-section"),h=(0,a.up)("q-card"),w=(0,a.up)("q-popup-proxy"),_=(0,a.up)("q-btn");return(0,a.wg)(),(0,a.iD)("div",ee,[(0,a._)("div",oe,[(0,a.Wm)(m,{outlined:"",dense:"","use-input":"","hide-selected":"","fill-input":"","hide-bottom-space":"","reactive-rules":"","bg-color":"white",label:"Actor",loading:e.isLoading,"model-value":e.actorValue,options:e.actorsOptions,rules:[e=>!!e||"Field is required",o=>e.isLoading||e.actorsOptions.includes(o)||"Field invalid"],error:e.isActorError,onInputValue:o[0]||(o[0]=o=>e.actorValue=o)},{"no-option":(0,a.w5)((()=>[(0,a.Wm)(d,null,{default:(0,a.w5)((()=>[(0,a.Wm)(u,{class:"text-center"},{default:(0,a.w5)((()=>[e.isLoading?((0,a.wg)(),(0,a.j4)(c,{key:0},{default:(0,a.w5)((()=>[te])),_:1})):((0,a.wg)(),(0,a.j4)(c,{key:1},{default:(0,a.w5)((()=>[(0,a.Uk)((0,T.zw)(e.actor?"Nothing found":"Search by actor"),1)])),_:1}))])),_:1})])),_:1})])),_:1},8,["loading","model-value","options","rules","error"])]),(0,a._)("div",ae,[(0,a.Wm)(m,{modelValue:e.permissionValue,"onUpdate:modelValue":o[1]||(o[1]=o=>e.permissionValue=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"Permission",loading:e.isLoading,options:e.permissionsOptions,rules:[e=>!!e||"Field is required"]},{"no-option":(0,a.w5)((()=>[(0,a.Wm)(d,null,{default:(0,a.w5)((()=>[(0,a.Wm)(u,{class:"text-center"},{default:(0,a.w5)((()=>[e.isLoading?((0,a.wg)(),(0,a.j4)(c,{key:0},{default:(0,a.w5)((()=>[le])),_:1})):((0,a.wg)(),(0,a.j4)(c,{key:1},{default:(0,a.w5)((()=>[(0,a.Uk)((0,T.zw)(e.actor?"Nothing found":"Search by actor before"),1)])),_:1}))])),_:1})])),_:1})])),_:1},8,["modelValue","loading","options","rules"])]),(null===(r=null===(i=e.requiredAccounts)||void 0===i?void 0:i.accounts)||void 0===r?void 0:r.length)>0?((0,a.wg)(),(0,a.iD)("div",ne,[(0,a.Wm)(_,{flat:"",padding:"sm md",color:"white","text-color":"primary",title:"Required accounts"},{default:(0,a.w5)((()=>[(0,a.Wm)(p,{class:"cursor-pointer",name:"people",size:"20px"}),(0,a.Wm)(w,{"transition-show":"scale","transition-hide":"scale"},{default:(0,a.w5)((()=>[(0,a.Wm)(h,null,{default:(0,a.w5)((()=>[(0,a.Wm)(v,null,{default:(0,a.w5)((()=>[(0,a._)("div",se,(0,T.zw)(e.requiredAccounts.permissionName)+" ("+(0,T.zw)(e.requiredAccounts.threshold)+")",1),(0,a.Wm)(f,{class:"q-my-sm"}),(0,a._)("table",null,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.requiredAccounts.accounts,((e,o)=>((0,a.wg)(),(0,a.iD)("tr",{key:o,class:"q-pb-xs"},[(0,a._)("td",ie,(0,T.zw)(e.weight),1),(0,a._)("td",re,(0,T.zw)(e.actor),1),(0,a._)("td",ce,(0,T.zw)(e.permission),1)])))),128))])])),_:1})])),_:1})])),_:1})])),_:1})])):(0,a.kq)("",!0),(0,a._)("div",ue,[(0,a.Wm)(_,{outline:"",padding:"sm md",color:"white","text-color":"primary",label:"Remove",disabled:e.disabledRemoveButton,onClick:o[2]||(o[2]=o=>e.$emit("remove"))},null,8,["disabled"])])])}var me=t(21889),pe=function(e,o,t,a){function l(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,n){function s(e){try{r(a.next(e))}catch(o){n(o)}}function i(e){try{r(a["throw"](e))}catch(o){n(o)}}function r(e){e.done?t(e.value):l(e.value).then(s,i)}r((a=a.apply(e,o||[])).next())}))};const fe=(0,a.aZ)({name:"ProposalAuthorization",props:{actor:{type:String,default:""},permission:{type:String,default:""},disabledRemoveButton:{type:Boolean,default:!1}},emits:["update:actor","update:permission","remove"],setup(e,o){const t=(0,S.iH)([]),l=(0,S.iH)([]),n=(0,S.iH)([]),s=(0,S.iH)(!1),i=(0,S.iH)(!1),r=(0,S.iH)(null),c=(0,a.Fl)({get:()=>e.actor,set:e=>{o.emit("update:actor",e)}}),u=(0,a.Fl)({get:()=>e.permission,set:e=>{o.emit("update:permission",e)}});function d(e){return pe(this,void 0,void 0,(function*(){try{const a=yield me.h.getTableByScope({code:"eosio",limit:5,lower_bound:e,table:"userres",upper_bound:e.padEnd(12,"z")});if(a.length>0){"eosio".includes(e)&&t.value.push("eosio"),a.forEach((e=>{t.value.push(e.payer)}));const s=yield me.h.getAccount(e);"undefined"!==typeof s&&(n.value=s.permissions.map((e=>({permissionName:e.perm_name,threshold:e.required_auth.threshold,accounts:e.required_auth.accounts.map((e=>({weight:`+ ${e.weight.toString()}`,actor:e.permission.actor,permission:e.permission.permission})))}))),l.value=s.permissions.map((e=>e.perm_name)),o.emit("update:permission",l.value[0]))}else s.value=!0}catch(a){s.value=!0,o.emit("update:permission","")}}))}(0,a.bv)((()=>pe(this,void 0,void 0,(function*(){e.actor&&(yield d(e.actor))})))),(0,a.YP)(c,(e=>{if(i.value=!0,s.value=!1,r.value&&clearTimeout(r.value),""===e)return t.value=[],i.value=!1,void o.emit("update:permission","");r.value=setTimeout((()=>{r.value=null}),1e3)})),(0,a.YP)(r,(o=>pe(this,void 0,void 0,(function*(){if(o)return;const a=e.actor.toLowerCase();t.value=[],yield d(a),i.value=!1}))));const m=(0,a.Fl)((()=>u.value?n.value.find((e=>e.permissionName.toString()===u.value)):null));return{actorValue:c,permissionValue:u,isActorError:s,requiredAccounts:m,actorsOptions:t,permissionsOptions:l,isLoading:i}}});var ve=t(32259),he=t(490),we=t(76749),_e=t(33115),be=t(22857),ge=t(52765),xe=t(50926);const ye=(0,E.Z)(fe,[["render",de]]),qe=ye;J()(fe,"components",{QSelect:ve.Z,QItem:he.Z,QItemSection:we.Z,QItemLabel:_e.Z,QBtn:K.Z,QIcon:be.Z,QPopupProxy:ge.Z,QCard:L.Z,QCardSection:R.Z,QSeparator:xe.Z});var Ve=t(61957);const ke={class:"proposal-action__header full-width row items-center justify-between"},We={class:"col-auto"},De={class:"text-h6 text-weight-regular"},Ue={class:"col-auto"},Ze={class:"q-pa-md"},Ae={class:"row q-col-gutter-md q-mb-md"},Se={class:"col-6"},Pe={key:0,class:"col-6"},Qe=(0,a.Uk)("No option"),ze={key:1,class:"row q-col-gutter-md"},Te=(0,a._)("p",{class:"text-body1 q-my-md q-mb-none"},"Authorization",-1);function Ce(e,o,t,l,n,s){const i=(0,a.up)("q-btn"),r=(0,a.up)("q-input"),c=(0,a.up)("q-item-label"),u=(0,a.up)("q-item-section"),d=(0,a.up)("q-item"),m=(0,a.up)("q-select"),p=(0,a.up)("TransferAction"),f=(0,a.up)("ProposalAuthorization"),v=(0,a.up)("q-expansion-item"),h=(0,a.up)("q-card");return(0,a.wg)(),(0,a.j4)(h,{class:"q-mt-md"},{default:(0,a.w5)((()=>[(0,a.Wm)(v,{"switch-toggle-side":"","default-opened":""},{header:(0,a.w5)((()=>[(0,a._)("div",ke,[(0,a._)("div",We,[(0,a._)("span",De,(0,T.zw)(e.action.account&&e.action.name?`${e.action.account} - ${e.action.name}`:"Action"),1)]),(0,a._)("div",Ue,[(0,a.Wm)(i,{outline:"",padding:"sm md",color:"white","text-color":"primary",label:"Remove",onClick:o[0]||(o[0]=(0,Ve.iM)((o=>e.$emit("remove")),["stop"]))})])])])),default:(0,a.w5)((()=>{var t,l;return[(0,a._)("div",Ze,[(0,a._)("div",Ae,[(0,a._)("div",Se,[(0,a.Wm)(r,{modelValue:e.action.account,"onUpdate:modelValue":o[1]||(o[1]=o=>e.action.account=o),outlined:"",dense:"","hide-bottom-space":"","lazy-rules":"",label:"account",error:e.isAccountError,loading:e.isAccountLoading,rules:[e=>!!e||"Account is required"]},null,8,["modelValue","error","loading","rules"])]),e.actionOptions.length>0?((0,a.wg)(),(0,a.iD)("div",Pe,[(0,a.Wm)(m,{modelValue:e.action.name,"onUpdate:modelValue":o[2]||(o[2]=o=>e.action.name=o),outlined:"",dense:"","hide-bottom-space":"","bg-color":"white",label:"Action",options:e.actionOptions,rules:[e=>!!e||"Field is required"]},{"no-option":(0,a.w5)((()=>[(0,a.Wm)(d,null,{default:(0,a.w5)((()=>[(0,a.Wm)(u,{class:"text-center"},{default:(0,a.w5)((()=>[(0,a.Wm)(c,null,{default:(0,a.w5)((()=>[Qe])),_:1})])),_:1})])),_:1})])),_:1},8,["modelValue","options","rules"])])):(0,a.kq)("",!0)]),"eosio.token"===(null===(t=e.action)||void 0===t?void 0:t.account)&&"transfer"===(null===(l=e.action)||void 0===l?void 0:l.name)?((0,a.wg)(),(0,a.j4)(p,{key:0,modelValue:e.action,"onUpdate:modelValue":o[3]||(o[3]=o=>e.action=o),fields:e.fields},null,8,["modelValue","fields"])):e.fields?((0,a.wg)(),(0,a.iD)("div",ze,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.fields,(o=>((0,a.wg)(),(0,a.iD)("div",{key:o.name,class:"col-12 col-sm-4"},[(0,a.Wm)(r,{modelValue:e.action.data[o.name],"onUpdate:modelValue":t=>e.action.data[o.name]=t,outlined:"",dense:"","hide-bottom-space":"","lazy-rules":"",label:o.name},null,8,["modelValue","onUpdate:modelValue","label"])])))),128))])):(0,a.kq)("",!0),(0,a._)("div",null,[Te,((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.action.authorization,((o,t)=>((0,a.wg)(),(0,a.j4)(f,{key:t,actor:o.actor,"onUpdate:actor":e=>o.actor=e,permission:o.permission,"onUpdate:permission":e=>o.permission=e,disabledRemoveButton:1===e.action.authorization.length,onRemove:o=>e.action.authorization.splice(t,1)},null,8,["actor","onUpdate:actor","permission","onUpdate:permission","disabledRemoveButton","onRemove"])))),128)),(0,a.Wm)(i,{outline:"",padding:"sm md",color:"white","text-color":"primary",label:"Add",onClick:o[4]||(o[4]=(0,Ve.iM)((o=>e.action.authorization.push({actor:"",permission:""})),["stop"]))})])])]})),_:1})])),_:1})}const je={key:0,class:"row q-col-gutter-md"};function Ie(e,o,t,l,n,s){const i=(0,a.up)("AccountSearch"),r=(0,a.up)("q-input");return e.fields?((0,a.wg)(),(0,a.iD)("div",je,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.fields,(o=>((0,a.wg)(),(0,a.iD)("div",{key:o.name,class:"col-12 col-sm-6"},["name"===o.type?((0,a.wg)(),(0,a.j4)(i,{key:0,modelValue:e.action.data[o.name],"onUpdate:modelValue":t=>e.action.data[o.name]=t,emitUpdateOnInput:"",outlined:"",filled:!1,"with-validation":"","remove-search-icon":"","bg-color":"white","lazy-rules":"",label:o.name},null,8,["modelValue","onUpdate:modelValue","label"])):"quantity"===o.name?((0,a.wg)(),(0,a.j4)(r,{key:1,modelValue:e.action.data[o.name],"onUpdate:modelValue":t=>e.action.data[o.name]=t,mask:e.mask,suffix:e.token,"fill-mask":"0","reverse-fill-mask":"",outlined:"",dense:"","hide-bottom-space":"","lazy-rules":"",label:o.name},null,8,["modelValue","onUpdate:modelValue","mask","suffix","label"])):((0,a.wg)(),(0,a.j4)(r,{key:2,modelValue:e.action.data[o.name],"onUpdate:modelValue":t=>e.action.data[o.name]=t,outlined:"",dense:"","hide-bottom-space":"","lazy-rules":"",label:o.name},null,8,["modelValue","onUpdate:modelValue","label"]))])))),128))])):(0,a.kq)("",!0)}var He=t(52783),Ye=t(30229);const Ne=(0,Ye.z)(),Oe=(0,a.aZ)({name:"TransferAction",components:{AccountSearch:He.Z},props:{modelValue:{type:Object},fields:{type:Object}},setup(e,o){const t=(0,S.qj)(e.modelValue),l=(0,a.Fl)((()=>{const{precision:e}=Ne.getSystemToken();let o="#";return e>0&&(o+=`.${"#".repeat(e)}`),o})),n=(0,a.Fl)((()=>Ne.getSystemToken().symbol)),s=e=>{var o;let a=Object.assign({},e);const{precision:l}=Ne.getSystemToken(),n=a.data.quantity.match(/\d+/g);let s="0",i="";(null===n||void 0===n?void 0:n.length)>0&&(s=n[0]+".",i=null!==(o=n[1])&&void 0!==o?o:""),s+=i.slice(0,l).padEnd(l,"0"),a.data.quantity=s,t.data=Object.assign({},a.data)};return(0,a.bv)((()=>{s(e.modelValue)})),(0,a.YP)((()=>e.modelValue),(e=>{s(e)})),(0,a.YP)(t,(e=>{e.data.quantity.includes(n.value)||(e.data.quantity=`${e.data.quantity} ${n.value}`),o.emit("update:modelValue",e)})),{mask:l,token:n,action:t}}});var Me=t(13119);const Fe=(0,E.Z)(Oe,[["render",Ie]]),Ee=Fe;J()(Oe,"components",{QInput:Me.Z});var Be=function(e,o,t,a){function l(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,n){function s(e){try{r(a.next(e))}catch(o){n(o)}}function i(e){try{r(a["throw"](e))}catch(o){n(o)}}function r(e){e.done?t(e.value):l(e.value).then(s,i)}r((a=a.apply(e,o||[])).next())}))};const Le=(0,a.aZ)({name:"ProposalAction",components:{ProposalAuthorization:qe,TransferAction:Ee},props:{modelValue:{type:Object}},emits:["update:modelValue","remove"],setup(e,o){const t=(0,S.iH)([]),l=(0,S.iH)(!1),n=(0,S.iH)(!1),s=(0,S.iH)(null),i=(0,a.Fl)({get:()=>e.modelValue,set:e=>{o.emit("update:modelValue",e)}});(0,a.YP)((()=>i.value.account),(e=>{l.value=!0,n.value=!1,t.value.length>0&&(t.value=[]),s.value&&clearTimeout(s.value),""!==e?s.value=setTimeout((()=>{s.value=null}),1e3):l.value=!1})),(0,a.YP)(s,(e=>Be(this,void 0,void 0,(function*(){if(e)return;const o=i.value.account.toLowerCase();try{const{abi:e}=yield me.h.getABI(o);i.value.name=e.structs[0].name,t.value=e.structs}catch(a){n.value=!0}l.value=!1})))),(0,a.bv)((()=>Be(this,void 0,void 0,(function*(){if(!e.modelValue.account||!e.modelValue.name)return;const o=e.modelValue.account.toLowerCase();try{const{abi:a}=yield me.h.getABI(o),l=a.structs.findIndex((o=>e.modelValue.name===o.name));i.value.name=a.structs[null!==l&&void 0!==l?l:0].name,t.value=a.structs}catch(a){n.value=!0}l.value=!1}))));const r=(0,a.Fl)((()=>0===t.value.length?[]:t.value.map((e=>e.name)))),c=(0,a.Fl)((()=>{if(0===t.value.length)return[];const{fields:e}=t.value.find((e=>e.name===i.value.name));return e}));return(0,a.YP)(c,(o=>{var t;const a={};for(let l=0;le.file=o),outlined:"",dense:"","hide-bottom-space":"",class:"q-mt-xs",label:"Select the CSV File",accept:".csv","max-files":"1"},{append:(0,a.w5)((()=>[null!==e.file?((0,a.wg)(),(0,a.j4)(r,{key:0,class:"cursor-pointer",name:"close",onClick:o[0]||(o[0]=(0,Ve.iM)((o=>e.file=null),["stop","prevent"]))})):(0,a.kq)("",!0)])),after:(0,a.w5)((()=>[(0,a.Wm)(i,{outline:"",padding:"sm md",color:"white","text-color":"primary",label:"Upload",disabled:null===e.file,onClick:e.handleUploadCSV},null,8,["disabled","onClick"])])),_:1},8,["modelValue"])])])}var so=t(69064),io=t.n(so),ro=t(19302),co=t(13385),uo=function(e,o,t,a){function l(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,n){function s(e){try{r(a.next(e))}catch(o){n(o)}}function i(e){try{r(a["throw"](e))}catch(o){n(o)}}function r(e){e.done?t(e.value):l(e.value).then(s,i)}r((a=a.apply(e,o||[])).next())}))};const mo=(0,a.aZ)({name:"ProposalUploadCSV",emits:["actions"],setup(e,o){const t=(0,ro.Z)(),a=(0,S.iH)(null),l=(0,co.p)().state.account.accountPermission;function n(e){t.notify({color:"negative",message:e,actions:[{label:"Dismiss",color:"white"}]})}function s(){return uo(this,void 0,void 0,(function*(){const e=yield a.value.text(),t=yield io()().fromString(e);if(0===t.length)return void n("CSV Invalid");const s=["from","to","quantity","memo"],i=Object.keys(t[0]),r=s.every((e=>i.includes(e)));if(!r||s.length!==i.length)return void n("CSV Invalid");const c=t.map((e=>({account:"eosio.token",name:"transfer",authorization:[{actor:e.from.toLowerCase(),permission:l}],data:{from:e.from.toLowerCase(),to:e.to.toLowerCase(),quantity:e.quantity,memo:e.memo}})));o.emit("actions",c),a.value=null}))}return{handleUploadCSV:s,file:a}}});var po=t(33837);const fo=(0,E.Z)(mo,[["render",no]]),vo=fo;function ho(e=12){let o="";const t="12345abcdefghijklmnopqrstuvxyz";for(let a=0;ao.state.account.accountName)),n=(0,a.Fl)((()=>o.state.account.isAuthenticated)),s=(0,S.iH)("one"),i=(0,S.iH)(7),r=(0,S.iH)([]),c=(0,S.iH)(!1),u=(0,S.iH)(""),d=(0,S.iH)(""),m=(0,S.qj)({proposalName:"",transactionId:"",showModal:!1}),p=(0,S.qj)({proposer:"",proposal_name:"",requested:[{actor:"",permission:""}],trx:{expiration:z()().add(i.value,"days").format("YYYY-MM-DDTHH:mm:ss"),ref_block_num:0,ref_block_prefix:0,max_net_usage_words:0,max_cpu_usage_ms:0,delay_sec:0,context_free_actions:[""],transaction_extensions:[""],actions:[]}});function f(e){t.notify({color:"negative",message:e,actions:[{label:"Dismiss",color:"white"}]})}function v(){var e,t,a;return _o(this,void 0,void 0,(function*(){const n=JSON.parse(JSON.stringify(p));if(c.value&&(n.requested=n.requested.concat(JSON.parse(JSON.stringify(r.value)))),0!==n.requested.length)if(0!==n.trx.actions.length){n.trx.transaction_extensions=d.value?d.value.split(","):[],n.trx.context_free_actions=u.value?u.value.split(","):[];try{for(let o=0;o{var a,l;return Object.assign(Object.assign({},e),{renderKey:(null!==(l=null===(a=p.trx.actions[o-1])||void 0===a?void 0:a.renderKey)&&void 0!==l?l:0)+1+t})}));p.trx.actions=[...p.trx.actions,...t]}return(0,a.bv)((()=>{p.proposal_name=ho(),p.proposer=l.value})),(0,a.bv)((()=>_o(this,void 0,void 0,(function*(){n.value||(yield e.push("/proposal"))})))),(0,a.bv)((()=>_o(this,void 0,void 0,(function*(){const e=yield me.h.getProducers(),t=[];for(let a=0;a{o.r(e),o.d(e,{default:()=>Bt});var a=o(59835);function l(t,e,o,l,c,i){const s=(0,a.up)("ValidatorData");return(0,a.wg)(),(0,a.j4)(s)}var c=o(86970);const i=t=>((0,a.dD)("data-v-da825f62"),t=t(),(0,a.Cn)(),t),s={class:"q-pa-md header-support"},n={class:"row q-col-gutter-md q-pt-md container-max-width"},r={class:"col-md-8 col-sm-12 col-xs-12"},d=i((()=>(0,a._)("div",{class:"row q-pa-md text-h5 text-weight-light"},"Voting Statistics",-1))),u={class:"row q-pa-md"},p={class:"col-12"},v={class:"row q-pa-md"},m={class:"col-12"},h=i((()=>(0,a._)("div",{class:"row"},[(0,a._)("div",{class:"col-6 text-uppercase text-grey"},"Total votes"),(0,a._)("div",{class:"col-6"},[(0,a._)("div",{class:"float-right text-uppercase text-grey"},"Total Supply")])],-1))),w={class:"row"},f={class:"col-6"},g={class:"col-6"},_={class:"float-right"},y={key:0,class:"col-md-4 col-sm-12 col-xs-12"},b={class:"row full-width justify-center"},x=i((()=>(0,a._)("div",{class:"text-h6 q-py-md text-weight-regular text-grey"},"Current Vote Weight",-1))),V=(0,a.Uk)("Voting is inversley weighted and increases the more validators you vote for (up to 30)."),q={class:"row full-width justify-center text-h5"},k={class:"row full-width justify-center text-h6 q-py-md text-weight-regular text-grey"},T={class:"row full-width justify-center subtitle2 q-py-md text-weight-regular text-grey q-pt-lg"},D={class:"row full-width justify-center"},W={key:1,class:"col-md-4 col-sm-12 col-xs-12"},C={class:"column justify-center full-height"},F={class:"row"},H={class:"col-12 subtitle2 q-pb-md text-weight-regular text-grey q-pt-lg text-center"},S={class:"col-12"},Z={class:"container-max-width"};function R(t,e,o,l,i,R){const P=(0,a.up)("q-linear-progress"),E=(0,a.up)("q-card-section"),z=(0,a.up)("q-card"),j=(0,a.up)("q-tooltip"),Q=(0,a.up)("q-icon"),B=(0,a.up)("q-separator"),L=(0,a.up)("q-btn"),O=(0,a.up)("ValidatorDataTable"),I=(0,a.up)("ViewTransaction"),U=(0,a.up)("WalletModal");return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a._)("div",s,[(0,a._)("div",n,[(0,a._)("div",r,[(0,a.Wm)(z,{class:"full-height"},{default:(0,a.w5)((()=>[(0,a.Wm)(E,null,{default:(0,a.w5)((()=>[d,(0,a._)("div",u,[(0,a._)("div",p,[(0,a.Wm)(P,{class:"gradient-color q-mt-sm",size:"120px",rounded:"",value:t.votesProgress},null,8,["value"])])]),(0,a._)("div",v,[(0,a._)("div",m,[h,(0,a._)("div",w,[(0,a._)("div",f,(0,c.zw)(t.amount_voted.toLocaleString(void 0,{minimumFractionDigits:4,maximumFractionDigits:4})),1),(0,a._)("div",g,[(0,a._)("div",_,(0,c.zw)(t.supply.toLocaleString(void 0,{minimumFractionDigits:4,maximumFractionDigits:4})),1)])])])])])),_:1})])),_:1})]),t.accountValid?((0,a.wg)(),(0,a.iD)("div",y,[(0,a.Wm)(z,null,{default:(0,a.w5)((()=>[(0,a.Wm)(E,null,{default:(0,a.w5)((()=>[(0,a._)("div",b,[x,(0,a.Wm)(Q,{class:"info-icon",name:"info",color:"white",size:"20px"},{default:(0,a.w5)((()=>[(0,a.Wm)(j,{anchor:"top middle",self:"bottom middle",offset:[10,10]},{default:(0,a.w5)((()=>[V])),_:1})])),_:1})]),(0,a._)("div",q,(0,c.zw)(t.balance),1),(0,a._)("div",k,(0,c.zw)(t.account),1)])),_:1}),(0,a.Wm)(B),(0,a.Wm)(E,null,{default:(0,a.w5)((()=>[(0,a._)("div",T,"SELECTED "+(0,c.zw)(t.currentVote.length)+" BLOCK PRODUCERS",1),(0,a._)("div",D,[(0,a.Wm)(L,{class:"full-width q-pa-sm",label:"Vote for Block Producers",color:"primary",onClick:t.sendVoteTransaction},null,8,["onClick"])])])),_:1})])),_:1})])):((0,a.wg)(),(0,a.iD)("div",W,[(0,a.Wm)(z,{class:"full-height"},{default:(0,a.w5)((()=>[(0,a.Wm)(E,{class:"full-height"},{default:(0,a.w5)((()=>[(0,a._)("div",C,[(0,a._)("div",F,[(0,a._)("div",H,"SELECTED "+(0,c.zw)(t.currentVote.length)+" BLOCK PRODUCERS",1),(0,a._)("div",S,[(0,a.Wm)(L,{class:"full-width q-pa-sm",label:"Vote for Block Producers",color:"primary",onClick:t.sendVoteTransaction},null,8,["onClick"])])])])])),_:1})])),_:1})]))])]),(0,a._)("div",Z,[(0,a.Wm)(O,{ref:"ValidatorDataTable",top21pay24h:t.top21pay24h},null,8,["top21pay24h"]),(0,a.Wm)(I,{modelValue:t.openTransaction,"onUpdate:modelValue":e[0]||(e[0]=e=>t.openTransaction=e),transactionId:t.transactionId,transactionError:t.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])]),(0,a.Wm)(U,{modelValue:t.showWalletModal,"onUpdate:modelValue":e[1]||(e[1]=e=>t.showWalletModal=e)},null,8,["modelValue"])],64)}var P=o(60499);const E=t=>((0,a.dD)("data-v-1c75a1ff"),t=t(),(0,a.Cn)(),t),z={class:"vd-table q-pa-md"},j={class:"vd-table__list bp-list"},Q={class:"vd-table__list-row q-col-gutter-sm"},B={class:"vd-table__list-col col-12"},L=E((()=>(0,a._)("div",{class:"q-card-section q-pa-md text-subtitle1 text-weight-light"},[(0,a._)("div",{class:"row"},[(0,a._)("div",{class:"col-1"},"Rank"),(0,a._)("div",{class:"col-3"}," BP"),(0,a._)("div",{class:"col-2 offset-1"}," Rank"),(0,a._)("div",{class:"col-2"}," Votes"),(0,a._)("div",{class:"col-2"}," Reward 24h")])],-1))),O={class:"q-card-section"},I={class:"row"},U={class:"col-1 q-py-md"},N={class:"row items-center full-height text-h6 q-px-md"},M={class:"col-3 q-py-md"},A=["href"],$={class:"text-uppercase text-h6 text-black"},K={class:"text-body2"},Y={class:"col-2 q-py-md offset-1"},G={class:"row items-center full-height"},J={class:"col-2 q-py-md"},X={class:"row items-center full-height"},tt={class:"col-2 q-py-md"},et={class:"row items-center full-height"},ot={class:"col-1 select-box q-py-md"},at={class:"row full-selection justify-center"},lt={class:"row full-selection justify-center"};function ct(t,e,o,l,i,s){const n=(0,a.up)("q-card"),r=(0,a.up)("q-chip"),d=(0,a.up)("q-checkbox"),u=(0,a.up)("q-badge");return(0,a.wg)(),(0,a.iD)("div",z,[(0,a._)("div",j,[(0,a._)("div",Q,[(0,a._)("div",B,[(0,a.Wm)(n,{flat:""},{default:(0,a.w5)((()=>[L])),_:1})]),((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(t.producerRows,((o,l)=>((0,a.wg)(),(0,a.iD)("div",{key:l,class:"vd-table__list-col col-12"},[(0,a.Wm)(n,{class:"producer-card",flat:""},{default:(0,a.w5)((()=>[(0,a._)("div",O,[(0,a._)("div",I,[(0,a._)("div",U,[(0,a._)("div",N,(0,c.zw)(t.producerRows.indexOf(o)+1),1)]),(0,a._)("div",M,[(0,a._)("a",{class:"hover-dec",href:"/account/"+o.owner},[(0,a._)("div",$,(0,c.zw)(o.name||o.owner),1)],8,A),(0,a._)("div",K,(0,c.zw)(o.location),1)]),(0,a._)("div",Y,[(0,a._)("div",G,[t.HeadProducer===o.owner?((0,a.wg)(),(0,a.j4)(r,{key:0,square:"",color:"primary","text-color":"white",label:"Producing"})):t.producerRows.indexOf(o)+1<22?((0,a.wg)(),(0,a.j4)(r,{key:1,outline:"",square:"",color:"primary","text-color":"white",label:"Top 21"})):t.producerRows.indexOf(o)+1<43?((0,a.wg)(),(0,a.j4)(r,{key:2,outline:"",square:"",color:"primary","text-color":"white",label:"Standby"})):((0,a.wg)(),(0,a.j4)(r,{key:3,outline:"",square:"",color:"primary","text-color":"white",label:"Unpaid Standby"}))])]),(0,a._)("div",J,[(0,a._)("div",X,(0,c.zw)((o.total_votes/1e4).toLocaleString(void 0,{minimumFractionDigits:4,maximumFractionDigits:4})),1)]),(0,a._)("div",tt,[(0,a._)("div",et,(0,c.zw)((t.producerRows.indexOf(o)+1<22?t.producerPay:t.producerRows.indexOf(o)+1<43?t.producerPay/2:0).toFixed(0)+` ${t.symbol}`),1)]),(0,a._)("div",ot,[(0,a._)("div",at,[(0,a.Wm)(d,{modelValue:t.currentVote,"onUpdate:modelValue":[e[0]||(e[0]=e=>t.currentVote=e),e[1]||(e[1]=e=>t.updateVote(e))],val:o.owner,disable:!t.currentVote.includes(o.owner)&&t.currentVote.length>=30},null,8,["modelValue","val","disable"])]),(0,a._)("div",lt,[t.previousVote.includes(o.owner)?((0,a.wg)(),(0,a.j4)(u,{key:0,color:"green",label:"VOTED"})):(0,a.kq)("",!0)])])])])])),_:2},1024)])))),128))])])])}var it=o(78504),st=o(30229);const nt=(0,st.z)(),rt=30,dt=(0,a.aZ)({name:"ValidatorDataTable",props:{top21pay24h:{type:Number,required:!0}},setup(t){const e=(0,it.oR)(),o=nt.getSystemToken().symbol,l=(0,a.Fl)((()=>e.state.account.accountName)),c=(0,a.Fl)((()=>e.state.account.data.voter_info?e.state.account.data.voter_info.producers.map((t=>t.toString())):[])),i=(0,a.Fl)((()=>[...e.state.chain.producers].map((t=>t.owner)))),s=(0,a.Fl)((()=>{let t=[...e.state.account.vote];return t.forEach(((e,o)=>{i.value.includes(e)||t.splice(o,1)})),t})),n=(0,P.iH)([]),r=(0,a.Fl)((()=>e.state.chain.head_block_producer)),d=(0,a.Fl)((()=>e.state.chain.producers||[])),u=(0,a.Fl)((()=>t.top21pay24h)),p=(0,a.Fl)((()=>e.state.chain.producerSchedule)),v=(0,a.Fl)((()=>s.value.length===rt)),m=(0,P.iH)({rowsPerPage:21});function h(t){s.value.splice(Number(t),1)}function w(t,e){return`https://${t}/${e}`}function f(t){return t?`flag-icon-${t}`:""}function g(t){t.forEach(((e,o)=>{i.value.includes(e)||t.splice(o,1)})),e.commit("account/setVote",t)}function _(t){return p.value.includes(t)}return{producerRows:d,account:l,previousVote:c,HeadProducer:r,selection:n,maxSelected:v,currentVote:s,pagination:m,producerPay:u,symbol:o,updateVote:g,removeVote:h,isTop21:_,getLink:w,getFlag:f}}});var ut=o(11639),pt=o(44458),vt=o(63190),mt=o(57691),ht=o(11221),wt=o(20990),ft=o(77741),gt=o(69984),_t=o.n(gt);const yt=(0,ut.Z)(dt,[["render",ct],["__scopeId","data-v-1c75a1ff"]]),bt=yt;_t()(dt,"components",{QCard:pt.Z,QCardSection:vt.Z,QChip:mt.Z,QCheckbox:ht.Z,QBadge:wt.Z,QColor:ft.Z});var xt=o(21889),Vt=o(1546),qt=o(79870),kt=o(61753),Tt=o(90347),Dt=function(t,e,o,a){function l(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,c){function i(t){try{n(a.next(t))}catch(e){c(e)}}function s(t){try{n(a["throw"](t))}catch(e){c(e)}}function n(t){t.done?o(t.value):l(t.value).then(i,s)}n((a=a.apply(t,e||[])).next())}))};const Wt=(0,st.z)(),Ct=(0,a.aZ)({name:"ValidatorData",components:{ValidatorDataTable:bt,ViewTransaction:Vt.Z,WalletModal:qt.Z},setup(){const t=(0,it.oR)(),e=Wt.getSystemToken().symbol,o=(0,a.Fl)((()=>t.state.account.accountName)),l=(0,a.Fl)((()=>(0,Tt.xG)(p.value,2,e))),c=(0,a.Fl)((()=>t.state.chain.producers.length>42?42:t.state.chain.producers.length)),i=(0,P.iH)(""),s=(0,P.iH)([]),n=(0,a.Fl)((()=>t.state.account.vote)),r=(0,P.iH)(!1),d=(0,P.iH)(!1),u=(0,P.iH)(!1),p=(0,P.iH)(0),v=(0,P.iH)(0),m=(0,P.iH)(0),h=(0,a.Fl)((()=>o.value&&""!==o.value)),w=(0,P.iH)(t.state.account.TransactionId),f=(0,P.iH)(t.state.account.TransactionError),g=(0,P.iH)(!1),_=(0,P.iH)(!1),y=(0,P.iH)(0),b=(0,P.iH)(0),x=(0,P.iH)(0),V=(0,P.iH)(0),q=(0,P.iH)(0),k=(0,a.Fl)((()=>q.value/x.value||0));function T(){return Dt(this,void 0,void 0,(function*(){yield D(),yield F(),yield C(),yield W()}))}function D(){return Dt(this,void 0,void 0,(function*(){const t={code:"eosio",scope:"eosio",table:"voters",lower_bound:kt.Name.from(o.value),limit:1};p.value=(yield xt.h.getTableRows(t)).rows[0].last_vote_weight}))}function W(){return Dt(this,void 0,void 0,(function*(){const t=c.value<=21?2*c.value:c.value-21+42,e={code:"eosio",scope:"eosio",table:"payrate"};y.value=(yield xt.h.getTableRows(e)).rows[0].bpay_rate,b.value=y.value/1e5*x.value/365/t*2}))}function C(){return Dt(this,void 0,void 0,(function*(){const t={code:"eosio.token",scope:Wt.getSystemToken().symbol,table:"stat"};x.value=(0,Tt.sA)((yield xt.h.getTableRows(t)).rows[0].supply)}))}function F(){return Dt(this,void 0,void 0,(function*(){const t={code:"eosio",lower_bound:"eosio",table:"voters"};V.value=(yield xt.h.getTableByScope(t))[0].count;const e={code:"eosio",scope:"eosio",table:"global"};q.value=(yield xt.h.getTableRows(e)).rows[0].total_activated_stake/1e4}))}function H(){r.value=!r.value}function S(){return Dt(this,void 0,void 0,(function*(){h.value?(yield t.dispatch("account/sendVoteTransaction"),g.value=!0,yield D()):_.value=!0}))}return(0,a.YP)(c,(()=>{T()})),(0,a.bv)((()=>Dt(this,void 0,void 0,(function*(){yield T()})))),{account:o,lastUpdated:i,producerVotes:s,showCpu:r,voteChanged:d,resetFlag:u,lastWeight:p,lastStaked:v,stakedAmount:m,currentVote:n,accountValid:h,openTransaction:g,transactionId:w,transactionError:f,payrate:y,top21pay24h:b,supply:x,voters:V,amount_voted:q,votesProgress:k,balance:l,showWalletModal:_,symbol:e,toggleView:H,sendVoteTransaction:S}}});var Ft=o(8289),Ht=o(22857),St=o(46858),Zt=o(50926),Rt=o(68879);const Pt=(0,ut.Z)(Ct,[["render",R],["__scopeId","data-v-da825f62"]]),Et=Pt;_t()(Ct,"components",{QCard:pt.Z,QCardSection:vt.Z,QLinearProgress:Ft.Z,QIcon:Ht.Z,QTooltip:St.Z,QSeparator:Zt.Z,QBtn:Rt.Z,QColor:ft.Z});var zt=function(t,e,o,a){function l(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,c){function i(t){try{n(a.next(t))}catch(e){c(e)}}function s(t){try{n(a["throw"](t))}catch(e){c(e)}}function n(t){t.done?o(t.value):l(t.value).then(i,s)}n((a=a.apply(t,e||[])).next())}))};const jt=(0,a.aZ)({name:"VotePage",components:{ValidatorData:Et},setup(){const t=(0,it.oR)();(0,a.bv)((()=>zt(this,void 0,void 0,(function*(){if(!t.state.account.data.voter_info&&t.state.account.accountName){const e=yield xt.h.getAccount(t.state.account.accountName);t.commit("account/setAccountData",e)}yield t.dispatch("chain/updateBpList"),window.setInterval((()=>{t.dispatch("chain/updateBlockData")}),2e3)}))))}}),Qt=(0,ut.Z)(jt,[["render",l]]),Bt=Qt}}]); \ No newline at end of file +"use strict";(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[753],{8617:(t,e,o)=>{o.r(e),o.d(e,{default:()=>Bt});var a=o(59835);function l(t,e,o,l,c,i){const s=(0,a.up)("ValidatorData");return(0,a.wg)(),(0,a.j4)(s)}var c=o(86970);const i=t=>((0,a.dD)("data-v-da825f62"),t=t(),(0,a.Cn)(),t),s={class:"q-pa-md header-support"},n={class:"row q-col-gutter-md q-pt-md container-max-width"},r={class:"col-md-8 col-sm-12 col-xs-12"},u=i((()=>(0,a._)("div",{class:"row q-pa-md text-h5 text-weight-light"},"Voting Statistics",-1))),d={class:"row q-pa-md"},p={class:"col-12"},v={class:"row q-pa-md"},m={class:"col-12"},h=i((()=>(0,a._)("div",{class:"row"},[(0,a._)("div",{class:"col-6 text-uppercase text-grey"},"Total votes"),(0,a._)("div",{class:"col-6"},[(0,a._)("div",{class:"float-right text-uppercase text-grey"},"Total Supply")])],-1))),w={class:"row"},f={class:"col-6"},g={class:"col-6"},_={class:"float-right"},y={key:0,class:"col-md-4 col-sm-12 col-xs-12"},b={class:"row full-width justify-center"},x=i((()=>(0,a._)("div",{class:"text-h6 q-py-md text-weight-regular text-grey"},"Current Vote Weight",-1))),V=(0,a.Uk)("Voting is inversley weighted and increases the more validators you vote for (up to 30)."),q={class:"row full-width justify-center text-h5"},k={class:"row full-width justify-center text-h6 q-py-md text-weight-regular text-grey"},T={class:"row full-width justify-center subtitle2 q-py-md text-weight-regular text-grey q-pt-lg"},D={class:"row full-width justify-center"},W={key:1,class:"col-md-4 col-sm-12 col-xs-12"},C={class:"column justify-center full-height"},S={class:"row"},F={class:"col-12 subtitle2 q-pb-md text-weight-regular text-grey q-pt-lg text-center"},H={class:"col-12"},Z={class:"container-max-width"};function P(t,e,o,l,i,P){const R=(0,a.up)("q-linear-progress"),E=(0,a.up)("q-card-section"),z=(0,a.up)("q-card"),j=(0,a.up)("q-tooltip"),Q=(0,a.up)("q-icon"),B=(0,a.up)("q-separator"),L=(0,a.up)("q-btn"),O=(0,a.up)("ValidatorDataTable"),I=(0,a.up)("ViewTransaction"),U=(0,a.up)("WalletModal");return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a._)("div",s,[(0,a._)("div",n,[(0,a._)("div",r,[(0,a.Wm)(z,{class:"full-height"},{default:(0,a.w5)((()=>[(0,a.Wm)(E,null,{default:(0,a.w5)((()=>[u,(0,a._)("div",d,[(0,a._)("div",p,[(0,a.Wm)(R,{class:"gradient-color q-mt-sm",size:"120px",rounded:"",value:t.votesProgress},null,8,["value"])])]),(0,a._)("div",v,[(0,a._)("div",m,[h,(0,a._)("div",w,[(0,a._)("div",f,(0,c.zw)(t.amount_voted.toLocaleString(void 0,{minimumFractionDigits:4,maximumFractionDigits:4})),1),(0,a._)("div",g,[(0,a._)("div",_,(0,c.zw)(t.supply.toLocaleString(void 0,{minimumFractionDigits:4,maximumFractionDigits:4})),1)])])])])])),_:1})])),_:1})]),t.accountValid?((0,a.wg)(),(0,a.iD)("div",y,[(0,a.Wm)(z,null,{default:(0,a.w5)((()=>[(0,a.Wm)(E,null,{default:(0,a.w5)((()=>[(0,a._)("div",b,[x,(0,a.Wm)(Q,{class:"info-icon",name:"info",color:"white",size:"20px"},{default:(0,a.w5)((()=>[(0,a.Wm)(j,{anchor:"top middle",self:"bottom middle",offset:[10,10]},{default:(0,a.w5)((()=>[V])),_:1})])),_:1})]),(0,a._)("div",q,(0,c.zw)(t.balance),1),(0,a._)("div",k,(0,c.zw)(t.account),1)])),_:1}),(0,a.Wm)(B),(0,a.Wm)(E,null,{default:(0,a.w5)((()=>[(0,a._)("div",T,"SELECTED "+(0,c.zw)(t.currentVote.length)+" BLOCK PRODUCERS",1),(0,a._)("div",D,[(0,a.Wm)(L,{class:"full-width q-pa-sm",label:"Vote for Block Producers",color:"primary",onClick:t.sendVoteTransaction},null,8,["onClick"])])])),_:1})])),_:1})])):((0,a.wg)(),(0,a.iD)("div",W,[(0,a.Wm)(z,{class:"full-height"},{default:(0,a.w5)((()=>[(0,a.Wm)(E,{class:"full-height"},{default:(0,a.w5)((()=>[(0,a._)("div",C,[(0,a._)("div",S,[(0,a._)("div",F,"SELECTED "+(0,c.zw)(t.currentVote.length)+" BLOCK PRODUCERS",1),(0,a._)("div",H,[(0,a.Wm)(L,{class:"full-width q-pa-sm",label:"Vote for Block Producers",color:"primary",onClick:t.sendVoteTransaction},null,8,["onClick"])])])])])),_:1})])),_:1})]))])]),(0,a._)("div",Z,[(0,a.Wm)(O,{ref:"ValidatorDataTable",top21pay24h:t.top21pay24h},null,8,["top21pay24h"]),(0,a.Wm)(I,{modelValue:t.openTransaction,"onUpdate:modelValue":e[0]||(e[0]=e=>t.openTransaction=e),transactionId:t.transactionId,transactionError:t.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])]),(0,a.Wm)(U,{modelValue:t.showWalletModal,"onUpdate:modelValue":e[1]||(e[1]=e=>t.showWalletModal=e)},null,8,["modelValue"])],64)}var R=o(60499);const E=t=>((0,a.dD)("data-v-1c75a1ff"),t=t(),(0,a.Cn)(),t),z={class:"vd-table q-pa-md"},j={class:"vd-table__list bp-list"},Q={class:"vd-table__list-row q-col-gutter-sm"},B={class:"vd-table__list-col col-12"},L=E((()=>(0,a._)("div",{class:"q-card-section q-pa-md text-subtitle1 text-weight-light"},[(0,a._)("div",{class:"row"},[(0,a._)("div",{class:"col-1"},"Rank"),(0,a._)("div",{class:"col-3"}," BP"),(0,a._)("div",{class:"col-2 offset-1"}," Rank"),(0,a._)("div",{class:"col-2"}," Votes"),(0,a._)("div",{class:"col-2"}," Reward 24h")])],-1))),O={class:"q-card-section"},I={class:"row"},U={class:"col-1 q-py-md"},N={class:"row items-center full-height text-h6 q-px-md"},M={class:"col-3 q-py-md"},A=["href"],$={class:"text-uppercase text-h6 text-black"},K={class:"text-body2"},Y={class:"col-2 q-py-md offset-1"},G={class:"row items-center full-height"},J={class:"col-2 q-py-md"},X={class:"row items-center full-height"},tt={class:"col-2 q-py-md"},et={class:"row items-center full-height"},ot={class:"col-1 select-box q-py-md"},at={class:"row full-selection justify-center"},lt={class:"row full-selection justify-center"};function ct(t,e,o,l,i,s){const n=(0,a.up)("q-card"),r=(0,a.up)("q-chip"),u=(0,a.up)("q-checkbox"),d=(0,a.up)("q-badge");return(0,a.wg)(),(0,a.iD)("div",z,[(0,a._)("div",j,[(0,a._)("div",Q,[(0,a._)("div",B,[(0,a.Wm)(n,{flat:""},{default:(0,a.w5)((()=>[L])),_:1})]),((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(t.producerRows,((o,l)=>((0,a.wg)(),(0,a.iD)("div",{key:l,class:"vd-table__list-col col-12"},[(0,a.Wm)(n,{class:"producer-card",flat:""},{default:(0,a.w5)((()=>[(0,a._)("div",O,[(0,a._)("div",I,[(0,a._)("div",U,[(0,a._)("div",N,(0,c.zw)(t.producerRows.indexOf(o)+1),1)]),(0,a._)("div",M,[(0,a._)("a",{class:"hover-dec",href:"/account/"+o.owner},[(0,a._)("div",$,(0,c.zw)(o.name||o.owner),1)],8,A),(0,a._)("div",K,(0,c.zw)(o.location),1)]),(0,a._)("div",Y,[(0,a._)("div",G,[t.HeadProducer===o.owner?((0,a.wg)(),(0,a.j4)(r,{key:0,square:"",color:"primary","text-color":"white",label:"Producing"})):t.producerRows.indexOf(o)+1<22?((0,a.wg)(),(0,a.j4)(r,{key:1,outline:"",square:"",color:"primary","text-color":"white",label:"Top 21"})):t.producerRows.indexOf(o)+1<43?((0,a.wg)(),(0,a.j4)(r,{key:2,outline:"",square:"",color:"primary","text-color":"white",label:"Standby"})):((0,a.wg)(),(0,a.j4)(r,{key:3,outline:"",square:"",color:"primary","text-color":"white",label:"Unpaid Standby"}))])]),(0,a._)("div",J,[(0,a._)("div",X,(0,c.zw)((o.total_votes/1e4).toLocaleString(void 0,{minimumFractionDigits:4,maximumFractionDigits:4})),1)]),(0,a._)("div",tt,[(0,a._)("div",et,(0,c.zw)((t.producerRows.indexOf(o)+1<22?t.producerPay:t.producerRows.indexOf(o)+1<43?t.producerPay/2:0).toFixed(0)+` ${t.symbol}`),1)]),(0,a._)("div",ot,[(0,a._)("div",at,[(0,a.Wm)(u,{modelValue:t.currentVote,"onUpdate:modelValue":[e[0]||(e[0]=e=>t.currentVote=e),e[1]||(e[1]=e=>t.updateVote(e))],val:o.owner,disable:!t.currentVote.includes(o.owner)&&t.currentVote.length>=30},null,8,["modelValue","val","disable"])]),(0,a._)("div",lt,[t.previousVote.includes(o.owner)?((0,a.wg)(),(0,a.j4)(d,{key:0,color:"green",label:"VOTED"})):(0,a.kq)("",!0)])])])])])),_:2},1024)])))),128))])])])}var it=o(78504),st=o(30229);const nt=(0,st.z)(),rt=30,ut=(0,a.aZ)({name:"ValidatorDataTable",props:{top21pay24h:{type:Number,required:!0}},setup(t){const e=(0,it.useStore)(),o=nt.getSystemToken().symbol,l=(0,a.Fl)((()=>e.state.account.accountName)),c=(0,a.Fl)((()=>e.state.account.data.voter_info?e.state.account.data.voter_info.producers.map((t=>t.toString())):[])),i=(0,a.Fl)((()=>[...e.state.chain.producers].map((t=>t.owner)))),s=(0,a.Fl)((()=>{let t=[...e.state.account.vote];return t.forEach(((e,o)=>{i.value.includes(e)||t.splice(o,1)})),t})),n=(0,R.iH)([]),r=(0,a.Fl)((()=>e.state.chain.head_block_producer)),u=(0,a.Fl)((()=>e.state.chain.producers||[])),d=(0,a.Fl)((()=>t.top21pay24h)),p=(0,a.Fl)((()=>e.state.chain.producerSchedule)),v=(0,a.Fl)((()=>s.value.length===rt)),m=(0,R.iH)({rowsPerPage:21});function h(t){s.value.splice(Number(t),1)}function w(t,e){return`https://${t}/${e}`}function f(t){return t?`flag-icon-${t}`:""}function g(t){t.forEach(((e,o)=>{i.value.includes(e)||t.splice(o,1)})),e.commit("account/setVote",t)}function _(t){return p.value.includes(t)}return{producerRows:u,account:l,previousVote:c,HeadProducer:r,selection:n,maxSelected:v,currentVote:s,pagination:m,producerPay:d,symbol:o,updateVote:g,removeVote:h,isTop21:_,getLink:w,getFlag:f}}});var dt=o(11639),pt=o(44458),vt=o(63190),mt=o(57691),ht=o(11221),wt=o(20990),ft=o(77741),gt=o(69984),_t=o.n(gt);const yt=(0,dt.Z)(ut,[["render",ct],["__scopeId","data-v-1c75a1ff"]]),bt=yt;_t()(ut,"components",{QCard:pt.Z,QCardSection:vt.Z,QChip:mt.Z,QCheckbox:ht.Z,QBadge:wt.Z,QColor:ft.Z});var xt=o(21889),Vt=o(1546),qt=o(79870),kt=o(61753),Tt=o(90347),Dt=function(t,e,o,a){function l(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,c){function i(t){try{n(a.next(t))}catch(e){c(e)}}function s(t){try{n(a["throw"](t))}catch(e){c(e)}}function n(t){t.done?o(t.value):l(t.value).then(i,s)}n((a=a.apply(t,e||[])).next())}))};const Wt=(0,st.z)(),Ct=(0,a.aZ)({name:"ValidatorData",components:{ValidatorDataTable:bt,ViewTransaction:Vt.Z,WalletModal:qt.Z},setup(){const t=(0,it.useStore)(),e=Wt.getSystemToken().symbol,o=(0,a.Fl)((()=>t.state.account.accountName)),l=(0,a.Fl)((()=>(0,Tt.xG)(p.value,2,e))),c=(0,a.Fl)((()=>t.state.chain.producers.length>42?42:t.state.chain.producers.length)),i=(0,R.iH)(""),s=(0,R.iH)([]),n=(0,a.Fl)((()=>t.state.account.vote)),r=(0,R.iH)(!1),u=(0,R.iH)(!1),d=(0,R.iH)(!1),p=(0,R.iH)(0),v=(0,R.iH)(0),m=(0,R.iH)(0),h=(0,a.Fl)((()=>o.value&&""!==o.value)),w=(0,R.iH)(t.state.account.TransactionId),f=(0,R.iH)(t.state.account.TransactionError),g=(0,R.iH)(!1),_=(0,R.iH)(!1),y=(0,R.iH)(0),b=(0,R.iH)(0),x=(0,R.iH)(0),V=(0,R.iH)(0),q=(0,R.iH)(0),k=(0,a.Fl)((()=>q.value/x.value||0));function T(){return Dt(this,void 0,void 0,(function*(){yield D(),yield S(),yield C(),yield W()}))}function D(){return Dt(this,void 0,void 0,(function*(){const t={code:"eosio",scope:"eosio",table:"voters",lower_bound:kt.Name.from(o.value),limit:1};p.value=(yield xt.h.getTableRows(t)).rows[0].last_vote_weight}))}function W(){return Dt(this,void 0,void 0,(function*(){const t=c.value<=21?2*c.value:c.value-21+42,e={code:"eosio",scope:"eosio",table:"payrate"};y.value=(yield xt.h.getTableRows(e)).rows[0].bpay_rate,b.value=y.value/1e5*x.value/365/t*2}))}function C(){return Dt(this,void 0,void 0,(function*(){const t={code:"eosio.token",scope:Wt.getSystemToken().symbol,table:"stat"};x.value=(0,Tt.sA)((yield xt.h.getTableRows(t)).rows[0].supply)}))}function S(){return Dt(this,void 0,void 0,(function*(){const t={code:"eosio",lower_bound:"eosio",table:"voters"};V.value=(yield xt.h.getTableByScope(t))[0].count;const e={code:"eosio",scope:"eosio",table:"global"};q.value=(yield xt.h.getTableRows(e)).rows[0].total_activated_stake/1e4}))}function F(){r.value=!r.value}function H(){return Dt(this,void 0,void 0,(function*(){h.value?(yield t.dispatch("account/sendVoteTransaction"),g.value=!0,yield D()):_.value=!0}))}return(0,a.YP)(c,(()=>{T()})),(0,a.bv)((()=>Dt(this,void 0,void 0,(function*(){yield T()})))),{account:o,lastUpdated:i,producerVotes:s,showCpu:r,voteChanged:u,resetFlag:d,lastWeight:p,lastStaked:v,stakedAmount:m,currentVote:n,accountValid:h,openTransaction:g,transactionId:w,transactionError:f,payrate:y,top21pay24h:b,supply:x,voters:V,amount_voted:q,votesProgress:k,balance:l,showWalletModal:_,symbol:e,toggleView:F,sendVoteTransaction:H}}});var St=o(8289),Ft=o(22857),Ht=o(46858),Zt=o(50926),Pt=o(68879);const Rt=(0,dt.Z)(Ct,[["render",P],["__scopeId","data-v-da825f62"]]),Et=Rt;_t()(Ct,"components",{QCard:pt.Z,QCardSection:vt.Z,QLinearProgress:St.Z,QIcon:Ft.Z,QTooltip:Ht.Z,QSeparator:Zt.Z,QBtn:Pt.Z,QColor:ft.Z});var zt=function(t,e,o,a){function l(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,c){function i(t){try{n(a.next(t))}catch(e){c(e)}}function s(t){try{n(a["throw"](t))}catch(e){c(e)}}function n(t){t.done?o(t.value):l(t.value).then(i,s)}n((a=a.apply(t,e||[])).next())}))};const jt=(0,a.aZ)({name:"VotePage",components:{ValidatorData:Et},setup(){const t=(0,it.useStore)();(0,a.bv)((()=>zt(this,void 0,void 0,(function*(){if(!t.state.account.data.voter_info&&t.state.account.accountName){const e=yield xt.h.getAccount(t.state.account.accountName);t.commit("account/setAccountData",e)}yield t.dispatch("chain/updateBpList"),window.setInterval((()=>{t.dispatch("chain/updateBlockData")}),2e3)}))))}}),Qt=(0,dt.Z)(jt,[["render",l]]),Bt=Qt}}]); \ No newline at end of file diff --git a/dist/spa/js/793.9b1d8490.js b/dist/spa/js/793.76d1f2fe.js similarity index 88% rename from dist/spa/js/793.9b1d8490.js rename to dist/spa/js/793.76d1f2fe.js index 601ad71..1e2ac17 100644 --- a/dist/spa/js/793.9b1d8490.js +++ b/dist/spa/js/793.76d1f2fe.js @@ -1 +1 @@ -"use strict";(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[793],{98793:(e,o,t)=>{t.r(o),t.d(o,{default:()=>K});var a=t(59835);const l={class:"row justify-between items-center q-pt-lg q-pb-sm"},r=(0,a._)("h1",{class:"text-h5 q-ma-none"},"Multisig Transactions",-1),n={class:"q-py-lg"},s={class:"q-py-lg"};function p(e,o,t,p,u,i){const c=(0,a.up)("q-btn"),d=(0,a.up)("q-tab"),m=(0,a.up)("q-tabs"),b=(0,a.up)("q-separator"),v=(0,a.up)("ProposalTable"),w=(0,a.up)("q-tab-panel"),g=(0,a.up)("q-tab-panels"),y=(0,a.up)("q-page");return(0,a.wg)(),(0,a.j4)(y,{padding:"",class:"trx-table container-max-width"},{default:(0,a.w5)((()=>[(0,a._)("div",l,[r,e.isAuthenticated?((0,a.wg)(),(0,a.j4)(c,{key:0,padding:"sm md",color:"primary",label:"New proposal",to:"/proposal/new"})):(0,a.kq)("",!0)]),(0,a.Wm)(m,{modelValue:e.tab,"onUpdate:modelValue":o[0]||(o[0]=o=>e.tab=o),align:"left","active-color":"primary","content-class":"text-grey-7","no-caps":""},{default:(0,a.w5)((()=>[e.isAuthenticated?((0,a.wg)(),(0,a.j4)(d,{key:0,name:"myProposal",label:"My proposals"})):(0,a.kq)("",!0),(0,a.Wm)(d,{name:"allProposal",label:"All proposals"})])),_:1},8,["modelValue"]),(0,a.Wm)(b),(0,a.Wm)(g,{modelValue:e.tab,"onUpdate:modelValue":o[1]||(o[1]=o=>e.tab=o)},{default:(0,a.w5)((()=>[e.isAuthenticated?((0,a.wg)(),(0,a.j4)(w,{key:0,class:"q-pa-none",name:"myProposal"},{default:(0,a.w5)((()=>[(0,a._)("div",n,[(0,a.Wm)(v,{title:"Needs your signature",type:"needsYourSignature",account:e.account},null,8,["account"]),(0,a.Wm)(v,{title:"Proposals created",type:"proposalsCreated",account:e.account},null,8,["account"])])])),_:1})):(0,a.kq)("",!0),(0,a.Wm)(w,{class:"q-pa-none",name:"allProposal"},{default:(0,a.w5)((()=>[(0,a._)("div",s,[(0,a.Wm)(v,{title:"Proposals",type:"allProposals",account:e.account,blockProducers:e.blockProducers},null,8,["account","blockProducers"])])])),_:1})])),_:1},8,["modelValue"])])),_:1})}var u=t(60499),i=t(86970);const c={class:"q-table__control full-width justify-between"},d=["textContent"],m={class:"q-pt-md q-px-md"},b={key:0,class:"q-pr-md q-pb-md"},v={key:1,class:"q-pb-md"},w=(0,a._)("span",{class:"block q-mb-sm text-body3"},"Pending signature from",-1),g=(0,a.Uk)("No results"),y={class:"q-pr-md q-pb-md"},f=(0,a._)("span",{class:"q-pa-md full-width text-center text-body2"}," No proposals ",-1);function P(e,o,t,l,r,n){const s=(0,a.up)("q-toggle"),p=(0,a.up)("q-item-section"),u=(0,a.up)("q-item"),P=(0,a.up)("q-select"),q=(0,a.up)("q-btn-dropdown"),h=(0,a.up)("router-link"),k=(0,a.up)("q-td"),_=(0,a.up)("q-badge"),x=(0,a.up)("q-tr"),S=(0,a.up)("q-table");return(0,a.wg)(),(0,a.j4)(S,{pagination:e.pagination,"onUpdate:pagination":o[4]||(o[4]=o=>e.pagination=o),color:"primary",flat:"",bordered:!1,square:!0,title:e.title,"table-header-class":"text-grey-7",rows:e.rows,columns:e.columns,"row-key":"proposalName","rows-per-page-options":[20,40,80,160],onRequest:e.onRequest},{top:(0,a.w5)((()=>[(0,a._)("div",c,[(0,a._)("div",{class:"q-table__title",textContent:(0,i.zw)(e.title)},null,8,d),(0,a._)("div",null,[(0,a.Wm)(q,{modelValue:e.filterDropdown,"onUpdate:modelValue":o[3]||(o[3]=o=>e.filterDropdown=o),outlined:"outlined",flat:"",color:e.hasSomeFilterActive?"primary":"",label:e.hasSomeFilterActive?"• Filter by":"Filter by"},{default:(0,a.w5)((()=>[(0,a._)("div",m,["needsYourSignature"===e.type?((0,a.wg)(),(0,a.iD)("div",b,[(0,a.Wm)(s,{modelValue:e.isSigned,"onUpdate:modelValue":o[0]||(o[0]=o=>e.isSigned=o),label:"Already signed"},null,8,["modelValue"])])):(0,a.kq)("",!0),"allProposals"===e.type?((0,a.wg)(),(0,a.iD)("div",v,[w,(0,a.Wm)(P,{modelValue:e.blockProducer,"onUpdate:modelValue":o[1]||(o[1]=o=>e.blockProducer=o),outlined:"",dense:"","hide-bottom-space":"","hide-selected":"","fill-input":"","use-input":"",clearable:"","input-debounce":"0",label:"Block Producer",options:e.optionsBlockProducers,onFilter:e.onFilterBlockProducer},{"no-option":(0,a.w5)((()=>[(0,a.Wm)(u,null,{default:(0,a.w5)((()=>[(0,a.Wm)(p,null,{default:(0,a.w5)((()=>[g])),_:1})])),_:1})])),_:1},8,["modelValue","options","onFilter"])])):(0,a.kq)("",!0),(0,a._)("div",y,[(0,a.Wm)(s,{modelValue:e.isExecuted,"onUpdate:modelValue":o[2]||(o[2]=o=>e.isExecuted=o),label:"Inactive proposals"},null,8,["modelValue"])])])])),_:1},8,["modelValue","color","label"])])])])),"no-data":(0,a.w5)((()=>[f])),body:(0,a.w5)((e=>[(0,a.Wm)(x,{props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(k,{key:"proposalName",props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(h,{class:"text-primary cursor-pointer text-no-decoration",to:"/proposal/"+e.row.proposalName},{default:(0,a.w5)((()=>[(0,a.Uk)((0,i.zw)(e.row.proposalName),1)])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,a.Wm)(k,{key:"approvalStatus",props:e},{default:(0,a.w5)((()=>[(0,a._)("span",null,(0,i.zw)(e.row.approvalStatus),1)])),_:2},1032,["props"]),(0,a.Wm)(k,{key:"proposer",props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(h,{class:"text-primary cursor-pointer text-no-decoration",to:"/account/"+e.row.proposer},{default:(0,a.w5)((()=>[(0,a.Uk)((0,i.zw)(e.row.proposer),1)])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,a.Wm)(k,{key:"executed",props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(_,{color:e.row.executed?"green":"orange",label:e.row.executed?"EXECUTED":"NOT EXECUTED"},null,8,["color","label"])])),_:2},1032,["props"])])),_:2},1032,["props"])])),_:1},8,["pagination","title","rows","columns","onRequest"])}var q=t(19302),h=t(21889),k=function(e,o,t,a){function l(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function n(e){try{p(a.next(e))}catch(o){r(o)}}function s(e){try{p(a["throw"](e))}catch(o){r(o)}}function p(e){e.done?t(e.value):l(e.value).then(n,s)}p((a=a.apply(e,o||[])).next())}))};const _={sortBy:"desc",descending:!1,page:1,rowsPerPage:20,rowsNumber:20},x=(0,a.aZ)({name:"ProposalTable",props:{title:{type:String,required:!0},account:{type:String,required:!0},type:{type:String,required:!0},blockProducers:{type:Array}},setup(e){const o=(0,q.Z)(),t=(0,u.iH)([]),l=(0,u.iH)(_),r=(0,u.iH)(!1),n=(0,u.iH)(!1),s=(0,u.iH)(""),p=(0,u.iH)(!1),i=(0,a.Fl)((()=>r.value||n.value||s.value)),c=[{name:"proposalName",align:"left",label:"PROPOSAL NAME",field:"proposalNameSliced"},{name:"approvalStatus",align:"left",label:"APPROVAL STATUS",field:"approvalStatus"},{name:"proposer",align:"left",label:"PROPOSER",field:"proposer"}];function d(a){var p,u,i;return k(this,void 0,void 0,(function*(){const{page:c,rowsPerPage:d,sortBy:m,descending:b}=a.pagination,{account:v}=e,w="proposalsCreated"===e.type?v:"";let g="";"allProposals"===e.type&&s.value&&(g=s.value),"needsYourSignature"!==e.type||r.value||(g=v);let y="";"needsYourSignature"===e.type&&r.value&&(y=v);try{const e=yield h.h.getProposals({proposer:w,requested:g,provided:y,executed:n.value,limit:d,skip:(c-1)*d});l.value={rowsNumber:e.total.value,page:c,rowsPerPage:d,sortBy:m,descending:b},t.value=e.proposals.map((e=>{const o=`${e.provided_approvals.length}/${e.provided_approvals.length+e.requested_approvals.length}`;return{primaryKey:e.primary_key,proposalName:e.proposal_name,approvalStatus:o,proposer:e.proposer}}))}catch(f){const e=JSON.parse(JSON.stringify(f));o.notify({color:"negative",message:(null===(i=null===(u=null===(p=null===e||void 0===e?void 0:e.cause)||void 0===p?void 0:p.json)||void 0===u?void 0:u.error)||void 0===i?void 0:i.what)||"Unable load proposals",actions:[{label:"Dismiss",color:"white"}]})}}))}(0,a.bv)((()=>k(this,void 0,void 0,(function*(){yield d({pagination:l.value})})))),(0,a.YP)([r,n,s],(()=>k(this,void 0,void 0,(function*(){p.value=!1,l.value=_,yield d({pagination:l.value})}))));const m=(0,u.iH)(e.blockProducers);function b(o,t){t(""!==o?()=>{const t=o.toLowerCase();m.value=e.blockProducers.filter((e=>e.toLowerCase().indexOf(t)>-1))}:()=>{m.value=e.blockProducers})}return{columns:c,rows:t,pagination:l,isSigned:r,isExecuted:n,blockProducer:s,hasSomeFilterActive:i,optionsBlockProducers:m,filterDropdown:p,onRequest:d,onFilterBlockProducer:b}}});var S=t(11639),W=t(82429),Z=t(18479),T=t(23175),V=t(32259),N=t(490),A=t(76749),Q=t(31233),U=t(67220),F=t(20990),B=t(69984),E=t.n(B);const C=(0,S.Z)(x,[["render",P]]),R=C;E()(x,"components",{QTable:W.Z,QBtnDropdown:Z.Z,QToggle:T.Z,QSelect:V.Z,QItem:N.Z,QItemSection:A.Z,QTr:Q.Z,QTd:U.Z,QBadge:F.Z});var j=t(18910),D=t(78504),H=function(e,o,t,a){function l(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function n(e){try{p(a.next(e))}catch(o){r(o)}}function s(e){try{p(a["throw"](e))}catch(o){r(o)}}function p(e){e.done?t(e.value):l(e.value).then(n,s)}p((a=a.apply(e,o||[])).next())}))};const O=(0,a.aZ)({name:"ProposalPage",components:{ProposalTable:R},setup(){const e=(0,j.yj)(),o=(0,j.tv)(),t=(0,D.oR)(),l=(0,u.iH)([]),r=(0,a.Fl)((()=>t.state.account.accountName)),n=(0,a.Fl)((()=>t.state.account.isAuthenticated)),s=(0,u.iH)(e.query["tab"]||"myProposal");return(0,a.bv)((()=>{n.value||(s.value="allProposal")})),(0,a.bv)((()=>H(this,void 0,void 0,(function*(){const e=yield h.h.getProducers(),o=[];for(let t=0;t{o.push({path:o.currentRoute.value.path,query:{tab:s.value}})})),{tab:s,account:r,isAuthenticated:n,blockProducers:l}}});var Y=t(69885),z=t(68879),L=t(47817),I=t(57661),M=t(50926),J=t(89800),X=t(84106);const $=(0,S.Z)(O,[["render",p]]),K=$;E()(O,"components",{QPage:Y.Z,QBtn:z.Z,QTabs:L.Z,QTab:I.Z,QSeparator:M.Z,QTabPanels:J.Z,QTabPanel:X.Z})}}]); \ No newline at end of file +"use strict";(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[793],{98793:(e,o,t)=>{t.r(o),t.d(o,{default:()=>K});var a=t(59835);const l={class:"row justify-between items-center q-pt-lg q-pb-sm"},r=(0,a._)("h1",{class:"text-h5 q-ma-none"},"Multisig Transactions",-1),n={class:"q-py-lg"},s={class:"q-py-lg"};function p(e,o,t,p,u,i){const c=(0,a.up)("q-btn"),d=(0,a.up)("q-tab"),m=(0,a.up)("q-tabs"),b=(0,a.up)("q-separator"),v=(0,a.up)("ProposalTable"),w=(0,a.up)("q-tab-panel"),g=(0,a.up)("q-tab-panels"),y=(0,a.up)("q-page");return(0,a.wg)(),(0,a.j4)(y,{padding:"",class:"trx-table container-max-width"},{default:(0,a.w5)((()=>[(0,a._)("div",l,[r,e.isAuthenticated?((0,a.wg)(),(0,a.j4)(c,{key:0,padding:"sm md",color:"primary",label:"New proposal",to:"/proposal/new"})):(0,a.kq)("",!0)]),(0,a.Wm)(m,{modelValue:e.tab,"onUpdate:modelValue":o[0]||(o[0]=o=>e.tab=o),align:"left","active-color":"primary","content-class":"text-grey-7","no-caps":""},{default:(0,a.w5)((()=>[e.isAuthenticated?((0,a.wg)(),(0,a.j4)(d,{key:0,name:"myProposal",label:"My proposals"})):(0,a.kq)("",!0),(0,a.Wm)(d,{name:"allProposal",label:"All proposals"})])),_:1},8,["modelValue"]),(0,a.Wm)(b),(0,a.Wm)(g,{modelValue:e.tab,"onUpdate:modelValue":o[1]||(o[1]=o=>e.tab=o)},{default:(0,a.w5)((()=>[e.isAuthenticated?((0,a.wg)(),(0,a.j4)(w,{key:0,class:"q-pa-none",name:"myProposal"},{default:(0,a.w5)((()=>[(0,a._)("div",n,[(0,a.Wm)(v,{title:"Needs your signature",type:"needsYourSignature",account:e.account},null,8,["account"]),(0,a.Wm)(v,{title:"Proposals created",type:"proposalsCreated",account:e.account},null,8,["account"])])])),_:1})):(0,a.kq)("",!0),(0,a.Wm)(w,{class:"q-pa-none",name:"allProposal"},{default:(0,a.w5)((()=>[(0,a._)("div",s,[(0,a.Wm)(v,{title:"Proposals",type:"allProposals",account:e.account,blockProducers:e.blockProducers},null,8,["account","blockProducers"])])])),_:1})])),_:1},8,["modelValue"])])),_:1})}var u=t(60499),i=t(86970);const c={class:"q-table__control full-width justify-between"},d=["textContent"],m={class:"q-pt-md q-px-md"},b={key:0,class:"q-pr-md q-pb-md"},v={key:1,class:"q-pb-md"},w=(0,a._)("span",{class:"block q-mb-sm text-body3"},"Pending signature from",-1),g=(0,a.Uk)("No results"),y={class:"q-pr-md q-pb-md"},f=(0,a._)("span",{class:"q-pa-md full-width text-center text-body2"}," No proposals ",-1);function P(e,o,t,l,r,n){const s=(0,a.up)("q-toggle"),p=(0,a.up)("q-item-section"),u=(0,a.up)("q-item"),P=(0,a.up)("q-select"),q=(0,a.up)("q-btn-dropdown"),h=(0,a.up)("router-link"),k=(0,a.up)("q-td"),_=(0,a.up)("q-badge"),x=(0,a.up)("q-tr"),S=(0,a.up)("q-table");return(0,a.wg)(),(0,a.j4)(S,{pagination:e.pagination,"onUpdate:pagination":o[4]||(o[4]=o=>e.pagination=o),color:"primary",flat:"",bordered:!1,square:!0,title:e.title,"table-header-class":"text-grey-7",rows:e.rows,columns:e.columns,"row-key":"proposalName","rows-per-page-options":[20,40,80,160],onRequest:e.onRequest},{top:(0,a.w5)((()=>[(0,a._)("div",c,[(0,a._)("div",{class:"q-table__title",textContent:(0,i.zw)(e.title)},null,8,d),(0,a._)("div",null,[(0,a.Wm)(q,{modelValue:e.filterDropdown,"onUpdate:modelValue":o[3]||(o[3]=o=>e.filterDropdown=o),outlined:"outlined",flat:"",color:e.hasSomeFilterActive?"primary":"",label:e.hasSomeFilterActive?"• Filter by":"Filter by"},{default:(0,a.w5)((()=>[(0,a._)("div",m,["needsYourSignature"===e.type?((0,a.wg)(),(0,a.iD)("div",b,[(0,a.Wm)(s,{modelValue:e.isSigned,"onUpdate:modelValue":o[0]||(o[0]=o=>e.isSigned=o),label:"Already signed"},null,8,["modelValue"])])):(0,a.kq)("",!0),"allProposals"===e.type?((0,a.wg)(),(0,a.iD)("div",v,[w,(0,a.Wm)(P,{modelValue:e.blockProducer,"onUpdate:modelValue":o[1]||(o[1]=o=>e.blockProducer=o),outlined:"",dense:"","hide-bottom-space":"","hide-selected":"","fill-input":"","use-input":"",clearable:"","input-debounce":"0",label:"Block Producer",options:e.optionsBlockProducers,onFilter:e.onFilterBlockProducer},{"no-option":(0,a.w5)((()=>[(0,a.Wm)(u,null,{default:(0,a.w5)((()=>[(0,a.Wm)(p,null,{default:(0,a.w5)((()=>[g])),_:1})])),_:1})])),_:1},8,["modelValue","options","onFilter"])])):(0,a.kq)("",!0),(0,a._)("div",y,[(0,a.Wm)(s,{modelValue:e.isExecuted,"onUpdate:modelValue":o[2]||(o[2]=o=>e.isExecuted=o),label:"Inactive proposals"},null,8,["modelValue"])])])])),_:1},8,["modelValue","color","label"])])])])),"no-data":(0,a.w5)((()=>[f])),body:(0,a.w5)((e=>[(0,a.Wm)(x,{props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(k,{key:"proposalName",props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(h,{class:"text-primary cursor-pointer text-no-decoration",to:"/proposal/"+e.row.proposalName},{default:(0,a.w5)((()=>[(0,a.Uk)((0,i.zw)(e.row.proposalName),1)])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,a.Wm)(k,{key:"approvalStatus",props:e},{default:(0,a.w5)((()=>[(0,a._)("span",null,(0,i.zw)(e.row.approvalStatus),1)])),_:2},1032,["props"]),(0,a.Wm)(k,{key:"proposer",props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(h,{class:"text-primary cursor-pointer text-no-decoration",to:"/account/"+e.row.proposer},{default:(0,a.w5)((()=>[(0,a.Uk)((0,i.zw)(e.row.proposer),1)])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,a.Wm)(k,{key:"executed",props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(_,{color:e.row.executed?"green":"orange",label:e.row.executed?"EXECUTED":"NOT EXECUTED"},null,8,["color","label"])])),_:2},1032,["props"])])),_:2},1032,["props"])])),_:1},8,["pagination","title","rows","columns","onRequest"])}var q=t(19302),h=t(21889),k=function(e,o,t,a){function l(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function n(e){try{p(a.next(e))}catch(o){r(o)}}function s(e){try{p(a["throw"](e))}catch(o){r(o)}}function p(e){e.done?t(e.value):l(e.value).then(n,s)}p((a=a.apply(e,o||[])).next())}))};const _={sortBy:"desc",descending:!1,page:1,rowsPerPage:20,rowsNumber:20},x=(0,a.aZ)({name:"ProposalTable",props:{title:{type:String,required:!0},account:{type:String,required:!0},type:{type:String,required:!0},blockProducers:{type:Array}},setup(e){const o=(0,q.Z)(),t=(0,u.iH)([]),l=(0,u.iH)(_),r=(0,u.iH)(!1),n=(0,u.iH)(!1),s=(0,u.iH)(""),p=(0,u.iH)(!1),i=(0,a.Fl)((()=>r.value||n.value||s.value)),c=[{name:"proposalName",align:"left",label:"PROPOSAL NAME",field:"proposalNameSliced"},{name:"approvalStatus",align:"left",label:"APPROVAL STATUS",field:"approvalStatus"},{name:"proposer",align:"left",label:"PROPOSER",field:"proposer"}];function d(a){var p,u,i;return k(this,void 0,void 0,(function*(){const{page:c,rowsPerPage:d,sortBy:m,descending:b}=a.pagination,{account:v}=e,w="proposalsCreated"===e.type?v:"";let g="";"allProposals"===e.type&&s.value&&(g=s.value),"needsYourSignature"!==e.type||r.value||(g=v);let y="";"needsYourSignature"===e.type&&r.value&&(y=v);try{const e=yield h.h.getProposals({proposer:w,requested:g,provided:y,executed:n.value,limit:d,skip:(c-1)*d});l.value={rowsNumber:e.total.value,page:c,rowsPerPage:d,sortBy:m,descending:b},t.value=e.proposals.map((e=>{const o=`${e.provided_approvals.length}/${e.provided_approvals.length+e.requested_approvals.length}`;return{primaryKey:e.primary_key,proposalName:e.proposal_name,approvalStatus:o,proposer:e.proposer}}))}catch(f){const e=JSON.parse(JSON.stringify(f));o.notify({color:"negative",message:(null===(i=null===(u=null===(p=null===e||void 0===e?void 0:e.cause)||void 0===p?void 0:p.json)||void 0===u?void 0:u.error)||void 0===i?void 0:i.what)||"Unable load proposals",actions:[{label:"Dismiss",color:"white"}]})}}))}(0,a.bv)((()=>k(this,void 0,void 0,(function*(){yield d({pagination:l.value})})))),(0,a.YP)([r,n,s],(()=>k(this,void 0,void 0,(function*(){p.value=!1,l.value=_,yield d({pagination:l.value})}))));const m=(0,u.iH)(e.blockProducers);function b(o,t){t(""!==o?()=>{const t=o.toLowerCase();m.value=e.blockProducers.filter((e=>e.toLowerCase().indexOf(t)>-1))}:()=>{m.value=e.blockProducers})}return{columns:c,rows:t,pagination:l,isSigned:r,isExecuted:n,blockProducer:s,hasSomeFilterActive:i,optionsBlockProducers:m,filterDropdown:p,onRequest:d,onFilterBlockProducer:b}}});var S=t(11639),W=t(82429),Z=t(18479),T=t(23175),V=t(32259),N=t(490),A=t(76749),Q=t(31233),U=t(67220),F=t(20990),B=t(69984),E=t.n(B);const C=(0,S.Z)(x,[["render",P]]),j=C;E()(x,"components",{QTable:W.Z,QBtnDropdown:Z.Z,QToggle:T.Z,QSelect:V.Z,QItem:N.Z,QItemSection:A.Z,QTr:Q.Z,QTd:U.Z,QBadge:F.Z});var D=t(18910),H=t(78504),O=function(e,o,t,a){function l(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function n(e){try{p(a.next(e))}catch(o){r(o)}}function s(e){try{p(a["throw"](e))}catch(o){r(o)}}function p(e){e.done?t(e.value):l(e.value).then(n,s)}p((a=a.apply(e,o||[])).next())}))};const R=(0,a.aZ)({name:"ProposalPage",components:{ProposalTable:j},setup(){const e=(0,D.yj)(),o=(0,D.tv)(),t=(0,H.useStore)(),l=(0,u.iH)([]),r=(0,a.Fl)((()=>t.state.account.accountName)),n=(0,a.Fl)((()=>t.state.account.isAuthenticated)),s=(0,u.iH)(e.query["tab"]||"myProposal");return(0,a.bv)((()=>{n.value||(s.value="allProposal")})),(0,a.bv)((()=>O(this,void 0,void 0,(function*(){const e=yield h.h.getProducers(),o=[];for(let t=0;t{o.push({path:o.currentRoute.value.path,query:{tab:s.value}})})),{tab:s,account:r,isAuthenticated:n,blockProducers:l}}});var Y=t(69885),z=t(68879),L=t(47817),I=t(57661),M=t(50926),J=t(89800),X=t(84106);const $=(0,S.Z)(R,[["render",p]]),K=$;E()(R,"components",{QPage:Y.Z,QBtn:z.Z,QTabs:L.Z,QTab:I.Z,QSeparator:M.Z,QTabPanels:J.Z,QTabPanel:X.Z})}}]); \ No newline at end of file diff --git a/dist/spa/js/827.e1c79409.js b/dist/spa/js/827.e1c79409.js new file mode 100644 index 0000000..8746297 --- /dev/null +++ b/dist/spa/js/827.e1c79409.js @@ -0,0 +1 @@ +(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[827],{28038:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>cr});var n=a(59835);const o={class:"row col-12"},l={class:"column col-12 header-support"},s={class:"row"};function i(e,t,a,i,c,u){const r=(0,n.up)("AccountCard"),d=(0,n.up)("q-tab"),m=(0,n.up)("q-tabs"),v=(0,n.up)("TransactionsTable"),p=(0,n.up)("q-tab-panel"),g=(0,n.up)("ContractTabs"),w=(0,n.up)("TokensPanel"),h=(0,n.up)("KeysPanel"),f=(0,n.up)("BpVotes"),b=(0,n.up)("ChildrenPanel"),y=(0,n.up)("q-tab-panels");return(0,n.wg)(),(0,n.iD)("div",o,[(0,n._)("div",l,[(0,n._)("div",s,[(0,n.Wm)(r,{class:"account-card",account:e.account,tokens:e.tokenList},null,8,["account","tokens"])]),(0,n.Wm)(m,{modelValue:e.tab,"onUpdate:modelValue":t[0]||(t[0]=t=>e.tab=t),class:"account-view tabs","no-caps":""},{default:(0,n.w5)((()=>[e.accountPageSettings.hideTransactionTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(d,{key:0,name:"transactions",label:"Transactions"})),!e.accountPageSettings.hideContractsTab&&e.abi?((0,n.wg)(),(0,n.j4)(d,{key:1,name:"contract",label:"Contract"})):(0,n.kq)("",!0),e.accountPageSettings.hideTokensTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(d,{key:2,name:"tokens",label:"Tokens"})),e.accountPageSettings.hideKeysTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(d,{key:3,name:"keys",label:"Keys"})),(0,n.Wm)(d,{name:"votes",label:"Votes"}),e.accountPageSettings.hideChildrenTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(d,{key:4,name:"children",label:"Children"}))])),_:1},8,["modelValue"])]),(0,n.Wm)(y,{modelValue:e.tab,"onUpdate:modelValue":t[1]||(t[1]=t=>e.tab=t),class:"col-12"},{default:(0,n.w5)((()=>[e.accountPageSettings.hideTransactionTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(p,{key:0,name:"transactions"},{default:(0,n.w5)((()=>[(0,n.Wm)(v,{account:e.account,showTransferLabel:!0,"show-pagination-extras":!0},null,8,["account"])])),_:1})),!e.accountPageSettings.hideContractsTab&&e.abi?((0,n.wg)(),(0,n.j4)(p,{key:1,name:"contract"},{default:(0,n.w5)((()=>[(0,n.Wm)(g)])),_:1})):(0,n.kq)("",!0),e.accountPageSettings.hideTokensTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(p,{key:2,name:"tokens"},{default:(0,n.w5)((()=>[(0,n.Wm)(w,{account:e.account},null,8,["account"])])),_:1})),e.accountPageSettings.hideKeysTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(p,{key:3,name:"keys"},{default:(0,n.w5)((()=>[(0,n.Wm)(h,{account:e.account},null,8,["account"])])),_:1})),(0,n.Wm)(p,{name:"votes"},{default:(0,n.w5)((()=>[(0,n.Wm)(f,{account:e.account},null,8,["account"])])),_:1}),e.accountPageSettings.hideChildrenTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(p,{key:4,name:"children"},{default:(0,n.w5)((()=>[(0,n.Wm)(b,{account:e.account},null,8,["account"])])),_:1}))])),_:1},8,["modelValue"])])}var c=a(60499),u=a(59311),r=a(86970);const d=e=>((0,n.dD)("data-v-09a9d996"),e=e(),(0,n.Cn)(),e),m={class:"row col-12 q-my-xs justify-center text-left container-max-width"},v={class:"row col-11"},p={class:"row col-12 q-mt-lg"},g=d((()=>(0,n._)("div",null,[(0,n._)("p",{class:"panel-title"},"Tokens")],-1))),w={class:"col-12 q-mt-md tokens-container"},h={key:0},f=["src"],b=["innerHTML"],y={class:"text-bold"};function _(e,t,a,o,l,s){const i=(0,n.up)("q-space"),c=(0,n.up)("q-separator"),u=(0,n.up)("q-avatar"),d=(0,n.up)("q-item-section"),_=(0,n.up)("q-item"),k=(0,n.up)("q-card");return(0,n.wg)(),(0,n.iD)("div",m,[(0,n._)("div",v,[(0,n._)("div",p,[g,(0,n.Wm)(i)]),(0,n.Wm)(c,{class:"row col-12 q-mt-md separator"}),(0,n._)("div",w,[0===e.tokens.length?((0,n.wg)(),(0,n.iD)("div",h,"No tokens found")):(0,n.kq)("",!0),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.tokens,(e=>((0,n.wg)(),(0,n.j4)(k,{key:`${e.contract}-${e.symbol}`,class:"token-card"},{default:(0,n.w5)((()=>[(0,n.Wm)(_,null,{default:(0,n.w5)((()=>[(0,n.Wm)(d,{class:"items-center",avatar:""},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{class:"shadow-3",color:"white",size:"2.8rem"},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{size:"1.2em"},{default:(0,n.w5)((()=>[(0,n._)("img",{src:e.logo},null,8,f)])),_:2},1024)])),_:2},1024)])),_:2},1024),(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[(0,n._)("div",{innerHTML:e.contract},null,8,b),(0,n._)("div",y,(0,r.zw)(`${e.amount} ${e.symbol}`),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])])])}var k=a(21889),x=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const T=(0,n.aZ)({name:"TokensPanel",props:{account:{type:String,required:!1,default:null}},setup(e){const t=(0,c.iH)([]),a=(0,c.Vh)(e,"account"),o=e=>{const t=window.location.search,a=new URLSearchParams(t);return a.has(e)?a.get(e).split(","):[]},l=()=>x(this,void 0,void 0,(function*(){const e=yield k.h.getTokens(a.value),n=o("code"),l=o("symbol");let i=e.filter((e=>0===n.length||n.some((t=>t===e.contract)))).filter((e=>0===l.length||l.some((t=>t===e.symbol))));t.value=i.map((e=>Object.assign(Object.assign({},e),{contract:s(e.contract,"account")}))),t.value=t.value.filter((e=>null!==e.amount))})),s=(e,t)=>`${e}`;return(0,n.bv)((()=>x(this,void 0,void 0,(function*(){yield l()})))),{tokens:t,formatAccount:s,loadTokens:l}}});var q=a(11639),S=a(90136),I=a(50926),D=a(44458),C=a(490),A=a(76749),W=a(61357),V=a(69984),Z=a.n(V);const N=(0,q.Z)(T,[["render",_],["__scopeId","data-v-09a9d996"]]),z=N;Z()(T,"components",{QSpace:S.Z,QSeparator:I.Z,QCard:D.Z,QItem:C.Z,QItemSection:A.Z,QAvatar:W.Z});const M=e=>((0,n.dD)("data-v-24ab2455"),e=e(),(0,n.Cn)(),e),F={class:"row col-12 q-my-xs justify-center text-left container-max-width"},H={class:"row col-11"},R={class:"row col-12 q-mt-lg"},U=M((()=>(0,n._)("div",null,[(0,n._)("p",{class:"panel-title"},"Keys and Permissions")],-1))),Q={class:"permissions-container col-12 q-py-lg"};function j(e,t,a,o,l,s){const i=(0,n.up)("q-space"),c=(0,n.up)("q-separator"),u=(0,n.up)("PermissionCard");return(0,n.wg)(),(0,n.iD)("div",F,[(0,n._)("div",H,[(0,n._)("div",R,[U,(0,n.Wm)(i)]),(0,n.Wm)(c,{class:"row col-12 q-mt-md separator"}),(0,n._)("div",Q,[e.permission?((0,n.wg)(),(0,n.j4)(u,{key:0,class:"permissions",permission:e.permission,depth:0},null,8,["permission"])):(0,n.kq)("",!0)])])])}const L={key:0},E={class:"text-bold"},P=["innerHTML"],B={key:0};function O(e,t,a,o,l,s){const i=(0,n.up)("q-card-section"),c=(0,n.up)("KeyToggle"),u=(0,n.up)("q-card"),d=(0,n.up)("permission-card",!0);return e.permissionLocal?((0,n.wg)(),(0,n.iD)("div",L,[(0,n._)("div",{class:(0,r.C_)(["children row",e.permissionCardClass])},[(0,n._)("div",{class:(0,r.C_)(["branch column",""+(e.depth>0?"":"borderless")])},[(0,n._)("div",{class:(0,r.C_)(["col",e.branchTopClass])},null,2),(0,n._)("div",{class:(0,r.C_)(["col",e.branchBottomClass])},null,2)],2),(0,n.Wm)(u,{class:"permission-card col q-mt-md",flat:""},{default:(0,n.w5)((()=>[(0,n.Wm)(i,{horizontal:""},{default:(0,n.w5)((()=>[(0,n.Wm)(i,{class:"permission-name-section row items-center justify-center"},{default:(0,n.w5)((()=>[(0,n._)("div",E,(0,r.zw)(`${e.permissionLocal.perm_name} (${e.permissionLocal.required_auth.threshold})`),1)])),_:1}),(0,n.Wm)(i,{class:"permission-key-section"},{default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.permissionLocal.required_auth.keys,(e=>((0,n.wg)(),(0,n.iD)("div",{key:e.key.toString()},[(0,n.Wm)(c,{weight:e.weight,pubkey:e.key},null,8,["weight","pubkey"])])))),128)),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.permissionLocal.required_auth.accounts,(t=>{var a;return(0,n.wg)(),(0,n.iD)("div",{key:`${t.permission.actor}-${t.permission.permission}`},[(0,n._)("div",null,[(0,n._)("span",null,(0,r.zw)(`+${t.weight}     `),1),(0,n._)("span",{class:"text-bold",innerHTML:e.formatAccount(null===(a=t.permission.actor)||void 0===a?void 0:a.toString(),"account")},null,8,P),(0,n._)("span",null," @"+(0,r.zw)(t.permission.permission),1)])])})),128)),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.permissionLocal.required_auth.waits,(t=>((0,n.wg)(),(0,n.iD)("div",{key:`${t.wait_sec}-${t.weight}`},[(0,n._)("div",null,[(0,n._)("span",null,(0,r.zw)(`+${t.weight}     `),1),(0,n._)("span",null,(0,r.zw)(e.formatWait(t.wait_sec.value)),1)])])))),128))])),_:1}),e.permissionLocal.permission_links.length>0?((0,n.wg)(),(0,n.j4)(i,{key:0,class:"permission-action-section"},{default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.permissionLocal.permission_links,(e=>((0,n.wg)(),(0,n.iD)("div",{key:e.action},(0,r.zw)(e.code)+"::"+(0,r.zw)(e.action),1)))),128))])),_:1})):(0,n.kq)("",!0)])),_:1})])),_:1})],2),e.permission.children&&e.permission.children.length?((0,n.wg)(),(0,n.iD)("div",B,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.permissionLocal.children,((t,a)=>((0,n.wg)(),(0,n.iD)("div",{key:t.perm_name.toString()},[(0,n.Wm)(d,{class:"permission-card-wrapper",permission:t,depth:e.depth+1,isLast:a==e.permissionLocal.children.length-1},null,8,["permission","depth","isLast"])])))),128))])):(0,n.kq)("",!0)])):(0,n.kq)("",!0)}const $={class:"row q-pb-md"},Y={class:"col wrap"},G=["href"],K=(0,n.Uk)(" ");function J(e,t,a,o,l,s){const i=(0,n.up)("q-btn");return(0,n.wg)(),(0,n.iD)("div",$,[(0,n._)("div",Y,[(0,n._)("a",{class:"hover-dec",href:"/key/"+e.keyDisplay},(0,r.zw)(`+${e.weight}     ${e.keyDisplay}`),9,G),(0,n.Wm)(i,{class:"rotate-315",flat:"",round:"",color:"black",icon:"vpn_key",size:"xs",onClick:t[0]||(t[0]=t=>e.toggleKey())},{default:(0,n.w5)((()=>[K])),_:1}),(0,n.Wm)(i,{flat:"",round:"",color:"black",icon:"content_copy",size:"xs",onClick:t[1]||(t[1]=t=>e.copy(e.keyDisplay))})])])}var X=a(19302),ee=a(65054),te=a(61753);const ae=(0,n.aZ)({name:"KeyToggle",props:{pubkey:{type:te.PublicKey,required:!0},weight:{type:te.Weight,required:!0}},setup(e){const t=(0,c.iH)(e.pubkey),a=(0,c.iH)(!1),o=(0,X.Z)(),l=(0,n.Fl)((()=>a.value?t.value.toLegacyString():t.value.toString()));function s(e){(0,ee.Z)(e).then((()=>{o.notify({color:"green-4",textColor:"white",message:"Copied to clipboard",timeout:1e3})})).catch((()=>{o.notify({color:"red-8",textColor:"white",message:"Could not copy",timeout:1e3})}))}function i(){a.value=!a.value}return{keyDisplay:l,copy:s,toggleKey:i}}});var ne=a(68879);const oe=(0,q.Z)(ae,[["render",J],["__scopeId","data-v-48846258"]]),le=oe;Z()(ae,"components",{QBtn:ne.Z});var se=a(43878),ie=a.n(se);const ce=(0,n.aZ)({name:"PermissionCard",components:{KeyToggle:le},props:{permission:{type:Object,required:!0},depth:{type:Number,default:0},isLast:{type:Boolean,default:!1}},setup(e){const{depth:t,isLast:a}=(0,c.BK)(e),o=(0,n.Fl)((()=>a.value?"branch-corner":"branch-side-top")),l=(0,n.Fl)((()=>a.value?"":"branch-side")),s=(0,n.Fl)((()=>0===t.value?"owner-permission":"")),i=(0,n.Fl)((()=>{const{permission:t}=(0,c.BK)(e);return t.value})),u=(e,t)=>`${e}`,r=e=>ie().duration(e,"seconds").humanize()+" wait";return{branchTopClass:o,branchBottomClass:l,permissionCardClass:s,formatAccount:u,formatWait:r,permissionLocal:i}}});var ue=a(63190);const re=(0,q.Z)(ce,[["render",O],["__scopeId","data-v-a39da8b8"]]),de=re;Z()(ce,"components",{QCard:D.Z,QCardSection:ue.Z});var me=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const ve=(0,n.aZ)({name:"KeysPanel",components:{PermissionCard:de},props:{account:{type:String,required:!1,default:null}},setup(e){const t=(0,n.Fl)((()=>e.account)),a=(0,c.iH)(null),o=(0,X.Z)(),l=()=>me(this,void 0,void 0,(function*(){let e;try{e=yield k.h.getAccount(t.value)}catch(i){return void o.notify(`Keys for account ${t.value} not found!`)}const n=e.permissions;let l;try{l=yield k.h.getPermissionLinks(t.value)}catch(i){return void o.notify(`Permission links for account ${t.value} not found!`)}for(let t of n)t["permission_links"]=l.filter((e=>e.permission===t.perm_name.toString()));a.value=s(n)})),s=e=>{let t;t=e.find((e=>"owner"===e.perm_name.toString()));let a=e.filter((e=>"owner"!==e.perm_name.toString()));const n=(e,t)=>{let a=t.filter((t=>t.parent.toString()===e.perm_name.toString()));for(let o of a)o.children=n(o,t);return a};return t.children=n(t,a),t};return(0,n.bv)((()=>{l()})),{permission:a}}}),pe=(0,q.Z)(ve,[["render",j],["__scopeId","data-v-24ab2455"]]),ge=pe;Z()(ve,"components",{QSpace:S.Z,QSeparator:I.Z});const we=e=>((0,n.dD)("data-v-bb419418"),e=e(),(0,n.Cn)(),e),he={class:"row col-12 q-mt-lg q-mb-xs q-px-xl justify-center text-left container-max-width"},fe=we((()=>(0,n._)("p",{class:"panel-title"},"Children",-1))),be={class:"col-12 q-py-lg row"},ye={key:0},_e=["innerHTML"];function ke(e,t,a,o,l,s){const i=(0,n.up)("q-space"),c=(0,n.up)("q-separator");return(0,n.wg)(),(0,n.iD)("div",he,[fe,(0,n.Wm)(i),(0,n.Wm)(c,{class:"row col-12 q-mt-md separator"}),(0,n._)("div",be,[0==e.children.length?((0,n.wg)(),(0,n.iD)("div",ye,"No children found")):(0,n.kq)("",!0),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.children,(e=>((0,n.wg)(),(0,n.iD)("div",{key:e,class:"child",innerHTML:e},null,8,_e)))),128))])])}var xe=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const Te=(0,n.aZ)({name:"ChildrenPanel",components:{},props:{account:{type:String,required:!1,default:null}},setup(e){const t=(0,X.Z)(),a=(0,c.iH)([]),o=()=>xe(this,void 0,void 0,(function*(){let n;try{n=yield k.h.getChildren(e.account)}catch(o){return void t.notify(`Keys for account ${e.account} not found!`)}a.value=n.map((e=>l(e.act.data.newact,"account")))})),l=(e,t)=>`${e}`;return(0,n.bv)((()=>xe(this,void 0,void 0,(function*(){yield o()})))),{children:a,loadAccountData:o}}}),qe=(0,q.Z)(Te,[["render",ke],["__scopeId","data-v-bb419418"]]),Se=qe;Z()(Te,"components",{QSpace:S.Z,QSeparator:I.Z});const Ie=e=>((0,n.dD)("data-v-cc1b473a"),e=e(),(0,n.Cn)(),e),De={class:"q-pa-md"},Ce={class:"inline-section"},Ae={class:"row justify-center full-height items-center"},We={key:0,class:"col-6"},Ve={class:"text-title"},Ze={key:1,class:"col-2"},Ne={class:"text-title"},ze={class:"col-1"},Me={key:0,class:"text-subtitle"},Fe=(0,n.Uk)(" created by "),He=(0,n.Uk)(" "),Re=(0,n.Uk)(" "),Ue=(0,n.Uk)(" "),Qe={key:1,class:"text-subtitle"},je=(0,n.Uk)("created"),Le=Ie((()=>(0,n._)("span",null," ",-1))),Ee=(0,n.Uk)(" "),Pe={key:0,class:"resources"},Be={key:1,class:"resources"},Oe={class:"usage"},$e={class:"row justify-center q-gutter-sm"},Ye={key:0,class:"col-3"},Ge={key:1,class:"col-3"},Ke={key:2,class:"col-3"},Je={key:0},Xe={class:"inline-section"},et={class:"row justify-center full-height items-center"},tt=Ie((()=>(0,n._)("div",{class:"col-8"},null,-1))),at={class:"text-title text-center"};function nt(e,t,a,o,l,s){const i=(0,n.up)("q-btn"),c=(0,n.up)("DateField"),u=(0,n.up)("q-tooltip"),d=(0,n.up)("q-icon"),m=(0,n.up)("q-space"),v=(0,n.up)("PercentCircle"),p=(0,n.up)("q-card-section"),g=(0,n.up)("SendDialog"),w=(0,n.up)("ResourcesDialog"),h=(0,n.up)("StakingDialog"),f=(0,n.up)("q-card");return(0,n.wg)(),(0,n.iD)("div",De,[e.accountExists?((0,n.wg)(),(0,n.j4)(f,{key:0,class:"account-card"},{default:(0,n.w5)((()=>[(0,n.Wm)(p,{class:"resources-container"},{default:(0,n.w5)((()=>[(0,n._)("div",Ce,[(0,n._)("div",Ae,[e.account!==e.system_account?((0,n.wg)(),(0,n.iD)("div",We,[(0,n._)("div",Ve,(0,r.zw)(e.account),1)])):((0,n.wg)(),(0,n.iD)("div",Ze,[(0,n._)("div",Ne,(0,r.zw)(e.account),1)])),(0,n._)("div",ze,[(0,n.Wm)(i,{class:"float-right",flat:"",round:"",color:"white",icon:"content_copy",size:"sm",onClick:t[0]||(t[0]=t=>e.copy(e.account))})])]),e.creatingAccount&&"__self__"!==e.creatingAccount?((0,n.wg)(),(0,n.iD)("div",Me,[Fe,(0,n._)("span",null,[He,(0,n._)("a",{onClick:t[1]||(t[1]=(...t)=>e.loadCreatorAccount&&e.loadCreatorAccount(...t))},(0,r.zw)(e.creatingAccount),1),Re]),(0,n._)("div",null,[(0,n.Wm)(c,{timestamp:e.createTime,showAge:""},{default:(0,n.w5)((()=>[Ue])),_:1},8,["timestamp"]),(0,n.Wm)(u,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,r.zw)(e.createTimeFormat),1)])),_:1})]),(0,n._)("a",{class:"q-ml-xs tx-link",onClick:t[2]||(t[2]=(...t)=>e.loadCreatorTransaction&&e.loadCreatorTransaction(...t))},[(0,n.Wm)(d,{name:"fas fa-link"})])])):((0,n.wg)(),(0,n.iD)("div",Qe,[je,Le,(0,n._)("div",null,[(0,n.Wm)(c,{timestamp:e.createTime,showAge:""},{default:(0,n.w5)((()=>[Ee])),_:1},8,["timestamp"]),(0,n.Wm)(u,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,r.zw)(e.createTimeFormat),1)])),_:1})])])),(0,n.Wm)(m)]),e.account!==e.system_account?((0,n.wg)(),(0,n.iD)("div",Pe,[e.accountPageSettings.hideCpuInfo?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(v,{key:0,radius:e.radius,fraction:e.cpu_used,total:e.cpu_max,label:"CPU",unit:"s"},null,8,["radius","fraction","total"])),e.accountPageSettings.hideNetInfo?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(v,{key:1,radius:e.radius,fraction:e.net_used,total:e.net_max,label:"NET",unit:e.netUnit},null,8,["radius","fraction","total","unit"])),e.accountPageSettings.hideRamInfo?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(v,{key:2,radius:e.radius,fraction:e.ram_used,total:e.ram_max,label:"RAM",unit:e.ramUnit},null,8,["radius","fraction","total","unit"]))])):e.accountPageSettings.hideRamInfo?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("div",Be,[(0,n._)("div",Oe,"RAM USED: "+(0,r.zw)(e.ram_used)+" "+(0,r.zw)(e.ramUnit),1)]))])),_:1}),(0,n.Wm)(p,{class:"resources-container"},{default:(0,n.w5)((()=>[(0,n._)("div",$e,[e.isAccount?((0,n.wg)(),(0,n.iD)("div",Ye,[(0,n.Wm)(i,{disable:e.tokensLoading||e.isLoading,label:e.tokensLoading?"Loading...":"Send",color:"primary",class:"full-width",onClick:t[3]||(t[3]=t=>e.openSendDialog=!0)},null,8,["disable","label"])])):(0,n.kq)("",!0),e.isAccount&&!e.accountPageSettings.hideResourcesControl?((0,n.wg)(),(0,n.iD)("div",Ge,[(0,n.Wm)(i,{disable:e.tokensLoading||e.isLoading,label:e.tokensLoading?"Loading...":"Resources",class:"full-width",color:"primary",onClick:t[4]||(t[4]=t=>e.openResourcesDialog=!0)},null,8,["disable","label"])])):(0,n.kq)("",!0),e.isAccount&&!e.accountPageSettings.hideRexControl?((0,n.wg)(),(0,n.iD)("div",Ke,[(0,n.Wm)(i,{disable:e.tokensLoading||e.isLoading,label:e.tokensLoading?"Loading...":"Staking (REX)",class:"ellipsis full-width",color:"primary",onClick:t[5]||(t[5]=t=>e.openStakingDialog=!0)},null,8,["disable","label"])])):(0,n.kq)("",!0)])])),_:1}),e.isAccount?((0,n.wg)(),(0,n.iD)("div",Je,[e.openSendDialog?((0,n.wg)(),(0,n.j4)(g,{key:0,modelValue:e.openSendDialog,"onUpdate:modelValue":t[6]||(t[6]=t=>e.openSendDialog=t),availableTokens:e.availableTokens,onUpdateTokenBalances:e.updateTokenBalances},null,8,["modelValue","availableTokens","onUpdateTokenBalances"])):(0,n.kq)("",!0),e.openResourcesDialog?((0,n.wg)(),(0,n.j4)(w,{key:1,modelValue:e.openResourcesDialog,"onUpdate:modelValue":t[7]||(t[7]=t=>e.openResourcesDialog=t)},null,8,["modelValue"])):(0,n.kq)("",!0),(0,n.Wm)(h,{modelValue:e.openStakingDialog,"onUpdate:modelValue":t[8]||(t[8]=t=>e.openStakingDialog=t),availableTokens:e.availableTokens},null,8,["modelValue","availableTokens"])])):(0,n.kq)("",!0)])),_:1})):((0,n.wg)(),(0,n.j4)(f,{key:1,class:"account-card"},{default:(0,n.w5)((()=>[(0,n.Wm)(p,{class:"resources-container"},{default:(0,n.w5)((()=>[(0,n._)("div",Xe,[(0,n._)("div",et,[tt,(0,n._)("div",at,"Sorry, the account "+(0,r.zw)(e.account)+" could not be found.",1)])])])),_:1})])),_:1}))])}var ot=a(13385);const lt={class:"chart-container"},st=["viewBox"],it=["d"],ct=["stroke-dasharray","d","stroke"],ut=["y"],rt=["y"],dt={class:"text usage"},mt={class:"text usage"},vt={class:"text usage"};function pt(e,t,a,o,l,s){return(0,n.wg)(),(0,n.iD)("div",lt,[((0,n.wg)(),(0,n.iD)("svg",{class:"circular-chart",style:(0,r.j5)({"max-width":e.containerWidth}),viewBox:`${6*-e.offset} ${-e.offset/2} ${e.containerWidth} ${e.containerWidth}`},[(0,n._)("path",{class:"circle-bg",d:`M18 2 a ${e.radius} ${e.radius} 0 0 1 0 88 a ${e.radius} ${e.radius} 0 0 1 0 ${-e.diameter}`},null,8,it),(0,n._)("path",{class:"circle","stroke-dasharray":e.dashArray,d:`M18 2 a ${e.radius} ${e.radius} 0 0 1 0 88 a ${e.radius} ${e.radius} 0 0 1 0 ${-e.diameter}`,stroke:e.strokeColor,style:(0,r.j5)({"stroke-opacity":Number.isNaN(e.formatResourcePercent)?0:1,stroke:!Number.isNaN(e.formatResourcePercent)&&Number(e.formatResourcePercent)>80?"red":"white"})},null,12,ct),(0,n._)("text",{class:"text label",x:"18",y:e.radius-e.offset},(0,r.zw)(e.label),9,ut),(0,n._)("text",{class:"text percentage",x:"20",y:e.radius+12},(0,r.zw)(e.formatResourcePercent)+"%",9,rt)],12,st)),(0,n._)("p",dt,"USED: "+(0,r.zw)(e.fraction)+" "+(0,r.zw)(e.unit),1),(0,n._)("p",mt,"TOTAL: "+(0,r.zw)(e.total)+" "+(0,r.zw)(e.unit),1),(0,n._)("p",vt,"AVAILABLE: "+(0,r.zw)(e.available)+" "+(0,r.zw)(e.unit),1)])}const gt=3.1459,wt=(0,n.aZ)({name:"PercentCircle",props:{fraction:{type:Number,required:!0},total:{type:Number,required:!0},label:{type:String,default:""},radius:{type:Number,required:!0},unit:{type:String,default:""}},setup(e){const t=(0,c.iH)(5),{fraction:a,total:o,radius:l,unit:s}=(0,c.BK)(e),i=(0,n.Fl)((()=>2*l.value)),u=(0,n.Fl)((()=>2*gt*l.value)),r=(0,n.Fl)((()=>i.value+2*t.value)),d=(0,n.Fl)((()=>a.value&&o.value?(a.value/o.value*100).toFixed(2):"0")),m=(0,n.Fl)((()=>parseFloat(d.value)>=90?"red":"white")),v=(0,n.Fl)((()=>`${a.value}${s.value}/${o.value}${s.value}`)),p=(0,n.Fl)((()=>Math.abs(o.value-a.value).toFixed(3))),g=(0,n.Fl)((()=>{if(Number.isNaN(d.value))return"0";const e=parseFloat(d.value)/100*u.value;return`${e}, ${u.value}`}));return{offset:t,diameter:i,circumference:u,containerWidth:r,formatResourcePercent:d,strokeColor:m,fractionUnits:v,available:p,dashArray:g}}}),ht=(0,q.Z)(wt,[["render",pt],["__scopeId","data-v-5e52f638"]]),ft=ht;var bt=a(77122),yt=a.n(bt);const _t=e=>((0,n.dD)("data-v-1c0c7ffe"),e=e(),(0,n.Cn)(),e),kt={class:"row justify-center items-center full-height full-width"},xt={class:"absolute-top-right"},Tt={class:"col-xs-12 col-sm-8 col-md-7 col-lg-6 max-dialog-width"},qt={class:"row"},St=_t((()=>(0,n._)("img",{class:"send-img q-pr-md",src:yt()},null,-1))),It=_t((()=>(0,n._)("div",{class:"text-h4 q-pb-md inline-block color-grey-3"},"Send Tokens",-1))),Dt={key:0,class:"transaction-form text-grey-3 text-weight-light"},Ct={class:"row"},At={class:"col-12"},Wt=_t((()=>(0,n._)("div",{class:"row justify-between q-px-sm q-pb-sm q-gutter-x-sm"},"RECEIVING ACCOUNT",-1))),Vt={class:"row q-py-md"},Zt={class:"col-4"},Nt=_t((()=>(0,n._)("div",{class:"row justify-between q-px-sm q-pb-sm q-gutter-x-sm"},"TOKEN",-1))),zt={class:"col-8 text-subtitle-1 q-mx-sm subtitle"},Mt={class:"col-4"},Ft={class:"row justify-end items-center arrowButton"},Ht={class:"col-8 q-pl-md"},Rt={class:"row justify-between q-pb-sm q-gutter-x-sm"},Ut=_t((()=>(0,n._)("div",null,"AMOUNT",-1))),Qt={class:"color-grey-3 text-weight-bold balance-amount"},jt=(0,n.Uk)("Click to fill full amount"),Lt={class:"row"},Et={class:"col-12"},Pt=_t((()=>(0,n._)("div",{class:"row justify-between q-px-sm q-pb-sm q-gutter-x-sm"},"OPTIONAL MEMO",-1))),Bt={class:"row"},Ot={class:"row"},$t={class:"col-12 q-pt-md"},Yt=_t((()=>(0,n._)("div",{class:"row justify-between q-px-sm q-pb-lg q-gutter-x-sm"},"Your wallet must be open to allow authorization of this transaction.",-1))),Gt={key:1,class:"transaction-result"},Kt={class:"row"},Jt={class:"col-12"},Xt={class:"col-12"},ea=(0,n.Uk)(" Click to view transaction: "),ta={class:"row"},aa={class:"col-12"},na={class:"row"},oa={class:"row"},la={class:"col-12 flex justify-end"};function sa(e,t,a,o,l,s){const i=(0,n.up)("q-btn"),c=(0,n.up)("q-card-section"),u=(0,n.up)("q-separator"),d=(0,n.up)("q-input"),m=(0,n.up)("q-icon"),v=(0,n.up)("q-space"),p=(0,n.up)("q-tooltip"),g=(0,n.up)("CoinSelectorDialog"),w=(0,n.up)("q-card"),h=(0,n.up)("q-dialog"),f=(0,n.Q2)("close-popup");return(0,n.wg)(),(0,n.j4)(h,{persistent:!0,maximized:"",onShow:e.setDefaults,onHide:e.resetForm},{default:(0,n.w5)((()=>[(0,n.Wm)(w,{class:"sendCard"},{default:(0,n.w5)((()=>[(0,n._)("div",kt,[(0,n._)("div",xt,[(0,n.wy)((0,n.Wm)(i,{size:"20px",flat:"",dense:"",round:"",icon:"clear"},null,512),[[f]])]),(0,n._)("div",Tt,[(0,n._)("div",qt,[(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[St,It])),_:1})]),e.transactionForm?((0,n.wg)(),(0,n.iD)("div",Dt,[e.transactionForm?((0,n.wg)(),(0,n.j4)(u,{key:0,dark:""})):(0,n.kq)("",!0),e.transactionForm?((0,n.wg)(),(0,n.j4)(c,{key:1},{default:(0,n.w5)((()=>{var a,o,l;return[(0,n._)("div",Ct,[(0,n._)("div",At,[Wt,(0,n.Wm)(d,{modelValue:e.receivingAccount,"onUpdate:modelValue":t[0]||(t[0]=t=>e.receivingAccount=t),class:"full-width",standout:"standout",dense:"",dark:"","lazy-rules":!0,rules:[t=>e.isValidAccount(t)||"Invalid account name."]},null,8,["modelValue","rules"])])]),(0,n._)("div",Vt,[(0,n._)("div",Zt,[Nt,(0,n._)("div",{class:"row items-center no-wrap selector-container q-py-sm",onClick:t[1]||(t[1]=t=>e.openCoinDialog=!0)},[(0,n._)("div",zt,(0,r.zw)(null===(a=e.sendToken)||void 0===a?void 0:a.symbol),1),(0,n._)("div",Mt,[(0,n._)("div",Ft,[(0,n.Wm)(m,{class:"fas fa-chevron-down q-pr-lg",size:"17px"})])])])]),(0,n._)("div",Ht,[(0,n._)("div",Rt,[Ut,(0,n.Wm)(v),(0,n._)("div",{class:"row flex-center q-hoverable cursor-pointer",onClick:t[2]||(t[2]=(...t)=>e.setMaxValue&&e.setMaxValue(...t))},[(0,n._)("div",Qt,(0,r.zw)(`${null!==(l=null===(o=e.sendToken)||void 0===o?void 0:o.amount)&&void 0!==l?l:0} AVAILABLE`),1),(0,n.Wm)(m,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(p,null,{default:(0,n.w5)((()=>[jt])),_:1})])]),(0,n.Wm)(d,{modelValue:e.sendAmount,"onUpdate:modelValue":t[3]||(t[3]=t=>e.sendAmount=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0",debounce:1e3,rules:[t=>{var a;return t>0&&t<=(null===(a=e.sendToken)||void 0===a?void 0:a.amount)||"invalid amount"}],type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])])]),(0,n._)("div",Lt,[(0,n._)("div",Et,[Pt,(0,n._)("div",Bt,[(0,n.Wm)(d,{modelValue:e.memo,"onUpdate:modelValue":t[4]||(t[4]=t=>e.memo=t),class:"full-width send-input",standout:"bg-deep-purple-2 text-white",dark:"",type:"textarea"},null,8,["modelValue"])])])]),(0,n._)("div",Ot,[(0,n._)("div",$t,[Yt,(0,n.Wm)(i,{class:"full-width button-accent",label:"Confirm",flat:"",disabled:!e.validated,onClick:e.sendTransaction},null,8,["disabled","onClick"])])])]})),_:1})):(0,n.kq)("",!0)])):((0,n.wg)(),(0,n.iD)("div",Gt,[e.transactionId?((0,n.wg)(),(0,n.j4)(c,{key:0},{default:(0,n.w5)((()=>{var a;return[(0,n._)("div",Kt,[(0,n._)("div",Jt,[(0,n._)("div",null,"You successfully sent "+(0,r.zw)(e.sendAmount)+" "+(0,r.zw)(null===(a=e.sendToken)||void 0===a?void 0:a.symbol)+" to "+(0,r.zw)(e.receivingAccount)+".",1)]),(0,n._)("div",Xt,[ea,(0,n._)("a",{class:"ellipsis-overflow text-blue",onClick:t[5]||(t[5]=(...t)=>e.navToTransaction&&e.navToTransaction(...t))},(0,r.zw)(e.transactionId),1)])])]})),_:1})):((0,n.wg)(),(0,n.j4)(c,{key:1},{default:(0,n.w5)((()=>[(0,n._)("div",ta,[(0,n._)("div",aa,[(0,n._)("div",na,"Transaction Failed: "+(0,r.zw)(e.transactionError),1)])])])),_:1})),(0,n._)("div",oa,[(0,n._)("div",la,[(0,n.wy)((0,n.Wm)(i,{flat:"",class:"close-dialog",label:"Close",onClick:e.setDefaults},null,8,["onClick"]),[[f]])])])]))])]),(0,n.Wm)(g,{modelValue:e.openCoinDialog,"onUpdate:modelValue":t[6]||(t[6]=t=>e.openCoinDialog=t),updateSelectedCoin:e.updateSelectedCoin,availableTokens:e.availableTokens},null,8,["modelValue","updateSelectedCoin","availableTokens"])])),_:1})])),_:1},8,["onShow","onHide"])}const ia=e=>((0,n.dD)("data-v-42e19c7f"),e=e(),(0,n.Cn)(),e),ca={class:"dialogHeader"},ua={class:"row justify-between items-center q-pt-sm-center"},ra=ia((()=>(0,n._)("div",{class:"text-h6 q-pl-md"},"Select a token",-1))),da={class:"q-pr-sm"},ma={class:"row"},va={class:"col-12 q-pa-sm"},pa=(0,n.Uk)("No tokens found");function ga(e,t,a,o,l,s){const i=(0,n.up)("q-btn"),c=(0,n.up)("q-input"),u=(0,n.up)("q-separator"),d=(0,n.up)("q-item-label"),m=(0,n.up)("q-item-section"),v=(0,n.up)("q-item"),p=(0,n.up)("q-list"),g=(0,n.up)("q-card"),w=(0,n.up)("q-dialog"),h=(0,n.Q2)("close-popup");return(0,n.wg)(),(0,n.j4)(w,{class:"dialogContainer",onShow:e.filterTokens},{default:(0,n.w5)((()=>[(0,n.Wm)(g,{class:"dialogCard"},{default:(0,n.w5)((()=>[(0,n._)("div",ca,[(0,n._)("div",ua,[ra,(0,n._)("div",da,[(0,n.wy)((0,n.Wm)(i,{size:"12px",flat:"",dense:"",round:"",icon:"clear"},null,512),[[h]])])]),(0,n._)("div",ma,[(0,n._)("div",va,[(0,n.Wm)(c,{modelValue:e.search,"onUpdate:modelValue":t[0]||(t[0]=t=>e.search=t),debounce:"500",outlined:"",dark:"",round:"round",placeholder:"Search contract name or symbol"},null,8,["modelValue"])])])]),(0,n.Wm)(u),(0,n.Wm)(p,{class:"dialogList"},{default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.filteredTokens,(t=>(0,n.wy)(((0,n.wg)(),(0,n.j4)(v,{key:`${t.contract}-${t.symbol}`,clickable:"",onClick:a=>{e.updateSelectedCoin(t)}},{default:(0,n.w5)((()=>[(0,n.Wm)(m,null,{default:(0,n.w5)((()=>[(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,r.zw)(t.symbol),1)])),_:2},1024),(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,r.zw)(t.contract),1)])),_:2},1024)])),_:2},1024),(0,n.Wm)(m,null,{default:(0,n.w5)((()=>[(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,r.zw)(t.amount),1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])),[[h]]))),128)),0==e.availableTokens.length?((0,n.wg)(),(0,n.j4)(v,{key:0},{default:(0,n.w5)((()=>[pa])),_:1})):(0,n.kq)("",!0)])),_:1})])),_:1})])),_:1},8,["onShow"])}const wa=(0,n.aZ)({name:"CoinSelectorDialog",props:{availableTokens:{required:!0,type:Array},updateSelectedCoin:{type:Function,required:!0}},setup(e){const t=(0,c.iH)(""),a=(0,c.iH)([]),o=()=>{t.value.length>0?l(s()):a.value=s()},l=e=>{a.value=e.filter((e=>e.symbol.toLowerCase().includes(t.value.toLowerCase())||e.contract.toLowerCase().includes(t.value.toLowerCase())))},s=()=>e.availableTokens.filter((e=>e.amount>0));return(0,n.YP)(t,(()=>{o()})),{search:t,filteredTokens:a,filterTokens:o,filterByText:l}}});var ha=a(87743),fa=a(13119),ba=a(13246),ya=a(33115),_a=a(62146);const ka=(0,q.Z)(wa,[["render",ga],["__scopeId","data-v-42e19c7f"]]),xa=ka;Z()(wa,"components",{QDialog:ha.Z,QCard:D.Z,QBtn:ne.Z,QInput:fa.Z,QSeparator:I.Z,QList:ba.Z,QItem:C.Z,QItemSection:A.Z,QItemLabel:ya.Z}),Z()(wa,"directives",{ClosePopup:_a.Z});var Ta=a(90347),qa=a(30229),Sa=a(78504),Ia=a(18910),Da=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const Ca=(0,qa.z)(),Aa=(0,n.aZ)({name:"SendDialog",components:{CoinSelectorDialog:xa},props:{availableTokens:{type:Array,required:!0}},emits:["update-token-balances"],setup(e,t){const a=(0,Sa.useStore)(),o=(0,Ia.tv)(),l=(0,c.iH)(Ca.getSystemToken()),s=(0,c.Vh)(e,"availableTokens"),i=(0,c.iH)(!1),u=(0,c.iH)(!1),r=(0,c.iH)(""),d=(0,c.iH)(""),m=(0,c.iH)(""),v=(0,n.Fl)((()=>a.state.account.accountName)),p=(0,n.Fl)((()=>a.state.account.TransactionId)),g=(0,n.Fl)((()=>a.state.account.TransactionError)),w=(0,n.Fl)((()=>!(g.value||p.value))),h=(0,n.Fl)((()=>parseFloat(d.value)>0&&r.value.length>0)),f=()=>Da(this,void 0,void 0,(function*(){var e,n;a.dispatch("account/resetTransaction");const o=null===(e=l.value)||void 0===e?void 0:e.contract,s={from:v.value,to:r.value,quantity:`${d.value} ${null===(n=l.value)||void 0===n?void 0:n.symbol}`,memo:m.value};yield a.dispatch("account/sendAction",{account:o,data:s,name:"transfer"}),a.dispatch("account/loadAccountData"),t.emit("update-token-balances")})),b=()=>{a.dispatch("account/resetTransaction"),s.value.length>0&&(l.value=s.value.find((e=>{var t,a;return e.symbol===(null===(t=l.value)||void 0===t?void 0:t.symbol)&&e.contract===(null===(a=l.value)||void 0===a?void 0:a.contract)})))},y=e=>{l.value=e},_=()=>{l.value={symbol:Ca.getSystemToken().symbol,precision:4,amount:0,contract:"eosio.token"}},k=()=>Da(this,void 0,void 0,(function*(){yield o.push({name:"transaction",params:{transaction:p.value}}),o.go(0),a.dispatch("account/resetTransaction")})),x=()=>{let e=Number(d.value);""!==d.value&&(d.value=e.toLocaleString("en-US",{style:"decimal",maximumFractionDigits:l.value.precision,minimumFractionDigits:l.value.precision}).replace(/,/g,"")),d.value=d.value.replace(/[^0-9.]/g,"")},T=()=>{d.value=l.value.amount.toString(),x()};return{sendToken:l,transactionId:p,transactionError:g,sendDialog:i,openCoinDialog:u,receivingAccount:r,sendAmount:d,memo:m,transactionForm:w,account:v,validated:h,setDefaults:b,updateSelectedCoin:y,setMaxValue:T,navToTransaction:k,sendTransaction:f,isValidAccount:Ta.Kf,formatDec:x,resetForm:_}},watch:{availableTokens:{handler(){this.availableTokens.length>0&&(this.sendToken=this.availableTokens.find((e=>e.symbol===this.sendToken.symbol&&e.contract===this.sendToken.contract))),this.sendToken&&0!==this.sendToken.amount||(this.openCoinDialog=!0)},deep:!0,immediate:!0}}});var Wa=a(22857),Va=a(46858);const Za=(0,q.Z)(Aa,[["render",sa],["__scopeId","data-v-1c0c7ffe"]]),Na=Za;Z()(Aa,"components",{QDialog:ha.Z,QCard:D.Z,QBtn:ne.Z,QCardSection:ue.Z,QSeparator:I.Z,QInput:fa.Z,QIcon:Wa.Z,QSpace:S.Z,QTooltip:Va.Z}),Z()(Aa,"directives",{ClosePopup:_a.Z});var za=a(48048),Ma=a.n(za);const Fa=e=>((0,n.dD)("data-v-4574639d"),e=e(),(0,n.Cn)(),e),Ha={class:"row justify-center q-pt-xl full-height full-width"},Ra={class:"absolute-top-right"},Ua={class:"col-xs-12 col-sm-10 col-md-7 col-lg-7 max-dialog-width"},Qa=Fa((()=>(0,n._)("div",{class:"row q-pl-sm"},[(0,n._)("img",{class:"send-img q-pr-md",src:Ma()}),(0,n._)("div",{class:"text-h4 q-pb-md inline-block color-grey-3 inline"},"Manage Resources")],-1))),ja={class:"q-pa-sm"},La={class:"q-pt-lg"};function Ea(e,t,a,o,l,s){const i=(0,n.up)("q-btn"),c=(0,n.up)("StakingInfo"),u=(0,n.up)("q-tab"),r=(0,n.up)("q-tabs"),d=(0,n.up)("q-separator"),m=(0,n.up)("StakingTab"),v=(0,n.up)("q-tab-panel"),p=(0,n.up)("UnstakingTab"),g=(0,n.up)("RefundTab"),w=(0,n.up)("BuyRam"),h=(0,n.up)("SellRam"),f=(0,n.up)("q-tab-panels"),b=(0,n.up)("q-card"),y=(0,n.up)("q-dialog"),_=(0,n.Q2)("close-popup");return(0,n.wg)(),(0,n.j4)(y,{persistent:!0,maximized:""},{default:(0,n.w5)((()=>[(0,n.Wm)(b,{class:"stakeCard"},{default:(0,n.w5)((()=>[(0,n._)("div",Ha,[(0,n._)("div",Ra,[(0,n.wy)((0,n.Wm)(i,{size:"20px",flat:"",dense:"",round:"",icon:"clear"},null,512),[[_]])]),(0,n._)("div",Ua,[Qa,(0,n._)("div",ja,[(0,n.Wm)(c),(0,n._)("div",La,[(0,n.Wm)(r,{modelValue:e.tab,"onUpdate:modelValue":t[0]||(t[0]=t=>e.tab=t),class:"text-grey-5 tab-text text-grey",dense:"","indicator-color":"grey-3","active-color":"grey-3","narrow-indicator":"",align:"left",breakpoint:0,"no-caps":""},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{name:"stake",label:"Add CPU/NET"}),(0,n.Wm)(u,{name:"unstake",label:"Remove CPU/NET"}),(0,n.Wm)(u,{name:"refund",label:"Refund CPU/NET"}),(0,n.Wm)(u,{name:"buyram",label:"Buy RAM"}),(0,n.Wm)(u,{name:"sellram",label:"Sell RAM"})])),_:1},8,["modelValue"]),(0,n.Wm)(d,{color:"grey-8"}),(0,n.Wm)(f,{modelValue:e.tab,"onUpdate:modelValue":t[1]||(t[1]=t=>e.tab=t),class:"tab-panel"},{default:(0,n.w5)((()=>[(0,n.Wm)(v,{name:"stake"},{default:(0,n.w5)((()=>[(0,n.Wm)(m)])),_:1}),(0,n.Wm)(v,{name:"unstake"},{default:(0,n.w5)((()=>[(0,n.Wm)(p)])),_:1}),(0,n.Wm)(v,{name:"refund"},{default:(0,n.w5)((()=>[(0,n.Wm)(g)])),_:1}),(0,n.Wm)(v,{name:"buyram"},{default:(0,n.w5)((()=>[(0,n.Wm)(w)])),_:1}),(0,n.Wm)(v,{name:"sellram"},{default:(0,n.w5)((()=>[(0,n.Wm)(h)])),_:1})])),_:1},8,["modelValue"])])])])])])),_:1})])),_:1})}const Pa=e=>((0,n.dD)("data-v-08448fb5"),e=e(),(0,n.Cn)(),e),Ba={class:"container grey-3"},Oa={class:"row full-width"},$a={class:"row full-width q-pt-md q-px-lg"},Ya=Pa((()=>(0,n._)("div",{class:"col-6 text-h6 text-bold"},"AVAILABLE BALANCE",-1))),Ga={class:"col-6 text-h6 text-right text-bold"},Ka=Pa((()=>(0,n._)("div",{class:"row full-width q-py-md"},[(0,n._)("hr")],-1))),Ja={class:"row full-width q-pb-md"},Xa={class:"col-xs-12 col-sm-6 q-px-lg q-pb-sm"},en={class:"row"},tn=Pa((()=>(0,n._)("div",{class:"col-7 text-weight-light"},"CPU",-1))),an={class:"col-5 text-right text-bold"},nn={class:"row q-pt-sm"},on=Pa((()=>(0,n._)("div",{class:"col-7 text-weight-light"},"NET",-1))),ln={class:"col-5 text-right text-bold"},sn={class:"row q-pt-sm"},cn=Pa((()=>(0,n._)("div",{class:"col-7 text-weight-light"},"AVAILABLE RAM",-1))),un={class:"col-5 text-right text-bold"},rn={class:"col-xs-12 col-sm-6 q-px-lg q-pb-sm"},dn={class:"row"},mn=Pa((()=>(0,n._)("div",{class:"col-7 text-weight-light"},"DELEGATED BY OTHERS",-1))),vn={class:"col-5 text-right text-bold"},pn={class:"row q-pt-sm"},gn=Pa((()=>(0,n._)("div",{class:"col-7 text-weight-light"},"DELEGATED TO OTHERS",-1))),wn={class:"col-5 text-right text-bold"},hn={class:"row q-pt-sm"},fn=Pa((()=>(0,n._)("div",{class:"col-7 text-weight-light"},"REFUNDING",-1))),bn={class:"col-5 text-right text-bold"};function yn(e,t,a,o,l,s){return(0,n.wg)(),(0,n.iD)("div",Ba,[(0,n._)("div",Oa,[(0,n._)("div",$a,[Ya,(0,n._)("div",Ga,(0,r.zw)(e.formatValue(e.accountTotal)),1)]),Ka,(0,n._)("div",Ja,[(0,n._)("div",Xa,[(0,n._)("div",en,[tn,(0,n._)("div",an,(0,r.zw)(e.formatValue(e.currentCpu)),1)]),(0,n._)("div",nn,[on,(0,n._)("div",ln,(0,r.zw)(e.formatValue(e.currentNet)),1)]),(0,n._)("div",sn,[cn,(0,n._)("div",un,(0,r.zw)(e.ramAvailable)+" Bytes",1)])]),(0,n._)("div",rn,[(0,n._)("div",dn,[mn,(0,n._)("div",vn,(0,r.zw)(e.formatValue(e.delegatedByOthers)),1)]),(0,n._)("div",pn,[gn,(0,n._)("div",wn,(0,r.zw)(e.formatValue(e.delegatedToOthers)),1)]),(0,n._)("div",hn,[fn,(0,n._)("div",bn,(0,r.zw)(e.formatValue(e.totalRefund)),1)])])])])])}const _n=(0,n.aZ)({name:"ResourcesInfo",setup(){const e=(0,Sa.useStore)(),t=(0,c.iH)(!1),a=(0,c.iH)(""),o=(0,c.iH)("0"),l=(0,c.iH)("0"),s=(0,c.iH)("0"),i=(0,c.iH)((0,qa.z)().getSystemToken()),u=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),r=(0,n.Fl)((()=>{var t;return"0"===(null===(t=e.state)||void 0===t?void 0:t.chain.ram_price)?"0":e.state.chain.ram_price})),d=(0,n.Fl)((()=>Number(u.value.ram_quota)-Number(u.value.ram_usage))),m=(0,n.Fl)((()=>{var e,t;const a=Number(u.value.cpu_weight.value)/Math.pow(10,i.value.precision)+Number(u.value.net_weight.value)/Math.pow(10,i.value.precision),n=Number((null===(e=u.value.self_delegated_bandwidth)||void 0===e?void 0:e.net_weight.value)?u.value.self_delegated_bandwidth.net_weight.value:"0")+Number((null===(t=u.value.self_delegated_bandwidth)||void 0===t?void 0:t.cpu_weight.value)?u.value.self_delegated_bandwidth.cpu_weight.value:"0");return a-n})),v=(0,n.Fl)((()=>e.state.resources.toOthersAggregated)),p=(0,n.Fl)((()=>{var e,t,a;let n=0;return u.value&&(n=null!==(a=null===(t=null===(e=u.value)||void 0===e?void 0:e.core_liquid_balance)||void 0===t?void 0:t.value)&&void 0!==a?a:0),n})),g=(0,n.Fl)((()=>{var e,t;return null===(t=null===(e=u.value)||void 0===e?void 0:e.total_resources)||void 0===t?void 0:t.cpu_weight.value})),w=(0,n.Fl)((()=>{var e,t;return null===(t=null===(e=u.value)||void 0===e?void 0:e.total_resources)||void 0===t?void 0:t.net_weight.value})),h=(0,n.Fl)((()=>{var e,t,a,n,o,l;return(null!==(a=null===(t=null===(e=u.value)||void 0===e?void 0:e.refund_request)||void 0===t?void 0:t.cpu_amount.value)&&void 0!==a?a:0)+(null!==(l=null===(o=null===(n=u.value)||void 0===n?void 0:n.refund_request)||void 0===o?void 0:o.net_amount.value)&&void 0!==l?l:0)})),f=e=>(0,Ta.xG)(e||0,i.value.precision,i.value.symbol);return{store:e,openCoinDialog:t,stakingAccount:a,cpuTokens:o,netTokens:l,total:s,accountData:u,token:i,ramPrice:r,ramAvailable:d,delegatedByOthers:m,delegatedToOthers:v,accountTotal:p,currentCpu:g,currentNet:w,totalRefund:h,formatValue:f}}}),kn=(0,q.Z)(_n,[["render",yn],["__scopeId","data-v-08448fb5"]]),xn=kn,Tn={class:"staking-form"},qn={class:"row"},Sn={class:"col-12"},In={class:"row justify-between q-pb-sm"},Dn=(0,n.Uk)("CPU/NET Receiver "),Cn=(0,n._)("div",{class:"text-grey-3"},"Defaults to connected account",-1),An={class:"row q-py-md"},Wn={class:"col-6"},Vn={class:"row q-pb-sm"},Zn=(0,n._)("div",{class:"col-6"},"ADD CPU",-1),Nn={class:"col-6 text-right"},zn={class:"text-weight-bold"},Mn={class:"col-6 q-pl-md"},Fn={class:"row q-pb-sm"},Hn=(0,n._)("div",{class:"col-6"},"ADD NET",-1),Rn={class:"col-6 text-right"},Un={class:"text-weight-bold"},Qn={key:0,class:"row text-red"},jn={class:"row"},Ln={class:"col-12 q-pt-md"};function En(e,t,a,o,l,s){const i=(0,n.up)("q-space"),c=(0,n.up)("q-input"),u=(0,n.up)("q-btn"),d=(0,n.up)("q-card-section"),m=(0,n.up)("ViewTransaction");return(0,n.wg)(),(0,n.iD)("div",Tn,[(0,n.Wm)(d,{class:"text-grey-3 text-weight-light"},{default:(0,n.w5)((()=>[(0,n._)("div",qn,[(0,n._)("div",Sn,[(0,n._)("div",In,[Dn,(0,n.Wm)(i),Cn]),(0,n.Wm)(c,{modelValue:e.stakingAccount,"onUpdate:modelValue":t[0]||(t[0]=t=>e.stakingAccount=t),class:"full-width",standout:"bg-deep-purple-2 text-white",dense:"",dark:"","lazy-rules":!0,rules:[t=>e.isValidAccount(t)||"Invalid account name."]},null,8,["modelValue","rules"])])]),(0,n._)("div",An,[(0,n._)("div",Wn,[(0,n._)("div",Vn,[Zn,(0,n._)("div",Nn,[(0,n._)("span",zn,(0,r.zw)(`${e.accountTotalAsNumber} AVAILABLE`),1)])]),(0,n.Wm)(c,{modelValue:e.cpuTokens,"onUpdate:modelValue":t[1]||(t[1]=t=>e.cpuTokens=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.inputRules,type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",Mn,[(0,n._)("div",Fn,[Hn,(0,n._)("div",Rn,[(0,n._)("span",Un,(0,r.zw)(`${e.accountTotalAsNumber} AVAILABLE`),1)])]),(0,n.Wm)(c,{modelValue:e.netTokens,"onUpdate:modelValue":t[2]||(t[2]=t=>e.netTokens=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.inputRules,type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])])]),e.notEnoughTlosForTransaction?((0,n.wg)(),(0,n.iD)("div",Qn,"Balance too low for transaction")):(0,n.kq)("",!0),(0,n._)("div",jn,[(0,n._)("div",Ln,[(0,n.Wm)(u,{class:"full-width button-accent",label:"Confirm",flat:"",disable:e.disableCta,onClick:e.sendTransaction},null,8,["disable","onClick"])])])])),_:1}),(0,n.Wm)(m,{modelValue:e.openTransaction,"onUpdate:modelValue":t[3]||(t[3]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])}var Pn=a(33100),Bn=a(1546),On=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const $n=(0,qa.z)(),Yn=$n.getSystemToken().symbol,Gn=(0,n.aZ)({name:"StakeTab",components:{ViewTransaction:Bn.Z},setup(){const e=(0,ot.p)(),t=(0,c.iH)(!1),a=(0,c.iH)(e.state.account.accountName||""),o=(0,n.Fl)((()=>{var t;return(null!==(t=e.state.account.data.core_liquid_balance)&&void 0!==t?t:0).toString()})),l=(0,n.Fl)((()=>(0,Ta.sA)(o.value))),s=(0,c.iH)("0"),i=(0,c.iH)("0");function u(){"0"!==s.value&&(s.value=Number(s.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,"")),"0"!==i.value&&(i.value=Number(i.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,""))}return Object.assign(Object.assign({openTransaction:t,stakingAccount:a,cpuTokens:s,netTokens:i},(0,Pn.nv)({delegateResources:"resources/delegateResources"})),{transactionId:(0,c.iH)(null),transactionError:null,formatDec:u,accountTotalAsNumber:l,isValidAccount:Ta.Kf})},computed:{inputRules(){return[e=>+e>=0||"Value must not be negative",e=>+ethis.accountTotalAsNumber},disableCta(){const e=0===+this.cpuTokens&&0===+this.netTokens;return this.notEnoughTlosForTransaction||e}},methods:{sendTransaction(){return On(this,void 0,void 0,(function*(){this.transactionError="",parseFloat(this.cpuTokens)<=0&&parseFloat(this.netTokens)<=0?this.$q.notify("Enter valid value for CPU or NET to stake"):(yield this.delegateResources({from:this.$store.state.account.accountName,to:this.stakingAccount.toLowerCase().trim(),transfer:!1,cpu_weight:parseFloat(this.cpuTokens)>0?(0,Ta.xG)(parseFloat(this.cpuTokens),4,Yn,!0):`0.0000 ${Yn}`,net_weight:parseFloat(this.netTokens)>0?(0,Ta.xG)(parseFloat(this.netTokens),4,Yn,!0):`0.0000 ${Yn}`}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(this.openTransaction=!0))}))}}}),Kn=(0,q.Z)(Gn,[["render",En]]),Jn=Kn;Z()(Gn,"components",{QCardSection:ue.Z,QSpace:S.Z,QInput:fa.Z,QBtn:ne.Z});const Xn={class:"unstake-tab"},eo={class:"row q-pb-md"},to={class:"col-12"},ao={class:"row q-pb-md"},no={class:"col-6"},oo={class:"row q-pb-sm"},lo=(0,n._)("div",{class:"col-6"},"REMOVE CPU",-1),so={class:"col-6"},io={class:"text-weight-bold balance-amount"},co=(0,n.Uk)("Click to fill full amount"),uo={class:"col-6 q-pl-md"},ro={class:"row q-pb-sm"},mo=(0,n._)("div",{class:"col-6"},"REMOVE NET",-1),vo={class:"col-6"},po={class:"text-weight-bold balance-amount"},go=(0,n.Uk)("Click to fill full amount"),wo={class:"row"},ho={class:"col-12 q-pt-md"};function fo(e,t,a,o,l,s){const i=(0,n.up)("q-linear-progress"),c=(0,n.up)("q-select"),u=(0,n.up)("q-icon"),d=(0,n.up)("q-tooltip"),m=(0,n.up)("q-input"),v=(0,n.up)("q-spinner"),p=(0,n.up)("q-btn"),g=(0,n.up)("ViewTransaction"),w=(0,n.up)("q-card-section");return(0,n.wg)(),(0,n.iD)("div",Xn,[(0,n.Wm)(w,{class:"text-grey-3 text-weight-light"},{default:(0,n.w5)((()=>[(0,n._)("div",eo,[(0,n._)("div",to,[e.isUpdating?((0,n.wg)(),(0,n.j4)(i,{key:0,color:"primary"})):((0,n.wg)(),(0,n.j4)(c,{key:1,modelValue:e.selectModel,"onUpdate:modelValue":t[0]||(t[0]=t=>e.selectModel=t),class:"full-width unstake-tab__select",color:"primary",options:e.selectOptions,label:"Delegated to",rules:[e=>!!e||"Delegated to is required"]},null,8,["modelValue","options","rules"]))])]),(0,n._)("div",ao,[(0,n._)("div",no,[(0,n._)("div",oo,[lo,(0,n._)("div",so,[(0,n._)("div",{class:"color-grey-3 flex justify-end items-center",onClick:t[1]||(t[1]=t=>e.cpuTokens=e.cpuStake.toString())},[(0,n._)("span",io,(0,r.zw)(`${e.cpuStake} AVAILABLE`),1),(0,n.Wm)(u,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[co])),_:1})])])]),(0,n.Wm)(m,{modelValue:e.cpuTokens,"onUpdate:modelValue":t[2]||(t[2]=t=>e.cpuTokens=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.cpuInputRules,type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",uo,[(0,n._)("div",ro,[mo,(0,n._)("div",vo,[(0,n._)("div",{class:"color-grey-3 flex justify-end items-center",onClick:t[3]||(t[3]=t=>e.netTokens=e.netStake.toString())},[(0,n._)("span",po,(0,r.zw)(`${e.netStake} AVAILABLE`),1),(0,n.Wm)(u,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[go])),_:1})])])]),(0,n.Wm)(m,{modelValue:e.netTokens,"onUpdate:modelValue":t[4]||(t[4]=t=>e.netTokens=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.netInputRules,type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])])]),(0,n._)("div",wo,[(0,n._)("div",ho,[(0,n.Wm)(p,{class:"full-width button-accent",label:"Confirm",flat:"",disable:e.ctaDisabled||e.isUnstaking,onClick:e.sendTransaction},{default:(0,n.w5)((()=>[e.isUnstaking?((0,n.wg)(),(0,n.j4)(v,{key:0,size:"20px",color:"white",class:"q-ml-sm"})):(0,n.kq)("",!0)])),_:1},8,["disable","onClick"])])]),(0,n.Wm)(g,{modelValue:e.openTransaction,"onUpdate:modelValue":t[5]||(t[5]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])),_:1})])}var bo=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const yo=(0,qa.z)(),_o=yo.getSystemToken().symbol,ko=(0,n.aZ)({name:"UnstakeTab",components:{ViewTransaction:Bn.Z},setup(){const e=(0,ot.p)(),t=(0,c.iH)(!1),a=(0,c.iH)(e.state.account.accountName.toLowerCase()||""),o=(0,c.iH)("0"),l=(0,c.iH)("0");function s(){"0"!==o.value&&(o.value=Number(o.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,"")),"0"!==l.value&&(l.value=Number(l.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,""))}const i=(0,n.Fl)((()=>e.resources.getDelegatedToOthers())),u=(0,n.Fl)((()=>e.resources.isLoading("updateResources"))),r=(0,n.Fl)((()=>e.resources.isLoading("undelegateResources"))),d=(0,n.Fl)((()=>e.resources.getLoading())),m=(0,c.iH)({label:"",value:null}),v=(0,n.Fl)((()=>{var e,t;return null===(t=null===(e=m.value)||void 0===e?void 0:e.value)||void 0===t?void 0:t.to})),p=(0,n.Fl)((()=>{var e,t;const a=null!==(t=null===(e=i.value)||void 0===e?void 0:e.map((e=>({label:e.to,value:e}))))&&void 0!==t?t:[];return a}));e.resources.updateResources({}).then((()=>{var t;const a=e.resources.getSelfStaked();a&&(m.value={label:null!==(t=null===a||void 0===a?void 0:a.to)&&void 0!==t?t:"unknown",value:a})}));const g=(0,c.iH)(0),w=(0,c.iH)(0);return Object.assign(Object.assign({openTransaction:t,stakingAccount:a,receiverAccount:v,selectModel:m,selectOptions:p,delegatedList:i,isUpdating:u,isUnstaking:r,loading:d,cpuTokens:o,netTokens:l},(0,Pn.nv)({undelegateResources:"resources/undelegateResources"})),{transactionId:(0,c.iH)(null),transactionError:null,formatDec:s,assetToAmount:Ta.sA,netStake:g,cpuStake:w})},watch:{selectModel:{handler(){this.update()},deep:!0},selectOptions:{handler(){this.update()},deep:!0}},computed:{cpuInputRules(){return[e=>+e>=0||"Value must not be negative",e=>+e<=this.cpuStake||"Not enough staked"]},netInputRules(){return[e=>+e>=0||"Value must not be negative",e=>+e<=this.netStake||`Not enough staked, needed: ${this.netStake}`]},ctaDisabled(){return this.cpuStake+this.netStake===0}},methods:{update(){var e,t;const a=this.selectOptions.find((e=>{var t,a,n;return e.value.to===(null!==(n=null===(a=null===(t=this.selectModel)||void 0===t?void 0:t.value)||void 0===a?void 0:a.to)&&void 0!==n?n:"")}));a&&(this.selectModel=a),this.netStake=this.assetToAmount(null===(e=this.selectModel.value)||void 0===e?void 0:e.net_weight.toString()),this.cpuStake=this.assetToAmount(null===(t=this.selectModel.value)||void 0===t?void 0:t.cpu_weight.toString()),this.netTokens="0",this.cpuTokens="0"},sendTransaction(){return bo(this,void 0,void 0,(function*(){this.transactionError="",parseFloat(this.cpuTokens)<=0&&parseFloat(this.netTokens)<=0?this.$q.notify("Enter valid value for CPU or NET to unstake"):(yield this.undelegateResources({from:this.stakingAccount,to:this.receiverAccount,transfer:!1,cpu_weight:parseFloat(this.cpuTokens)>0?(0,Ta.xG)(parseFloat(this.cpuTokens),4,_o,!0):`0.0000 ${_o}`,net_weight:parseFloat(this.netTokens)>0?(0,Ta.xG)(parseFloat(this.netTokens),4,_o,!0):`0.0000 ${_o}`}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(this.openTransaction=!0))}))}}});var xo=a(8289),To=a(32259),qo=a(63940),So=a(18149);const Io=(0,q.Z)(ko,[["render",fo]]),Do=Io;Z()(ko,"components",{QCardSection:ue.Z,QLinearProgress:xo.Z,QSelect:To.Z,QIcon:Wa.Z,QTooltip:Va.Z,QInput:fa.Z,QBtn:ne.Z,QSpinner:qo.Z,QField:So.Z});const Co={class:"q-pt-lg"},Ao={class:"container-refund"},Wo={class:"row full-width"},Vo={class:"row full-width q-pt-lg q-px-lg"},Zo=(0,n._)("div",{class:"col-6 text-h6 grey-3"},"Refunding Total",-1),No={class:"col-6 text-h6 text-right grey-3"},zo=(0,n._)("div",{class:"row full-width q-py-md"},[(0,n._)("hr")],-1),Mo={class:"row full-width q-pb-lg text-grey-3 text-weight-light"},Fo={class:"col-xs-12 col-sm-6 q-px-lg q-pt-sm"},Ho={class:"row"},Ro=(0,n._)("div",{class:"col-6"},"CPU",-1),Uo={class:"col-6 text-right text-weight-bold"},Qo={class:"row q-pt-md"},jo=(0,n._)("div",{class:"col-6"},"NET",-1),Lo={class:"col-6 text-right text-weight-bold"},Eo={class:"col-xs-12 col-sm-6 q-px-lg q-pt-sm"},Po={class:"row"},Bo={class:"col-7"},Oo={class:"col-5 text-right text-weight-bold"},$o={class:"row q-pt-sm"},Yo={class:"col-7 q-pt-sm"},Go=(0,n.Uk)("Refund "),Ko=(0,n.Uk)("If it has been more than 72 hours since your unstake transaction. Click on Refund to claim your tokens."),Jo={class:"col-5 text-right grey-3"};function Xo(e,t,a,o,l,s){const i=(0,n.up)("q-linear-progress"),c=(0,n.up)("q-tooltip"),u=(0,n.up)("q-icon"),d=(0,n.up)("q-btn"),m=(0,n.up)("ViewTransaction");return(0,n.wg)(),(0,n.iD)("div",Co,[(0,n._)("div",Ao,[(0,n._)("div",Wo,[(0,n._)("div",Vo,[Zo,(0,n._)("div",No,(0,r.zw)(e.totalRefund),1)]),zo,(0,n._)("div",Mo,[(0,n._)("div",Fo,[(0,n._)("div",Ho,[Ro,(0,n._)("div",Uo,(0,r.zw)(e.cpuAmount||"0"),1)]),(0,n._)("div",Qo,[jo,(0,n._)("div",Lo,(0,r.zw)(e.netAmount||"0"),1)])]),(0,n._)("div",Eo,[(0,n._)("div",Po,[(0,n._)("div",Bo,(0,r.zw)(e.refundCountdown()),1),(0,n._)("div",Oo,[(0,n.Wm)(i,{class:"q-mt-sm",value:e.refundProgress(),color:"grey-3"},null,8,["value"])])]),(0,n._)("div",$o,[(0,n._)("div",Yo,[Go,(0,n.Wm)(u,{class:"q-ml-xs",name:"far fa-question-circle"},{default:(0,n.w5)((()=>[(0,n.Wm)(c,{class:"bg-deep-purple-12",anchor:"top middle",self:"center middle"},{default:(0,n.w5)((()=>[Ko])),_:1})])),_:1})]),(0,n._)("div",Jo,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Refund",flat:"",onClick:e.sendTransaction},null,8,["onClick"])])])])])]),(0,n.Wm)(m,{modelValue:e.openTransaction,"onUpdate:modelValue":t[0]||(t[0]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])])}var el=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const tl=(0,n.aZ)({name:"RefundTab",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Sa.useStore)(),t=(0,c.iH)(!1),a=(0,c.iH)(""),o=(0,c.iH)("0"),l=(0,c.iH)(.2),s=(0,n.Fl)((()=>{var e;return null===(e=d.value)||void 0===e?void 0:e.refund_request})),i=(0,n.Fl)((()=>{var e;return null===(e=s.value)||void 0===e?void 0:e.cpu_amount.value})),u=(0,n.Fl)((()=>{var e;return null===(e=s.value)||void 0===e?void 0:e.net_amount.value})),r=(0,n.Fl)((()=>e.state.chain.token)),d=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),m=(0,n.Fl)((()=>{const e=s.value?(0,Ta.xG)(s.value.cpu_amount.value+s.value.net_amount.value,4):0;return`${e} ${r.value.symbol}`}));function v(e){const t=e/Math.pow(10,r.value.precision);return(0,Ta.xG)(t,2,r.value.symbol)}function p(){var e;let t=Math.round(new Date(new Date((null===(e=d.value.refund_request)||void 0===e?void 0:e.request_time.toString())+"Z").toUTCString()).getTime()/1e3)+259200-Math.round(new Date(Date.now()).getTime()/1e3),a=t/259200;return a>0?a:0}function g(){var e,t;let a=Math.round(new Date(new Date((null===(t=null===(e=d.value)||void 0===e?void 0:e.refund_request)||void 0===t?void 0:t.request_time.toString())+"Z")).getTime()/1e3)+259200-Math.round(new Date((new Date).toISOString()).getTime()/1e3);if(a>0){var n=w(a,86400),o=w(a,3600)%24;return`${n} days, ${o} hours remaining`}return"No pending refund"}function w(e,t){return Math.floor(e/t)}return Object.assign(Object.assign({store:e,openTransaction:t,stakingAccount:a,total:o,totalRefund:m,accountData:d,refundRequest:s,cpuAmount:i,netAmount:u,token:r,progress:l,formatStaked:v,refundProgress:p,refundCountdown:g},(0,Pn.nv)({sendAction:"account/sendAction"})),{transactionId:(0,c.iH)(null),transactionError:null})},methods:{sendTransaction(){return el(this,void 0,void 0,(function*(){this.transactionError="";const e={owner:this.accountData.account_name,transfer:!1};try{this.transactionId=(yield this.sendAction({account:"eosio",name:"refund",data:e})).transactionId}catch(t){this.transactionError=t,this.$store.commit("account/setTransactionError",t)}yield this.loadAccountData(),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(this.openTransaction=!0)}))},loadAccountData(){return el(this,void 0,void 0,(function*(){try{const e=yield this.$api.getAccount(this.store.state.account.abi.account_name);this.$store.commit("account/setAccountData",e)}catch(e){return}}))}}}),al=(0,q.Z)(tl,[["render",Xo]]),nl=al;Z()(tl,"components",{QLinearProgress:xo.Z,QIcon:Wa.Z,QTooltip:Va.Z,QBtn:ne.Z});const ol=e=>((0,n.dD)("data-v-61552d2f"),e=e(),(0,n.Cn)(),e),ll={class:"staking-form"},sl={class:"row q-col-gutter-md"},il={class:"text-weight-bold text-right text-grey-3"},cl={class:"row q-col-gutter-md q-pb-md"},ul={class:"row"},rl={class:"col-12"},dl={class:"row justify-between q-pb-sm"},ml=(0,n.Uk)("RAM Receiver: "),vl=ol((()=>(0,n._)("div",{class:"text-grey-3"},"Defaults to connected account",-1))),pl={class:"row q-mb-md"},gl={class:"row q-pb-sm full-width"},wl={class:"col-6"},hl={class:"col-6 text-right"},fl={class:"text-weight-bold"},bl={class:"row q-pb-sm"},yl={class:"text-weight-normal text-right text-grey-3"},_l={class:"row"};function kl(e,t,a,o,l,s){const i=(0,n.up)("q-radio"),c=(0,n.up)("q-space"),u=(0,n.up)("q-input"),d=(0,n.up)("q-btn"),m=(0,n.up)("ViewTransaction"),v=(0,n.up)("q-card-section");return(0,n.wg)(),(0,n.iD)("div",ll,[(0,n.Wm)(v,{class:"text-grey-3"},{default:(0,n.w5)((()=>[(0,n._)("div",sl,[(0,n._)("div",il,"Buy in "+(0,r.zw)(e.symbol)+" or Bytes?",1)]),(0,n._)("div",cl,[(0,n.Wm)(i,{modelValue:e.buyOption,"onUpdate:modelValue":t[0]||(t[0]=t=>e.buyOption=t),dark:"",color:"white",val:e.symbol,label:e.symbol},null,8,["modelValue","val","label"]),(0,n.Wm)(i,{modelValue:e.buyOption,"onUpdate:modelValue":t[1]||(t[1]=t=>e.buyOption=t),dark:"",color:"white",val:"Bytes",label:"Bytes"},null,8,["modelValue"])]),(0,n._)("div",ul,[(0,n._)("div",rl,[(0,n._)("div",dl,[ml,(0,n.Wm)(c),vl]),(0,n.Wm)(u,{modelValue:e.receivingAccount,"onUpdate:modelValue":t[2]||(t[2]=t=>e.receivingAccount=t),class:"full-width",standout:"bg-deep-purple-2 text-white",dense:"",dark:"","lazy-rules":!0,rules:[t=>e.isValidAccount(t)||"Invalid account name."]},null,8,["modelValue","rules"])])]),(0,n._)("div",pl,[(0,n._)("div",gl,[(0,n._)("div",wl,(0,r.zw)("Amount of RAM to buy in "+e.buyOption),1),(0,n._)("div",hl,[(0,n._)("span",fl,(0,r.zw)(`${e.prettyBuyLimit()} AVAILABLE`),1)])]),(0,n.Wm)(u,{modelValue:e.buyAmount,"onUpdate:modelValue":t[3]||(t[3]=t=>e.buyAmount=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.inputRules,type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",bl,[(0,n._)("div",yl,"≈ "+(0,r.zw)(e.buyPreview),1)]),(0,n._)("div",_l,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Buy",flat:"",disable:e.disableCta,onClick:e.buy},null,8,["disable","onClick"])]),(0,n.Wm)(m,{modelValue:e.openTransaction,"onUpdate:modelValue":t[4]||(t[4]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])),_:1})])}var xl=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const Tl=(0,qa.z)(),ql=(0,n.aZ)({name:"BuyRam",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Sa.useStore)();let t=(0,c.iH)(!1);const a=(0,c.iH)(""),o=(0,c.iH)(Tl.getSystemToken().symbol),l=[o.value,"Bytes"],s=(0,c.iH)(l[0]),i=(0,c.iH)(e.state.account.accountName),u=(0,n.Fl)((()=>e.state.account.TransactionId)),r=(0,n.Fl)((()=>s.value===l[0]?(1e3*Number(a.value)/Number(m.value)).toFixed(0)+" "+l[1]:(0,Ta.xG)(Number(a.value)/1e3*Number(m.value),4)+" "+l[0])),d=(0,n.Fl)((()=>e.state.account.TransactionError)),m=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.chain.ram_price})),v=(0,n.Fl)((()=>te.UInt64.sub(e.state.account.data.ram_quota,e.state.account.data.ram_usage))),p=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data}));function g(){const t=e.state.chain.token.precision;s.value===l[0]?a.value=Number(a.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:t,minimumFractionDigits:t}).replace(/[^0-9.]/g,""):""!==a.value&&(a.value=parseInt(a.value).toString().replace(/[^0-9.]/g,""))}function w(){return xl(this,void 0,void 0,(function*(){if(e.dispatch("account/resetTransaction"),s.value===l[0]){if("0"===a.value||Number(a.value)>=Number(p.value.core_liquid_balance.value))return;yield e.dispatch("account/buyRam",{amount:a.value+" "+o.value,receivingAccount:i.value})}else{if("0"===a.value||Number(a.value)>=1e3*Number(p.value.core_liquid_balance.value)/Number(m.value))return;yield e.dispatch("account/buyRamBytes",{amount:a.value,receivingAccount:i.value})}"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0)}))}function h(){var e,t,a,n;return s.value===l[0]?null!==(t=null===(e=p.value.core_liquid_balance)||void 0===e?void 0:e.value)&&void 0!==t?t:0:1e3*Number(null!==(n=null===(a=p.value.core_liquid_balance)||void 0===a?void 0:a.value)&&void 0!==n?n:0)/Number(m.value)}function f(){return s.value===l[0]?h():h().toFixed(0)}return(0,n.YP)(s,(()=>{a.value="0"})),{openTransaction:t,buyAmount:a,transactionId:u,transactionError:d,ramAvailable:v,accountData:p,receivingAccount:i,symbol:o,buyOption:s,buyPreview:r,formatDec:g,buy:w,buyLimit:h,prettyBuyLimit:f,isValidAccount:Ta.Kf}},computed:{inputRules(){return[e=>+e>=0||"Value must not be negative",e=>+ethis.buyLimit()}}});var Sl=a(11480);const Il=(0,q.Z)(ql,[["render",kl],["__scopeId","data-v-61552d2f"]]),Dl=Il;Z()(ql,"components",{QCardSection:ue.Z,QRadio:Sl.Z,QSpace:S.Z,QInput:fa.Z,QBtn:ne.Z});const Cl=e=>((0,n.dD)("data-v-1a7d69d7"),e=e(),(0,n.Cn)(),e),Al={class:"staking-form"},Wl={class:"row"},Vl={class:"row q-pb-sm full-width"},Zl=Cl((()=>(0,n._)("div",{class:"col-6"},(0,r.zw)("Amount of RAM to sell in Bytes"),-1))),Nl={class:"col-6"},zl={class:"text-weight-bold balance-amount"},Ml=(0,n.Uk)("Click to fill full amount"),Fl={class:"row q-pb-sm"},Hl={class:"text-weight-normal text-right text-grey-3"},Rl={class:"row"};function Ul(e,t,a,o,l,s){const i=(0,n.up)("q-icon"),c=(0,n.up)("q-tooltip"),u=(0,n.up)("q-input"),d=(0,n.up)("q-btn"),m=(0,n.up)("ViewTransaction"),v=(0,n.up)("q-card-section");return(0,n.wg)(),(0,n.iD)("div",Al,[(0,n.Wm)(v,{class:"text-grey-3"},{default:(0,n.w5)((()=>[(0,n._)("div",Wl,[(0,n._)("div",Vl,[Zl,(0,n._)("div",Nl,[(0,n._)("div",{class:"color-grey-3 flex justify-end items-center",onClick:t[0]||(t[0]=t=>e.sellAmount=e.ramAvailable.toString())},[(0,n._)("span",zl,(0,r.zw)(`${e.ramAvailable} AVAILABLE`),1),(0,n.Wm)(i,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[Ml])),_:1})])])]),(0,n.Wm)(u,{modelValue:e.sellAmount,"onUpdate:modelValue":t[1]||(t[1]=t=>e.sellAmount=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.inputRules,type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",Fl,[(0,n._)("div",Hl,"≈ "+(0,r.zw)(e.sellPreview),1)]),(0,n._)("div",Rl,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Sell",flat:"",disable:e.disableCta,onClick:e.sell},null,8,["disable","onClick"])]),(0,n.Wm)(m,{modelValue:e.openTransaction,"onUpdate:modelValue":t[2]||(t[2]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])),_:1})])}var Ql=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const jl=(0,n.aZ)({name:"SellRam",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Sa.useStore)(),t=(0,qa.z)();let a=(0,c.iH)(!1);const o=(0,c.iH)(""),l=(0,c.iH)(t.getSystemToken().symbol),s=(0,n.Fl)((()=>e.state.account.TransactionId)),i=(0,n.Fl)((()=>e.state.account.TransactionError)),u=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.chain.ram_price})),r=(0,n.Fl)((()=>(0,Ta.xG)(Number(o.value)/1e3*Number(u.value),4,l.value))),d=(0,n.Fl)((()=>Number(e.state.account.data.ram_quota.value)-Number(e.state.account.data.ram_usage.value))),m=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data}));function v(){o.value=parseInt(o.value).toString().replace(/[^0-9.]/g,"")}function p(){return Ql(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),"0"===o.value||!d.value||Number(o.value)>d.value||(yield e.dispatch("account/sellRam",{amount:o.value}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(a.value=!0))}))}return{openTransaction:a,sellAmount:o,transactionId:s,transactionError:i,ramAvailable:d,accountData:m,symbol:l,sellPreview:r,formatDec:v,sell:p}},computed:{inputRules(){return[e=>+e>=0||"Value must not be negative",e=>+e<=this.ramAvailable||"Not enough RAM"]},disableCta(){return 0===+this.sellAmount||+this.sellAmount>this.ramAvailable}}}),Ll=(0,q.Z)(jl,[["render",Ul],["__scopeId","data-v-1a7d69d7"]]),El=Ll;Z()(jl,"components",{QCardSection:ue.Z,QIcon:Wa.Z,QTooltip:Va.Z,QInput:fa.Z,QBtn:ne.Z});const Pl=(0,n.aZ)({name:"ResourcesDialog",components:{StakingInfo:xn,StakingTab:Jn,UnstakingTab:Do,RefundTab:nl,BuyRam:Dl,SellRam:El},setup(){return{tab:(0,c.iH)("stake")}}});var Bl=a(47817),Ol=a(57661),$l=a(89800),Yl=a(84106);const Gl=(0,q.Z)(Pl,[["render",Ea],["__scopeId","data-v-4574639d"]]),Kl=Gl;Z()(Pl,"components",{QDialog:ha.Z,QCard:D.Z,QBtn:ne.Z,QTabs:Bl.Z,QTab:Ol.Z,QSeparator:I.Z,QTabPanels:$l.Z,QTabPanel:Yl.Z}),Z()(Pl,"directives",{ClosePopup:_a.Z});const Jl=e=>((0,n.dD)("data-v-17b7ca54"),e=e(),(0,n.Cn)(),e),Xl={class:"row justify-center q-pt-xl full-height full-width"},es={class:"absolute-top-right"},ts={class:"col-xs-12 col-sm-10 col-md-7 col-lg-7 max-dialog-width"},as={class:"row q-pl-sm"},ns=Jl((()=>(0,n._)("div",{class:"text-h4 q-pb-md inline-block color-grey-3 inline"},"Staking (REX)",-1))),os={class:"text-h5 q-pb-md inline-block color-grey-3 inline float-right"},ls={class:"q-pa-sm"},ss={key:0,class:"q-pt-lg q-pl-lg"},is={class:"row q-col-gutter-md items-center"},cs={class:"col-auto text-h6 text-white"},us={class:"col-auto"},rs={class:"q-pt-lg text-grey-3 text-weight-light"};function ds(e,t,a,o,l,s){const i=(0,n.up)("q-btn"),c=(0,n.up)("StakingInfo"),u=(0,n.up)("q-tab"),d=(0,n.up)("q-tabs"),m=(0,n.up)("q-separator"),v=(0,n.up)("StakingTab"),p=(0,n.up)("q-tab-panel"),g=(0,n.up)("UnstakingTab"),w=(0,n.up)("StakeFromResources"),h=(0,n.up)("SavingsTab"),f=(0,n.up)("ProcessingTab"),b=(0,n.up)("HistoryTab"),y=(0,n.up)("q-tab-panels"),_=(0,n.up)("q-card"),k=(0,n.up)("q-dialog"),x=(0,n.Q2)("close-popup");return(0,n.wg)(),(0,n.j4)(k,{persistent:!0,maximized:"",onShow:e.setDefaults},{default:(0,n.w5)((()=>[(0,n.Wm)(_,{class:"rexCard"},{default:(0,n.w5)((()=>[(0,n._)("div",Xl,[(0,n._)("div",es,[(0,n.wy)((0,n.Wm)(i,{size:"20px",flat:"",dense:"",round:"",icon:"clear"},null,512),[[x]])]),(0,n._)("div",ts,[(0,n._)("div",as,[ns,(0,n._)("div",os,"APY: "+(0,r.zw)(e.apy),1)]),(0,n._)("div",ls,[(0,n.Wm)(c),e.rexfund>0?((0,n.wg)(),(0,n.iD)("div",ss,[(0,n._)("div",is,[(0,n._)("div",cs,"REX fund: "+(0,r.zw)(e.prettyRexFund),1),(0,n._)("div",us,[(0,n.Wm)(i,{class:"full-width button-accent",label:"Withdraw",flat:"",onClick:e.withdrawRexFund},null,8,["onClick"])])])])):(0,n.kq)("",!0),(0,n._)("div",rs,[(0,n.Wm)(d,{modelValue:e.tab,"onUpdate:modelValue":t[0]||(t[0]=t=>e.tab=t),class:"text-grey-5 tab-text text-grey",dense:"","indicator-color":"grey-3","active-color":"grey-3","narrow-indicator":"",align:"left",breakpoint:0,"no-caps":""},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{name:"stake",label:"Stake"}),(0,n.Wm)(u,{name:"unstake",label:"Unstake"}),(0,n.Wm)(u,{name:"stakecpunet",label:"Stake from CPU/NET"}),(0,n.Wm)(u,{name:"savings",label:"Savings"}),(0,n.Wm)(u,{name:"maturing",label:"Maturing"}),(0,n.Wm)(u,{name:"history",label:"History"})])),_:1},8,["modelValue"]),(0,n.Wm)(m,{color:"grey-8"}),(0,n.Wm)(y,{modelValue:e.tab,"onUpdate:modelValue":t[1]||(t[1]=t=>e.tab=t),class:"tab-panel"},{default:(0,n.w5)((()=>[(0,n.Wm)(p,{name:"stake"},{default:(0,n.w5)((()=>[(0,n.Wm)(v)])),_:1}),(0,n.Wm)(p,{name:"unstake"},{default:(0,n.w5)((()=>[(0,n.Wm)(g)])),_:1}),(0,n.Wm)(p,{name:"stakecpunet"},{default:(0,n.w5)((()=>[(0,n.Wm)(w)])),_:1}),(0,n.Wm)(p,{name:"savings"},{default:(0,n.w5)((()=>[(0,n.Wm)(h)])),_:1}),(0,n.Wm)(p,{name:"maturing"},{default:(0,n.w5)((()=>[(0,n.Wm)(f)])),_:1}),(0,n.Wm)(p,{name:"history"},{default:(0,n.w5)((()=>[(0,n.Wm)(b)])),_:1})])),_:1},8,["modelValue"])])])])])])),_:1})])),_:1},8,["onShow"])}const ms={class:"container text-grey-3 text-weight-light"},vs={class:"row full-width"},ps={class:"row full-width q-pt-md q-px-lg"},gs=(0,n._)("div",{class:"col-6 text-h6 grey-3"},"LIQUID BALANCE",-1),ws={class:"col-6 text-h6 text-right grey-3"},hs=(0,n._)("div",{class:"row full-width q-py-md q-px-md"},[(0,n._)("hr")],-1),fs={class:"row full-width q-pb-lg"},bs={class:"col-xs-12 col-sm-6 q-px-lg"},ys={class:"row"},_s={class:"col-7"},ks={class:"col-5 text-right text-weight-bold"},xs={class:"row q-pt-sm"},Ts=(0,n._)("div",{class:"col-7"},"SAVINGS",-1),qs={class:"col-5 text-right text-weight-bold"},Ss={class:"col-xs-12 col-sm-6 q-px-lg"},Is={class:"row"},Ds=(0,n._)("div",{class:"col-7"},"MATURED",-1),Cs={class:"col-5 text-right text-weight-bold"},As={class:"row q-pt-sm"},Ws=(0,n._)("div",{class:"col-7"},"MATURING",-1),Vs={class:"col-5 text-right text-weight-bold"};function Zs(e,t,a,o,l,s){return(0,n.wg)(),(0,n.iD)("div",ms,[(0,n._)("div",vs,[(0,n._)("div",ps,[gs,(0,n._)("div",ws,(0,r.zw)(e.liquidBalance),1)]),hs,(0,n._)("div",fs,[(0,n._)("div",bs,[(0,n._)("div",ys,[(0,n._)("div",_s,(0,r.zw)(`TOTAL ${e.symbol} STAKED`),1),(0,n._)("div",ks,(0,r.zw)(e.coreRexBalance),1)]),(0,n._)("div",xs,[Ts,(0,n._)("div",qs,(0,r.zw)(e.rexSavings),1)])]),(0,n._)("div",Ss,[(0,n._)("div",Is,[Ds,(0,n._)("div",Cs,(0,r.zw)(e.maturedRex),1)]),(0,n._)("div",As,[Ws,(0,n._)("div",Vs,(0,r.zw)(e.maturingRex),1)])])])])])}const Ns=(0,qa.z)(),zs=(0,n.aZ)({name:"StakingInfo",setup(){const e=(0,Sa.useStore)(),t=(0,c.iH)(Ns.getSystemToken().symbol),a=(0,c.iH)(""),o=(0,c.iH)("0"),l=(0,n.Fl)((()=>e.state.chain.token)),s=(0,n.Fl)((()=>e.state.account.data)),i=(0,n.Fl)((()=>s.value.core_liquid_balance)),u=(0,n.Fl)((()=>s.value.rex_info)),r=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.coreRexBalance})),d=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.maturingRex})),m=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.maturedRex})),v=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.savingsRex}));return{store:e,symbol:t,stakingAccount:a,total:o,accountData:s,token:l,liquidBalance:i,rexInfo:u,maturingRex:d,coreRexBalance:r,maturedRex:m,rexSavings:v}}}),Ms=(0,q.Z)(zs,[["render",Zs]]),Fs=Ms,Hs={class:"staking-form"},Rs={class:"row q-col-gutter-md"},Us={class:"col-12"},Qs={class:"row"},js={class:"row q-pb-sm full-width"},Ls=(0,n._)("div",{class:"col-9"},"TRANSFER CPU TO STAKING",-1),Es={class:"col-3"},Ps={class:"text-weight-bold text-right balance-amount"},Bs=(0,n.Uk)("Click to fill full amount"),Os=(0,n._)("div",{class:"row"},null,-1),$s={class:"row q-pb-sm full-width"},Ys=(0,n._)("div",{class:"col-9"},"TRANSFER NET TO STAKING",-1),Gs={class:"col-3"},Ks=(0,n.Uk)("Click to fill full amount"),Js={class:"row"};function Xs(e,t,a,o,l,s){const i=(0,n.up)("q-icon"),c=(0,n.up)("q-tooltip"),u=(0,n.up)("q-input"),d=(0,n.up)("q-btn"),m=(0,n.up)("q-card-section"),v=(0,n.up)("ViewTransaction");return(0,n.wg)(),(0,n.iD)("div",Hs,[(0,n.Wm)(m,null,{default:(0,n.w5)((()=>[(0,n._)("div",Rs,[(0,n._)("div",Us,[(0,n._)("div",Qs,[(0,n._)("div",js,[Ls,(0,n._)("div",Es,[(0,n._)("div",{class:"row items-center justify-end q-hoverable cursor-pointer",onClick:t[0]||(t[0]=(...t)=>e.setMaxCpuValue&&e.setMaxCpuValue(...t))},[(0,n._)("div",Ps,(0,r.zw)(e.cpuWeight),1),(0,n.Wm)(i,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[Bs])),_:1})])])]),(0,n.Wm)(u,{modelValue:e.cpuTokens,"onUpdate:modelValue":t[1]||(t[1]=t=>e.cpuTokens=t),class:"full-width",dense:"",dark:"",standout:"bg-deep-purple-2 text-white",placeholder:"0",type:"text","lazy-rules":!0,rules:[t=>t>=0&&t<=e.cpuWeight.value||"Invalid amount."],onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"]),Os,(0,n._)("div",$s,[Ys,(0,n._)("div",Gs,[(0,n._)("div",{class:"row items-center justify-end q-hoverable cursor-pointer",onClick:t[3]||(t[3]=(...t)=>e.setMaxNetValue&&e.setMaxNetValue(...t))},[(0,n._)("div",{class:"text-weight-bold text-right balance-amount",onClick:t[2]||(t[2]=(...t)=>e.setMaxNetValue&&e.setMaxNetValue(...t))},(0,r.zw)(e.netWeight),1),(0,n.Wm)(i,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[Ks])),_:1})])])]),(0,n.Wm)(u,{modelValue:e.netTokens,"onUpdate:modelValue":t[4]||(t[4]=t=>e.netTokens=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:[t=>t>=0&&t<=e.netWeight.value||"Invalid amount."],type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",Js,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Stake "+e.symbol,flat:"",onClick:e.stake},null,8,["label","onClick"])])])])])),_:1}),(0,n.Wm)(v,{modelValue:e.openTransaction,"onUpdate:modelValue":t[5]||(t[5]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])}var ei=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const ti=(0,n.aZ)({name:"StakeFromResources",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Sa.useStore)(),t=(0,c.iH)(!1),a=(0,qa.z)(),o=(0,c.iH)(a.getSystemToken().symbol),l=(0,c.iH)(""),s=(0,c.iH)(""),i=(0,c.iH)("0"),u=(0,c.iH)("0"),r=(0,c.iH)(e.state.account.TransactionId),d=(0,c.iH)(e.state.account.TransactionError),m=(0,n.Fl)((()=>e.state.account.accountName)),v=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),p=(0,n.Fl)((()=>v.value.total_resources.cpu_weight)),g=(0,n.Fl)((()=>v.value.total_resources.net_weight));function w(){""!==l.value&&(l.value=Number(l.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,"")),""!==s.value&&(s.value=Number(s.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,""))}function h(){return ei(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),"0"===l.value&&"0"===s.value||Number(l.value)>=Number(p.value)||Number(s.value)>=Number(v.value.total_resources.net_weight)||(yield e.dispatch("account/stakeCpuNetRex",{cpuAmount:l.value||"0",netAmount:s.value||"0"}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0))}))}function f(){return ei(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),"0"===i.value&&"0"===u.value||(yield e.dispatch("account/unstakeCpuNetRex",{cpuAmount:i.value||"0",netAmount:u.value||"0"}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0))}))}function b(){s.value=g.value.toString(),w()}function y(){l.value=p.value.toString(),w()}return{openTransaction:t,stakingAccount:m,cpuTokens:l,netTokens:s,symbol:o,cpuWithdraw:i,netWithdraw:u,transactionId:r,transactionError:d,accountData:v,cpuWeight:p,netWeight:g,formatDec:w,stake:h,unstake:f,setMaxNetValue:b,setMaxCpuValue:y}}}),ai=(0,q.Z)(ti,[["render",Xs]]),ni=ai;Z()(ti,"components",{QCardSection:ue.Z,QIcon:Wa.Z,QTooltip:Va.Z,QInput:fa.Z,QBtn:ne.Z});const oi={class:"q-pt-lg"},li={class:"container-refund q-pa-sm"},si={class:"row full-width"},ii={class:"col-xs-12 col-sm-6"},ci={class:"row q-pa-sm"},ui=(0,n._)("div",{class:"col-6"},"Staked TLOS maturing",-1),ri={class:"col-6 text-right text-weight-bold"},di={class:"col-xs-12 col-sm-6"},mi={class:"row q-pa-sm"},vi={class:"col-7"},pi={class:"col-5 text-right text-weight-bold"};function gi(e,t,a,o,l,s){const i=(0,n.up)("q-linear-progress");return(0,n.wg)(),(0,n.iD)("div",oi,[(0,n._)("div",li,[(0,n._)("div",si,[(0,n._)("div",ii,[(0,n._)("div",ci,[ui,(0,n._)("div",ri,(0,r.zw)(e.maturingRex),1)])]),(0,n._)("div",di,[(0,n._)("div",mi,[(0,n._)("div",vi,(0,r.zw)(e.maturitiesCountdown()),1),(0,n._)("div",pi,[(0,n.Wm)(i,{class:"q-mt-sm",value:e.refundProgress(),color:"grey-3"},null,8,["value"])])])])])])])}const wi=(0,n.aZ)({name:"ProcessingTab",components:{},setup(){const e=(0,Sa.useStore)(),t=(0,c.iH)(.2),a=(0,n.Fl)((()=>e.state.chain.token)),o=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),l=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.maturingRex}));function s(){var e,t;if("0"===l.value)return 0;let a=Math.round(new Date(new Date((null===(t=null===(e=o.value)||void 0===e?void 0:e.refund_request)||void 0===t?void 0:t.request_time.toString())+"Z").toUTCString()).getTime()/1e3)+604800-Math.round(new Date(Date.now()).getTime()/1e3),n=a/604800;return n>0?n:.01}function i(){var e,t;if("0"===l.value)return"No maturing TLOS";let a=Math.round(new Date(new Date((null===(t=null===(e=o.value)||void 0===e?void 0:e.rex_info)||void 0===t?void 0:t.rex_maturities[0].first.toString())+"Z")).getTime()/1e3)-Math.round(new Date((new Date).toISOString()).getTime()/1e3);if(a>0){var n=u(a,86400),s=u(a,3600)%24;return`${n} days, ${s} hours remaining`}return"No maturing Rex"}function u(e,t){return Math.floor(e/t)}return Object.assign(Object.assign({store:e,accountData:o,token:a,progress:t,refundProgress:s,maturitiesCountdown:i,maturingRex:l},(0,Pn.nv)({refund:"account/refund"})),{transactionId:(0,c.iH)(null),transactionError:null})}}),hi=(0,q.Z)(wi,[["render",gi]]),fi=hi;Z()(wi,"components",{QLinearProgress:xo.Z});const bi={class:"staking-form"},yi={class:"row q-col-gutter-md"},_i={class:"col-12"},ki={class:"row q-mb-md"},xi={class:"row q-pb-sm full-width"},Ti={class:"col-8"},qi={class:"col-4"},Si={class:"text-weight-bold text-right balance-amount"},Ii=(0,n.Uk)("Click to fill full amount"),Di={class:"row"};function Ci(e,t,a,o,l,s){const i=(0,n.up)("q-icon"),c=(0,n.up)("q-tooltip"),u=(0,n.up)("q-input"),d=(0,n.up)("q-btn"),m=(0,n.up)("ViewTransaction"),v=(0,n.up)("q-card-section");return(0,n.wg)(),(0,n.iD)("div",bi,[(0,n.Wm)(v,null,{default:(0,n.w5)((()=>[(0,n._)("div",yi,[(0,n._)("div",_i,[(0,n._)("div",ki,[(0,n._)("div",xi,[(0,n._)("div",Ti,(0,r.zw)(`LIQUID ${e.symbol}`),1),(0,n._)("div",qi,[(0,n._)("div",{class:"row items-center justify-end q-hoverable cursor-pointer",onClick:t[0]||(t[0]=(...t)=>e.setMaxValue&&e.setMaxValue(...t))},[(0,n._)("div",Si,(0,r.zw)(`${e.liquidBalance} AVAILABLE`),1),(0,n.Wm)(i,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[Ii])),_:1})])])]),(0,n.Wm)(u,{modelValue:e.stakeTokens,"onUpdate:modelValue":t[1]||(t[1]=t=>e.stakeTokens=t),dense:"",dark:"",class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.inputRules,type:"text",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",Di,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Stake "+e.symbol,flat:"",onClick:e.stake},null,8,["label","onClick"])])])]),(0,n.Wm)(m,{modelValue:e.openTransaction,"onUpdate:modelValue":t[2]||(t[2]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])),_:1})])}var Ai=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const Wi=(0,qa.z)(),Vi=(0,n.aZ)({name:"StakingTab",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Sa.useStore)();let t=(0,c.iH)(!1);const a=(0,c.iH)(""),o=(0,c.iH)(Wi.getSystemToken().symbol),l=(0,n.Fl)((()=>e.state.account.TransactionId)),s=(0,n.Fl)((()=>e.state.account.TransactionError)),i=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),u=(0,n.Fl)((()=>e.state.account.data.rex_info)),r=(0,n.Fl)((()=>e.state.account.rexbal)),d=(0,n.Fl)((()=>e.state.account.maturedRex)),m=(0,n.Fl)((()=>{var e;return null===(e=i.value)||void 0===e?void 0:e.core_liquid_balance.value})),v=(0,n.Fl)((()=>[e=>+e>=0||"Value must not be negative",e=>{var t;return+e<=(0,Ta.sA)((null!==(t=i.value.core_liquid_balance)&&void 0!==t?t:0).toString())||"Balance too low"}]));function p(){const t=e.state.chain.token.precision;""!==a.value&&(a.value=Number(a.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:t,minimumFractionDigits:t}).replace(/[^0-9.]/g,""))}function g(){return Ai(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),"0"===a.value||Number(a.value)>=Number(i.value.core_liquid_balance.toString())||(yield e.dispatch("account/stakeRex",{amount:a.value}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0))}))}function w(){a.value=(0,Ta.sA)(i.value.core_liquid_balance.toString()).toString(),p()}return{openTransaction:t,stakeTokens:a,transactionId:l,transactionError:s,accountData:i,rexInfo:u,rexbal:r,maturedRex:d,liquidBalance:m,symbol:o,inputRules:v,formatDec:p,stake:g,assetToAmount:Ta.sA,setMaxValue:w}}}),Zi=(0,q.Z)(Vi,[["render",Ci],["__scopeId","data-v-1f13247e"]]),Ni=Zi;Z()(Vi,"components",{QCardSection:ue.Z,QIcon:Wa.Z,QTooltip:Va.Z,QInput:fa.Z,QBtn:ne.Z});const zi={class:"staking-form"},Mi={class:"row q-col-gutter-md"},Fi={class:"col-12"},Hi={class:"row"},Ri={class:"row q-pb-sm full-width"},Ui={class:"col-8"},Qi={class:"col-4"},ji={class:"text-weight-bold text-right balance-amount"},Li=(0,n.Uk)("Click to fill full amount"),Ei={class:"row"};function Pi(e,t,a,o,l,s){const i=(0,n.up)("q-icon"),c=(0,n.up)("q-tooltip"),u=(0,n.up)("q-input"),d=(0,n.up)("q-btn"),m=(0,n.up)("ViewTransaction"),v=(0,n.up)("q-card-section");return(0,n.wg)(),(0,n.iD)("div",zi,[(0,n.Wm)(v,null,{default:(0,n.w5)((()=>[(0,n._)("div",Mi,[(0,n._)("div",Fi,[(0,n._)("div",Hi,[(0,n._)("div",Ri,[(0,n._)("div",Ui,(0,r.zw)(`MATURED ${e.symbol}`),1),(0,n._)("div",Qi,[(0,n._)("div",{class:"row items-center justify-end q-hoverable cursor-pointer",onClick:t[0]||(t[0]=(...t)=>e.setMaxValue&&e.setMaxValue(...t))},[(0,n._)("div",ji,(0,r.zw)(e.maxUnlend)+" "+(0,r.zw)(e.symbol),1),(0,n.Wm)(i,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[Li])),_:1})])])]),(0,n.Wm)(u,{ref:"unstakeInput",modelValue:e.unstakeTokens,"onUpdate:modelValue":t[1]||(t[1]=t=>e.unstakeTokens=t),standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:[t=>t>=0&&te.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])),_:1})])}var Bi=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const Oi=(0,qa.z)(),$i=(0,n.aZ)({name:"UnstakingTab",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Sa.useStore)();let t=(0,c.iH)(!1);const a=(0,c.iH)(""),o=(0,c.iH)(Oi.getSystemToken().symbol),l=(0,c.iH)(null),s=(0,n.Fl)((()=>e.state.account.TransactionId)),i=(0,n.Fl)((()=>e.state.account.TransactionError)),u=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),r=(0,n.Fl)((()=>e.state.account.data.rex_info)),d=(0,n.Fl)((()=>e.state.account.rexbal)),m=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.maturedRex})),v=(0,n.Fl)((()=>(0,Ta.sA)(m.value)-1e-4));function p(){const t=e.state.chain.token.precision;""!==a.value&&(a.value=Number(a.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:t,minimumFractionDigits:t}).replace(/[^0-9.]/g,""))}function g(){return Bi(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),l.value.hasError||(yield e.dispatch("account/unstakeRex",{amount:a.value}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0))}))}function w(){a.value=v.value.toString(),p()}return{openTransaction:t,unstakeTokens:a,unstakeInput:l,transactionId:s,transactionError:i,formatDec:p,unstake:g,assetToAmount:Ta.sA,accountData:u,rexInfo:r,rexbal:d,maturedRex:m,maxUnlend:v,symbol:o,setMaxValue:w}}}),Yi=(0,q.Z)($i,[["render",Pi],["__scopeId","data-v-2c517670"]]),Gi=Yi;Z()($i,"components",{QCardSection:ue.Z,QIcon:Wa.Z,QTooltip:Va.Z,QInput:fa.Z,QBtn:ne.Z});const Ki={class:"q-pt-lg"},Ji={class:"container-refund q-pa-md"},Xi={class:"col-xs-12 col-sm-6"},ec={class:"row q-pa-sm"},tc={class:"col-6"},ac={class:"col-6 text-weight-bold"},nc={class:"col-xs-12 col-sm-6"},oc={class:"row q-pa-sm"},lc=(0,n._)("div",{class:"col-6"},null,-1),sc={class:"col-6 text-weight-bold"},ic={key:0,class:"row full-width"},cc=(0,n._)("div",{class:"col-12"},[(0,n._)("div",{class:"row q-pa-sm"},"No REX transaction history")],-1),uc=[cc];function rc(e,t,a,o,l,s){const i=(0,n.up)("q-separator");return(0,n.wg)(),(0,n.iD)("div",Ki,[(0,n._)("div",Ji,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.rexActions,(t=>((0,n.wg)(),(0,n.iD)("div",{key:t.act.data.id,class:"row full-width"},[(0,n._)("div",Xi,[(0,n._)("div",ec,[(0,n._)("div",tc,(0,r.zw)(t.act.name),1),(0,n._)("div",ac,(0,r.zw)(e.getRexHistoryAsset(t.act.data)),1)])]),(0,n._)("div",nc,[(0,n._)("div",oc,[lc,(0,n._)("div",sc,(0,r.zw)(e.formatDate(t.timestamp,!1)),1)])]),(0,n.Wm)(i,{color:"grey-8"})])))),128)),0===e.rexActions.length?((0,n.wg)(),(0,n.iD)("div",ic,uc)):(0,n.kq)("",!0)])])}const dc=(0,n.aZ)({name:"HistoryTab",components:{},setup(){const e=(0,Sa.useStore)(),t=(0,n.Fl)((()=>e.state.account.rexActions));return{store:e,rexActions:t,formatDate:Ta.p6,getRexHistoryAsset:Ta.vE}}}),mc=(0,q.Z)(dc,[["render",rc]]),vc=mc;Z()(dc,"components",{QSeparator:I.Z});const pc={class:"staking-form"},gc={class:"row q-col-gutter-md"},wc={class:"col-12"},hc={class:"row"},fc={class:"row q-pb-sm full-width"},bc=(0,n._)("div",{class:"col-9"},"STAKE TO SAVINGS",-1),yc={class:"col-3"},_c={class:"text-weight-bold text-right balance-amount"},kc=(0,n.Uk)("Any balance currently maturing will be moved first, click to stake full amount"),xc={class:"row"},Tc={class:"col-12"},qc={class:"row"},Sc={class:"row q-pb-sm full-width"},Ic=(0,n._)("div",{class:"col-9"},"UNSTAKE FROM SAVINGS",-1),Dc={class:"col-3"},Cc={class:"text-weight-bold text-right balance-amount"},Ac=(0,n.Uk)("Click to stake full amount"),Wc={class:"row"};function Vc(e,t,a,o,l,s){const i=(0,n.up)("q-icon"),c=(0,n.up)("q-tooltip"),u=(0,n.up)("q-input"),d=(0,n.up)("q-btn"),m=(0,n.up)("q-card-section"),v=(0,n.up)("ViewTransaction");return(0,n.wg)(),(0,n.iD)("div",pc,[(0,n.Wm)(m,null,{default:(0,n.w5)((()=>[(0,n._)("div",gc,[(0,n._)("div",wc,[(0,n._)("div",hc,[(0,n._)("div",fc,[bc,(0,n._)("div",yc,[(0,n._)("div",{class:"row items-center justify-end q-hoverable cursor-pointer",onClick:t[0]||(t[0]=(...t)=>e.setMaxSavingsValue&&e.setMaxSavingsValue(...t))},[(0,n._)("div",_c,(0,r.zw)(e.formatNumberWithCommas(e.eligibleStaked)),1),(0,n.Wm)(i,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[kc])),_:1})])])]),(0,n.Wm)(u,{modelValue:e.toSavingAmount,"onUpdate:modelValue":t[1]||(t[1]=t=>e.toSavingAmount=t),standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:[t=>t>=0&&t<=e.eligibleStaked||"Invalid amount."],type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",xc,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Move To Savings",flat:"",onClick:e.moveToSavings},null,8,["onClick"])])]),(0,n._)("div",Tc,[(0,n._)("div",qc,[(0,n._)("div",Sc,[Ic,(0,n._)("div",Dc,[(0,n._)("div",{class:"row items-center justify-end q-hoverable cursor-pointer",onClick:t[2]||(t[2]=(...t)=>e.setMaxWithdrawValue&&e.setMaxWithdrawValue(...t))},[(0,n._)("div",Cc,(0,r.zw)(e.rexSavings),1),(0,n.Wm)(i,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[Ac])),_:1})])])]),(0,n.Wm)(u,{modelValue:e.fromSavingAmount,"onUpdate:modelValue":t[3]||(t[3]=t=>e.fromSavingAmount=t),standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:[t=>t>=0&&t<=e.assetToAmount(e.rexSavings)||"Invalid amount."],type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",Wc,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Withdraw from Savings",flat:"",onClick:e.moveFromSavings},null,8,["onClick"])])])])])),_:1}),(0,n.Wm)(v,{modelValue:e.openTransaction,"onUpdate:modelValue":t[4]||(t[4]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])}var Zc=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const Nc=(0,n.aZ)({name:"SavingsTab",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Sa.useStore)(),t=(0,c.iH)(!1),a=(0,n.Fl)((()=>e.state.account.accountName)),o=(0,c.iH)(""),l=(0,c.iH)(""),s=(0,c.iH)(e.state.account.TransactionId),i=(0,c.iH)(e.state.account.TransactionError),u=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),r=(0,n.Fl)((()=>{var t,a;return(0,Ta.sA)(null===(t=e.state)||void 0===t?void 0:t.account.maturedRex)+(0,Ta.sA)(null===(a=e.state)||void 0===a?void 0:a.account.maturingRex)})),d=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.savingsRex}));function m(){""!==o.value&&(o.value=Number(o.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,"")),""!==l.value&&(l.value=Number(l.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,""))}function v(){return Zc(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),"0"===o.value||""===o.value||Number(o.value)>r.value||(yield e.dispatch("account/moveToSavings",{amount:o.value||"0"}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0))}))}function p(){return Zc(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),"0"===l.value||""===l.value||Number(l.value)>=(0,Ta.sA)(d.value)||(yield e.dispatch("account/moveFromSavings",{amount:l.value||"0"}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0))}))}function g(){o.value=r.value.toString(),m()}function w(){l.value=(0,Ta.sA)(d.value).toString(),m()}return{openTransaction:t,stakingAccount:a,accountData:u,toSavingAmount:o,fromSavingAmount:l,eligibleStaked:r,rexSavings:d,transactionId:s,transactionError:i,formatNumberWithCommas:Ta.pw,formatDec:m,moveToSavings:v,moveFromSavings:p,assetToAmount:Ta.sA,setMaxSavingsValue:g,setMaxWithdrawValue:w}}}),zc=(0,q.Z)(Nc,[["render",Vc]]),Mc=zc;Z()(Nc,"components",{QCardSection:ue.Z,QIcon:Wa.Z,QTooltip:Va.Z,QInput:fa.Z,QBtn:ne.Z,QField:So.Z});var Fc=a(17779),Hc=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const Rc=(0,qa.z)().getSystemToken().symbol,Uc=(0,n.aZ)({name:"StakingDialog",components:{StakingInfo:Fs,StakeFromResources:ni,ProcessingTab:fi,StakingTab:Ni,UnstakingTab:Gi,HistoryTab:vc,SavingsTab:Mc},data(){return{sendToken:{symbol:Rc,precision:4,amount:0,contract:"eosio.token"},sendDialog:!1,apy:"--"}},props:{availableTokens:{type:Array,required:!0}},setup(){const e=(0,Sa.useStore)(),t=(0,n.Fl)((()=>e.state.account.rexfund||0)),a=(0,n.Fl)((()=>e.state.chain.token.symbol)),o=(0,c.iH)(null),l=(0,c.iH)(null),s=()=>Hc(this,void 0,void 0,(function*(){yield e.dispatch("account/unstakeRexFund",{amount:t.value}),e.dispatch("account/updateRexData",{account:e.state.account.accountName})})),i=(0,n.Fl)((()=>(0,Ta.xG)(t.value,4,a.value)));return Object.assign({openCoinDialog:(0,c.iH)(!1),recievingAccount:(0,c.iH)(""),sendAmount:(0,c.iH)("0"),memo:(0,c.iH)(""),tab:(0,c.iH)("stake"),rexfund:t,symbol:a,transactionError:l,transactionId:o,withdrawRexFund:s,prettyRexFund:i},(0,Pn.nv)({sendAction:"account/sendAction"}))},computed:Object.assign(Object.assign({},(0,Pn.Se)({account:"account/accountName"})),{transactionForm(){return!(this.transactionError||this.transactionId)}}),methods:{sendTransaction(){return Hc(this,void 0,void 0,(function*(){const e=this.sendToken.contract,t={from:this.account,to:this.recievingAccount,quantity:`${this.sendAmount} ${this.sendToken.symbol}`,memo:this.memo};try{this.transactionId=(yield this.sendAction({account:e,data:t,name:"transfer"})).transactionId}catch(a){this.transactionError=a}}))},setDefaults(){this.availableTokens.length>0&&(this.sendToken=this.availableTokens.find((e=>e.symbol===this.sendToken.symbol)))},updateSelectedCoin(e){this.sendToken=e},navToTransaction(){return Hc(this,void 0,void 0,(function*(){yield this.$router.push({name:"transaction",params:{transaction:this.transactionId}}),this.$router.go(0)}))},loadAccountData(){return Hc(this,void 0,void 0,(function*(){let e;try{e=yield this.$api.getAccount(this.account),this.$store.commit("account/setAccountData",e)}catch(t){return}}))}},mounted(){return Hc(this,void 0,void 0,(function*(){try{const e=yield this.$api.getApy();this.apy=`${e}%`}catch(e){Fc.error(e)}yield this.loadAccountData()}))}}),Qc=(0,q.Z)(Uc,[["render",ds],["__scopeId","data-v-17b7ca54"]]),jc=Qc;Z()(Uc,"components",{QDialog:ha.Z,QCard:D.Z,QBtn:ne.Z,QTabs:Bl.Z,QTab:Ol.Z,QSeparator:I.Z,QTabPanels:$l.Z,QTabPanel:Yl.Z}),Z()(Uc,"directives",{ClosePopup:_a.Z});var Lc=a(97114),Ec=a(54170),Pc=a(17779),Bc=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const Oc=(0,qa.z)(),$c=(0,n.aZ)({name:"AccountCard",components:{PercentCircle:ft,SendDialog:Na,ResourcesDialog:Kl,DateField:Lc.Z,StakingDialog:jc},props:{account:{type:String,required:!0}},setup(e){const t=(0,X.Z)(),a=(0,Ia.tv)(),o=(0,ot.p)(),l=(0,n.Fl)((()=>qa.Z.get().getCurrentChain().getUiCustomization().accountPageSettings)),s=(0,c.iH)("2019-01-01T00:00:00.000"),i=(0,c.iH)(""),u=(0,c.iH)(""),r=(0,c.iH)("eosio"),d=(0,c.iH)(!0),m=(0,c.iH)(!0),v=(0,c.iH)(te.UInt64.from(0)),p=(0,c.iH)("kb"),g=(0,c.iH)("kb"),w=(0,c.iH)(0),h=(0,c.iH)(0),f=(0,n.Fl)((()=>o.resources.getDelegatedToOthersAggregated())),b=(0,c.iH)(0),y=(0,c.iH)(0),_=(0,c.iH)(0),x=(0,n.Fl)((()=>b.value+y.value+_.value)),T=(0,c.iH)(),q=(0,c.iH)(0),S=(0,c.iH)(0),I=(0,c.iH)(0),D=(0,c.iH)(0),C=(0,c.iH)(""),A=(0,c.iH)(0),W=(0,c.iH)(0),V=(0,c.iH)(0),Z=(0,c.iH)(0),N=(0,c.iH)(44),z=(0,c.iH)(0),M=(0,c.iH)(!0),F=(0,c.iH)(!1),H=(0,c.iH)(!1),R=(0,c.iH)(!1),U=(0,c.iH)(),Q=(0,c.iH)([]),j=(0,n.Fl)((()=>{var e,t,a,n,o,l;return(null!==(a=null===(t=null===(e=U.value)||void 0===e?void 0:e.refund_request)||void 0===t?void 0:t.cpu_amount.value)&&void 0!==a?a:0)+(null!==(l=null===(o=null===(n=U.value)||void 0===n?void 0:n.refund_request)||void 0===o?void 0:o.net_amount.value)&&void 0!==l?l:0)})),L=(0,n.Fl)((()=>j.value+S.value+q.value)),E=(0,n.Fl)((()=>o.state.chain.token)),P=(0,n.Fl)((()=>{var e,t;return(null===(t=null===(e=U.value)||void 0===e?void 0:e.core_liquid_balance)||void 0===t?void 0:t.value)?U.value.core_liquid_balance.value:0})),B=(0,n.Fl)((()=>"number"===typeof C.value?T.value*C.value:0)),O=(0,n.Fl)((()=>{var e,t;let a="";const n=(0,Ta.xG)(null!==(e=B.value)&&void 0!==e?e:0,2),o=(0,Ta.xG)(null!==(t=T.value)&&void 0!==t?t:0,4);return B.value&&T.value&&(a=`$${n} (@ $${o}/${Oc.getSystemToken().symbol})`),a})),$=(0,n.Fl)((()=>o.state.account.accountName===e.account)),Y=(0,n.Fl)((()=>Ec.ZP.formatDate(s.value,"DD MMMM YYYY @ hh:mm A"))),G=e=>{o.commit("chain/setToken",e)},K=()=>Bc(this,void 0,void 0,(function*(){try{d.value=!0,U.value=yield k.h.getAccount(e.account),yield ne(),J(),yield ae(),yield oe({account:e.account,force:!0})}catch(a){return t.notify(`account ${e.account} not found!`),void(M.value=!1)}})),J=()=>{C.value=P.value+x.value+L.value+f.value,d.value=!1},ae=()=>Bc(this,void 0,void 0,(function*(){m.value=!0,Q.value=yield k.h.getTokens(e.account),m.value=!1})),ne=()=>Bc(this,void 0,void 0,(function*(){try{const t=yield k.h.getCreator(e.account);u.value=t.creator,s.value=t.timestamp,i.value=t.trx_id}catch(a){t.notify(`creator account for ${e.account} not found!`)}})),oe=e=>o.resources.updateResources(e),le=e=>Math.abs(parseFloat(e.toFixed(3))),se=()=>{""===E.value.symbol&&G(Oc.getSystemToken())},ie=()=>Bc(this,void 0,void 0,(function*(){yield a.push({name:"account",params:{account:u.value}}),a.go(0)})),ce=()=>Bc(this,void 0,void 0,(function*(){yield a.push({name:"transaction",params:{transaction:i.value}}),a.go(0)})),ue=e=>{(0,ee.Z)(e).then((()=>{t.notify({color:"green-4",textColor:"white",message:"Copied to clipboard",timeout:1e3})})).catch((()=>{t.notify({color:"red-8",textColor:"white",message:"Could not copy",timeout:1e3})}))},re=e=>"undefined"===typeof e?"--":(Pc.assert("number"===typeof e||"string"===typeof e,e),"string"===typeof e?e:(0,Ta.xG)(e,4,Oc.getSystemToken().symbol)),de=()=>{C.value="--",z.value=h.value=0,b.value=0,_.value=0};return(0,n.bv)((()=>Bc(this,void 0,void 0,(function*(){T.value=yield Oc.getUsdPrice(),yield K(),yield o.dispatch("account/updateRexData",{account:e.account}),se(),o.dispatch("chain/updateRamPrice")})))),(0,n.YP)((()=>e.account),(()=>Bc(this,void 0,void 0,(function*(){de(),yield K(),yield o.dispatch("account/updateRexData",{account:e.account})})))),(0,n.YP)((()=>o.resources.getDelegatedToOthersAggregated()),(()=>{J()})),{accountPageSettings:l,netUnit:p,ramUnit:g,stakedCPU:q,stakedNET:S,cpu_used:I,cpu_max:D,net_used:A,net_max:W,ram_used:V,ram_max:Z,creatingAccount:u,isLoading:d,tokensLoading:m,liquidNative:P,stakedRefund:j,totalTokens:C,totalValue:B,totalValueString:O,rex:x,rexStaked:b,rexDeposits:_,none:v,system_account:r,radius:N,availableTokens:Q,createTime:s,createTransaction:i,openSendDialog:F,openResourcesDialog:H,openStakingDialog:R,delegatedByOthers:h,delegatedToOthers:f,isAccount:$,token:E,createTimeFormat:Y,resources:w,accountExists:M,loadAccountData:K,setToken:G,fixDec:le,loadSystemToken:se,loadCreatorAccount:ie,loadCreatorTransaction:ce,copy:ue,formatAsset:re,updateTokenBalances:ae}}});var Yc=a(66933),Gc=a(82429);const Kc=(0,q.Z)($c,[["render",nt],["__scopeId","data-v-cc1b473a"]]),Jc=Kc;Z()($c,"components",{QCard:D.Z,QCardSection:ue.Z,QBtn:ne.Z,QTooltip:Va.Z,QIcon:Wa.Z,QSpace:S.Z,QMarkupTable:Yc.Z,QTable:Gc.Z});const Xc={class:"row"},eu=(0,n._)("div",{class:"col-12 q-py-md"},[(0,n._)("div",{class:"text-h5"},"Contract Details")],-1),tu={class:"col-12"};function au(e,t,a,o,l,s){const i=(0,n.up)("q-tab"),c=(0,n.up)("q-tabs"),u=(0,n.up)("ContractTables"),r=(0,n.up)("q-tab-panel"),d=(0,n.up)("ContractActions"),m=(0,n.up)("JsonViewer"),v=(0,n.up)("q-card-section"),p=(0,n.up)("q-card"),g=(0,n.up)("q-tab-panels");return(0,n.wg)(),(0,n.iD)("div",Xc,[eu,(0,n._)("div",tu,[(0,n.Wm)(c,{modelValue:e.tab,"onUpdate:modelValue":t[0]||(t[0]=t=>e.tab=t),"no-caps":"",align:"left",breakpoint:0},{default:(0,n.w5)((()=>[(0,n.Wm)(i,{name:"tables",label:"Tables"}),(0,n.Wm)(i,{name:"actions",label:"Actions"}),(0,n.Wm)(i,{name:"abi",label:"ABI"})])),_:1},8,["modelValue"]),(0,n.Wm)(g,{modelValue:e.tab,"onUpdate:modelValue":t[1]||(t[1]=t=>e.tab=t),class:"col-12"},{default:(0,n.w5)((()=>[(0,n.Wm)(r,{name:"tables"},{default:(0,n.w5)((()=>[(0,n.Wm)(u)])),_:1}),(0,n.Wm)(r,{name:"actions"},{default:(0,n.w5)((()=>[(0,n.Wm)(d)])),_:1}),(0,n.Wm)(r,{name:"abi"},{default:(0,n.w5)((()=>[(0,n.Wm)(p,{flat:"",class:"card--light-bg"},{default:(0,n.w5)((()=>[(0,n.Wm)(v,null,{default:(0,n.w5)((()=>[(0,n.Wm)(m,{value:e.abi,"expand-depth":5,"preview-mode":"preview-mode",boxed:"boxed",copyable:"copyable",sort:"sort"},null,8,["value"])])),_:1})])),_:1})])),_:1})])),_:1},8,["modelValue"])])])}var nu=a(61957);const ou=(0,n._)("div",{class:"q-pb-sm text-subtitle2 text-bold"},"Select table",-1),lu={class:"row justify-content full-width"},su={class:"col-10"},iu={class:"col-2 q-pl-md"},cu={class:"row q-py-md q-col-gutter-md"},uu={class:"col-xs-6 col-sm-3"},ru=(0,n._)("div",{class:"text-bold q-pb-sm"},"Scope",-1),du={class:"col-xs-6 col-sm-3"},mu=(0,n._)("div",{class:"text-bold q-pb-sm"},"Lower Bound",-1),vu={class:"col-xs-6 col-sm-3"},pu=(0,n._)("div",{class:"text-bold q-pb-sm"},"Upper Bound",-1),gu={class:"col-xs-6 col-sm-3"},wu=(0,n._)("div",{class:"text-bold q-pb-sm"},"Limit",-1),hu={key:0,class:"row full-width justify-center q-py-md q-px-xl"},fu=(0,n.Uk)("Show more");function bu(e,t,a,o,l,s){const i=(0,n.up)("q-select"),c=(0,n.up)("q-btn"),u=(0,n.up)("q-card-section"),r=(0,n.up)("q-input"),d=(0,n.up)("q-table"),m=(0,n.up)("q-card");return(0,n.wg)(),(0,n.j4)(m,{class:"card--light-bg",flat:""},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{class:"q-pl-md section--light-bg"},{default:(0,n.w5)((()=>[ou,(0,n._)("div",lu,[(0,n._)("div",su,[(0,n.Wm)(i,{outlined:"","onUpdate:modelValue":[e.updateRows,t[0]||(t[0]=t=>e.table=t)],dense:"",modelValue:e.table,options:e.options,color:"primary",class:"bg-white"},null,8,["onUpdate:modelValue","modelValue","options"])]),(0,n._)("div",iu,[(0,n.Wm)(c,{class:"full-width",unelevated:"",color:"primary",label:"Refresh",size:"15px",onClick:e.getRows},null,8,["onClick"])])])])),_:1}),(0,n.Wm)(u,{class:"q-pt-none"},{default:(0,n.w5)((()=>[(0,n._)("div",cu,[(0,n._)("div",uu,[ru,(0,n.Wm)(r,{outlined:"",onKeydown:(0,nu.D2)((0,nu.iM)(e.getRows,["prevent"]),["enter"]),onBlur:e.getRows,dense:"",modelValue:e.scope,"onUpdate:modelValue":t[1]||(t[1]=t=>e.scope=t),class:"bg-white"},null,8,["onKeydown","onBlur","modelValue"])]),(0,n._)("div",du,[mu,(0,n.Wm)(r,{outlined:"",onKeydown:(0,nu.D2)((0,nu.iM)(e.getRows,["prevent"]),["enter"]),onBlur:e.getRows,modelValue:e.lower,"onUpdate:modelValue":t[2]||(t[2]=t=>e.lower=t),dense:"",class:"bg-white"},null,8,["onKeydown","onBlur","modelValue"])]),(0,n._)("div",vu,[pu,(0,n.Wm)(r,{outlined:"",onKeydown:(0,nu.D2)((0,nu.iM)(e.getRows,["prevent"]),["enter"]),onBlur:e.getRows,modelValue:e.upper,"onUpdate:modelValue":t[3]||(t[3]=t=>e.upper=t),dense:"",class:"bg-white"},null,8,["onKeydown","onBlur","modelValue"])]),(0,n._)("div",gu,[wu,(0,n.Wm)(r,{outlined:"",onKeydown:(0,nu.D2)((0,nu.iM)(e.getRows,["prevent"]),["enter"]),onBlur:e.getRows,modelValue:e.limit,"onUpdate:modelValue":t[4]||(t[4]=t=>e.limit=t),dense:"",class:"bg-white"},null,8,["onKeydown","onBlur","modelValue"])])])])),_:1}),(0,n.Wm)(u,{class:"q-pt-none"},{default:(0,n.w5)((()=>[(0,n.Wm)(d,{rows:e.rows,"row-key":e.rows[0]?e.rows[0][0]:"","rows-per-page-options":[0]},{bottom:(0,n.w5)((()=>[e.canShowMore?((0,n.wg)(),(0,n.iD)("div",hu,[e.isMoreRows?((0,n.wg)(),(0,n.j4)(c,{key:0,class:"q-ml-xs q-mr-xs col button-primary",onClick:e.showMore},{default:(0,n.w5)((()=>[fu])),_:1},8,["onClick"])):(0,n.kq)("",!0)])):(0,n.kq)("",!0)])),_:1},8,["rows","row-key"])])),_:1})])),_:1})}var yu=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const _u=(0,n.aZ)({name:"ContractTables",setup(){const e=(0,Sa.useStore)(),t=(0,n.Fl)((()=>e.state.account.abi.abi.tables.map((e=>e.name)))),a=(0,n.Fl)((()=>e.state.account.abi.account_name)),o=(0,c.iH)(t.value[0]),l=(0,c.iH)(e.state.account.abi.account_name),s=(0,c.iH)(null),i=(0,c.iH)(null),u=(0,c.iH)("20"),r=(0,c.iH)({sortBy:"timestamp",descending:!0,page:1,rowsPerPage:Number(u.value)||10}),d=(0,c.iH)([]),m=(0,n.Fl)((()=>d.value.length>=Number(u.value))),v=(0,n.Fl)((()=>Number(u.value)>=d.value.length));function p(){return yu(this,void 0,void 0,(function*(){const e={code:a.value,limit:u.value,lower_bound:s.value,scope:l.value,table:o.value,json:!0,key_type:"i64",upper_bound:i.value};let t=(yield k.h.getTableRows(e)).rows;t=t.map((e=>h(e))),d.value=t}))}function g(e){return yu(this,void 0,void 0,(function*(){const t={code:a.value,limit:u.value,lower_bound:s.value,scope:l.value,table:e,json:!0,key_type:"i64",upper_bound:i.value};let n=(yield k.h.getTableRows(t)).rows;n=n.map((e=>h(e))),d.value=n}))}function w(){return yu(this,void 0,void 0,(function*(){u.value=(Number(u.value)+Number(u.value)).toString(),yield p()}))}function h(e){var t={};for(let a in e)e[a]instanceof Object?t[a]=JSON.stringify(e[a]):t[a]=e[a];return t}return(0,n.bv)((()=>yu(this,void 0,void 0,(function*(){yield p()})))),{table:o,options:t,scope:l,lower:s,upper:i,limit:u,rows:d,getRows:p,pagination:r,updateRows:g,showMore:w,canShowMore:v,isMoreRows:m}}}),ku=(0,q.Z)(_u,[["render",bu]]),xu=ku;Z()(_u,"components",{QCard:D.Z,QCardSection:ue.Z,QSelect:To.Z,QBtn:ne.Z,QInput:fa.Z,QTable:Gc.Z});const Tu=(0,n._)("div",{class:"q-pb-sm text-subtitle2 text-bold"},"Select action",-1),qu={class:"row justify-content full-width"},Su={class:"col-xs-8 col-sm-10"},Iu={class:"col-xs-4 col-sm-2 q-pl-md"},Du={class:"row q-py-md q-col-gutter-md"},Cu={class:"text-bold q-pb-sm"},Au={class:"col-xs-6 col-sm-3"},Wu=(0,n._)("div",{class:"text-bold q-pb-sm"},"actor",-1),Vu={class:"col-xs-6 col-sm-3"},Zu=(0,n._)("div",{class:"text-bold q-pb-sm"},"permission",-1);function Nu(e,t,a,o,l,s){const i=(0,n.up)("q-select"),c=(0,n.up)("q-btn"),u=(0,n.up)("q-card-section"),d=(0,n.up)("q-input"),m=(0,n.up)("q-card"),v=(0,n.up)("ViewTransaction");return(0,n.wg)(),(0,n.iD)(n.HY,null,[(0,n.Wm)(m,{class:"card--light-bg",flat:""},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{class:"q-pl-md section--light-bg"},{default:(0,n.w5)((()=>[Tu,(0,n._)("div",qu,[(0,n._)("div",Su,[(0,n.Wm)(i,{modelValue:e.action,"onUpdate:modelValue":t[0]||(t[0]=t=>e.action=t),outlined:"",dense:"",options:e.actions,color:"primary",class:"bg-white"},null,8,["modelValue","options"])]),(0,n._)("div",Iu,[(0,n.Wm)(c,{class:"full-width",unelevated:"",color:"primary",label:"Push transaction",size:"15px",onClick:e.signAction},null,8,["onClick"])])])])),_:1}),(0,n.Wm)(u,{class:"q-pt-none"},{default:(0,n.w5)((()=>[(0,n._)("div",Du,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.fields,(t=>((0,n.wg)(),(0,n.iD)("div",{key:t.name,class:"col-xs-6 col-sm-3"},[(0,n._)("div",Cu,(0,r.zw)(t.name),1),(0,n.Wm)(d,{modelValue:e.memo[t.name],"onUpdate:modelValue":a=>e.memo[t.name]=a,outlined:"",dense:"",placeholder:t.type,class:"bg-white",onBlur:e.formatMemo},null,8,["modelValue","onUpdate:modelValue","placeholder","onBlur"])])))),128)),(0,n._)("div",Au,[Wu,(0,n.Wm)(d,{modelValue:e.actor,"onUpdate:modelValue":t[1]||(t[1]=t=>e.actor=t),outlined:"",dense:"",class:"bg-white"},null,8,["modelValue"])]),(0,n._)("div",Vu,[Zu,(0,n.Wm)(d,{modelValue:e.permission,"onUpdate:modelValue":t[2]||(t[2]=t=>e.permission=t),outlined:"",dense:"",class:"bg-white"},null,8,["modelValue"])])])])),_:1})])),_:1}),(0,n.Wm)(v,{modelValue:e.openTransaction,"onUpdate:modelValue":t[3]||(t[3]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])],64)}var zu=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const Mu=(0,n.aZ)({name:"ContractActions",components:{ViewTransaction:Bn.Z},setup(){const e=(0,c.iH)({}),t=(0,c.iH)(""),a=(0,Sa.useStore)(),o=(0,c.iH)(""),l=(0,c.iH)(!1),s=(0,c.iH)(a.state.account.TransactionId),i=(0,c.iH)(a.state.account.TransactionError),u=(0,n.Fl)((()=>a.state.account.abi.abi.actions.map((e=>e.name)))),r=(0,c.iH)(u.value[0]),d=(0,n.Fl)((()=>a.state.account.abi.abi.structs.find((e=>e.name===r.value)).fields));function m(){return zu(this,void 0,void 0,(function*(){yield a.dispatch("account/sendAction",{name:r.value,actor:o.value,permission:t.value,data:e.value}),l.value=!0}))}function v(){for(let t in e.value){const a=d.value.find((e=>e.name===t));"bool"===a.type&&("true"===e.value[t]||"1"===e.value[t]||"True"===e.value[t]||"T"===e.value[t]||"t"===e.value[t]?e.value[t]=!0:e.value[t]=!1)}}return(0,n.bv)((()=>zu(this,void 0,void 0,(function*(){o.value=yield a.state.account.user.getAccountName(),t.value=a.state.account.accountPermission})))),{action:r,actions:u,fields:d,memo:e,signAction:m,actor:o,permission:t,openTransaction:l,transactionId:s,transactionError:i,formatMemo:v}}}),Fu=(0,q.Z)(Mu,[["render",Nu]]),Hu=Fu;Z()(Mu,"components",{QCard:D.Z,QCardSection:ue.Z,QSelect:To.Z,QBtn:ne.Z,QInput:fa.Z});var Ru=a(18803),Uu=a.n(Ru);const Qu=(0,n.aZ)({name:"ContractTabs",setup(){const e=(0,Sa.useStore)(),t=(0,Ia.yj)(),a=(0,Ia.tv)(),o=(0,c.iH)(t.query["tab1"]||"tables"),l=(0,n.Fl)((()=>e.state.account.abi));return(0,n.YP)([o],(()=>{let e=Object.assign({},t.query);e["tab1"]=o.value,a.push({path:a.currentRoute.value.path,query:e})})),{tab:o,abi:l}},components:{ContractTables:xu,ContractActions:Hu,JsonViewer:Uu()}}),ju=(0,q.Z)(Qu,[["render",au]]),Lu=ju;Z()(Qu,"components",{QTabs:Bl.Z,QTab:Ol.Z,QTabPanels:$l.Z,QTabPanel:Yl.Z,QCard:D.Z,QCardSection:ue.Z});var Eu=a(22231),Pu=a(17779),Bu=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const Ou={class:"row col-12 q-my-xs justify-center text-left container-max-width"},$u={class:"row col-11"},Yu={class:"row col-12 q-mt-lg"},Gu=(0,n._)("div",null,[(0,n._)("p",{class:"panel-title"},"Votes for Block Producers")],-1),Ku={class:"info-wrap"},Ju={class:"row voted-producers q-pa-md"},Xu={key:0,class:"producers-list"},er=["href"],tr=(0,n.aZ)({props:{account:{type:String,required:!0}},setup(e){const t=e,a=(0,c.iH)([]);return(0,n.wF)((()=>Bu(this,void 0,void 0,(function*(){try{const{account:{voter_info:{producers:e}}}=yield(0,Eu.V6)(t.account);a.value=e}catch(e){Pu.error(e)}})))),(e,t)=>{const o=(0,n.up)("q-space"),l=(0,n.up)("q-separator");return(0,n.wg)(),(0,n.iD)("div",Ou,[(0,n._)("div",$u,[(0,n._)("div",Yu,[Gu,(0,n.Wm)(o)]),(0,n.Wm)(l,{class:"row col-12 q-mt-md separator"}),(0,n._)("div",Ku,[(0,n._)("div",Ju,[(0,n._)("p",null,"Currently voting for the "+(0,r.zw)(a.value.length)+" out of 30 possible block producers:",1),a.value.length?((0,n.wg)(),(0,n.iD)("div",Xu,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(a.value,(e=>((0,n.wg)(),(0,n.iD)("span",{key:e,class:"producer-name"},[(0,n._)("a",{href:`/account/${e}`},(0,r.zw)(e),9,er)])))),128))])):(0,n.kq)("",!0)])])])])}}});var ar=a(77741);const nr=tr,or=nr;Z()(tr,"components",{QSpace:S.Z,QSeparator:I.Z,QColor:ar.Z});var lr=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{c(n.next(e))}catch(t){l(t)}}function i(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(s,i)}c((n=n.apply(e,t||[])).next())}))};const sr=(0,n.aZ)({name:"AccountPage",components:{TransactionsTable:u.Z,TokensPanel:z,KeysPanel:ge,ChildrenPanel:Se,AccountCard:Jc,ContractTabs:Lu,BpVotes:or},setup(){const e=(0,Sa.useStore)(),t=(0,Ia.yj)(),a=(0,Ia.tv)(),o=(0,n.Fl)((()=>qa.Z.get().getCurrentChain().getUiCustomization().accountPageSettings)),l=(0,c.iH)(t.query["tab"]||"transactions"),s=(0,n.Fl)((()=>t.params.account||"")),i=(0,n.Fl)((()=>e.state.account.abi.abi)),u=(0,c.iH)(k.h.getTokens(s.value));return(0,n.bv)((()=>lr(this,void 0,void 0,(function*(){yield e.dispatch("account/updateABI",t.params.account)})))),(0,n.YP)([l],(()=>{a.push({path:a.currentRoute.value.path,query:{tab:l.value}})})),{tab:l,account:s,abi:i,tokenList:u,accountPageSettings:o}}}),ir=(0,q.Z)(sr,[["render",i]]),cr=ir;Z()(sr,"components",{QTabs:Bl.Z,QTab:Ol.Z,QTabPanels:$l.Z,QTabPanel:Yl.Z})},48048:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDQiIGhlaWdodD0iNDQiIHZpZXdCb3g9IjAgMCA0NCA0NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNCIgeT0iMTIiIHdpZHRoPSIzNiIgaGVpZ2h0PSIyMCIgcng9IjciIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIvPgo8cGF0aCBkPSJNMTYgMThIMTRDMTIuODk1NCAxOCAxMiAxOC44OTU0IDEyIDIwVjI0QzEyIDI1LjEwNDYgMTIuODk1NCAyNiAxNCAyNkgxNiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTI3IDE4TDI3IDI0QzI3IDI1LjEwNDYgMjcuODk1NCAyNiAyOSAyNkwzMCAyNkMzMS4xMDQ2IDI2IDMyIDI1LjEwNDYgMzIgMjRMMzIgMTgiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0yMCAyMS43ODk1SDIyLjEwNTNDMjMuMTUxNyAyMS43ODk1IDI0IDIwLjk0MTIgMjQgMTkuODk0N1YxOS44OTQ3QzI0IDE4Ljg0ODMgMjMuMTUxNyAxOCAyMi4xMDUzIDE4SDE5VjI2IiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTIgMzJWMzQuNTcxNEMxMiAzNS4zNjA0IDEyLjYzOTYgMzYgMTMuNDI4NiAzNlYzNkMxNC4yMTc1IDM2IDE0Ljg1NzEgMzUuMzYwNCAxNC44NTcxIDM0LjU3MTRWMzIiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0yMC41NzE0IDMyVjM0LjU3MTRDMjAuNTcxNCAzNS4zNjA0IDIxLjIxMSAzNiAyMiAzNlYzNkMyMi43ODkgMzYgMjMuNDI4NiAzNS4zNjA0IDIzLjQyODYgMzQuNTcxNFYzMiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTI5LjE0MjkgMzJWMzQuNTcxNEMyOS4xNDI5IDM1LjM2MDQgMjkuNzgyNSAzNiAzMC41NzE1IDM2VjM2QzMxLjM2MDQgMzYgMzIgMzUuMzYwNCAzMiAzNC41NzE0VjMyIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTIgMTJWOS40Mjg1N0MxMiA4LjYzOTU5IDEyLjYzOTYgOCAxMy40Mjg2IDhWOEMxNC4yMTc1IDggMTQuODU3MSA4LjYzOTU5IDE0Ljg1NzEgOS40Mjg1N1YxMiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIwLjU3MTQgMTJWOS40Mjg1N0MyMC41NzE0IDguNjM5NTkgMjEuMjExIDggMjIgOFY4QzIyLjc4OSA4IDIzLjQyODYgOC42Mzk1OSAyMy40Mjg2IDkuNDI4NTdWMTIiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0yOS4xNDI5IDEyVjkuNDI4NTdDMjkuMTQyOSA4LjYzOTU5IDI5Ljc4MjUgOCAzMC41NzE1IDhWOEMzMS4zNjA0IDggMzIgOC42Mzk1OSAzMiA5LjQyODU3VjEyIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K"}}]); \ No newline at end of file diff --git a/dist/spa/js/827.eb5aa052.js b/dist/spa/js/827.eb5aa052.js deleted file mode 100644 index fbbe416..0000000 --- a/dist/spa/js/827.eb5aa052.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[827],{28038:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>cr});var n=a(59835);const o={class:"row col-12"},l={class:"column col-12 header-support"},i={class:"row"};function s(e,t,a,s,c,u){const r=(0,n.up)("AccountCard"),d=(0,n.up)("q-tab"),m=(0,n.up)("q-tabs"),v=(0,n.up)("TransactionsTable"),p=(0,n.up)("q-tab-panel"),g=(0,n.up)("ContractTabs"),w=(0,n.up)("TokensPanel"),h=(0,n.up)("KeysPanel"),f=(0,n.up)("BpVotes"),b=(0,n.up)("ChildrenPanel"),y=(0,n.up)("q-tab-panels");return(0,n.wg)(),(0,n.iD)("div",o,[(0,n._)("div",l,[(0,n._)("div",i,[(0,n.Wm)(r,{class:"account-card",account:e.account,tokens:e.tokenList},null,8,["account","tokens"])]),(0,n.Wm)(m,{modelValue:e.tab,"onUpdate:modelValue":t[0]||(t[0]=t=>e.tab=t),class:"account-view tabs","no-caps":""},{default:(0,n.w5)((()=>[e.accountPageSettings.hideTransactionTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(d,{key:0,name:"transactions",label:"Transactions"})),!e.accountPageSettings.hideContractsTab&&e.abi?((0,n.wg)(),(0,n.j4)(d,{key:1,name:"contract",label:"Contract"})):(0,n.kq)("",!0),e.accountPageSettings.hideTokensTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(d,{key:2,name:"tokens",label:"Tokens"})),e.accountPageSettings.hideKeysTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(d,{key:3,name:"keys",label:"Keys"})),(0,n.Wm)(d,{name:"votes",label:"Votes"}),e.accountPageSettings.hideChildrenTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(d,{key:4,name:"children",label:"Children"}))])),_:1},8,["modelValue"])]),(0,n.Wm)(y,{modelValue:e.tab,"onUpdate:modelValue":t[1]||(t[1]=t=>e.tab=t),class:"col-12"},{default:(0,n.w5)((()=>[e.accountPageSettings.hideTransactionTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(p,{key:0,name:"transactions"},{default:(0,n.w5)((()=>[(0,n.Wm)(v,{account:e.account,showTransferLabel:!0,"show-pagination-extras":!0},null,8,["account"])])),_:1})),!e.accountPageSettings.hideContractsTab&&e.abi?((0,n.wg)(),(0,n.j4)(p,{key:1,name:"contract"},{default:(0,n.w5)((()=>[(0,n.Wm)(g)])),_:1})):(0,n.kq)("",!0),e.accountPageSettings.hideTokensTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(p,{key:2,name:"tokens"},{default:(0,n.w5)((()=>[(0,n.Wm)(w,{account:e.account},null,8,["account"])])),_:1})),e.accountPageSettings.hideKeysTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(p,{key:3,name:"keys"},{default:(0,n.w5)((()=>[(0,n.Wm)(h,{account:e.account},null,8,["account"])])),_:1})),(0,n.Wm)(p,{name:"votes"},{default:(0,n.w5)((()=>[(0,n.Wm)(f,{account:e.account},null,8,["account"])])),_:1}),e.accountPageSettings.hideChildrenTab?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(p,{key:4,name:"children"},{default:(0,n.w5)((()=>[(0,n.Wm)(b,{account:e.account},null,8,["account"])])),_:1}))])),_:1},8,["modelValue"])])}var c=a(60499),u=a(59311),r=a(86970);const d=e=>((0,n.dD)("data-v-09a9d996"),e=e(),(0,n.Cn)(),e),m={class:"row col-12 q-my-xs justify-center text-left container-max-width"},v={class:"row col-11"},p={class:"row col-12 q-mt-lg"},g=d((()=>(0,n._)("div",null,[(0,n._)("p",{class:"panel-title"},"Tokens")],-1))),w={class:"col-12 q-mt-md tokens-container"},h={key:0},f=["src"],b=["innerHTML"],y={class:"text-bold"};function _(e,t,a,o,l,i){const s=(0,n.up)("q-space"),c=(0,n.up)("q-separator"),u=(0,n.up)("q-avatar"),d=(0,n.up)("q-item-section"),_=(0,n.up)("q-item"),k=(0,n.up)("q-card");return(0,n.wg)(),(0,n.iD)("div",m,[(0,n._)("div",v,[(0,n._)("div",p,[g,(0,n.Wm)(s)]),(0,n.Wm)(c,{class:"row col-12 q-mt-md separator"}),(0,n._)("div",w,[0===e.tokens.length?((0,n.wg)(),(0,n.iD)("div",h,"No tokens found")):(0,n.kq)("",!0),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.tokens,(e=>((0,n.wg)(),(0,n.j4)(k,{key:`${e.contract}-${e.symbol}`,class:"token-card"},{default:(0,n.w5)((()=>[(0,n.Wm)(_,null,{default:(0,n.w5)((()=>[(0,n.Wm)(d,{class:"items-center",avatar:""},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{class:"shadow-3",color:"white",size:"2.8rem"},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{size:"1.2em"},{default:(0,n.w5)((()=>[(0,n._)("img",{src:e.logo},null,8,f)])),_:2},1024)])),_:2},1024)])),_:2},1024),(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[(0,n._)("div",{innerHTML:e.contract},null,8,b),(0,n._)("div",y,(0,r.zw)(`${e.amount} ${e.symbol}`),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])])])}var k=a(21889),x=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const T=(0,n.aZ)({name:"TokensPanel",props:{account:{type:String,required:!1,default:null}},setup(e){const t=(0,c.iH)([]),a=(0,c.Vh)(e,"account"),o=e=>{const t=window.location.search,a=new URLSearchParams(t);return a.has(e)?a.get(e).split(","):[]},l=()=>x(this,void 0,void 0,(function*(){const e=yield k.h.getTokens(a.value),n=o("code"),l=o("symbol");let s=e.filter((e=>0===n.length||n.some((t=>t===e.contract)))).filter((e=>0===l.length||l.some((t=>t===e.symbol))));t.value=s.map((e=>Object.assign(Object.assign({},e),{contract:i(e.contract,"account")}))),t.value=t.value.filter((e=>null!==e.amount))})),i=(e,t)=>`${e}`;return(0,n.bv)((()=>x(this,void 0,void 0,(function*(){yield l()})))),{tokens:t,formatAccount:i,loadTokens:l}}});var q=a(11639),I=a(90136),S=a(50926),D=a(44458),C=a(490),A=a(76749),W=a(61357),V=a(69984),Z=a.n(V);const N=(0,q.Z)(T,[["render",_],["__scopeId","data-v-09a9d996"]]),z=N;Z()(T,"components",{QSpace:I.Z,QSeparator:S.Z,QCard:D.Z,QItem:C.Z,QItemSection:A.Z,QAvatar:W.Z});const M=e=>((0,n.dD)("data-v-24ab2455"),e=e(),(0,n.Cn)(),e),R={class:"row col-12 q-my-xs justify-center text-left container-max-width"},F={class:"row col-11"},H={class:"row col-12 q-mt-lg"},U=M((()=>(0,n._)("div",null,[(0,n._)("p",{class:"panel-title"},"Keys and Permissions")],-1))),Q={class:"permissions-container col-12 q-py-lg"};function j(e,t,a,o,l,i){const s=(0,n.up)("q-space"),c=(0,n.up)("q-separator"),u=(0,n.up)("PermissionCard");return(0,n.wg)(),(0,n.iD)("div",R,[(0,n._)("div",F,[(0,n._)("div",H,[U,(0,n.Wm)(s)]),(0,n.Wm)(c,{class:"row col-12 q-mt-md separator"}),(0,n._)("div",Q,[e.permission?((0,n.wg)(),(0,n.j4)(u,{key:0,class:"permissions",permission:e.permission,depth:0},null,8,["permission"])):(0,n.kq)("",!0)])])])}const L={key:0},E={class:"text-bold"},P=["innerHTML"],B={key:0};function O(e,t,a,o,l,i){const s=(0,n.up)("q-card-section"),c=(0,n.up)("KeyToggle"),u=(0,n.up)("q-card"),d=(0,n.up)("permission-card",!0);return e.permissionLocal?((0,n.wg)(),(0,n.iD)("div",L,[(0,n._)("div",{class:(0,r.C_)(["children row",e.permissionCardClass])},[(0,n._)("div",{class:(0,r.C_)(["branch column",""+(e.depth>0?"":"borderless")])},[(0,n._)("div",{class:(0,r.C_)(["col",e.branchTopClass])},null,2),(0,n._)("div",{class:(0,r.C_)(["col",e.branchBottomClass])},null,2)],2),(0,n.Wm)(u,{class:"permission-card col q-mt-md",flat:""},{default:(0,n.w5)((()=>[(0,n.Wm)(s,{horizontal:""},{default:(0,n.w5)((()=>[(0,n.Wm)(s,{class:"permission-name-section row items-center justify-center"},{default:(0,n.w5)((()=>[(0,n._)("div",E,(0,r.zw)(`${e.permissionLocal.perm_name} (${e.permissionLocal.required_auth.threshold})`),1)])),_:1}),(0,n.Wm)(s,{class:"permission-key-section"},{default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.permissionLocal.required_auth.keys,(e=>((0,n.wg)(),(0,n.iD)("div",{key:e.key.toString()},[(0,n.Wm)(c,{weight:e.weight,pubkey:e.key},null,8,["weight","pubkey"])])))),128)),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.permissionLocal.required_auth.accounts,(t=>{var a;return(0,n.wg)(),(0,n.iD)("div",{key:`${t.permission.actor}-${t.permission.permission}`},[(0,n._)("div",null,[(0,n._)("span",null,(0,r.zw)(`+${t.weight}     `),1),(0,n._)("span",{class:"text-bold",innerHTML:e.formatAccount(null===(a=t.permission.actor)||void 0===a?void 0:a.toString(),"account")},null,8,P),(0,n._)("span",null," @"+(0,r.zw)(t.permission.permission),1)])])})),128)),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.permissionLocal.required_auth.waits,(t=>((0,n.wg)(),(0,n.iD)("div",{key:`${t.wait_sec}-${t.weight}`},[(0,n._)("div",null,[(0,n._)("span",null,(0,r.zw)(`+${t.weight}     `),1),(0,n._)("span",null,(0,r.zw)(e.formatWait(t.wait_sec.value)),1)])])))),128))])),_:1}),e.permissionLocal.permission_links.length>0?((0,n.wg)(),(0,n.j4)(s,{key:0,class:"permission-action-section"},{default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.permissionLocal.permission_links,(e=>((0,n.wg)(),(0,n.iD)("div",{key:e.action},(0,r.zw)(e.code)+"::"+(0,r.zw)(e.action),1)))),128))])),_:1})):(0,n.kq)("",!0)])),_:1})])),_:1})],2),e.permission.children&&e.permission.children.length?((0,n.wg)(),(0,n.iD)("div",B,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.permissionLocal.children,((t,a)=>((0,n.wg)(),(0,n.iD)("div",{key:t.perm_name.toString()},[(0,n.Wm)(d,{class:"permission-card-wrapper",permission:t,depth:e.depth+1,isLast:a==e.permissionLocal.children.length-1},null,8,["permission","depth","isLast"])])))),128))])):(0,n.kq)("",!0)])):(0,n.kq)("",!0)}const $={class:"row q-pb-md"},Y={class:"col wrap"},G=["href"],K=(0,n.Uk)(" ");function J(e,t,a,o,l,i){const s=(0,n.up)("q-btn");return(0,n.wg)(),(0,n.iD)("div",$,[(0,n._)("div",Y,[(0,n._)("a",{class:"hover-dec",href:"/key/"+e.keyDisplay},(0,r.zw)(`+${e.weight}     ${e.keyDisplay}`),9,G),(0,n.Wm)(s,{class:"rotate-315",flat:"",round:"",color:"black",icon:"vpn_key",size:"xs",onClick:t[0]||(t[0]=t=>e.toggleKey())},{default:(0,n.w5)((()=>[K])),_:1}),(0,n.Wm)(s,{flat:"",round:"",color:"black",icon:"content_copy",size:"xs",onClick:t[1]||(t[1]=t=>e.copy(e.keyDisplay))})])])}var X=a(19302),ee=a(65054),te=a(61753);const ae=(0,n.aZ)({name:"KeyToggle",props:{pubkey:{type:te.PublicKey,required:!0},weight:{type:te.Weight,required:!0}},setup(e){const t=(0,c.iH)(e.pubkey),a=(0,c.iH)(!1),o=(0,X.Z)(),l=(0,n.Fl)((()=>a.value?t.value.toLegacyString():t.value.toString()));function i(e){(0,ee.Z)(e).then((()=>{o.notify({color:"green-4",textColor:"white",message:"Copied to clipboard",timeout:1e3})})).catch((()=>{o.notify({color:"red-8",textColor:"white",message:"Could not copy",timeout:1e3})}))}function s(){a.value=!a.value}return{keyDisplay:l,copy:i,toggleKey:s}}});var ne=a(68879);const oe=(0,q.Z)(ae,[["render",J],["__scopeId","data-v-48846258"]]),le=oe;Z()(ae,"components",{QBtn:ne.Z});var ie=a(43878),se=a.n(ie);const ce=(0,n.aZ)({name:"PermissionCard",components:{KeyToggle:le},props:{permission:{type:Object,required:!0},depth:{type:Number,default:0},isLast:{type:Boolean,default:!1}},setup(e){const{depth:t,isLast:a}=(0,c.BK)(e),o=(0,n.Fl)((()=>a.value?"branch-corner":"branch-side-top")),l=(0,n.Fl)((()=>a.value?"":"branch-side")),i=(0,n.Fl)((()=>0===t.value?"owner-permission":"")),s=(0,n.Fl)((()=>{const{permission:t}=(0,c.BK)(e);return t.value})),u=(e,t)=>`${e}`,r=e=>se().duration(e,"seconds").humanize()+" wait";return{branchTopClass:o,branchBottomClass:l,permissionCardClass:i,formatAccount:u,formatWait:r,permissionLocal:s}}});var ue=a(63190);const re=(0,q.Z)(ce,[["render",O],["__scopeId","data-v-a39da8b8"]]),de=re;Z()(ce,"components",{QCard:D.Z,QCardSection:ue.Z});var me=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const ve=(0,n.aZ)({name:"KeysPanel",components:{PermissionCard:de},props:{account:{type:String,required:!1,default:null}},setup(e){const t=(0,n.Fl)((()=>e.account)),a=(0,c.iH)(null),o=(0,X.Z)(),l=()=>me(this,void 0,void 0,(function*(){let e;try{e=yield k.h.getAccount(t.value)}catch(s){return void o.notify(`Keys for account ${t.value} not found!`)}const n=e.permissions;let l;try{l=yield k.h.getPermissionLinks(t.value)}catch(s){return void o.notify(`Permission links for account ${t.value} not found!`)}for(let t of n)t["permission_links"]=l.filter((e=>e.permission===t.perm_name.toString()));a.value=i(n)})),i=e=>{let t;t=e.find((e=>"owner"===e.perm_name.toString()));let a=e.filter((e=>"owner"!==e.perm_name.toString()));const n=(e,t)=>{let a=t.filter((t=>t.parent.toString()===e.perm_name.toString()));for(let o of a)o.children=n(o,t);return a};return t.children=n(t,a),t};return(0,n.bv)((()=>{l()})),{permission:a}}}),pe=(0,q.Z)(ve,[["render",j],["__scopeId","data-v-24ab2455"]]),ge=pe;Z()(ve,"components",{QSpace:I.Z,QSeparator:S.Z});const we=e=>((0,n.dD)("data-v-bb419418"),e=e(),(0,n.Cn)(),e),he={class:"row col-12 q-mt-lg q-mb-xs q-px-xl justify-center text-left container-max-width"},fe=we((()=>(0,n._)("p",{class:"panel-title"},"Children",-1))),be={class:"col-12 q-py-lg row"},ye={key:0},_e=["innerHTML"];function ke(e,t,a,o,l,i){const s=(0,n.up)("q-space"),c=(0,n.up)("q-separator");return(0,n.wg)(),(0,n.iD)("div",he,[fe,(0,n.Wm)(s),(0,n.Wm)(c,{class:"row col-12 q-mt-md separator"}),(0,n._)("div",be,[0==e.children.length?((0,n.wg)(),(0,n.iD)("div",ye,"No children found")):(0,n.kq)("",!0),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.children,(e=>((0,n.wg)(),(0,n.iD)("div",{key:e,class:"child",innerHTML:e},null,8,_e)))),128))])])}var xe=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const Te=(0,n.aZ)({name:"ChildrenPanel",components:{},props:{account:{type:String,required:!1,default:null}},setup(e){const t=(0,X.Z)(),a=(0,c.iH)([]),o=()=>xe(this,void 0,void 0,(function*(){let n;try{n=yield k.h.getChildren(e.account)}catch(o){return void t.notify(`Keys for account ${e.account} not found!`)}a.value=n.map((e=>l(e.act.data.newact,"account")))})),l=(e,t)=>`${e}`;return(0,n.bv)((()=>xe(this,void 0,void 0,(function*(){yield o()})))),{children:a,loadAccountData:o}}}),qe=(0,q.Z)(Te,[["render",ke],["__scopeId","data-v-bb419418"]]),Ie=qe;Z()(Te,"components",{QSpace:I.Z,QSeparator:S.Z});const Se=e=>((0,n.dD)("data-v-cc1b473a"),e=e(),(0,n.Cn)(),e),De={class:"q-pa-md"},Ce={class:"inline-section"},Ae={class:"row justify-center full-height items-center"},We={key:0,class:"col-6"},Ve={class:"text-title"},Ze={key:1,class:"col-2"},Ne={class:"text-title"},ze={class:"col-1"},Me={key:0,class:"text-subtitle"},Re=(0,n.Uk)(" created by "),Fe=(0,n.Uk)(" "),He=(0,n.Uk)(" "),Ue=(0,n.Uk)(" "),Qe={key:1,class:"text-subtitle"},je=(0,n.Uk)("created"),Le=Se((()=>(0,n._)("span",null," ",-1))),Ee=(0,n.Uk)(" "),Pe={key:0,class:"resources"},Be={key:1,class:"resources"},Oe={class:"usage"},$e={class:"row justify-center q-gutter-sm"},Ye={key:0,class:"col-3"},Ge={key:1,class:"col-3"},Ke={key:2,class:"col-3"},Je={key:0},Xe={class:"inline-section"},et={class:"row justify-center full-height items-center"},tt=Se((()=>(0,n._)("div",{class:"col-8"},null,-1))),at={class:"text-title text-center"};function nt(e,t,a,o,l,i){const s=(0,n.up)("q-btn"),c=(0,n.up)("DateField"),u=(0,n.up)("q-tooltip"),d=(0,n.up)("q-icon"),m=(0,n.up)("q-space"),v=(0,n.up)("PercentCircle"),p=(0,n.up)("q-card-section"),g=(0,n.up)("SendDialog"),w=(0,n.up)("ResourcesDialog"),h=(0,n.up)("StakingDialog"),f=(0,n.up)("q-card");return(0,n.wg)(),(0,n.iD)("div",De,[e.accountExists?((0,n.wg)(),(0,n.j4)(f,{key:0,class:"account-card"},{default:(0,n.w5)((()=>[(0,n.Wm)(p,{class:"resources-container"},{default:(0,n.w5)((()=>[(0,n._)("div",Ce,[(0,n._)("div",Ae,[e.account!==e.system_account?((0,n.wg)(),(0,n.iD)("div",We,[(0,n._)("div",Ve,(0,r.zw)(e.account),1)])):((0,n.wg)(),(0,n.iD)("div",Ze,[(0,n._)("div",Ne,(0,r.zw)(e.account),1)])),(0,n._)("div",ze,[(0,n.Wm)(s,{class:"float-right",flat:"",round:"",color:"white",icon:"content_copy",size:"sm",onClick:t[0]||(t[0]=t=>e.copy(e.account))})])]),e.creatingAccount&&"__self__"!==e.creatingAccount?((0,n.wg)(),(0,n.iD)("div",Me,[Re,(0,n._)("span",null,[Fe,(0,n._)("a",{onClick:t[1]||(t[1]=(...t)=>e.loadCreatorAccount&&e.loadCreatorAccount(...t))},(0,r.zw)(e.creatingAccount),1),He]),(0,n._)("div",null,[(0,n.Wm)(c,{timestamp:e.createTime,showAge:""},{default:(0,n.w5)((()=>[Ue])),_:1},8,["timestamp"]),(0,n.Wm)(u,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,r.zw)(e.createTimeFormat),1)])),_:1})]),(0,n._)("a",{class:"q-ml-xs tx-link",onClick:t[2]||(t[2]=(...t)=>e.loadCreatorTransaction&&e.loadCreatorTransaction(...t))},[(0,n.Wm)(d,{name:"fas fa-link"})])])):((0,n.wg)(),(0,n.iD)("div",Qe,[je,Le,(0,n._)("div",null,[(0,n.Wm)(c,{timestamp:e.createTime,showAge:""},{default:(0,n.w5)((()=>[Ee])),_:1},8,["timestamp"]),(0,n.Wm)(u,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,r.zw)(e.createTimeFormat),1)])),_:1})])])),(0,n.Wm)(m)]),e.account!==e.system_account?((0,n.wg)(),(0,n.iD)("div",Pe,[e.accountPageSettings.hideCpuInfo?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(v,{key:0,radius:e.radius,fraction:e.cpu_used,total:e.cpu_max,label:"CPU",unit:"s"},null,8,["radius","fraction","total"])),e.accountPageSettings.hideNetInfo?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(v,{key:1,radius:e.radius,fraction:e.net_used,total:e.net_max,label:"NET",unit:e.netUnit},null,8,["radius","fraction","total","unit"])),e.accountPageSettings.hideRamInfo?(0,n.kq)("",!0):((0,n.wg)(),(0,n.j4)(v,{key:2,radius:e.radius,fraction:e.ram_used,total:e.ram_max,label:"RAM",unit:e.ramUnit},null,8,["radius","fraction","total","unit"]))])):e.accountPageSettings.hideRamInfo?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("div",Be,[(0,n._)("div",Oe,"RAM USED: "+(0,r.zw)(e.ram_used)+" "+(0,r.zw)(e.ramUnit),1)]))])),_:1}),(0,n.Wm)(p,{class:"resources-container"},{default:(0,n.w5)((()=>[(0,n._)("div",$e,[e.isAccount?((0,n.wg)(),(0,n.iD)("div",Ye,[(0,n.Wm)(s,{disable:e.tokensLoading||e.isLoading,label:e.tokensLoading?"Loading...":"Send",color:"primary",class:"full-width",onClick:t[3]||(t[3]=t=>e.openSendDialog=!0)},null,8,["disable","label"])])):(0,n.kq)("",!0),e.isAccount&&!e.accountPageSettings.hideResourcesControl?((0,n.wg)(),(0,n.iD)("div",Ge,[(0,n.Wm)(s,{disable:e.tokensLoading||e.isLoading,label:e.tokensLoading?"Loading...":"Resources",class:"full-width",color:"primary",onClick:t[4]||(t[4]=t=>e.openResourcesDialog=!0)},null,8,["disable","label"])])):(0,n.kq)("",!0),e.isAccount&&!e.accountPageSettings.hideRexControl?((0,n.wg)(),(0,n.iD)("div",Ke,[(0,n.Wm)(s,{disable:e.tokensLoading||e.isLoading,label:e.tokensLoading?"Loading...":"Staking (REX)",class:"ellipsis full-width",color:"primary",onClick:t[5]||(t[5]=t=>e.openStakingDialog=!0)},null,8,["disable","label"])])):(0,n.kq)("",!0)])])),_:1}),e.isAccount?((0,n.wg)(),(0,n.iD)("div",Je,[e.openSendDialog?((0,n.wg)(),(0,n.j4)(g,{key:0,modelValue:e.openSendDialog,"onUpdate:modelValue":t[6]||(t[6]=t=>e.openSendDialog=t),availableTokens:e.availableTokens,onUpdateTokenBalances:e.updateTokenBalances},null,8,["modelValue","availableTokens","onUpdateTokenBalances"])):(0,n.kq)("",!0),e.openResourcesDialog?((0,n.wg)(),(0,n.j4)(w,{key:1,modelValue:e.openResourcesDialog,"onUpdate:modelValue":t[7]||(t[7]=t=>e.openResourcesDialog=t)},null,8,["modelValue"])):(0,n.kq)("",!0),(0,n.Wm)(h,{modelValue:e.openStakingDialog,"onUpdate:modelValue":t[8]||(t[8]=t=>e.openStakingDialog=t),availableTokens:e.availableTokens},null,8,["modelValue","availableTokens"])])):(0,n.kq)("",!0)])),_:1})):((0,n.wg)(),(0,n.j4)(f,{key:1,class:"account-card"},{default:(0,n.w5)((()=>[(0,n.Wm)(p,{class:"resources-container"},{default:(0,n.w5)((()=>[(0,n._)("div",Xe,[(0,n._)("div",et,[tt,(0,n._)("div",at,"Sorry, the account "+(0,r.zw)(e.account)+" could not be found.",1)])])])),_:1})])),_:1}))])}var ot=a(13385);const lt={class:"chart-container"},it=["viewBox"],st=["d"],ct=["stroke-dasharray","d","stroke"],ut=["y"],rt=["y"],dt={class:"text usage"},mt={class:"text usage"},vt={class:"text usage"};function pt(e,t,a,o,l,i){return(0,n.wg)(),(0,n.iD)("div",lt,[((0,n.wg)(),(0,n.iD)("svg",{class:"circular-chart",style:(0,r.j5)({"max-width":e.containerWidth}),viewBox:`${6*-e.offset} ${-e.offset/2} ${e.containerWidth} ${e.containerWidth}`},[(0,n._)("path",{class:"circle-bg",d:`M18 2 a ${e.radius} ${e.radius} 0 0 1 0 88 a ${e.radius} ${e.radius} 0 0 1 0 ${-e.diameter}`},null,8,st),(0,n._)("path",{class:"circle","stroke-dasharray":e.dashArray,d:`M18 2 a ${e.radius} ${e.radius} 0 0 1 0 88 a ${e.radius} ${e.radius} 0 0 1 0 ${-e.diameter}`,stroke:e.strokeColor,style:(0,r.j5)({"stroke-opacity":Number.isNaN(e.formatResourcePercent)?0:1,stroke:!Number.isNaN(e.formatResourcePercent)&&Number(e.formatResourcePercent)>80?"red":"white"})},null,12,ct),(0,n._)("text",{class:"text label",x:"18",y:e.radius-e.offset},(0,r.zw)(e.label),9,ut),(0,n._)("text",{class:"text percentage",x:"20",y:e.radius+12},(0,r.zw)(e.formatResourcePercent)+"%",9,rt)],12,it)),(0,n._)("p",dt,"USED: "+(0,r.zw)(e.fraction)+" "+(0,r.zw)(e.unit),1),(0,n._)("p",mt,"TOTAL: "+(0,r.zw)(e.total)+" "+(0,r.zw)(e.unit),1),(0,n._)("p",vt,"AVAILABLE: "+(0,r.zw)(e.available)+" "+(0,r.zw)(e.unit),1)])}const gt=3.1459,wt=(0,n.aZ)({name:"PercentCircle",props:{fraction:{type:Number,required:!0},total:{type:Number,required:!0},label:{type:String,default:""},radius:{type:Number,required:!0},unit:{type:String,default:""}},setup(e){const t=(0,c.iH)(5),{fraction:a,total:o,radius:l,unit:i}=(0,c.BK)(e),s=(0,n.Fl)((()=>2*l.value)),u=(0,n.Fl)((()=>2*gt*l.value)),r=(0,n.Fl)((()=>s.value+2*t.value)),d=(0,n.Fl)((()=>a.value&&o.value?(a.value/o.value*100).toFixed(2):"0")),m=(0,n.Fl)((()=>parseFloat(d.value)>=90?"red":"white")),v=(0,n.Fl)((()=>`${a.value}${i.value}/${o.value}${i.value}`)),p=(0,n.Fl)((()=>Math.abs(o.value-a.value).toFixed(3))),g=(0,n.Fl)((()=>{if(Number.isNaN(d.value))return"0";const e=parseFloat(d.value)/100*u.value;return`${e}, ${u.value}`}));return{offset:t,diameter:s,circumference:u,containerWidth:r,formatResourcePercent:d,strokeColor:m,fractionUnits:v,available:p,dashArray:g}}}),ht=(0,q.Z)(wt,[["render",pt],["__scopeId","data-v-5e52f638"]]),ft=ht;var bt=a(77122),yt=a.n(bt);const _t=e=>((0,n.dD)("data-v-1c0c7ffe"),e=e(),(0,n.Cn)(),e),kt={class:"row justify-center items-center full-height full-width"},xt={class:"absolute-top-right"},Tt={class:"col-xs-12 col-sm-8 col-md-7 col-lg-6 max-dialog-width"},qt={class:"row"},It=_t((()=>(0,n._)("img",{class:"send-img q-pr-md",src:yt()},null,-1))),St=_t((()=>(0,n._)("div",{class:"text-h4 q-pb-md inline-block color-grey-3"},"Send Tokens",-1))),Dt={key:0,class:"transaction-form text-grey-3 text-weight-light"},Ct={class:"row"},At={class:"col-12"},Wt=_t((()=>(0,n._)("div",{class:"row justify-between q-px-sm q-pb-sm q-gutter-x-sm"},"RECEIVING ACCOUNT",-1))),Vt={class:"row q-py-md"},Zt={class:"col-4"},Nt=_t((()=>(0,n._)("div",{class:"row justify-between q-px-sm q-pb-sm q-gutter-x-sm"},"TOKEN",-1))),zt={class:"col-8 text-subtitle-1 q-mx-sm subtitle"},Mt={class:"col-4"},Rt={class:"row justify-end items-center arrowButton"},Ft={class:"col-8 q-pl-md"},Ht={class:"row justify-between q-pb-sm q-gutter-x-sm"},Ut=_t((()=>(0,n._)("div",null,"AMOUNT",-1))),Qt={class:"color-grey-3 text-weight-bold balance-amount"},jt=(0,n.Uk)("Click to fill full amount"),Lt={class:"row"},Et={class:"col-12"},Pt=_t((()=>(0,n._)("div",{class:"row justify-between q-px-sm q-pb-sm q-gutter-x-sm"},"OPTIONAL MEMO",-1))),Bt={class:"row"},Ot={class:"row"},$t={class:"col-12 q-pt-md"},Yt=_t((()=>(0,n._)("div",{class:"row justify-between q-px-sm q-pb-lg q-gutter-x-sm"},"Your wallet must be open to allow authorization of this transaction.",-1))),Gt={key:1,class:"transaction-result"},Kt={class:"row"},Jt={class:"col-12"},Xt={class:"col-12"},ea=(0,n.Uk)(" Click to view transaction: "),ta={class:"row"},aa={class:"col-12"},na={class:"row"},oa={class:"row"},la={class:"col-12 flex justify-end"};function ia(e,t,a,o,l,i){const s=(0,n.up)("q-btn"),c=(0,n.up)("q-card-section"),u=(0,n.up)("q-separator"),d=(0,n.up)("q-input"),m=(0,n.up)("q-icon"),v=(0,n.up)("q-space"),p=(0,n.up)("q-tooltip"),g=(0,n.up)("CoinSelectorDialog"),w=(0,n.up)("q-card"),h=(0,n.up)("q-dialog"),f=(0,n.Q2)("close-popup");return(0,n.wg)(),(0,n.j4)(h,{persistent:!0,maximized:"",onShow:e.setDefaults,onHide:e.resetForm},{default:(0,n.w5)((()=>[(0,n.Wm)(w,{class:"sendCard"},{default:(0,n.w5)((()=>[(0,n._)("div",kt,[(0,n._)("div",xt,[(0,n.wy)((0,n.Wm)(s,{size:"20px",flat:"",dense:"",round:"",icon:"clear"},null,512),[[f]])]),(0,n._)("div",Tt,[(0,n._)("div",qt,[(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[It,St])),_:1})]),e.transactionForm?((0,n.wg)(),(0,n.iD)("div",Dt,[e.transactionForm?((0,n.wg)(),(0,n.j4)(u,{key:0,dark:""})):(0,n.kq)("",!0),e.transactionForm?((0,n.wg)(),(0,n.j4)(c,{key:1},{default:(0,n.w5)((()=>{var a,o,l;return[(0,n._)("div",Ct,[(0,n._)("div",At,[Wt,(0,n.Wm)(d,{modelValue:e.receivingAccount,"onUpdate:modelValue":t[0]||(t[0]=t=>e.receivingAccount=t),class:"full-width",standout:"standout",dense:"",dark:"","lazy-rules":!0,rules:[t=>e.isValidAccount(t)||"Invalid account name."]},null,8,["modelValue","rules"])])]),(0,n._)("div",Vt,[(0,n._)("div",Zt,[Nt,(0,n._)("div",{class:"row items-center no-wrap selector-container q-py-sm",onClick:t[1]||(t[1]=t=>e.openCoinDialog=!0)},[(0,n._)("div",zt,(0,r.zw)(null===(a=e.sendToken)||void 0===a?void 0:a.symbol),1),(0,n._)("div",Mt,[(0,n._)("div",Rt,[(0,n.Wm)(m,{class:"fas fa-chevron-down q-pr-lg",size:"17px"})])])])]),(0,n._)("div",Ft,[(0,n._)("div",Ht,[Ut,(0,n.Wm)(v),(0,n._)("div",{class:"row flex-center q-hoverable cursor-pointer",onClick:t[2]||(t[2]=(...t)=>e.setMaxValue&&e.setMaxValue(...t))},[(0,n._)("div",Qt,(0,r.zw)(`${null!==(l=null===(o=e.sendToken)||void 0===o?void 0:o.amount)&&void 0!==l?l:0} AVAILABLE`),1),(0,n.Wm)(m,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(p,null,{default:(0,n.w5)((()=>[jt])),_:1})])]),(0,n.Wm)(d,{modelValue:e.sendAmount,"onUpdate:modelValue":t[3]||(t[3]=t=>e.sendAmount=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0",debounce:1e3,rules:[t=>{var a;return t>0&&t<=(null===(a=e.sendToken)||void 0===a?void 0:a.amount)||"invalid amount"}],type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])])]),(0,n._)("div",Lt,[(0,n._)("div",Et,[Pt,(0,n._)("div",Bt,[(0,n.Wm)(d,{modelValue:e.memo,"onUpdate:modelValue":t[4]||(t[4]=t=>e.memo=t),class:"full-width send-input",standout:"bg-deep-purple-2 text-white",dark:"",type:"textarea"},null,8,["modelValue"])])])]),(0,n._)("div",Ot,[(0,n._)("div",$t,[Yt,(0,n.Wm)(s,{class:"full-width button-accent",label:"Confirm",flat:"",disabled:!e.validated,onClick:e.sendTransaction},null,8,["disabled","onClick"])])])]})),_:1})):(0,n.kq)("",!0)])):((0,n.wg)(),(0,n.iD)("div",Gt,[e.transactionId?((0,n.wg)(),(0,n.j4)(c,{key:0},{default:(0,n.w5)((()=>{var a;return[(0,n._)("div",Kt,[(0,n._)("div",Jt,[(0,n._)("div",null,"You successfully sent "+(0,r.zw)(e.sendAmount)+" "+(0,r.zw)(null===(a=e.sendToken)||void 0===a?void 0:a.symbol)+" to "+(0,r.zw)(e.receivingAccount)+".",1)]),(0,n._)("div",Xt,[ea,(0,n._)("a",{class:"ellipsis-overflow text-blue",onClick:t[5]||(t[5]=(...t)=>e.navToTransaction&&e.navToTransaction(...t))},(0,r.zw)(e.transactionId),1)])])]})),_:1})):((0,n.wg)(),(0,n.j4)(c,{key:1},{default:(0,n.w5)((()=>[(0,n._)("div",ta,[(0,n._)("div",aa,[(0,n._)("div",na,"Transaction Failed: "+(0,r.zw)(e.transactionError),1)])])])),_:1})),(0,n._)("div",oa,[(0,n._)("div",la,[(0,n.wy)((0,n.Wm)(s,{flat:"",class:"close-dialog",label:"Close",onClick:e.setDefaults},null,8,["onClick"]),[[f]])])])]))])]),(0,n.Wm)(g,{modelValue:e.openCoinDialog,"onUpdate:modelValue":t[6]||(t[6]=t=>e.openCoinDialog=t),updateSelectedCoin:e.updateSelectedCoin,availableTokens:e.availableTokens},null,8,["modelValue","updateSelectedCoin","availableTokens"])])),_:1})])),_:1},8,["onShow","onHide"])}const sa=e=>((0,n.dD)("data-v-42e19c7f"),e=e(),(0,n.Cn)(),e),ca={class:"dialogHeader"},ua={class:"row justify-between items-center q-pt-sm-center"},ra=sa((()=>(0,n._)("div",{class:"text-h6 q-pl-md"},"Select a token",-1))),da={class:"q-pr-sm"},ma={class:"row"},va={class:"col-12 q-pa-sm"},pa=(0,n.Uk)("No tokens found");function ga(e,t,a,o,l,i){const s=(0,n.up)("q-btn"),c=(0,n.up)("q-input"),u=(0,n.up)("q-separator"),d=(0,n.up)("q-item-label"),m=(0,n.up)("q-item-section"),v=(0,n.up)("q-item"),p=(0,n.up)("q-list"),g=(0,n.up)("q-card"),w=(0,n.up)("q-dialog"),h=(0,n.Q2)("close-popup");return(0,n.wg)(),(0,n.j4)(w,{class:"dialogContainer",onShow:e.filterTokens},{default:(0,n.w5)((()=>[(0,n.Wm)(g,{class:"dialogCard"},{default:(0,n.w5)((()=>[(0,n._)("div",ca,[(0,n._)("div",ua,[ra,(0,n._)("div",da,[(0,n.wy)((0,n.Wm)(s,{size:"12px",flat:"",dense:"",round:"",icon:"clear"},null,512),[[h]])])]),(0,n._)("div",ma,[(0,n._)("div",va,[(0,n.Wm)(c,{modelValue:e.search,"onUpdate:modelValue":t[0]||(t[0]=t=>e.search=t),debounce:"500",outlined:"",dark:"",round:"round",placeholder:"Search contract name or symbol"},null,8,["modelValue"])])])]),(0,n.Wm)(u),(0,n.Wm)(p,{class:"dialogList"},{default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.filteredTokens,(t=>(0,n.wy)(((0,n.wg)(),(0,n.j4)(v,{key:`${t.contract}-${t.symbol}`,clickable:"",onClick:a=>{e.updateSelectedCoin(t)}},{default:(0,n.w5)((()=>[(0,n.Wm)(m,null,{default:(0,n.w5)((()=>[(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,r.zw)(t.symbol),1)])),_:2},1024),(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,r.zw)(t.contract),1)])),_:2},1024)])),_:2},1024),(0,n.Wm)(m,null,{default:(0,n.w5)((()=>[(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,r.zw)(t.amount),1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])),[[h]]))),128)),0==e.availableTokens.length?((0,n.wg)(),(0,n.j4)(v,{key:0},{default:(0,n.w5)((()=>[pa])),_:1})):(0,n.kq)("",!0)])),_:1})])),_:1})])),_:1},8,["onShow"])}const wa=(0,n.aZ)({name:"CoinSelectorDialog",props:{availableTokens:{required:!0,type:Array},updateSelectedCoin:{type:Function,required:!0}},setup(e){const t=(0,c.iH)(""),a=(0,c.iH)([]),o=()=>{t.value.length>0?l(i()):a.value=i()},l=e=>{a.value=e.filter((e=>e.symbol.toLowerCase().includes(t.value.toLowerCase())||e.contract.toLowerCase().includes(t.value.toLowerCase())))},i=()=>e.availableTokens.filter((e=>e.amount>0));return(0,n.YP)(t,(()=>{o()})),{search:t,filteredTokens:a,filterTokens:o,filterByText:l}}});var ha=a(87743),fa=a(13119),ba=a(13246),ya=a(33115),_a=a(62146);const ka=(0,q.Z)(wa,[["render",ga],["__scopeId","data-v-42e19c7f"]]),xa=ka;Z()(wa,"components",{QDialog:ha.Z,QCard:D.Z,QBtn:ne.Z,QInput:fa.Z,QSeparator:S.Z,QList:ba.Z,QItem:C.Z,QItemSection:A.Z,QItemLabel:ya.Z}),Z()(wa,"directives",{ClosePopup:_a.Z});var Ta=a(90347),qa=a(30229),Ia=a(78504),Sa=a(18910),Da=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const Ca=(0,qa.z)(),Aa=(0,n.aZ)({name:"SendDialog",components:{CoinSelectorDialog:xa},props:{availableTokens:{type:Array,required:!0}},emits:["update-token-balances"],setup(e,t){const a=(0,Ia.oR)(),o=(0,Sa.tv)(),l=(0,c.iH)(Ca.getSystemToken()),i=(0,c.Vh)(e,"availableTokens"),s=(0,c.iH)(!1),u=(0,c.iH)(!1),r=(0,c.iH)(""),d=(0,c.iH)(""),m=(0,c.iH)(""),v=(0,n.Fl)((()=>a.state.account.accountName)),p=(0,n.Fl)((()=>a.state.account.TransactionId)),g=(0,n.Fl)((()=>a.state.account.TransactionError)),w=(0,n.Fl)((()=>!(g.value||p.value))),h=(0,n.Fl)((()=>parseFloat(d.value)>0&&r.value.length>0)),f=()=>Da(this,void 0,void 0,(function*(){var e,n;a.dispatch("account/resetTransaction");const o=null===(e=l.value)||void 0===e?void 0:e.contract,i={from:v.value,to:r.value,quantity:`${d.value} ${null===(n=l.value)||void 0===n?void 0:n.symbol}`,memo:m.value};yield a.dispatch("account/sendAction",{account:o,data:i,name:"transfer"}),a.dispatch("account/loadAccountData"),t.emit("update-token-balances")})),b=()=>{a.dispatch("account/resetTransaction"),i.value.length>0&&(l.value=i.value.find((e=>{var t,a;return e.symbol===(null===(t=l.value)||void 0===t?void 0:t.symbol)&&e.contract===(null===(a=l.value)||void 0===a?void 0:a.contract)})))},y=e=>{l.value=e},_=()=>{l.value={symbol:Ca.getSystemToken().symbol,precision:4,amount:0,contract:"eosio.token"}},k=()=>Da(this,void 0,void 0,(function*(){yield o.push({name:"transaction",params:{transaction:p.value}}),o.go(0),a.dispatch("account/resetTransaction")})),x=()=>{let e=Number(d.value);""!==d.value&&(d.value=e.toLocaleString("en-US",{style:"decimal",maximumFractionDigits:l.value.precision,minimumFractionDigits:l.value.precision}).replace(/,/g,"")),d.value=d.value.replace(/[^0-9.]/g,"")},T=()=>{d.value=l.value.amount.toString(),x()};return{sendToken:l,transactionId:p,transactionError:g,sendDialog:s,openCoinDialog:u,receivingAccount:r,sendAmount:d,memo:m,transactionForm:w,account:v,validated:h,setDefaults:b,updateSelectedCoin:y,setMaxValue:T,navToTransaction:k,sendTransaction:f,isValidAccount:Ta.Kf,formatDec:x,resetForm:_}},watch:{availableTokens:{handler(){this.availableTokens.length>0&&(this.sendToken=this.availableTokens.find((e=>e.symbol===this.sendToken.symbol&&e.contract===this.sendToken.contract))),this.sendToken&&0!==this.sendToken.amount||(this.openCoinDialog=!0)},deep:!0,immediate:!0}}});var Wa=a(22857),Va=a(46858);const Za=(0,q.Z)(Aa,[["render",ia],["__scopeId","data-v-1c0c7ffe"]]),Na=Za;Z()(Aa,"components",{QDialog:ha.Z,QCard:D.Z,QBtn:ne.Z,QCardSection:ue.Z,QSeparator:S.Z,QInput:fa.Z,QIcon:Wa.Z,QSpace:I.Z,QTooltip:Va.Z}),Z()(Aa,"directives",{ClosePopup:_a.Z});var za=a(48048),Ma=a.n(za);const Ra=e=>((0,n.dD)("data-v-4574639d"),e=e(),(0,n.Cn)(),e),Fa={class:"row justify-center q-pt-xl full-height full-width"},Ha={class:"absolute-top-right"},Ua={class:"col-xs-12 col-sm-10 col-md-7 col-lg-7 max-dialog-width"},Qa=Ra((()=>(0,n._)("div",{class:"row q-pl-sm"},[(0,n._)("img",{class:"send-img q-pr-md",src:Ma()}),(0,n._)("div",{class:"text-h4 q-pb-md inline-block color-grey-3 inline"},"Manage Resources")],-1))),ja={class:"q-pa-sm"},La={class:"q-pt-lg"};function Ea(e,t,a,o,l,i){const s=(0,n.up)("q-btn"),c=(0,n.up)("StakingInfo"),u=(0,n.up)("q-tab"),r=(0,n.up)("q-tabs"),d=(0,n.up)("q-separator"),m=(0,n.up)("StakingTab"),v=(0,n.up)("q-tab-panel"),p=(0,n.up)("UnstakingTab"),g=(0,n.up)("RefundTab"),w=(0,n.up)("BuyRam"),h=(0,n.up)("SellRam"),f=(0,n.up)("q-tab-panels"),b=(0,n.up)("q-card"),y=(0,n.up)("q-dialog"),_=(0,n.Q2)("close-popup");return(0,n.wg)(),(0,n.j4)(y,{persistent:!0,maximized:""},{default:(0,n.w5)((()=>[(0,n.Wm)(b,{class:"stakeCard"},{default:(0,n.w5)((()=>[(0,n._)("div",Fa,[(0,n._)("div",Ha,[(0,n.wy)((0,n.Wm)(s,{size:"20px",flat:"",dense:"",round:"",icon:"clear"},null,512),[[_]])]),(0,n._)("div",Ua,[Qa,(0,n._)("div",ja,[(0,n.Wm)(c),(0,n._)("div",La,[(0,n.Wm)(r,{modelValue:e.tab,"onUpdate:modelValue":t[0]||(t[0]=t=>e.tab=t),class:"text-grey-5 tab-text text-grey",dense:"","indicator-color":"grey-3","active-color":"grey-3","narrow-indicator":"",align:"left",breakpoint:0,"no-caps":""},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{name:"stake",label:"Add CPU/NET"}),(0,n.Wm)(u,{name:"unstake",label:"Remove CPU/NET"}),(0,n.Wm)(u,{name:"refund",label:"Refund CPU/NET"}),(0,n.Wm)(u,{name:"buyram",label:"Buy RAM"}),(0,n.Wm)(u,{name:"sellram",label:"Sell RAM"})])),_:1},8,["modelValue"]),(0,n.Wm)(d,{color:"grey-8"}),(0,n.Wm)(f,{modelValue:e.tab,"onUpdate:modelValue":t[1]||(t[1]=t=>e.tab=t),class:"tab-panel"},{default:(0,n.w5)((()=>[(0,n.Wm)(v,{name:"stake"},{default:(0,n.w5)((()=>[(0,n.Wm)(m)])),_:1}),(0,n.Wm)(v,{name:"unstake"},{default:(0,n.w5)((()=>[(0,n.Wm)(p)])),_:1}),(0,n.Wm)(v,{name:"refund"},{default:(0,n.w5)((()=>[(0,n.Wm)(g)])),_:1}),(0,n.Wm)(v,{name:"buyram"},{default:(0,n.w5)((()=>[(0,n.Wm)(w)])),_:1}),(0,n.Wm)(v,{name:"sellram"},{default:(0,n.w5)((()=>[(0,n.Wm)(h)])),_:1})])),_:1},8,["modelValue"])])])])])])),_:1})])),_:1})}const Pa=e=>((0,n.dD)("data-v-08448fb5"),e=e(),(0,n.Cn)(),e),Ba={class:"container grey-3"},Oa={class:"row full-width"},$a={class:"row full-width q-pt-md q-px-lg"},Ya=Pa((()=>(0,n._)("div",{class:"col-6 text-h6 text-bold"},"AVAILABLE BALANCE",-1))),Ga={class:"col-6 text-h6 text-right text-bold"},Ka=Pa((()=>(0,n._)("div",{class:"row full-width q-py-md"},[(0,n._)("hr")],-1))),Ja={class:"row full-width q-pb-md"},Xa={class:"col-xs-12 col-sm-6 q-px-lg q-pb-sm"},en={class:"row"},tn=Pa((()=>(0,n._)("div",{class:"col-7 text-weight-light"},"CPU",-1))),an={class:"col-5 text-right text-bold"},nn={class:"row q-pt-sm"},on=Pa((()=>(0,n._)("div",{class:"col-7 text-weight-light"},"NET",-1))),ln={class:"col-5 text-right text-bold"},sn={class:"row q-pt-sm"},cn=Pa((()=>(0,n._)("div",{class:"col-7 text-weight-light"},"AVAILABLE RAM",-1))),un={class:"col-5 text-right text-bold"},rn={class:"col-xs-12 col-sm-6 q-px-lg q-pb-sm"},dn={class:"row"},mn=Pa((()=>(0,n._)("div",{class:"col-7 text-weight-light"},"DELEGATED BY OTHERS",-1))),vn={class:"col-5 text-right text-bold"},pn={class:"row q-pt-sm"},gn=Pa((()=>(0,n._)("div",{class:"col-7 text-weight-light"},"DELEGATED TO OTHERS",-1))),wn={class:"col-5 text-right text-bold"},hn={class:"row q-pt-sm"},fn=Pa((()=>(0,n._)("div",{class:"col-7 text-weight-light"},"REFUNDING",-1))),bn={class:"col-5 text-right text-bold"};function yn(e,t,a,o,l,i){return(0,n.wg)(),(0,n.iD)("div",Ba,[(0,n._)("div",Oa,[(0,n._)("div",$a,[Ya,(0,n._)("div",Ga,(0,r.zw)(e.formatValue(e.accountTotal)),1)]),Ka,(0,n._)("div",Ja,[(0,n._)("div",Xa,[(0,n._)("div",en,[tn,(0,n._)("div",an,(0,r.zw)(e.formatValue(e.currentCpu)),1)]),(0,n._)("div",nn,[on,(0,n._)("div",ln,(0,r.zw)(e.formatValue(e.currentNet)),1)]),(0,n._)("div",sn,[cn,(0,n._)("div",un,(0,r.zw)(e.ramAvailable)+" Bytes",1)])]),(0,n._)("div",rn,[(0,n._)("div",dn,[mn,(0,n._)("div",vn,(0,r.zw)(e.formatValue(e.delegatedByOthers)),1)]),(0,n._)("div",pn,[gn,(0,n._)("div",wn,(0,r.zw)(e.formatValue(e.delegatedToOthers)),1)]),(0,n._)("div",hn,[fn,(0,n._)("div",bn,(0,r.zw)(e.formatValue(e.totalRefund)),1)])])])])])}const _n=(0,n.aZ)({name:"ResourcesInfo",setup(){const e=(0,Ia.oR)(),t=(0,c.iH)(!1),a=(0,c.iH)(""),o=(0,c.iH)("0"),l=(0,c.iH)("0"),i=(0,c.iH)("0"),s=(0,c.iH)((0,qa.z)().getSystemToken()),u=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),r=(0,n.Fl)((()=>{var t;return"0"===(null===(t=e.state)||void 0===t?void 0:t.chain.ram_price)?"0":e.state.chain.ram_price})),d=(0,n.Fl)((()=>Number(u.value.ram_quota)-Number(u.value.ram_usage))),m=(0,n.Fl)((()=>{var e,t;const a=Number(u.value.cpu_weight.value)/Math.pow(10,s.value.precision)+Number(u.value.net_weight.value)/Math.pow(10,s.value.precision),n=Number((null===(e=u.value.self_delegated_bandwidth)||void 0===e?void 0:e.net_weight.value)?u.value.self_delegated_bandwidth.net_weight.value:"0")+Number((null===(t=u.value.self_delegated_bandwidth)||void 0===t?void 0:t.cpu_weight.value)?u.value.self_delegated_bandwidth.cpu_weight.value:"0");return a-n})),v=(0,n.Fl)((()=>e.state.resources.toOthersAggregated)),p=(0,n.Fl)((()=>{var e,t,a;let n=0;return u.value&&(n=null!==(a=null===(t=null===(e=u.value)||void 0===e?void 0:e.core_liquid_balance)||void 0===t?void 0:t.value)&&void 0!==a?a:0),n})),g=(0,n.Fl)((()=>{var e,t;return null===(t=null===(e=u.value)||void 0===e?void 0:e.total_resources)||void 0===t?void 0:t.cpu_weight.value})),w=(0,n.Fl)((()=>{var e,t;return null===(t=null===(e=u.value)||void 0===e?void 0:e.total_resources)||void 0===t?void 0:t.net_weight.value})),h=(0,n.Fl)((()=>{var e,t,a,n,o,l;return(null!==(a=null===(t=null===(e=u.value)||void 0===e?void 0:e.refund_request)||void 0===t?void 0:t.cpu_amount.value)&&void 0!==a?a:0)+(null!==(l=null===(o=null===(n=u.value)||void 0===n?void 0:n.refund_request)||void 0===o?void 0:o.net_amount.value)&&void 0!==l?l:0)})),f=e=>(0,Ta.xG)(e||0,s.value.precision,s.value.symbol);return{store:e,openCoinDialog:t,stakingAccount:a,cpuTokens:o,netTokens:l,total:i,accountData:u,token:s,ramPrice:r,ramAvailable:d,delegatedByOthers:m,delegatedToOthers:v,accountTotal:p,currentCpu:g,currentNet:w,totalRefund:h,formatValue:f}}}),kn=(0,q.Z)(_n,[["render",yn],["__scopeId","data-v-08448fb5"]]),xn=kn,Tn={class:"staking-form"},qn={class:"row"},In={class:"col-12"},Sn={class:"row justify-between q-pb-sm"},Dn=(0,n.Uk)("CPU/NET Receiver "),Cn=(0,n._)("div",{class:"text-grey-3"},"Defaults to connected account",-1),An={class:"row q-py-md"},Wn={class:"col-6"},Vn={class:"row q-pb-sm"},Zn=(0,n._)("div",{class:"col-6"},"ADD CPU",-1),Nn={class:"col-6 text-right"},zn={class:"text-weight-bold"},Mn={class:"col-6 q-pl-md"},Rn={class:"row q-pb-sm"},Fn=(0,n._)("div",{class:"col-6"},"ADD NET",-1),Hn={class:"col-6 text-right"},Un={class:"text-weight-bold"},Qn={key:0,class:"row text-red"},jn={class:"row"},Ln={class:"col-12 q-pt-md"};function En(e,t,a,o,l,i){const s=(0,n.up)("q-space"),c=(0,n.up)("q-input"),u=(0,n.up)("q-btn"),d=(0,n.up)("q-card-section"),m=(0,n.up)("ViewTransaction");return(0,n.wg)(),(0,n.iD)("div",Tn,[(0,n.Wm)(d,{class:"text-grey-3 text-weight-light"},{default:(0,n.w5)((()=>[(0,n._)("div",qn,[(0,n._)("div",In,[(0,n._)("div",Sn,[Dn,(0,n.Wm)(s),Cn]),(0,n.Wm)(c,{modelValue:e.stakingAccount,"onUpdate:modelValue":t[0]||(t[0]=t=>e.stakingAccount=t),class:"full-width",standout:"bg-deep-purple-2 text-white",dense:"",dark:"","lazy-rules":!0,rules:[t=>e.isValidAccount(t)||"Invalid account name."]},null,8,["modelValue","rules"])])]),(0,n._)("div",An,[(0,n._)("div",Wn,[(0,n._)("div",Vn,[Zn,(0,n._)("div",Nn,[(0,n._)("span",zn,(0,r.zw)(`${e.accountTotalAsNumber} AVAILABLE`),1)])]),(0,n.Wm)(c,{modelValue:e.cpuTokens,"onUpdate:modelValue":t[1]||(t[1]=t=>e.cpuTokens=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.inputRules,type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",Mn,[(0,n._)("div",Rn,[Fn,(0,n._)("div",Hn,[(0,n._)("span",Un,(0,r.zw)(`${e.accountTotalAsNumber} AVAILABLE`),1)])]),(0,n.Wm)(c,{modelValue:e.netTokens,"onUpdate:modelValue":t[2]||(t[2]=t=>e.netTokens=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.inputRules,type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])])]),e.notEnoughTlosForTransaction?((0,n.wg)(),(0,n.iD)("div",Qn,"Balance too low for transaction")):(0,n.kq)("",!0),(0,n._)("div",jn,[(0,n._)("div",Ln,[(0,n.Wm)(u,{class:"full-width button-accent",label:"Confirm",flat:"",disable:e.disableCta,onClick:e.sendTransaction},null,8,["disable","onClick"])])])])),_:1}),(0,n.Wm)(m,{modelValue:e.openTransaction,"onUpdate:modelValue":t[3]||(t[3]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])}var Pn=a(33100),Bn=a(1546),On=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const $n=(0,qa.z)(),Yn=$n.getSystemToken().symbol,Gn=(0,n.aZ)({name:"StakeTab",components:{ViewTransaction:Bn.Z},setup(){const e=(0,ot.p)(),t=(0,c.iH)(!1),a=(0,c.iH)(e.state.account.accountName||""),o=(0,n.Fl)((()=>{var t;return(null!==(t=e.state.account.data.core_liquid_balance)&&void 0!==t?t:0).toString()})),l=(0,n.Fl)((()=>(0,Ta.sA)(o.value))),i=(0,c.iH)("0"),s=(0,c.iH)("0");function u(){"0"!==i.value&&(i.value=Number(i.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,"")),"0"!==s.value&&(s.value=Number(s.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,""))}return Object.assign(Object.assign({openTransaction:t,stakingAccount:a,cpuTokens:i,netTokens:s},(0,Pn.nv)({delegateResources:"resources/delegateResources"})),{transactionId:(0,c.iH)(null),transactionError:null,formatDec:u,accountTotalAsNumber:l,isValidAccount:Ta.Kf})},computed:{inputRules(){return[e=>+e>=0||"Value must not be negative",e=>+ethis.accountTotalAsNumber},disableCta(){const e=0===+this.cpuTokens&&0===+this.netTokens;return this.notEnoughTlosForTransaction||e}},methods:{sendTransaction(){return On(this,void 0,void 0,(function*(){this.transactionError="",parseFloat(this.cpuTokens)<=0&&parseFloat(this.netTokens)<=0?this.$q.notify("Enter valid value for CPU or NET to stake"):(yield this.delegateResources({from:this.$store.state.account.accountName,to:this.stakingAccount.toLowerCase().trim(),transfer:!1,cpu_weight:parseFloat(this.cpuTokens)>0?(0,Ta.xG)(parseFloat(this.cpuTokens),4,Yn,!0):`0.0000 ${Yn}`,net_weight:parseFloat(this.netTokens)>0?(0,Ta.xG)(parseFloat(this.netTokens),4,Yn,!0):`0.0000 ${Yn}`}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(this.openTransaction=!0))}))}}}),Kn=(0,q.Z)(Gn,[["render",En]]),Jn=Kn;Z()(Gn,"components",{QCardSection:ue.Z,QSpace:I.Z,QInput:fa.Z,QBtn:ne.Z});const Xn={class:"unstake-tab"},eo={class:"row q-pb-md"},to={class:"col-12"},ao={class:"row q-pb-md"},no={class:"col-6"},oo={class:"row q-pb-sm"},lo=(0,n._)("div",{class:"col-6"},"REMOVE CPU",-1),io={class:"col-6"},so={class:"text-weight-bold balance-amount"},co=(0,n.Uk)("Click to fill full amount"),uo={class:"col-6 q-pl-md"},ro={class:"row q-pb-sm"},mo=(0,n._)("div",{class:"col-6"},"REMOVE NET",-1),vo={class:"col-6"},po={class:"text-weight-bold balance-amount"},go=(0,n.Uk)("Click to fill full amount"),wo={class:"row"},ho={class:"col-12 q-pt-md"};function fo(e,t,a,o,l,i){const s=(0,n.up)("q-linear-progress"),c=(0,n.up)("q-select"),u=(0,n.up)("q-icon"),d=(0,n.up)("q-tooltip"),m=(0,n.up)("q-input"),v=(0,n.up)("q-spinner"),p=(0,n.up)("q-btn"),g=(0,n.up)("ViewTransaction"),w=(0,n.up)("q-card-section");return(0,n.wg)(),(0,n.iD)("div",Xn,[(0,n.Wm)(w,{class:"text-grey-3 text-weight-light"},{default:(0,n.w5)((()=>[(0,n._)("div",eo,[(0,n._)("div",to,[e.isUpdating?((0,n.wg)(),(0,n.j4)(s,{key:0,color:"primary"})):((0,n.wg)(),(0,n.j4)(c,{key:1,modelValue:e.selectModel,"onUpdate:modelValue":t[0]||(t[0]=t=>e.selectModel=t),class:"full-width unstake-tab__select",color:"primary",options:e.selectOptions,label:"Delegated to",rules:[e=>!!e||"Delegated to is required"]},null,8,["modelValue","options","rules"]))])]),(0,n._)("div",ao,[(0,n._)("div",no,[(0,n._)("div",oo,[lo,(0,n._)("div",io,[(0,n._)("div",{class:"color-grey-3 flex justify-end items-center",onClick:t[1]||(t[1]=t=>e.cpuTokens=e.cpuStake.toString())},[(0,n._)("span",so,(0,r.zw)(`${e.cpuStake} AVAILABLE`),1),(0,n.Wm)(u,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[co])),_:1})])])]),(0,n.Wm)(m,{modelValue:e.cpuTokens,"onUpdate:modelValue":t[2]||(t[2]=t=>e.cpuTokens=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.cpuInputRules,type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",uo,[(0,n._)("div",ro,[mo,(0,n._)("div",vo,[(0,n._)("div",{class:"color-grey-3 flex justify-end items-center",onClick:t[3]||(t[3]=t=>e.netTokens=e.netStake.toString())},[(0,n._)("span",po,(0,r.zw)(`${e.netStake} AVAILABLE`),1),(0,n.Wm)(u,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[go])),_:1})])])]),(0,n.Wm)(m,{modelValue:e.netTokens,"onUpdate:modelValue":t[4]||(t[4]=t=>e.netTokens=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.netInputRules,type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])])]),(0,n._)("div",wo,[(0,n._)("div",ho,[(0,n.Wm)(p,{class:"full-width button-accent",label:"Confirm",flat:"",disable:e.ctaDisabled||e.isUnstaking,onClick:e.sendTransaction},{default:(0,n.w5)((()=>[e.isUnstaking?((0,n.wg)(),(0,n.j4)(v,{key:0,size:"20px",color:"white",class:"q-ml-sm"})):(0,n.kq)("",!0)])),_:1},8,["disable","onClick"])])]),(0,n.Wm)(g,{modelValue:e.openTransaction,"onUpdate:modelValue":t[5]||(t[5]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])),_:1})])}var bo=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const yo=(0,qa.z)(),_o=yo.getSystemToken().symbol,ko=(0,n.aZ)({name:"UnstakeTab",components:{ViewTransaction:Bn.Z},setup(){const e=(0,ot.p)(),t=(0,c.iH)(!1),a=(0,c.iH)(e.state.account.accountName.toLowerCase()||""),o=(0,c.iH)("0"),l=(0,c.iH)("0");function i(){"0"!==o.value&&(o.value=Number(o.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,"")),"0"!==l.value&&(l.value=Number(l.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,""))}const s=(0,n.Fl)((()=>e.resources.getDelegatedToOthers())),u=(0,n.Fl)((()=>e.resources.isLoading("updateResources"))),r=(0,n.Fl)((()=>e.resources.isLoading("undelegateResources"))),d=(0,n.Fl)((()=>e.resources.getLoading())),m=(0,c.iH)({label:"",value:null}),v=(0,n.Fl)((()=>{var e,t;return null===(t=null===(e=m.value)||void 0===e?void 0:e.value)||void 0===t?void 0:t.to})),p=(0,n.Fl)((()=>{var e,t;const a=null!==(t=null===(e=s.value)||void 0===e?void 0:e.map((e=>({label:e.to,value:e}))))&&void 0!==t?t:[];return a}));e.resources.updateResources({}).then((()=>{var t;const a=e.resources.getSelfStaked();a&&(m.value={label:null!==(t=null===a||void 0===a?void 0:a.to)&&void 0!==t?t:"unknown",value:a})}));const g=(0,c.iH)(0),w=(0,c.iH)(0);return Object.assign(Object.assign({openTransaction:t,stakingAccount:a,receiverAccount:v,selectModel:m,selectOptions:p,delegatedList:s,isUpdating:u,isUnstaking:r,loading:d,cpuTokens:o,netTokens:l},(0,Pn.nv)({undelegateResources:"resources/undelegateResources"})),{transactionId:(0,c.iH)(null),transactionError:null,formatDec:i,assetToAmount:Ta.sA,netStake:g,cpuStake:w})},watch:{selectModel:{handler(){this.update()},deep:!0},selectOptions:{handler(){this.update()},deep:!0}},computed:{cpuInputRules(){return[e=>+e>=0||"Value must not be negative",e=>+e<=this.cpuStake||"Not enough staked"]},netInputRules(){return[e=>+e>=0||"Value must not be negative",e=>+e<=this.netStake||`Not enough staked, needed: ${this.netStake}`]},ctaDisabled(){return this.cpuStake+this.netStake===0}},methods:{update(){var e,t;const a=this.selectOptions.find((e=>{var t,a,n;return e.value.to===(null!==(n=null===(a=null===(t=this.selectModel)||void 0===t?void 0:t.value)||void 0===a?void 0:a.to)&&void 0!==n?n:"")}));a&&(this.selectModel=a),this.netStake=this.assetToAmount(null===(e=this.selectModel.value)||void 0===e?void 0:e.net_weight.toString()),this.cpuStake=this.assetToAmount(null===(t=this.selectModel.value)||void 0===t?void 0:t.cpu_weight.toString()),this.netTokens="0",this.cpuTokens="0"},sendTransaction(){return bo(this,void 0,void 0,(function*(){this.transactionError="",parseFloat(this.cpuTokens)<=0&&parseFloat(this.netTokens)<=0?this.$q.notify("Enter valid value for CPU or NET to unstake"):(yield this.undelegateResources({from:this.stakingAccount,to:this.receiverAccount,transfer:!1,cpu_weight:parseFloat(this.cpuTokens)>0?(0,Ta.xG)(parseFloat(this.cpuTokens),4,_o,!0):`0.0000 ${_o}`,net_weight:parseFloat(this.netTokens)>0?(0,Ta.xG)(parseFloat(this.netTokens),4,_o,!0):`0.0000 ${_o}`}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(this.openTransaction=!0))}))}}});var xo=a(8289),To=a(32259),qo=a(63940),Io=a(18149);const So=(0,q.Z)(ko,[["render",fo]]),Do=So;Z()(ko,"components",{QCardSection:ue.Z,QLinearProgress:xo.Z,QSelect:To.Z,QIcon:Wa.Z,QTooltip:Va.Z,QInput:fa.Z,QBtn:ne.Z,QSpinner:qo.Z,QField:Io.Z});const Co={class:"q-pt-lg"},Ao={class:"container-refund"},Wo={class:"row full-width"},Vo={class:"row full-width q-pt-lg q-px-lg"},Zo=(0,n._)("div",{class:"col-6 text-h6 grey-3"},"Refunding Total",-1),No={class:"col-6 text-h6 text-right grey-3"},zo=(0,n._)("div",{class:"row full-width q-py-md"},[(0,n._)("hr")],-1),Mo={class:"row full-width q-pb-lg text-grey-3 text-weight-light"},Ro={class:"col-xs-12 col-sm-6 q-px-lg q-pt-sm"},Fo={class:"row"},Ho=(0,n._)("div",{class:"col-6"},"CPU",-1),Uo={class:"col-6 text-right text-weight-bold"},Qo={class:"row q-pt-md"},jo=(0,n._)("div",{class:"col-6"},"NET",-1),Lo={class:"col-6 text-right text-weight-bold"},Eo={class:"col-xs-12 col-sm-6 q-px-lg q-pt-sm"},Po={class:"row"},Bo={class:"col-7"},Oo={class:"col-5 text-right text-weight-bold"},$o={class:"row q-pt-sm"},Yo={class:"col-7 q-pt-sm"},Go=(0,n.Uk)("Refund "),Ko=(0,n.Uk)("If it has been more than 72 hours since your unstake transaction. Click on Refund to claim your tokens."),Jo={class:"col-5 text-right grey-3"};function Xo(e,t,a,o,l,i){const s=(0,n.up)("q-linear-progress"),c=(0,n.up)("q-tooltip"),u=(0,n.up)("q-icon"),d=(0,n.up)("q-btn"),m=(0,n.up)("ViewTransaction");return(0,n.wg)(),(0,n.iD)("div",Co,[(0,n._)("div",Ao,[(0,n._)("div",Wo,[(0,n._)("div",Vo,[Zo,(0,n._)("div",No,(0,r.zw)(e.totalRefund),1)]),zo,(0,n._)("div",Mo,[(0,n._)("div",Ro,[(0,n._)("div",Fo,[Ho,(0,n._)("div",Uo,(0,r.zw)(e.cpuAmount||"0"),1)]),(0,n._)("div",Qo,[jo,(0,n._)("div",Lo,(0,r.zw)(e.netAmount||"0"),1)])]),(0,n._)("div",Eo,[(0,n._)("div",Po,[(0,n._)("div",Bo,(0,r.zw)(e.refundCountdown()),1),(0,n._)("div",Oo,[(0,n.Wm)(s,{class:"q-mt-sm",value:e.refundProgress(),color:"grey-3"},null,8,["value"])])]),(0,n._)("div",$o,[(0,n._)("div",Yo,[Go,(0,n.Wm)(u,{class:"q-ml-xs",name:"far fa-question-circle"},{default:(0,n.w5)((()=>[(0,n.Wm)(c,{class:"bg-deep-purple-12",anchor:"top middle",self:"center middle"},{default:(0,n.w5)((()=>[Ko])),_:1})])),_:1})]),(0,n._)("div",Jo,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Refund",flat:"",onClick:e.sendTransaction},null,8,["onClick"])])])])])]),(0,n.Wm)(m,{modelValue:e.openTransaction,"onUpdate:modelValue":t[0]||(t[0]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])])}var el=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const tl=(0,n.aZ)({name:"RefundTab",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Ia.oR)(),t=(0,c.iH)(!1),a=(0,c.iH)(""),o=(0,c.iH)("0"),l=(0,c.iH)(.2),i=(0,n.Fl)((()=>{var e;return null===(e=d.value)||void 0===e?void 0:e.refund_request})),s=(0,n.Fl)((()=>{var e;return null===(e=i.value)||void 0===e?void 0:e.cpu_amount.value})),u=(0,n.Fl)((()=>{var e;return null===(e=i.value)||void 0===e?void 0:e.net_amount.value})),r=(0,n.Fl)((()=>e.state.chain.token)),d=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),m=(0,n.Fl)((()=>{const e=i.value?(0,Ta.xG)(i.value.cpu_amount.value+i.value.net_amount.value,4):0;return`${e} ${r.value.symbol}`}));function v(e){const t=e/Math.pow(10,r.value.precision);return(0,Ta.xG)(t,2,r.value.symbol)}function p(){var e;let t=Math.round(new Date(new Date((null===(e=d.value.refund_request)||void 0===e?void 0:e.request_time.toString())+"Z").toUTCString()).getTime()/1e3)+259200-Math.round(new Date(Date.now()).getTime()/1e3),a=t/259200;return a>0?a:0}function g(){var e,t;let a=Math.round(new Date(new Date((null===(t=null===(e=d.value)||void 0===e?void 0:e.refund_request)||void 0===t?void 0:t.request_time.toString())+"Z")).getTime()/1e3)+259200-Math.round(new Date((new Date).toISOString()).getTime()/1e3);if(a>0){var n=w(a,86400),o=w(a,3600)%24;return`${n} days, ${o} hours remaining`}return"No pending refund"}function w(e,t){return Math.floor(e/t)}return Object.assign(Object.assign({store:e,openTransaction:t,stakingAccount:a,total:o,totalRefund:m,accountData:d,refundRequest:i,cpuAmount:s,netAmount:u,token:r,progress:l,formatStaked:v,refundProgress:p,refundCountdown:g},(0,Pn.nv)({sendAction:"account/sendAction"})),{transactionId:(0,c.iH)(null),transactionError:null})},methods:{sendTransaction(){return el(this,void 0,void 0,(function*(){this.transactionError="";const e={owner:this.accountData.account_name,transfer:!1};try{this.transactionId=(yield this.sendAction({account:"eosio",name:"refund",data:e})).transactionId}catch(t){this.transactionError=t,this.$store.commit("account/setTransactionError",t)}yield this.loadAccountData(),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(this.openTransaction=!0)}))},loadAccountData(){return el(this,void 0,void 0,(function*(){try{const e=yield this.$api.getAccount(this.store.state.account.abi.account_name);this.$store.commit("account/setAccountData",e)}catch(e){return}}))}}}),al=(0,q.Z)(tl,[["render",Xo]]),nl=al;Z()(tl,"components",{QLinearProgress:xo.Z,QIcon:Wa.Z,QTooltip:Va.Z,QBtn:ne.Z});const ol=e=>((0,n.dD)("data-v-61552d2f"),e=e(),(0,n.Cn)(),e),ll={class:"staking-form"},il={class:"row q-col-gutter-md"},sl={class:"text-weight-bold text-right text-grey-3"},cl={class:"row q-col-gutter-md q-pb-md"},ul={class:"row"},rl={class:"col-12"},dl={class:"row justify-between q-pb-sm"},ml=(0,n.Uk)("RAM Receiver: "),vl=ol((()=>(0,n._)("div",{class:"text-grey-3"},"Defaults to connected account",-1))),pl={class:"row q-mb-md"},gl={class:"row q-pb-sm full-width"},wl={class:"col-6"},hl={class:"col-6 text-right"},fl={class:"text-weight-bold"},bl={class:"row q-pb-sm"},yl={class:"text-weight-normal text-right text-grey-3"},_l={class:"row"};function kl(e,t,a,o,l,i){const s=(0,n.up)("q-radio"),c=(0,n.up)("q-space"),u=(0,n.up)("q-input"),d=(0,n.up)("q-btn"),m=(0,n.up)("ViewTransaction"),v=(0,n.up)("q-card-section");return(0,n.wg)(),(0,n.iD)("div",ll,[(0,n.Wm)(v,{class:"text-grey-3"},{default:(0,n.w5)((()=>[(0,n._)("div",il,[(0,n._)("div",sl,"Buy in "+(0,r.zw)(e.symbol)+" or Bytes?",1)]),(0,n._)("div",cl,[(0,n.Wm)(s,{modelValue:e.buyOption,"onUpdate:modelValue":t[0]||(t[0]=t=>e.buyOption=t),dark:"",color:"white",val:e.symbol,label:e.symbol},null,8,["modelValue","val","label"]),(0,n.Wm)(s,{modelValue:e.buyOption,"onUpdate:modelValue":t[1]||(t[1]=t=>e.buyOption=t),dark:"",color:"white",val:"Bytes",label:"Bytes"},null,8,["modelValue"])]),(0,n._)("div",ul,[(0,n._)("div",rl,[(0,n._)("div",dl,[ml,(0,n.Wm)(c),vl]),(0,n.Wm)(u,{modelValue:e.receivingAccount,"onUpdate:modelValue":t[2]||(t[2]=t=>e.receivingAccount=t),class:"full-width",standout:"bg-deep-purple-2 text-white",dense:"",dark:"","lazy-rules":!0,rules:[t=>e.isValidAccount(t)||"Invalid account name."]},null,8,["modelValue","rules"])])]),(0,n._)("div",pl,[(0,n._)("div",gl,[(0,n._)("div",wl,(0,r.zw)("Amount of RAM to buy in "+e.buyOption),1),(0,n._)("div",hl,[(0,n._)("span",fl,(0,r.zw)(`${e.prettyBuyLimit()} AVAILABLE`),1)])]),(0,n.Wm)(u,{modelValue:e.buyAmount,"onUpdate:modelValue":t[3]||(t[3]=t=>e.buyAmount=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.inputRules,type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",bl,[(0,n._)("div",yl,"≈ "+(0,r.zw)(e.buyPreview),1)]),(0,n._)("div",_l,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Buy",flat:"",disable:e.disableCta,onClick:e.buy},null,8,["disable","onClick"])]),(0,n.Wm)(m,{modelValue:e.openTransaction,"onUpdate:modelValue":t[4]||(t[4]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])),_:1})])}var xl=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const Tl=(0,qa.z)(),ql=(0,n.aZ)({name:"BuyRam",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Ia.oR)();let t=(0,c.iH)(!1);const a=(0,c.iH)(""),o=(0,c.iH)(Tl.getSystemToken().symbol),l=[o.value,"Bytes"],i=(0,c.iH)(l[0]),s=(0,c.iH)(e.state.account.accountName),u=(0,n.Fl)((()=>e.state.account.TransactionId)),r=(0,n.Fl)((()=>i.value===l[0]?(1e3*Number(a.value)/Number(m.value)).toFixed(0)+" "+l[1]:(0,Ta.xG)(Number(a.value)/1e3*Number(m.value),4)+" "+l[0])),d=(0,n.Fl)((()=>e.state.account.TransactionError)),m=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.chain.ram_price})),v=(0,n.Fl)((()=>te.UInt64.sub(e.state.account.data.ram_quota,e.state.account.data.ram_usage))),p=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data}));function g(){const t=e.state.chain.token.precision;i.value===l[0]?a.value=Number(a.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:t,minimumFractionDigits:t}).replace(/[^0-9.]/g,""):""!==a.value&&(a.value=parseInt(a.value).toString().replace(/[^0-9.]/g,""))}function w(){return xl(this,void 0,void 0,(function*(){if(e.dispatch("account/resetTransaction"),i.value===l[0]){if("0"===a.value||Number(a.value)>=Number(p.value.core_liquid_balance.value))return;yield e.dispatch("account/buyRam",{amount:a.value+" "+o.value,receivingAccount:s.value})}else{if("0"===a.value||Number(a.value)>=1e3*Number(p.value.core_liquid_balance.value)/Number(m.value))return;yield e.dispatch("account/buyRamBytes",{amount:a.value,receivingAccount:s.value})}"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0)}))}function h(){var e,t,a,n;return i.value===l[0]?null!==(t=null===(e=p.value.core_liquid_balance)||void 0===e?void 0:e.value)&&void 0!==t?t:0:1e3*Number(null!==(n=null===(a=p.value.core_liquid_balance)||void 0===a?void 0:a.value)&&void 0!==n?n:0)/Number(m.value)}function f(){return i.value===l[0]?h():h().toFixed(0)}return(0,n.YP)(i,(()=>{a.value="0"})),{openTransaction:t,buyAmount:a,transactionId:u,transactionError:d,ramAvailable:v,accountData:p,receivingAccount:s,symbol:o,buyOption:i,buyPreview:r,formatDec:g,buy:w,buyLimit:h,prettyBuyLimit:f,isValidAccount:Ta.Kf}},computed:{inputRules(){return[e=>+e>=0||"Value must not be negative",e=>+ethis.buyLimit()}}});var Il=a(11480);const Sl=(0,q.Z)(ql,[["render",kl],["__scopeId","data-v-61552d2f"]]),Dl=Sl;Z()(ql,"components",{QCardSection:ue.Z,QRadio:Il.Z,QSpace:I.Z,QInput:fa.Z,QBtn:ne.Z});const Cl=e=>((0,n.dD)("data-v-1a7d69d7"),e=e(),(0,n.Cn)(),e),Al={class:"staking-form"},Wl={class:"row"},Vl={class:"row q-pb-sm full-width"},Zl=Cl((()=>(0,n._)("div",{class:"col-6"},(0,r.zw)("Amount of RAM to sell in Bytes"),-1))),Nl={class:"col-6"},zl={class:"text-weight-bold balance-amount"},Ml=(0,n.Uk)("Click to fill full amount"),Rl={class:"row q-pb-sm"},Fl={class:"text-weight-normal text-right text-grey-3"},Hl={class:"row"};function Ul(e,t,a,o,l,i){const s=(0,n.up)("q-icon"),c=(0,n.up)("q-tooltip"),u=(0,n.up)("q-input"),d=(0,n.up)("q-btn"),m=(0,n.up)("ViewTransaction"),v=(0,n.up)("q-card-section");return(0,n.wg)(),(0,n.iD)("div",Al,[(0,n.Wm)(v,{class:"text-grey-3"},{default:(0,n.w5)((()=>[(0,n._)("div",Wl,[(0,n._)("div",Vl,[Zl,(0,n._)("div",Nl,[(0,n._)("div",{class:"color-grey-3 flex justify-end items-center",onClick:t[0]||(t[0]=t=>e.sellAmount=e.ramAvailable.toString())},[(0,n._)("span",zl,(0,r.zw)(`${e.ramAvailable} AVAILABLE`),1),(0,n.Wm)(s,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[Ml])),_:1})])])]),(0,n.Wm)(u,{modelValue:e.sellAmount,"onUpdate:modelValue":t[1]||(t[1]=t=>e.sellAmount=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.inputRules,type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",Rl,[(0,n._)("div",Fl,"≈ "+(0,r.zw)(e.sellPreview),1)]),(0,n._)("div",Hl,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Sell",flat:"",disable:e.disableCta,onClick:e.sell},null,8,["disable","onClick"])]),(0,n.Wm)(m,{modelValue:e.openTransaction,"onUpdate:modelValue":t[2]||(t[2]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])),_:1})])}var Ql=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const jl=(0,n.aZ)({name:"SellRam",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Ia.oR)(),t=(0,qa.z)();let a=(0,c.iH)(!1);const o=(0,c.iH)(""),l=(0,c.iH)(t.getSystemToken().symbol),i=(0,n.Fl)((()=>e.state.account.TransactionId)),s=(0,n.Fl)((()=>e.state.account.TransactionError)),u=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.chain.ram_price})),r=(0,n.Fl)((()=>(0,Ta.xG)(Number(o.value)/1e3*Number(u.value),4,l.value))),d=(0,n.Fl)((()=>Number(e.state.account.data.ram_quota.value)-Number(e.state.account.data.ram_usage.value))),m=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data}));function v(){o.value=parseInt(o.value).toString().replace(/[^0-9.]/g,"")}function p(){return Ql(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),"0"===o.value||!d.value||Number(o.value)>d.value||(yield e.dispatch("account/sellRam",{amount:o.value}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(a.value=!0))}))}return{openTransaction:a,sellAmount:o,transactionId:i,transactionError:s,ramAvailable:d,accountData:m,symbol:l,sellPreview:r,formatDec:v,sell:p}},computed:{inputRules(){return[e=>+e>=0||"Value must not be negative",e=>+e<=this.ramAvailable||"Not enough RAM"]},disableCta(){return 0===+this.sellAmount||+this.sellAmount>this.ramAvailable}}}),Ll=(0,q.Z)(jl,[["render",Ul],["__scopeId","data-v-1a7d69d7"]]),El=Ll;Z()(jl,"components",{QCardSection:ue.Z,QIcon:Wa.Z,QTooltip:Va.Z,QInput:fa.Z,QBtn:ne.Z});const Pl=(0,n.aZ)({name:"ResourcesDialog",components:{StakingInfo:xn,StakingTab:Jn,UnstakingTab:Do,RefundTab:nl,BuyRam:Dl,SellRam:El},setup(){return{tab:(0,c.iH)("stake")}}});var Bl=a(47817),Ol=a(57661),$l=a(89800),Yl=a(84106);const Gl=(0,q.Z)(Pl,[["render",Ea],["__scopeId","data-v-4574639d"]]),Kl=Gl;Z()(Pl,"components",{QDialog:ha.Z,QCard:D.Z,QBtn:ne.Z,QTabs:Bl.Z,QTab:Ol.Z,QSeparator:S.Z,QTabPanels:$l.Z,QTabPanel:Yl.Z}),Z()(Pl,"directives",{ClosePopup:_a.Z});const Jl=e=>((0,n.dD)("data-v-17b7ca54"),e=e(),(0,n.Cn)(),e),Xl={class:"row justify-center q-pt-xl full-height full-width"},ei={class:"absolute-top-right"},ti={class:"col-xs-12 col-sm-10 col-md-7 col-lg-7 max-dialog-width"},ai={class:"row q-pl-sm"},ni=Jl((()=>(0,n._)("div",{class:"text-h4 q-pb-md inline-block color-grey-3 inline"},"Staking (REX)",-1))),oi={class:"text-h5 q-pb-md inline-block color-grey-3 inline float-right"},li={class:"q-pa-sm"},ii={key:0,class:"q-pt-lg q-pl-lg"},si={class:"row q-col-gutter-md items-center"},ci={class:"col-auto text-h6 text-white"},ui={class:"col-auto"},ri={class:"q-pt-lg text-grey-3 text-weight-light"};function di(e,t,a,o,l,i){const s=(0,n.up)("q-btn"),c=(0,n.up)("StakingInfo"),u=(0,n.up)("q-tab"),d=(0,n.up)("q-tabs"),m=(0,n.up)("q-separator"),v=(0,n.up)("StakingTab"),p=(0,n.up)("q-tab-panel"),g=(0,n.up)("UnstakingTab"),w=(0,n.up)("StakeFromResources"),h=(0,n.up)("SavingsTab"),f=(0,n.up)("ProcessingTab"),b=(0,n.up)("HistoryTab"),y=(0,n.up)("q-tab-panels"),_=(0,n.up)("q-card"),k=(0,n.up)("q-dialog"),x=(0,n.Q2)("close-popup");return(0,n.wg)(),(0,n.j4)(k,{persistent:!0,maximized:"",onShow:e.setDefaults},{default:(0,n.w5)((()=>[(0,n.Wm)(_,{class:"rexCard"},{default:(0,n.w5)((()=>[(0,n._)("div",Xl,[(0,n._)("div",ei,[(0,n.wy)((0,n.Wm)(s,{size:"20px",flat:"",dense:"",round:"",icon:"clear"},null,512),[[x]])]),(0,n._)("div",ti,[(0,n._)("div",ai,[ni,(0,n._)("div",oi,"APY: "+(0,r.zw)(e.apy),1)]),(0,n._)("div",li,[(0,n.Wm)(c),e.rexfund>0?((0,n.wg)(),(0,n.iD)("div",ii,[(0,n._)("div",si,[(0,n._)("div",ci,"REX fund: "+(0,r.zw)(e.prettyRexFund),1),(0,n._)("div",ui,[(0,n.Wm)(s,{class:"full-width button-accent",label:"Withdraw",flat:"",onClick:e.withdrawRexFund},null,8,["onClick"])])])])):(0,n.kq)("",!0),(0,n._)("div",ri,[(0,n.Wm)(d,{modelValue:e.tab,"onUpdate:modelValue":t[0]||(t[0]=t=>e.tab=t),class:"text-grey-5 tab-text text-grey",dense:"","indicator-color":"grey-3","active-color":"grey-3","narrow-indicator":"",align:"left",breakpoint:0,"no-caps":""},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{name:"stake",label:"Stake"}),(0,n.Wm)(u,{name:"unstake",label:"Unstake"}),(0,n.Wm)(u,{name:"stakecpunet",label:"Stake from CPU/NET"}),(0,n.Wm)(u,{name:"savings",label:"Savings"}),(0,n.Wm)(u,{name:"maturing",label:"Maturing"}),(0,n.Wm)(u,{name:"history",label:"History"})])),_:1},8,["modelValue"]),(0,n.Wm)(m,{color:"grey-8"}),(0,n.Wm)(y,{modelValue:e.tab,"onUpdate:modelValue":t[1]||(t[1]=t=>e.tab=t),class:"tab-panel"},{default:(0,n.w5)((()=>[(0,n.Wm)(p,{name:"stake"},{default:(0,n.w5)((()=>[(0,n.Wm)(v)])),_:1}),(0,n.Wm)(p,{name:"unstake"},{default:(0,n.w5)((()=>[(0,n.Wm)(g)])),_:1}),(0,n.Wm)(p,{name:"stakecpunet"},{default:(0,n.w5)((()=>[(0,n.Wm)(w)])),_:1}),(0,n.Wm)(p,{name:"savings"},{default:(0,n.w5)((()=>[(0,n.Wm)(h)])),_:1}),(0,n.Wm)(p,{name:"maturing"},{default:(0,n.w5)((()=>[(0,n.Wm)(f)])),_:1}),(0,n.Wm)(p,{name:"history"},{default:(0,n.w5)((()=>[(0,n.Wm)(b)])),_:1})])),_:1},8,["modelValue"])])])])])])),_:1})])),_:1},8,["onShow"])}const mi={class:"container text-grey-3 text-weight-light"},vi={class:"row full-width"},pi={class:"row full-width q-pt-md q-px-lg"},gi=(0,n._)("div",{class:"col-6 text-h6 grey-3"},"LIQUID BALANCE",-1),wi={class:"col-6 text-h6 text-right grey-3"},hi=(0,n._)("div",{class:"row full-width q-py-md q-px-md"},[(0,n._)("hr")],-1),fi={class:"row full-width q-pb-lg"},bi={class:"col-xs-12 col-sm-6 q-px-lg"},yi={class:"row"},_i={class:"col-7"},ki={class:"col-5 text-right text-weight-bold"},xi={class:"row q-pt-sm"},Ti=(0,n._)("div",{class:"col-7"},"SAVINGS",-1),qi={class:"col-5 text-right text-weight-bold"},Ii={class:"col-xs-12 col-sm-6 q-px-lg"},Si={class:"row"},Di=(0,n._)("div",{class:"col-7"},"MATURED",-1),Ci={class:"col-5 text-right text-weight-bold"},Ai={class:"row q-pt-sm"},Wi=(0,n._)("div",{class:"col-7"},"MATURING",-1),Vi={class:"col-5 text-right text-weight-bold"};function Zi(e,t,a,o,l,i){return(0,n.wg)(),(0,n.iD)("div",mi,[(0,n._)("div",vi,[(0,n._)("div",pi,[gi,(0,n._)("div",wi,(0,r.zw)(e.liquidBalance),1)]),hi,(0,n._)("div",fi,[(0,n._)("div",bi,[(0,n._)("div",yi,[(0,n._)("div",_i,(0,r.zw)(`TOTAL ${e.symbol} STAKED`),1),(0,n._)("div",ki,(0,r.zw)(e.coreRexBalance),1)]),(0,n._)("div",xi,[Ti,(0,n._)("div",qi,(0,r.zw)(e.rexSavings),1)])]),(0,n._)("div",Ii,[(0,n._)("div",Si,[Di,(0,n._)("div",Ci,(0,r.zw)(e.maturedRex),1)]),(0,n._)("div",Ai,[Wi,(0,n._)("div",Vi,(0,r.zw)(e.maturingRex),1)])])])])])}const Ni=(0,qa.z)(),zi=(0,n.aZ)({name:"StakingInfo",setup(){const e=(0,Ia.oR)(),t=(0,c.iH)(Ni.getSystemToken().symbol),a=(0,c.iH)(""),o=(0,c.iH)("0"),l=(0,n.Fl)((()=>e.state.chain.token)),i=(0,n.Fl)((()=>e.state.account.data)),s=(0,n.Fl)((()=>i.value.core_liquid_balance)),u=(0,n.Fl)((()=>i.value.rex_info)),r=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.coreRexBalance})),d=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.maturingRex})),m=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.maturedRex})),v=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.savingsRex}));return{store:e,symbol:t,stakingAccount:a,total:o,accountData:i,token:l,liquidBalance:s,rexInfo:u,maturingRex:d,coreRexBalance:r,maturedRex:m,rexSavings:v}}}),Mi=(0,q.Z)(zi,[["render",Zi]]),Ri=Mi,Fi={class:"staking-form"},Hi={class:"row q-col-gutter-md"},Ui={class:"col-12"},Qi={class:"row"},ji={class:"row q-pb-sm full-width"},Li=(0,n._)("div",{class:"col-9"},"TRANSFER CPU TO STAKING",-1),Ei={class:"col-3"},Pi={class:"text-weight-bold text-right balance-amount"},Bi=(0,n.Uk)("Click to fill full amount"),Oi=(0,n._)("div",{class:"row"},null,-1),$i={class:"row q-pb-sm full-width"},Yi=(0,n._)("div",{class:"col-9"},"TRANSFER NET TO STAKING",-1),Gi={class:"col-3"},Ki=(0,n.Uk)("Click to fill full amount"),Ji={class:"row"};function Xi(e,t,a,o,l,i){const s=(0,n.up)("q-icon"),c=(0,n.up)("q-tooltip"),u=(0,n.up)("q-input"),d=(0,n.up)("q-btn"),m=(0,n.up)("q-card-section"),v=(0,n.up)("ViewTransaction");return(0,n.wg)(),(0,n.iD)("div",Fi,[(0,n.Wm)(m,null,{default:(0,n.w5)((()=>[(0,n._)("div",Hi,[(0,n._)("div",Ui,[(0,n._)("div",Qi,[(0,n._)("div",ji,[Li,(0,n._)("div",Ei,[(0,n._)("div",{class:"row items-center justify-end q-hoverable cursor-pointer",onClick:t[0]||(t[0]=(...t)=>e.setMaxCpuValue&&e.setMaxCpuValue(...t))},[(0,n._)("div",Pi,(0,r.zw)(e.cpuWeight),1),(0,n.Wm)(s,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[Bi])),_:1})])])]),(0,n.Wm)(u,{modelValue:e.cpuTokens,"onUpdate:modelValue":t[1]||(t[1]=t=>e.cpuTokens=t),class:"full-width",dense:"",dark:"",standout:"bg-deep-purple-2 text-white",placeholder:"0",type:"text","lazy-rules":!0,rules:[t=>t>=0&&t<=e.cpuWeight.value||"Invalid amount."],onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"]),Oi,(0,n._)("div",$i,[Yi,(0,n._)("div",Gi,[(0,n._)("div",{class:"row items-center justify-end q-hoverable cursor-pointer",onClick:t[3]||(t[3]=(...t)=>e.setMaxNetValue&&e.setMaxNetValue(...t))},[(0,n._)("div",{class:"text-weight-bold text-right balance-amount",onClick:t[2]||(t[2]=(...t)=>e.setMaxNetValue&&e.setMaxNetValue(...t))},(0,r.zw)(e.netWeight),1),(0,n.Wm)(s,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[Ki])),_:1})])])]),(0,n.Wm)(u,{modelValue:e.netTokens,"onUpdate:modelValue":t[4]||(t[4]=t=>e.netTokens=t),class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:[t=>t>=0&&t<=e.netWeight.value||"Invalid amount."],type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",Ji,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Stake "+e.symbol,flat:"",onClick:e.stake},null,8,["label","onClick"])])])])])),_:1}),(0,n.Wm)(v,{modelValue:e.openTransaction,"onUpdate:modelValue":t[5]||(t[5]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])}var es=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const ts=(0,n.aZ)({name:"StakeFromResources",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Ia.oR)(),t=(0,c.iH)(!1),a=(0,qa.z)(),o=(0,c.iH)(a.getSystemToken().symbol),l=(0,c.iH)(""),i=(0,c.iH)(""),s=(0,c.iH)("0"),u=(0,c.iH)("0"),r=(0,c.iH)(e.state.account.TransactionId),d=(0,c.iH)(e.state.account.TransactionError),m=(0,n.Fl)((()=>e.state.account.accountName)),v=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),p=(0,n.Fl)((()=>v.value.total_resources.cpu_weight)),g=(0,n.Fl)((()=>v.value.total_resources.net_weight));function w(){""!==l.value&&(l.value=Number(l.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,"")),""!==i.value&&(i.value=Number(i.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,""))}function h(){return es(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),"0"===l.value&&"0"===i.value||Number(l.value)>=Number(p.value)||Number(i.value)>=Number(v.value.total_resources.net_weight)||(yield e.dispatch("account/stakeCpuNetRex",{cpuAmount:l.value||"0",netAmount:i.value||"0"}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0))}))}function f(){return es(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),"0"===s.value&&"0"===u.value||(yield e.dispatch("account/unstakeCpuNetRex",{cpuAmount:s.value||"0",netAmount:u.value||"0"}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0))}))}function b(){i.value=g.value.toString(),w()}function y(){l.value=p.value.toString(),w()}return{openTransaction:t,stakingAccount:m,cpuTokens:l,netTokens:i,symbol:o,cpuWithdraw:s,netWithdraw:u,transactionId:r,transactionError:d,accountData:v,cpuWeight:p,netWeight:g,formatDec:w,stake:h,unstake:f,setMaxNetValue:b,setMaxCpuValue:y}}}),as=(0,q.Z)(ts,[["render",Xi]]),ns=as;Z()(ts,"components",{QCardSection:ue.Z,QIcon:Wa.Z,QTooltip:Va.Z,QInput:fa.Z,QBtn:ne.Z});const os={class:"q-pt-lg"},ls={class:"container-refund q-pa-sm"},is={class:"row full-width"},ss={class:"col-xs-12 col-sm-6"},cs={class:"row q-pa-sm"},us=(0,n._)("div",{class:"col-6"},"Staked TLOS maturing",-1),rs={class:"col-6 text-right text-weight-bold"},ds={class:"col-xs-12 col-sm-6"},ms={class:"row q-pa-sm"},vs={class:"col-7"},ps={class:"col-5 text-right text-weight-bold"};function gs(e,t,a,o,l,i){const s=(0,n.up)("q-linear-progress");return(0,n.wg)(),(0,n.iD)("div",os,[(0,n._)("div",ls,[(0,n._)("div",is,[(0,n._)("div",ss,[(0,n._)("div",cs,[us,(0,n._)("div",rs,(0,r.zw)(e.maturingRex),1)])]),(0,n._)("div",ds,[(0,n._)("div",ms,[(0,n._)("div",vs,(0,r.zw)(e.maturitiesCountdown()),1),(0,n._)("div",ps,[(0,n.Wm)(s,{class:"q-mt-sm",value:e.refundProgress(),color:"grey-3"},null,8,["value"])])])])])])])}const ws=(0,n.aZ)({name:"ProcessingTab",components:{},setup(){const e=(0,Ia.oR)(),t=(0,c.iH)(.2),a=(0,n.Fl)((()=>e.state.chain.token)),o=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),l=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.maturingRex}));function i(){var e,t;if("0"===l.value)return 0;let a=Math.round(new Date(new Date((null===(t=null===(e=o.value)||void 0===e?void 0:e.refund_request)||void 0===t?void 0:t.request_time.toString())+"Z").toUTCString()).getTime()/1e3)+604800-Math.round(new Date(Date.now()).getTime()/1e3),n=a/604800;return n>0?n:.01}function s(){var e,t;if("0"===l.value)return"No maturing TLOS";let a=Math.round(new Date(new Date((null===(t=null===(e=o.value)||void 0===e?void 0:e.rex_info)||void 0===t?void 0:t.rex_maturities[0].first.toString())+"Z")).getTime()/1e3)-Math.round(new Date((new Date).toISOString()).getTime()/1e3);if(a>0){var n=u(a,86400),i=u(a,3600)%24;return`${n} days, ${i} hours remaining`}return"No maturing Rex"}function u(e,t){return Math.floor(e/t)}return Object.assign(Object.assign({store:e,accountData:o,token:a,progress:t,refundProgress:i,maturitiesCountdown:s,maturingRex:l},(0,Pn.nv)({refund:"account/refund"})),{transactionId:(0,c.iH)(null),transactionError:null})}}),hs=(0,q.Z)(ws,[["render",gs]]),fs=hs;Z()(ws,"components",{QLinearProgress:xo.Z});const bs={class:"staking-form"},ys={class:"row q-col-gutter-md"},_s={class:"col-12"},ks={class:"row q-mb-md"},xs={class:"row q-pb-sm full-width"},Ts={class:"col-8"},qs={class:"col-4"},Is={class:"text-weight-bold text-right balance-amount"},Ss=(0,n.Uk)("Click to fill full amount"),Ds={class:"row"};function Cs(e,t,a,o,l,i){const s=(0,n.up)("q-icon"),c=(0,n.up)("q-tooltip"),u=(0,n.up)("q-input"),d=(0,n.up)("q-btn"),m=(0,n.up)("ViewTransaction"),v=(0,n.up)("q-card-section");return(0,n.wg)(),(0,n.iD)("div",bs,[(0,n.Wm)(v,null,{default:(0,n.w5)((()=>[(0,n._)("div",ys,[(0,n._)("div",_s,[(0,n._)("div",ks,[(0,n._)("div",xs,[(0,n._)("div",Ts,(0,r.zw)(`LIQUID ${e.symbol}`),1),(0,n._)("div",qs,[(0,n._)("div",{class:"row items-center justify-end q-hoverable cursor-pointer",onClick:t[0]||(t[0]=(...t)=>e.setMaxValue&&e.setMaxValue(...t))},[(0,n._)("div",Is,(0,r.zw)(`${e.liquidBalance} AVAILABLE`),1),(0,n.Wm)(s,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[Ss])),_:1})])])]),(0,n.Wm)(u,{modelValue:e.stakeTokens,"onUpdate:modelValue":t[1]||(t[1]=t=>e.stakeTokens=t),dense:"",dark:"",class:"full-width",standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:e.inputRules,type:"text",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",Ds,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Stake "+e.symbol,flat:"",onClick:e.stake},null,8,["label","onClick"])])])]),(0,n.Wm)(m,{modelValue:e.openTransaction,"onUpdate:modelValue":t[2]||(t[2]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])),_:1})])}var As=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const Ws=(0,qa.z)(),Vs=(0,n.aZ)({name:"StakingTab",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Ia.oR)();let t=(0,c.iH)(!1);const a=(0,c.iH)(""),o=(0,c.iH)(Ws.getSystemToken().symbol),l=(0,n.Fl)((()=>e.state.account.TransactionId)),i=(0,n.Fl)((()=>e.state.account.TransactionError)),s=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),u=(0,n.Fl)((()=>e.state.account.data.rex_info)),r=(0,n.Fl)((()=>e.state.account.rexbal)),d=(0,n.Fl)((()=>e.state.account.maturedRex)),m=(0,n.Fl)((()=>{var e;return null===(e=s.value)||void 0===e?void 0:e.core_liquid_balance.value})),v=(0,n.Fl)((()=>[e=>+e>=0||"Value must not be negative",e=>{var t;return+e<=(0,Ta.sA)((null!==(t=s.value.core_liquid_balance)&&void 0!==t?t:0).toString())||"Balance too low"}]));function p(){const t=e.state.chain.token.precision;""!==a.value&&(a.value=Number(a.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:t,minimumFractionDigits:t}).replace(/[^0-9.]/g,""))}function g(){return As(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),"0"===a.value||Number(a.value)>=Number(s.value.core_liquid_balance.toString())||(yield e.dispatch("account/stakeRex",{amount:a.value}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0))}))}function w(){a.value=(0,Ta.sA)(s.value.core_liquid_balance.toString()).toString(),p()}return{openTransaction:t,stakeTokens:a,transactionId:l,transactionError:i,accountData:s,rexInfo:u,rexbal:r,maturedRex:d,liquidBalance:m,symbol:o,inputRules:v,formatDec:p,stake:g,assetToAmount:Ta.sA,setMaxValue:w}}}),Zs=(0,q.Z)(Vs,[["render",Cs],["__scopeId","data-v-1f13247e"]]),Ns=Zs;Z()(Vs,"components",{QCardSection:ue.Z,QIcon:Wa.Z,QTooltip:Va.Z,QInput:fa.Z,QBtn:ne.Z});const zs={class:"staking-form"},Ms={class:"row q-col-gutter-md"},Rs={class:"col-12"},Fs={class:"row"},Hs={class:"row q-pb-sm full-width"},Us={class:"col-8"},Qs={class:"col-4"},js={class:"text-weight-bold text-right balance-amount"},Ls=(0,n.Uk)("Click to fill full amount"),Es={class:"row"};function Ps(e,t,a,o,l,i){const s=(0,n.up)("q-icon"),c=(0,n.up)("q-tooltip"),u=(0,n.up)("q-input"),d=(0,n.up)("q-btn"),m=(0,n.up)("ViewTransaction"),v=(0,n.up)("q-card-section");return(0,n.wg)(),(0,n.iD)("div",zs,[(0,n.Wm)(v,null,{default:(0,n.w5)((()=>[(0,n._)("div",Ms,[(0,n._)("div",Rs,[(0,n._)("div",Fs,[(0,n._)("div",Hs,[(0,n._)("div",Us,(0,r.zw)(`MATURED ${e.symbol}`),1),(0,n._)("div",Qs,[(0,n._)("div",{class:"row items-center justify-end q-hoverable cursor-pointer",onClick:t[0]||(t[0]=(...t)=>e.setMaxValue&&e.setMaxValue(...t))},[(0,n._)("div",js,(0,r.zw)(e.maxUnlend)+" "+(0,r.zw)(e.symbol),1),(0,n.Wm)(s,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[Ls])),_:1})])])]),(0,n.Wm)(u,{ref:"unstakeInput",modelValue:e.unstakeTokens,"onUpdate:modelValue":t[1]||(t[1]=t=>e.unstakeTokens=t),standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:[t=>t>=0&&te.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])),_:1})])}var Bs=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const Os=(0,qa.z)(),$s=(0,n.aZ)({name:"UnstakingTab",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Ia.oR)();let t=(0,c.iH)(!1);const a=(0,c.iH)(""),o=(0,c.iH)(Os.getSystemToken().symbol),l=(0,c.iH)(null),i=(0,n.Fl)((()=>e.state.account.TransactionId)),s=(0,n.Fl)((()=>e.state.account.TransactionError)),u=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),r=(0,n.Fl)((()=>e.state.account.data.rex_info)),d=(0,n.Fl)((()=>e.state.account.rexbal)),m=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.maturedRex})),v=(0,n.Fl)((()=>(0,Ta.sA)(m.value)-1e-4));function p(){const t=e.state.chain.token.precision;""!==a.value&&(a.value=Number(a.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:t,minimumFractionDigits:t}).replace(/[^0-9.]/g,""))}function g(){return Bs(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),l.value.hasError||(yield e.dispatch("account/unstakeRex",{amount:a.value}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0))}))}function w(){a.value=v.value.toString(),p()}return{openTransaction:t,unstakeTokens:a,unstakeInput:l,transactionId:i,transactionError:s,formatDec:p,unstake:g,assetToAmount:Ta.sA,accountData:u,rexInfo:r,rexbal:d,maturedRex:m,maxUnlend:v,symbol:o,setMaxValue:w}}}),Ys=(0,q.Z)($s,[["render",Ps],["__scopeId","data-v-2c517670"]]),Gs=Ys;Z()($s,"components",{QCardSection:ue.Z,QIcon:Wa.Z,QTooltip:Va.Z,QInput:fa.Z,QBtn:ne.Z});const Ks={class:"q-pt-lg"},Js={class:"container-refund q-pa-md"},Xs={class:"col-xs-12 col-sm-6"},ec={class:"row q-pa-sm"},tc={class:"col-6"},ac={class:"col-6 text-weight-bold"},nc={class:"col-xs-12 col-sm-6"},oc={class:"row q-pa-sm"},lc=(0,n._)("div",{class:"col-6"},null,-1),ic={class:"col-6 text-weight-bold"},sc={key:0,class:"row full-width"},cc=(0,n._)("div",{class:"col-12"},[(0,n._)("div",{class:"row q-pa-sm"},"No REX transaction history")],-1),uc=[cc];function rc(e,t,a,o,l,i){const s=(0,n.up)("q-separator");return(0,n.wg)(),(0,n.iD)("div",Ks,[(0,n._)("div",Js,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.rexActions,(t=>((0,n.wg)(),(0,n.iD)("div",{key:t.act.data.id,class:"row full-width"},[(0,n._)("div",Xs,[(0,n._)("div",ec,[(0,n._)("div",tc,(0,r.zw)(t.act.name),1),(0,n._)("div",ac,(0,r.zw)(e.getRexHistoryAsset(t.act.data)),1)])]),(0,n._)("div",nc,[(0,n._)("div",oc,[lc,(0,n._)("div",ic,(0,r.zw)(e.formatDate(t.timestamp,!1)),1)])]),(0,n.Wm)(s,{color:"grey-8"})])))),128)),0===e.rexActions.length?((0,n.wg)(),(0,n.iD)("div",sc,uc)):(0,n.kq)("",!0)])])}const dc=(0,n.aZ)({name:"HistoryTab",components:{},setup(){const e=(0,Ia.oR)(),t=(0,n.Fl)((()=>e.state.account.rexActions));return{store:e,rexActions:t,formatDate:Ta.p6,getRexHistoryAsset:Ta.vE}}}),mc=(0,q.Z)(dc,[["render",rc]]),vc=mc;Z()(dc,"components",{QSeparator:S.Z});const pc={class:"staking-form"},gc={class:"row q-col-gutter-md"},wc={class:"col-12"},hc={class:"row"},fc={class:"row q-pb-sm full-width"},bc=(0,n._)("div",{class:"col-9"},"STAKE TO SAVINGS",-1),yc={class:"col-3"},_c={class:"text-weight-bold text-right balance-amount"},kc=(0,n.Uk)("Any balance currently maturing will be moved first, click to stake full amount"),xc={class:"row"},Tc={class:"col-12"},qc={class:"row"},Ic={class:"row q-pb-sm full-width"},Sc=(0,n._)("div",{class:"col-9"},"UNSTAKE FROM SAVINGS",-1),Dc={class:"col-3"},Cc={class:"text-weight-bold text-right balance-amount"},Ac=(0,n.Uk)("Click to stake full amount"),Wc={class:"row"};function Vc(e,t,a,o,l,i){const s=(0,n.up)("q-icon"),c=(0,n.up)("q-tooltip"),u=(0,n.up)("q-input"),d=(0,n.up)("q-btn"),m=(0,n.up)("q-card-section"),v=(0,n.up)("ViewTransaction");return(0,n.wg)(),(0,n.iD)("div",pc,[(0,n.Wm)(m,null,{default:(0,n.w5)((()=>[(0,n._)("div",gc,[(0,n._)("div",wc,[(0,n._)("div",hc,[(0,n._)("div",fc,[bc,(0,n._)("div",yc,[(0,n._)("div",{class:"row items-center justify-end q-hoverable cursor-pointer",onClick:t[0]||(t[0]=(...t)=>e.setMaxSavingsValue&&e.setMaxSavingsValue(...t))},[(0,n._)("div",_c,(0,r.zw)(e.formatNumberWithCommas(e.eligibleStaked)),1),(0,n.Wm)(s,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[kc])),_:1})])])]),(0,n.Wm)(u,{modelValue:e.toSavingAmount,"onUpdate:modelValue":t[1]||(t[1]=t=>e.toSavingAmount=t),standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:[t=>t>=0&&t<=e.eligibleStaked||"Invalid amount."],type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",xc,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Move To Savings",flat:"",onClick:e.moveToSavings},null,8,["onClick"])])]),(0,n._)("div",Tc,[(0,n._)("div",qc,[(0,n._)("div",Ic,[Sc,(0,n._)("div",Dc,[(0,n._)("div",{class:"row items-center justify-end q-hoverable cursor-pointer",onClick:t[2]||(t[2]=(...t)=>e.setMaxWithdrawValue&&e.setMaxWithdrawValue(...t))},[(0,n._)("div",Cc,(0,r.zw)(e.rexSavings),1),(0,n.Wm)(s,{class:"q-ml-xs",name:"info"}),(0,n.Wm)(c,null,{default:(0,n.w5)((()=>[Ac])),_:1})])])]),(0,n.Wm)(u,{modelValue:e.fromSavingAmount,"onUpdate:modelValue":t[3]||(t[3]=t=>e.fromSavingAmount=t),standout:"bg-deep-purple-2 text-white",placeholder:"0","lazy-rules":!0,rules:[t=>t>=0&&t<=e.assetToAmount(e.rexSavings)||"Invalid amount."],type:"text",dense:"",dark:"",onBlur:e.formatDec},null,8,["modelValue","rules","onBlur"])]),(0,n._)("div",Wc,[(0,n.Wm)(d,{class:"full-width button-accent",label:"Withdraw from Savings",flat:"",onClick:e.moveFromSavings},null,8,["onClick"])])])])])),_:1}),(0,n.Wm)(v,{modelValue:e.openTransaction,"onUpdate:modelValue":t[4]||(t[4]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])])}var Zc=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const Nc=(0,n.aZ)({name:"SavingsTab",components:{ViewTransaction:Bn.Z},setup(){const e=(0,Ia.oR)(),t=(0,c.iH)(!1),a=(0,n.Fl)((()=>e.state.account.accountName)),o=(0,c.iH)(""),l=(0,c.iH)(""),i=(0,c.iH)(e.state.account.TransactionId),s=(0,c.iH)(e.state.account.TransactionError),u=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.data})),r=(0,n.Fl)((()=>{var t,a;return(0,Ta.sA)(null===(t=e.state)||void 0===t?void 0:t.account.maturedRex)+(0,Ta.sA)(null===(a=e.state)||void 0===a?void 0:a.account.maturingRex)})),d=(0,n.Fl)((()=>{var t;return null===(t=e.state)||void 0===t?void 0:t.account.savingsRex}));function m(){""!==o.value&&(o.value=Number(o.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,"")),""!==l.value&&(l.value=Number(l.value).toLocaleString("en-US",{style:"decimal",maximumFractionDigits:e.state.chain.token.precision,minimumFractionDigits:e.state.chain.token.precision}).replace(/[^0-9.]/g,""))}function v(){return Zc(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),"0"===o.value||""===o.value||Number(o.value)>r.value||(yield e.dispatch("account/moveToSavings",{amount:o.value||"0"}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0))}))}function p(){return Zc(this,void 0,void 0,(function*(){e.dispatch("account/resetTransaction"),"0"===l.value||""===l.value||Number(l.value)>=(0,Ta.sA)(d.value)||(yield e.dispatch("account/moveFromSavings",{amount:l.value||"0"}),"cleos"!==localStorage.getItem("autoLogin_"+(0,qa.z)().getChainId())&&(t.value=!0))}))}function g(){o.value=r.value.toString(),m()}function w(){l.value=(0,Ta.sA)(d.value).toString(),m()}return{openTransaction:t,stakingAccount:a,accountData:u,toSavingAmount:o,fromSavingAmount:l,eligibleStaked:r,rexSavings:d,transactionId:i,transactionError:s,formatNumberWithCommas:Ta.pw,formatDec:m,moveToSavings:v,moveFromSavings:p,assetToAmount:Ta.sA,setMaxSavingsValue:g,setMaxWithdrawValue:w}}}),zc=(0,q.Z)(Nc,[["render",Vc]]),Mc=zc;Z()(Nc,"components",{QCardSection:ue.Z,QIcon:Wa.Z,QTooltip:Va.Z,QInput:fa.Z,QBtn:ne.Z,QField:Io.Z});var Rc=a(17779),Fc=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const Hc=(0,qa.z)().getSystemToken().symbol,Uc=(0,n.aZ)({name:"StakingDialog",components:{StakingInfo:Ri,StakeFromResources:ns,ProcessingTab:fs,StakingTab:Ns,UnstakingTab:Gs,HistoryTab:vc,SavingsTab:Mc},data(){return{sendToken:{symbol:Hc,precision:4,amount:0,contract:"eosio.token"},sendDialog:!1,apy:"--"}},props:{availableTokens:{type:Array,required:!0}},setup(){const e=(0,Ia.oR)(),t=(0,n.Fl)((()=>e.state.account.rexfund||0)),a=(0,n.Fl)((()=>e.state.chain.token.symbol)),o=(0,c.iH)(null),l=(0,c.iH)(null),i=()=>Fc(this,void 0,void 0,(function*(){yield e.dispatch("account/unstakeRexFund",{amount:t.value}),e.dispatch("account/updateRexData",{account:e.state.account.accountName})})),s=(0,n.Fl)((()=>(0,Ta.xG)(t.value,4,a.value)));return Object.assign({openCoinDialog:(0,c.iH)(!1),recievingAccount:(0,c.iH)(""),sendAmount:(0,c.iH)("0"),memo:(0,c.iH)(""),tab:(0,c.iH)("stake"),rexfund:t,symbol:a,transactionError:l,transactionId:o,withdrawRexFund:i,prettyRexFund:s},(0,Pn.nv)({sendAction:"account/sendAction"}))},computed:Object.assign(Object.assign({},(0,Pn.Se)({account:"account/accountName"})),{transactionForm(){return!(this.transactionError||this.transactionId)}}),methods:{sendTransaction(){return Fc(this,void 0,void 0,(function*(){const e=this.sendToken.contract,t={from:this.account,to:this.recievingAccount,quantity:`${this.sendAmount} ${this.sendToken.symbol}`,memo:this.memo};try{this.transactionId=(yield this.sendAction({account:e,data:t,name:"transfer"})).transactionId}catch(a){this.transactionError=a}}))},setDefaults(){this.availableTokens.length>0&&(this.sendToken=this.availableTokens.find((e=>e.symbol===this.sendToken.symbol)))},updateSelectedCoin(e){this.sendToken=e},navToTransaction(){return Fc(this,void 0,void 0,(function*(){yield this.$router.push({name:"transaction",params:{transaction:this.transactionId}}),this.$router.go(0)}))},loadAccountData(){return Fc(this,void 0,void 0,(function*(){let e;try{e=yield this.$api.getAccount(this.account),this.$store.commit("account/setAccountData",e)}catch(t){return}}))}},mounted(){return Fc(this,void 0,void 0,(function*(){try{const e=yield this.$api.getApy();this.apy=`${e}%`}catch(e){Rc.error(e)}yield this.loadAccountData()}))}}),Qc=(0,q.Z)(Uc,[["render",di],["__scopeId","data-v-17b7ca54"]]),jc=Qc;Z()(Uc,"components",{QDialog:ha.Z,QCard:D.Z,QBtn:ne.Z,QTabs:Bl.Z,QTab:Ol.Z,QSeparator:S.Z,QTabPanels:$l.Z,QTabPanel:Yl.Z}),Z()(Uc,"directives",{ClosePopup:_a.Z});var Lc=a(97114),Ec=a(54170),Pc=a(17779),Bc=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const Oc=(0,qa.z)(),$c=(0,n.aZ)({name:"AccountCard",components:{PercentCircle:ft,SendDialog:Na,ResourcesDialog:Kl,DateField:Lc.Z,StakingDialog:jc},props:{account:{type:String,required:!0}},setup(e){const t=(0,X.Z)(),a=(0,Sa.tv)(),o=(0,ot.p)(),l=(0,n.Fl)((()=>qa.Z.get().getCurrentChain().getUiCustomization().accountPageSettings)),i=(0,c.iH)("2019-01-01T00:00:00.000"),s=(0,c.iH)(""),u=(0,c.iH)(""),r=(0,c.iH)("eosio"),d=(0,c.iH)(!0),m=(0,c.iH)(!0),v=(0,c.iH)(te.UInt64.from(0)),p=(0,c.iH)("kb"),g=(0,c.iH)("kb"),w=(0,c.iH)(0),h=(0,c.iH)(0),f=(0,n.Fl)((()=>o.resources.getDelegatedToOthersAggregated())),b=(0,c.iH)(0),y=(0,c.iH)(0),_=(0,c.iH)(0),x=(0,n.Fl)((()=>b.value+y.value+_.value)),T=(0,c.iH)(),q=(0,c.iH)(0),I=(0,c.iH)(0),S=(0,c.iH)(0),D=(0,c.iH)(0),C=(0,c.iH)(""),A=(0,c.iH)(0),W=(0,c.iH)(0),V=(0,c.iH)(0),Z=(0,c.iH)(0),N=(0,c.iH)(44),z=(0,c.iH)(0),M=(0,c.iH)(!0),R=(0,c.iH)(!1),F=(0,c.iH)(!1),H=(0,c.iH)(!1),U=(0,c.iH)(),Q=(0,c.iH)([]),j=(0,n.Fl)((()=>{var e,t,a,n,o,l;return(null!==(a=null===(t=null===(e=U.value)||void 0===e?void 0:e.refund_request)||void 0===t?void 0:t.cpu_amount.value)&&void 0!==a?a:0)+(null!==(l=null===(o=null===(n=U.value)||void 0===n?void 0:n.refund_request)||void 0===o?void 0:o.net_amount.value)&&void 0!==l?l:0)})),L=(0,n.Fl)((()=>j.value+I.value+q.value)),E=(0,n.Fl)((()=>o.state.chain.token)),P=(0,n.Fl)((()=>{var e,t;return(null===(t=null===(e=U.value)||void 0===e?void 0:e.core_liquid_balance)||void 0===t?void 0:t.value)?U.value.core_liquid_balance.value:0})),B=(0,n.Fl)((()=>"number"===typeof C.value?T.value*C.value:0)),O=(0,n.Fl)((()=>{var e,t;let a="";const n=(0,Ta.xG)(null!==(e=B.value)&&void 0!==e?e:0,2),o=(0,Ta.xG)(null!==(t=T.value)&&void 0!==t?t:0,4);return B.value&&T.value&&(a=`$${n} (@ $${o}/${Oc.getSystemToken().symbol})`),a})),$=(0,n.Fl)((()=>o.state.account.accountName===e.account)),Y=(0,n.Fl)((()=>Ec.ZP.formatDate(i.value,"DD MMMM YYYY @ hh:mm A"))),G=e=>{o.commit("chain/setToken",e)},K=()=>Bc(this,void 0,void 0,(function*(){try{d.value=!0,U.value=yield k.h.getAccount(e.account),yield ne(),J(),yield ae(),yield oe({account:e.account,force:!0})}catch(a){return t.notify(`account ${e.account} not found!`),void(M.value=!1)}})),J=()=>{C.value=P.value+x.value+L.value+f.value,d.value=!1},ae=()=>Bc(this,void 0,void 0,(function*(){m.value=!0,Q.value=yield k.h.getTokens(e.account),m.value=!1})),ne=()=>Bc(this,void 0,void 0,(function*(){try{const t=yield k.h.getCreator(e.account);u.value=t.creator,i.value=t.timestamp,s.value=t.trx_id}catch(a){t.notify(`creator account for ${e.account} not found!`)}})),oe=e=>o.resources.updateResources(e),le=e=>Math.abs(parseFloat(e.toFixed(3))),ie=()=>{""===E.value.symbol&&G(Oc.getSystemToken())},se=()=>Bc(this,void 0,void 0,(function*(){yield a.push({name:"account",params:{account:u.value}}),a.go(0)})),ce=()=>Bc(this,void 0,void 0,(function*(){yield a.push({name:"transaction",params:{transaction:s.value}}),a.go(0)})),ue=e=>{(0,ee.Z)(e).then((()=>{t.notify({color:"green-4",textColor:"white",message:"Copied to clipboard",timeout:1e3})})).catch((()=>{t.notify({color:"red-8",textColor:"white",message:"Could not copy",timeout:1e3})}))},re=e=>"undefined"===typeof e?"--":(Pc.assert("number"===typeof e||"string"===typeof e,e),"string"===typeof e?e:(0,Ta.xG)(e,4,Oc.getSystemToken().symbol)),de=()=>{C.value="--",z.value=h.value=0,b.value=0,_.value=0};return(0,n.bv)((()=>Bc(this,void 0,void 0,(function*(){T.value=yield Oc.getUsdPrice(),yield K(),yield o.dispatch("account/updateRexData",{account:e.account}),ie(),o.dispatch("chain/updateRamPrice")})))),(0,n.YP)((()=>e.account),(()=>Bc(this,void 0,void 0,(function*(){de(),yield K(),yield o.dispatch("account/updateRexData",{account:e.account})})))),(0,n.YP)((()=>o.resources.getDelegatedToOthersAggregated()),(()=>{J()})),{accountPageSettings:l,netUnit:p,ramUnit:g,stakedCPU:q,stakedNET:I,cpu_used:S,cpu_max:D,net_used:A,net_max:W,ram_used:V,ram_max:Z,creatingAccount:u,isLoading:d,tokensLoading:m,liquidNative:P,stakedRefund:j,totalTokens:C,totalValue:B,totalValueString:O,rex:x,rexStaked:b,rexDeposits:_,none:v,system_account:r,radius:N,availableTokens:Q,createTime:i,createTransaction:s,openSendDialog:R,openResourcesDialog:F,openStakingDialog:H,delegatedByOthers:h,delegatedToOthers:f,isAccount:$,token:E,createTimeFormat:Y,resources:w,accountExists:M,loadAccountData:K,setToken:G,fixDec:le,loadSystemToken:ie,loadCreatorAccount:se,loadCreatorTransaction:ce,copy:ue,formatAsset:re,updateTokenBalances:ae}}});var Yc=a(66933),Gc=a(82429);const Kc=(0,q.Z)($c,[["render",nt],["__scopeId","data-v-cc1b473a"]]),Jc=Kc;Z()($c,"components",{QCard:D.Z,QCardSection:ue.Z,QBtn:ne.Z,QTooltip:Va.Z,QIcon:Wa.Z,QSpace:I.Z,QMarkupTable:Yc.Z,QTable:Gc.Z});const Xc={class:"row"},eu=(0,n._)("div",{class:"col-12 q-py-md"},[(0,n._)("div",{class:"text-h5"},"Contract Details")],-1),tu={class:"col-12"};function au(e,t,a,o,l,i){const s=(0,n.up)("q-tab"),c=(0,n.up)("q-tabs"),u=(0,n.up)("ContractTables"),r=(0,n.up)("q-tab-panel"),d=(0,n.up)("ContractActions"),m=(0,n.up)("JsonViewer"),v=(0,n.up)("q-card-section"),p=(0,n.up)("q-card"),g=(0,n.up)("q-tab-panels");return(0,n.wg)(),(0,n.iD)("div",Xc,[eu,(0,n._)("div",tu,[(0,n.Wm)(c,{modelValue:e.tab,"onUpdate:modelValue":t[0]||(t[0]=t=>e.tab=t),"no-caps":"",align:"left",breakpoint:0},{default:(0,n.w5)((()=>[(0,n.Wm)(s,{name:"tables",label:"Tables"}),(0,n.Wm)(s,{name:"actions",label:"Actions"}),(0,n.Wm)(s,{name:"abi",label:"ABI"})])),_:1},8,["modelValue"]),(0,n.Wm)(g,{modelValue:e.tab,"onUpdate:modelValue":t[1]||(t[1]=t=>e.tab=t),class:"col-12"},{default:(0,n.w5)((()=>[(0,n.Wm)(r,{name:"tables"},{default:(0,n.w5)((()=>[(0,n.Wm)(u)])),_:1}),(0,n.Wm)(r,{name:"actions"},{default:(0,n.w5)((()=>[(0,n.Wm)(d)])),_:1}),(0,n.Wm)(r,{name:"abi"},{default:(0,n.w5)((()=>[(0,n.Wm)(p,{flat:"",class:"card--light-bg"},{default:(0,n.w5)((()=>[(0,n.Wm)(v,null,{default:(0,n.w5)((()=>[(0,n.Wm)(m,{value:e.abi,"expand-depth":5,"preview-mode":"preview-mode",boxed:"boxed",copyable:"copyable",sort:"sort"},null,8,["value"])])),_:1})])),_:1})])),_:1})])),_:1},8,["modelValue"])])])}var nu=a(61957);const ou=(0,n._)("div",{class:"q-pb-sm text-subtitle2 text-bold"},"Select table",-1),lu={class:"row justify-content full-width"},iu={class:"col-10"},su={class:"col-2 q-pl-md"},cu={class:"row q-py-md q-col-gutter-md"},uu={class:"col-xs-6 col-sm-3"},ru=(0,n._)("div",{class:"text-bold q-pb-sm"},"Scope",-1),du={class:"col-xs-6 col-sm-3"},mu=(0,n._)("div",{class:"text-bold q-pb-sm"},"Lower Bound",-1),vu={class:"col-xs-6 col-sm-3"},pu=(0,n._)("div",{class:"text-bold q-pb-sm"},"Upper Bound",-1),gu={class:"col-xs-6 col-sm-3"},wu=(0,n._)("div",{class:"text-bold q-pb-sm"},"Limit",-1),hu={key:0,class:"row full-width justify-center q-py-md q-px-xl"},fu=(0,n.Uk)("Show more");function bu(e,t,a,o,l,i){const s=(0,n.up)("q-select"),c=(0,n.up)("q-btn"),u=(0,n.up)("q-card-section"),r=(0,n.up)("q-input"),d=(0,n.up)("q-table"),m=(0,n.up)("q-card");return(0,n.wg)(),(0,n.j4)(m,{class:"card--light-bg",flat:""},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{class:"q-pl-md section--light-bg"},{default:(0,n.w5)((()=>[ou,(0,n._)("div",lu,[(0,n._)("div",iu,[(0,n.Wm)(s,{outlined:"","onUpdate:modelValue":[e.updateRows,t[0]||(t[0]=t=>e.table=t)],dense:"",modelValue:e.table,options:e.options,color:"primary",class:"bg-white"},null,8,["onUpdate:modelValue","modelValue","options"])]),(0,n._)("div",su,[(0,n.Wm)(c,{class:"full-width",unelevated:"",color:"primary",label:"Refresh",size:"15px",onClick:e.getRows},null,8,["onClick"])])])])),_:1}),(0,n.Wm)(u,{class:"q-pt-none"},{default:(0,n.w5)((()=>[(0,n._)("div",cu,[(0,n._)("div",uu,[ru,(0,n.Wm)(r,{outlined:"",onKeydown:(0,nu.D2)((0,nu.iM)(e.getRows,["prevent"]),["enter"]),onBlur:e.getRows,dense:"",modelValue:e.scope,"onUpdate:modelValue":t[1]||(t[1]=t=>e.scope=t),class:"bg-white"},null,8,["onKeydown","onBlur","modelValue"])]),(0,n._)("div",du,[mu,(0,n.Wm)(r,{outlined:"",onKeydown:(0,nu.D2)((0,nu.iM)(e.getRows,["prevent"]),["enter"]),onBlur:e.getRows,modelValue:e.lower,"onUpdate:modelValue":t[2]||(t[2]=t=>e.lower=t),dense:"",class:"bg-white"},null,8,["onKeydown","onBlur","modelValue"])]),(0,n._)("div",vu,[pu,(0,n.Wm)(r,{outlined:"",onKeydown:(0,nu.D2)((0,nu.iM)(e.getRows,["prevent"]),["enter"]),onBlur:e.getRows,modelValue:e.upper,"onUpdate:modelValue":t[3]||(t[3]=t=>e.upper=t),dense:"",class:"bg-white"},null,8,["onKeydown","onBlur","modelValue"])]),(0,n._)("div",gu,[wu,(0,n.Wm)(r,{outlined:"",onKeydown:(0,nu.D2)((0,nu.iM)(e.getRows,["prevent"]),["enter"]),onBlur:e.getRows,modelValue:e.limit,"onUpdate:modelValue":t[4]||(t[4]=t=>e.limit=t),dense:"",class:"bg-white"},null,8,["onKeydown","onBlur","modelValue"])])])])),_:1}),(0,n.Wm)(u,{class:"q-pt-none"},{default:(0,n.w5)((()=>[(0,n.Wm)(d,{rows:e.rows,"row-key":e.rows[0]?e.rows[0][0]:"","rows-per-page-options":[0]},{bottom:(0,n.w5)((()=>[e.canShowMore?((0,n.wg)(),(0,n.iD)("div",hu,[e.isMoreRows?((0,n.wg)(),(0,n.j4)(c,{key:0,class:"q-ml-xs q-mr-xs col button-primary",onClick:e.showMore},{default:(0,n.w5)((()=>[fu])),_:1},8,["onClick"])):(0,n.kq)("",!0)])):(0,n.kq)("",!0)])),_:1},8,["rows","row-key"])])),_:1})])),_:1})}var yu=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const _u=(0,n.aZ)({name:"ContractTables",setup(){const e=(0,Ia.oR)(),t=(0,n.Fl)((()=>e.state.account.abi.abi.tables.map((e=>e.name)))),a=(0,n.Fl)((()=>e.state.account.abi.account_name)),o=(0,c.iH)(t.value[0]),l=(0,c.iH)(e.state.account.abi.account_name),i=(0,c.iH)(null),s=(0,c.iH)(null),u=(0,c.iH)("20"),r=(0,c.iH)({sortBy:"timestamp",descending:!0,page:1,rowsPerPage:Number(u.value)||10}),d=(0,c.iH)([]),m=(0,n.Fl)((()=>d.value.length>=Number(u.value))),v=(0,n.Fl)((()=>Number(u.value)>=d.value.length));function p(){return yu(this,void 0,void 0,(function*(){const e={code:a.value,limit:u.value,lower_bound:i.value,scope:l.value,table:o.value,json:!0,key_type:"i64",upper_bound:s.value};let t=(yield k.h.getTableRows(e)).rows;t=t.map((e=>h(e))),d.value=t}))}function g(e){return yu(this,void 0,void 0,(function*(){const t={code:a.value,limit:u.value,lower_bound:i.value,scope:l.value,table:e,json:!0,key_type:"i64",upper_bound:s.value};let n=(yield k.h.getTableRows(t)).rows;n=n.map((e=>h(e))),d.value=n}))}function w(){return yu(this,void 0,void 0,(function*(){u.value=(Number(u.value)+Number(u.value)).toString(),yield p()}))}function h(e){var t={};for(let a in e)e[a]instanceof Object?t[a]=JSON.stringify(e[a]):t[a]=e[a];return t}return(0,n.bv)((()=>yu(this,void 0,void 0,(function*(){yield p()})))),{table:o,options:t,scope:l,lower:i,upper:s,limit:u,rows:d,getRows:p,pagination:r,updateRows:g,showMore:w,canShowMore:v,isMoreRows:m}}}),ku=(0,q.Z)(_u,[["render",bu]]),xu=ku;Z()(_u,"components",{QCard:D.Z,QCardSection:ue.Z,QSelect:To.Z,QBtn:ne.Z,QInput:fa.Z,QTable:Gc.Z});const Tu=(0,n._)("div",{class:"q-pb-sm text-subtitle2 text-bold"},"Select action",-1),qu={class:"row justify-content full-width"},Iu={class:"col-xs-8 col-sm-10"},Su={class:"col-xs-4 col-sm-2 q-pl-md"},Du={class:"row q-py-md q-col-gutter-md"},Cu={class:"text-bold q-pb-sm"},Au={class:"col-xs-6 col-sm-3"},Wu=(0,n._)("div",{class:"text-bold q-pb-sm"},"actor",-1),Vu={class:"col-xs-6 col-sm-3"},Zu=(0,n._)("div",{class:"text-bold q-pb-sm"},"permission",-1);function Nu(e,t,a,o,l,i){const s=(0,n.up)("q-select"),c=(0,n.up)("q-btn"),u=(0,n.up)("q-card-section"),d=(0,n.up)("q-input"),m=(0,n.up)("q-card"),v=(0,n.up)("ViewTransaction");return(0,n.wg)(),(0,n.iD)(n.HY,null,[(0,n.Wm)(m,{class:"card--light-bg",flat:""},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{class:"q-pl-md section--light-bg"},{default:(0,n.w5)((()=>[Tu,(0,n._)("div",qu,[(0,n._)("div",Iu,[(0,n.Wm)(s,{modelValue:e.action,"onUpdate:modelValue":t[0]||(t[0]=t=>e.action=t),outlined:"",dense:"",options:e.actions,color:"primary",class:"bg-white"},null,8,["modelValue","options"])]),(0,n._)("div",Su,[(0,n.Wm)(c,{class:"full-width",unelevated:"",color:"primary",label:"Push transaction",size:"15px",onClick:e.signAction},null,8,["onClick"])])])])),_:1}),(0,n.Wm)(u,{class:"q-pt-none"},{default:(0,n.w5)((()=>[(0,n._)("div",Du,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.fields,(t=>((0,n.wg)(),(0,n.iD)("div",{key:t.name,class:"col-xs-6 col-sm-3"},[(0,n._)("div",Cu,(0,r.zw)(t.name),1),(0,n.Wm)(d,{modelValue:e.memo[t.name],"onUpdate:modelValue":a=>e.memo[t.name]=a,outlined:"",dense:"",placeholder:t.type,class:"bg-white",onBlur:e.formatMemo},null,8,["modelValue","onUpdate:modelValue","placeholder","onBlur"])])))),128)),(0,n._)("div",Au,[Wu,(0,n.Wm)(d,{modelValue:e.actor,"onUpdate:modelValue":t[1]||(t[1]=t=>e.actor=t),outlined:"",dense:"",class:"bg-white"},null,8,["modelValue"])]),(0,n._)("div",Vu,[Zu,(0,n.Wm)(d,{modelValue:e.permission,"onUpdate:modelValue":t[2]||(t[2]=t=>e.permission=t),outlined:"",dense:"",class:"bg-white"},null,8,["modelValue"])])])])),_:1})])),_:1}),(0,n.Wm)(v,{modelValue:e.openTransaction,"onUpdate:modelValue":t[3]||(t[3]=t=>e.openTransaction=t),transactionId:e.transactionId,transactionError:e.transactionError||"",message:"transaction complete"},null,8,["modelValue","transactionId","transactionError"])],64)}var zu=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const Mu=(0,n.aZ)({name:"ContractActions",components:{ViewTransaction:Bn.Z},setup(){const e=(0,c.iH)({}),t=(0,c.iH)(""),a=(0,Ia.oR)(),o=(0,c.iH)(""),l=(0,c.iH)(!1),i=(0,c.iH)(a.state.account.TransactionId),s=(0,c.iH)(a.state.account.TransactionError),u=(0,n.Fl)((()=>a.state.account.abi.abi.actions.map((e=>e.name)))),r=(0,c.iH)(u.value[0]),d=(0,n.Fl)((()=>a.state.account.abi.abi.structs.find((e=>e.name===r.value)).fields));function m(){return zu(this,void 0,void 0,(function*(){yield a.dispatch("account/sendAction",{name:r.value,actor:o.value,permission:t.value,data:e.value}),l.value=!0}))}function v(){for(let t in e.value){const a=d.value.find((e=>e.name===t));"bool"===a.type&&("true"===e.value[t]||"1"===e.value[t]||"True"===e.value[t]||"T"===e.value[t]||"t"===e.value[t]?e.value[t]=!0:e.value[t]=!1)}}return(0,n.bv)((()=>zu(this,void 0,void 0,(function*(){o.value=yield a.state.account.user.getAccountName(),t.value=a.state.account.accountPermission})))),{action:r,actions:u,fields:d,memo:e,signAction:m,actor:o,permission:t,openTransaction:l,transactionId:i,transactionError:s,formatMemo:v}}}),Ru=(0,q.Z)(Mu,[["render",Nu]]),Fu=Ru;Z()(Mu,"components",{QCard:D.Z,QCardSection:ue.Z,QSelect:To.Z,QBtn:ne.Z,QInput:fa.Z});var Hu=a(18803),Uu=a.n(Hu);const Qu=(0,n.aZ)({name:"ContractTabs",setup(){const e=(0,Ia.oR)(),t=(0,Sa.yj)(),a=(0,Sa.tv)(),o=(0,c.iH)(t.query["tab1"]||"tables"),l=(0,n.Fl)((()=>e.state.account.abi));return(0,n.YP)([o],(()=>{let e=Object.assign({},t.query);e["tab1"]=o.value,a.push({path:a.currentRoute.value.path,query:e})})),{tab:o,abi:l}},components:{ContractTables:xu,ContractActions:Fu,JsonViewer:Uu()}}),ju=(0,q.Z)(Qu,[["render",au]]),Lu=ju;Z()(Qu,"components",{QTabs:Bl.Z,QTab:Ol.Z,QTabPanels:$l.Z,QTabPanel:Yl.Z,QCard:D.Z,QCardSection:ue.Z});var Eu=a(22231),Pu=a(17779),Bu=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const Ou={class:"row col-12 q-my-xs justify-center text-left container-max-width"},$u={class:"row col-11"},Yu={class:"row col-12 q-mt-lg"},Gu=(0,n._)("div",null,[(0,n._)("p",{class:"panel-title"},"Votes for Block Producers")],-1),Ku={class:"info-wrap"},Ju={class:"row voted-producers q-pa-md"},Xu={key:0,class:"producers-list"},er=["href"],tr=(0,n.aZ)({props:{account:{type:String,required:!0}},setup(e){const t=e,a=(0,c.iH)([]);return(0,n.wF)((()=>Bu(this,void 0,void 0,(function*(){try{const{account:{voter_info:{producers:e}}}=yield(0,Eu.V6)(t.account);a.value=e}catch(e){Pu.error(e)}})))),(e,t)=>{const o=(0,n.up)("q-space"),l=(0,n.up)("q-separator");return(0,n.wg)(),(0,n.iD)("div",Ou,[(0,n._)("div",$u,[(0,n._)("div",Yu,[Gu,(0,n.Wm)(o)]),(0,n.Wm)(l,{class:"row col-12 q-mt-md separator"}),(0,n._)("div",Ku,[(0,n._)("div",Ju,[(0,n._)("p",null,"Currently voting for the "+(0,r.zw)(a.value.length)+" out of 30 possible block producers:",1),a.value.length?((0,n.wg)(),(0,n.iD)("div",Xu,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(a.value,(e=>((0,n.wg)(),(0,n.iD)("span",{key:e,class:"producer-name"},[(0,n._)("a",{href:`/account/${e}`},(0,r.zw)(e),9,er)])))),128))])):(0,n.kq)("",!0)])])])])}}});var ar=a(77741);const nr=tr,or=nr;Z()(tr,"components",{QSpace:I.Z,QSeparator:S.Z,QColor:ar.Z});var lr=function(e,t,a,n){function o(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function i(e){try{c(n.next(e))}catch(t){l(t)}}function s(e){try{c(n["throw"](e))}catch(t){l(t)}}function c(e){e.done?a(e.value):o(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};const ir=(0,n.aZ)({name:"AccountPage",components:{TransactionsTable:u.Z,TokensPanel:z,KeysPanel:ge,ChildrenPanel:Ie,AccountCard:Jc,ContractTabs:Lu,BpVotes:or},setup(){const e=(0,Ia.oR)(),t=(0,Sa.yj)(),a=(0,Sa.tv)(),o=(0,n.Fl)((()=>qa.Z.get().getCurrentChain().getUiCustomization().accountPageSettings)),l=(0,c.iH)(t.query["tab"]||"transactions"),i=(0,n.Fl)((()=>t.params.account||"")),s=(0,n.Fl)((()=>e.state.account.abi.abi)),u=(0,c.iH)(k.h.getTokens(i.value));return(0,n.bv)((()=>lr(this,void 0,void 0,(function*(){yield e.dispatch("account/updateABI",t.params.account)})))),(0,n.YP)([l],(()=>{a.push({path:a.currentRoute.value.path,query:{tab:l.value}})})),{tab:l,account:i,abi:s,tokenList:u,accountPageSettings:o}}}),sr=(0,q.Z)(ir,[["render",s]]),cr=sr;Z()(ir,"components",{QTabs:Bl.Z,QTab:Ol.Z,QTabPanels:$l.Z,QTabPanel:Yl.Z})},48048:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDQiIGhlaWdodD0iNDQiIHZpZXdCb3g9IjAgMCA0NCA0NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNCIgeT0iMTIiIHdpZHRoPSIzNiIgaGVpZ2h0PSIyMCIgcng9IjciIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIvPgo8cGF0aCBkPSJNMTYgMThIMTRDMTIuODk1NCAxOCAxMiAxOC44OTU0IDEyIDIwVjI0QzEyIDI1LjEwNDYgMTIuODk1NCAyNiAxNCAyNkgxNiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTI3IDE4TDI3IDI0QzI3IDI1LjEwNDYgMjcuODk1NCAyNiAyOSAyNkwzMCAyNkMzMS4xMDQ2IDI2IDMyIDI1LjEwNDYgMzIgMjRMMzIgMTgiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0yMCAyMS43ODk1SDIyLjEwNTNDMjMuMTUxNyAyMS43ODk1IDI0IDIwLjk0MTIgMjQgMTkuODk0N1YxOS44OTQ3QzI0IDE4Ljg0ODMgMjMuMTUxNyAxOCAyMi4xMDUzIDE4SDE5VjI2IiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTIgMzJWMzQuNTcxNEMxMiAzNS4zNjA0IDEyLjYzOTYgMzYgMTMuNDI4NiAzNlYzNkMxNC4yMTc1IDM2IDE0Ljg1NzEgMzUuMzYwNCAxNC44NTcxIDM0LjU3MTRWMzIiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0yMC41NzE0IDMyVjM0LjU3MTRDMjAuNTcxNCAzNS4zNjA0IDIxLjIxMSAzNiAyMiAzNlYzNkMyMi43ODkgMzYgMjMuNDI4NiAzNS4zNjA0IDIzLjQyODYgMzQuNTcxNFYzMiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTI5LjE0MjkgMzJWMzQuNTcxNEMyOS4xNDI5IDM1LjM2MDQgMjkuNzgyNSAzNiAzMC41NzE1IDM2VjM2QzMxLjM2MDQgMzYgMzIgMzUuMzYwNCAzMiAzNC41NzE0VjMyIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTIgMTJWOS40Mjg1N0MxMiA4LjYzOTU5IDEyLjYzOTYgOCAxMy40Mjg2IDhWOEMxNC4yMTc1IDggMTQuODU3MSA4LjYzOTU5IDE0Ljg1NzEgOS40Mjg1N1YxMiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIwLjU3MTQgMTJWOS40Mjg1N0MyMC41NzE0IDguNjM5NTkgMjEuMjExIDggMjIgOFY4QzIyLjc4OSA4IDIzLjQyODYgOC42Mzk1OSAyMy40Mjg2IDkuNDI4NTdWMTIiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0yOS4xNDI5IDEyVjkuNDI4NTdDMjkuMTQyOSA4LjYzOTU5IDI5Ljc4MjUgOCAzMC41NzE1IDhWOEMzMS4zNjA0IDggMzIgOC42Mzk1OSAzMiA5LjQyODU3VjEyIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K"}}]); \ No newline at end of file diff --git a/dist/spa/js/862.56c8f538.js b/dist/spa/js/862.56c8f538.js new file mode 100644 index 0000000..a074375 --- /dev/null +++ b/dist/spa/js/862.56c8f538.js @@ -0,0 +1 @@ +"use strict";(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[862],{55228:(t,a,e)=>{e.r(a),e.d(a,{default:()=>oa});var s=e(59835),o=e(86970);const c=t=>((0,s.dD)("data-v-fd19d408"),t=t(),(0,s.Cn)(),t),n={class:"row"},l={class:"col-12 header-support"},i={key:1,class:"q-pa-lg"},r={class:"row full-width justify-center"},d={class:"col-xs-12 col-md-8 col-lg-6"},u={class:"q-pa-md-md q-pa-sm-sm q-pa-xs-xs q-pa-xl-lg"},m=c((()=>(0,s._)("div",{class:"text-h4 text-bold"},"Transaction not found.",-1))),p={class:"q-pt-lg"},w={class:"row full-height items-center"},v={class:"col-10"},x={class:"text-body"},_=(0,s.Uk)("Actions "),g={class:"q-pl-xs inline-block"},b={class:"bg-blur"},h={class:"row full-height items-center"},f={class:"col-10"},y={class:"text-body"},q=(0,s.Uk)("Traces "),W={class:"q-pl-xs inline-block"},k={class:"bg-blur"};function T(t,a,e,c,T,F){const Z=(0,s.up)("TransactionCard"),C=(0,s.up)("q-card-section"),z=(0,s.up)("q-card"),D=(0,s.up)("q-badge"),U=(0,s.up)("q-tab"),N=(0,s.up)("q-tabs"),Q=(0,s.up)("q-separator"),S=(0,s.up)("TransactionsTable"),j=(0,s.up)("q-tab-panel"),A=(0,s.up)("TraceTree"),V=(0,s.up)("JsonViewer"),B=(0,s.up)("q-tab-panels");return(0,s.wg)(),(0,s.iD)("div",n,[(0,s._)("div",l,[t.found?((0,s.wg)(),(0,s.j4)(Z,{key:0,class:"q-pa-lg"})):((0,s.wg)(),(0,s.iD)("div",i,[(0,s._)("div",r,[(0,s._)("div",d,[(0,s.Wm)(z,{class:"info-card",flat:""},{default:(0,s.w5)((()=>[(0,s._)("div",u,[(0,s.Wm)(C,{class:"q-pl-md"},{default:(0,s.w5)((()=>[m])),_:1})])])),_:1})])])])),(0,s._)("div",p,[(0,s.Wm)(N,{modelValue:t.tab,"onUpdate:modelValue":a[0]||(a[0]=a=>t.tab=a),class:"text-grey text-grey-5 tab-text",dense:"","indicator-color":"grey-3","active-color":"grey-3",align:"center","no-caps":""},{default:(0,s.w5)((()=>[(0,s._)("div",w,[(0,s._)("div",v,[(0,s.Wm)(U,{name:"actions"},{default:(0,s.w5)((()=>[(0,s._)("div",x,[_,(0,s._)("div",g,[(0,s._)("div",b,[(0,s.Wm)(D,{color:"transparent"},{default:(0,s.w5)((()=>[(0,s.Uk)((0,o.zw)(t.actionCount),1)])),_:1})])])])])),_:1})])]),(0,s._)("div",h,[(0,s._)("div",f,[(0,s.Wm)(U,{name:"traces"},{default:(0,s.w5)((()=>[(0,s._)("div",y,[q,(0,s._)("div",W,[(0,s._)("div",k,[(0,s.Wm)(D,{color:"transparent"},{default:(0,s.w5)((()=>[(0,s.Uk)((0,o.zw)(t.actionCount),1)])),_:1})])])])])),_:1})])]),(0,s.Wm)(U,{name:"raw",label:"Raw"})])),_:1},8,["modelValue"]),(0,s.Wm)(Q,{color:"grey-8"}),(0,s.Wm)(B,{modelValue:t.tab,"onUpdate:modelValue":a[1]||(a[1]=a=>t.tab=a),class:"tab-panel"},{default:(0,s.w5)((()=>[(0,s.Wm)(j,{name:"actions"},{default:(0,s.w5)((()=>[(0,s.Wm)(S,{account:Array.isArray(t.transaction)?t.transaction[0]:t.transaction,toggleEnabled:!1},null,8,["account"])])),_:1}),(0,s.Wm)(j,{name:"traces",class:"container-max-width"},{default:(0,s.w5)((()=>[(0,s.Wm)(A)])),_:1}),(0,s.Wm)(j,{name:"raw",class:"container-max-width"},{default:(0,s.w5)((()=>[(0,s.Wm)(V,{value:t.jsonTransaction,"expand-depth":5,"preview-mode":"preview-mode",boxed:"boxed",copyable:"copyable",sort:"sort"},null,8,["value"])])),_:1})])),_:1},8,["modelValue"])])])])}var F=e(60499),Z=e(59311);const C={class:"row full-width justify-center"},z={class:"col-xs-12 col-md-8 col-lg-6"},D={class:"q-pa-md-md q-pa-sm-sm q-pa-xs-xs q-pa-xl-lg"},U=(0,s._)("div",{class:"text-h4 text-bold"},"Transaction",-1),N={class:"row items-center"},Q={class:"col-11 text-bold ellipsis"},S={class:"col-1"},j=(0,s._)("div",{class:"text-grey-7"},"SUMMARY",-1),A={class:"row"},V=(0,s._)("div",{class:"col-xs-12 col-sm-6"},[(0,s._)("div",{class:"text-body1 text-weight-medium text-uppercase"},"Block number")],-1),B={class:"col-xs-12 col-sm-6 text-right text-bold"},E={class:"row"},I=(0,s._)("div",{class:"col-xs-12 col-sm-6"},[(0,s._)("div",{class:"text-body1 text-weight-medium text-uppercase"},"Block time")],-1),H={class:"col-xs-12 col-sm-6 text-right text-bold"},P={class:"row"},R=(0,s._)("div",{class:"col-xs-12 col-sm-6"},[(0,s._)("div",{class:"text-body1 text-weight-medium text-uppercase"},"Status")],-1),Y={class:"col-xs-12 col-sm-6 text-right text-bold"},K=(0,s.Uk)((0,o.zw)("IRREVERSIBLE")),M={class:"row"},$=(0,s._)("div",{class:"col-xs-12 col-sm-6"},[(0,s._)("div",{class:"text-body1 text-weight-medium text-uppercase"},"CPU usage")],-1),J={class:"col-xs-12 col-sm-6 text-right text-bold"},G={class:"row"},L=(0,s._)("div",{class:"col-xs-12 col-sm-6"},[(0,s._)("div",{class:"text-body1 text-weight-medium text-uppercase"},"Net usage")],-1),X={class:"col-xs-12 col-sm-6 text-right text-bold"},O={class:"row"},tt=(0,s._)("div",{class:"col-xs-12 col-sm-6"},[(0,s._)("div",{class:"text-body1 text-weight-medium text-uppercase"},"Actions/Traces")],-1),at={class:"col-xs-12 col-sm-6 text-right text-bold"};function et(t,a,e,c,n,l){const i=(0,s.up)("q-card-section"),r=(0,s.up)("q-btn"),d=(0,s.up)("q-separator"),u=(0,s.up)("AccountFormat"),m=(0,s.up)("q-badge"),p=(0,s.up)("q-card");return(0,s.wg)(),(0,s.iD)("div",C,[(0,s._)("div",z,[(0,s.Wm)(p,{class:"info-card container-max-width",flat:""},{default:(0,s.w5)((()=>[(0,s._)("div",D,[(0,s.Wm)(i,{class:"q-pl-md"},{default:(0,s.w5)((()=>[U])),_:1}),(0,s.Wm)(i,{class:"q-pt-none"},{default:(0,s.w5)((()=>[(0,s._)("div",N,[(0,s._)("div",Q,(0,o.zw)(t.transaction),1),(0,s._)("div",S,[(0,s.Wm)(r,{class:"float-right",flat:"",round:"",color:"black",icon:"content_copy",size:"sm",onClick:a[0]||(a[0]=a=>t.copy(t.transaction))})])])])),_:1}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[j])),_:1}),(0,s.Wm)(d,{class:"card-separator",inset:"inset"}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s._)("div",A,[V,(0,s._)("div",B,[(0,s.Wm)(u,{account:t.blockNum,type:"block"},null,8,["account"]),(0,s.Wm)(r,{flat:"",round:"",color:"black",icon:"content_copy",size:"sm",onClick:a[1]||(a[1]=a=>t.copy(t.blockNum))})])])])),_:1}),(0,s.Wm)(d,{class:"card-separator",inset:"inset"}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s._)("div",E,[I,(0,s._)("div",H,(0,o.zw)(t.formatDate(`${t.timestamp}Z`)),1)])])),_:1}),(0,s.Wm)(d,{class:"card-separator",inset:"inset"}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s._)("div",P,[R,(0,s._)("div",Y,[(0,s.Wm)(m,{class:"text-bold",transparent:"",align:"middle",color:"purple-2","text-color":"black"},{default:(0,s.w5)((()=>[(0,s.Uk)((0,o.zw)(t.executed?"EXECUTED":"PENDING"),1)])),_:1}),t.irreversable?((0,s.wg)(),(0,s.j4)(m,{key:0,class:"q-ml-sm text-bold",transparent:"",align:"middle",color:"deep-orange-2","text-color":"black"},{default:(0,s.w5)((()=>[K])),_:1})):(0,s.kq)("",!0)])])])),_:1}),(0,s.Wm)(d,{class:"card-separator",inset:"inset"}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s._)("div",M,[$,(0,s._)("div",J,(0,o.zw)(t.cpuUsage+" μs"),1)])])),_:1}),(0,s.Wm)(d,{class:"card-separator",inset:"inset"}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s._)("div",G,[L,(0,s._)("div",X,(0,o.zw)(t.netUsage+" Bytes"),1)])])),_:1}),(0,s.Wm)(d,{class:"card-separator",inset:"inset"}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s._)("div",O,[tt,(0,s._)("div",at,(0,o.zw)(t.actionNum+"/"+t.actionNum),1)])])),_:1})])])),_:1})])])}var st=e(65054),ot=e(78504),ct=e(90347),nt=e(53779);const lt=(0,s.aZ)({name:"TransactionCard",components:{AccountFormat:nt.Z},setup(){const t=(0,ot.useStore)();return{transaction:(0,s.Fl)((()=>t.state.transaction.transactionId)),transactionData:(0,s.Fl)((()=>t.state.transaction.transaction)),blockNum:(0,s.Fl)((()=>t.state.transaction.blockNum.toString())),timestamp:(0,s.Fl)((()=>t.state.transaction.timestamp)),executed:(0,s.Fl)((()=>t.state.transaction.executed)),irreversable:(0,s.Fl)((()=>t.state.transaction.irreversable)),cpuUsage:(0,s.Fl)((()=>t.state.transaction.cpuUsage)),netUsage:(0,s.Fl)((()=>t.state.transaction.netUsage)),actionsTraces:(0,F.iH)(""),actionNum:(0,s.Fl)((()=>t.state.transaction.actionCount))}},methods:{formatDate:ct.p6,copy(t){(0,st.Z)(t).then((()=>{this.$q.notify({color:"green-4",textColor:"white",message:"Copied to clipboard",timeout:1e3})})).catch((()=>{this.$q.notify({color:"red-8",textColor:"white",message:"Could not copy",timeout:1e3})}))},numberWithCommas(t){return t?t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):0}}});var it=e(11639),rt=e(44458),dt=e(63190),ut=e(68879),mt=e(50926),pt=e(20990),wt=e(69984),vt=e.n(wt);const xt=(0,it.Z)(lt,[["render",et]]),_t=xt;vt()(lt,"components",{QCard:rt.Z,QCardSection:dt.Z,QBtn:ut.Z,QSeparator:mt.Z,QBadge:pt.Z});var gt=e(61957);const bt={class:"row full-width justify-center"},ht={class:"col-xs-12 q-pa-md q-gutter-sm"},ft={class:"row items-center"},yt={class:"text-weight-bold text-primary"},qt={class:"col-xs-12 col-md-3"},Wt={class:"text-weight-bold"},kt={class:"col-xs-12 col-md-3"},Tt={class:"row justify-left text-weight-light"},Ft={class:"col-xs-12 col-md-3"},Zt={class:"text-weight-bold"},Ct={class:"text-weight-light"},zt={class:"col-xs-12 col-md-3"},Dt={class:"row justify-left text-weight-light"},Ut={class:"row items-center full-width bordered q-col-gutter-sm"},Nt={class:"col-xs-12 col-md-3"},Qt={class:"text-weight-bold"},St={class:"col-xs-12 col-md-3"},jt={class:"row justify-left text-weight-light"},At={class:"col-xs-12 col-md-3"},Vt={class:"text-weight-bold"},Bt={class:"text-weight-light"},Et={class:"col-xs-12 col-md-3"};function It(t,a,e,c,n,l){const i=(0,s.up)("ActionFormat"),r=(0,s.up)("DataFormat"),d=(0,s.up)("q-icon"),u=(0,s.up)("q-tree");return(0,s.wg)(),(0,s.iD)("div",bt,[(0,s._)("div",ht,[(0,s.Wm)(u,{nodes:t.getTree(t.actions),"node-key":"label","default-expand-all":""},{"default-header":(0,s.w5)((t=>[(0,s._)("div",ft,[(0,s._)("div",yt,(0,o.zw)(t.node.label),1)])])),"header-trace":(0,s.w5)((t=>[(0,s._)("div",{class:"row items-center full-width bordered q-col-gutter-sm",onClick:a[0]||(a[0]=(0,gt.iM)((()=>{}),["stop"]))},[(0,s._)("div",qt,[(0,s._)("div",Wt,(0,o.zw)(t.node.account),1)]),(0,s._)("div",kt,[(0,s._)("div",Tt,[(0,s.Wm)(i,{action:t.node.action},null,8,["action"])])]),(0,s._)("div",Ft,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(t.node.authorization,(t=>((0,s.wg)(),(0,s.iD)("div",{key:t.account},[(0,s._)("div",Zt,(0,o.zw)(t.actor),1),(0,s._)("div",Ct,"@"+(0,o.zw)(t.permission),1)])))),128))]),(0,s._)("div",zt,[(0,s._)("div",Dt,[(0,s.Wm)(r,{actionData:t.node.data,actionName:t.node.name,"use-color":!0},null,8,["actionData","actionName"])])])])])),"header-notification":(0,s.w5)((t=>[(0,s._)("div",Ut,[(0,s._)("div",Nt,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(t.node.notifications,(t=>((0,s.wg)(),(0,s.iD)("div",{key:t,class:"row"},[(0,s.Wm)(d,{name:"notifications",color:"primary"}),(0,s._)("div",Qt,(0,o.zw)(t),1)])))),128))]),(0,s._)("div",St,[(0,s._)("div",jt,[(0,s.Wm)(i,{action:t.node.action},null,8,["action"])])]),(0,s._)("div",At,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(t.node.authorization,(t=>((0,s.wg)(),(0,s.iD)("div",{key:t.account},[(0,s._)("div",Vt,(0,o.zw)(t.actor),1),(0,s._)("div",Bt,"@"+(0,o.zw)(t.permission),1)])))),128))]),(0,s._)("div",Et,[(0,s.Wm)(r,{actionData:t.node.data,actionName:t.node.name,"use-color":!0},null,8,["actionData","actionName"])])])])),_:1},8,["nodes"])])])}var Ht=e(55298),Pt=e(49815);const Rt=(0,s.aZ)({name:"TraceTree",components:{ActionFormat:Ht.Z,DataFormat:Pt.Z},setup(){const t=(0,ot.useStore)(),a=(0,s.Fl)((()=>t.state.account.accountName));function e(t){var a;let e=[];for(let s of t){let t=s.act,o={},c=[];(null!==(a=null===s||void 0===s?void 0:s.notified)&&void 0!==a?a:[]).length>1&&c.push({label:s.global_sequence.toString(),body:"notification",name:t.name,header:"notification",account:t.account,authorization:t.authorization,data:t.data,action:s,children:[],notifications:s.notified}),o={label:s.global_sequence.toString()+"notification",body:"trace",name:t.name,header:"trace",account:t.account,authorization:t.authorization,data:t.data,action:s,children:c,notifications:s.notified},e.push(o)}return e}return{transaction:(0,s.Fl)((()=>t.state.transaction.transactionId)),transactionData:(0,s.Fl)((()=>t.state.transaction.transaction)),blockNum:(0,s.Fl)((()=>t.state.transaction.blockNum)),timestamp:(0,s.Fl)((()=>t.state.transaction.timestamp)),executed:(0,s.Fl)((()=>t.state.transaction.executed)),irreversable:(0,s.Fl)((()=>t.state.transaction.irreversable)),cpuUsage:(0,s.Fl)((()=>t.state.transaction.cpuUsage)),netUsage:(0,s.Fl)((()=>t.state.transaction.netUsage)),actionsTraces:(0,F.iH)(""),actionNum:(0,s.Fl)((()=>t.state.transaction.actionCount)),actions:(0,s.Fl)((()=>t.state.transaction.actions)),getTree:e,account:a}}});var Yt=e(84749),Kt=e(22857);const Mt=(0,it.Z)(Rt,[["render",It]]),$t=Mt;vt()(Rt,"components",{QTree:Yt.Z,QIcon:Kt.Z});var Jt=e(18803),Gt=e.n(Jt),Lt=e(18910);const Xt=(0,s.aZ)({name:"TransactionPage",setup(){const t=(0,ot.useStore)(),a=(0,Lt.yj)(),e=(0,Lt.tv)(),o=(0,F.iH)(a.query["tab"]||"actions");return(0,s.bv)((()=>{t.commit("transaction/setTransactionId",a.params.transaction),t.dispatch("transaction/updateTransaction")})),(0,s.YP)([o],(()=>{e.push({path:e.currentRoute.value.path,query:{tab:o.value}})})),{tab:o,transaction:a.params.transaction,actionCount:(0,s.Fl)((()=>t.state.transaction.actionCount)),jsonTransaction:(0,s.Fl)((()=>t.state.transaction.transaction)),found:(0,s.Fl)((()=>t.state.transaction.transactionFound))}},components:{TransactionsTable:Z.Z,TransactionCard:_t,JsonViewer:Gt(),TraceTree:$t}});var Ot=e(47817),ta=e(57661),aa=e(89800),ea=e(84106);const sa=(0,it.Z)(Xt,[["render",T],["__scopeId","data-v-fd19d408"]]),oa=sa;vt()(Xt,"components",{QCard:rt.Z,QCardSection:dt.Z,QTabs:Ot.Z,QTab:ta.Z,QBadge:pt.Z,QSeparator:mt.Z,QTabPanels:aa.Z,QTabPanel:ea.Z})}}]); \ No newline at end of file diff --git a/dist/spa/js/862.91e04a74.js b/dist/spa/js/862.91e04a74.js deleted file mode 100644 index 46c72e1..0000000 --- a/dist/spa/js/862.91e04a74.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[862],{55228:(t,a,e)=>{e.r(a),e.d(a,{default:()=>oa});var s=e(59835),o=e(86970);const c=t=>((0,s.dD)("data-v-fd19d408"),t=t(),(0,s.Cn)(),t),n={class:"row"},l={class:"col-12 header-support"},i={key:1,class:"q-pa-lg"},r={class:"row full-width justify-center"},d={class:"col-xs-12 col-md-8 col-lg-6"},u={class:"q-pa-md-md q-pa-sm-sm q-pa-xs-xs q-pa-xl-lg"},m=c((()=>(0,s._)("div",{class:"text-h4 text-bold"},"Transaction not found.",-1))),p={class:"q-pt-lg"},w={class:"row full-height items-center"},v={class:"col-10"},x={class:"text-body"},_=(0,s.Uk)("Actions "),g={class:"q-pl-xs inline-block"},b={class:"bg-blur"},h={class:"row full-height items-center"},f={class:"col-10"},y={class:"text-body"},q=(0,s.Uk)("Traces "),W={class:"q-pl-xs inline-block"},k={class:"bg-blur"};function T(t,a,e,c,T,F){const Z=(0,s.up)("TransactionCard"),C=(0,s.up)("q-card-section"),z=(0,s.up)("q-card"),D=(0,s.up)("q-badge"),U=(0,s.up)("q-tab"),N=(0,s.up)("q-tabs"),Q=(0,s.up)("q-separator"),j=(0,s.up)("TransactionsTable"),S=(0,s.up)("q-tab-panel"),A=(0,s.up)("TraceTree"),R=(0,s.up)("JsonViewer"),V=(0,s.up)("q-tab-panels");return(0,s.wg)(),(0,s.iD)("div",n,[(0,s._)("div",l,[t.found?((0,s.wg)(),(0,s.j4)(Z,{key:0,class:"q-pa-lg"})):((0,s.wg)(),(0,s.iD)("div",i,[(0,s._)("div",r,[(0,s._)("div",d,[(0,s.Wm)(z,{class:"info-card",flat:""},{default:(0,s.w5)((()=>[(0,s._)("div",u,[(0,s.Wm)(C,{class:"q-pl-md"},{default:(0,s.w5)((()=>[m])),_:1})])])),_:1})])])])),(0,s._)("div",p,[(0,s.Wm)(N,{modelValue:t.tab,"onUpdate:modelValue":a[0]||(a[0]=a=>t.tab=a),class:"text-grey text-grey-5 tab-text",dense:"","indicator-color":"grey-3","active-color":"grey-3",align:"center","no-caps":""},{default:(0,s.w5)((()=>[(0,s._)("div",w,[(0,s._)("div",v,[(0,s.Wm)(U,{name:"actions"},{default:(0,s.w5)((()=>[(0,s._)("div",x,[_,(0,s._)("div",g,[(0,s._)("div",b,[(0,s.Wm)(D,{color:"transparent"},{default:(0,s.w5)((()=>[(0,s.Uk)((0,o.zw)(t.actionCount),1)])),_:1})])])])])),_:1})])]),(0,s._)("div",h,[(0,s._)("div",f,[(0,s.Wm)(U,{name:"traces"},{default:(0,s.w5)((()=>[(0,s._)("div",y,[q,(0,s._)("div",W,[(0,s._)("div",k,[(0,s.Wm)(D,{color:"transparent"},{default:(0,s.w5)((()=>[(0,s.Uk)((0,o.zw)(t.actionCount),1)])),_:1})])])])])),_:1})])]),(0,s.Wm)(U,{name:"raw",label:"Raw"})])),_:1},8,["modelValue"]),(0,s.Wm)(Q,{color:"grey-8"}),(0,s.Wm)(V,{modelValue:t.tab,"onUpdate:modelValue":a[1]||(a[1]=a=>t.tab=a),class:"tab-panel"},{default:(0,s.w5)((()=>[(0,s.Wm)(S,{name:"actions"},{default:(0,s.w5)((()=>[(0,s.Wm)(j,{account:Array.isArray(t.transaction)?t.transaction[0]:t.transaction,toggleEnabled:!1},null,8,["account"])])),_:1}),(0,s.Wm)(S,{name:"traces",class:"container-max-width"},{default:(0,s.w5)((()=>[(0,s.Wm)(A)])),_:1}),(0,s.Wm)(S,{name:"raw",class:"container-max-width"},{default:(0,s.w5)((()=>[(0,s.Wm)(R,{value:t.jsonTransaction,"expand-depth":5,"preview-mode":"preview-mode",boxed:"boxed",copyable:"copyable",sort:"sort"},null,8,["value"])])),_:1})])),_:1},8,["modelValue"])])])])}var F=e(60499),Z=e(59311);const C={class:"row full-width justify-center"},z={class:"col-xs-12 col-md-8 col-lg-6"},D={class:"q-pa-md-md q-pa-sm-sm q-pa-xs-xs q-pa-xl-lg"},U=(0,s._)("div",{class:"text-h4 text-bold"},"Transaction",-1),N={class:"row items-center"},Q={class:"col-11 text-bold ellipsis"},j={class:"col-1"},S=(0,s._)("div",{class:"text-grey-7"},"SUMMARY",-1),A={class:"row"},R=(0,s._)("div",{class:"col-xs-12 col-sm-6"},[(0,s._)("div",{class:"text-body1 text-weight-medium text-uppercase"},"Block number")],-1),V={class:"col-xs-12 col-sm-6 text-right text-bold"},B={class:"row"},E=(0,s._)("div",{class:"col-xs-12 col-sm-6"},[(0,s._)("div",{class:"text-body1 text-weight-medium text-uppercase"},"Block time")],-1),I={class:"col-xs-12 col-sm-6 text-right text-bold"},H={class:"row"},P=(0,s._)("div",{class:"col-xs-12 col-sm-6"},[(0,s._)("div",{class:"text-body1 text-weight-medium text-uppercase"},"Status")],-1),Y={class:"col-xs-12 col-sm-6 text-right text-bold"},K=(0,s.Uk)((0,o.zw)("IRREVERSIBLE")),M={class:"row"},$=(0,s._)("div",{class:"col-xs-12 col-sm-6"},[(0,s._)("div",{class:"text-body1 text-weight-medium text-uppercase"},"CPU usage")],-1),J={class:"col-xs-12 col-sm-6 text-right text-bold"},G={class:"row"},L=(0,s._)("div",{class:"col-xs-12 col-sm-6"},[(0,s._)("div",{class:"text-body1 text-weight-medium text-uppercase"},"Net usage")],-1),X={class:"col-xs-12 col-sm-6 text-right text-bold"},O={class:"row"},tt=(0,s._)("div",{class:"col-xs-12 col-sm-6"},[(0,s._)("div",{class:"text-body1 text-weight-medium text-uppercase"},"Actions/Traces")],-1),at={class:"col-xs-12 col-sm-6 text-right text-bold"};function et(t,a,e,c,n,l){const i=(0,s.up)("q-card-section"),r=(0,s.up)("q-btn"),d=(0,s.up)("q-separator"),u=(0,s.up)("AccountFormat"),m=(0,s.up)("q-badge"),p=(0,s.up)("q-card");return(0,s.wg)(),(0,s.iD)("div",C,[(0,s._)("div",z,[(0,s.Wm)(p,{class:"info-card container-max-width",flat:""},{default:(0,s.w5)((()=>[(0,s._)("div",D,[(0,s.Wm)(i,{class:"q-pl-md"},{default:(0,s.w5)((()=>[U])),_:1}),(0,s.Wm)(i,{class:"q-pt-none"},{default:(0,s.w5)((()=>[(0,s._)("div",N,[(0,s._)("div",Q,(0,o.zw)(t.transaction),1),(0,s._)("div",j,[(0,s.Wm)(r,{class:"float-right",flat:"",round:"",color:"black",icon:"content_copy",size:"sm",onClick:a[0]||(a[0]=a=>t.copy(t.transaction))})])])])),_:1}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[S])),_:1}),(0,s.Wm)(d,{class:"card-separator",inset:"inset"}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s._)("div",A,[R,(0,s._)("div",V,[(0,s.Wm)(u,{account:t.blockNum,type:"block"},null,8,["account"]),(0,s.Wm)(r,{flat:"",round:"",color:"black",icon:"content_copy",size:"sm",onClick:a[1]||(a[1]=a=>t.copy(t.blockNum))})])])])),_:1}),(0,s.Wm)(d,{class:"card-separator",inset:"inset"}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s._)("div",B,[E,(0,s._)("div",I,(0,o.zw)(t.formatDate(`${t.timestamp}Z`)),1)])])),_:1}),(0,s.Wm)(d,{class:"card-separator",inset:"inset"}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s._)("div",H,[P,(0,s._)("div",Y,[(0,s.Wm)(m,{class:"text-bold",transparent:"",align:"middle",color:"purple-2","text-color":"black"},{default:(0,s.w5)((()=>[(0,s.Uk)((0,o.zw)(t.executed?"EXECUTED":"PENDING"),1)])),_:1}),t.irreversable?((0,s.wg)(),(0,s.j4)(m,{key:0,class:"q-ml-sm text-bold",transparent:"",align:"middle",color:"deep-orange-2","text-color":"black"},{default:(0,s.w5)((()=>[K])),_:1})):(0,s.kq)("",!0)])])])),_:1}),(0,s.Wm)(d,{class:"card-separator",inset:"inset"}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s._)("div",M,[$,(0,s._)("div",J,(0,o.zw)(t.cpuUsage+" μs"),1)])])),_:1}),(0,s.Wm)(d,{class:"card-separator",inset:"inset"}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s._)("div",G,[L,(0,s._)("div",X,(0,o.zw)(t.netUsage+" Bytes"),1)])])),_:1}),(0,s.Wm)(d,{class:"card-separator",inset:"inset"}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s._)("div",O,[tt,(0,s._)("div",at,(0,o.zw)(t.actionNum+"/"+t.actionNum),1)])])),_:1})])])),_:1})])])}var st=e(65054),ot=e(78504),ct=e(90347),nt=e(53779);const lt=(0,s.aZ)({name:"TransactionCard",components:{AccountFormat:nt.Z},setup(){const t=(0,ot.oR)();return{transaction:(0,s.Fl)((()=>t.state.transaction.transactionId)),transactionData:(0,s.Fl)((()=>t.state.transaction.transaction)),blockNum:(0,s.Fl)((()=>t.state.transaction.blockNum.toString())),timestamp:(0,s.Fl)((()=>t.state.transaction.timestamp)),executed:(0,s.Fl)((()=>t.state.transaction.executed)),irreversable:(0,s.Fl)((()=>t.state.transaction.irreversable)),cpuUsage:(0,s.Fl)((()=>t.state.transaction.cpuUsage)),netUsage:(0,s.Fl)((()=>t.state.transaction.netUsage)),actionsTraces:(0,F.iH)(""),actionNum:(0,s.Fl)((()=>t.state.transaction.actionCount))}},methods:{formatDate:ct.p6,copy(t){(0,st.Z)(t).then((()=>{this.$q.notify({color:"green-4",textColor:"white",message:"Copied to clipboard",timeout:1e3})})).catch((()=>{this.$q.notify({color:"red-8",textColor:"white",message:"Could not copy",timeout:1e3})}))},numberWithCommas(t){return t?t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):0}}});var it=e(11639),rt=e(44458),dt=e(63190),ut=e(68879),mt=e(50926),pt=e(20990),wt=e(69984),vt=e.n(wt);const xt=(0,it.Z)(lt,[["render",et]]),_t=xt;vt()(lt,"components",{QCard:rt.Z,QCardSection:dt.Z,QBtn:ut.Z,QSeparator:mt.Z,QBadge:pt.Z});var gt=e(61957);const bt={class:"row full-width justify-center"},ht={class:"col-xs-12 q-pa-md q-gutter-sm"},ft={class:"row items-center"},yt={class:"text-weight-bold text-primary"},qt={class:"col-xs-12 col-md-3"},Wt={class:"text-weight-bold"},kt={class:"col-xs-12 col-md-3"},Tt={class:"row justify-left text-weight-light"},Ft={class:"col-xs-12 col-md-3"},Zt={class:"text-weight-bold"},Ct={class:"text-weight-light"},zt={class:"col-xs-12 col-md-3"},Dt={class:"row justify-left text-weight-light"},Ut={class:"row items-center full-width bordered q-col-gutter-sm"},Nt={class:"col-xs-12 col-md-3"},Qt={class:"text-weight-bold"},jt={class:"col-xs-12 col-md-3"},St={class:"row justify-left text-weight-light"},At={class:"col-xs-12 col-md-3"},Rt={class:"text-weight-bold"},Vt={class:"text-weight-light"},Bt={class:"col-xs-12 col-md-3"};function Et(t,a,e,c,n,l){const i=(0,s.up)("ActionFormat"),r=(0,s.up)("DataFormat"),d=(0,s.up)("q-icon"),u=(0,s.up)("q-tree");return(0,s.wg)(),(0,s.iD)("div",bt,[(0,s._)("div",ht,[(0,s.Wm)(u,{nodes:t.getTree(t.actions),"node-key":"label","default-expand-all":""},{"default-header":(0,s.w5)((t=>[(0,s._)("div",ft,[(0,s._)("div",yt,(0,o.zw)(t.node.label),1)])])),"header-trace":(0,s.w5)((t=>[(0,s._)("div",{class:"row items-center full-width bordered q-col-gutter-sm",onClick:a[0]||(a[0]=(0,gt.iM)((()=>{}),["stop"]))},[(0,s._)("div",qt,[(0,s._)("div",Wt,(0,o.zw)(t.node.account),1)]),(0,s._)("div",kt,[(0,s._)("div",Tt,[(0,s.Wm)(i,{action:t.node.action},null,8,["action"])])]),(0,s._)("div",Ft,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(t.node.authorization,(t=>((0,s.wg)(),(0,s.iD)("div",{key:t.account},[(0,s._)("div",Zt,(0,o.zw)(t.actor),1),(0,s._)("div",Ct,"@"+(0,o.zw)(t.permission),1)])))),128))]),(0,s._)("div",zt,[(0,s._)("div",Dt,[(0,s.Wm)(r,{actionData:t.node.data,actionName:t.node.name,"use-color":!0},null,8,["actionData","actionName"])])])])])),"header-notification":(0,s.w5)((t=>[(0,s._)("div",Ut,[(0,s._)("div",Nt,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(t.node.notifications,(t=>((0,s.wg)(),(0,s.iD)("div",{key:t,class:"row"},[(0,s.Wm)(d,{name:"notifications",color:"primary"}),(0,s._)("div",Qt,(0,o.zw)(t),1)])))),128))]),(0,s._)("div",jt,[(0,s._)("div",St,[(0,s.Wm)(i,{action:t.node.action},null,8,["action"])])]),(0,s._)("div",At,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(t.node.authorization,(t=>((0,s.wg)(),(0,s.iD)("div",{key:t.account},[(0,s._)("div",Rt,(0,o.zw)(t.actor),1),(0,s._)("div",Vt,"@"+(0,o.zw)(t.permission),1)])))),128))]),(0,s._)("div",Bt,[(0,s.Wm)(r,{actionData:t.node.data,actionName:t.node.name,"use-color":!0},null,8,["actionData","actionName"])])])])),_:1},8,["nodes"])])])}var It=e(55298),Ht=e(49815);const Pt=(0,s.aZ)({name:"TraceTree",components:{ActionFormat:It.Z,DataFormat:Ht.Z},setup(){const t=(0,ot.oR)(),a=(0,s.Fl)((()=>t.state.account.accountName));function e(t){var a;let e=[];for(let s of t){let t=s.act,o={},c=[];(null!==(a=null===s||void 0===s?void 0:s.notified)&&void 0!==a?a:[]).length>1&&c.push({label:s.global_sequence.toString(),body:"notification",name:t.name,header:"notification",account:t.account,authorization:t.authorization,data:t.data,action:s,children:[],notifications:s.notified}),o={label:s.global_sequence.toString()+"notification",body:"trace",name:t.name,header:"trace",account:t.account,authorization:t.authorization,data:t.data,action:s,children:c,notifications:s.notified},e.push(o)}return e}return{transaction:(0,s.Fl)((()=>t.state.transaction.transactionId)),transactionData:(0,s.Fl)((()=>t.state.transaction.transaction)),blockNum:(0,s.Fl)((()=>t.state.transaction.blockNum)),timestamp:(0,s.Fl)((()=>t.state.transaction.timestamp)),executed:(0,s.Fl)((()=>t.state.transaction.executed)),irreversable:(0,s.Fl)((()=>t.state.transaction.irreversable)),cpuUsage:(0,s.Fl)((()=>t.state.transaction.cpuUsage)),netUsage:(0,s.Fl)((()=>t.state.transaction.netUsage)),actionsTraces:(0,F.iH)(""),actionNum:(0,s.Fl)((()=>t.state.transaction.actionCount)),actions:(0,s.Fl)((()=>t.state.transaction.actions)),getTree:e,account:a}}});var Yt=e(84749),Kt=e(22857);const Mt=(0,it.Z)(Pt,[["render",Et]]),$t=Mt;vt()(Pt,"components",{QTree:Yt.Z,QIcon:Kt.Z});var Jt=e(18803),Gt=e.n(Jt),Lt=e(18910);const Xt=(0,s.aZ)({name:"TransactionPage",setup(){const t=(0,ot.oR)(),a=(0,Lt.yj)(),e=(0,Lt.tv)(),o=(0,F.iH)(a.query["tab"]||"actions");return(0,s.bv)((()=>{t.commit("transaction/setTransactionId",a.params.transaction),t.dispatch("transaction/updateTransaction")})),(0,s.YP)([o],(()=>{e.push({path:e.currentRoute.value.path,query:{tab:o.value}})})),{tab:o,transaction:a.params.transaction,actionCount:(0,s.Fl)((()=>t.state.transaction.actionCount)),jsonTransaction:(0,s.Fl)((()=>t.state.transaction.transaction)),found:(0,s.Fl)((()=>t.state.transaction.transactionFound))}},components:{TransactionsTable:Z.Z,TransactionCard:_t,JsonViewer:Gt(),TraceTree:$t}});var Ot=e(47817),ta=e(57661),aa=e(89800),ea=e(84106);const sa=(0,it.Z)(Xt,[["render",T],["__scopeId","data-v-fd19d408"]]),oa=sa;vt()(Xt,"components",{QCard:rt.Z,QCardSection:dt.Z,QTabs:Ot.Z,QTab:ta.Z,QBadge:pt.Z,QSeparator:mt.Z,QTabPanels:aa.Z,QTabPanel:ea.Z})}}]); \ No newline at end of file diff --git a/dist/spa/js/895.2c5dce85.js b/dist/spa/js/895.2c5dce85.js new file mode 100644 index 0000000..90bb5d9 --- /dev/null +++ b/dist/spa/js/895.2c5dce85.js @@ -0,0 +1 @@ +"use strict";(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[895],{29895:(e,t,o)=>{o.r(t),o.d(t,{default:()=>K});var a=o(59835),n=o(86970);const r={class:"proposal-item full-width row justify-center items-center header-support"},s={key:0,class:"col text-center"},l={key:1,class:"proposal-item__content col text-center"},i={class:"proposal-item__content-title text-h4 text-white q-ma-none"},c={class:"proposal-item__content-sub text-caption text-white text-uppercase q-mt-xs"},u=(0,a.Uk)("PROPOSER "),p={class:"q-mb-lg"},d={class:"row q-gutter-sm justify-center items-center"},v=(0,a._)("h2",{class:"text-h6 text-weight-regular"},"Multisig Transaction",-1),m={class:"text-h6 text-weight-regular"},h={class:"text-h6 text-weight-regular q-mt-xl"},w=(0,a._)("span",null,"Requested Approvals",-1),g={class:"text-body1 q-ml-sm text-grey"},f=(0,a._)("span",{class:"q-mx-sm"},"•",-1),y=(0,a._)("span",null,"Active BPs",-1),x={class:"text-body1 q-ml-sm text-grey"};function b(e,t,o,b,_,k){const S=(0,a.up)("q-spinner"),q=(0,a.up)("router-link"),A=(0,a.up)("q-badge"),C=(0,a.up)("q-btn"),P=(0,a.up)("JsonViewer"),E=(0,a.up)("q-expansion-item"),B=(0,a.up)("q-card"),T=(0,a.up)("q-td"),j=(0,a.up)("q-tr"),U=(0,a.up)("q-table"),D=(0,a.up)("q-page");return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a._)("div",r,[e.isLoading?((0,a.wg)(),(0,a.iD)("div",s,[(0,a.Wm)(S,{color:"white",size:"2em"})])):((0,a.wg)(),(0,a.iD)("div",l,[(0,a._)("h1",i,"Proposal "+(0,n.zw)(e.proposalName),1),(0,a._)("p",c,[u,(0,a.Wm)(q,{to:"/account/"+e.proposer,class:"text-white cursor-pointer"},{default:(0,a.w5)((()=>[(0,a.Uk)((0,n.zw)(e.proposer),1)])),_:1},8,["to"]),(0,a.Uk)(" • APPROVAL STATUS "+(0,n.zw)(e.approvalStatus)+" • EXPIRATION "+(0,n.zw)(e.expirationDate),1)]),(0,a._)("div",p,[e.isExecuted&&!e.isCanceled?((0,a.wg)(),(0,a.j4)(A,{key:0,color:"green",label:"EXECUTED"})):(0,a.kq)("",!0),e.isExecuted||e.isCanceled?(0,a.kq)("",!0):((0,a.wg)(),(0,a.j4)(A,{key:1,color:"orange",label:"NOT EXECUTED"})),e.isCanceled?((0,a.wg)(),(0,a.j4)(A,{key:2,color:"red",label:"CANCELED"})):(0,a.kq)("",!0)]),(0,a._)("div",d,[e.isShowExecuteButton?((0,a.wg)(),(0,a.j4)(C,{key:0,outline:"",padding:"sm md",color:"white","text-color":"white",label:"Execute",onClick:e.onExecute},null,8,["onClick"])):(0,a.kq)("",!0),e.isShowCancelButton?((0,a.wg)(),(0,a.j4)(C,{key:1,outline:"",padding:"sm md",color:"white","text-color":"white",label:"Cancel",onClick:e.onCancel},null,8,["onClick"])):(0,a.kq)("",!0),e.isShowApproveButton?((0,a.wg)(),(0,a.j4)(C,{key:2,outline:"",padding:"sm md",color:"white","text-color":"white",label:"Approve",onClick:e.onApprove},null,8,["onClick"])):(0,a.kq)("",!0),e.isShowUnapproveButton?((0,a.wg)(),(0,a.j4)(C,{key:3,outline:"",padding:"sm md",color:"white","text-color":"white",label:"Unapprove",onClick:e.onUnapprove},null,8,["onClick"])):(0,a.kq)("",!0)])]))]),(0,a.Wm)(D,{padding:""},{default:(0,a.w5)((()=>[v,((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.multsigTransactionData,((e,t)=>((0,a.wg)(),(0,a.j4)(B,{key:t,class:"q-mt-md"},{default:(0,a.w5)((()=>[(0,a.Wm)(E,{"switch-toggle-side":"","default-opened":""},{header:(0,a.w5)((()=>[(0,a._)("span",m,(0,n.zw)(e.account)+" - "+(0,n.zw)(e.name),1)])),default:(0,a.w5)((()=>[(0,a.Wm)(P,{value:e,"expand-depth":5,"preview-mode":"preview-mode",boxed:"boxed",copyable:"copyable",sort:"sort"},null,8,["value"])])),_:2},1024)])),_:2},1024)))),128)),(0,a._)("h2",h,[w,(0,a._)("span",g,(0,n.zw)(e.approvalStatus),1),f,y,(0,a._)("span",x,(0,n.zw)(e.producersApprovalStatus),1)]),(0,a.Wm)(B,{class:"q-mb-xl"},{default:(0,a.w5)((()=>[(0,a.Wm)(U,{color:"primary",flat:"",bordered:!1,square:!0,"table-header-class":"text-grey-7",rows:e.requestedApprovalsRows,columns:e.requestedApprovalsColumns,"row-key":"index","rows-per-page-options":[25,40,80,160]},{body:(0,a.w5)((e=>[(0,a.Wm)(j,{props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(T,{key:"actor",props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(q,{class:"text-primary text-no-decoration cursor-pointer",to:"/account/"+e.row.actor},{default:(0,a.w5)((()=>[(0,a.Uk)((0,n.zw)(e.row.actor),1)])),_:2},1032,["to"]),e.row.isBp?((0,a.wg)(),(0,a.j4)(A,{key:0,class:"q-ml-xs",label:"Active BP"})):(0,a.kq)("",!0)])),_:2},1032,["props"]),(0,a.Wm)(T,{key:"permission",props:e},{default:(0,a.w5)((()=>[(0,a._)("span",null,(0,n.zw)(e.row.permission),1)])),_:2},1032,["props"]),(0,a.Wm)(T,{key:"status",props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(A,{color:e.row.status?"green":"orange",label:e.row.status?"APPROVED":"PENDING"},null,8,["color","label"])])),_:2},1032,["props"])])),_:2},1032,["props"])])),_:1},8,["rows","columns"])])),_:1})])),_:1})],64)}var _=o(60499),k=o(18910),S=o(19302),q=o(18803),A=o.n(q),C=o(43878),P=o.n(C),E=o(21889),B=o(61429),T=o.n(B),j=o(61753),U=o(78504),D=o(3708),N=o(71130),z=o(17779),O=o(40270)["lW"],W=function(e,t,o,a){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function s(e){try{i(a.next(e))}catch(t){r(t)}}function l(e){try{i(a["throw"](e))}catch(t){r(t)}}function i(e){e.done?o(e.value):n(e.value).then(s,l)}i((a=a.apply(e,t||[])).next())}))};const H=(0,a.aZ)({name:"ProposalItem",components:{JsonViewer:A()},setup(){const e=(0,k.yj)(),t=(0,k.tv)(),o=(0,S.Z)(),n=(0,U.useStore)(),{proposalName:r}=e.params,s=(0,a.Fl)((()=>n.state.account.accountName)),l=(0,a.Fl)((()=>n.state.account.isAuthenticated)),i=(0,_.iH)(!0),c=(0,_.iH)(""),u=(0,_.iH)(""),p=(0,_.iH)(""),d=(0,_.iH)(!1),v=(0,_.iH)(!1),m=(0,_.iH)(!1),h=(0,_.iH)(!1),w=(0,_.iH)([]),g=(0,_.iH)([]),f=[{name:"actor",align:"left",label:"ACTOR",field:"actor"},{name:"permission",align:"left",label:"PERMISSION",field:"permission"},{name:"status",align:"left",label:"STATUS",field:"status"}],y=(0,a.Fl)((()=>P()(new Date).isAfter(new Date(p.value)))),x=(0,a.Fl)((()=>l.value&&h.value&&!y.value&&!d.value&&!v.value&&!m.value)),b=(0,a.Fl)((()=>l.value&&d.value&&!y.value&&!v.value&&!m.value)),q=(0,a.Fl)((()=>l.value&&!y.value&&(s.value===c.value||h.value||d.value)&&!v.value&&!m.value)),A=(0,a.Fl)((()=>l.value&&s.value===c.value&&!y.value&&!v.value&&!m.value)),C=(0,a.Fl)((()=>{const e=g.value.filter((e=>e.isBp)),t=e.filter((e=>e.status));return`${t.length}/${e.length}`}));function B(e,t){var a,n,r;const s=JSON.parse(JSON.stringify(e));o.notify({color:"negative",message:(null===(r=null===(n=null===(a=null===s||void 0===s?void 0:s.cause)||void 0===a?void 0:a.json)||void 0===n?void 0:n.error)||void 0===r?void 0:r.what)||t,actions:[{label:"Dismiss",color:"white"}]})}function H(e){return W(this,void 0,void 0,(function*(){const t=yield E.h.getProducerSchedule(),o=t.active.producers.map((e=>e.producer_name));let a=[];return e.requested_approvals.forEach((e=>{a.push({actor:e.actor,permission:e.permission,status:!1,isBp:!1})})),e.provided_approvals.forEach((e=>{a.push({actor:e.actor,permission:e.permission,status:!0,isBp:!1})})),a=a.map((e=>Object.assign(Object.assign({},e),{isBp:o.includes(e.actor)}))).sort(((e,t)=>e.actor.localeCompare(t.actor))).sort(((e,t)=>Number(t.isBp)-Number(e.isBp)||Number(e.status)-Number(t.status))),a}))}function Z(){return W(this,void 0,void 0,(function*(){try{const{proposals:e}=yield E.h.getProposals({proposal:r,limit:1});return e[0]}catch(e){B(e,"Proposal not found"),yield t.push("/proposal")}}))}function R(e){return W(this,void 0,void 0,(function*(){let t,o=0;const a=100;while("undefined"===typeof t)try{const{actions:n}=yield E.h.getActions(e.proposer,"eosio.msig:propose",a,o);[t]=n.filter((t=>{const{proposal_name:o}=t.act.data;return o===e.proposal_name})),o+=a}catch(i){z.error(i)}const{trx:n}=t.act.data,r=j.Transaction.from(n);p.value=r.expiration.toString();const s={},l=[];for(let e=0;e`;else if("eosio"===t.account.toString()&&"setabi"===t.name.toString()){const e=j.Serializer.decode({data:a.abi,type:j.ABI});s[a.account]=e}l.push(Object.assign(Object.assign({},j.Serializer.objectify(t)),{data:a}))}return l}))}function F(e){return W(this,void 0,void 0,(function*(){const t=yield E.h.getBlock(String(e)),o=t.transactions.map((e=>W(this,void 0,void 0,(function*(){let t=e.trx.id;"string"!==typeof t&&(t=e.trx.toString());const{actions:o}=yield E.h.getTransaction(t);return o}))));return yield Promise.all(o)}))}function Q(){return W(this,void 0,void 0,(function*(){i.value=!0;const e=yield Z();if("undefined"===typeof e)return B(null,"Proposal not found"),void(yield t.push("/proposal"));c.value=e.proposer,u.value=`${e.provided_approvals.length}/${e.provided_approvals.length+e.requested_approvals.length}`,v.value=e.executed,d.value=e.provided_approvals.some((e=>e.actor===s.value)),h.value=e.requested_approvals.some((e=>e.actor===s.value));const[o,a]=yield Promise.all([H(e),R(e)]);g.value=o,w.value=a;const n=yield F(e.block_num);m.value=n.some((e=>"eosio.msig"===e[0].act.account&&"cancel"===e[0].act.name)),i.value=!1}))}function I({name:e,data:t}){return W(this,void 0,void 0,(function*(){const o=yield n.state.account.user.signTransaction({actions:[{account:"eosio.msig",name:e,authorization:[{actor:s.value,permission:n.state.account.accountPermission}],data:t}]},{blocksBehind:3,expireSeconds:30});return o}))}function L(){return W(this,void 0,void 0,(function*(){try{yield I({name:"approve",data:{proposer:c.value,proposal_name:r,level:{actor:s.value,permission:n.state.account.accountPermission}}}),yield(0,N._)(),yield Q()}catch(e){z.error(e),B(e,"Unable approve proposal")}}))}function $(){return W(this,void 0,void 0,(function*(){try{yield I({name:"unapprove",data:{proposer:c.value,proposal_name:r,level:{actor:s.value,permission:n.state.account.accountPermission}}}),yield(0,N._)(),yield Q()}catch(e){z.error(e),B(e,"Unable approve proposal")}}))}function J(){return W(this,void 0,void 0,(function*(){try{yield I({name:"exec",data:{proposer:c.value,proposal_name:r,executer:s.value}}),yield(0,N._)(),yield Q()}catch(e){B(e,"Unable execute proposal")}}))}function V(){return W(this,void 0,void 0,(function*(){try{yield I({name:"cancel",data:{proposer:c.value,proposal_name:r,canceler:s.value}}),yield(0,N._)(),yield Q()}catch(e){B(e,"Unable cancel proposal")}}))}function X(e){const t=Uint8Array.from(O.from(e,"hex")),o=T()(t);return O.from(o).toString("hex")}return(0,a.bv)(Q),{isLoading:i,account:s,proposalName:r,proposer:c,approvalStatus:u,producersApprovalStatus:C,expirationDate:p,isShowApproveButton:x,isShowUnapproveButton:b,isShowExecuteButton:q,isShowCancelButton:A,isExecuted:v,isCanceled:m,multsigTransactionData:w,requestedApprovalsRows:g,requestedApprovalsColumns:f,onApprove:L,onUnapprove:$,onExecute:J,onCancel:V,getShaForCode:X}}});var Z=o(11639),R=o(63940),F=o(20990),Q=o(68879),I=o(69885),L=o(44458),$=o(50651),J=o(82429),V=o(31233),X=o(67220),M=o(69984),Y=o.n(M);const G=(0,Z.Z)(H,[["render",b]]),K=G;Y()(H,"components",{QSpinner:R.Z,QBadge:F.Z,QBtn:Q.Z,QPage:I.Z,QCard:L.Z,QExpansionItem:$.Z,QTable:J.Z,QTr:V.Z,QTd:X.Z})}}]); \ No newline at end of file diff --git a/dist/spa/js/895.ebdf0705.js b/dist/spa/js/895.ebdf0705.js deleted file mode 100644 index feb6311..0000000 --- a/dist/spa/js/895.ebdf0705.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[895],{29895:(e,o,t)=>{t.r(o),t.d(o,{default:()=>K});var a=t(59835),n=t(86970);const r={class:"proposal-item full-width row justify-center items-center header-support"},s={key:0,class:"col text-center"},l={key:1,class:"proposal-item__content col text-center"},i={class:"proposal-item__content-title text-h4 text-white q-ma-none"},c={class:"proposal-item__content-sub text-caption text-white text-uppercase q-mt-xs"},u=(0,a.Uk)("PROPOSER "),p={class:"q-mb-lg"},d={class:"row q-gutter-sm justify-center items-center"},v=(0,a._)("h2",{class:"text-h6 text-weight-regular"},"Multisig Transaction",-1),m={class:"text-h6 text-weight-regular"},h={class:"text-h6 text-weight-regular q-mt-xl"},w=(0,a._)("span",null,"Requested Approvals",-1),g={class:"text-body1 q-ml-sm text-grey"},f=(0,a._)("span",{class:"q-mx-sm"},"•",-1),y=(0,a._)("span",null,"Active BPs",-1),x={class:"text-body1 q-ml-sm text-grey"};function b(e,o,t,b,_,k){const q=(0,a.up)("q-spinner"),S=(0,a.up)("router-link"),A=(0,a.up)("q-badge"),C=(0,a.up)("q-btn"),P=(0,a.up)("JsonViewer"),E=(0,a.up)("q-expansion-item"),B=(0,a.up)("q-card"),T=(0,a.up)("q-td"),j=(0,a.up)("q-tr"),U=(0,a.up)("q-table"),D=(0,a.up)("q-page");return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a._)("div",r,[e.isLoading?((0,a.wg)(),(0,a.iD)("div",s,[(0,a.Wm)(q,{color:"white",size:"2em"})])):((0,a.wg)(),(0,a.iD)("div",l,[(0,a._)("h1",i,"Proposal "+(0,n.zw)(e.proposalName),1),(0,a._)("p",c,[u,(0,a.Wm)(S,{to:"/account/"+e.proposer,class:"text-white cursor-pointer"},{default:(0,a.w5)((()=>[(0,a.Uk)((0,n.zw)(e.proposer),1)])),_:1},8,["to"]),(0,a.Uk)(" • APPROVAL STATUS "+(0,n.zw)(e.approvalStatus)+" • EXPIRATION "+(0,n.zw)(e.expirationDate),1)]),(0,a._)("div",p,[e.isExecuted&&!e.isCanceled?((0,a.wg)(),(0,a.j4)(A,{key:0,color:"green",label:"EXECUTED"})):(0,a.kq)("",!0),e.isExecuted||e.isCanceled?(0,a.kq)("",!0):((0,a.wg)(),(0,a.j4)(A,{key:1,color:"orange",label:"NOT EXECUTED"})),e.isCanceled?((0,a.wg)(),(0,a.j4)(A,{key:2,color:"red",label:"CANCELED"})):(0,a.kq)("",!0)]),(0,a._)("div",d,[e.isShowExecuteButton?((0,a.wg)(),(0,a.j4)(C,{key:0,outline:"",padding:"sm md",color:"white","text-color":"white",label:"Execute",onClick:e.onExecute},null,8,["onClick"])):(0,a.kq)("",!0),e.isShowCancelButton?((0,a.wg)(),(0,a.j4)(C,{key:1,outline:"",padding:"sm md",color:"white","text-color":"white",label:"Cancel",onClick:e.onCancel},null,8,["onClick"])):(0,a.kq)("",!0),e.isShowApproveButton?((0,a.wg)(),(0,a.j4)(C,{key:2,outline:"",padding:"sm md",color:"white","text-color":"white",label:"Approve",onClick:e.onApprove},null,8,["onClick"])):(0,a.kq)("",!0),e.isShowUnapproveButton?((0,a.wg)(),(0,a.j4)(C,{key:3,outline:"",padding:"sm md",color:"white","text-color":"white",label:"Unapprove",onClick:e.onUnapprove},null,8,["onClick"])):(0,a.kq)("",!0)])]))]),(0,a.Wm)(D,{padding:""},{default:(0,a.w5)((()=>[v,((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.multsigTransactionData,((e,o)=>((0,a.wg)(),(0,a.j4)(B,{key:o,class:"q-mt-md"},{default:(0,a.w5)((()=>[(0,a.Wm)(E,{"switch-toggle-side":"","default-opened":""},{header:(0,a.w5)((()=>[(0,a._)("span",m,(0,n.zw)(e.account)+" - "+(0,n.zw)(e.name),1)])),default:(0,a.w5)((()=>[(0,a.Wm)(P,{value:e,"expand-depth":5,"preview-mode":"preview-mode",boxed:"boxed",copyable:"copyable",sort:"sort"},null,8,["value"])])),_:2},1024)])),_:2},1024)))),128)),(0,a._)("h2",h,[w,(0,a._)("span",g,(0,n.zw)(e.approvalStatus),1),f,y,(0,a._)("span",x,(0,n.zw)(e.producersApprovalStatus),1)]),(0,a.Wm)(B,{class:"q-mb-xl"},{default:(0,a.w5)((()=>[(0,a.Wm)(U,{color:"primary",flat:"",bordered:!1,square:!0,"table-header-class":"text-grey-7",rows:e.requestedApprovalsRows,columns:e.requestedApprovalsColumns,"row-key":"index","rows-per-page-options":[25,40,80,160]},{body:(0,a.w5)((e=>[(0,a.Wm)(j,{props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(T,{key:"actor",props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(S,{class:"text-primary text-no-decoration cursor-pointer",to:"/account/"+e.row.actor},{default:(0,a.w5)((()=>[(0,a.Uk)((0,n.zw)(e.row.actor),1)])),_:2},1032,["to"]),e.row.isBp?((0,a.wg)(),(0,a.j4)(A,{key:0,class:"q-ml-xs",label:"Active BP"})):(0,a.kq)("",!0)])),_:2},1032,["props"]),(0,a.Wm)(T,{key:"permission",props:e},{default:(0,a.w5)((()=>[(0,a._)("span",null,(0,n.zw)(e.row.permission),1)])),_:2},1032,["props"]),(0,a.Wm)(T,{key:"status",props:e},{default:(0,a.w5)((()=>[(0,a.Wm)(A,{color:e.row.status?"green":"orange",label:e.row.status?"APPROVED":"PENDING"},null,8,["color","label"])])),_:2},1032,["props"])])),_:2},1032,["props"])])),_:1},8,["rows","columns"])])),_:1})])),_:1})],64)}var _=t(60499),k=t(18910),q=t(19302),S=t(18803),A=t.n(S),C=t(43878),P=t.n(C),E=t(21889),B=t(61429),T=t.n(B),j=t(61753),U=t(78504),D=t(3708),N=t(71130),z=t(17779),O=t(40270)["lW"],W=function(e,o,t,a){function n(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{i(a.next(e))}catch(o){r(o)}}function l(e){try{i(a["throw"](e))}catch(o){r(o)}}function i(e){e.done?t(e.value):n(e.value).then(s,l)}i((a=a.apply(e,o||[])).next())}))};const H=(0,a.aZ)({name:"ProposalItem",components:{JsonViewer:A()},setup(){const e=(0,k.yj)(),o=(0,k.tv)(),t=(0,q.Z)(),n=(0,U.oR)(),{proposalName:r}=e.params,s=(0,a.Fl)((()=>n.state.account.accountName)),l=(0,a.Fl)((()=>n.state.account.isAuthenticated)),i=(0,_.iH)(!0),c=(0,_.iH)(""),u=(0,_.iH)(""),p=(0,_.iH)(""),d=(0,_.iH)(!1),v=(0,_.iH)(!1),m=(0,_.iH)(!1),h=(0,_.iH)(!1),w=(0,_.iH)([]),g=(0,_.iH)([]),f=[{name:"actor",align:"left",label:"ACTOR",field:"actor"},{name:"permission",align:"left",label:"PERMISSION",field:"permission"},{name:"status",align:"left",label:"STATUS",field:"status"}],y=(0,a.Fl)((()=>P()(new Date).isAfter(new Date(p.value)))),x=(0,a.Fl)((()=>l.value&&h.value&&!y.value&&!d.value&&!v.value&&!m.value)),b=(0,a.Fl)((()=>l.value&&d.value&&!y.value&&!v.value&&!m.value)),S=(0,a.Fl)((()=>l.value&&!y.value&&(s.value===c.value||h.value||d.value)&&!v.value&&!m.value)),A=(0,a.Fl)((()=>l.value&&s.value===c.value&&!y.value&&!v.value&&!m.value)),C=(0,a.Fl)((()=>{const e=g.value.filter((e=>e.isBp)),o=e.filter((e=>e.status));return`${o.length}/${e.length}`}));function B(e,o){var a,n,r;const s=JSON.parse(JSON.stringify(e));t.notify({color:"negative",message:(null===(r=null===(n=null===(a=null===s||void 0===s?void 0:s.cause)||void 0===a?void 0:a.json)||void 0===n?void 0:n.error)||void 0===r?void 0:r.what)||o,actions:[{label:"Dismiss",color:"white"}]})}function H(e){return W(this,void 0,void 0,(function*(){const o=yield E.h.getProducerSchedule(),t=o.active.producers.map((e=>e.producer_name));let a=[];return e.requested_approvals.forEach((e=>{a.push({actor:e.actor,permission:e.permission,status:!1,isBp:!1})})),e.provided_approvals.forEach((e=>{a.push({actor:e.actor,permission:e.permission,status:!0,isBp:!1})})),a=a.map((e=>Object.assign(Object.assign({},e),{isBp:t.includes(e.actor)}))).sort(((e,o)=>e.actor.localeCompare(o.actor))).sort(((e,o)=>Number(o.isBp)-Number(e.isBp)||Number(e.status)-Number(o.status))),a}))}function Z(){return W(this,void 0,void 0,(function*(){try{const{proposals:e}=yield E.h.getProposals({proposal:r,limit:1});return e[0]}catch(e){B(e,"Proposal not found"),yield o.push("/proposal")}}))}function R(e){return W(this,void 0,void 0,(function*(){let o,t=0;const a=100;while("undefined"===typeof o)try{const{actions:n}=yield E.h.getActions(e.proposer,"eosio.msig:propose",a,t);[o]=n.filter((o=>{const{proposal_name:t}=o.act.data;return t===e.proposal_name})),t+=a}catch(i){z.error(i)}const{trx:n}=o.act.data,r=j.Transaction.from(n);p.value=r.expiration.toString();const s={},l=[];for(let e=0;e`;else if("eosio"===o.account.toString()&&"setabi"===o.name.toString()){const e=j.Serializer.decode({data:a.abi,type:j.ABI});s[a.account]=e}l.push(Object.assign(Object.assign({},j.Serializer.objectify(o)),{data:a}))}return l}))}function F(e){return W(this,void 0,void 0,(function*(){const o=yield E.h.getBlock(String(e)),t=o.transactions.map((e=>W(this,void 0,void 0,(function*(){let o=e.trx.id;"string"!==typeof o&&(o=e.trx.toString());const{actions:t}=yield E.h.getTransaction(o);return t}))));return yield Promise.all(t)}))}function Q(){return W(this,void 0,void 0,(function*(){i.value=!0;const e=yield Z();if("undefined"===typeof e)return B(null,"Proposal not found"),void(yield o.push("/proposal"));c.value=e.proposer,u.value=`${e.provided_approvals.length}/${e.provided_approvals.length+e.requested_approvals.length}`,v.value=e.executed,d.value=e.provided_approvals.some((e=>e.actor===s.value)),h.value=e.requested_approvals.some((e=>e.actor===s.value));const[t,a]=yield Promise.all([H(e),R(e)]);g.value=t,w.value=a;const n=yield F(e.block_num);m.value=n.some((e=>"eosio.msig"===e[0].act.account&&"cancel"===e[0].act.name)),i.value=!1}))}function I({name:e,data:o}){return W(this,void 0,void 0,(function*(){const t=yield n.state.account.user.signTransaction({actions:[{account:"eosio.msig",name:e,authorization:[{actor:s.value,permission:n.state.account.accountPermission}],data:o}]},{blocksBehind:3,expireSeconds:30});return t}))}function L(){return W(this,void 0,void 0,(function*(){try{yield I({name:"approve",data:{proposer:c.value,proposal_name:r,level:{actor:s.value,permission:n.state.account.accountPermission}}}),yield(0,N._)(),yield Q()}catch(e){z.error(e),B(e,"Unable approve proposal")}}))}function $(){return W(this,void 0,void 0,(function*(){try{yield I({name:"unapprove",data:{proposer:c.value,proposal_name:r,level:{actor:s.value,permission:n.state.account.accountPermission}}}),yield(0,N._)(),yield Q()}catch(e){z.error(e),B(e,"Unable approve proposal")}}))}function J(){return W(this,void 0,void 0,(function*(){try{yield I({name:"exec",data:{proposer:c.value,proposal_name:r,executer:s.value}}),yield(0,N._)(),yield Q()}catch(e){B(e,"Unable execute proposal")}}))}function V(){return W(this,void 0,void 0,(function*(){try{yield I({name:"cancel",data:{proposer:c.value,proposal_name:r,canceler:s.value}}),yield(0,N._)(),yield Q()}catch(e){B(e,"Unable cancel proposal")}}))}function X(e){const o=Uint8Array.from(O.from(e,"hex")),t=T()(o);return O.from(t).toString("hex")}return(0,a.bv)(Q),{isLoading:i,account:s,proposalName:r,proposer:c,approvalStatus:u,producersApprovalStatus:C,expirationDate:p,isShowApproveButton:x,isShowUnapproveButton:b,isShowExecuteButton:S,isShowCancelButton:A,isExecuted:v,isCanceled:m,multsigTransactionData:w,requestedApprovalsRows:g,requestedApprovalsColumns:f,onApprove:L,onUnapprove:$,onExecute:J,onCancel:V,getShaForCode:X}}});var Z=t(11639),R=t(63940),F=t(20990),Q=t(68879),I=t(69885),L=t(44458),$=t(50651),J=t(82429),V=t(31233),X=t(67220),M=t(69984),Y=t.n(M);const G=(0,Z.Z)(H,[["render",b]]),K=G;Y()(H,"components",{QSpinner:R.Z,QBadge:F.Z,QBtn:Q.Z,QPage:I.Z,QCard:L.Z,QExpansionItem:$.Z,QTable:J.Z,QTr:V.Z,QTd:X.Z})}}]); \ No newline at end of file diff --git a/dist/spa/js/app.a88db939.js b/dist/spa/js/app.a88db939.js deleted file mode 100644 index c5014a6..0000000 --- a/dist/spa/js/app.a88db939.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{var e={20623:(e,t,n)=>{"use strict";var r=n(61957),o=n(71947),i=n(60499),a=n(59835);function s(e,t,n,r,o,i){const s=(0,a.up)("router-view");return(0,a.wg)(),(0,a.j4)(s)}const c={name:"App"};var u=n(11639);const l=(0,u.Z)(c,[["render",s]]),d=l;var g=n(91669);async function p(e,t){const n=e(d);n.use(o.Z,t);const r=(0,i.Xl)("function"===typeof g.Z?await(0,g.Z)({}):g.Z);return{app:n,router:r}}var h=n(6827),f=n(11530),m=n(63703);const b={config:{notify:{timeout:3e3,position:"top",color:"primary",textColor:"white"},screen:{bodyClasses:!0}},plugins:{Notify:h.Z,Dialog:f.Z,LocalStorage:m.Z}};var y=n(17779);const v="/";async function C({app:e,router:t},n){let r=!1;const o=e=>{try{return t.resolve(e).href}catch(n){}return Object(e)===e?null:e},i=e=>{if(r=!0,"string"===typeof e&&/^https?:\/\//.test(e))return void(window.location.href=e);const t=o(e);null!==t&&(window.location.href=t)},a=window.location.href.replace(window.location.origin,"");for(let c=0;!1===r&&cPromise.all([Promise.resolve().then(n.bind(n,76865)),Promise.resolve().then(n.bind(n,34136)),Promise.resolve().then(n.bind(n,32101)),Promise.resolve().then(n.bind(n,84284)),Promise.resolve().then(n.bind(n,42841))]).then((t=>{const n=t.map((e=>e.default)).filter((e=>"function"===typeof e));C(e,n)}))))},3708:(e,t,n)=>{"use strict";n.d(t,{D0:()=>c,D3:()=>g,Ej:()=>u,Lw:()=>p,Qq:()=>d,cJ:()=>l,v1:()=>h});var r=n(61753),o=n(30229),i=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r["throw"](e))}catch(t){i(t)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const a=(0,o.z)(),s=new r.APIClient({url:a.getHyperionEndpoint()}),c=function(e){return i(this,void 0,void 0,(function*(){return yield s.v1.chain.get_account(e)}))},u=function(e){return i(this,void 0,void 0,(function*(){const t=yield s.v1.history.get_key_accounts(e);return t}))},l=function(e){return i(this,void 0,void 0,(function*(){return yield s.v1.chain.get_currency_balance("eosio.token",e)}))},d=function(e){return i(this,void 0,void 0,(function*(){return yield s.v1.chain.get_table_rows(e)}))},g=function(e){return i(this,void 0,void 0,(function*(){const{abi:t}=yield s.v1.chain.get_abi(e.account);if(!t)throw new Error(`No ABI for ${String(e.account)}`);const n=r.Action.from(e,t);return r.Serializer.objectify(n.decodeData(t))}))},p=function(e,t){if(!t)throw new Error(`No ABI for ${String(e.account)}`);const n=r.Action.from(e,t);return r.Serializer.objectify(n.decodeData(t))},h=function(e,t,n){return i(this,void 0,void 0,(function*(){const{abi:o}=yield s.v1.chain.get_abi(e);if(!o)throw new Error(`No ABI for ${e}`);const{hexString:i}=r.Serializer.encode({object:n,abi:o,type:t});return i}))}},68142:(e,t,n)=>{"use strict";n.d(t,{V:()=>m,Z:()=>b});var r=n(54670),o=n(61753),i=n(30229),a=n(11530),s=n(90347),c=n(17779),u=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r["throw"](e))}catch(t){i(t)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const l=.05,d=3600,g=(0,i.z)(),p=new o.APIClient({url:g.getHyperionEndpoint()}),h=g.getFuelRPCEndpoint(),f=`${null===h||void 0===h?void 0:h.protocol}://${null===h||void 0===h?void 0:h.host}:${null===h||void 0===h?void 0:h.port}/v1/resource_provider/request_transaction`;class m extends r.User{constructor(e){super(),this.user=e,this.signArbitrary=(e,t,n)=>u(this,void 0,void 0,(function*(){return this.user.signArbitrary(e,t,n)})),this.verifyKeyOwnership=e=>u(this,void 0,void 0,(function*(){return this.user.verifyKeyOwnership(e)})),this.getAccountName=()=>u(this,void 0,void 0,(function*(){return this.user.getAccountName()})),this.getChainId=()=>u(this,void 0,void 0,(function*(){return this.user.getChainId()})),this.getKeys=()=>u(this,void 0,void 0,(function*(){return this.user.getKeys()}))}signTransaction(e,t){return u(this,void 0,void 0,(function*(){try{if(!h)return this.user.signTransaction(e,t);const r=yield p.v1.chain.get_info(),i=r.getTransactionHeader(d),a=e.actions.map((e=>p.v1.chain.get_abi(e.account))),s=yield Promise.all(a),c=s.map((e=>e.abi)),u=e.actions.map(((e,t)=>({contract:e.account,abi:c[t]}))),l=o.Transaction.from(Object.assign(Object.assign({},i),{actions:e.actions}),u),g=o.PackedTransaction.from({signatures:[],packed_context_free_data:"",packed_trx:o.Serializer.encode({object:l})}),m=o.PermissionLevel.from({actor:yield this.user.getAccountName(),permission:this.requestPermission}),b=yield fetch(f,{body:JSON.stringify({signer:m,packedTransaction:g}),method:"POST"}),C=yield b.json();switch(C.code){case 402:case 200:{const{data:e}=C,[,r]=e.request,o=r,i=v(m,o,l,e.costs);try{yield y(this.user,i)}catch(n){break}o.signatures=[...e.signatures];const a=yield this.user.signTransaction(o,Object.assign({broadcast:!1},t));if(!a.transaction.signatures)return Promise.reject("The transaction was not broadcasted because no signatures were obtained");o.signatures=[...a.transaction.signatures,...e.signatures];const s=yield p.v1.chain.push_transaction(o),c={wasBroadcast:!0,transactionId:s.transaction_id,status:s.processed.receipt.status,transaction:o};return Promise.resolve(c)}case 400:break;default:throw"Code "+(+C.code).toString()+" not expected from resource provider endpoint: "+f}return this.user.signTransaction(e,t)}catch(n){throw n}}))}get requestPermission(){return this.user.requestPermission||"active"}}class b{static save(){localStorage.setItem("fuel_preferences",JSON.stringify(b.preferences))}static drop(){localStorage.removeItem("fuel_preferences")}static load(){try{b.preferences=b.preferences||{};const e=localStorage.getItem("fuel_preferences");e&&(b.preferences=JSON.parse(e))}catch(e){c.error("ERROR: ",e)}}static setPreferences(e,t){b.preferences[e]=Object.assign(Object.assign({},b.preferences[e]),t),b.preferences[e].remember?b.save():b.drop()}static setGlobals(e){b.globals=e}}function y(e,t){return u(this,void 0,void 0,(function*(){const n=yield e.getAccountName();let r=[];return r=[],new Promise(((e,o)=>{if(b.preferences[n]&&b.preferences[n].remember)return void(b.preferences[n].approve?e():o());const i=function(t){b.setPreferences(n,{approve:t}),t?e():o()},s="Reject",c="Confirm";let u='Your account doesn\'t have sufficient resources (CPU, NET, or RAM) to pay for your next transaction. Don\'t worry! Telos has partnered with Greymass to proceed with your transaction using "Greymass Fuel", allowing you to continue for free.

We recommend powering up your account with at least 0.5 TLOS in CPU and NET each and purchasing RAM, as this service is not supported on all dAPPs in our ecosystem. Please click here to proceed and power up your account';try{"string"===typeof t&&(u=`Your account doesn't have sufficient resources (CPU, NET, or RAM) to pay for your next transaction and it can not be processed without fees. Telos has partnered with Greymass to proceed with your transaction using "Greymass Fuel", reducing cost significantly.

Please confirm fees below to proceed.

${t}

We recommend powering up your account with at least 0.5 TLOS in CPU and NET each and purchasing RAM, as this service is not supported on all dAPPs in our ecosystem. Please click here to proceed and power up your account`)}catch(l){}a.Z.create({title:"Resource Warning!",message:u,html:!0,cancel:s,ok:c,persistent:!0,options:{type:"checkbox",model:r,isValid:e=>(b.setPreferences(n,{remember:1===e.length}),!0),items:[{label:"Remember my decision",value:"remember",color:"primary"}]}}).onOk((()=>i(!0))).onCancel((()=>i(!1)))}))}))}function v(e,t,n,r=null){return F(t),C(e,t,n,r)}function C(e,t,n,r){const o=w(r);return _(o,t,n),P(e,o,t,n)}function w(e){let t=1;if(e){t+=1;const n=+e.ram.replace(/[^0-9.]/g,"");0!==n&&(t+=1)}return t}function P(e,t,n,r){if(E(t,n,r),t>1){let r=null;return r=S(e,n),t>2&&A(e,n),(0,s.xG)(r,4,"TLOS",!0)}return null}function k(e){return e}function S(e,t){var n;const r=t.actions[1],o=k(r.data),i=parseFloat(null===(n=o.quantity)||void 0===n?void 0:n.split(" ")[0]);if(i>l)throw new Error(`Fee of ${i} exceeds the maximum fee of ${l}.`);if("eosio.token"!==r.account.toString()||"transfer"!==r.name.toString()||"fuel.gm"!==o.to.toString())throw new Error("Fee action was deemed invalid.");return i}function A(e,t){var n;const r=t.actions[2],o=k(r.data),i=parseFloat(null===(n=o.quant)||void 0===n?void 0:n.split(" ")[0]);if("eosio"!==r.account.toString()||!["buyram","buyrambytes"].includes(String(r.name))||"greymassfuel"!==o.payer.toString()||o.receiver.toString()!==e.actor.toString())throw new Error("RAM action was deemed invalid.");return i}function E(e,t,n){for(const[r]of t.actions.entries()){if(r{"use strict";n.d(t,{Bp:()=>F,C5:()=>I,G:()=>S,H4:()=>k,JF:()=>R,M6:()=>E,MP:()=>O,Ox:()=>L,Qg:()=>x,Sv:()=>T,V6:()=>y,Vl:()=>N,dJ:()=>_,f1:()=>w,fo:()=>P,lz:()=>C,mM:()=>v,p1:()=>A});var r=n(39981),o=n.n(r),i=n(30229),a=n(17779),s=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r["throw"](e))}catch(t){i(t)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const c=(0,i.z)(),u=o().create({baseURL:c.getHyperionEndpoint()}),l=new AbortController,d="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjciIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAyNyAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTgiIGN5PSI5IiByPSI4IiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIi8+CjxjaXJjbGUgY3g9IjkiIGN5PSI5IiByPSI4IiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIi8+Cjwvc3ZnPgo=",g=c.getName(),p=`https://raw.githubusercontent.com/telosnetwork/token-list/main/tokens.${g}.json`,h=fetch(p).then((e=>e.text())).then((e=>JSON.parse(e))).then((e=>e.map((e=>e)))).catch((e=>(a.error(e),[]))),f=5,m=10;let b=0;u.interceptors.request.use((function(e){return new Promise((t=>{const n=setInterval((()=>{b{const t=n.find((t=>t.symbol===e.symbol));return t&&t.logo?e.logo=null===t||void 0===t?void 0:t.logo:e.logo=d,e}))}return yield h}))},w=function(e){return s(this,void 0,void 0,(function*(){const t=e.account||"",n=e.page||1,r=e.limit||10,o=Math.max(0,n-1)*r,i=e.notified||"",a=e.sort||"desc",s=e.after||"",c=e.before||"";let l={};t&&(l=Object.assign({account:t},l)),r&&(l=Object.assign({limit:r},l)),o&&(l=Object.assign({skip:o},l)),i&&(l=Object.assign({notified:i},l)),a&&(l=Object.assign({sort:a},l)),s&&(l=Object.assign({after:s},l)),c&&(l=Object.assign({before:c},l)),e.extras&&(l=Object.assign(Object.assign({"act.name":"!onblock"},l),e.extras));const d=l;return yield u.get("v2/history/get_actions",{params:d})}))},P=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.get("v2/history/get_transaction",{params:{id:e}});return t.data}))},k=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.post("v1/history/get_transaction",{id:e});return t.data}))},S=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.get("v2/history/get_actions",{params:{limit:100,account:e,filter:"eosio:newaccount",skip:0}});return t.data.actions}))},A=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.get("v2/state/get_links",{params:{account:e}});return t.data.links}))},E=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.post("v1/chain/get_table_by_scope",e);return t.data.rows}))},_=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.post("v1/chain/get_account",{account_name:e});return t.data}))},x=function(e){return s(this,void 0,void 0,(function*(){l.abort();const t=yield u.post("v1/chain/get_block",{block_num_or_id:e,signal:l.signal});return t.data}))},T=function(e,t,n,r){return s(this,void 0,void 0,(function*(){l.abort();const o=yield u.get("v2/history/get_actions",{params:{account:e,filter:t,limit:n,skip:r}});return o.data}))},I=function(){return s(this,void 0,void 0,(function*(){l.abort();const e=yield u.get("v1/chain/get_info");return e.data}))},O=function(){return s(this,void 0,void 0,(function*(){l.abort();const e=yield u.get("v1/chain/get_producer_schedule");return e.data}))},F=function({proposer:e,proposal:t,requested:n,provided:r,executed:o,limit:i,skip:a}){return s(this,void 0,void 0,(function*(){const s=yield u.get("v2/state/get_proposals",{params:{proposer:e,proposal:t,requested:n,provided:r,executed:o,limit:i,skip:a}});return s.data}))},R=function(){return s(this,void 0,void 0,(function*(){const e=yield u.post("v1/chain/get_producers",{json:!0,limit:1e4});return e.data}))},L=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.post("v1/chain/get_abi",{account_name:e});return t.data}))},N=function(){return s(this,void 0,void 0,(function*(){const e=yield u.get("v1/chain/get_producer_schedule");return e.data}))}},21889:(e,t,n)=>{"use strict";n.d(t,{h:()=>f});var r=n(22231),o=n(3708),i=n(39981),a=n.n(i),s=n(30229),c=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r["throw"](e))}catch(t){i(t)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const u=5,l=10;let d=0;const g=(0,s.z)(),p=a().create({baseURL:g.getApiEndpoint()});p.interceptors.request.use((function(e){return new Promise((t=>{const n=setInterval((()=>{d{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(23340),o=n(21889);const i=(0,r.xr)((({app:e})=>{e.config.globalProperties.$api=o.h}))},34136:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(23340),o=n(39981),i=n.n(o);const a=(0,r.xr)((({app:e})=>{e.config.globalProperties.$axios=i()}))},76865:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(23340),o=n(30229);const i=(0,r.xr)((({app:e})=>{e.config.globalProperties.$config=o.Z.get()}))},42841:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(23340),o=n(68142);const i=(0,r.xr)((({app:e})=>{e.config.globalProperties.$fuel=o.Z,o.Z.setGlobals(e.config.globalProperties),o.Z.load()}))},84284:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C,getAuthenticators:()=>y,resetUalState:()=>v});var r=n(23340),o=n(54670),i=n(14247),a=n(30229),s=n(37474),c=n(11530),u=n(6827),l=n(65054),d=n(90347),g=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r["throw"](e))}catch(t){i(t)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};function p(){return g(this,void 0,void 0,(function*(){let e="eosio",t="active";return"cleos"===localStorage.getItem("autoLogin_"+(0,a.z)().getChainId())?e=localStorage.getItem("account_"+(0,a.z)().getChainId()):(yield new Promise((t=>{c.Z.create({color:"primary",title:"Connect to cleos",message:"Account name (.,a-z,1-5)",prompt:{model:"",type:"text",isValid:e=>(0,d.Kf)(e)},cancel:!0,persistent:!0}).onOk((t=>{e=""!==t?t:"eosio"})).onCancel((()=>{throw"Cancelled!"})).onDismiss((()=>{t(!0)}))})),yield new Promise((e=>{c.Z.create({color:"primary",title:"Connect to cleos",message:"Account permission",options:{type:"radio",model:[],items:[{label:"Active",value:"active"},{label:"Owner",value:"owner"}]},cancel:!0,persistent:!0}).onOk((e=>{t=e})).onCancel((()=>{throw"Cancelled!"})).onDismiss((()=>{e(!0)}))}))),{accountName:e,permission:t}}))}function h(e,t){return g(this,void 0,void 0,(function*(){const n=JSON.stringify(Object.assign({delay_sec:0,max_cpu_usage_ms:0},t),null,4);yield new Promise((t=>{c.Z.create({color:"primary",message:`
cleos -u ${e.protocol}://${e.host}:${e.port} push transaction '${n}'
`,html:!0,cancel:!0,fullWidth:!0,ok:{label:"Copy"}}).onOk((()=>{(0,l.Z)(`cleos -u ${e.protocol}://${e.host}:${e.port} push transaction '${n}'`).then((()=>{u.Z.create({color:"green-4",textColor:"white",message:"Copied to clipboard",timeout:1e3})})).catch((()=>{u.Z.create({color:"red-8",textColor:"white",message:"Could not copy",timeout:1e3})}))})).onCancel((()=>{throw"Cancelled!"})).onDismiss((()=>{t(!0)}))}))}))}function f(e){return g(this,void 0,void 0,(function*(){return h((0,a.z)().getRPCEndpoint(),e)}))}function m(){return{chainId:(0,a.z)().getChainId(),rpcEndpoints:[(0,a.z)().getRPCEndpoint()]}}const b=[],y=()=>{if(0===b.length){const e=m();b.push(new i.Anchor([e],{appName:`OBE_${e.chainId}`})),b.push(new s.CleosAuthenticator([e],{appName:`OBE_${e.chainId}`,loginHandler:p,signHandler:f}))}return b},v=()=>{b.length=0},C=(0,r.xr)((({app:e})=>{const t=y(),n=new o.UAL([m()],"ual",t);e.config.globalProperties.$ual=n}))},76510:(e,t,n)=>{"use strict";n.d(t,{HD:()=>o,ZP:()=>i,t0:()=>r});const r={primary:"#11589e",secondary:"#5d5d5d",accent:"#9C27B0",dark:"#1d1d1d","dark-page":"#121212",positive:"#21BA45",negative:"#C10015",info:"#31CCEC",warning:"#F2C037","color-map":"#8C8C8C","color-sidebar-selected":"#d1d1d1","color-primary-gradient":"linear-gradient(90deg, #5d5d5d 0%, #5d5d5d 100%)","color-secondary-gradient":"linear-gradient(180deg, #5d5d5d 0%, #5d5d5d 147.34%)","color-tertiary-gradient":"linear-gradient(90deg, #CBCAF5 0%, #A9CAF3 56.77%, #63C9EF 100%)","color-progress-gradient":"#11589e","color-producer-card-background":"#f0f0f0","color-select-box-background":"#e9e9e9","color-separator-background":"rgba(138, 101, 212, 0.1)","color-card-shadow":"rgba(37, 42, 97, 0.3)","color-dropdown-card":"#172c6c","color-header-background":"#4C4C4C","color-header-text":"#FFFFFF","color-header-border":"#777777","color-header-support-background":"linear-gradient(180deg, #4C4C4C 0%, #3B3B3B 147.34%)","color-graph-shadow":"#3f65c228","color-footer-background":"#000000"},o={headerSettings:{hideLoginHandler:!1,hideNetworkTab:!1,hideWalletTab:!1,hideVoteTab:!1,hideProposalTab:!1},accountPageSettings:{hideCpuInfo:!1,hideNetInfo:!1,hideRamInfo:!1,hideRexInfo:!1,hideRefundingInfo:!1,hideDelegatedInfo:!1,hideLiquidInfo:!1,hideResourcesControl:!1,hideRexControl:!1,hideTransactionTab:!1,hideTokensTab:!1,hideKeysTab:!1,hideChildrenTab:!1,hideContractsTab:!1}};class i{constructor(e){this.name=e}getName(){return this.name}getLargeLogoPath(){return`~/assets/${this.name}/logo_lg.svg`}getSmallLogoPath(){return`~/assets/${this.name}/logo_sm.svg`}getUiCustomization(){return o}isTestnet(){return!1}}},30229:(e,t,n)=>{"use strict";n.d(t,{Z:()=>qe,z:()=>ze});var r=n(76510),o=n(39981),i=n.n(o),a=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r["throw"](e))}catch(t){i(t)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const s=e=>a(void 0,void 0,void 0,(function*(){const t=yield i().get(l(e));return t.data[e].usd})),c=e=>a(void 0,void 0,void 0,(function*(){const t=l(e),n=`https://api.coingecko.com/api/v3/coins/${e}/market_chart?vs_currency=USD&days=1`,[r,o]=yield Promise.all([i().get(t),i().get(n)]);return{lastUpdated:r.data[e].last_updated_at,tokenPrice:r.data[e].usd,dayChange:r.data[e].usd_24h_change,dayVolume:r.data[e].usd_24h_vol,marketCap:r.data[e].usd_market_cap,prices:o.data.prices}})),u=()=>a(void 0,void 0,void 0,(function*(){return{lastUpdated:0,tokenPrice:.026,dayChange:0,dayVolume:0,marketCap:13e8,prices:[]}})),l=e=>`https://api.coingecko.com/api/v3/simple/price?ids=${e}&vs_currencies=USD&include_market_cap=true&include_24hr_vol=true&include_24hr_change=true&include_last_updated_at=true`,d="aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906",g="eos",p="EOS",h={symbol:"EOS",precision:4,amount:0,contract:"eosio.token"},f="https://eos.eosusa.io",m={protocol:"https",host:"eos.eosusa.io",port:443},b={protocol:"https",host:"eos.greymass.com",port:443},y="https://eos.greymass.com",v="https://telos-producer-validation.s3.amazonaws.com",C=!1,w={primary:"#28417c",secondary:"#000000",accent:"#9C27B0",dark:"#1d1d1d",positive:"#21BA45",negative:"#ff0000",info:"#31CCEC",warning:"#F2C037","color-map":"#19284e","color-primary-gradient":"linear-gradient(90deg, #0c3964 0%, #1876d2 100%)","color-secondary-gradient":"linear-gradient(180deg, #0c3964 0%, #1876d2 147.34%)","color-tertiary-gradient":"linear-gradient(90deg, #CBCAF5 0%, #A9CAF3 56.77%, #63C9EF 100%)","color-progress-gradient":"#28417c","color-header-background":"#000000","color-header-border":"#444","color-header-support-background":"#000","color-graph-shadow":"#3f65c228","color-footer-background":"#000000"};class P extends r.ZP{getName(){return g}getChainId(){return d}getDisplay(){return p}getHyperionEndpoint(){return f}getRPCEndpoint(){return m}getFuelRPCEndpoint(){return b}getApiEndpoint(){return y}getS3ProducerBucket(){return v}getPriceData(){return c("eos")}getSystemToken(){return h}getUsdPrice(){return s("eos")}getLargeLogoPath(){return"chains/eos/eos_large.png"}getSmallLogoPath(){return"chains/eos/eos.png"}getMapDisplay(){return C}getTheme(){return w}getFiltersSupported(e){return"notified"!==e}getFooterLinks(){return[{label:"TERMS",url:"https://eosnetwork.com/terms-of-use/"},{label:"PRIVACY",url:"https://eosnetwork.com/privacy-policy/"},{label:"REPOSITORY",url:"https://github.com/telosnetwork/open-block-explorer"}]}}const k="4667b205c6838ef70ff7988f6e8257e8be0e1284a2f59699054a018f743b1d11",S="telos",A="Telos",E={symbol:"TLOS",precision:4,amount:0,contract:"eosio.token"},_="https://mainnet.telos.net",x={protocol:"https",host:"mainnet.telos.net",port:443},T={protocol:"https",host:"telos.greymass.com",port:443},I="https://api.telos.net/v1",O="https://telos-producer-validation.s3.amazonaws.com",F=!0,R={primary:"#571aff",secondary:"#071A5F",accent:"#9C27B0",dark:"#1d1d1d",positive:"#21BA45",negative:"#ff0000",info:"#31CCEC",warning:"#F2C037","color-map":"#4325c2","color-primary-gradient":"linear-gradient(90deg, #071A5F 0%, #571AFF 100%)","color-secondary-gradient":"linear-gradient(180deg, #071A5F 0%, #571aff 147.34%)","color-tertiary-gradient":"linear-gradient(90deg, #CBCAF5 0%, #A9CAF3 56.77%, #63C9EF 100%)","color-progress-gradient":"#571aff","color-producer-card-background":"#f5f4fe","color-select-box-background":"#e0dffb","color-header-background":"#071A5F","color-header-border":"#8a65d41a","color-header-support-background":"linear-gradient(180deg, #071A5F 0%, #571aff 147.34%)","color-graph-shadow":"#571aff28","color-footer-background":"#071A5F"};class L extends r.ZP{getName(){return S}getChainId(){return k}getDisplay(){return A}getHyperionEndpoint(){return _}getRPCEndpoint(){return x}getFuelRPCEndpoint(){return T}getApiEndpoint(){return I}getS3ProducerBucket(){return O}getPriceData(){return c("telos")}getSystemToken(){return E}getUsdPrice(){return s("telos")}getLargeLogoPath(){return"chains/telos/telos_logo.png"}getSmallLogoPath(){return"chains/telos/tlos.png"}getMapDisplay(){return F}getTheme(){return R}getFiltersSupported(e){return!0}getFooterLinks(){return[{label:"LEGAL",url:"https://telos.net/legal"},{label:"PRIVACY",url:"https://telos.net/privacy-policy"},{label:"REPOSITORY",url:"https://github.com/telosnetwork/open-block-explorer"}]}}const N="8fc6dce7942189f842170de953932b1f66693ad3788f766e777b6f9d22335c02",j="ux",D="UX",B={symbol:"UTX",precision:4,amount:0,contract:"eosio.token"},$="https://ux.eosusa.io",M={protocol:"https",host:"ux.eosusa.io",port:443},Z="https://ux.eosusa.io",z="https://telos-producer-validation.s3.amazonaws.com",q=!1,H={};class U extends r.ZP{getName(){return j}getChainId(){return N}getDisplay(){return D}getHyperionEndpoint(){return $}getRPCEndpoint(){return M}getFuelRPCEndpoint(){return null}getApiEndpoint(){return Z}getS3ProducerBucket(){return z}getPriceData(){return u()}getSystemToken(){return B}getUsdPrice(){return Promise.resolve(0)}getLargeLogoPath(){return"chains/ux/logo_sm.png"}getSmallLogoPath(){return"chains/ux/logo_sm.png"}getMapDisplay(){return q}getTheme(){return H}getFiltersSupported(e){return"notified"!==e}getFooterLinks(){return[{label:"TERMS",url:"https://uxnetwork.io/static/Terms.pdf"},{label:"PRIVACY",url:"https://uxnetwork.io/static/PP.pdf"},{label:"REPOSITORY",url:"https://github.com/telosnetwork/open-block-explorer"}]}}const G="1064487b3cd1a897ce03ae5b6a865651747e2e152090f99c1d19d44e01aea5a4",J="wax",V="WAX",Y={symbol:"WAX",precision:4,amount:0,contract:"eosio.token"},W="https://wax.eosusa.io",K={protocol:"https",host:"wax.eosusa.io",port:443},X="https://example.com",Q="https://telos-producer-validation.s3.amazonaws.com",ee=!1,te={};class ne extends r.ZP{getName(){return J}getChainId(){return G}getDisplay(){return V}getHyperionEndpoint(){return W}getRPCEndpoint(){return K}getFuelRPCEndpoint(){return null}getApiEndpoint(){return X}getS3ProducerBucket(){return Q}getPriceData(){return c("wax")}getSystemToken(){return Y}getUsdPrice(){return s("wax")}getLargeLogoPath(){return"chains/wax/logo_lg.png"}getSmallLogoPath(){return"chains/wax/logo_lg.png"}getMapDisplay(){return ee}getTheme(){return te}getFiltersSupported(e){return"notified"!==e}getFooterLinks(){return[{label:"TERMS",url:"https://www.wax.io/terms-of-service"},{label:"PRIVACY",url:"https://www.wax.io/privacy-policy"},{label:"REPOSITORY",url:"https://github.com/telosnetwork/open-block-explorer"}]}}const re="1eaa0824707c8c16bd25145493bf062aecddfeb56c736f6ba6397f3195f33c9f",oe="telos-testnet",ie="Telos",ae={symbol:"TLOS",precision:4,amount:0,contract:"eosio.token"},se="https://testnet.telos.net",ce="https://telos-producer-validation.s3.amazonaws.com",ue={protocol:"https",host:"testnet.telos.net",port:443},le="https://api-dev.telos.net/v1",de=!1,ge={primary:"#571aff",secondary:"#071A5F",accent:"#9C27B0",dark:"#1d1d1d",positive:"#21BA45",negative:"#ff0000",info:"#31CCEC",warning:"#F2C037","color-map":"#4325c2","color-primary-gradient":"linear-gradient(90deg, #071A5F 0%, #571AFF 100%)","color-secondary-gradient":"linear-gradient(180deg, #071A5F 0%, #571aff 147.34%)","color-tertiary-gradient":"linear-gradient(90deg, #CBCAF5 0%, #A9CAF3 56.77%, #63C9EF 100%)","color-progress-gradient":"#571aff","color-producer-card-background":"#f5f4fe","color-select-box-background":"#e0dffb","color-header-background":"#071A5F","color-header-border":"#8a65d41a","color-header-support-background":"linear-gradient(180deg, #071A5F 0%, #571aff 147.34%)","color-graph-shadow":"#571aff28","color-footer-background":"#071A5F"};class pe extends r.ZP{getName(){return oe}getChainId(){return re}getDisplay(){return ie}getHyperionEndpoint(){return se}getRPCEndpoint(){return ue}getFuelRPCEndpoint(){return null}getApiEndpoint(){return le}getS3ProducerBucket(){return ce}getPriceData(){return u()}getSystemToken(){return ae}getUsdPrice(){return Promise.resolve(0)}getLargeLogoPath(){return"chains/telos/telos_logo.png"}getSmallLogoPath(){return"chains/telos/tlos.png"}getMapDisplay(){return de}getTheme(){return ge}getFiltersSupported(e){return"notified"!==e}isTestnet(){return!0}getFooterLinks(){return[{label:"LEGAL",url:"https://telos.net/legal"},{label:"PRIVACY",url:"https://telos.net/privacy-policy"},{label:"REPOSITORY",url:"https://github.com/telosnetwork/open-block-explorer"}]}}const he={hideLoginHandler:!0,hideNetworkTab:!1,hideWalletTab:!0,hideVoteTab:!0,hideProposalTab:!1},fe=Object.assign(Object.assign({},r.HD),{headerSettings:he,accountPageSettings:{hideCpuInfo:!1,hideNetInfo:!1,hideRamInfo:!1,hideRexInfo:!0,hideRefundingInfo:!0,hideDelegatedInfo:!0,hideLiquidInfo:!0,hideResourcesControl:!1,hideRexControl:!1,hideTransactionTab:!1,hideTokensTab:!1,hideKeysTab:!1,hideChildrenTab:!1,hideContractsTab:!1}}),me="8a34ec7df1b8cd06ff4a8abbaa7cc50300823350cadc59ab296cb00d104d2b8f",be="pangea-testnet",ye="Pangea testnet",ve={symbol:"SYS",precision:4,amount:0,contract:"eosio.token"},Ce="https://test.pangea.eosusa.io",we={protocol:"https",host:"#",port:443},Pe={protocol:"https",host:"#",port:443},ke="https://blockchain-api-testnet.pangea.web4.world/",Se="#",Ae=!0,Ee={primary:"#67D7ED",secondary:"#E76773",accent:"#9C27B0",dark:"#1d1d1d",positive:"#21BA45",negative:"#ff0000",info:"#31CCEC",warning:"#F2C037","color-map":"#4325c2","color-primary-gradient":"linear-gradient(90deg, #071A5F 0%, #571AFF 100%)","color-secondary-gradient":"linear-gradient(180deg, #071A5F 0%, #571aff 147.34%)","color-tertiary-gradient":"linear-gradient(90deg, #CBCAF5 0%, #A9CAF3 56.77%, #63C9EF 100%)","color-progress-gradient":"#571aff","color-producer-card-background":"#f5f4fe","color-select-box-background":"#e0dffb","color-header-background":"#67D7ED","color-header-border":"#8a65d41a","color-header-support-background":"linear-gradient(180deg, #000000 0%, #ffffff 147.34%)","color-graph-shadow":"#571aff28","color-footer-background":"#67D7ED"};class _e extends r.ZP{getName(){return be}getChainId(){return me}getDisplay(){return ye}getHyperionEndpoint(){return Ce}getRPCEndpoint(){return we}getFuelRPCEndpoint(){return Pe}getApiEndpoint(){return ke}getS3ProducerBucket(){return Se}getPriceData(){return u()}getSystemToken(){return ve}getUsdPrice(){return Promise.resolve(0)}getLargeLogoPath(){return"chains/pangea/telos_logo.png"}getSmallLogoPath(){return"chains/pangea/tlos.png"}getMapDisplay(){return Ae}getTheme(){return Ee}getFiltersSupported(e){return!0}getFooterLinks(){return[{label:"LEGAL",url:"https://pangea.web4.world"},{label:"PRIVACY",url:"https://pangea.web4.world"},{label:"REPOSITORY",url:"https://github.com/Tonomy-Foundation/Block-Explorer"}]}getUiCustomization(){return fe}}const xe="73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d",Te="jungle",Ie="Jungle 4",Oe={symbol:"EOS",precision:4,amount:0,contract:"eosio.token"},Fe="https://jungle.eosusa.io",Re="https://telos-producer-validation.s3.amazonaws.com",Le={protocol:"https",host:"jungle.eosusa.io",port:443},Ne="https://jungle.eosusa.io",je=!1,De={primary:"#28417c",secondary:"#000000",accent:"#9C27B0",dark:"#1d1d1d",positive:"#21BA45",negative:"#ff0000",info:"#31CCEC",warning:"#F2C037","color-map":"#19284e","color-primary-gradient":"linear-gradient(90deg, #0c3964 0%, #1876d2 100%)","color-secondary-gradient":"linear-gradient(180deg, #0c3964 0%, #1876d2 147.34%)","color-tertiary-gradient":"linear-gradient(90deg, #CBCAF5 0%, #A9CAF3 56.77%, #63C9EF 100%)","color-progress-gradient":"#28417c","color-header-background":"#000000","color-header-border":"#444","color-header-support-background":"#000","color-graph-shadow":"#3f65c228","color-footer-background":"#000000"};class Be extends r.ZP{getName(){return Te}getChainId(){return xe}getDisplay(){return Ie}getHyperionEndpoint(){return Fe}getRPCEndpoint(){return Le}getFuelRPCEndpoint(){return null}getApiEndpoint(){return Ne}getS3ProducerBucket(){return Re}getPriceData(){return u()}getSystemToken(){return Oe}getUsdPrice(){return Promise.resolve(0)}getLargeLogoPath(){return"chains/eos/eos_large.png"}getSmallLogoPath(){return"chains/eos/eos.png"}getMapDisplay(){return je}getTheme(){return De}getFiltersSupported(e){return"notified"!==e}isTestnet(){return!0}getFooterLinks(){return[{label:"TERMS",url:"https://eosnetwork.com/terms-of-use/"},{label:"PRIVACY",url:"https://eosnetwork.com/privacy-policy/"},{label:"REPOSITORY",url:"https://github.com/telosnetwork/open-block-explorer"}]}}const $e={mainnets:[new P("eos"),new L("telos"),new U("ux"),new ne("wax")],testnets:[new Be("jungle"),new pe("telos-testnet"),new _e("pangea-testnet")]},Me=$e;var Ze=n(3168);function ze(){return qe.get().getCurrentChain()}class qe{constructor(){this.init()}init(){const e="true"===Ze.env.SHOW_MULTICHAIN_SELECTOR,t="pangea-testnet";if(this.testnets=Me.testnets,this.mainnets=Me.mainnets,e){const e=this.getSelectedChain();e?(this.currentChain=this.findChain(e),this.currentChain||(this.currentChain=this.findChain(t))):this.currentChain=this.findChain(t)}else this.currentChain=this.findChain(t)}static get(){return qe.thisManager||(qe.thisManager=new qe),qe.thisManager}getCurrentChain(){return this.currentChain}getSelectedChain(){return sessionStorage.getItem(qe.CHAIN_LOCAL_STORAGE)}setCurrentChain(e){return!!this.findChain(e.getName())&&(sessionStorage.setItem(qe.CHAIN_LOCAL_STORAGE,e.getName()),this.currentChain=e,!0)}getPreferredChain(){return localStorage.getItem(qe.PREFERRED_CHAIN_LOCAL_STORAGE)}setPreferredChain(e){return!!this.findChain(e.getName())&&(localStorage.setItem(qe.PREFERRED_CHAIN_LOCAL_STORAGE,e.getName()),!0)}getAllChains(){return this.mainnets.concat(this.testnets)}getMainnets(){return this.mainnets}getTestnets(){return this.testnets}findChain(e){const t=this.mainnets.find((t=>t.getName()===e));return t||this.testnets.find((t=>t.getName()===e))}}qe.CHAIN_LOCAL_STORAGE="selectedChainName",qe.PREFERRED_CHAIN_LOCAL_STORAGE="preferredChainName"},91669:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m,c:()=>b});var r=n(23340),o=n(18910),i=n(3168);const a="true"===i.env.SHOW_MULTICHAIN_SELECTOR,s=[{path:"/",name:"home",component:()=>Promise.all([n.e(736),n.e(64),n.e(258)]).then(n.bind(n,57945)),beforeEnter:(e,t,n)=>{a?n():n("/network")}},{path:"/account/:account",name:"account",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(827)]).then(n.bind(n,28038))}]},{path:"/transaction/:transaction",name:"transaction",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(862)]).then(n.bind(n,55228))}]},{path:"/block/:block",name:"block",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(710)]).then(n.bind(n,93417))}]},{path:"/network",name:"network",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(247)]).then(n.bind(n,35622))}]},{path:"/vote",name:"vote",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(753)]).then(n.bind(n,8617))}]},{path:"/proposal",name:"proposal",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(793)]).then(n.bind(n,98793))}]},{path:"/proposal/new",name:"ProposalNew",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(475)]).then(n.bind(n,44475))}]},{path:"/proposal/:proposalName",name:"ProposalItem",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(895)]).then(n.bind(n,29895))}]},{path:"/explore",name:"explore",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>n.e(987).then(n.bind(n,18987))}]},{path:"/repository",name:"repository",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>n.e(909).then(n.bind(n,92909))}]},{path:"/key/:key",name:"key",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(985)]).then(n.bind(n,47985))}]},{path:"/:catchAll(.*)*",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(397)]).then(n.bind(n,61397))}]}],c=s;var u=n(30229),l=n(60499),d=n(59835),g=n(3168);const p=u.Z.get(),h=(0,l.qj)({network:""}),f=e=>{const t=p.getAllChains(),n=t.filter((t=>t.getName()===e))[0];h.network=n.getName(),p.setCurrentChain(n)},m=(0,r.BC)((function(){const e=o.PO,t=(0,o.p7)({routes:c,history:e("/")});return t.beforeEach(((e,t)=>{const n=p.getAllChains(),r=sessionStorage.getItem(u.Z.CHAIN_LOCAL_STORAGE),o=p.getPreferredChain(),i="true"===g.env.SHOW_MULTICHAIN_SELECTOR;if(i)if("/"===e.path){if(e.query.network)return{path:"network",query:e.query};if(r)return{path:"network",query:{network:r}};if(o)return f(o),{path:"network",query:{network:o}}}else{if(!e.query.network)return r?Object.assign(Object.assign({},e),{query:Object.assign(Object.assign({},e.query),{network:r})}):o?(f(o),Object.assign(Object.assign({},e),{query:Object.assign(Object.assign({},e.query),{network:o})})):{path:"/"};if(0===n.filter((t=>t.getName()===e.query.network)).length)return o?(f(o),Object.assign(Object.assign({},e),{query:Object.assign(Object.assign({},e.query),{network:o})})):{path:"/"};(t.query.network&&t.query.network!==e.query.network||r!==e.query.network)&&(f(Array.isArray(e.query.network)?e.query.network[0]:e.query.network),setTimeout((()=>location.reload()),500))}})),t}));function b(){return(0,d.Fl)((()=>h.network))}},90347:(e,t,n)=>{"use strict";n.d(t,{Kf:()=>o,RJ:()=>i,p6:()=>u,pw:()=>c,sA:()=>s,vE:()=>l,xG:()=>a});var r=n(30229);function o(e){const t=/(^[a-z1-5.]{1,11}[a-z1-5]$)|(^[a-z1-5.]{12}[a-z1-5]$)/;return null!==t.exec(e)}function i(e){const t=/^([0-9A-Fa-f]){64}$/g;return null!==t.exec(e)}function a(e,t,n,r){const o=/^-?(0|[1-9]\d*)(\.\d+)?$/,i=("number"===typeof e||o.test(e))&&!Number.isNaN(e);if(!i)throw`${e} is not a valid number`;let a="number"===typeof e?e.toString():e;return a=(+a).toFixed(t),r||(a=(()=>{const[e,t]=a.split(".");return`${(+e).toLocaleString("en")}.${t}`})()),0!==+a||r||(a="0"),n&&(a+=` ${n}`),a}function s(e){try{const t=e.split(" ")[0];return parseFloat(t.replace(/,/g,""))}catch(t){return 0}}function c(e){return new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:20}).format(e)}function u(e,t=!0){return t?new Date(e).toLocaleDateString("en-US",{month:"long",year:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}):new Date(e).toLocaleDateString("en-US",{month:"long",year:"numeric",day:"numeric"})}function l(e){if(e.rex)return e.rex;if("number"===typeof e.amount){const t=(0,r.z)().getSystemToken().symbol;return`${e.amount} ${t}`}return e.amount}},46601:()=>{},89214:()=>{}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=e,(()=>{var e=[];n.O=(t,r,o,i)=>{if(!r){var a=1/0;for(l=0;l=i)&&Object.keys(n.O).every((e=>n.O[e](r[c])))?r.splice(c--,1):(s=!1,i0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[r,o,i]}})(),(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[]))})(),(()=>{n.u=e=>"js/"+(64===e?"chunk-common":e)+"."+{64:"cac51e83",247:"ae4a7f96",258:"f95eac38",371:"7ed30e64",397:"4a37addf",475:"a179fd0b",710:"12fc11cd",753:"d4ec7ee6",793:"9b1d8490",827:"eb5aa052",862:"91e04a74",895:"ebdf0705",909:"862a4d97",985:"7244d31c",987:"b11029f4"}[e]+".js"})(),(()=>{n.miniCssF=e=>"css/"+({143:"app",736:"vendor"}[e]||e)+"."+{143:"31a7ead1",247:"af991343",258:"e21a34b0",371:"6e916095",397:"f4fe581c",475:"1628da7f",710:"209f1d33",736:"b507aab4",753:"a6e0aae4",827:"efd4746e",862:"21cd96e3",895:"46fa1f18",985:"b268a873"}[e]+".css"})(),(()=>{n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e={},t="open-block-explorer:";n.l=(r,o,i,a)=>{if(e[r])e[r].push(o);else{var s,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l{s.onerror=s.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(n))),t)return t(n)},p=setTimeout(g.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=g.bind(null,s.onerror),s.onload=g.bind(null,s.onload),c&&document.head.appendChild(s)}}})(),(()=>{n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e)})(),(()=>{n.p="/"})(),(()=>{var e=(e,t,n,r)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css";var i=i=>{if(o.onerror=o.onload=null,"load"===i.type)n();else{var a=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");c.code="CSS_CHUNK_LOAD_FAILED",c.type=a,c.request=s,o.parentNode.removeChild(o),r(c)}};return o.onerror=o.onload=i,o.href=t,document.head.appendChild(o),o},t=(e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;rnew Promise(((o,i)=>{var a=n.miniCssF(r),s=n.p+a;if(t(a,s))return o();e(r,s,o,i)})),o={143:0};n.f.miniCss=(e,t)=>{var n={247:1,258:1,371:1,397:1,475:1,710:1,753:1,827:1,862:1,895:1,985:1};o[e]?t.push(o[e]):0!==o[e]&&n[e]&&t.push(o[e]=r(e).then((()=>{o[e]=0}),(t=>{throw delete o[e],t})))}})(),(()=>{var e={143:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise(((n,r)=>o=e[t]=[n,r]));r.push(o[2]=i);var a=n.p+n.u(t),s=new Error,c=r=>{if(n.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,o[1](s)}};n.l(a,c,"chunk-"+t,t)}},n.O.j=t=>0===e[t];var t=(t,r)=>{var o,i,[a,s,c]=r,u=0;if(a.some((t=>0!==e[t]))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(c)var l=c(n)}for(t&&t(r);un(20623)));r=n.O(r)})(); \ No newline at end of file diff --git a/dist/spa/js/app.cd6a50f9.js b/dist/spa/js/app.cd6a50f9.js new file mode 100644 index 0000000..92b2f12 --- /dev/null +++ b/dist/spa/js/app.cd6a50f9.js @@ -0,0 +1 @@ +(()=>{var e={20623:(e,t,n)=>{"use strict";var o=n(61957),r=n(71947),a=n(60499),i=n(59835);function s(e,t,n,o,r,a){const s=(0,i.up)("router-view");return(0,i.wg)(),(0,i.j4)(s)}const c={name:"App"};var u=n(11639);const d=(0,u.Z)(c,[["render",s]]),l=d;var g=n(78504),p=n(91669);async function h(e,t){const o=e(l);o.use(r.Z,t);const i="function"===typeof g["default"]?await(0,g["default"])({}):g["default"],{storeKey:s}=await Promise.resolve().then(n.bind(n,78504)),c=(0,a.Xl)("function"===typeof p.Z?await(0,p.Z)({store:i}):p.Z);return i.$router=c,{app:o,store:i,storeKey:s,router:c}}var m=n(6827),f=n(11530),b=n(63703);const v={config:{notify:{timeout:3e3,position:"top",color:"primary",textColor:"white"},screen:{bodyClasses:!0}},plugins:{Notify:m.Z,Dialog:f.Z,LocalStorage:b.Z}};var y=n(17779);const w="/";async function k({app:e,router:t,store:n,storeKey:o},r){let a=!1;const i=e=>{try{return t.resolve(e).href}catch(n){}return Object(e)===e?null:e},s=e=>{if(a=!0,"string"===typeof e&&/^https?:\/\//.test(e))return void(window.location.href=e);const t=i(e);null!==t&&(window.location.href=t)},c=window.location.href.replace(window.location.origin,"");for(let d=0;!1===a&&dPromise.all([Promise.resolve().then(n.bind(n,76865)),Promise.resolve().then(n.bind(n,34136)),Promise.resolve().then(n.bind(n,32101)),Promise.resolve().then(n.bind(n,84284)),Promise.resolve().then(n.bind(n,42841))]).then((t=>{const n=t.map((e=>e.default)).filter((e=>"function"===typeof e));k(e,n)}))))},3708:(e,t,n)=>{"use strict";n.d(t,{D0:()=>c,D3:()=>g,Ej:()=>u,Lw:()=>p,Qq:()=>l,cJ:()=>d,v1:()=>h});var o=n(61753),r=n(30229),a=function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(t){a(t)}}function s(e){try{c(o["throw"](e))}catch(t){a(t)}}function c(e){e.done?n(e.value):r(e.value).then(i,s)}c((o=o.apply(e,t||[])).next())}))};const i=(0,r.z)(),s=new o.APIClient({url:i.getHyperionEndpoint()}),c=function(e){return a(this,void 0,void 0,(function*(){return yield s.v1.chain.get_account(e)}))},u=function(e){return a(this,void 0,void 0,(function*(){const t=yield s.v1.history.get_key_accounts(e);return t}))},d=function(e){return a(this,void 0,void 0,(function*(){return yield s.v1.chain.get_currency_balance("eosio.token",e)}))},l=function(e){return a(this,void 0,void 0,(function*(){return yield s.v1.chain.get_table_rows(e)}))},g=function(e){return a(this,void 0,void 0,(function*(){const{abi:t}=yield s.v1.chain.get_abi(e.account);if(!t)throw new Error(`No ABI for ${String(e.account)}`);const n=o.Action.from(e,t);return o.Serializer.objectify(n.decodeData(t))}))},p=function(e,t){if(!t)throw new Error(`No ABI for ${String(e.account)}`);const n=o.Action.from(e,t);return o.Serializer.objectify(n.decodeData(t))},h=function(e,t,n){return a(this,void 0,void 0,(function*(){const{abi:r}=yield s.v1.chain.get_abi(e);if(!r)throw new Error(`No ABI for ${e}`);const{hexString:a}=o.Serializer.encode({object:n,abi:r,type:t});return a}))}},68142:(e,t,n)=>{"use strict";n.d(t,{V:()=>f,Z:()=>b});var o=n(54670),r=n(61753),a=n(30229),i=n(11530),s=n(90347),c=n(17779),u=function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(t){a(t)}}function s(e){try{c(o["throw"](e))}catch(t){a(t)}}function c(e){e.done?n(e.value):r(e.value).then(i,s)}c((o=o.apply(e,t||[])).next())}))};const d=.05,l=3600,g=(0,a.z)(),p=new r.APIClient({url:g.getHyperionEndpoint()}),h=g.getFuelRPCEndpoint(),m=`${null===h||void 0===h?void 0:h.protocol}://${null===h||void 0===h?void 0:h.host}:${null===h||void 0===h?void 0:h.port}/v1/resource_provider/request_transaction`;class f extends o.User{constructor(e){super(),this.user=e,this.signArbitrary=(e,t,n)=>u(this,void 0,void 0,(function*(){return this.user.signArbitrary(e,t,n)})),this.verifyKeyOwnership=e=>u(this,void 0,void 0,(function*(){return this.user.verifyKeyOwnership(e)})),this.getAccountName=()=>u(this,void 0,void 0,(function*(){return this.user.getAccountName()})),this.getChainId=()=>u(this,void 0,void 0,(function*(){return this.user.getChainId()})),this.getKeys=()=>u(this,void 0,void 0,(function*(){return this.user.getKeys()}))}signTransaction(e,t){return u(this,void 0,void 0,(function*(){try{if(!h)return this.user.signTransaction(e,t);const o=yield p.v1.chain.get_info(),a=o.getTransactionHeader(l),i=e.actions.map((e=>p.v1.chain.get_abi(e.account))),s=yield Promise.all(i),c=s.map((e=>e.abi)),u=e.actions.map(((e,t)=>({contract:e.account,abi:c[t]}))),d=r.Transaction.from(Object.assign(Object.assign({},a),{actions:e.actions}),u),g=r.PackedTransaction.from({signatures:[],packed_context_free_data:"",packed_trx:r.Serializer.encode({object:d})}),f=r.PermissionLevel.from({actor:yield this.user.getAccountName(),permission:this.requestPermission}),b=yield fetch(m,{body:JSON.stringify({signer:f,packedTransaction:g}),method:"POST"}),w=yield b.json();switch(w.code){case 402:case 200:{const{data:e}=w,[,o]=e.request,r=o,a=y(f,r,d,e.costs);try{yield v(this.user,a)}catch(n){break}r.signatures=[...e.signatures];const i=yield this.user.signTransaction(r,Object.assign({broadcast:!1},t));if(!i.transaction.signatures)return Promise.reject("The transaction was not broadcasted because no signatures were obtained");r.signatures=[...i.transaction.signatures,...e.signatures];const s=yield p.v1.chain.push_transaction(r),c={wasBroadcast:!0,transactionId:s.transaction_id,status:s.processed.receipt.status,transaction:r};return Promise.resolve(c)}case 400:break;default:throw"Code "+(+w.code).toString()+" not expected from resource provider endpoint: "+m}return this.user.signTransaction(e,t)}catch(n){throw n}}))}get requestPermission(){return this.user.requestPermission||"active"}}class b{static save(){localStorage.setItem("fuel_preferences",JSON.stringify(b.preferences))}static drop(){localStorage.removeItem("fuel_preferences")}static load(){try{b.preferences=b.preferences||{};const e=localStorage.getItem("fuel_preferences");e&&(b.preferences=JSON.parse(e))}catch(e){c.error("ERROR: ",e)}}static setPreferences(e,t){b.preferences[e]=Object.assign(Object.assign({},b.preferences[e]),t),b.preferences[e].remember?b.save():b.drop()}static setGlobals(e){b.globals=e}}function v(e,t){return u(this,void 0,void 0,(function*(){const n=yield e.getAccountName();let o=[];return o=[],new Promise(((e,r)=>{if(b.preferences[n]&&b.preferences[n].remember)return void(b.preferences[n].approve?e():r());const a=function(t){b.setPreferences(n,{approve:t}),t?e():r()},s="Reject",c="Confirm";let u='Your account doesn\'t have sufficient resources (CPU, NET, or RAM) to pay for your next transaction. Don\'t worry! Telos has partnered with Greymass to proceed with your transaction using "Greymass Fuel", allowing you to continue for free.

We recommend powering up your account with at least 0.5 TLOS in CPU and NET each and purchasing RAM, as this service is not supported on all dAPPs in our ecosystem. Please click here to proceed and power up your account';try{"string"===typeof t&&(u=`Your account doesn't have sufficient resources (CPU, NET, or RAM) to pay for your next transaction and it can not be processed without fees. Telos has partnered with Greymass to proceed with your transaction using "Greymass Fuel", reducing cost significantly.

Please confirm fees below to proceed.

${t}

We recommend powering up your account with at least 0.5 TLOS in CPU and NET each and purchasing RAM, as this service is not supported on all dAPPs in our ecosystem. Please click here to proceed and power up your account`)}catch(d){}i.Z.create({title:"Resource Warning!",message:u,html:!0,cancel:s,ok:c,persistent:!0,options:{type:"checkbox",model:o,isValid:e=>(b.setPreferences(n,{remember:1===e.length}),!0),items:[{label:"Remember my decision",value:"remember",color:"primary"}]}}).onOk((()=>a(!0))).onCancel((()=>a(!1)))}))}))}function y(e,t,n,o=null){return N(t),w(e,t,n,o)}function w(e,t,n,o){const r=k(o);return A(r,t,n),P(e,r,t,n)}function k(e){let t=1;if(e){t+=1;const n=+e.ram.replace(/[^0-9.]/g,"");0!==n&&(t+=1)}return t}function P(e,t,n,o){if(_(t,n,o),t>1){let o=null;return o=C(e,n),t>2&&S(e,n),(0,s.xG)(o,4,"TLOS",!0)}return null}function x(e){return e}function C(e,t){var n;const o=t.actions[1],r=x(o.data),a=parseFloat(null===(n=r.quantity)||void 0===n?void 0:n.split(" ")[0]);if(a>d)throw new Error(`Fee of ${a} exceeds the maximum fee of ${d}.`);if("eosio.token"!==o.account.toString()||"transfer"!==o.name.toString()||"fuel.gm"!==r.to.toString())throw new Error("Fee action was deemed invalid.");return a}function S(e,t){var n;const o=t.actions[2],r=x(o.data),a=parseFloat(null===(n=r.quant)||void 0===n?void 0:n.split(" ")[0]);if("eosio"!==o.account.toString()||!["buyram","buyrambytes"].includes(String(o.name))||"greymassfuel"!==r.payer.toString()||r.receiver.toString()!==e.actor.toString())throw new Error("RAM action was deemed invalid.");return a}function _(e,t,n){for(const[o]of t.actions.entries()){if(o{"use strict";n.d(t,{Bp:()=>N,C5:()=>I,G:()=>C,H4:()=>x,JF:()=>O,M6:()=>_,MP:()=>E,Ox:()=>F,Qg:()=>T,Sv:()=>R,V6:()=>v,Vl:()=>L,dJ:()=>A,f1:()=>k,fo:()=>P,lz:()=>w,mM:()=>y,p1:()=>S});var o=n(39981),r=n.n(o),a=n(30229),i=n(17779),s=function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(t){a(t)}}function s(e){try{c(o["throw"](e))}catch(t){a(t)}}function c(e){e.done?n(e.value):r(e.value).then(i,s)}c((o=o.apply(e,t||[])).next())}))};const c=(0,a.z)(),u=r().create({baseURL:c.getHyperionEndpoint()}),d=new AbortController,l="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjciIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAyNyAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTgiIGN5PSI5IiByPSI4IiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIi8+CjxjaXJjbGUgY3g9IjkiIGN5PSI5IiByPSI4IiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIi8+Cjwvc3ZnPgo=",g=c.getName(),p=`https://raw.githubusercontent.com/telosnetwork/token-list/main/tokens.${g}.json`,h=fetch(p).then((e=>e.text())).then((e=>JSON.parse(e))).then((e=>e.map((e=>e)))).catch((e=>(i.error(e),[]))),m=5,f=10;let b=0;u.interceptors.request.use((function(e){return new Promise((t=>{const n=setInterval((()=>{b{const t=n.find((t=>t.symbol===e.symbol));return t&&t.logo?e.logo=null===t||void 0===t?void 0:t.logo:e.logo=l,e}))}return yield h}))},k=function(e){return s(this,void 0,void 0,(function*(){const t=e.account||"",n=e.page||1,o=e.limit||10,r=Math.max(0,n-1)*o,a=e.notified||"",i=e.sort||"desc",s=e.after||"",c=e.before||"";let d={};t&&(d=Object.assign({account:t},d)),o&&(d=Object.assign({limit:o},d)),r&&(d=Object.assign({skip:r},d)),a&&(d=Object.assign({notified:a},d)),i&&(d=Object.assign({sort:i},d)),s&&(d=Object.assign({after:s},d)),c&&(d=Object.assign({before:c},d)),e.extras&&(d=Object.assign(Object.assign({"act.name":"!onblock"},d),e.extras));const l=d;return yield u.get("v2/history/get_actions",{params:l})}))},P=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.get("v2/history/get_transaction",{params:{id:e}});return t.data}))},x=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.post("v1/history/get_transaction",{id:e});return t.data}))},C=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.get("v2/history/get_actions",{params:{limit:100,account:e,filter:"eosio:newaccount",skip:0}});return t.data.actions}))},S=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.get("v2/state/get_links",{params:{account:e}});return t.data.links}))},_=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.post("v1/chain/get_table_by_scope",e);return t.data.rows}))},A=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.post("v1/chain/get_account",{account_name:e});return t.data}))},T=function(e){return s(this,void 0,void 0,(function*(){d.abort();const t=yield u.post("v1/chain/get_block",{block_num_or_id:e,signal:d.signal});return t.data}))},R=function(e,t,n,o){return s(this,void 0,void 0,(function*(){d.abort();const r=yield u.get("v2/history/get_actions",{params:{account:e,filter:t,limit:n,skip:o}});return r.data}))},I=function(){return s(this,void 0,void 0,(function*(){d.abort();const e=yield u.get("v1/chain/get_info");return e.data}))},E=function(){return s(this,void 0,void 0,(function*(){d.abort();const e=yield u.get("v1/chain/get_producer_schedule");return e.data}))},N=function({proposer:e,proposal:t,requested:n,provided:o,executed:r,limit:a,skip:i}){return s(this,void 0,void 0,(function*(){const s=yield u.get("v2/state/get_proposals",{params:{proposer:e,proposal:t,requested:n,provided:o,executed:r,limit:a,skip:i}});return s.data}))},O=function(){return s(this,void 0,void 0,(function*(){const e=yield u.post("v1/chain/get_producers",{json:!0,limit:1e4});return e.data}))},F=function(e){return s(this,void 0,void 0,(function*(){const t=yield u.post("v1/chain/get_abi",{account_name:e});return t.data}))},L=function(){return s(this,void 0,void 0,(function*(){const e=yield u.get("v1/chain/get_producer_schedule");return e.data}))}},21889:(e,t,n)=>{"use strict";n.d(t,{h:()=>m});var o=n(22231),r=n(3708),a=n(39981),i=n.n(a),s=n(30229),c=function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(t){a(t)}}function s(e){try{c(o["throw"](e))}catch(t){a(t)}}function c(e){e.done?n(e.value):r(e.value).then(i,s)}c((o=o.apply(e,t||[])).next())}))};const u=5,d=10;let l=0;const g=(0,s.z)(),p=i().create({baseURL:g.getApiEndpoint()});p.interceptors.request.use((function(e){return new Promise((t=>{const n=setInterval((()=>{l{"use strict";n.r(t),n.d(t,{default:()=>a});var o=n(23340),r=n(21889);const a=(0,o.xr)((({app:e})=>{e.config.globalProperties.$api=r.h}))},34136:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var o=n(23340),r=n(39981),a=n.n(r);const i=(0,o.xr)((({app:e})=>{e.config.globalProperties.$axios=a()}))},76865:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var o=n(23340),r=n(30229);const a=(0,o.xr)((({app:e})=>{e.config.globalProperties.$config=r.Z.get()}))},42841:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var o=n(23340),r=n(68142);const a=(0,o.xr)((({app:e})=>{e.config.globalProperties.$fuel=r.Z,r.Z.setGlobals(e.config.globalProperties),r.Z.load()}))},84284:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>w,getAuthenticators:()=>v,resetUalState:()=>y});var o=n(23340),r=n(54670),a=n(14247),i=n(30229),s=n(37474),c=n(11530),u=n(6827),d=n(65054),l=n(90347),g=function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(t){a(t)}}function s(e){try{c(o["throw"](e))}catch(t){a(t)}}function c(e){e.done?n(e.value):r(e.value).then(i,s)}c((o=o.apply(e,t||[])).next())}))};function p(){return g(this,void 0,void 0,(function*(){let e="eosio",t="active";return"cleos"===localStorage.getItem("autoLogin_"+(0,i.z)().getChainId())?e=localStorage.getItem("account_"+(0,i.z)().getChainId()):(yield new Promise((t=>{c.Z.create({color:"primary",title:"Connect to cleos",message:"Account name (.,a-z,1-5)",prompt:{model:"",type:"text",isValid:e=>(0,l.Kf)(e)},cancel:!0,persistent:!0}).onOk((t=>{e=""!==t?t:"eosio"})).onCancel((()=>{throw"Cancelled!"})).onDismiss((()=>{t(!0)}))})),yield new Promise((e=>{c.Z.create({color:"primary",title:"Connect to cleos",message:"Account permission",options:{type:"radio",model:[],items:[{label:"Active",value:"active"},{label:"Owner",value:"owner"}]},cancel:!0,persistent:!0}).onOk((e=>{t=e})).onCancel((()=>{throw"Cancelled!"})).onDismiss((()=>{e(!0)}))}))),{accountName:e,permission:t}}))}function h(e,t){return g(this,void 0,void 0,(function*(){const n=JSON.stringify(Object.assign({delay_sec:0,max_cpu_usage_ms:0},t),null,4);yield new Promise((t=>{c.Z.create({color:"primary",message:`
cleos -u ${e.protocol}://${e.host}:${e.port} push transaction '${n}'
`,html:!0,cancel:!0,fullWidth:!0,ok:{label:"Copy"}}).onOk((()=>{(0,d.Z)(`cleos -u ${e.protocol}://${e.host}:${e.port} push transaction '${n}'`).then((()=>{u.Z.create({color:"green-4",textColor:"white",message:"Copied to clipboard",timeout:1e3})})).catch((()=>{u.Z.create({color:"red-8",textColor:"white",message:"Could not copy",timeout:1e3})}))})).onCancel((()=>{throw"Cancelled!"})).onDismiss((()=>{t(!0)}))}))}))}function m(e){return g(this,void 0,void 0,(function*(){return h((0,i.z)().getRPCEndpoint(),e)}))}function f(){return{chainId:(0,i.z)().getChainId(),rpcEndpoints:[(0,i.z)().getRPCEndpoint()]}}const b=[],v=()=>{if(0===b.length){const e=f();b.push(new a.Anchor([e],{appName:`OBE_${e.chainId}`})),b.push(new s.CleosAuthenticator([e],{appName:`OBE_${e.chainId}`,loginHandler:p,signHandler:m}))}return b},y=()=>{b.length=0},w=(0,o.xr)((({app:e})=>{const t=v(),n=new r.UAL([f()],"ual",t);e.config.globalProperties.$ual=n}))},76510:(e,t,n)=>{"use strict";n.d(t,{HD:()=>r,ZP:()=>a,t0:()=>o});const o={primary:"#11589e",secondary:"#5d5d5d",accent:"#9C27B0",dark:"#1d1d1d","dark-page":"#121212",positive:"#21BA45",negative:"#C10015",info:"#31CCEC",warning:"#F2C037","color-map":"#8C8C8C","color-sidebar-selected":"#d1d1d1","color-primary-gradient":"linear-gradient(90deg, #5d5d5d 0%, #5d5d5d 100%)","color-secondary-gradient":"linear-gradient(180deg, #5d5d5d 0%, #5d5d5d 147.34%)","color-tertiary-gradient":"linear-gradient(90deg, #CBCAF5 0%, #A9CAF3 56.77%, #63C9EF 100%)","color-progress-gradient":"#11589e","color-producer-card-background":"#f0f0f0","color-select-box-background":"#e9e9e9","color-separator-background":"rgba(138, 101, 212, 0.1)","color-card-shadow":"rgba(37, 42, 97, 0.3)","color-dropdown-card":"#172c6c","color-header-background":"#4C4C4C","color-header-text":"#FFFFFF","color-header-border":"#777777","color-header-support-background":"linear-gradient(180deg, #4C4C4C 0%, #3B3B3B 147.34%)","color-graph-shadow":"#3f65c228","color-footer-background":"#000000"},r={headerSettings:{hideLoginHandler:!1,hideNetworkTab:!1,hideWalletTab:!1,hideVoteTab:!1,hideProposalTab:!1},accountPageSettings:{hideCpuInfo:!1,hideNetInfo:!1,hideRamInfo:!1,hideRexInfo:!1,hideRefundingInfo:!1,hideDelegatedInfo:!1,hideLiquidInfo:!1,hideResourcesControl:!1,hideRexControl:!1,hideTransactionTab:!1,hideTokensTab:!1,hideKeysTab:!1,hideChildrenTab:!1,hideContractsTab:!1}};class a{constructor(e){this.name=e}getName(){return this.name}getLargeLogoPath(){return`~/assets/${this.name}/logo_lg.svg`}getSmallLogoPath(){return`~/assets/${this.name}/logo_sm.svg`}getUiCustomization(){return r}isTestnet(){return!1}}},30229:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ge,z:()=>qe});var o=n(76510),r=n(39981),a=n.n(r),i=function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(t){a(t)}}function s(e){try{c(o["throw"](e))}catch(t){a(t)}}function c(e){e.done?n(e.value):r(e.value).then(i,s)}c((o=o.apply(e,t||[])).next())}))};const s=e=>i(void 0,void 0,void 0,(function*(){const t=yield a().get(d(e));return t.data[e].usd})),c=e=>i(void 0,void 0,void 0,(function*(){const t=d(e),n=`https://api.coingecko.com/api/v3/coins/${e}/market_chart?vs_currency=USD&days=1`,[o,r]=yield Promise.all([a().get(t),a().get(n)]);return{lastUpdated:o.data[e].last_updated_at,tokenPrice:o.data[e].usd,dayChange:o.data[e].usd_24h_change,dayVolume:o.data[e].usd_24h_vol,marketCap:o.data[e].usd_market_cap,prices:r.data.prices}})),u=()=>i(void 0,void 0,void 0,(function*(){return{lastUpdated:0,tokenPrice:.026,dayChange:0,dayVolume:0,marketCap:13e8,prices:[]}})),d=e=>`https://api.coingecko.com/api/v3/simple/price?ids=${e}&vs_currencies=USD&include_market_cap=true&include_24hr_vol=true&include_24hr_change=true&include_last_updated_at=true`,l="aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906",g="eos",p="EOS",h={symbol:"EOS",precision:4,amount:0,contract:"eosio.token"},m="https://eos.eosusa.io",f={protocol:"https",host:"eos.eosusa.io",port:443},b={protocol:"https",host:"eos.greymass.com",port:443},v="https://eos.greymass.com",y="https://telos-producer-validation.s3.amazonaws.com",w=!1,k={primary:"#28417c",secondary:"#000000",accent:"#9C27B0",dark:"#1d1d1d",positive:"#21BA45",negative:"#ff0000",info:"#31CCEC",warning:"#F2C037","color-map":"#19284e","color-primary-gradient":"linear-gradient(90deg, #0c3964 0%, #1876d2 100%)","color-secondary-gradient":"linear-gradient(180deg, #0c3964 0%, #1876d2 147.34%)","color-tertiary-gradient":"linear-gradient(90deg, #CBCAF5 0%, #A9CAF3 56.77%, #63C9EF 100%)","color-progress-gradient":"#28417c","color-header-background":"#000000","color-header-border":"#444","color-header-support-background":"#000","color-graph-shadow":"#3f65c228","color-footer-background":"#000000"};class P extends o.ZP{getName(){return g}getChainId(){return l}getDisplay(){return p}getHyperionEndpoint(){return m}getRPCEndpoint(){return f}getFuelRPCEndpoint(){return b}getApiEndpoint(){return v}getS3ProducerBucket(){return y}getPriceData(){return c("eos")}getSystemToken(){return h}getUsdPrice(){return s("eos")}getLargeLogoPath(){return"chains/eos/eos_large.png"}getSmallLogoPath(){return"chains/eos/eos.png"}getMapDisplay(){return w}getTheme(){return k}getFiltersSupported(e){return"notified"!==e}getFooterLinks(){return[{label:"TERMS",url:"https://eosnetwork.com/terms-of-use/"},{label:"PRIVACY",url:"https://eosnetwork.com/privacy-policy/"},{label:"REPOSITORY",url:"https://github.com/telosnetwork/open-block-explorer"}]}}const x="4667b205c6838ef70ff7988f6e8257e8be0e1284a2f59699054a018f743b1d11",C="telos",S="Telos",_={symbol:"TLOS",precision:4,amount:0,contract:"eosio.token"},A="https://mainnet.telos.net",T={protocol:"https",host:"mainnet.telos.net",port:443},R={protocol:"https",host:"telos.greymass.com",port:443},I="https://api.telos.net/v1",E="https://telos-producer-validation.s3.amazonaws.com",N=!0,O={primary:"#571aff",secondary:"#071A5F",accent:"#9C27B0",dark:"#1d1d1d",positive:"#21BA45",negative:"#ff0000",info:"#31CCEC",warning:"#F2C037","color-map":"#4325c2","color-primary-gradient":"linear-gradient(90deg, #071A5F 0%, #571AFF 100%)","color-secondary-gradient":"linear-gradient(180deg, #071A5F 0%, #571aff 147.34%)","color-tertiary-gradient":"linear-gradient(90deg, #CBCAF5 0%, #A9CAF3 56.77%, #63C9EF 100%)","color-progress-gradient":"#571aff","color-producer-card-background":"#f5f4fe","color-select-box-background":"#e0dffb","color-header-background":"#071A5F","color-header-border":"#8a65d41a","color-header-support-background":"linear-gradient(180deg, #071A5F 0%, #571aff 147.34%)","color-graph-shadow":"#571aff28","color-footer-background":"#071A5F"};class F extends o.ZP{getName(){return C}getChainId(){return x}getDisplay(){return S}getHyperionEndpoint(){return A}getRPCEndpoint(){return T}getFuelRPCEndpoint(){return R}getApiEndpoint(){return I}getS3ProducerBucket(){return E}getPriceData(){return c("telos")}getSystemToken(){return _}getUsdPrice(){return s("telos")}getLargeLogoPath(){return"chains/telos/telos_logo.png"}getSmallLogoPath(){return"chains/telos/tlos.png"}getMapDisplay(){return N}getTheme(){return O}getFiltersSupported(e){return!0}getFooterLinks(){return[{label:"LEGAL",url:"https://telos.net/legal"},{label:"PRIVACY",url:"https://telos.net/privacy-policy"},{label:"REPOSITORY",url:"https://github.com/telosnetwork/open-block-explorer"}]}}const L="8fc6dce7942189f842170de953932b1f66693ad3788f766e777b6f9d22335c02",D="ux",B="UX",j={symbol:"UTX",precision:4,amount:0,contract:"eosio.token"},z="https://ux.eosusa.io",$={protocol:"https",host:"ux.eosusa.io",port:443},U="https://ux.eosusa.io",q="https://telos-producer-validation.s3.amazonaws.com",G=!1,M={};class Z extends o.ZP{getName(){return D}getChainId(){return L}getDisplay(){return B}getHyperionEndpoint(){return z}getRPCEndpoint(){return $}getFuelRPCEndpoint(){return null}getApiEndpoint(){return U}getS3ProducerBucket(){return q}getPriceData(){return u()}getSystemToken(){return j}getUsdPrice(){return Promise.resolve(0)}getLargeLogoPath(){return"chains/ux/logo_sm.png"}getSmallLogoPath(){return"chains/ux/logo_sm.png"}getMapDisplay(){return G}getTheme(){return M}getFiltersSupported(e){return"notified"!==e}getFooterLinks(){return[{label:"TERMS",url:"https://uxnetwork.io/static/Terms.pdf"},{label:"PRIVACY",url:"https://uxnetwork.io/static/PP.pdf"},{label:"REPOSITORY",url:"https://github.com/telosnetwork/open-block-explorer"}]}}const H="1064487b3cd1a897ce03ae5b6a865651747e2e152090f99c1d19d44e01aea5a4",V="wax",J="WAX",Y={symbol:"WAX",precision:4,amount:0,contract:"eosio.token"},K="https://wax.eosusa.io",W={protocol:"https",host:"wax.eosusa.io",port:443},X="https://example.com",Q="https://telos-producer-validation.s3.amazonaws.com",ee=!1,te={};class ne extends o.ZP{getName(){return V}getChainId(){return H}getDisplay(){return J}getHyperionEndpoint(){return K}getRPCEndpoint(){return W}getFuelRPCEndpoint(){return null}getApiEndpoint(){return X}getS3ProducerBucket(){return Q}getPriceData(){return c("wax")}getSystemToken(){return Y}getUsdPrice(){return s("wax")}getLargeLogoPath(){return"chains/wax/logo_lg.png"}getSmallLogoPath(){return"chains/wax/logo_lg.png"}getMapDisplay(){return ee}getTheme(){return te}getFiltersSupported(e){return"notified"!==e}getFooterLinks(){return[{label:"TERMS",url:"https://www.wax.io/terms-of-service"},{label:"PRIVACY",url:"https://www.wax.io/privacy-policy"},{label:"REPOSITORY",url:"https://github.com/telosnetwork/open-block-explorer"}]}}const oe="1eaa0824707c8c16bd25145493bf062aecddfeb56c736f6ba6397f3195f33c9f",re="telos-testnet",ae="Telos",ie={symbol:"TLOS",precision:4,amount:0,contract:"eosio.token"},se="https://testnet.telos.net",ce="https://telos-producer-validation.s3.amazonaws.com",ue={protocol:"https",host:"testnet.telos.net",port:443},de="https://api-dev.telos.net/v1",le=!1,ge={primary:"#571aff",secondary:"#071A5F",accent:"#9C27B0",dark:"#1d1d1d",positive:"#21BA45",negative:"#ff0000",info:"#31CCEC",warning:"#F2C037","color-map":"#4325c2","color-primary-gradient":"linear-gradient(90deg, #071A5F 0%, #571AFF 100%)","color-secondary-gradient":"linear-gradient(180deg, #071A5F 0%, #571aff 147.34%)","color-tertiary-gradient":"linear-gradient(90deg, #CBCAF5 0%, #A9CAF3 56.77%, #63C9EF 100%)","color-progress-gradient":"#571aff","color-producer-card-background":"#f5f4fe","color-select-box-background":"#e0dffb","color-header-background":"#071A5F","color-header-border":"#8a65d41a","color-header-support-background":"linear-gradient(180deg, #071A5F 0%, #571aff 147.34%)","color-graph-shadow":"#571aff28","color-footer-background":"#071A5F"};class pe extends o.ZP{getName(){return re}getChainId(){return oe}getDisplay(){return ae}getHyperionEndpoint(){return se}getRPCEndpoint(){return ue}getFuelRPCEndpoint(){return null}getApiEndpoint(){return de}getS3ProducerBucket(){return ce}getPriceData(){return u()}getSystemToken(){return ie}getUsdPrice(){return Promise.resolve(0)}getLargeLogoPath(){return"chains/telos/telos_logo.png"}getSmallLogoPath(){return"chains/telos/tlos.png"}getMapDisplay(){return le}getTheme(){return ge}getFiltersSupported(e){return"notified"!==e}isTestnet(){return!0}getFooterLinks(){return[{label:"LEGAL",url:"https://telos.net/legal"},{label:"PRIVACY",url:"https://telos.net/privacy-policy"},{label:"REPOSITORY",url:"https://github.com/telosnetwork/open-block-explorer"}]}}const he={hideLoginHandler:!0,hideNetworkTab:!1,hideWalletTab:!0,hideVoteTab:!0,hideProposalTab:!1},me=Object.assign(Object.assign({},o.HD),{headerSettings:he,accountPageSettings:{hideCpuInfo:!1,hideNetInfo:!1,hideRamInfo:!1,hideRexInfo:!0,hideRefundingInfo:!0,hideDelegatedInfo:!0,hideLiquidInfo:!0,hideResourcesControl:!1,hideRexControl:!1,hideTransactionTab:!1,hideTokensTab:!1,hideKeysTab:!1,hideChildrenTab:!1,hideContractsTab:!1}}),fe="8a34ec7df1b8cd06ff4a8abbaa7cc50300823350cadc59ab296cb00d104d2b8f",be="pangea-testnet",ve="Pangea testnet",ye={symbol:"SYS",precision:4,amount:0,contract:"eosio.token"},we="https://test.pangea.eosusa.io",ke={protocol:"https",host:"#",port:443},Pe={protocol:"https",host:"#",port:443},xe="https://blockchain-api-testnet.pangea.web4.world/",Ce="#",Se=!0,_e={primary:"#67D7ED",secondary:"#E76773",accent:"#9C27B0",dark:"#1d1d1d",positive:"#21BA45",negative:"#ff0000",info:"#31CCEC",warning:"#F2C037","color-map":"#4325c2","color-primary-gradient":"linear-gradient(90deg, #071A5F 0%, #571AFF 100%)","color-secondary-gradient":"linear-gradient(180deg, #071A5F 0%, #571aff 147.34%)","color-tertiary-gradient":"linear-gradient(90deg, #CBCAF5 0%, #A9CAF3 56.77%, #63C9EF 100%)","color-progress-gradient":"#571aff","color-producer-card-background":"#f5f4fe","color-select-box-background":"#e0dffb","color-header-background":"#67D7ED","color-header-border":"#8a65d41a","color-header-support-background":"linear-gradient(180deg, #000000 0%, #ffffff 147.34%)","color-graph-shadow":"#571aff28","color-footer-background":"#67D7ED"};class Ae extends o.ZP{getName(){return be}getChainId(){return fe}getDisplay(){return ve}getHyperionEndpoint(){return we}getRPCEndpoint(){return ke}getFuelRPCEndpoint(){return Pe}getApiEndpoint(){return xe}getS3ProducerBucket(){return Ce}getPriceData(){return u()}getSystemToken(){return ye}getUsdPrice(){return Promise.resolve(0)}getLargeLogoPath(){return"chains/pangea/telos_logo.png"}getSmallLogoPath(){return"chains/pangea/tlos.png"}getMapDisplay(){return Se}getTheme(){return _e}getFiltersSupported(e){return!0}getFooterLinks(){return[{label:"LEGAL",url:"https://pangea.web4.world"},{label:"PRIVACY",url:"https://pangea.web4.world"},{label:"REPOSITORY",url:"https://github.com/Tonomy-Foundation/Block-Explorer"}]}getUiCustomization(){return me}}const Te="73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d",Re="jungle",Ie="Jungle 4",Ee={symbol:"EOS",precision:4,amount:0,contract:"eosio.token"},Ne="https://jungle.eosusa.io",Oe="https://telos-producer-validation.s3.amazonaws.com",Fe={protocol:"https",host:"jungle.eosusa.io",port:443},Le="https://jungle.eosusa.io",De=!1,Be={primary:"#28417c",secondary:"#000000",accent:"#9C27B0",dark:"#1d1d1d",positive:"#21BA45",negative:"#ff0000",info:"#31CCEC",warning:"#F2C037","color-map":"#19284e","color-primary-gradient":"linear-gradient(90deg, #0c3964 0%, #1876d2 100%)","color-secondary-gradient":"linear-gradient(180deg, #0c3964 0%, #1876d2 147.34%)","color-tertiary-gradient":"linear-gradient(90deg, #CBCAF5 0%, #A9CAF3 56.77%, #63C9EF 100%)","color-progress-gradient":"#28417c","color-header-background":"#000000","color-header-border":"#444","color-header-support-background":"#000","color-graph-shadow":"#3f65c228","color-footer-background":"#000000"};class je extends o.ZP{getName(){return Re}getChainId(){return Te}getDisplay(){return Ie}getHyperionEndpoint(){return Ne}getRPCEndpoint(){return Fe}getFuelRPCEndpoint(){return null}getApiEndpoint(){return Le}getS3ProducerBucket(){return Oe}getPriceData(){return u()}getSystemToken(){return Ee}getUsdPrice(){return Promise.resolve(0)}getLargeLogoPath(){return"chains/eos/eos_large.png"}getSmallLogoPath(){return"chains/eos/eos.png"}getMapDisplay(){return De}getTheme(){return Be}getFiltersSupported(e){return"notified"!==e}isTestnet(){return!0}getFooterLinks(){return[{label:"TERMS",url:"https://eosnetwork.com/terms-of-use/"},{label:"PRIVACY",url:"https://eosnetwork.com/privacy-policy/"},{label:"REPOSITORY",url:"https://github.com/telosnetwork/open-block-explorer"}]}}const ze={mainnets:[new P("eos"),new F("telos"),new Z("ux"),new ne("wax")],testnets:[new je("jungle"),new pe("telos-testnet"),new Ae("pangea-testnet")]},$e=ze;var Ue=n(3168);function qe(){return Ge.get().getCurrentChain()}class Ge{constructor(){this.init()}init(){const e="true"===Ue.env.SHOW_MULTICHAIN_SELECTOR,t="pangea-testnet";if(this.testnets=$e.testnets,this.mainnets=$e.mainnets,e){const e=this.getSelectedChain();e?(this.currentChain=this.findChain(e),this.currentChain||(this.currentChain=this.findChain(t))):this.currentChain=this.findChain(t)}else this.currentChain=this.findChain(t)}static get(){return Ge.thisManager||(Ge.thisManager=new Ge),Ge.thisManager}getCurrentChain(){return this.currentChain}getSelectedChain(){return sessionStorage.getItem(Ge.CHAIN_LOCAL_STORAGE)}setCurrentChain(e){return!!this.findChain(e.getName())&&(sessionStorage.setItem(Ge.CHAIN_LOCAL_STORAGE,e.getName()),this.currentChain=e,!0)}getPreferredChain(){return localStorage.getItem(Ge.PREFERRED_CHAIN_LOCAL_STORAGE)}setPreferredChain(e){return!!this.findChain(e.getName())&&(localStorage.setItem(Ge.PREFERRED_CHAIN_LOCAL_STORAGE,e.getName()),!0)}getAllChains(){return this.mainnets.concat(this.testnets)}getMainnets(){return this.mainnets}getTestnets(){return this.testnets}findChain(e){const t=this.mainnets.find((t=>t.getName()===e));return t||this.testnets.find((t=>t.getName()===e))}}Ge.CHAIN_LOCAL_STORAGE="selectedChainName",Ge.PREFERRED_CHAIN_LOCAL_STORAGE="preferredChainName"},91669:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f,c:()=>b});var o=n(23340),r=n(18910),a=n(3168);const i="true"===a.env.SHOW_MULTICHAIN_SELECTOR,s=[{path:"/",name:"home",component:()=>Promise.all([n.e(736),n.e(64),n.e(258)]).then(n.bind(n,57945)),beforeEnter:(e,t,n)=>{i?n():n("/network")}},{path:"/account/:account",name:"account",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(827)]).then(n.bind(n,28038))}]},{path:"/transaction/:transaction",name:"transaction",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(862)]).then(n.bind(n,55228))}]},{path:"/block/:block",name:"block",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(710)]).then(n.bind(n,93417))}]},{path:"/network",name:"network",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(247)]).then(n.bind(n,35622))}]},{path:"/vote",name:"vote",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(753)]).then(n.bind(n,8617))}]},{path:"/proposal",name:"proposal",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(793)]).then(n.bind(n,98793))}]},{path:"/proposal/new",name:"ProposalNew",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(475)]).then(n.bind(n,44475))}]},{path:"/proposal/:proposalName",name:"ProposalItem",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(64),n.e(895)]).then(n.bind(n,29895))}]},{path:"/explore",name:"explore",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>n.e(987).then(n.bind(n,18987))}]},{path:"/repository",name:"repository",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>n.e(909).then(n.bind(n,92909))}]},{path:"/key/:key",name:"key",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(985)]).then(n.bind(n,47985))}]},{path:"/:catchAll(.*)*",component:()=>Promise.all([n.e(736),n.e(64),n.e(371)]).then(n.bind(n,40281)),children:[{path:"",component:()=>Promise.all([n.e(736),n.e(397)]).then(n.bind(n,61397))}]}],c=s;var u=n(30229),d=n(60499),l=n(59835),g=n(3168);const p=u.Z.get(),h=(0,d.qj)({network:""}),m=e=>{const t=p.getAllChains(),n=t.filter((t=>t.getName()===e))[0];h.network=n.getName(),p.setCurrentChain(n)},f=(0,o.BC)((function(){const e=r.PO,t=(0,r.p7)({routes:c,history:e("/")});return t.beforeEach(((e,t)=>{const n=p.getAllChains(),o=sessionStorage.getItem(u.Z.CHAIN_LOCAL_STORAGE),r=p.getPreferredChain(),a="true"===g.env.SHOW_MULTICHAIN_SELECTOR;if(a)if("/"===e.path){if(e.query.network)return{path:"network",query:e.query};if(o)return{path:"network",query:{network:o}};if(r)return m(r),{path:"network",query:{network:r}}}else{if(!e.query.network)return o?Object.assign(Object.assign({},e),{query:Object.assign(Object.assign({},e.query),{network:o})}):r?(m(r),Object.assign(Object.assign({},e),{query:Object.assign(Object.assign({},e.query),{network:r})})):{path:"/"};if(0===n.filter((t=>t.getName()===e.query.network)).length)return r?(m(r),Object.assign(Object.assign({},e),{query:Object.assign(Object.assign({},e.query),{network:r})})):{path:"/"};(t.query.network&&t.query.network!==e.query.network||o!==e.query.network)&&(m(Array.isArray(e.query.network)?e.query.network[0]:e.query.network),setTimeout((()=>location.reload()),500))}})),t}));function b(){return(0,l.Fl)((()=>h.network))}},78504:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>te,storeKey:()=>ee,useStore:()=>ne});var o=n(23340),r=n(33100);function a(){return{address:"",creator:""}}var i=function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(t){a(t)}}function s(e){try{c(o["throw"](e))}catch(t){a(t)}}function c(e){e.done?n(e.value):r(e.value).then(i,s)}c((o=o.apply(e,t||[])).next())}))};const s={setContract({dispatch:e,commit:t},n){return i(this,void 0,void 0,(function*(){t("setContract",n),yield e("getContractInfo",n)}))},getContractInfo({commit:e}){const t={creator:"bob"};e("setCreator",t.creator)}},c={getCreatorAddress({creator:e}){return e}},u={setContract(e,t){e.address=t},setCreator(e,t){e.creator=t}},d={namespaced:!0,actions:s,getters:c,mutations:u,state:a};function l(){return{token:{symbol:"",precision:0,amount:0,contract:""},bpList:[],producers:[],head_block_num:0,last_irreversible_block_num:0,head_block_producer:"",producerSchedule:[],ram_price:"0"}}const g={getToken({token:e}){return e}},p={setToken(e,t){e.token=t},setSymbol(e,t){e.token.symbol=t},setPrecision(e,t){e.token.precision=t},setBpList(e,t){e.bpList=t},setHead_block_num(e,t){e.head_block_num=t},setLIB(e,t){e.last_irreversible_block_num=t},setHead_block_producer(e,t){e.head_block_producer=t},setProducerSchedule(e,t){e.producerSchedule=t},setProducers(e,t){e.producers=t},setRamPrice(e,t){e.ram_price=t}};var h=n(39981),m=n.n(h),f=n(21889),b=n(30229),v=n(90347),y=n(17779),w=function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(t){a(t)}}function s(e){try{c(o["throw"](e))}catch(t){a(t)}}function c(e){e.done?n(e.value):r(e.value).then(i,s)}c((o=o.apply(e,t||[])).next())}))};const k=(0,b.z)(),P={updateBpList({commit:e}){return w(this,void 0,void 0,(function*(){try{const t=(yield f.h.getSchedule()).active.producers,n=t.map((e=>e.producer_name));e("setProducerSchedule",n);const o=yield m().get(k.getS3ProducerBucket()),r=new DOMParser,a=r.parseFromString(o.data,"text/xml").getElementsByTagName("Contents"),i=a[a.length-1],s=i.childNodes[0].textContent,c=(yield m().get(`${k.getS3ProducerBucket()}/${s}`)).data;let u=(yield f.h.getProducers()).rows;u=u.filter((e=>1===e.is_active)),u=u.map((e=>{const t=c.find((t=>t.owner===e.owner));if(!t)return Object.assign(Object.assign({},e),{name:e.owner,location:""});try{return Object.assign(Object.assign({},e),{name:t.org.candidate_name,location:t.org.location.name})}catch(n){return e}})),c.sort(((e,t)=>t.total_votes-e.total_votes)),u.sort(((e,t)=>t.total_votes-e.total_votes)),e("setProducers",u),e("setBpList",c)}catch(t){y.error(t)}}))},updateBlockData({commit:e}){return w(this,void 0,void 0,(function*(){try{const t=yield f.h.getInfo();e("setHead_block_num",t.head_block_num),e("setLIB",t.last_irreversible_block_num),e("setHead_block_producer",t.head_block_producer)}catch(t){y.error(t)}}))},updateRamPrice({commit:e}){return w(this,void 0,void 0,(function*(){try{const t={code:"eosio",scope:"eosio",table:"rammarket",json:!0},n=(yield f.h.getTableRows(t)).rows[0],o=Number(n.base.balance.split(" ")[0]),r=Number(n.quote.balance.split(" ")[0]),a=1e3*r/(o-1e3),i=(0,v.xG)(a/.995,4,null,!0);e("setRamPrice",i)}catch(t){y.error(t)}}))}},x={namespaced:!0,actions:P,getters:g,mutations:p,state:l};var C=n(61753);const S=(0,b.z)();function _(){return{loading:!1,accountName:"",accountPermission:"active",user:null,autoLogin:null,isAuthenticated:!1,linkedAccounts:[],data:{account_name:"",core_liquid_balance:C.UInt64.from(0)},authorization:[],rexActions:[],TransactionId:"",TransactionError:"",rexbal:{},vote:[],abi:{abi:null},coreRexBalance:`0 ${S.getSystemToken().symbol}`,maturingRex:`0 ${S.getSystemToken().symbol}`,maturedRex:`0 ${S.getSystemToken().symbol}`,savingsRex:`0 ${S.getSystemToken().symbol}`,tlosRexRatio:1,rexfund:0,chainId:""}}const A={account(e){return e},isAuthenticated(e){return e.isAuthenticated},accountName(e){return e.accountName},getAccountData(e){return e.data},getUser(e){return e.user}};var T=n(60499);const R=(0,b.z)().getSystemToken().symbol,I={setUser(e,t){e.user=t?(0,T.Xl)(t):t},setAccountName(e,t){e.accountName=t},setAutoLogin(e,t){e.autoLogin=t},setAccountData(e,t){var n;e.data=t,e.vote=(null===(n=null===t||void 0===t?void 0:t.voter_info)||void 0===n?void 0:n.producers.map((e=>e.toString())))||[]},setTransaction(e,t){e.TransactionId=t},setTransactionError(e,t){e.TransactionError=t},setRexActions(e,t){e.rexActions=t},setRexbal(e,t){e.rexbal=t.rexbal,e.coreRexBalance=(0,v.xG)(t.coreBalance,4,R),e.maturedRex=(0,v.xG)(t.maturedRex,4,R),e.maturingRex=(0,v.xG)(t.maturingRex,4,R),e.savingsRex=(0,v.xG)(t.savingsRex,4,R)},setVote(e,t){e.vote=t.sort()},setABI(e,t){e.abi=t},setTlosRexRatio(e,t){e.tlosRexRatio=t},setAccountPermission(e,t){e.accountPermission=t},setIsAuthenticated(e,t){e.isAuthenticated=t},setRexFund(e,t){e.rexfund=t},setChainId(e,t){e.chainId=t}};var E=n(68142),N=n(17779),O=function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(t){a(t)}}function s(e){try{c(o["throw"](e))}catch(t){a(t)}}function c(e){e.done?n(e.value):r(e.value).then(i,s)}c((o=o.apply(e,t||[])).next())}))};const F=(0,b.z)(),L=F.getSystemToken().symbol,D={login({commit:e},{account:t,authenticator:n}){return O(this,void 0,void 0,(function*(){if(yield n.init(),!t){const t=yield n.shouldRequestAccountName();if(t)return void e("setRequestAccount",!0)}const o=yield n.login();if(null===o||void 0===o?void 0:o.length){const t=new E.V(o[0]),r=t.requestPermission,a=yield t.getAccountName();e("setAccountPermission",r||"active"),e("setUser",t),e("setIsAuthenticated",!0),e("setAccountName",a),e("setChainId",n.chains[0].chainId),localStorage.setItem(`account_${n.chains[0].chainId}`,a),localStorage.setItem(`autoLogin_${n.chains[0].chainId}`,n.getName())}}))},logout({commit:e,state:t}){e("setIsAuthenticated",!1),e("setAccountName",""),e("setUser",null),localStorage.removeItem(`account_${t.chainId}`),localStorage.removeItem(`autoLogin_${t.chainId}`)},loadAccountData({commit:e,state:t}){return O(this,void 0,void 0,(function*(){try{const n=yield f.h.getAccount(t.accountName);e("setAccountData",n)}catch(n){return}}))},updateRexData({commit:e},{account:t}){return O(this,void 0,void 0,(function*(){const n={code:"eosio",limit:"2",lower_bound:t,scope:"eosio",table:"rexbal",reverse:!1,upper_bound:t},o=yield f.h.getTableRows(n),r={code:"eosio",scope:"eosio",table:"rexpool",json:!0,reverse:!1},a=(yield f.h.getTableRows(r)).rows[0],i={code:"eosio",limit:"1",lower_bound:t,scope:"eosio",table:"rexfund",reverse:!1,upper_bound:t},s=(yield f.h.getTableRows(i)).rows[0],c=(null===s||void 0===s?void 0:s.balance)?Number(s.balance.split(" ")[0]):0;e("setRexFund",c);const u=o.rows[0],d=u&&u.rex_balance?parseFloat(u.rex_balance.split(" ")[0]):0,l=Number(a.total_rex.split(" ")[0]),g=Number(a.total_lendable.split(" ")[0]),p=l>0?g/l:1;e("setTlosRexRatio",p);let h=l>0?p*d:0;h+=c;let m=0,b=u?p*(Number(u.matured_rex)/1e4):0,v=0;if(u&&u.rex_maturities&&u.rex_maturities.length>0){const e=(new Date).getFullYear(),t=(new Date).getTime();u.rex_maturities.forEach((n=>{const o=new Date(n.first).getFullYear(),r=new Date(n.first).getTime();o-e>1?m=p*(Number(n.second)/1e4):r-t<0?b+=p*(Number(n.second)/1e4):v=p*(Number(n.second)/1e4)}))}o.rows.length>0&&e("setRexbal",{rexbal:o.rows[0],coreBalance:h,maturingRex:v,savingsRex:m,maturedRex:b});const y=["eosio:sellrex","eosio:buyrex","eosio:deposit","eosio:withdraw","eosio:unstaketorex","eosio:cnclrexorder","eosio:rentcpu","eosio:rentnet","eosio:fundcpuloan","eosio:fundnetloan","eosio:defcpuloan","eosio:defnetloan","eosio:updaterex","eosio:consolidate","eosio:closerex","eosio:mvfrsavings","eosio:mvtosavings","eosio:rexexec"].join(","),w=(yield f.h.getActions(t,y)).actions;e("setRexActions",w)}))},sendAction({state:e,dispatch:t},{account:n,data:o,name:r,actor:a,permission:i}){var s,c,u;return O(this,void 0,void 0,(function*(){const d=[{account:null!==(s=n)&&void 0!==s?s:e.abi.account_name,name:r,authorization:[{actor:null!==(c=a)&&void 0!==c?c:e.accountName,permission:null!==(u=i)&&void 0!==u?u:e.accountPermission}],data:o}];return t("sendTransaction",d)}))},sendTransaction({commit:e,state:t},n){return O(this,void 0,void 0,(function*(){let o=null;try{o=yield t.user.signTransaction({actions:n},{blocksBehind:3,expireSeconds:180}),e("setTransaction",o.transactionId)}catch(r){N.error(r),e("setTransactionError",r)}return o}))},stakeRex({commit:e,dispatch:t,state:n},{amount:o}){return O(this,void 0,void 0,(function*(){let r=null;const a=(0,v.xG)(o,4,L,!0),i=[{account:"eosio",name:"deposit",authorization:[{actor:n.accountName,permission:n.accountPermission}],data:{owner:n.accountName,amount:a}},{account:"eosio",name:"buyrex",authorization:[{actor:n.accountName,permission:n.accountPermission}],data:{from:n.accountName,amount:a}}];try{r=yield n.user.signTransaction({actions:i},{blocksBehind:3,expireSeconds:180}),e("setTransaction",r.transactionId),t("loadAccountData"),t("updateRexData",{account:n.accountName})}catch(s){e("setTransactionError",s)}}))},unstakeRex({commit:e,dispatch:t,state:n},{amount:o}){return O(this,void 0,void 0,(function*(){let r=null;const a=n.rexbal.rex_balance?Number(n.rexbal.rex_balance.split(" ")[0]):0;if(0===a)return;const i=(0,v.xG)(o,4,L,!0),s=(0,v.xG)(+o/n.tlosRexRatio,4,null,!0),c=[{account:"eosio",name:"sellrex",authorization:[{actor:n.accountName,permission:n.accountPermission}],data:{from:n.accountName,rex:`${s} REX`}},{account:"eosio",name:"withdraw",authorization:[{actor:n.accountName,permission:n.accountPermission}],data:{owner:n.accountName,amount:i}}];try{r=yield n.user.signTransaction({actions:c},{blocksBehind:3,expireSeconds:180}),e("setTransaction",r.transactionId),t("loadAccountData"),t("updateRexData",{account:n.accountName})}catch(u){e("setTransactionError",u)}}))},unstakeRexFund({commit:e,state:t},{amount:n}){return O(this,void 0,void 0,(function*(){let o=null;const r=(0,v.xG)(n,4,L,!0),a=[{account:"eosio",name:"withdraw",authorization:[{actor:t.accountName,permission:t.accountPermission}],data:{owner:t.accountName,amount:r}}];try{o=yield t.user.signTransaction({actions:a},{blocksBehind:3,expireSeconds:180}),e("setTransaction",o.transactionId)}catch(i){e("setTransactionError",i)}}))},stakeCpuNetRex({commit:e,dispatch:t,state:n},{cpuAmount:o,netAmount:r}){return O(this,void 0,void 0,(function*(){let a=null;const i=(0,v.xG)(o,4,L,!0),s=(0,v.xG)(r,4,L,!0),c=[{account:"eosio",name:"unstaketorex",authorization:[{actor:n.accountName,permission:n.accountPermission}],data:{owner:n.accountName,receiver:n.accountName,from_net:s,from_cpu:i}}];try{a=yield n.user.signTransaction({actions:c},{blocksBehind:3,expireSeconds:180}),e("setTransaction",a.transactionId),t("loadAccountData"),t("updateRexData",{account:n.accountName})}catch(u){e("setTransactionError",u)}}))},unstakeCpuNetRex({commit:e,dispatch:t,state:n},{cpuAmount:o,netAmount:r}){return O(this,void 0,void 0,(function*(){let a=null;const i=(0,v.xG)(o,4,L,!0),s=(0,v.xG)(r,4,L,!0),c=[{account:"eosio",name:"stakefromrex",authorization:[{actor:n.accountName,permission:n.accountPermission}],data:{owner:n.accountName,receiver:n.accountName,from_net:s,from_cpu:i}}];try{a=yield n.user.signTransaction({actions:c},{blocksBehind:3,expireSeconds:180}),e("setTransaction",a.transactionId),t("loadAccountData"),t("updateRexData",{account:n.accountName})}catch(u){e("setTransactionError",u)}}))},resetTransaction({commit:e}){e("setTransaction",""),e("setTransactionError","")},updateABI({commit:e},t){return O(this,void 0,void 0,(function*(){const n=yield f.h.getABI(t);e("setABI",n)}))},sendVoteTransaction({commit:e,state:t}){return O(this,void 0,void 0,(function*(){let n=null;const o=[{account:"eosio",name:"voteproducer",authorization:[{actor:t.accountName,permission:t.accountPermission}],data:{voter:t.accountName,proxy:"",producers:t.vote}}];try{n=yield t.user.signTransaction({actions:o},{blocksBehind:3,expireSeconds:180}),e("setTransaction",n.transactionId)}catch(r){e("setTransactionError",r)}}))},buyRam({commit:e,dispatch:t,state:n},{amount:o,receivingAccount:r}){return O(this,void 0,void 0,(function*(){let a=null;const i=[{account:"eosio",name:"buyram",authorization:[{actor:n.accountName,permission:n.accountPermission}],data:{payer:n.accountName,receiver:r,quant:o}}];try{a=yield n.user.signTransaction({actions:i},{blocksBehind:3,expireSeconds:180}),e("setTransaction",a.transactionId),t("loadAccountData")}catch(s){e("setTransactionError",s)}}))},buyRamBytes({commit:e,dispatch:t,state:n},{amount:o,receivingAccount:r}){return O(this,void 0,void 0,(function*(){let a=null;const i=[{account:"eosio",name:"buyrambytes",authorization:[{actor:n.accountName,permission:n.accountPermission}],data:{payer:n.accountName,receiver:r,bytes:o}}];try{a=yield n.user.signTransaction({actions:i},{blocksBehind:3,expireSeconds:180}),e("setTransaction",a.transactionId),t("loadAccountData")}catch(s){e("setTransactionError",s)}}))},sellRam({commit:e,dispatch:t,state:n},{amount:o}){return O(this,void 0,void 0,(function*(){let r=null;const a=[{account:"eosio",name:"sellram",authorization:[{actor:n.accountName,permission:n.accountPermission}],data:{account:n.accountName,bytes:o}}];try{r=yield n.user.signTransaction({actions:a},{blocksBehind:3,expireSeconds:180}),e("setTransaction",r.transactionId),t("loadAccountData")}catch(i){e("setTransactionError",i)}}))},moveToSavings({commit:e,dispatch:t,state:n},{amount:o}){return O(this,void 0,void 0,(function*(){let r=null;const a=(0,v.xG)(+o/n.tlosRexRatio,4,"REX",!0),i=[{account:"eosio",name:"mvtosavings",authorization:[{actor:n.accountName,permission:n.accountPermission}],data:{owner:n.accountName,rex:a}}];try{r=yield n.user.signTransaction({actions:i},{blocksBehind:3,expireSeconds:180}),e("setTransaction",r.transactionId),t("loadAccountData"),t("updateRexData",{account:n.accountName})}catch(s){e("setTransactionError",s)}}))},moveFromSavings({commit:e,dispatch:t,state:n},{amount:o}){return O(this,void 0,void 0,(function*(){let r=null;const a=(0,v.xG)(+o/n.tlosRexRatio,4,"REX",!0),i=[{account:"eosio",name:"mvfrsavings",authorization:[{actor:n.accountName,permission:n.accountPermission}],data:{owner:n.accountName,rex:a}}];try{r=yield n.user.signTransaction({actions:i},{blocksBehind:3,expireSeconds:180}),e("setTransaction",r.transactionId),t("loadAccountData"),t("updateRexData",{account:n.accountName})}catch(s){e("setTransactionError",s)}}))}},B={namespaced:!0,getters:A,mutations:I,actions:D,state:_};function j(){return{transaction:{},transactionId:"",blockNum:0,timestamp:"",executed:!1,cpuUsage:0,netUsage:0,actionCount:0,irreversable:!1,actions:[],transactionFound:!0}}var z=function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(t){a(t)}}function s(e){try{c(o["throw"](e))}catch(t){a(t)}}function c(e){e.done?n(e.value):r(e.value).then(i,s)}c((o=o.apply(e,t||[])).next())}))};const $={updateTransaction({commit:e,state:t}){return z(this,void 0,void 0,(function*(){const n=yield f.h.getTransaction(t.transactionId);n?e("setTransaction",n):e("setTransactionFound",!1)}))},updateTransactionId({commit:e},t){e("setTransactionId",t)}},U={getTransaction({transaction:e}){return e},getTransactionId({transactionId:e}){return e}},q={setTransaction(e,t){if(t&&t.actions&&t.actions.length>0){e.transaction=t,e.executed=t.executed||!1;const n=t.actions[0];e.blockNum=n.block_num,e.timestamp=n.timestamp,e.cpuUsage=n.cpu_usage_us,e.netUsage=8*n.net_usage_words,e.actionCount=t.actions.length,e.irreversable=t.lib>n.block_num,e.actions=t.actions,e.transactionFound=!0}else e.transactionFound=!1},setTransactionId(e,t){e.transactionId=t},setTimestamp(e,t){e.timestamp=t},setBlockNum(e,t){e.blockNum=t},setExecuted(e,t){e.executed=t},setCpuUsage(e,t){e.cpuUsage=t},setNetUsage(e,t){e.netUsage=t},setActionCount(e,t){e.actionCount=t},setIrreversable(e,t){e.irreversable=t},setTransactionFounde(e,t){e.transactionFound=t}},G={namespaced:!0,actions:$,getters:U,mutations:q,state:j};function M(){return{currentAccount:"",toOthers:[],toOthersAggregated:0,fromOthers:null,selfStaked:null,loading:[],forceUpdate:!1}}const Z={getDelegatedToOthers(e){var t;return null!==(t=e.toOthers)&&void 0!==t?t:[]},getDelegatedToOthersAggregated(e){var t;return null!==(t=e.toOthersAggregated)&&void 0!==t?t:0},getDelegatedFromOthers(e){return e.fromOthers},getSelfStaked(e){return e.selfStaked},getLoading(e){return e.loading},isLoading(e){return t=>e.loading.includes(t)}},H={setCurrentAccount(e,t){e.currentAccount=t},setDelegatedFromOthers(e,t){e.fromOthers=t},setDelegatedToOthers(e,t){e.toOthers=t},setDelegatedToOthersAggregated(e,t){e.toOthersAggregated=t},setSelfStaked(e,t){e.selfStaked=t},setLoading(e,t){e.loading.includes(t)||e.loading.push(t)},unsetLoading(e,t){e.loading=e.loading.filter((e=>e!==t))},setForceUpdate(e,t){e.forceUpdate=t}};var V=n(17779),J=function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(t){a(t)}}function s(e){try{c(o["throw"](e))}catch(t){a(t)}}function c(e){e.done?n(e.value):r(e.value).then(i,s)}c((o=o.apply(e,t||[])).next())}))};const Y=(0,b.z)(),K=Y.getSystemToken().symbol,W=Y.getSystemToken().precision,X={updateResources(e,{account:t,force:n}){var o;return J(this,void 0,void 0,(function*(){const r=null!==(o=t)&&void 0!==o?o:e.rootState.account.accountName;try{e.commit("setLoading","updateResources"),e.commit("setForceUpdate",n),e.state.currentAccount===r&&e.rootState.account.data&&!n||(yield Promise.all([e.dispatch("updateSelfStaked",r),e.dispatch("updateDelegatedToOthers",r)]),e.commit("setCurrentAccount",r))}catch(a){V.error("Error:",a)}finally{e.commit("setForceUpdate",!1),e.commit("unsetLoading","updateResources")}}))},updateSelfStaked(e,t){var n,o,r,a,i,s,c,u,d,l;return J(this,void 0,void 0,(function*(){try{e.commit("setLoading","updateSelfStaked"),(e.state.currentAccount!==t||(null===(n=e.state.selfStaked)||void 0===n?void 0:n.from)!==t||(null===(o=e.state.selfStaked)||void 0===o?void 0:o.to)!==t||e.state.forceUpdate)&&(yield e.dispatch("account/loadAccountData",t,{root:!0}));const g=e.rootState.account.data,p=Number(null!==(a=null===(r=g.self_delegated_bandwidth)||void 0===r?void 0:r.net_weight.value)&&void 0!==a?a:0),h=Number(null!==(s=null===(i=g.self_delegated_bandwidth)||void 0===i?void 0:i.cpu_weight.value)&&void 0!==s?s:0),m=(0,v.xG)(p,W,K,!0),f=(0,v.xG)(h,W,K,!0),b={from:t,to:t,net_weight:m,cpu_weight:f},y=Number(null!==(u=null===(c=g.net_weight)||void 0===c?void 0:c.value)&&void 0!==u?u:0)/Math.pow(10,W),w=Number(null!==(l=null===(d=g.cpu_weight)||void 0===d?void 0:d.value)&&void 0!==l?l:0)/Math.pow(10,W),k=y-p,P=w-h,x=(0,v.xG)(k,W,K,!0),C=(0,v.xG)(P,W,K,!0),S={from:"not-available",to:t,net_weight:x,cpu_weight:C};e.commit("setDelegatedFromOthers",S),e.commit("setSelfStaked",b)}catch(g){V.error("Error:",g)}finally{e.commit("unsetLoading","updateSelfStaked")}}))},updateDelegatedToOthers({commit:e},t){return J(this,void 0,void 0,(function*(){try{e("setLoading","updateDelegatedToOthers");const n={code:"eosio",limit:"200",scope:t,table:"delband"},o=(yield f.h.getTableRows(n)).rows,r=o.filter((e=>e.to!==t)),a=r.reduce(((e,t)=>e+parseFloat(t.net_weight)),0),i=r.reduce(((e,t)=>e+parseFloat(t.cpu_weight)),0),s=i+a;e("setCurrentAccount",t),e("setDelegatedToOthers",o),e("setDelegatedToOthersAggregated",s)}catch(n){V.error("Error:",n)}finally{e("unsetLoading","updateDelegatedToOthers")}}))},delegateResources({commit:e,dispatch:t},n){return J(this,void 0,void 0,(function*(){const{from:o,to:r,net_weight:a,cpu_weight:i}=n;try{e("setLoading","delegateResources");const n=Number(null!==a&&void 0!==a?a:"0")+Number(null!==i&&void 0!==i?i:"0"),s=[{account:"eosio",name:"delegatebw",authorization:[{actor:o,permission:this.state.account.accountPermission}],data:{from:o,receiver:r,stake_net_quantity:a,stake_cpu_quantity:i,transfer:!1,amount:n}}];yield t("account/sendTransaction",s,{root:!0}),yield t("updateResources",{account:o,force:!0})}catch(s){e("setTransactionError",s)}finally{e("unsetLoading","delegateResources")}}))},undelegateResources({commit:e,dispatch:t},n){return J(this,void 0,void 0,(function*(){const{from:o,to:r,net_weight:a,cpu_weight:i}=n;try{e("setLoading","undelegateResources");const n=[{account:"eosio",name:"undelegatebw",authorization:[{actor:o,permission:"active"}],data:{from:o,receiver:r,unstake_net_quantity:a,unstake_cpu_quantity:i}}];yield t("account/sendTransaction",n,{root:!0}),yield t("updateResources",{account:o,force:!0})}catch(s){V.error("Error",s)}finally{e("unsetLoading","undelegateResources")}}))},resetResources({commit:e}){e("setDelegatedFromOthers",null),e("setDelegatedToOthers",[]),e("setSelfStaked",null)}},Q={namespaced:!0,actions:X,getters:Z,mutations:H,state:M},ee=Symbol("vuex-key"),te=(0,o.h)((function(){const e=(0,r.MT)({modules:{contract:d,chain:x,account:B,transaction:G,resources:Q},strict:!1});return e}));function ne(){return(0,r.oR)(ee)}},90347:(e,t,n)=>{"use strict";n.d(t,{Kf:()=>r,RJ:()=>a,p6:()=>u,pw:()=>c,sA:()=>s,vE:()=>d,xG:()=>i});var o=n(30229);function r(e){const t=/(^[a-z1-5.]{1,11}[a-z1-5]$)|(^[a-z1-5.]{12}[a-z1-5]$)/;return null!==t.exec(e)}function a(e){const t=/^([0-9A-Fa-f]){64}$/g;return null!==t.exec(e)}function i(e,t,n,o){const r=/^-?(0|[1-9]\d*)(\.\d+)?$/,a=("number"===typeof e||r.test(e))&&!Number.isNaN(e);if(!a)throw`${e} is not a valid number`;let i="number"===typeof e?e.toString():e;return i=(+i).toFixed(t),o||(i=(()=>{const[e,t]=i.split(".");return`${(+e).toLocaleString("en")}.${t}`})()),0!==+i||o||(i="0"),n&&(i+=` ${n}`),i}function s(e){try{const t=e.split(" ")[0];return parseFloat(t.replace(/,/g,""))}catch(t){return 0}}function c(e){return new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:20}).format(e)}function u(e,t=!0){return t?new Date(e).toLocaleDateString("en-US",{month:"long",year:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}):new Date(e).toLocaleDateString("en-US",{month:"long",year:"numeric",day:"numeric"})}function d(e){if(e.rex)return e.rex;if("number"===typeof e.amount){const t=(0,o.z)().getSystemToken().symbol;return`${e.amount} ${t}`}return e.amount}},46601:()=>{},89214:()=>{}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={id:o,loaded:!1,exports:{}};return e[o].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.m=e,(()=>{var e=[];n.O=(t,o,r,a)=>{if(!o){var i=1/0;for(d=0;d=a)&&Object.keys(n.O).every((e=>n.O[e](o[c])))?o.splice(c--,1):(s=!1,a0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[o,r,a]}})(),(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(()=>{n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,o)=>(n.f[o](e,t),t)),[]))})(),(()=>{n.u=e=>"js/"+(64===e?"chunk-common":e)+"."+{64:"1609122f",247:"559216c1",258:"f95eac38",371:"006261cc",397:"4a37addf",475:"fd8562d4",710:"12fc11cd",753:"cf805fe1",793:"76d1f2fe",827:"e1c79409",862:"56c8f538",895:"2c5dce85",909:"862a4d97",985:"7244d31c",987:"b11029f4"}[e]+".js"})(),(()=>{n.miniCssF=e=>"css/"+({143:"app",736:"vendor"}[e]||e)+"."+{143:"31a7ead1",247:"af991343",258:"e21a34b0",371:"6e916095",397:"f4fe581c",475:"1628da7f",710:"209f1d33",736:"b507aab4",753:"a6e0aae4",827:"efd4746e",862:"21cd96e3",895:"46fa1f18",985:"b268a873"}[e]+".css"})(),(()=>{n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e={},t="open-block-explorer:";n.l=(o,r,a,i)=>{if(e[o])e[o].push(r);else{var s,c;if(void 0!==a)for(var u=document.getElementsByTagName("script"),d=0;d{s.onerror=s.onload=null,clearTimeout(p);var r=e[o];if(delete e[o],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach((e=>e(n))),t)return t(n)},p=setTimeout(g.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=g.bind(null,s.onerror),s.onload=g.bind(null,s.onload),c&&document.head.appendChild(s)}}})(),(()=>{n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e)})(),(()=>{n.p="/"})(),(()=>{var e=(e,t,n,o)=>{var r=document.createElement("link");r.rel="stylesheet",r.type="text/css";var a=a=>{if(r.onerror=r.onload=null,"load"===a.type)n();else{var i=a&&("load"===a.type?"missing":a.type),s=a&&a.target&&a.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");c.code="CSS_CHUNK_LOAD_FAILED",c.type=i,c.request=s,r.parentNode.removeChild(r),o(c)}};return r.onerror=r.onload=a,r.href=t,document.head.appendChild(r),r},t=(e,t)=>{for(var n=document.getElementsByTagName("link"),o=0;onew Promise(((r,a)=>{var i=n.miniCssF(o),s=n.p+i;if(t(i,s))return r();e(o,s,r,a)})),r={143:0};n.f.miniCss=(e,t)=>{var n={247:1,258:1,371:1,397:1,475:1,710:1,753:1,827:1,862:1,895:1,985:1};r[e]?t.push(r[e]):0!==r[e]&&n[e]&&t.push(r[e]=o(e).then((()=>{r[e]=0}),(t=>{throw delete r[e],t})))}})(),(()=>{var e={143:0};n.f.j=(t,o)=>{var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)o.push(r[2]);else{var a=new Promise(((n,o)=>r=e[t]=[n,o]));o.push(r[2]=a);var i=n.p+n.u(t),s=new Error,c=o=>{if(n.o(e,t)&&(r=e[t],0!==r&&(e[t]=void 0),r)){var a=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",s.name="ChunkLoadError",s.type=a,s.request=i,r[1](s)}};n.l(i,c,"chunk-"+t,t)}},n.O.j=t=>0===e[t];var t=(t,o)=>{var r,a,[i,s,c]=o,u=0;if(i.some((t=>0!==e[t]))){for(r in s)n.o(s,r)&&(n.m[r]=s[r]);if(c)var d=c(n)}for(t&&t(o);un(20623)));o=n.O(o)})(); \ No newline at end of file diff --git a/dist/spa/js/chunk-common.1609122f.js b/dist/spa/js/chunk-common.1609122f.js new file mode 100644 index 0000000..30536a8 --- /dev/null +++ b/dist/spa/js/chunk-common.1609122f.js @@ -0,0 +1 @@ +(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[64],{13385:(e,t,a)=>{"use strict";a.d(t,{p:()=>n});var o=a(78504);function n(){const e=(0,o.useStore)(),t=e.state,a=e.getters;return{resources:{getDelegatedToOthers:()=>a["resources/getDelegatedToOthers"],getDelegatedFromOthers:()=>a["resources/getDelegatedFromOthers"],getSelfStaked:()=>a["resources/getSelfStaked"],getDelegatedToOthersAggregated:()=>a["resources/getDelegatedToOthersAggregated"],getLoading:()=>a["resources/getLoading"],isLoading:e=>a["resources/isLoading"](e),updateResources:t=>e.dispatch("resources/updateResources",t),updateSelfStaked:t=>e.dispatch("resources/updateSelfStaked",t),updateDelegatedToOthers:t=>e.dispatch("resources/updateDelegatedToOthers",t),delegateResources:t=>e.dispatch("resources/delegateResources",t),undelegateResources:t=>e.dispatch("resources/undelegateResources",t)},state:t,dispatch:(t,a,o)=>e.dispatch(t,a,o),commit:(t,a,o)=>e.commit(t,a,o)}}},71130:(e,t,a)=>{"use strict";function o(e=1e3){return new Promise((t=>setTimeout(t,e)))}a.d(t,{D:()=>n,_:()=>o});const n=(e,t)=>{let a;return(...o)=>{clearTimeout(a),a=setTimeout((()=>{e(...o)}),t)}}},52783:(e,t,a)=>{"use strict";a.d(t,{Z:()=>_});var o=a(59835),n=a(61957),l=a(86970);const s=(0,o.Uk)("Searching...");function i(e,t,a,i,r,c){const u=(0,o.up)("q-icon"),d=(0,o.up)("q-item-label"),p=(0,o.up)("q-item-section"),m=(0,o.up)("q-item"),g=(0,o.up)("q-select");return(0,o.wg)(),(0,o.j4)(g,{borderless:"",dense:"",filled:"","use-input":"","hide-selected":"","fill-input":"","hide-bottom-space":"",placeholder:"name",loading:e.isLoading,"model-value":e.inputValue,options:e.options,"option-disable":e=>e.isHeader,"reactive-rules":e.withValidation,rules:e.withValidation?[e=>!!e||"Field is required",t=>e.isLoading||1===e.options.filter((e=>e.label===t)).length||"Field invalid"]:[],error:e.withValidation&&e.isError,onInputValue:t[0]||(t[0]=t=>e.inputValue=t),onKeyup:(0,n.D2)(e.handleSelected,["enter"])},(0,o.Nv)({"no-option":(0,o.w5)((()=>[(0,o.Wm)(m,null,{default:(0,o.w5)((()=>[(0,o.Wm)(p,{class:"text-center"},{default:(0,o.w5)((()=>[e.isLoading?((0,o.wg)(),(0,o.j4)(d,{key:0},{default:(0,o.w5)((()=>[s])),_:1})):((0,o.wg)(),(0,o.j4)(d,{key:1},{default:(0,o.w5)((()=>[(0,o.Uk)((0,l.zw)(e.inputValue?"Nothing found":"Search for an account name"),1)])),_:1}))])),_:1})])),_:1})])),option:(0,o.w5)((t=>[t.opt.isHeader?((0,o.wg)(),(0,o.j4)(d,{key:0,header:""},{default:(0,o.w5)((()=>[(0,o.Uk)((0,l.zw)(t.opt.label),1)])),_:2},1024)):((0,o.wg)(),(0,o.j4)(m,(0,o.dG)({key:1},t.itemProps,{exact:"exact",clickable:"clickable",onClick:a=>e.handleSelected(t.opt.to)}),{default:(0,o.w5)((()=>[(0,o.Wm)(p,null,{default:(0,o.w5)((()=>[(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,l.zw)(t.opt.label),1)])),_:2},1024)])),_:2},1024)])),_:2},1040,["onClick"]))])),_:2},[e.removeSearchIcon?void 0:{name:"prepend",fn:(0,o.w5)((()=>[(0,o.Wm)(u,{class:"rotate-90",name:"search",size:"20px"})]))}]),1032,["loading","model-value","options","option-disable","reactive-rules","rules","error","onKeyup"])}var r=a(60499),c=a(21889),u=a(19302),d=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{r(o.next(e))}catch(t){l(t)}}function i(e){try{r(o["throw"](e))}catch(t){l(t)}}function r(e){e.done?a(e.value):n(e.value).then(s,i)}r((o=o.apply(e,t||[])).next())}))};const p=(0,o.aZ)({name:"AccountSearch",props:{modelValue:{type:String},withValidation:{type:Boolean,default:!1},removeSearchIcon:{type:Boolean,default:!1},emitUpdateOnInput:{type:Boolean,default:!1}},emits:["update:modelValue","remove"],setup(e,t){const a=(0,u.Z)(),n=(0,r.iH)([]),l=(0,r.iH)(!1),s=(0,r.iH)(!1),i=(0,r.iH)("");(0,o.YP)(i,(()=>d(this,void 0,void 0,(function*(){if(""===i.value)return void(n.value=[]);l.value=!0,s.value=!1;const e=i.value.toLowerCase(),t=yield m(e);n.value=[...t],l.value=!1})))),(0,o.YP)(e,(e=>d(this,void 0,void 0,(function*(){e.modelValue&&(i.value=e.modelValue,yield g(e.modelValue))})))),(0,o.bv)((()=>d(this,void 0,void 0,(function*(){e.modelValue&&(i.value=e.modelValue,yield g(e.modelValue))}))));const p=setTimeout((()=>0),0);function m(e){return clearTimeout(p),new Promise((t=>{setTimeout((()=>d(this,void 0,void 0,(function*(){const a=yield g(e);i.value===e&&t(a)}))),500)}))}function g(e){return d(this,void 0,void 0,(function*(){try{const t=[],a=yield c.h.getAccountByScope(v(e).toString());return a?t.push({label:v(e),to:v(e),isHeader:!1}):s.value=!0,t}catch(t){return void(s.value=!0)}}))}function v(e){return e.replace(/^[\s.]+|[\s.]+$/g,"")}function w(e){return d(this,void 0,void 0,(function*(){if(i.value){if("string"===typeof e)return i.value=e,void t.emit("update:modelValue",i.value);try{return yield c.h.getAccount(i.value.toLowerCase()),void t.emit("update:modelValue",i.value)}catch(o){a.notify(`account ${i.value} not found!`)}}}))}return{inputValue:i,options:n,isLoading:l,isError:s,handleSelected:w}}});var m=a(11639),g=a(32259),v=a(22857),w=a(490),f=a(76749),y=a(33115),h=a(69984),b=a.n(h);const j=(0,m.Z)(p,[["render",i]]),_=j;b()(p,"components",{QSelect:g.Z,QIcon:v.Z,QItem:w.Z,QItemSection:f.Z,QItemLabel:y.Z})},54397:(e,t,a)=>{"use strict";a.d(t,{Z:()=>z});var o=a(59835),n=a(86970);const l=e=>((0,o.dD)("data-v-6fab27e1"),e=e(),(0,o.Cn)(),e),s={key:0,class:"section-title"},i=["src"],r={class:"q-pl-md"},c={key:2,class:"section-title"},u={class:"testnet-logo-container"},d=["src"],p=l((()=>(0,o._)("div",{class:"testnet-text"},"TESTNET",-1))),m={class:"q-pl-md"};function g(e,t,a,l,g,v){const w=(0,o.up)("q-item-section"),f=(0,o.up)("q-item"),y=(0,o.up)("q-separator"),h=(0,o.up)("q-list"),b=(0,o.Q2)("ripple");return(0,o.wg)(),(0,o.j4)(h,null,{default:(0,o.w5)((()=>[e.mainnets.length>0?((0,o.wg)(),(0,o.iD)("div",s,"MAINNETS")):(0,o.kq)("",!0),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.mainnets,((t,a)=>(0,o.wy)(((0,o.wg)(),(0,o.j4)(f,{key:`mainnet-${a}`,class:(0,n.C_)({selected:e.isChainSelected(t)}),clickable:"",onClick:a=>e.chainSelected(t)},{default:(0,o.w5)((()=>[(0,o._)("img",{class:"sidebar-logo",src:t.getSmallLogoPath()},null,8,i),(0,o.Wm)(w,null,{default:(0,o.w5)((()=>[(0,o._)("div",r,(0,n.zw)(t.getDisplay()),1)])),_:2},1024)])),_:2},1032,["class","onClick"])),[[b]]))),128)),e.testnets.length>0&&e.mainnets.length>0?((0,o.wg)(),(0,o.j4)(y,{key:1,class:"separator"})):(0,o.kq)("",!0),e.testnets.length>0?((0,o.wg)(),(0,o.iD)("div",c,"TESTNETS")):(0,o.kq)("",!0),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.testnets,((t,a)=>(0,o.wy)(((0,o.wg)(),(0,o.j4)(f,{key:`testnet-${a}`,class:(0,n.C_)({selected:e.isChainSelected(t)}),clickable:"",onClick:a=>e.chainSelected(t)},{default:(0,o.w5)((()=>[(0,o._)("div",u,[(0,o._)("img",{class:"sidebar-logo sidebar-logo--testnet",src:t.getSmallLogoPath()},null,8,d),p]),(0,o.Wm)(w,null,{default:(0,o.w5)((()=>[(0,o._)("div",m,(0,n.zw)(t.getDisplay()),1)])),_:2},1024)])),_:2},1032,["class","onClick"])),[[b]]))),128))])),_:1})}var v=a(30229),w=a(18910);const f=v.Z.get(),y=(0,o.aZ)({name:"ChainsSelector",props:{onChainSelected:{type:Function,required:!1},isChainSelected:{type:Function,required:!1,default:()=>!1}},setup(e){const t=(0,w.yj)(),a=(0,w.tv)(),n=(0,o.Fl)((()=>s(f.getMainnets()))),l=(0,o.Fl)((()=>s(f.getTestnets())));function s(e){return e.sort(((e,t)=>e.getName().localeCompare(t.getName())))}function i(o){e.isChainSelected(o)||(a.push({path:t.path,query:{network:o.getName()}}),e.onChainSelected(o))}return{mainnets:n,testnets:l,chainSelected:i}}});var h=a(11639),b=a(13246),j=a(490),_=a(76749),k=a(50926),D=a(77741),x=a(51722),S=a(69984),q=a.n(S);const P=(0,h.Z)(y,[["render",g],["__scopeId","data-v-6fab27e1"]]),z=P;q()(y,"components",{QList:b.Z,QItem:j.Z,QItemSection:_.Z,QSeparator:k.Z,QColor:D.Z}),q()(y,"directives",{Ripple:x.Z})},97114:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var o=a(59835),n=a(86970);const l={class:"no-wrap"};function s(e,t,a,s,i,r){const c=(0,o.up)("q-tooltip");return(0,o.wg)(),(0,o.iD)("div",l,[(0,o.Uk)((0,n.zw)(e.friendlyDate)+" ",1),(0,o.Wm)(c,{anchor:"top middle",self:"bottom middle",offset:[10,10]},{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(e.tooltipDate),1)])),_:1})])}var i=a(43878);const r=(0,o.aZ)({name:"DateField",props:{timestamp:{type:String,default:""},showAge:{type:Boolean,default:!0}},setup(e){const t=(0,o.Fl)((()=>{const t=i.utc(e.timestamp,"YYYY-MM-DD HH:mm:ssZ");return e.showAge?t.fromNow():`${t.local().format("YYYY-MM-DD HH:mm:ss")}`})),a=(0,o.Fl)((()=>{const t=i.utc(e.timestamp,"YYYY-MM-DD HH:mm:ssZ");return e.showAge?`${t.local().format("YYYY-MM-DD HH:mm:ss")}`:t.fromNow()}));return{friendlyDate:t,tooltipDate:a}}});var c=a(11639),u=a(46858),d=a(69984),p=a.n(d);const m=(0,c.Z)(r,[["render",s]]),g=m;p()(r,"components",{QTooltip:u.Z})},59311:(e,t,a)=>{"use strict";a.d(t,{Z:()=>Le});var o=a(59835),n=a(86970),l=a(61957);const s={class:"row col-12 q-mt-xs justify-center text-left trx-table container-max-width"},i={class:"row trx-table--main-container"},r={class:"row col-12 q-mt-lg"},c={class:"col-auto q-mr-xl justify-start trx-table--topleft-col"},u={class:"row flex-grow-1"},d={class:"col"},p={class:"trx-table--title"},m={class:"row"},g={class:"col"},v={key:0,class:"row"},w={class:"col"},f={key:0,class:"col trx-table--topright-col"},y={class:"row justify-end q-mb-xl"},h={class:"col-auto row flex trx-table--filter-buttons"},b=(0,o._)("span",{class:"q-pr-sm"},"clear filters",-1),j={class:"q-pa-md dropdown-filter"},_={class:"row"},k={class:"q-pa-md dropdown-filter"},D={class:"row"},x=(0,o.Uk)("OK"),S={class:"q-pa-md dropdown-filter"},q={class:"row"},P={class:"row items-center justify-end"},z={class:"row items-center justify-end"},Z={class:"row justify-center full-width q-py-xs"},M={class:"row"},T={class:"row items-center justify-end"},W={class:"row items-center justify-end"},C={class:"q-pa-md dropdown-filter"},A={class:"row"},I={key:0,class:"row justify-end"},H={class:"row col-12 table-container"},V={class:"col-auto"},N={class:"q-pt-xs"},O={class:"row justify-left text-weight-light"},F={class:"row col-12 items-center justify-end q-mt-md q-mb-sm"},Q={class:"col-auto"},L={class:"col-auto"},Y=(0,o.Uk)(" First "),U=(0,o.Uk)(" Last ");function E(e,t,a,E,B,R){const $=(0,o.up)("q-toggle"),K=(0,o.up)("q-btn"),G=(0,o.up)("AccountSearch"),J=(0,o.up)("q-btn-dropdown"),X=(0,o.up)("q-icon"),ee=(0,o.up)("q-input"),te=(0,o.up)("q-date"),ae=(0,o.up)("q-popup-proxy"),oe=(0,o.up)("q-time"),ne=(0,o.up)("TokenSearch"),le=(0,o.up)("q-separator"),se=(0,o.up)("q-th"),ie=(0,o.up)("q-tr"),re=(0,o.up)("AccountFormat"),ce=(0,o.up)("q-td"),ue=(0,o.up)("DateField"),de=(0,o.up)("ActionFormat"),pe=(0,o.up)("DataFormat"),me=(0,o.up)("q-table"),ge=(0,o.up)("q-item-section"),ve=(0,o.up)("q-item"),we=(0,o.up)("q-list"),fe=(0,o.up)("q-space"),ye=(0,o.Q2)("close-popup");return(0,o.wg)(),(0,o.iD)("div",s,[(0,o._)("div",i,[(0,o._)("div",r,[(0,o._)("div",c,[(0,o._)("div",u,[(0,o._)("div",d,[(0,o._)("p",p,(0,n.zw)(e.tableTitle),1)])]),(0,o._)("div",m,[(0,o._)("div",g,[(0,o.Wm)($,{modelValue:e.showAge,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showAge=t),"left-label":"",label:"Show timestamp as relative"},null,8,["modelValue"])])]),e.toggleEnabled?((0,o.wg)(),(0,o.iD)("div",v,[(0,o._)("div",w,[(0,o.Wm)($,{modelValue:e.enableLiveTransactions,"onUpdate:modelValue":t[1]||(t[1]=t=>e.enableLiveTransactions=t),"left-label":"",label:"Live transactions",disable:1!==e.paginationSettings.page},null,8,["modelValue","disable"])])])):(0,o.kq)("",!0)]),e.filtersEnabled?((0,o.wg)(),(0,o.iD)("div",f,[(0,o._)("div",y,[(0,o._)("div",h,[""!==e.filter?((0,o.wg)(),(0,o.j4)(K,{key:0,dense:"",flat:"",round:"",icon:"close",color:"primary",onClick:e.clearFilters},{default:(0,o.w5)((()=>[b])),_:1},8,["onClick"])):(0,o.kq)("",!0),e.showAccountFilter?((0,o.wg)(),(0,o.j4)(J,{key:1,ref:"accounts_dropdown",class:"q-ml-xs q-mr-xs button-primary q-btn--no-text-transform","no-caps":"",color:""===e.accountsDisplay?"primary":"secondary",label:""===e.accountsDisplay?"Accounts":e.accountsDisplay,onClick:t[4]||(t[4]=t=>e.accountsModel="")},{default:(0,o.w5)((()=>[(0,o._)("div",j,[(0,o._)("div",_,[(0,o.Wm)(G,{modelValue:e.accountsModel,"onUpdate:modelValue":[t[2]||(t[2]=t=>e.accountsModel=t),t[3]||(t[3]=t=>e.toggleDropdown(e.$refs.accounts_dropdown))]},null,8,["modelValue"])])])])),_:1},8,["color","label"])):(0,o.kq)("",!0),(0,o.Wm)(J,{ref:"actions_dropdown",class:"q-ml-xs q-mr-xs button-primary q-btn--no-text-transform",color:""===e.actionsDisplay?"primary":"secondary",label:""===e.actionsDisplay?"Actions":e.actionsDisplay},{default:(0,o.w5)((()=>[(0,o._)("div",k,[(0,o._)("div",D,[(0,o.Wm)(ee,{modelValue:e.auxModel,"onUpdate:modelValue":t[6]||(t[6]=t=>e.auxModel=t),filled:"",dense:"",label:"actions",placeholder:"transfer, sellrex, etc.",onBlur:t[7]||(t[7]=t=>{e.actionsModel=e.auxModel,e.toggleDropdown(e.$refs.actions_dropdown)}),onKeyup:t[8]||(t[8]=(0,l.D2)((t=>{e.actionsModel=e.auxModel,e.toggleDropdown(e.$refs.actions_dropdown)}),["enter"]))},{prepend:(0,o.w5)((()=>[(0,o.Wm)(X,{class:"cursor-pointer",name:"search"})])),append:(0,o.w5)((()=>[(0,o.Wm)(K,{size:"sm",color:"primary",onClick:t[5]||(t[5]=t=>{e.actionsModel=e.auxModel,e.toggleDropdown(e.$refs.actions_dropdown)})},{default:(0,o.w5)((()=>[x])),_:1})])),_:1},8,["modelValue"])])])])),_:1},8,["color","label"]),(0,o.Wm)(J,{class:"q-ml-xs q-mr-xs button-primary q-btn--no-text-transform",color:""===e.dateDisplay?"primary":"secondary",label:""===e.dateDisplay?"Date":e.dateDisplay},{default:(0,o.w5)((()=>[(0,o._)("div",S,[(0,o._)("div",q,[(0,o.Wm)(ee,{modelValue:e.fromDateModel,"onUpdate:modelValue":t[11]||(t[11]=t=>e.fromDateModel=t),filled:"",dense:"",label:"From"},{prepend:(0,o.w5)((()=>[(0,o.Wm)(X,{class:"cursor-pointer",name:"event"},{default:(0,o.w5)((()=>[(0,o.Wm)(ae,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:(0,o.w5)((()=>[(0,o.Wm)(te,{modelValue:e.fromDateModel,"onUpdate:modelValue":t[9]||(t[9]=t=>e.fromDateModel=t),mask:"YYYY-MM-DD HH:mm"},{default:(0,o.w5)((()=>[(0,o._)("div",P,[(0,o.wy)((0,o.Wm)(K,{label:"Close",color:"primary",flat:""},null,512),[[ye]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),append:(0,o.w5)((()=>[(0,o.Wm)(X,{class:"cursor-pointer",name:"access_time"},{default:(0,o.w5)((()=>[(0,o.Wm)(ae,{cover:"cover","transition-show":"scale","transition-hide":"scale"},{default:(0,o.w5)((()=>[(0,o.Wm)(oe,{modelValue:e.fromDateModel,"onUpdate:modelValue":t[10]||(t[10]=t=>e.fromDateModel=t),mask:"YYYY-MM-DD HH:mm",format24h:""},{default:(0,o.w5)((()=>[(0,o._)("div",z,[(0,o.wy)((0,o.Wm)(K,{label:"Close",color:"primary",flat:""},null,512),[[ye]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),_:1},8,["modelValue"])]),(0,o._)("div",Z,[(0,o.Wm)(X,{name:"arrow_downward"})]),(0,o._)("div",M,[(0,o.Wm)(ee,{modelValue:e.toDateModel,"onUpdate:modelValue":t[14]||(t[14]=t=>e.toDateModel=t),filled:"",dense:"",label:"To"},{prepend:(0,o.w5)((()=>[(0,o.Wm)(X,{class:"cursor-pointer",name:"event"},{default:(0,o.w5)((()=>[(0,o.Wm)(ae,{cover:"cover","transition-show":"scale","transition-hide":"scale"},{default:(0,o.w5)((()=>[(0,o.Wm)(te,{modelValue:e.toDateModel,"onUpdate:modelValue":t[12]||(t[12]=t=>e.toDateModel=t),mask:"YYYY-MM-DD HH:mm"},{default:(0,o.w5)((()=>[(0,o._)("div",T,[(0,o.wy)((0,o.Wm)(K,{label:"Close",color:"primary",flat:""},null,512),[[ye]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),append:(0,o.w5)((()=>[(0,o.Wm)(X,{class:"cursor-pointer",name:"access_time"},{default:(0,o.w5)((()=>[(0,o.Wm)(ae,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:(0,o.w5)((()=>[(0,o.Wm)(oe,{modelValue:e.toDateModel,"onUpdate:modelValue":t[13]||(t[13]=t=>e.toDateModel=t),mask:"YYYY-MM-DD HH:mm",format24h:""},{default:(0,o.w5)((()=>[(0,o._)("div",W,[(0,o.wy)((0,o.Wm)(K,{label:"Close",color:"primary",flat:""},null,512),[[ye]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),_:1},8,["modelValue"])])])])),_:1},8,["color","label"]),e.showTokenFilter?((0,o.wg)(),(0,o.j4)(J,{key:2,ref:"token_dropdown",class:"q-ml-xs q-mr-xs button-primary q-btn--no-text-transform",color:e.tokenDisplay?"secondary":"primary",label:e.tokenDisplay?e.tokenDisplay:"Token"},{default:(0,o.w5)((()=>[(0,o._)("div",C,[(0,o._)("div",A,[(0,o.Wm)(ne,{modelValue:e.tokenModel,"onUpdate:modelValue":[t[15]||(t[15]=t=>e.tokenModel=t),t[16]||(t[16]=t=>e.toggleDropdown(e.$refs.token_dropdown))]},null,8,["modelValue"])])])])),_:1},8,["color","label"])):(0,o.kq)("",!0)])]),e.showPaginationExtras?((0,o.wg)(),(0,o.iD)("div",I," Viewing "+(0,n.zw)(e.paginationSettings.rowsPerPage>e.totalRows?e.totalRows:e.paginationSettings.rowsPerPage)+" of "+(0,n.zw)(1e4===e.totalRows?" over ":"")+" "+(0,n.zw)(e.totalRows.toLocaleString())+" total transactions ",1)):(0,o.kq)("",!0)])):(0,o.kq)("",!0)]),(0,o.Wm)(le,{class:"row col-12 q-mt-md separator"}),(0,o._)("div",H,[(0,o.Wm)(me,{ref:"main_table",pagination:e.paginationSettings,"onUpdate:pagination":t[17]||(t[17]=t=>e.paginationSettings=t),class:"q-mt-lg row trx-table--fixed-layout",flat:"","table-header-class":"table-header","hide-pagination":"",rows:e.filteredRows,columns:e.columns,"row-key":e=>e.name+e.action.action_ordinal+e.transaction.id,bordered:!1,square:!0,loading:e.loading,"rows-per-page-options":e.pageSizeOptions,dense:e.$q.screen.width<1024,onRequest:e.onPaginationChange},{header:(0,o.w5)((e=>[(0,o.Wm)(ie,{props:e},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.cols,(t=>((0,o.wg)(),(0,o.j4)(se,{key:t.name,props:e},{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(t.label),1)])),_:2},1032,["props"])))),128))])),_:2},1032,["props"])])),body:(0,o.w5)((t=>[(0,o.Wm)(ie,{props:t},{default:(0,o.w5)((()=>[(0,o.Wm)(ce,null,{default:(0,o.w5)((()=>[(0,o.Wm)(re,{account:t.row.transaction.id,type:t.row.transaction.type},null,8,["account","type"])])),_:2},1024),(0,o.Wm)(ce,null,{default:(0,o.w5)((()=>[(0,o.Wm)(ue,{timestamp:t.row.timestamp,showAge:e.showAge},null,8,["timestamp","showAge"])])),_:2},1024),(0,o.Wm)(ce,null,{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(t.row.actions,(t=>((0,o.wg)(),(0,o.iD)("div",{key:t.action.action_ordinal,class:"row justify-left text-weight-light"},[(0,o._)("div",V,[(0,o._)("div",N,[(0,o.Wm)(de,{action:t.action,showTransferLabel:e.showTransferLabel,account:e.account},null,8,["action","showTransferLabel","account"])])])])))),128))])),_:2},1024),(0,o.Wm)(ce,null,{default:(0,o.w5)((()=>[1===t.row.actions.length?((0,o.wg)(),(0,o.j4)(pe,{key:0,actionData:t.row.data.data,actionName:t.row.data.name,"use-color":!1},null,8,["actionData","actionName"])):(0,o.kq)("",!0)])),_:2},1024)])),_:2},1032,["props"]),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(t.row.actions,(a=>(0,o.wy)(((0,o.wg)(),(0,o.j4)(ie,{key:a.action.action_ordinal,class:"expanded-row",props:t},{default:(0,o.w5)((()=>[(0,o.Wm)(ce,{"auto-width":""}),(0,o.Wm)(ce,null,{default:(0,o.w5)((()=>[(0,o.Wm)(re,{account:t.row.transaction.id,type:t.row.transaction.type},null,8,["account","type"])])),_:2},1024),(0,o.Wm)(ce,null,{default:(0,o.w5)((()=>[(0,o.Wm)(ue,{timestamp:a.timestamp,showAge:e.showAge},null,8,["timestamp","showAge"])])),_:2},1024),(0,o.Wm)(ce,null,{default:(0,o.w5)((()=>[(0,o._)("div",O,[(0,o.Wm)(de,{action:a.action},null,8,["action"])])])),_:2},1024),(0,o.Wm)(ce,null,{default:(0,o.w5)((()=>[(0,o.Wm)(pe,{actionData:a.data.data,actionName:a.data.name,"use-color":!1},null,8,["actionData","actionName"])])),_:2},1024)])),_:2},1032,["props"])),[[l.F8,t.expand]]))),128))])),_:1},8,["pagination","rows","columns","row-key","loading","rows-per-page-options","dense","onRequest"])]),(0,o._)("div",F,[(0,o._)("div",Q,[(0,o._)("small",null,"Rows per page:   "+(0,n.zw)(e.paginationSettings.rowsPerPage),1),(0,o.Wm)(X,{name:e.showPagesSizes?"expand_more":"expand_less",size:"sm",onClick:e.switchPageSelector},{default:(0,o.w5)((()=>[(0,o.Wm)(ae,{ref:"page_size_selector","transition-show":"scale","transition-hide":"scale"},{default:(0,o.w5)((()=>[(0,o.Wm)(we,null,{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.pageSizeOptions,(t=>((0,o.wg)(),(0,o.j4)(ve,{key:t,class:"cursor-pointer"},{default:(0,o.w5)((()=>[(0,o.Wm)(ge,{onClick:a=>{e.changePageSize(t),e.hidePopup(e.$refs.page_size_selector)}},{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(t),1)])),_:2},1032,["onClick"])])),_:2},1024)))),128))])),_:1})])),_:1},512)])),_:1},8,["name","onClick"])]),(0,o.Wm)(fe),(0,o._)("div",L,[(0,o.Wm)(K,{size:"sm",color:"primary",outline:"",disable:1===e.paginationSettings.page,onClick:t[18]||(t[18]=t=>e.moveTablePage(e.$refs.main_table,"first"))},{default:(0,o.w5)((()=>[Y])),_:1},8,["disable"]),(0,o.Wm)(K,{size:"sm",color:"primary",outline:"",class:"q-mx-sm",disable:1===e.paginationSettings.page,onClick:t[19]||(t[19]=t=>e.moveTablePage(e.$refs.main_table,"prev"))},{default:(0,o.w5)((()=>[(0,o.Wm)(X,{name:"chevron_left",size:"xs"})])),_:1},8,["disable"]),(0,o._)("small",null," Page "+(0,n.zw)(e.paginationSettings.page)+" "+(0,n.zw)(e.showPaginationExtras&&!1===e.enableLiveTransactions?0===e.lastPage?" of 1":` of ${e.lastPage}`:""),1),(0,o.Wm)(K,{size:"sm",color:"primary",outline:"",class:"q-mx-sm",disable:e.paginationSettings.page===e.lastPage||e.totalRowse.moveTablePage(e.$refs.main_table,"next"))},{default:(0,o.w5)((()=>[(0,o.Wm)(X,{name:"chevron_right",size:"xs"})])),_:1},8,["disable"]),e.showPaginationExtras&&!1===e.enableLiveTransactions?((0,o.wg)(),(0,o.j4)(K,{key:0,size:"sm",color:"primary",outline:"",disable:e.paginationSettings.page===e.lastPage||0===e.lastPage,onClick:t[21]||(t[21]=t=>e.moveTablePage(e.$refs.main_table,"last"))},{default:(0,o.w5)((()=>[U])),_:1},8,["disable"])):(0,o.kq)("",!0)])])])])}var B=a(60499),R=a(97114),$=a(53779),K=a(55298),G=a(49815),J=a(52783);const X=(0,o.Uk)("Searching..."),ee=["src"];function te(e,t,a,s,i,r){const c=(0,o.up)("q-icon"),u=(0,o.up)("q-item-label"),d=(0,o.up)("q-item-section"),p=(0,o.up)("q-item"),m=(0,o.up)("q-avatar"),g=(0,o.up)("q-select");return(0,o.wg)(),(0,o.j4)(g,{class:"search-input",borderless:"",dense:"",filled:"","use-input":"","hide-selected":"","fill-input":"","hide-bottom-space":"",placeholder:"token",loading:e.isLoading,"model-value":e.inputValue,options:e.options,onInputValue:t[0]||(t[0]=t=>e.inputValue=t),onKeyup:t[1]||(t[1]=(0,l.D2)((t=>e.handleSelected(e.inputValue)),["enter"]))},{prepend:(0,o.w5)((()=>[(0,o.Wm)(c,{class:"rotate-90",name:"search",size:"20px"})])),"no-option":(0,o.w5)((()=>[(0,o.Wm)(p,null,{default:(0,o.w5)((()=>[(0,o.Wm)(d,{class:"text-center"},{default:(0,o.w5)((()=>[e.isLoading?((0,o.wg)(),(0,o.j4)(u,{key:0},{default:(0,o.w5)((()=>[X])),_:1})):((0,o.wg)(),(0,o.j4)(u,{key:1},{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(e.inputValue?"Nothing found":"Search for token symbol or contract"),1)])),_:1}))])),_:1})])),_:1})])),option:(0,o.w5)((t=>[(0,o.Wm)(p,(0,o.dG)(t.itemProps,{exact:"exact",clickable:"clickable",onClick:a=>e.handleSelected(t.opt)}),{default:(0,o.w5)((()=>[(0,o.Wm)(d,{class:"items-center",avatar:""},{default:(0,o.w5)((()=>[(0,o.Wm)(m,{size:"24px"},{default:(0,o.w5)((()=>{var e;return[(0,o._)("img",{src:null!==(e=t.opt.logo)&&void 0!==e?e:"~src/assets/token_placeholder.svg"},null,8,ee)]})),_:2},1024)])),_:2},1024),(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(t.opt.symbol)+" ("+(0,n.zw)(t.opt.contract)+")",1)])),_:2},1024)])),_:2},1024)])),_:2},1040,["onClick"])])),_:1},8,["loading","model-value","options"])}var ae=a(21889),oe=a(19302),ne=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{r(o.next(e))}catch(t){l(t)}}function i(e){try{r(o["throw"](e))}catch(t){l(t)}}function r(e){e.done?a(e.value):n(e.value).then(s,i)}r((o=o.apply(e,t||[])).next())}))};const le=(0,o.aZ)({name:"TokenSearch",props:{modelValue:{type:Object}},emits:["update:modelValue"],setup(e,t){const a=(0,oe.Z)(),n=(0,B.iH)(""),l=(0,B.iH)([]),s=(0,B.iH)(!1);function i(e){return ne(this,void 0,void 0,(function*(){try{const t=(yield ae.h.getTokens()).filter((t=>JSON.stringify(t).toLowerCase().includes(e.toLowerCase())));return t}catch(t){return}}))}function r(e){return ne(this,void 0,void 0,(function*(){if(!n.value)return;if("string"!==typeof e)return void t.emit("update:modelValue",e);const o=yield i(e.toLowerCase());0!==o.length?t.emit("update:modelValue",o[0]):a.notify(`account ${n.value} not found!`)}))}return(0,o.YP)(n,(()=>ne(this,void 0,void 0,(function*(){if(""===n.value)return void(l.value=[]);if("string"!==typeof n.value)return void(l.value=[]);s.value=!0;const e=n.value.toLowerCase();yield Promise.all([i(e)]).then((e=>{l.value=[].concat.apply([],e)})),s.value=!1})))),{inputValue:n,options:l,isLoading:s,handleSelected:r}}});var se=a(11639),ie=a(32259),re=a(22857),ce=a(490),ue=a(76749),de=a(33115),pe=a(61357),me=a(69984),ge=a.n(me);const ve=(0,se.Z)(le,[["render",te]]),we=ve;ge()(le,"components",{QSelect:ie.Z,QIcon:re.Z,QItem:ce.Z,QItemSection:ue.Z,QItemLabel:de.Z,QAvatar:pe.Z});var fe=a(18910),ye=a(30229),he=a(17779),be=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{r(o.next(e))}catch(t){l(t)}}function i(e){try{r(o["throw"](e))}catch(t){l(t)}}function r(e){e.done?a(e.value):n(e.value).then(s,i)}r((o=o.apply(e,t||[])).next())}))};const je=(0,ye.z)(),_e=2e3,ke=[10,20,50,100,200],De=()=>{const e=localStorage.getItem("txRowsPerPage");let t=parseInt(e);return isNaN(t)&&(t=ke[0],localStorage.setItem("txRowsPerPage",t.toString())),t},xe=(0,o.aZ)({name:"TransactionsTable",components:{DateField:R.Z,AccountFormat:$.Z,ActionFormat:K.Z,DataFormat:G.Z,AccountSearch:J.Z,TokenSearch:we},props:{account:{type:String||null,required:!1,default:null},actions:{type:Object,required:!1,default:null},showTransferLabel:{type:Boolean,default:!1},toggleEnabled:{type:Boolean,default:!0},filtersEnabled:{type:Boolean,default:!0},showPaginationExtras:{type:Boolean,default:!1}},setup(e){const t=(0,fe.yj)(),a=(0,fe.tv)(),{account:n,actions:l}=(0,B.BK)(e),s=[{name:"transaction",required:!0,label:"TRANSACTION",align:"left",field:"transaction",sortable:!0},{name:"timestamp",required:!0,align:"left",label:"TIMESTAMP",field:"timestamp",sortable:!0},{name:"action",required:!0,align:"left",label:"ACTION",field:"action",sortable:!0},{name:"data",required:!0,align:"left",label:"DATA",field:"data"}],i=(0,B.iH)([]),r=(0,B.iH)(0),c=(0,B.iH)([]),u=(0,B.iH)(!1),d=(0,B.iH)(!1),p=()=>{d.value=!d.value},m=e=>be(this,void 0,void 0,(function*(){w.value.rowsPerPage=e,w.value.page=1,yield L({pagination:w.value}),localStorage.setItem("txRowsPerPage",e.toString())})),g=(e,t)=>be(this,void 0,void 0,(function*(){w.value.page=e,w.value.rowsPerPage=t,yield L({pagination:w.value})})),v=(0,o.Fl)((()=>t.query["page"]||`1,${De()}`)),w=(0,B.iH)({sortBy:"timestamp",descending:!0,page:1,rowsPerPage:De(),rowsNumber:1e4}),f=(0,B.iH)(e.toggleEnabled),y=(0,B.iH)(0),h=(0,B.iH)(""),b=(0,B.iH)(""),j=(0,o.Fl)((()=>{if(b.value){const e=b.value.split(",");return e.length>1?e[0]+"...":e[0]}return""})),_=(0,B.iH)(je.getFiltersSupported("notified")),k=(0,B.iH)(""),D=(0,o.Fl)((()=>{if(k.value){const e=k.value.split(",");return e.length>1?e[0]+"...":e[0]}return""})),x=(0,B.iH)(!1),S=(0,B.iH)(null),q=(0,o.Fl)((()=>{var e,t;return S.value&&null!==(t=null===(e=S.value)||void 0===e?void 0:e.symbol)&&void 0!==t?t:""}));ae.h.getTokens().then((e=>{e.length>0&&(x.value=!0)}));const P=(new Date).toISOString(),z=(0,B.iH)(""),Z=(0,B.iH)(P),M=(0,o.Fl)((()=>{try{if(""!==z.value||Z.value!==P)return""===z.value?"Until "+Z.value.split("T")[0]:Z.value===P?"Since "+z.value.split("T")[0]:z.value.split("T")[0]+" - "+Z.value.split("T")[0]}catch(e){he.error(e)}return""})),T=(0,B.iH)(null),W=(0,B.iH)("true"===localStorage.getItem("showAge")),C=(0,o.Fl)((()=>null!==n.value&&n.value.length>12)),A=(0,o.Fl)((()=>C.value?"Actions":"Latest Transactions")),I=(0,o.Fl)((()=>{const e=w.value.rowsPerPage,t=r.value;return Math.ceil(t/e)})),H=(0,o.Fl)((()=>null!==l.value)),V=()=>{k.value="",b.value="",S.value=null,z.value="",Z.value=P},N=(0,o.Fl)((()=>D.value+j.value+M.value+q.value)),O=()=>{c.value=i.value},F=()=>be(this,void 0,void 0,(function*(){var e,t;let a;if(C.value)a=(yield ae.h.getTransaction(n.value)).actions;else if(H.value)a=l.value;else{const o=w.value.page;let l=w.value.rowsPerPage,s=null!==(e=k.value)&&void 0!==e?e:"",c="",u="";Z.value!==P&&(u=new Date(Z.value).toISOString()),""!==z.value&&(c=new Date(z.value).toISOString());const d=w.value.descending?"desc":"asc";let p=S.value?{"act.account":S.value.contract}:null;b.value&&(p=p?Object.assign(Object.assign({},p),{"act.name":b.value}):{"act.name":b.value}),o>1&&0===y.value&&(y.value=null===(t=i.value[0])||void 0===t?void 0:t.action.global_sequence),y.value>0&&(p=p?Object.assign(Object.assign({},p),{global_sequence:"0-"+y.value.toString()}):{global_sequence:"0-"+y.value.toString()}),S.value&&(l=100);const m=yield ae.h.getTransactions({page:o,limit:l,account:n.value,notified:s,before:u,after:c,sort:d,extras:p});a=m.data.actions,r.value=m.data.total.value}a&&(S.value&&(a=a.filter((e=>{var t;return null===(t=e.act.data.quantity)||void 0===t?void 0:t.includes(S.value.symbol)})),a=a.slice(0,w.value.rowsPerPage)),i.value=a.map((e=>({name:e.trx_id,transaction:{id:e.trx_id,type:"transaction"},timestamp:e["@timestamp"]||e.timestamp,action:e,data:H.value?{data:e.data,name:e.account}:{data:e.act.data,name:e.act.name},actions:[{name:e.trx_id,transaction:{id:e.trx_id,type:"transaction"},timestamp:e["@timestamp"],action:e,data:H.value?{data:e.data,name:e.account}:{data:e.act.data,name:e.act.name}}]})))),O()})),Q=e=>be(this,void 0,void 0,(function*(){u.value=!0;const{page:t,rowsPerPage:a,sortBy:o,descending:n}=e.pagination;w.value.page=t,w.value.rowsPerPage=a,w.value.sortBy=o,w.value.descending=n,yield F(),u.value=!1})),L=e=>be(this,void 0,void 0,(function*(){const{page:o,rowsPerPage:n}=e.pagination;yield a.push({hash:window.location.hash,query:Object.assign(Object.assign({},t.query),{page:`${o},${n}`})})})),Y=(e,t)=>be(this,void 0,void 0,(function*(){e&&(w.value.page=Number(e)),t&&(w.value.rowsPerPage=Number(t)),yield Q({pagination:w.value})})),U=e=>e.length>0&&e.split("\n").length>1,E=()=>{y.value=0,clearInterval(T.value),T.value=window.setInterval((()=>{F()}),_e)},R=()=>{clearInterval(T.value)};(0,o.Jd)((()=>{R()})),(0,o.YP)([n,l],(()=>be(this,void 0,void 0,(function*(){F(),yield g(1,w.value.rowsPerPage)})))),(0,o.YP)(N,(()=>be(this,void 0,void 0,(function*(){1!==w.value.page?yield g(1,w.value.rowsPerPage):(f.value=!1,yield F())})))),(0,o.YP)(W,(e=>{localStorage.setItem("showAge",e?"true":"false")}));const $=()=>be(this,void 0,void 0,(function*(){f.value?(V(),1!==w.value.page&&(yield g(1,w.value.rowsPerPage)),E()):R()}));(0,o.YP)(f,(()=>{$()})),(0,o.bv)((()=>{$()})),(0,o.YP)((()=>v.value),(()=>be(this,void 0,void 0,(function*(){let e=v.value,t=1,a=De();if("number"===typeof e)t=e;else if("string"===typeof e){const[o,n]=e.split(",");t=Number(o),a=Number(n)}1!==t&&(f.value=!1),yield Y(t,a)}))),{immediate:!0});const K=e=>{const t=e;t.toggle()},G=e=>{const t=e;t.hide()},J=(e,t)=>{const a=e;"next"===t?a.nextPage():"prev"===t?a.prevPage():"first"===t?a.firstPage():"last"===t&&g(I.value,w.value.rowsPerPage)};return{columns:s,rows:i,filteredRows:c,loading:u,showPagesSizes:d,paginationSettings:w,fromDateModel:z,toDateModel:Z,dateDisplay:M,actionsDisplay:j,actionsModel:b,auxModel:h,accountsDisplay:D,accountsModel:k,showAccountFilter:_,tokenDisplay:q,tokenModel:S,showTokenFilter:x,interval:T,showAge:W,tableTitle:A,lastPage:I,hasActions:H,filter:N,onRequest:Q,loadTableData:F,checkIsMultiLine:U,filterRows:O,totalRows:r,pageSizeOptions:ke,changePageSize:m,switchPageSelector:p,applyPagination:Y,changePagination:g,onPaginationChange:L,clearFilters:V,enableLiveTransactions:f,toggleDropdown:K,hidePopup:G,moveTablePage:J}}});var Se=a(23175),qe=a(68879),Pe=a(18479),ze=a(13119),Ze=a(52765),Me=a(14351),Te=a(86770),We=a(50926),Ce=a(82429),Ae=a(31233),Ie=a(21682),He=a(67220),Ve=a(13246),Ne=a(90136),Oe=a(77741),Fe=a(62146);const Qe=(0,se.Z)(xe,[["render",E]]),Le=Qe;ge()(xe,"components",{QToggle:Se.Z,QBtn:qe.Z,QBtnDropdown:Pe.Z,QInput:ze.Z,QIcon:re.Z,QPopupProxy:Ze.Z,QDate:Me.Z,QTime:Te.Z,QSeparator:We.Z,QTable:Ce.Z,QTr:Ae.Z,QTh:Ie.Z,QTd:He.Z,QList:Ve.Z,QItem:ce.Z,QItemSection:ue.Z,QSpace:Ne.Z,QColor:Oe.Z}),ge()(xe,"directives",{ClosePopup:Fe.Z})},1546:(e,t,a)=>{"use strict";a.d(t,{Z:()=>q});var o=a(59835),n=a(86970);const l={class:"Card"},s={class:"row"},i={class:"col-12"},r={class:"row"},c={class:"text-h6"},u={class:"row"},d={class:"col-12"},p={class:"row"};function m(e,t,a,m,g,v){const w=(0,o.up)("q-card-section"),f=(0,o.up)("q-btn"),y=(0,o.up)("q-card-actions"),h=(0,o.up)("q-dialog"),b=(0,o.Q2)("close-popup");return(0,o.wg)(),(0,o.j4)(h,null,{default:(0,o.w5)((()=>[(0,o._)("div",l,[e.Id?((0,o.wg)(),(0,o.j4)(w,{key:0},{default:(0,o.w5)((()=>[(0,o._)("div",s,[(0,o._)("div",i,[(0,o._)("div",r,[(0,o._)("div",c,(0,n.zw)(e.msg),1)]),(0,o._)("div",{class:"row ellipsis-overflow q-pt-lg q-pl-md",onClick:t[0]||(t[0]=(...t)=>e.navToTransaction&&e.navToTransaction(...t))},(0,n.zw)(e.Id),1)])])])),_:1})):((0,o.wg)(),(0,o.j4)(w,{key:1},{default:(0,o.w5)((()=>[(0,o._)("div",u,[(0,o._)("div",d,[(0,o._)("div",p,"Transaction Failed: "+(0,n.zw)(e.transactionE),1)])])])),_:1})),(0,o.Wm)(y,{class:"text-primary",align:"right"},{default:(0,o.w5)((()=>[(0,o.wy)((0,o.Wm)(f,{flat:"",label:"Close","text-color":"grey-3",onClick:e.reset},null,8,["onClick"]),[[b]]),e.Id?((0,o.wg)(),(0,o.j4)(f,{key:0,flat:"",label:"View transaction","text-color":"grey-3",onClick:e.navToTransaction},null,8,["onClick"])):(0,o.kq)("",!0)])),_:1})])])),_:1})}var g=a(78504),v=a(18910),w=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{r(o.next(e))}catch(t){l(t)}}function i(e){try{r(o["throw"](e))}catch(t){l(t)}}function r(e){e.done?a(e.value):n(e.value).then(s,i)}r((o=o.apply(e,t||[])).next())}))};const f=(0,o.aZ)({name:"ViewTransaction",props:{message:{type:String,required:!0}},setup(e){const t=(0,g.useStore)(),a=(0,v.tv)(),n=(0,o.Fl)((()=>e.message)),l=(0,o.Fl)((()=>t.state.account.TransactionId)),s=(0,o.Fl)((()=>t.state.account.TransactionError)),i=()=>{t.dispatch("account/resetTransaction")},r=()=>w(this,void 0,void 0,(function*(){yield a.push({name:"transaction",params:{transaction:l.value}}),a.go(0),t.dispatch("account/resetTransaction")}));return{msg:n,Id:l,transactionE:s,reset:i,navToTransaction:r}}});var y=a(11639),h=a(87743),b=a(63190),j=a(11821),_=a(68879),k=a(62146),D=a(69984),x=a.n(D);const S=(0,y.Z)(f,[["render",m],["__scopeId","data-v-b9294dd2"]]),q=S;x()(f,"components",{QDialog:h.Z,QCardSection:b.Z,QCardActions:j.Z,QBtn:_.Z}),x()(f,"directives",{ClosePopup:k.Z})},79870:(e,t,a)=>{"use strict";a.d(t,{Z:()=>Z});var o=a(59835),n=a(86970);const l={class:"modal-header-container"},s=(0,o._)("h3",{class:"modal-header"},"Attach an account",-1),i=["src"],r=(0,o.Uk)("Get app");function c(e,t,a,c,u,d){const p=(0,o.up)("q-icon"),m=(0,o.up)("q-separator"),g=(0,o.up)("q-item-section"),v=(0,o.up)("q-spinner"),w=(0,o.up)("q-tooltip"),f=(0,o.up)("q-btn"),y=(0,o.up)("q-item"),h=(0,o.up)("q-list"),b=(0,o.up)("q-dialog"),j=(0,o.Q2)("ripple");return(0,o.wg)(),(0,o.j4)(b,{ref:"walletDialog",class:"modal-container"},{default:(0,o.w5)((()=>[(0,o._)("div",l,[(0,o.Wm)(p,{name:"add_circle_outline",color:"white",size:e.iconSize},null,8,["size"]),s]),(0,o.Wm)(m),(0,o.Wm)(h,null,{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.$ual.getAuthenticators().availableAuthenticators,((t,a)=>(0,o.wy)(((0,o.wg)(),(0,o.j4)(y,{key:t.getStyle().text,style:(0,n.j5)({background:t.getStyle().background,color:t.getStyle().textColor})},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{class:"cursor-pointer",avatar:"",onClick:t=>e.onLogin(a)},{default:(0,o.w5)((()=>[(0,o._)("img",{src:t.getStyle().icon,width:"30"},null,8,i)])),_:2},1032,["onClick"]),(0,o.Wm)(g,{class:"cursor-pointer",onClick:t=>e.onLogin(a)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(t.getStyle().text),1)])),_:2},1032,["onClick"]),(0,o.Wm)(g,{class:"flex",avatar:""},{default:(0,o.w5)((()=>[e.loading===t.getStyle().text?((0,o.wg)(),(0,o.j4)(v,{key:0,color:t.getStyle().textColor,size:"2em"},null,8,["color"])):((0,o.wg)(),(0,o.j4)(f,{key:1,color:t.getStyle().textColor,icon:"get_app",target:"_blank",dense:"",flat:"",size:"12px",onClick:a=>e.openUrl(t.getOnboardingLink())},{default:(0,o.w5)((()=>[(0,o.Wm)(w,null,{default:(0,o.w5)((()=>[r])),_:1})])),_:2},1032,["color","onClick"]))])),_:2},1024)])),_:2},1032,["style"])),[[j]]))),128)),e.error?((0,o.wg)(),(0,o.j4)(y,{key:0,active:!!e.error,"active-class":"bg-red-1 text-grey-8"},{default:(0,o.w5)((()=>[(0,o.Wm)(g,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(e.error),1)])),_:1})])),_:1},8,["active"])):(0,o.kq)("",!0)])),_:1})])),_:1},512)}var u=a(60499),d=a(84284),p=a(78504),m=a(19302),g=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,l){function s(e){try{r(o.next(e))}catch(t){l(t)}}function i(e){try{r(o["throw"](e))}catch(t){l(t)}}function r(e){e.done?a(e.value):n(e.value).then(s,i)}r((o=o.apply(e,t||[])).next())}))};const v=(0,o.aZ)({name:"WalletModal",setup(){const e=(0,d.getAuthenticators)(),t=(0,m.Z)(),a=(0,p.useStore)(),n=(0,u.iH)(null),l=(0,o.Fl)((()=>a.state.account.accountName)),s={},i=(0,u.iH)(null),r=(0,o.Fl)((()=>t.screen.width>420?"3em":"1.5em")),c=t=>g(this,void 0,void 0,(function*(){const o=e[t];n.value=null;try{yield a.dispatch("account/login",{account:l.value,authenticator:o})}catch(s){n.value=s}i.value.hide()})),v=e=>window.open(e,"_blank");return{error:n,loading:s,account:l,walletDialog:i,onLogin:c,openUrl:v,iconSize:r}}});var w=a(11639),f=a(87743),y=a(22857),h=a(50926),b=a(13246),j=a(490),_=a(76749),k=a(63940),D=a(68879),x=a(46858),S=a(51722),q=a(69984),P=a.n(q);const z=(0,w.Z)(v,[["render",c]]),Z=z;P()(v,"components",{QDialog:f.Z,QIcon:y.Z,QSeparator:h.Z,QList:b.Z,QItem:j.Z,QItemSection:_.Z,QSpinner:k.Z,QBtn:D.Z,QTooltip:x.Z}),P()(v,"directives",{Ripple:S.Z})},53779:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var o=a(59835),n=a(86970);const l=["href"];function s(e,t,a,s,i,r){return(0,o.wg)(),(0,o.iD)("a",{class:"hover-dec",href:"/"+e.type+"/"+e.accAccount},(0,n.zw)("transaction"===e.type?e.accAccount.slice(0,8):e.accAccount),9,l)}const i=(0,o.aZ)({name:"AccountFormat",props:{account:{type:String,default:()=>""},type:{type:String,required:!0}},setup(e){const t=(0,o.Fl)((()=>e.account));return{accType:e.type,accAccount:t}}});var r=a(11639);const c=(0,r.Z)(i,[["render",s],["__scopeId","data-v-a9e4aae2"]]),u=c},55298:(e,t,a)=>{"use strict";a.d(t,{Z:()=>v});var o=a(59835),n=a(86970);const l={class:"action-container"},s={class:"action action-general"},i=(0,o._)("span",{class:"inline"},"  →  ",-1),r={key:0,class:"action action-transfer"};function c(e,t,a,c,u,d){const p=(0,o.up)("AccountFormat");return(0,o.wg)(),(0,o.iD)("div",l,[(0,o._)("div",s,[(0,o.Wm)(p,{account:e.tx.act.account,type:"account"},null,8,["account"]),i,(0,o._)("span",null,(0,n.zw)(e.tx.act.name),1)]),e.divContent?((0,o.wg)(),(0,o.iD)("div",r,(0,n.zw)(e.divContent),1)):(0,o.kq)("",!0)])}var u=a(60499),d=a(53779);const p=(0,o.aZ)({name:"ActionFormat",components:{AccountFormat:d.Z},props:{action:{type:Object,required:!0},showTransferLabel:{type:Boolean,default:!1},account:{type:String||null,required:!1,default:null}},setup(e){const t=(0,u.iH)(""),a=(0,u.iH)(""),n=(0,u.Vh)(e,"action"),l=(0,u.Vh)(e,"showTransferLabel"),s=(0,u.Vh)(e,"account");return(0,o.bv)((()=>{const e=n.value.act.data,t="transfer"===n.value.act.name;l.value&&s.value&&t&&(e.from===s.value?a.value="SEND":e.to===s.value&&(a.value="RECEIVE"))})),{divClass:t,divContent:a,tx:n}}});var m=a(11639);const g=(0,m.Z)(p,[["render",c]]),v=g},49815:(e,t,a)=>{"use strict";a.d(t,{Z:()=>Q});var o=a(59835),n=a(86970);const l={key:0,ref:"dataBox",class:"row transfer-data"},s={class:"col-12"},i={class:"text-bold"},r={class:"text-bold"},c=(0,o.Uk)("  →   "),u=(0,o.Uk)(" "),d={class:"text-bold"},p={class:"col-12"},m={class:"text-weight-bold"},g=(0,o.Uk)(" memo: "),v={key:0,class:"text-weight-regular"},w={key:1,class:"text-weight-regular"},f={key:1,ref:"dataBox",class:"row"};function y(e,t,a,y,h,b){const j=(0,o.up)("AccountFormat"),_=(0,o.up)("PrettyPayload"),k=(0,o.up)("q-btn");return(0,o.wg)(),(0,o.iD)("div",{class:(0,n.C_)(["relative-position overflow-hidden",{"div-compressed":!e.showOverflow}])},["transfer"===e.actionName?((0,o.wg)(),(0,o.iD)("div",l,[(0,o._)("div",s,[(0,o._)("span",i,[(0,o.Wm)(j,{account:e.transferData.from,type:"account"},null,8,["account"])]),(0,o._)("span",r,[c,(0,o.Wm)(j,{account:e.transferData.to,type:"account"},{default:(0,o.w5)((()=>[u])),_:1},8,["account"])]),(0,o._)("span",d,(0,n.zw)(" "+e.transferData.quantity),1)]),(0,o._)("div",p,[(0,o._)("div",m,[g,e.transferData.memo?((0,o.wg)(),(0,o.iD)("span",v,(0,n.zw)(e.transferData.memo),1)):((0,o.wg)(),(0,o.iD)("span",w,"n/a"))])])],512)):((0,o.wg)(),(0,o.iD)("div",f,[(0,o.Wm)(_,{depth:0,payload:e.formatGeneralData(e.actionData)},null,8,["payload"])],512)),e.isOverflowing?((0,o.wg)(),(0,o.j4)(k,{key:2,flat:"",size:"xs",icon:e.showOverflow?"expand_less":"expand_more",class:(0,n.C_)({"q-btn--use-color":e.useColor,"full-width":e.showOverflow,"q-btn--floating":!e.showOverflow}),onClick:e.toggleOverflow},null,8,["icon","class","onClick"])):(0,o.kq)("",!0)],2)}var h=a(60499),b=a(53779);const j={class:"text-bold"},_={key:0},k={key:1,class:"payload__list"},D={class:"text-bold"},x={class:"text-bold"},S=(0,o.Uk)(" "),q={key:1};function P(e,t,a,l,s,i){const r=(0,o.up)("PrettyPayload",!0),c=(0,o.up)("AccountFormat");return(0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.list,((t,a)=>((0,o.wg)(),(0,o.iD)("div",{key:a,class:(0,n.C_)(e.classObject)},[Array.isArray(e.payload[t])?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o._)("span",j,(0,n.zw)(t)+":",1),e.isArrayOfStringsOrNumbers(e.payload[t])?((0,o.wg)(),(0,o.iD)("span",_,(0,n.zw)(0===e.payload[t].length?" [ ]":[...e.payload[t]]),1)):((0,o.wg)(),(0,o.iD)("ul",k,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.payload[t],((t,a)=>((0,o.wg)(),(0,o.iD)("li",{key:a,class:"payload__list-item"},[(0,o.Wm)(r,{depth:e.depth+1,payload:t},null,8,["depth","payload"])])))),128))]))],64)):"object"===typeof e.payload[t]?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o._)("div",D,(0,n.zw)(t+":"),1),(0,o.Wm)(r,{depth:e.depth+1,payload:e.payload[t]},null,8,["depth","payload"])],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[(0,o._)("span",x,(0,n.zw)(t)+": ",1),e.isAccount(t)?((0,o.wg)(),(0,o.j4)(c,{key:0,account:e.payload[t],type:"account"},{default:(0,o.w5)((()=>[S])),_:2},1032,["account"])):((0,o.wg)(),(0,o.iD)("span",q,(0,n.zw)(e.payload[t]),1))],64))],2)))),128)}const z=(0,o.aZ)({name:"PrettyPayload",components:{AccountFormat:b.Z},props:{depth:{type:Number,required:!0},payload:{type:Object,required:!1}},setup(e){const{depth:t,payload:a}=(0,h.BK)(e),n=null===a.value?"null":typeof a.value,l=(0,o.Fl)((()=>{if("object"===n)return Object.keys(a.value)}));function s(e){const t=["account","to","from","owner","account_name","voter"];return t.includes(e)}const i=(0,o.Fl)((()=>({payload:!0,payload__indent:t.value>0})));function r(e){return Array.isArray(e)&&e.every((e=>"string"===typeof e||"number"===typeof e))}return{type:n,list:l,classObject:i,isAccount:s,isArrayOfStringsOrNumbers:r}}});var Z=a(11639);const M=(0,Z.Z)(z,[["render",P],["__scopeId","data-v-e2f1df72"]]),T=M;var W=a(61957);const C=(0,o.aZ)({name:"DataFormat",components:{AccountFormat:b.Z,PrettyPayload:T},props:{actionName:{type:String,required:!0},actionData:{type:Object,required:!0},useColor:{type:Boolean,required:!0}},setup(e){const{actionName:t,actionData:a}=(0,h.BK)(e),n=(0,h.iH)(null),l=(0,h.iH)(!1),s=(0,h.iH)(!1),i=(0,o.Fl)((()=>a.value)),r=(0,o.Fl)((()=>{var e,t;return null!==(t=null===(e=n.value)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:0}));let c=(0,h.iH)(null);const u=110,d=40,p=`calc(${u}px - ${d}px)`;function m(e,t){if("object"!==typeof e||"object"!==typeof t)return!1;const a=e,o=t;for(const n of Object.keys(e))if(a[n]){if(typeof a[n]!==typeof o[n])return!1;if("object"===typeof a[n]){if(!m(a[n],o[n]))return!1}else if(a[n]!==o[n])return!1}return!0}function g(e){return null===c.value?(c.value=e,c.value):m((0,h.IU)(c.value),e)?c.value:e}function v(){var e,t;s.value=(null!==(t=null===(e=n.value)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:0)>u}function w(){l.value=!l.value}return(0,o.YP)([a,r],(()=>{v()})),(0,o.ic)((()=>{v()})),{currentData:c,transferData:i,name:t,formatGeneralData:g,dataBox:n,isOverflowing:s,showOverflow:l,toggleOverflow:w,maxHeightStyle:p}}}),A=()=>{(0,W.sj)((e=>({c7e0c316:e.maxHeightStyle})))},I=C.setup;C.setup=I?(e,t)=>(A(),I(e,t)):A;const H=C;var V=a(68879),N=a(69984),O=a.n(N);const F=(0,Z.Z)(H,[["render",y],["__scopeId","data-v-7486e4c2"]]),Q=F;O()(H,"components",{QBtn:V.Z})},46700:(e,t,a)=>{var o={"./af":73902,"./af.js":73902,"./ar":36314,"./ar-dz":75666,"./ar-dz.js":75666,"./ar-kw":76591,"./ar-kw.js":76591,"./ar-ly":7900,"./ar-ly.js":7900,"./ar-ma":5667,"./ar-ma.js":5667,"./ar-sa":36335,"./ar-sa.js":36335,"./ar-tn":86916,"./ar-tn.js":86916,"./ar.js":36314,"./az":1699,"./az.js":1699,"./be":98988,"./be.js":98988,"./bg":97437,"./bg.js":97437,"./bm":97947,"./bm.js":97947,"./bn":12851,"./bn-bd":34905,"./bn-bd.js":34905,"./bn.js":12851,"./bo":97346,"./bo.js":97346,"./br":1711,"./br.js":1711,"./bs":63706,"./bs.js":63706,"./ca":70112,"./ca.js":70112,"./cs":36406,"./cs.js":36406,"./cv":41853,"./cv.js":41853,"./cy":39766,"./cy.js":39766,"./da":36836,"./da.js":36836,"./de":59320,"./de-at":14904,"./de-at.js":14904,"./de-ch":26710,"./de-ch.js":26710,"./de.js":59320,"./dv":73274,"./dv.js":73274,"./el":80286,"./el.js":80286,"./en-au":30143,"./en-au.js":30143,"./en-ca":237,"./en-ca.js":237,"./en-gb":82428,"./en-gb.js":82428,"./en-ie":53349,"./en-ie.js":53349,"./en-il":13764,"./en-il.js":13764,"./en-in":67809,"./en-in.js":67809,"./en-nz":59851,"./en-nz.js":59851,"./en-sg":95594,"./en-sg.js":95594,"./eo":4483,"./eo.js":4483,"./es":62184,"./es-do":25777,"./es-do.js":25777,"./es-mx":89356,"./es-mx.js":89356,"./es-us":68496,"./es-us.js":68496,"./es.js":62184,"./et":97578,"./et.js":97578,"./eu":2092,"./eu.js":2092,"./fa":15927,"./fa.js":15927,"./fi":50171,"./fi.js":50171,"./fil":82416,"./fil.js":82416,"./fo":89937,"./fo.js":89937,"./fr":55172,"./fr-ca":77495,"./fr-ca.js":77495,"./fr-ch":97541,"./fr-ch.js":97541,"./fr.js":55172,"./fy":93766,"./fy.js":93766,"./ga":66361,"./ga.js":66361,"./gd":2282,"./gd.js":2282,"./gl":52630,"./gl.js":52630,"./gom-deva":80680,"./gom-deva.js":80680,"./gom-latn":66220,"./gom-latn.js":66220,"./gu":57506,"./gu.js":57506,"./he":5540,"./he.js":5540,"./hi":46067,"./hi.js":46067,"./hr":79669,"./hr.js":79669,"./hu":13396,"./hu.js":13396,"./hy-am":36678,"./hy-am.js":36678,"./id":44812,"./id.js":44812,"./is":94193,"./is.js":94193,"./it":67863,"./it-ch":959,"./it-ch.js":959,"./it.js":67863,"./ja":41809,"./ja.js":41809,"./jv":28657,"./jv.js":28657,"./ka":33290,"./ka.js":33290,"./kk":98418,"./kk.js":98418,"./km":77687,"./km.js":77687,"./kn":21375,"./kn.js":21375,"./ko":32641,"./ko.js":32641,"./ku":83518,"./ku.js":83518,"./ky":85459,"./ky.js":85459,"./lb":91978,"./lb.js":91978,"./lo":86915,"./lo.js":86915,"./lt":8948,"./lt.js":8948,"./lv":12548,"./lv.js":12548,"./me":98608,"./me.js":98608,"./mi":50333,"./mi.js":50333,"./mk":76611,"./mk.js":76611,"./ml":10999,"./ml.js":10999,"./mn":54098,"./mn.js":54098,"./mr":86111,"./mr.js":86111,"./ms":73717,"./ms-my":90265,"./ms-my.js":90265,"./ms.js":73717,"./mt":28980,"./mt.js":28980,"./my":96895,"./my.js":96895,"./nb":15348,"./nb.js":15348,"./ne":31493,"./ne.js":31493,"./nl":34419,"./nl-be":85576,"./nl-be.js":85576,"./nl.js":34419,"./nn":46907,"./nn.js":46907,"./oc-lnc":12321,"./oc-lnc.js":12321,"./pa-in":89239,"./pa-in.js":89239,"./pl":97627,"./pl.js":97627,"./pt":15703,"./pt-br":91623,"./pt-br.js":91623,"./pt.js":15703,"./ro":22747,"./ro.js":22747,"./ru":64420,"./ru.js":64420,"./sd":52148,"./sd.js":52148,"./se":12461,"./se.js":12461,"./si":12783,"./si.js":12783,"./sk":93306,"./sk.js":93306,"./sl":341,"./sl.js":341,"./sq":8608,"./sq.js":8608,"./sr":72451,"./sr-cyrl":73371,"./sr-cyrl.js":73371,"./sr.js":72451,"./ss":8812,"./ss.js":8812,"./sv":53820,"./sv.js":53820,"./sw":43615,"./sw.js":43615,"./ta":12869,"./ta.js":12869,"./te":12044,"./te.js":12044,"./tet":65861,"./tet.js":65861,"./tg":66999,"./tg.js":66999,"./th":20926,"./th.js":20926,"./tk":97443,"./tk.js":97443,"./tl-ph":59786,"./tl-ph.js":59786,"./tlh":92812,"./tlh.js":92812,"./tr":16952,"./tr.js":16952,"./tzl":9573,"./tzl.js":9573,"./tzm":55990,"./tzm-latn":92851,"./tzm-latn.js":92851,"./tzm.js":55990,"./ug-cn":52610,"./ug-cn.js":52610,"./uk":9498,"./uk.js":9498,"./ur":83970,"./ur.js":83970,"./uz":19006,"./uz-latn":26,"./uz-latn.js":26,"./uz.js":19006,"./vi":9962,"./vi.js":9962,"./x-pseudo":68407,"./x-pseudo.js":68407,"./yo":91962,"./yo.js":91962,"./zh-cn":28909,"./zh-cn.js":28909,"./zh-hk":34014,"./zh-hk.js":34014,"./zh-mo":90996,"./zh-mo.js":90996,"./zh-tw":36327,"./zh-tw.js":36327};function n(e){var t=l(e);return a(t)}function l(e){if(!a.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}n.keys=function(){return Object.keys(o)},n.resolve=l,e.exports=n,n.id=46700},77122:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDIiIGhlaWdodD0iNDMiIHZpZXdCb3g9IjAgMCA0MiA0MyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTI5Ljc2NzIgMTIuNzE3M0wxNy45MzQxIDI0LjMxNDRDMTcuMzEwMiAyNC45MjU4IDE2LjM2MTcgMjUuMDYxNiAxNS41OTEzIDI0LjY0OThMMi45MzU2MyAxNy44ODQ1QzEuNDEyNDggMTcuMDcwMiAxLjU2ODA3IDE0LjgzODEgMy4xODk0NiAxNC4yNDMxTDM4LjA1NDcgMS40NDc4OEMzOS42MzU4IDAuODY3NjQyIDQxLjE4MjMgMi4zODE5MyA0MC42MzU0IDMuOTc0ODVMMjguMzY4NyAzOS43MDU1QzI3LjgwNCA0MS4zNTA1IDI1LjU1MzYgNDEuNTQwNSAyNC43MjExIDQwLjAxMzNMMTkuMjAyNiAyOS44OTAzIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K"}}]); \ No newline at end of file diff --git a/dist/spa/js/chunk-common.cac51e83.js b/dist/spa/js/chunk-common.cac51e83.js deleted file mode 100644 index a62788d..0000000 --- a/dist/spa/js/chunk-common.cac51e83.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis["webpackChunkopen_block_explorer"]=globalThis["webpackChunkopen_block_explorer"]||[]).push([[64],{13385:(e,t,a)=>{"use strict";a.d(t,{p:()=>n});var o=a(78504);function n(){const e=(0,o.oR)(),t=e.state,a=e.getters;return{resources:{getDelegatedToOthers:()=>a["resources/getDelegatedToOthers"],getDelegatedFromOthers:()=>a["resources/getDelegatedFromOthers"],getSelfStaked:()=>a["resources/getSelfStaked"],getDelegatedToOthersAggregated:()=>a["resources/getDelegatedToOthersAggregated"],getLoading:()=>a["resources/getLoading"],isLoading:e=>a["resources/isLoading"](e),updateResources:t=>e.dispatch("resources/updateResources",t),updateSelfStaked:t=>e.dispatch("resources/updateSelfStaked",t),updateDelegatedToOthers:t=>e.dispatch("resources/updateDelegatedToOthers",t),delegateResources:t=>e.dispatch("resources/delegateResources",t),undelegateResources:t=>e.dispatch("resources/undelegateResources",t)},state:t,dispatch:(t,a,o)=>e.dispatch(t,a,o),commit:(t,a,o)=>e.commit(t,a,o)}}},78504:(e,t,a)=>{"use strict";a.d(t,{oR:()=>te});var o=a(23340),n=a(33100);function s(){return{address:"",creator:""}}var i=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function i(e){try{c(o.next(e))}catch(t){s(t)}}function r(e){try{c(o["throw"](e))}catch(t){s(t)}}function c(e){e.done?a(e.value):n(e.value).then(i,r)}c((o=o.apply(e,t||[])).next())}))};const r={setContract({dispatch:e,commit:t},a){return i(this,void 0,void 0,(function*(){t("setContract",a),yield e("getContractInfo",a)}))},getContractInfo({commit:e}){const t={creator:"bob"};e("setCreator",t.creator)}},c={getCreatorAddress({creator:e}){return e}},l={setContract(e,t){e.address=t},setCreator(e,t){e.creator=t}},u={namespaced:!0,actions:r,getters:c,mutations:l,state:s};function d(){return{token:{symbol:"",precision:0,amount:0,contract:""},bpList:[],producers:[],head_block_num:0,last_irreversible_block_num:0,head_block_producer:"",producerSchedule:[],ram_price:"0"}}const m={getToken({token:e}){return e}},p={setToken(e,t){e.token=t},setSymbol(e,t){e.token.symbol=t},setPrecision(e,t){e.token.precision=t},setBpList(e,t){e.bpList=t},setHead_block_num(e,t){e.head_block_num=t},setLIB(e,t){e.last_irreversible_block_num=t},setHead_block_producer(e,t){e.head_block_producer=t},setProducerSchedule(e,t){e.producerSchedule=t},setProducers(e,t){e.producers=t},setRamPrice(e,t){e.ram_price=t}};var g=a(39981),v=a.n(g),f=a(21889),h=a(30229),w=a(90347),y=a(17779),b=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function i(e){try{c(o.next(e))}catch(t){s(t)}}function r(e){try{c(o["throw"](e))}catch(t){s(t)}}function c(e){e.done?a(e.value):n(e.value).then(i,r)}c((o=o.apply(e,t||[])).next())}))};const _=(0,h.z)(),k={updateBpList({commit:e}){return b(this,void 0,void 0,(function*(){try{const t=(yield f.h.getSchedule()).active.producers,a=t.map((e=>e.producer_name));e("setProducerSchedule",a);const o=yield v().get(_.getS3ProducerBucket()),n=new DOMParser,s=n.parseFromString(o.data,"text/xml").getElementsByTagName("Contents"),i=s[s.length-1],r=i.childNodes[0].textContent,c=(yield v().get(`${_.getS3ProducerBucket()}/${r}`)).data;let l=(yield f.h.getProducers()).rows;l=l.filter((e=>1===e.is_active)),l=l.map((e=>{const t=c.find((t=>t.owner===e.owner));if(!t)return Object.assign(Object.assign({},e),{name:e.owner,location:""});try{return Object.assign(Object.assign({},e),{name:t.org.candidate_name,location:t.org.location.name})}catch(a){return e}})),c.sort(((e,t)=>t.total_votes-e.total_votes)),l.sort(((e,t)=>t.total_votes-e.total_votes)),e("setProducers",l),e("setBpList",c)}catch(t){y.error(t)}}))},updateBlockData({commit:e}){return b(this,void 0,void 0,(function*(){try{const t=yield f.h.getInfo();e("setHead_block_num",t.head_block_num),e("setLIB",t.last_irreversible_block_num),e("setHead_block_producer",t.head_block_producer)}catch(t){y.error(t)}}))},updateRamPrice({commit:e}){return b(this,void 0,void 0,(function*(){try{const t={code:"eosio",scope:"eosio",table:"rammarket",json:!0},a=(yield f.h.getTableRows(t)).rows[0],o=Number(a.base.balance.split(" ")[0]),n=Number(a.quote.balance.split(" ")[0]),s=1e3*n/(o-1e3),i=(0,w.xG)(s/.995,4,null,!0);e("setRamPrice",i)}catch(t){y.error(t)}}))}},x={namespaced:!0,actions:k,getters:m,mutations:p,state:d};var j=a(61753);const D=(0,h.z)();function T(){return{loading:!1,accountName:"",accountPermission:"active",user:null,autoLogin:null,isAuthenticated:!1,linkedAccounts:[],data:{account_name:"",core_liquid_balance:j.UInt64.from(0)},authorization:[],rexActions:[],TransactionId:"",TransactionError:"",rexbal:{},vote:[],abi:{abi:null},coreRexBalance:`0 ${D.getSystemToken().symbol}`,maturingRex:`0 ${D.getSystemToken().symbol}`,maturedRex:`0 ${D.getSystemToken().symbol}`,savingsRex:`0 ${D.getSystemToken().symbol}`,tlosRexRatio:1,rexfund:0,chainId:""}}const S={account(e){return e},isAuthenticated(e){return e.isAuthenticated},accountName(e){return e.accountName},getAccountData(e){return e.data},getUser(e){return e.user}};var P=a(60499);const A=(0,h.z)().getSystemToken().symbol,q={setUser(e,t){e.user=t?(0,P.Xl)(t):t},setAccountName(e,t){e.accountName=t},setAutoLogin(e,t){e.autoLogin=t},setAccountData(e,t){var a;e.data=t,e.vote=(null===(a=null===t||void 0===t?void 0:t.voter_info)||void 0===a?void 0:a.producers.map((e=>e.toString())))||[]},setTransaction(e,t){e.TransactionId=t},setTransactionError(e,t){e.TransactionError=t},setRexActions(e,t){e.rexActions=t},setRexbal(e,t){e.rexbal=t.rexbal,e.coreRexBalance=(0,w.xG)(t.coreBalance,4,A),e.maturedRex=(0,w.xG)(t.maturedRex,4,A),e.maturingRex=(0,w.xG)(t.maturingRex,4,A),e.savingsRex=(0,w.xG)(t.savingsRex,4,A)},setVote(e,t){e.vote=t.sort()},setABI(e,t){e.abi=t},setTlosRexRatio(e,t){e.tlosRexRatio=t},setAccountPermission(e,t){e.accountPermission=t},setIsAuthenticated(e,t){e.isAuthenticated=t},setRexFund(e,t){e.rexfund=t},setChainId(e,t){e.chainId=t}};var N=a(68142),I=a(17779),z=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function i(e){try{c(o.next(e))}catch(t){s(t)}}function r(e){try{c(o["throw"](e))}catch(t){s(t)}}function c(e){e.done?a(e.value):n(e.value).then(i,r)}c((o=o.apply(e,t||[])).next())}))};const C=(0,h.z)(),M=C.getSystemToken().symbol,R={login({commit:e},{account:t,authenticator:a}){return z(this,void 0,void 0,(function*(){if(yield a.init(),!t){const t=yield a.shouldRequestAccountName();if(t)return void e("setRequestAccount",!0)}const o=yield a.login();if(null===o||void 0===o?void 0:o.length){const t=new N.V(o[0]),n=t.requestPermission,s=yield t.getAccountName();e("setAccountPermission",n||"active"),e("setUser",t),e("setIsAuthenticated",!0),e("setAccountName",s),e("setChainId",a.chains[0].chainId),localStorage.setItem(`account_${a.chains[0].chainId}`,s),localStorage.setItem(`autoLogin_${a.chains[0].chainId}`,a.getName())}}))},logout({commit:e,state:t}){e("setIsAuthenticated",!1),e("setAccountName",""),e("setUser",null),localStorage.removeItem(`account_${t.chainId}`),localStorage.removeItem(`autoLogin_${t.chainId}`)},loadAccountData({commit:e,state:t}){return z(this,void 0,void 0,(function*(){try{const a=yield f.h.getAccount(t.accountName);e("setAccountData",a)}catch(a){return}}))},updateRexData({commit:e},{account:t}){return z(this,void 0,void 0,(function*(){const a={code:"eosio",limit:"2",lower_bound:t,scope:"eosio",table:"rexbal",reverse:!1,upper_bound:t},o=yield f.h.getTableRows(a),n={code:"eosio",scope:"eosio",table:"rexpool",json:!0,reverse:!1},s=(yield f.h.getTableRows(n)).rows[0],i={code:"eosio",limit:"1",lower_bound:t,scope:"eosio",table:"rexfund",reverse:!1,upper_bound:t},r=(yield f.h.getTableRows(i)).rows[0],c=(null===r||void 0===r?void 0:r.balance)?Number(r.balance.split(" ")[0]):0;e("setRexFund",c);const l=o.rows[0],u=l&&l.rex_balance?parseFloat(l.rex_balance.split(" ")[0]):0,d=Number(s.total_rex.split(" ")[0]),m=Number(s.total_lendable.split(" ")[0]),p=d>0?m/d:1;e("setTlosRexRatio",p);let g=d>0?p*u:0;g+=c;let v=0,h=l?p*(Number(l.matured_rex)/1e4):0,w=0;if(l&&l.rex_maturities&&l.rex_maturities.length>0){const e=(new Date).getFullYear(),t=(new Date).getTime();l.rex_maturities.forEach((a=>{const o=new Date(a.first).getFullYear(),n=new Date(a.first).getTime();o-e>1?v=p*(Number(a.second)/1e4):n-t<0?h+=p*(Number(a.second)/1e4):w=p*(Number(a.second)/1e4)}))}o.rows.length>0&&e("setRexbal",{rexbal:o.rows[0],coreBalance:g,maturingRex:w,savingsRex:v,maturedRex:h});const y=["eosio:sellrex","eosio:buyrex","eosio:deposit","eosio:withdraw","eosio:unstaketorex","eosio:cnclrexorder","eosio:rentcpu","eosio:rentnet","eosio:fundcpuloan","eosio:fundnetloan","eosio:defcpuloan","eosio:defnetloan","eosio:updaterex","eosio:consolidate","eosio:closerex","eosio:mvfrsavings","eosio:mvtosavings","eosio:rexexec"].join(","),b=(yield f.h.getActions(t,y)).actions;e("setRexActions",b)}))},sendAction({state:e,dispatch:t},{account:a,data:o,name:n,actor:s,permission:i}){var r,c,l;return z(this,void 0,void 0,(function*(){const u=[{account:null!==(r=a)&&void 0!==r?r:e.abi.account_name,name:n,authorization:[{actor:null!==(c=s)&&void 0!==c?c:e.accountName,permission:null!==(l=i)&&void 0!==l?l:e.accountPermission}],data:o}];return t("sendTransaction",u)}))},sendTransaction({commit:e,state:t},a){return z(this,void 0,void 0,(function*(){let o=null;try{o=yield t.user.signTransaction({actions:a},{blocksBehind:3,expireSeconds:180}),e("setTransaction",o.transactionId)}catch(n){I.error(n),e("setTransactionError",n)}return o}))},stakeRex({commit:e,dispatch:t,state:a},{amount:o}){return z(this,void 0,void 0,(function*(){let n=null;const s=(0,w.xG)(o,4,M,!0),i=[{account:"eosio",name:"deposit",authorization:[{actor:a.accountName,permission:a.accountPermission}],data:{owner:a.accountName,amount:s}},{account:"eosio",name:"buyrex",authorization:[{actor:a.accountName,permission:a.accountPermission}],data:{from:a.accountName,amount:s}}];try{n=yield a.user.signTransaction({actions:i},{blocksBehind:3,expireSeconds:180}),e("setTransaction",n.transactionId),t("loadAccountData"),t("updateRexData",{account:a.accountName})}catch(r){e("setTransactionError",r)}}))},unstakeRex({commit:e,dispatch:t,state:a},{amount:o}){return z(this,void 0,void 0,(function*(){let n=null;const s=a.rexbal.rex_balance?Number(a.rexbal.rex_balance.split(" ")[0]):0;if(0===s)return;const i=(0,w.xG)(o,4,M,!0),r=(0,w.xG)(+o/a.tlosRexRatio,4,null,!0),c=[{account:"eosio",name:"sellrex",authorization:[{actor:a.accountName,permission:a.accountPermission}],data:{from:a.accountName,rex:`${r} REX`}},{account:"eosio",name:"withdraw",authorization:[{actor:a.accountName,permission:a.accountPermission}],data:{owner:a.accountName,amount:i}}];try{n=yield a.user.signTransaction({actions:c},{blocksBehind:3,expireSeconds:180}),e("setTransaction",n.transactionId),t("loadAccountData"),t("updateRexData",{account:a.accountName})}catch(l){e("setTransactionError",l)}}))},unstakeRexFund({commit:e,state:t},{amount:a}){return z(this,void 0,void 0,(function*(){let o=null;const n=(0,w.xG)(a,4,M,!0),s=[{account:"eosio",name:"withdraw",authorization:[{actor:t.accountName,permission:t.accountPermission}],data:{owner:t.accountName,amount:n}}];try{o=yield t.user.signTransaction({actions:s},{blocksBehind:3,expireSeconds:180}),e("setTransaction",o.transactionId)}catch(i){e("setTransactionError",i)}}))},stakeCpuNetRex({commit:e,dispatch:t,state:a},{cpuAmount:o,netAmount:n}){return z(this,void 0,void 0,(function*(){let s=null;const i=(0,w.xG)(o,4,M,!0),r=(0,w.xG)(n,4,M,!0),c=[{account:"eosio",name:"unstaketorex",authorization:[{actor:a.accountName,permission:a.accountPermission}],data:{owner:a.accountName,receiver:a.accountName,from_net:r,from_cpu:i}}];try{s=yield a.user.signTransaction({actions:c},{blocksBehind:3,expireSeconds:180}),e("setTransaction",s.transactionId),t("loadAccountData"),t("updateRexData",{account:a.accountName})}catch(l){e("setTransactionError",l)}}))},unstakeCpuNetRex({commit:e,dispatch:t,state:a},{cpuAmount:o,netAmount:n}){return z(this,void 0,void 0,(function*(){let s=null;const i=(0,w.xG)(o,4,M,!0),r=(0,w.xG)(n,4,M,!0),c=[{account:"eosio",name:"stakefromrex",authorization:[{actor:a.accountName,permission:a.accountPermission}],data:{owner:a.accountName,receiver:a.accountName,from_net:r,from_cpu:i}}];try{s=yield a.user.signTransaction({actions:c},{blocksBehind:3,expireSeconds:180}),e("setTransaction",s.transactionId),t("loadAccountData"),t("updateRexData",{account:a.accountName})}catch(l){e("setTransactionError",l)}}))},resetTransaction({commit:e}){e("setTransaction",""),e("setTransactionError","")},updateABI({commit:e},t){return z(this,void 0,void 0,(function*(){const a=yield f.h.getABI(t);e("setABI",a)}))},sendVoteTransaction({commit:e,state:t}){return z(this,void 0,void 0,(function*(){let a=null;const o=[{account:"eosio",name:"voteproducer",authorization:[{actor:t.accountName,permission:t.accountPermission}],data:{voter:t.accountName,proxy:"",producers:t.vote}}];try{a=yield t.user.signTransaction({actions:o},{blocksBehind:3,expireSeconds:180}),e("setTransaction",a.transactionId)}catch(n){e("setTransactionError",n)}}))},buyRam({commit:e,dispatch:t,state:a},{amount:o,receivingAccount:n}){return z(this,void 0,void 0,(function*(){let s=null;const i=[{account:"eosio",name:"buyram",authorization:[{actor:a.accountName,permission:a.accountPermission}],data:{payer:a.accountName,receiver:n,quant:o}}];try{s=yield a.user.signTransaction({actions:i},{blocksBehind:3,expireSeconds:180}),e("setTransaction",s.transactionId),t("loadAccountData")}catch(r){e("setTransactionError",r)}}))},buyRamBytes({commit:e,dispatch:t,state:a},{amount:o,receivingAccount:n}){return z(this,void 0,void 0,(function*(){let s=null;const i=[{account:"eosio",name:"buyrambytes",authorization:[{actor:a.accountName,permission:a.accountPermission}],data:{payer:a.accountName,receiver:n,bytes:o}}];try{s=yield a.user.signTransaction({actions:i},{blocksBehind:3,expireSeconds:180}),e("setTransaction",s.transactionId),t("loadAccountData")}catch(r){e("setTransactionError",r)}}))},sellRam({commit:e,dispatch:t,state:a},{amount:o}){return z(this,void 0,void 0,(function*(){let n=null;const s=[{account:"eosio",name:"sellram",authorization:[{actor:a.accountName,permission:a.accountPermission}],data:{account:a.accountName,bytes:o}}];try{n=yield a.user.signTransaction({actions:s},{blocksBehind:3,expireSeconds:180}),e("setTransaction",n.transactionId),t("loadAccountData")}catch(i){e("setTransactionError",i)}}))},moveToSavings({commit:e,dispatch:t,state:a},{amount:o}){return z(this,void 0,void 0,(function*(){let n=null;const s=(0,w.xG)(+o/a.tlosRexRatio,4,"REX",!0),i=[{account:"eosio",name:"mvtosavings",authorization:[{actor:a.accountName,permission:a.accountPermission}],data:{owner:a.accountName,rex:s}}];try{n=yield a.user.signTransaction({actions:i},{blocksBehind:3,expireSeconds:180}),e("setTransaction",n.transactionId),t("loadAccountData"),t("updateRexData",{account:a.accountName})}catch(r){e("setTransactionError",r)}}))},moveFromSavings({commit:e,dispatch:t,state:a},{amount:o}){return z(this,void 0,void 0,(function*(){let n=null;const s=(0,w.xG)(+o/a.tlosRexRatio,4,"REX",!0),i=[{account:"eosio",name:"mvfrsavings",authorization:[{actor:a.accountName,permission:a.accountPermission}],data:{owner:a.accountName,rex:s}}];try{n=yield a.user.signTransaction({actions:i},{blocksBehind:3,expireSeconds:180}),e("setTransaction",n.transactionId),t("loadAccountData"),t("updateRexData",{account:a.accountName})}catch(r){e("setTransactionError",r)}}))}},Z={namespaced:!0,getters:S,mutations:q,actions:R,state:T};function O(){return{transaction:{},transactionId:"",blockNum:0,timestamp:"",executed:!1,cpuUsage:0,netUsage:0,actionCount:0,irreversable:!1,actions:[],transactionFound:!0}}var W=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function i(e){try{c(o.next(e))}catch(t){s(t)}}function r(e){try{c(o["throw"](e))}catch(t){s(t)}}function c(e){e.done?a(e.value):n(e.value).then(i,r)}c((o=o.apply(e,t||[])).next())}))};const L={updateTransaction({commit:e,state:t}){return W(this,void 0,void 0,(function*(){const a=yield f.h.getTransaction(t.transactionId);a?e("setTransaction",a):e("setTransactionFound",!1)}))},updateTransactionId({commit:e},t){e("setTransactionId",t)}},F={getTransaction({transaction:e}){return e},getTransactionId({transactionId:e}){return e}},H={setTransaction(e,t){if(t&&t.actions&&t.actions.length>0){e.transaction=t,e.executed=t.executed||!1;const a=t.actions[0];e.blockNum=a.block_num,e.timestamp=a.timestamp,e.cpuUsage=a.cpu_usage_us,e.netUsage=8*a.net_usage_words,e.actionCount=t.actions.length,e.irreversable=t.lib>a.block_num,e.actions=t.actions,e.transactionFound=!0}else e.transactionFound=!1},setTransactionId(e,t){e.transactionId=t},setTimestamp(e,t){e.timestamp=t},setBlockNum(e,t){e.blockNum=t},setExecuted(e,t){e.executed=t},setCpuUsage(e,t){e.cpuUsage=t},setNetUsage(e,t){e.netUsage=t},setActionCount(e,t){e.actionCount=t},setIrreversable(e,t){e.irreversable=t},setTransactionFounde(e,t){e.transactionFound=t}},V={namespaced:!0,actions:L,getters:F,mutations:H,state:O};function U(){return{currentAccount:"",toOthers:[],toOthersAggregated:0,fromOthers:null,selfStaked:null,loading:[],forceUpdate:!1}}const E={getDelegatedToOthers(e){var t;return null!==(t=e.toOthers)&&void 0!==t?t:[]},getDelegatedToOthersAggregated(e){var t;return null!==(t=e.toOthersAggregated)&&void 0!==t?t:0},getDelegatedFromOthers(e){return e.fromOthers},getSelfStaked(e){return e.selfStaked},getLoading(e){return e.loading},isLoading(e){return t=>e.loading.includes(t)}},B={setCurrentAccount(e,t){e.currentAccount=t},setDelegatedFromOthers(e,t){e.fromOthers=t},setDelegatedToOthers(e,t){e.toOthers=t},setDelegatedToOthersAggregated(e,t){e.toOthersAggregated=t},setSelfStaked(e,t){e.selfStaked=t},setLoading(e,t){e.loading.includes(t)||e.loading.push(t)},unsetLoading(e,t){e.loading=e.loading.filter((e=>e!==t))},setForceUpdate(e,t){e.forceUpdate=t}};var Q=a(17779),Y=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function i(e){try{c(o.next(e))}catch(t){s(t)}}function r(e){try{c(o["throw"](e))}catch(t){s(t)}}function c(e){e.done?a(e.value):n(e.value).then(i,r)}c((o=o.apply(e,t||[])).next())}))};const $=(0,h.z)(),G=$.getSystemToken().symbol,K=$.getSystemToken().precision,J={updateResources(e,{account:t,force:a}){var o;return Y(this,void 0,void 0,(function*(){const n=null!==(o=t)&&void 0!==o?o:e.rootState.account.accountName;try{e.commit("setLoading","updateResources"),e.commit("setForceUpdate",a),e.state.currentAccount===n&&e.rootState.account.data&&!a||(yield Promise.all([e.dispatch("updateSelfStaked",n),e.dispatch("updateDelegatedToOthers",n)]),e.commit("setCurrentAccount",n))}catch(s){Q.error("Error:",s)}finally{e.commit("setForceUpdate",!1),e.commit("unsetLoading","updateResources")}}))},updateSelfStaked(e,t){var a,o,n,s,i,r,c,l,u,d;return Y(this,void 0,void 0,(function*(){try{e.commit("setLoading","updateSelfStaked"),(e.state.currentAccount!==t||(null===(a=e.state.selfStaked)||void 0===a?void 0:a.from)!==t||(null===(o=e.state.selfStaked)||void 0===o?void 0:o.to)!==t||e.state.forceUpdate)&&(yield e.dispatch("account/loadAccountData",t,{root:!0}));const m=e.rootState.account.data,p=Number(null!==(s=null===(n=m.self_delegated_bandwidth)||void 0===n?void 0:n.net_weight.value)&&void 0!==s?s:0),g=Number(null!==(r=null===(i=m.self_delegated_bandwidth)||void 0===i?void 0:i.cpu_weight.value)&&void 0!==r?r:0),v=(0,w.xG)(p,K,G,!0),f=(0,w.xG)(g,K,G,!0),h={from:t,to:t,net_weight:v,cpu_weight:f},y=Number(null!==(l=null===(c=m.net_weight)||void 0===c?void 0:c.value)&&void 0!==l?l:0)/Math.pow(10,K),b=Number(null!==(d=null===(u=m.cpu_weight)||void 0===u?void 0:u.value)&&void 0!==d?d:0)/Math.pow(10,K),_=y-p,k=b-g,x=(0,w.xG)(_,K,G,!0),j=(0,w.xG)(k,K,G,!0),D={from:"not-available",to:t,net_weight:x,cpu_weight:j};e.commit("setDelegatedFromOthers",D),e.commit("setSelfStaked",h)}catch(m){Q.error("Error:",m)}finally{e.commit("unsetLoading","updateSelfStaked")}}))},updateDelegatedToOthers({commit:e},t){return Y(this,void 0,void 0,(function*(){try{e("setLoading","updateDelegatedToOthers");const a={code:"eosio",limit:"200",scope:t,table:"delband"},o=(yield f.h.getTableRows(a)).rows,n=o.filter((e=>e.to!==t)),s=n.reduce(((e,t)=>e+parseFloat(t.net_weight)),0),i=n.reduce(((e,t)=>e+parseFloat(t.cpu_weight)),0),r=i+s;e("setCurrentAccount",t),e("setDelegatedToOthers",o),e("setDelegatedToOthersAggregated",r)}catch(a){Q.error("Error:",a)}finally{e("unsetLoading","updateDelegatedToOthers")}}))},delegateResources({commit:e,dispatch:t},a){return Y(this,void 0,void 0,(function*(){const{from:o,to:n,net_weight:s,cpu_weight:i}=a;try{e("setLoading","delegateResources");const a=Number(null!==s&&void 0!==s?s:"0")+Number(null!==i&&void 0!==i?i:"0"),r=[{account:"eosio",name:"delegatebw",authorization:[{actor:o,permission:this.state.account.accountPermission}],data:{from:o,receiver:n,stake_net_quantity:s,stake_cpu_quantity:i,transfer:!1,amount:a}}];yield t("account/sendTransaction",r,{root:!0}),yield t("updateResources",{account:o,force:!0})}catch(r){e("setTransactionError",r)}finally{e("unsetLoading","delegateResources")}}))},undelegateResources({commit:e,dispatch:t},a){return Y(this,void 0,void 0,(function*(){const{from:o,to:n,net_weight:s,cpu_weight:i}=a;try{e("setLoading","undelegateResources");const a=[{account:"eosio",name:"undelegatebw",authorization:[{actor:o,permission:"active"}],data:{from:o,receiver:n,unstake_net_quantity:s,unstake_cpu_quantity:i}}];yield t("account/sendTransaction",a,{root:!0}),yield t("updateResources",{account:o,force:!0})}catch(r){Q.error("Error",r)}finally{e("unsetLoading","undelegateResources")}}))},resetResources({commit:e}){e("setDelegatedFromOthers",null),e("setDelegatedToOthers",[]),e("setSelfStaked",null)}},X={namespaced:!0,actions:J,getters:E,mutations:B,state:U},ee=Symbol("vuex-key");(0,o.h)((function(){const e=(0,n.MT)({modules:{contract:u,chain:x,account:Z,transaction:V,resources:X},strict:!1});return e}));function te(){return(0,n.oR)(ee)}},71130:(e,t,a)=>{"use strict";function o(e=1e3){return new Promise((t=>setTimeout(t,e)))}a.d(t,{D:()=>n,_:()=>o});const n=(e,t)=>{let a;return(...o)=>{clearTimeout(a),a=setTimeout((()=>{e(...o)}),t)}}},52783:(e,t,a)=>{"use strict";a.d(t,{Z:()=>k});var o=a(59835),n=a(61957),s=a(86970);const i=(0,o.Uk)("Searching...");function r(e,t,a,r,c,l){const u=(0,o.up)("q-icon"),d=(0,o.up)("q-item-label"),m=(0,o.up)("q-item-section"),p=(0,o.up)("q-item"),g=(0,o.up)("q-select");return(0,o.wg)(),(0,o.j4)(g,{borderless:"",dense:"",filled:"","use-input":"","hide-selected":"","fill-input":"","hide-bottom-space":"",placeholder:"name",loading:e.isLoading,"model-value":e.inputValue,options:e.options,"option-disable":e=>e.isHeader,"reactive-rules":e.withValidation,rules:e.withValidation?[e=>!!e||"Field is required",t=>e.isLoading||1===e.options.filter((e=>e.label===t)).length||"Field invalid"]:[],error:e.withValidation&&e.isError,onInputValue:t[0]||(t[0]=t=>e.inputValue=t),onKeyup:(0,n.D2)(e.handleSelected,["enter"])},(0,o.Nv)({"no-option":(0,o.w5)((()=>[(0,o.Wm)(p,null,{default:(0,o.w5)((()=>[(0,o.Wm)(m,{class:"text-center"},{default:(0,o.w5)((()=>[e.isLoading?((0,o.wg)(),(0,o.j4)(d,{key:0},{default:(0,o.w5)((()=>[i])),_:1})):((0,o.wg)(),(0,o.j4)(d,{key:1},{default:(0,o.w5)((()=>[(0,o.Uk)((0,s.zw)(e.inputValue?"Nothing found":"Search for an account name"),1)])),_:1}))])),_:1})])),_:1})])),option:(0,o.w5)((t=>[t.opt.isHeader?((0,o.wg)(),(0,o.j4)(d,{key:0,header:""},{default:(0,o.w5)((()=>[(0,o.Uk)((0,s.zw)(t.opt.label),1)])),_:2},1024)):((0,o.wg)(),(0,o.j4)(p,(0,o.dG)({key:1},t.itemProps,{exact:"exact",clickable:"clickable",onClick:a=>e.handleSelected(t.opt.to)}),{default:(0,o.w5)((()=>[(0,o.Wm)(m,null,{default:(0,o.w5)((()=>[(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,s.zw)(t.opt.label),1)])),_:2},1024)])),_:2},1024)])),_:2},1040,["onClick"]))])),_:2},[e.removeSearchIcon?void 0:{name:"prepend",fn:(0,o.w5)((()=>[(0,o.Wm)(u,{class:"rotate-90",name:"search",size:"20px"})]))}]),1032,["loading","model-value","options","option-disable","reactive-rules","rules","error","onKeyup"])}var c=a(60499),l=a(21889),u=a(19302),d=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function i(e){try{c(o.next(e))}catch(t){s(t)}}function r(e){try{c(o["throw"](e))}catch(t){s(t)}}function c(e){e.done?a(e.value):n(e.value).then(i,r)}c((o=o.apply(e,t||[])).next())}))};const m=(0,o.aZ)({name:"AccountSearch",props:{modelValue:{type:String},withValidation:{type:Boolean,default:!1},removeSearchIcon:{type:Boolean,default:!1},emitUpdateOnInput:{type:Boolean,default:!1}},emits:["update:modelValue","remove"],setup(e,t){const a=(0,u.Z)(),n=(0,c.iH)([]),s=(0,c.iH)(!1),i=(0,c.iH)(!1),r=(0,c.iH)("");(0,o.YP)(r,(()=>d(this,void 0,void 0,(function*(){if(""===r.value)return void(n.value=[]);s.value=!0,i.value=!1;const e=r.value.toLowerCase(),t=yield p(e);n.value=[...t],s.value=!1})))),(0,o.YP)(e,(e=>d(this,void 0,void 0,(function*(){e.modelValue&&(r.value=e.modelValue,yield g(e.modelValue))})))),(0,o.bv)((()=>d(this,void 0,void 0,(function*(){e.modelValue&&(r.value=e.modelValue,yield g(e.modelValue))}))));const m=setTimeout((()=>0),0);function p(e){return clearTimeout(m),new Promise((t=>{setTimeout((()=>d(this,void 0,void 0,(function*(){const a=yield g(e);r.value===e&&t(a)}))),500)}))}function g(e){return d(this,void 0,void 0,(function*(){try{const t=[],a=yield l.h.getAccountByScope(v(e).toString());return a?t.push({label:v(e),to:v(e),isHeader:!1}):i.value=!0,t}catch(t){return void(i.value=!0)}}))}function v(e){return e.replace(/^[\s.]+|[\s.]+$/g,"")}function f(e){return d(this,void 0,void 0,(function*(){if(r.value){if("string"===typeof e)return r.value=e,void t.emit("update:modelValue",r.value);try{return yield l.h.getAccount(r.value.toLowerCase()),void t.emit("update:modelValue",r.value)}catch(o){a.notify(`account ${r.value} not found!`)}}}))}return{inputValue:r,options:n,isLoading:s,isError:i,handleSelected:f}}});var p=a(11639),g=a(32259),v=a(22857),f=a(490),h=a(76749),w=a(33115),y=a(69984),b=a.n(y);const _=(0,p.Z)(m,[["render",r]]),k=_;b()(m,"components",{QSelect:g.Z,QIcon:v.Z,QItem:f.Z,QItemSection:h.Z,QItemLabel:w.Z})},54397:(e,t,a)=>{"use strict";a.d(t,{Z:()=>A});var o=a(59835),n=a(86970);const s=e=>((0,o.dD)("data-v-6fab27e1"),e=e(),(0,o.Cn)(),e),i={key:0,class:"section-title"},r=["src"],c={class:"q-pl-md"},l={key:2,class:"section-title"},u={class:"testnet-logo-container"},d=["src"],m=s((()=>(0,o._)("div",{class:"testnet-text"},"TESTNET",-1))),p={class:"q-pl-md"};function g(e,t,a,s,g,v){const f=(0,o.up)("q-item-section"),h=(0,o.up)("q-item"),w=(0,o.up)("q-separator"),y=(0,o.up)("q-list"),b=(0,o.Q2)("ripple");return(0,o.wg)(),(0,o.j4)(y,null,{default:(0,o.w5)((()=>[e.mainnets.length>0?((0,o.wg)(),(0,o.iD)("div",i,"MAINNETS")):(0,o.kq)("",!0),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.mainnets,((t,a)=>(0,o.wy)(((0,o.wg)(),(0,o.j4)(h,{key:`mainnet-${a}`,class:(0,n.C_)({selected:e.isChainSelected(t)}),clickable:"",onClick:a=>e.chainSelected(t)},{default:(0,o.w5)((()=>[(0,o._)("img",{class:"sidebar-logo",src:t.getSmallLogoPath()},null,8,r),(0,o.Wm)(f,null,{default:(0,o.w5)((()=>[(0,o._)("div",c,(0,n.zw)(t.getDisplay()),1)])),_:2},1024)])),_:2},1032,["class","onClick"])),[[b]]))),128)),e.testnets.length>0&&e.mainnets.length>0?((0,o.wg)(),(0,o.j4)(w,{key:1,class:"separator"})):(0,o.kq)("",!0),e.testnets.length>0?((0,o.wg)(),(0,o.iD)("div",l,"TESTNETS")):(0,o.kq)("",!0),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.testnets,((t,a)=>(0,o.wy)(((0,o.wg)(),(0,o.j4)(h,{key:`testnet-${a}`,class:(0,n.C_)({selected:e.isChainSelected(t)}),clickable:"",onClick:a=>e.chainSelected(t)},{default:(0,o.w5)((()=>[(0,o._)("div",u,[(0,o._)("img",{class:"sidebar-logo sidebar-logo--testnet",src:t.getSmallLogoPath()},null,8,d),m]),(0,o.Wm)(f,null,{default:(0,o.w5)((()=>[(0,o._)("div",p,(0,n.zw)(t.getDisplay()),1)])),_:2},1024)])),_:2},1032,["class","onClick"])),[[b]]))),128))])),_:1})}var v=a(30229),f=a(18910);const h=v.Z.get(),w=(0,o.aZ)({name:"ChainsSelector",props:{onChainSelected:{type:Function,required:!1},isChainSelected:{type:Function,required:!1,default:()=>!1}},setup(e){const t=(0,f.yj)(),a=(0,f.tv)(),n=(0,o.Fl)((()=>i(h.getMainnets()))),s=(0,o.Fl)((()=>i(h.getTestnets())));function i(e){return e.sort(((e,t)=>e.getName().localeCompare(t.getName())))}function r(o){e.isChainSelected(o)||(a.push({path:t.path,query:{network:o.getName()}}),e.onChainSelected(o))}return{mainnets:n,testnets:s,chainSelected:r}}});var y=a(11639),b=a(13246),_=a(490),k=a(76749),x=a(50926),j=a(77741),D=a(51722),T=a(69984),S=a.n(T);const P=(0,y.Z)(w,[["render",g],["__scopeId","data-v-6fab27e1"]]),A=P;S()(w,"components",{QList:b.Z,QItem:_.Z,QItemSection:k.Z,QSeparator:x.Z,QColor:j.Z}),S()(w,"directives",{Ripple:D.Z})},97114:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var o=a(59835),n=a(86970);const s={class:"no-wrap"};function i(e,t,a,i,r,c){const l=(0,o.up)("q-tooltip");return(0,o.wg)(),(0,o.iD)("div",s,[(0,o.Uk)((0,n.zw)(e.friendlyDate)+" ",1),(0,o.Wm)(l,{anchor:"top middle",self:"bottom middle",offset:[10,10]},{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(e.tooltipDate),1)])),_:1})])}var r=a(43878);const c=(0,o.aZ)({name:"DateField",props:{timestamp:{type:String,default:""},showAge:{type:Boolean,default:!0}},setup(e){const t=(0,o.Fl)((()=>{const t=r.utc(e.timestamp,"YYYY-MM-DD HH:mm:ssZ");return e.showAge?t.fromNow():`${t.local().format("YYYY-MM-DD HH:mm:ss")}`})),a=(0,o.Fl)((()=>{const t=r.utc(e.timestamp,"YYYY-MM-DD HH:mm:ssZ");return e.showAge?`${t.local().format("YYYY-MM-DD HH:mm:ss")}`:t.fromNow()}));return{friendlyDate:t,tooltipDate:a}}});var l=a(11639),u=a(46858),d=a(69984),m=a.n(d);const p=(0,l.Z)(c,[["render",i]]),g=p;m()(c,"components",{QTooltip:u.Z})},59311:(e,t,a)=>{"use strict";a.d(t,{Z:()=>Ve});var o=a(59835),n=a(86970),s=a(61957);const i={class:"row col-12 q-mt-xs justify-center text-left trx-table container-max-width"},r={class:"row trx-table--main-container"},c={class:"row col-12 q-mt-lg"},l={class:"col-auto q-mr-xl justify-start trx-table--topleft-col"},u={class:"row flex-grow-1"},d={class:"col"},m={class:"trx-table--title"},p={class:"row"},g={class:"col"},v={key:0,class:"row"},f={class:"col"},h={key:0,class:"col trx-table--topright-col"},w={class:"row justify-end q-mb-xl"},y={class:"col-auto row flex trx-table--filter-buttons"},b=(0,o._)("span",{class:"q-pr-sm"},"clear filters",-1),_={class:"q-pa-md dropdown-filter"},k={class:"row"},x={class:"q-pa-md dropdown-filter"},j={class:"row"},D=(0,o.Uk)("OK"),T={class:"q-pa-md dropdown-filter"},S={class:"row"},P={class:"row items-center justify-end"},A={class:"row items-center justify-end"},q={class:"row justify-center full-width q-py-xs"},N={class:"row"},I={class:"row items-center justify-end"},z={class:"row items-center justify-end"},C={class:"q-pa-md dropdown-filter"},M={class:"row"},R={key:0,class:"row justify-end"},Z={class:"row col-12 table-container"},O={class:"col-auto"},W={class:"q-pt-xs"},L={class:"row justify-left text-weight-light"},F={class:"row col-12 items-center justify-end q-mt-md q-mb-sm"},H={class:"col-auto"},V={class:"col-auto"},U=(0,o.Uk)(" First "),E=(0,o.Uk)(" Last ");function B(e,t,a,B,Q,Y){const $=(0,o.up)("q-toggle"),G=(0,o.up)("q-btn"),K=(0,o.up)("AccountSearch"),J=(0,o.up)("q-btn-dropdown"),X=(0,o.up)("q-icon"),ee=(0,o.up)("q-input"),te=(0,o.up)("q-date"),ae=(0,o.up)("q-popup-proxy"),oe=(0,o.up)("q-time"),ne=(0,o.up)("TokenSearch"),se=(0,o.up)("q-separator"),ie=(0,o.up)("q-th"),re=(0,o.up)("q-tr"),ce=(0,o.up)("AccountFormat"),le=(0,o.up)("q-td"),ue=(0,o.up)("DateField"),de=(0,o.up)("ActionFormat"),me=(0,o.up)("DataFormat"),pe=(0,o.up)("q-table"),ge=(0,o.up)("q-item-section"),ve=(0,o.up)("q-item"),fe=(0,o.up)("q-list"),he=(0,o.up)("q-space"),we=(0,o.Q2)("close-popup");return(0,o.wg)(),(0,o.iD)("div",i,[(0,o._)("div",r,[(0,o._)("div",c,[(0,o._)("div",l,[(0,o._)("div",u,[(0,o._)("div",d,[(0,o._)("p",m,(0,n.zw)(e.tableTitle),1)])]),(0,o._)("div",p,[(0,o._)("div",g,[(0,o.Wm)($,{modelValue:e.showAge,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showAge=t),"left-label":"",label:"Show timestamp as relative"},null,8,["modelValue"])])]),e.toggleEnabled?((0,o.wg)(),(0,o.iD)("div",v,[(0,o._)("div",f,[(0,o.Wm)($,{modelValue:e.enableLiveTransactions,"onUpdate:modelValue":t[1]||(t[1]=t=>e.enableLiveTransactions=t),"left-label":"",label:"Live transactions",disable:1!==e.paginationSettings.page},null,8,["modelValue","disable"])])])):(0,o.kq)("",!0)]),e.filtersEnabled?((0,o.wg)(),(0,o.iD)("div",h,[(0,o._)("div",w,[(0,o._)("div",y,[""!==e.filter?((0,o.wg)(),(0,o.j4)(G,{key:0,dense:"",flat:"",round:"",icon:"close",color:"primary",onClick:e.clearFilters},{default:(0,o.w5)((()=>[b])),_:1},8,["onClick"])):(0,o.kq)("",!0),e.showAccountFilter?((0,o.wg)(),(0,o.j4)(J,{key:1,ref:"accounts_dropdown",class:"q-ml-xs q-mr-xs button-primary q-btn--no-text-transform","no-caps":"",color:""===e.accountsDisplay?"primary":"secondary",label:""===e.accountsDisplay?"Accounts":e.accountsDisplay,onClick:t[4]||(t[4]=t=>e.accountsModel="")},{default:(0,o.w5)((()=>[(0,o._)("div",_,[(0,o._)("div",k,[(0,o.Wm)(K,{modelValue:e.accountsModel,"onUpdate:modelValue":[t[2]||(t[2]=t=>e.accountsModel=t),t[3]||(t[3]=t=>e.toggleDropdown(e.$refs.accounts_dropdown))]},null,8,["modelValue"])])])])),_:1},8,["color","label"])):(0,o.kq)("",!0),(0,o.Wm)(J,{ref:"actions_dropdown",class:"q-ml-xs q-mr-xs button-primary q-btn--no-text-transform",color:""===e.actionsDisplay?"primary":"secondary",label:""===e.actionsDisplay?"Actions":e.actionsDisplay},{default:(0,o.w5)((()=>[(0,o._)("div",x,[(0,o._)("div",j,[(0,o.Wm)(ee,{modelValue:e.auxModel,"onUpdate:modelValue":t[6]||(t[6]=t=>e.auxModel=t),filled:"",dense:"",label:"actions",placeholder:"transfer, sellrex, etc.",onBlur:t[7]||(t[7]=t=>{e.actionsModel=e.auxModel,e.toggleDropdown(e.$refs.actions_dropdown)}),onKeyup:t[8]||(t[8]=(0,s.D2)((t=>{e.actionsModel=e.auxModel,e.toggleDropdown(e.$refs.actions_dropdown)}),["enter"]))},{prepend:(0,o.w5)((()=>[(0,o.Wm)(X,{class:"cursor-pointer",name:"search"})])),append:(0,o.w5)((()=>[(0,o.Wm)(G,{size:"sm",color:"primary",onClick:t[5]||(t[5]=t=>{e.actionsModel=e.auxModel,e.toggleDropdown(e.$refs.actions_dropdown)})},{default:(0,o.w5)((()=>[D])),_:1})])),_:1},8,["modelValue"])])])])),_:1},8,["color","label"]),(0,o.Wm)(J,{class:"q-ml-xs q-mr-xs button-primary q-btn--no-text-transform",color:""===e.dateDisplay?"primary":"secondary",label:""===e.dateDisplay?"Date":e.dateDisplay},{default:(0,o.w5)((()=>[(0,o._)("div",T,[(0,o._)("div",S,[(0,o.Wm)(ee,{modelValue:e.fromDateModel,"onUpdate:modelValue":t[11]||(t[11]=t=>e.fromDateModel=t),filled:"",dense:"",label:"From"},{prepend:(0,o.w5)((()=>[(0,o.Wm)(X,{class:"cursor-pointer",name:"event"},{default:(0,o.w5)((()=>[(0,o.Wm)(ae,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:(0,o.w5)((()=>[(0,o.Wm)(te,{modelValue:e.fromDateModel,"onUpdate:modelValue":t[9]||(t[9]=t=>e.fromDateModel=t),mask:"YYYY-MM-DD HH:mm"},{default:(0,o.w5)((()=>[(0,o._)("div",P,[(0,o.wy)((0,o.Wm)(G,{label:"Close",color:"primary",flat:""},null,512),[[we]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),append:(0,o.w5)((()=>[(0,o.Wm)(X,{class:"cursor-pointer",name:"access_time"},{default:(0,o.w5)((()=>[(0,o.Wm)(ae,{cover:"cover","transition-show":"scale","transition-hide":"scale"},{default:(0,o.w5)((()=>[(0,o.Wm)(oe,{modelValue:e.fromDateModel,"onUpdate:modelValue":t[10]||(t[10]=t=>e.fromDateModel=t),mask:"YYYY-MM-DD HH:mm",format24h:""},{default:(0,o.w5)((()=>[(0,o._)("div",A,[(0,o.wy)((0,o.Wm)(G,{label:"Close",color:"primary",flat:""},null,512),[[we]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),_:1},8,["modelValue"])]),(0,o._)("div",q,[(0,o.Wm)(X,{name:"arrow_downward"})]),(0,o._)("div",N,[(0,o.Wm)(ee,{modelValue:e.toDateModel,"onUpdate:modelValue":t[14]||(t[14]=t=>e.toDateModel=t),filled:"",dense:"",label:"To"},{prepend:(0,o.w5)((()=>[(0,o.Wm)(X,{class:"cursor-pointer",name:"event"},{default:(0,o.w5)((()=>[(0,o.Wm)(ae,{cover:"cover","transition-show":"scale","transition-hide":"scale"},{default:(0,o.w5)((()=>[(0,o.Wm)(te,{modelValue:e.toDateModel,"onUpdate:modelValue":t[12]||(t[12]=t=>e.toDateModel=t),mask:"YYYY-MM-DD HH:mm"},{default:(0,o.w5)((()=>[(0,o._)("div",I,[(0,o.wy)((0,o.Wm)(G,{label:"Close",color:"primary",flat:""},null,512),[[we]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),append:(0,o.w5)((()=>[(0,o.Wm)(X,{class:"cursor-pointer",name:"access_time"},{default:(0,o.w5)((()=>[(0,o.Wm)(ae,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:(0,o.w5)((()=>[(0,o.Wm)(oe,{modelValue:e.toDateModel,"onUpdate:modelValue":t[13]||(t[13]=t=>e.toDateModel=t),mask:"YYYY-MM-DD HH:mm",format24h:""},{default:(0,o.w5)((()=>[(0,o._)("div",z,[(0,o.wy)((0,o.Wm)(G,{label:"Close",color:"primary",flat:""},null,512),[[we]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),_:1},8,["modelValue"])])])])),_:1},8,["color","label"]),e.showTokenFilter?((0,o.wg)(),(0,o.j4)(J,{key:2,ref:"token_dropdown",class:"q-ml-xs q-mr-xs button-primary q-btn--no-text-transform",color:e.tokenDisplay?"secondary":"primary",label:e.tokenDisplay?e.tokenDisplay:"Token"},{default:(0,o.w5)((()=>[(0,o._)("div",C,[(0,o._)("div",M,[(0,o.Wm)(ne,{modelValue:e.tokenModel,"onUpdate:modelValue":[t[15]||(t[15]=t=>e.tokenModel=t),t[16]||(t[16]=t=>e.toggleDropdown(e.$refs.token_dropdown))]},null,8,["modelValue"])])])])),_:1},8,["color","label"])):(0,o.kq)("",!0)])]),e.showPaginationExtras?((0,o.wg)(),(0,o.iD)("div",R," Viewing "+(0,n.zw)(e.paginationSettings.rowsPerPage>e.totalRows?e.totalRows:e.paginationSettings.rowsPerPage)+" of "+(0,n.zw)(1e4===e.totalRows?" over ":"")+" "+(0,n.zw)(e.totalRows.toLocaleString())+" total transactions ",1)):(0,o.kq)("",!0)])):(0,o.kq)("",!0)]),(0,o.Wm)(se,{class:"row col-12 q-mt-md separator"}),(0,o._)("div",Z,[(0,o.Wm)(pe,{ref:"main_table",pagination:e.paginationSettings,"onUpdate:pagination":t[17]||(t[17]=t=>e.paginationSettings=t),class:"q-mt-lg row trx-table--fixed-layout",flat:"","table-header-class":"table-header","hide-pagination":"",rows:e.filteredRows,columns:e.columns,"row-key":e=>e.name+e.action.action_ordinal+e.transaction.id,bordered:!1,square:!0,loading:e.loading,"rows-per-page-options":e.pageSizeOptions,dense:e.$q.screen.width<1024,onRequest:e.onPaginationChange},{header:(0,o.w5)((e=>[(0,o.Wm)(re,{props:e},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.cols,(t=>((0,o.wg)(),(0,o.j4)(ie,{key:t.name,props:e},{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(t.label),1)])),_:2},1032,["props"])))),128))])),_:2},1032,["props"])])),body:(0,o.w5)((t=>[(0,o.Wm)(re,{props:t},{default:(0,o.w5)((()=>[(0,o.Wm)(le,null,{default:(0,o.w5)((()=>[(0,o.Wm)(ce,{account:t.row.transaction.id,type:t.row.transaction.type},null,8,["account","type"])])),_:2},1024),(0,o.Wm)(le,null,{default:(0,o.w5)((()=>[(0,o.Wm)(ue,{timestamp:t.row.timestamp,showAge:e.showAge},null,8,["timestamp","showAge"])])),_:2},1024),(0,o.Wm)(le,null,{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(t.row.actions,(t=>((0,o.wg)(),(0,o.iD)("div",{key:t.action.action_ordinal,class:"row justify-left text-weight-light"},[(0,o._)("div",O,[(0,o._)("div",W,[(0,o.Wm)(de,{action:t.action,showTransferLabel:e.showTransferLabel,account:e.account},null,8,["action","showTransferLabel","account"])])])])))),128))])),_:2},1024),(0,o.Wm)(le,null,{default:(0,o.w5)((()=>[1===t.row.actions.length?((0,o.wg)(),(0,o.j4)(me,{key:0,actionData:t.row.data.data,actionName:t.row.data.name,"use-color":!1},null,8,["actionData","actionName"])):(0,o.kq)("",!0)])),_:2},1024)])),_:2},1032,["props"]),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(t.row.actions,(a=>(0,o.wy)(((0,o.wg)(),(0,o.j4)(re,{key:a.action.action_ordinal,class:"expanded-row",props:t},{default:(0,o.w5)((()=>[(0,o.Wm)(le,{"auto-width":""}),(0,o.Wm)(le,null,{default:(0,o.w5)((()=>[(0,o.Wm)(ce,{account:t.row.transaction.id,type:t.row.transaction.type},null,8,["account","type"])])),_:2},1024),(0,o.Wm)(le,null,{default:(0,o.w5)((()=>[(0,o.Wm)(ue,{timestamp:a.timestamp,showAge:e.showAge},null,8,["timestamp","showAge"])])),_:2},1024),(0,o.Wm)(le,null,{default:(0,o.w5)((()=>[(0,o._)("div",L,[(0,o.Wm)(de,{action:a.action},null,8,["action"])])])),_:2},1024),(0,o.Wm)(le,null,{default:(0,o.w5)((()=>[(0,o.Wm)(me,{actionData:a.data.data,actionName:a.data.name,"use-color":!1},null,8,["actionData","actionName"])])),_:2},1024)])),_:2},1032,["props"])),[[s.F8,t.expand]]))),128))])),_:1},8,["pagination","rows","columns","row-key","loading","rows-per-page-options","dense","onRequest"])]),(0,o._)("div",F,[(0,o._)("div",H,[(0,o._)("small",null,"Rows per page:   "+(0,n.zw)(e.paginationSettings.rowsPerPage),1),(0,o.Wm)(X,{name:e.showPagesSizes?"expand_more":"expand_less",size:"sm",onClick:e.switchPageSelector},{default:(0,o.w5)((()=>[(0,o.Wm)(ae,{ref:"page_size_selector","transition-show":"scale","transition-hide":"scale"},{default:(0,o.w5)((()=>[(0,o.Wm)(fe,null,{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.pageSizeOptions,(t=>((0,o.wg)(),(0,o.j4)(ve,{key:t,class:"cursor-pointer"},{default:(0,o.w5)((()=>[(0,o.Wm)(ge,{onClick:a=>{e.changePageSize(t),e.hidePopup(e.$refs.page_size_selector)}},{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(t),1)])),_:2},1032,["onClick"])])),_:2},1024)))),128))])),_:1})])),_:1},512)])),_:1},8,["name","onClick"])]),(0,o.Wm)(he),(0,o._)("div",V,[(0,o.Wm)(G,{size:"sm",color:"primary",outline:"",disable:1===e.paginationSettings.page,onClick:t[18]||(t[18]=t=>e.moveTablePage(e.$refs.main_table,"first"))},{default:(0,o.w5)((()=>[U])),_:1},8,["disable"]),(0,o.Wm)(G,{size:"sm",color:"primary",outline:"",class:"q-mx-sm",disable:1===e.paginationSettings.page,onClick:t[19]||(t[19]=t=>e.moveTablePage(e.$refs.main_table,"prev"))},{default:(0,o.w5)((()=>[(0,o.Wm)(X,{name:"chevron_left",size:"xs"})])),_:1},8,["disable"]),(0,o._)("small",null," Page "+(0,n.zw)(e.paginationSettings.page)+" "+(0,n.zw)(e.showPaginationExtras&&!1===e.enableLiveTransactions?0===e.lastPage?" of 1":` of ${e.lastPage}`:""),1),(0,o.Wm)(G,{size:"sm",color:"primary",outline:"",class:"q-mx-sm",disable:e.paginationSettings.page===e.lastPage||e.totalRowse.moveTablePage(e.$refs.main_table,"next"))},{default:(0,o.w5)((()=>[(0,o.Wm)(X,{name:"chevron_right",size:"xs"})])),_:1},8,["disable"]),e.showPaginationExtras&&!1===e.enableLiveTransactions?((0,o.wg)(),(0,o.j4)(G,{key:0,size:"sm",color:"primary",outline:"",disable:e.paginationSettings.page===e.lastPage||0===e.lastPage,onClick:t[21]||(t[21]=t=>e.moveTablePage(e.$refs.main_table,"last"))},{default:(0,o.w5)((()=>[E])),_:1},8,["disable"])):(0,o.kq)("",!0)])])])])}var Q=a(60499),Y=a(97114),$=a(53779),G=a(55298),K=a(49815),J=a(52783);const X=(0,o.Uk)("Searching..."),ee=["src"];function te(e,t,a,i,r,c){const l=(0,o.up)("q-icon"),u=(0,o.up)("q-item-label"),d=(0,o.up)("q-item-section"),m=(0,o.up)("q-item"),p=(0,o.up)("q-avatar"),g=(0,o.up)("q-select");return(0,o.wg)(),(0,o.j4)(g,{class:"search-input",borderless:"",dense:"",filled:"","use-input":"","hide-selected":"","fill-input":"","hide-bottom-space":"",placeholder:"token",loading:e.isLoading,"model-value":e.inputValue,options:e.options,onInputValue:t[0]||(t[0]=t=>e.inputValue=t),onKeyup:t[1]||(t[1]=(0,s.D2)((t=>e.handleSelected(e.inputValue)),["enter"]))},{prepend:(0,o.w5)((()=>[(0,o.Wm)(l,{class:"rotate-90",name:"search",size:"20px"})])),"no-option":(0,o.w5)((()=>[(0,o.Wm)(m,null,{default:(0,o.w5)((()=>[(0,o.Wm)(d,{class:"text-center"},{default:(0,o.w5)((()=>[e.isLoading?((0,o.wg)(),(0,o.j4)(u,{key:0},{default:(0,o.w5)((()=>[X])),_:1})):((0,o.wg)(),(0,o.j4)(u,{key:1},{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(e.inputValue?"Nothing found":"Search for token symbol or contract"),1)])),_:1}))])),_:1})])),_:1})])),option:(0,o.w5)((t=>[(0,o.Wm)(m,(0,o.dG)(t.itemProps,{exact:"exact",clickable:"clickable",onClick:a=>e.handleSelected(t.opt)}),{default:(0,o.w5)((()=>[(0,o.Wm)(d,{class:"items-center",avatar:""},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{size:"24px"},{default:(0,o.w5)((()=>{var e;return[(0,o._)("img",{src:null!==(e=t.opt.logo)&&void 0!==e?e:"~src/assets/token_placeholder.svg"},null,8,ee)]})),_:2},1024)])),_:2},1024),(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(t.opt.symbol)+" ("+(0,n.zw)(t.opt.contract)+")",1)])),_:2},1024)])),_:2},1024)])),_:2},1040,["onClick"])])),_:1},8,["loading","model-value","options"])}var ae=a(21889),oe=a(19302),ne=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function i(e){try{c(o.next(e))}catch(t){s(t)}}function r(e){try{c(o["throw"](e))}catch(t){s(t)}}function c(e){e.done?a(e.value):n(e.value).then(i,r)}c((o=o.apply(e,t||[])).next())}))};const se=(0,o.aZ)({name:"TokenSearch",props:{modelValue:{type:Object}},emits:["update:modelValue"],setup(e,t){const a=(0,oe.Z)(),n=(0,Q.iH)(""),s=(0,Q.iH)([]),i=(0,Q.iH)(!1);function r(e){return ne(this,void 0,void 0,(function*(){try{const t=(yield ae.h.getTokens()).filter((t=>JSON.stringify(t).toLowerCase().includes(e.toLowerCase())));return t}catch(t){return}}))}function c(e){return ne(this,void 0,void 0,(function*(){if(!n.value)return;if("string"!==typeof e)return void t.emit("update:modelValue",e);const o=yield r(e.toLowerCase());0!==o.length?t.emit("update:modelValue",o[0]):a.notify(`account ${n.value} not found!`)}))}return(0,o.YP)(n,(()=>ne(this,void 0,void 0,(function*(){if(""===n.value)return void(s.value=[]);if("string"!==typeof n.value)return void(s.value=[]);i.value=!0;const e=n.value.toLowerCase();yield Promise.all([r(e)]).then((e=>{s.value=[].concat.apply([],e)})),i.value=!1})))),{inputValue:n,options:s,isLoading:i,handleSelected:c}}});var ie=a(11639),re=a(32259),ce=a(22857),le=a(490),ue=a(76749),de=a(33115),me=a(61357),pe=a(69984),ge=a.n(pe);const ve=(0,ie.Z)(se,[["render",te]]),fe=ve;ge()(se,"components",{QSelect:re.Z,QIcon:ce.Z,QItem:le.Z,QItemSection:ue.Z,QItemLabel:de.Z,QAvatar:me.Z});var he=a(18910),we=a(30229),ye=a(17779),be=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function i(e){try{c(o.next(e))}catch(t){s(t)}}function r(e){try{c(o["throw"](e))}catch(t){s(t)}}function c(e){e.done?a(e.value):n(e.value).then(i,r)}c((o=o.apply(e,t||[])).next())}))};const _e=(0,we.z)(),ke=2e3,xe=[10,20,50,100,200],je=()=>{const e=localStorage.getItem("txRowsPerPage");let t=parseInt(e);return isNaN(t)&&(t=xe[0],localStorage.setItem("txRowsPerPage",t.toString())),t},De=(0,o.aZ)({name:"TransactionsTable",components:{DateField:Y.Z,AccountFormat:$.Z,ActionFormat:G.Z,DataFormat:K.Z,AccountSearch:J.Z,TokenSearch:fe},props:{account:{type:String||null,required:!1,default:null},actions:{type:Object,required:!1,default:null},showTransferLabel:{type:Boolean,default:!1},toggleEnabled:{type:Boolean,default:!0},filtersEnabled:{type:Boolean,default:!0},showPaginationExtras:{type:Boolean,default:!1}},setup(e){const t=(0,he.yj)(),a=(0,he.tv)(),{account:n,actions:s}=(0,Q.BK)(e),i=[{name:"transaction",required:!0,label:"TRANSACTION",align:"left",field:"transaction",sortable:!0},{name:"timestamp",required:!0,align:"left",label:"TIMESTAMP",field:"timestamp",sortable:!0},{name:"action",required:!0,align:"left",label:"ACTION",field:"action",sortable:!0},{name:"data",required:!0,align:"left",label:"DATA",field:"data"}],r=(0,Q.iH)([]),c=(0,Q.iH)(0),l=(0,Q.iH)([]),u=(0,Q.iH)(!1),d=(0,Q.iH)(!1),m=()=>{d.value=!d.value},p=e=>be(this,void 0,void 0,(function*(){f.value.rowsPerPage=e,f.value.page=1,yield V({pagination:f.value}),localStorage.setItem("txRowsPerPage",e.toString())})),g=(e,t)=>be(this,void 0,void 0,(function*(){f.value.page=e,f.value.rowsPerPage=t,yield V({pagination:f.value})})),v=(0,o.Fl)((()=>t.query["page"]||`1,${je()}`)),f=(0,Q.iH)({sortBy:"timestamp",descending:!0,page:1,rowsPerPage:je(),rowsNumber:1e4}),h=(0,Q.iH)(e.toggleEnabled),w=(0,Q.iH)(0),y=(0,Q.iH)(""),b=(0,Q.iH)(""),_=(0,o.Fl)((()=>{if(b.value){const e=b.value.split(",");return e.length>1?e[0]+"...":e[0]}return""})),k=(0,Q.iH)(_e.getFiltersSupported("notified")),x=(0,Q.iH)(""),j=(0,o.Fl)((()=>{if(x.value){const e=x.value.split(",");return e.length>1?e[0]+"...":e[0]}return""})),D=(0,Q.iH)(!1),T=(0,Q.iH)(null),S=(0,o.Fl)((()=>{var e,t;return T.value&&null!==(t=null===(e=T.value)||void 0===e?void 0:e.symbol)&&void 0!==t?t:""}));ae.h.getTokens().then((e=>{e.length>0&&(D.value=!0)}));const P=(new Date).toISOString(),A=(0,Q.iH)(""),q=(0,Q.iH)(P),N=(0,o.Fl)((()=>{try{if(""!==A.value||q.value!==P)return""===A.value?"Until "+q.value.split("T")[0]:q.value===P?"Since "+A.value.split("T")[0]:A.value.split("T")[0]+" - "+q.value.split("T")[0]}catch(e){ye.error(e)}return""})),I=(0,Q.iH)(null),z=(0,Q.iH)("true"===localStorage.getItem("showAge")),C=(0,o.Fl)((()=>null!==n.value&&n.value.length>12)),M=(0,o.Fl)((()=>C.value?"Actions":"Latest Transactions")),R=(0,o.Fl)((()=>{const e=f.value.rowsPerPage,t=c.value;return Math.ceil(t/e)})),Z=(0,o.Fl)((()=>null!==s.value)),O=()=>{x.value="",b.value="",T.value=null,A.value="",q.value=P},W=(0,o.Fl)((()=>j.value+_.value+N.value+S.value)),L=()=>{l.value=r.value},F=()=>be(this,void 0,void 0,(function*(){var e,t;let a;if(C.value)a=(yield ae.h.getTransaction(n.value)).actions;else if(Z.value)a=s.value;else{const o=f.value.page;let s=f.value.rowsPerPage,i=null!==(e=x.value)&&void 0!==e?e:"",l="",u="";q.value!==P&&(u=new Date(q.value).toISOString()),""!==A.value&&(l=new Date(A.value).toISOString());const d=f.value.descending?"desc":"asc";let m=T.value?{"act.account":T.value.contract}:null;b.value&&(m=m?Object.assign(Object.assign({},m),{"act.name":b.value}):{"act.name":b.value}),o>1&&0===w.value&&(w.value=null===(t=r.value[0])||void 0===t?void 0:t.action.global_sequence),w.value>0&&(m=m?Object.assign(Object.assign({},m),{global_sequence:"0-"+w.value.toString()}):{global_sequence:"0-"+w.value.toString()}),T.value&&(s=100);const p=yield ae.h.getTransactions({page:o,limit:s,account:n.value,notified:i,before:u,after:l,sort:d,extras:m});a=p.data.actions,c.value=p.data.total.value}a&&(T.value&&(a=a.filter((e=>{var t;return null===(t=e.act.data.quantity)||void 0===t?void 0:t.includes(T.value.symbol)})),a=a.slice(0,f.value.rowsPerPage)),r.value=a.map((e=>({name:e.trx_id,transaction:{id:e.trx_id,type:"transaction"},timestamp:e["@timestamp"]||e.timestamp,action:e,data:Z.value?{data:e.data,name:e.account}:{data:e.act.data,name:e.act.name},actions:[{name:e.trx_id,transaction:{id:e.trx_id,type:"transaction"},timestamp:e["@timestamp"],action:e,data:Z.value?{data:e.data,name:e.account}:{data:e.act.data,name:e.act.name}}]})))),L()})),H=e=>be(this,void 0,void 0,(function*(){u.value=!0;const{page:t,rowsPerPage:a,sortBy:o,descending:n}=e.pagination;f.value.page=t,f.value.rowsPerPage=a,f.value.sortBy=o,f.value.descending=n,yield F(),u.value=!1})),V=e=>be(this,void 0,void 0,(function*(){const{page:o,rowsPerPage:n}=e.pagination;yield a.push({hash:window.location.hash,query:Object.assign(Object.assign({},t.query),{page:`${o},${n}`})})})),U=(e,t)=>be(this,void 0,void 0,(function*(){e&&(f.value.page=Number(e)),t&&(f.value.rowsPerPage=Number(t)),yield H({pagination:f.value})})),E=e=>e.length>0&&e.split("\n").length>1,B=()=>{w.value=0,clearInterval(I.value),I.value=window.setInterval((()=>{F()}),ke)},Y=()=>{clearInterval(I.value)};(0,o.Jd)((()=>{Y()})),(0,o.YP)([n,s],(()=>be(this,void 0,void 0,(function*(){F(),yield g(1,f.value.rowsPerPage)})))),(0,o.YP)(W,(()=>be(this,void 0,void 0,(function*(){1!==f.value.page?yield g(1,f.value.rowsPerPage):(h.value=!1,yield F())})))),(0,o.YP)(z,(e=>{localStorage.setItem("showAge",e?"true":"false")}));const $=()=>be(this,void 0,void 0,(function*(){h.value?(O(),1!==f.value.page&&(yield g(1,f.value.rowsPerPage)),B()):Y()}));(0,o.YP)(h,(()=>{$()})),(0,o.bv)((()=>{$()})),(0,o.YP)((()=>v.value),(()=>be(this,void 0,void 0,(function*(){let e=v.value,t=1,a=je();if("number"===typeof e)t=e;else if("string"===typeof e){const[o,n]=e.split(",");t=Number(o),a=Number(n)}1!==t&&(h.value=!1),yield U(t,a)}))),{immediate:!0});const G=e=>{const t=e;t.toggle()},K=e=>{const t=e;t.hide()},J=(e,t)=>{const a=e;"next"===t?a.nextPage():"prev"===t?a.prevPage():"first"===t?a.firstPage():"last"===t&&g(R.value,f.value.rowsPerPage)};return{columns:i,rows:r,filteredRows:l,loading:u,showPagesSizes:d,paginationSettings:f,fromDateModel:A,toDateModel:q,dateDisplay:N,actionsDisplay:_,actionsModel:b,auxModel:y,accountsDisplay:j,accountsModel:x,showAccountFilter:k,tokenDisplay:S,tokenModel:T,showTokenFilter:D,interval:I,showAge:z,tableTitle:M,lastPage:R,hasActions:Z,filter:W,onRequest:H,loadTableData:F,checkIsMultiLine:E,filterRows:L,totalRows:c,pageSizeOptions:xe,changePageSize:p,switchPageSelector:m,applyPagination:U,changePagination:g,onPaginationChange:V,clearFilters:O,enableLiveTransactions:h,toggleDropdown:G,hidePopup:K,moveTablePage:J}}});var Te=a(23175),Se=a(68879),Pe=a(18479),Ae=a(13119),qe=a(52765),Ne=a(14351),Ie=a(86770),ze=a(50926),Ce=a(82429),Me=a(31233),Re=a(21682),Ze=a(67220),Oe=a(13246),We=a(90136),Le=a(77741),Fe=a(62146);const He=(0,ie.Z)(De,[["render",B]]),Ve=He;ge()(De,"components",{QToggle:Te.Z,QBtn:Se.Z,QBtnDropdown:Pe.Z,QInput:Ae.Z,QIcon:ce.Z,QPopupProxy:qe.Z,QDate:Ne.Z,QTime:Ie.Z,QSeparator:ze.Z,QTable:Ce.Z,QTr:Me.Z,QTh:Re.Z,QTd:Ze.Z,QList:Oe.Z,QItem:le.Z,QItemSection:ue.Z,QSpace:We.Z,QColor:Le.Z}),ge()(De,"directives",{ClosePopup:Fe.Z})},1546:(e,t,a)=>{"use strict";a.d(t,{Z:()=>S});var o=a(59835),n=a(86970);const s={class:"Card"},i={class:"row"},r={class:"col-12"},c={class:"row"},l={class:"text-h6"},u={class:"row"},d={class:"col-12"},m={class:"row"};function p(e,t,a,p,g,v){const f=(0,o.up)("q-card-section"),h=(0,o.up)("q-btn"),w=(0,o.up)("q-card-actions"),y=(0,o.up)("q-dialog"),b=(0,o.Q2)("close-popup");return(0,o.wg)(),(0,o.j4)(y,null,{default:(0,o.w5)((()=>[(0,o._)("div",s,[e.Id?((0,o.wg)(),(0,o.j4)(f,{key:0},{default:(0,o.w5)((()=>[(0,o._)("div",i,[(0,o._)("div",r,[(0,o._)("div",c,[(0,o._)("div",l,(0,n.zw)(e.msg),1)]),(0,o._)("div",{class:"row ellipsis-overflow q-pt-lg q-pl-md",onClick:t[0]||(t[0]=(...t)=>e.navToTransaction&&e.navToTransaction(...t))},(0,n.zw)(e.Id),1)])])])),_:1})):((0,o.wg)(),(0,o.j4)(f,{key:1},{default:(0,o.w5)((()=>[(0,o._)("div",u,[(0,o._)("div",d,[(0,o._)("div",m,"Transaction Failed: "+(0,n.zw)(e.transactionE),1)])])])),_:1})),(0,o.Wm)(w,{class:"text-primary",align:"right"},{default:(0,o.w5)((()=>[(0,o.wy)((0,o.Wm)(h,{flat:"",label:"Close","text-color":"grey-3",onClick:e.reset},null,8,["onClick"]),[[b]]),e.Id?((0,o.wg)(),(0,o.j4)(h,{key:0,flat:"",label:"View transaction","text-color":"grey-3",onClick:e.navToTransaction},null,8,["onClick"])):(0,o.kq)("",!0)])),_:1})])])),_:1})}var g=a(78504),v=a(18910),f=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function i(e){try{c(o.next(e))}catch(t){s(t)}}function r(e){try{c(o["throw"](e))}catch(t){s(t)}}function c(e){e.done?a(e.value):n(e.value).then(i,r)}c((o=o.apply(e,t||[])).next())}))};const h=(0,o.aZ)({name:"ViewTransaction",props:{message:{type:String,required:!0}},setup(e){const t=(0,g.oR)(),a=(0,v.tv)(),n=(0,o.Fl)((()=>e.message)),s=(0,o.Fl)((()=>t.state.account.TransactionId)),i=(0,o.Fl)((()=>t.state.account.TransactionError)),r=()=>{t.dispatch("account/resetTransaction")},c=()=>f(this,void 0,void 0,(function*(){yield a.push({name:"transaction",params:{transaction:s.value}}),a.go(0),t.dispatch("account/resetTransaction")}));return{msg:n,Id:s,transactionE:i,reset:r,navToTransaction:c}}});var w=a(11639),y=a(87743),b=a(63190),_=a(11821),k=a(68879),x=a(62146),j=a(69984),D=a.n(j);const T=(0,w.Z)(h,[["render",p],["__scopeId","data-v-b9294dd2"]]),S=T;D()(h,"components",{QDialog:y.Z,QCardSection:b.Z,QCardActions:_.Z,QBtn:k.Z}),D()(h,"directives",{ClosePopup:x.Z})},79870:(e,t,a)=>{"use strict";a.d(t,{Z:()=>q});var o=a(59835),n=a(86970);const s={class:"modal-header-container"},i=(0,o._)("h3",{class:"modal-header"},"Attach an account",-1),r=["src"],c=(0,o.Uk)("Get app");function l(e,t,a,l,u,d){const m=(0,o.up)("q-icon"),p=(0,o.up)("q-separator"),g=(0,o.up)("q-item-section"),v=(0,o.up)("q-spinner"),f=(0,o.up)("q-tooltip"),h=(0,o.up)("q-btn"),w=(0,o.up)("q-item"),y=(0,o.up)("q-list"),b=(0,o.up)("q-dialog"),_=(0,o.Q2)("ripple");return(0,o.wg)(),(0,o.j4)(b,{ref:"walletDialog",class:"modal-container"},{default:(0,o.w5)((()=>[(0,o._)("div",s,[(0,o.Wm)(m,{name:"add_circle_outline",color:"white",size:e.iconSize},null,8,["size"]),i]),(0,o.Wm)(p),(0,o.Wm)(y,null,{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.$ual.getAuthenticators().availableAuthenticators,((t,a)=>(0,o.wy)(((0,o.wg)(),(0,o.j4)(w,{key:t.getStyle().text,style:(0,n.j5)({background:t.getStyle().background,color:t.getStyle().textColor})},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{class:"cursor-pointer",avatar:"",onClick:t=>e.onLogin(a)},{default:(0,o.w5)((()=>[(0,o._)("img",{src:t.getStyle().icon,width:"30"},null,8,r)])),_:2},1032,["onClick"]),(0,o.Wm)(g,{class:"cursor-pointer",onClick:t=>e.onLogin(a)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(t.getStyle().text),1)])),_:2},1032,["onClick"]),(0,o.Wm)(g,{class:"flex",avatar:""},{default:(0,o.w5)((()=>[e.loading===t.getStyle().text?((0,o.wg)(),(0,o.j4)(v,{key:0,color:t.getStyle().textColor,size:"2em"},null,8,["color"])):((0,o.wg)(),(0,o.j4)(h,{key:1,color:t.getStyle().textColor,icon:"get_app",target:"_blank",dense:"",flat:"",size:"12px",onClick:a=>e.openUrl(t.getOnboardingLink())},{default:(0,o.w5)((()=>[(0,o.Wm)(f,null,{default:(0,o.w5)((()=>[c])),_:1})])),_:2},1032,["color","onClick"]))])),_:2},1024)])),_:2},1032,["style"])),[[_]]))),128)),e.error?((0,o.wg)(),(0,o.j4)(w,{key:0,active:!!e.error,"active-class":"bg-red-1 text-grey-8"},{default:(0,o.w5)((()=>[(0,o.Wm)(g,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,n.zw)(e.error),1)])),_:1})])),_:1},8,["active"])):(0,o.kq)("",!0)])),_:1})])),_:1},512)}var u=a(60499),d=a(84284),m=a(78504),p=a(19302),g=function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function i(e){try{c(o.next(e))}catch(t){s(t)}}function r(e){try{c(o["throw"](e))}catch(t){s(t)}}function c(e){e.done?a(e.value):n(e.value).then(i,r)}c((o=o.apply(e,t||[])).next())}))};const v=(0,o.aZ)({name:"WalletModal",setup(){const e=(0,d.getAuthenticators)(),t=(0,p.Z)(),a=(0,m.oR)(),n=(0,u.iH)(null),s=(0,o.Fl)((()=>a.state.account.accountName)),i={},r=(0,u.iH)(null),c=(0,o.Fl)((()=>t.screen.width>420?"3em":"1.5em")),l=t=>g(this,void 0,void 0,(function*(){const o=e[t];n.value=null;try{yield a.dispatch("account/login",{account:s.value,authenticator:o})}catch(i){n.value=i}r.value.hide()})),v=e=>window.open(e,"_blank");return{error:n,loading:i,account:s,walletDialog:r,onLogin:l,openUrl:v,iconSize:c}}});var f=a(11639),h=a(87743),w=a(22857),y=a(50926),b=a(13246),_=a(490),k=a(76749),x=a(63940),j=a(68879),D=a(46858),T=a(51722),S=a(69984),P=a.n(S);const A=(0,f.Z)(v,[["render",l]]),q=A;P()(v,"components",{QDialog:h.Z,QIcon:w.Z,QSeparator:y.Z,QList:b.Z,QItem:_.Z,QItemSection:k.Z,QSpinner:x.Z,QBtn:j.Z,QTooltip:D.Z}),P()(v,"directives",{Ripple:T.Z})},53779:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var o=a(59835),n=a(86970);const s=["href"];function i(e,t,a,i,r,c){return(0,o.wg)(),(0,o.iD)("a",{class:"hover-dec",href:"/"+e.type+"/"+e.accAccount},(0,n.zw)("transaction"===e.type?e.accAccount.slice(0,8):e.accAccount),9,s)}const r=(0,o.aZ)({name:"AccountFormat",props:{account:{type:String,default:()=>""},type:{type:String,required:!0}},setup(e){const t=(0,o.Fl)((()=>e.account));return{accType:e.type,accAccount:t}}});var c=a(11639);const l=(0,c.Z)(r,[["render",i],["__scopeId","data-v-a9e4aae2"]]),u=l},55298:(e,t,a)=>{"use strict";a.d(t,{Z:()=>v});var o=a(59835),n=a(86970);const s={class:"action-container"},i={class:"action action-general"},r=(0,o._)("span",{class:"inline"},"  →  ",-1),c={key:0,class:"action action-transfer"};function l(e,t,a,l,u,d){const m=(0,o.up)("AccountFormat");return(0,o.wg)(),(0,o.iD)("div",s,[(0,o._)("div",i,[(0,o.Wm)(m,{account:e.tx.act.account,type:"account"},null,8,["account"]),r,(0,o._)("span",null,(0,n.zw)(e.tx.act.name),1)]),e.divContent?((0,o.wg)(),(0,o.iD)("div",c,(0,n.zw)(e.divContent),1)):(0,o.kq)("",!0)])}var u=a(60499),d=a(53779);const m=(0,o.aZ)({name:"ActionFormat",components:{AccountFormat:d.Z},props:{action:{type:Object,required:!0},showTransferLabel:{type:Boolean,default:!1},account:{type:String||null,required:!1,default:null}},setup(e){const t=(0,u.iH)(""),a=(0,u.iH)(""),n=(0,u.Vh)(e,"action"),s=(0,u.Vh)(e,"showTransferLabel"),i=(0,u.Vh)(e,"account");return(0,o.bv)((()=>{const e=n.value.act.data,t="transfer"===n.value.act.name;s.value&&i.value&&t&&(e.from===i.value?a.value="SEND":e.to===i.value&&(a.value="RECEIVE"))})),{divClass:t,divContent:a,tx:n}}});var p=a(11639);const g=(0,p.Z)(m,[["render",l]]),v=g},49815:(e,t,a)=>{"use strict";a.d(t,{Z:()=>H});var o=a(59835),n=a(86970);const s={key:0,ref:"dataBox",class:"row transfer-data"},i={class:"col-12"},r={class:"text-bold"},c={class:"text-bold"},l=(0,o.Uk)("  →   "),u=(0,o.Uk)(" "),d={class:"text-bold"},m={class:"col-12"},p={class:"text-weight-bold"},g=(0,o.Uk)(" memo: "),v={key:0,class:"text-weight-regular"},f={key:1,class:"text-weight-regular"},h={key:1,ref:"dataBox",class:"row"};function w(e,t,a,w,y,b){const _=(0,o.up)("AccountFormat"),k=(0,o.up)("PrettyPayload"),x=(0,o.up)("q-btn");return(0,o.wg)(),(0,o.iD)("div",{class:(0,n.C_)(["relative-position overflow-hidden",{"div-compressed":!e.showOverflow}])},["transfer"===e.actionName?((0,o.wg)(),(0,o.iD)("div",s,[(0,o._)("div",i,[(0,o._)("span",r,[(0,o.Wm)(_,{account:e.transferData.from,type:"account"},null,8,["account"])]),(0,o._)("span",c,[l,(0,o.Wm)(_,{account:e.transferData.to,type:"account"},{default:(0,o.w5)((()=>[u])),_:1},8,["account"])]),(0,o._)("span",d,(0,n.zw)(" "+e.transferData.quantity),1)]),(0,o._)("div",m,[(0,o._)("div",p,[g,e.transferData.memo?((0,o.wg)(),(0,o.iD)("span",v,(0,n.zw)(e.transferData.memo),1)):((0,o.wg)(),(0,o.iD)("span",f,"n/a"))])])],512)):((0,o.wg)(),(0,o.iD)("div",h,[(0,o.Wm)(k,{depth:0,payload:e.formatGeneralData(e.actionData)},null,8,["payload"])],512)),e.isOverflowing?((0,o.wg)(),(0,o.j4)(x,{key:2,flat:"",size:"xs",icon:e.showOverflow?"expand_less":"expand_more",class:(0,n.C_)({"q-btn--use-color":e.useColor,"full-width":e.showOverflow,"q-btn--floating":!e.showOverflow}),onClick:e.toggleOverflow},null,8,["icon","class","onClick"])):(0,o.kq)("",!0)],2)}var y=a(60499),b=a(53779);const _={class:"text-bold"},k={key:0},x={key:1,class:"payload__list"},j={class:"text-bold"},D={class:"text-bold"},T=(0,o.Uk)(" "),S={key:1};function P(e,t,a,s,i,r){const c=(0,o.up)("PrettyPayload",!0),l=(0,o.up)("AccountFormat");return(0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.list,((t,a)=>((0,o.wg)(),(0,o.iD)("div",{key:a,class:(0,n.C_)(e.classObject)},[Array.isArray(e.payload[t])?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o._)("span",_,(0,n.zw)(t)+":",1),e.isArrayOfStringsOrNumbers(e.payload[t])?((0,o.wg)(),(0,o.iD)("span",k,(0,n.zw)(0===e.payload[t].length?" [ ]":[...e.payload[t]]),1)):((0,o.wg)(),(0,o.iD)("ul",x,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.payload[t],((t,a)=>((0,o.wg)(),(0,o.iD)("li",{key:a,class:"payload__list-item"},[(0,o.Wm)(c,{depth:e.depth+1,payload:t},null,8,["depth","payload"])])))),128))]))],64)):"object"===typeof e.payload[t]?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o._)("div",j,(0,n.zw)(t+":"),1),(0,o.Wm)(c,{depth:e.depth+1,payload:e.payload[t]},null,8,["depth","payload"])],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[(0,o._)("span",D,(0,n.zw)(t)+": ",1),e.isAccount(t)?((0,o.wg)(),(0,o.j4)(l,{key:0,account:e.payload[t],type:"account"},{default:(0,o.w5)((()=>[T])),_:2},1032,["account"])):((0,o.wg)(),(0,o.iD)("span",S,(0,n.zw)(e.payload[t]),1))],64))],2)))),128)}const A=(0,o.aZ)({name:"PrettyPayload",components:{AccountFormat:b.Z},props:{depth:{type:Number,required:!0},payload:{type:Object,required:!1}},setup(e){const{depth:t,payload:a}=(0,y.BK)(e),n=null===a.value?"null":typeof a.value,s=(0,o.Fl)((()=>{if("object"===n)return Object.keys(a.value)}));function i(e){const t=["account","to","from","owner","account_name","voter"];return t.includes(e)}const r=(0,o.Fl)((()=>({payload:!0,payload__indent:t.value>0})));function c(e){return Array.isArray(e)&&e.every((e=>"string"===typeof e||"number"===typeof e))}return{type:n,list:s,classObject:r,isAccount:i,isArrayOfStringsOrNumbers:c}}});var q=a(11639);const N=(0,q.Z)(A,[["render",P],["__scopeId","data-v-e2f1df72"]]),I=N;var z=a(61957);const C=(0,o.aZ)({name:"DataFormat",components:{AccountFormat:b.Z,PrettyPayload:I},props:{actionName:{type:String,required:!0},actionData:{type:Object,required:!0},useColor:{type:Boolean,required:!0}},setup(e){const{actionName:t,actionData:a}=(0,y.BK)(e),n=(0,y.iH)(null),s=(0,y.iH)(!1),i=(0,y.iH)(!1),r=(0,o.Fl)((()=>a.value)),c=(0,o.Fl)((()=>{var e,t;return null!==(t=null===(e=n.value)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:0}));let l=(0,y.iH)(null);const u=110,d=40,m=`calc(${u}px - ${d}px)`;function p(e,t){if("object"!==typeof e||"object"!==typeof t)return!1;const a=e,o=t;for(const n of Object.keys(e))if(a[n]){if(typeof a[n]!==typeof o[n])return!1;if("object"===typeof a[n]){if(!p(a[n],o[n]))return!1}else if(a[n]!==o[n])return!1}return!0}function g(e){return null===l.value?(l.value=e,l.value):p((0,y.IU)(l.value),e)?l.value:e}function v(){var e,t;i.value=(null!==(t=null===(e=n.value)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:0)>u}function f(){s.value=!s.value}return(0,o.YP)([a,c],(()=>{v()})),(0,o.ic)((()=>{v()})),{currentData:l,transferData:r,name:t,formatGeneralData:g,dataBox:n,isOverflowing:i,showOverflow:s,toggleOverflow:f,maxHeightStyle:m}}}),M=()=>{(0,z.sj)((e=>({c7e0c316:e.maxHeightStyle})))},R=C.setup;C.setup=R?(e,t)=>(M(),R(e,t)):M;const Z=C;var O=a(68879),W=a(69984),L=a.n(W);const F=(0,q.Z)(Z,[["render",w],["__scopeId","data-v-7486e4c2"]]),H=F;L()(Z,"components",{QBtn:O.Z})},46700:(e,t,a)=>{var o={"./af":73902,"./af.js":73902,"./ar":36314,"./ar-dz":75666,"./ar-dz.js":75666,"./ar-kw":76591,"./ar-kw.js":76591,"./ar-ly":7900,"./ar-ly.js":7900,"./ar-ma":5667,"./ar-ma.js":5667,"./ar-sa":36335,"./ar-sa.js":36335,"./ar-tn":86916,"./ar-tn.js":86916,"./ar.js":36314,"./az":1699,"./az.js":1699,"./be":98988,"./be.js":98988,"./bg":97437,"./bg.js":97437,"./bm":97947,"./bm.js":97947,"./bn":12851,"./bn-bd":34905,"./bn-bd.js":34905,"./bn.js":12851,"./bo":97346,"./bo.js":97346,"./br":1711,"./br.js":1711,"./bs":63706,"./bs.js":63706,"./ca":70112,"./ca.js":70112,"./cs":36406,"./cs.js":36406,"./cv":41853,"./cv.js":41853,"./cy":39766,"./cy.js":39766,"./da":36836,"./da.js":36836,"./de":59320,"./de-at":14904,"./de-at.js":14904,"./de-ch":26710,"./de-ch.js":26710,"./de.js":59320,"./dv":73274,"./dv.js":73274,"./el":80286,"./el.js":80286,"./en-au":30143,"./en-au.js":30143,"./en-ca":237,"./en-ca.js":237,"./en-gb":82428,"./en-gb.js":82428,"./en-ie":53349,"./en-ie.js":53349,"./en-il":13764,"./en-il.js":13764,"./en-in":67809,"./en-in.js":67809,"./en-nz":59851,"./en-nz.js":59851,"./en-sg":95594,"./en-sg.js":95594,"./eo":4483,"./eo.js":4483,"./es":62184,"./es-do":25777,"./es-do.js":25777,"./es-mx":89356,"./es-mx.js":89356,"./es-us":68496,"./es-us.js":68496,"./es.js":62184,"./et":97578,"./et.js":97578,"./eu":2092,"./eu.js":2092,"./fa":15927,"./fa.js":15927,"./fi":50171,"./fi.js":50171,"./fil":82416,"./fil.js":82416,"./fo":89937,"./fo.js":89937,"./fr":55172,"./fr-ca":77495,"./fr-ca.js":77495,"./fr-ch":97541,"./fr-ch.js":97541,"./fr.js":55172,"./fy":93766,"./fy.js":93766,"./ga":66361,"./ga.js":66361,"./gd":2282,"./gd.js":2282,"./gl":52630,"./gl.js":52630,"./gom-deva":80680,"./gom-deva.js":80680,"./gom-latn":66220,"./gom-latn.js":66220,"./gu":57506,"./gu.js":57506,"./he":5540,"./he.js":5540,"./hi":46067,"./hi.js":46067,"./hr":79669,"./hr.js":79669,"./hu":13396,"./hu.js":13396,"./hy-am":36678,"./hy-am.js":36678,"./id":44812,"./id.js":44812,"./is":94193,"./is.js":94193,"./it":67863,"./it-ch":959,"./it-ch.js":959,"./it.js":67863,"./ja":41809,"./ja.js":41809,"./jv":28657,"./jv.js":28657,"./ka":33290,"./ka.js":33290,"./kk":98418,"./kk.js":98418,"./km":77687,"./km.js":77687,"./kn":21375,"./kn.js":21375,"./ko":32641,"./ko.js":32641,"./ku":83518,"./ku.js":83518,"./ky":85459,"./ky.js":85459,"./lb":91978,"./lb.js":91978,"./lo":86915,"./lo.js":86915,"./lt":8948,"./lt.js":8948,"./lv":12548,"./lv.js":12548,"./me":98608,"./me.js":98608,"./mi":50333,"./mi.js":50333,"./mk":76611,"./mk.js":76611,"./ml":10999,"./ml.js":10999,"./mn":54098,"./mn.js":54098,"./mr":86111,"./mr.js":86111,"./ms":73717,"./ms-my":90265,"./ms-my.js":90265,"./ms.js":73717,"./mt":28980,"./mt.js":28980,"./my":96895,"./my.js":96895,"./nb":15348,"./nb.js":15348,"./ne":31493,"./ne.js":31493,"./nl":34419,"./nl-be":85576,"./nl-be.js":85576,"./nl.js":34419,"./nn":46907,"./nn.js":46907,"./oc-lnc":12321,"./oc-lnc.js":12321,"./pa-in":89239,"./pa-in.js":89239,"./pl":97627,"./pl.js":97627,"./pt":15703,"./pt-br":91623,"./pt-br.js":91623,"./pt.js":15703,"./ro":22747,"./ro.js":22747,"./ru":64420,"./ru.js":64420,"./sd":52148,"./sd.js":52148,"./se":12461,"./se.js":12461,"./si":12783,"./si.js":12783,"./sk":93306,"./sk.js":93306,"./sl":341,"./sl.js":341,"./sq":8608,"./sq.js":8608,"./sr":72451,"./sr-cyrl":73371,"./sr-cyrl.js":73371,"./sr.js":72451,"./ss":8812,"./ss.js":8812,"./sv":53820,"./sv.js":53820,"./sw":43615,"./sw.js":43615,"./ta":12869,"./ta.js":12869,"./te":12044,"./te.js":12044,"./tet":65861,"./tet.js":65861,"./tg":66999,"./tg.js":66999,"./th":20926,"./th.js":20926,"./tk":97443,"./tk.js":97443,"./tl-ph":59786,"./tl-ph.js":59786,"./tlh":92812,"./tlh.js":92812,"./tr":16952,"./tr.js":16952,"./tzl":9573,"./tzl.js":9573,"./tzm":55990,"./tzm-latn":92851,"./tzm-latn.js":92851,"./tzm.js":55990,"./ug-cn":52610,"./ug-cn.js":52610,"./uk":9498,"./uk.js":9498,"./ur":83970,"./ur.js":83970,"./uz":19006,"./uz-latn":26,"./uz-latn.js":26,"./uz.js":19006,"./vi":9962,"./vi.js":9962,"./x-pseudo":68407,"./x-pseudo.js":68407,"./yo":91962,"./yo.js":91962,"./zh-cn":28909,"./zh-cn.js":28909,"./zh-hk":34014,"./zh-hk.js":34014,"./zh-mo":90996,"./zh-mo.js":90996,"./zh-tw":36327,"./zh-tw.js":36327};function n(e){var t=s(e);return a(t)}function s(e){if(!a.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}n.keys=function(){return Object.keys(o)},n.resolve=s,e.exports=n,n.id=46700},77122:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDIiIGhlaWdodD0iNDMiIHZpZXdCb3g9IjAgMCA0MiA0MyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTI5Ljc2NzIgMTIuNzE3M0wxNy45MzQxIDI0LjMxNDRDMTcuMzEwMiAyNC45MjU4IDE2LjM2MTcgMjUuMDYxNiAxNS41OTEzIDI0LjY0OThMMi45MzU2MyAxNy44ODQ1QzEuNDEyNDggMTcuMDcwMiAxLjU2ODA3IDE0LjgzODEgMy4xODk0NiAxNC4yNDMxTDM4LjA1NDcgMS40NDc4OEMzOS42MzU4IDAuODY3NjQyIDQxLjE4MjMgMi4zODE5MyA0MC42MzU0IDMuOTc0ODVMMjguMzY4NyAzOS43MDU1QzI3LjgwNCA0MS4zNTA1IDI1LjU1MzYgNDEuNTQwNSAyNC43MjExIDQwLjAxMzNMMTkuMjAyNiAyOS44OTAzIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K"}}]); \ No newline at end of file