From 0b9335e683f3b329b9e5be107c45ecf3c6d14fea Mon Sep 17 00:00:00 2001 From: Chengxun Lee <24319042+bclswl0827@users.noreply.github.com> Date: Sat, 16 Dec 2023 18:31:36 +0800 Subject: [PATCH] Fix SAC file waveform lag issue --- CHANGELOG.md | 4 + README.md | 90 ++++++++++++++++--- VERSION | 2 +- app/history/module.go | 2 +- app/history/sample.go | 23 ++--- build/assets/config.json | 4 +- frontend/dist/asset-manifest.json | 4 +- frontend/dist/index.html | 2 +- .../js/{main.a6508a5a.js => main.e17ea804.js} | 4 +- ...CENSE.txt => main.e17ea804.js.LICENSE.txt} | 0 frontend/src/.env | 4 +- frontend/src/package-lock.json | 1 - frontend/src/package.json | 1 - 13 files changed, 106 insertions(+), 35 deletions(-) rename frontend/dist/static/js/{main.a6508a5a.js => main.e17ea804.js} (99%) rename frontend/dist/static/js/{main.a6508a5a.js.LICENSE.txt => main.e17ea804.js.LICENSE.txt} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b1f977e..d6b83774 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Starting from v2.2.5, all notable changes to this project will be documented in this file. +## v2.2.6 (2023-12-16) + + - Fixed SAC file waveform lag issue caused by sample rate calculation + ## v2.2.5 (2023-12-12) - Migrating to [anyshake/observer](https://github.com/anyshake/observer) diff --git a/README.md b/README.md index 9a05f742..6c362661 100644 --- a/README.md +++ b/README.md @@ -7,25 +7,36 @@ [![Latest Release](https://img.shields.io/github/release/anyshake/observer.svg?style=flat-square)](https://github.com/anyshake/observer/releases/latest) [![Go Report Card](https://goreportcard.com/badge/github.com/anyshake/observer?style=flat-square)](https://goreportcard.com/report/github.com/anyshake/observer) -AnyShake Observer use serial port to read & parse seismic data from [AnyShake Explorer](https://github.com/anyshake/explorer), also provides a web-based easy-to-use UI for monitoring and exporting seismic data (Support SAC & MiniSEED format) +## Overview -AnyShake Observer is written in Go, 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. +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. -## Features - -TO BE DONE - -## Install +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). -TO BE DONE +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. -## Configuration +## Documentation -TO BE DONE +Please visit [anyshake.org/docs/intro](https://anyshake.org/docs/intro) for quick start guide and more information. -## Contributing +## Features -TO BE DONE + - User-friendly web-based interface + - Mobile / Tablet friendly interface + - Query seismic waveform by time range + - Query seismic waveform by known event + - Link to share the seismic waveform + - Real-time seismic waveform display + - Swagger generated API documentation + - Support multiple database engines + - Support multiple languages, detected by browser + - Multiple seismic intensity standards, default to JMA + - Cross-platform, runs on Linux, Windows, macOS + - Ability to export data to SAC or MiniSEED format + - AnyShake Explorer data checksum verification + - Auto reset AnyShake Explorer on error + - Flexible channel packet read length + - Variable serial port baud rate ## Preview @@ -35,6 +46,61 @@ TO BE DONE ![Preview - Export](https://raw.githubusercontent.com/anyshake/logotype/master/preview_export.gif) ![Preview - Settings](https://raw.githubusercontent.com/anyshake/logotype/master/preview_setting.gif) +## Credits + +AnyShake Observer is designed and developed by [@bclswl0827](https://github.com/bclswl0827), test work is done by [@TenkyuChimata](https://github.com/TenkyuChimata). + +Thanks to the following tools and libraries, AnyShake Observer is made possible! + +### Backend + + - [github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery) + - [github.com/bclswl0827/go-serial](https://github.com/bclswl0827/go-serial) + - [github.com/bclswl0827/sacio](https://github.com/bclswl0827/sacio) + - [github.com/beevik/ntp](https://github.com/beevik/ntp) + - [github.com/common-nighthawk/go-figure](https://github.com/common-nighthawk/go-figure) + - [github.com/gin-contrib/gzip](https://github.com/gin-contrib/gzip) + - [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) + - [github.com/gorilla/websocket](https://github.com/gorilla/websocket) + - [github.com/juju/ratelimit](https://github.com/juju/ratelimit) + - [github.com/mackerelio/go-osstat](https://github.com/mackerelio/go-osstat) + - [github.com/sbabiv/xml2map](https://github.com/sbabiv/xml2map) + - [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) + - [github.com/swaggo/files](https://github.com/swaggo/files) + - [github.com/swaggo/swag](https://github.com/swaggo/swag) + - [github.com/wille/osutil](https://github.com/wille/osutil) + - [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) + - [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) + - [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) + - [gorm.io/driver/sqlserver](https://github.com/go-gorm/sqlserver) + - [gorm.io/gorm](https://gorm.io/) + +### Frontend + + - [axios](https://axios-http.com/) + - [date-fns](https://date-fns.org/) + - [highcharts](https://www.highcharts.com/) + - [i18next](https://www.i18next.com/) + - [i18next-browser-languagedetector](https://github.com/i18next/i18next-browser-languageDetector) + - [i18next-http-backend](https://github.com/i18next/i18next-http-backend) + - [js-file-download](https://github.com/kennethjiang/js-file-download) + - [leaflet](https://leafletjs.com/) + - [mui](https://mui.com/) + - [react](https://reactjs.org/) + - [react-dom](https://reactjs.org/) + - [react-hot-toast](https://react-hot-toast.com/) + - [react-i18next](https://react.i18next.com/) + - [react-leaflet](https://react-leaflet.js.org/) + - [react-polling](https://github.com/vivek12345/react-polling) + - [react-redux](https://react-redux.js.org/) + - [react-router-dom](https://reactrouter.com/) + - [react-scripts](https://github.com/facebook/create-react-app/tree/main/packages/react-scripts) + - [redux](https://react-redux.js.org/) + - [redux-persist](https://github.com/rt2zz/redux-persist) + - [seisplotjs](https://github.com/crotwell/seisplotjs) + - [tailwindcss](https://tailwindcss.com/) + - [typescript](https://www.typescriptlang.org/) + ## License [The MIT License (MIT)](https://raw.githubusercontent.com/anyshake/observer/master/LICENSE) diff --git a/VERSION b/VERSION index 969fdfb1..8f4f0d6b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.2.5p +v2.2.6p diff --git a/app/history/module.go b/app/history/module.go index dcc167ca..a10f82b2 100644 --- a/app/history/module.go +++ b/app/history/module.go @@ -38,7 +38,7 @@ func (h *History) RegisterModule(rg *gin.RouterGroup, options *app.ServerOptions switch binding.Format { case "json": - response.Message(c, "The specified waveform data was successfully filtered", data) + response.Message(c, "The waveform data was successfully filtered", data) return case "sac": fileName, dataBytes, err := getSACBytes(data, binding.Channel, options) diff --git a/app/history/sample.go b/app/history/sample.go index 03e25365..abafdff1 100644 --- a/app/history/sample.go +++ b/app/history/sample.go @@ -10,28 +10,31 @@ import ( func getSampleRate(data []publisher.Geophone, channel string) (int, error) { var ( - length = 0 - lastTime = time.UnixMilli(data[0].TS) + sampleRateSum float64 + lastTime = time.UnixMilli(data[0].TS) ) - for _, v := range data { - currentTime := time.UnixMilli(v.TS) - if duration.Difference(currentTime, lastTime) > THRESHOLD { + for i := 1; i < len(data); i++ { + var ( + currentTime = time.UnixMilli(data[i].TS) + timeDiff = duration.Difference(currentTime, lastTime) + ) + if timeDiff > THRESHOLD { err := fmt.Errorf("uneven gaps between the data") return 0, err } switch channel { case "EHZ": - length += len(v.EHZ) + sampleRateSum += float64(len(data[i].EHZ)) / timeDiff.Seconds() case "EHE": - length += len(v.EHE) + sampleRateSum += float64(len(data[i].EHE)) / timeDiff.Seconds() case "EHN": - length += len(v.EHN) + sampleRateSum += float64(len(data[i].EHN)) / timeDiff.Seconds() } - lastTime = time.UnixMilli(v.TS) + lastTime = currentTime } - return length / len(data), nil + return int(sampleRateSum) / len(data), nil } diff --git a/build/assets/config.json b/build/assets/config.json index 1569fc5b..15fd6412 100644 --- a/build/assets/config.json +++ b/build/assets/config.json @@ -24,7 +24,7 @@ } }, "adc_settings": { - "resolution": 32, + "resolution": 27, "fullscale": 5.0 }, "serial_settings": { @@ -39,7 +39,7 @@ "interval": 5 }, "archiver_settings": { - "enable": false, + "enable": true, "engine": "postgresql", "host": "127.0.0.1", "port": 5432, diff --git a/frontend/dist/asset-manifest.json b/frontend/dist/asset-manifest.json index 7570db23..6bf052cf 100644 --- a/frontend/dist/asset-manifest.json +++ b/frontend/dist/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { "main.css": "/static/css/main.3d547ccc.css", - "main.js": "/static/js/main.a6508a5a.js", + "main.js": "/static/js/main.e17ea804.js", "static/css/290.525e2941.chunk.css": "/static/css/290.525e2941.chunk.css", "static/js/290.2f73e962.chunk.js": "/static/js/290.2f73e962.chunk.js", "static/js/78.90c012c7.chunk.js": "/static/js/78.90c012c7.chunk.js", @@ -47,6 +47,6 @@ }, "entrypoints": [ "static/css/main.3d547ccc.css", - "static/js/main.a6508a5a.js" + "static/js/main.e17ea804.js" ] } \ No newline at end of file diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 818897e7..9a17fc6f 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/main.a6508a5a.js b/frontend/dist/static/js/main.e17ea804.js similarity index 99% rename from frontend/dist/static/js/main.a6508a5a.js rename to frontend/dist/static/js/main.e17ea804.js index e45a0d8a..75f93cb1 100644 --- a/frontend/dist/static/js/main.a6508a5a.js +++ b/frontend/dist/static/js/main.e17ea804.js @@ -1,2 +1,2 @@ -/*! For license information please see main.a6508a5a.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"44af8a25-20231212145520"},f=function(){return"v2.2.5p"}(),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(730),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(730),n.e(78)]).then(n.bind(n,1078))})),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(920)]).then(n.bind(n,8920))})),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},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