From bc874081365fb2ea93919bb1ca714029ff4ced30 Mon Sep 17 00:00:00 2001 From: Abijeet Date: Sat, 27 Mar 2021 22:44:13 +0530 Subject: [PATCH] Add feature to view admin_audit log files Add a LogFileProvider class that identifies the available log files It checks if the admin_audit app is enabled, and fetches it's logfile path. Additionally, add ability for user to select the file they want to view. The "Download logs" button now downloads the currently selected log file. Tested by enabling and disabling the admin_audit app TODO: Update the commands to also use the chosen logfile Fixes: nextcloud#318 Signed-off-by: Abijeet --- appinfo/routes.php | 2 + build/main.css | 16 ++++--- build/main.css.map | 2 +- build/main.js | 2 +- build/main.js.map | 2 +- js/App.js | 26 ++++++++--- js/Components/LogTable.js | 6 ++- js/Components/LogUploader.js | 2 +- js/Components/Settings.js | 15 +++++-- js/Components/ToggleChoice.css | 11 +++++ js/Components/ToggleChoice.js | 54 +++++++++++++++++++++++ js/Providers/LogProvider.js | 34 ++++++++++++-- lib/Controller/LogController.php | 59 +++++++++++++++++++------ lib/Log/LogFileProvider.php | 76 ++++++++++++++++++++++++++++++++ lib/Log/LogIteratorFactory.php | 53 ++++++++++++++-------- 15 files changed, 307 insertions(+), 53 deletions(-) create mode 100644 js/Components/ToggleChoice.css create mode 100644 js/Components/ToggleChoice.js create mode 100644 lib/Log/LogFileProvider.php diff --git a/appinfo/routes.php b/appinfo/routes.php index 0e00fe89..33d3a127 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -14,9 +14,11 @@ ['name' => 'log#get', 'url' => '/get', 'verb' => 'GET'], ['name' => 'log#poll', 'url' => '/poll', 'verb' => 'GET'], ['name' => 'log#search', 'url' => '/search', 'verb' => 'GET'], + ['name' => 'log#download', 'url' => '/download', 'verb' => 'GET'], ['name' => 'log#getSettings', 'url' => '/settings', 'verb' => 'GET'], ['name' => 'log#getLevels', 'url' => '/levels', 'verb' => 'GET'], ['name' => 'log#setLevels', 'url' => '/levels', 'verb' => 'PUT'], ['name' => 'log#setRelative', 'url' => '/relative', 'verb' => 'PUT'], ['name' => 'log#setLive', 'url' => '/live', 'verb' => 'PUT'], + ['name' => 'log#setLogFile', 'url' => '/logFile', 'verb' => 'PUT'] ]]; diff --git a/build/main.css b/build/main.css index bb433d8d..87fea00a 100644 --- a/build/main.css +++ b/build/main.css @@ -89,6 +89,16 @@ margin: 12px 12px; } +.NrfpwAO-k5oVn5XmaW-KS a { + line-height: 30px; + } + .NrfpwAO-k5oVn5XmaW-KS input[type="radio"] { + margin: 5px; + } + .NrfpwAO-k5oVn5XmaW-KS label { + margin: 5px; + } + ._167F0SBD3kSKVBEfd57_Uq { width: 100%; white-space: normal; @@ -195,7 +205,6 @@ ._167F0SBD3kSKVBEfd57_Uq td._66tJUL6uXvVFFjVbEQFOF button, ._167F0SBD3kSKVBEfd57_Uq th._66tJUL6uXvVFFjVbEQFOF button { position: relative; opacity: 0; - -webkit-transition: opacity 0.5s; transition: opacity 0.5s; top: -5px; padding: 0; @@ -260,7 +269,6 @@ th._1ARgYSQS4MfijjOGI4pQ8a { float: right; margin: 2px; opacity: 0.5; - -webkit-transition: opacity 0.2s; transition: opacity 0.2s; } @@ -301,8 +309,7 @@ th._1ARgYSQS4MfijjOGI4pQ8a { position: absolute; top: 50%; left: 50%; - -webkit-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); + transform: translate(-50%, -50%); } ._35CNRB4NJW_FOXpoZf7NWn { @@ -316,7 +323,6 @@ th._1ARgYSQS4MfijjOGI4pQ8a { ._1iAPnZijiF3xNNm61pJId3._2_7jr-CZLhx8xE6OFnYSnW { background-color: var(--color-main-background); - -webkit-transition: background 1500ms ease-in; transition: background 1500ms ease-in; } diff --git a/build/main.css.map b/build/main.css.map index 6237f988..38ff8350 100644 --- a/build/main.css.map +++ b/build/main.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./js/Components/TraceLine.css","webpack:///./js/Components/Exception.css","webpack:///./js/Components/ToggleEntry.css","webpack:///./js/Components/LevelSettings.css","webpack:///./js/Components/LogUploader.css","webpack:///./js/Components/LogTable.css","webpack:///./css/app.css"],"names":[],"mappings":"AAAA;EACE,cAAc;AAShB;;EAPE;IACE,kBAAkB;EACpB;;EAEA;IACE,iBAAiB;EACnB;;ACTF;EACE,qBAAqB;EACrB,WAAW;EACX,eAAe;EACf,6BAA6B;AAmB/B;;EAjBE;IACE,eAAe;EACjB;;EAEA;IACE,iBAAiB;EACnB;;EAEA;IACE,kBAAkB;EACpB;;EAEA;IACE,iBAAiB;IACjB,gBAAgB;IAChB,0BAA0B;EAC5B;;ACrBA;IACE,iBAAiB;EACnB;EACA;IACE,WAAW;EACb;EACA;IACE,WAAW;EACb;;;ACTF;EACE,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB,SAAS;EACT,UAAU;EACV,YAAY;AA0Bd;;EAxBE;IACE,gBAAgB;EAMlB;;EALE;MACE,cAAc;MACd,WAAW;MACX,sBAAsB;IACxB;;EAGF;IACE,WAAW;IACX,qBAAqB;EACvB;;EAEA;IACE,iBAAiB;IACjB,iBAAiB;IACjB,gBAAgB;IAChB,mBAAmB;EAKrB;;EAHE;MACE,cAAc;IAChB;;AAIJ;EACE,UAAU;AACZ;;ACpCA;EACE,iBAAiB;AACnB;;ACFA;EACE,WAAW;EACX,mBAAmB;EACnB,mBAAmB;EACnB,mBAAmB;AA8IrB;;EA5IE;IACE,oCAAoC;EACtC;;EAEA;IACE,mBAAmB;IACnB,aAAa;IACb,gBAAgB;IAChB,mBAAmB;IACnB,kBAAkB;IAClB,qBAAqB;IACrB,4CAA4C;EAC9C;;EAEA;;IAEE,UAAU;EACZ;;EAEA;IACE,YAAY;EACd;;EAEA;IACE,YAAY;EACd;;EAEA;IACE,YAAY;IACZ,mBAAmB;IACnB,uBAAuB;IACvB,gBAAgB;EAClB;;EAGE;;EADF;MAEI;EAEJ;IADE;;EAGF;IACE,YAAY;EACd;;EAEA,WAAW;;EACX;IACE,8BAA8B;EAChC;;EAEA,QAAQ;;EACR;IACE,8BAA8B;EAChC;;EAEA,QAAQ;;EACR;IACE,8BAA8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AqC;CAArC,qCAAqC;AACtC","file":"main.css","sourcesContent":[".line {\n padding: 0.3em;\n\n .file, .line {\n font-style: italic;\n }\n\n .argument {\n font-weight: bold;\n }\n}\n",".exceptionRow {\n display: inline-block;\n width: 100%;\n cursor: pointer;\n background-position: 100% 4px;\n\n * {\n cursor: inherit;\n }\n\n .exception {\n font-weight: bold;\n }\n\n ol.trace {\n padding-top: 0.5em;\n }\n\n .previous {\n padding-top: 10px;\n margin-top: 10px;\n border-top: 1px solid #eee;\n }\n}\n",".toggleEntry {\n a {\n line-height: 30px;\n }\n input[type=\"checkbox\"] {\n margin: 5px;\n }\n label {\n margin: 5px;\n }\n}\n\n",".settings {\n padding: 1em;\n z-index: 100;\n position: absolute;\n top: 43px;\n left: 10px;\n width: 170px;\n\n li {\n list-style: none;\n a {\n display: block;\n width: 100%;\n box-sizing: border-box;\n }\n }\n\n > a {\n margin: 5px;\n display: inline-block;\n }\n\n h4 {\n font-weight: bold;\n padding-left: 7px;\n padding-top: 4px;\n padding-bottom: 4px;\n\n &:first-child {\n padding-top: 0;\n }\n }\n}\n\n.settings:after {\n left: 75px;\n}\n",".logSelect {\n margin: 12px 12px;\n}\n",".logs {\n width: 100%;\n white-space: normal;\n margin-bottom: 14px;\n table-layout: fixed;\n\n th {\n color: var(--color-text-maxcontrast);\n }\n\n td, th {\n vertical-align: top;\n padding: .8em;\n text-align: left;\n font-weight: normal;\n position: relative;\n word-wrap: break-word;\n border-bottom: 1px solid var(--color-border);\n }\n\n th.level.active .log-settings-toggle,\n th.level:hover .log-settings-toggle {\n opacity: 1;\n }\n\n .time {\n width: 180px;\n }\n\n .time.relative {\n width: 100px;\n }\n\n .app {\n width: 100px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n td.app, th.app {\n @media only screen and (max-width: 1100px) {\n display: none;\n }\n }\n\n .level {\n width: 100px;\n }\n\n /* warning*/\n .level_2 td.level {\n border-left: 5px solid #FEEFB3;\n }\n\n /*error*/\n .level_3 td.level {\n border-left: 5px solid #FFBABA;\n }\n\n /*fatal*/\n .level_4 td.level {\n border-left: 5px solid #ff8080;\n }\n\n div.column {\n box-sizing: border-box;\n padding: 7px;\n }\n\n div.level {\n font-weight: bold;\n }\n\n div.level, div.app, div.time {\n display: inline-block;\n width: 33%;\n }\n\n div.time {\n padding-right: 20px;\n }\n\n div.row {\n position: relative;\n }\n\n div.message {\n border-bottom: 1px solid var(--color-border);\n }\n\n td.copy, th.copy {\n position: relative;\n width: 42px;\n margin: 0;\n overflow: visible;\n\n button {\n position: relative;\n opacity: 0;\n transition: opacity 0.5s;\n top: -5px;\n padding: 0;\n background-color: transparent;\n border: none;\n width: 42px;\n }\n }\n\n tr:hover {\n td.copy button {\n opacity: 0.5;\n\n &:hover {\n opacity: 1;\n }\n }\n }\n\n tr.active td.copy button {\n opacity: 1;\n }\n\n div.level_1 {\n\n }\n\n div.level_2 {\n border-left: 5px solid #FEEFB3;\n }\n\n div.level_3 {\n border-left: 5px solid #FFBABA;\n }\n\n div.level_4 {\n border-left: 5px solid #ff8080;\n }\n\n tr.empty td {\n border-bottom: none;\n }\n\n tr.highlight {\n background-color: var(--color-background-hover);\n }\n}\n\n.smallHeader,\nth.level {\n overflow: visible;\n\n > span {\n margin: -0.8em;\n padding: .8em;\n display: block;\n width: 100%;\n height: 100%;\n cursor: pointer;\n }\n\n .log-settings-toggle {\n cursor: pointer;\n display: block;\n float: right;\n margin: 2px;\n opacity: 0.5;\n transition: opacity 0.2s;\n }\n}\n\n.smallHeader {\n margin-left: 44px;\n width: 62px;\n padding: 10px;\n\n .log-settings-toggle:hover {\n opacity: 1;\n }\n}\n\n.copyMenu {\n right: -10px;\n top: 50px;\n width: 150px;\n}\n",".content {\n\twidth: 100%;\n}\n\n#logreader-root {\n\theight: calc(100vh - 50px);\n\twidth: 100%;\n}\n\n#logreader-root > div {\n\theight: 100%;\n}\n\n#log-section {\n\tdisplay: none; /** we overwrite this */\n}\n\n.log-loading {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n}\n\n.scrollContainer {\n\theight: 100%;\n\toverflow: auto;\n}\n\n.highlight-enter {\n\tbackground-color: var(--color-warning);\n}\n\n.highlight-enter.highlight-enter-active {\n\tbackground-color: var(--color-main-background);\n\ttransition: background 1500ms ease-in;\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///./js/Components/TraceLine.css","webpack:///./js/Components/Exception.css","webpack:///./js/Components/ToggleEntry.css","webpack:///./js/Components/LevelSettings.css","webpack:///./js/Components/LogUploader.css","webpack:///./js/Components/ToggleChoice.css","webpack:///./js/Components/LogTable.css","webpack:///./css/app.css"],"names":[],"mappings":"AAAA;EACE,cAAc;AAShB;;EAPE;IACE,kBAAkB;EACpB;;EAEA;IACE,iBAAiB;EACnB;;ACTF;EACE,qBAAqB;EACrB,WAAW;EACX,eAAe;EACf,6BAA6B;AAmB/B;;EAjBE;IACE,eAAe;EACjB;;EAEA;IACE,iBAAiB;EACnB;;EAEA;IACE,kBAAkB;EACpB;;EAEA;IACE,iBAAiB;IACjB,gBAAgB;IAChB,0BAA0B;EAC5B;;ACrBA;IACE,iBAAiB;EACnB;EACA;IACE,WAAW;EACb;EACA;IACE,WAAW;EACb;;;ACTF;EACE,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB,SAAS;EACT,UAAU;EACV,YAAY;AA0Bd;;EAxBE;IACE,gBAAgB;EAMlB;;EALE;MACE,cAAc;MACd,WAAW;MACX,sBAAsB;IACxB;;EAGF;IACE,WAAW;IACX,qBAAqB;EACvB;;EAEA;IACE,iBAAiB;IACjB,iBAAiB;IACjB,gBAAgB;IAChB,mBAAmB;EAKrB;;EAHE;MACE,cAAc;IAChB;;AAIJ;EACE,UAAU;AACZ;;ACpCA;EACE,iBAAiB;AACnB;;ACDC;GACE,iBAAiB;CACnB;CACA;GACE,WAAW;CACb;CACA;GACE,WAAW;CACb;;ACTD;EACE,WAAW;EACX,mBAAmB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ACX,YAAY;IACZ,wBAAwB;EAC1B;;AAGF;EACE,iBAAiB;EACjB,WAAW;EACX,aAAa;AAKf;;AAHE;IACE,UAAU;EACZ;;AAGF;EACE,YAAY;EACZ,SAAS;EACT,YAAY;AACd;;ACzLA;CACC,WAAW;AACZ;;AAEA;CACC,0BAA0B;CAC1B,WAAW;AACZ;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,aAAa,EAAE,uBAAuB;AACvC;;AAEA;CACC,kBAAkB;CAClB,QAAQ;CACR,SAAS;CACT,gCAAgC;AACjC;;AAEA;CACC,YAAY;CACZ,cAAc;AACf;;AAEA;CACC,sCAAsC;AACvC;;AAEA;CACC,8CAA8C;CAC9C,qCAAqC;AACtC","file":"main.css","sourcesContent":[".line {\n padding: 0.3em;\n\n .file, .line {\n font-style: italic;\n }\n\n .argument {\n font-weight: bold;\n }\n}\n",".exceptionRow {\n display: inline-block;\n width: 100%;\n cursor: pointer;\n background-position: 100% 4px;\n\n * {\n cursor: inherit;\n }\n\n .exception {\n font-weight: bold;\n }\n\n ol.trace {\n padding-top: 0.5em;\n }\n\n .previous {\n padding-top: 10px;\n margin-top: 10px;\n border-top: 1px solid #eee;\n }\n}\n",".toggleEntry {\n a {\n line-height: 30px;\n }\n input[type=\"checkbox\"] {\n margin: 5px;\n }\n label {\n margin: 5px;\n }\n}\n\n",".settings {\n padding: 1em;\n z-index: 100;\n position: absolute;\n top: 43px;\n left: 10px;\n width: 170px;\n\n li {\n list-style: none;\n a {\n display: block;\n width: 100%;\n box-sizing: border-box;\n }\n }\n\n > a {\n margin: 5px;\n display: inline-block;\n }\n\n h4 {\n font-weight: bold;\n padding-left: 7px;\n padding-top: 4px;\n padding-bottom: 4px;\n\n &:first-child {\n padding-top: 0;\n }\n }\n}\n\n.settings:after {\n left: 75px;\n}\n",".logSelect {\n margin: 12px 12px;\n}\n",".toggleChoice {\n\ta {\n\t line-height: 30px;\n\t}\n\tinput[type=\"radio\"] {\n\t margin: 5px;\n\t}\n\tlabel {\n\t margin: 5px;\n\t}\n}\n",".logs {\n width: 100%;\n white-space: normal;\n margin-bottom: 14px;\n table-layout: fixed;\n\n th {\n color: var(--color-text-maxcontrast);\n }\n\n td, th {\n vertical-align: top;\n padding: .8em;\n text-align: left;\n font-weight: normal;\n position: relative;\n word-wrap: break-word;\n border-bottom: 1px solid var(--color-border);\n }\n\n th.level.active .log-settings-toggle,\n th.level:hover .log-settings-toggle {\n opacity: 1;\n }\n\n .time {\n width: 180px;\n }\n\n .time.relative {\n width: 100px;\n }\n\n .app {\n width: 100px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n td.app, th.app {\n @media only screen and (max-width: 1100px) {\n display: none;\n }\n }\n\n .level {\n width: 100px;\n }\n\n /* warning*/\n .level_2 td.level {\n border-left: 5px solid #FEEFB3;\n }\n\n /*error*/\n .level_3 td.level {\n border-left: 5px solid #FFBABA;\n }\n\n /*fatal*/\n .level_4 td.level {\n border-left: 5px solid #ff8080;\n }\n\n div.column {\n box-sizing: border-box;\n padding: 7px;\n }\n\n div.level {\n font-weight: bold;\n }\n\n div.level, div.app, div.time {\n display: inline-block;\n width: 33%;\n }\n\n div.time {\n padding-right: 20px;\n }\n\n div.row {\n position: relative;\n }\n\n div.message {\n border-bottom: 1px solid var(--color-border);\n }\n\n td.copy, th.copy {\n position: relative;\n width: 42px;\n margin: 0;\n overflow: visible;\n\n button {\n position: relative;\n opacity: 0;\n transition: opacity 0.5s;\n top: -5px;\n padding: 0;\n background-color: transparent;\n border: none;\n width: 42px;\n }\n }\n\n tr:hover {\n td.copy button {\n opacity: 0.5;\n\n &:hover {\n opacity: 1;\n }\n }\n }\n\n tr.active td.copy button {\n opacity: 1;\n }\n\n div.level_1 {\n\n }\n\n div.level_2 {\n border-left: 5px solid #FEEFB3;\n }\n\n div.level_3 {\n border-left: 5px solid #FFBABA;\n }\n\n div.level_4 {\n border-left: 5px solid #ff8080;\n }\n\n tr.empty td {\n border-bottom: none;\n }\n\n tr.highlight {\n background-color: var(--color-background-hover);\n }\n}\n\n.smallHeader,\nth.level {\n overflow: visible;\n\n > span {\n margin: -0.8em;\n padding: .8em;\n display: block;\n width: 100%;\n height: 100%;\n cursor: pointer;\n }\n\n .log-settings-toggle {\n cursor: pointer;\n display: block;\n float: right;\n margin: 2px;\n opacity: 0.5;\n transition: opacity 0.2s;\n }\n}\n\n.smallHeader {\n margin-left: 44px;\n width: 62px;\n padding: 10px;\n\n .log-settings-toggle:hover {\n opacity: 1;\n }\n}\n\n.copyMenu {\n right: -10px;\n top: 50px;\n width: 150px;\n}\n",".content {\n\twidth: 100%;\n}\n\n#logreader-root {\n\theight: calc(100vh - 50px);\n\twidth: 100%;\n}\n\n#logreader-root > div {\n\theight: 100%;\n}\n\n#log-section {\n\tdisplay: none; /** we overwrite this */\n}\n\n.log-loading {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n}\n\n.scrollContainer {\n\theight: 100%;\n\toverflow: auto;\n}\n\n.highlight-enter {\n\tbackground-color: var(--color-warning);\n}\n\n.highlight-enter.highlight-enter-active {\n\tbackground-color: var(--color-main-background);\n\ttransition: background 1500ms ease-in;\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/build/main.js b/build/main.js index 5ec18504..6954b231 100644 --- a/build/main.js +++ b/build/main.js @@ -1,3 +1,3 @@ /*! For license information please see main.js.LICENSE.txt */ -(()=>{var e={7228:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{e.exports=function(e){if(Array.isArray(e))return e}},1506:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},8926:e=>{function t(e,t,n,r,o,a,i){try{var l=e[a](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(o,a){var i=e.apply(n,r);function l(e){t(i,o,a,l,u,"next",e)}function u(e){t(i,o,a,l,u,"throw",e)}l(void 0)}))}}},4575:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},3913:e=>{function t(e,t){for(var n=0;n{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},7154:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t{function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t},2205:(e,t,n)=>{var r=n(9489);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},3884:e=>{e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}}},521:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},6479:(e,t,n)=>{var r=n(7316);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},7316:e=>{e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}},8585:(e,t,n)=>{var r=n(8),o=n(1506);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},9489:e=>{function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t},3038:(e,t,n)=>{var r=n(2858),o=n(3884),a=n(379),i=n(521);e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||i()}},8:e=>{function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t},379:(e,t,n)=>{var r=n(7228);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},7757:(e,t,n)=>{e.exports=n(5666)},8363:(e,t)=>{"use strict";t.Z=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),a=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?a===t.replace(/\/.*$/,""):o===t}))}return!0}},4088:e=>{e.exports=function(){for(var e=arguments.length,t=[],n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var r,o=(r=n(404))&&r.__esModule?r:{default:r};e.exports=t.default},404:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},602:e=>{"use strict";function t(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,n){e.classList?e.classList.remove(n):"string"==typeof e.className?e.className=t(e.className,n):e.setAttribute("class",t(e.className&&e.className.baseVal||"",n))}},702:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationEnd=t.animationDelay=t.animationTiming=t.animationDuration=t.animationName=t.transitionEnd=t.transitionDuration=t.transitionDelay=t.transitionTiming=t.transitionProperty=t.transform=void 0;var r,o="transform",a=void 0,i=void 0,l=void 0,u=void 0,s=void 0,c=void 0,f=void 0,p=void 0,d=void 0,h=void 0,v=void 0;if(((r=n(139))&&r.__esModule?r:{default:r}).default){var m=function(){for(var e=document.createElement("div").style,t={O:function(e){return"o"+e.toLowerCase()},Moz:function(e){return e.toLowerCase()},Webkit:function(e){return"webkit"+e},ms:function(e){return"MS"+e}},n=Object.keys(t),r=void 0,o=void 0,a="",i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=!("undefined"==typeof window||!window.document||!window.document.createElement),e.exports=t.default},5177:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o,a=(r=n(139))&&r.__esModule?r:{default:r},i="clearTimeout",l=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-s)),r=setTimeout(e,n);return s=t,r},u=function(e,t){return e+(e?t[0].toUpperCase()+t.substr(1):t)+"AnimationFrame"};a.default&&["","webkit","moz","o","ms"].some((function(e){var t=u(e,"request");if(t in window)return i=u(e,"cancel"),l=function(e){return window[t](e)}}));var s=(new Date).getTime();(o=function(e){return l(e)}).cancel=function(e){window[i]&&"function"==typeof window[i]&&window[i](e)},t.default=o,e.exports=t.default},7187:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function o(){void 0!==a&&e.removeListener("error",a),n([].slice.call(arguments))}var a;"error"!==t&&(a=function(n){e.removeListener(t,o),r(n)},e.once("error",a)),e.once(t,o)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var i=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function s(e,t,n,r){var o,a,i,s;if(l(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),i=a[t]),void 0===i)i=a[t]=n,++e._eventsCount;else if("function"==typeof i?i=a[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(o=u(e))>0&&i.length>o&&!i.warned){i.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=i.length,s=c,console&&console.warn&&console.warn(s)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=c.bind(r);return o.listener=n,r.wrapFn=o,o}function p(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var u=a[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var s=u.length,c=h(u,s);for(n=0;n=0;a--)if(n[a]===t||n[a].listener===t){i=n[a].listener,o=a;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},a.prototype.listenerCount=d,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var i,l,u=o(e),s=1;s{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Content=t.ControlBar=t.App=void 0;var r,o=function(){function e(e,t){for(var n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Settings=t.Separator=t.Entry=t.SideBar=void 0;var r=function(){function e(e,t){for(var n=0;n{"use strict";t.Zr=t.Z0=t.Ke=void 0;var r=n(601),o=n(1064);t.Ke=r.SideBar,r.Entry,t.Z0=r.Separator,o.App,o.Content,o.ControlBar,t.Zr=r.Settings},2703:(e,t,n)=>{"use strict";var r=n(414);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9081:(e,t,n)=>{"use strict";e.exports=n(1174)},4448:(e,t,n)=>{"use strict";var r=n(7294),o=n(7418),a=n(3840);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n