From a33160a45a14e3f426b3fa4cedbd216d66b64809 Mon Sep 17 00:00:00 2001 From: Chengxun Lee <24319042+bclswl0827@users.noreply.github.com> Date: Thu, 28 Dec 2023 19:43:19 +0800 Subject: [PATCH] Remove SQLite support due to incompatibility reason --- CHANGELOG.md | 7 +++++++ README.md | 2 +- VERSION | 2 +- driver/dao/engine.go | 14 -------------- driver/dao/open.go | 5 +++-- frontend/dist/asset-manifest.json | 16 ++++++++-------- frontend/dist/index.html | 2 +- frontend/dist/static/js/252.0f6c5ff7.chunk.js | 1 - frontend/dist/static/js/252.e70521e2.chunk.js | 1 + frontend/dist/static/js/253.b495b4ba.chunk.js | 1 + frontend/dist/static/js/253.e64c7cc8.chunk.js | 1 - frontend/dist/static/js/290.b863e121.chunk.js | 1 + frontend/dist/static/js/290.d405901a.chunk.js | 1 - frontend/dist/static/js/332.587820cf.chunk.js | 1 - frontend/dist/static/js/332.60fa82e5.chunk.js | 1 + frontend/dist/static/js/669.29bd1401.chunk.js | 1 - frontend/dist/static/js/669.daeb5973.chunk.js | 1 + frontend/dist/static/js/912.b91c9724.chunk.js | 1 - frontend/dist/static/js/912.edb28760.chunk.js | 1 + .../js/{main.b75096a0.js => main.0c991c67.js} | 4 ++-- ....LICENSE.txt => main.0c991c67.js.LICENSE.txt} | 0 frontend/src/.env | 4 ++-- frontend/src/src/components/Area.tsx | 8 ++++++-- frontend/src/src/components/Button.tsx | 4 +++- frontend/src/src/components/Card.tsx | 4 +++- frontend/src/src/components/Container.tsx | 4 +++- frontend/src/src/components/Label.tsx | 6 ++++-- frontend/src/src/components/MapBox.tsx | 8 +++++--- frontend/src/src/components/Scroller.tsx | 2 +- frontend/src/src/components/Sidebar.tsx | 2 +- go.mod | 5 ++--- go.sum | 7 ++----- utils/request/get.go | 2 ++ utils/request/post.go | 2 ++ 34 files changed, 65 insertions(+), 57 deletions(-) delete mode 100644 frontend/dist/static/js/252.0f6c5ff7.chunk.js create mode 100644 frontend/dist/static/js/252.e70521e2.chunk.js create mode 100644 frontend/dist/static/js/253.b495b4ba.chunk.js delete mode 100644 frontend/dist/static/js/253.e64c7cc8.chunk.js create mode 100644 frontend/dist/static/js/290.b863e121.chunk.js delete mode 100644 frontend/dist/static/js/290.d405901a.chunk.js delete mode 100644 frontend/dist/static/js/332.587820cf.chunk.js create mode 100644 frontend/dist/static/js/332.60fa82e5.chunk.js delete mode 100644 frontend/dist/static/js/669.29bd1401.chunk.js create mode 100644 frontend/dist/static/js/669.daeb5973.chunk.js delete mode 100644 frontend/dist/static/js/912.b91c9724.chunk.js create mode 100644 frontend/dist/static/js/912.edb28760.chunk.js rename frontend/dist/static/js/{main.b75096a0.js => main.0c991c67.js} (99%) rename frontend/dist/static/js/{main.b75096a0.js.LICENSE.txt => main.0c991c67.js.LICENSE.txt} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40f9795c..8bed5eaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ Starting from v2.2.5, all notable changes to this project will be documented in this file. +## v2.4.1 + + - Skip TLS verification for earthquake event data source API + - Remove SQLite support due to MIPS architecture incompatibility + - Make frontend className conditional rendering logic more predictable + - Correct frontend map anchor point offset + ## v2.4.0 - Optimization on CPU usage metrics calculation diff --git a/README.md b/README.md index 762cf515..69e49b08 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ AnyShake Observer is an open-source, cross-platform software that can be used to monitor, archive, and export seismic data from [AnyShake Explorer](https://github.com/anyshake/explorer) via serial port. It provides a user-friendly web-based interface to visualize and analyze the seismic data. For more professional users, it supports exporting the data to SAC or MiniSEED format for further analysis. -This software is written in Go and TypeScript, which means it can easily port to a variety of OS and CPU architectures, even embedded Linux devices, AnyShake Observer also supports PostgreSQL, MariaDB (MySQL), SQLite, and SQL Server as seismic data archiving engines. We're currently trying to integrate the SEEDLink server on this software (Using pure Go implementation). +This software is written in Go and TypeScript, which means it can easily port to a variety of OS and CPU architectures, even embedded Linux devices, AnyShake Observer also supports PostgreSQL, MariaDB (MySQL) and SQL Server as seismic data archiving engines. We're currently trying to integrate the SEEDLink server on this software (Using pure Go implementation). As of the release of the software documentation, AnyShake has successfully captured more than 40 earthquake events, the furthest captured earthquake event is [M 7.1 - 180 km NNE of Gili Air, Indonesia](https://earthquake.usgs.gov/earthquakes/eventpage/us7000krjx/executive), approximately 4,210 km, by the station located in Chongqing, China. diff --git a/VERSION b/VERSION index 8721bbc4..a3721209 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.4.0 +v2.4.1 diff --git a/driver/dao/engine.go b/driver/dao/engine.go index c5a2f8cd..a8e9a366 100644 --- a/driver/dao/engine.go +++ b/driver/dao/engine.go @@ -5,7 +5,6 @@ import ( "gorm.io/driver/mysql" "gorm.io/driver/postgres" - "gorm.io/driver/sqlite" "gorm.io/driver/sqlserver" "gorm.io/gorm" "gorm.io/gorm/logger" @@ -55,19 +54,6 @@ func (m *MariaDB) openDBConn(host string, port int, username, password, database }) } -type SQLite struct{} - -func (s *SQLite) isCompatible(engine string) bool { - return engine == "sqlite" || engine == "sqlite3" -} - -func (s *SQLite) openDBConn(host string, port int, username, password, database string) (*gorm.DB, error) { - return gorm.Open(sqlite.Open(database), &gorm.Config{ - Logger: logger.Default.LogMode(logger.Silent), - SkipDefaultTransaction: true, // Disable transaction to improve performance - }) -} - type SQLServer struct{} func (s *SQLServer) isCompatible(engine string) bool { diff --git a/driver/dao/open.go b/driver/dao/open.go index 9561a9ae..4f4231bc 100644 --- a/driver/dao/open.go +++ b/driver/dao/open.go @@ -8,8 +8,9 @@ import ( func Open(host string, port int, engine, username, password, database string) (*gorm.DB, error) { engines := []dbEngine{ - &PostgreSQL{}, &MariaDB{}, - &SQLite{}, &SQLServer{}, + &PostgreSQL{}, + &MariaDB{}, + &SQLServer{}, } for _, e := range engines { if e.isCompatible(engine) { diff --git a/frontend/dist/asset-manifest.json b/frontend/dist/asset-manifest.json index d2f31199..2c3c2e56 100644 --- a/frontend/dist/asset-manifest.json +++ b/frontend/dist/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { "main.css": "/static/css/main.40ace055.css", - "main.js": "/static/js/main.b75096a0.js", + "main.js": "/static/js/main.0c991c67.js", "static/css/290.525e2941.chunk.css": "/static/css/290.525e2941.chunk.css", - "static/js/290.d405901a.chunk.js": "/static/js/290.d405901a.chunk.js", + "static/js/290.b863e121.chunk.js": "/static/js/290.b863e121.chunk.js", "static/js/735.26a45829.chunk.js": "/static/js/735.26a45829.chunk.js", - "static/js/252.0f6c5ff7.chunk.js": "/static/js/252.0f6c5ff7.chunk.js", - "static/js/253.e64c7cc8.chunk.js": "/static/js/253.e64c7cc8.chunk.js", - "static/js/332.587820cf.chunk.js": "/static/js/332.587820cf.chunk.js", + "static/js/252.e70521e2.chunk.js": "/static/js/252.e70521e2.chunk.js", + "static/js/253.b495b4ba.chunk.js": "/static/js/253.b495b4ba.chunk.js", + "static/js/332.60fa82e5.chunk.js": "/static/js/332.60fa82e5.chunk.js", "static/js/377.f0e1c66a.chunk.js": "/static/js/377.f0e1c66a.chunk.js", "static/js/453.30461b97.chunk.js": "/static/js/453.30461b97.chunk.js", "static/js/59.a77c052b.chunk.js": "/static/js/59.a77c052b.chunk.js", @@ -16,8 +16,8 @@ "static/js/165.41b9296d.chunk.js": "/static/js/165.41b9296d.chunk.js", "static/js/979.14e4e415.chunk.js": "/static/js/979.14e4e415.chunk.js", "static/js/822.ae40dac1.chunk.js": "/static/js/822.ae40dac1.chunk.js", - "static/js/912.b91c9724.chunk.js": "/static/js/912.b91c9724.chunk.js", - "static/js/669.29bd1401.chunk.js": "/static/js/669.29bd1401.chunk.js", + "static/js/912.edb28760.chunk.js": "/static/js/912.edb28760.chunk.js", + "static/js/669.daeb5973.chunk.js": "/static/js/669.daeb5973.chunk.js", "static/media/gear-solid.svg": "/static/media/gear-solid.bf34f9d52ff44a67baec8a0d4220d3a3.svg", "static/media/bug-solid.svg": "/static/media/bug-solid.7f781f9ddd35c29f11111e36602dcc87.svg", "static/media/earth-americas-solid.svg": "/static/media/earth-americas-solid.4105ee3951f1c7ac60331fccafc17c1f.svg", @@ -48,6 +48,6 @@ }, "entrypoints": [ "static/css/main.40ace055.css", - "static/js/main.b75096a0.js" + "static/js/main.0c991c67.js" ] } \ No newline at end of file diff --git a/frontend/dist/index.html b/frontend/dist/index.html index b5692a2e..7fa50e60 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/frontend/dist/static/js/252.0f6c5ff7.chunk.js b/frontend/dist/static/js/252.0f6c5ff7.chunk.js deleted file mode 100644 index e4ee541b..00000000 --- a/frontend/dist/static/js/252.0f6c5ff7.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkobserver=self.webpackChunkobserver||[]).push([[252],{7486:function(e,t,r){r.d(t,{j:function(){return h},Z:function(){return p}});var n=r(5671),a=r(3144),s=r(136),o=r(9388),i=r(7313),c=r(5590);var l=r.p+"static/media/square-caret-up-solid.0573794ec033f5ce25c1076e3ac596e3.svg",u=r(6417),h=function(e){return e[e.COLLAPSE_DISABLE=0]="COLLAPSE_DISABLE",e[e.COLLAPSE_SHOW=1]="COLLAPSE_SHOW",e[e.COLLAPSE_HIDE=2]="COLLAPSE_HIDE",e}({}),d=function(e){(0,s.Z)(r,e);var t=(0,o.Z)(r);function r(e){var a;return(0,n.Z)(this,r),(a=t.call(this,e)).state={collapsed:!1},a}return(0,a.Z)(r,[{key:"componentDidMount",value:function(){var e=this.props.collapse||h.COLLAPSE_DISABLE;this.setState({collapsed:e===h.COLLAPSE_HIDE})}},{key:"render",value:function(){var e=this,t=this.state.collapsed,r=this.props,n=r.t,a=r.children,s=r.label,o=r.text,i=(this.props.collapse||h.COLLAPSE_DISABLE)!==h.COLLAPSE_DISABLE;return(0,u.jsxs)("div",{className:"mb-4 flex flex-col rounded-xl text-gray-700 shadow-lg",children:[(0,u.jsx)("div",{className:"mx-4 rounded-lg overflow-hidden shadow-lg",children:a}),(0,u.jsxs)("div",{className:"p-4",children:[(0,u.jsxs)("h6",{className:"text-md font-bold text-gray-800 flex ".concat(i&&"cursor-pointer select-none"),onClick:function(){return i&&e.setState({collapsed:!t})},children:[i&&(0,u.jsx)("img",{className:"mx-1 ".concat(t&&"rotate-180"),src:l,alt:""}),n(s.id,s.format)]}),o&&!t&&(0,u.jsx)("span",{className:"text-md",children:n(o.id,o.format).split("\n").map((function(e,t){return(0,u.jsxs)("p",{children:[e,(0,u.jsx)("br",{})]},t)}))})]})]})}}]),r}(i.Component),p=(0,c.Zh)()(d)},4595:function(e,t,r){var n=r(5671),a=r(3144),s=r(136),o=r(9388),i=r(7313),c=r(5590),l=r(6417),u=function(e){(0,s.Z)(r,e);var t=(0,o.Z)(r);function r(e){var a;return(0,n.Z)(this,r),(a=t.call(this,e)).state={isBusy:!1},a}return(0,a.Z)(r,[{key:"render",value:function(){var e=this.props,t=e.t,r=e.className,n=e.label,a=e.onClick;return(0,l.jsx)("button",{className:"w-full text-white font-medium text-sm shadow-lg rounded-lg py-2 ".concat(r),onClick:a,children:t(n.id,n.format)})}}]),r}(i.Component);t.Z=(0,c.Zh)()(u)},3387:function(e,t,r){var n=r(5671),a=r(3144),s=r(136),o=r(9388),i=r(7313),c=r(5590),l=r(6417),u=function(e){(0,s.Z)(r,e);var t=(0,o.Z)(r);function r(){return(0,n.Z)(this,r),t.apply(this,arguments)}return(0,a.Z)(r,[{key:"render",value:function(){var e=this.props,t=e.t,r=e.className,n=e.label,a=e.sublabel,s=e.children,o=Array.isArray(s)?s:[s];return(0,l.jsx)("div",{className:"w-full h-full text-gray-800",children:(0,l.jsxs)("div",{className:"flex flex-col shadow-lg rounded-lg",children:[(0,l.jsxs)("div",{className:"px-4 py-3 font-bold",children:[a&&(0,l.jsx)("h6",{className:"text-gray-500 text-xs",children:t(a.id,a.format)}),(0,l.jsx)("h2",{className:"text-xl",children:t(n.id,n.format)})]}),(0,l.jsx)("div",{className:"p-4 m-2 flex flex-col justify-center gap-4 ".concat(r),children:o.map((function(e,t){return(0,l.jsx)("div",{children:e},t)}))})]})})}}]),r}(i.Component);t.Z=(0,c.Zh)()(u)},3676:function(e,t,r){var n=r(7762),a=r(5671),s=r(3144),o=r(136),i=r(9388),c=r(7313),l=r(5845),u=r(7548),h=r(1259),d=r.n(h),p=r(5590),f=r(6417);d()(l);var v=function(e){(0,o.Z)(r,e);var t=(0,i.Z)(r);function r(e){var n;(0,a.Z)(this,r),(n=t.call(this,e)).chartRef=(0,c.createRef)();var s=n.props,o=s.height,i=s.legend,l=s.tooltip,u=s.zooming,h=s.animation,d=s.lineWidth,p=s.tickInterval,f=s.tickPrecision,v=s.lineColor,m=s.backgroundColor;return n.state={accessibility:{enabled:!1},boost:{enabled:!0,seriesThreshold:3},chart:{zooming:u?{type:"x"}:{},marginTop:20,height:o,animation:h,backgroundColor:m},legend:{enabled:i,itemStyle:{color:"#fff"}},plotOptions:{series:{lineWidth:d,states:{hover:{enabled:!1}}}},xAxis:{labels:{style:{color:"#fff"},format:"{value:%H:%M:%S}"},type:"datetime",tickColor:"#fff",lineColor:v},yAxis:{labels:{style:{color:"#fff"},format:f?"{value:".concat(f,"f}"):"{value:0.2f}"},title:{text:""},opposite:!0,lineColor:v,tickInterval:p},tooltip:{enabled:l,followPointer:!0,followTouchMove:!0,xDateFormat:"%Y-%m-%d %H:%M:%S",padding:12},credits:{enabled:!1},time:{useUTC:!1},title:{text:""}},n}return(0,s.Z)(r,[{key:"componentDidUpdate",value:function(){var e=this.props,t=e.t,r=e.series,a=e.sort,s=e.height;l.setOptions({lang:{resetZoom:t("components.chart.reset_zoom"),resetZoomTitle:t("components.chart.reset_zoom_title")}});var o=this.chartRef.current;if(o){var i=o.chart;if(i){if(s!==i.chartHeight&&i.update({chart:{height:s}}),a)if(r.data)r.data.sort((function(e,t){return e[0]-t[0]}));else if(r.length)for(var c=0,u=r;c0){var l=e[c];e[c]=e[c+1],e[c+1]=l}return e}},2468:function(e,t,r){var n=r(4165),a=r(5861),s=r(6573),o=r(2968),i=r(1677),c=r(1061),l=r(281),u=r(8585),h=r.n(u),d=r(5827),p=function(){var e=(0,a.Z)((0,n.Z)().mark((function e(t){var r,a,u,p,f,v,m,Z,y,g,x,b,w,k,_,j,S,C,E,P,N,T,M,L,D,A,H;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.tag,u=t.header,p=t.body,f=t.blob,v=t.filename,m=t.onUpload,Z=t.onDownload,y=t.cancelToken,g=t.timeout,x=void 0===g?d.Z.app_settings.timeout:g,(b=s.Z.create({timeout:1e3*x})).interceptors.request.use((function(e){return f||(e.headers.Accept="application/json"),e})),b.interceptors.response.use((function(e){return e}),(function(e){return Promise.reject(e)})),w=(0,l.Z)(a),k=null===(r=i.Z.find((function(e){return e.tag===a})))||void 0===r?void 0:r.method,e.prev=6,"ws"!==(null===(_=i.Z.find((function(e){return e.tag===a})))||void 0===_?void 0:_.type)){e.next=10;break}throw new Error("websocket protocol is not supported");case 10:return j="".concat(window.location.protocol).concat((0,c.Z)()),e.next=13,b.request({data:p,method:k,headers:u,url:"".concat(j).concat(w),onUploadProgress:m,onDownloadProgress:Z,cancelToken:null===y||void 0===y?void 0:y.token,responseType:f?"blob":"json"});case 13:if(S=e.sent,C=S.data,E=S.headers,!f){e.next=21;break}return(P=E["content-disposition"])?(T=null===(N=P.split(";").find((function(e){return e.includes("filename=")})))||void 0===N?void 0:N.split("=")[1])?h()(C,T):h()(C,"stream"):v?h()(C,v):h()(C,"stream"),M=(new Date).toISOString(),e.abrupt("return",{time:M,path:w,data:null,error:!1,status:200,message:"Returned data is a blob"});case 21:return e.abrupt("return",C);case 24:return e.prev=24,e.t0=e.catch(6),L=(new Date).toISOString(),D=e.t0,A=D.message,H=D.status,e.abrupt("return",{time:L,message:A,path:w,data:null,error:!(0,o.Mw)(e.t0),status:H||500});case 29:case"end":return e.stop()}}),e,null,[[6,24]])})));return function(t){return e.apply(this,arguments)}}();t.Z=p},5664:function(e,t){t.Z=function(e,t){for(var r=[],n=0;n"),i=function(){var t=o[c];try{if(t.includes("[")||t.includes("]")){var r,a,i=(null===(r=t.match(/^(.*?)\[/))||void 0===r?void 0:r[1])||"",l=(null===(a=t.match(/\[(.*?)\]/))||void 0===a?void 0:a[1])||":";if(!l.length)throw new Error("invalid path given");var u=l.split(":"),h=(0,n.Z)(u,2),d=h[0],p=h[1];s=i.length?s[i].find((function(e){return e[d]===p})):s.find((function(e){return e[d]===p}))}else s=s[t]}catch(f){return{v:e}}},c=0;c1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var n=this,a=arguments.length,s=new Array(a),o=0;ovalue",P.toFixed(2)),(0,ve.Z)(e,"[tag:ehz-intensity]>value","".concat(a.value," ").concat(null===M||void 0===M?void 0:M.intensity(S,P))),(0,ve.Z)(e,"[tag:ehe-pga]>value",N.toFixed(2)),(0,ve.Z)(e,"[tag:ehe-intensity]>value","".concat(a.value," ").concat(null===M||void 0===M?void 0:M.intensity(C,N))),(0,ve.Z)(e,"[tag:ehn-pga]>value",T.toFixed(2)),(0,ve.Z)(e,"[tag:ehn-intensity]>value","".concat(a.value," ").concat(null===M||void 0===M?void 0:M.intensity(E,T))),e},ye=r(7703),ge=r(8146),xe=r(6801),be=r(6135),we=r(8780),ke=r(7486),_e=function(e,t){var r,n=(0,de.Z)(t,"ts","number","asc"),a=(0,ue.Z)(e);try{for(a.s();!(r=a.n()).done;){var s,o=r.value,i=0,c=[],l=(0,ue.Z)(n);try{for(l.s();!(s=l.n()).done;){for(var u=s.value,h=u[o.tag],d=h.length,p=(0!==i?i-u.ts:1e3)/d,f=0;fchart>series>data"),c)}}catch(v){a.e(v)}finally{a.f()}return e},je=r(9439),Se=function(){var e=window.location,t=e.hash,r=e.search,n="hash"===me.Z.app_settings.router?t.split("?")[1]:r.split("?")[1];if(n){var a,s=n.split("&"),o={},i=(0,ue.Z)(s);try{for(i.s();!(a=i.n()).done;){var c=a.value.split("="),l=(0,je.Z)(c,2),u=l[0],h=l[1];o[u]=h}}catch(d){i.e(d)}finally{i.f()}return o}return{}},Ce=r(3250),Ee=r(6573),Pe=r(3152),Ne=function(e){var t,r=(null===(t=e.data)||void 0===t?void 0:t.station)||{};return{station:r.station,network:r.network,location:r.location}},Te=function(e){var t=new Date(e.getUTCFullYear(),0,0),r=e.getTime()-t.getTime();return Math.floor(r/864e5)},Me=function(e){(0,c.Z)(r,e);var t=(0,l.Z)(r);function r(e){var i;return(0,o.Z)(this,r),(i=t.call(this,e)).promisedSetState=function(e){return new Promise((function(t){return i.setState(e,t)}))},i.handleTimeChange=function(e,t){switch(e){case"start":i.setState((function(e){return{history:(0,s.Z)((0,s.Z)({},e.history),{},{start:t})}}));break;case"end":i.setState((function(e){return{history:(0,s.Z)((0,s.Z)({},e.history),{},{end:t})}}))}},i.handleQueryHistory=(0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,s,o,c,l,u,h,d,p,f,v,m,Z,y,g,x,b,w,k;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=i.state.history,r=t.start,a=t.end,s=t.format,o=t.channel,!(a-r<=0)&&r&&a){e.next=7;break}return c=i.props.t,l=c("views.history.toasts.duration_error"),R.ZP.error(l),e.abrupt("return",Promise.reject(l));case 7:return u=i.state.tokens,h=Ee.Z.CancelToken.source,d=h(),u.push(d),p=new Date(r),f=i.props.station.station,v=f.station,m=f.network,Z=f.location,y="".concat(p.getUTCFullYear(),".").concat(Te(p).toString().padStart(3,"0"),".").concat(p.getUTCHours().toString().padStart(2,"0"),".").concat(p.getUTCMinutes().toString().padStart(2,"0"),".").concat(p.getUTCSeconds().toString().padStart(2,"0"),".").concat(p.getUTCMilliseconds().toString().padStart(4,"0"),".").concat(m.slice(0,2),".").concat(v.slice(0,5),".").concat(Z.slice(0,2),".").concat(o,".D.sac"),e.next=17,(0,V.Z)({filename:y,cancelToken:d,body:t,tag:"history",blob:"sac"===s});case 17:if(g=e.sent,x=g.error,b=g.data,!x){e.next=25;break}return w=i.props.t,k=w("sac"===s?"views.history.toasts.export_sac_error":"views.history.toasts.fetch_waveform_error"),"sac"===s&&R.ZP.error(k),e.abrupt("return",Promise.reject(k));case 25:return e.abrupt("return",b);case 26:case"end":return e.stop()}}),e)}))),i.handleQueryEvents=(0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,o,c,l,u,h;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.state,r=t.tokens,a=t.trace,o=Ee.Z.CancelToken.source,c=o(),r.push(c),e.next=6,(0,V.Z)({cancelToken:c,body:a,tag:"trace"});case 6:if(l=e.sent,u=l.error,h=l.data,!u){e.next=11;break}return e.abrupt("return",Promise.reject(u));case 11:i.setState((function(e){return{modal:(0,s.Z)((0,s.Z)({},e.modal),{},{open:!0,values:h.map((function(e){var t=e.distance,r=e.magnitude,n=e.region,a=e.event,s=e.timestamp,o=e.depth,c=e.estimation,l=(0,i.props.t)("views.history.modals.choose_event.template",{event:a,time:(0,ie.Z)(s),magnitude:r.toFixed(1),distance:t.toFixed(1),p_wave:c.p.toFixed(1),s_wave:c.s.toFixed(1),depth:-1!==o?o.toFixed(1):"-"});return[n,[s+1e3*c.p,s+1e3*c.s],l]}))})}}));case 12:case"end":return e.stop()}}),e)}))),i.handleChooseEvent=function(){var e=(0,a.Z)((0,n.Z)().mark((function e(t){var r,a,o,c,l,u,h,d;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=new Date(Array.isArray(t)?t[0]:t).getTime(),a=new Date(Array.isArray(t)?t[1]:t).getTime(),o=i.props.duration.duration,c=r-(o*=500),l=a+o,u=i.props.t,!((l-c)/1e3>3600)){e.next=13;break}return h=u("views.history.toasts.duration_excceed"),R.ZP.error(h),e.abrupt("return",Promise.reject(h));case 13:d=u("views.history.toasts.event_select_success",{p_wave:(0,ie.Z)(r),s_wave:(0,ie.Z)(a)}),R.ZP.success(d,{duration:6e4});case 15:return e.next=17,i.promisedSetState({history:{start:c,end:l,format:"json"},modal:(0,s.Z)((0,s.Z)({},i.state.modal),{},{open:!1})});case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i.handleSelect=(0,Pe.Z)(function(){var e=(0,a.Z)((0,n.Z)().mark((function e(t,r){var a,o;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=i.props.t,o={from:"history",dialog:(0,s.Z)((0,s.Z)({},i.state.select.dialog),{},{open:!1})},e.t0=t,e.next="history"===e.t0?5:"trace"===e.t0?10:15;break;case 5:return e.next=7,i.promisedSetState({select:o,history:(0,s.Z)((0,s.Z)({},i.state.history),{},{channel:r,format:"sac"})});case 7:return e.next=9,R.ZP.promise(i.handleQueryHistory(),{loading:a("views.history.toasts.is_exporting_sac"),success:a("views.history.toasts.export_sac_success"),error:a("views.history.toasts.export_sac_error")});case 9:case 14:return e.abrupt("break",15);case 10:return e.next=12,i.promisedSetState({select:o,trace:(0,s.Z)((0,s.Z)({},i.state.trace),{},{source:r})});case 12:return e.next=14,R.ZP.promise(i.handleQueryEvents(),{loading:a("views.history.toasts.is_fetching_events"),success:a("views.history.toasts.fetch_events_success"),error:a("views.history.toasts.fetch_events_error")});case 15:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),200),i.handleQueryWaveform=(0,Pe.Z)((0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,o,c,l,u,h;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.promisedSetState({history:(0,s.Z)((0,s.Z)({},i.state.history),{},{format:"json"})});case 2:return t=i.props.t,e.next=5,R.ZP.promise(i.handleQueryHistory(),{loading:t("views.history.toasts.is_fetching_waveform"),success:t("views.history.toasts.fetch_waveform_success"),error:t("views.history.toasts.fetch_waveform_error")});case 5:(r=e.sent)&&(a=i.state,o=a.adc,c=a.geophone,l=a.scale,u=Ze(i.state.labels,r,o,c,l),h=_e(i.state.areas,r),i.setState({areas:h,labels:u}));case 7:case"end":return e.stop()}}),e)})))),i.handleQuerySACFile=(0,a.Z)((0,n.Z)().mark((function e(){return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.setState((function(e){return{select:(0,s.Z)((0,s.Z)({},e.select),{},{from:"history",dialog:{open:!0,values:[["Vertical","EHZ"],["East-West","EHE"],["North-South","EHN"]],title:{id:"views.history.selects.choose_channel.title"}}})}}));case 1:case"end":return e.stop()}}),e)}))),i.handleQuerySource=(0,Pe.Z)((0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,o,c,l,u,h,d,p;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.props.t,r={source:"show"},a=i.state.tokens,o=Ee.Z.CancelToken.source,c=o(),a.push(c),l=R.ZP.loading(t("views.history.toasts.is_fetching_source")),e.next=9,(0,V.Z)({cancelToken:c,body:r,tag:"trace"});case 9:if(u=e.sent,h=u.data,d=u.error,R.ZP.remove(l),!d&&h){e.next=19;break}return p=t("views.history.toasts.fetch_source_error"),R.ZP.error(p),e.abrupt("return",Promise.reject(p));case 19:R.ZP.success(t("views.history.toasts.fetch_source_success"));case 20:i.setState((function(e){return{select:{from:"trace",dialog:(0,s.Z)((0,s.Z)({},e.select.dialog),{},{open:!0,values:h.map((function(e){return[e.name,e.value]})),title:{id:"views.history.selects.choose_source.title"}})}}}));case 21:case"end":return e.stop()}}),e)})))),i.handleGetShareLink=(0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,s,o,c,l,u,h,d,p;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(0,Ce.Z)(),r=i.props.t,a=window.location,s=a.hash,o=a.origin,c=i.state.history,l=c.start,u=c.end,h="".concat(o).concat(s.length&&"/#").concat(t),d="".concat(h,"?start=").concat(l,"&end=").concat(u),!(p=navigator.clipboard||{writeText:function(e){var t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}})){e.next=13;break}return e.next=10,p.writeText(d);case 10:R.ZP.success(r("views.history.toasts.copy_link_success")),e.next=14;break;case 13:R.ZP.error(r("views.history.toasts.copy_link_error"));case 14:case"end":return e.stop()}}),e)}))),i.state={tokens:[],trace:{source:"show"},history:{start:0,end:0,format:"json",channel:"EHZ"},areas:[{tag:"ehz",area:{label:{id:"views.history.areas.ehz.label"}},chart:{backgroundColor:"#d97706",lineWidth:1,height:300,series:{name:"EHZ",type:"line",color:"#f1f5f9",data:[]}}},{tag:"ehe",area:{label:{id:"views.history.areas.ehe.label"}},chart:{backgroundColor:"#10b981",lineWidth:1,height:300,series:{name:"EHE",type:"line",color:"#f1f5f9",data:[]}}},{tag:"ehn",area:{label:{id:"views.history.areas.ehn.label"}},chart:{backgroundColor:"#0ea5e9",lineWidth:1,height:300,series:{name:"EHN",type:"line",color:"#f1f5f9",data:[]}}}],select:{from:"history",dialog:{open:!1,title:{id:"views.history.selects.choose_channel.title"},values:[["Vertical","EHZ"],["East-West","EHE"],["North-South","EHN"]]}},modal:{open:!1,values:[],title:{id:"views.history.modals.choose_event.title"}},labels:[{tag:"ehz-pga",label:{id:"views.history.labels.ehz_pga.label"},unit:{id:"views.history.labels.ehz_pga.unit"},value:"0"},{tag:"ehz-intensity",label:{id:"views.history.labels.ehz_intensity.label"},unit:{id:"views.history.labels.ehz_intensity.unit"},value:"-"},{tag:"ehe-pga",label:{id:"views.history.labels.ehe_pga.label"},unit:{id:"views.history.labels.ehe_pga.unit"},value:"0"},{tag:"ehe-intensity",label:{id:"views.history.labels.ehe_intensity.label"},unit:{id:"views.history.labels.ehe_intensity.unit"},value:"-"},{tag:"ehn-pga",label:{id:"views.history.labels.ehn_pga.label"},unit:{id:"views.history.labels.ehn_pga.unit"},value:"0"},{tag:"ehn-intensity",label:{id:"views.history.labels.ehn_intensity.label"},unit:{id:"views.history.labels.ehn_intensity.unit"},value:"-"}],adc:{fullscale:1,resolution:1},geophone:{ehz:1,ehe:1,ehn:1},scale:me.m.property()},i}return(0,i.Z)(r,[{key:"componentDidMount",value:function(){var e=(0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,o,i,c,l,u,h,d,p,f,v,m,Z,y,g,x,b,w,k,_;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.props.adc.adc,a=r.resolution,o=this.props.geophone.geophone,c=(i=o).ehz,l=i.ehe,u=i.ehn,h=this.props.scale.scale,d=this.props.station.station,-1!==a&&c*l*u!==0){e.next=23;break}return e.next=9,(0,V.Z)({tag:"station"});case 9:if(!(p=e.sent).data){e.next=20;break}o=B(p),d=Ne(p),r=G(p),f=this.props,v=f.updateADC,(m=f.updateGeophone)&&m(o),xe.V&&(0,xe.V)(d),v&&v(r),e.next=23;break;case 20:return Z=this.props.t,R.ZP.error(Z("views.history.toasts.metadata_error")),e.abrupt("return");case 23:y=this.props.duration.duration,g=Se(),x=g.start,b=g.end,w=(0,s.Z)((0,s.Z)({},this.state.history),{},{start:x?Number(x):Date.now()-1e3*y,end:b?Number(b):Date.now()}),k=me.Z.app_settings.scales,_=(null===(t=k.find((function(e){return e.property().value===h})))||void 0===t?void 0:t.property())||me.m.property(),this.setState({history:w,adc:r,geophone:o,scale:_});case 29:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"componentWillUnmount",value:function(){this.state.tokens.forEach((function(e){return e.cancel()}))}},{key:"render",value:function(){var e=this,t=this.state,r=t.areas,n=t.select,a=t.modal,o=t.history,i=t.labels,c=n.from,l=n.dialog,u=o.start,y=o.end;return(0,H.jsxs)(v.Z,{children:[(0,H.jsx)(h.Z,{}),(0,H.jsx)(d.Z,{}),(0,H.jsxs)(f.Z,{children:[(0,H.jsx)(p.Z,{}),(0,H.jsxs)(U.Z,{className:"mb-6",layout:"grid",children:[(0,H.jsxs)(I.Z,{className:"h-[360px]",label:{id:"views.history.cards.query_history"},children:[(0,H.jsx)(F,{value:u,label:{id:"views.history.time_pickers.start_time"},onChange:function(t){return e.handleTimeChange("start",t)}}),(0,H.jsx)(F,{value:y,label:{id:"views.history.time_pickers.end_time"},onChange:function(t){return e.handleTimeChange("end",t)}}),(0,H.jsx)(W.Z,{className:"bg-indigo-700 hover:bg-indigo-800",onClick:this.handleQueryWaveform,label:{id:"views.history.buttons.query_waveform"}}),(0,H.jsx)(W.Z,{className:"bg-green-700 hover:bg-green-800",onClick:this.handleQuerySACFile,label:{id:"views.history.buttons.query_sac_file"}}),(0,H.jsx)(W.Z,{className:"bg-yellow-700 hover:bg-yellow-800",onClick:this.handleQuerySource,label:{id:"views.history.buttons.query_source"}}),(0,H.jsx)(W.Z,{className:"bg-cyan-700 hover:bg-cyan-800",onClick:this.handleGetShareLink,label:{id:"views.history.buttons.get_share_link"}})]}),(0,H.jsx)(I.Z,{label:{id:"views.history.cards.analyse_history"},children:(0,H.jsx)(U.Z,{layout:"grid",children:i.map((function(e,t){return(0,H.jsx)(ce.Z,(0,s.Z)({},e),t)}))})})]}),r.map((function(e,t){var r=e.area,n=e.chart;return(0,H.jsx)(ke.Z,(0,s.Z)((0,s.Z)({},r),{},{children:(0,H.jsx)(Q.Z,(0,s.Z)((0,s.Z)({},n),{},{sort:!0,tooltip:!0,zooming:!0,animation:!0,tickPrecision:1,tickInterval:10}))}),t)}))]}),(0,H.jsx)(m.Z,{}),(0,H.jsx)(Z.Z,{}),(0,H.jsx)(q.Z,(0,s.Z)((0,s.Z)({},l),{},{onSelect:function(t){return e.handleSelect(c,t)}})),(0,H.jsx)(oe,(0,s.Z)((0,s.Z)({},a),{},{onSelect:this.handleChooseEvent,onClose:function(){return e.setState({modal:(0,s.Z)((0,s.Z)({},a),{},{open:!1})})}})),(0,H.jsx)(R.x7,{position:"top-center"})]})}}]),r}(u.Component),Le=(0,be.$j)(we.Z,{updateGeophone:ge.V,updateADC:ye.V,updateStation:xe.V})((0,A.Zh)()(Me))}}]); \ No newline at end of file diff --git a/frontend/dist/static/js/252.e70521e2.chunk.js b/frontend/dist/static/js/252.e70521e2.chunk.js new file mode 100644 index 00000000..604a4f1f --- /dev/null +++ b/frontend/dist/static/js/252.e70521e2.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkobserver=self.webpackChunkobserver||[]).push([[252],{7486:function(e,t,r){r.d(t,{j:function(){return h},Z:function(){return p}});var n=r(5671),a=r(3144),s=r(136),o=r(9388),i=r(7313),c=r(5590);var l=r.p+"static/media/square-caret-up-solid.0573794ec033f5ce25c1076e3ac596e3.svg",u=r(6417),h=function(e){return e[e.COLLAPSE_DISABLE=0]="COLLAPSE_DISABLE",e[e.COLLAPSE_SHOW=1]="COLLAPSE_SHOW",e[e.COLLAPSE_HIDE=2]="COLLAPSE_HIDE",e}({}),d=function(e){(0,s.Z)(r,e);var t=(0,o.Z)(r);function r(e){var a;return(0,n.Z)(this,r),(a=t.call(this,e)).state={collapsed:!1},a}return(0,a.Z)(r,[{key:"componentDidMount",value:function(){var e=this.props.collapse||h.COLLAPSE_DISABLE;this.setState({collapsed:e===h.COLLAPSE_HIDE})}},{key:"render",value:function(){var e=this,t=this.state.collapsed,r=this.props,n=r.t,a=r.children,s=r.label,o=r.text,i=(this.props.collapse||h.COLLAPSE_DISABLE)!==h.COLLAPSE_DISABLE;return(0,u.jsxs)("div",{className:"mb-4 flex flex-col rounded-xl text-gray-700 shadow-lg",children:[(0,u.jsx)("div",{className:"mx-4 rounded-lg overflow-hidden shadow-lg",children:a}),(0,u.jsxs)("div",{className:"p-4",children:[(0,u.jsxs)("h6",{className:"text-md font-bold text-gray-800 flex ".concat(i?"cursor-pointer select-none":""),onClick:function(){return i&&e.setState({collapsed:!t})},children:[i&&(0,u.jsx)("img",{className:"mx-1 ".concat(t?"rotate-180":""),src:l,alt:""}),n(s.id,s.format)]}),o&&!t&&(0,u.jsx)("span",{className:"text-md",children:n(o.id,o.format).split("\n").map((function(e,t){return(0,u.jsxs)("p",{children:[e,(0,u.jsx)("br",{})]},t)}))})]})]})}}]),r}(i.Component),p=(0,c.Zh)()(d)},4595:function(e,t,r){var n=r(5671),a=r(3144),s=r(136),o=r(9388),i=r(7313),c=r(5590),l=r(6417),u=function(e){(0,s.Z)(r,e);var t=(0,o.Z)(r);function r(e){var a;return(0,n.Z)(this,r),(a=t.call(this,e)).state={isBusy:!1},a}return(0,a.Z)(r,[{key:"render",value:function(){var e=this.props,t=e.t,r=e.className,n=e.label,a=e.onClick;return(0,l.jsx)("button",{className:"w-full text-white font-medium text-sm shadow-lg rounded-lg py-2 ".concat(null!==r&&void 0!==r?r:""),onClick:a,children:t(n.id,n.format)})}}]),r}(i.Component);t.Z=(0,c.Zh)()(u)},3387:function(e,t,r){var n=r(5671),a=r(3144),s=r(136),o=r(9388),i=r(7313),c=r(5590),l=r(6417),u=function(e){(0,s.Z)(r,e);var t=(0,o.Z)(r);function r(){return(0,n.Z)(this,r),t.apply(this,arguments)}return(0,a.Z)(r,[{key:"render",value:function(){var e=this.props,t=e.t,r=e.className,n=e.label,a=e.sublabel,s=e.children,o=Array.isArray(s)?s:[s];return(0,l.jsx)("div",{className:"w-full h-full text-gray-800",children:(0,l.jsxs)("div",{className:"flex flex-col shadow-lg rounded-lg",children:[(0,l.jsxs)("div",{className:"px-4 py-3 font-bold",children:[a&&(0,l.jsx)("h6",{className:"text-gray-500 text-xs",children:t(a.id,a.format)}),(0,l.jsx)("h2",{className:"text-xl",children:t(n.id,n.format)})]}),(0,l.jsx)("div",{className:"p-4 m-2 flex flex-col justify-center gap-4 ".concat(null!==r&&void 0!==r?r:""),children:o.map((function(e,t){return(0,l.jsx)("div",{children:e},t)}))})]})})}}]),r}(i.Component);t.Z=(0,c.Zh)()(u)},3676:function(e,t,r){var n=r(7762),a=r(5671),s=r(3144),o=r(136),i=r(9388),c=r(7313),l=r(5845),u=r(7548),h=r(1259),d=r.n(h),p=r(5590),f=r(6417);d()(l);var v=function(e){(0,o.Z)(r,e);var t=(0,i.Z)(r);function r(e){var n;(0,a.Z)(this,r),(n=t.call(this,e)).chartRef=(0,c.createRef)();var s=n.props,o=s.height,i=s.legend,l=s.tooltip,u=s.zooming,h=s.animation,d=s.lineWidth,p=s.tickInterval,f=s.tickPrecision,v=s.lineColor,m=s.backgroundColor;return n.state={accessibility:{enabled:!1},boost:{enabled:!0,seriesThreshold:3},chart:{zooming:u?{type:"x"}:{},marginTop:20,height:o,animation:h,backgroundColor:m},legend:{enabled:i,itemStyle:{color:"#fff"}},plotOptions:{series:{lineWidth:d,states:{hover:{enabled:!1}}}},xAxis:{labels:{style:{color:"#fff"},format:"{value:%H:%M:%S}"},type:"datetime",tickColor:"#fff",lineColor:v},yAxis:{labels:{style:{color:"#fff"},format:f?"{value:".concat(f,"f}"):"{value:0.2f}"},title:{text:""},opposite:!0,lineColor:v,tickInterval:p},tooltip:{enabled:l,followPointer:!0,followTouchMove:!0,xDateFormat:"%Y-%m-%d %H:%M:%S",padding:12},credits:{enabled:!1},time:{useUTC:!1},title:{text:""}},n}return(0,s.Z)(r,[{key:"componentDidUpdate",value:function(){var e=this.props,t=e.t,r=e.series,a=e.sort,s=e.height;l.setOptions({lang:{resetZoom:t("components.chart.reset_zoom"),resetZoomTitle:t("components.chart.reset_zoom_title")}});var o=this.chartRef.current;if(o){var i=o.chart;if(i){if(s!==i.chartHeight&&i.update({chart:{height:s}}),a)if(r.data)r.data.sort((function(e,t){return e[0]-t[0]}));else if(r.length)for(var c=0,u=r;c0){var l=e[c];e[c]=e[c+1],e[c+1]=l}return e}},2468:function(e,t,r){var n=r(4165),a=r(5861),s=r(6573),o=r(2968),i=r(1677),c=r(1061),l=r(281),u=r(8585),h=r.n(u),d=r(5827),p=function(){var e=(0,a.Z)((0,n.Z)().mark((function e(t){var r,a,u,p,f,v,m,Z,y,g,x,b,w,k,_,j,S,C,E,P,N,T,M,L,D,A,H;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.tag,u=t.header,p=t.body,f=t.blob,v=t.filename,m=t.onUpload,Z=t.onDownload,y=t.cancelToken,g=t.timeout,x=void 0===g?d.Z.app_settings.timeout:g,(b=s.Z.create({timeout:1e3*x})).interceptors.request.use((function(e){return f||(e.headers.Accept="application/json"),e})),b.interceptors.response.use((function(e){return e}),(function(e){return Promise.reject(e)})),w=(0,l.Z)(a),k=null===(r=i.Z.find((function(e){return e.tag===a})))||void 0===r?void 0:r.method,e.prev=6,"ws"!==(null===(_=i.Z.find((function(e){return e.tag===a})))||void 0===_?void 0:_.type)){e.next=10;break}throw new Error("websocket protocol is not supported");case 10:return j="".concat(window.location.protocol).concat((0,c.Z)()),e.next=13,b.request({data:p,method:k,headers:u,url:"".concat(j).concat(w),onUploadProgress:m,onDownloadProgress:Z,cancelToken:null===y||void 0===y?void 0:y.token,responseType:f?"blob":"json"});case 13:if(S=e.sent,C=S.data,E=S.headers,!f){e.next=21;break}return(P=E["content-disposition"])?(T=null===(N=P.split(";").find((function(e){return e.includes("filename=")})))||void 0===N?void 0:N.split("=")[1])?h()(C,T):h()(C,"stream"):v?h()(C,v):h()(C,"stream"),M=(new Date).toISOString(),e.abrupt("return",{time:M,path:w,data:null,error:!1,status:200,message:"Returned data is a blob"});case 21:return e.abrupt("return",C);case 24:return e.prev=24,e.t0=e.catch(6),L=(new Date).toISOString(),D=e.t0,A=D.message,H=D.status,e.abrupt("return",{time:L,message:A,path:w,data:null,error:!(0,o.Mw)(e.t0),status:H||500});case 29:case"end":return e.stop()}}),e,null,[[6,24]])})));return function(t){return e.apply(this,arguments)}}();t.Z=p},5664:function(e,t){t.Z=function(e,t){for(var r=[],n=0;n"),i=function(){var t=o[c];try{if(t.includes("[")||t.includes("]")){var r,a,i=(null===(r=t.match(/^(.*?)\[/))||void 0===r?void 0:r[1])||"",l=(null===(a=t.match(/\[(.*?)\]/))||void 0===a?void 0:a[1])||":";if(!l.length)throw new Error("invalid path given");var u=l.split(":"),h=(0,n.Z)(u,2),d=h[0],p=h[1];s=i.length?s[i].find((function(e){return e[d]===p})):s.find((function(e){return e[d]===p}))}else s=s[t]}catch(f){return{v:e}}},c=0;c1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var n=this,a=arguments.length,s=new Array(a),o=0;ovalue",P.toFixed(2)),(0,ve.Z)(e,"[tag:ehz-intensity]>value","".concat(a.value," ").concat(null===M||void 0===M?void 0:M.intensity(S,P))),(0,ve.Z)(e,"[tag:ehe-pga]>value",N.toFixed(2)),(0,ve.Z)(e,"[tag:ehe-intensity]>value","".concat(a.value," ").concat(null===M||void 0===M?void 0:M.intensity(C,N))),(0,ve.Z)(e,"[tag:ehn-pga]>value",T.toFixed(2)),(0,ve.Z)(e,"[tag:ehn-intensity]>value","".concat(a.value," ").concat(null===M||void 0===M?void 0:M.intensity(E,T))),e},ye=r(7703),ge=r(8146),xe=r(6801),be=r(6135),we=r(8780),ke=r(7486),_e=function(e,t){var r,n=(0,de.Z)(t,"ts","number","asc"),a=(0,ue.Z)(e);try{for(a.s();!(r=a.n()).done;){var s,o=r.value,i=0,c=[],l=(0,ue.Z)(n);try{for(l.s();!(s=l.n()).done;){for(var u=s.value,h=u[o.tag],d=h.length,p=(0!==i?i-u.ts:1e3)/d,f=0;fchart>series>data"),c)}}catch(v){a.e(v)}finally{a.f()}return e},je=r(9439),Se=function(){var e=window.location,t=e.hash,r=e.search,n="hash"===me.Z.app_settings.router?t.split("?")[1]:r.split("?")[1];if(n){var a,s=n.split("&"),o={},i=(0,ue.Z)(s);try{for(i.s();!(a=i.n()).done;){var c=a.value.split("="),l=(0,je.Z)(c,2),u=l[0],h=l[1];o[u]=h}}catch(d){i.e(d)}finally{i.f()}return o}return{}},Ce=r(3250),Ee=r(6573),Pe=r(3152),Ne=function(e){var t,r=(null===(t=e.data)||void 0===t?void 0:t.station)||{};return{station:r.station,network:r.network,location:r.location}},Te=function(e){var t=new Date(e.getUTCFullYear(),0,0),r=e.getTime()-t.getTime();return Math.floor(r/864e5)},Me=function(e){(0,c.Z)(r,e);var t=(0,l.Z)(r);function r(e){var i;return(0,o.Z)(this,r),(i=t.call(this,e)).promisedSetState=function(e){return new Promise((function(t){return i.setState(e,t)}))},i.handleTimeChange=function(e,t){switch(e){case"start":i.setState((function(e){return{history:(0,s.Z)((0,s.Z)({},e.history),{},{start:t})}}));break;case"end":i.setState((function(e){return{history:(0,s.Z)((0,s.Z)({},e.history),{},{end:t})}}))}},i.handleQueryHistory=(0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,s,o,c,l,u,h,d,p,f,v,m,Z,y,g,x,b,w,k;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=i.state.history,r=t.start,a=t.end,s=t.format,o=t.channel,!(a-r<=0)&&r&&a){e.next=7;break}return c=i.props.t,l=c("views.history.toasts.duration_error"),R.ZP.error(l),e.abrupt("return",Promise.reject(l));case 7:return u=i.state.tokens,h=Ee.Z.CancelToken.source,d=h(),u.push(d),p=new Date(r),f=i.props.station.station,v=f.station,m=f.network,Z=f.location,y="".concat(p.getUTCFullYear(),".").concat(Te(p).toString().padStart(3,"0"),".").concat(p.getUTCHours().toString().padStart(2,"0"),".").concat(p.getUTCMinutes().toString().padStart(2,"0"),".").concat(p.getUTCSeconds().toString().padStart(2,"0"),".").concat(p.getUTCMilliseconds().toString().padStart(4,"0"),".").concat(m.slice(0,2),".").concat(v.slice(0,5),".").concat(Z.slice(0,2),".").concat(o,".D.sac"),e.next=17,(0,V.Z)({filename:y,cancelToken:d,body:t,tag:"history",blob:"sac"===s});case 17:if(g=e.sent,x=g.error,b=g.data,!x){e.next=25;break}return w=i.props.t,k=w("sac"===s?"views.history.toasts.export_sac_error":"views.history.toasts.fetch_waveform_error"),"sac"===s&&R.ZP.error(k),e.abrupt("return",Promise.reject(k));case 25:return e.abrupt("return",b);case 26:case"end":return e.stop()}}),e)}))),i.handleQueryEvents=(0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,o,c,l,u,h;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.state,r=t.tokens,a=t.trace,o=Ee.Z.CancelToken.source,c=o(),r.push(c),e.next=6,(0,V.Z)({cancelToken:c,body:a,tag:"trace"});case 6:if(l=e.sent,u=l.error,h=l.data,!u){e.next=11;break}return e.abrupt("return",Promise.reject(u));case 11:i.setState((function(e){return{modal:(0,s.Z)((0,s.Z)({},e.modal),{},{open:!0,values:h.map((function(e){var t=e.distance,r=e.magnitude,n=e.region,a=e.event,s=e.timestamp,o=e.depth,c=e.estimation,l=(0,i.props.t)("views.history.modals.choose_event.template",{event:a,time:(0,ie.Z)(s),magnitude:r.toFixed(1),distance:t.toFixed(1),p_wave:c.p.toFixed(1),s_wave:c.s.toFixed(1),depth:-1!==o?o.toFixed(1):"-"});return[n,[s+1e3*c.p,s+1e3*c.s],l]}))})}}));case 12:case"end":return e.stop()}}),e)}))),i.handleChooseEvent=function(){var e=(0,a.Z)((0,n.Z)().mark((function e(t){var r,a,o,c,l,u,h,d;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=new Date(Array.isArray(t)?t[0]:t).getTime(),a=new Date(Array.isArray(t)?t[1]:t).getTime(),o=i.props.duration.duration,c=r-(o*=500),l=a+o,u=i.props.t,!((l-c)/1e3>3600)){e.next=13;break}return h=u("views.history.toasts.duration_excceed"),R.ZP.error(h),e.abrupt("return",Promise.reject(h));case 13:d=u("views.history.toasts.event_select_success",{p_wave:(0,ie.Z)(r),s_wave:(0,ie.Z)(a)}),R.ZP.success(d,{duration:6e4});case 15:return e.next=17,i.promisedSetState({history:{start:c,end:l,format:"json"},modal:(0,s.Z)((0,s.Z)({},i.state.modal),{},{open:!1})});case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i.handleSelect=(0,Pe.Z)(function(){var e=(0,a.Z)((0,n.Z)().mark((function e(t,r){var a,o;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=i.props.t,o={from:"history",dialog:(0,s.Z)((0,s.Z)({},i.state.select.dialog),{},{open:!1})},e.t0=t,e.next="history"===e.t0?5:"trace"===e.t0?10:15;break;case 5:return e.next=7,i.promisedSetState({select:o,history:(0,s.Z)((0,s.Z)({},i.state.history),{},{channel:r,format:"sac"})});case 7:return e.next=9,R.ZP.promise(i.handleQueryHistory(),{loading:a("views.history.toasts.is_exporting_sac"),success:a("views.history.toasts.export_sac_success"),error:a("views.history.toasts.export_sac_error")});case 9:case 14:return e.abrupt("break",15);case 10:return e.next=12,i.promisedSetState({select:o,trace:(0,s.Z)((0,s.Z)({},i.state.trace),{},{source:r})});case 12:return e.next=14,R.ZP.promise(i.handleQueryEvents(),{loading:a("views.history.toasts.is_fetching_events"),success:a("views.history.toasts.fetch_events_success"),error:a("views.history.toasts.fetch_events_error")});case 15:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),200),i.handleQueryWaveform=(0,Pe.Z)((0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,o,c,l,u,h;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.promisedSetState({history:(0,s.Z)((0,s.Z)({},i.state.history),{},{format:"json"})});case 2:return t=i.props.t,e.next=5,R.ZP.promise(i.handleQueryHistory(),{loading:t("views.history.toasts.is_fetching_waveform"),success:t("views.history.toasts.fetch_waveform_success"),error:t("views.history.toasts.fetch_waveform_error")});case 5:(r=e.sent)&&(a=i.state,o=a.adc,c=a.geophone,l=a.scale,u=Ze(i.state.labels,r,o,c,l),h=_e(i.state.areas,r),i.setState({areas:h,labels:u}));case 7:case"end":return e.stop()}}),e)})))),i.handleQuerySACFile=(0,a.Z)((0,n.Z)().mark((function e(){return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.setState((function(e){return{select:(0,s.Z)((0,s.Z)({},e.select),{},{from:"history",dialog:{open:!0,values:[["Vertical","EHZ"],["East-West","EHE"],["North-South","EHN"]],title:{id:"views.history.selects.choose_channel.title"}}})}}));case 1:case"end":return e.stop()}}),e)}))),i.handleQuerySource=(0,Pe.Z)((0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,o,c,l,u,h,d,p;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.props.t,r={source:"show"},a=i.state.tokens,o=Ee.Z.CancelToken.source,c=o(),a.push(c),l=R.ZP.loading(t("views.history.toasts.is_fetching_source")),e.next=9,(0,V.Z)({cancelToken:c,body:r,tag:"trace"});case 9:if(u=e.sent,h=u.data,d=u.error,R.ZP.remove(l),!d&&h){e.next=19;break}return p=t("views.history.toasts.fetch_source_error"),R.ZP.error(p),e.abrupt("return",Promise.reject(p));case 19:R.ZP.success(t("views.history.toasts.fetch_source_success"));case 20:i.setState((function(e){return{select:{from:"trace",dialog:(0,s.Z)((0,s.Z)({},e.select.dialog),{},{open:!0,values:h.map((function(e){return[e.name,e.value]})),title:{id:"views.history.selects.choose_source.title"}})}}}));case 21:case"end":return e.stop()}}),e)})))),i.handleGetShareLink=(0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,s,o,c,l,u,h,d,p;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(0,Ce.Z)(),r=i.props.t,a=window.location,s=a.hash,o=a.origin,c=i.state.history,l=c.start,u=c.end,h="".concat(o).concat(s.length&&"/#").concat(t),d="".concat(h,"?start=").concat(l,"&end=").concat(u),!(p=navigator.clipboard||{writeText:function(e){var t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}})){e.next=13;break}return e.next=10,p.writeText(d);case 10:R.ZP.success(r("views.history.toasts.copy_link_success")),e.next=14;break;case 13:R.ZP.error(r("views.history.toasts.copy_link_error"));case 14:case"end":return e.stop()}}),e)}))),i.state={tokens:[],trace:{source:"show"},history:{start:0,end:0,format:"json",channel:"EHZ"},areas:[{tag:"ehz",area:{label:{id:"views.history.areas.ehz.label"}},chart:{backgroundColor:"#d97706",lineWidth:1,height:300,series:{name:"EHZ",type:"line",color:"#f1f5f9",data:[]}}},{tag:"ehe",area:{label:{id:"views.history.areas.ehe.label"}},chart:{backgroundColor:"#10b981",lineWidth:1,height:300,series:{name:"EHE",type:"line",color:"#f1f5f9",data:[]}}},{tag:"ehn",area:{label:{id:"views.history.areas.ehn.label"}},chart:{backgroundColor:"#0ea5e9",lineWidth:1,height:300,series:{name:"EHN",type:"line",color:"#f1f5f9",data:[]}}}],select:{from:"history",dialog:{open:!1,title:{id:"views.history.selects.choose_channel.title"},values:[["Vertical","EHZ"],["East-West","EHE"],["North-South","EHN"]]}},modal:{open:!1,values:[],title:{id:"views.history.modals.choose_event.title"}},labels:[{tag:"ehz-pga",label:{id:"views.history.labels.ehz_pga.label"},unit:{id:"views.history.labels.ehz_pga.unit"},value:"0"},{tag:"ehz-intensity",label:{id:"views.history.labels.ehz_intensity.label"},unit:{id:"views.history.labels.ehz_intensity.unit"},value:"-"},{tag:"ehe-pga",label:{id:"views.history.labels.ehe_pga.label"},unit:{id:"views.history.labels.ehe_pga.unit"},value:"0"},{tag:"ehe-intensity",label:{id:"views.history.labels.ehe_intensity.label"},unit:{id:"views.history.labels.ehe_intensity.unit"},value:"-"},{tag:"ehn-pga",label:{id:"views.history.labels.ehn_pga.label"},unit:{id:"views.history.labels.ehn_pga.unit"},value:"0"},{tag:"ehn-intensity",label:{id:"views.history.labels.ehn_intensity.label"},unit:{id:"views.history.labels.ehn_intensity.unit"},value:"-"}],adc:{fullscale:1,resolution:1},geophone:{ehz:1,ehe:1,ehn:1},scale:me.m.property()},i}return(0,i.Z)(r,[{key:"componentDidMount",value:function(){var e=(0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,o,i,c,l,u,h,d,p,f,v,m,Z,y,g,x,b,w,k,_;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.props.adc.adc,a=r.resolution,o=this.props.geophone.geophone,c=(i=o).ehz,l=i.ehe,u=i.ehn,h=this.props.scale.scale,d=this.props.station.station,-1!==a&&c*l*u!==0){e.next=23;break}return e.next=9,(0,V.Z)({tag:"station"});case 9:if(!(p=e.sent).data){e.next=20;break}o=B(p),d=Ne(p),r=G(p),f=this.props,v=f.updateADC,(m=f.updateGeophone)&&m(o),xe.V&&(0,xe.V)(d),v&&v(r),e.next=23;break;case 20:return Z=this.props.t,R.ZP.error(Z("views.history.toasts.metadata_error")),e.abrupt("return");case 23:y=this.props.duration.duration,g=Se(),x=g.start,b=g.end,w=(0,s.Z)((0,s.Z)({},this.state.history),{},{start:x?Number(x):Date.now()-1e3*y,end:b?Number(b):Date.now()}),k=me.Z.app_settings.scales,_=(null===(t=k.find((function(e){return e.property().value===h})))||void 0===t?void 0:t.property())||me.m.property(),this.setState({history:w,adc:r,geophone:o,scale:_});case 29:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"componentWillUnmount",value:function(){this.state.tokens.forEach((function(e){return e.cancel()}))}},{key:"render",value:function(){var e=this,t=this.state,r=t.areas,n=t.select,a=t.modal,o=t.history,i=t.labels,c=n.from,l=n.dialog,u=o.start,y=o.end;return(0,H.jsxs)(v.Z,{children:[(0,H.jsx)(h.Z,{}),(0,H.jsx)(d.Z,{}),(0,H.jsxs)(f.Z,{children:[(0,H.jsx)(p.Z,{}),(0,H.jsxs)(U.Z,{className:"mb-6",layout:"grid",children:[(0,H.jsxs)(I.Z,{className:"h-[360px]",label:{id:"views.history.cards.query_history"},children:[(0,H.jsx)(F,{value:u,label:{id:"views.history.time_pickers.start_time"},onChange:function(t){return e.handleTimeChange("start",t)}}),(0,H.jsx)(F,{value:y,label:{id:"views.history.time_pickers.end_time"},onChange:function(t){return e.handleTimeChange("end",t)}}),(0,H.jsx)(W.Z,{className:"bg-indigo-700 hover:bg-indigo-800",onClick:this.handleQueryWaveform,label:{id:"views.history.buttons.query_waveform"}}),(0,H.jsx)(W.Z,{className:"bg-green-700 hover:bg-green-800",onClick:this.handleQuerySACFile,label:{id:"views.history.buttons.query_sac_file"}}),(0,H.jsx)(W.Z,{className:"bg-yellow-700 hover:bg-yellow-800",onClick:this.handleQuerySource,label:{id:"views.history.buttons.query_source"}}),(0,H.jsx)(W.Z,{className:"bg-cyan-700 hover:bg-cyan-800",onClick:this.handleGetShareLink,label:{id:"views.history.buttons.get_share_link"}})]}),(0,H.jsx)(I.Z,{label:{id:"views.history.cards.analyse_history"},children:(0,H.jsx)(U.Z,{layout:"grid",children:i.map((function(e,t){return(0,H.jsx)(ce.Z,(0,s.Z)({},e),t)}))})})]}),r.map((function(e,t){var r=e.area,n=e.chart;return(0,H.jsx)(ke.Z,(0,s.Z)((0,s.Z)({},r),{},{children:(0,H.jsx)(Q.Z,(0,s.Z)((0,s.Z)({},n),{},{sort:!0,tooltip:!0,zooming:!0,animation:!0,tickPrecision:1,tickInterval:10}))}),t)}))]}),(0,H.jsx)(m.Z,{}),(0,H.jsx)(Z.Z,{}),(0,H.jsx)(q.Z,(0,s.Z)((0,s.Z)({},l),{},{onSelect:function(t){return e.handleSelect(c,t)}})),(0,H.jsx)(oe,(0,s.Z)((0,s.Z)({},a),{},{onSelect:this.handleChooseEvent,onClose:function(){return e.setState({modal:(0,s.Z)((0,s.Z)({},a),{},{open:!1})})}})),(0,H.jsx)(R.x7,{position:"top-center"})]})}}]),r}(u.Component),Le=(0,be.$j)(we.Z,{updateGeophone:ge.V,updateADC:ye.V,updateStation:xe.V})((0,A.Zh)()(Me))}}]); \ No newline at end of file diff --git a/frontend/dist/static/js/253.b495b4ba.chunk.js b/frontend/dist/static/js/253.b495b4ba.chunk.js new file mode 100644 index 00000000..13f128a9 --- /dev/null +++ b/frontend/dist/static/js/253.b495b4ba.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkobserver=self.webpackChunkobserver||[]).push([[253],{3387:function(e,t,r){var n=r(5671),a=r(3144),o=r(136),i=r(9388),s=r(7313),c=r(5590),l=r(6417),u=function(e){(0,o.Z)(r,e);var t=(0,i.Z)(r);function r(){return(0,n.Z)(this,r),t.apply(this,arguments)}return(0,a.Z)(r,[{key:"render",value:function(){var e=this.props,t=e.t,r=e.className,n=e.label,a=e.sublabel,o=e.children,i=Array.isArray(o)?o:[o];return(0,l.jsx)("div",{className:"w-full h-full text-gray-800",children:(0,l.jsxs)("div",{className:"flex flex-col shadow-lg rounded-lg",children:[(0,l.jsxs)("div",{className:"px-4 py-3 font-bold",children:[a&&(0,l.jsx)("h6",{className:"text-gray-500 text-xs",children:t(a.id,a.format)}),(0,l.jsx)("h2",{className:"text-xl",children:t(n.id,n.format)})]}),(0,l.jsx)("div",{className:"p-4 m-2 flex flex-col justify-center gap-4 ".concat(null!==r&&void 0!==r?r:""),children:i.map((function(e,t){return(0,l.jsx)("div",{children:e},t)}))})]})})}}]),r}(s.Component);t.Z=(0,c.Zh)()(u)},1677:function(e,t){t.Z=[{tag:"station",type:"http",method:"get",uri:"/station"},{tag:"history",type:"http",method:"post",uri:"/history"},{tag:"trace",type:"http",method:"post",uri:"/trace"},{tag:"mseed",type:"http",method:"post",uri:"/mseed"},{tag:"socket",type:"ws",uri:"/socket"}]},281:function(e,t,r){var n=r(1677),a=r(5827);t.Z=function(e){var t,r=a.Z.api_settings,o=r.version,i=r.prefix,s=null===(t=n.Z.find((function(t){return t.tag===e})))||void 0===t?void 0:t.uri;return"".concat(i,"/").concat(o).concat(s)}},7598:function(e,t){t.Z=function(e,t,r,n){if(!e.length)return[];for(var a,o,i=e.length,s=0;s0){var l=e[c];e[c]=e[c+1],e[c+1]=l}return e}},2468:function(e,t,r){var n=r(4165),a=r(5861),o=r(6573),i=r(2968),s=r(1677),c=r(1061),l=r(281),u=r(8585),d=r.n(u),f=r(5827),m=function(){var e=(0,a.Z)((0,n.Z)().mark((function e(t){var r,a,u,m,p,v,h,b,x,Z,g,y,w,k,j,N,C,S,P,I,T,D,M,_,B,q,L;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.tag,u=t.header,m=t.body,p=t.blob,v=t.filename,h=t.onUpload,b=t.onDownload,x=t.cancelToken,Z=t.timeout,g=void 0===Z?f.Z.app_settings.timeout:Z,(y=o.Z.create({timeout:1e3*g})).interceptors.request.use((function(e){return p||(e.headers.Accept="application/json"),e})),y.interceptors.response.use((function(e){return e}),(function(e){return Promise.reject(e)})),w=(0,l.Z)(a),k=null===(r=s.Z.find((function(e){return e.tag===a})))||void 0===r?void 0:r.method,e.prev=6,"ws"!==(null===(j=s.Z.find((function(e){return e.tag===a})))||void 0===j?void 0:j.type)){e.next=10;break}throw new Error("websocket protocol is not supported");case 10:return N="".concat(window.location.protocol).concat((0,c.Z)()),e.next=13,y.request({data:m,method:k,headers:u,url:"".concat(N).concat(w),onUploadProgress:h,onDownloadProgress:b,cancelToken:null===x||void 0===x?void 0:x.token,responseType:p?"blob":"json"});case 13:if(C=e.sent,S=C.data,P=C.headers,!p){e.next=21;break}return(I=P["content-disposition"])?(D=null===(T=I.split(";").find((function(e){return e.includes("filename=")})))||void 0===T?void 0:T.split("=")[1])?d()(S,D):d()(S,"stream"):v?d()(S,v):d()(S,"stream"),M=(new Date).toISOString(),e.abrupt("return",{time:M,path:w,data:null,error:!1,status:200,message:"Returned data is a blob"});case 21:return e.abrupt("return",S);case 24:return e.prev=24,e.t0=e.catch(6),_=(new Date).toISOString(),B=e.t0,q=B.message,L=B.status,e.abrupt("return",{time:_,message:q,path:w,data:null,error:!(0,i.Mw)(e.t0),status:L||500});case 29:case"end":return e.stop()}}),e,null,[[6,24]])})));return function(t){return e.apply(this,arguments)}}();t.Z=m},3152:function(e,t){t.Z=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var n=this,a=arguments.length,o=new Array(a),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.themeId,r=e.defaultTheme,n=e.defaultClassName,a=void 0===n?"MuiBox-root":n,o=e.generateClassName,i=(0,D.ZP)("div",{shouldForwardProp:function(e){return"theme"!==e&&"sx"!==e&&"as"!==e}})(M.Z);return u.forwardRef((function(e,n){var s=(0,B.Z)(r),c=(0,_.Z)(e),l=c.className,u=c.component,d=void 0===u?"div":u,f=(0,I.Z)(c,q);return(0,k.jsx)(i,(0,P.Z)({as:d,ref:n,className:(0,T.Z)(l,o?o(a):a),theme:t&&s[t]||s},f))}))}({themeId:z.Z,defaultTheme:E,defaultClassName:"MuiBox-root",generateClassName:L.Z.generate}),A=F,O=r(168),U=r(1921),W=r(686),X=r(7551),$=r(1615),G=r(9860),H=r(8564),J=r(5469),K=r(7430),Q=r(2298);function V(e){return(0,Q.Z)("MuiLinearProgress",e)}(0,K.Z)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var Y,ee,te,re,ne,ae,oe,ie,se,ce,le,ue,de=["className","color","value","valueBuffer","variant"],fe=(0,W.F4)(oe||(oe=Y||(Y=(0,O.Z)(["\n 0% {\n left: -35%;\n right: 100%;\n }\n\n 60% {\n left: 100%;\n right: -90%;\n }\n\n 100% {\n left: 100%;\n right: -90%;\n }\n"])))),me=(0,W.F4)(ie||(ie=ee||(ee=(0,O.Z)(["\n 0% {\n left: -200%;\n right: 100%;\n }\n\n 60% {\n left: 107%;\n right: -8%;\n }\n\n 100% {\n left: 107%;\n right: -8%;\n }\n"])))),pe=(0,W.F4)(se||(se=te||(te=(0,O.Z)(["\n 0% {\n opacity: 1;\n background-position: 0 -23px;\n }\n\n 60% {\n opacity: 0;\n background-position: 0 -23px;\n }\n\n 100% {\n opacity: 1;\n background-position: -200px -23px;\n }\n"])))),ve=function(e,t){return"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress["".concat(t,"Bg")]:"light"===e.palette.mode?(0,X.$n)(e.palette[t].main,.62):(0,X._j)(e.palette[t].main,.5)},he=(0,H.ZP)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t["color".concat((0,$.Z)(r.color))],t[r.variant]]}})((function(e){var t=e.ownerState,r=e.theme;return(0,P.Z)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:ve(r,t.color)},"inherit"===t.color&&"buffer"!==t.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===t.variant&&{backgroundColor:"transparent"},"query"===t.variant&&{transform:"rotate(180deg)"})})),be=(0,H.ZP)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:function(e,t){var r=e.ownerState;return[t.dashed,t["dashedColor".concat((0,$.Z)(r.color))]]}})((function(e){var t=e.ownerState,r=e.theme,n=ve(r,t.color);return(0,P.Z)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===t.color&&{opacity:.3},{backgroundImage:"radial-gradient(".concat(n," 0%, ").concat(n," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),(0,W.iv)(ce||(ce=re||(re=(0,O.Z)(["\n animation: "," 3s infinite linear;\n "]))),pe)),xe=(0,H.ZP)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:function(e,t){var r=e.ownerState;return[t.bar,t["barColor".concat((0,$.Z)(r.color))],("indeterminate"===r.variant||"query"===r.variant)&&t.bar1Indeterminate,"determinate"===r.variant&&t.bar1Determinate,"buffer"===r.variant&&t.bar1Buffer]}})((function(e){var t=e.ownerState,r=e.theme;return(0,P.Z)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===t.color?"currentColor":(r.vars||r).palette[t.color].main},"determinate"===t.variant&&{transition:"transform .".concat(4,"s linear")},"buffer"===t.variant&&{zIndex:1,transition:"transform .".concat(4,"s linear")})}),(function(e){var t=e.ownerState;return("indeterminate"===t.variant||"query"===t.variant)&&(0,W.iv)(le||(le=ne||(ne=(0,O.Z)(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n "]))),fe)})),Ze=(0,H.ZP)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:function(e,t){var r=e.ownerState;return[t.bar,t["barColor".concat((0,$.Z)(r.color))],("indeterminate"===r.variant||"query"===r.variant)&&t.bar2Indeterminate,"buffer"===r.variant&&t.bar2Buffer]}})((function(e){var t=e.ownerState,r=e.theme;return(0,P.Z)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==t.variant&&{backgroundColor:"inherit"===t.color?"currentColor":(r.vars||r).palette[t.color].main},"inherit"===t.color&&{opacity:.3},"buffer"===t.variant&&{backgroundColor:ve(r,t.color),transition:"transform .".concat(4,"s linear")})}),(function(e){var t=e.ownerState;return("indeterminate"===t.variant||"query"===t.variant)&&(0,W.iv)(ue||(ue=ae||(ae=(0,O.Z)(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n "]))),me)})),ge=u.forwardRef((function(e,t){var r=(0,J.Z)({props:e,name:"MuiLinearProgress"}),n=r.className,a=r.color,o=void 0===a?"primary":a,i=r.value,s=r.valueBuffer,c=r.variant,l=void 0===c?"indeterminate":c,u=(0,I.Z)(r,de),d=(0,P.Z)({},r,{color:o,variant:l}),f=function(e){var t=e.classes,r=e.variant,n=e.color,a={root:["root","color".concat((0,$.Z)(n)),r],dashed:["dashed","dashedColor".concat((0,$.Z)(n))],bar1:["bar","barColor".concat((0,$.Z)(n)),("indeterminate"===r||"query"===r)&&"bar1Indeterminate","determinate"===r&&"bar1Determinate","buffer"===r&&"bar1Buffer"],bar2:["bar","buffer"!==r&&"barColor".concat((0,$.Z)(n)),"buffer"===r&&"color".concat((0,$.Z)(n)),("indeterminate"===r||"query"===r)&&"bar2Indeterminate","buffer"===r&&"bar2Buffer"]};return(0,U.Z)(a,V,t)}(d),m=(0,G.Z)(),p={},v={bar1:{},bar2:{}};if("determinate"===l||"buffer"===l)if(void 0!==i){p["aria-valuenow"]=Math.round(i),p["aria-valuemin"]=0,p["aria-valuemax"]=100;var h=i-100;"rtl"===m.direction&&(h=-h),v.bar1.transform="translateX(".concat(h,"%)")}else 0;if("buffer"===l)if(void 0!==s){var b=(s||0)-100;"rtl"===m.direction&&(b=-b),v.bar2.transform="translateX(".concat(b,"%)")}else 0;return(0,k.jsxs)(he,(0,P.Z)({className:(0,T.Z)(f.root,n),ownerState:d,role:"progressbar"},p,{ref:t},u,{children:["buffer"===l?(0,k.jsx)(be,{className:f.dashed,ownerState:d}):null,(0,k.jsx)(xe,{className:f.bar1,ownerState:d,style:v.bar1}),"determinate"===l?null:(0,k.jsx)(Ze,{className:f.bar2,ownerState:d,style:v.bar2})]}))})),ye=r(1113),we=function(e){(0,c.Z)(r,e);var t=(0,l.Z)(r);function r(){return(0,i.Z)(this,r),t.apply(this,arguments)}return(0,s.Z)(r,[{key:"render",value:function(){var e=this.props,t=e.value,r=e.label,n=e.precision;return(0,k.jsxs)(A,{sx:{display:"flex",alignItems:"center"},children:[(0,k.jsx)(A,{sx:{width:"100%",my:1,mx:2},children:(0,k.jsx)(ge,{className:"rounded-lg",variant:"determinate",color:"secondary",value:t})}),(0,k.jsx)(A,{sx:{minWidth:100},children:(0,k.jsx)(ye.Z,{className:"overflow-scroll",color:"text.secondary",variant:"body2",children:"[".concat(t.toFixed(n||2),"%] ").concat(r)})})]})}}]),r}(u.Component),ke=r(7598),je=r(6573),Ne=r(3152),Ce=function(e){(0,c.Z)(r,e);var t=(0,l.Z)(r);function r(e){var n;return(0,i.Z)(this,r),(n=t.call(this,e)).updateTaskProgress=function(e,t){var r=n.state.tasks,a=r.findIndex((function(t){return t.label===e}));-1===a?r.push({label:e,value:t}):100===t?setTimeout((function(){r.splice(a,1),n.setState({tasks:r})}),1e3):(r[a].value=t,n.setState({tasks:r}))},n.exportMiniSEED=(0,Ne.Z)(function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t){var r,o,i,s,c,l;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,o=n.state.tasks,-1===o.findIndex((function(e){return e.label===r}))){e.next=5;break}return e.abrupt("return");case 5:return i=n.state.tokens,s=je.Z.CancelToken.source,c=s(),i.push(c),l=n.props.t,e.next=12,x.ZP.promise((0,S.Z)({cancelToken:c,blob:!0,tag:"mseed",timeout:3600,filename:r,body:{action:"export",name:r},onDownload:function(e){var t=e.progress;return n.updateTaskProgress(r,100*(t||0))}}),{loading:l("views.export.toasts.is_exporting_mseed"),success:l("views.export.toasts.export_mseed_success"),error:l("views.export.toasts.export_mseed_error")});case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n.state={tokens:[],tasks:[],table:{data:[],actions:[],columns:[{key:"name",label:{id:"views.export.table.columns.name"}},{key:"size",label:{id:"views.export.table.columns.size"}},{key:"time",label:{id:"views.export.table.columns.time"}},{key:"ttl",label:{id:"views.export.table.columns.ttl"}}],placeholder:{id:"views.export.table.placeholder"}}},n}return(0,s.Z)(r,[{key:"componentDidMount",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(){var t,r,o,i,s,c;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.t,r=this.state.table,e.next=4,(0,S.Z)({tag:"mseed",body:{action:"show"}});case 4:o=e.sent,(i=o.data)&&i.length?(x.ZP.success(t("views.export.toasts.fetch_mseed_success")),(0,ke.Z)(i,"time","datetime","desc"),c=[{icon:C,onClick:this.exportMiniSEED,label:{id:"views.export.table.actions.export"}}],this.setState({table:(0,n.Z)((0,n.Z)({},r),{},{data:i,actions:c})})):(s="views.export.toasts.fetch_mseed_error",x.ZP.error(t(s)),this.setState({table:(0,n.Z)((0,n.Z)({},r),{},{placeholder:{id:s}})}));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"componentWillUnmount",value:function(){this.state.tokens.forEach((function(e){return(0,e.cancel)()}))}},{key:"render",value:function(){var e=this.state,t=e.table,r=e.tasks;return(0,k.jsxs)(v.Z,{children:[(0,k.jsx)(f.Z,{}),(0,k.jsx)(p.Z,{}),(0,k.jsxs)(d.Z,{children:[(0,k.jsx)(m.Z,{}),(0,k.jsx)(g.Z,{layout:"none",children:(0,k.jsxs)(Z.Z,{label:{id:"views.export.cards.file_list"},children:[r.map((function(e,t){return!!e.value&&(0,k.jsx)(we,(0,n.Z)({},e),t)})),(0,k.jsx)(N,(0,n.Z)({},t))]})})]}),(0,k.jsx)(h.Z,{}),(0,k.jsx)(b.Z,{}),(0,k.jsx)(x.x7,{position:"top-center"})]})}}]),r}(u.Component),Se=(0,w.Zh)()(Ce)}}]); \ No newline at end of file diff --git a/frontend/dist/static/js/253.e64c7cc8.chunk.js b/frontend/dist/static/js/253.e64c7cc8.chunk.js deleted file mode 100644 index 883ceb18..00000000 --- a/frontend/dist/static/js/253.e64c7cc8.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkobserver=self.webpackChunkobserver||[]).push([[253],{3387:function(e,t,r){var n=r(5671),a=r(3144),o=r(136),i=r(9388),s=r(7313),c=r(5590),l=r(6417),u=function(e){(0,o.Z)(r,e);var t=(0,i.Z)(r);function r(){return(0,n.Z)(this,r),t.apply(this,arguments)}return(0,a.Z)(r,[{key:"render",value:function(){var e=this.props,t=e.t,r=e.className,n=e.label,a=e.sublabel,o=e.children,i=Array.isArray(o)?o:[o];return(0,l.jsx)("div",{className:"w-full h-full text-gray-800",children:(0,l.jsxs)("div",{className:"flex flex-col shadow-lg rounded-lg",children:[(0,l.jsxs)("div",{className:"px-4 py-3 font-bold",children:[a&&(0,l.jsx)("h6",{className:"text-gray-500 text-xs",children:t(a.id,a.format)}),(0,l.jsx)("h2",{className:"text-xl",children:t(n.id,n.format)})]}),(0,l.jsx)("div",{className:"p-4 m-2 flex flex-col justify-center gap-4 ".concat(r),children:i.map((function(e,t){return(0,l.jsx)("div",{children:e},t)}))})]})})}}]),r}(s.Component);t.Z=(0,c.Zh)()(u)},1677:function(e,t){t.Z=[{tag:"station",type:"http",method:"get",uri:"/station"},{tag:"history",type:"http",method:"post",uri:"/history"},{tag:"trace",type:"http",method:"post",uri:"/trace"},{tag:"mseed",type:"http",method:"post",uri:"/mseed"},{tag:"socket",type:"ws",uri:"/socket"}]},281:function(e,t,r){var n=r(1677),a=r(5827);t.Z=function(e){var t,r=a.Z.api_settings,o=r.version,i=r.prefix,s=null===(t=n.Z.find((function(t){return t.tag===e})))||void 0===t?void 0:t.uri;return"".concat(i,"/").concat(o).concat(s)}},7598:function(e,t){t.Z=function(e,t,r,n){if(!e.length)return[];for(var a,o,i=e.length,s=0;s0){var l=e[c];e[c]=e[c+1],e[c+1]=l}return e}},2468:function(e,t,r){var n=r(4165),a=r(5861),o=r(6573),i=r(2968),s=r(1677),c=r(1061),l=r(281),u=r(8585),d=r.n(u),f=r(5827),m=function(){var e=(0,a.Z)((0,n.Z)().mark((function e(t){var r,a,u,m,p,v,h,b,x,Z,g,y,w,k,j,N,C,S,P,I,T,D,M,_,B,q,L;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.tag,u=t.header,m=t.body,p=t.blob,v=t.filename,h=t.onUpload,b=t.onDownload,x=t.cancelToken,Z=t.timeout,g=void 0===Z?f.Z.app_settings.timeout:Z,(y=o.Z.create({timeout:1e3*g})).interceptors.request.use((function(e){return p||(e.headers.Accept="application/json"),e})),y.interceptors.response.use((function(e){return e}),(function(e){return Promise.reject(e)})),w=(0,l.Z)(a),k=null===(r=s.Z.find((function(e){return e.tag===a})))||void 0===r?void 0:r.method,e.prev=6,"ws"!==(null===(j=s.Z.find((function(e){return e.tag===a})))||void 0===j?void 0:j.type)){e.next=10;break}throw new Error("websocket protocol is not supported");case 10:return N="".concat(window.location.protocol).concat((0,c.Z)()),e.next=13,y.request({data:m,method:k,headers:u,url:"".concat(N).concat(w),onUploadProgress:h,onDownloadProgress:b,cancelToken:null===x||void 0===x?void 0:x.token,responseType:p?"blob":"json"});case 13:if(C=e.sent,S=C.data,P=C.headers,!p){e.next=21;break}return(I=P["content-disposition"])?(D=null===(T=I.split(";").find((function(e){return e.includes("filename=")})))||void 0===T?void 0:T.split("=")[1])?d()(S,D):d()(S,"stream"):v?d()(S,v):d()(S,"stream"),M=(new Date).toISOString(),e.abrupt("return",{time:M,path:w,data:null,error:!1,status:200,message:"Returned data is a blob"});case 21:return e.abrupt("return",S);case 24:return e.prev=24,e.t0=e.catch(6),_=(new Date).toISOString(),B=e.t0,q=B.message,L=B.status,e.abrupt("return",{time:_,message:q,path:w,data:null,error:!(0,i.Mw)(e.t0),status:L||500});case 29:case"end":return e.stop()}}),e,null,[[6,24]])})));return function(t){return e.apply(this,arguments)}}();t.Z=m},3152:function(e,t){t.Z=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var n=this,a=arguments.length,o=new Array(a),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.themeId,r=e.defaultTheme,n=e.defaultClassName,a=void 0===n?"MuiBox-root":n,o=e.generateClassName,i=(0,D.ZP)("div",{shouldForwardProp:function(e){return"theme"!==e&&"sx"!==e&&"as"!==e}})(M.Z);return u.forwardRef((function(e,n){var s=(0,B.Z)(r),c=(0,_.Z)(e),l=c.className,u=c.component,d=void 0===u?"div":u,f=(0,I.Z)(c,q);return(0,k.jsx)(i,(0,P.Z)({as:d,ref:n,className:(0,T.Z)(l,o?o(a):a),theme:t&&s[t]||s},f))}))}({themeId:z.Z,defaultTheme:E,defaultClassName:"MuiBox-root",generateClassName:L.Z.generate}),A=F,O=r(168),U=r(1921),W=r(686),X=r(7551),$=r(1615),G=r(9860),H=r(8564),J=r(5469),K=r(7430),Q=r(2298);function V(e){return(0,Q.Z)("MuiLinearProgress",e)}(0,K.Z)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var Y,ee,te,re,ne,ae,oe,ie,se,ce,le,ue,de=["className","color","value","valueBuffer","variant"],fe=(0,W.F4)(oe||(oe=Y||(Y=(0,O.Z)(["\n 0% {\n left: -35%;\n right: 100%;\n }\n\n 60% {\n left: 100%;\n right: -90%;\n }\n\n 100% {\n left: 100%;\n right: -90%;\n }\n"])))),me=(0,W.F4)(ie||(ie=ee||(ee=(0,O.Z)(["\n 0% {\n left: -200%;\n right: 100%;\n }\n\n 60% {\n left: 107%;\n right: -8%;\n }\n\n 100% {\n left: 107%;\n right: -8%;\n }\n"])))),pe=(0,W.F4)(se||(se=te||(te=(0,O.Z)(["\n 0% {\n opacity: 1;\n background-position: 0 -23px;\n }\n\n 60% {\n opacity: 0;\n background-position: 0 -23px;\n }\n\n 100% {\n opacity: 1;\n background-position: -200px -23px;\n }\n"])))),ve=function(e,t){return"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress["".concat(t,"Bg")]:"light"===e.palette.mode?(0,X.$n)(e.palette[t].main,.62):(0,X._j)(e.palette[t].main,.5)},he=(0,H.ZP)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t["color".concat((0,$.Z)(r.color))],t[r.variant]]}})((function(e){var t=e.ownerState,r=e.theme;return(0,P.Z)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:ve(r,t.color)},"inherit"===t.color&&"buffer"!==t.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===t.variant&&{backgroundColor:"transparent"},"query"===t.variant&&{transform:"rotate(180deg)"})})),be=(0,H.ZP)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:function(e,t){var r=e.ownerState;return[t.dashed,t["dashedColor".concat((0,$.Z)(r.color))]]}})((function(e){var t=e.ownerState,r=e.theme,n=ve(r,t.color);return(0,P.Z)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===t.color&&{opacity:.3},{backgroundImage:"radial-gradient(".concat(n," 0%, ").concat(n," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),(0,W.iv)(ce||(ce=re||(re=(0,O.Z)(["\n animation: "," 3s infinite linear;\n "]))),pe)),xe=(0,H.ZP)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:function(e,t){var r=e.ownerState;return[t.bar,t["barColor".concat((0,$.Z)(r.color))],("indeterminate"===r.variant||"query"===r.variant)&&t.bar1Indeterminate,"determinate"===r.variant&&t.bar1Determinate,"buffer"===r.variant&&t.bar1Buffer]}})((function(e){var t=e.ownerState,r=e.theme;return(0,P.Z)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===t.color?"currentColor":(r.vars||r).palette[t.color].main},"determinate"===t.variant&&{transition:"transform .".concat(4,"s linear")},"buffer"===t.variant&&{zIndex:1,transition:"transform .".concat(4,"s linear")})}),(function(e){var t=e.ownerState;return("indeterminate"===t.variant||"query"===t.variant)&&(0,W.iv)(le||(le=ne||(ne=(0,O.Z)(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n "]))),fe)})),Ze=(0,H.ZP)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:function(e,t){var r=e.ownerState;return[t.bar,t["barColor".concat((0,$.Z)(r.color))],("indeterminate"===r.variant||"query"===r.variant)&&t.bar2Indeterminate,"buffer"===r.variant&&t.bar2Buffer]}})((function(e){var t=e.ownerState,r=e.theme;return(0,P.Z)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==t.variant&&{backgroundColor:"inherit"===t.color?"currentColor":(r.vars||r).palette[t.color].main},"inherit"===t.color&&{opacity:.3},"buffer"===t.variant&&{backgroundColor:ve(r,t.color),transition:"transform .".concat(4,"s linear")})}),(function(e){var t=e.ownerState;return("indeterminate"===t.variant||"query"===t.variant)&&(0,W.iv)(ue||(ue=ae||(ae=(0,O.Z)(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n "]))),me)})),ge=u.forwardRef((function(e,t){var r=(0,J.Z)({props:e,name:"MuiLinearProgress"}),n=r.className,a=r.color,o=void 0===a?"primary":a,i=r.value,s=r.valueBuffer,c=r.variant,l=void 0===c?"indeterminate":c,u=(0,I.Z)(r,de),d=(0,P.Z)({},r,{color:o,variant:l}),f=function(e){var t=e.classes,r=e.variant,n=e.color,a={root:["root","color".concat((0,$.Z)(n)),r],dashed:["dashed","dashedColor".concat((0,$.Z)(n))],bar1:["bar","barColor".concat((0,$.Z)(n)),("indeterminate"===r||"query"===r)&&"bar1Indeterminate","determinate"===r&&"bar1Determinate","buffer"===r&&"bar1Buffer"],bar2:["bar","buffer"!==r&&"barColor".concat((0,$.Z)(n)),"buffer"===r&&"color".concat((0,$.Z)(n)),("indeterminate"===r||"query"===r)&&"bar2Indeterminate","buffer"===r&&"bar2Buffer"]};return(0,U.Z)(a,V,t)}(d),m=(0,G.Z)(),p={},v={bar1:{},bar2:{}};if("determinate"===l||"buffer"===l)if(void 0!==i){p["aria-valuenow"]=Math.round(i),p["aria-valuemin"]=0,p["aria-valuemax"]=100;var h=i-100;"rtl"===m.direction&&(h=-h),v.bar1.transform="translateX(".concat(h,"%)")}else 0;if("buffer"===l)if(void 0!==s){var b=(s||0)-100;"rtl"===m.direction&&(b=-b),v.bar2.transform="translateX(".concat(b,"%)")}else 0;return(0,k.jsxs)(he,(0,P.Z)({className:(0,T.Z)(f.root,n),ownerState:d,role:"progressbar"},p,{ref:t},u,{children:["buffer"===l?(0,k.jsx)(be,{className:f.dashed,ownerState:d}):null,(0,k.jsx)(xe,{className:f.bar1,ownerState:d,style:v.bar1}),"determinate"===l?null:(0,k.jsx)(Ze,{className:f.bar2,ownerState:d,style:v.bar2})]}))})),ye=r(1113),we=function(e){(0,c.Z)(r,e);var t=(0,l.Z)(r);function r(){return(0,i.Z)(this,r),t.apply(this,arguments)}return(0,s.Z)(r,[{key:"render",value:function(){var e=this.props,t=e.value,r=e.label,n=e.precision;return(0,k.jsxs)(A,{sx:{display:"flex",alignItems:"center"},children:[(0,k.jsx)(A,{sx:{width:"100%",my:1,mx:2},children:(0,k.jsx)(ge,{className:"rounded-lg",variant:"determinate",color:"secondary",value:t})}),(0,k.jsx)(A,{sx:{minWidth:100},children:(0,k.jsx)(ye.Z,{className:"overflow-scroll",color:"text.secondary",variant:"body2",children:"[".concat(t.toFixed(n||2),"%] ").concat(r)})})]})}}]),r}(u.Component),ke=r(7598),je=r(6573),Ne=r(3152),Ce=function(e){(0,c.Z)(r,e);var t=(0,l.Z)(r);function r(e){var n;return(0,i.Z)(this,r),(n=t.call(this,e)).updateTaskProgress=function(e,t){var r=n.state.tasks,a=r.findIndex((function(t){return t.label===e}));-1===a?r.push({label:e,value:t}):100===t?setTimeout((function(){r.splice(a,1),n.setState({tasks:r})}),1e3):(r[a].value=t,n.setState({tasks:r}))},n.exportMiniSEED=(0,Ne.Z)(function(){var e=(0,o.Z)((0,a.Z)().mark((function e(t){var r,o,i,s,c,l;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,o=n.state.tasks,-1===o.findIndex((function(e){return e.label===r}))){e.next=5;break}return e.abrupt("return");case 5:return i=n.state.tokens,s=je.Z.CancelToken.source,c=s(),i.push(c),l=n.props.t,e.next=12,x.ZP.promise((0,S.Z)({cancelToken:c,blob:!0,tag:"mseed",timeout:3600,filename:r,body:{action:"export",name:r},onDownload:function(e){var t=e.progress;return n.updateTaskProgress(r,100*(t||0))}}),{loading:l("views.export.toasts.is_exporting_mseed"),success:l("views.export.toasts.export_mseed_success"),error:l("views.export.toasts.export_mseed_error")});case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n.state={tokens:[],tasks:[],table:{data:[],actions:[],columns:[{key:"name",label:{id:"views.export.table.columns.name"}},{key:"size",label:{id:"views.export.table.columns.size"}},{key:"time",label:{id:"views.export.table.columns.time"}},{key:"ttl",label:{id:"views.export.table.columns.ttl"}}],placeholder:{id:"views.export.table.placeholder"}}},n}return(0,s.Z)(r,[{key:"componentDidMount",value:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(){var t,r,o,i,s,c;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.t,r=this.state.table,e.next=4,(0,S.Z)({tag:"mseed",body:{action:"show"}});case 4:o=e.sent,(i=o.data)&&i.length?(x.ZP.success(t("views.export.toasts.fetch_mseed_success")),(0,ke.Z)(i,"time","datetime","desc"),c=[{icon:C,onClick:this.exportMiniSEED,label:{id:"views.export.table.actions.export"}}],this.setState({table:(0,n.Z)((0,n.Z)({},r),{},{data:i,actions:c})})):(s="views.export.toasts.fetch_mseed_error",x.ZP.error(t(s)),this.setState({table:(0,n.Z)((0,n.Z)({},r),{},{placeholder:{id:s}})}));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"componentWillUnmount",value:function(){this.state.tokens.forEach((function(e){return(0,e.cancel)()}))}},{key:"render",value:function(){var e=this.state,t=e.table,r=e.tasks;return(0,k.jsxs)(v.Z,{children:[(0,k.jsx)(f.Z,{}),(0,k.jsx)(p.Z,{}),(0,k.jsxs)(d.Z,{children:[(0,k.jsx)(m.Z,{}),(0,k.jsx)(g.Z,{layout:"none",children:(0,k.jsxs)(Z.Z,{label:{id:"views.export.cards.file_list"},children:[r.map((function(e,t){return!!e.value&&(0,k.jsx)(we,(0,n.Z)({},e),t)})),(0,k.jsx)(N,(0,n.Z)({},t))]})})]}),(0,k.jsx)(h.Z,{}),(0,k.jsx)(b.Z,{}),(0,k.jsx)(x.x7,{position:"top-center"})]})}}]),r}(u.Component),Se=(0,w.Zh)()(Ce)}}]); \ No newline at end of file diff --git a/frontend/dist/static/js/290.b863e121.chunk.js b/frontend/dist/static/js/290.b863e121.chunk.js new file mode 100644 index 00000000..ed178de6 --- /dev/null +++ b/frontend/dist/static/js/290.b863e121.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkobserver=self.webpackChunkobserver||[]).push([[290],{1653:function(e,a,t){var r=t(5671),n=t(3144),o=t(136),i=t(9388),s=t(7313),l=t(5590),c=t(6417),u=function(e){(0,o.Z)(t,e);var a=(0,i.Z)(t);function t(){return(0,r.Z)(this,t),a.apply(this,arguments)}return(0,n.Z)(t,[{key:"render",value:function(){var e=this.props,a=e.t,t=e.className,r=e.icon,n=e.label,o=e.value,i=e.unit,s=e.color;return(0,c.jsx)("div",{className:"w-full p-2 ".concat(null!==t&&void 0!==t?t:""),children:(0,c.jsxs)("div",{className:"flex flex-row bg-gradient-to-r rounded-md p-4 shadow-xl ".concat(s?"from-indigo-500 via-purple-500 to-pink-500":"bg-slate-50 hover:bg-slate-100"),children:[r&&(0,c.jsx)("img",{className:"bg-white p-2 rounded-md w-8 h-8 md:w-12 md:h-12 self-center",src:r,alt:""}),(0,c.jsxs)("div",{className:"flex flex-col flex-grow ".concat(r?"ml-5":""),children:[(0,c.jsx)("div",{className:"text-sm whitespace-nowrap ".concat(s?"text-gray-50":"text-gray-600"),children:a(n.id,n.format)}),(0,c.jsx)("div",{className:"text-md font-medium flex-nowrap ".concat(s?"text-gray-100":"text-gray-800"),children:"".concat(o," ").concat(a(i.id,i.format))})]})]})})}}]),t}(s.Component);a.Z=(0,l.Zh)()(u)},1179:function(e,a,t){t.r(a),t.d(a,{default:function(){return ee}});var r=t(1413),n=t(4165),o=t(5861),i=t(5671),s=t(3144),l=t(136),c=t(9388),u=t(7313),d=t(3670),m=t(8669),h=t(5097),v=t(501),f=t(318),p=t(1653),b=t(4656),x=t(7486),Z=t(3676),g=t(1109),w=t(19),y=t(4580),j=t(8153),k=t(9062);var C=t.p+"static/media/location-dot-solid.763794361437464c10451de38cd290f7.svg",N=(t(3331),t(7248)),z=t.n(N),F=t(6417),D=function(e){(0,l.Z)(t,e);var a=(0,c.Z)(t);function t(e){var r;return(0,i.Z)(this,t),(r=a.call(this,e)).state={map:(0,u.createRef)()},r}return(0,s.Z)(t,[{key:"componentDidUpdate",value:function(){var e,a=this.props,t=a.center,r=a.flyTo,n=a.zoom,o=null===(e=this.state.map)||void 0===e?void 0:e.current;o&&r&&(null===o||void 0===o||o.flyTo(t,n))}},{key:"render",value:function(){var e=this.props,a=e.className,t=e.minZoom,r=e.maxZoom,n=e.center,o=e.zoom,i=e.tile,s=e.marker,l=e.dragging,c=e.zoomControl,u=e.scrollWheelZoom,d=this.state.map,m=new(z().Icon)({iconUrl:C,iconAnchor:[9,24],iconSize:[18,25]});return(0,F.jsxs)(y.h,{ref:d,className:"z-0 w-full ".concat(a||""),scrollWheelZoom:u,zoomControl:c,attributionControl:!1,doubleClickZoom:!1,dragging:l,maxZoom:r,minZoom:t,center:n,zoom:o,style:{cursor:"default"},children:[(0,F.jsx)(j.I,{url:i}),s&&(0,F.jsx)(k.J,{position:s,icon:m})]})}}]),t}(u.Component),S=t(284);var A=t.p+"static/media/circle-check-solid.3fb46b8931cbbf9f966175f42b55a087.svg";var E=t.p+"static/media/bug-solid.7f781f9ddd35c29f11111e36602dcc87.svg";var W=t.p+"static/media/paper-plane-solid.e1f40db20eab51657c5490a69c103292.svg";var q=t.p+"static/media/circle-xmark-solid.ea0857c87457d25b161c3a37ad4e3845.svg";var T=t.p+"static/media/hourglass-half-solid.1e8dc3284939ca52c0fd542da1fbf89b.svg";var U=t.p+"static/media/clock-solid.23025348eaec720a2439930b37d677ee.svg",V=t(2468),G=t(4477),I=function(e){(0,l.Z)(t,e);var a=(0,c.Z)(t);function t(){return(0,i.Z)(this,t),a.apply(this,arguments)}return(0,s.Z)(t,[{key:"render",value:function(){var e=this.props,a=e.tag,t=e.timer,r=e.onData,n=e.onError,o=e.onFetch,i=e.children,s=e.retry,l=Array.isArray(i)?i:[i];return(0,F.jsx)(G.Z,{url:a,interval:t,promise:o,retryCount:s,onFailure:n,render:function(){return l},onSuccess:function(e){return r&&r(e),!0}})}}]),t}(u.Component),J=function(e){var a=(e||{}).error,t=(null===e||void 0===e?void 0:e.data)||{},n=t.station,o=t.uptime,i=t.os,s=n||"Unknown",l=s.uuid,c=s.name,u={id:"views.home.banner.error.label"},d={id:"views.home.banner.error.text"};return a||(u={id:"views.home.banner.success.label",format:{station:c}},d={id:"views.home.banner.success.text",format:(0,r.Z)((0,r.Z)({},i),{},{uptime:o,uuid:l})}),{type:a?"error":"success",label:u,text:d}},R=t(7762),$=t(7912),B=function(e,a){var t,r=(0,R.Z)(e);try{for(r.s();!(t=r.n()).done;){var n=t.value,o=a.data.status;(0,$.Z)(e,"[tag:".concat(n.tag,"]>value"),o[n.tag||""])}}catch(i){r.e(i)}finally{r.f()}return e},H=function(e,a){var t=a.data.position,n=t.longitude,o=t.latitude,i=t.elevation;return(0,r.Z)((0,r.Z)({},e),{},{area:(0,r.Z)((0,r.Z)({},e.area),{},{text:{id:"views.home.map.area.text",format:{elevation:i.toFixed(2),latitude:o.toFixed(2),longitude:n.toFixed(2)}}}),instance:(0,r.Z)((0,r.Z)({},e.instance),{},{center:[o,n],marker:[o,n]})})},K=t(3651),L=function(e,a,t){var r,n=(0,R.Z)(e);try{var o=function(){var n,o,i=r.value,s=a.data[i.tag].percent,l=[Date.now(),s],c=null===(n=e.find((function(e){return e.tag===i.tag})))||void 0===n||null===(o=n.chart.series)||void 0===o?void 0:o.data,u=(0,K.Z)(c,l,t);(0,$.Z)(e,"[tag:".concat(i.tag,"]>area>text"),{id:"views.home.areas.".concat(i.tag,".text"),format:{usage:s.toFixed(2)}}),(0,$.Z)(e,"[tag:".concat(i.tag,"]>chart>series>data"),u)};for(n.s();!(r=n.n()).done;)o()}catch(i){n.e(i)}finally{n.f()}return e},M=t(6135),O=t(7703),P=t(8146),Q=t(6801),X=t(8780),Y=t(5590),_=function(e){(0,l.Z)(t,e);var a=(0,c.Z)(t);function t(e){var r;return(0,i.Z)(this,t),(r=a.call(this,e)).handleFetch=function(){var e=(0,o.Z)((0,n.Z)().mark((function e(a){var t;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,V.Z)({tag:a});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),r.handleError=function(){var e=J();r.setState({banner:e})},r.handleData=function(e){var a=e.error,t=J(e);if(!a){var n=e.data,o=n.adc,i=n.geophone,s=n.station,l=r.props,c=l.updateADC,u=l.updateGeophone,d=l.updateStation,m=H(r.state.map,e),h=B(r.state.labels,e),v=L(r.state.areas,e,120);r.setState({labels:h,areas:v,map:m}),u&&u(i),d&&d(s),c&&c(o)}r.setState({banner:t})},r.state={banner:{type:"warning",label:{id:"views.home.banner.warning.label"},text:{id:"views.home.banner.warning.text"}},labels:[{tag:"messages",label:{id:"views.home.labels.messages.label"},unit:{id:"views.home.labels.messages.unit"},value:"0",icon:A,color:!0},{tag:"errors",label:{id:"views.home.labels.errors.label"},unit:{id:"views.home.labels.errors.unit"},value:"0",icon:E,color:!0},{tag:"pushed",label:{id:"views.home.labels.pushed.label"},unit:{id:"views.home.labels.pushed.unit"},value:"0",icon:W,color:!0},{tag:"failures",label:{id:"views.home.labels.failures.label"},unit:{id:"views.home.labels.failures.unit"},value:"0",icon:q,color:!0},{tag:"queued",label:{id:"views.home.labels.queued.label"},unit:{id:"views.home.labels.queued.unit"},value:"0",icon:T,color:!0},{tag:"offset",label:{id:"views.home.labels.offset.label"},unit:{id:"views.home.labels.offset.unit"},value:"0",icon:U,color:!0}],areas:[{tag:"cpu",area:{label:{id:"views.home.areas.cpu.label"},text:{id:"views.home.areas.cpu.text",format:{usage:"0.00"}}},chart:{backgroundColor:"#22c55e",lineWidth:5,height:250,series:{type:"line",color:"#fff",data:[]}}},{tag:"memory",area:{label:{id:"views.home.areas.memory.label"},text:{id:"views.home.areas.memory.text",format:{usage:"0.00"}}},chart:{backgroundColor:"#06b6d4",lineWidth:5,height:250,series:{type:"line",color:"#fff",data:[]}}}],map:{area:{label:{id:"views.home.map.area.label"},text:{id:"views.home.map.area.text",format:{elevation:"0.00",latitude:"0.00",longitude:"0.00"}}},instance:{zoom:6,minZoom:3,maxZoom:7,flyTo:!0,center:[0,0],tile:"/tiles/{z}/{x}/{y}/tile.webp"}}},r}return(0,s.Z)(t,[{key:"render",value:function(){var e=this.state,a=e.banner,t=e.labels,n=e.areas,o=this.state.map,i=o.area,s=o.instance;return(0,F.jsxs)(b.Z,{children:[(0,F.jsx)(d.Z,{}),(0,F.jsx)(m.Z,{}),(0,F.jsxs)(v.Z,{children:[(0,F.jsx)(h.Z,{}),(0,F.jsxs)(I,{timer:1e3,tag:"station",onData:this.handleData,onFetch:this.handleFetch,onError:this.handleError,children:[(0,F.jsx)(f.Z,(0,r.Z)({},a)),(0,F.jsx)(g.Z,{layout:"flex",children:t.map((function(e,a){return(0,F.jsx)(p.Z,(0,r.Z)((0,r.Z)({},e),{},{className:"md:w-1/2 lg:w-1/3"}),a)}))}),(0,F.jsx)(g.Z,{layout:"grid",children:n.map((function(e,a){var t=e.area,n=e.chart;return(0,F.jsx)(x.Z,(0,r.Z)((0,r.Z)({},t),{},{children:(0,F.jsx)(Z.Z,(0,r.Z)({},n))}),a)}))}),(0,F.jsx)(g.Z,{layout:"none",children:(0,F.jsx)(x.Z,{label:i.label,text:i.text,children:(0,F.jsx)(D,(0,r.Z)({className:"h-[400px]"},s))})})]})]}),(0,F.jsx)(S.Z,{}),(0,F.jsx)(w.Z,{})]})}}]),t}(u.Component),ee=(0,M.$j)(X.Z,{updateGeophone:P.V,updateADC:O.V,updateStation:Q.V})((0,Y.Zh)()(_))}}]); \ No newline at end of file diff --git a/frontend/dist/static/js/290.d405901a.chunk.js b/frontend/dist/static/js/290.d405901a.chunk.js deleted file mode 100644 index 0d9e836b..00000000 --- a/frontend/dist/static/js/290.d405901a.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkobserver=self.webpackChunkobserver||[]).push([[290],{1653:function(e,a,t){var r=t(5671),n=t(3144),o=t(136),i=t(9388),s=t(7313),l=t(5590),c=t(6417),u=function(e){(0,o.Z)(t,e);var a=(0,i.Z)(t);function t(){return(0,r.Z)(this,t),a.apply(this,arguments)}return(0,n.Z)(t,[{key:"render",value:function(){var e=this.props,a=e.t,t=e.className,r=e.icon,n=e.label,o=e.value,i=e.unit,s=e.color;return(0,c.jsx)("div",{className:"w-full p-2 ".concat(t),children:(0,c.jsxs)("div",{className:"flex flex-row bg-gradient-to-r rounded-md p-4 shadow-xl ".concat(s?"from-indigo-500 via-purple-500 to-pink-500":"bg-slate-50 hover:bg-slate-100"),children:[r&&(0,c.jsx)("img",{className:"bg-white p-2 rounded-md w-8 h-8 md:w-12 md:h-12 self-center",src:r,alt:""}),(0,c.jsxs)("div",{className:"flex flex-col flex-grow ".concat(r&&"ml-5"),children:[(0,c.jsx)("div",{className:"text-sm whitespace-nowrap ".concat(s?"text-gray-50":"text-gray-600"),children:a(n.id,n.format)}),(0,c.jsx)("div",{className:"text-md font-medium flex-nowrap ".concat(s?"text-gray-100":"text-gray-800"),children:"".concat(o," ").concat(a(i.id,i.format))})]})]})})}}]),t}(s.Component);a.Z=(0,l.Zh)()(u)},1179:function(e,a,t){t.r(a),t.d(a,{default:function(){return ee}});var r=t(1413),n=t(4165),o=t(5861),i=t(5671),s=t(3144),l=t(136),c=t(9388),u=t(7313),d=t(3670),m=t(8669),h=t(5097),v=t(501),f=t(318),p=t(1653),b=t(4656),x=t(7486),Z=t(3676),g=t(1109),w=t(19),y=t(4580),j=t(8153),k=t(9062);var C=t.p+"static/media/location-dot-solid.763794361437464c10451de38cd290f7.svg",N=(t(3331),t(7248)),z=t.n(N),F=t(6417),D=function(e){(0,l.Z)(t,e);var a=(0,c.Z)(t);function t(e){var r;return(0,i.Z)(this,t),(r=a.call(this,e)).state={map:(0,u.createRef)()},r}return(0,s.Z)(t,[{key:"componentDidUpdate",value:function(){var e,a=this.props,t=a.center,r=a.flyTo,n=a.zoom,o=null===(e=this.state.map)||void 0===e?void 0:e.current;o&&r&&(null===o||void 0===o||o.flyTo(t,n))}},{key:"render",value:function(){var e=this.props,a=e.className,t=e.minZoom,r=e.maxZoom,n=e.center,o=e.zoom,i=e.tile,s=e.marker,l=e.dragging,c=e.zoomControl,u=this.state.map,d=new(z().Icon)({iconUrl:C,iconAnchor:[13,28],iconSize:[18,25]});return(0,F.jsxs)(y.h,{ref:u,className:"z-0 w-full ".concat(a),zoomControl:c,attributionControl:!1,scrollWheelZoom:!1,doubleClickZoom:!1,dragging:l,maxZoom:r,minZoom:t,center:n,zoom:o,style:{cursor:"default"},children:[(0,F.jsx)(j.I,{url:i}),s&&(0,F.jsx)(k.J,{position:s,icon:d})]})}}]),t}(u.Component),S=t(284);var A=t.p+"static/media/circle-check-solid.3fb46b8931cbbf9f966175f42b55a087.svg";var E=t.p+"static/media/bug-solid.7f781f9ddd35c29f11111e36602dcc87.svg";var q=t.p+"static/media/paper-plane-solid.e1f40db20eab51657c5490a69c103292.svg";var T=t.p+"static/media/circle-xmark-solid.ea0857c87457d25b161c3a37ad4e3845.svg";var U=t.p+"static/media/hourglass-half-solid.1e8dc3284939ca52c0fd542da1fbf89b.svg";var V=t.p+"static/media/clock-solid.23025348eaec720a2439930b37d677ee.svg",W=t(2468),G=t(4477),I=function(e){(0,l.Z)(t,e);var a=(0,c.Z)(t);function t(){return(0,i.Z)(this,t),a.apply(this,arguments)}return(0,s.Z)(t,[{key:"render",value:function(){var e=this.props,a=e.tag,t=e.timer,r=e.onData,n=e.onError,o=e.onFetch,i=e.children,s=e.retry,l=Array.isArray(i)?i:[i];return(0,F.jsx)(G.Z,{url:a,interval:t,promise:o,retryCount:s,onFailure:n,render:function(){return l},onSuccess:function(e){return r&&r(e),!0}})}}]),t}(u.Component),J=function(e){var a=(e||{}).error,t=(null===e||void 0===e?void 0:e.data)||{},n=t.station,o=t.uptime,i=t.os,s=n||"Unknown",l=s.uuid,c=s.name,u={id:"views.home.banner.error.label"},d={id:"views.home.banner.error.text"};return a||(u={id:"views.home.banner.success.label",format:{station:c}},d={id:"views.home.banner.success.text",format:(0,r.Z)((0,r.Z)({},i),{},{uptime:o,uuid:l})}),{type:a?"error":"success",label:u,text:d}},R=t(7762),$=t(7912),B=function(e,a){var t,r=(0,R.Z)(e);try{for(r.s();!(t=r.n()).done;){var n=t.value,o=a.data.status;(0,$.Z)(e,"[tag:".concat(n.tag,"]>value"),o[n.tag||""])}}catch(i){r.e(i)}finally{r.f()}return e},H=function(e,a){var t=a.data.position,n=t.longitude,o=t.latitude,i=t.elevation;return(0,r.Z)((0,r.Z)({},e),{},{area:(0,r.Z)((0,r.Z)({},e.area),{},{text:{id:"views.home.map.area.text",format:{elevation:i.toFixed(2),latitude:o.toFixed(2),longitude:n.toFixed(2)}}}),instance:(0,r.Z)((0,r.Z)({},e.instance),{},{center:[o,n],marker:[o,n]})})},K=t(3651),L=function(e,a,t){var r,n=(0,R.Z)(e);try{var o=function(){var n,o,i=r.value,s=a.data[i.tag].percent,l=[Date.now(),s],c=null===(n=e.find((function(e){return e.tag===i.tag})))||void 0===n||null===(o=n.chart.series)||void 0===o?void 0:o.data,u=(0,K.Z)(c,l,t);(0,$.Z)(e,"[tag:".concat(i.tag,"]>area>text"),{id:"views.home.areas.".concat(i.tag,".text"),format:{usage:s.toFixed(2)}}),(0,$.Z)(e,"[tag:".concat(i.tag,"]>chart>series>data"),u)};for(n.s();!(r=n.n()).done;)o()}catch(i){n.e(i)}finally{n.f()}return e},M=t(6135),O=t(7703),P=t(8146),Q=t(6801),X=t(8780),Y=t(5590),_=function(e){(0,l.Z)(t,e);var a=(0,c.Z)(t);function t(e){var r;return(0,i.Z)(this,t),(r=a.call(this,e)).handleFetch=function(){var e=(0,o.Z)((0,n.Z)().mark((function e(a){var t;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.Z)({tag:a});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),r.handleError=function(){var e=J();r.setState({banner:e})},r.handleData=function(e){var a=e.error,t=J(e);if(!a){var n=e.data,o=n.adc,i=n.geophone,s=n.station,l=r.props,c=l.updateADC,u=l.updateGeophone,d=l.updateStation,m=H(r.state.map,e),h=B(r.state.labels,e),v=L(r.state.areas,e,120);r.setState({labels:h,areas:v,map:m}),u&&u(i),d&&d(s),c&&c(o)}r.setState({banner:t})},r.state={banner:{type:"warning",label:{id:"views.home.banner.warning.label"},text:{id:"views.home.banner.warning.text"}},labels:[{tag:"messages",label:{id:"views.home.labels.messages.label"},unit:{id:"views.home.labels.messages.unit"},value:"0",icon:A,color:!0},{tag:"errors",label:{id:"views.home.labels.errors.label"},unit:{id:"views.home.labels.errors.unit"},value:"0",icon:E,color:!0},{tag:"pushed",label:{id:"views.home.labels.pushed.label"},unit:{id:"views.home.labels.pushed.unit"},value:"0",icon:q,color:!0},{tag:"failures",label:{id:"views.home.labels.failures.label"},unit:{id:"views.home.labels.failures.unit"},value:"0",icon:T,color:!0},{tag:"queued",label:{id:"views.home.labels.queued.label"},unit:{id:"views.home.labels.queued.unit"},value:"0",icon:U,color:!0},{tag:"offset",label:{id:"views.home.labels.offset.label"},unit:{id:"views.home.labels.offset.unit"},value:"0",icon:V,color:!0}],areas:[{tag:"cpu",area:{label:{id:"views.home.areas.cpu.label"},text:{id:"views.home.areas.cpu.text",format:{usage:"0.00"}}},chart:{backgroundColor:"#22c55e",lineWidth:5,height:250,series:{type:"line",color:"#fff",data:[]}}},{tag:"memory",area:{label:{id:"views.home.areas.memory.label"},text:{id:"views.home.areas.memory.text",format:{usage:"0.00"}}},chart:{backgroundColor:"#06b6d4",lineWidth:5,height:250,series:{type:"line",color:"#fff",data:[]}}}],map:{area:{label:{id:"views.home.map.area.label"},text:{id:"views.home.map.area.text",format:{elevation:"0.00",latitude:"0.00",longitude:"0.00"}}},instance:{zoom:6,minZoom:3,maxZoom:7,flyTo:!0,center:[0,0],tile:"/tiles/{z}/{x}/{y}/tile.webp"}}},r}return(0,s.Z)(t,[{key:"render",value:function(){var e=this.state,a=e.banner,t=e.labels,n=e.areas,o=this.state.map,i=o.area,s=o.instance;return(0,F.jsxs)(b.Z,{children:[(0,F.jsx)(d.Z,{}),(0,F.jsx)(m.Z,{}),(0,F.jsxs)(v.Z,{children:[(0,F.jsx)(h.Z,{}),(0,F.jsxs)(I,{timer:1e3,tag:"station",onData:this.handleData,onFetch:this.handleFetch,onError:this.handleError,children:[(0,F.jsx)(f.Z,(0,r.Z)({},a)),(0,F.jsx)(g.Z,{layout:"flex",children:t.map((function(e,a){return(0,F.jsx)(p.Z,(0,r.Z)((0,r.Z)({},e),{},{className:"md:w-1/2 lg:w-1/3"}),a)}))}),(0,F.jsx)(g.Z,{layout:"grid",children:n.map((function(e,a){var t=e.area,n=e.chart;return(0,F.jsx)(x.Z,(0,r.Z)((0,r.Z)({},t),{},{children:(0,F.jsx)(Z.Z,(0,r.Z)({},n))}),a)}))}),(0,F.jsx)(g.Z,{layout:"none",children:(0,F.jsx)(x.Z,{label:i.label,text:i.text,children:(0,F.jsx)(D,(0,r.Z)({className:"h-[400px]"},s))})})]})]}),(0,F.jsx)(S.Z,{}),(0,F.jsx)(w.Z,{})]})}}]),t}(u.Component),ee=(0,M.$j)(X.Z,{updateGeophone:P.V,updateADC:O.V,updateStation:Q.V})((0,Y.Zh)()(_))}}]); \ No newline at end of file diff --git a/frontend/dist/static/js/332.587820cf.chunk.js b/frontend/dist/static/js/332.587820cf.chunk.js deleted file mode 100644 index 2cf444a2..00000000 --- a/frontend/dist/static/js/332.587820cf.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkobserver=self.webpackChunkobserver||[]).push([[332],{4595:function(t,e,n){var i=n(5671),s=n(3144),r=n(136),o=n(9388),a=n(7313),l=n(5590),u=n(6417),c=function(t){(0,r.Z)(n,t);var e=(0,o.Z)(n);function n(t){var s;return(0,i.Z)(this,n),(s=e.call(this,t)).state={isBusy:!1},s}return(0,s.Z)(n,[{key:"render",value:function(){var t=this.props,e=t.t,n=t.className,i=t.label,s=t.onClick;return(0,u.jsx)("button",{className:"w-full text-white font-medium text-sm shadow-lg rounded-lg py-2 ".concat(n),onClick:s,children:e(i.id,i.format)})}}]),n}(a.Component);e.Z=(0,l.Zh)()(c)},3387:function(t,e,n){var i=n(5671),s=n(3144),r=n(136),o=n(9388),a=n(7313),l=n(5590),u=n(6417),c=function(t){(0,r.Z)(n,t);var e=(0,o.Z)(n);function n(){return(0,i.Z)(this,n),e.apply(this,arguments)}return(0,s.Z)(n,[{key:"render",value:function(){var t=this.props,e=t.t,n=t.className,i=t.label,s=t.sublabel,r=t.children,o=Array.isArray(r)?r:[r];return(0,u.jsx)("div",{className:"w-full h-full text-gray-800",children:(0,u.jsxs)("div",{className:"flex flex-col shadow-lg rounded-lg",children:[(0,u.jsxs)("div",{className:"px-4 py-3 font-bold",children:[s&&(0,u.jsx)("h6",{className:"text-gray-500 text-xs",children:e(s.id,s.format)}),(0,u.jsx)("h2",{className:"text-xl",children:e(i.id,i.format)})]}),(0,u.jsx)("div",{className:"p-4 m-2 flex flex-col justify-center gap-4 ".concat(n),children:o.map((function(t,e){return(0,u.jsx)("div",{children:t},e)}))})]})})}}]),n}(a.Component);e.Z=(0,l.Zh)()(c)},2848:function(t,e,n){var i=n(5671),s=n(3144),r=n(136),o=n(9388),a=n(4469),l=n(3604),u=n(7216),c=n(9840),d=n(3213),p=n(7313),h=n(5590),v=n(6417),f=function(t){(0,r.Z)(n,t);var e=(0,o.Z)(n);function n(){return(0,i.Z)(this,n),e.apply(this,arguments)}return(0,s.Z)(n,[{key:"render",value:function(){var t=this.props,e=t.t,n=t.title,i=t.open,s=t.values,r=t.onClose,o=t.onSelect;return(0,v.jsxs)(a.Z,{onClose:r,open:i,children:[(0,v.jsx)(l.Z,{children:e(n.id,n.format)}),s.map((function(t,e){return(0,v.jsx)(u.ZP,{disableGutters:!0,children:(0,v.jsx)(c.Z,{onClick:function(){return o&&o(t[1])},children:(0,v.jsx)(d.Z,{primary:t[0],secondary:t[3]?t[3]:t[1]})})},e)}))]})}}]),n}(p.Component);e.Z=(0,h.Zh)()(f)},6332:function(t,e,n){n.r(e),n.d(e,{default:function(){return X}});var i=n(1413),s=n(5671),r=n(3144),o=n(136),a=n(9388),l=n(7313),u=n(6059),c=n(501),d=n(19),p=n(3670),h=n(5097),v=n(284),f=n(8669),m=n(4656),Z=n(1109),g=n(3387),x=n(6417),b=function(t){(0,o.Z)(n,t);var e=(0,a.Z)(n);function n(){return(0,s.Z)(this,n),e.apply(this,arguments)}return(0,r.Z)(n,[{key:"render",value:function(){var t=this.props,e=t.className,n=t.children;return(0,x.jsx)("div",{className:e,children:n})}}]),n}(l.Component),w=n(4595),j=n(2848),y=n(5827),C=n(8780),S=n(1236),k=n(5467),_=n(5549),N=n(6135),T=n(5590),P=n(4469),R=n(3604),D=n(6467),q=n(3366),V=n(7462),M=n(4146),F=n(1921),A=n(8564),I=n(5469),B=n(1113),G=n(7430),O=n(2298);function W(t){return(0,O.Z)("MuiDialogContentText",t)}(0,G.Z)("MuiDialogContentText",["root"]);var $=["children","className"],z=(0,A.ZP)(B.Z,{shouldForwardProp:function(t){return(0,A.FO)(t)||"classes"===t},name:"MuiDialogContentText",slot:"Root",overridesResolver:function(t,e){return e.root}})({}),E=l.forwardRef((function(t,e){var n=(0,I.Z)({props:t,name:"MuiDialogContentText"}),i=n.className,s=(0,q.Z)(n,$),r=function(t){var e=t.classes,n=(0,F.Z)({root:["root"]},W,e);return(0,V.Z)({},e,n)}(s);return(0,x.jsx)(z,(0,V.Z)({component:"p",variant:"body1",color:"text.secondary",ref:e,ownerState:s,className:(0,M.Z)(r.root,i)},n,{classes:r}))})),H=n(4505),J=n(4117),K=n(1095),L=function(t){(0,o.Z)(n,t);var e=(0,a.Z)(n);function n(t){var i;return(0,s.Z)(this,n),(i=e.call(this,t)).state={input:(0,l.createRef)()},i}return(0,r.Z)(n,[{key:"render",value:function(){var t,e=this.props,n=e.t,i=e.open,s=e.title,r=e.content,o=e.cancelText,a=e.submitText,l=e.placeholder,u=e.defaultValue,c=e.inputType,d=e.onSubmit,p=e.onClose,h=this.state.input;return(0,x.jsxs)(P.Z,{open:i,children:[(0,x.jsx)(R.Z,{children:n(s.id,s.format)}),(0,x.jsxs)(D.Z,{children:[r&&(0,x.jsx)(E,{children:n(r.id,r.format)}),(0,x.jsx)(H.Z,{autoFocus:!0,fullWidth:!0,inputRef:h,className:"mt-8",type:c,defaultValue:u,label:n(null!==(t=null===l||void 0===l?void 0:l.id)&&void 0!==t?t:"",null===l||void 0===l?void 0:l.format)})]}),(0,x.jsxs)(J.Z,{children:[o&&(0,x.jsx)(K.Z,{onClick:p,children:n(o.id,o.format)}),(0,x.jsx)(K.Z,{onClick:function(){var t,e;return d&&d(null!==(t=null===(e=h.current)||void 0===e?void 0:e.value)&&void 0!==t?t:"")},children:a?n(a.id,a.format):"Submit"})]})]})}}]),n}(l.Component),Q=(0,T.Zh)()(L),U=function(t){(0,o.Z)(n,t);var e=(0,a.Z)(n);function n(t){var r;return(0,s.Z)(this,n),(r=e.call(this,t)).handleInputSubmit=function(t){var e=r.props.t,n=r.state.input.tag,s=r.props,o=s.updateRetention,a=s.updateDuration,l=Math.round(Number(t));switch(n){case"retention":o&&o(l),u.ZP.success(e("views.setting.toasts.retention_set",{retention:l.toString()}));break;case"duration":a&&a(l),u.ZP.success(e("views.setting.toasts.duration_set",{duration:l.toString()}));break;default:return}r.setState((function(t){return{input:(0,i.Z)((0,i.Z)({},t.input),{},{open:!1})}})),setTimeout((function(){return window.location.reload()}),1e3)},r.handleRetentionChange=function(){r.setState((function(t){return{input:(0,i.Z)((0,i.Z)({},t.input),{},{open:!0,tag:"retention",title:{id:"views.setting.inputs.waveform_retention.title"},content:{id:"views.setting.inputs.waveform_retention.content"},placeholder:{id:"views.setting.inputs.waveform_retention.placeholder"},submitText:{id:"views.setting.inputs.waveform_retention.submit"},defaultValue:r.props.retention.retention.toString()})}}))},r.handleDurationChange=function(){r.setState((function(t){return{input:(0,i.Z)((0,i.Z)({},t.input),{},{open:!0,tag:"duration",title:{id:"views.setting.inputs.query_duration.title"},content:{id:"views.setting.inputs.query_duration.content"},placeholder:{id:"views.setting.inputs.query_duration.placeholder"},submitText:{id:"views.setting.inputs.query_duration.submit"},defaultValue:r.props.duration.duration.toString()})}}))},r.handleSelectScale=function(){r.setState((function(t){return{select:(0,i.Z)((0,i.Z)({},t.select),{},{open:!0})}}))},r.handleScaleChange=function(t){var e,n=null===(e=y.Z.app_settings.scales.find((function(e){return e.property().value===t})))||void 0===e?void 0:e.property();r.setState({select:(0,i.Z)((0,i.Z)({},r.state.select),{},{open:!1})});var s=r.props,o=s.t,a=s.updateScale;a&&a((null===n||void 0===n?void 0:n.value)||y.m.property().value),u.ZP.success(o("views.setting.toasts.scale_changed",{scale:t})),setTimeout((function(){return window.location.reload()}),1e3)},r.handlePurgeCache=function(){var t=r.props.t;localStorage.clear(),u.ZP.success(t("views.setting.toasts.cache_purged")),setTimeout((function(){return window.location.reload()}),1e3)},r.state={cards:[{label:{id:"views.setting.cards.waveform_retention"},content:{id:"views.setting.contents.waveform_retention",format:{retention:r.props.retention.retention.toString()}},button:{id:"views.setting.buttons.waveform_retention"},className:"bg-teal-700 hover:bg-teal-800",onClick:r.handleRetentionChange},{label:{id:"views.setting.cards.query_duration"},content:{id:"views.setting.contents.query_duration",format:{duration:r.props.duration.duration.toString()}},button:{id:"views.setting.buttons.query_duration"},className:"bg-lime-700 hover:bg-lime-800",onClick:r.handleDurationChange},{label:{id:"views.setting.cards.select_scale"},button:{id:"views.setting.buttons.select_scale"},className:"bg-sky-700 hover:bg-sky-800",content:{id:"views.setting.contents.select_scale",format:{scale:t.scale.scale}},onClick:r.handleSelectScale},{label:{id:"views.setting.cards.purge_cache"},content:{id:"views.setting.contents.purge_cache"},button:{id:"views.setting.buttons.purge_cache"},className:"bg-pink-700 hover:bg-pink-800",onClick:r.handlePurgeCache}],select:{open:!1,title:{id:"views.setting.selects.choose_scale.title"},values:y.Z.app_settings.scales.map((function(t){return[t.property().name,t.property().value]}))},input:{open:!1,title:{id:""},inputType:"number",submitText:{id:""},onSubmit:r.handleInputSubmit}},r}return(0,r.Z)(n,[{key:"render",value:function(){var t=this.props.t,e=this.state,n=e.select,s=e.cards,r=e.input;return(0,x.jsxs)(m.Z,{children:[(0,x.jsx)(p.Z,{}),(0,x.jsx)(f.Z,{}),(0,x.jsxs)(c.Z,{children:[(0,x.jsx)(h.Z,{}),(0,x.jsx)(Z.Z,{layout:"grid",children:s.map((function(e,n){var i=e.label,s=e.content,r=e.onClick,o=e.button,a=e.className;return(0,x.jsxs)(g.Z,{className:"min-h-[40vh]",label:i,children:[t(s.id,s.format).split("\n").map((function(t,e){return(0,x.jsx)(b,{className:"mb-3",children:t},e)})),(0,x.jsx)(w.Z,{className:a,onClick:r,label:o})]},n)}))})]}),(0,x.jsx)(v.Z,{}),(0,x.jsx)(d.Z,{}),(0,x.jsx)(j.Z,(0,i.Z)((0,i.Z)({},n),{},{onSelect:this.handleScaleChange})),(0,x.jsx)(Q,(0,i.Z)({},r)),(0,x.jsx)(u.x7,{position:"top-center"})]})}}]),n}(l.Component),X=(0,N.$j)(C.Z,{updateScale:S.V,updateRetention:k.V,updateDuration:_.V})((0,T.Zh)()(U))}}]); \ No newline at end of file diff --git a/frontend/dist/static/js/332.60fa82e5.chunk.js b/frontend/dist/static/js/332.60fa82e5.chunk.js new file mode 100644 index 00000000..dad956f7 --- /dev/null +++ b/frontend/dist/static/js/332.60fa82e5.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkobserver=self.webpackChunkobserver||[]).push([[332],{4595:function(t,e,n){var i=n(5671),s=n(3144),r=n(136),o=n(9388),a=n(7313),l=n(5590),u=n(6417),c=function(t){(0,r.Z)(n,t);var e=(0,o.Z)(n);function n(t){var s;return(0,i.Z)(this,n),(s=e.call(this,t)).state={isBusy:!1},s}return(0,s.Z)(n,[{key:"render",value:function(){var t=this.props,e=t.t,n=t.className,i=t.label,s=t.onClick;return(0,u.jsx)("button",{className:"w-full text-white font-medium text-sm shadow-lg rounded-lg py-2 ".concat(null!==n&&void 0!==n?n:""),onClick:s,children:e(i.id,i.format)})}}]),n}(a.Component);e.Z=(0,l.Zh)()(c)},3387:function(t,e,n){var i=n(5671),s=n(3144),r=n(136),o=n(9388),a=n(7313),l=n(5590),u=n(6417),c=function(t){(0,r.Z)(n,t);var e=(0,o.Z)(n);function n(){return(0,i.Z)(this,n),e.apply(this,arguments)}return(0,s.Z)(n,[{key:"render",value:function(){var t=this.props,e=t.t,n=t.className,i=t.label,s=t.sublabel,r=t.children,o=Array.isArray(r)?r:[r];return(0,u.jsx)("div",{className:"w-full h-full text-gray-800",children:(0,u.jsxs)("div",{className:"flex flex-col shadow-lg rounded-lg",children:[(0,u.jsxs)("div",{className:"px-4 py-3 font-bold",children:[s&&(0,u.jsx)("h6",{className:"text-gray-500 text-xs",children:e(s.id,s.format)}),(0,u.jsx)("h2",{className:"text-xl",children:e(i.id,i.format)})]}),(0,u.jsx)("div",{className:"p-4 m-2 flex flex-col justify-center gap-4 ".concat(null!==n&&void 0!==n?n:""),children:o.map((function(t,e){return(0,u.jsx)("div",{children:t},e)}))})]})})}}]),n}(a.Component);e.Z=(0,l.Zh)()(c)},2848:function(t,e,n){var i=n(5671),s=n(3144),r=n(136),o=n(9388),a=n(4469),l=n(3604),u=n(7216),c=n(9840),d=n(3213),p=n(7313),h=n(5590),v=n(6417),f=function(t){(0,r.Z)(n,t);var e=(0,o.Z)(n);function n(){return(0,i.Z)(this,n),e.apply(this,arguments)}return(0,s.Z)(n,[{key:"render",value:function(){var t=this.props,e=t.t,n=t.title,i=t.open,s=t.values,r=t.onClose,o=t.onSelect;return(0,v.jsxs)(a.Z,{onClose:r,open:i,children:[(0,v.jsx)(l.Z,{children:e(n.id,n.format)}),s.map((function(t,e){return(0,v.jsx)(u.ZP,{disableGutters:!0,children:(0,v.jsx)(c.Z,{onClick:function(){return o&&o(t[1])},children:(0,v.jsx)(d.Z,{primary:t[0],secondary:t[3]?t[3]:t[1]})})},e)}))]})}}]),n}(p.Component);e.Z=(0,h.Zh)()(f)},6332:function(t,e,n){n.r(e),n.d(e,{default:function(){return X}});var i=n(1413),s=n(5671),r=n(3144),o=n(136),a=n(9388),l=n(7313),u=n(6059),c=n(501),d=n(19),p=n(3670),h=n(5097),v=n(284),f=n(8669),m=n(4656),Z=n(1109),g=n(3387),x=n(6417),b=function(t){(0,o.Z)(n,t);var e=(0,a.Z)(n);function n(){return(0,s.Z)(this,n),e.apply(this,arguments)}return(0,r.Z)(n,[{key:"render",value:function(){var t=this.props,e=t.className,n=t.children;return(0,x.jsx)("div",{className:e,children:n})}}]),n}(l.Component),w=n(4595),j=n(2848),y=n(5827),C=n(8780),S=n(1236),k=n(5467),_=n(5549),N=n(6135),T=n(5590),P=n(4469),R=n(3604),D=n(6467),q=n(3366),V=n(7462),M=n(4146),F=n(1921),A=n(8564),I=n(5469),B=n(1113),G=n(7430),O=n(2298);function W(t){return(0,O.Z)("MuiDialogContentText",t)}(0,G.Z)("MuiDialogContentText",["root"]);var $=["children","className"],z=(0,A.ZP)(B.Z,{shouldForwardProp:function(t){return(0,A.FO)(t)||"classes"===t},name:"MuiDialogContentText",slot:"Root",overridesResolver:function(t,e){return e.root}})({}),E=l.forwardRef((function(t,e){var n=(0,I.Z)({props:t,name:"MuiDialogContentText"}),i=n.className,s=(0,q.Z)(n,$),r=function(t){var e=t.classes,n=(0,F.Z)({root:["root"]},W,e);return(0,V.Z)({},e,n)}(s);return(0,x.jsx)(z,(0,V.Z)({component:"p",variant:"body1",color:"text.secondary",ref:e,ownerState:s,className:(0,M.Z)(r.root,i)},n,{classes:r}))})),H=n(4505),J=n(4117),K=n(1095),L=function(t){(0,o.Z)(n,t);var e=(0,a.Z)(n);function n(t){var i;return(0,s.Z)(this,n),(i=e.call(this,t)).state={input:(0,l.createRef)()},i}return(0,r.Z)(n,[{key:"render",value:function(){var t,e=this.props,n=e.t,i=e.open,s=e.title,r=e.content,o=e.cancelText,a=e.submitText,l=e.placeholder,u=e.defaultValue,c=e.inputType,d=e.onSubmit,p=e.onClose,h=this.state.input;return(0,x.jsxs)(P.Z,{open:i,children:[(0,x.jsx)(R.Z,{children:n(s.id,s.format)}),(0,x.jsxs)(D.Z,{children:[r&&(0,x.jsx)(E,{children:n(r.id,r.format)}),(0,x.jsx)(H.Z,{autoFocus:!0,fullWidth:!0,inputRef:h,className:"mt-8",type:c,defaultValue:u,label:n(null!==(t=null===l||void 0===l?void 0:l.id)&&void 0!==t?t:"",null===l||void 0===l?void 0:l.format)})]}),(0,x.jsxs)(J.Z,{children:[o&&(0,x.jsx)(K.Z,{onClick:p,children:n(o.id,o.format)}),(0,x.jsx)(K.Z,{onClick:function(){var t,e;return d&&d(null!==(t=null===(e=h.current)||void 0===e?void 0:e.value)&&void 0!==t?t:"")},children:a?n(a.id,a.format):"Submit"})]})]})}}]),n}(l.Component),Q=(0,T.Zh)()(L),U=function(t){(0,o.Z)(n,t);var e=(0,a.Z)(n);function n(t){var r;return(0,s.Z)(this,n),(r=e.call(this,t)).handleInputSubmit=function(t){var e=r.props.t,n=r.state.input.tag,s=r.props,o=s.updateRetention,a=s.updateDuration,l=Math.round(Number(t));switch(n){case"retention":o&&o(l),u.ZP.success(e("views.setting.toasts.retention_set",{retention:l.toString()}));break;case"duration":a&&a(l),u.ZP.success(e("views.setting.toasts.duration_set",{duration:l.toString()}));break;default:return}r.setState((function(t){return{input:(0,i.Z)((0,i.Z)({},t.input),{},{open:!1})}})),setTimeout((function(){return window.location.reload()}),1e3)},r.handleRetentionChange=function(){r.setState((function(t){return{input:(0,i.Z)((0,i.Z)({},t.input),{},{open:!0,tag:"retention",title:{id:"views.setting.inputs.waveform_retention.title"},content:{id:"views.setting.inputs.waveform_retention.content"},placeholder:{id:"views.setting.inputs.waveform_retention.placeholder"},submitText:{id:"views.setting.inputs.waveform_retention.submit"},defaultValue:r.props.retention.retention.toString()})}}))},r.handleDurationChange=function(){r.setState((function(t){return{input:(0,i.Z)((0,i.Z)({},t.input),{},{open:!0,tag:"duration",title:{id:"views.setting.inputs.query_duration.title"},content:{id:"views.setting.inputs.query_duration.content"},placeholder:{id:"views.setting.inputs.query_duration.placeholder"},submitText:{id:"views.setting.inputs.query_duration.submit"},defaultValue:r.props.duration.duration.toString()})}}))},r.handleSelectScale=function(){r.setState((function(t){return{select:(0,i.Z)((0,i.Z)({},t.select),{},{open:!0})}}))},r.handleScaleChange=function(t){var e,n=null===(e=y.Z.app_settings.scales.find((function(e){return e.property().value===t})))||void 0===e?void 0:e.property();r.setState({select:(0,i.Z)((0,i.Z)({},r.state.select),{},{open:!1})});var s=r.props,o=s.t,a=s.updateScale;a&&a((null===n||void 0===n?void 0:n.value)||y.m.property().value),u.ZP.success(o("views.setting.toasts.scale_changed",{scale:t})),setTimeout((function(){return window.location.reload()}),1e3)},r.handlePurgeCache=function(){var t=r.props.t;localStorage.clear(),u.ZP.success(t("views.setting.toasts.cache_purged")),setTimeout((function(){return window.location.reload()}),1e3)},r.state={cards:[{label:{id:"views.setting.cards.waveform_retention"},content:{id:"views.setting.contents.waveform_retention",format:{retention:r.props.retention.retention.toString()}},button:{id:"views.setting.buttons.waveform_retention"},className:"bg-teal-700 hover:bg-teal-800",onClick:r.handleRetentionChange},{label:{id:"views.setting.cards.query_duration"},content:{id:"views.setting.contents.query_duration",format:{duration:r.props.duration.duration.toString()}},button:{id:"views.setting.buttons.query_duration"},className:"bg-lime-700 hover:bg-lime-800",onClick:r.handleDurationChange},{label:{id:"views.setting.cards.select_scale"},button:{id:"views.setting.buttons.select_scale"},className:"bg-sky-700 hover:bg-sky-800",content:{id:"views.setting.contents.select_scale",format:{scale:t.scale.scale}},onClick:r.handleSelectScale},{label:{id:"views.setting.cards.purge_cache"},content:{id:"views.setting.contents.purge_cache"},button:{id:"views.setting.buttons.purge_cache"},className:"bg-pink-700 hover:bg-pink-800",onClick:r.handlePurgeCache}],select:{open:!1,title:{id:"views.setting.selects.choose_scale.title"},values:y.Z.app_settings.scales.map((function(t){return[t.property().name,t.property().value]}))},input:{open:!1,title:{id:""},inputType:"number",submitText:{id:""},onSubmit:r.handleInputSubmit}},r}return(0,r.Z)(n,[{key:"render",value:function(){var t=this.props.t,e=this.state,n=e.select,s=e.cards,r=e.input;return(0,x.jsxs)(m.Z,{children:[(0,x.jsx)(p.Z,{}),(0,x.jsx)(f.Z,{}),(0,x.jsxs)(c.Z,{children:[(0,x.jsx)(h.Z,{}),(0,x.jsx)(Z.Z,{layout:"grid",children:s.map((function(e,n){var i=e.label,s=e.content,r=e.onClick,o=e.button,a=e.className;return(0,x.jsxs)(g.Z,{className:"min-h-[40vh]",label:i,children:[t(s.id,s.format).split("\n").map((function(t,e){return(0,x.jsx)(b,{className:"mb-3",children:t},e)})),(0,x.jsx)(w.Z,{className:a,onClick:r,label:o})]},n)}))})]}),(0,x.jsx)(v.Z,{}),(0,x.jsx)(d.Z,{}),(0,x.jsx)(j.Z,(0,i.Z)((0,i.Z)({},n),{},{onSelect:this.handleScaleChange})),(0,x.jsx)(Q,(0,i.Z)({},r)),(0,x.jsx)(u.x7,{position:"top-center"})]})}}]),n}(l.Component),X=(0,N.$j)(C.Z,{updateScale:S.V,updateRetention:k.V,updateDuration:_.V})((0,T.Zh)()(U))}}]); \ No newline at end of file diff --git a/frontend/dist/static/js/669.29bd1401.chunk.js b/frontend/dist/static/js/669.29bd1401.chunk.js deleted file mode 100644 index fb7dce4c..00000000 --- a/frontend/dist/static/js/669.29bd1401.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkobserver=self.webpackChunkobserver||[]).push([[669],{7486:function(t,e,n){n.d(e,{j:function(){return d},Z:function(){return h}});var r=n(5671),o=n(3144),a=n(136),s=n(9388),i=n(7313),c=n(5590);var l=n.p+"static/media/square-caret-up-solid.0573794ec033f5ce25c1076e3ac596e3.svg",u=n(6417),d=function(t){return t[t.COLLAPSE_DISABLE=0]="COLLAPSE_DISABLE",t[t.COLLAPSE_SHOW=1]="COLLAPSE_SHOW",t[t.COLLAPSE_HIDE=2]="COLLAPSE_HIDE",t}({}),f=function(t){(0,a.Z)(n,t);var e=(0,s.Z)(n);function n(t){var o;return(0,r.Z)(this,n),(o=e.call(this,t)).state={collapsed:!1},o}return(0,o.Z)(n,[{key:"componentDidMount",value:function(){var t=this.props.collapse||d.COLLAPSE_DISABLE;this.setState({collapsed:t===d.COLLAPSE_HIDE})}},{key:"render",value:function(){var t=this,e=this.state.collapsed,n=this.props,r=n.t,o=n.children,a=n.label,s=n.text,i=(this.props.collapse||d.COLLAPSE_DISABLE)!==d.COLLAPSE_DISABLE;return(0,u.jsxs)("div",{className:"mb-4 flex flex-col rounded-xl text-gray-700 shadow-lg",children:[(0,u.jsx)("div",{className:"mx-4 rounded-lg overflow-hidden shadow-lg",children:o}),(0,u.jsxs)("div",{className:"p-4",children:[(0,u.jsxs)("h6",{className:"text-md font-bold text-gray-800 flex ".concat(i&&"cursor-pointer select-none"),onClick:function(){return i&&t.setState({collapsed:!e})},children:[i&&(0,u.jsx)("img",{className:"mx-1 ".concat(e&&"rotate-180"),src:l,alt:""}),r(a.id,a.format)]}),s&&!e&&(0,u.jsx)("span",{className:"text-md",children:r(s.id,s.format).split("\n").map((function(t,e){return(0,u.jsxs)("p",{children:[t,(0,u.jsx)("br",{})]},e)}))})]})]})}}]),n}(i.Component),h=(0,c.Zh)()(f)},318:function(t,e,n){n.d(e,{Z:function(){return p}});var r=n(5671),o=n(3144),a=n(136),s=n(9388),i=n(7313);var c=n.p+"static/media/rss-solid.167813b1d681372ed1d98e45b6b6c0f7.svg";var l=n.p+"static/media/link-solid.49819f951200a220d9839699fbccd8de.svg";var u=n.p+"static/media/link-slash-solid.7893b9a51ad07ceedeb88c9649c58439.svg",d=n(5590),f=n(6417),h=function(t){(0,a.Z)(n,t);var e=(0,s.Z)(n);function n(){return(0,r.Z)(this,n),e.apply(this,arguments)}return(0,o.Z)(n,[{key:"render",value:function(){var t=this.props,e=t.t,n=t.type,r=t.label,o=t.text,a="";switch(n){case"success":a="from-green-400 to-blue-500";break;case"warning":a="from-orange-400 to-orange-600";break;case"error":a="from-red-400 to-red-600"}return(0,f.jsx)("div",{className:"my-2 shadow-xl p-6 text-sm text-white rounded-lg bg-gradient-to-r ".concat(a),children:(0,f.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,f.jsxs)("div",{className:"flex gap-2 font-bold text-lg",children:[(0,f.jsx)("img",{className:"success"===n?"w-6 h-6":"hidden",src:c,alt:""}),(0,f.jsx)("img",{className:"warning"===n?"w-6 h-6":"hidden",src:l,alt:""}),(0,f.jsx)("img",{className:"error"===n?"w-6 h-6":"hidden",src:u,alt:""}),(0,f.jsx)("span",{children:e(r.id,r.format)})]}),(0,f.jsx)("span",{className:"pl-3 text-md font-medium",children:e(o.id,o.format).split("\n").map((function(t,e){return(0,f.jsxs)("p",{children:[t,(0,f.jsx)("br",{})]},e)}))})]})})}}]),n}(i.Component),p=(0,d.Zh)()(h)},3676:function(t,e,n){var r=n(7762),o=n(5671),a=n(3144),s=n(136),i=n(9388),c=n(7313),l=n(5845),u=n(7548),d=n(1259),f=n.n(d),h=n(5590),p=n(6417);f()(l);var m=function(t){(0,s.Z)(n,t);var e=(0,i.Z)(n);function n(t){var r;(0,o.Z)(this,n),(r=e.call(this,t)).chartRef=(0,c.createRef)();var a=r.props,s=a.height,i=a.legend,l=a.tooltip,u=a.zooming,d=a.animation,f=a.lineWidth,h=a.tickInterval,p=a.tickPrecision,m=a.lineColor,v=a.backgroundColor;return r.state={accessibility:{enabled:!1},boost:{enabled:!0,seriesThreshold:3},chart:{zooming:u?{type:"x"}:{},marginTop:20,height:s,animation:d,backgroundColor:v},legend:{enabled:i,itemStyle:{color:"#fff"}},plotOptions:{series:{lineWidth:f,states:{hover:{enabled:!1}}}},xAxis:{labels:{style:{color:"#fff"},format:"{value:%H:%M:%S}"},type:"datetime",tickColor:"#fff",lineColor:m},yAxis:{labels:{style:{color:"#fff"},format:p?"{value:".concat(p,"f}"):"{value:0.2f}"},title:{text:""},opposite:!0,lineColor:m,tickInterval:h},tooltip:{enabled:l,followPointer:!0,followTouchMove:!0,xDateFormat:"%Y-%m-%d %H:%M:%S",padding:12},credits:{enabled:!1},time:{useUTC:!1},title:{text:""}},r}return(0,a.Z)(n,[{key:"componentDidUpdate",value:function(){var t=this.props,e=t.t,n=t.series,o=t.sort,a=t.height;l.setOptions({lang:{resetZoom:e("components.chart.reset_zoom"),resetZoomTitle:e("components.chart.reset_zoom_title")}});var s=this.chartRef.current;if(s){var i=s.chart;if(i){if(a!==i.chartHeight&&i.update({chart:{height:a}}),o)if(n.data)n.data.sort((function(t,e){return t[0]-e[0]}));else if(n.length)for(var c=0,u=n;cn&&t.splice(0,t.length-n),(0,r.Z)(t)}},2468:function(t,e,n){var r=n(4165),o=n(5861),a=n(6573),s=n(2968),i=n(1677),c=n(1061),l=n(281),u=n(8585),d=n.n(u),f=n(5827),h=function(){var t=(0,o.Z)((0,r.Z)().mark((function t(e){var n,o,u,h,p,m,v,g,x,b,Z,y,w,k,S,L,j,C,E,A,D,O,P,_,N,I,H;return(0,r.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.tag,u=e.header,h=e.body,p=e.blob,m=e.filename,v=e.onUpload,g=e.onDownload,x=e.cancelToken,b=e.timeout,Z=void 0===b?f.Z.app_settings.timeout:b,(y=a.Z.create({timeout:1e3*Z})).interceptors.request.use((function(t){return p||(t.headers.Accept="application/json"),t})),y.interceptors.response.use((function(t){return t}),(function(t){return Promise.reject(t)})),w=(0,l.Z)(o),k=null===(n=i.Z.find((function(t){return t.tag===o})))||void 0===n?void 0:n.method,t.prev=6,"ws"!==(null===(S=i.Z.find((function(t){return t.tag===o})))||void 0===S?void 0:S.type)){t.next=10;break}throw new Error("websocket protocol is not supported");case 10:return L="".concat(window.location.protocol).concat((0,c.Z)()),t.next=13,y.request({data:h,method:k,headers:u,url:"".concat(L).concat(w),onUploadProgress:v,onDownloadProgress:g,cancelToken:null===x||void 0===x?void 0:x.token,responseType:p?"blob":"json"});case 13:if(j=t.sent,C=j.data,E=j.headers,!p){t.next=21;break}return(A=E["content-disposition"])?(O=null===(D=A.split(";").find((function(t){return t.includes("filename=")})))||void 0===D?void 0:D.split("=")[1])?d()(C,O):d()(C,"stream"):m?d()(C,m):d()(C,"stream"),P=(new Date).toISOString(),t.abrupt("return",{time:P,path:w,data:null,error:!1,status:200,message:"Returned data is a blob"});case 21:return t.abrupt("return",C);case 24:return t.prev=24,t.t0=t.catch(6),_=(new Date).toISOString(),N=t.t0,I=N.message,H=N.status,t.abrupt("return",{time:_,message:I,path:w,data:null,error:!(0,s.Mw)(t.t0),status:H||500});case 29:case"end":return t.stop()}}),t,null,[[6,24]])})));return function(e){return t.apply(this,arguments)}}();e.Z=h},7912:function(t,e,n){var r=n(9439);e.Z=function(t,e,n){for(var o,a=t,s=e.split(">"),i=function(){var e=s[c];try{if(e.includes("[")||e.includes("]")){var n,o,i=(null===(n=e.match(/^(.*?)\[/))||void 0===n?void 0:n[1])||"",l=(null===(o=e.match(/\[(.*?)\]/))||void 0===o?void 0:o[1])||":";if(!l.length)throw new Error("invalid path given");var u=l.split(":"),d=(0,r.Z)(u,2),f=d[0],h=d[1];a=i.length?a[i].find((function(t){return t[f]===h})):a.find((function(t){return t[f]===h}))}else a=a[e]}catch(p){return{v:t}}},c=0;cn&&t.splice(0,t.length-n),(0,r.Z)(t)}},2468:function(t,e,n){var r=n(4165),o=n(5861),a=n(6573),s=n(2968),i=n(1677),c=n(1061),l=n(281),u=n(8585),d=n.n(u),f=n(5827),h=function(){var t=(0,o.Z)((0,r.Z)().mark((function t(e){var n,o,u,h,p,m,v,g,x,b,Z,y,w,k,S,L,j,C,E,A,D,O,P,_,N,I,H;return(0,r.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.tag,u=e.header,h=e.body,p=e.blob,m=e.filename,v=e.onUpload,g=e.onDownload,x=e.cancelToken,b=e.timeout,Z=void 0===b?f.Z.app_settings.timeout:b,(y=a.Z.create({timeout:1e3*Z})).interceptors.request.use((function(t){return p||(t.headers.Accept="application/json"),t})),y.interceptors.response.use((function(t){return t}),(function(t){return Promise.reject(t)})),w=(0,l.Z)(o),k=null===(n=i.Z.find((function(t){return t.tag===o})))||void 0===n?void 0:n.method,t.prev=6,"ws"!==(null===(S=i.Z.find((function(t){return t.tag===o})))||void 0===S?void 0:S.type)){t.next=10;break}throw new Error("websocket protocol is not supported");case 10:return L="".concat(window.location.protocol).concat((0,c.Z)()),t.next=13,y.request({data:h,method:k,headers:u,url:"".concat(L).concat(w),onUploadProgress:v,onDownloadProgress:g,cancelToken:null===x||void 0===x?void 0:x.token,responseType:p?"blob":"json"});case 13:if(j=t.sent,C=j.data,E=j.headers,!p){t.next=21;break}return(A=E["content-disposition"])?(O=null===(D=A.split(";").find((function(t){return t.includes("filename=")})))||void 0===D?void 0:D.split("=")[1])?d()(C,O):d()(C,"stream"):m?d()(C,m):d()(C,"stream"),P=(new Date).toISOString(),t.abrupt("return",{time:P,path:w,data:null,error:!1,status:200,message:"Returned data is a blob"});case 21:return t.abrupt("return",C);case 24:return t.prev=24,t.t0=t.catch(6),_=(new Date).toISOString(),N=t.t0,I=N.message,H=N.status,t.abrupt("return",{time:_,message:I,path:w,data:null,error:!(0,s.Mw)(t.t0),status:H||500});case 29:case"end":return t.stop()}}),t,null,[[6,24]])})));return function(e){return t.apply(this,arguments)}}();e.Z=h},7912:function(t,e,n){var r=n(9439);e.Z=function(t,e,n){for(var o,a=t,s=e.split(">"),i=function(){var e=s[c];try{if(e.includes("[")||e.includes("]")){var n,o,i=(null===(n=e.match(/^(.*?)\[/))||void 0===n?void 0:n[1])||"",l=(null===(o=e.match(/\[(.*?)\]/))||void 0===o?void 0:o[1])||":";if(!l.length)throw new Error("invalid path given");var u=l.split(":"),d=(0,r.Z)(u,2),f=d[0],h=d[1];a=i.length?a[i].find((function(t){return t[f]===h})):a.find((function(t){return t[f]===h}))}else a=a[e]}catch(p){return{v:t}}},c=0;c100?a.setState({showButton:!0}):a.setState({showButton:!1})},a.scrollToTop=function(){window.scrollTo({top:0,behavior:"smooth"})},a.state={showButton:!1},a}return(0,a.Z)(n,[{key:"componentDidMount",value:function(){document.addEventListener("scroll",this.toggleButton)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("scroll",this.toggleButton)}},{key:"render",value:function(){var e=this.state.showButton;return(0,o.jsx)("button",{onClick:this.scrollToTop,className:"fixed bg-purple-500 hover:bg-purple-600 duration-300 w-10 h-10 rounded-full bottom-16 right-3 flex justify-center items-center ".concat(e||"hidden"),children:(0,o.jsx)("img",{className:"w-4 h-4",src:l,alt:""})})}}]),n}(c.Component)},8669:function(e,t,n){n.d(t,{Z:function(){return Z}});var r=n(5671),a=n(3144),i=n(136),s=n(9388),c=n(7313),l=n(2135);var o=n.p+"static/media/server-solid.4f75c3131b23af426eabd5c91035829b.svg";var u=n.p+"static/media/wave-square-solid.9a0bef3f9e813a5716a30eed4fa8020e.svg";var d=n.p+"static/media/file-waveform-solid.c48c7f768376cd38d8254b34614dfd9a.svg";var f=n.p+"static/media/cloud-arrow-down-solid.44bdf9a1a61d1e1230b601cca127925f.svg";var h={title:"config.menu.title",list:[{uri:"/",label:"config.menu.list.index",icon:o},{uri:"/realtime",label:"config.menu.list.realtime",icon:u},{uri:"/history",label:"config.menu.list.history",icon:d},{uri:"/export",label:"config.menu.list.export",icon:f},{uri:"/setting",label:"config.menu.list.setting",icon:n.p+"static/media/gear-solid.bf34f9d52ff44a67baec8a0d4220d3a3.svg"}]};var p=n.p+"static/media/maximize-solid.daad92d8ce4bd4922c4d8d2bc5ee889f.svg",m=n(3250),v=n(5590),g=n(6417),x=function(e){(0,i.Z)(n,e);var t=(0,s.Z)(n);function n(e){var a;return(0,r.Z)(this,n),(a=t.call(this,e)).state={isOpen:!1},a}return(0,a.Z)(n,[{key:"render",value:function(){var e=this,t=this.props.t,n=this.state.isOpen,r=(0,m.Z)(),a=h.title,i=h.list;return(0,g.jsxs)("aside",{className:"z-20 w-[235px] fixed flex min-h-screen duration-700 bg-gray-800 text-white ".concat(n?"translate-x-none":"-translate-x-48"),children:[(0,g.jsx)("div",{className:"-right-6 ease-in duration-300 border-4 border-white absolute top-2 rounded-full ".concat(n?"translate-x-0":"translate-x-24 scale-x-0"),children:(0,g.jsx)("div",{className:"bg-gradient-to-r from-indigo-500 via-purple-500 to-purple-500 pl-16 pr-6 py-2 rounded-full",children:(0,g.jsx)("div",{className:"duration-100 mr-16 font-bold",children:t(a)})})}),(0,g.jsx)("div",{className:"-right-6 cursor-pointer duration-500 border-4 border-white bg-gray-800 hover:bg-purple-500 absolute top-2 p-3 rounded-full hover:rotate-45",onClick:function(){return e.setState({isOpen:!n})},children:(0,g.jsx)("img",{className:"w-4 h-4",src:p,alt:""})}),(0,g.jsx)("div",{className:"mt-20 flex flex-col space-y-2 w-full h-full ".concat(n||"hidden"),children:i.map((function(e,n){var a=e.uri,i=e.icon,s=e.label;return(0,g.jsxs)(l.rU,{className:"cursor-pointer w-full bg-gray-800 p-3 pl-8 rounded-full duration-300 flex items-center ".concat(a===r?"font-bold ml-2":"hover:font-bold hover:ml-2"),to:a,children:[(0,g.jsx)("img",{src:i,className:"w-4 h-4",alt:""}),(0,g.jsx)("span",{className:"ml-4",children:t(s)})]},n)}))}),(0,g.jsx)("div",{className:"mt-20 flex flex-col space-y-2 w-full h-full ".concat(n&&"hidden"),children:i.map((function(e,t){var n=e.uri,a=e.icon;return(0,g.jsx)(l.rU,{to:n,className:"cursor-pointer justify-end w-full bg-gray-800 p-4 rounded-full duration-300 flex ".concat(n===r?"ml-2":"hover:ml-2"),children:(0,g.jsx)("img",{src:a,className:"w-4 h-4",alt:""})},t)}))})]})}}]),n}(c.Component),Z=(0,v.Zh)()(x)},4656:function(e,t,n){var r=n(5671),a=n(3144),i=n(136),s=n(9388),c=n(7313),l=n(9111),o=n(5827),u=n(6135),d=n(8780),f=n(5590),h=n(6417),p=function(e){(0,i.Z)(n,e);var t=(0,s.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n,[{key:"componentDidMount",value:function(){var e=this.props.t,t=(0,l.Z)(),n=o.Z.app_settings.title;document.title="".concat(e(t)," | ").concat(e(n))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children;return(0,h.jsx)("div",{className:t,children:n})}}]),n}(c.Component);t.Z=(0,u.$j)(d.Z)((0,f.Zh)()(p))},2702:function(e,t,n){n.d(t,{Z:function(){return d},a:function(){return f}});var r=n(4165),a=n(5861),i=n(3885),s=n(8514),c=n(5590),l=n(3396),o=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(t,n,a){var o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new l.Z(null,{lookupLocalStorage:a}),e.next=3,i.ZP.use(c.Db).use(s.Z).use(o).init({fallbackLng:n,detection:{caches:["localStorage"],order:["localStorage","navigator"]},interpolation:{escapeValue:!0},backend:{loadPath:t}});case 3:return e.abrupt("return",i.ZP);case 4:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),u={fallback:"zh-CN",key:"i18n",list:[{name:"\u7b80\u4f53\u4e2d\u6587",value:"zh-CN"},{name:"\u6b63\u9ad4\u4e2d\u6587",value:"zh-TW"},{name:"English",value:"en-US"},{name:"\ud55c\uad6d\uc5b4",value:"ko-KR"},{name:"\u65e5\u672c\u8a9e",value:"ja-JP"}],uri:"/i18n/{{lng}}.json"},d=u,f=o(u.uri,u.fallback,u.key)},549:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(2702),a=function(e,t,n){try{var r=localStorage.getItem(e);if(null!==r)return n?JSON.parse(r):r}catch(a){localStorage.setItem(e,n?JSON.stringify(t):t)}return t},i=function(e,t,n){localStorage.setItem(e,n?JSON.stringify(t):t)},s=function(){var e=r.Z.list,t=r.Z.fallback,n=r.Z.key,s=a(n,"unknown",!1);if("unknown"===s)return i(n,t,!1),t;var c=e.find((function(e){return e.value===s}));return c?c.value:t}},9111:function(e,t,n){var r=n(7762),a=n(7902),i=n(3250);t.Z=function(){var e,t=(0,i.Z)(),n=(0,r.Z)(a.Z);try{for(n.s();!(e=n.n()).done;){var s=e.value;if(s.uri===t)return s.title}}catch(c){n.e(c)}finally{n.f()}return"config.router.error"}},3250:function(e,t,n){var r=n(5827);t.Z=function(){var e=window.location,t=e.hash,n=e.pathname;return"hash"===r.Z.app_settings.router&&t.length>0&&(n=t.split("?")[0].replaceAll("#","")),n}},8780:function(e,t,n){var r=n(1413);t.Z=function(e){return(0,r.Z)({},e)}}}]); \ No newline at end of file diff --git a/frontend/dist/static/js/912.edb28760.chunk.js b/frontend/dist/static/js/912.edb28760.chunk.js new file mode 100644 index 00000000..6e96a8db --- /dev/null +++ b/frontend/dist/static/js/912.edb28760.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkobserver=self.webpackChunkobserver||[]).push([[912],{1109:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(5671),a=n(3144),i=n(136),s=n(9388),c=n(7313),l=n(6417),o=function(e){(0,i.Z)(n,e);var t=(0,s.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n,[{key:"render",value:function(){var e=this.props,t=e.layout,n=e.className,r=e.children,a="mt-5";switch(t){case"flex":a="mt-5 flex flex-wrap";break;case"grid":a="mt-5 gap-4 grid grid-cols-1 md:grid-cols-2"}return(0,l.jsx)("div",{className:"".concat(a," ").concat(null!==n&&void 0!==n?n:""),children:r})}}]),n}(c.Component)},501:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(5671),a=n(3144),i=n(136),s=n(9388),c=n(7313),l=n(6417),o=function(e){(0,i.Z)(n,e);var t=(0,s.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n,[{key:"render",value:function(){var e=this.props.children,t=Array.isArray(e)?e:[e];return(0,l.jsx)("main",{className:"bg-gray-50 min-h-screen ml-10 p-20 px-4 flex flex-col space-y-3",children:t.map((function(e,t){return(0,l.jsx)("div",{children:e},t)}))})}}]),n}(c.Component)},19:function(e,t,n){var r=n(5671),a=n(3144),i=n(136),s=n(9388),c=n(7313),l=n(5827),o=n(5590),u=n(6417),d=function(e){(0,i.Z)(n,e);var t=(0,s.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n,[{key:"render",value:function(){var e=this.props.t,t=l.Z.app_settings,n=t.author,r=t.description;return(0,u.jsxs)("footer",{className:"w-full bg-gray-200 text-gray-500 flex flex-col px-6 py-2 sm:flex-row justify-between",children:[(0,u.jsx)("span",{className:"text-xs text-center ml-8 md:ml-12",children:e(r)}),(0,u.jsx)("span",{className:"text-sm text-center justify-center",children:"\xa9 ".concat((new Date).getFullYear()," ").concat(e(n))})]})}}]),n}(c.Component);t.Z=(0,o.Zh)()(d)},3670:function(e,t,n){n.d(t,{Z:function(){return w}});var r=n(5671),a=n(3144),i=n(136),s=n(9388),c=n(7313);var l=n.p+"static/media/earth-americas-solid.4105ee3951f1c7ac60331fccafc17c1f.svg",o=n(5827),u=n(8780),d=n(6135),f=n(2702),h=n(4165),p=n(5861),m=n(9111),v=function(){var e=(0,p.Z)((0,h.Z)().mark((function e(t,n){var r,a,i;return(0,h.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return r=e.sent,e.next=5,r.changeLanguage(n);case 5:a=(0,m.Z)(),i=o.Z.app_settings.title,document.title="".concat(r.t(a)," | ").concat(r.t(i));case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),g=v,x=n(549),Z=n(5590),b=n(6417),y=function(e){(0,i.Z)(n,e);var t=(0,s.Z)(n);function n(e){var a;return(0,r.Z)(this,n),(a=t.call(this,e)).handleI18nChange=function(e){var t=e.target.value;g(f.a,t),a.setState({i18n:t})},a.state={i18n:(0,x.Z)()},a}return(0,a.Z)(n,[{key:"render",value:function(){var e=this.props.t,t=this.state.i18n,n=o.Z.app_settings.name;return(0,b.jsxs)("header",{className:"fixed w-full z-10 flex justify-between bg-gray-200 items-center h-16 px-5",children:[(0,b.jsx)("h1",{className:"ml-14 text-gray-800 text-xl font-bold",children:e(n)}),(0,b.jsxs)("div",{className:"flex text-gray-500 flex-nowrap space-x-1",children:[(0,b.jsx)("img",{className:"w-4 h-4",src:l,alt:""}),(0,b.jsx)("select",{className:"text-xs bg-transparent focus:outline-none",onChange:this.handleI18nChange,value:t,children:f.Z.list.map((function(e,t){var n=e.name,r=e.value;return(0,b.jsx)("option",{value:r,children:n},t)}))})]})]})}}]),n}(c.Component),w=(0,d.$j)(u.Z)((0,Z.Zh)()(y))},5097:function(e,t,n){n.d(t,{Z:function(){return v}});var r=n(5671),a=n(3144),i=n(136),s=n(9388),c=n(7313),l=n(2135);var o=n.p+"static/media/house-solid.716027ddb007f9cd5ea3128e4b7e45fd.svg";var u=n.p+"static/media/angle-right-solid.cda594ece7082478d17a05a0a0e148f5.svg",d=n(3250),f=n(9111),h=n(5590),p=n(6417),m=function(e){(0,i.Z)(n,e);var t=(0,s.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n,[{key:"render",value:function(){var e=this.props.t,t=(0,d.Z)(),n=(0,f.Z)();return(0,p.jsx)("nav",{className:"px-5 py-3 rounded-lg bg-gray-100",children:(0,p.jsxs)("ol",{className:"text-sm font-medium text-gray-700 flex space-x-2",children:[(0,p.jsx)("li",{className:"cursor-pointer hover:text-gray-900",children:(0,p.jsxs)(l.rU,{className:"flex",to:"/",children:[(0,p.jsx)("img",{className:"my-2 w-5 h-4 mr-2",src:o,alt:""}),(0,p.jsx)("span",{className:"my-2",children:"/"})]})}),"/"!==t&&(0,p.jsxs)("li",{className:"flex",children:[(0,p.jsx)("img",{className:"self-center w-4 h-4 mr-2",src:u,alt:""}),(0,p.jsx)(l.rU,{className:"my-2 cursor-pointer hover:text-gray-900",to:t,children:e(n)})]})]})})}}]),n}(c.Component),v=(0,h.Zh)()(m)},284:function(e,t,n){n.d(t,{Z:function(){return u}});var r=n(5671),a=n(3144),i=n(136),s=n(9388),c=n(7313);var l=n.p+"static/media/arrow-up-solid.25f1775e7ee2dd4c2bc2f2c3c07116bf.svg",o=n(6417),u=function(e){(0,i.Z)(n,e);var t=(0,s.Z)(n);function n(e){var a;return(0,r.Z)(this,n),(a=t.call(this,e)).toggleButton=function(){window.scrollY>100?a.setState({showButton:!0}):a.setState({showButton:!1})},a.scrollToTop=function(){window.scrollTo({top:0,behavior:"smooth"})},a.state={showButton:!1},a}return(0,a.Z)(n,[{key:"componentDidMount",value:function(){document.addEventListener("scroll",this.toggleButton)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("scroll",this.toggleButton)}},{key:"render",value:function(){var e=this.state.showButton;return(0,o.jsx)("button",{onClick:this.scrollToTop,className:"fixed bg-purple-500 hover:bg-purple-600 duration-300 w-10 h-10 rounded-full bottom-16 right-3 flex justify-center items-center ".concat(e?"":"hidden"),children:(0,o.jsx)("img",{className:"w-4 h-4",src:l,alt:""})})}}]),n}(c.Component)},8669:function(e,t,n){n.d(t,{Z:function(){return Z}});var r=n(5671),a=n(3144),i=n(136),s=n(9388),c=n(7313),l=n(2135);var o=n.p+"static/media/server-solid.4f75c3131b23af426eabd5c91035829b.svg";var u=n.p+"static/media/wave-square-solid.9a0bef3f9e813a5716a30eed4fa8020e.svg";var d=n.p+"static/media/file-waveform-solid.c48c7f768376cd38d8254b34614dfd9a.svg";var f=n.p+"static/media/cloud-arrow-down-solid.44bdf9a1a61d1e1230b601cca127925f.svg";var h={title:"config.menu.title",list:[{uri:"/",label:"config.menu.list.index",icon:o},{uri:"/realtime",label:"config.menu.list.realtime",icon:u},{uri:"/history",label:"config.menu.list.history",icon:d},{uri:"/export",label:"config.menu.list.export",icon:f},{uri:"/setting",label:"config.menu.list.setting",icon:n.p+"static/media/gear-solid.bf34f9d52ff44a67baec8a0d4220d3a3.svg"}]};var p=n.p+"static/media/maximize-solid.daad92d8ce4bd4922c4d8d2bc5ee889f.svg",m=n(3250),v=n(5590),g=n(6417),x=function(e){(0,i.Z)(n,e);var t=(0,s.Z)(n);function n(e){var a;return(0,r.Z)(this,n),(a=t.call(this,e)).state={isOpen:!1},a}return(0,a.Z)(n,[{key:"render",value:function(){var e=this,t=this.props.t,n=this.state.isOpen,r=(0,m.Z)(),a=h.title,i=h.list;return(0,g.jsxs)("aside",{className:"z-20 w-[235px] fixed flex min-h-screen duration-700 bg-gray-800 text-white ".concat(n?"translate-x-none":"-translate-x-48"),children:[(0,g.jsx)("div",{className:"-right-6 ease-in duration-300 border-4 border-white absolute top-2 rounded-full ".concat(n?"translate-x-0":"translate-x-24 scale-x-0"),children:(0,g.jsx)("div",{className:"bg-gradient-to-r from-indigo-500 via-purple-500 to-purple-500 pl-16 pr-6 py-2 rounded-full",children:(0,g.jsx)("div",{className:"duration-100 mr-16 font-bold",children:t(a)})})}),(0,g.jsx)("div",{className:"-right-6 cursor-pointer duration-500 border-4 border-white bg-gray-800 hover:bg-purple-500 absolute top-2 p-3 rounded-full hover:rotate-45",onClick:function(){return e.setState({isOpen:!n})},children:(0,g.jsx)("img",{className:"w-4 h-4",src:p,alt:""})}),(0,g.jsx)("div",{className:"mt-20 flex flex-col space-y-2 w-full h-full ".concat(n||"hidden"),children:i.map((function(e,n){var a=e.uri,i=e.icon,s=e.label;return(0,g.jsxs)(l.rU,{className:"cursor-pointer w-full bg-gray-800 p-3 pl-8 rounded-full duration-300 flex items-center ".concat(a===r?"font-bold ml-2":"hover:font-bold hover:ml-2"),to:a,children:[(0,g.jsx)("img",{src:i,className:"w-4 h-4",alt:""}),(0,g.jsx)("span",{className:"ml-4",children:t(s)})]},n)}))}),(0,g.jsx)("div",{className:"mt-20 flex flex-col space-y-2 w-full h-full ".concat(n?"hidden":""),children:i.map((function(e,t){var n=e.uri,a=e.icon;return(0,g.jsx)(l.rU,{to:n,className:"cursor-pointer justify-end w-full bg-gray-800 p-4 rounded-full duration-300 flex ".concat(n===r?"ml-2":"hover:ml-2"),children:(0,g.jsx)("img",{src:a,className:"w-4 h-4",alt:""})},t)}))})]})}}]),n}(c.Component),Z=(0,v.Zh)()(x)},4656:function(e,t,n){var r=n(5671),a=n(3144),i=n(136),s=n(9388),c=n(7313),l=n(9111),o=n(5827),u=n(6135),d=n(8780),f=n(5590),h=n(6417),p=function(e){(0,i.Z)(n,e);var t=(0,s.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n,[{key:"componentDidMount",value:function(){var e=this.props.t,t=(0,l.Z)(),n=o.Z.app_settings.title;document.title="".concat(e(t)," | ").concat(e(n))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children;return(0,h.jsx)("div",{className:t,children:n})}}]),n}(c.Component);t.Z=(0,u.$j)(d.Z)((0,f.Zh)()(p))},2702:function(e,t,n){n.d(t,{Z:function(){return d},a:function(){return f}});var r=n(4165),a=n(5861),i=n(3885),s=n(8514),c=n(5590),l=n(3396),o=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(t,n,a){var o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new l.Z(null,{lookupLocalStorage:a}),e.next=3,i.ZP.use(c.Db).use(s.Z).use(o).init({fallbackLng:n,detection:{caches:["localStorage"],order:["localStorage","navigator"]},interpolation:{escapeValue:!0},backend:{loadPath:t}});case 3:return e.abrupt("return",i.ZP);case 4:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),u={fallback:"zh-CN",key:"i18n",list:[{name:"\u7b80\u4f53\u4e2d\u6587",value:"zh-CN"},{name:"\u6b63\u9ad4\u4e2d\u6587",value:"zh-TW"},{name:"English",value:"en-US"},{name:"\ud55c\uad6d\uc5b4",value:"ko-KR"},{name:"\u65e5\u672c\u8a9e",value:"ja-JP"}],uri:"/i18n/{{lng}}.json"},d=u,f=o(u.uri,u.fallback,u.key)},549:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(2702),a=function(e,t,n){try{var r=localStorage.getItem(e);if(null!==r)return n?JSON.parse(r):r}catch(a){localStorage.setItem(e,n?JSON.stringify(t):t)}return t},i=function(e,t,n){localStorage.setItem(e,n?JSON.stringify(t):t)},s=function(){var e=r.Z.list,t=r.Z.fallback,n=r.Z.key,s=a(n,"unknown",!1);if("unknown"===s)return i(n,t,!1),t;var c=e.find((function(e){return e.value===s}));return c?c.value:t}},9111:function(e,t,n){var r=n(7762),a=n(7902),i=n(3250);t.Z=function(){var e,t=(0,i.Z)(),n=(0,r.Z)(a.Z);try{for(n.s();!(e=n.n()).done;){var s=e.value;if(s.uri===t)return s.title}}catch(c){n.e(c)}finally{n.f()}return"config.router.error"}},3250:function(e,t,n){var r=n(5827);t.Z=function(){var e=window.location,t=e.hash,n=e.pathname;return"hash"===r.Z.app_settings.router&&t.length>0&&(n=t.split("?")[0].replaceAll("#","")),n}},8780:function(e,t,n){var r=n(1413);t.Z=function(e){return(0,r.Z)({},e)}}}]); \ No newline at end of file diff --git a/frontend/dist/static/js/main.b75096a0.js b/frontend/dist/static/js/main.0c991c67.js similarity index 99% rename from frontend/dist/static/js/main.b75096a0.js rename to frontend/dist/static/js/main.0c991c67.js index d1c62bb9..bf59b787 100644 --- a/frontend/dist/static/js/main.b75096a0.js +++ b/frontend/dist/static/js/main.0c991c67.js @@ -1,2 +1,2 @@ -/*! For license information please see main.b75096a0.js.LICENSE.txt */ -!function(){"use strict";var e={5827:function(e,t,n){n.d(t,{Z:function(){return v},m:function(){return y}});var r=n(1061),o=n(5671),a=n(3144),i=function(){function e(){(0,o.Z)(this,e)}return(0,a.Z)(e,[{key:"property",value:function(){return{name:"\u6c17\u8c61\u5e81\u9707\u5ea6\u968e\u7d1a",value:"JMA"}}},{key:"intensity",value:function(e,t){var n=parseFloat((2*Math.log10(t)+.94).toFixed(3));switch(n=parseFloat(n.toFixed(2)),!0){case n<.5:return"0";case n<1.5:return"1";case n<2.5:return"2";case n<3.5:return"3";case n<4.5:return"4";case n<5:return"5 \u5f31";case n<5.5:return"5 \u5f37";case n<6:return"6 \u5f31";case n<6.5:return"6 \u5f37";default:return"7"}}}]),e}(),u=function(){function e(){(0,o.Z)(this,e)}return(0,a.Z)(e,[{key:"property",value:function(){return{name:"\u4ea4\u901a\u90e8\u4e2d\u592e\u6c23\u8c61\u5c40\u5730\u9707\u9707\u5ea6\u5206\u7d1a",value:"CWB"}}},{key:"intensity",value:function(e,t){if(t<80)switch(!0){case t<.8:return"0 \u7d1a";case t<2.5:return"1 \u7d1a";case t<8:return"2 \u7d1a";case t<25:return"3 \u7d1a";case t<80:return"4 \u7d1a"}else switch(!0){case e<15:return"4 \u7d1a";case e<30:return"5 \u5f31";case e<50:return"5 \u5f37";case e<80:return"6 \u5f31";case e<140:return"6 \u5f37"}return"7 \u7d1a"}}]),e}(),l=function(){function e(){(0,o.Z)(this,e)}return(0,a.Z)(e,[{key:"property",value:function(){return{name:"The Modified Mercalli Intensity",value:"MMI"}}},{key:"intensity",value:function(e,t){return(2.33*Math.log10(t)+1.5).toFixed(0)}}]),e}(),c=function(){function e(){(0,o.Z)(this,e)}return(0,a.Z)(e,[{key:"property",value:function(){return{name:"\u4e2d\u56fd\u5730\u9707\u70c8\u5ea6\u8868",value:"CSIS"}}},{key:"intensity",value:function(e,t){var n=3.17*Math.log10(t)+6.59,r=3*Math.log10(e)+9.77,o=1;return(o=n>=6&&r>=6?r:(n+r)/2)<1?o=1:o>12&&(o=12),"".concat(o.toFixed(0))}}]),e}(),s=function(){return"4c6e07fe-20231227114820"},f=function(){return"v2.4.0"}(),d=s(),p=(0,r.Z)(),h=[new i,new u,new l,new c],v={app_settings:{version:f,release:d,scales:h,timeout:100,retention:180,duration:300,router:"hash",name:"config.global.name",author:"config.global.author",title:"config.global.title",description:"config.global.description"},api_settings:{backend:p,version:"v1",prefix:"/api",types:["http","ws"]}},y=h[0]},7902:function(e,t,n){var r=n(7313),o=n(6417),a=(0,r.lazy)((function(){return Promise.all([n.e(377),n.e(453),n.e(596),n.e(822),n.e(912),n.e(669),n.e(290)]).then(n.bind(n,1179))})),i=(0,r.lazy)((function(){return Promise.all([n.e(377),n.e(453),n.e(59),n.e(596),n.e(912),n.e(669),n.e(735)]).then(n.bind(n,3735))})),u=(0,r.lazy)((function(){return Promise.all([n.e(377),n.e(453),n.e(59),n.e(596),n.e(366),n.e(165),n.e(979),n.e(912),n.e(252)]).then(n.bind(n,5252))})),l=(0,r.lazy)((function(){return Promise.all([n.e(377),n.e(453),n.e(59),n.e(366),n.e(912),n.e(253)]).then(n.bind(n,253))})),c=(0,r.lazy)((function(){return Promise.all([n.e(377),n.e(59),n.e(366),n.e(165),n.e(912),n.e(332)]).then(n.bind(n,6332))})),s=[{uri:"/",title:"config.router.index",node:(0,o.jsx)(a,{})},{uri:"/realtime",title:"config.router.realtime",node:(0,o.jsx)(i,{})},{uri:"/history",title:"config.router.history",node:(0,o.jsx)(u,{})},{uri:"/export",title:"config.router.export",node:(0,o.jsx)(l,{})},{uri:"/setting",title:"config.router.setting",node:(0,o.jsx)(c,{})}];t.Z=s},1061:function(e,t){t.Z=function(){return"//".concat(window.location.host)}},7703:function(e,t,n){n.d(t,{V:function(){return a}});var r=(0,n(827).oM)({name:"adc",initialState:{adc:{fullscale:0,resolution:-1}},reducers:{onUpdate:function(e,t){var n=t.payload;e.adc=n}}}),o=r.actions.onUpdate,a=function(e){return function(t){t(o(e))}};t.Z=r.reducer},5549:function(e,t,n){n.d(t,{V:function(){return u}});var r=n(827),o=n(5827).Z.app_settings.duration,a=(0,r.oM)({name:"duration",initialState:{duration:o},reducers:{onUpdate:function(e,t){var n=t.payload;e.duration=n>0&&n<=3600?n:o}}}),i=a.actions.onUpdate,u=function(e){return function(t){t(i(e))}};t.Z=a.reducer},8146:function(e,t,n){n.d(t,{V:function(){return a}});var r=(0,n(827).oM)({name:"geophone",initialState:{geophone:{ehz:0,ehe:0,ehn:0}},reducers:{onUpdate:function(e,t){var n=t.payload;e.geophone=n}}}),o=r.actions.onUpdate,a=function(e){return function(t){t(o(e))}};t.Z=r.reducer},5467:function(e,t,n){n.d(t,{V:function(){return u}});var r=n(827),o=n(5827).Z.app_settings.retention,a=(0,r.oM)({name:"retention",initialState:{retention:o},reducers:{onUpdate:function(e,t){var n=t.payload;e.retention=n>0&&n<=1e3?n:o}}}),i=a.actions.onUpdate,u=function(e){return function(t){t(i(e))}};t.Z=a.reducer},1236:function(e,t,n){n.d(t,{V:function(){return u}});var r=n(827),o=n(5827).m.property().value,a=(0,r.oM)({name:"scale",initialState:{scale:o},reducers:{onUpdate:function(e,t){var n=t.payload;e.scale=n}}}),i=a.actions.onUpdate,u=function(e){return function(t){t(i(e))}};t.Z=a.reducer},6801:function(e,t,n){n.d(t,{V:function(){return a}});var r=(0,n(827).oM)({name:"station",initialState:{station:{station:"SHAKE",network:"AS",location:"00"}},reducers:{onUpdate:function(e,t){var n=t.payload;e.station=n}}}),o=r.actions.onUpdate,a=function(e){return function(t){t(o(e))}};t.Z=r.reducer},5296:function(e,t,n){n.d(t,{Z:function(){return oe}});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?s(w,--g):0,y--,10===b&&(y=1,v--),b}function E(){return b=g2||O(b)>3?"":" "}function z(e,t){for(;--t&&E()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return C(e,P()+(t<6&&32==_()&&32==E()))}function M(e){for(;E();)switch(b){case e:return g;case 34:case 39:34!==e&&39!==e&&M(b);break;case 40:41===e&&M(e);break;case 92:E()}return g}function L(e,t){for(;E()&&e+b!==57&&(e+b!==84||47!==_()););return"/*"+C(t,g-1)+"*"+a(47===e?e:E())}function I(e){for(;!O(_());)E();return C(e,g)}var D="-ms-",A="-moz-",F="-webkit-",U="comm",$="rule",Z="decl",W="@keyframes";function B(e,t){for(var n="",r=p(e),o=0;o0&&d(A)-m&&h(b>32?J(A+";",r,n,m-1):J(l(A," ","")+";",r,n,m-2),p);break;case 59:A+=";";default:if(h(D=Q(A,t,n,v,y,o,f,j,N=[],M=[],m),i),123===O)if(0===y)q(A,t,D,D,N,i,m,f,M);else switch(99===g&&110===s(A,3)?100:g){case 100:case 108:case 109:case 115:q(e,D,D,r&&h(Q(e,D,D,0,0,o,f,j,o,N=[],m),M),o,M,m,f,r?N:M);break;default:q(A,D,D,D,[""],M,0,f,M)}}v=y=b=0,S=C=1,j=A="",m=u;break;case 58:m=1+d(A),b=w;default:if(S<1)if(123==O)--S;else if(125==O&&0==S++&&125==x())continue;switch(A+=a(O),O*S){case 38:C=y>0?1:(A+="\f",-1);break;case 44:f[v++]=(d(A)-1)*C,C=1;break;case 64:45===_()&&(A+=T(E())),g=_(),y=m=d(j=A+=I(P())),O++;break;case 45:45===w&&2==d(A)&&(S=0)}}return i}function Q(e,t,n,r,a,i,c,s,d,h,v){for(var y=a-1,m=0===a?i:[""],g=p(m),b=0,w=0,k=0;b0?m[x]+" "+E:l(E,/&\f/g,m[x])))&&(d[k++]=_);return S(e,t,n,0===a?$:s,d,h,v)}function K(e,t,n){return S(e,t,n,U,a(b),f(e,2,-2),0)}function J(e,t,n,r){return S(e,t,n,Z,f(e,0,r),f(e,r+1,-1),r)}var X=function(e,t,n){for(var r=0,o=0;r=o,o=_(),38===r&&12===o&&(t[n]=1),!O(o);)E();return C(e,g)},Y=function(e,t){return N(function(e,t){var n=-1,r=44;do{switch(O(r)){case 0:38===r&&12===_()&&(t[n]=1),e[n]+=X(g-1,t,n);break;case 2:e[n]+=T(r);break;case 4:if(44===r){e[++n]=58===_()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=a(r)}}while(r=E());return e}(j(e),t))},G=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||G.get(n))&&!r){G.set(e,!0);for(var o=[],a=Y(t,o),i=n.props,u=0,l=0;u6)switch(s(e,t+1)){case 109:if(45!==s(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+F+"$2-$3$1"+A+(108==s(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==s(e,t+1))break;case 6444:switch(s(e,d(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+F)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+F+(45===s(e,14)?"inline-":"")+"box$3$1"+F+"$2$3$1"+D+"$2box$3")+e}break;case 5936:switch(s(e,t+11)){case 114:return F+e+D+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return F+e+D+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return F+e+D+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return F+e+D+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Z:e.return=ne(e.value,e.length);break;case W:return B([k(e,{value:l(e.value,"@","@"+F)})],r);case $:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return B([k(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return B([k(e,{props:[l(t,/:(plac\w+)/,":"+F+"input-$1")]}),k(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),k(e,{props:[l(t,/:(plac\w+)/,D+"input-$1")]})],r)}return""}))}}],oe=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o=e.stylisPlugins||re;var a,i,u={},l=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:d}}},5696:function(e,t,n){var r;n.d(t,{L:function(){return i},j:function(){return u}});var o=n(7313),a=!!(r||(r=n.t(o,2))).useInsertionEffect&&(r||(r=n.t(o,2))).useInsertionEffect,i=a||function(e){return e()},u=a||o.useLayoutEffect},827:function(e,t,n){function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:d(e)?2:p(e)?3:0}function l(e,t){return 2===u(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===u(e)?e.get(t):e[t]}function s(e,t,n){var r=u(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){return Z&&e instanceof Map}function p(e){return W&&e instanceof Set}function h(e){return e.o||e.t}function v(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=J(e);delete t[q];for(var n=K(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=m),Object.freeze(e),t&&i(e,(function(e,t){return y(t,!0)}),!0)),e}function m(){r(2)}function g(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function b(e){var t=X[e];return t||r(18,e),t}function w(e,t){X[e]||(X[e]=t)}function S(){return U}function k(e,t){t&&(b("Patches"),e.u=[],e.s=[],e.v=t)}function x(e){E(e),e.p.forEach(P),e.p=null}function E(e){e===U&&(U=e.l)}function _(e){return U={p:[],l:U,h:e,m:!0,_:0}}function P(e){var t=e[q];0===t.i||1===t.i?t.j():t.g=!0}function C(e,t){t._=t.p.length;var n=t.p[0],o=void 0!==e&&e!==n;return t.h.O||b("ES5").S(t,e,o),o?(n[q].P&&(x(t),r(4)),a(e)&&(e=O(t,e),t.l||N(t,e)),t.u&&b("Patches").M(n[q].t,e,t.u,t.s)):e=O(t,n,[]),x(t),t.u&&t.v(t.u,t.s),e!==V?e:void 0}function O(e,t,n){if(g(t))return t;var r=t[q];if(!r)return i(t,(function(o,a){return j(e,r,t,o,a,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return N(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=v(r.k):r.o,a=o,u=!1;3===r.i&&(a=new Set(o),o.clear(),u=!0),i(a,(function(t,a){return j(e,r,o,t,a,n,u)})),N(e,o,!1),n&&e.u&&b("Patches").N(r,n,e.u,e.s)}return r.o}function j(e,t,n,r,i,u,c){if(o(i)){var f=O(e,i,u&&t&&3!==t.i&&!l(t.R,r)?u.concat(r):void 0);if(s(n,r,f),!o(f))return;e.m=!1}else c&&n.add(i);if(a(i)&&!g(i)){if(!e.h.D&&e._<1)return;O(e,i),t&&t.A.l||N(e,i)}}function N(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&y(t,n)}function T(e,t){var n=e[q];return(n?h(n):e)[t]}function R(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function z(e){e.P||(e.P=!0,e.l&&z(e.l))}function M(e){e.o||(e.o=v(e.t))}function L(e,t,n){var r=d(t)?b("MapSet").F(t,n):p(t)?b("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:S(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,a=Y;n&&(o=[r],a=G);var i=Proxy.revocable(o,a),u=i.revoke,l=i.proxy;return r.k=l,r.j=u,l}(t,n):b("ES5").J(t,n);return(n?n.A:S()).p.push(r),r}function I(e){return o(e)||r(22,e),function e(t){if(!a(t))return t;var n,r=t[q],o=u(t);if(r){if(!r.P&&(r.i<4||!b("ES5").K(r)))return r.t;r.I=!0,n=D(t,o),r.I=!1}else n=D(t,o);return i(n,(function(t,o){r&&c(r.t,t)===o||s(n,t,e(o))})),3===o?new Set(n):n}(e)}function D(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return v(e)}function A(){function e(e,t){var n=a[e];return n?n.enumerable=t:a[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[q];return Y.get(t,e)},set:function(t){var n=this[q];Y.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var o=e[t][q];if(!o.P)switch(o.i){case 5:r(o)&&z(o);break;case 4:n(o)&&z(o)}}}function n(e){for(var t=e.t,n=e.k,r=K(n),o=r.length-1;o>=0;o--){var a=r[o];if(a!==q){var i=t[a];if(void 0===i&&!l(t,a))return!0;var u=n[a],c=u&&u[q];if(c?c.t!==i:!f(u,i))return!0}}var s=!!t[q];return r.length!==K(t).length+(s?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r1?r-1:0),a=1;a1?r-1:0),a=1;a=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var a=b("Patches").$;return o(e)?a(e,t):this.produce(e,(function(e){return a(e,t)}))},e}(),te=new ee,ne=te.produce,re=(te.produceWithPatches.bind(te),te.setAutoFreeze.bind(te),te.setUseProxies.bind(te),te.applyPatches.bind(te),te.createDraft.bind(te),te.finishDraft.bind(te),ne),oe=n(9038);function ae(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"===typeof o?o(n,r,e):t(o)}}}}var ie=ae();ie.withExtraArgument=ae;var ue=ie,le=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function O(e,t,n,r){void 0===r&&(r={});var o=r,a=o.window,i=void 0===a?document.defaultView:a,u=o.v5Compat,l=void 0!==u&&u,c=i.history,s=d.Pop,f=null,p=h();function h(){return(c.state||{idx:null}).idx}function v(){s=d.Pop;var e=h(),t=null==e?null:e-p;p=e,f&&f({action:s,location:g.location,delta:t})}function y(e){var t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"===typeof e?e:P(e);return k(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==p&&(p=0,c.replaceState(m({},c.state,{idx:p}),""));var g={get action(){return s},get location(){return e(i,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(b,v),f=e,function(){i.removeEventListener(b,v),f=null}},createHref:function(e){return t(i,e)},createURL:y,encodeLocation:function(e){var t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=d.Push;var r=_(g.location,e,t);n&&n(r,e);var o=E(r,p=h()+1),a=g.createHref(r);try{c.pushState(o,"",a)}catch(u){if(u instanceof DOMException&&"DataCloneError"===u.name)throw u;i.location.assign(a)}l&&f&&f({action:s,location:g.location,delta:1})},replace:function(e,t){s=d.Replace;var r=_(g.location,e,t);n&&n(r,e);var o=E(r,p=h()),a=g.createHref(r);c.replaceState(o,"",a),l&&f&&f({action:s,location:g.location,delta:0})},go:function(e){return c.go(e)}};return g}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(g||(g={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function j(e,t,n){void 0===n&&(n="/");var r=W(("string"===typeof t?C(t):t).pathname||"/",n);if(null==r)return null;var o=N(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(o);for(var a=null,i=0;null==a&&i0&&(k(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+u+'".'),N(e.children,t,l,u)),(null!=e.path||e.index)&&t.push({path:u,score:F(u,e.index),routesMeta:l})};return e.forEach((function(e,t){var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?")){var r,a=(0,v.Z)(T(e.path));try{for(a.s();!(r=a.n()).done;){var i=r.value;o(e,t,i)}}catch(u){a.e(u)}finally{a.f()}}else o(e,t)})),t}function T(e){var t=e.split("/");if(0===t.length)return[];var n=(0,h.Z)(t),r=n[0],o=n.slice(1),a=r.endsWith("?"),i=r.replace(/\?$/,"");if(0===o.length)return a?[i,""]:[i];var u=T(o.join("/")),l=[];return l.push.apply(l,(0,y.Z)(u.map((function(e){return""===e?i:[i,e].join("/")})))),a&&l.push.apply(l,(0,y.Z)(u)),l.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var R=/^:\w+$/,z=3,M=2,L=1,I=10,D=-2,A=function(e){return"*"===e};function F(e,t){var n=e.split("/"),r=n.length;return n.some(A)&&(r+=D),t&&(r+=M),n.filter((function(e){return!A(e)})).reduce((function(e,t){return e+(R.test(t)?z:""===t?L:I)}),r)}function U(e,t){for(var n=e.routesMeta,r={},o="/",a=[],i=0;i and the router will parse it for you.'}function V(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function H(e,t,n,r){var o;void 0===r&&(r=!1),"string"===typeof e?o=C(e):(k(!(o=m({},e)).pathname||!o.pathname.includes("?"),B("?","pathname","search",o)),k(!o.pathname||!o.pathname.includes("#"),B("#","pathname","hash",o)),k(!o.search||!o.search.includes("#"),B("#","search","hash",o)));var a,i=""===e||""===o.pathname,u=i?"/":o.pathname;if(r||null==u)a=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;o.pathname=c.join("/")}a=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?C(e):e,r=n.pathname,o=n.search,a=void 0===o?"":o,i=n.hash,u=void 0===i?"":i,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:K(a),hash:J(u)}}(o,a),f=u&&"/"!==u&&u.endsWith("/"),d=(i||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var q=function(e){return e.join("/").replace(/\/\/+/g,"/")},Q=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},K=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},J=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},X=function(e){(0,a.Z)(n,e);var t=(0,i.Z)(n);function n(){return(0,o.Z)(this,n),t.apply(this,arguments)}return(0,r.Z)(n)}(f(Error));function Y(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var G=["post","put","patch","delete"],ee=(new Set(G),["get"].concat(G));new Set(ee),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred")},7861:function(e,t,n){var r=n(9456),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function l(e){return r.isMemo(e)?i:u[e.$$typeof]||o}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=i;var c=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var i=s(n);f&&(i=i.concat(f(n)));for(var u=l(t),v=l(n),y=0;y