PageSourceSearch

https://www.piggycell.io/_next/static/chunks/11698880ba8fbe49.js?dpl=dpl_FDL2YZtVAvrC2JDz6yLwCcfJhdRR

js piggycell.io collected 2026-10-03 21:21:58 UTC 43,046 bytes, 8 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2333,e=>{"use strict";var t=e.i(43476),a=e.i(72943),s=e.i(73369),l=e.i(70703),r=e.i(15529),n=e.i(71645),i=e.i(57688);let o={id:"xAxisLinePlugin",beforeDraw:e=>{let{ctx:t,chartArea:a}=e;if(!a)return;let s=a.bottom,l=a.left,r=a.right;t.save(),t.strokeStyle="rgba(163, 163, 163, 0.3)",t.lineWidth=1,t.beginPath(),t.moveTo(l,s),t.lineTo(r,s),t.stroke(),t.restore()}};var c=e.i(81097);e.i(15731);let d=({leftRatio:e,rightRatio:a})=>{var s,l;let r,d=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let e=d.current;if(!e)return;let t=e.ctx,a=e.chartArea;if(!a)return;let s=e.data.datasets[0],l=t.createLinearGradient(a.left,0,a.right,0);l.addColorStop(0,"#08C8FD"),l.addColorStop(1,"#7CFC9E"),s.borderColor[0]=l,s.borderColor[1]="#F6B915",e.update()},[]),(0,t.jsxs)("div",{style:{position:"relative",width:200,height:200},children:[(0,t.jsx)(c.Doughnut,{ref:d,data:(s=d.current?.ctx,{datasets:[{data:[e,a],backgroundColor:["transparent","transparent"],borderColor:[(l=d.current?.chartArea,r=s?.createLinearGradient(l.left,0,l.right,0),r?.addColorStop(0,"#08C8FD"),r?.addColorStop(1,"#7CFC9E"),r),"#F6B915"],borderWidth:[6,1],cutout:"99%",circumference:270,rotation:225,borderRadius:[999,0]}]}),options:{responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!1}}},plugins:[o]}),(0,t.jsx)("div",{style:{position:"absolute",top:"55%",left:"50%",transform:"translate(-50%, -50%)"},children:(0,t.jsx)(i.default,{src:"/img/logo.png",alt:"logo",width:50,height:50})})]})};var x=e.i(29530);x.Chart.register(x.LineElement,x.PointElement,x.LinearScale,x.TimeScale,x.Tooltip,x.Filler,x.Legend,x.ArcElement,x.CategoryScale);let m={id:"ongoingAnnotationPlugin",afterDatasetsDraw:e=>{let{ctx:t,chartArea:a}=e;if(!a)return;let s=e.data.datasets.findIndex(e=>"Ongoing"===e.label);if(s<0)return;let l=e.getDatasetMeta(s),r=l?.data;if(!r?.length)return;let n=r[0],i=r[r.length-1];if(!n||!i)return;let o=n.x,c=i.x,d=n.y,x=a.bottom;if(!(Number.isFinite(o)&&Number.isFinite(c))||c<=o+2)return;let m=Math.min(d,x),u=Math.max(0,x-m);u<=0||(t.save(),t.strokeStyle="rgba(255, 255, 255, 0.85)",t.lineWidth=1,t.beginPath(),t.moveTo(o,m),t.lineTo(c,m),t.stroke(),t.fillStyle="rgba(163, 163, 163, 0.55)",t.font="600 16px sans-serif",t.textAlign="center",t.textBaseline="middle",t.fillText("Ongoing",(o+c)/2,m+u/2),t.restore())}},u=({data:e,showOngoing:a=!1})=>
1{let[s,l]=(0,n.useState)(""),r=(0,n.useMemo)(()=>{let t=e?.map(e=>({x:new Date(e.date).getTime(),y:e.count??e.seconds??0}))??[];return t.sort((e,t)=>e.x-t.x),t},[e]),i=(0,n.useMemo)(()=>{if(!a||0===r.length)return[];let e=r[r.length-1],t=r[0],s=Math.max(1,Math.floor(Math.max(1,Math.floor(.3/.7*Math.max(1,e.x-t.x)))/3));return Array.from({length:3},(t,a)=>({x:e.x+(a+1)*s,y:e.y,__ongoing:!0}))},[r,a]),o={datasets:[{label:"Value",data:r,fill:!0,borderColor:s,borderWidth:1,backgroundColor:e=>{let{ctx:t,chartArea:a}=e.chart;if(!a)return null;let s=t.createLinearGradient(0,a.bottom,0,a.top);return s.addColorStop(0,"rgba(8, 200, 253, 0.25)"),s.addColorStop(.5,"rgba(8, 200, 253, 0.12)"),s.addColorStop(1,"rgba(124, 252, 158, 0.08)"),s},pointRadius:e=>a&&r.length>0&&e.dataIndex===r.length-1?6:0,pointHoverRadius:6,pointHoverBackgroundColor:"#0a0a0a",pointHoverBorderColor:"#08C8FD",pointHoverBorderWidth:2,tension:.4},...a&&i.length?[{label:"Ongoing",data:[r[r.length-1],...i],fill:!0,borderWidth:0,borderColor:"transparent",backgroundColor:"rgba(255, 255, 255, 0.08)",pointRadius:0,pointHoverRadius:0,pointHitRadius:0,hoverBorderWidth:0,tension:0}]:[]]},d=(0,n.useMemo)(()=>({scales:{x:{display:!1,type:"time",time:{unit:"day",displayFormats:{day:"MM.dd.yyyy",month:"MM.dd.yyyy"}},grid:{display:!1}},y:{display:!1,beginAtZero:!0,grid:{display:!1}}},plugins:{legend:{display:!1},tooltip:{mode:"index",intersect:!1,filter:e=>e?.dataset?.label!=="Ongoing",backgroundColor:e=>{let{ctx:t}=e.chart,a=t.createLinearGradient(0,0,180,0);return a.addColorStop(0,"rgba(8, 200, 253, 0.95)"),a.addColorStop(1,"rgba(124, 252, 158, 0.95)"),a},titleColor:"#000000",bodyColor:"#000000",borderColor:"transparent",borderRadius:8,padding:12,titleFont:{size:18,weight:"bold"},bodyFont:{size:12,weight:"normal"},displayColors:!1,callbacks:{title:e=>{let t=e[0]?.raw;return Number(t?.y??0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},label:e=>{var t;let a,s,l,r=e.raw,n=r?.x;return a=String((t=new Date("number"==typeof n?n:n instanceof Date?n.getTime():Date.now())).getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0"),l=t.getFullYear(),`${a}.${s}.${l}`}}}},responsive:!0,maintainAspectRatio:!1,layout:{padding:{top:8,right:8,bottom:0,left:0}}}),[]),x=(0,n.useMemo)(()=>a?[m]:[],[a]);return(0,n.useEffect)(()=>{let e=document.createElement("canvas").getContext("2d");if(e){let t=e.createLinearGradient(0,0,400,0);t.addColorStop(0,"#08C8FD"),t.addColorStop(1,"#7CFC9E"),l(t)}},[]),(0,t.jsx)("div",{className:"h-full w-full rounded-2xl bg-[#0a0a0a]",children:(0,t.jsx)(c.Line,{data:o,options:d,plugins:x,style:{width:"100%",height:"100%"}})})};e.i(47167);var p=e.i(43794),h=e.i(42064),g=e.i(29681);let b=e=>{let{prefixCls:t,className:a,style:s,size:l,shape:r}=e,i=(0,p.default)({[`${t}-lg`]:"large"===l,[`${t}-sm`]:"small"===l}),o=(0,p.default)({[`${t}-circle`]:"circle"===r,[`${t}-square`]:"square"===r,[`${t}-round`]:"round"===r}),c=n.useMemo(()=>"number"==typeof l?{width:l,height:l,lineHeight:`${l}px`}:{},[l]);return n.createElement("span",{className:(0,p.default)(t,i,o,a),style:Object.assign(Object.assign({},c),s)})};e.i(96059);var j=e.i(17813),j=j,y=e.i(15654),f=e.i(46422),w=e.i(52070),w=w;let N=new j.default("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),v=e=>({height:e,lineHeight:(0,y.unit)(e)}),k=e=>Object.assign({width:e},v(e)),$=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},v(e)),C=e=>Object.assign({width:e},v(e)),S=(e,t,a)=>{let{skeletonButtonCls:s}=e;return{[`${a}${s}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${a}${s}-round`]:{borderRadius:t}}},T=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},v(e)),L=(0,f.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:a}=e;return[(e=>{let{componentCls:t,skeletonAvatarCls:a,skeletonTitleCls:s,skeletonParagraphCls:l,skeletonButtonCls:r,skeletonInputCls:n,skeletonImageCls:i,controlHeight:o,c
1ontrolHeightLG:c,controlHeightSM:d,gradientFromColor:x,padding:m,marginSM:u,borderRadius:p,titleHeight:h,blockRadius:g,paragraphLiHeight:b,controlHeightXS:j,paragraphMarginTop:y}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:m,verticalAlign:"top",[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:x},k(o)),[`${a}-circle`]:{borderRadius:"50%"},[`${a}-lg`]:Object.assign({},k(c)),[`${a}-sm`]:Object.assign({},k(d))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[s]:{width:"100%",height:h,background:x,borderRadius:g,[`+ ${l}`]:{marginBlockStart:d}},[l]:{padding:0,"> li":{width:"100%",height:b,listStyle:"none",background:x,borderRadius:g,"+ li":{marginBlockStart:j}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${s}, ${l} > li`]:{borderRadius:p}}},[`${t}-with-avatar ${t}-content`]:{[s]:{marginBlockStart:u,[`+ ${l}`]:{marginBlockStart:y}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:a,controlHeight:s,controlHeightLG:l,controlHeightSM:r,gradientFromColor:n,calc:i}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:t,width:i(s).mul(2).equal(),minWidth:i(s).mul(2).equal()},T(s,i))},S(e,s,a)),{[`${a}-lg`]:Object.assign({},T(l,i))}),S(e,l,`${a}-lg`)),{[`${a}-sm`]:Object.assign({},T(r,i))}),S(e,r,`${a}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:a,controlHeight:s,controlHeightLG:l,controlHeightSM:r}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:a},k(s)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},k(l)),[`${t}${t}-sm`]:Object.assign({},k(r))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:a,skeletonInputCls:s,controlHeightLG:l,controlHeightSM:r,gradientFromColor:n,calc:i}=e;return{[s]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:a},$(t,i)),[`${s}-lg`]:Object.assign({},$(l,i)),[`${s}-sm`]:Object.assign({},$(r,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:a,gradientFromColor:s,borderRadiusSM:l,calc:r}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:s,borderRadius:l},C(r(a).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},C(a)),{maxWidth:r(a).mul(4).equal(),maxHeight:r(a).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[r]:{width:"100%"},[n]:{width:"100%"}},[`${t}${t}-active`]:{[`
2        ${s},
3        ${l} > li,
4        ${a},
5        ${r},
6        ${n},
7        ${i}
8      `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:N,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,w.merge)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:a(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))]},e=>{let{colorFillContent:t,colorFill:a}=e;return{color:t,colorGradientEnd:a,gradientFromColor:t,gradientToColor:a,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),F=e=>{let{prefixCls:t,className:a,style:s,rows:l=0}=e,r=Array.from({length:l}).map((t,a)=>n.createElement("li",{key:a,style:{width:((e,t)=>{let{width:a,rows:s=2}=t;return Array.isArray(a)?a[e]:s-1===e?a:void 0})(a,e)}}
8));return n.createElement("ul",{className:(0,p.default)(t,a),style:s},r)},O=({prefixCls:e,className:t,width:a,style:s})=>n.createElement("h3",{className:(0,p.default)(e,t),style:Object.assign({width:a},s)});function M(e){return e&&"object"==typeof e?e:{}}let E=e=>{let{prefixCls:t,loading:a,className:s,rootClassName:l,style:r,children:i,avatar:o=!1,title:c=!0,paragraph:d=!0,active:x,round:m}=e,{getPrefixCls:u,direction:g,className:j,style:y}=(0,h.useComponentConfig)("skeleton"),f=u("skeleton",t),[w,N,v]=L(f);if(a||!("loading"in e)){let e,t,a=!!o,i=!!c,u=!!d;if(a){let t=Object.assign(Object.assign({prefixCls:`${f}-avatar`},i&&!u?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),M(o));e=n.createElement("div",{className:`${f}-header`},n.createElement(b,Object.assign({},t)))}if(i||u){let e,s;if(i){let t=Object.assign(Object.assign({prefixCls:`${f}-title`},!a&&u?{width:"38%"}:a&&u?{width:"50%"}:{}),M(c));e=n.createElement(O,Object.assign({},t))}if(u){let e,t=Object.assign(Object.assign({prefixCls:`${f}-paragraph`},(e={},a&&i||(e.width="61%"),!a&&i?e.rows=3:e.rows=2,e)),M(d));s=n.createElement(F,Object.assign({},t))}t=n.createElement("div",{className:`${f}-content`},e,s)}let h=(0,p.default)(f,{[`${f}-with-avatar`]:a,[`${f}-active`]:x,[`${f}-rtl`]:"rtl"===g,[`${f}-round`]:m},j,s,l,N,v);return w(n.createElement("div",{className:h,style:Object.assign(Object.assign({},y),r)},e,t))}return null!=i?i:null};function q(){return(0,t.jsx)("section",{className:"h-full w-full font-sans",children:(0,t.jsx)("div",{className:"h-full w-full overflow-hidden rounded-[10px] bg-border-dark",children:(0,t.jsx)(E.Node,{active:!0,className:"bg-bg-violet relative mx-auto !h-full !w-full rounded-[10px]"})})})}E.Button=e=>{let{prefixCls:t,className:a,rootClassName:s,active:l,block:r=!1,size:i="default"}=e,{getPrefixCls:o}=n.useContext(h.ConfigContext),c=o("skeleton",t),[d,x,m]=L(c),u=(0,g.default)(e,["prefixCls"]),j=(0,p.default)(c,`${c}-element`,{[`${c}-active`]:l,[`${c}-block`]:r},a,s,x,m);return d(n.createElement("div",{className:j},n.createElement(b,Object.assign({prefixCls:`${c}-button`,size:i},u))))},E.Avatar=e=>{let{prefixCls:t,className:a,rootClassName:s,active:l,shape:r="circle",size:i="default"}=e,{getPrefixCls:o}=n.useContext(h.ConfigContext),c=o("skeleton",t),[d,x,m]=L(c),u=(0,g.default)(e,["prefixCls","className"]),j=(0,p.default)(c,`${c}-element`,{[`${c}-active`]:l},a,s,x,m);return d(n.createElement("div",{className:j},n.createElement(b,Object.assign({prefixCls:`${c}-avatar`,shape:r,size:i},u))))},E.Input=e=>{let{prefixCls:t,className:a,rootClassName:s,active:l,block:r,size:i="default"}=e,{getPrefixCls:o}=n.useContext(h.ConfigContext),c=o("skeleton",t),[d,x,m]=L(c),u=(0,g.default)(e,["prefixCls"]),j=(0,p.default)(c,`${c}-element`,{[`${c}-active`]:l,[`${c}-block`]:r},a,s,x,m);return d(n.createElement("div",{className:j},n.createElement(b,Object.assign({prefixCls:`${c}-input`,size:i},u))))},E.Image=e=>{let{prefixCls:t,className:a,rootClassName:s,style:l,active:r}=e,{getPrefixCls:i}=n.useContext(h.ConfigContext),o=i("skeleton",t),[c,d,x]=L(o),m=(0,p.default)(o,`${o}-element`,{[`${o}-active`]:r},a,s,d,x);return c(n.createElement("div",{className:m},n.createElement("div",{className:(0,p.default)(`${o}-image`,a),style:l},n.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${o}-image-svg`},n.createElement("title",null,"Image placeholder"),n.createElement("path",{d:"M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",className:`${o}-image-path`})))))},E.Node=e=>{let{prefixCls:t,className:a,rootClassName:s,style:l,active:r,children:i}=e,{getPrefixCls:o}=n.useContext(h.ConfigContext),c=o("skeleton",t),[d,x,m]=L(c),u=(0,p.default)(c,`${c}-element`,{[`${c}-active`]:r},x,a,s,m);return d(n.createElement("div",{className:u},n.createElement("div",{className:(0,p.default)(`${c}-image`,a),style:l},i)))};var A=e.i(24841);let D=e=>{let{usersData:a,usersDataLoading:s,pointData:l,pointDataLoading:r,rentalData:n,rentalDataLoading:i,slotData:o,slotDataLoading:c}=e,x=l||{total:0,yesterday:0,week:0,month:0,daily:[]},m=new Date,p=new Date(m);p.setDate(p.getDate()-1);let h=x.total>0?[{date:p.toISOString().split("T")[0]||"",count:.95*Number(x.total)},{date:m.toISOString().split("T")[0]||"",count:Number(x.total)}]:[];return(0,t.jsxs)("section",{className:"flex flex-col gap-5 bg-[#141619] px-[14.5px] pt-10 xl:mx-auto xl:w-[1050px] xl:pt-10",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-5 rounded-2xl bg-bg-dark p-5",children:[(0,t.jsx)("div",{className:"flex flex-col gap-5 xl:hidden",children:s?(0,t.jsx)("div",{className:"h-[350px] w-full",children:(0,t.jsx)(q,{})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[24px] text-text-primary",children:"Network Participants"}),(0,t.jsx)("p",{className:"w-fit truncate bg-gradient-to-r from-gradient-blue to-gradient-green bg-clip-text text-[36px] font-bold text-transparent",children:(0,A.formatToUSLocale)(a?.total)})]}),(0,t.jsx)("div",{className:"relative h-[160px] w-full",children:(0,t.jsx)(u,{data:a.daily})}),(0,t.jsxs)("div",{className:"flex w-full justify-between gap-4",children:[(0,t.jsxs)("div",{className:"max-w-[30%]",children:[(0,t.jsx)("p",{className:"text-text-secondary",children:"Yesterday"}),(0,t.jsx)("p",{className:"truncate text-[24px] font-bold text-text-primary",children:(0,A.formatToUSLocale)(a.yesterday)})]}),(0,t.jsxs)("div",{className:"max-w-[30%]",children:[(0,t.jsx)("p",{className:"text-text-secondary",children:"Last 7 days"}),(0,t.jsx)("p",{className:"truncate text-[24px] font-bold text-text-primary",children:(0,A.formatToUSLocale)(a.week)})]}),(0,t.jsxs)("div",{className:"min-w-[84px] max-w-[30%]",children:[(0,t.jsx)("p",{className:"text-text-secondary",children:"Last 30 days"}),(0,t.jsx)("p",{className:"truncate text-[24px] font-bold text-text-primary",children:(0,A.formatToUSLocale)(a.month)})]})]})]})}),(0,t.jsx)("div",{className:"hidden xl:flex xl:justify-between",children:s?(0,t.jsx)("div",{className:"h-[180px] w-full",children:(0,t.jsx)(q,{})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex w-2/5 flex-col justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[24px] text-text-primary",children:"Network Participants"}),(0,t.jsx)("p",{className:"w-fit bg-gradient-to-r from-gradient-blue to-gradient-green bg-clip-text text-[36px] font-bold text-transparent",children:(0,A.formatToUSLocale)(a.total)})]}),(0,t.jsxs)("div",{className:"flex w-full gap-10",children:[(0,t.jsxs)("div",{className:"max-w-[25%]",children:[(0,t.jsx)("p",{className:"text-text-secondary",children:"Yesterday"}),(0,t.jsx)("p",{className:"truncate text-[24px] font-bold text-text-primary",children:(0,A.formatToUSLocale)(a.yesterday)})]}),(0,t.jsxs)("div",{className:"max-w-[25%]",children:[(0,t.jsx)("p",{className:"text-text-secondary",children:"Last 7 days"}),(0,t.jsx)("p",{className:"truncate text-[24px] font-bold text-text-primary",children:(0,A.formatToUSLocale)(a.week)})]}),(0,t.jsxs)("div",{className:"max-w-[30%]",children:[(0,t.jsx)("p",{className:"text-text-secondary",children:"Last 30 days"}),(0,t.jsx)("p",{className:"truncate text-[24px] font-bold text-text-primary",children:(0,A.formatToUSLocale)(a.month)})]})]})]}),(0,t.jsx)("div",{className:"relative h-[180px] w-3/5",children:(0,t.jsx)(u,{data:a.daily})})]})})]}),(0,t.jsxs)("div",{className:"flex flex-col items-stretch justify-between gap-5 xl:flex-row xl:gap-2",children:[(0,t.jsx)("div",{className:"w-full flex-1 rounded-2xl bg-bg-dark p-5 xl:max-w-[32%]",children:r?(0,t.jsx)("div",{className:"h-[340px] w-full xl:h-full",children:(0,t.jsx)(q,{})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{className:"text-[24px] text-text-primary",children:["Total Piggy Watt"," ",(0,t.jsx)("span",{className:"text-[14px] text-text-secondary",children:"(PGW)"})]}),(0,t.jsx)("p",{className:"truncate bg-gradient-to-r from-gradient-blue to-gradient-green bg-clip-text text-[36px] font-bold text-transparent",children:(0,A.formatToUSLocale)(x.total)})]}),(0,t.jsx)("div",{className:"relative my-4 h-[280px] w-full",children:(0,t.jsx)(u,{data:h})})]})}),(0,t.jsx)("div",{className:"w-full flex-1 rounded-2xl bg-bg-dark p-5 xl:max-w-[32%]",children:i?(0,t.jsx)("div",{className:"h-[380px] w-full xl:h-full",children:(0,t.jsx)(q,{})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{className:"text-[24px] text-text-primary",children:["On-Chain Charge"," ",(0,t.jsx)("span",{className:"text-[14px] text-text-secondary",children:"(Seconds)"})]}),(0,t.jsx)("p",{className:"truncate bg-gradient-to-r from-gradient-blue to-gradient-green bg-clip-text text-[36px] font-bold text-transparent",children:(0,A.formatToUSLocale)(n.total_seconds)})]}),(0,t.jsx)("div",{className:"relative my-4 h-[180px] w-full",children:(0,t.jsx)(u,{data:n.daily})}),(0,t.jsxs)("div",{className:"flex w-full flex-col justify-between gap-1",children:[(0,t.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,t.jsx)("p",{className:"text-[18px] text-text-secondary",children:"Yesterday"}),(0,t.jsx)("p",{className:"truncate text-[24px] font-bold text-text-primary xl:max-w-[180px]",children:(0,A.formatToUSLocale)(n.yesterday_seconds)})]}),(0,t.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,t.jsx)("p",{className:"text-[18px] text-text-secondary",children:"Last 7 days"}),(0,t.jsx)("p",{className:"truncate text-[24px] font-bold text-text-primary xl:max-w-[180px]",children:(0,A.formatToUSLocale)(n.week_seconds)})]}),(0,t.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,t.jsx)("p",{className:"text-[18px] text-text-secondary",children:"Last 30 days"}),(0,t.jsx)("p",{className:"truncate text-[24px] font-bold text-text-primary xl:max-w-[180px]",children:(0,A.formatToUSLocale)(n.month_seconds)})]})]})]})}),(0,t.jsx)("div",{className:"w-full flex-1 rounded-2xl bg-bg-dark p-5 xl:max-w-[32%]",children:c||!o?(0,t.jsx)("div",{className:"h-[380px] w-full xl:h-full",children:(0,t.jsx)(q,{})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{className:"text-[24px] text-text-primary",children:["Total Slots"," ",(0,t.jsx)("span",{className:"text-[14px] text-text-secondary",children:"(Units)"})]}),(0,t.jsx)("p",{className:"w-fit bg-gradient-to-r from-gradient-blue to-gradient-green bg-clip-text text-[36px] font-bold text-transparent",children:(0,A.formatToUSLocale)(o.total_slots)})]}),(0,t.jsx)("div",{className:"relative my-5 flex h-[180px] w-full justify-center",children:(0,t.jsx)(d,{leftRatio:Math.round(o.available_slots),rightRatio:Math.round(o.unavailable_slots)})}),(0,t.jsxs)("div",{className:"flex w-full justify-between gap-1",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-[24px] font-bold text-accent-blue xl:max-w-[180px]",children:Math.round(o.availablePercent)}),(0,t.jsx)("p",{className:"text-[18px] text-text-secondary",children:"Active"}),(0,t.jsx)("p",{className:"truncate text-[24px] font-bold text-text-primary xl:max-w-[180px]",children:(0,A.formatToUSLocale)(o.available_slots)})]}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-[24px] font-bold text-text-yellow xl:max-w-[180px]",children:Math.round(o.unavailablePercent)}),(0,t.jsx)("p",{className:"text-[18px] text-text-secondary",children:"Inactive"}),(0,t.jsx)("p",{className:"truncate text-[24px] font-bold text-text-primary xl:max-w-[180px]",children:(0,A.formatToUSLocale)(o.unavailable_slots)})]})]})]})})]})]})};var R=e.i(37902);let P=e=>{let{transactionData:a=[],transactionDataLoading:s=!1,loadMoreTransactions:l,totalTransactionCount:r=0,newTransactionIds:i=new Set}
8=e,[o,c]=(0,n.useState)(20),[d,x]=(0,n.useState)(!1),m=async()=>{if(l&&!d){x(!0);try{await l(),c(e=>e+20)}catch(e){console.error("Failed to load more transactions:",e)}finally{x(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(R.default,{id:"20a5e11a64446369",children:"@keyframes fadeInScale{0%{opacity:0;transform:translateY(-10px)scale(.98)}50%{opacity:.7;transform:translateY(-2px)scale(1.01)}to{opacity:1;transform:translateY(0)scale(1)}}"}),(0,t.jsx)("section",{className:"jsx-20a5e11a64446369 bg-[#141619] px-[14.5px] py-10 xl:mx-auto xl:w-[1050px] xl:py-[80px]",children:s?(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 h-[400px] w-auto",children:(0,t.jsx)(q,{})}):(0,t.jsxs)("div",{className:"jsx-20a5e11a64446369 rounded-2xl bg-bg-dark p-5",children:[(0,t.jsx)("h1",{className:"jsx-20a5e11a64446369 text-[24px] text-text-primary",children:"Real-Time Transactions"}),(0,t.jsxs)("div",{className:"jsx-20a5e11a64446369 scrollbar-thin scrollbar-track-gray-700 scrollbar-thumb-gray-500 xl:scrollbar-none mt-6 overflow-x-auto",children:[(0,t.jsxs)("table",{className:"jsx-20a5e11a64446369 w-full min-w-[600px] table-fixed xl:min-w-0 xl:table-auto",children:[(0,t.jsx)("thead",{className:"jsx-20a5e11a64446369",children:(0,t.jsxs)("tr",{className:"jsx-20a5e11a64446369 border-b border-border-dark",children:[(0,t.jsx)("th",{className:"jsx-20a5e11a64446369 w-[80px] py-4 text-center text-text-secondary xl:w-[15%] xl:text-[18px]",children:"Index"}),(0,t.jsxs)("th",{className:"jsx-20a5e11a64446369 w-[180px] py-4 text-center text-text-secondary xl:w-[25%] xl:text-[18px]",children:[(0,t.jsx)("span",{className:"jsx-20a5e11a64446369 hidden xl:inline",children:"Date & Time"}),(0,t.jsx)("span",{className:"jsx-20a5e11a64446369 xl:hidden",children:"Date & Time"})]}),(0,t.jsx)("th",{className:"jsx-20a5e11a64446369 w-[100px] py-4 text-center text-text-secondary xl:w-[15%] xl:text-[18px]",children:"Amount"}),(0,t.jsx)("th",{className:"jsx-20a5e11a64446369 w-[120px] py-4 text-center text-text-secondary xl:w-[25%] xl:text-[18px]",children:"Action"})]})}),(0,t.jsx)("tbody",{className:"jsx-20a5e11a64446369",children:a?.slice(0,o).map((e,a)=>{let s=i.has(e.index);return(0,t.jsxs)("tr",{style:{transform:s?"scale(1.01)":"scale(1)",animation:s?"fadeInScale 0.3s ease-out":"none"},className:`jsx-20a5e11a64446369 transition-all duration-200 ease-out ${s?"to-accent-green/30 animate-pulse bg-gradient-to-r from-accent-blue/30":"hover:bg-bg-dark/50"}`,children:[(0,t.jsx)("td",{className:"jsx-20a5e11a64446369 w-[80px] py-4 text-center text-text-primary xl:w-[15%] xl:text-[18px]",children:(0,t.jsxs)("span",{className:"jsx-20a5e11a64446369 "+((s?"text-accent-green font-bold":"")||""),children:["#",e.index+0x19f298b]})}),(0,t.jsx)("td",{className:"jsx-20a5e11a64446369 w-[180px] py-4 text-center text-text-primary xl:w-[25%] xl:text-[18px]",children:(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 truncate",children:e.datetime})}),(0,t.jsx)("td",{className:"jsx-20a5e11a64446369 w-[100px] py-4 text-center text-text-primary xl:w-[15%] xl:text-[18px]",children:(0,t.jsxs)("span",{className:"jsx-20a5e11a64446369 "+((s?"text-accent-green font-bold":"")||""),children:[e.amount," PGW"]})}),(0,t.jsx)("td",{className:"jsx-20a5e11a64446369 w-[120px] py-4 text-center xl:w-[25%] xl:text-[18px]",children:(0,t.jsx)("button",{onClick:()=>{var t;let a;return t=e.transactionHash,a=`https://opbnbscan.com/tx/${t}`,void window.open(a,"_blank")},className:"jsx-20a5e11a64446369 mx-auto flex max-w-[120px] items-center justify-center truncate rounded-md border border-accent-blue/20 bg-accent-blue/20 px-3 py-2 text-accent-blue transition-colors hover:bg-accent-blue/30 xl:px-2",children:"View Details"})})]},`transaction-${e.index}-${a}`)})})]}),o<r&&(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 mt-2 flex justify-center xl:mt-6",children:(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 relative",children:(0,t.jsxs)("button",{onClick:m,disabled:d,className:"jsx-20a5e11a64446369 p-1",children:[(0,t.jsx)("p",{className:"jsx-20a5e11a64446369 bg-gradient-to-r from-gradient-blue to-gradient-green bg-clip-text text-[18px] font-bold text-transparent",children:d?"Loading...":"+More"}),(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 absolute bottom-0 left-0 h-[1px] w-full bg-gradient-to-r from-gradient-blue to-gradient-green"})]})})})]})]})})]})};var B=e.i(14335);function I(e){let{summary:a,summaryLoading:s=!1,daily:l=[],dailyLoading:r=!1,latest:i=null,latestLoading:o=!1,transactions:c=[],transactionsLoading:d=!1,loadMoreTransactions:x,hasMore:m=!1}
8=e,[p,h]=(0,n.useState)(20),[g,b]=(0,n.useState)(!1),j=async()=>{if(x&&!g&&m){b(!0);try{await x(),h(e=>e+20)}catch(e){console.error("Failed to load more buyback transactions:",e)}finally{b(!1)}}},y=a?.totalAmountFormatted&&a?.tokenSymbol?`${(0,A.formatToUSLocale)(Number(a.totalAmountFormatted))} ${a.tokenSymbol}`:a?.totalAmountFormatted?a.totalAmountFormatted:"-",f=i?`${(0,A.formatToUSLocale)(Number(i.amount.toFixed(2)))} ${a?.tokenSymbol??""}`:null,w=i?.date?new Date(i.date).toLocaleDateString():"";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(R.default,{id:"20a5e11a64446369",children:"@keyframes fadeInScale{0%{opacity:0;transform:translateY(-10px)scale(.98)}50%{opacity:.7;transform:translateY(-2px)scale(1.01)}to{opacity:1;transform:translateY(0)scale(1)}}"}),(0,t.jsx)("section",{className:"jsx-20a5e11a64446369 bg-[#141619] px-[14.5px] py-10 xl:mx-auto xl:w-[1050px] xl:py-[80px]",children:(0,t.jsxs)("div",{className:"jsx-20a5e11a64446369 rounded-2xl bg-bg-dark p-5",children:[(0,t.jsxs)("div",{className:"jsx-20a5e11a64446369 flex flex-col justify-between gap-6 md:flex-row",children:[(0,t.jsxs)("div",{className:"jsx-20a5e11a64446369",children:[(0,t.jsxs)("div",{className:"jsx-20a5e11a64446369 flex items-center gap-2.5",children:[(0,t.jsx)("p",{className:"jsx-20a5e11a64446369 text-2xl text-text-primary",children:"PIGGY Buyback"}),(0,t.jsx)("p",{className:"jsx-20a5e11a64446369 mt-1 text-base text-text-secondary",children:"Total Amount"})]}),(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 mt-2",children:s?(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 h-[42px] w-[220px] animate-pulse rounded-md bg-gradient-to-r from-gray-700 to-gray-800"}):(0,t.jsx)("p",{className:"jsx-20a5e11a64446369 w-fit bg-gradient-to-r from-gradient-blue to-gradient-green bg-clip-text text-[36px] font-bold text-transparent",children:y})}),(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 mt-6",children:(0,t.jsx)("p",{className:"jsx-20a5e11a64446369 text-text-secondary",children:"Last Buyback"})}),(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 mt-1 flex items-center gap-2.5 text-white",children:o?(0,t.jsxs)("div",{className:"jsx-20a5e11a64446369 flex flex-col gap-2",children:[(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 h-6 w-[200px] animate-pulse rounded bg-gray-700"}),(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 h-4 w-[140px] animate-pulse rounded bg-gray-800"})]}):i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"jsx-20a5e11a64446369 text-2xl font-bold",children:f}),(0,t.jsx)("p",{className:"jsx-20a5e11a64446369 mt-1 text-sm text-text-secondary",children:w})]}):(0,t.jsx)("p",{className:"jsx-20a5e11a64446369 text-sm text-text-secondary",children:"No buyback transactions yet."})})]}),(0,t.jsx)("div",{className:"jsx-20a5e11a64446369",children:r?(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 h-[160px] w-[320px] animate-pulse rounded-2xl bg-[#0a0a0a]"}):(0,t.jsx)(u,{showOngoing:l.length>0,data:l.map(e=>({date:e.date,count:Number(e.amount)}))})})]}),(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 my-6 h-px w-full bg-border-dark"}),(0,t.jsx)("p",{className:"jsx-20a5e11a64446369 text-text-primary text-2xl",children:"Buyback History"}),(0,t.jsx)("div",{className:"jsx-20a5e11a64446369",children:d?(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 h-[400px] w-auto",children:(0,t.jsx)(q,{})}):(0,t.jsxs)("div",{className:"jsx-20a5e11a64446369 scrollbar-thin scrollbar-track-gray-700 scrollbar-thumb-gray-500 mt-2 overflow-x-auto xl:scrollbar-none",children:[(0,t.jsxs)("table",{className:"jsx-20a5e11a64446369 w-full min-w-[600px] table-fixed xl:min-w-0 xl:table-auto",children:[(0,t.jsx)("thead",{className:"jsx-20a5e11a64446369",children:(0,t.jsxs)("tr",{className:"jsx-20a5e11a64446369 border-b border-border-dark",children:[(0,t.jsx)("th",{className:"jsx-20a5e11a64446369 w-[80px] py-4 text-center text-text-secondary xl:w-[15%] xl:text-[18px]",children:"Index"}),(0,t.jsx)("th",{className:"jsx-20a5e11a64446369 w-[180px] py-4 text-center text-text-secondary xl:w-[35%] xl:text-[18px]",children:"Date & time"}),(0,t.jsx)("th",{className:"jsx-20a5e11a64446369 w-[100px] py-4 text-center text-text-secondary xl:w-[20%] xl
8:text-[18px]",children:"Amount"}),(0,t.jsx)("th",{className:"jsx-20a5e11a64446369 w-[120px] py-4 text-center text-text-secondary xl:w-[30%] xl:text-[18px]",children:"View TX"})]})}),(0,t.jsxs)("tbody",{className:"jsx-20a5e11a64446369",children:[c.slice(0,p).map((e,s)=>(0,t.jsxs)("tr",{className:"jsx-20a5e11a64446369 transition-all duration-200 ease-out hover:bg-bg-dark/50",children:[(0,t.jsxs)("td",{className:"jsx-20a5e11a64446369 w-[80px] py-4 text-center text-text-primary xl:w-[15%] xl:text-[18px]",children:["#",e.index]}),(0,t.jsx)("td",{className:"jsx-20a5e11a64446369 w-[180px] py-4 text-center text-text-primary xl:w-[35%] xl:text-[18px]",children:(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 truncate",children:e.datetime.toLocaleString()})}),(0,t.jsxs)("td",{className:"jsx-20a5e11a64446369 w-[100px] py-4 text-center text-text-primary xl:w-[20%] xl:text-[18px]",children:[(0,A.formatToUSLocale)(Number(Number(e.amount).toFixed(2)))," ",a?.tokenSymbol??""]}),(0,t.jsx)("td",{className:"jsx-20a5e11a64446369  py-4 text-center xl:w-[30%] xl:text-[18px]",children:(0,t.jsx)("button",{onClick:()=>{var t;let a;return t=e.transactionHash,a=`https://bscscan.com/tx/${t}`,void window.open(a,"_blank")},className:"jsx-20a5e11a64446369 mx-auto flex items-center justify-center truncate rounded-md border border-accent-blue/20 bg-accent-blue/20 px-3 py-2 text-accent-blue transition-colors hover:bg-accent-blue/30 xl:px-2",children:"View Tx"})})]},`${e.transactionHash}-${s}`)),0===c.length&&!d&&(0,t.jsx)("tr",{className:"jsx-20a5e11a64446369",children:(0,t.jsx)("td",{colSpan:4,className:"jsx-20a5e11a64446369 py-6 text-center text-text-secondary",children:"No buyback transactions found."})})]})]}),m&&c.length>0&&(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 mt-2 flex justify-center xl:mt-6",children:(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 relative",children:(0,t.jsxs)("button",{onClick:j,disabled:g,className:"jsx-20a5e11a64446369 p-1",children:[(0,t.jsx)("p",{className:"jsx-20a5e11a64446369 bg-gradient-to-r from-gradient-blue to-gradient-green bg-clip-text text-[18px] font-bold text-transparent",children:g?"Loading...":"+More"}),(0,t.jsx)("div",{className:"jsx-20a5e11a64446369 absolute bottom-0 left-0 h-[1px] w-full bg-gradient-to-r from-gradient-blue to-gradient-green"})]})})})]})})]})})]})}var U=e.i(79549);let H=(0,l.default)(()=>e.A(37647).then(e=>({default:e.DashboardMapModuleClient})),{loadableGenerated:{modules:[90314]},ssr:!1,loading:()=>(0,t.jsx)("section",{className:"bg-[#141619] px-[14.5px] pt-10 xl:mx-auto xl:w-[1050px] xl:pt-[80px]",children:(0,t.jsxs)("div",{className:"flex flex-col gap-4 roun
8ded-2xl bg-bg-dark p-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h1",{className:"text-[24px] text-text-primary",children:"Installation Map"}),(0,t.jsx)("div",{className:"text-sm text-text-secondary",children:"Loading map..."})]}),(0,t.jsx)("div",{className:"h-[45vh] flex items-center justify-center overflow-hidden rounded-2xl bg-gray-800",children:(0,t.jsx)("div",{className:"text-text-secondary",children:"Loading map component..."})})]})})}),_=e=>(0,t.jsxs)(a.Layout,{style:{height:"100%",backgroundColor:"#141619"},children:[(0,t.jsx)(s.Header,{style:{padding:0,height:"fit-content",borderWidth:0},children:(0,t.jsx)(r.HeaderModule,{})}),(0,t.jsxs)(s.Content,{style:{overflow:"auto",minWidth:"320px",overflowX:"hidden"},children:[(0,t.jsx)("section",{className:"bg-[#141619] px-[14.5px] pt-24 xl:mx-auto xl:w-[1050px] xl:pt-[120px]",children:(0,t.jsx)(U.DashboardTabsAtom,{})}),(0,t.jsx)(D,{...e.dashboardUserSummaryModuleProps}),(0,t.jsx)(H,{...e.dashboardMapModuleProps}),(0,t.jsx)(I,{...e.dashboardBuyBackModuleProps}),(0,t.jsx)(P,{...e.dashboardRentalsModuleProps})]}),(0,t.jsx)(s.Footer,{style:{padding:0,minHeight:50},children:(0,t.jsx)(B.FooterModule,{})})]});var W=e.i(66027);e.i(95590),e.i(64303),console.log("PIGGYCELL_POINT_CANISTER_ID","3bixh-zyaaa-aaaam-aepfq-cai");let z=e=>e.map((e,t)=>{let a=new Date(1e3*Number(e.timestamp)),s=a.toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"numeric"}),l=a.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return{datetime:`${s}, ${l}`,index:e.id,transactionHash:e.transactionHash,amount:e.value}});var G=e.i(33626);e.s(["default",0,()=>{let{usersData:e,usersDataLoading:a,pointData:s,pointDataLoading:l,rentalData:r,rentalDataLoading:i,slotData:o,slotDataLoading:c,realTimeRentalData:d,realTimeRentalDataLoading:x,transactionData:m,transactionDataLoading:u,loadMoreTransactions:p,totalTransactionCount:h,newTransactionIds:g,installationMapData:b,installationMapDataLoading:j,buybackSummary:y,buybackSummaryLoading:f,buybackDaily:w,buybackDailyLoading:N,buybackLatest:v,buybackLatestLoading:k,buybackTransactions:$,buybackTransactionsLoading:C,loadMoreBuybackTransactions:S,buybackHasMore:T}=(()=>{let[e,t]=(0,n.useState)([]),[a,s]=(0,n.useState)(0),[l,r]=(0,n.useState)(new Set),i=(0,n.useRef)(null),o=(0,n.useRef)(0),[c,d]=(0,n.useState)([]),[x,m]=(0,n.use
8State)(1),[u,p]=(0,n.useState)(!0),{data:h,isLoading:g}=(0,W.useQuery)({queryKey:["users"],queryFn:async()=>{let e=await fetch("/service/c2e/users");if(!e.ok)throw Error("네트워크 응답이 실패했습니다");return e.json()}}),{data:b,isLoading:j}=(0,W.useQuery)({queryKey:["buyback-summary"],queryFn:async()=>{let e=await fetch("/api/bsc/buybacks/summary");if(!e.ok)throw Error("Failed to fetch buyback summary");return e.json()},staleTime:3e5,retry:2}),{data:y,isLoading:f}=(0,W.useQuery)({queryKey:["buyback-daily"],queryFn:async()=>{let e=await fetch("/api/bsc/buybacks/daily");if(!e.ok)throw Error("Failed to fetch buyback daily data");return e.json()},staleTime:3e5,retry:2}),{data:w,isLoading:N}=(0,W.useQuery)({queryKey:["buyback-latest"],queryFn:async()=>{let e=await fetch("/api/bsc/buybacks/latest");if(!e.ok)throw Error("Failed to fetch buyback latest data");return e.json()},staleTime:3e5,retry:2}),{data:v,isLoading:k}=(0,W.useQuery)({queryKey:["points-canister"],queryFn:async()=>({total:await (0,G.getBep20TokenSupply)(G.PgwContractAddress),yesterday:0,week:0,month:0,daily:[]}),staleTime:3e5,retry:3}),{data:$,isLoading:C}=(0,W.useQuery)({queryKey:["rentalTime"],queryFn:async()=>{let e=await fetch("/service/c2e/rentalTime");if(!e.ok)throw Error("네트워크 응답이 실패했습니다");return e.json()}}),{data:S,isLoading:T}=(0,W.useQuery)({queryKey:["slot"],queryFn:async()=>{let e=await fetch("/service/c2e/slotStatTotal");if(!e.ok)throw Error("네트워크 응답이 실패했습니다");return e.json()},select:e=>{let t=e.total_slots>0?e.available_slots/e.total_slots*100:0,a=e.total_slots>0?e.unavailable_slots/e.total_slots*100:0;return{...e,availablePercent:t,unavailablePercent:a}}}),{data:L,isLoading:F}=(0,W.useQuery)({queryKey:["installationMap"],queryFn:async()=>{let e=await fetch("/service/c2e/installationMap");if(!e.ok)throw Error("네트워크 응답이 실패했습니다");return e.json()},staleTime:6e5,retry:2}),{data:O,isLoading:M}=(0,W.useQuery)({queryKey:["canister-transactions",0],queryFn:async()=>{console.log("Fetching initial transactions from canister...");let e=await (0,G.getBep20RecentTransactions)(G.PgwContractAddress,20),a=z(e.transactions);return t(a),s(Number(e.total)),a},staleTime:3e5,retry:2}),E=(0,n.useCallback)(async()=>{try{let a=e.length;console.log(`Loading more transactions - current length: ${a}`);let l=await (0,G.getBep20RecentTransactions)(G.PgwContractAddress,20,a),r=z(l.transactions);t(e=>[...e,...r]),s(Number(l.total))}catch(e){console.error("Error loading more transactions:",e)}},[e.length]),q=(0,n.useCallback)(async()=>{try{let a=await (0,G.getBep20RecentTransactions)(G.PgwContractAddress,20),l=z(a.transactions);if(l.length>0){let n=new Set(e.map(e=>e.index)),i=Math.max(...e.map(e=>e.index),0),c=l.filter(e=>e.index>i&&!n.has(e.index));if(c.length>0){let e=[...c].sort((e,t)=>e.index-t.index);e.forEach((e,a)=>{setTimeout(()=>{t(t=>new Map(t.map(e=>[e.index,e])).has(e.index)?(console.warn(`Duplicate transaction index ${e.index} prevented`),t):[e,...t]),r(t=>new Set([...t,e.index])),setTimeout(()=>{r(t=>{let a=new Set(t);return a.delete(e.index),a})},850)},800*a)}),setTimeout(()=>{o.current=Math.max(...c.map(e=>e.index)),s(Number(a.total))},800*e.length)}}}catch(e){console.error("Error polling for new transactions:",e)}},[e]);(0,n.useEffect)(()=>{if(e.length>0)return 0===o.current&&(o.current=Math.max(...e.map(e=>e.index),0)),i.current=setInterval(()=>{q()},5e3),()=>{i.current&&(clearInterval(i.current),i.current=null)}},[e.length,q]),(0,n.useEffect)(()=>()=>{i.current&&clearInterval(i.current)},[]);let A=e.length>0?e:O,{data:D,isLoading:R}=(0,W.useQuery)({queryKey:["realTimeRental"],queryFn:async()=>{let e=await fetch("/service/c2e/realtimeRentals");if(!e.ok)throw Error("네트워크 응답이 실패했습니다");return e.json()}}),{isLoading:P}=(0,W.useQuery)({queryKey:["buyback-transactions",1],queryFn:async()=>{let e=await fetch("/api/bsc/buybacks?page=1&pageSize=5");if(!e.ok)throw Error("Failed to fetch buyback transactions");let t=await e.json(),a=(t.transactions??[]).map(e=>({datetime:new Date(1e3*e.timestamp),index:e.id,amount:e.valueFormatted,transactionHash:e.hash}));d(a),m(1);let s=t.pagination;return p(s?s.page<s.totalPages:5===t.transactions.length),a},staleTime:3e5,retry:2}),B=(0,n.useCallback)(async()=>
8{if(!u)return;let e=x+1,t=await fetch(`/api/bsc/buybacks?page=${e}&pageSize=5`);if(!t.ok)throw Error("Failed to fetch more buyback transactions");let a=await t.json(),s=a.transactions??[];if(0===s.length)return void p(!1);let l=s.map(e=>({datetime:new Date(1e3*e.timestamp),index:e.id,amount:e.valueFormatted,transactionHash:e.hash}));d(e=>[...e,...l]),m(e);let r=a.pagination;p(r?r.page<r.totalPages:5===s.length)},[u,x,c.length]);return{usersData:h,usersDataLoading:g,pointData:v,pointDataLoading:k,rentalData:$,rentalDataLoading:C,slotData:S,slotDataLoading:T,realTimeRentalData:D,realTimeRentalDataLoading:R,installationMapData:L,installationMapDataLoading:F,transactionData:A,transactionDataLoading:M,loadMoreTransactions:E,totalTransactionCount:a,newTransactionIds:l,buybackSummary:b,buybackSummaryLoading:j,buybackDaily:y?.data??[],buybackDailyLoading:f,buybackLatest:w?.data??null,buybackLatestLoading:N,buybackTransactions:c,buybackTransactionsLoading:P,loadMoreBuybackTransactions:B,buybackHasMore:u}})();return(0,t.jsx)(_,{dashboardUserSummaryModuleProps:{usersData:e,usersDataLoading:a,pointData:s,pointDataLoading:l,rentalData:r,rentalDataLoading:i,slotData:o,slotDataLoading:c},dashboardRentalsModuleProps:{realTimeRentalData:d,realTimeRentalDataLoading:x,transactionData:m,transactionDataLoading:u,loadMoreTransactions:p,totalTransactionCount:h,newTransactionIds:g},dashboardMapModuleProps:{installationData:b,isLoading:j},dashboardBuyBackModuleProps:{summary:y,summaryLoading:f,daily:w,dailyLoading:N,latest:v,latestLoading:k,transactions:$,transactionsLoading:C,loadMoreTransactions:S,hasMore:T}})}],2333)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.