From 233212b208ec6195ad562063dcca346f5db75164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ho=C3=A0ng=20Rio?= Date: Thu, 19 Dec 2024 11:52:58 +0700 Subject: [PATCH] web: fix duplicate api call when change energy chart type multiple time --- web_viewer/fe_src/src/components/DailyChart.tsx | 15 +++++++++------ .../fe_src/src/components/MonthlyChart.tsx | 16 ++++++++++------ web_viewer/fe_src/src/components/YearlyChart.tsx | 16 ++++++++++------ web_viewer/public/assets/EnergyChart-CqgWYZ6D.js | 2 ++ web_viewer/public/assets/EnergyChart-yyp8EL_K.js | 2 -- ...alue-DT878Cs6.js => GeneralValue-TQNWFOiV.js} | 2 +- ...Chart-BTS1liN6.js => HourlyChart-D1hNPe7p.js} | 2 +- .../public/assets/MonthlyChart-2LzxHQgP.js | 1 + .../public/assets/MonthlyChart-CPAcdl1p.js | 1 - .../{Summary-ocuEYfmg.js => Summary-DYwmrEyt.js} | 2 +- ...BQMVNzph.js => SystemInformation-OlKfNYSc.js} | 2 +- web_viewer/public/assets/YearlyChart-D_atEBNd.js | 1 + web_viewer/public/assets/YearlyChart-DzuPyxxb.js | 1 - .../{index-bn3fLlzU.js => index-2Fv8VwMK.js} | 4 ++-- ...zOHNX.js => react-apexcharts.min-Dwh-0CXz.js} | 2 +- web_viewer/public/index.html | 2 +- 16 files changed, 41 insertions(+), 30 deletions(-) create mode 100644 web_viewer/public/assets/EnergyChart-CqgWYZ6D.js delete mode 100644 web_viewer/public/assets/EnergyChart-yyp8EL_K.js rename web_viewer/public/assets/{GeneralValue-DT878Cs6.js => GeneralValue-TQNWFOiV.js} (67%) rename web_viewer/public/assets/{HourlyChart-BTS1liN6.js => HourlyChart-D1hNPe7p.js} (95%) create mode 100644 web_viewer/public/assets/MonthlyChart-2LzxHQgP.js delete mode 100644 web_viewer/public/assets/MonthlyChart-CPAcdl1p.js rename web_viewer/public/assets/{Summary-ocuEYfmg.js => Summary-DYwmrEyt.js} (96%) rename web_viewer/public/assets/{SystemInformation-BQMVNzph.js => SystemInformation-OlKfNYSc.js} (97%) create mode 100644 web_viewer/public/assets/YearlyChart-D_atEBNd.js delete mode 100644 web_viewer/public/assets/YearlyChart-DzuPyxxb.js rename web_viewer/public/assets/{index-bn3fLlzU.js => index-2Fv8VwMK.js} (99%) rename web_viewer/public/assets/{react-apexcharts.min-C1JzOHNX.js => react-apexcharts.min-Dwh-0CXz.js} (99%) diff --git a/web_viewer/fe_src/src/components/DailyChart.tsx b/web_viewer/fe_src/src/components/DailyChart.tsx index c52fc6b..04afdc1 100644 --- a/web_viewer/fe_src/src/components/DailyChart.tsx +++ b/web_viewer/fe_src/src/components/DailyChart.tsx @@ -83,14 +83,17 @@ const DailyChart = forwardRef((_, ref: ForwardedRef) => { }) ); + const onVisiblityChange = useCallback(() => { + if (!document.hidden) { + fetchChart(); + } + }, [fetchChart]); + useEffect(() => { fetchChart(); - document.addEventListener("visibilitychange", () => { - if (!document.hidden) { - fetchChart(); - } - }); - }, [fetchChart]); + document.addEventListener("visibilitychange", onVisiblityChange); + return () => document.removeEventListener("visibilitychange", onVisiblityChange); + }, [fetchChart, onVisiblityChange]); useEffect(() => { const mq = window.matchMedia("(prefers-color-scheme: dark)"); diff --git a/web_viewer/fe_src/src/components/MonthlyChart.tsx b/web_viewer/fe_src/src/components/MonthlyChart.tsx index ddc5f25..5359f5c 100644 --- a/web_viewer/fe_src/src/components/MonthlyChart.tsx +++ b/web_viewer/fe_src/src/components/MonthlyChart.tsx @@ -85,14 +85,18 @@ const MonthlyChart = forwardRef((_, ref: ForwardedRef) => { }) ); + const onVisiblityChange = useCallback(() => { + if (!document.hidden) { + fetchChart(); + } + }, [fetchChart]); + useEffect(() => { fetchChart(); - document.addEventListener("visibilitychange", () => { - if (!document.hidden) { - fetchChart(); - } - }); - }, [fetchChart]); + document.addEventListener("visibilitychange", onVisiblityChange); + return () => + document.removeEventListener("visibilitychange", onVisiblityChange); + }, [fetchChart, onVisiblityChange]); useEffect(() => { const mq = window.matchMedia("(prefers-color-scheme: dark)"); diff --git a/web_viewer/fe_src/src/components/YearlyChart.tsx b/web_viewer/fe_src/src/components/YearlyChart.tsx index 4e61071..c3ad3c7 100644 --- a/web_viewer/fe_src/src/components/YearlyChart.tsx +++ b/web_viewer/fe_src/src/components/YearlyChart.tsx @@ -85,14 +85,18 @@ const YearlyChart = forwardRef((_, ref: ForwardedRef) => { }) ); + const onVisiblityChange = useCallback(() => { + if (!document.hidden) { + fetchChart(); + } + }, [fetchChart]); + useEffect(() => { fetchChart(); - document.addEventListener("visibilitychange", () => { - if (!document.hidden) { - fetchChart(); - } - }); - }, [fetchChart]); + document.addEventListener("visibilitychange", onVisiblityChange); + return () => + document.removeEventListener("visibilitychange", onVisiblityChange); + }, [fetchChart, onVisiblityChange]); useEffect(() => { const mq = window.matchMedia("(prefers-color-scheme: dark)"); diff --git a/web_viewer/public/assets/EnergyChart-CqgWYZ6D.js b/web_viewer/public/assets/EnergyChart-CqgWYZ6D.js new file mode 100644 index 0000000..9740fc1 --- /dev/null +++ b/web_viewer/public/assets/EnergyChart-CqgWYZ6D.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MonthlyChart-2LzxHQgP.js","assets/index-2Fv8VwMK.js","assets/index-DORG5STg.css","assets/react-apexcharts.min-Dwh-0CXz.js","assets/utils-bN4E_OZW.js","assets/YearlyChart-D_atEBNd.js"])))=>i.map(i=>d[i]); +import{r as s,j as e,L as x,_ as C}from"./index-2Fv8VwMK.js";import{C as E}from"./react-apexcharts.min-Dwh-0CXz.js";import{r as h}from"./utils-bN4E_OZW.js";const c="Solar production",w=s.forwardRef((t,a)=>{const[n,r]=s.useState([]),[u,p]=s.useState(!1),y=s.useRef(!1),_=s.useMemo(()=>{const o=[],l=[],g=[],v=[],b=[],j=[];return n.forEach(i=>{const d=new Date(i[3]).getTime();o.push({x:d,y:h(i[4])}),l.push({x:d,y:h(i[5])}),g.push({x:d,y:h(i[6])}),v.push({x:d,y:h(i[7])}),b.push({x:d,y:h(i[8])}),j.push({x:d,y:h(i[9])})}),[{name:c,data:o},{name:"Battery discharged",data:g},{name:"Battery charged",data:l},{name:"Export to grid",data:b},{name:"Import to user",data:v},{name:"Comsumption",data:j}]},[n]),m=s.useCallback(async()=>{if(y.current)return;y.current=!0;const l=await(await fetch("/daily-chart")).json();r(l),y.current=!1},[r]);s.useImperativeHandle(a,()=>({fetchChart:m}));const f=s.useCallback(()=>{document.hidden||m()},[m]);return s.useEffect(()=>(m(),document.addEventListener("visibilitychange",f),()=>document.removeEventListener("visibilitychange",f)),[m,f]),s.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)");o.matches&&p(!0),o.addEventListener("change",l=>p(l.matches))},[]),n.length?e.jsx(E,{type:"bar",series:_.reverse(),options:{chart:{toolbar:{show:!1},height:300,zoom:{allowMouseWheelZoom:!1}},colors:["rgb(112, 173, 70)","rgb(90, 155, 213)","rgb(64, 38, 198)","rgb(246, 104, 103)","rgb(153, 107, 31)","rgb(255, 164, 97)"].reverse(),theme:{mode:u?"dark":"light"},dataLabels:{enabled:!1},xaxis:{type:"datetime",labels:{datetimeUTC:!1,format:"dd/MM/yyyy"}},tooltip:{x:{format:"dd/MM/yyyy"},y:{formatter(o){return`${o} kWh`}}},yaxis:[{seriesName:c,title:{text:"Energy (kWh)"}},{seriesName:c,show:!1},{seriesName:c,show:!1},{seriesName:c,show:!1},{seriesName:c,show:!1},{seriesName:c,show:!1}].reverse()}}):e.jsx(x,{})});w.displayName="DailyChart";const k=s.memo(w),D=s.lazy(()=>C(()=>import("./MonthlyChart-2LzxHQgP.js"),__vite__mapDeps([0,1,2,3,4]))),S=s.lazy(()=>C(()=>import("./YearlyChart-D_atEBNd.js"),__vite__mapDeps([5,1,2,3,4])));var N=(t=>(t[t.Daily=0]="Daily",t[t.Monthly=1]="Monthly",t[t.Yearly=2]="Yearly",t))(N||{});function M({className:t}){const[a,n]=s.useState(0),r=s.useRef(null);return e.jsxs("div",{className:`card col energy-chart ${t}`,children:[e.jsxs("div",{className:"row justify-space-between",children:[e.jsxs("div",{className:"energy-chart-title",children:[N[a]," chart"]}),e.jsxs("div",{className:"row energy-chart-buttons",children:[e.jsx("button",{onClick:()=>{var u;return(u=r==null?void 0:r.current)==null?void 0:u.fetchChart()},children:"Update chart"}),e.jsx("div",{children:"Chart type:"}),e.jsxs("div",{className:"row chart-select",children:[e.jsx("button",{className:a===0?"active":void 0,onClick:()=>n(0),children:"Daily"}),e.jsx("button",{className:a===1?"active":void 0,onClick:()=>n(1),children:"Monthly"}),e.jsx("button",{className:a===2?"active":void 0,onClick:()=>n(2),children:"Yearly"})]})]})]}),e.jsxs("div",{className:"energy-chart-content flex-1 col",children:[a===0&&e.jsx(k,{ref:r}),a===1&&e.jsx(s.Suspense,{fallback:e.jsx(x,{}),children:e.jsx(D,{ref:r})}),a===2&&e.jsx(s.Suspense,{fallback:e.jsx(x,{}),children:e.jsx(S,{ref:r})})]})]})}const $=s.memo(M);export{$ as default}; diff --git a/web_viewer/public/assets/EnergyChart-yyp8EL_K.js b/web_viewer/public/assets/EnergyChart-yyp8EL_K.js deleted file mode 100644 index 2caed6a..0000000 --- a/web_viewer/public/assets/EnergyChart-yyp8EL_K.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MonthlyChart-CPAcdl1p.js","assets/index-bn3fLlzU.js","assets/index-DORG5STg.css","assets/react-apexcharts.min-C1JzOHNX.js","assets/utils-bN4E_OZW.js","assets/YearlyChart-DzuPyxxb.js"])))=>i.map(i=>d[i]); -import{r as s,j as e,L as f,_ as b}from"./index-bn3fLlzU.js";import{C as _}from"./react-apexcharts.min-C1JzOHNX.js";import{r as h}from"./utils-bN4E_OZW.js";const i="Solar production",w=s.forwardRef((t,a)=>{const[n,r]=s.useState([]),[m,x]=s.useState(!1),y=s.useRef(!1),N=s.useMemo(()=>{const o=[],l=[],p=[],g=[],j=[],v=[];return n.forEach(c=>{const d=new Date(c[3]).getTime();o.push({x:d,y:h(c[4])}),l.push({x:d,y:h(c[5])}),p.push({x:d,y:h(c[6])}),g.push({x:d,y:h(c[7])}),j.push({x:d,y:h(c[8])}),v.push({x:d,y:h(c[9])})}),[{name:i,data:o},{name:"Battery discharged",data:p},{name:"Battery charged",data:l},{name:"Export to grid",data:j},{name:"Import to user",data:g},{name:"Comsumption",data:v}]},[n]),u=s.useCallback(async()=>{if(y.current)return;y.current=!0;const l=await(await fetch("/daily-chart")).json();r(l),y.current=!1},[r]);return s.useImperativeHandle(a,()=>({fetchChart:u})),s.useEffect(()=>{u(),document.addEventListener("visibilitychange",()=>{document.hidden||u()})},[u]),s.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)");o.matches&&x(!0),o.addEventListener("change",l=>x(l.matches))},[]),n.length?e.jsx(_,{type:"bar",series:N.reverse(),options:{chart:{toolbar:{show:!1},height:300,zoom:{allowMouseWheelZoom:!1}},colors:["rgb(112, 173, 70)","rgb(90, 155, 213)","rgb(64, 38, 198)","rgb(246, 104, 103)","rgb(153, 107, 31)","rgb(255, 164, 97)"].reverse(),theme:{mode:m?"dark":"light"},dataLabels:{enabled:!1},xaxis:{type:"datetime",labels:{datetimeUTC:!1,format:"dd/MM/yyyy"}},tooltip:{x:{format:"dd/MM/yyyy"},y:{formatter(o){return`${o} kWh`}}},yaxis:[{seriesName:i,title:{text:"Energy (kWh)"}},{seriesName:i,show:!1},{seriesName:i,show:!1},{seriesName:i,show:!1},{seriesName:i,show:!1},{seriesName:i,show:!1}].reverse()}}):e.jsx(f,{})});w.displayName="DailyChart";const E=s.memo(w),D=s.lazy(()=>b(()=>import("./MonthlyChart-CPAcdl1p.js"),__vite__mapDeps([0,1,2,3,4]))),S=s.lazy(()=>b(()=>import("./YearlyChart-DzuPyxxb.js"),__vite__mapDeps([5,1,2,3,4])));var C=(t=>(t[t.Daily=0]="Daily",t[t.Monthly=1]="Monthly",t[t.Yearly=2]="Yearly",t))(C||{});function k({className:t}){const[a,n]=s.useState(0),r=s.useRef(null);return e.jsxs("div",{className:`card col energy-chart ${t}`,children:[e.jsxs("div",{className:"row justify-space-between",children:[e.jsxs("div",{className:"energy-chart-title",children:[C[a]," chart"]}),e.jsxs("div",{className:"row energy-chart-buttons",children:[e.jsx("button",{onClick:()=>{var m;return(m=r==null?void 0:r.current)==null?void 0:m.fetchChart()},children:"Update chart"}),e.jsx("div",{children:"Chart type:"}),e.jsxs("div",{className:"row chart-select",children:[e.jsx("button",{className:a===0?"active":void 0,onClick:()=>n(0),children:"Daily"}),e.jsx("button",{className:a===1?"active":void 0,onClick:()=>n(1),children:"Monthly"}),e.jsx("button",{className:a===2?"active":void 0,onClick:()=>n(2),children:"Yearly"})]})]})]}),e.jsxs("div",{className:"energy-chart-content flex-1 col",children:[a===0&&e.jsx(E,{ref:r}),a===1&&e.jsx(s.Suspense,{fallback:e.jsx(f,{}),children:e.jsx(D,{ref:r})}),a===2&&e.jsx(s.Suspense,{fallback:e.jsx(f,{}),children:e.jsx(S,{ref:r})})]})]})}const I=s.memo(k);export{I as default}; diff --git a/web_viewer/public/assets/GeneralValue-DT878Cs6.js b/web_viewer/public/assets/GeneralValue-TQNWFOiV.js similarity index 67% rename from web_viewer/public/assets/GeneralValue-DT878Cs6.js rename to web_viewer/public/assets/GeneralValue-TQNWFOiV.js index 41fb702..8d0a4f5 100644 --- a/web_viewer/public/assets/GeneralValue-DT878Cs6.js +++ b/web_viewer/public/assets/GeneralValue-TQNWFOiV.js @@ -1 +1 @@ -import{j as e}from"./index-bn3fLlzU.js";function l({value:r,unit:s,className:n}){return e.jsxs("div",{className:`${n||""} general-value`,children:[e.jsx("strong",{children:r}),s]})}export{l as G}; +import{j as e}from"./index-2Fv8VwMK.js";function l({value:r,unit:s,className:n}){return e.jsxs("div",{className:`${n||""} general-value`,children:[e.jsx("strong",{children:r}),s]})}export{l as G}; diff --git a/web_viewer/public/assets/HourlyChart-BTS1liN6.js b/web_viewer/public/assets/HourlyChart-D1hNPe7p.js similarity index 95% rename from web_viewer/public/assets/HourlyChart-BTS1liN6.js rename to web_viewer/public/assets/HourlyChart-D1hNPe7p.js index 1b61db1..6f24ef4 100644 --- a/web_viewer/public/assets/HourlyChart-BTS1liN6.js +++ b/web_viewer/public/assets/HourlyChart-D1hNPe7p.js @@ -1 +1 @@ -import{r as s,j as r,L as k}from"./index-bn3fLlzU.js";import{C as A}from"./react-apexcharts.min-C1JzOHNX.js";const u="Solar PV",y="Battery",g="Grid",b=s.forwardRef(({className:w},C)=>{const[n,d]=s.useState([]),[S,f]=s.useState(!1),h=s.useRef(!1),[a,E]=s.useState(!0),j=s.useMemo(()=>{const e=[],t=[],i=[],p=[],x=[];return n.forEach(c=>{const l=new Date(c[1]).getTime();e.push({x:l,y:c[2]}),t.push({x:l,y:c[3]}),i.push({x:l,y:c[4]}),p.push({x:l,y:c[5]}),x.push({x:l,y:c[6]})}),[{name:u,data:e},{name:y,data:t},{name:g,data:i},{name:"Consumption",data:p},{name:"SOC",data:x}]},[n]),o=s.useCallback(async()=>{if(h.current)return;h.current=!0;const t=await(await fetch("/hourly-chart")).json();d(t),h.current=!1},[d]);s.useImperativeHandle(C,()=>({updateItem(e){if(!a)return;const t=n[n.length-1];if(JSON.stringify(t)===JSON.stringify(e))return;const i=[...n];t[0]===e[0]?i.splice(n.length-1,1,e):i.push(e),d(i)}}));const m=s.useCallback(()=>{!document.hidden&&a&&o()},[o,a]);s.useEffect(()=>(o(),document.addEventListener("visibilitychange",m),()=>{document.removeEventListener("visibilitychange",m)}),[o,a,m]),s.useEffect(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");e.matches&&f(!0),e.addEventListener("change",t=>f(t.matches))},[]);const v=s.useCallback(()=>{a||o(),E(!a)},[a,o]),N=s.useMemo(()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},[]);return r.jsxs("div",{className:`card hourly-chart col ${w||""}`,children:[r.jsxs("div",{className:"row justify-space-between",children:[r.jsx("div",{className:"hourly-chart-title",children:"Hourly Chart"}),r.jsxs("div",{className:"row hourly-chart-buttons",children:[r.jsx("button",{onClick:v,children:a?"Pause auto update":"Allow auto update"}),r.jsx("button",{disabled:!a,onClick:()=>o(),children:"Update"})]})]}),r.jsx("div",{className:"hourly-chart-content col flex-1",children:n.length?r.jsx(A,{type:"line",series:j,options:{chart:{toolbar:{show:!1},height:300,zoom:{enabled:!1}},colors:["rgb(112, 173, 70)","rgb(90, 155, 213)","rgb(246, 104, 103)","rgb(255, 164, 97)","rgb(128, 0, 128)"],stroke:{width:3},theme:{mode:S?"dark":"light"},xaxis:{type:"datetime",min:N.getTime(),labels:{datetimeUTC:!1,format:"HH:mm"}},yaxis:[{seriesName:u,title:{text:"Power (W)"}},{seriesName:u,show:!1},{seriesName:u,show:!1},{seriesName:u,show:!1},{seriesName:"SOC",opposite:!0,tickAmount:10,min:0,max:100,title:{text:"SOC (%)"}}],tooltip:{x:{format:"HH:mm:ss"},y:{formatter(e,t){return t.seriesIndex===4?`${e}%`:`${Math.abs(e)} W`},title:{formatter(e,t){return e===y?t.series[1][t.dataPointIndex]<0?`${e} charge:`:`${e} discharge:`:e===g?"Import Grid Power:":`${e}:`}}}}}}):r.jsx(k,{})})]})});b.displayName="HourlyChart";const D=s.memo(b);export{D as default}; +import{r as s,j as r,L as k}from"./index-2Fv8VwMK.js";import{C as A}from"./react-apexcharts.min-Dwh-0CXz.js";const u="Solar PV",y="Battery",g="Grid",b=s.forwardRef(({className:w},C)=>{const[n,d]=s.useState([]),[S,f]=s.useState(!1),h=s.useRef(!1),[a,E]=s.useState(!0),j=s.useMemo(()=>{const e=[],t=[],i=[],p=[],x=[];return n.forEach(c=>{const l=new Date(c[1]).getTime();e.push({x:l,y:c[2]}),t.push({x:l,y:c[3]}),i.push({x:l,y:c[4]}),p.push({x:l,y:c[5]}),x.push({x:l,y:c[6]})}),[{name:u,data:e},{name:y,data:t},{name:g,data:i},{name:"Consumption",data:p},{name:"SOC",data:x}]},[n]),o=s.useCallback(async()=>{if(h.current)return;h.current=!0;const t=await(await fetch("/hourly-chart")).json();d(t),h.current=!1},[d]);s.useImperativeHandle(C,()=>({updateItem(e){if(!a)return;const t=n[n.length-1];if(JSON.stringify(t)===JSON.stringify(e))return;const i=[...n];t[0]===e[0]?i.splice(n.length-1,1,e):i.push(e),d(i)}}));const m=s.useCallback(()=>{!document.hidden&&a&&o()},[o,a]);s.useEffect(()=>(o(),document.addEventListener("visibilitychange",m),()=>{document.removeEventListener("visibilitychange",m)}),[o,a,m]),s.useEffect(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");e.matches&&f(!0),e.addEventListener("change",t=>f(t.matches))},[]);const v=s.useCallback(()=>{a||o(),E(!a)},[a,o]),N=s.useMemo(()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},[]);return r.jsxs("div",{className:`card hourly-chart col ${w||""}`,children:[r.jsxs("div",{className:"row justify-space-between",children:[r.jsx("div",{className:"hourly-chart-title",children:"Hourly Chart"}),r.jsxs("div",{className:"row hourly-chart-buttons",children:[r.jsx("button",{onClick:v,children:a?"Pause auto update":"Allow auto update"}),r.jsx("button",{disabled:!a,onClick:()=>o(),children:"Update"})]})]}),r.jsx("div",{className:"hourly-chart-content col flex-1",children:n.length?r.jsx(A,{type:"line",series:j,options:{chart:{toolbar:{show:!1},height:300,zoom:{enabled:!1}},colors:["rgb(112, 173, 70)","rgb(90, 155, 213)","rgb(246, 104, 103)","rgb(255, 164, 97)","rgb(128, 0, 128)"],stroke:{width:3},theme:{mode:S?"dark":"light"},xaxis:{type:"datetime",min:N.getTime(),labels:{datetimeUTC:!1,format:"HH:mm"}},yaxis:[{seriesName:u,title:{text:"Power (W)"}},{seriesName:u,show:!1},{seriesName:u,show:!1},{seriesName:u,show:!1},{seriesName:"SOC",opposite:!0,tickAmount:10,min:0,max:100,title:{text:"SOC (%)"}}],tooltip:{x:{format:"HH:mm:ss"},y:{formatter(e,t){return t.seriesIndex===4?`${e}%`:`${Math.abs(e)} W`},title:{formatter(e,t){return e===y?t.series[1][t.dataPointIndex]<0?`${e} charge:`:`${e} discharge:`:e===g?"Import Grid Power:":`${e}:`}}}}}}):r.jsx(k,{})})]})});b.displayName="HourlyChart";const D=s.memo(b);export{D as default}; diff --git a/web_viewer/public/assets/MonthlyChart-2LzxHQgP.js b/web_viewer/public/assets/MonthlyChart-2LzxHQgP.js new file mode 100644 index 0000000..3035224 --- /dev/null +++ b/web_viewer/public/assets/MonthlyChart-2LzxHQgP.js @@ -0,0 +1 @@ +import{r as e,j as g,L as C}from"./index-2Fv8VwMK.js";import{C as S}from"./react-apexcharts.min-Dwh-0CXz.js";import{r as n}from"./utils-bN4E_OZW.js";const a="Solar production",x=e.forwardRef((M,b)=>{const[c,d]=e.useState([]),[E,l]=e.useState(!1),h=e.useRef(!1),w=e.useMemo(()=>{const t=[],r=[],u=[],f=[],y=[],p=[];return c.forEach(s=>{const o=s[3];t.push({x:o,y:n(s[4])}),r.push({x:o,y:n(s[5])}),u.push({x:o,y:n(s[6])}),f.push({x:o,y:n(s[7])}),y.push({x:o,y:n(s[8])}),p.push({x:o,y:n(s[9])})}),[{name:a,data:t},{name:"Battery discharged",data:u},{name:"Battery charged",data:r},{name:"Export to grid",data:y},{name:"Import to user",data:f},{name:"Comsumption",data:p}]},[c]),i=e.useCallback(async()=>{if(h.current)return;h.current=!0;const r=await(await fetch("/monthly-chart")).json();d(r),h.current=!1},[d]);e.useImperativeHandle(b,()=>({fetchChart:i}));const m=e.useCallback(()=>{document.hidden||i()},[i]);return e.useEffect(()=>(i(),document.addEventListener("visibilitychange",m),()=>document.removeEventListener("visibilitychange",m)),[i,m]),e.useEffect(()=>{const t=window.matchMedia("(prefers-color-scheme: dark)");t.matches&&l(!0),t.addEventListener("change",r=>l(r.matches))},[]),c.length?g.jsx(S,{type:"bar",series:w,options:{chart:{toolbar:{show:!1},height:300,zoom:{allowMouseWheelZoom:!1}},colors:["rgb(112, 173, 70)","rgb(90, 155, 213)","rgb(64, 38, 198)","rgb(246, 104, 103)","rgb(153, 107, 31)","rgb(255, 164, 97)"],theme:{mode:E?"dark":"light"},dataLabels:{enabled:!1},xaxis:{type:"category"},tooltip:{x:{format:"dd/MM/yyyy"},y:{formatter(t){return`${t} kWh`}}},yaxis:[{seriesName:a,title:{text:"Energy (kWh)"}},{seriesName:a,show:!1},{seriesName:a,show:!1},{seriesName:a,show:!1},{seriesName:a,show:!1},{seriesName:a,show:!1}]}}):g.jsx(C,{})});x.displayName="MonthlyChart";const L=e.memo(x);export{L as default}; diff --git a/web_viewer/public/assets/MonthlyChart-CPAcdl1p.js b/web_viewer/public/assets/MonthlyChart-CPAcdl1p.js deleted file mode 100644 index 04d7024..0000000 --- a/web_viewer/public/assets/MonthlyChart-CPAcdl1p.js +++ /dev/null @@ -1 +0,0 @@ -import{r as e,j as y,L as w}from"./index-bn3fLlzU.js";import{C as S}from"./react-apexcharts.min-C1JzOHNX.js";import{r as n}from"./utils-bN4E_OZW.js";const a="Solar production",g=e.forwardRef((C,x)=>{const[h,d]=e.useState([]),[b,m]=e.useState(!1),i=e.useRef(!1),E=e.useMemo(()=>{const t=[],r=[],l=[],u=[],f=[],p=[];return h.forEach(s=>{const o=s[3];t.push({x:o,y:n(s[4])}),r.push({x:o,y:n(s[5])}),l.push({x:o,y:n(s[6])}),u.push({x:o,y:n(s[7])}),f.push({x:o,y:n(s[8])}),p.push({x:o,y:n(s[9])})}),[{name:a,data:t},{name:"Battery discharged",data:l},{name:"Battery charged",data:r},{name:"Export to grid",data:f},{name:"Import to user",data:u},{name:"Comsumption",data:p}]},[h]),c=e.useCallback(async()=>{if(i.current)return;i.current=!0;const r=await(await fetch("/monthly-chart")).json();d(r),i.current=!1},[d]);return e.useImperativeHandle(x,()=>({fetchChart:c})),e.useEffect(()=>{c(),document.addEventListener("visibilitychange",()=>{document.hidden||c()})},[c]),e.useEffect(()=>{const t=window.matchMedia("(prefers-color-scheme: dark)");t.matches&&m(!0),t.addEventListener("change",r=>m(r.matches))},[]),h.length?y.jsx(S,{type:"bar",series:E,options:{chart:{toolbar:{show:!1},height:300,zoom:{allowMouseWheelZoom:!1}},colors:["rgb(112, 173, 70)","rgb(90, 155, 213)","rgb(64, 38, 198)","rgb(246, 104, 103)","rgb(153, 107, 31)","rgb(255, 164, 97)"],theme:{mode:b?"dark":"light"},dataLabels:{enabled:!1},xaxis:{type:"category"},tooltip:{x:{format:"dd/MM/yyyy"},y:{formatter(t){return`${t} kWh`}}},yaxis:[{seriesName:a,title:{text:"Energy (kWh)"}},{seriesName:a,show:!1},{seriesName:a,show:!1},{seriesName:a,show:!1},{seriesName:a,show:!1},{seriesName:a,show:!1}]}}):y.jsx(w,{})});g.displayName="MonthlyChart";const j=e.memo(g);export{j as default}; diff --git a/web_viewer/public/assets/Summary-ocuEYfmg.js b/web_viewer/public/assets/Summary-DYwmrEyt.js similarity index 96% rename from web_viewer/public/assets/Summary-ocuEYfmg.js rename to web_viewer/public/assets/Summary-DYwmrEyt.js index 457b02f..863d03d 100644 --- a/web_viewer/public/assets/Summary-ocuEYfmg.js +++ b/web_viewer/public/assets/Summary-DYwmrEyt.js @@ -1 +1 @@ -import{r as t,j as e}from"./index-bn3fLlzU.js";import{G as d}from"./GeneralValue-DT878Cs6.js";import{C as _}from"./react-apexcharts.min-C1JzOHNX.js";import{f as m,r as y}from"./utils-bN4E_OZW.js";function N({total:i,ePVDay:r}){return e.jsxs("div",{className:"row justify-space-between align-center",children:[e.jsx("img",{src:"/assets/icon_solor_yielding.png"}),e.jsxs("div",{className:"yield-texts summary-item-content-texts ",children:[e.jsx(d,{value:r,unit:" kWh"}),e.jsx("div",{className:"description",children:"Yield today"}),i&&e.jsxs(e.Fragment,{children:[e.jsx(d,{value:i.pv.toFixed(1),unit:" kWh"}),e.jsx("div",{className:"description",children:"Total Yield"})]})]})]})}const w=t.memo(N);function k({totalYield:i,charge:r,gridExport:h,label:a}){const[j,l]=t.useState(!1);let s,x,c,n;return i?(s=i-r-h,x=m(s/i*100),c=m(r/i*100),n=m(h/i*100)):(s=0,x=0,c=0,n=0),t.useEffect(()=>{const u=window.matchMedia("(prefers-color-scheme: dark)");u.matches&&l(!0),u.addEventListener("change",o=>l(o.matches))},[]),e.jsxs("div",{className:"yield-chart row flex-1",children:[e.jsxs("div",{className:"texts col flex-1 align-start justify-space-between",children:[e.jsxs("div",{className:"yield-chart-load",children:[x,"% Load ",a]}),e.jsxs("div",{className:"yield-chart-charge",children:[c,"% Charge ",a]}),e.jsxs("div",{className:"yield-chart-export",children:[n,"% Export ",a]}),e.jsx("div",{className:"yield-chart-total",children:e.jsxs("strong",{children:[a," ",y(i)," kWh"]})})]}),e.jsx("div",{className:"chart row align-center",children:e.jsx(_,{type:"pie",series:[y(s),y(r),y(h)],options:{chart:{width:100,type:"pie"},colors:["#FF718F","#5CC9A0","#F2A474"],theme:{mode:j?"dark":"light"},labels:[`Load ${a} PV`,`Charge ${a} PV`,`Export ${a} PV`],legend:{show:!1}}})})]})}const f=t.memo(k);function C({invertData:i}){const[r,h]=t.useState(!1),[a,j]=t.useState(!1),l=t.useRef(!1),[s,x]=t.useState(),[c,n]=t.useState(0),u=t.useCallback(()=>{switch(c){case 0:n(1);break;case 1:n(2);break;default:n(0);break}},[c]),o=t.useCallback(async()=>{if(!l.current)try{console.log("Fetching total..."),l.current=!0;const v=await(await fetch("/total")).json();x(v)}catch(g){console.error("Fetch total error",g)}finally{l.current=!1}},[]),p=t.useCallback(()=>{document.hidden||o()},[o]);return t.useEffect(()=>(o(),document.addEventListener("visibilitychange",p),()=>{document.removeEventListener("visibilitychange",p)}),[o,p]),e.jsxs("div",{className:"summary row",children:[e.jsxs("div",{className:"yield summary-item flex-1 col",onClick:u,children:[e.jsx("div",{className:"summary-item-title",children:"Solar Yield"}),e.jsxs("div",{className:"summary-item-content col flex-1",children:[c===0&&e.jsx(w,{total:s,ePVDay:i.e_pv_day}),c===1&&e.jsx(f,{label:"Today",totalYield:i.e_pv_day,charge:i.e_chg_day,gridExport:i.e_to_grid_day}),c===2&&e.jsx(f,{label:"Total",totalYield:(s==null?void 0:s.pv)||0,charge:(s==null?void 0:s.battery_charged)||0,gridExport:(s==null?void 0:s.grid_export)||0})]})]}),e.jsxs("div",{className:"battery summary-item flex-1",onClick:()=>h(!r),children:[e.jsx("div",{className:"summary-item-title",children:r?"Battery Charged":"Battery Discharge"}),e.jsx("div",{className:"summary-item-content",children:e.jsxs("div",{className:"row justify-space-between align-center",children:[e.jsx("img",{src:"/assets/icon_battery_discharging.png"}),e.jsxs("div",{className:"summary-item-content-texts",children:[e.jsx(d,{value:r?i.e_chg_day:i.e_dischg_day,unit:" kWh"}),e.jsx("div",{className:"description",children:r?"Charged today":"Discharged today"}),s&&e.jsxs(e.Fragment,{children:[e.jsx(d,{value:m(r?s.battery_charged:s.battery_discharged),unit:" kWh"}),e.jsxs("div",{className:"description",children:["Total ",r?"Charged":"Discharged"]})]})]})]})})]}),e.jsxs("div",{className:"feed summary-item flex-1",onClick:()=>j(!a),children:[e.jsx("div",{className:"summary-item-title ",children:a?"Feed-in Energy":"Import"}),e.jsx("div",{className:"summary-item-content",children:e.jsxs("div",{className:"row justify-space-between align-center",children:[e.jsx("img",{src:a?"/assets/icon_feed_in_energy.png":"/assets/icon_import.png"}),e.jsx("div",{className:"feed-texts summary-item-content-texts",children:e.jsxs("div",{className:"col",children:[e.jsx(d,{value:a?i.e_to_grid_day:i.e_to_user_day,unit:" kWh"}),e.jsx("div",{className:"description",children:a?"Today Export":"Today Import"}),s&&e.jsxs(e.Fragment,{children:[e.jsx(d,{value:m(a?s.grid_export:s.grid_import),unit:" kWh"}),e.jsxs("div",{className:"description",children:["Total ",a?"Export":"Import"]})]})]})})]})})]}),e.jsxs("div",{className:"comsumption summary-item flex-1",children:[e.jsx("div",{className:"summary-item-title ",children:"Comsumption"}),e.jsx("div",{className:"summary-item-content",children:e.jsxs("div",{className:"row justify-space-between align-center",children:[e.jsx("img",{src:"/assets/icon_consumption.png"}),e.jsxs("div",{className:"feed-texts summary-item-content-texts",children:[e.jsx(d,{value:(i.e_inv_day+i.e_to_user_day+i.e_eps_day-i.e_rec_day).toFixed(1),unit:" kWh"}),e.jsx("div",{className:"description",children:"Today Used"}),s&&e.jsxs(e.Fragment,{children:[e.jsx(d,{value:m(s.consumption),unit:" kWh"}),e.jsx("div",{className:"description",children:"Total Used"})]})]})]})})]})]})}const T=t.memo(C);export{T as default}; +import{r as t,j as e}from"./index-2Fv8VwMK.js";import{G as d}from"./GeneralValue-TQNWFOiV.js";import{C as _}from"./react-apexcharts.min-Dwh-0CXz.js";import{f as m,r as y}from"./utils-bN4E_OZW.js";function N({total:i,ePVDay:r}){return e.jsxs("div",{className:"row justify-space-between align-center",children:[e.jsx("img",{src:"/assets/icon_solor_yielding.png"}),e.jsxs("div",{className:"yield-texts summary-item-content-texts ",children:[e.jsx(d,{value:r,unit:" kWh"}),e.jsx("div",{className:"description",children:"Yield today"}),i&&e.jsxs(e.Fragment,{children:[e.jsx(d,{value:i.pv.toFixed(1),unit:" kWh"}),e.jsx("div",{className:"description",children:"Total Yield"})]})]})]})}const w=t.memo(N);function k({totalYield:i,charge:r,gridExport:h,label:a}){const[j,l]=t.useState(!1);let s,x,c,n;return i?(s=i-r-h,x=m(s/i*100),c=m(r/i*100),n=m(h/i*100)):(s=0,x=0,c=0,n=0),t.useEffect(()=>{const u=window.matchMedia("(prefers-color-scheme: dark)");u.matches&&l(!0),u.addEventListener("change",o=>l(o.matches))},[]),e.jsxs("div",{className:"yield-chart row flex-1",children:[e.jsxs("div",{className:"texts col flex-1 align-start justify-space-between",children:[e.jsxs("div",{className:"yield-chart-load",children:[x,"% Load ",a]}),e.jsxs("div",{className:"yield-chart-charge",children:[c,"% Charge ",a]}),e.jsxs("div",{className:"yield-chart-export",children:[n,"% Export ",a]}),e.jsx("div",{className:"yield-chart-total",children:e.jsxs("strong",{children:[a," ",y(i)," kWh"]})})]}),e.jsx("div",{className:"chart row align-center",children:e.jsx(_,{type:"pie",series:[y(s),y(r),y(h)],options:{chart:{width:100,type:"pie"},colors:["#FF718F","#5CC9A0","#F2A474"],theme:{mode:j?"dark":"light"},labels:[`Load ${a} PV`,`Charge ${a} PV`,`Export ${a} PV`],legend:{show:!1}}})})]})}const f=t.memo(k);function C({invertData:i}){const[r,h]=t.useState(!1),[a,j]=t.useState(!1),l=t.useRef(!1),[s,x]=t.useState(),[c,n]=t.useState(0),u=t.useCallback(()=>{switch(c){case 0:n(1);break;case 1:n(2);break;default:n(0);break}},[c]),o=t.useCallback(async()=>{if(!l.current)try{console.log("Fetching total..."),l.current=!0;const v=await(await fetch("/total")).json();x(v)}catch(g){console.error("Fetch total error",g)}finally{l.current=!1}},[]),p=t.useCallback(()=>{document.hidden||o()},[o]);return t.useEffect(()=>(o(),document.addEventListener("visibilitychange",p),()=>{document.removeEventListener("visibilitychange",p)}),[o,p]),e.jsxs("div",{className:"summary row",children:[e.jsxs("div",{className:"yield summary-item flex-1 col",onClick:u,children:[e.jsx("div",{className:"summary-item-title",children:"Solar Yield"}),e.jsxs("div",{className:"summary-item-content col flex-1",children:[c===0&&e.jsx(w,{total:s,ePVDay:i.e_pv_day}),c===1&&e.jsx(f,{label:"Today",totalYield:i.e_pv_day,charge:i.e_chg_day,gridExport:i.e_to_grid_day}),c===2&&e.jsx(f,{label:"Total",totalYield:(s==null?void 0:s.pv)||0,charge:(s==null?void 0:s.battery_charged)||0,gridExport:(s==null?void 0:s.grid_export)||0})]})]}),e.jsxs("div",{className:"battery summary-item flex-1",onClick:()=>h(!r),children:[e.jsx("div",{className:"summary-item-title",children:r?"Battery Charged":"Battery Discharge"}),e.jsx("div",{className:"summary-item-content",children:e.jsxs("div",{className:"row justify-space-between align-center",children:[e.jsx("img",{src:"/assets/icon_battery_discharging.png"}),e.jsxs("div",{className:"summary-item-content-texts",children:[e.jsx(d,{value:r?i.e_chg_day:i.e_dischg_day,unit:" kWh"}),e.jsx("div",{className:"description",children:r?"Charged today":"Discharged today"}),s&&e.jsxs(e.Fragment,{children:[e.jsx(d,{value:m(r?s.battery_charged:s.battery_discharged),unit:" kWh"}),e.jsxs("div",{className:"description",children:["Total ",r?"Charged":"Discharged"]})]})]})]})})]}),e.jsxs("div",{className:"feed summary-item flex-1",onClick:()=>j(!a),children:[e.jsx("div",{className:"summary-item-title ",children:a?"Feed-in Energy":"Import"}),e.jsx("div",{className:"summary-item-content",children:e.jsxs("div",{className:"row justify-space-between align-center",children:[e.jsx("img",{src:a?"/assets/icon_feed_in_energy.png":"/assets/icon_import.png"}),e.jsx("div",{className:"feed-texts summary-item-content-texts",children:e.jsxs("div",{className:"col",children:[e.jsx(d,{value:a?i.e_to_grid_day:i.e_to_user_day,unit:" kWh"}),e.jsx("div",{className:"description",children:a?"Today Export":"Today Import"}),s&&e.jsxs(e.Fragment,{children:[e.jsx(d,{value:m(a?s.grid_export:s.grid_import),unit:" kWh"}),e.jsxs("div",{className:"description",children:["Total ",a?"Export":"Import"]})]})]})})]})})]}),e.jsxs("div",{className:"comsumption summary-item flex-1",children:[e.jsx("div",{className:"summary-item-title ",children:"Comsumption"}),e.jsx("div",{className:"summary-item-content",children:e.jsxs("div",{className:"row justify-space-between align-center",children:[e.jsx("img",{src:"/assets/icon_consumption.png"}),e.jsxs("div",{className:"feed-texts summary-item-content-texts",children:[e.jsx(d,{value:(i.e_inv_day+i.e_to_user_day+i.e_eps_day-i.e_rec_day).toFixed(1),unit:" kWh"}),e.jsx("div",{className:"description",children:"Today Used"}),s&&e.jsxs(e.Fragment,{children:[e.jsx(d,{value:m(s.consumption),unit:" kWh"}),e.jsx("div",{className:"description",children:"Total Used"})]})]})]})})]})]})}const T=t.memo(C);export{T as default}; diff --git a/web_viewer/public/assets/SystemInformation-BQMVNzph.js b/web_viewer/public/assets/SystemInformation-OlKfNYSc.js similarity index 97% rename from web_viewer/public/assets/SystemInformation-BQMVNzph.js rename to web_viewer/public/assets/SystemInformation-OlKfNYSc.js index d729f8a..671aef2 100644 --- a/web_viewer/public/assets/SystemInformation-BQMVNzph.js +++ b/web_viewer/public/assets/SystemInformation-OlKfNYSc.js @@ -1 +1 @@ -import{j as s}from"./index-bn3fLlzU.js";import{G as c}from"./GeneralValue-DT878Cs6.js";function x({label:l,pValue:a,vValue:i}){return s.jsxs("div",{className:"power-item row",children:[s.jsx("div",{className:"power-title flex-1",children:l}),s.jsxs("div",{className:"power-value flex-1",children:[s.jsx("strong",{children:a})," W"]}),i!==void 0?s.jsxs("div",{className:"power-value flex-1",children:[s.jsx("strong",{children:i})," V"]}):s.jsx("span",{className:"power-value flex-1"})]})}function r({inverterData:l,isSocketConnected:a}){return s.jsxs("div",{className:"pv flex-1",children:[s.jsxs("div",{className:"icon col align-center",children:[s.jsxs("div",{className:"col align-center",children:[s.jsx(c,{className:"show-small",value:a?l.p_pv:0,unit:" W"}),s.jsx("img",{src:"/assets/icon_solor_yielding.png"})]}),s.jsx("div",{className:`y-arrow ${l.p_pv==0||!a?"none":""}`})]}),s.jsxs("div",{className:"pv-texts power flex-1",children:[s.jsx(x,{label:"PV1",pValue:a?l.p_pv_1:0,vValue:a?l.v_pv_1:0}),s.jsx(x,{label:"PV2",pValue:a?l.p_pv_2:0,vValue:a?l.v_pv_2:0}),s.jsx(x,{label:"Total PV",pValue:a?l.p_pv:0})]})]})}function n({inverterData:l,isSocketConnected:a}){return s.jsx("div",{className:"battery flex-1",children:s.jsxs("div",{className:"row align-center",children:[s.jsxs("div",{className:"battery-texts",children:[s.jsx(c,{value:a?l.p_discharge||l.p_charge:0,unit:" W"}),s.jsx(c,{value:a?l.soc:0,unit:"%"}),s.jsx(c,{value:a?l.v_bat:0,unit:" Vdc"})]}),s.jsxs("div",{className:"col align-center",children:[s.jsx(c,{className:"show-small",value:a?l.p_discharge||l.p_charge:0,unit:" W"}),s.jsx("img",{className:"battery-icon",src:`/assets/icon_battery_${a?Math.round(l.soc/2/10):0}_green.png`}),s.jsx(c,{className:"show-small",value:a?l.soc:0,unit:"%"}),s.jsx(c,{className:"show-small",value:a?l.v_bat:0,unit:" Vdc"})]}),s.jsx("div",{className:"arrows row",children:Array.from({length:2}).map((i,e)=>s.jsx("div",{className:`x-arrow ${a?l.p_discharge>0?"right":l.p_charge>0?"left":"none":"none"}`},"batter-arrow-"+e))})]})})}function d({inverterData:l,isSocketConnected:a}){return s.jsx("div",{className:"inverter flex-1",children:s.jsxs("div",{className:"row align-center",children:[s.jsx("img",{src:"/assets/inverter_off_grid_20231003.png"}),s.jsx("div",{className:"flex-1 arrows row justify-flex-end",children:Array.from({length:4}).map((i,e)=>s.jsx("div",{className:`x-arrow ${a?l.p_inv>0?"right":l.p_rec>0?"left":"none":"none"}`},"inverter-arrow-"+e))})]})})}function j({inverterData:l,isSocketConnected:a}){return s.jsxs("div",{className:"grid flex-1 row align-center justify-flex-end",children:[s.jsx("div",{className:"row arrows",children:Array.from({length:2}).map((i,e)=>s.jsx("div",{className:`x-arrow ${a?l.p_to_grid>0?"right":l.p_to_user>0?"left":"none":"none"}`},"grid-arrow-"+e))}),s.jsxs("div",{className:"col align-center",children:[s.jsx(c,{className:"show-small",value:a?l.p_to_user||l.p_to_grid:0,unit:" W"}),s.jsx("img",{src:"/assets/icon_grid.png"}),s.jsx(c,{className:"show-small",value:a?(l.vacr||l.vacs||l.vact)/10:0,unit:" Vac"}),s.jsx(c,{className:"show-small",value:a?l.fac/100:0,unit:" Hz"})]}),s.jsxs("div",{className:"grid-texts",children:[s.jsx(c,{value:a?l.p_to_user||l.p_to_grid:0,unit:" W"}),s.jsx(c,{value:a?(l.vacr||l.vacs||l.vact)/10:0,unit:" Vac"}),s.jsx(c,{value:a?l.fac/100:0,unit:" Hz"})]})]})}function o({inverterData:l,isSocketConnected:a}){const i=l.p_inv+l.p_to_user-l.p_rec;return s.jsx("div",{className:"consumption flex-1",children:s.jsxs("div",{className:"row",children:[s.jsxs("div",{className:"col align-center consumption-icon",children:[s.jsx("div",{className:"arrows col",children:Array.from({length:2}).map((e,m)=>s.jsx("div",{className:`y-arrow ${a&&i>0?"down":"none"}`},"comsumption-arrow-"+m))}),s.jsx("img",{src:"/assets/icon_consumption.png"}),s.jsx(c,{className:"show-small",value:a?i:0,unit:" W"})]}),s.jsxs("div",{className:"consumption-texts",children:[s.jsx(c,{value:a?i:0,unit:" W"}),s.jsx("div",{className:"description",children:"Consumption Power"})]})]})})}function u({inverterData:l,isSocketConnected:a}){return s.jsx("div",{className:"eps flex-1",children:s.jsxs("div",{className:"row",children:[s.jsxs("div",{className:"col align-center",children:[s.jsx("div",{className:`y-arrow ${a&&l.p_eps>0?"down":"none"}`}),s.jsx("img",{src:"/assets/icon_eps.png"}),l.p_eps===0?s.jsx("strong",{className:"show-small eps-status",children:"Standby"}):s.jsx(c,{className:"show-small",value:a?l.p_eps:0,unit:" W"})]}),s.jsxs("div",{className:"eps-texts",children:[l.p_eps===0?s.jsx("strong",{className:"eps-status",children:"Standby"}):s.jsx(c,{value:l.p_eps,unit:" W"}),s.jsx("div",{className:"description",children:"Backup Power(EPS)"})]})]})})}function N({inverterData:l,isSocketConnected:a,onReconnect:i}){return s.jsxs("div",{className:"card system-information",children:[s.jsxs("div",{className:"system-title",children:[s.jsx("span",{className:"system-title-text",children:"System Information"}),s.jsx("span",{children:l.deviceTime})]}),s.jsxs("div",{className:"system-graph",children:[s.jsxs("div",{className:"system-status row",children:[s.jsxs("div",{className:"system-status-display",title:l.status_text,children:[s.jsx("div",{className:`system-status-icon ${a?l.status!==0?"normal":"fault":"offline"}`}),s.jsx("div",{children:a?l.status!==0?"Normal":"Fault":"Offline"})]}),s.jsx("button",{className:"system-status-reconnect",onClick:i,title:"Reconnect to socket server",disabled:a,children:"Reconnect"})]}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"flex-1"}),s.jsx(r,{inverterData:l,isSocketConnected:a}),s.jsx("div",{className:"flex-1"})]}),s.jsxs("div",{className:"row",children:[s.jsx(n,{inverterData:l,isSocketConnected:a}),s.jsx(d,{inverterData:l,isSocketConnected:a}),s.jsx(j,{inverterData:l,isSocketConnected:a})]}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"flex-1"}),s.jsx(u,{inverterData:l,isSocketConnected:a}),s.jsx(o,{inverterData:l,isSocketConnected:a})]})]})]})}export{N as default}; +import{j as s}from"./index-2Fv8VwMK.js";import{G as c}from"./GeneralValue-TQNWFOiV.js";function x({label:l,pValue:a,vValue:i}){return s.jsxs("div",{className:"power-item row",children:[s.jsx("div",{className:"power-title flex-1",children:l}),s.jsxs("div",{className:"power-value flex-1",children:[s.jsx("strong",{children:a})," W"]}),i!==void 0?s.jsxs("div",{className:"power-value flex-1",children:[s.jsx("strong",{children:i})," V"]}):s.jsx("span",{className:"power-value flex-1"})]})}function r({inverterData:l,isSocketConnected:a}){return s.jsxs("div",{className:"pv flex-1",children:[s.jsxs("div",{className:"icon col align-center",children:[s.jsxs("div",{className:"col align-center",children:[s.jsx(c,{className:"show-small",value:a?l.p_pv:0,unit:" W"}),s.jsx("img",{src:"/assets/icon_solor_yielding.png"})]}),s.jsx("div",{className:`y-arrow ${l.p_pv==0||!a?"none":""}`})]}),s.jsxs("div",{className:"pv-texts power flex-1",children:[s.jsx(x,{label:"PV1",pValue:a?l.p_pv_1:0,vValue:a?l.v_pv_1:0}),s.jsx(x,{label:"PV2",pValue:a?l.p_pv_2:0,vValue:a?l.v_pv_2:0}),s.jsx(x,{label:"Total PV",pValue:a?l.p_pv:0})]})]})}function n({inverterData:l,isSocketConnected:a}){return s.jsx("div",{className:"battery flex-1",children:s.jsxs("div",{className:"row align-center",children:[s.jsxs("div",{className:"battery-texts",children:[s.jsx(c,{value:a?l.p_discharge||l.p_charge:0,unit:" W"}),s.jsx(c,{value:a?l.soc:0,unit:"%"}),s.jsx(c,{value:a?l.v_bat:0,unit:" Vdc"})]}),s.jsxs("div",{className:"col align-center",children:[s.jsx(c,{className:"show-small",value:a?l.p_discharge||l.p_charge:0,unit:" W"}),s.jsx("img",{className:"battery-icon",src:`/assets/icon_battery_${a?Math.round(l.soc/2/10):0}_green.png`}),s.jsx(c,{className:"show-small",value:a?l.soc:0,unit:"%"}),s.jsx(c,{className:"show-small",value:a?l.v_bat:0,unit:" Vdc"})]}),s.jsx("div",{className:"arrows row",children:Array.from({length:2}).map((i,e)=>s.jsx("div",{className:`x-arrow ${a?l.p_discharge>0?"right":l.p_charge>0?"left":"none":"none"}`},"batter-arrow-"+e))})]})})}function d({inverterData:l,isSocketConnected:a}){return s.jsx("div",{className:"inverter flex-1",children:s.jsxs("div",{className:"row align-center",children:[s.jsx("img",{src:"/assets/inverter_off_grid_20231003.png"}),s.jsx("div",{className:"flex-1 arrows row justify-flex-end",children:Array.from({length:4}).map((i,e)=>s.jsx("div",{className:`x-arrow ${a?l.p_inv>0?"right":l.p_rec>0?"left":"none":"none"}`},"inverter-arrow-"+e))})]})})}function j({inverterData:l,isSocketConnected:a}){return s.jsxs("div",{className:"grid flex-1 row align-center justify-flex-end",children:[s.jsx("div",{className:"row arrows",children:Array.from({length:2}).map((i,e)=>s.jsx("div",{className:`x-arrow ${a?l.p_to_grid>0?"right":l.p_to_user>0?"left":"none":"none"}`},"grid-arrow-"+e))}),s.jsxs("div",{className:"col align-center",children:[s.jsx(c,{className:"show-small",value:a?l.p_to_user||l.p_to_grid:0,unit:" W"}),s.jsx("img",{src:"/assets/icon_grid.png"}),s.jsx(c,{className:"show-small",value:a?(l.vacr||l.vacs||l.vact)/10:0,unit:" Vac"}),s.jsx(c,{className:"show-small",value:a?l.fac/100:0,unit:" Hz"})]}),s.jsxs("div",{className:"grid-texts",children:[s.jsx(c,{value:a?l.p_to_user||l.p_to_grid:0,unit:" W"}),s.jsx(c,{value:a?(l.vacr||l.vacs||l.vact)/10:0,unit:" Vac"}),s.jsx(c,{value:a?l.fac/100:0,unit:" Hz"})]})]})}function o({inverterData:l,isSocketConnected:a}){const i=l.p_inv+l.p_to_user-l.p_rec;return s.jsx("div",{className:"consumption flex-1",children:s.jsxs("div",{className:"row",children:[s.jsxs("div",{className:"col align-center consumption-icon",children:[s.jsx("div",{className:"arrows col",children:Array.from({length:2}).map((e,m)=>s.jsx("div",{className:`y-arrow ${a&&i>0?"down":"none"}`},"comsumption-arrow-"+m))}),s.jsx("img",{src:"/assets/icon_consumption.png"}),s.jsx(c,{className:"show-small",value:a?i:0,unit:" W"})]}),s.jsxs("div",{className:"consumption-texts",children:[s.jsx(c,{value:a?i:0,unit:" W"}),s.jsx("div",{className:"description",children:"Consumption Power"})]})]})})}function u({inverterData:l,isSocketConnected:a}){return s.jsx("div",{className:"eps flex-1",children:s.jsxs("div",{className:"row",children:[s.jsxs("div",{className:"col align-center",children:[s.jsx("div",{className:`y-arrow ${a&&l.p_eps>0?"down":"none"}`}),s.jsx("img",{src:"/assets/icon_eps.png"}),l.p_eps===0?s.jsx("strong",{className:"show-small eps-status",children:"Standby"}):s.jsx(c,{className:"show-small",value:a?l.p_eps:0,unit:" W"})]}),s.jsxs("div",{className:"eps-texts",children:[l.p_eps===0?s.jsx("strong",{className:"eps-status",children:"Standby"}):s.jsx(c,{value:l.p_eps,unit:" W"}),s.jsx("div",{className:"description",children:"Backup Power(EPS)"})]})]})})}function N({inverterData:l,isSocketConnected:a,onReconnect:i}){return s.jsxs("div",{className:"card system-information",children:[s.jsxs("div",{className:"system-title",children:[s.jsx("span",{className:"system-title-text",children:"System Information"}),s.jsx("span",{children:l.deviceTime})]}),s.jsxs("div",{className:"system-graph",children:[s.jsxs("div",{className:"system-status row",children:[s.jsxs("div",{className:"system-status-display",title:l.status_text,children:[s.jsx("div",{className:`system-status-icon ${a?l.status!==0?"normal":"fault":"offline"}`}),s.jsx("div",{children:a?l.status!==0?"Normal":"Fault":"Offline"})]}),s.jsx("button",{className:"system-status-reconnect",onClick:i,title:"Reconnect to socket server",disabled:a,children:"Reconnect"})]}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"flex-1"}),s.jsx(r,{inverterData:l,isSocketConnected:a}),s.jsx("div",{className:"flex-1"})]}),s.jsxs("div",{className:"row",children:[s.jsx(n,{inverterData:l,isSocketConnected:a}),s.jsx(d,{inverterData:l,isSocketConnected:a}),s.jsx(j,{inverterData:l,isSocketConnected:a})]}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"flex-1"}),s.jsx(u,{inverterData:l,isSocketConnected:a}),s.jsx(o,{inverterData:l,isSocketConnected:a})]})]})]})}export{N as default}; diff --git a/web_viewer/public/assets/YearlyChart-D_atEBNd.js b/web_viewer/public/assets/YearlyChart-D_atEBNd.js new file mode 100644 index 0000000..d7cff82 --- /dev/null +++ b/web_viewer/public/assets/YearlyChart-D_atEBNd.js @@ -0,0 +1 @@ +import{r as e,j as g,L as C}from"./index-2Fv8VwMK.js";import{C as S}from"./react-apexcharts.min-Dwh-0CXz.js";import{r as n}from"./utils-bN4E_OZW.js";const a="Solar production",x=e.forwardRef((k,b)=>{const[c,l]=e.useState([]),[E,m]=e.useState(!1),h=e.useRef(!1),w=e.useMemo(()=>{const t=[],r=[],u=[],f=[],y=[],p=[];return c.forEach(s=>{const o=s[3];t.push({x:o,y:n(s[4])}),r.push({x:o,y:n(s[5])}),u.push({x:o,y:n(s[6])}),f.push({x:o,y:n(s[7])}),y.push({x:o,y:n(s[8])}),p.push({x:o,y:n(s[9])})}),[{name:a,data:t},{name:"Battery discharged",data:u},{name:"Battery charged",data:r},{name:"Export to grid",data:y},{name:"Import to user",data:f},{name:"Comsumption",data:p}]},[c]),i=e.useCallback(async()=>{if(h.current)return;h.current=!0;const r=await(await fetch("/yearly-chart")).json();l(r),h.current=!1},[l]);e.useImperativeHandle(b,()=>({fetchChart:i}));const d=e.useCallback(()=>{document.hidden||i()},[i]);return e.useEffect(()=>(i(),document.addEventListener("visibilitychange",d),()=>document.removeEventListener("visibilitychange",d)),[i,d]),e.useEffect(()=>{const t=window.matchMedia("(prefers-color-scheme: dark)");t.matches&&m(!0),t.addEventListener("change",r=>m(r.matches))},[]),c.length?g.jsx(S,{type:"bar",series:w,options:{chart:{toolbar:{show:!1},height:300,zoom:{allowMouseWheelZoom:!1}},colors:["rgb(112, 173, 70)","rgb(90, 155, 213)","rgb(64, 38, 198)","rgb(246, 104, 103)","rgb(153, 107, 31)","rgb(255, 164, 97)"],theme:{mode:E?"dark":"light"},dataLabels:{enabled:!1},xaxis:{type:"category"},tooltip:{x:{format:"dd/MM/yyyy"},y:{formatter(t){return`${t} kWh`}}},yaxis:[{seriesName:a,title:{text:"Energy (kWh)"}},{seriesName:a,show:!1},{seriesName:a,show:!1},{seriesName:a,show:!1},{seriesName:a,show:!1},{seriesName:a,show:!1}]}}):g.jsx(C,{})});x.displayName="YearlyChart";const j=e.memo(x);export{j as default}; diff --git a/web_viewer/public/assets/YearlyChart-DzuPyxxb.js b/web_viewer/public/assets/YearlyChart-DzuPyxxb.js deleted file mode 100644 index 59769b2..0000000 --- a/web_viewer/public/assets/YearlyChart-DzuPyxxb.js +++ /dev/null @@ -1 +0,0 @@ -import{r as e,j as p,L as w}from"./index-bn3fLlzU.js";import{C as S}from"./react-apexcharts.min-C1JzOHNX.js";import{r as n}from"./utils-bN4E_OZW.js";const t="Solar production",g=e.forwardRef((C,x)=>{const[i,d]=e.useState([]),[b,m]=e.useState(!1),h=e.useRef(!1),E=e.useMemo(()=>{const a=[],r=[],l=[],u=[],f=[],y=[];return i.forEach(s=>{const o=s[3];a.push({x:o,y:n(s[4])}),r.push({x:o,y:n(s[5])}),l.push({x:o,y:n(s[6])}),u.push({x:o,y:n(s[7])}),f.push({x:o,y:n(s[8])}),y.push({x:o,y:n(s[9])})}),[{name:t,data:a},{name:"Battery discharged",data:l},{name:"Battery charged",data:r},{name:"Export to grid",data:f},{name:"Import to user",data:u},{name:"Comsumption",data:y}]},[i]),c=e.useCallback(async()=>{if(h.current)return;h.current=!0;const r=await(await fetch("/yearly-chart")).json();d(r),h.current=!1},[d]);return e.useImperativeHandle(x,()=>({fetchChart:c})),e.useEffect(()=>{c(),document.addEventListener("visibilitychange",()=>{document.hidden||c()})},[c]),e.useEffect(()=>{const a=window.matchMedia("(prefers-color-scheme: dark)");a.matches&&m(!0),a.addEventListener("change",r=>m(r.matches))},[]),i.length?p.jsx(S,{type:"bar",series:E,options:{chart:{toolbar:{show:!1},height:300,zoom:{allowMouseWheelZoom:!1}},colors:["rgb(112, 173, 70)","rgb(90, 155, 213)","rgb(64, 38, 198)","rgb(246, 104, 103)","rgb(153, 107, 31)","rgb(255, 164, 97)"],theme:{mode:b?"dark":"light"},dataLabels:{enabled:!1},xaxis:{type:"category"},tooltip:{x:{format:"dd/MM/yyyy"},y:{formatter(a){return`${a} kWh`}}},yaxis:[{seriesName:t,title:{text:"Energy (kWh)"}},{seriesName:t,show:!1},{seriesName:t,show:!1},{seriesName:t,show:!1},{seriesName:t,show:!1},{seriesName:t,show:!1}]}}):p.jsx(w,{})});g.displayName="YearlyChart";const L=e.memo(g);export{L as default}; diff --git a/web_viewer/public/assets/index-bn3fLlzU.js b/web_viewer/public/assets/index-2Fv8VwMK.js similarity index 99% rename from web_viewer/public/assets/index-bn3fLlzU.js rename to web_viewer/public/assets/index-2Fv8VwMK.js index 19391c3..3ba1c53 100644 --- a/web_viewer/public/assets/index-bn3fLlzU.js +++ b/web_viewer/public/assets/index-2Fv8VwMK.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SystemInformation-BQMVNzph.js","assets/GeneralValue-DT878Cs6.js","assets/GeneralValue-DiLAPUcD.css","assets/SystemInformation-B8mjftsy.css","assets/Summary-ocuEYfmg.js","assets/react-apexcharts.min-C1JzOHNX.js","assets/utils-bN4E_OZW.js","assets/Summary-DuTTGZvm.css","assets/HourlyChart-BTS1liN6.js","assets/HourlyChart-Djd6IT3E.css","assets/EnergyChart-yyp8EL_K.js","assets/EnergyChart-BBdkGZEO.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SystemInformation-OlKfNYSc.js","assets/GeneralValue-TQNWFOiV.js","assets/GeneralValue-DiLAPUcD.css","assets/SystemInformation-B8mjftsy.css","assets/Summary-DYwmrEyt.js","assets/react-apexcharts.min-Dwh-0CXz.js","assets/utils-bN4E_OZW.js","assets/Summary-DuTTGZvm.css","assets/HourlyChart-D1hNPe7p.js","assets/HourlyChart-Djd6IT3E.css","assets/EnergyChart-CqgWYZ6D.js","assets/EnergyChart-BBdkGZEO.css"])))=>i.map(i=>d[i]); (function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function t(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=t(l);fetch(l.href,o)}})();var Ki={exports:{}},el={},Yi={exports:{}},L={};/** * @license React * react.production.min.js @@ -38,4 +38,4 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SystemInformati `+l[u].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=u&&0<=i);break}}}finally{El=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?gt(e):""}function Ic(e){switch(e.tag){case 5:return gt(e.type);case 16:return gt("Lazy");case 13:return gt("Suspense");case 19:return gt("SuspenseList");case 0:case 2:case 15:return e=_l(e.type,!1),e;case 11:return e=_l(e.type.render,!1),e;case 1:return e=_l(e.type,!0),e;default:return""}}function Jl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Mn:return"Fragment";case jn:return"Portal";case Xl:return"Profiler";case Yo:return"StrictMode";case Gl:return"Suspense";case Zl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ss:return(e.displayName||"Context")+".Consumer";case is:return(e._context.displayName||"Context")+".Provider";case Xo:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Go:return n=e.displayName||null,n!==null?n:Jl(e.type)||"Memo";case Je:n=e._payload,e=e._init;try{return Jl(e(n))}catch{}}return null}function jc(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Jl(n);case 8:return n===Yo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function dn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function cs(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Mc(e){var n=cs(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var l=t.get,o=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(u){r=""+u,o.call(this,u)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function rr(e){e._valueTracker||(e._valueTracker=Mc(e))}function fs(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=cs(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function Tr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ql(e,n){var t=n.checked;return V({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function Vu(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=dn(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function ds(e,n){n=n.checked,n!=null&&Ko(e,"checked",n,!1)}function bl(e,n){ds(e,n);var t=dn(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?eo(e,n.type,t):n.hasOwnProperty("defaultValue")&&eo(e,n.type,dn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Bu(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function eo(e,n,t){(n!=="number"||Tr(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var wt=Array.isArray;function Kn(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l"+n.valueOf().toString()+"",n=lr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Ot(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var Et={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Dc=["Webkit","ms","Moz","O"];Object.keys(Et).forEach(function(e){Dc.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Et[n]=Et[e]})});function vs(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||Et.hasOwnProperty(e)&&Et[e]?(""+n).trim():n+"px"}function ys(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,l=vs(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}var Fc=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ro(e,n){if(n){if(Fc[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(y(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(y(61))}if(n.style!=null&&typeof n.style!="object")throw Error(y(62))}}function lo(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var oo=null;function Zo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var uo=null,Yn=null,Xn=null;function Qu(e){if(e=Jt(e)){if(typeof uo!="function")throw Error(y(280));var n=e.stateNode;n&&(n=ol(n),uo(e.stateNode,e.type,n))}}function gs(e){Yn?Xn?Xn.push(e):Xn=[e]:Yn=e}function ws(){if(Yn){var e=Yn,n=Xn;if(Xn=Yn=null,Qu(e),n)for(e=0;e>>=0,e===0?32:31-(Xc(e)/Gc|0)|0}var or=64,ur=4194304;function St(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function jr(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,u=t&268435455;if(u!==0){var i=u&~l;i!==0?r=St(i):(o&=u,o!==0&&(r=St(o)))}else u=t&~l,u!==0?r=St(u):o!==0&&(r=St(o));if(r===0)return 0;if(n!==0&&n!==r&&!(n&l)&&(l=r&-r,o=n&-n,l>=o||l===16&&(o&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function Gt(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Oe(n),e[n]=t}function bc(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Ct),ei=" ",ni=!1;function $s(e,n){switch(e){case"keyup":return zf.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function As(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dn=!1;function Tf(e,n){switch(e){case"compositionend":return As(n);case"keypress":return n.which!==32?null:(ni=!0,ei);case"textInput":return e=n.data,e===ei&&ni?null:e;default:return null}}function Rf(e,n){if(Dn)return e==="compositionend"||!lu&&$s(e,n)?(e=Fs(),kr=nu=nn=null,Dn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=oi(t)}}function Ws(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Ws(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Qs(){for(var e=window,n=Tr();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=Tr(e.document)}return n}function ou(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Af(e){var n=Qs(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Ws(t.ownerDocument.documentElement,t)){if(r!==null&&ou(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var l=t.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=ui(t,o);var u=ui(t,r);l&&u&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(n=n.createRange(),n.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(n),e.extend(u.node,u.offset)):(n.setEnd(u.node,u.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Fn=null,po=null,Nt=null,mo=!1;function ii(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;mo||Fn==null||Fn!==Tr(r)||(r=Fn,"selectionStart"in r&&ou(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nt&&Ut(Nt,r)||(Nt=r,r=Fr(po,"onSelect"),0An||(e.current=So[An],So[An]=null,An--)}function j(e,n){An++,So[An]=e.current,e.current=n}var pn={},oe=hn(pn),de=hn(!1),Nn=pn;function bn(e,n){var t=e.type.contextTypes;if(!t)return pn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in t)l[o]=n[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=l),l}function pe(e){return e=e.childContextTypes,e!=null}function $r(){D(de),D(oe)}function mi(e,n,t){if(oe.current!==pn)throw Error(y(168));j(oe,n),j(de,t)}function ea(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var l in r)if(!(l in n))throw Error(y(108,jc(e)||"Unknown",l));return V({},t,r)}function Ar(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pn,Nn=oe.current,j(oe,e),j(de,de.current),!0}function hi(e,n,t){var r=e.stateNode;if(!r)throw Error(y(169));t?(e=ea(e,n,Nn),r.__reactInternalMemoizedMergedChildContext=e,D(de),D(oe),j(oe,e)):D(de),j(de,t)}var Ve=null,ul=!1,Fl=!1;function na(e){Ve===null?Ve=[e]:Ve.push(e)}function qf(e){ul=!0,na(e)}function vn(){if(!Fl&&Ve!==null){Fl=!0;var e=0,n=O;try{var t=Ve;for(O=1;e>=u,l-=u,Be=1<<32-Oe(n)+l|t<N?(H=x,x=null):H=x.sibling;var T=p(f,x,d[N],v);if(T===null){x===null&&(x=H);break}e&&x&&T.alternate===null&&n(f,x),a=o(T,a,N),C===null?E=T:C.sibling=T,C=T,x=H}if(N===d.length)return t(f,x),U&&wn(f,N),E;if(x===null){for(;NN?(H=x,x=null):H=x.sibling;var Pe=p(f,x,T.value,v);if(Pe===null){x===null&&(x=H);break}e&&x&&Pe.alternate===null&&n(f,x),a=o(Pe,a,N),C===null?E=Pe:C.sibling=Pe,C=Pe,x=H}if(T.done)return t(f,x),U&&wn(f,N),E;if(x===null){for(;!T.done;N++,T=d.next())T=m(f,T.value,v),T!==null&&(a=o(T,a,N),C===null?E=T:C.sibling=T,C=T);return U&&wn(f,N),E}for(x=r(f,x);!T.done;N++,T=d.next())T=w(x,f,N,T.value,v),T!==null&&(e&&T.alternate!==null&&x.delete(T.key===null?N:T.key),a=o(T,a,N),C===null?E=T:C.sibling=T,C=T);return e&&x.forEach(function(st){return n(f,st)}),U&&wn(f,N),E}function I(f,a,d,v){if(typeof d=="object"&&d!==null&&d.type===Mn&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case tr:e:{for(var E=d.key,C=a;C!==null;){if(C.key===E){if(E=d.type,E===Mn){if(C.tag===7){t(f,C.sibling),a=l(C,d.props.children),a.return=f,f=a;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Je&&gi(E)===C.type){t(f,C.sibling),a=l(C,d.props),a.ref=ht(f,C,d),a.return=f,f=a;break e}t(f,C);break}else n(f,C);C=C.sibling}d.type===Mn?(a=xn(d.props.children,f.mode,v,d.key),a.return=f,f=a):(v=Lr(d.type,d.key,d.props,null,f.mode,v),v.ref=ht(f,a,d),v.return=f,f=v)}return u(f);case jn:e:{for(C=d.key;a!==null;){if(a.key===C)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){t(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{t(f,a);break}else n(f,a);a=a.sibling}a=Ql(d,f.mode,v),a.return=f,f=a}return u(f);case Je:return C=d._init,I(f,a,C(d._payload),v)}if(wt(d))return g(f,a,d,v);if(ct(d))return S(f,a,d,v);pr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(t(f,a.sibling),a=l(a,d),a.return=f,f=a):(t(f,a),a=Wl(d,f.mode,v),a.return=f,f=a),u(f)):t(f,a)}return I}var nt=oa(!0),ua=oa(!1),Hr=hn(null),Wr=null,Hn=null,au=null;function cu(){au=Hn=Wr=null}function fu(e){var n=Hr.current;D(Hr),e._currentValue=n}function _o(e,n,t){for(;e!==null;){var r=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,r!==null&&(r.childLanes|=n)):r!==null&&(r.childLanes&n)!==n&&(r.childLanes|=n),e===t)break;e=e.return}}function Zn(e,n){Wr=e,au=Hn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(fe=!0),e.firstContext=null)}function xe(e){var n=e._currentValue;if(au!==e)if(e={context:e,memoizedValue:n,next:null},Hn===null){if(Wr===null)throw Error(y(308));Hn=e,Wr.dependencies={lanes:0,firstContext:e}}else Hn=Hn.next=e;return n}var En=null;function du(e){En===null?En=[e]:En.push(e)}function ia(e,n,t,r){var l=n.interleaved;return l===null?(t.next=t,du(n)):(t.next=l.next,l.next=t),n.interleaved=t,Ye(e,r)}function Ye(e,n){e.lanes|=n;var t=e.alternate;for(t!==null&&(t.lanes|=n),t=e,e=e.return;e!==null;)e.childLanes|=n,t=e.alternate,t!==null&&(t.childLanes|=n),t=e,e=e.return;return t.tag===3?t.stateNode:null}var qe=!1;function pu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sa(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function We(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function sn(e,n,t){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,R&2){var l=r.pending;return l===null?n.next=n:(n.next=l.next,l.next=n),r.pending=n,Ye(e,t)}return l=r.interleaved,l===null?(n.next=n,du(r)):(n.next=l.next,l.next=n),r.interleaved=n,Ye(e,t)}function _r(e,n,t){if(n=n.updateQueue,n!==null&&(n=n.shared,(t&4194240)!==0)){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,qo(e,t)}}function wi(e,n){var t=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,t===r)){var l=null,o=null;if(t=t.firstBaseUpdate,t!==null){do{var u={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};o===null?l=o=u:o=o.next=u,t=t.next}while(t!==null);o===null?l=o=n:o=o.next=n}else l=o=n;t={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=t;return}e=t.lastBaseUpdate,e===null?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}function Qr(e,n,t,r){var l=e.updateQueue;qe=!1;var o=l.firstBaseUpdate,u=l.lastBaseUpdate,i=l.shared.pending;if(i!==null){l.shared.pending=null;var s=i,c=s.next;s.next=null,u===null?o=c:u.next=c,u=s;var h=e.alternate;h!==null&&(h=h.updateQueue,i=h.lastBaseUpdate,i!==u&&(i===null?h.firstBaseUpdate=c:i.next=c,h.lastBaseUpdate=s))}if(o!==null){var m=l.baseState;u=0,h=c=s=null,i=o;do{var p=i.lane,w=i.eventTime;if((r&p)===p){h!==null&&(h=h.next={eventTime:w,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var g=e,S=i;switch(p=n,w=t,S.tag){case 1:if(g=S.payload,typeof g=="function"){m=g.call(w,m,p);break e}m=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=S.payload,p=typeof g=="function"?g.call(w,m,p):g,p==null)break e;m=V({},m,p);break e;case 2:qe=!0}}i.callback!==null&&i.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[i]:p.push(i))}else w={eventTime:w,lane:p,tag:i.tag,payload:i.payload,callback:i.callback,next:null},h===null?(c=h=w,s=m):h=h.next=w,u|=p;if(i=i.next,i===null){if(i=l.shared.pending,i===null)break;p=i,i=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(h===null&&(s=m),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=h,n=l.shared.interleaved,n!==null){l=n;do u|=l.lane,l=l.next;while(l!==n)}else o===null&&(l.shared.lanes=0);Ln|=u,e.lanes=u,e.memoizedState=m}}function Si(e,n,t){if(e=n.effects,n.effects=null,e!==null)for(n=0;nt?t:4,e(!0);var r=$l.transition;$l.transition={};try{e(!1),n()}finally{O=t,$l.transition=r}}function xa(){return Ne().memoizedState}function td(e,n,t){var r=cn(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},Na(e))Pa(n,t);else if(t=ia(e,n,t,r),t!==null){var l=ie();Ie(t,e,r,l),za(t,n,r)}}function rd(e,n,t){var r=cn(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(Na(e))Pa(n,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=n.lastRenderedReducer,o!==null))try{var u=n.lastRenderedState,i=o(u,t);if(l.hasEagerState=!0,l.eagerState=i,je(i,u)){var s=n.interleaved;s===null?(l.next=l,du(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=ia(e,n,l,r),t!==null&&(l=ie(),Ie(t,e,r,l),za(t,n,r))}}function Na(e){var n=e.alternate;return e===A||n!==null&&n===A}function Pa(e,n){Pt=Yr=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function za(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,qo(e,t)}}var Xr={readContext:xe,useCallback:te,useContext:te,useEffect:te,useImperativeHandle:te,useInsertionEffect:te,useLayoutEffect:te,useMemo:te,useReducer:te,useRef:te,useState:te,useDebugValue:te,useDeferredValue:te,useTransition:te,useMutableSource:te,useSyncExternalStore:te,useId:te,unstable_isNewReconciler:!1},ld={readContext:xe,useCallback:function(e,n){return De().memoizedState=[e,n===void 0?null:n],e},useContext:xe,useEffect:Ei,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,xr(4194308,4,Sa.bind(null,n,e),t)},useLayoutEffect:function(e,n){return xr(4194308,4,e,n)},useInsertionEffect:function(e,n){return xr(4,2,e,n)},useMemo:function(e,n){var t=De();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=De();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=td.bind(null,A,e),[r.memoizedState,e]},useRef:function(e){var n=De();return e={current:e},n.memoizedState=e},useState:ki,useDebugValue:ku,useDeferredValue:function(e){return De().memoizedState=e},useTransition:function(){var e=ki(!1),n=e[0];return e=nd.bind(null,e[1]),De().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=A,l=De();if(U){if(t===void 0)throw Error(y(407));t=t()}else{if(t=n(),q===null)throw Error(y(349));zn&30||da(r,n,t)}l.memoizedState=t;var o={value:t,getSnapshot:n};return l.queue=o,Ei(ma.bind(null,r,o,e),[e]),r.flags|=2048,Kt(9,pa.bind(null,r,o,t,n),void 0,null),t},useId:function(){var e=De(),n=q.identifierPrefix;if(U){var t=He,r=Be;t=(r&~(1<<32-Oe(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=Wt++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(t,{is:r.is}):(e=u.createElement(t),t==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,t),e[Fe]=n,e[Vt]=r,Ua(e,n,!1,!1),n.stateNode=e;e:{switch(u=lo(t,r),t){case"dialog":M("cancel",e),M("close",e),l=r;break;case"iframe":case"object":case"embed":M("load",e),l=r;break;case"video":case"audio":for(l=0;llt&&(n.flags|=128,r=!0,vt(o,!1),n.lanes=4194304)}else{if(!r)if(e=Kr(u),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),vt(o,!0),o.tail===null&&o.tailMode==="hidden"&&!u.alternate&&!U)return re(n),null}else 2*K()-o.renderingStartTime>lt&&t!==1073741824&&(n.flags|=128,r=!0,vt(o,!1),n.lanes=4194304);o.isBackwards?(u.sibling=n.child,n.child=u):(t=o.last,t!==null?t.sibling=u:n.child=u,o.last=u)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=K(),n.sibling=null,t=$.current,j($,r?t&1|2:t&1),n):(re(n),null);case 22:case 23:return Pu(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?he&1073741824&&(re(n),n.subtreeFlags&6&&(n.flags|=8192)):re(n),null;case 24:return null;case 25:return null}throw Error(y(156,n.tag))}function dd(e,n){switch(iu(n),n.tag){case 1:return pe(n.type)&&$r(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return tt(),D(de),D(oe),vu(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return hu(n),null;case 13:if(D($),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(y(340));et()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return D($),null;case 4:return tt(),null;case 10:return fu(n.type._context),null;case 22:case 23:return Pu(),null;case 24:return null;default:return null}}var hr=!1,le=!1,pd=typeof WeakSet=="function"?WeakSet:Set,k=null;function Wn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){B(e,n,r)}else t.current=null}function Oo(e,n,t){try{t()}catch(r){B(e,n,r)}}var Ii=!1;function md(e,n){if(ho=Mr,e=Qs(),ou(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{t.nodeType,o.nodeType}catch{t=null;break e}var u=0,i=-1,s=-1,c=0,h=0,m=e,p=null;n:for(;;){for(var w;m!==t||l!==0&&m.nodeType!==3||(i=u+l),m!==o||r!==0&&m.nodeType!==3||(s=u+r),m.nodeType===3&&(u+=m.nodeValue.length),(w=m.firstChild)!==null;)p=m,m=w;for(;;){if(m===e)break n;if(p===t&&++c===l&&(i=u),p===o&&++h===r&&(s=u),(w=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=w}t=i===-1||s===-1?null:{start:i,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(vo={focusedElem:e,selectionRange:t},Mr=!1,k=n;k!==null;)if(n=k,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,k=e;else for(;k!==null;){n=k;try{var g=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var S=g.memoizedProps,I=g.memoizedState,f=n.stateNode,a=f.getSnapshotBeforeUpdate(n.elementType===n.type?S:Le(n.type,S),I);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=n.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(v){B(n,n.return,v)}if(e=n.sibling,e!==null){e.return=n.return,k=e;break}k=n.return}return g=Ii,Ii=!1,g}function zt(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Oo(n,t,o)}l=l.next}while(l!==r)}}function al(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function Io(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function Va(e){var n=e.alternate;n!==null&&(e.alternate=null,Va(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Fe],delete n[Vt],delete n[wo],delete n[Zf],delete n[Jf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ba(e){return e.tag===5||e.tag===3||e.tag===4}function ji(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ba(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function jo(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Ur));else if(r!==4&&(e=e.child,e!==null))for(jo(e,n,t),e=e.sibling;e!==null;)jo(e,n,t),e=e.sibling}function Mo(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Mo(e,n,t),e=e.sibling;e!==null;)Mo(e,n,t),e=e.sibling}var b=null,Te=!1;function Ze(e,n,t){for(t=t.child;t!==null;)Ha(e,n,t),t=t.sibling}function Ha(e,n,t){if(Ue&&typeof Ue.onCommitFiberUnmount=="function")try{Ue.onCommitFiberUnmount(nl,t)}catch{}switch(t.tag){case 5:le||Wn(t,n);case 6:var r=b,l=Te;b=null,Ze(e,n,t),b=r,Te=l,b!==null&&(Te?(e=b,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):b.removeChild(t.stateNode));break;case 18:b!==null&&(Te?(e=b,t=t.stateNode,e.nodeType===8?Dl(e.parentNode,t):e.nodeType===1&&Dl(e,t),Dt(e)):Dl(b,t.stateNode));break;case 4:r=b,l=Te,b=t.stateNode.containerInfo,Te=!0,Ze(e,n,t),b=r,Te=l;break;case 0:case 11:case 14:case 15:if(!le&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,u=o.destroy;o=o.tag,u!==void 0&&(o&2||o&4)&&Oo(t,n,u),l=l.next}while(l!==r)}Ze(e,n,t);break;case 1:if(!le&&(Wn(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(i){B(t,n,i)}Ze(e,n,t);break;case 21:Ze(e,n,t);break;case 22:t.mode&1?(le=(r=le)||t.memoizedState!==null,Ze(e,n,t),le=r):Ze(e,n,t);break;default:Ze(e,n,t)}}function Mi(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new pd),n.forEach(function(r){var l=_d.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function ze(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=u),r&=~o}if(r=l,r=K()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vd(r/1960))-r,10e?16:e,tn===null)var r=!1;else{if(e=tn,tn=null,Jr=0,R&6)throw Error(y(331));var l=R;for(R|=4,k=e.current;k!==null;){var o=k,u=o.child;if(k.flags&16){var i=o.deletions;if(i!==null){for(var s=0;sK()-xu?Cn(e,0):Cu|=t),me(e,n)}function Ja(e,n){n===0&&(e.mode&1?(n=ur,ur<<=1,!(ur&130023424)&&(ur=4194304)):n=1);var t=ie();e=Ye(e,n),e!==null&&(Gt(e,n,t),me(e,t))}function Ed(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),Ja(e,t)}function _d(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(n),Ja(e,t)}var qa;qa=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||de.current)fe=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return fe=!1,cd(e,n,t);fe=!!(e.flags&131072)}else fe=!1,U&&n.flags&1048576&&ta(n,Br,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;Nr(e,n),e=n.pendingProps;var l=bn(n,oe.current);Zn(n,t),l=gu(null,n,r,e,l,t);var o=wu();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,pe(r)?(o=!0,Ar(n)):o=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,pu(n),l.updater=sl,n.stateNode=l,l._reactInternals=n,xo(n,r,e,t),n=zo(null,n,r,!0,o,t)):(n.tag=0,U&&o&&uu(n),ue(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(Nr(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=xd(r),e=Le(r,e),l){case 0:n=Po(null,n,r,e,t);break e;case 1:n=Ti(null,n,r,e,t);break e;case 11:n=zi(null,n,r,e,t);break e;case 14:n=Li(null,n,r,Le(r.type,e),t);break e}throw Error(y(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Le(r,l),Po(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Le(r,l),Ti(e,n,r,l,t);case 3:e:{if(Ma(n),e===null)throw Error(y(387));r=n.pendingProps,o=n.memoizedState,l=o.element,sa(e,n),Qr(n,r,null,t);var u=n.memoizedState;if(r=u.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},n.updateQueue.baseState=o,n.memoizedState=o,n.flags&256){l=rt(Error(y(423)),n),n=Ri(e,n,r,t,l);break e}else if(r!==l){l=rt(Error(y(424)),n),n=Ri(e,n,r,t,l);break e}else for(ve=un(n.stateNode.containerInfo.firstChild),ye=n,U=!0,Re=null,t=ua(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(et(),r===l){n=Xe(e,n,t);break e}ue(e,n,r,t)}n=n.child}return n;case 5:return aa(n),e===null&&Eo(n),r=n.type,l=n.pendingProps,o=e!==null?e.memoizedProps:null,u=l.children,yo(r,l)?u=null:o!==null&&yo(r,o)&&(n.flags|=32),ja(e,n),ue(e,n,u,t),n.child;case 6:return e===null&&Eo(n),null;case 13:return Da(e,n,t);case 4:return mu(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=nt(n,null,r,t):ue(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Le(r,l),zi(e,n,r,l,t);case 7:return ue(e,n,n.pendingProps,t),n.child;case 8:return ue(e,n,n.pendingProps.children,t),n.child;case 12:return ue(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,o=n.memoizedProps,u=l.value,j(Hr,r._currentValue),r._currentValue=u,o!==null)if(je(o.value,u)){if(o.children===l.children&&!de.current){n=Xe(e,n,t);break e}}else for(o=n.child,o!==null&&(o.return=n);o!==null;){var i=o.dependencies;if(i!==null){u=o.child;for(var s=i.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=We(-1,t&-t),s.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s}}o.lanes|=t,s=o.alternate,s!==null&&(s.lanes|=t),_o(o.return,t,n),i.lanes|=t;break}s=s.next}}else if(o.tag===10)u=o.type===n.type?null:o.child;else if(o.tag===18){if(u=o.return,u===null)throw Error(y(341));u.lanes|=t,i=u.alternate,i!==null&&(i.lanes|=t),_o(u,t,n),u=o.sibling}else u=o.child;if(u!==null)u.return=o;else for(u=o;u!==null;){if(u===n){u=null;break}if(o=u.sibling,o!==null){o.return=u.return,u=o;break}u=u.return}o=u}ue(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,Zn(n,t),l=xe(l),r=r(l),n.flags|=1,ue(e,n,r,t),n.child;case 14:return r=n.type,l=Le(r,n.pendingProps),l=Le(r.type,l),Li(e,n,r,l,t);case 15:return Oa(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Le(r,l),Nr(e,n),n.tag=1,pe(r)?(e=!0,Ar(n)):e=!1,Zn(n,t),La(n,r,l),xo(n,r,l,t),zo(null,n,r,!0,e,t);case 19:return Fa(e,n,t);case 22:return Ia(e,n,t)}throw Error(y(156,n.tag))};function ba(e,n){return Ns(e,n)}function Cd(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _e(e,n,t,r){return new Cd(e,n,t,r)}function Lu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xd(e){if(typeof e=="function")return Lu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Xo)return 11;if(e===Go)return 14}return 2}function fn(e,n){var t=e.alternate;return t===null?(t=_e(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Lr(e,n,t,r,l,o){var u=2;if(r=e,typeof e=="function")Lu(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case Mn:return xn(t.children,l,o,n);case Yo:u=8,l|=8;break;case Xl:return e=_e(12,t,n,l|2),e.elementType=Xl,e.lanes=o,e;case Gl:return e=_e(13,t,n,l),e.elementType=Gl,e.lanes=o,e;case Zl:return e=_e(19,t,n,l),e.elementType=Zl,e.lanes=o,e;case as:return fl(t,l,o,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case is:u=10;break e;case ss:u=9;break e;case Xo:u=11;break e;case Go:u=14;break e;case Je:u=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return n=_e(u,t,n,l),n.elementType=e,n.type=r,n.lanes=o,n}function xn(e,n,t,r){return e=_e(7,e,r,n),e.lanes=t,e}function fl(e,n,t,r){return e=_e(22,e,r,n),e.elementType=as,e.lanes=t,e.stateNode={isHidden:!1},e}function Wl(e,n,t){return e=_e(6,e,null,n),e.lanes=t,e}function Ql(e,n,t){return n=_e(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Nd(e,n,t,r,l){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xl(0),this.expirationTimes=xl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Tu(e,n,t,r,l,o,u,i,s){return e=new Nd(e,n,t,i,s),n===1?(n=1,o===!0&&(n|=8)):n=0,o=_e(3,null,null,n),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},pu(o),e}function Pd(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rc)}catch(e){console.error(e)}}rc(),rs.exports=we;var Od=rs.exports,lc,Hi=Od;lc=Hi.createRoot,Hi.hydrateRoot;const Id="modulepreload",jd=function(e){return"/"+e},Wi={},vl=function(n,t,r){let l=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),i=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));l=Promise.allSettled(t.map(s=>{if(s=jd(s),s in Wi)return;Wi[s]=!0;const c=s.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${h}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":Id,c||(m.as="script"),m.crossOrigin="",m.href=s,i&&m.setAttribute("nonce",i),document.head.appendChild(m),c)return new Promise((p,w)=>{m.addEventListener("load",p),m.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${s}`)))})}))}function o(u){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=u,window.dispatchEvent(i),!i.defaultPrevented)throw u}return l.then(u=>{for(const i of u||[])i.status==="rejected"&&o(i.reason);return n().catch(o)})};function Md(){return F.jsxs("div",{className:"card text-center footer",children:["© 2024"," ",F.jsx("a",{href:"https://hoangnguyendong.dev",target:"_blank",children:"Hoàng Rio"}),F.jsx("br",{}),"Open source at:"," ",F.jsx("a",{href:"https://github.com/hoang-rio/lux-grid-watcher",target:"_blank",children:"Github"})]})}const Kl=Q.memo(Md);function Dd(){return F.jsx("div",{className:"col flex-1 justify-center align-center",children:"Loading..."})}const Fd=Q.lazy(()=>vl(()=>import("./SystemInformation-BQMVNzph.js"),__vite__mapDeps([0,1,2,3]))),Ud=Q.lazy(()=>vl(()=>import("./Summary-ocuEYfmg.js"),__vite__mapDeps([4,1,2,5,6,7]))),$d=Q.lazy(()=>vl(()=>import("./HourlyChart-BTS1liN6.js"),__vite__mapDeps([8,5,9]))),Ad=Q.lazy(()=>vl(()=>import("./EnergyChart-yyp8EL_K.js"),__vite__mapDeps([10,5,6,11]))),Qi=3;function Vd(){const[e,n]=Q.useState(),t=Q.useRef(),r=Q.useRef(!1),l=Q.useRef(0),[o,u]=Q.useState(!0),i=Q.useRef(null),[s,c]=Q.useState(!0),h=Q.useRef(!1),m=Q.useCallback(()=>{if(t.current&&(t.current.CONNECTING||!t.current.CLOSED))return;console.log("[Socket] Connecting to socket server...");const g=new WebSocket("/ws");t.current=g,g.addEventListener("open",()=>{l.current=0,console.log("[Socket] Connected to server"),u(!0)}),g.addEventListener("message",S=>{var f;const I=JSON.parse(S.data);n(I.inverter_data),(f=i.current)==null||f.updateItem(I.hourly_chart_item)}),g.addEventListener("close",()=>{var S;if(document.title="[Offline] LuxPower realtime web viewer",u(!1),!(r.current||(S=t.current)!=null&&S.CONNECTING)){if(l.current>=Qi){console.warn("[Socket] stop reconnect by reached MAX_RECONNECT_COUNT");return}l.current++,console.log("[Socket] connection closed. Reconnecting (%s)...",l.current),m()}}),g.addEventListener("error",S=>{console.error("[Socket] socket error",S)})},[n,u]),p=Q.useCallback(()=>{var g;r.current=!0,(g=t.current)==null||g.close()},[]),w=Q.useCallback(async()=>{try{if(h.current)return;h.current=!0;const S=await(await fetch("/state")).json();n(S),c(!1)}catch(g){console.error("API get state error",g)}h.current=!1},[n,c]);return Q.useEffect(()=>(w(),r.current=!1,m(),window.addEventListener("beforeunload",p),document.addEventListener("visibilitychange",()=>{document.hidden||(w(),l.current>=Qi&&(l.current=0,console.warn("[Socket] reconnect when window active again"),m()))}),p),[m,p,w]),Q.useEffect(()=>{var S;if(!(e!=null&&e.deviceTime))return;const g=(S=e==null?void 0:e.deviceTime)==null?void 0:S.split(" ")[1];document.title=`[${g}] LuxPower realtime web viewer`},[e==null?void 0:e.deviceTime]),s?F.jsxs(F.Fragment,{children:[F.jsx("div",{className:"d-flex card loading align-center justify-center flex-1",children:F.jsx(Dd,{})}),F.jsx(Kl,{})]}):e?F.jsxs(F.Fragment,{children:[F.jsx(Ud,{invertData:e}),F.jsx(Fd,{inverterData:e,isSocketConnected:o,onReconnect:m}),F.jsxs("div",{className:"row chart",children:[F.jsx($d,{ref:i,className:"flex-1 chart-item"}),F.jsx(Ad,{className:"flex-1 chart-item"})]}),F.jsx(Kl,{})]}):F.jsxs(F.Fragment,{children:[F.jsx("div",{className:"d-flex card server-offline align-center justify-center flex-1",children:"Server is offline. Reload page when you make sure that server is online"}),F.jsx(Kl,{})]})}lc(document.getElementById("root")).render(F.jsx(Q.StrictMode,{children:F.jsx(Vd,{})}));export{Dd as L,vl as _,F as j,Q as r}; +`+o.stack}return{value:e,source:n,stack:l,digest:null}}function Bl(e,n,t){return{value:e,source:null,stack:t??null,digest:n??null}}function No(e,n){try{console.error(n.value)}catch(t){setTimeout(function(){throw t})}}var id=typeof WeakMap=="function"?WeakMap:Map;function Ta(e,n,t){t=We(-1,t),t.tag=3,t.payload={element:null};var r=n.value;return t.callback=function(){Zr||(Zr=!0,Do=r),No(e,n)},t}function Ra(e,n,t){t=We(-1,t),t.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=n.value;t.payload=function(){return r(l)},t.callback=function(){No(e,n)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(t.callback=function(){No(e,n),typeof r!="function"&&(an===null?an=new Set([this]):an.add(this));var u=n.stack;this.componentDidCatch(n.value,{componentStack:u!==null?u:""})}),t}function xi(e,n,t){var r=e.pingCache;if(r===null){r=e.pingCache=new id;var l=new Set;r.set(n,l)}else l=r.get(n),l===void 0&&(l=new Set,r.set(n,l));l.has(t)||(l.add(t),e=kd.bind(null,e,n,t),n.then(e,e))}function Ni(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Pi(e,n,t,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===n?e.flags|=65536:(e.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(n=We(-1,1),n.tag=2,sn(t,n,1))),t.lanes|=1),e)}var sd=Ge.ReactCurrentOwner,fe=!1;function ue(e,n,t,r){n.child=e===null?ua(n,null,t,r):nt(n,e.child,t,r)}function zi(e,n,t,r,l){t=t.render;var o=n.ref;return Zn(n,l),r=gu(e,n,t,r,o,l),t=wu(),e!==null&&!fe?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,Xe(e,n,l)):(U&&t&&uu(n),n.flags|=1,ue(e,n,r,l),n.child)}function Li(e,n,t,r,l){if(e===null){var o=t.type;return typeof o=="function"&&!Lu(o)&&o.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(n.tag=15,n.type=o,Oa(e,n,o,r,l)):(e=Lr(t.type,null,r,n,n.mode,l),e.ref=n.ref,e.return=n,n.child=e)}if(o=e.child,!(e.lanes&l)){var u=o.memoizedProps;if(t=t.compare,t=t!==null?t:Ut,t(u,r)&&e.ref===n.ref)return Xe(e,n,l)}return n.flags|=1,e=fn(o,r),e.ref=n.ref,e.return=n,n.child=e}function Oa(e,n,t,r,l){if(e!==null){var o=e.memoizedProps;if(Ut(o,r)&&e.ref===n.ref)if(fe=!1,n.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(fe=!0);else return n.lanes=e.lanes,Xe(e,n,l)}return Po(e,n,t,r,l)}function Ia(e,n,t){var r=n.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(n.mode&1))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},j(Qn,he),he|=t;else{if(!(t&1073741824))return e=o!==null?o.baseLanes|t:t,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,j(Qn,he),he|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:t,j(Qn,he),he|=r}else o!==null?(r=o.baseLanes|t,n.memoizedState=null):r=t,j(Qn,he),he|=r;return ue(e,n,l,t),n.child}function ja(e,n){var t=n.ref;(e===null&&t!==null||e!==null&&e.ref!==t)&&(n.flags|=512,n.flags|=2097152)}function Po(e,n,t,r,l){var o=pe(t)?Nn:oe.current;return o=bn(n,o),Zn(n,l),t=gu(e,n,t,r,o,l),r=wu(),e!==null&&!fe?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,Xe(e,n,l)):(U&&r&&uu(n),n.flags|=1,ue(e,n,t,l),n.child)}function Ti(e,n,t,r,l){if(pe(t)){var o=!0;Ar(n)}else o=!1;if(Zn(n,l),n.stateNode===null)Nr(e,n),La(n,t,r),xo(n,t,r,l),r=!0;else if(e===null){var u=n.stateNode,i=n.memoizedProps;u.props=i;var s=u.context,c=t.contextType;typeof c=="object"&&c!==null?c=xe(c):(c=pe(t)?Nn:oe.current,c=bn(n,c));var h=t.getDerivedStateFromProps,m=typeof h=="function"||typeof u.getSnapshotBeforeUpdate=="function";m||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==r||s!==c)&&Ci(n,u,r,c),qe=!1;var p=n.memoizedState;u.state=p,Qr(n,r,u,l),s=n.memoizedState,i!==r||p!==s||de.current||qe?(typeof h=="function"&&(Co(n,t,h,r),s=n.memoizedState),(i=qe||_i(n,t,i,r,p,s,c))?(m||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(n.flags|=4194308)):(typeof u.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=s),u.props=r,u.state=s,u.context=c,r=i):(typeof u.componentDidMount=="function"&&(n.flags|=4194308),r=!1)}else{u=n.stateNode,sa(e,n),i=n.memoizedProps,c=n.type===n.elementType?i:Le(n.type,i),u.props=c,m=n.pendingProps,p=u.context,s=t.contextType,typeof s=="object"&&s!==null?s=xe(s):(s=pe(t)?Nn:oe.current,s=bn(n,s));var w=t.getDerivedStateFromProps;(h=typeof w=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==m||p!==s)&&Ci(n,u,r,s),qe=!1,p=n.memoizedState,u.state=p,Qr(n,r,u,l);var g=n.memoizedState;i!==m||p!==g||de.current||qe?(typeof w=="function"&&(Co(n,t,w,r),g=n.memoizedState),(c=qe||_i(n,t,c,r,p,g,s)||!1)?(h||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(r,g,s),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(r,g,s)),typeof u.componentDidUpdate=="function"&&(n.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof u.componentDidUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=g),u.props=r,u.state=g,u.context=s,r=c):(typeof u.componentDidUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),r=!1)}return zo(e,n,t,r,o,l)}function zo(e,n,t,r,l,o){ja(e,n);var u=(n.flags&128)!==0;if(!r&&!u)return l&&hi(n,t,!1),Xe(e,n,o);r=n.stateNode,sd.current=n;var i=u&&typeof t.getDerivedStateFromError!="function"?null:r.render();return n.flags|=1,e!==null&&u?(n.child=nt(n,e.child,null,o),n.child=nt(n,null,i,o)):ue(e,n,i,o),n.memoizedState=r.state,l&&hi(n,t,!0),n.child}function Ma(e){var n=e.stateNode;n.pendingContext?mi(e,n.pendingContext,n.pendingContext!==n.context):n.context&&mi(e,n.context,!1),mu(e,n.containerInfo)}function Ri(e,n,t,r,l){return et(),su(l),n.flags|=256,ue(e,n,t,r),n.child}var Lo={dehydrated:null,treeContext:null,retryLane:0};function To(e){return{baseLanes:e,cachePool:null,transitions:null}}function Da(e,n,t){var r=n.pendingProps,l=$.current,o=!1,u=(n.flags&128)!==0,i;if((i=u)||(i=e!==null&&e.memoizedState===null?!1:(l&2)!==0),i?(o=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),j($,l&1),e===null)return Eo(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(n.mode&1?e.data==="$!"?n.lanes=8:n.lanes=1073741824:n.lanes=1,null):(u=r.children,e=r.fallback,o?(r=n.mode,o=n.child,u={mode:"hidden",children:u},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=u):o=fl(u,r,0,null),e=xn(e,r,t,null),o.return=n,e.return=n,o.sibling=e,n.child=o,n.child.memoizedState=To(t),n.memoizedState=Lo,e):Eu(n,u));if(l=e.memoizedState,l!==null&&(i=l.dehydrated,i!==null))return ad(e,n,u,r,i,l,t);if(o){o=r.fallback,u=n.mode,l=e.child,i=l.sibling;var s={mode:"hidden",children:r.children};return!(u&1)&&n.child!==l?(r=n.child,r.childLanes=0,r.pendingProps=s,n.deletions=null):(r=fn(l,s),r.subtreeFlags=l.subtreeFlags&14680064),i!==null?o=fn(i,o):(o=xn(o,u,t,null),o.flags|=2),o.return=n,r.return=n,r.sibling=o,n.child=r,r=o,o=n.child,u=e.child.memoizedState,u=u===null?To(t):{baseLanes:u.baseLanes|t,cachePool:null,transitions:u.transitions},o.memoizedState=u,o.childLanes=e.childLanes&~t,n.memoizedState=Lo,r}return o=e.child,e=o.sibling,r=fn(o,{mode:"visible",children:r.children}),!(n.mode&1)&&(r.lanes=t),r.return=n,r.sibling=null,e!==null&&(t=n.deletions,t===null?(n.deletions=[e],n.flags|=16):t.push(e)),n.child=r,n.memoizedState=null,r}function Eu(e,n){return n=fl({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function mr(e,n,t,r){return r!==null&&su(r),nt(n,e.child,null,t),e=Eu(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function ad(e,n,t,r,l,o,u){if(t)return n.flags&256?(n.flags&=-257,r=Bl(Error(y(422))),mr(e,n,u,r)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(o=r.fallback,l=n.mode,r=fl({mode:"visible",children:r.children},l,0,null),o=xn(o,l,u,null),o.flags|=2,r.return=n,o.return=n,r.sibling=o,n.child=r,n.mode&1&&nt(n,e.child,null,u),n.child.memoizedState=To(u),n.memoizedState=Lo,o);if(!(n.mode&1))return mr(e,n,u,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var i=r.dgst;return r=i,o=Error(y(419)),r=Bl(o,r,void 0),mr(e,n,u,r)}if(i=(u&e.childLanes)!==0,fe||i){if(r=q,r!==null){switch(u&-u){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|u)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,Ye(e,l),Ie(r,e,l,-1))}return zu(),r=Bl(Error(y(421))),mr(e,n,u,r)}return l.data==="$?"?(n.flags|=128,n.child=e.child,n=Ed.bind(null,e),l._reactRetry=n,null):(e=o.treeContext,ve=un(l.nextSibling),ye=n,U=!0,Re=null,e!==null&&(ke[Ee++]=Be,ke[Ee++]=He,ke[Ee++]=Pn,Be=e.id,He=e.overflow,Pn=n),n=Eu(n,r.children),n.flags|=4096,n)}function Oi(e,n,t){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n),_o(e.return,n,t)}function Hl(e,n,t,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:t,tailMode:l}:(o.isBackwards=n,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=t,o.tailMode=l)}function Fa(e,n,t){var r=n.pendingProps,l=r.revealOrder,o=r.tail;if(ue(e,n,r.children,t),r=$.current,r&2)r=r&1|2,n.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oi(e,t,n);else if(e.tag===19)Oi(e,t,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(j($,r),!(n.mode&1))n.memoizedState=null;else switch(l){case"forwards":for(t=n.child,l=null;t!==null;)e=t.alternate,e!==null&&Kr(e)===null&&(l=t),t=t.sibling;t=l,t===null?(l=n.child,n.child=null):(l=t.sibling,t.sibling=null),Hl(n,!1,l,t,o);break;case"backwards":for(t=null,l=n.child,n.child=null;l!==null;){if(e=l.alternate,e!==null&&Kr(e)===null){n.child=l;break}e=l.sibling,l.sibling=t,t=l,l=e}Hl(n,!0,t,null,o);break;case"together":Hl(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Nr(e,n){!(n.mode&1)&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Xe(e,n,t){if(e!==null&&(n.dependencies=e.dependencies),Ln|=n.lanes,!(t&n.childLanes))return null;if(e!==null&&n.child!==e.child)throw Error(y(153));if(n.child!==null){for(e=n.child,t=fn(e,e.pendingProps),n.child=t,t.return=n;e.sibling!==null;)e=e.sibling,t=t.sibling=fn(e,e.pendingProps),t.return=n;t.sibling=null}return n.child}function cd(e,n,t){switch(n.tag){case 3:Ma(n),et();break;case 5:aa(n);break;case 1:pe(n.type)&&Ar(n);break;case 4:mu(n,n.stateNode.containerInfo);break;case 10:var r=n.type._context,l=n.memoizedProps.value;j(Hr,r._currentValue),r._currentValue=l;break;case 13:if(r=n.memoizedState,r!==null)return r.dehydrated!==null?(j($,$.current&1),n.flags|=128,null):t&n.child.childLanes?Da(e,n,t):(j($,$.current&1),e=Xe(e,n,t),e!==null?e.sibling:null);j($,$.current&1);break;case 19:if(r=(t&n.childLanes)!==0,e.flags&128){if(r)return Fa(e,n,t);n.flags|=128}if(l=n.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),j($,$.current),r)break;return null;case 22:case 23:return n.lanes=0,Ia(e,n,t)}return Xe(e,n,t)}var Ua,Ro,$a,Aa;Ua=function(e,n){for(var t=n.child;t!==null;){if(t.tag===5||t.tag===6)e.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break;for(;t.sibling===null;){if(t.return===null||t.return===n)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};Ro=function(){};$a=function(e,n,t,r){var l=e.memoizedProps;if(l!==r){e=n.stateNode,_n($e.current);var o=null;switch(t){case"input":l=ql(e,l),r=ql(e,r),o=[];break;case"select":l=V({},l,{value:void 0}),r=V({},r,{value:void 0}),o=[];break;case"textarea":l=no(e,l),r=no(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ur)}ro(t,r);var u;t=null;for(c in l)if(!r.hasOwnProperty(c)&&l.hasOwnProperty(c)&&l[c]!=null)if(c==="style"){var i=l[c];for(u in i)i.hasOwnProperty(u)&&(t||(t={}),t[u]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Rt.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var s=r[c];if(i=l!=null?l[c]:void 0,r.hasOwnProperty(c)&&s!==i&&(s!=null||i!=null))if(c==="style")if(i){for(u in i)!i.hasOwnProperty(u)||s&&s.hasOwnProperty(u)||(t||(t={}),t[u]="");for(u in s)s.hasOwnProperty(u)&&i[u]!==s[u]&&(t||(t={}),t[u]=s[u])}else t||(o||(o=[]),o.push(c,t)),t=s;else c==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,i=i?i.__html:void 0,s!=null&&i!==s&&(o=o||[]).push(c,s)):c==="children"?typeof s!="string"&&typeof s!="number"||(o=o||[]).push(c,""+s):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Rt.hasOwnProperty(c)?(s!=null&&c==="onScroll"&&M("scroll",e),o||i===s||(o=[])):(o=o||[]).push(c,s))}t&&(o=o||[]).push("style",t);var c=o;(n.updateQueue=c)&&(n.flags|=4)}};Aa=function(e,n,t,r){t!==r&&(n.flags|=4)};function vt(e,n){if(!U)switch(e.tailMode){case"hidden":n=e.tail;for(var t=null;n!==null;)n.alternate!==null&&(t=n),n=n.sibling;t===null?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function re(e){var n=e.alternate!==null&&e.alternate.child===e.child,t=0,r=0;if(n)for(var l=e.child;l!==null;)t|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)t|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=t,n}function fd(e,n,t){var r=n.pendingProps;switch(iu(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return re(n),null;case 1:return pe(n.type)&&$r(),re(n),null;case 3:return r=n.stateNode,tt(),D(de),D(oe),vu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(dr(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,Re!==null&&($o(Re),Re=null))),Ro(e,n),re(n),null;case 5:hu(n);var l=_n(Ht.current);if(t=n.type,e!==null&&n.stateNode!=null)$a(e,n,t,r,l),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!r){if(n.stateNode===null)throw Error(y(166));return re(n),null}if(e=_n($e.current),dr(n)){r=n.stateNode,t=n.type;var o=n.memoizedProps;switch(r[Fe]=n,r[Vt]=o,e=(n.mode&1)!==0,t){case"dialog":M("cancel",r),M("close",r);break;case"iframe":case"object":case"embed":M("load",r);break;case"video":case"audio":for(l=0;l<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(t,{is:r.is}):(e=u.createElement(t),t==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,t),e[Fe]=n,e[Vt]=r,Ua(e,n,!1,!1),n.stateNode=e;e:{switch(u=lo(t,r),t){case"dialog":M("cancel",e),M("close",e),l=r;break;case"iframe":case"object":case"embed":M("load",e),l=r;break;case"video":case"audio":for(l=0;llt&&(n.flags|=128,r=!0,vt(o,!1),n.lanes=4194304)}else{if(!r)if(e=Kr(u),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),vt(o,!0),o.tail===null&&o.tailMode==="hidden"&&!u.alternate&&!U)return re(n),null}else 2*K()-o.renderingStartTime>lt&&t!==1073741824&&(n.flags|=128,r=!0,vt(o,!1),n.lanes=4194304);o.isBackwards?(u.sibling=n.child,n.child=u):(t=o.last,t!==null?t.sibling=u:n.child=u,o.last=u)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=K(),n.sibling=null,t=$.current,j($,r?t&1|2:t&1),n):(re(n),null);case 22:case 23:return Pu(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?he&1073741824&&(re(n),n.subtreeFlags&6&&(n.flags|=8192)):re(n),null;case 24:return null;case 25:return null}throw Error(y(156,n.tag))}function dd(e,n){switch(iu(n),n.tag){case 1:return pe(n.type)&&$r(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return tt(),D(de),D(oe),vu(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return hu(n),null;case 13:if(D($),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(y(340));et()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return D($),null;case 4:return tt(),null;case 10:return fu(n.type._context),null;case 22:case 23:return Pu(),null;case 24:return null;default:return null}}var hr=!1,le=!1,pd=typeof WeakSet=="function"?WeakSet:Set,k=null;function Wn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){B(e,n,r)}else t.current=null}function Oo(e,n,t){try{t()}catch(r){B(e,n,r)}}var Ii=!1;function md(e,n){if(ho=Mr,e=Qs(),ou(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{t.nodeType,o.nodeType}catch{t=null;break e}var u=0,i=-1,s=-1,c=0,h=0,m=e,p=null;n:for(;;){for(var w;m!==t||l!==0&&m.nodeType!==3||(i=u+l),m!==o||r!==0&&m.nodeType!==3||(s=u+r),m.nodeType===3&&(u+=m.nodeValue.length),(w=m.firstChild)!==null;)p=m,m=w;for(;;){if(m===e)break n;if(p===t&&++c===l&&(i=u),p===o&&++h===r&&(s=u),(w=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=w}t=i===-1||s===-1?null:{start:i,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(vo={focusedElem:e,selectionRange:t},Mr=!1,k=n;k!==null;)if(n=k,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,k=e;else for(;k!==null;){n=k;try{var g=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var S=g.memoizedProps,I=g.memoizedState,f=n.stateNode,a=f.getSnapshotBeforeUpdate(n.elementType===n.type?S:Le(n.type,S),I);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=n.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(v){B(n,n.return,v)}if(e=n.sibling,e!==null){e.return=n.return,k=e;break}k=n.return}return g=Ii,Ii=!1,g}function zt(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Oo(n,t,o)}l=l.next}while(l!==r)}}function al(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function Io(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function Va(e){var n=e.alternate;n!==null&&(e.alternate=null,Va(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Fe],delete n[Vt],delete n[wo],delete n[Zf],delete n[Jf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ba(e){return e.tag===5||e.tag===3||e.tag===4}function ji(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ba(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function jo(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Ur));else if(r!==4&&(e=e.child,e!==null))for(jo(e,n,t),e=e.sibling;e!==null;)jo(e,n,t),e=e.sibling}function Mo(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Mo(e,n,t),e=e.sibling;e!==null;)Mo(e,n,t),e=e.sibling}var b=null,Te=!1;function Ze(e,n,t){for(t=t.child;t!==null;)Ha(e,n,t),t=t.sibling}function Ha(e,n,t){if(Ue&&typeof Ue.onCommitFiberUnmount=="function")try{Ue.onCommitFiberUnmount(nl,t)}catch{}switch(t.tag){case 5:le||Wn(t,n);case 6:var r=b,l=Te;b=null,Ze(e,n,t),b=r,Te=l,b!==null&&(Te?(e=b,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):b.removeChild(t.stateNode));break;case 18:b!==null&&(Te?(e=b,t=t.stateNode,e.nodeType===8?Dl(e.parentNode,t):e.nodeType===1&&Dl(e,t),Dt(e)):Dl(b,t.stateNode));break;case 4:r=b,l=Te,b=t.stateNode.containerInfo,Te=!0,Ze(e,n,t),b=r,Te=l;break;case 0:case 11:case 14:case 15:if(!le&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,u=o.destroy;o=o.tag,u!==void 0&&(o&2||o&4)&&Oo(t,n,u),l=l.next}while(l!==r)}Ze(e,n,t);break;case 1:if(!le&&(Wn(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(i){B(t,n,i)}Ze(e,n,t);break;case 21:Ze(e,n,t);break;case 22:t.mode&1?(le=(r=le)||t.memoizedState!==null,Ze(e,n,t),le=r):Ze(e,n,t);break;default:Ze(e,n,t)}}function Mi(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new pd),n.forEach(function(r){var l=_d.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function ze(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=u),r&=~o}if(r=l,r=K()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vd(r/1960))-r,10e?16:e,tn===null)var r=!1;else{if(e=tn,tn=null,Jr=0,R&6)throw Error(y(331));var l=R;for(R|=4,k=e.current;k!==null;){var o=k,u=o.child;if(k.flags&16){var i=o.deletions;if(i!==null){for(var s=0;sK()-xu?Cn(e,0):Cu|=t),me(e,n)}function Ja(e,n){n===0&&(e.mode&1?(n=ur,ur<<=1,!(ur&130023424)&&(ur=4194304)):n=1);var t=ie();e=Ye(e,n),e!==null&&(Gt(e,n,t),me(e,t))}function Ed(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),Ja(e,t)}function _d(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(n),Ja(e,t)}var qa;qa=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||de.current)fe=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return fe=!1,cd(e,n,t);fe=!!(e.flags&131072)}else fe=!1,U&&n.flags&1048576&&ta(n,Br,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;Nr(e,n),e=n.pendingProps;var l=bn(n,oe.current);Zn(n,t),l=gu(null,n,r,e,l,t);var o=wu();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,pe(r)?(o=!0,Ar(n)):o=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,pu(n),l.updater=sl,n.stateNode=l,l._reactInternals=n,xo(n,r,e,t),n=zo(null,n,r,!0,o,t)):(n.tag=0,U&&o&&uu(n),ue(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(Nr(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=xd(r),e=Le(r,e),l){case 0:n=Po(null,n,r,e,t);break e;case 1:n=Ti(null,n,r,e,t);break e;case 11:n=zi(null,n,r,e,t);break e;case 14:n=Li(null,n,r,Le(r.type,e),t);break e}throw Error(y(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Le(r,l),Po(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Le(r,l),Ti(e,n,r,l,t);case 3:e:{if(Ma(n),e===null)throw Error(y(387));r=n.pendingProps,o=n.memoizedState,l=o.element,sa(e,n),Qr(n,r,null,t);var u=n.memoizedState;if(r=u.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},n.updateQueue.baseState=o,n.memoizedState=o,n.flags&256){l=rt(Error(y(423)),n),n=Ri(e,n,r,t,l);break e}else if(r!==l){l=rt(Error(y(424)),n),n=Ri(e,n,r,t,l);break e}else for(ve=un(n.stateNode.containerInfo.firstChild),ye=n,U=!0,Re=null,t=ua(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(et(),r===l){n=Xe(e,n,t);break e}ue(e,n,r,t)}n=n.child}return n;case 5:return aa(n),e===null&&Eo(n),r=n.type,l=n.pendingProps,o=e!==null?e.memoizedProps:null,u=l.children,yo(r,l)?u=null:o!==null&&yo(r,o)&&(n.flags|=32),ja(e,n),ue(e,n,u,t),n.child;case 6:return e===null&&Eo(n),null;case 13:return Da(e,n,t);case 4:return mu(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=nt(n,null,r,t):ue(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Le(r,l),zi(e,n,r,l,t);case 7:return ue(e,n,n.pendingProps,t),n.child;case 8:return ue(e,n,n.pendingProps.children,t),n.child;case 12:return ue(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,o=n.memoizedProps,u=l.value,j(Hr,r._currentValue),r._currentValue=u,o!==null)if(je(o.value,u)){if(o.children===l.children&&!de.current){n=Xe(e,n,t);break e}}else for(o=n.child,o!==null&&(o.return=n);o!==null;){var i=o.dependencies;if(i!==null){u=o.child;for(var s=i.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=We(-1,t&-t),s.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s}}o.lanes|=t,s=o.alternate,s!==null&&(s.lanes|=t),_o(o.return,t,n),i.lanes|=t;break}s=s.next}}else if(o.tag===10)u=o.type===n.type?null:o.child;else if(o.tag===18){if(u=o.return,u===null)throw Error(y(341));u.lanes|=t,i=u.alternate,i!==null&&(i.lanes|=t),_o(u,t,n),u=o.sibling}else u=o.child;if(u!==null)u.return=o;else for(u=o;u!==null;){if(u===n){u=null;break}if(o=u.sibling,o!==null){o.return=u.return,u=o;break}u=u.return}o=u}ue(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,Zn(n,t),l=xe(l),r=r(l),n.flags|=1,ue(e,n,r,t),n.child;case 14:return r=n.type,l=Le(r,n.pendingProps),l=Le(r.type,l),Li(e,n,r,l,t);case 15:return Oa(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Le(r,l),Nr(e,n),n.tag=1,pe(r)?(e=!0,Ar(n)):e=!1,Zn(n,t),La(n,r,l),xo(n,r,l,t),zo(null,n,r,!0,e,t);case 19:return Fa(e,n,t);case 22:return Ia(e,n,t)}throw Error(y(156,n.tag))};function ba(e,n){return Ns(e,n)}function Cd(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _e(e,n,t,r){return new Cd(e,n,t,r)}function Lu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xd(e){if(typeof e=="function")return Lu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Xo)return 11;if(e===Go)return 14}return 2}function fn(e,n){var t=e.alternate;return t===null?(t=_e(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Lr(e,n,t,r,l,o){var u=2;if(r=e,typeof e=="function")Lu(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case Mn:return xn(t.children,l,o,n);case Yo:u=8,l|=8;break;case Xl:return e=_e(12,t,n,l|2),e.elementType=Xl,e.lanes=o,e;case Gl:return e=_e(13,t,n,l),e.elementType=Gl,e.lanes=o,e;case Zl:return e=_e(19,t,n,l),e.elementType=Zl,e.lanes=o,e;case as:return fl(t,l,o,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case is:u=10;break e;case ss:u=9;break e;case Xo:u=11;break e;case Go:u=14;break e;case Je:u=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return n=_e(u,t,n,l),n.elementType=e,n.type=r,n.lanes=o,n}function xn(e,n,t,r){return e=_e(7,e,r,n),e.lanes=t,e}function fl(e,n,t,r){return e=_e(22,e,r,n),e.elementType=as,e.lanes=t,e.stateNode={isHidden:!1},e}function Wl(e,n,t){return e=_e(6,e,null,n),e.lanes=t,e}function Ql(e,n,t){return n=_e(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Nd(e,n,t,r,l){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xl(0),this.expirationTimes=xl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Tu(e,n,t,r,l,o,u,i,s){return e=new Nd(e,n,t,i,s),n===1?(n=1,o===!0&&(n|=8)):n=0,o=_e(3,null,null,n),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},pu(o),e}function Pd(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rc)}catch(e){console.error(e)}}rc(),rs.exports=we;var Od=rs.exports,lc,Hi=Od;lc=Hi.createRoot,Hi.hydrateRoot;const Id="modulepreload",jd=function(e){return"/"+e},Wi={},vl=function(n,t,r){let l=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),i=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));l=Promise.allSettled(t.map(s=>{if(s=jd(s),s in Wi)return;Wi[s]=!0;const c=s.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${h}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":Id,c||(m.as="script"),m.crossOrigin="",m.href=s,i&&m.setAttribute("nonce",i),document.head.appendChild(m),c)return new Promise((p,w)=>{m.addEventListener("load",p),m.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${s}`)))})}))}function o(u){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=u,window.dispatchEvent(i),!i.defaultPrevented)throw u}return l.then(u=>{for(const i of u||[])i.status==="rejected"&&o(i.reason);return n().catch(o)})};function Md(){return F.jsxs("div",{className:"card text-center footer",children:["© 2024"," ",F.jsx("a",{href:"https://hoangnguyendong.dev",target:"_blank",children:"Hoàng Rio"}),F.jsx("br",{}),"Open source at:"," ",F.jsx("a",{href:"https://github.com/hoang-rio/lux-grid-watcher",target:"_blank",children:"Github"})]})}const Kl=Q.memo(Md);function Dd(){return F.jsx("div",{className:"col flex-1 justify-center align-center",children:"Loading..."})}const Fd=Q.lazy(()=>vl(()=>import("./SystemInformation-OlKfNYSc.js"),__vite__mapDeps([0,1,2,3]))),Ud=Q.lazy(()=>vl(()=>import("./Summary-DYwmrEyt.js"),__vite__mapDeps([4,1,2,5,6,7]))),$d=Q.lazy(()=>vl(()=>import("./HourlyChart-D1hNPe7p.js"),__vite__mapDeps([8,5,9]))),Ad=Q.lazy(()=>vl(()=>import("./EnergyChart-CqgWYZ6D.js"),__vite__mapDeps([10,5,6,11]))),Qi=3;function Vd(){const[e,n]=Q.useState(),t=Q.useRef(),r=Q.useRef(!1),l=Q.useRef(0),[o,u]=Q.useState(!0),i=Q.useRef(null),[s,c]=Q.useState(!0),h=Q.useRef(!1),m=Q.useCallback(()=>{if(t.current&&(t.current.CONNECTING||!t.current.CLOSED))return;console.log("[Socket] Connecting to socket server...");const g=new WebSocket("/ws");t.current=g,g.addEventListener("open",()=>{l.current=0,console.log("[Socket] Connected to server"),u(!0)}),g.addEventListener("message",S=>{var f;const I=JSON.parse(S.data);n(I.inverter_data),(f=i.current)==null||f.updateItem(I.hourly_chart_item)}),g.addEventListener("close",()=>{var S;if(document.title="[Offline] LuxPower realtime web viewer",u(!1),!(r.current||(S=t.current)!=null&&S.CONNECTING)){if(l.current>=Qi){console.warn("[Socket] stop reconnect by reached MAX_RECONNECT_COUNT");return}l.current++,console.log("[Socket] connection closed. Reconnecting (%s)...",l.current),m()}}),g.addEventListener("error",S=>{console.error("[Socket] socket error",S)})},[n,u]),p=Q.useCallback(()=>{var g;r.current=!0,(g=t.current)==null||g.close()},[]),w=Q.useCallback(async()=>{try{if(h.current)return;h.current=!0;const S=await(await fetch("/state")).json();n(S),c(!1)}catch(g){console.error("API get state error",g)}h.current=!1},[n,c]);return Q.useEffect(()=>(w(),r.current=!1,m(),window.addEventListener("beforeunload",p),document.addEventListener("visibilitychange",()=>{document.hidden||(w(),l.current>=Qi&&(l.current=0,console.warn("[Socket] reconnect when window active again"),m()))}),p),[m,p,w]),Q.useEffect(()=>{var S;if(!(e!=null&&e.deviceTime))return;const g=(S=e==null?void 0:e.deviceTime)==null?void 0:S.split(" ")[1];document.title=`[${g}] LuxPower realtime web viewer`},[e==null?void 0:e.deviceTime]),s?F.jsxs(F.Fragment,{children:[F.jsx("div",{className:"d-flex card loading align-center justify-center flex-1",children:F.jsx(Dd,{})}),F.jsx(Kl,{})]}):e?F.jsxs(F.Fragment,{children:[F.jsx(Ud,{invertData:e}),F.jsx(Fd,{inverterData:e,isSocketConnected:o,onReconnect:m}),F.jsxs("div",{className:"row chart",children:[F.jsx($d,{ref:i,className:"flex-1 chart-item"}),F.jsx(Ad,{className:"flex-1 chart-item"})]}),F.jsx(Kl,{})]}):F.jsxs(F.Fragment,{children:[F.jsx("div",{className:"d-flex card server-offline align-center justify-center flex-1",children:"Server is offline. Reload page when you make sure that server is online"}),F.jsx(Kl,{})]})}lc(document.getElementById("root")).render(F.jsx(Q.StrictMode,{children:F.jsx(Vd,{})}));export{Dd as L,vl as _,F as j,Q as r}; diff --git a/web_viewer/public/assets/react-apexcharts.min-C1JzOHNX.js b/web_viewer/public/assets/react-apexcharts.min-Dwh-0CXz.js similarity index 99% rename from web_viewer/public/assets/react-apexcharts.min-C1JzOHNX.js rename to web_viewer/public/assets/react-apexcharts.min-Dwh-0CXz.js index 7c89441..de2a206 100644 --- a/web_viewer/public/assets/react-apexcharts.min-C1JzOHNX.js +++ b/web_viewer/public/assets/react-apexcharts.min-Dwh-0CXz.js @@ -1,4 +1,4 @@ -import{r as Qa}from"./index-bn3fLlzU.js";function es(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var aa={};/*! +import{r as Qa}from"./index-2Fv8VwMK.js";function es(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var aa={};/*! * ApexCharts v4.1.0 * (c) 2018-2024 ApexCharts * Released under the MIT License. diff --git a/web_viewer/public/index.html b/web_viewer/public/index.html index 35806c4..28a2265 100644 --- a/web_viewer/public/index.html +++ b/web_viewer/public/index.html @@ -5,7 +5,7 @@ LuxPower realtime web viewer - +