@ethersphere/bee-dashboard 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +0,0 @@
1
- (this["webpackJsonp@ethersphere/bee-dashboard"]=this["webpackJsonp@ethersphere/bee-dashboard"]||[]).push([[3],{607:function(e,t,n){"use strict";n.r(t),n.d(t,"getCLS",(function(){return m})),n.d(t,"getFCP",(function(){return g})),n.d(t,"getFID",(function(){return F})),n.d(t,"getLCP",(function(){return k})),n.d(t,"getTTFB",(function(){return C}));var i,a,r,o,c=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},u=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},s=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},f=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},d="function"==typeof WeakSet?new WeakSet:new Set,p=function(e,t,n){var i;return function(){t.value>=0&&(n||d.has(t)||"hidden"===document.visibilityState)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},m=function(e,t){var n,i=c("CLS",0),a=function(e){e.hadRecentInput||(i.value+=e.value,i.entries.push(e),n())},r=u("layout-shift",a);r&&(n=p(e,i,t),s((function(){r.takeRecords().map(a),n()})),f((function(){i=c("CLS",0),n=p(e,i,t)})))},v=-1,l=function(){return"hidden"===document.visibilityState?0:1/0},h=function(){s((function(e){var t=e.timeStamp;v=t}),!0)},S=function(){return v<0&&(v=l(),h(),f((function(){setTimeout((function(){v=l(),h()}),0)}))),{get timeStamp(){return v}}},g=function(e,t){var n,i=S(),a=c("FCP"),r=u("paint",(function(e){"first-contentful-paint"===e.name&&(r&&r.disconnect(),e.startTime<i.timeStamp&&(a.value=e.startTime,a.entries.push(e),d.add(a),n()))}));r&&(n=p(e,a,t),f((function(i){a=c("FCP"),n=p(e,a,t),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,d.add(a),n()}))}))})))},y={passive:!0,capture:!0},w=new Date,E=function(e,t){i||(i=t,a=e,r=new Date,T(removeEventListener),L())},L=function(){if(a>=0&&a<r-w){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+a};o.forEach((function(t){t(e)})),o=[]}},b=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){E(e,t),a()},i=function(){a()},a=function(){removeEventListener("pointerup",n,y),removeEventListener("pointercancel",i,y)};addEventListener("pointerup",n,y),addEventListener("pointercancel",i,y)}(t,e):E(t,e)}},T=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,b,y)}))},F=function(e,t){var n,r=S(),m=c("FID"),v=function(e){e.startTime<r.timeStamp&&(m.value=e.processingStart-e.startTime,m.entries.push(e),d.add(m),n())},l=u("first-input",v);n=p(e,m,t),l&&s((function(){l.takeRecords().map(v),l.disconnect()}),!0),l&&f((function(){var r;m=c("FID"),n=p(e,m,t),o=[],a=-1,i=null,T(addEventListener),r=v,o.push(r),L()}))},k=function(e,t){var n,i=S(),a=c("LCP"),r=function(e){var t=e.startTime;t<i.timeStamp&&(a.value=t,a.entries.push(e)),n()},o=u("largest-contentful-paint",r);if(o){n=p(e,a,t);var m=function(){d.has(a)||(o.takeRecords().map(r),o.disconnect(),d.add(a),n())};["keydown","click"].forEach((function(e){addEventListener(e,m,{once:!0,capture:!0})})),s(m,!0),f((function(i){a=c("LCP"),n=p(e,a,t),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,d.add(a),n()}))}))}))}},C=function(e){var t,n=c("TTFB");t=function(){try{var t=performance.getEntriesByType("navigation")[0]||function(){var e=performance.timing,t={entryType:"navigation",startTime:0};for(var n in e)"navigationStart"!==n&&"toJSON"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();n.value=n.delta=t.responseStart,n.entries=[t],e(n)}catch(e){}},"complete"===document.readyState?setTimeout(t,0):addEventListener("pageshow",t)}}}]);
2
- //# sourceMappingURL=3.ad8c73af.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../node_modules/web-vitals/dist/web-vitals.js"],"names":["e","t","n","i","a","name","value","delta","entries","id","concat","Date","now","Math","floor","random","r","PerformanceObserver","supportedEntryTypes","includes","getEntries","map","observe","type","buffered","o","document","visibilityState","removeEventListener","addEventListener","c","persisted","u","WeakSet","Set","s","has","f","hadRecentInput","push","takeRecords","m","v","d","timeStamp","p","setTimeout","l","disconnect","startTime","add","requestAnimationFrame","performance","h","passive","capture","S","y","w","g","entryType","target","cancelable","processingStart","forEach","E","L","T","once","b","getEntriesByType","timing","max","navigationStart","responseStart","readyState"],"mappings":"gJAAA,+MAAIA,EAAEC,EAAEC,EAAEC,EAAEC,EAAE,SAASJ,EAAEC,GAAG,MAAM,CAACI,KAAKL,EAAEM,WAAM,IAASL,GAAG,EAAEA,EAAEM,MAAM,EAAEC,QAAQ,GAAGC,GAAG,MAAMC,OAAOC,KAAKC,MAAM,KAAKF,OAAOG,KAAKC,MAAM,cAAcD,KAAKE,UAAU,QAAQC,EAAE,SAAShB,EAAEC,GAAG,IAAI,GAAGgB,oBAAoBC,oBAAoBC,SAASnB,GAAG,CAAC,IAAIE,EAAE,IAAIe,qBAAqB,SAASjB,GAAG,OAAOA,EAAEoB,aAAaC,IAAIpB,MAAM,OAAOC,EAAEoB,QAAQ,CAACC,KAAKvB,EAAEwB,UAAS,IAAKtB,GAAG,MAAMF,MAAMyB,EAAE,SAASzB,EAAEC,GAAG,IAAIC,EAAE,SAASA,EAAEC,GAAG,aAAaA,EAAEoB,MAAM,WAAWG,SAASC,kBAAkB3B,EAAEG,GAAGF,IAAI2B,oBAAoB,mBAAmB1B,GAAE,GAAI0B,oBAAoB,WAAW1B,GAAE,MAAO2B,iBAAiB,mBAAmB3B,GAAE,GAAI2B,iBAAiB,WAAW3B,GAAE,IAAK4B,EAAE,SAAS9B,GAAG6B,iBAAiB,YAAY,SAAS5B,GAAGA,EAAE8B,WAAW/B,EAAEC,MAAK,IAAK+B,EAAE,mBAAmBC,QAAQ,IAAIA,QAAQ,IAAIC,IAAIC,EAAE,SAASnC,EAAEC,EAAEC,GAAG,IAAIC,EAAE,OAAO,WAAWF,EAAEK,OAAO,IAAIJ,GAAG8B,EAAEI,IAAInC,IAAI,WAAWyB,SAASC,mBAAmB1B,EAAEM,MAAMN,EAAEK,OAAOH,GAAG,IAAIF,EAAEM,YAAO,IAASJ,KAAKA,EAAEF,EAAEK,MAAMN,EAAEC,OAAOoC,EAAE,SAASrC,EAAEC,GAAG,IAAIC,EAAEC,EAAEC,EAAE,MAAM,GAAG4B,EAAE,SAAShC,GAAGA,EAAEsC,iBAAiBnC,EAAEG,OAAON,EAAEM,MAAMH,EAAEK,QAAQ+B,KAAKvC,GAAGE,MAAMmC,EAAErB,EAAE,eAAegB,GAAGK,IAAInC,EAAEiC,EAAEnC,EAAEG,EAAEF,GAAGwB,GAAG,WAAWY,EAAEG,cAAcnB,IAAIW,GAAG9B,OAAO4B,GAAG,WAAW3B,EAAEC,EAAE,MAAM,GAAGF,EAAEiC,EAAEnC,EAAEG,EAAEF,QAAQwC,GAAG,EAAEC,EAAE,WAAW,MAAM,WAAWhB,SAASC,gBAAgB,EAAE,KAAKgB,EAAE,WAAWlB,GAAG,SAASzB,GAAG,IAAIC,EAAED,EAAE4C,UAAUH,EAAExC,KAAI,IAAK4C,EAAE,WAAW,OAAOJ,EAAE,IAAIA,EAAEC,IAAIC,IAAIb,GAAG,WAAWgB,YAAY,WAAWL,EAAEC,IAAIC,MAAM,OAAO,CAAC,gBAAgB,OAAOF,KAAKM,EAAE,SAAS/C,EAAEC,GAAG,IAAIC,EAAEC,EAAE0C,IAAIpB,EAAErB,EAAE,OAAOiC,EAAErB,EAAE,SAAS,SAAShB,GAAG,2BAA2BA,EAAEK,OAAOgC,GAAGA,EAAEW,aAAahD,EAAEiD,UAAU9C,EAAEyC,YAAYnB,EAAEnB,MAAMN,EAAEiD,UAAUxB,EAAEjB,QAAQ+B,KAAKvC,GAAGgC,EAAEkB,IAAIzB,GAAGvB,SAASmC,IAAInC,EAAEiC,EAAEnC,EAAEyB,EAAExB,GAAG6B,GAAG,SAAS3B,GAAGsB,EAAErB,EAAE,OAAOF,EAAEiC,EAAEnC,EAAEyB,EAAExB,GAAGkD,uBAAuB,WAAWA,uBAAuB,WAAW1B,EAAEnB,MAAM8C,YAAYxC,MAAMT,EAAEyC,UAAUZ,EAAEkB,IAAIzB,GAAGvB,eAAemD,EAAE,CAACC,SAAQ,EAAGC,SAAQ,GAAIC,EAAE,IAAI7C,KAAK8C,EAAE,SAAStD,EAAEC,GAAGJ,IAAIA,EAAEI,EAAEH,EAAEE,EAAED,EAAE,IAAIS,KAAK+C,EAAE9B,qBAAqB+B,MAAMA,EAAE,WAAW,GAAG1D,GAAG,GAAGA,EAAEC,EAAEsD,EAAE,CAAC,IAAIpD,EAAE,CAACwD,UAAU,cAAcvD,KAAKL,EAAEuB,KAAKsC,OAAO7D,EAAE6D,OAAOC,WAAW9D,EAAE8D,WAAWb,UAAUjD,EAAE4C,UAAUmB,gBAAgB/D,EAAE4C,UAAU3C,GAAGE,EAAE6D,SAAS,SAAShE,GAAGA,EAAEI,MAAMD,EAAE,KAAK8D,EAAE,SAASjE,GAAG,GAAGA,EAAE8D,WAAW,CAAC,IAAI7D,GAAGD,EAAE4C,UAAU,KAAK,IAAIjC,KAAKyC,YAAYxC,OAAOZ,EAAE4C,UAAU,eAAe5C,EAAEuB,KAAK,SAASvB,EAAEC,GAAG,IAAIC,EAAE,WAAWuD,EAAEzD,EAAEC,GAAGG,KAAKD,EAAE,WAAWC,KAAKA,EAAE,WAAWwB,oBAAoB,YAAY1B,EAAEmD,GAAGzB,oBAAoB,gBAAgBzB,EAAEkD,IAAIxB,iBAAiB,YAAY3B,EAAEmD,GAAGxB,iBAAiB,gBAAgB1B,EAAEkD,GAA9N,CAAkOpD,EAAED,GAAGyD,EAAExD,EAAED,KAAK0D,EAAE,SAAS1D,GAAG,CAAC,YAAY,UAAU,aAAa,eAAegE,SAAS,SAAS/D,GAAG,OAAOD,EAAEC,EAAEgE,EAAEZ,OAAOa,EAAE,SAAShE,EAAEmC,GAAG,IAAII,EAAEC,EAAEG,IAAIF,EAAEvC,EAAE,OAAO2C,EAAE,SAAS/C,GAAGA,EAAEiD,UAAUP,EAAEE,YAAYD,EAAErC,MAAMN,EAAE+D,gBAAgB/D,EAAEiD,UAAUN,EAAEnC,QAAQ+B,KAAKvC,GAAGgC,EAAEkB,IAAIP,GAAGF,MAAMY,EAAErC,EAAE,cAAc+B,GAAGN,EAAEN,EAAEjC,EAAEyC,EAAEN,GAAGgB,GAAG5B,GAAG,WAAW4B,EAAEb,cAAcnB,IAAI0B,GAAGM,EAAEL,gBAAe,GAAIK,GAAGvB,GAAG,WAAW,IAAId,EAAE2B,EAAEvC,EAAE,OAAOqC,EAAEN,EAAEjC,EAAEyC,EAAEN,GAAGlC,EAAE,GAAGF,GAAG,EAAED,EAAE,KAAK0D,EAAE7B,kBAAkBb,EAAE+B,EAAE5C,EAAEoC,KAAKvB,GAAG2C,QAAQQ,EAAE,SAASnE,EAAEC,GAAG,IAAIC,EAAEC,EAAE0C,IAAIR,EAAEjC,EAAE,OAAOqC,EAAE,SAASzC,GAAG,IAAIC,EAAED,EAAEiD,UAAUhD,EAAEE,EAAEyC,YAAYP,EAAE/B,MAAML,EAAEoC,EAAE7B,QAAQ+B,KAAKvC,IAAIE,KAAKwC,EAAE1B,EAAE,2BAA2ByB,GAAG,GAAGC,EAAE,CAACxC,EAAEiC,EAAEnC,EAAEqC,EAAEpC,GAAG,IAAI0C,EAAE,WAAWX,EAAEI,IAAIC,KAAKK,EAAEF,cAAcnB,IAAIoB,GAAGC,EAAEM,aAAahB,EAAEkB,IAAIb,GAAGnC,MAAM,CAAC,UAAU,SAAS8D,SAAS,SAAShE,GAAG6B,iBAAiB7B,EAAE2C,EAAE,CAACyB,MAAK,EAAGb,SAAQ,OAAQ9B,EAAEkB,GAAE,GAAIb,GAAG,SAAS3B,GAAGkC,EAAEjC,EAAE,OAAOF,EAAEiC,EAAEnC,EAAEqC,EAAEpC,GAAGkD,uBAAuB,WAAWA,uBAAuB,WAAWd,EAAE/B,MAAM8C,YAAYxC,MAAMT,EAAEyC,UAAUZ,EAAEkB,IAAIb,GAAGnC,eAAemE,EAAE,SAASrE,GAAG,IAAIC,EAAEC,EAAEE,EAAE,QAAQH,EAAE,WAAW,IAAI,IAAIA,EAAEmD,YAAYkB,iBAAiB,cAAc,IAAI,WAAW,IAAItE,EAAEoD,YAAYmB,OAAOtE,EAAE,CAAC2D,UAAU,aAAaX,UAAU,GAAG,IAAI,IAAI/C,KAAKF,EAAE,oBAAoBE,GAAG,WAAWA,IAAID,EAAEC,GAAGW,KAAK2D,IAAIxE,EAAEE,GAAGF,EAAEyE,gBAAgB,IAAI,OAAOxE,EAAhL,GAAqLC,EAAEI,MAAMJ,EAAEK,MAAMN,EAAEyE,cAAcxE,EAAEM,QAAQ,CAACP,GAAGD,EAAEE,GAAG,MAAMF,MAAM,aAAa0B,SAASiD,WAAW7B,WAAW7C,EAAE,GAAG4B,iBAAiB,WAAW5B","file":"static/js/3.ad8c73af.chunk.js","sourcesContent":["var e,t,n,i,a=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:\"v1-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12)}},r=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},o=function(e,t){var n=function n(i){\"pagehide\"!==i.type&&\"hidden\"!==document.visibilityState||(e(i),t&&(removeEventListener(\"visibilitychange\",n,!0),removeEventListener(\"pagehide\",n,!0)))};addEventListener(\"visibilitychange\",n,!0),addEventListener(\"pagehide\",n,!0)},c=function(e){addEventListener(\"pageshow\",(function(t){t.persisted&&e(t)}),!0)},u=\"function\"==typeof WeakSet?new WeakSet:new Set,s=function(e,t,n){var i;return function(){t.value>=0&&(n||u.has(t)||\"hidden\"===document.visibilityState)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},f=function(e,t){var n,i=a(\"CLS\",0),u=function(e){e.hadRecentInput||(i.value+=e.value,i.entries.push(e),n())},f=r(\"layout-shift\",u);f&&(n=s(e,i,t),o((function(){f.takeRecords().map(u),n()})),c((function(){i=a(\"CLS\",0),n=s(e,i,t)})))},m=-1,v=function(){return\"hidden\"===document.visibilityState?0:1/0},d=function(){o((function(e){var t=e.timeStamp;m=t}),!0)},p=function(){return m<0&&(m=v(),d(),c((function(){setTimeout((function(){m=v(),d()}),0)}))),{get timeStamp(){return m}}},l=function(e,t){var n,i=p(),o=a(\"FCP\"),f=r(\"paint\",(function(e){\"first-contentful-paint\"===e.name&&(f&&f.disconnect(),e.startTime<i.timeStamp&&(o.value=e.startTime,o.entries.push(e),u.add(o),n()))}));f&&(n=s(e,o,t),c((function(i){o=a(\"FCP\"),n=s(e,o,t),requestAnimationFrame((function(){requestAnimationFrame((function(){o.value=performance.now()-i.timeStamp,u.add(o),n()}))}))})))},h={passive:!0,capture:!0},S=new Date,y=function(i,a){e||(e=a,t=i,n=new Date,w(removeEventListener),g())},g=function(){if(t>=0&&t<n-S){var a={entryType:\"first-input\",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};i.forEach((function(e){e(a)})),i=[]}},E=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,t){var n=function(){y(e,t),a()},i=function(){a()},a=function(){removeEventListener(\"pointerup\",n,h),removeEventListener(\"pointercancel\",i,h)};addEventListener(\"pointerup\",n,h),addEventListener(\"pointercancel\",i,h)}(t,e):y(t,e)}},w=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(t){return e(t,E,h)}))},L=function(n,f){var m,v=p(),d=a(\"FID\"),l=function(e){e.startTime<v.timeStamp&&(d.value=e.processingStart-e.startTime,d.entries.push(e),u.add(d),m())},h=r(\"first-input\",l);m=s(n,d,f),h&&o((function(){h.takeRecords().map(l),h.disconnect()}),!0),h&&c((function(){var r;d=a(\"FID\"),m=s(n,d,f),i=[],t=-1,e=null,w(addEventListener),r=l,i.push(r),g()}))},T=function(e,t){var n,i=p(),f=a(\"LCP\"),m=function(e){var t=e.startTime;t<i.timeStamp&&(f.value=t,f.entries.push(e)),n()},v=r(\"largest-contentful-paint\",m);if(v){n=s(e,f,t);var d=function(){u.has(f)||(v.takeRecords().map(m),v.disconnect(),u.add(f),n())};[\"keydown\",\"click\"].forEach((function(e){addEventListener(e,d,{once:!0,capture:!0})})),o(d,!0),c((function(i){f=a(\"LCP\"),n=s(e,f,t),requestAnimationFrame((function(){requestAnimationFrame((function(){f.value=performance.now()-i.timeStamp,u.add(f),n()}))}))}))}},b=function(e){var t,n=a(\"TTFB\");t=function(){try{var t=performance.getEntriesByType(\"navigation\")[0]||function(){var e=performance.timing,t={entryType:\"navigation\",startTime:0};for(var n in e)\"navigationStart\"!==n&&\"toJSON\"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();n.value=n.delta=t.responseStart,n.entries=[t],e(n)}catch(e){}},\"complete\"===document.readyState?setTimeout(t,0):addEventListener(\"pageshow\",t)};export{f as getCLS,l as getFCP,L as getFID,T as getLCP,b as getTTFB};\n"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- (this["webpackJsonp@ethersphere/bee-dashboard"]=this["webpackJsonp@ethersphere/bee-dashboard"]||[]).push([[0],{183:function(e){e.exports=JSON.parse('{"a":{"node":">=12.0.0","npm":">=6.0.0","bee":">=0.6.0"}}')},231:function(e,t,n){},232:function(e,t,n){},511:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),o=n(13),c=n.n(o),i=(n(231),n(40)),s=(n(232),n(599)),l=n(600),u=n(41),d=n(18),b=n(556),j=n(514),h=n(214),p=n(554),m=n(66),O=n(555),x=n(557),g=n(1),f=Object(j.a)((function(e){return Object(h.a)({root:{height:"100%"},content:{maxWidth:500,marginBottom:e.spacing(4),"&:last-child":{marginBottom:0}},icon:{height:"1rem"}})}));function v(){var e=f();return Object(g.jsxs)(p.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",className:e.root,children:[Object(g.jsx)(p.a,{item:!0,className:e.content,children:Object(g.jsx)(m.a,{variant:"h1",align:"center",children:"Uh oh, it looks like your node is not connected."})}),Object(g.jsx)(p.a,{item:!0,className:e.content,children:Object(g.jsxs)(m.a,{align:"center",children:["Please check your node status to fix the problem. You can also check out the"," ",Object(g.jsx)(O.a,{href:"https://docs.ethswarm.org/docs/",target:"_blank",rel:"noreferrer",children:"Swarm Bee Docs"})," ","or ask for support on the"," ",Object(g.jsx)(O.a,{href:"https://discord.gg/eKr9XPv7",target:"_blank",rel:"noreferrer",children:"Ethereum Swarm Discord"}),"."]})}),Object(g.jsx)(p.a,{item:!0,className:e.content,children:Object(g.jsx)(m.a,{align:"center",children:Object(g.jsx)(b.a,{component:i.b,variant:"contained",startIcon:Object(g.jsx)(x.a,{className:e.icon}),to:$t.STATUS,children:"Check node status"})})})]})}var y=n(14),w=n.n(y),k=n(33),C=n(7),S=n(44),B=n(111),N=n(112),A=n(27),L=n.n(A);function I(e){return A.BigNumber.isBigNumber(e)&&e.isInteger()||"bigint"===typeof e}function T(e){if(A.BigNumber.isBigNumber(e))return e;if("string"===typeof e)return new A.BigNumber(e);if("bigint"===typeof e)return new A.BigNumber(e.toString());if("number"===typeof e)return new A.BigNumber(e);throw new TypeError("Not a BigNumber or BigNumber convertible value. Type: ".concat(typeof e," value: ").concat(e))}function P(e){return D.apply(this,arguments)}function D(){return(D=Object(k.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout((function(){e()}),t)}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var U=[18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0],E=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;Object(B.a)(this,e),this.amount=void 0,this.decimals=void 0;var a=T(t);if(!I(a)||!U.includes(n))throw new TypeError("Not a valid token values");this.amount=a,this.decimals=n}return Object(N.a)(e,[{key:"toBigInt",get:function(){return BigInt(this.amount.toFixed(0))}},{key:"toString",get:function(){return this.amount.toFixed(0)}},{key:"toBigNumber",get:function(){return new A.BigNumber(this.amount)}},{key:"toDecimal",get:function(){return this.amount.dividedBy(new A.BigNumber(10).pow(this.decimals))}},{key:"toFixedDecimal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return this.toDecimal.toFixed(e)}}],[{key:"fromDecimal",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,a=T(t),r=a.multipliedBy(new A.BigNumber(10).pow(n));return new e(r,n)}}]),e}(),F=n(87),R=n.n(F),q=n(183),z=n(55),M={apiUrl:sessionStorage.getItem("api_host")||"http://localhost:1633",apiDebugUrl:sessionStorage.getItem("debug_api_host")||"http://localhost:1635",beeApi:null,beeDebugApi:null,setApiUrl:function(){},setDebugApiUrl:function(){}},V=Object(a.createContext)(M);V.Consumer;function W(e){var t=e.children,n=Object(a.useState)(M.apiUrl),r=Object(C.a)(n,2),o=r[0],c=r[1],i=Object(a.useState)(M.apiDebugUrl),s=Object(C.a)(i,2),l=s[0],u=s[1],d=Object(a.useState)(null),b=Object(C.a)(d,2),j=b[0],h=b[1],p=Object(a.useState)(null),m=Object(C.a)(p,2),O=m[0],x=m[1];return Object(a.useEffect)((function(){try{h(new z.Bee(o)),sessionStorage.setItem("api_host",o)}catch(e){h(null)}}),[o]),Object(a.useEffect)((function(){try{x(new z.BeeDebug(l)),sessionStorage.setItem("debug_api_host",l)}catch(e){x(null)}}),[l]),Object(g.jsx)(V.Provider,{value:{apiUrl:o,apiDebugUrl:l,beeApi:j,beeDebugApi:O,setApiUrl:c,setDebugApiUrl:u},children:t})}var Z=n(184),_=n.n(Z),Y={status:{all:!1,version:!1,blockchainConnection:!1,debugApiConnection:!1,apiConnection:!1,topology:!1,chequebook:!1},latestPublishedVersion:void 0,latestUserVersion:void 0,latestUserVersionExact:void 0,isLatestBeeVersion:!1,latestBeeVersionUrl:"https://github.com/ethersphere/bee/releases/latest",error:null,apiHealth:!1,debugApiHealth:null,nodeAddresses:null,topology:null,chequebookAddress:null,peers:null,chequebookBalance:null,peerBalances:null,peerCheques:null,settlements:null,latestBeeRelease:null,isLoading:!0,isRefreshing:!1,lastUpdate:null,start:function(){},stop:function(){},refresh:function(){return Promise.reject()}},G=Object(a.createContext)(Y);G.Consumer;function H(e,t,n,a,r,o,c){var i={version:Boolean(e&&R.a.satisfies(e.version,q.a.bee,{includePrerelease:!0})),blockchainConnection:Boolean(null===t||void 0===t?void 0:t.ethereum),debugApiConnection:Boolean("ok"===(null===e||void 0===e?void 0:e.status)),apiConnection:n,topology:Boolean((null===a||void 0===a?void 0:a.connected)&&(null===a||void 0===a?void 0:a.connected)>0),chequebook:Boolean(null===r||void 0===r?void 0:r.chequebookAddress)&&null!==o&&(null===o||void 0===o?void 0:o.totalBalance.toBigNumber.isGreaterThan(0))};return Object(S.a)(Object(S.a)({},i),{},{all:!c&&Object.values(i).every((function(e){return e}))})}function K(e){var t,n,r=e.children,o=Object(a.useContext)(V),c=o.beeApi,i=o.beeDebugApi,s=Object(a.useState)(!1),l=Object(C.a)(s,2),u=l[0],d=l[1],b=Object(a.useState)(null),j=Object(C.a)(b,2),h=j[0],p=j[1],m=Object(a.useState)(null),O=Object(C.a)(m,2),x=O[0],f=O[1],v=Object(a.useState)(null),y=Object(C.a)(v,2),S=y[0],B=y[1],N=Object(a.useState)(null),A=Object(C.a)(N,2),L=A[0],I=A[1],T=Object(a.useState)(null),P=Object(C.a)(T,2),D=P[0],U=P[1],F=Object(a.useState)(null),q=Object(C.a)(F,2),z=q[0],M=q[1],W=Object(a.useState)(null),Z=Object(C.a)(W,2),K=Z[0],X=Z[1],J=Object(a.useState)(null),$=Object(C.a)(J,2),Q=$[0],ee=$[1],te=Object(a.useState)(null),ne=Object(C.a)(te,2),ae=ne[0],re=ne[1],oe=function(){var e=Object(a.useState)(null),t=Object(C.a)(e,2),n=t[0],r=t[1],o=Object(a.useState)(!1),c=Object(C.a)(o,2),i=c[0],s=c[1],l=Object(a.useState)(null),u=Object(C.a)(l,2),d=u[0],b=u[1];return Object(a.useEffect)((function(){_.a.get("".concat("https://api.github.com/repos/ethersphere/bee","/releases/latest")).then((function(e){r(e.data)})).catch((function(e){b(e)})).finally((function(){s(!1)}))}),[]),{latestBeeRelease:n,isLoadingLatestBeeRelease:i,error:d}}().latestBeeRelease,ce=Object(a.useState)(Y.error),ie=Object(C.a)(ce,2),se=ie[0],le=ie[1],ue=Object(a.useState)(Y.isLoading),de=Object(C.a)(ue,2),be=de[0],je=de[1],he=Object(a.useState)(Y.isRefreshing),pe=Object(C.a)(he,2),me=pe[0],Oe=pe[1],xe=Object(a.useState)(Y.lastUpdate),ge=Object(C.a)(xe,2),fe=ge[0],ve=ge[1],ye=Object(a.useState)(3e4),we=Object(C.a)(ye,2),ke=we[0],Ce=we[1],Se=null===(t=R.a.coerce(null===oe||void 0===oe?void 0:oe.name))||void 0===t?void 0:t.version,Be=null===(n=R.a.coerce(null===h||void 0===h?void 0:h.version))||void 0===n?void 0:n.version,Ne=null===h||void 0===h?void 0:h.version;Object(a.useEffect)((function(){je(!0),d(!1),Ae()}),[c]),Object(a.useEffect)((function(){je(!0),p(null),f(null),B(null),U(null),I(null),M(null),X(null),ee(null),re(null),Ae()}),[i]);var Ae=function(){var e=Object(k.a)(w.a.mark((function e(){var t,n,a,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!me){e.next=2;break}return e.abrupt("return");case 2:if(c&&i){e.next=5;break}return je(!1),e.abrupt("return");case 5:return e.prev=5,Oe(!0),le(null),t=function(){var e=Object(k.a)(w.a.mark((function e(){var t,n,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.getChequebookBalance();case 2:return t=e.sent,n=t.totalBalance,a=t.availableBalance,e.abrupt("return",{totalBalance:new E(n),availableBalance:new E(a)});case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n=function(){var e=Object(k.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.getAllBalances();case 2:return t=e.sent,n=t.balances,e.abrupt("return",n.map((function(e){var t=e.peer,n=e.balance;return{peer:t,balance:new E(n)}})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=function(){var e=Object(k.a)(w.a.mark((function e(){var t,n,a,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.getAllSettlements();case 2:return t=e.sent,n=t.totalReceived,a=t.settlements,r=t.totalSent,e.abrupt("return",{totalReceived:new E(n),totalSent:new E(r),settlements:a.map((function(e){var t=e.peer,n=e.received,a=e.sent;return{peer:t,received:new E(n),sent:new E(a)}}))});case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r=[c.isConnected().then(d).catch((function(){return d(!1)})),i.getHealth().then(p).catch((function(){return p(null)})),i.getNodeAddresses().then(f).catch((function(){return f(null)})),i.getTopology().then(B).catch((function(){return B(null)})),i.getPeers().then(U).catch((function(){return U(null)})),i.getChequebookAddress().then(I).catch((function(){return I(null)})),i.getLastCheques().then(ee).catch((function(){return ee(null)})),t().then(M).catch((function(){return M(null)})),n().then(X).catch((function(){return X(null)})),a().then(re).catch((function(){return re(null)}))],e.next=14,Promise.allSettled(r);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(5),le(e.t0);case 19:return e.prev=19,je(!1),Oe(!1),ve(Date.now()),e.finish(19);case 24:case"end":return e.stop()}}),e,null,[[5,16,19,24]])})));return function(){return e.apply(this,arguments)}}();return Object(a.useEffect)((function(){if(Ae(),ke){var e=setInterval(Ae,ke);return function(){return clearInterval(e)}}}),[ke,i,c]),Object(g.jsx)(G.Provider,{value:{status:H(h,x,u,S,L,z,se),latestUserVersion:Be,latestUserVersionExact:Ne,latestPublishedVersion:Se,isLatestBeeVersion:Boolean(Se&&Be&&R.a.satisfies(Se,Be,{includePrerelease:!0})),latestBeeVersionUrl:(null===oe||void 0===oe?void 0:oe.html_url)||"https://github.com/ethersphere/bee/releases/latest",error:se,apiHealth:u,debugApiHealth:h,nodeAddresses:x,topology:S,chequebookAddress:L,peers:D,chequebookBalance:z,peerBalances:K,peerCheques:Q,settlements:ae,latestBeeRelease:oe,isLoading:be,isRefreshing:me,lastUpdate:fe,start:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return Ce(e)},stop:function(){return Ce(null)},refresh:Ae},children:r})}var X=n(515),J=n(558),$=n(513),Q=n(559),ee=n(560),te=Object(j.a)((function(e){return Object(h.a)({root:{width:"100%",padding:0,margin:0,marginTop:e.spacing(4),"&:first-child":{marginTop:0}},rootLevel1:{marginTop:e.spacing(1)},rootLevel2:{marginTop:e.spacing(.5)},header:{backgroundColor:e.palette.background.paper},contentLevel0:{marginTop:e.spacing(1)},contentLevel12:{marginTop:e.spacing(.25)},infoText:{color:"#c9c9c9"}})}));function ne(e){var t=e.children,n=e.label,r=e.level,o=e.defaultOpen,c=e.info,i=te(),s=Object(a.useState)(Boolean(o)),l=Object(C.a)(s,2),u=l[0],d=l[1],b="",j="h1",h=i.contentLevel0;return 1===r?(b=i.rootLevel1,j="h2",h=i.contentLevel12):2===r&&(b=i.rootLevel2,j="h3",h=i.contentLevel12),Object(g.jsxs)("div",{className:"".concat(i.root," ").concat(b),children:[Object(g.jsxs)(X.a,{button:!0,onClick:function(){d(!u)},className:i.header,children:[Object(g.jsx)(J.a,{primary:Object(g.jsx)(m.a,{variant:j,children:n})}),Object(g.jsxs)("div",{style:{display:"flex"},children:[!u&&Object(g.jsx)(m.a,{variant:"body2",className:i.infoText,children:c}),u?Object(g.jsx)(Q.a,{}):Object(g.jsx)(ee.a,{})]})]}),Object(g.jsx)($.a,{in:u,timeout:"auto",unmountOnExit:!0,children:Object(g.jsx)("div",{className:h,children:t})})]})}var ae=n(604),re=n(563),oe=n(564),ce=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),wordBreak:"break-word"},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}}})}));function ie(e){var t=e.label,n=e.value,a=e.tooltip,r=ce();return Object(g.jsx)(X.a,{className:r.header,children:Object(g.jsxs)(p.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[t&&Object(g.jsx)(m.a,{variant:"body1",children:t}),n&&Object(g.jsxs)(m.a,{variant:"body2",children:[n,a&&Object(g.jsx)(ae.a,{title:a,placement:"top",arrow:!0,children:Object(g.jsx)(re.a,{size:"small",className:r.copyValue,children:Object(g.jsx)(oe.a,{strokeWidth:1})})})]})]})})}var se=n(565),le=n(566),ue=n(86),de=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),borderLeft:"".concat(e.spacing(.25),"px solid rgba(0,0,0,0)"),wordBreak:"break-word"},headerOpen:{borderLeft:"".concat(e.spacing(.25),"px solid ").concat(e.palette.primary.main)},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}},content:{marginTop:e.spacing(2),marginBottom:e.spacing(2)},keyMargin:{marginRight:e.spacing(1)}})}));function be(e){var t,n=e.label,r=e.value,o=de(),c=Object(a.useState)(!1),i=Object(C.a)(c,2),s=i[0],l=i[1],u=Object(a.useState)(!1),d=Object(C.a)(u,2),b=d[0],j=d[1],h=function(){return l(!s)},O=function(){return j(!0)},x=function(){return j(!1)},f=function(e){return e.replace(/^0x/i,"").length}(t=r)%6===0?t.match(/(0x|.{6})/gi)||[]:t.match(/(0x|.{1,8})/gi)||[],v=function(e){return"string"===typeof e&&/^0x[0-9a-f]+$/i.test(e)}(r);return Object(g.jsx)(X.a,{className:"".concat(o.header," ").concat(s?o.headerOpen:""),children:Object(g.jsxs)(p.a,{container:!0,direction:"column",justifyContent:"space-between",alignItems:"stretch",children:[Object(g.jsxs)(p.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[n&&Object(g.jsx)(m.a,{variant:"body1",children:n}),Object(g.jsx)(m.a,{variant:"body2",children:Object(g.jsxs)("div",{children:[!s&&Object(g.jsx)("span",{className:o.copyValue,children:Object(g.jsx)(ae.a,{title:b?"Copied":"Copy",placement:"top",arrow:!0,onClose:x,children:Object(g.jsx)(ue.CopyToClipboard,{text:r,children:Object(g.jsx)("span",{onClick:O,children:"".concat(v?"".concat(f[0]," ").concat(f[1]):f[0],"[\u2026]").concat(f[f.length-1])})})})}),Object(g.jsx)(re.a,{size:"small",className:o.copyValue,children:s?Object(g.jsx)(se.a,{onClick:h,strokeWidth:1}):Object(g.jsx)(le.a,{onClick:h,strokeWidth:1})})]})})]}),Object(g.jsx)($.a,{in:s,timeout:"auto",unmountOnExit:!0,children:Object(g.jsx)("div",{className:o.content,children:Object(g.jsx)(ae.a,{title:b?"Copied":"Copy",placement:"top",arrow:!0,onClose:x,children:Object(g.jsx)(ue.CopyToClipboard,{text:r,children:Object(g.jsx)("span",{onClick:O,children:Object(g.jsx)("span",{className:o.copyValue,children:f.map((function(e,t){return Object(g.jsx)(m.a,{variant:"body2",className:o.keyMargin,component:"span",children:e},t)}))})})})})})})]})})}var je=n(186),he=1e5,pe="There may be issues with your Bee node or connection.",me={connectedPeers:[{minimumValue:200,explanation:"Perfect! ".concat(200," or more connected peers indicate a healthy topology."),score:2},{minimumValue:1,explanation:"Your Bee node is connected to peers, but this number should ideally be above ".concat(200,". If you have only started your Bee node, this number may increase quickly."),score:1},{minimumValue:0,explanation:"Your Bee node has not connected to any peers. "+pe,score:0}],population:[{minimumValue:he,explanation:"Perfect! Your Bee node seems to have a realistic value for the network size, which means everything is working well on your end.",score:2},{minimumValue:1,explanation:"Population is usually above ".concat(he.toLocaleString(),". If the number does not increase within a few hours, there may be issues with your Bee node."),score:1},{minimumValue:0,explanation:"Your Bee node has no information on the network population. "+pe,score:0}],depth:[{minimumValue:12,explanation:"Perfect! Your Bee node has the highest available depth.",score:2},{minimumValue:1,explanation:"Your Bee node is supposed to reach a depth of ".concat(12," eventually. Stagnation or decrease in this number may indicate problems with your Bee node."),score:1},{minimumValue:0,explanation:"Your Bee node has not started building its topology yet. "+pe,score:0}]};function Oe(e,t){var n,a=me[e],r=a[0].score,o=Object(je.a)(a);try{for(o.s();!(n=o.n()).done;){var c=n.value;if(t>=c.minimumValue)return{score:c.score,maximumScore:r,explanation:c.explanation}}}catch(s){o.e(s)}finally{o.f()}var i=a[a.length-1];return{score:i.score,maximumScore:r,explanation:i.explanation}}var xe=function(e){var t,n,a,r,o,c,i={connectedPeers:Oe("connectedPeers",(null===(t=e.topology)||void 0===t?void 0:t.connected)||0),population:Oe("population",(null===(n=e.topology)||void 0===n?void 0:n.population)||0),depth:Oe("depth",(null===(a=e.topology)||void 0===a?void 0:a.depth)||0)},s=Object.values(i).reduce((function(e,t){return e+t.maximumScore}),0),l=Object.values(i).reduce((function(e,t){return e+t.score}),0),u=Math.round(l/s*100)+"%";return Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(ie,{label:"Overall Health Indicator",value:u}),Object(g.jsx)(ie,{label:"Connected Peers",value:null===(r=e.topology)||void 0===r?void 0:r.connected.toString(),tooltip:i.connectedPeers.explanation}),Object(g.jsx)(ie,{label:"Population",value:null===(o=e.topology)||void 0===o?void 0:o.population.toString(),tooltip:i.population.explanation}),Object(g.jsx)(ie,{label:"Depth",value:null===(c=e.topology)||void 0===c?void 0:c.depth.toString(),tooltip:i.depth.explanation})]})};function ge(){var e=Object(a.useContext)(G),t=e.status,n=e.latestUserVersion,r=e.isLatestBeeVersion,o=e.latestBeeVersionUrl,c=e.topology,i=e.nodeAddresses,s=e.chequebookAddress;return t.all?Object(g.jsxs)("div",{children:[Object(g.jsxs)(ne,{label:"Bee Node",defaultOpen:!0,children:[Object(g.jsx)(ie,{label:"Agent",value:Object(g.jsxs)("div",{children:[Object(g.jsx)("a",{href:"https://github.com/ethersphere/bee",rel:"noreferrer",target:"_blank",children:"Bee"})," ".concat(n||"-"," "),Object(g.jsx)(b.a,{size:"small",variant:"outlined",href:o,target:"_blank",children:r?"latest":"update"})]})}),Object(g.jsx)(be,{label:"Public key",value:(null===i||void 0===i?void 0:i.publicKey)||""}),Object(g.jsx)(be,{label:"PSS public key",value:(null===i||void 0===i?void 0:i.pssPublicKey)||""}),Object(g.jsx)(be,{label:"Overlay address (Peer ID)",value:(null===i||void 0===i?void 0:i.overlay)||""}),Object(g.jsx)(ne,{level:1,label:"Underlay addresses",children:null===i||void 0===i?void 0:i.underlay.map((function(e){return Object(g.jsx)(ie,{value:e},e)}))})]}),Object(g.jsxs)(ne,{label:"Blockchain",defaultOpen:!0,children:[Object(g.jsx)(be,{label:"Ethereum address",value:(null===i||void 0===i?void 0:i.ethereum)||""}),Object(g.jsx)(be,{label:"Chequebook contract address",value:(null===s||void 0===s?void 0:s.chequebookAddress)||""})]}),Object(g.jsx)(ne,{label:"Connectivity",defaultOpen:!0,children:Object(g.jsx)(xe,{topology:c})})]}):Object(g.jsx)(v,{})}var fe=n(602),ve=n(206),ye=n(601),we=n(567),ke=["children","value","index"];function Ce(e){var t=e.children,n=e.value,a=e.index,r=Object(ve.a)(e,ke);return Object(g.jsx)("div",Object(S.a)(Object(S.a)({role:"tabpanel",hidden:n!==a},r),{},{children:n===a&&t}))}var Se=Object(j.a)((function(e){return Object(h.a)({root:{flexGrow:1},content:{marginTop:e.spacing(2)}})}));function Be(e){var t=e.values,n=e.index,a=e.indexChanged,o=Se(),c=r.a.useState(n||0),i=Object(C.a)(c,2),s=i[0],l=i[1],u=void 0!==n?n:s;return Object(g.jsxs)("div",{className:o.root,children:[Object(g.jsx)(ye.a,{value:u,onChange:function(e,t){a?a(t):l(t)},variant:"fullWidth",children:t.map((function(e,t){var n=e.label;return Object(g.jsx)(we.a,{label:n},t)}))}),Object(g.jsx)("div",{className:o.content,children:t.map((function(e,t){var n=e.component;return Object(g.jsx)(Ce,{value:u,index:t,children:n},t)}))})]})}var Ne,Ae,Le=n(603),Ie=function(e){return Object(g.jsx)("div",{style:{textAlign:"left"},children:Object(g.jsx)(Le.a,{language:e.language,showLineNumbers:e.showLineNumbers,children:e.code})})};!function(e){e[e.macOS=0]="macOS",e[e.Linux=1]="Linux",e[e.Windows=2]="Windows",e[e.iOS=3]="iOS",e[e.Android=4]="Android"}(Ne||(Ne={})),function(e){e[e.macOS=Ne.macOS]="macOS",e[e.Linux=Ne.Linux]="Linux"}(Ae||(Ae={}));var Te={platform:Ae.macOS,setPlatform:function(){}},Pe=Object(a.createContext)(Te);Pe.Consumer;function De(e){var t=e.children,n=Object(a.useState)(Ae.Linux),r=Object(C.a)(n,2),o=r[0],c=r[1];return Object(a.useEffect)((function(){var e=function(){var e=window.navigator.userAgent,t=window.navigator.platform;return["Macintosh","MacIntel","MacPPC","Mac68K"].includes(t)?Ne.macOS:["iPhone","iPad","iPod"].includes(t)?Ne.iOS:["Win32","Win64","Windows","WinCE"].includes(t)?Ne.Windows:/Android/.test(e)?Ne.Android:/Linux/.test(t)?Ne.Linux:null}();c(function(e){return Object.keys(Ae).includes(e)}(e)?e:Ae.Linux)}),[]),Object(g.jsx)(Pe.Provider,{value:{platform:o,setPlatform:c},children:t})}function Ue(e){var t=Object(a.useContext)(Pe),n=t.platform,r=t.setPlatform;return Object(g.jsx)(Be,{index:n,indexChanged:r,values:[{label:"Linux",component:Object(g.jsx)(Ie,{showLineNumbers:e.showLineNumbers,language:"bash",code:e.linux})},{label:"macOS",component:Object(g.jsx)(Ie,{showLineNumbers:e.showLineNumbers,language:"bash",code:e.mac})}]})}var Ee=n(517),Fe=n(568),Re=n(569),qe=n(570),ze=Object(j.a)((function(e){return Object(h.a)({action:{marginTop:e.spacing(.75),marginBottom:e.spacing(1),marginRight:e.spacing(1)}})}));function Me(e){var t=e.children,n=ze();return Array.isArray(t)?Object(g.jsx)(p.a,{container:!0,direction:"row",children:t.map((function(e,t){return Object(g.jsx)(p.a,{className:n.action,children:e},t)}))}):Object(g.jsx)(p.a,{container:!0,direction:"row",children:Object(g.jsx)(p.a,{className:n.action,children:t})})}var Ve=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:"#F7F7F7",marginBottom:e.spacing(.25)},typography:{color:"#242424"}})}));function We(e){var t=e.children,n=Ve();return Object(g.jsx)(X.a,{className:n.header,children:Object(g.jsx)(m.a,{variant:"body1",className:n.typography,children:t})})}var Ze=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),borderLeft:"".concat(e.spacing(.25),"px solid rgba(0,0,0,0)"),wordBreak:"break-word"},headerOpen:{borderLeft:"".concat(e.spacing(.25),"px solid ").concat(e.palette.primary.main)},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}},content:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},keyMargin:{marginRight:e.spacing(1)},unselectableLabel:{cursor:"default",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"}})}));function _e(e){var t=e.label,n=e.value,r=e.onConfirm,o=e.onChange,c=e.confirmLabel,i=e.confirmLabelDisabled,s=e.expandedOnly,l=e.helperText,u=e.placeholder,d=Ze(),j=Object(a.useState)(Boolean(s)),h=Object(C.a)(j,2),O=h[0],x=h[1],f=Object(a.useState)(n||""),v=Object(C.a)(f,2),y=v[0],w=v[1],k=function(){return x(!O)};return Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(X.a,{className:"".concat(d.header," ").concat(O?d.headerOpen:""),children:Object(g.jsxs)(p.a,{container:!0,direction:"column",justifyContent:"space-between",alignItems:"stretch",children:[Object(g.jsxs)(p.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[t&&Object(g.jsx)(m.a,{variant:"body1",className:d.unselectableLabel,children:t}),Object(g.jsx)(m.a,{variant:"body2",children:Object(g.jsxs)("div",{children:[!O&&n,!s&&Object(g.jsx)(re.a,{size:"small",className:d.copyValue,children:O?Object(g.jsx)(se.a,{onClick:k,strokeWidth:1}):Object(g.jsx)(Fe.a,{onClick:k,strokeWidth:1})})]})})]}),Object(g.jsx)($.a,{in:O,timeout:"auto",unmountOnExit:!0,children:Object(g.jsx)(Ee.a,{value:y,placeholder:u,onChange:function(e){w(e.target.value),o&&o(e.target.value)},fullWidth:!0,className:d.content,autoFocus:!0})})]})}),Object(g.jsxs)($.a,{in:O,timeout:"auto",unmountOnExit:!0,children:[l&&Object(g.jsx)(We,{children:l}),Object(g.jsxs)(Me,{children:[Object(g.jsx)(b.a,{variant:"contained",disabled:y===n||Boolean(i)||""===y&&void 0===n,startIcon:Object(g.jsx)(Re.a,{size:"1rem"}),onClick:function(){return r(y)},children:c||"Save"}),Object(g.jsx)(b.a,{variant:"contained",disabled:y===n||""===y,startIcon:Object(g.jsx)(qe.a,{size:"1rem"}),onClick:function(){return w(n||"")},children:"Cancel"})]})]})]})}var Ye=n(571);function Ge(e){var t=e.isOk,n=e.size,a=e.className,r=n||"1rem";return e.isLoading?Object(g.jsx)(Ye.a,{size:r,className:a}):Object(g.jsx)("span",{className:a,style:{backgroundColor:t?"#1de600":"#ff3a52",height:r,width:r,borderRadius:"50%",display:"inline-block"}})}function He(){var e=Object(a.useContext)(G),t=e.status,n=e.isLoading,r=Object(a.useContext)(V),o=r.setDebugApiUrl,c=r.apiDebugUrl,i=t.debugApiConnection;return Object(g.jsxs)(ne,{label:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Ge,{isOk:i,isLoading:n})," Connection to Bee Debug API"]}),children:[Object(g.jsx)(We,{children:i?"The connection to the Bee nodes deug API has been successful":"We cannot connect to your nodes debug API. Please check the following to troubleshoot your issue."}),Object(g.jsx)(_e,{label:"Bee Debug API",value:c,onConfirm:o}),!i&&Object(g.jsx)(ne,{level:1,label:"Troubleshoot",children:Object(g.jsx)(ie,{label:Object(g.jsxs)("ol",{children:[Object(g.jsx)("li",{children:"Check the status of your node by running the below command to see if your node is running."}),Object(g.jsx)(Ue,{showLineNumbers:!0,linux:"sudo systemctl status bee",mac:"brew services list"}),Object(g.jsx)("li",{children:"If your node is running, check your firewall settings to make sure that port 1635 (or your custom specified port) is bound to localhost. If your node is not running try executing the below command to start your bee node"}),Object(g.jsx)(fe.a,{style:{marginTop:"10px",marginBottom:"10px"},elevation:6,variant:"filled",severity:"error",children:'Your debug node API should never be completely open to the internet. If you want to connect remotely, make sure your firewall settings are set to only allow specific trusted IP addresses and block all other ports. A simple google search for "what is my ip" will show you your computers public IP address to allow.'}),Object(g.jsx)(Ue,{showLineNumbers:!0,linux:"sudo systemctl start bee",mac:"brew services start swarm-bee"}),Object(g.jsx)("li",{children:"Run the commands to validate your node is running and see the log output."}),Object(g.jsx)(Ue,{showLineNumbers:!0,linux:"sudo systemctl status bee \njournalctl --lines=100 --follow --unit bee",mac:"brew services list \ntail -f /usr/local/var/log/swarm-bee/bee.log"}),Object(g.jsxs)("li",{children:["Lastly, check your nodes configuration settings to validate the debug API is enabled and the Cross Origin Resource Sharing (CORS) setting is configured to allow your host. Config parameter"," ",Object(g.jsx)("strong",{children:"debug-api-enable"})," must be set to ",Object(g.jsx)("strong",{children:"true"})," and"," ",Object(g.jsx)("strong",{children:"cors-allowed-origins"})," must be set to your host domain or IP (you can also use the wildcard ",Object(g.jsx)("code",{children:"cors-allowed-origins: ['*']"}),"). If edits are made to the configuration run the restart command below for changes to take effect."]}),Object(g.jsx)(Ue,{showLineNumbers:!0,linux:"sudo vi /etc/bee/bee.yaml\nsudo systemctl restart bee",mac:"sudo vi /usr/local/etc/swarm-bee/bee.yaml \nbrew services restart swarm-bee"})]})})})]})}function Ke(){var e=Object(a.useContext)(V),t=e.setApiUrl,n=e.apiUrl,r=Object(a.useContext)(G),o=r.status,c=r.isLoading,i=o.apiConnection;return Object(g.jsxs)(ne,{label:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Ge,{isOk:i,isLoading:c})," Connection to Bee API"]}),children:[Object(g.jsx)(We,{children:i?"The connection to the Bee nodes API has been successful":"Could not connect to your Bee nodes API. Please check the troubleshoot below on how you may resolve it."}),Object(g.jsx)(_e,{label:"Bee API",value:n,onConfirm:t}),!i&&Object(g.jsx)(ne,{level:1,label:"Troubleshoot",children:Object(g.jsx)(ie,{label:Object(g.jsxs)("ol",{children:[Object(g.jsx)("li",{children:"Check the status of your node by running the below command to see if your node is running."}),Object(g.jsx)(Ue,{showLineNumbers:!0,linux:"sudo systemctl status bee",mac:"brew services list"}),Object(g.jsx)("li",{children:"If your node is running, check your firewall settings to make sure that port 1633 (or your custom specified port) is exposed to the internet. If your node is not running try executing the below command to start your bee node"}),Object(g.jsx)(Ue,{showLineNumbers:!0,linux:"sudo systemctl start bee",mac:"brew services start swarm-bee"}),Object(g.jsx)("li",{children:"Run the commands to validate your node is running and see the log output."}),Object(g.jsx)(Ue,{showLineNumbers:!0,linux:"sudo systemctl status bee \njournalctl --lines=100 --follow --unit bee",mac:"brew services list \ntail -f /usr/local/var/log/swarm-bee/bee.log"})]})})})]})}function Xe(){var e=Object(a.useContext)(G),t=e.status,n=e.isLoading,r=e.latestUserVersion,o=e.latestPublishedVersion,c=e.latestBeeVersionUrl,i=t.version;return Object(g.jsxs)(ne,{label:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Ge,{isOk:i,isLoading:n})," Bee Version"]}),children:[Object(g.jsx)(We,{children:i?"You are running the latest version of Bee.":Object(g.jsxs)(g.Fragment,{children:["Your Bee version is out of date. Please update to the"," ",Object(g.jsx)("a",{href:c,rel:"noreferrer",target:"_blank",children:"latest"})," ","before continuing. Rerun the installation script below to upgrade. For more information please see the"," ",Object(g.jsx)("a",{href:"https://docs.ethswarm.org/docs/installation/manual#upgrading-bee",rel:"noreferrer",target:"_blank",children:"Docs"}),".",Object(g.jsx)(Ue,{showLineNumbers:!0,linux:"bee version\nwget https://github.com/ethersphere/bee/releases/download/".concat(o,"/bee_").concat(o,"_amd64.deb\nsudo dpkg -i bee_").concat(o,"_amd64.deb"),mac:"bee version\nbrew tap ethersphere/tap\nbrew install swarm-bee\nbrew services start swarm-bee"})]})}),Object(g.jsx)(ie,{label:"Your Version",value:r||"-"}),Object(g.jsx)(ie,{label:"Latest Version",value:o||"-"})]})}function Je(){var e=Object(a.useContext)(G),t=e.status,n=e.isLoading,r=e.nodeAddresses,o=t.blockchainConnection;return Object(g.jsxs)(ne,{label:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Ge,{isOk:o,isLoading:n})," Connection to Blockchain"]}),children:[Object(g.jsx)(We,{children:o?"Your node is connected to the xDai blockchain":Object(g.jsxs)(g.Fragment,{children:["Your Bee node must have access to the xDai blockchain, so that it can interact and deploy your chequebook contract. You can run"," ",Object(g.jsx)("a",{href:"https://www.xdaichain.com/",rel:"noreferrer",target:"_blank",children:"your own xDai node"}),", or use a provider instead - we recommend"," ",Object(g.jsx)("a",{href:"https://getblock.io/",rel:"noreferrer",target:"_blank",children:"Getblock"}),". By default, Bee expects a local node at http://localhost:8545. To use a provider instead, simply change the ",Object(g.jsx)("strong",{children:"swap-endpoint"})," in your configuration file."]})}),(null===r||void 0===r?void 0:r.ethereum)&&Object(g.jsx)(be,{label:"Ethereum Address",value:null===r||void 0===r?void 0:r.ethereum})]})}var $e=n(579),Qe=n(576),et=n(572),tt=n(578),nt=n(574),at=n(575),rt=n(573),ot=n(577);function ct(e){var t=e.successMessage,n=e.errorMessage,r=e.dialogMessage,o=e.min,c=e.max,i=e.label,s=e.action,l=e.icon,d=Object(a.useState)(!1),j=Object(C.a)(d,2),h=j[0],p=j[1],m=Object(a.useState)(""),O=Object(C.a)(m,2),x=O[0],f=O[1],v=Object(a.useState)(null),y=Object(C.a)(v,2),S=y[0],B=y[1],N=Object(a.useState)(null),A=Object(C.a)(N,2),L=A[0],I=A[1],T=Object(u.b)().enqueueSnackbar,P=function(){p(!1)},D=function(){var e=Object(k.a)(w.a.mark((function e(){var a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==S){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,s(S.toBigInt);case 5:a=e.sent,p(!1),T("".concat(t," Transaction ").concat(a),{variant:"success"}),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),T("".concat(n," Error: ").concat(e.t0.message),{variant:"error"});case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(){return e.apply(this,arguments)}}();return Object(g.jsxs)("div",{children:[Object(g.jsx)(b.a,{variant:"contained",onClick:function(e){p(!0),e.stopPropagation()},startIcon:l,children:i}),Object(g.jsxs)(et.a,{open:h,onClose:P,"aria-labelledby":"form-dialog-title",children:[Object(g.jsx)(rt.a,{id:"form-dialog-title",children:i}),Object(g.jsxs)(nt.a,{children:[Object(g.jsx)(at.a,{children:r}),Object(g.jsx)(Qe.a,{autoFocus:!0,margin:"dense",id:"name",type:"text",placeholder:"Amount",fullWidth:!0,value:x,onChange:function(e){var t=e.target.value;f(t),I(null);try{var n=E.fromDecimal(t);B(n),o&&n.toDecimal.isLessThan(o)&&I(new Error("Needs to be more than ".concat(o))),c&&n.toDecimal.isGreaterThan(c)&&I(new Error("Needs to be less than ".concat(c)))}catch(e){I(e)}}}),L&&Object(g.jsxs)(ot.a,{error:!0,children:["Please provide valid BZZ amount (max 16 decimals). Error: ",L.message]})]}),Object(g.jsxs)(tt.a,{children:[Object(g.jsx)(b.a,{onClick:P,color:"primary",children:"Cancel"}),Object(g.jsx)(b.a,{onClick:D,color:"primary",children:i})]})]})]})}function it(){var e=Object(a.useContext)(V).beeDebugApi;return Object(g.jsx)(ct,{successMessage:"Successful deposit.",errorMessage:"Error with depositing",dialogMessage:"Specify the amount of BZZ you would like to deposit to your node.",label:"Deposit",icon:Object(g.jsx)($e.a,{size:"1rem"}),min:new A.BigNumber(0),action:function(t){if(!e)throw new Error("Bee Debug URL is not valid");return e.depositTokens(t.toString())}})}var st=function(){var e=Object(a.useContext)(G),t=e.status,n=e.isLoading,r=e.chequebookAddress,o=t.chequebook;return Object(g.jsxs)(ne,{label:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Ge,{isOk:o,isLoading:n})," Chequebook Deployment & Funding"]}),children:[Object(g.jsx)(We,{children:o?"Your chequebook is deployed and funded":Object(g.jsxs)(g.Fragment,{children:["Your chequebook is either not deployed or funded. To run the node you will need xDAI and xBZZ on the xDai network. You may need to aquire BZZ (e.g. ",Object(g.jsx)("a",{href:"https://bzz.exchange/",children:"bzz.exchange"}),") and bridge it to the xDai network through the ",Object(g.jsx)("a",{href:"https://omni.xdaichain.com/bridge",children:"omni bridge"}),". To pay the transaction fees, you will also need xDAI token. You can purchase DAI on the network and bridge it to xDai network through the ",Object(g.jsx)("a",{href:"https://bridge.xdaichain.com/",children:"xDai Bridge"}),". See the"," ",Object(g.jsx)("a",{href:"https://www.xdaichain.com/#xdai-stable-chain",children:"official xDai website"})," for more information."]})}),r&&Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(be,{label:"Chequebook Address",value:r.chequebookAddress}),Object(g.jsx)(Me,{children:Object(g.jsx)(it,{})})]})]})};function lt(){var e=Object(a.useContext)(G),t=e.status,n=e.isLoading,r=e.topology,o=t.topology;return Object(g.jsxs)(ne,{label:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Ge,{isOk:o,isLoading:n})," Connection to Peers"]}),children:[Object(g.jsx)(We,{children:o?"You are connected to other Bee nodes":"Your node is not connected to any peers. Please wait a bit if you just started the node, otherwise review your configuration file."}),Object(g.jsx)(xe,{topology:r})]})}function ut(){return Object(g.jsxs)("div",{children:[Object(g.jsx)(He,{}),Object(g.jsx)(Xe,{}),Object(g.jsx)(Je,{}),Object(g.jsx)(st,{}),Object(g.jsx)(Ke,{}),Object(g.jsx)(lt,{})]})}function dt(){var e=Object(a.useContext)(V).apiUrl,t=Object(a.useState)(void 0),n=Object(C.a)(t,2),r=n[0],o=n[1];return Object(g.jsx)(_e,{label:"Swarm Hash",onConfirm:function(t){return window.open("".concat(e,"/bzz/").concat(t),"_blank")},onChange:function(e){z.Utils.isHexString(e,64)||z.Utils.isHexString(e,128)?o(void 0):o("Incorrect format of swarm hash. Expected 64 or 128 hexstring characters.")},helperText:r,confirmLabel:"Download",confirmLabelDisabled:Boolean(r),placeholder:"e.g. 31fb0362b1a42536134c86bc58b97ac0244e5c6630beec3e27c2d1cecb38c605",expandedOnly:!0})}var bt=n(605),jt=n(606),ht=n(585),pt=n(202),mt=n(580),Ot=Object(j.a)((function(e){return Object(h.a)({root:{width:"100%",marginTop:e.spacing(2),marginBottom:e.spacing(2)}})}));function xt(e){var t=Ot(),n=e.file.size>=1e8;return Object(g.jsx)($.a,{in:n,children:Object(g.jsx)("div",{className:t.root,children:Object(g.jsxs)(fe.a,{severity:"warning",children:[Object(g.jsx)(mt.a,{children:"Warning"}),"The file you are trying to upload is above the recommended size. The chunks may not be synchronised properly over the network."]})})})}var gt=n(581);function ft(e){var t=e.value,n=Object(u.b)().enqueueSnackbar;return Object(g.jsx)("div",{style:{marginRight:"3px",marginLeft:"3px"},children:Object(g.jsx)(re.a,{color:"primary",size:"small",onClick:function(){return n("Copied: ".concat(t),{variant:"success"})},children:Object(g.jsx)(ue.CopyToClipboard,{text:t,children:Object(g.jsx)(gt.a,{style:{height:"20px"}})})})})}var vt={stamps:null,error:null,isLoading:!1,lastUpdate:null,start:function(){},stop:function(){},refresh:function(){return Promise.reject()}},yt=Object(a.createContext)(vt);yt.Consumer;function wt(e){var t=e.depth,n=e.bucketDepth,a=e.utilization/Math.pow(2,t-n),r="".concat(Math.ceil(100*a),"%");return Object(S.a)(Object(S.a)({},e),{},{usage:a,usageText:r})}function kt(e){var t=e.children,n=Object(a.useContext)(V).beeApi,r=Object(a.useState)(vt.stamps),o=Object(C.a)(r,2),c=o[0],i=o[1],s=Object(a.useState)(vt.error),l=Object(C.a)(s,2),u=l[0],d=l[1],b=Object(a.useState)(vt.isLoading),j=Object(C.a)(b,2),h=j[0],p=j[1],m=Object(a.useState)(vt.lastUpdate),O=Object(C.a)(m,2),x=O[0],f=O[1],v=Object(a.useState)(null),y=Object(C.a)(v,2),S=y[0],B=y[1],N=function(){var e=Object(k.a)(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!h){e.next=2;break}return e.abrupt("return");case 2:if(n){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,p(!0),e.next=8,n.getAllPostageBatch();case 8:t=e.sent,i(t.map(wt)),f(Date.now()),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),d(e.t0);case 16:return e.prev=16,p(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[4,13,16,19]])})));return function(){return e.apply(this,arguments)}}();return Object(a.useEffect)((function(){if(N(),S){var e=setInterval(N,S);return function(){return clearInterval(e)}}}),[S]),Object(g.jsx)(yt.Provider,{value:{stamps:c,error:u,isLoading:h,lastUpdate:x,start:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return B(e)},stop:function(){return B(null)},refresh:N},children:t})}var Ct=n(48),St=n(119),Bt={depth:"",amount:"",label:""},Nt=Object(j.a)((function(e){return Object(h.a)({wrapper:{margin:e.spacing(1),position:"relative"},field:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},buttonProgress:{position:"absolute",top:"50%",left:"50%",marginTop:-12,marginBottom:-12}})}));function At(e){var t=e.label,n=Nt(),o=r.a.useState(!1),c=Object(C.a)(o,2),i=c[0],s=c[1],l=Object(a.useContext)(yt).refresh,d=Object(a.useContext)(V).beeApi,j=function(){return s(!0)},h=function(){return s(!1)},p=Object(u.b)().enqueueSnackbar;return Object(g.jsx)(Ct.c,{initialValues:Bt,onSubmit:function(){var e=Object(k.a)(w.a.mark((function e(t,n){var a,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t.depth&&t.amount){e.next=3;break}return e.abrupt("return");case 3:if(d){e.next=5;break}return e.abrupt("return");case 5:return a=BigInt(t.amount),r=Number.parseInt(t.depth),o=t.label?{label:t.label}:void 0,e.next=10,d.createPostageBatch(a.toString(),r,o);case 10:return n.resetForm(),e.next=13,l();case 13:h(),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),p("Error: ".concat(e.t0.message),{variant:"error"}),n.setSubmitting(!1);case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t,n){return e.apply(this,arguments)}}(),validate:function(e){var t={};if(e.depth){var n=new L.a(e.depth);n.isInteger()?n.isLessThan(16)?t.depth="Minimal depth is 16":n.isGreaterThan(255)&&(t.depth="Depth has to be at most 255"):t.depth="Depth must be an integer"}else t.depth="Required field";if(e.amount){var a=new L.a(e.amount);a.isInteger()?a.isLessThanOrEqualTo(0)&&(t.amount="Amount must be greater than 0"):t.amount="Amount must be an integer"}else t.amount="Required field";return e.label&&!/^[0-9a-z]*$/i.test(e.label)&&(t.label="Label must be an alphanumeric string"),t},children:function(e){var a=e.submitForm,r=e.isValid,o=e.isSubmitting,c=e.values;return Object(g.jsxs)(Ct.b,{children:[Object(g.jsxs)(b.a,{variant:"contained",onClick:j,children:[t||"Buy Postage Stamp",o&&Object(g.jsx)(Ye.a,{size:24,className:n.buttonProgress})]}),Object(g.jsxs)(et.a,{open:i,onClose:h,"aria-labelledby":"form-dialog-title",children:[Object(g.jsx)(rt.a,{id:"form-dialog-title",children:"Purchase new postage stamp"}),Object(g.jsxs)(nt.a,{children:[Object(g.jsxs)(at.a,{children:["Provide the depth, amount and optionally the label of the postage stamp. Please refer to the"," ",Object(g.jsx)("a",{href:"https://docs.ethswarm.org/docs/access-the-swarm/keep-your-data-alive",target:"blank",children:"official bee docs"})," ","to understand these values."]}),Object(g.jsx)(Ct.a,{component:St.a,required:!0,name:"depth",autoFocus:!0,label:"Depth",fullWidth:!0,className:n.field}),Object(g.jsx)(Ct.a,{component:St.a,required:!0,name:"amount",label:"Amount",fullWidth:!0,className:n.field}),Object(g.jsx)(Ct.a,{component:St.a,name:"label",label:"Label",fullWidth:!0,className:n.field})]}),Object(g.jsxs)(tt.a,{children:[Object(g.jsx)(b.a,{onClick:h,variant:"contained",children:"Cancel"}),Object(g.jsx)("div",{className:n.wrapper,children:Object(g.jsxs)(b.a,{disabled:o||!r||!c.amount||!c.depth,type:"submit",variant:"contained",onClick:a,children:["Create",o&&Object(g.jsx)(Ye.a,{size:24,className:n.buttonProgress})]})})]})]})]})}})}var Lt=n(204),It=n(583),Tt=n(584);function Pt(e){var t=e.stamps,n=e.selectedStamp,a=e.setSelected,o=r.a.useState(null),c=Object(C.a)(o,2),i=c[0],s=c[1];if(!t)return null;var l=function(){return s(null)};return Object(g.jsxs)("div",{children:[Object(g.jsx)(b.a,{variant:"contained","aria-haspopup":"true",onClick:function(e){s(e.currentTarget)},children:"Change"}),Object(g.jsx)(Lt.a,{anchorEl:i,keepMounted:!0,open:Boolean(i),onClose:l,children:t.map((function(e){return Object(g.jsxs)(It.a,{onClick:function(){a(e),l()},selected:e.batchID===(null===n||void 0===n?void 0:n.batchID),children:[Object(g.jsx)(Tt.a,{children:e.usageText}),Object(g.jsxs)(m.a,{variant:"body2",children:[e.batchID.substr(0,8),"[\u2026]"]})]},e.batchID)}))})]})}var Dt=Object(j.a)((function(e){return Object(h.a)({content:{marginTop:e.spacing(2)},loadingProgress:{textAlign:"center",padding:"50px"}})}));function Ut(){var e=Dt(),t=Object(a.useState)(0),n=Object(C.a)(t,2),r=n[0],o=n[1],c=Object(a.useState)(null),i=Object(C.a)(c,2),s=i[0],l=i[1],d=Object(a.useState)(""),j=Object(C.a)(d,2),h=j[0],p=j[1],O=Object(a.useState)(!1),x=Object(C.a)(O,2),f=x[0],v=x[1],y=Object(a.useState)(null),w=Object(C.a)(y,2),k=w[0],S=w[1],B=Object(a.useContext)(yt),N=B.isLoading,A=B.error,L=B.stamps,I=B.refresh,T=Object(a.useContext)(V).beeApi,P=Object(u.b)().enqueueSnackbar;Object(a.useEffect)((function(){I()}),[]),Object(a.useEffect)((function(){if(!k&&L&&L.length>0){var e=L.reduce((function(e,t){return t.usage<e.usage?t:e}),L[0]);S(e)}}),[N,A,L,k]);return Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(pt.a,{onChange:function(e){p(""),e&&l(e[0])},filesLimit:1,maxFileSize:1e9},"dropzone-"+r),Object(g.jsxs)("div",{className:e.content,children:[s&&!f&&!h&&Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(We,{children:"To upload this file to your node, you need a postage stamp. You can buy a new one or you can use an existing stamp (providing it\u2019s sufficient for this file)."}),k&&Object(g.jsx)(ie,{label:Object(g.jsxs)(g.Fragment,{children:["Upload with Postage Stamp"," ",Object(g.jsx)(bt.a,{avatar:Object(g.jsx)(jt.a,{children:k.usageText}),label:Object(g.jsxs)(m.a,{variant:"body2",children:[k.batchID.substr(0,8),"[\u2026]"]}),deleteIcon:Object(g.jsx)(ft,{value:k.batchID}),onDelete:function(){},variant:"outlined"})]}),value:Object(g.jsx)(Pt,{stamps:L,selectedStamp:k,setSelected:S})}),!k&&Object(g.jsx)(Me,{children:Object(g.jsx)(At,{})})]}),s&&!h&&Object(g.jsxs)(g.Fragment,{children:[Object(g.jsxs)(Me,{children:[Object(g.jsx)(b.a,{variant:"contained",disabled:!s&&f&&!k,onClick:function(){null!==s&&null!==k&&T&&(v(!0),T.uploadFile(k.batchID,s).then((function(e){return p(e.reference)})).catch((function(e){return P("Error uploading: ".concat(e.message),{variant:"error"})})).finally((function(){return v(!1)})))},startIcon:Object(g.jsx)(Re.a,{size:"1rem"}),children:"Upload"}),f&&Object(g.jsx)(ht.a,{className:e.loadingProgress,children:Object(g.jsx)(Ye.a,{})})]}),Object(g.jsx)(xt,{file:s})]}),h&&Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(be,{label:"Swarm Reference",value:h}),Object(g.jsx)(Me,{children:Object(g.jsx)(b.a,{variant:"contained",onClick:function(){setTimeout((function(){l(null),o(r+1),p("")}),0)},startIcon:Object(g.jsx)(qe.a,{size:"1rem"}),children:"Upload New File"})})]})]})]})}function Et(){return Object(a.useContext)(G).status.all?Object(g.jsx)(Be,{values:[{label:"download",component:Object(g.jsx)(dt,{})},{label:"upload",component:Object(g.jsx)(Ut,{})}]}):Object(g.jsx)(v,{})}var Ft=n(587),Rt=n(199),qt=n.n(Rt),zt=n(586);function Mt(e){var t=Object(a.useState)(!1),n=Object(C.a)(t,2),r=n[0],o=n[1];return Object(g.jsxs)("div",{children:[Object(g.jsx)(re.a,{color:"primary",size:"small",onClick:function(){o(!0)},children:Object(g.jsx)(zt.a,{})}),Object(g.jsx)(et.a,{onClose:function(){o(!1)},"aria-labelledby":"simple-dialog-title",open:r,children:Object(g.jsxs)("div",{style:{padding:"30px",textAlign:"center"},children:[Object(g.jsx)(rt.a,{id:"simple-dialog-title",children:e.label}),Object(g.jsx)(qt.a,{value:e.value,size:150,bgColor:"#ffffff",fgColor:"#000000",level:"L",includeMargin:!1,renderAs:"svg"})]})})]})}var Vt=n(200),Wt=n.n(Vt);function Zt(e){return Object(g.jsx)(m.a,{component:"div",variant:"subtitle1",children:e.address?Object(g.jsxs)("div",{style:{display:"flex"},children:[e.hideBlockie?null:Object(g.jsx)("div",{style:{paddingTop:"5px",marginRight:"10px"},children:Object(g.jsx)(Wt.a,{size:20,string:e.address})}),Object(g.jsx)("div",{children:Object(g.jsx)("a",{style:e.truncate?{marginRight:"7px",maxWidth:"200px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"}:{marginRight:"7px"},href:"".concat("https://blockscout.com/xdai/mainnet","/").concat(e.transaction?"tx":"address","/").concat(e.address),target:"_blank",rel:"noreferrer",children:e.address})}),Object(g.jsx)(Mt,{value:e.address,label:"Ethereum Address"}),Object(g.jsx)(ft,{value:e.address})]}):"-"})}function _t(e){var t=e.peerId,n=e.uncashedAmount,r=Object(a.useState)(!1),o=Object(C.a)(r,2),c=o[0],i=o[1],s=Object(a.useState)(!1),l=Object(C.a)(s,2),d=l[0],j=l[1],h=Object(u.b)().enqueueSnackbar,p=Object(a.useContext)(V).beeDebugApi,m=function(){i(!1)};return Object(g.jsxs)("div",{children:[Object(g.jsxs)(b.a,{variant:"contained",onClick:function(){i(!0)},startIcon:Object(g.jsx)(Ft.a,{size:"1rem"}),children:["Cash out peer ",t.substr(0,8),"[\u2026]"]}),Object(g.jsxs)(et.a,{open:c,onClose:m,"aria-labelledby":"form-dialog-title",children:[Object(g.jsx)(rt.a,{id:"form-dialog-title",children:"Cashout Cheque"}),Object(g.jsx)(nt.a,{children:Object(g.jsxs)(at.a,{style:{marginTop:"20px",overflowWrap:"break-word"},children:[d&&Object(g.jsxs)(g.Fragment,{children:[Object(g.jsxs)("span",{children:["Cashing out ",Object(g.jsx)("strong",{children:n})," from Peer ",Object(g.jsx)("strong",{children:t}),". Please wait..."]}),Object(g.jsx)(ht.a,{style:{textAlign:"center",padding:"50px"},children:Object(g.jsx)(Ye.a,{})})]}),!d&&Object(g.jsxs)("span",{children:["Are you sure you want to cashout ",Object(g.jsxs)("strong",{children:[n," BZZ"]})," from Peer"," ",Object(g.jsx)("strong",{children:t}),"?"]})]})}),Object(g.jsxs)(tt.a,{children:[Object(g.jsx)(b.a,{onClick:m,color:"primary",children:"Cancel"}),Object(g.jsx)(b.a,{onClick:function(){p&&(t?(j(!0),p.cashoutLastCheque(t).then((function(e){i(!1),h(Object(g.jsxs)("span",{children:["Successfully cashed out cheque. Transaction",Object(g.jsx)(Zt,{hideBlockie:!0,transaction:!0,address:e})]}),{variant:"success"})})).catch((function(e){h(Object(g.jsxs)("span",{children:["Error: ",e.message]}),{variant:"error"})})).finally((function(){j(!1)}))):h(Object(g.jsx)("span",{children:"Peer Id invalid"}),{variant:"error"}))},color:"primary",disabled:d,children:"Yes Cashout"})]})]})]})}function Yt(e){var t=e.accounting,n=e.isLoadingUncashed,a=e.totalUncashed;return Object(g.jsxs)(ne,{label:"Peers (".concat((null===t||void 0===t?void 0:t.length)||0,")"),info:"".concat(a.toFixedDecimal()," BZZ (uncashed)"),children:[Object(g.jsx)(ie,{label:"Uncashed Amount Total",value:"".concat(a.toFixedDecimal()," BZZ")}),null===t||void 0===t?void 0:t.map((function(e){var t=e.peer,a=e.balance,r=e.received,o=e.sent,c=e.uncashedAmount,i=e.total;return Object(g.jsxs)(ne,{label:"Peer ".concat(t.substr(0,8),"[\u2026]"),level:1,info:"".concat(c.toFixedDecimal()," BZZ (uncashed)"),children:[Object(g.jsx)(be,{label:"Peer ID",value:t}),Object(g.jsx)(ie,{label:"Outstanding Balance",value:"".concat(a.toFixedDecimal()," BZZ")}),Object(g.jsx)(ie,{label:"Settlements Sent / Received",value:"-".concat(o.toFixedDecimal()," / ").concat(r.toFixedDecimal()," BZZ")}),Object(g.jsx)(ie,{label:"Total",value:"".concat(i.toFixedDecimal()," BZZ")}),Object(g.jsx)(ie,{label:"Uncashed Amount",value:n?"loading\u2026":"".concat(c.toFixedDecimal()," BZZ")}),c.toBigNumber.isGreaterThan("0")&&Object(g.jsx)(Me,{children:Object(g.jsx)(_t,{uncashedAmount:c.toFixedDecimal(),peerId:t})})]},t)}))]})}var Gt=function(e,t,n){var r=Object(a.useState)(!1),o=Object(C.a)(r,2),c=o[0],i=o[1],s=Object(a.useState)(void 0),l=Object(C.a)(s,2),u=l[0],d=l[1];Object(a.useEffect)((function(){if(!c&&e&&t&&!u){i(!0);var n=t.settlements.filter((function(e){return e.received.toBigNumber.gt("0")})).map((function(t){var n=t.peer;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return new Promise(function(){var a=Object(k.a)(w.a.mark((function a(r,o){var c,i;return w.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:c=0;case 1:if(!(c<t)){a.next=21;break}return a.prev=2,a.next=5,e();case 5:return i=a.sent,r(i),a.abrupt("return");case 10:if(a.prev=10,a.t0=a.catch(2),!(c<t-1)){a.next=17;break}return a.next=15,P(n);case 15:a.next=18;break;case 17:o(a.t0);case 18:c++,a.next=1;break;case 21:case"end":return a.stop()}}),a,null,[[2,10]])})));return function(e,t){return a.apply(this,arguments)}}())}((function(){return e.getLastCashoutAction(n)}))}));Promise.allSettled(n).then((function(e){var t=function(e){var t,n={fulfilled:(t=e).filter((function(e){return"fulfilled"===e.status})),rejected:t.filter((function(e){return"rejected"===e.status}))};return{fulfilled:n.fulfilled.map((function(e){return e.value})),rejected:n.rejected.map((function(e){return e.reason?String(e.reason):"Unknown error"}))}}(e);d(t.fulfilled),i(!1)}))}}),[t,c,u]);var b=function(e,t,n){if(!e||!t)return null;var a={};return e.forEach((function(e){var t=e.peer,n=e.balance;return a[t]={peer:t,balance:n,sent:new E("0"),received:new E("0"),uncashedAmount:new E("0"),total:n}})),t.forEach((function(e){var t=e.peer,n=e.sent,r=e.received;return a[t]=Object(S.a)(Object(S.a)({},a[t]),{},{sent:n,received:r,total:new E(a[t].balance.toBigNumber.plus(r.toBigNumber).minus(n.toBigNumber))})})),n?(null===n||void 0===n||n.forEach((function(e){var t=e.peer,n=e.uncashedAmount;a[t].uncashedAmount=new E(n)})),Object.values(a).sort((function(e,t){var n=t.uncashedAmount.toBigNumber.minus(e.uncashedAmount.toBigNumber).toNumber();return 0!==n?n:e.peer<t.peer?-1:1}))):Object.values(a).sort((function(e,t){return e.peer<t.peer?-1:1}))}(n,null===t||void 0===t?void 0:t.settlements,u),j=new E("0");return null===b||void 0===b||b.forEach((function(e){var t=e.uncashedAmount;return j=new E(j.toBigNumber.plus(t.toBigNumber))})),{isLoadingUncashed:c,totalUncashed:j,accounting:b}},Ht=n(588);function Kt(){var e=Object(a.useContext)(V).beeDebugApi;return Object(g.jsx)(ct,{successMessage:"Successful withdrawl.",errorMessage:"Error with withdrawing.",dialogMessage:"Specify the amount of BZZ you would like to withdraw from your node.",label:"Withdraw",icon:Object(g.jsx)(Ht.a,{size:"1rem"}),min:new A.BigNumber(0),action:function(t){if(!e)throw new Error("Bee Debug URL is not valid");return e.withdrawTokens(t.toString())}})}function Xt(){var e=Object(a.useContext)(G),t=e.status,n=e.nodeAddresses,r=e.chequebookAddress,o=e.chequebookBalance,c=e.settlements,i=e.peerBalances,s=Object(a.useContext)(V).beeDebugApi,l=Gt(s,c,i),u=l.accounting,d=l.totalUncashed,b=l.isLoadingUncashed;return t.all?Object(g.jsxs)("div",{children:[Object(g.jsxs)(ne,{label:"Chequebook",defaultOpen:!0,children:[Object(g.jsx)(ie,{label:"Total Balance",value:"".concat(null===o||void 0===o?void 0:o.totalBalance.toFixedDecimal()," BZZ")}),Object(g.jsx)(ie,{label:"Available Uncommitted Balance",value:"".concat(null===o||void 0===o?void 0:o.availableBalance.toFixedDecimal()," BZZ")}),Object(g.jsx)(ie,{label:"Total Cheques Amount Sent",value:"".concat(null===c||void 0===c?void 0:c.totalSent.toFixedDecimal()," BZZ")}),Object(g.jsx)(ie,{label:"Total Cheques Amount Received",value:"".concat(null===c||void 0===c?void 0:c.totalReceived.toFixedDecimal()," BZZ")}),Object(g.jsxs)(Me,{children:[Object(g.jsx)(Kt,{}),Object(g.jsx)(it,{})]})]}),Object(g.jsxs)(ne,{label:"Blockchain",defaultOpen:!0,children:[Object(g.jsx)(be,{label:"Ethereum address",value:(null===n||void 0===n?void 0:n.ethereum)||""}),Object(g.jsx)(be,{label:"Chequebook contract address",value:(null===r||void 0===r?void 0:r.chequebookAddress)||""})]}),Object(g.jsx)(Yt,{accounting:u,isLoadingUncashed:b,totalUncashed:d})]}):Object(g.jsx)(v,{})}function Jt(){var e=Object(a.useContext)(V),t=e.apiUrl,n=e.apiDebugUrl,r=e.setApiUrl,o=e.setDebugApiUrl;return Object(g.jsxs)(ne,{label:"API Settings",defaultOpen:!0,children:[Object(g.jsx)(_e,{label:"Bee API",value:t,onConfirm:r}),Object(g.jsx)(_e,{label:"Bee Debug API",value:n,onConfirm:o})]})}var $t,Qt=function(e){var t=e.postageStamps;return null===t?null:Object(g.jsx)(ne,{label:"Postage Stamps",defaultOpen:!0,children:t.map((function(e){var t=e.batchID,n=e.usageText;return Object(g.jsxs)(ne,{label:"".concat(t.substr(0,8),"[\u2026]"),level:1,info:"".concat(n," used"),children:[Object(g.jsx)(be,{label:"Batch ID",value:t}),Object(g.jsx)(ie,{label:"Usage",value:n})]},t)}))})},en=Object(j.a)((function(){return Object(h.a)({root:{width:"100%",display:"grid"},actions:{display:"flex",width:"100%",flex:"0 1 auto",flexWrap:"wrap",alignItems:"center"}})}));function tn(){var e=en(),t=Object(a.useContext)(yt),n=t.stamps,r=t.isLoading,o=t.error,c=t.start,i=t.stop;return Object(a.useContext)(G).status.all?(Object(a.useEffect)((function(){return c(),function(){return i()}}),[]),Object(g.jsxs)("div",{className:e.root,children:[o&&Object(g.jsxs)(ht.a,{style:{textAlign:"center",padding:"50px"},children:["Error loading postage stamps details: ",o.message]}),!o&&Object(g.jsxs)(g.Fragment,{children:[Object(g.jsxs)("div",{className:e.actions,children:[Object(g.jsx)(At,{}),Object(g.jsx)("div",{style:{height:"5px"},children:r&&Object(g.jsx)(Ye.a,{})})]}),Object(g.jsx)(Qt,{postageStamps:n})]})]})):Object(g.jsx)(v,{})}!function(e){e.INFO="/",e.FILES="/files",e.ACCOUNTING="/accounting",e.SETTINGS="/settings",e.STAMPS="/stamps",e.STATUS="/status"}($t||($t={}));var nn=function(){return Object(g.jsxs)(d.c,{children:[Object(g.jsx)(d.a,{exact:!0,path:$t.FILES,component:Et}),Object(g.jsx)(d.a,{exact:!0,path:$t.ACCOUNTING,component:Xt}),Object(g.jsx)(d.a,{exact:!0,path:$t.SETTINGS,component:Jt}),Object(g.jsx)(d.a,{exact:!0,path:$t.STAMPS,component:tn}),Object(g.jsx)(d.a,{exact:!0,path:$t.STATUS,component:ut}),Object(g.jsx)(d.a,{path:$t.INFO,component:ge})]})},an=n(205),rn=n(203),on=function(e){Object(an.a)(n,e);var t=Object(rn.a)(n);function n(e){var a;return Object(B.a)(this,n),(a=t.call(this,e)).state={error:null},a}return Object(N.a)(n,[{key:"componentDidCatch",value:function(e,t){console.error({error:e,errorInfo:t})}},{key:"render",value:function(){return this.state.error?Object(g.jsxs)("h1",{children:["Something went wrong. Error: ",this.state.error.message]}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}}]),n}(a.Component),cn=n(114),sn=n.n(cn),ln=Object(j.a)((function(e){return Object(h.a)({root:{width:"100%",marginBottom:e.spacing(2)}})}));function un(){var e=ln(),t=Object(a.useContext)(G),n=t.isLoading,r=t.latestUserVersionExact,o=Object(a.useState)(!0),c=Object(C.a)(o,2),i=c[0],s=c[1],l=z.SUPPORTED_BEE_VERSION_EXACT===r;return n||!r?null:Object(g.jsx)($.a,{in:!l&&i,children:Object(g.jsx)("div",{className:e.root,children:Object(g.jsxs)(fe.a,{severity:"warning",action:Object(g.jsx)(re.a,{"aria-label":"close",color:"inherit",size:"small",onClick:function(){s(!1)},children:Object(g.jsx)(sn.a,{fontSize:"inherit"})}),children:[Object(g.jsx)(mt.a,{children:"Warning"}),"Your Bee node version (",Object(g.jsx)("code",{children:r}),") does not exactly match the Bee version we tested the Bee Dashboard against (",Object(g.jsx)("code",{children:z.SUPPORTED_BEE_VERSION_EXACT}),"). Please note that some functionality may not work properly."]})})})}var dn=n(598),bn=n(595),jn=n(582),hn=n(596),pn=n(590),mn=n(591),On=n(592),xn=n(593),gn=n(594),fn=n(597),vn=n(6),yn=Object(vn.a)((function(e){return{root:{paddingLeft:e.spacing(4),paddingRight:e.spacing(4),borderLeft:"4px solid rgba(0,0,0,0)","&.Mui-selected, &.Mui-selected:hover":{borderLeft:"4px solid ".concat(e.palette.primary.main),backgroundColor:"#2c2c2c",color:"#f9f9f9"}},button:{"&:hover":{backgroundColor:"#2c2c2c",color:"#f9f9f9","@media (hover: none)":{backgroundColor:"#2c2c2c",color:"#f9f9f9"}}}}}))(X.a),wn=Object(j.a)((function(e){return Object(h.a)({icon:{color:"inherit"},activeIcon:{color:e.palette.primary.main}})}));function kn(e){var t=e.iconStart,n=e.iconEnd,a=e.path,r=e.label,o=wn(),c=Object(d.f)(),i=Boolean(Object(d.e)(c.pathname,{path:a,exact:!0}));return Object(g.jsxs)(yn,{button:!0,selected:i,disableRipple:!0,children:[Object(g.jsx)(Tt.a,{className:i?o.activeIcon:o.icon,children:t}),Object(g.jsx)(J.a,{primary:r}),Object(g.jsx)(Tt.a,{className:i?o.activeIcon:o.icon,children:n})]})}var Cn=n(589),Sn=Object(j.a)((function(e){return Object(h.a)({icon:{color:"inherit"},iconSmall:{height:e.spacing(2)},root:{height:e.spacing(4),paddingLeft:e.spacing(1),paddingRight:e.spacing(4),color:"#f9f9f9",borderLeft:"0px solid rgba(0,0,0,0)","&.Mui-selected, &.Mui-selected:hover":{borderLeft:"0px solid ".concat(e.palette.primary.main),backgroundColor:"#2c2c2c"}},rootError:{backgroundColor:"rgba(255, 58, 82, 0.25)"},button:{"&:hover":{backgroundColor:"#2c2c2c",color:"white","@media (hover: none)":{backgroundColor:"#2c2c2c",color:"white"}}},smallerText:{fontSize:"0.9rem"}})}));function Bn(e){var t=e.path,n=Object(a.useContext)(G),r=n.status,o=n.isLoading,c=Sn(),i=Object(d.f)(),s=Boolean(Object(d.e)(i.pathname,{path:t,exact:!0}));return Object(g.jsxs)(X.a,{button:!0,classes:{root:"".concat(c.root," ").concat(r.all?"":c.rootError),button:c.button},selected:s,disableRipple:!0,children:[Object(g.jsx)(Tt.a,{style:{marginLeft:"30px"},children:Object(g.jsx)(Ge,{isOk:r.all,isLoading:o})}),Object(g.jsx)(J.a,{primary:Object(g.jsx)(m.a,{className:c.smallerText,children:"Node ".concat(r.all?"OK":"Error")})}),Object(g.jsx)(Tt.a,{className:c.icon,children:r.all?null:Object(g.jsx)(Cn.a,{className:c.iconSmall})})]})}var Nn=n.p+"static/media/logo.3d1155fe.svg",An=[{label:"Info",path:$t.INFO,icon:pn.a},{label:"Files",path:$t.FILES,icon:mn.a},{label:"Stamps",path:$t.STAMPS,icon:On.a},{label:"Accounting",path:$t.ACCOUNTING,icon:xn.a},{label:"Settings",path:$t.SETTINGS,icon:gn.a}],Ln=Object(j.a)((function(e){return Object(h.a)({root:{flexWrap:"nowrap",minHeight:"100vh",paddingTop:e.spacing(8),paddingBottom:e.spacing(8)},drawer:{width:300,flexShrink:0},drawerPaper:{width:300,backgroundColor:"#212121"},logo:{marginLeft:e.spacing(8),marginRight:e.spacing(8)},icon:{height:e.spacing(4)},iconSmall:{height:e.spacing(2)},divider:{backgroundColor:"#2c2c2c",marginLeft:e.spacing(4),marginRight:e.spacing(4)},link:{color:"#9f9f9f",textDecoration:"none","&:hover":{textDecoration:"none","@media (hover: none)":{textDecoration:"none"}}}})}));function In(){var e=Ln();return Object(g.jsx)(bn.a,{className:e.drawer,variant:"permanent",anchor:"left",classes:{paper:e.drawerPaper},children:Object(g.jsxs)(p.a,{container:!0,direction:"column",justifyContent:"space-between",className:e.root,children:[Object(g.jsx)(p.a,{className:e.logo,children:Object(g.jsx)(i.b,{to:$t.INFO,children:Object(g.jsx)("img",{alt:"swarm",src:Nn})})}),Object(g.jsxs)(p.a,{children:[Object(g.jsx)(jn.a,{children:An.map((function(t){return Object(g.jsx)(i.b,{to:t.path,className:e.link,children:Object(g.jsx)(kn,{iconStart:Object(g.jsx)(t.icon,{className:e.icon}),path:t.path,label:t.label},t.path)},t.path)}))}),Object(g.jsx)(hn.a,{className:e.divider}),Object(g.jsx)(jn.a,{children:Object(g.jsx)(O.a,{href:"https://docs.ethswarm.org/docs/",target:"_blank",className:e.link,children:Object(g.jsx)(kn,{iconStart:Object(g.jsx)(fn.a,{className:e.icon}),iconEnd:Object(g.jsx)(dn.a,{className:e.iconSmall}),label:Object(g.jsx)("span",{children:"Docs"})})})})]}),Object(g.jsx)(p.a,{children:Object(g.jsx)(i.b,{to:$t.STATUS,className:e.link,children:Object(g.jsx)(Bn,{path:$t.STATUS})})})]})})}var Tn,Pn=Object(j.a)((function(e){return Object(h.a)({content:{backgroundColor:e.palette.background.default,minHeight:"100vh"}})})),Dn=function(e){var t=Pn(),n=Object(a.useContext)(G).isLoading;return Object(g.jsxs)("div",{style:{display:"flex"},children:[Object(g.jsx)(In,{}),Object(g.jsx)(ht.a,{className:t.content,children:Object(g.jsx)(on,{children:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(un,{}),n?Object(g.jsx)("div",{style:{textAlign:"center",width:"100%"},children:Object(g.jsx)(Ye.a,{})}):e.children]})})})]})},Un=n(201),En=n(118),Fn=Object(Un.a)({palette:{type:"light",background:{default:"#efefef"},primary:{light:"#fcf2e8",main:"#dd7700",dark:En.a[800]},secondary:{main:"#333333"}},typography:{fontFamily:["Work Sans","Montserrat","Nunito","Roboto",'"Helvetica Neue"',"Arial","sans-serif"].join(","),h1:{fontSize:"1.3rem",fontWeight:500},h2:{fontSize:"1rem",fontWeight:500},h3:{fontSize:"0.8rem",fontWeight:500},body2:{fontFamily:'"IBM Plex Mono", monospace',fontWeight:500,fontSize:"1rem"}}});Fn.overrides={MuiListItem:{button:{"&:hover":{backgroundColor:"#fcf2e8",color:(Tn=Fn).palette.primary.main,"@media (hover: none)":{backgroundColor:"#fcf2e8",color:Tn.palette.primary.main}}}},MuiContainer:{root:{padding:Tn.spacing(8)},maxWidthXs:{padding:Tn.spacing(8)},maxWidthSm:{padding:Tn.spacing(8)},maxWidthMd:{padding:Tn.spacing(8)},maxWidthLg:{padding:Tn.spacing(8)},maxWidthXl:{padding:Tn.spacing(8)}},MuiButton:{startIcon:{marginLeft:Tn.spacing(1)},endIcon:{marginRight:Tn.spacing(1)},outlined:{border:"none",borderRadius:Tn.spacing(10),color:Tn.palette.primary.main,backgroundColor:"#fcf2e8"},outlinedSizeSmall:{padding:Tn.spacing(1),paddingLeft:Tn.spacing(2),paddingRight:Tn.spacing(2),boxShadow:"none","&:hover":{backgroundColor:Tn.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tn.palette.primary.main,color:"white",boxShadow:"none"}}},outlinedSizeLarge:{padding:Tn.spacing(4),borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:Tn.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tn.palette.primary.main,color:"white",boxShadow:"none"}}},containedSizeLarge:{padding:Tn.spacing(4),borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:Tn.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tn.palette.primary.main,color:"white",boxShadow:"none"}}},containedSizeSmall:{padding:Tn.spacing(1),paddingLeft:Tn.spacing(2),paddingRight:Tn.spacing(2),borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:Tn.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tn.palette.primary.main,color:"white",boxShadow:"none"}}},contained:{padding:Tn.spacing(2),backgroundColor:"white",boxShadow:"none",borderRadius:0,"&:hover":{backgroundColor:Tn.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tn.palette.primary.main,color:"white",boxShadow:"none"}},"&:focus":{backgroundColor:Tn.palette.primary.main,color:"white"},"&:active":{backgroundColor:Tn.palette.primary.main,color:"white"},"&:disabled":{backgroundColor:"white"}}},MuiTab:{root:{backgroundColor:Tn.palette.background.paper,"&:hover":{backgroundColor:"#fcf2e8",color:Tn.palette.primary.main,opacity:1},"&$selected":{fontWeight:Tn.typography.fontWeightMedium}},textColorInherit:{opacity:.5}},MuiTabs:{root:{borderBottom:"none"},indicator:{backgroundColor:"transparent"}}},Fn.props={MuiTab:{disableRipple:!0},MuiButtonBase:{disableRipple:!0}};var Rn=function(){return Object(g.jsx)("div",{className:"App",children:Object(g.jsx)(s.a,{theme:Fn,children:Object(g.jsx)(W,{children:Object(g.jsx)(K,{children:Object(g.jsx)(kt,{children:Object(g.jsx)(De,{children:Object(g.jsx)(u.a,{children:Object(g.jsx)(i.a,{children:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(l.a,{}),Object(g.jsx)(Dn,{children:Object(g.jsx)(nn,{})})]})})})})})})})})})},qn=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,607)).then((function(t){var n=t.getCLS,a=t.getFID,r=t.getFCP,o=t.getLCP,c=t.getTTFB;n(e),a(e),r(e),o(e),c(e)}))};c.a.render(Object(g.jsx)(r.a.StrictMode,{children:Object(g.jsx)(Rn,{})}),document.getElementById("root")),qn()}},[[511,1,2]]]);
2
- //# sourceMappingURL=main.105fda76.chunk.js.map