iobroker.javascript 8.0.1 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/admin/asset-manifest.json +7 -7
- package/admin/static/js/{7184.3192a6f7.chunk.js → 7184.e2460002.chunk.js} +2 -2
- package/admin/static/js/{7184.3192a6f7.chunk.js.map → 7184.e2460002.chunk.js.map} +1 -1
- package/admin/static/js/{9964.1b18dbc8.chunk.js → 9964.8b1ee0f5.chunk.js} +3 -3
- package/admin/static/js/9964.8b1ee0f5.chunk.js.map +1 -0
- package/admin/static/js/{main.c20894f7.js → main.a56e0977.js} +2 -2
- package/admin/static/js/{main.c20894f7.js.map → main.a56e0977.js.map} +1 -1
- package/admin/tab.html +1 -1
- package/io-package.json +14 -14
- package/package.json +1 -1
- package/admin/static/js/9964.1b18dbc8.chunk.js.map +0 -1
- /package/admin/static/js/{9964.1b18dbc8.chunk.js.LICENSE.txt → 9964.8b1ee0f5.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 9964.
|
|
2
|
-
(self.webpackChunkjs=self.webpackChunkjs||[]).push([[9964,2123,4504,7361],{18628:(e,t)=>{"use strict";t.A=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),o=e.name||"",n=(e.type||"").toLowerCase(),i=n.replace(/\/.*$/,"");return r.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?o.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):n===t}))}return!0}},42123:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;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={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(n){return!1}}()?Object.assign:function(e,n){for(var i,s,c=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),a=1;a<arguments.length;a++){for(var u in i=Object(arguments[a]))r.call(i,u)&&(c[u]=i[u]);if(t){s=t(i);for(var l=0;l<s.length;l++)o.call(i,s[l])&&(c[s[l]]=i[s[l]])}}return c}},33155:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ErrorCode:()=>F,default:()=>ue,useDropzone:()=>de});var o=r(28437),n=r.n(o),i=r(95973),s=r.n(i),c=r(6326),a=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function u(e,t){var r=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var r=t.split(".").pop().toLowerCase(),o=a.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!==typeof r.path){var o=e.webkitRelativePath;Object.defineProperty(r,"path",{value:"string"===typeof t?t:"string"===typeof o&&o.length>0?o:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}var l=[".DS_Store","Thumbs.db"];function d(e){return"object"===typeof e&&null!==e}function p(e){return b(e.target.files).map((function(e){return u(e)}))}function f(e){return(0,c.sH)(this,void 0,void 0,(function(){return(0,c.YH)(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return u(e)}))]}}))}))}function h(e,t){return(0,c.sH)(this,void 0,void 0,(function(){var r;return(0,c.YH)(this,(function(o){switch(o.label){case 0:return e.items?(r=b(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,r]:[4,Promise.all(r.map(g))]):[3,2];case 1:return[2,m(y(o.sent()))];case 2:return[2,m(b(e.files).map((function(e){return u(e)})))]}}))}))}function m(e){return e.filter((function(e){return-1===l.indexOf(e.name)}))}function b(e){if(null===e)return[];for(var t=[],r=0;r<e.length;r++){var o=e[r];t.push(o)}return t}function g(e){if("function"!==typeof e.webkitGetAsEntry)return v(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?x(t):v(e)}function y(e){return e.reduce((function(e,t){return(0,c.fX)((0,c.fX)([],(0,c.zs)(e),!1),(0,c.zs)(Array.isArray(t)?y(t):[t]),!1)}),[])}function v(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var r=u(t);return Promise.resolve(r)}function w(e){return(0,c.sH)(this,void 0,void 0,(function(){return(0,c.YH)(this,(function(t){return[2,e.isDirectory?x(e):O(e)]}))}))}function x(e){var t=e.createReader();return new Promise((function(e,r){var o=[];!function n(){var i=this;t.readEntries((function(t){return(0,c.sH)(i,void 0,void 0,(function(){var i,s,a;return(0,c.YH)(this,(function(c){switch(c.label){case 0:if(t.length)return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return i=c.sent(),e(i),[3,4];case 3:return s=c.sent(),r(s),[3,4];case 4:return[3,6];case 5:a=Promise.all(t.map(w)),o.push(a),n(),c.label=6;case 6:return[2]}}))}))}),(function(e){r(e)}))}()}))}function O(e){return(0,c.sH)(this,void 0,void 0,(function(){return(0,c.YH)(this,(function(t){return[2,new Promise((function(t,r){e.file((function(r){var o=u(r,e.fullPath);t(o)}),(function(e){r(e)}))}))]}))}))}var _=r(18628);function S(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){T(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function T(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],s=!0,c=!1;try{for(r=r.call(e);!(s=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);s=!0);}catch(a){c=!0,n=a}finally{try{s||null==r.return||r.return()}finally{if(c)throw n}}return i}(e,t)||C(e,t)||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.")}()}function C(e,t){if(e){if("string"===typeof e)return R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var P="file-invalid-type",I="file-too-large",D="file-too-small",A="too-many-files",F={FileInvalidType:P,FileTooLarge:I,FileTooSmall:D,TooManyFiles:A},L=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:P,message:"File type must be ".concat(t)}},q=function(e){return{code:I,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},N=function(e){return{code:D,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},H={code:A,message:"Too many files"};function M(e,t){var r="application/x-moz-file"===e.type||(0,_.A)(e,t);return[r,r?null:L(t)]}function z(e,t,r){if(U(e.size))if(U(t)&&U(r)){if(e.size>r)return[!1,q(r)];if(e.size<t)return[!1,N(t)]}else{if(U(t)&&e.size<t)return[!1,N(t)];if(U(r)&&e.size>r)return[!1,q(r)]}return[!0,null]}function U(e){return void 0!==e&&null!==e}function K(e){return"function"===typeof e.isPropagationStopped?e.isPropagationStopped():"undefined"!==typeof e.cancelBubble&&e.cancelBubble}function B(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function G(e){e.preventDefault()}function V(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];return t.some((function(t){return!K(e)&&t&&t.apply(void 0,[e].concat(o)),K(e)}))}}function W(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function $(e){return/^.*\.[\w]+$/.test(e)}var Y=["children"],J=["open"],X=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Q=["refKey","onChange","onClick"];function Z(e){return function(e){if(Array.isArray(e))return re(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||te(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],s=!0,c=!1;try{for(r=r.call(e);!(s=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);s=!0);}catch(a){c=!0,n=a}finally{try{s||null==r.return||r.return()}finally{if(c)throw n}}return i}(e,t)||te(e,t)||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.")}()}function te(e,t){if(e){if("string"===typeof e)return re(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(r),!0).forEach((function(t){ie(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ie(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function se(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var ce=(0,o.forwardRef)((function(e,t){var r=e.children,i=de(se(e,Y)),s=i.open,c=se(i,J);return(0,o.useImperativeHandle)(t,(function(){return{open:s}}),[s]),n().createElement(o.Fragment,null,r(ne(ne({},c),{},{open:s})))}));ce.displayName="Dropzone";var ae={disabled:!1,getFilesFromEvent:function(e){return(0,c.sH)(this,void 0,void 0,(function(){return(0,c.YH)(this,(function(t){return d(e)&&d(e.dataTransfer)?[2,h(e.dataTransfer,e.type)]:function(e){return d(e)&&d(e.target)}(e)?[2,p(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"===typeof e.getFile}))?[2,f(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ce.defaultProps=ae,ce.propTypes={children:s().func,accept:s().objectOf(s().arrayOf(s().string)),multiple:s().bool,preventDropOnDocument:s().bool,noClick:s().bool,noKeyboard:s().bool,noDrag:s().bool,noDragEventsBubbling:s().bool,minSize:s().number,maxSize:s().number,maxFiles:s().number,disabled:s().bool,getFilesFromEvent:s().func,onFileDialogCancel:s().func,onFileDialogOpen:s().func,useFsAccessApi:s().bool,autoFocus:s().bool,onDragEnter:s().func,onDragLeave:s().func,onDragOver:s().func,onDrop:s().func,onDropAccepted:s().func,onDropRejected:s().func,onError:s().func,validator:s().func};const ue=ce;var le={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ne(ne({},ae),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,c=t.minSize,a=t.multiple,u=t.maxFiles,l=t.onDragEnter,d=t.onDragLeave,p=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,m=t.onDropRejected,b=t.onFileDialogCancel,g=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,w=t.preventDropOnDocument,x=t.noClick,O=t.noKeyboard,_=t.noDrag,j=t.noDragEventsBubbling,C=t.onError,R=t.validator,P=(0,o.useMemo)((function(){return function(e){if(U(e))return Object.entries(e).reduce((function(e,t){var r=E(t,2),o=r[0],n=r[1];return[].concat(S(e),[o],S(n))}),[]).filter((function(e){return W(e)||$(e)})).join(",")}(r)}),[r]),I=(0,o.useMemo)((function(){return function(e){return U(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=E(e,2),r=t[0],o=t[1],n=!0;return W(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),n=!1),Array.isArray(o)&&o.every($)||(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),n=!1),n})).reduce((function(e,t){var r=E(t,2),o=r[0],n=r[1];return k(k({},e),{},T({},o,n))}),{})}]:e}(r)}),[r]),D=(0,o.useMemo)((function(){return"function"===typeof g?g:fe}),[g]),A=(0,o.useMemo)((function(){return"function"===typeof b?b:fe}),[b]),F=(0,o.useRef)(null),L=(0,o.useRef)(null),q=ee((0,o.useReducer)(pe,le),2),N=q[0],Y=q[1],J=N.isFocused,te=N.isFileDialogActive,re=(0,o.useRef)("undefined"!==typeof window&&window.isSecureContext&&y&&"showOpenFilePicker"in window),oe=function(){!re.current&&te&&setTimeout((function(){L.current&&(L.current.files.length||(Y({type:"closeDialog"}),A()))}),300)};(0,o.useEffect)((function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}}),[L,te,A,re]);var ce=(0,o.useRef)([]),ue=function(e){F.current&&F.current.contains(e.target)||(e.preventDefault(),ce.current=[])};(0,o.useEffect)((function(){return w&&(document.addEventListener("dragover",G,!1),document.addEventListener("drop",ue,!1)),function(){w&&(document.removeEventListener("dragover",G),document.removeEventListener("drop",ue))}}),[F,w]),(0,o.useEffect)((function(){return!n&&v&&F.current&&F.current.focus(),function(){}}),[F,v,n]);var de=(0,o.useCallback)((function(e){C?C(e):console.error(e)}),[C]),he=(0,o.useCallback)((function(e){e.preventDefault(),e.persist(),Te(e),ce.current=[].concat(Z(ce.current),[e.target]),B(e)&&Promise.resolve(i(e)).then((function(t){if(!K(e)||j){var r=t.length,o=r>0&&function(e){var t=e.files,r=e.accept,o=e.minSize,n=e.maxSize,i=e.multiple,s=e.maxFiles,c=e.validator;return!(!i&&t.length>1||i&&s>=1&&t.length>s)&&t.every((function(e){var t=E(M(e,r),1)[0],i=E(z(e,o,n),1)[0],s=c?c(e):null;return t&&i&&!s}))}({files:t,accept:P,minSize:c,maxSize:s,multiple:a,maxFiles:u,validator:R});Y({isDragAccept:o,isDragReject:r>0&&!o,isDragActive:!0,type:"setDraggedFiles"}),l&&l(e)}})).catch((function(e){return de(e)}))}),[i,l,de,j,P,c,s,a,u,R]),me=(0,o.useCallback)((function(e){e.preventDefault(),e.persist(),Te(e);var t=B(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(r){}return t&&p&&p(e),!1}),[p,j]),be=(0,o.useCallback)((function(e){e.preventDefault(),e.persist(),Te(e);var t=ce.current.filter((function(e){return F.current&&F.current.contains(e)})),r=t.indexOf(e.target);-1!==r&&t.splice(r,1),ce.current=t,t.length>0||(Y({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),B(e)&&d&&d(e))}),[F,d,j]),ge=(0,o.useCallback)((function(e,t){var r=[],o=[];e.forEach((function(e){var t=ee(M(e,P),2),n=t[0],i=t[1],a=ee(z(e,c,s),2),u=a[0],l=a[1],d=R?R(e):null;if(n&&u&&!d)r.push(e);else{var p=[i,l];d&&(p=p.concat(d)),o.push({file:e,errors:p.filter((function(e){return e}))})}})),(!a&&r.length>1||a&&u>=1&&r.length>u)&&(r.forEach((function(e){o.push({file:e,errors:[H]})})),r.splice(0)),Y({acceptedFiles:r,fileRejections:o,type:"setFiles"}),f&&f(r,o,t),o.length>0&&m&&m(o,t),r.length>0&&h&&h(r,t)}),[Y,a,P,c,s,u,f,h,m,R]),ye=(0,o.useCallback)((function(e){e.preventDefault(),e.persist(),Te(e),ce.current=[],B(e)&&Promise.resolve(i(e)).then((function(t){K(e)&&!j||ge(t,e)})).catch((function(e){return de(e)})),Y({type:"reset"})}),[i,ge,de,j]),ve=(0,o.useCallback)((function(){if(re.current){Y({type:"openDialog"}),D();var e={multiple:a,types:I};window.showOpenFilePicker(e).then((function(e){return i(e)})).then((function(e){ge(e,null),Y({type:"closeDialog"})})).catch((function(e){var t;(t=e)instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)?(A(e),Y({type:"closeDialog"})):!function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?de(e):(re.current=!1,L.current?(L.current.value=null,L.current.click()):de(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.")))}))}else L.current&&(Y({type:"openDialog"}),D(),L.current.value=null,L.current.click())}),[Y,D,A,y,ge,de,I,a]),we=(0,o.useCallback)((function(e){F.current&&F.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),ve()))}),[F,ve]),xe=(0,o.useCallback)((function(){Y({type:"focus"})}),[]),Oe=(0,o.useCallback)((function(){Y({type:"blur"})}),[]),_e=(0,o.useCallback)((function(){x||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?ve():setTimeout(ve,0))}),[x,ve]),Se=function(e){return n?null:e},je=function(e){return O?null:Se(e)},ke=function(e){return _?null:Se(e)},Te=function(e){j&&e.stopPropagation()},Ee=(0,o.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,s=e.onFocus,c=e.onBlur,a=e.onClick,u=e.onDragEnter,l=e.onDragOver,d=e.onDragLeave,p=e.onDrop,f=se(e,X);return ne(ne(ie({onKeyDown:je(V(i,we)),onFocus:je(V(s,xe)),onBlur:je(V(c,Oe)),onClick:Se(V(a,_e)),onDragEnter:ke(V(u,he)),onDragOver:ke(V(l,me)),onDragLeave:ke(V(d,be)),onDrop:ke(V(p,ye)),role:"string"===typeof o&&""!==o?o:"presentation"},r,F),n||O?{}:{tabIndex:0}),f)}}),[F,we,xe,Oe,_e,he,me,be,ye,O,_,n]),Ce=(0,o.useCallback)((function(e){e.stopPropagation()}),[]),Re=(0,o.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.onChange,n=e.onClick,i=se(e,Q);return ne(ne({},ie({accept:P,multiple:a,type:"file",style:{display:"none"},onChange:Se(V(o,ye)),onClick:Se(V(n,Ce)),tabIndex:-1},r,L)),i)}}),[L,r,a,ye,n]);return ne(ne({},N),{},{isFocused:J&&!n,getRootProps:Ee,getInputProps:Re,rootRef:F,inputRef:L,open:Se(ve)})}function pe(e,t){switch(t.type){case"focus":return ne(ne({},e),{},{isFocused:!0});case"blur":return ne(ne({},e),{},{isFocused:!1});case"openDialog":return ne(ne({},le),{},{isFileDialogActive:!0});case"closeDialog":return ne(ne({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ne(ne({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ne(ne({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ne({},le);default:return e}}function fe(){}},70079:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o},e.exports.__esModule=!0,e.exports.default=e.exports},5901:(e,t,r)=>{var o=r(70079);e.exports=function(e){if(Array.isArray(e))return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},12475:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},29293:e=>{function t(e,t,r,o,n,i,s){try{var c=e[i](s),a=c.value}catch(u){return void r(u)}c.done?t(a):Promise.resolve(a).then(o,n)}e.exports=function(e){return function(){var r=this,o=arguments;return new Promise((function(n,i){var s=e.apply(r,o);function c(e){t(s,n,i,c,a,"next",e)}function a(e){t(s,n,i,c,a,"throw",e)}c(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},17383:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},34579:(e,t,r)=>{var o=r(77736);function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},43693:(e,t,r)=>{var o=r(77736);e.exports=function(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},63072:e=>{function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},29511:(e,t,r)=>{var o=r(95636);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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},99291:e=>{e.exports=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},41869:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},28452:(e,t,r)=>{var o=r(73738).default,n=r(12475);e.exports=function(e,t){if(t&&("object"===o(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},4633:(e,t,r)=>{var o=r(73738).default;function n(){"use strict";e.exports=n=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,s=i.hasOwnProperty,c=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",d=a.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,r){return e[t]=r}}function f(e,t,r,o){var n=t&&t.prototype instanceof w?t:w,i=Object.create(n.prototype),s=new D(o||[]);return c(i,"_invoke",{value:C(e,r,s)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=f;var m="suspendedStart",b="suspendedYield",g="executing",y="completed",v={};function w(){}function x(){}function O(){}var _={};p(_,u,(function(){return this}));var S=Object.getPrototypeOf,j=S&&S(S(A([])));j&&j!==i&&s.call(j,u)&&(_=j);var k=O.prototype=w.prototype=Object.create(_);function T(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(n,i,c,a){var u=h(e[n],e,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==o(d)&&s.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,c,a)}),(function(e){r("throw",e,c,a)})):t.resolve(d).then((function(e){l.value=e,c(l)}),(function(e){return r("throw",e,c,a)}))}a(u.arg)}var n;c(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(i,i):i()}})}function C(e,r,o){var n=m;return function(i,s){if(n===g)throw Error("Generator is already running");if(n===y){if("throw"===i)throw s;return{value:t,done:!0}}for(o.method=i,o.arg=s;;){var c=o.delegate;if(c){var a=R(c,o);if(a){if(a===v)continue;return a}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(n===m)throw n=y,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);n=g;var u=h(e,r,o);if("normal"===u.type){if(n=o.done?y:b,u.arg===v)continue;return{value:u.arg,done:o.done}}"throw"===u.type&&(n=y,o.method="throw",o.arg=u.arg)}}}function R(e,r){var o=r.method,n=e.iterator[o];if(n===t)return r.delegate=null,"throw"===o&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+o+"' method")),v;var i=h(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var s=i.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n<e.length;)if(s.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(o(e)+" is not iterable")}return x.prototype=O,c(k,"constructor",{value:O,configurable:!0}),c(O,"constructor",{value:x,configurable:!0}),x.displayName=p(O,d,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===x||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,p(e,d,"GeneratorFunction")),e.prototype=Object.create(k),e},r.awrap=function(e){return{__await:e}},T(E.prototype),p(E.prototype,l,(function(){return this})),r.AsyncIterator=E,r.async=function(e,t,o,n,i){void 0===i&&(i=Promise);var s=new E(f(e,t,o,n),i);return r.isGeneratorFunction(t)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},T(k),p(k,d,"Generator"),p(k,u,(function(){return this})),p(k,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var o in t)r.push(o);return r.reverse(),function e(){for(;r.length;){var o=r.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},r.values=A,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&s.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(o,n){return c.type="throw",c.arg=e,r.next=o,n&&(r.method="next",r.arg=t),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var a=s.call(i,"catchLoc"),u=s.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&s.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var n=o;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var i=n?n.completion:{};return i.type=e,i.arg=t,n?(this.method="next",this.next=n.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var o=r.completion;if("throw"===o.type){var n=o.arg;I(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(e,r,o){return this.delegate={iterator:A(e),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=t),v}},r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},95636:e=>{function t(r,o){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},41132:(e,t,r)=>{var o=r(5901),n=r(99291),i=r(17122),s=r(41869);e.exports=function(e){return o(e)||n(e)||i(e)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},89045:(e,t,r)=>{var o=r(73738).default;e.exports=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},77736:(e,t,r)=>{var o=r(73738).default,n=r(89045);e.exports=function(e){var t=n(e,"string");return"symbol"==o(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},73738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},17122:(e,t,r)=>{var o=r(70079);e.exports=function(e,t){if(e){if("string"===typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},54756:(e,t,r)=>{var o=r(4633)();e.exports=o;try{regeneratorRuntime=o}catch(n){"object"===typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},73171:(e,t,r)=>{"use strict";var o,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,a={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(a,{AdminConnection:()=>d}),e.exports=(o=a,((e,t,r,o)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let a of s(t))c.call(e,a)||a===r||n(e,a,{get:()=>t[a],enumerable:!(o=i(t,a))||o.enumerable});return e})(n({},"__esModule",{value:!0}),o));var u=r(19594),l=r(57995);class d extends u.Connection{constructor(e){super(e)}request(e){return super.request({requireAdmin:!0,...e})}getCertificates(e){return this.request({cacheKey:"cert",forceUpdate:e,commandTimeout:!1,executor:async e=>{var t;const r=await this.getObject("system.certificates");(null===(t=null===r||void 0===r?void 0:r.native)||void 0===t?void 0:t.certificates)?e(Object.entries(r.native.certificates).map((e=>{let[t,r]=e;return function(e,t){if(!t)return;let r;if(t.length<700&&(-1!==t.indexOf("/")||-1!==t.indexOf("\\")))if(e.toLowerCase().includes("private"))r="private";else if(t.toLowerCase().includes("private"))r="private";else if(e.toLowerCase().includes("public"))r="public";else if(t.toLowerCase().includes("public"))r="public";else if(e.toLowerCase().includes("chain"))r="chained";else{if(!t.toLowerCase().includes("chain"))return;r="chained"}else r="-----BEGIN RSA PRIVATE KEY"===t.substring(0,26)||"-----BEGIN PRIVATE KEY"===t.substring(0,22)?"private":"public","public"===r&&t.split("-----END CERTIFICATE-----").filter((e=>e.replace(/\r\n|\r|\n/,"").trim())).length>1&&(r="chained");return{name:e,type:r}}(t,r)})).filter((e=>!!e))):e([])}})}getLogs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendToHost",e,"getLogs",t||200,(e=>{r(e)}))}})}getLogsFiles(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("readLogs",e,((e,o)=>{e&&r(e),t(o)}))}})}delLogs(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("sendToHost",e,"delLogs",null,(e=>{e&&r(e),t()}))}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("deleteFile",e,t,(e=>{e&&o(e),r()}))}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("deleteFolder",e,t,(e=>{e&&o(e),r()}))}})}rename(e,t,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("rename",e,t,r,(e=>{e&&n(e),o()}))}})}renameFile(e,t,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("renameFile",e,t,r,(e=>{e&&n(e),o()}))}})}getHosts(e){return this.request({cacheKey:"hosts",forceUpdate:e,commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getObjectView","system","host",{startkey:"system.host.",endkey:"system.host.\u9999"},((r,o)=>{r?t(r):e((0,l.getObjectViewResultToArray)(o))}))}})}getUsers(e){return this.request({cacheKey:"users",forceUpdate:e,commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getObjectView","system","user",{startkey:"system.user.",endkey:"system.user.\u9999"},((r,o)=>{r?t(r):e((0,l.getObjectViewResultToArray)(o))}))}})}renameGroup(e,t,r){return this.request({commandTimeout:!1,executor:async o=>{var n;const i=await this.getGroups(!0),s=i.filter((t=>t._id.startsWith("".concat(e,"."))));for(const r of s){const o=r._id,n=t+r._id.substring(e.length);r._id=n,await this.setObject(n,r),await this.delObject(o)}const c=i.find((t=>t._id===e));if(c){const e=c._id;c._id=t,void 0!==r&&(null!==(n=c.common)&&void 0!==n||(c.common={}),c.common.name=r),await this.setObject(t,c),await this.delObject(e)}o()}})}getHostInfo(e,t,r){return e=(0,l.normalizeHostId)(e),this.request({cacheKey:"hostInfo_".concat(e),forceUpdate:t,commandTimeout:r,executor:(t,r,o)=>{this._socket.emit("sendToHost",e,"getHostInfo",null,(e=>{o.elapsed||(o.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?r('May not read "getHostInfo"'):e?t(e):r('Cannot read "getHostInfo"'))}))}})}getHostInfoShort(e,t,r){return e=(0,l.normalizeHostId)(e),this.request({cacheKey:"hostInfoShort_".concat(e),forceUpdate:t,commandTimeout:r,executor:(t,r,o)=>{this._socket.emit("sendToHost",e,"getHostInfoShort",null,(e=>{o.elapsed||(o.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?r('May not read "getHostInfoShort"'):e?t(e):r('Cannot read "getHostInfoShort"'))}))}})}getRepository(e,t,r,o){return this.request({cacheKey:"repository_".concat(e),forceUpdate:r,commandTimeout:o,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getRepository",t,(e=>{n.elapsed||(n.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?o('May not read "getRepository"'):e?r(e):o('Cannot read "getRepository"'))}))}})}getInstalled(e,t,r){return e=(0,l.normalizeHostId)(e),this.request({cacheKey:"installed_".concat(e),forceUpdate:t,commandTimeout:r,executor:(t,r,o)=>{this._socket.emit("sendToHost",e,"getInstalled",null,(e=>{o.elapsed||(o.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?r('May not read "getInstalled"'):e?t(e):r('Cannot read "getInstalled"'))}))}})}cmdExec(e,t,r,o){return this.request({commandTimeout:o,executor:(o,n,i)=>{e=(0,l.normalizeHostId)(e),this._socket.emit("cmdExec",e,r,t,(e=>{i.elapsed||(i.clearTimeout(),e&&n(e),o())}))}})}readBaseSettings(e){return e=(0,l.objectIdToHostname)(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(t,r,o)=>{this._socket.emit("sendToHost",e,"readBaseSettings",null,(e=>{o.elapsed||(o.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?r('May not read "BaseSettings"'):e?t(e):r('Cannot read "BaseSettings"'))}))}})}writeBaseSettings(e,t){return e=(0,l.objectIdToHostname)(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"writeBaseSettings",t,(e=>{n.elapsed||(n.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?o('May not write "BaseSettings"'):e?r(e):o('Cannot write "BaseSettings"'))}))}})}restartController(e){return e=(0,l.objectIdToHostname)(e),this.request({executor:(t,r,o)=>{this._socket.emit("sendToHost",e,"restartController",null,(e=>{o.elapsed||(o.clearTimeout(),e&&r(e),t(!0))}))}})}getDiagData(e,t){return e=(0,l.objectIdToHostname)(e),this.request({executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getDiagData",t,(e=>{n.elapsed||(n.clearTimeout(),r(e))}))}})}changePassword(e,t){return this.request({executor:(r,o,n)=>{this._socket.emit("changePassword",e,t,(e=>{n.elapsed||(n.clearTimeout(),e&&o(e),r())}))}})}getIpAddresses(e,t){return e=(0,l.normalizeHostId)(e),this.request({cacheKey:"IPs_".concat(e),forceUpdate:t,commandTimeout:!1,executor:async t=>{var r;const o=await this.getObject(e);t(null!==(r=null===o||void 0===o?void 0:o.common.address)&&void 0!==r?r:[])}})}getHostByIp(e,t){return e=(0,l.objectIdToHostname)(e),this.request({cacheKey:"rIPs_".concat(e),forceUpdate:t,executor:(t,r,o)=>{this._socket.emit("getHostByIp",e,((e,r)=>{if(o.elapsed)return;o.clearTimeout();const{IPs4:n,IPs6:i}=function(e){var t,r;const o=[{name:"[IPv4] 0.0.0.0 - Listen on all IPs",address:"0.0.0.0",family:"ipv4"}],n=[{name:"[IPv6] :: - Listen on all IPs",address:"::",family:"ipv6"}];if(null===(r=null===(t=e.native)||void 0===t?void 0:t.hardware)||void 0===r?void 0:r.networkInterfaces)for(const[i,s]of Object.entries(e.native.hardware.networkInterfaces))if(s)for(const e of s)"IPv6"!==e.family?o.push({name:"[".concat(e.family,"] ").concat(e.address," - ").concat(i),address:e.address,family:"ipv4"}):n.push({name:"[".concat(e.family,"] ").concat(e.address," - ").concat(i),address:e.address,family:"ipv6"});return{IPs4:o,IPs6:n}}(r);t([...n,...i])}))}})}encrypt(e){return this.request({executor:(t,r,o)=>{this._socket.emit("encrypt",e,((e,n)=>{o.elapsed||(o.clearTimeout(),e&&r(e),t(n))}))}})}decrypt(e){return this.request({executor:(t,r,o)=>{this._socket.emit("decrypt",e,((e,n)=>{o.elapsed||(o.clearTimeout(),e&&r(e),t(n))}))}})}chmodFile(e,t,r){return this.request({executor:(o,n,i)=>{this._socket.emit("chmodFile",e,t,r,((e,t)=>{i.elapsed||(i.clearTimeout(),e&&n(e),o(t))}))}})}chownFile(e,t,r){return this.request({executor:(o,n,i)=>{this._socket.emit("chownFile",e,t,r,((e,t)=>{i.elapsed||(i.clearTimeout(),e&&n(e),o(t))}))}})}getNotifications(e,t){return this.request({executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getNotifications",{category:t},(e=>{n.elapsed||(n.clearTimeout(),r(e))}))}})}clearNotifications(e,t){return this.request({executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"clearNotifications",{category:t},(e=>{n.elapsed||(n.clearTimeout(),r(e))}))}})}getIsEasyModeStrict(){return this.request({executor:(e,t,r)=>{this._socket.emit("getIsEasyModeStrict",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(!!n))}))}})}getEasyMode(){return this.request({executor:(e,t,r)=>{this._socket.emit("getEasyMode",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(n))}))}})}getRatings(e){return this.request({executor:(t,r,o)=>{this._socket.emit("getRatings",!!e,((e,n)=>{o.elapsed||(o.clearTimeout(),e&&r(e),t(n))}))}})}getCurrentSession(e){const t=new AbortController;return this.request({commandTimeout:e||5e3,onTimeout:()=>{t.abort()},executor:async(e,r,o)=>{try{const r=await fetch("./session",{signal:t.signal});if(o.elapsed)return;o.clearTimeout(),e(r.json())}catch(n){r("getCurrentSession: ".concat(n))}}})}getCurrentInstance(){return this.request({cacheKey:"currentInstance",executor:(e,t,r)=>{this._socket.emit("getCurrentInstance",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(n))}))}})}getAdapterInstances(e,t){return"boolean"===typeof e&&(t=e,e=""),e=null!==e&&void 0!==e?e:"",this.request({cacheKey:"instances_".concat(e),forceUpdate:t,executor:(t,r,o)=>{this._socket.emit("getAdapterInstances",e,((e,n)=>{o.elapsed||(o.clearTimeout(),e&&r(e),t(n))}))}})}getAdapters(e,t){return"boolean"===typeof e&&(t=e,e=""),e=null!==e&&void 0!==e?e:"",this.request({cacheKey:"adapter_".concat(e),forceUpdate:t,executor:(t,r,o)=>{this._socket.emit("getAdapters",e,((e,n)=>{o.elapsed||(o.clearTimeout(),e&&r(e),t(n))}))}})}getCompactAdapters(e){return this.request({cacheKey:"compactAdapters",forceUpdate:e,executor:(e,t,r)=>{this._socket.emit("getCompactAdapters",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(n))}))}})}getAdaptersResetCache(e){e=null!==e&&void 0!==e?e:"",this.resetCache("adapter_".concat(e)),this.resetCache("compactAdapters")}getCompactInstances(e){return this.request({cacheKey:"compactInstances",forceUpdate:e,executor:(e,t,r)=>{this._socket.emit("getCompactInstances",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(n))}))}})}getAdapterInstancesResetCache(e){e=null!==e&&void 0!==e?e:"",this.resetCache("instances_".concat(e)),this.resetCache("compactInstances")}getCompactInstalled(e,t,r){return e=(0,l.normalizeHostId)(e),this.request({cacheKey:"installedCompact_".concat(e),forceUpdate:t,commandTimeout:r,executor:(t,r,o)=>{this._socket.emit("getCompactInstalled",e,(e=>{o.elapsed||(o.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?r('May not read "getCompactInstalled"'):e?t(e):r('Cannot read "getCompactInstalled"'))}))}})}getInstalledResetCache(e){e?(this.resetCache("installedCompact_".concat(e)),this.resetCache("installed_".concat(e))):(this.resetCache("installedCompact_",!0),this.resetCache("installed_",!0))}getCompactRepository(e,t,r){return e=(0,l.normalizeHostId)(e),this.request({cacheKey:"repositoryCompact_".concat(e),forceUpdate:t,commandTimeout:r,executor:(t,r,o)=>{this._socket.emit("getCompactRepository",e,(e=>{o.elapsed||(o.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?r('May not read "getCompactRepository"'):e?t(e):r('Cannot read "getCompactRepository"'))}))}})}getRepositoryResetCache(e){e?(this.resetCache("repositoryCompact_".concat(e)),this.resetCache("repository_".concat(e))):(this.resetCache("repositoryCompact_",!0),this.resetCache("repository_",!0))}getCompactHosts(e){return this.request({cacheKey:"hostsCompact",forceUpdate:e,executor:(e,t,r)=>{this._socket.emit("getCompactHosts",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(n))}))}})}getCompactSystemRepositories(e){return this.request({cacheKey:"repositoriesCompact",forceUpdate:e,executor:(e,t,r)=>{this._socket.emit("getCompactSystemRepositories",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(n))}))}})}}},19594:(e,t,r)=>{"use strict";var o,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,a={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(a,{Connection:()=>y,ERRORS:()=>d,NOT_CONNECTED:()=>b,PERMISSION_ERROR:()=>m,PROGRESS:()=>u}),e.exports=(o=a,((e,t,r,o)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let a of s(t))c.call(e,a)||a===r||n(e,a,{get:()=>t[a],enumerable:!(o=i(t,a))||o.enumerable});return e})(n({},"__esModule",{value:!0}),o));var u,l,d,p,f=r(99072),h=r(57995);(l=u||(u={}))[l.CONNECTING=0]="CONNECTING",l[l.CONNECTED=1]="CONNECTED",l[l.OBJECTS_LOADED=2]="OBJECTS_LOADED",l[l.READY=3]="READY",(p=d||(d={})).PERMISSION_ERROR="permissionError",p.NOT_CONNECTED="notConnectedError",p.TIMEOUT="timeout",p.NOT_ADMIN="Allowed only in admin",p.NOT_SUPPORTED="Not supported";const m=d.PERMISSION_ERROR,b=d.NOT_CONNECTED,g=["material","echarts","vis"];class y{constructor(e){this.ignoreState="",this.connected=!1,this.subscribed=!1,this.firstConnect=!0,this.waitForRestart=!1,this.loaded=!1,this.simStates={},this.statesSubscribes={},this.filesSubscribes={},this.objectsSubscribes={},this.objects={},this.states={},this.acl=null,this.isSecure=!1,this.onReadyDone=!1,this.onConnectionHandlers=[],this.onLogHandlers=[],this._waitForFirstConnectionPromise=(0,f.createDeferredPromise)(),this._instanceSubscriptions={},this._promises={},this.systemLang="en",this.props=this.applyDefaultProps(e),this.waitForSocketLib().then((()=>this.startSocket())).catch((e=>{alert("Socket connection could not be initialized: ".concat(e))}))}applyDefaultProps(e){var t,r,o,n;return{...e,protocol:e.protocol||window.location.protocol,host:e.host||window.location.hostname,port:e.port||("3000"===window.location.port?8081:window.location.port),ioTimeout:Math.max(e.ioTimeout||2e4,2e4),cmdTimeout:Math.max(e.cmdTimeout||5e3,5e3),admin5only:e.admin5only||!1,autoSubscribes:null!==(t=e.autoSubscribes)&&void 0!==t?t:[],autoSubscribeLog:null!==(r=e.autoSubscribeLog)&&void 0!==r&&r,doNotLoadACL:null===(o=e.doNotLoadACL)||void 0===o||o,doNotLoadAllObjects:null===(n=e.doNotLoadAllObjects)||void 0===n||n}}onError(e){var t;(null!==(t=this.props.onError)&&void 0!==t?t:console.error)(e)}get systemConfig(){return this._systemConfig}static isWeb(){return void 0!==window.socketUrl}waitForSocketLib(){return this._waitForSocketPromise||(this._waitForSocketPromise=new Promise((async(e,t)=>{if("undefined"===typeof window.io)if("function"===typeof window.registerSocketOnLoad)window.registerSocketOnLoad((()=>e()));else{for(let t=1;t<=30;t++){if(window.io)return e();await(0,h.wait)(100)}t(new Error("Socket library could not be loaded!"))}else e()}))),this._waitForSocketPromise}async startSocket(){if(this._socket)return;let e=this.props.host,t=this.props.port,r=this.props.protocol.replace(":",""),o=window.location.pathname;if("iobroker.net"===window.location.hostname||"iobroker.pro"===window.location.hostname)o="";else{if(window.socketUrl){const o=new URL(window.socketUrl);e=o.hostname,t=o.port,r=o.protocol.replace(":","")}const n=o.lastIndexOf("/");if(-1!==n&&(o=o.substring(0,n+1)),y.isWeb()){const e=o.split("/");e.length>2&&(e.pop(),e.pop(),g.includes(e[e.length-1])&&e.pop(),o=e.join("/"),o.endsWith("/")||(o+="/"))}}const n=t?"".concat(r,"://").concat(e,":").concat(t):"".concat(r,"://").concat(e);this._socket=window.io.connect(n,{path:o.endsWith("/")?"".concat(o,"socket.io"):"".concat(o,"/socket.io"),query:"ws=true",name:this.props.name,timeout:this.props.ioTimeout,uuid:this.props.uuid,token:this.props.token}),this._socket.on("connect",(e=>{this.onReadyDone=!1,!0!==e?(this.connected=!0,setTimeout((()=>this.getVersion().then((e=>{const[t,r,o]=e.version.split(".");1e4*parseInt(t,10)+100*parseInt(r,10)+parseInt(o,10)<40102?(this._authTimer=null,this.onPreConnect(!1,!1)):this._socket.emit("authenticate",((e,t)=>this.onPreConnect(e,t)))})).catch((e=>this.onError({message:e.toString(),operation:"getVersion"})))),500)):this._socket.emit("authenticate",((e,t)=>{this.onPreConnect(e,t)}))})),this._socket.on("reconnect",(()=>{var e,t;this.onReadyDone=!1,null===(t=(e=this.props).onProgress)||void 0===t||t.call(e,u.READY),this.connected=!0,this.waitForRestart?window.location.reload():(this._subscribe(!0),this.onConnectionHandlers.forEach((e=>e(!0))))})),this._socket.on("disconnect",(()=>{var e,t;this.onReadyDone=!1,this.connected=!1,this.subscribed=!1,null===(t=(e=this.props).onProgress)||void 0===t||t.call(e,u.CONNECTING),this.onConnectionHandlers.forEach((e=>e(!1)))})),this._socket.on("reauthenticate",(()=>this.authenticate())),this._socket.on("log",(e=>{var t,r;null===(r=(t=this.props).onLog)||void 0===r||r.call(t,e),this.onLogHandlers.forEach((t=>t(e)))})),this._socket.on("error",(e=>{let t;void 0==e?t="":"function"===typeof e.toString?t=e.toString():(t=JSON.stringify(e),console.error("Received strange error: ".concat(t))),t.includes("User not authorized")?this.authenticate():t.includes("websocket error")?(console.error("Socket Error => reload: ".concat(e)),window.location.reload()):console.error("Socket Error: ".concat(e))})),this._socket.on("connect_error",(e=>console.error("Connect error: ".concat(e)))),this._socket.on("permissionError",(e=>this.onError({message:"no permission",operation:e.operation,type:e.type,id:e.id||""}))),this._socket.on("objectChange",((e,t)=>{setTimeout((()=>this.objectChange(e,t)),0)})),this._socket.on("stateChange",((e,t)=>{setTimeout((()=>this.stateChange(e,t)),0)})),this._socket.on("im",((e,t,r)=>{setTimeout((()=>this.instanceMessage(e,t,r)),0)})),this._socket.on("fileChange",((e,t,r)=>{setTimeout((()=>this.fileChange(e,t,r)),0)})),this._socket.on("cmdStdout",((e,t)=>{var r;null===(r=this.onCmdStdoutHandler)||void 0===r||r.call(this,e,t)})),this._socket.on("cmdStderr",((e,t)=>{var r;null===(r=this.onCmdStderrHandler)||void 0===r||r.call(this,e,t)})),this._socket.on("cmdExit",((e,t)=>{var r;null===(r=this.onCmdExitHandler)||void 0===r||r.call(this,e,t)}))}onPreConnect(e,t){var r,o;this._authTimer&&(clearTimeout(this._authTimer),this._authTimer=null),this.connected=!0,this.isSecure=t,this.waitForRestart?window.location.reload():(this.firstConnect?this.loadData():null===(o=(r=this.props).onProgress)||void 0===o||o.call(r,u.READY),this._subscribe(!0),this.onConnectionHandlers.forEach((e=>e(!0)))),this._waitForFirstConnectionPromise.resolve()}static isCloud(){return!(!window.location.hostname.includes("amazonaws.com")&&!window.location.hostname.includes("iobroker.in"))||"undefined"!==typeof window.socketUrl&&(window.socketUrl.includes("iobroker.in")||window.socketUrl.includes("amazonaws"))}isConnected(){return this.connected}waitForFirstConnection(){return this._waitForFirstConnectionPromise}async getUserPermissions(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getUserPermissions",((r,o)=>{r?t(r):e(o)}))}})}async loadData(){if(this.loaded)return;for(let e=1;e<=10;e++){if(this.doLoadData(),this.loaded)return;await(0,h.wait)(y.isCloud()?5e3:1e3)}}async doLoadData(){var e,t,r,o,n,i,s,c,a;if(!this.loaded){if(!this.props.doNotLoadACL)try{this.acl=await this.getUserPermissions()}catch(l){return void this.onError("Cannot read user permissions: ".concat(l))}try{!this.props.admin5only||y.isWeb()||window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?this._systemConfig=await this.getSystemConfig():this._systemConfig=await this.getCompactSystemConfig()}catch(l){return void this.onError("Cannot read system config: ".concat(l))}this.systemLang=null===(e=this._systemConfig.common)||void 0===e?void 0:e.language,this.systemLang||(this.systemLang=window.navigator.userLanguage||window.navigator.language,/^(en|de|ru|pt|nl|fr|it|es|pl|uk)-?/.test(this.systemLang)?this.systemLang=this.systemLang.substr(0,2):/^(en|de|ru|pt|nl|fr|it|es|pl|uk|zh-cn)$/.test(this.systemLang)||(this.systemLang="en"),this._systemConfig.common.language=this.systemLang),null===(r=(t=this.props).onLanguage)||void 0===r||r.call(t,this.systemLang),this.loaded=!0,null===(n=(o=this.props).onProgress)||void 0===n||n.call(o,u.CONNECTED),this.firstConnect=!1,this.props.doNotLoadAllObjects?this.props.admin5only?this.objects={}:this.objects={"system.config":this._systemConfig}:this.objects=await this.getObjects(),null===(s=(i=this.props).onProgress)||void 0===s||s.call(i,u.READY),this.onReadyDone||(this.onReadyDone=!0,null===(a=(c=this.props).onReady)||void 0===a||a.call(c,this.objects))}}authenticate(){window.location.search.includes("&href=")?window.location.href="".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname).concat(window.location.search).concat(window.location.hash):window.location.href="".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname,"?login&href=").concat(window.location.search).concat(window.location.hash)}async subscribeState(){let e,t,r,o;for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];if(3===i.length?[e,t,r]=i:([e,r]=i,t=!1),o=Array.isArray(e)?e:[e],"function"!==typeof r)throw new Error("The state change handler must be a function!");const c=[];for(let u=0;u<o.length;u++){const t=o[u];this.statesSubscribes[t]?!this.statesSubscribes[t].cbs.includes(r)&&this.statesSubscribes[t].cbs.push(r):(this.statesSubscribes[t]={reg:new RegExp((0,h.pattern2RegEx)(t)),cbs:[r]},this.connected&&e!==this.ignoreState&&c.push(t))}if(this.connected)if(c.length&&this.connected&&this._socket.emit("subscribe",c),t){let e;for(let t=0;t<o.length;t++){try{e=await this.getBinaryState(o[t])}catch(a){console.error('Cannot getBinaryState "'.concat(o[t],'": ').concat(JSON.stringify(a)))}void 0!=e&&r(o[t],e)}}else if(o.find((e=>e.includes("*")))){let e;for(let t=0;t<o.length;t++){try{e=await this.getForeignStates(o[t])}catch(a){return void console.error('Cannot getForeignStates "'.concat(o[t],'": ').concat(JSON.stringify(a)))}if(e)for(const[t,o]of Object.entries(e))r(t,o)}}else try{const e=await(y.isWeb()?this.getStates(o):this.getForeignStates(o));if(e)for(const[t,o]of Object.entries(e))r(t,o)}catch(a){return void console.error('Cannot getState "'.concat(o.join(", "),'": ').concat(a.message))}}async subscribeStateAsync(e,t){return this.subscribeState(e,t)}unsubscribeState(e,t){var r;let o;o=Array.isArray(e)?e:[e];const n=[];for(let i=0;i<o.length;i++){const e=o[i];if(this.statesSubscribes[e]){const o=this.statesSubscribes[e];if(t){const e=o.cbs.indexOf(t);-1!==e&&o.cbs.splice(e,1)}else o.cbs=[];(null===(r=o.cbs)||void 0===r?void 0:r.length)||(delete this.statesSubscribes[e],e!==this.ignoreState&&n.push(e))}}this.connected&&n.length&&this._socket.emit("unsubscribe",o)}subscribeObject(e,t){let r;r=Array.isArray(e)?e:[e];const o=[];for(let n=0;n<r.length;n++){const e=r[n];this.objectsSubscribes[e]?!this.objectsSubscribes[e].cbs.includes(t)&&this.objectsSubscribes[e].cbs.push(t):this.objectsSubscribes[e]={reg:new RegExp((0,h.pattern2RegEx)(e)),cbs:[t]}}return this.connected&&o.length&&this._socket.emit("subscribeObjects",o),Promise.resolve()}unsubscribeObject(e,t){var r;let o;o=Array.isArray(e)?e:[e];const n=[];for(let i=0;i<o.length;i++){const e=o[i];if(this.objectsSubscribes[e]){const o=this.objectsSubscribes[e];if(t){const e=o.cbs.indexOf(t);-1!==e&&o.cbs.splice(e,1)}else o.cbs=[];(null===(r=o.cbs)||void 0===r?void 0:r.length)||delete this.objectsSubscribes[e]}}return this.connected&&n.length&&this._socket.emit("unsubscribeObjects",n),Promise.resolve()}objectChange(e,t){var r,o;let n;this.objects[e]&&(n={_id:e,type:this.objects[e].type});let i=!1;t?(t._rev&&this.objects[e]&&(this.objects[e]._rev=t._rev),this.objects[e]&&JSON.stringify(this.objects[e])===JSON.stringify(t)||(this.objects[e]=t,i=!0)):this.objects[e]&&(delete this.objects[e],i=!0);for(const[s,c]of Object.entries(this.objectsSubscribes))(s===e||c.reg.test(e))&&c.cbs.forEach((r=>{try{r(e,t,n)}catch(o){console.error("Error by callback of objectChange: ".concat(o))}}));i&&(null===(o=(r=this.props).onObjectChange)||void 0===o||o.call(r,e,t))}stateChange(e,t){for(const o of Object.values(this.statesSubscribes))if(o.reg.test(e))for(const n of o.cbs)try{n(e,null!==t&&void 0!==t?t:null)}catch(r){console.error("Error by callback of stateChanged: ".concat(r))}}instanceMessage(e,t,r){var o;null===(o=this._instanceSubscriptions[t])||void 0===o||o.forEach((o=>{o.messageType===e&&o.callback(r,t,e)}))}fileChange(e,t,r){for(const n of Object.values(this.filesSubscribes))if(n.regId.test(e)&&n.regFilePattern.test(t))for(const i of n.cbs)try{i(e,t,r)}catch(o){console.error("Error by callback of fileChange: ".concat(o))}}async subscribeFiles(e,t,r){if("function"!==typeof r)throw new Error("The state change handler must be a function!");let o;o=Array.isArray(t)?t:[t];const n=[];for(let i=0;i<o.length;i++){const t=o[i],s="".concat(e,"$%$").concat(t);this.filesSubscribes[s]?!this.filesSubscribes[s].cbs.includes(r)&&this.filesSubscribes[s].cbs.push(r):(this.filesSubscribes[s]={regId:new RegExp((0,h.pattern2RegEx)(e)),regFilePattern:new RegExp((0,h.pattern2RegEx)(t)),cbs:[r]},n.push(t))}this.connected&&n.length&&this._socket.emit("subscribeFiles",e,n)}unsubscribeFiles(e,t,r){let o;o=Array.isArray(t)?t:[t];const n=[];for(let i=0;i<o.length;i++){const t=o[i],s="".concat(e,"$%$").concat(t);if(this.filesSubscribes[s]){const e=this.filesSubscribes[s];if(r){const t=e.cbs.indexOf(r);-1!==t&&e.cbs.splice(t,1)}else e.cbs=[];e.cbs&&e.cbs.length||(delete this.filesSubscribes[s],n.push(t))}}this.connected&&n.length&&this._socket.emit("unsubscribeFiles",e,n)}async request(e){let{cacheKey:t,forceUpdate:r,commandTimeout:o,onTimeout:n,requireAdmin:i,requireFeatures:s,executor:c}=e;if(i&&y.isWeb())return Promise.reject(d.NOT_ADMIN);if(t&&!r&&t in this._promises)return this._promises[t];if(!this.connected)return Promise.reject(d.NOT_CONNECTED);if(null===s||void 0===s?void 0:s.length)for(const u of s)if(!await this.checkFeatureSupported(u))throw d.NOT_SUPPORTED;const a=new Promise((async(e,t)=>{const r={elapsed:!1,clearTimeout:()=>{}};let i;!1!==o&&(i=setTimeout((()=>{r.elapsed=!0,null===n||void 0===n||n(),t(d.TIMEOUT)}),null!==o&&void 0!==o?o:this.props.cmdTimeout),r.clearTimeout=()=>{clearTimeout(i)});try{await c(e,t,r)}catch(s){t(s)}}));return t&&(this._promises[t]=a),a}resetCache(e,t){t?Object.keys(this._promises).filter((t=>t.startsWith(e))).forEach((e=>{delete this._promises[e]})):delete this._promises[e]}getStates(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getStates",e,((e,o)=>{this.states=null!==o&&void 0!==o?o:{},e?r(e):t(this.states)}))}})}getState(e){return this.request({commandTimeout:!1,executor:(t,r)=>{e&&e===this.ignoreState?t(this.simStates[e]||{val:null,ack:!0}):this._socket.emit("getState",e,((e,o)=>{e?r(e):t(o)}))}})}getBinaryState(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getBinaryState",e,((e,o)=>{e?r(e):t(o)}))}})}setBinaryState(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("setBinaryState",e,t,(e=>{e?o(e):r()}))}})}setState(e,t,r){return"boolean"===typeof r&&(t={val:t,ack:r}),this.request({commandTimeout:!1,executor:(o,n)=>{if(e&&e===this.ignoreState){let n;if(n="boolean"===typeof r||"object"===typeof t&&void 0!==t.val?t:{val:t,ack:!1,ts:Date.now(),lc:Date.now(),from:"system.adapter.vis.0"},this.simStates[e]=n,this.statesSubscribes[e])for(const t of this.statesSubscribes[e].cbs)try{t(e,n)}catch(i){console.error("Error by callback of stateChanged: ".concat(i))}o()}else this._socket.emit("setState",e,t,(e=>{e?n(e):o()}))}})}getObjects(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{e||!this.objects?this._socket.emit(y.isWeb()?"getObjects":"getAllObjects",((e,n)=>{var i,s;t||null===(s=(i=this.props).onProgress)||void 0===s||s.call(i,u.OBJECTS_LOADED),e?o(e):(this.objects=null!==n&&void 0!==n?n:{},r(this.objects))})):r(this.objects)}})}getObjectsById(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getObjects",e,((e,o)=>{e?r(e):t(o)}))}})}_subscribe(e){var t,r;if(e&&!this.subscribed){this.subscribed=!0,(null===(t=this.props.autoSubscribes)||void 0===t?void 0:t.length)&&this._socket.emit("subscribeObjects",this.props.autoSubscribes);const e=Object.keys(this.objectsSubscribes);e.length&&this._socket.emit("subscribeObjects",e),Object.keys(this.objectsSubscribes).forEach((e=>this._socket.emit("subscribeObjects",e))),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!0),Object.keys(this.statesSubscribes).forEach((e=>this._socket.emit("subscribe",e))),Object.keys(this.filesSubscribes).forEach((e=>{const[t,r]=e.split("$%$");this._socket.emit("subscribeFiles",t,r)}))}else if(!e&&this.subscribed){this.subscribed=!1,(null===(r=this.props.autoSubscribes)||void 0===r?void 0:r.length)&&this._socket.emit("unsubscribeObjects",this.props.autoSubscribes);const e=Object.keys(this.objectsSubscribes);e.length&&this._socket.emit("unsubscribeObjects",e),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!1),Object.keys(this.statesSubscribes).forEach((e=>this._socket.emit("unsubscribe",e))),Object.keys(this.filesSubscribes).forEach((e=>{const[t,r]=e.split("$%$");this._socket.emit("unsubscribeFiles",t,r)}))}}requireLog(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("requireLog",e,(e=>{e?r(e):t()}))}})}delObject(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("delObject",e,{maintenance:t},(e=>{e?o(e):r()}))}})}delObjects(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("delObjects",e,{maintenance:t},(e=>{e?o(e):r()}))}})}setObject(e,t){return t?(delete(t=JSON.parse(JSON.stringify(t))).from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("setObject",e,t,(e=>{e?o(e):r()}))}})):Promise.reject("Null object is not allowed")}getObject(e){return this.request({commandTimeout:!1,executor:(t,r)=>{e&&e===this.ignoreState?t({_id:this.ignoreState,type:"state",common:{name:"ignored state",type:"mixed"}}):this._socket.emit("getObject",e,((e,o)=>{e?r(e):t(o)}))}})}sendTo(e,t,r){return this.request({commandTimeout:!1,executor:o=>{this._socket.emit("sendTo",e,t,r,(e=>{o(e)}))}})}extendObject(e,t){return t?(delete(t=JSON.parse(JSON.stringify(t))).from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("extendObject",e,t,(e=>{e?o(e):r()}))}})):Promise.reject("Null object is not allowed")}registerLogHandler(e){this.onLogHandlers.includes(e)||this.onLogHandlers.push(e)}unregisterLogHandler(e){const t=this.onLogHandlers.indexOf(e);-1!==t&&this.onLogHandlers.splice(t,1)}registerConnectionHandler(e){this.onConnectionHandlers.includes(e)||this.onConnectionHandlers.push(e)}unregisterConnectionHandler(e){const t=this.onConnectionHandlers.indexOf(e);-1!==t&&this.onConnectionHandlers.splice(t,1)}registerCmdStdoutHandler(e){this.onCmdStdoutHandler=e}unregisterCmdStdoutHandler(){this.onCmdStdoutHandler=void 0}registerCmdStderrHandler(e){this.onCmdStderrHandler=e}unregisterCmdStderrHandler(){this.onCmdStderrHandler=void 0}registerCmdExitHandler(e){this.onCmdExitHandler=e}unregisterCmdExitHandler(){this.onCmdExitHandler=void 0}getEnums(e,t){return this.request({cacheKey:"enums_".concat(e||"all"),forceUpdate:t,commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getObjectView","system","enum",{startkey:"enum.".concat(e||""),endkey:e?"enum.".concat(e,".\u9999"):"enum.\u9999"},((o,n)=>{if(o)r(o);else{const r={};if(n)for(let t=0;t<n.rows.length;t++)e&&n.rows[t].id==="enum.".concat(e)||(r[n.rows[t].id]=n.rows[t].value);t(r)}}))}})}getObjectView(e,t,r){return this.getObjectViewCustom("system",r,e,t)}getObjectViewSystem(e,t,r){return this.getObjectViewCustom("system",e,t,r)}getObjectViewCustom(e,t,r,o){return this.request({commandTimeout:!1,executor:(n,i)=>{r=r||"",o=o||"\u9999",this._socket.emit("getObjectView",e,t,{startkey:r,endkey:o},((e,t)=>{if(e)i(e);else{const e={};if(t&&t.rows)for(let r=0;r<t.rows.length;r++)e[t.rows[r].id]=t.rows[r].value;n(e)}}))}})}readMetaItems(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getObjectView","system","meta",{startkey:"",endkey:"\u9999"},((r,o)=>{var n;r?t(r):e(null===(n=o.rows)||void 0===n?void 0:n.map((e=>e.value)).filter((e=>!!e)))}))}})}readDir(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("readDir",e,t,((e,t)=>{e?o(e):r(t)}))}})}readFile(e,t,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit(r?"readFile64":"readFile",e,t,((e,t,r)=>{e?n(e):o({file:t,mimeType:r})}))}})}writeFile64(e,t,r){return this.request({commandTimeout:!1,executor:(o,n)=>{if("string"===typeof r)this._socket.emit("writeFile",e,t,r,(e=>{e?n(e):o()}));else{const i=btoa(new Uint8Array(r).reduce(((e,t)=>e+String.fromCharCode(t)),""));this._socket.emit("writeFile64",e,t,i,(e=>{e?n(e):o()}))}}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("deleteFile",e,t,(e=>{e?o(e):r()}))}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("deleteFolder",e,t,(e=>{e?o(e):r()}))}})}rename(e,t,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("rename",e,t,r,(e=>{e?n(e):o()}))}})}renameFile(e,t,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("renameFile",e,t,r,(e=>{e?n(e):o()}))}})}cmdExec(e,t,r,o){return this.request({commandTimeout:o,executor:(o,n,i)=>{e=(0,h.normalizeHostId)(e),this._socket.emit("cmdExec",e,r,t,(e=>{i.elapsed||(i.clearTimeout(),e?n(e):o())}))}})}getSystemConfig(e){return this.request({cacheKey:"systemConfig",forceUpdate:e,commandTimeout:!1,executor:async e=>{var t,r,o,n,i;let s=await this.getObject("system.config");null!==(t=s)&&void 0!==t||(s={}),null!==(r=(n=s).common)&&void 0!==r||(n.common={}),null!==(o=(i=s).native)&&void 0!==o||(i.native={}),e(s)}})}getCompactSystemConfig(e){return this.request({cacheKey:"systemConfigCommon",forceUpdate:e,commandTimeout:!1,requireAdmin:!0,executor:(e,t)=>{this._socket.emit("getCompactSystemConfig",((r,o)=>{var n,i,s,c,a;r?t(r):(null!==(n=o)&&void 0!==n||(o={}),null!==(i=(c=o).common)&&void 0!==i||(c.common={}),null!==(s=(a=o).native)&&void 0!==s||(a.native={}),e(o))}))}})}getForeignStates(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getForeignStates",e||"*",((e,o)=>{e?r(e):t(null!==o&&void 0!==o?o:{})}))}})}getForeignObjects(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("getForeignObjects",e||"*",t,((e,t)=>{e?o(e):r(t)}))}})}setSystemConfig(e){return this.setObject("system.config",e)}getRawSocket(){return this._socket}getHistory(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("getHistory",e,t,((e,t)=>{e?o(e):r(t)}))}})}getHistoryEx(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("getHistory",e,t,((e,t,n,i)=>{e?o(e):r({values:t,sessionId:i,stepIgnore:n})}))}})}getIpAddresses(e,t){return e=(0,h.normalizeHostId)(e),this.request({cacheKey:"IPs_".concat(e),forceUpdate:t,commandTimeout:!1,executor:async t=>{var r;const o=await this.getObject(e);t(null!==(r=null===o||void 0===o?void 0:o.common.address)&&void 0!==r?r:[])}})}getVersion(e){return this.request({cacheKey:"version",forceUpdate:e,commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getVersion",((r,o,n)=>{r&&!o&&"string"===typeof r&&r.match(/\d+\.\d+\.\d+/)?e({version:r,serverName:"socketio"}):r?t(r):e({version:o,serverName:n})}))}})}getWebServerName(){return this.request({cacheKey:"webName",commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getAdapterName",((r,o)=>{r?t(r):e(o)}))}})}fileExists(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("fileExists",e,t,((e,t)=>{e?o(e):r(!!t)}))}})}getCurrentUser(){return this.request({commandTimeout:!1,executor:e=>{this._socket.emit("authEnabled",((t,r)=>{e(r)}))}})}getUuid(){return this.request({cacheKey:"uuid",commandTimeout:!1,executor:async e=>{var t;const r=await this.getObject("system.meta.uuid");e(null===(t=null===r||void 0===r?void 0:r.native)||void 0===t?void 0:t.uuid)}})}checkFeatureSupported(e,t){return this.request({cacheKey:"supportedFeatures_".concat(e),forceUpdate:t,commandTimeout:!1,executor:(t,r)=>{this._socket.emit("checkFeatureSupported",e,((e,o)=>{e?r(e):t(o)}))}})}getAdapterInstances(e,t){return"boolean"===typeof e&&(t=e,e=""),e=e||"",this.request({cacheKey:"instances_".concat(e),forceUpdate:t,commandTimeout:!1,executor:async t=>{const r=e?"system.adapter.".concat(e,"."):"system.adapter.",o="".concat(r,"\u9999"),n=await this.getObjectViewSystem("instance",r,o),i=Object.values(n);t(e?i.filter((t=>t.common.name===e)):i)}})}getAdapters(e,t){return"boolean"===typeof e&&(t=e,e=""),e=e||"",this.request({cacheKey:"adapter_".concat(e),forceUpdate:t,commandTimeout:!1,executor:async t=>{const r=await this.getObjectViewSystem("adapter","system.adapter.".concat(e||""),"system.adapter.".concat(e||"\u9999")),o=Object.values(r);t(e?o.filter((t=>t.common.name===e)):o)}})}getGroups(e){return this.request({cacheKey:"groups",forceUpdate:e,commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getObjectView","system","group",{startkey:"system.group.",endkey:"system.group.\u9999"},((r,o)=>{r?t(r):e((0,h.getObjectViewResultToArray)(o))}))}})}logout(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("logout",(r=>{r?t(r):e(null)}))}})}subscribeOnInstance(e,t,r,o){return this.request({commandTimeout:!1,executor:(n,i)=>{this._socket.emit("clientSubscribe",e,t,r,((r,s)=>{r?i(r):s&&(s.error?i(s.error):(e.startsWith("system.adapter.")||(e="system.adapter.".concat(e)),this._instanceSubscriptions[e]=this._instanceSubscriptions[e]||[],this._instanceSubscriptions[e].find((e=>e.messageType===t&&e.callback===o))||this._instanceSubscriptions[e].push({messageType:t,callback:o}),n(s)))}))}})}unsubscribeFromInstance(e,t,r){var o;let n;e.startsWith("system.adapter.")||(e="system.adapter.".concat(e));const i=[];do{n=!1;const s=null===(o=this._instanceSubscriptions[e])||void 0===o?void 0:o.findIndex((e=>(!t||e.messageType===t)&&(!r||e.callback===r)));if(void 0!==s&&null!==s&&-1!==s){n=!0;const r=this._instanceSubscriptions[e][s].messageType;this._instanceSubscriptions[e].splice(s,1),this._instanceSubscriptions[e].length||delete this._instanceSubscriptions[e];this._instanceSubscriptions[e]&&this._instanceSubscriptions[e].find((e=>e.messageType===r))||i.push(this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("clientUnsubscribe",e,t,((e,t)=>e?o(e):r(t)))}}))}}while(n&&(!r||!t));return i.length?Promise.all(i).then((e=>!!e.find((e=>e)))):Promise.resolve(!1)}log(e,t){return e?this.request({commandTimeout:!1,executor:r=>(this._socket.emit("log",e,t),r(null))}):Promise.resolve(null)}setStateToIgnore(e){this.ignoreState=e}}},52974:e=>{"use strict";var t,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty;e.exports=(t={},((e,t,s,c)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let a of n(t))i.call(e,a)||a===s||r(e,a,{get:()=>t[a],enumerable:!(c=o(t,a))||c.enumerable});return e})(r({},"__esModule",{value:!0}),t))},99072:e=>{"use strict";var t,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={};function c(){let e,t;const r=new Promise(((r,o)=>{e=r,t=o}));return r.resolve=e,r.reject=t,r}((e,t)=>{for(var o in t)r(e,o,{get:t[o],enumerable:!0})})(s,{createDeferredPromise:()=>c}),e.exports=(t=s,((e,t,s,c)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let a of n(t))i.call(e,a)||a===s||r(e,a,{get:()=>t[a],enumerable:!(c=o(t,a))||c.enumerable});return e})(r({},"__esModule",{value:!0}),t))},71936:(e,t,r)=>{"use strict";var o,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,a=(e,t,r,o)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let a of s(t))c.call(e,a)||a===r||n(e,a,{get:()=>t[a],enumerable:!(o=i(t,a))||o.enumerable});return e},u=(e,t,r)=>(a(e,t,"default"),r&&a(r,t,"default")),l={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(l,{AdminConnection:()=>d.AdminConnection,Connection:()=>p.Connection,ERRORS:()=>p.ERRORS,PROGRESS:()=>p.PROGRESS}),e.exports=(o=l,a(n({},"__esModule",{value:!0}),o)),u(l,r(73171),e.exports);var d=r(73171);u(l,r(19594),e.exports);var p=r(19594);u(l,r(52974),e.exports);r(52974)},57995:e=>{"use strict";var t,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={};function c(e){var t;return null!==(t=null===e||void 0===e?void 0:e.rows.map((e=>e.value)).filter((e=>!!e)))&&void 0!==t?t:[]}function a(e){return(null===e||void 0===e?void 0:e.startsWith("system.host."))||(e="system.host.".concat(e)),e}function u(e){return(null===e||void 0===e?void 0:e.startsWith("system.host."))&&(e=e.substr(12)),e}function l(e){return new Promise((t=>{setTimeout(t,e)}))}function d(e){const t="*"===(e=(e||"").toString())[0],r="*"===e[e.length-1];return(t?"":"^")+(e=e.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"))+(r?"":"$")}((e,t)=>{for(var o in t)r(e,o,{get:t[o],enumerable:!0})})(s,{getObjectViewResultToArray:()=>c,normalizeHostId:()=>a,objectIdToHostname:()=>u,pattern2RegEx:()=>d,wait:()=>l}),e.exports=(t=s,((e,t,s,c)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let a of n(t))i.call(e,a)||a===s||r(e,a,{get:()=>t[a],enumerable:!(c=o(t,a))||c.enumerable});return e})(r({},"__esModule",{value:!0}),t))},64467:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var o=r(59526);function n(e,t,r){return(t=(0,o.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},6326:(e,t,r)=>{"use strict";r.d(t,{Cl:()=>o,YH:()=>i,fX:()=>c,sH:()=>n,zs:()=>s});var o=function(){return o=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};function n(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{a(o.next(e))}catch(t){i(t)}}function c(e){try{a(o.throw(e))}catch(t){i(t)}}function a(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,c)}a((o=o.apply(e,t||[])).next())}))}function i(e,t){var r,o,n,i,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(a){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(s=0)),s;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,o=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(n=(n=s.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){s=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){s.label=c[1];break}if(6===c[0]&&s.label<n[1]){s.label=n[1],n=c;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(c);break}n[2]&&s.ops.pop(),s.trys.pop();continue}c=t.call(e,s)}catch(a){c=[6,a],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}Object.create;function s(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return s}function c(e,t,r){if(r||2===arguments.length)for(var o,n=0,i=t.length;n<i;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}Object.create;"function"===typeof SuppressedError&&SuppressedError}}]);
|
|
3
|
-
//# sourceMappingURL=9964.
|
|
1
|
+
/*! For license information please see 9964.8b1ee0f5.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkjs=self.webpackChunkjs||[]).push([[9964,2123,4504,7361],{18628:(e,t)=>{"use strict";t.A=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),o=e.name||"",n=(e.type||"").toLowerCase(),i=n.replace(/\/.*$/,"");return r.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?o.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):n===t}))}return!0}},42123:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;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={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(n){return!1}}()?Object.assign:function(e,n){for(var i,s,c=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),a=1;a<arguments.length;a++){for(var u in i=Object(arguments[a]))r.call(i,u)&&(c[u]=i[u]);if(t){s=t(i);for(var l=0;l<s.length;l++)o.call(i,s[l])&&(c[s[l]]=i[s[l]])}}return c}},33155:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ErrorCode:()=>F,default:()=>ue,useDropzone:()=>pe});var o=r(28437),n=r.n(o),i=r(95973),s=r.n(i),c=r(6326),a=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function u(e,t){var r=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var r=t.split(".").pop().toLowerCase(),o=a.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!==typeof r.path){var o=e.webkitRelativePath;Object.defineProperty(r,"path",{value:"string"===typeof t?t:"string"===typeof o&&o.length>0?o:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}var l=[".DS_Store","Thumbs.db"];function p(e){return"object"===typeof e&&null!==e}function d(e){return b(e.target.files).map((function(e){return u(e)}))}function f(e){return(0,c.sH)(this,void 0,void 0,(function(){return(0,c.YH)(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return u(e)}))]}}))}))}function h(e,t){return(0,c.sH)(this,void 0,void 0,(function(){var r;return(0,c.YH)(this,(function(o){switch(o.label){case 0:return e.items?(r=b(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,r]:[4,Promise.all(r.map(g))]):[3,2];case 1:return[2,m(y(o.sent()))];case 2:return[2,m(b(e.files).map((function(e){return u(e)})))]}}))}))}function m(e){return e.filter((function(e){return-1===l.indexOf(e.name)}))}function b(e){if(null===e)return[];for(var t=[],r=0;r<e.length;r++){var o=e[r];t.push(o)}return t}function g(e){if("function"!==typeof e.webkitGetAsEntry)return v(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?x(t):v(e)}function y(e){return e.reduce((function(e,t){return(0,c.fX)((0,c.fX)([],(0,c.zs)(e),!1),(0,c.zs)(Array.isArray(t)?y(t):[t]),!1)}),[])}function v(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var r=u(t);return Promise.resolve(r)}function w(e){return(0,c.sH)(this,void 0,void 0,(function(){return(0,c.YH)(this,(function(t){return[2,e.isDirectory?x(e):O(e)]}))}))}function x(e){var t=e.createReader();return new Promise((function(e,r){var o=[];!function n(){var i=this;t.readEntries((function(t){return(0,c.sH)(i,void 0,void 0,(function(){var i,s,a;return(0,c.YH)(this,(function(c){switch(c.label){case 0:if(t.length)return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return i=c.sent(),e(i),[3,4];case 3:return s=c.sent(),r(s),[3,4];case 4:return[3,6];case 5:a=Promise.all(t.map(w)),o.push(a),n(),c.label=6;case 6:return[2]}}))}))}),(function(e){r(e)}))}()}))}function O(e){return(0,c.sH)(this,void 0,void 0,(function(){return(0,c.YH)(this,(function(t){return[2,new Promise((function(t,r){e.file((function(r){var o=u(r,e.fullPath);t(o)}),(function(e){r(e)}))}))]}))}))}var _=r(18628);function S(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],s=!0,c=!1;try{for(r=r.call(e);!(s=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);s=!0);}catch(a){c=!0,n=a}finally{try{s||null==r.return||r.return()}finally{if(c)throw n}}return i}(e,t)||C(e,t)||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.")}()}function C(e,t){if(e){if("string"===typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(e,t):void 0}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var R="file-invalid-type",I="file-too-large",D="file-too-small",A="too-many-files",F={FileInvalidType:R,FileTooLarge:I,FileTooSmall:D,TooManyFiles:A},L=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:R,message:"File type must be ".concat(t)}},q=function(e){return{code:I,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},N=function(e){return{code:D,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},H={code:A,message:"Too many files"};function M(e,t){var r="application/x-moz-file"===e.type||(0,_.A)(e,t);return[r,r?null:L(t)]}function z(e,t,r){if(U(e.size))if(U(t)&&U(r)){if(e.size>r)return[!1,q(r)];if(e.size<t)return[!1,N(t)]}else{if(U(t)&&e.size<t)return[!1,N(t)];if(U(r)&&e.size>r)return[!1,q(r)]}return[!0,null]}function U(e){return void 0!==e&&null!==e}function K(e){return"function"===typeof e.isPropagationStopped?e.isPropagationStopped():"undefined"!==typeof e.cancelBubble&&e.cancelBubble}function B(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function G(e){e.preventDefault()}function V(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];return t.some((function(t){return!K(e)&&t&&t.apply(void 0,[e].concat(o)),K(e)}))}}function W(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function $(e){return/^.*\.[\w]+$/.test(e)}var Y=["children"],J=["open"],X=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Q=["refKey","onChange","onClick"];function Z(e){return function(e){if(Array.isArray(e))return re(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||te(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],s=!0,c=!1;try{for(r=r.call(e);!(s=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);s=!0);}catch(a){c=!0,n=a}finally{try{s||null==r.return||r.return()}finally{if(c)throw n}}return i}(e,t)||te(e,t)||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.")}()}function te(e,t){if(e){if("string"===typeof e)return re(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(r),!0).forEach((function(t){ie(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ie(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function se(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var ce=(0,o.forwardRef)((function(e,t){var r=e.children,i=pe(se(e,Y)),s=i.open,c=se(i,J);return(0,o.useImperativeHandle)(t,(function(){return{open:s}}),[s]),n().createElement(o.Fragment,null,r(ne(ne({},c),{},{open:s})))}));ce.displayName="Dropzone";var ae={disabled:!1,getFilesFromEvent:function(e){return(0,c.sH)(this,void 0,void 0,(function(){return(0,c.YH)(this,(function(t){return p(e)&&p(e.dataTransfer)?[2,h(e.dataTransfer,e.type)]:function(e){return p(e)&&p(e.target)}(e)?[2,d(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"===typeof e.getFile}))?[2,f(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ce.defaultProps=ae,ce.propTypes={children:s().func,accept:s().objectOf(s().arrayOf(s().string)),multiple:s().bool,preventDropOnDocument:s().bool,noClick:s().bool,noKeyboard:s().bool,noDrag:s().bool,noDragEventsBubbling:s().bool,minSize:s().number,maxSize:s().number,maxFiles:s().number,disabled:s().bool,getFilesFromEvent:s().func,onFileDialogCancel:s().func,onFileDialogOpen:s().func,useFsAccessApi:s().bool,autoFocus:s().bool,onDragEnter:s().func,onDragLeave:s().func,onDragOver:s().func,onDrop:s().func,onDropAccepted:s().func,onDropRejected:s().func,onError:s().func,validator:s().func};const ue=ce;var le={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ne(ne({},ae),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,c=t.minSize,a=t.multiple,u=t.maxFiles,l=t.onDragEnter,p=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,m=t.onDropRejected,b=t.onFileDialogCancel,g=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,w=t.preventDropOnDocument,x=t.noClick,O=t.noKeyboard,_=t.noDrag,j=t.noDragEventsBubbling,C=t.onError,P=t.validator,R=(0,o.useMemo)((function(){return function(e){if(U(e))return Object.entries(e).reduce((function(e,t){var r=T(t,2),o=r[0],n=r[1];return[].concat(S(e),[o],S(n))}),[]).filter((function(e){return W(e)||$(e)})).join(",")}(r)}),[r]),I=(0,o.useMemo)((function(){return function(e){return U(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=T(e,2),r=t[0],o=t[1],n=!0;return W(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),n=!1),Array.isArray(o)&&o.every($)||(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),n=!1),n})).reduce((function(e,t){var r=T(t,2),o=r[0],n=r[1];return k(k({},e),{},E({},o,n))}),{})}]:e}(r)}),[r]),D=(0,o.useMemo)((function(){return"function"===typeof g?g:fe}),[g]),A=(0,o.useMemo)((function(){return"function"===typeof b?b:fe}),[b]),F=(0,o.useRef)(null),L=(0,o.useRef)(null),q=ee((0,o.useReducer)(de,le),2),N=q[0],Y=q[1],J=N.isFocused,te=N.isFileDialogActive,re=(0,o.useRef)("undefined"!==typeof window&&window.isSecureContext&&y&&"showOpenFilePicker"in window),oe=function(){!re.current&&te&&setTimeout((function(){L.current&&(L.current.files.length||(Y({type:"closeDialog"}),A()))}),300)};(0,o.useEffect)((function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}}),[L,te,A,re]);var ce=(0,o.useRef)([]),ue=function(e){F.current&&F.current.contains(e.target)||(e.preventDefault(),ce.current=[])};(0,o.useEffect)((function(){return w&&(document.addEventListener("dragover",G,!1),document.addEventListener("drop",ue,!1)),function(){w&&(document.removeEventListener("dragover",G),document.removeEventListener("drop",ue))}}),[F,w]),(0,o.useEffect)((function(){return!n&&v&&F.current&&F.current.focus(),function(){}}),[F,v,n]);var pe=(0,o.useCallback)((function(e){C?C(e):console.error(e)}),[C]),he=(0,o.useCallback)((function(e){e.preventDefault(),e.persist(),Ee(e),ce.current=[].concat(Z(ce.current),[e.target]),B(e)&&Promise.resolve(i(e)).then((function(t){if(!K(e)||j){var r=t.length,o=r>0&&function(e){var t=e.files,r=e.accept,o=e.minSize,n=e.maxSize,i=e.multiple,s=e.maxFiles,c=e.validator;return!(!i&&t.length>1||i&&s>=1&&t.length>s)&&t.every((function(e){var t=T(M(e,r),1)[0],i=T(z(e,o,n),1)[0],s=c?c(e):null;return t&&i&&!s}))}({files:t,accept:R,minSize:c,maxSize:s,multiple:a,maxFiles:u,validator:P});Y({isDragAccept:o,isDragReject:r>0&&!o,isDragActive:!0,type:"setDraggedFiles"}),l&&l(e)}})).catch((function(e){return pe(e)}))}),[i,l,pe,j,R,c,s,a,u,P]),me=(0,o.useCallback)((function(e){e.preventDefault(),e.persist(),Ee(e);var t=B(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(r){}return t&&d&&d(e),!1}),[d,j]),be=(0,o.useCallback)((function(e){e.preventDefault(),e.persist(),Ee(e);var t=ce.current.filter((function(e){return F.current&&F.current.contains(e)})),r=t.indexOf(e.target);-1!==r&&t.splice(r,1),ce.current=t,t.length>0||(Y({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),B(e)&&p&&p(e))}),[F,p,j]),ge=(0,o.useCallback)((function(e,t){var r=[],o=[];e.forEach((function(e){var t=ee(M(e,R),2),n=t[0],i=t[1],a=ee(z(e,c,s),2),u=a[0],l=a[1],p=P?P(e):null;if(n&&u&&!p)r.push(e);else{var d=[i,l];p&&(d=d.concat(p)),o.push({file:e,errors:d.filter((function(e){return e}))})}})),(!a&&r.length>1||a&&u>=1&&r.length>u)&&(r.forEach((function(e){o.push({file:e,errors:[H]})})),r.splice(0)),Y({acceptedFiles:r,fileRejections:o,type:"setFiles"}),f&&f(r,o,t),o.length>0&&m&&m(o,t),r.length>0&&h&&h(r,t)}),[Y,a,R,c,s,u,f,h,m,P]),ye=(0,o.useCallback)((function(e){e.preventDefault(),e.persist(),Ee(e),ce.current=[],B(e)&&Promise.resolve(i(e)).then((function(t){K(e)&&!j||ge(t,e)})).catch((function(e){return pe(e)})),Y({type:"reset"})}),[i,ge,pe,j]),ve=(0,o.useCallback)((function(){if(re.current){Y({type:"openDialog"}),D();var e={multiple:a,types:I};window.showOpenFilePicker(e).then((function(e){return i(e)})).then((function(e){ge(e,null),Y({type:"closeDialog"})})).catch((function(e){var t;(t=e)instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)?(A(e),Y({type:"closeDialog"})):!function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?pe(e):(re.current=!1,L.current?(L.current.value=null,L.current.click()):pe(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.")))}))}else L.current&&(Y({type:"openDialog"}),D(),L.current.value=null,L.current.click())}),[Y,D,A,y,ge,pe,I,a]),we=(0,o.useCallback)((function(e){F.current&&F.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),ve()))}),[F,ve]),xe=(0,o.useCallback)((function(){Y({type:"focus"})}),[]),Oe=(0,o.useCallback)((function(){Y({type:"blur"})}),[]),_e=(0,o.useCallback)((function(){x||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?ve():setTimeout(ve,0))}),[x,ve]),Se=function(e){return n?null:e},je=function(e){return O?null:Se(e)},ke=function(e){return _?null:Se(e)},Ee=function(e){j&&e.stopPropagation()},Te=(0,o.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,s=e.onFocus,c=e.onBlur,a=e.onClick,u=e.onDragEnter,l=e.onDragOver,p=e.onDragLeave,d=e.onDrop,f=se(e,X);return ne(ne(ie({onKeyDown:je(V(i,we)),onFocus:je(V(s,xe)),onBlur:je(V(c,Oe)),onClick:Se(V(a,_e)),onDragEnter:ke(V(u,he)),onDragOver:ke(V(l,me)),onDragLeave:ke(V(p,be)),onDrop:ke(V(d,ye)),role:"string"===typeof o&&""!==o?o:"presentation"},r,F),n||O?{}:{tabIndex:0}),f)}}),[F,we,xe,Oe,_e,he,me,be,ye,O,_,n]),Ce=(0,o.useCallback)((function(e){e.stopPropagation()}),[]),Pe=(0,o.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.onChange,n=e.onClick,i=se(e,Q);return ne(ne({},ie({accept:R,multiple:a,type:"file",style:{display:"none"},onChange:Se(V(o,ye)),onClick:Se(V(n,Ce)),tabIndex:-1},r,L)),i)}}),[L,r,a,ye,n]);return ne(ne({},N),{},{isFocused:J&&!n,getRootProps:Te,getInputProps:Pe,rootRef:F,inputRef:L,open:Se(ve)})}function de(e,t){switch(t.type){case"focus":return ne(ne({},e),{},{isFocused:!0});case"blur":return ne(ne({},e),{},{isFocused:!1});case"openDialog":return ne(ne({},le),{},{isFileDialogActive:!0});case"closeDialog":return ne(ne({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ne(ne({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ne(ne({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ne({},le);default:return e}}function fe(){}},70079:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o},e.exports.__esModule=!0,e.exports.default=e.exports},5901:(e,t,r)=>{var o=r(70079);e.exports=function(e){if(Array.isArray(e))return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},12475:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},29293:e=>{function t(e,t,r,o,n,i,s){try{var c=e[i](s),a=c.value}catch(u){return void r(u)}c.done?t(a):Promise.resolve(a).then(o,n)}e.exports=function(e){return function(){var r=this,o=arguments;return new Promise((function(n,i){var s=e.apply(r,o);function c(e){t(s,n,i,c,a,"next",e)}function a(e){t(s,n,i,c,a,"throw",e)}c(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},17383:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},34579:(e,t,r)=>{var o=r(77736);function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},43693:(e,t,r)=>{var o=r(77736);e.exports=function(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},63072:e=>{function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},29511:(e,t,r)=>{var o=r(95636);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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},99291:e=>{e.exports=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},41869:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},28452:(e,t,r)=>{var o=r(73738).default,n=r(12475);e.exports=function(e,t){if(t&&("object"===o(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},4633:(e,t,r)=>{var o=r(73738).default;function n(){"use strict";e.exports=n=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,s=i.hasOwnProperty,c=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",p=a.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(t){d=function(e,t,r){return e[t]=r}}function f(e,t,r,o){var n=t&&t.prototype instanceof w?t:w,i=Object.create(n.prototype),s=new D(o||[]);return c(i,"_invoke",{value:C(e,r,s)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=f;var m="suspendedStart",b="suspendedYield",g="executing",y="completed",v={};function w(){}function x(){}function O(){}var _={};d(_,u,(function(){return this}));var S=Object.getPrototypeOf,j=S&&S(S(A([])));j&&j!==i&&s.call(j,u)&&(_=j);var k=O.prototype=w.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function r(n,i,c,a){var u=h(e[n],e,i);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==o(p)&&s.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,c,a)}),(function(e){r("throw",e,c,a)})):t.resolve(p).then((function(e){l.value=e,c(l)}),(function(e){return r("throw",e,c,a)}))}a(u.arg)}var n;c(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(i,i):i()}})}function C(e,r,o){var n=m;return function(i,s){if(n===g)throw Error("Generator is already running");if(n===y){if("throw"===i)throw s;return{value:t,done:!0}}for(o.method=i,o.arg=s;;){var c=o.delegate;if(c){var a=P(c,o);if(a){if(a===v)continue;return a}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(n===m)throw n=y,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);n=g;var u=h(e,r,o);if("normal"===u.type){if(n=o.done?y:b,u.arg===v)continue;return{value:u.arg,done:o.done}}"throw"===u.type&&(n=y,o.method="throw",o.arg=u.arg)}}}function P(e,r){var o=r.method,n=e.iterator[o];if(n===t)return r.delegate=null,"throw"===o&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+o+"' method")),v;var i=h(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var s=i.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n<e.length;)if(s.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(o(e)+" is not iterable")}return x.prototype=O,c(k,"constructor",{value:O,configurable:!0}),c(O,"constructor",{value:x,configurable:!0}),x.displayName=d(O,p,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===x||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,d(e,p,"GeneratorFunction")),e.prototype=Object.create(k),e},r.awrap=function(e){return{__await:e}},E(T.prototype),d(T.prototype,l,(function(){return this})),r.AsyncIterator=T,r.async=function(e,t,o,n,i){void 0===i&&(i=Promise);var s=new T(f(e,t,o,n),i);return r.isGeneratorFunction(t)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},E(k),d(k,p,"Generator"),d(k,u,(function(){return this})),d(k,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var o in t)r.push(o);return r.reverse(),function e(){for(;r.length;){var o=r.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},r.values=A,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&s.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(o,n){return c.type="throw",c.arg=e,r.next=o,n&&(r.method="next",r.arg=t),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var a=s.call(i,"catchLoc"),u=s.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&s.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var n=o;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var i=n?n.completion:{};return i.type=e,i.arg=t,n?(this.method="next",this.next=n.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var o=r.completion;if("throw"===o.type){var n=o.arg;I(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(e,r,o){return this.delegate={iterator:A(e),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=t),v}},r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},95636:e=>{function t(r,o){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},41132:(e,t,r)=>{var o=r(5901),n=r(99291),i=r(17122),s=r(41869);e.exports=function(e){return o(e)||n(e)||i(e)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},89045:(e,t,r)=>{var o=r(73738).default;e.exports=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},77736:(e,t,r)=>{var o=r(73738).default,n=r(89045);e.exports=function(e){var t=n(e,"string");return"symbol"==o(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},73738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},17122:(e,t,r)=>{var o=r(70079);e.exports=function(e,t){if(e){if("string"===typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},54756:(e,t,r)=>{var o=r(4633)();e.exports=o;try{regeneratorRuntime=o}catch(n){"object"===typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},73171:(e,t,r)=>{"use strict";var o,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,a={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(a,{AdminConnection:()=>p}),e.exports=(o=a,((e,t,r,o)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let a of s(t))c.call(e,a)||a===r||n(e,a,{get:()=>t[a],enumerable:!(o=i(t,a))||o.enumerable});return e})(n({},"__esModule",{value:!0}),o));var u=r(19594),l=r(57995);class p extends u.Connection{constructor(e){super(e)}request(e){return super.request({requireAdmin:!0,...e})}getCertificates(e){return this.request({cacheKey:"cert",forceUpdate:e,commandTimeout:!1,executor:async e=>{var t;const r=await this.getObject("system.certificates");(null===(t=null===r||void 0===r?void 0:r.native)||void 0===t?void 0:t.certificates)?e(Object.entries(r.native.certificates).map((e=>{let[t,r]=e;return function(e,t){if(!t)return;let r;if(t.length<700&&(-1!==t.indexOf("/")||-1!==t.indexOf("\\")))if(e.toLowerCase().includes("private"))r="private";else if(t.toLowerCase().includes("private"))r="private";else if(e.toLowerCase().includes("public"))r="public";else if(t.toLowerCase().includes("public"))r="public";else if(e.toLowerCase().includes("chain"))r="chained";else{if(!t.toLowerCase().includes("chain"))return;r="chained"}else r="-----BEGIN RSA PRIVATE KEY"===t.substring(0,26)||"-----BEGIN PRIVATE KEY"===t.substring(0,22)?"private":"public","public"===r&&t.split("-----END CERTIFICATE-----").filter((e=>e.replace(/\r\n|\r|\n/,"").trim())).length>1&&(r="chained");return{name:e,type:r}}(t,r)})).filter((e=>!!e))):e([])}})}getLogs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendToHost",e,"getLogs",t||200,(e=>{r(e)}))}})}getLogsFiles(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("readLogs",e,((e,o)=>{e&&r(e),t(o)}))}})}delLogs(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("sendToHost",e,"delLogs",null,(e=>{e&&r(e),t()}))}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("deleteFile",e,t,(e=>{e&&o(e),r()}))}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("deleteFolder",e,t,(e=>{e&&o(e),r()}))}})}rename(e,t,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("rename",e,t,r,(e=>{e&&n(e),o()}))}})}renameFile(e,t,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("renameFile",e,t,r,(e=>{e&&n(e),o()}))}})}getHosts(e){return this.request({cacheKey:"hosts",forceUpdate:e,commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getObjectView","system","host",{startkey:"system.host.",endkey:"system.host.\u9999"},((r,o)=>{r?t(r):e((0,l.getObjectViewResultToArray)(o))}))}})}getUsers(e){return this.request({cacheKey:"users",forceUpdate:e,commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getObjectView","system","user",{startkey:"system.user.",endkey:"system.user.\u9999"},((r,o)=>{r?t(r):e((0,l.getObjectViewResultToArray)(o))}))}})}renameGroup(e,t,r){return this.request({commandTimeout:!1,executor:async o=>{var n;const i=await this.getGroups(!0),s=i.filter((t=>t._id.startsWith("".concat(e,"."))));for(const r of s){const o=r._id,n=t+r._id.substring(e.length);r._id=n,await this.setObject(n,r),await this.delObject(o)}const c=i.find((t=>t._id===e));if(c){const e=c._id;c._id=t,void 0!==r&&(null!==(n=c.common)&&void 0!==n||(c.common={}),c.common.name=r),await this.setObject(t,c),await this.delObject(e)}o()}})}getHostInfo(e,t,r){return e=(0,l.normalizeHostId)(e),this.request({cacheKey:"hostInfo_".concat(e),forceUpdate:t,commandTimeout:r,executor:(t,r,o)=>{this._socket.emit("sendToHost",e,"getHostInfo",null,(e=>{o.elapsed||(o.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?r('May not read "getHostInfo"'):e?t(e):r('Cannot read "getHostInfo"'))}))}})}getHostInfoShort(e,t,r){return e=(0,l.normalizeHostId)(e),this.request({cacheKey:"hostInfoShort_".concat(e),forceUpdate:t,commandTimeout:r,executor:(t,r,o)=>{this._socket.emit("sendToHost",e,"getHostInfoShort",null,(e=>{o.elapsed||(o.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?r('May not read "getHostInfoShort"'):e?t(e):r('Cannot read "getHostInfoShort"'))}))}})}getRepository(e,t,r,o){return this.request({cacheKey:"repository_".concat(e),forceUpdate:r,commandTimeout:o,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getRepository",t,(e=>{n.elapsed||(n.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?o('May not read "getRepository"'):e?r(e):o('Cannot read "getRepository"'))}))}})}getInstalled(e,t,r){return e=(0,l.normalizeHostId)(e),this.request({cacheKey:"installed_".concat(e),forceUpdate:t,commandTimeout:r,executor:(t,r,o)=>{this._socket.emit("sendToHost",e,"getInstalled",null,(e=>{o.elapsed||(o.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?r('May not read "getInstalled"'):e?t(e):r('Cannot read "getInstalled"'))}))}})}cmdExec(e,t,r,o){return this.request({commandTimeout:o,executor:(o,n,i)=>{e=(0,l.normalizeHostId)(e),this._socket.emit("cmdExec",e,r,t,(e=>{i.elapsed||(i.clearTimeout(),e&&n(e),o())}))}})}readBaseSettings(e){return e=(0,l.objectIdToHostname)(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(t,r,o)=>{this._socket.emit("sendToHost",e,"readBaseSettings",null,(e=>{o.elapsed||(o.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?r('May not read "BaseSettings"'):e?t(e):r('Cannot read "BaseSettings"'))}))}})}writeBaseSettings(e,t){return e=(0,l.objectIdToHostname)(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"writeBaseSettings",t,(e=>{n.elapsed||(n.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?o('May not write "BaseSettings"'):e?r(e):o('Cannot write "BaseSettings"'))}))}})}restartController(e){return e=(0,l.objectIdToHostname)(e),this.request({executor:(t,r,o)=>{this._socket.emit("sendToHost",e,"restartController",null,(e=>{o.elapsed||(o.clearTimeout(),e&&r(e),t(!0))}))}})}getDiagData(e,t){return e=(0,l.objectIdToHostname)(e),this.request({executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getDiagData",t,(e=>{n.elapsed||(n.clearTimeout(),r(e))}))}})}changePassword(e,t){return this.request({executor:(r,o,n)=>{this._socket.emit("changePassword",e,t,(e=>{n.elapsed||(n.clearTimeout(),e&&o(e),r())}))}})}getIpAddresses(e,t){return e=(0,l.normalizeHostId)(e),this.request({cacheKey:"IPs_".concat(e),forceUpdate:t,commandTimeout:!1,executor:async t=>{var r;const o=await this.getObject(e);t(null!==(r=null===o||void 0===o?void 0:o.common.address)&&void 0!==r?r:[])}})}getHostByIp(e,t){return e=(0,l.objectIdToHostname)(e),this.request({cacheKey:"rIPs_".concat(e),forceUpdate:t,executor:(t,r,o)=>{this._socket.emit("getHostByIp",e,((e,r)=>{if(o.elapsed)return;o.clearTimeout();const{IPs4:n,IPs6:i}=function(e){var t,r;const o=[{name:"[IPv4] 0.0.0.0 - Listen on all IPs",address:"0.0.0.0",family:"ipv4"}],n=[{name:"[IPv6] :: - Listen on all IPs",address:"::",family:"ipv6"}];if(null===(r=null===(t=e.native)||void 0===t?void 0:t.hardware)||void 0===r?void 0:r.networkInterfaces)for(const[i,s]of Object.entries(e.native.hardware.networkInterfaces))if(s)for(const e of s)"IPv6"!==e.family?o.push({name:"[".concat(e.family,"] ").concat(e.address," - ").concat(i),address:e.address,family:"ipv4"}):n.push({name:"[".concat(e.family,"] ").concat(e.address," - ").concat(i),address:e.address,family:"ipv6"});return{IPs4:o,IPs6:n}}(r);t([...n,...i])}))}})}encrypt(e){return this.request({executor:(t,r,o)=>{this._socket.emit("encrypt",e,((e,n)=>{o.elapsed||(o.clearTimeout(),e&&r(e),t(n))}))}})}decrypt(e){return this.request({executor:(t,r,o)=>{this._socket.emit("decrypt",e,((e,n)=>{o.elapsed||(o.clearTimeout(),e&&r(e),t(n))}))}})}chmodFile(e,t,r){return this.request({executor:(o,n,i)=>{this._socket.emit("chmodFile",e,t,r,((e,t)=>{i.elapsed||(i.clearTimeout(),e&&n(e),o(t))}))}})}chownFile(e,t,r){return this.request({executor:(o,n,i)=>{this._socket.emit("chownFile",e,t,r,((e,t)=>{i.elapsed||(i.clearTimeout(),e&&n(e),o(t))}))}})}getNotifications(e,t){return this.request({executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getNotifications",{category:t},(e=>{n.elapsed||(n.clearTimeout(),r(e))}))}})}clearNotifications(e,t){return this.request({executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"clearNotifications",{category:t},(e=>{n.elapsed||(n.clearTimeout(),r(e))}))}})}getIsEasyModeStrict(){return this.request({executor:(e,t,r)=>{this._socket.emit("getIsEasyModeStrict",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(!!n))}))}})}getEasyMode(){return this.request({executor:(e,t,r)=>{this._socket.emit("getEasyMode",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(n))}))}})}getRatings(e){return this.request({executor:(t,r,o)=>{this._socket.emit("getRatings",!!e,((e,n)=>{o.elapsed||(o.clearTimeout(),e&&r(e),t(n))}))}})}getCurrentSession(e){const t=new AbortController;return this.request({commandTimeout:e||5e3,onTimeout:()=>{t.abort()},executor:async(e,r,o)=>{try{const r=await fetch("./session",{signal:t.signal});if(o.elapsed)return;o.clearTimeout(),e(r.json())}catch(n){r("getCurrentSession: ".concat(n))}}})}getCurrentInstance(){return this.request({cacheKey:"currentInstance",executor:(e,t,r)=>{this._socket.emit("getCurrentInstance",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(n))}))}})}getAdapterInstances(e,t){return"boolean"===typeof e&&(t=e,e=""),e=null!==e&&void 0!==e?e:"",this.request({cacheKey:"instances_".concat(e),forceUpdate:t,executor:(t,r,o)=>{this._socket.emit("getAdapterInstances",e,((e,n)=>{o.elapsed||(o.clearTimeout(),e&&r(e),t(n))}))}})}getAdapters(e,t){return"boolean"===typeof e&&(t=e,e=""),e=null!==e&&void 0!==e?e:"",this.request({cacheKey:"adapter_".concat(e),forceUpdate:t,executor:(t,r,o)=>{this._socket.emit("getAdapters",e,((e,n)=>{o.elapsed||(o.clearTimeout(),e&&r(e),t(n))}))}})}getCompactAdapters(e){return this.request({cacheKey:"compactAdapters",forceUpdate:e,executor:(e,t,r)=>{this._socket.emit("getCompactAdapters",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(n))}))}})}getAdaptersResetCache(e){e=null!==e&&void 0!==e?e:"",this.resetCache("adapter_".concat(e)),this.resetCache("compactAdapters")}getCompactInstances(e){return this.request({cacheKey:"compactInstances",forceUpdate:e,executor:(e,t,r)=>{this._socket.emit("getCompactInstances",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(n))}))}})}getAdapterInstancesResetCache(e){e=null!==e&&void 0!==e?e:"",this.resetCache("instances_".concat(e)),this.resetCache("compactInstances")}getCompactInstalled(e,t,r){return e=(0,l.normalizeHostId)(e),this.request({cacheKey:"installedCompact_".concat(e),forceUpdate:t,commandTimeout:r,executor:(t,r,o)=>{this._socket.emit("getCompactInstalled",e,(e=>{o.elapsed||(o.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?r('May not read "getCompactInstalled"'):e?t(e):r('Cannot read "getCompactInstalled"'))}))}})}getInstalledResetCache(e){e?(this.resetCache("installedCompact_".concat(e)),this.resetCache("installed_".concat(e))):(this.resetCache("installedCompact_",!0),this.resetCache("installed_",!0))}getCompactRepository(e,t,r){return e=(0,l.normalizeHostId)(e),this.request({cacheKey:"repositoryCompact_".concat(e),forceUpdate:t,commandTimeout:r,executor:(t,r,o)=>{this._socket.emit("getCompactRepository",e,(e=>{o.elapsed||(o.clearTimeout(),e===u.ERRORS.PERMISSION_ERROR?r('May not read "getCompactRepository"'):e?t(e):r('Cannot read "getCompactRepository"'))}))}})}getRepositoryResetCache(e){e?(this.resetCache("repositoryCompact_".concat(e)),this.resetCache("repository_".concat(e))):(this.resetCache("repositoryCompact_",!0),this.resetCache("repository_",!0))}getCompactHosts(e){return this.request({cacheKey:"hostsCompact",forceUpdate:e,executor:(e,t,r)=>{this._socket.emit("getCompactHosts",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(n))}))}})}getCompactSystemRepositories(e){return this.request({cacheKey:"repositoriesCompact",forceUpdate:e,executor:(e,t,r)=>{this._socket.emit("getCompactSystemRepositories",((o,n)=>{r.elapsed||(r.clearTimeout(),o&&t(o),e(n))}))}})}}},19594:(e,t,r)=>{"use strict";var o,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,a={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(a,{Connection:()=>y,ERRORS:()=>p,NOT_CONNECTED:()=>b,PERMISSION_ERROR:()=>m,PROGRESS:()=>u}),e.exports=(o=a,((e,t,r,o)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let a of s(t))c.call(e,a)||a===r||n(e,a,{get:()=>t[a],enumerable:!(o=i(t,a))||o.enumerable});return e})(n({},"__esModule",{value:!0}),o));var u,l,p,d,f=r(99072),h=r(57995);(l=u||(u={}))[l.CONNECTING=0]="CONNECTING",l[l.CONNECTED=1]="CONNECTED",l[l.OBJECTS_LOADED=2]="OBJECTS_LOADED",l[l.READY=3]="READY",(d=p||(p={})).PERMISSION_ERROR="permissionError",d.NOT_CONNECTED="notConnectedError",d.TIMEOUT="timeout",d.NOT_ADMIN="Allowed only in admin",d.NOT_SUPPORTED="Not supported";const m=p.PERMISSION_ERROR,b=p.NOT_CONNECTED,g=["material","echarts","vis"];class y{constructor(e){this.ignoreState="",this.connected=!1,this.subscribed=!1,this.firstConnect=!0,this.waitForRestart=!1,this.loaded=!1,this.simStates={},this.statesSubscribes={},this.filesSubscribes={},this.objectsSubscribes={},this.objects={},this.states={},this.acl=null,this.isSecure=!1,this.onConnectionHandlers=[],this.onLogHandlers=[],this._waitForFirstConnectionPromise=(0,f.createDeferredPromise)(),this._instanceSubscriptions={},this._promises={},this.systemLang="en",this.props=this.applyDefaultProps(e),this.waitForSocketLib().then((()=>this.startSocket())).catch((e=>{alert("Socket connection could not be initialized: ".concat(e))}))}applyDefaultProps(e){var t,r,o,n;return{...e,protocol:e.protocol||window.location.protocol,host:e.host||window.location.hostname,port:e.port||("3000"===window.location.port?8081:window.location.port),ioTimeout:Math.max(e.ioTimeout||2e4,2e4),cmdTimeout:Math.max(e.cmdTimeout||5e3,5e3),admin5only:e.admin5only||!1,autoSubscribes:null!==(t=e.autoSubscribes)&&void 0!==t?t:[],autoSubscribeLog:null!==(r=e.autoSubscribeLog)&&void 0!==r&&r,doNotLoadACL:null===(o=e.doNotLoadACL)||void 0===o||o,doNotLoadAllObjects:null===(n=e.doNotLoadAllObjects)||void 0===n||n}}onError(e){var t;(null!==(t=this.props.onError)&&void 0!==t?t:console.error)(e)}get systemConfig(){return this._systemConfig}static isWeb(){return void 0!==window.socketUrl}waitForSocketLib(){return this._waitForSocketPromise||(this._waitForSocketPromise=new Promise((async(e,t)=>{if("undefined"===typeof window.io)if("function"===typeof window.registerSocketOnLoad)window.registerSocketOnLoad((()=>e()));else{for(let t=1;t<=30;t++){if(window.io)return e();await(0,h.wait)(100)}t(new Error("Socket library could not be loaded!"))}else e()}))),this._waitForSocketPromise}async startSocket(){if(this._socket)return;let e=this.props.host,t=this.props.port,r=this.props.protocol.replace(":",""),o=window.location.pathname;if("iobroker.net"===window.location.hostname||"iobroker.pro"===window.location.hostname)o="";else{if(window.socketUrl){const o=new URL(window.socketUrl);e=o.hostname,t=o.port,r=o.protocol.replace(":","")}const n=o.lastIndexOf("/");if(-1!==n&&(o=o.substring(0,n+1)),y.isWeb()){const e=o.split("/");e.length>2&&(e.pop(),e.pop(),g.includes(e[e.length-1])&&e.pop(),o=e.join("/"),o.endsWith("/")||(o+="/"))}}const n=t?"".concat(r,"://").concat(e,":").concat(t):"".concat(r,"://").concat(e);this._socket=window.io.connect(n,{path:o.endsWith("/")?"".concat(o,"socket.io"):"".concat(o,"/socket.io"),query:"ws=true",name:this.props.name,timeout:this.props.ioTimeout,uuid:this.props.uuid,token:this.props.token}),this._socket.on("connect",(e=>{!0!==e?(this.connected=!0,setTimeout((()=>this.getVersion().then((e=>{const[t,r,o]=e.version.split(".");1e4*parseInt(t,10)+100*parseInt(r,10)+parseInt(o,10)<40102?(this._authTimer=null,this.onPreConnect(!1,!1)):this._socket.emit("authenticate",((e,t)=>this.onPreConnect(e,t)))})).catch((e=>this.onError({message:e.toString(),operation:"getVersion"})))),500)):this._socket.emit("authenticate",((e,t)=>{this.onPreConnect(e,t)}))})),this._socket.on("reconnect",(()=>{var e,t;null===(t=(e=this.props).onProgress)||void 0===t||t.call(e,u.READY),this.connected=!0,this.waitForRestart?window.location.reload():(this._subscribe(!0),this.onConnectionHandlers.forEach((e=>e(!0))))})),this._socket.on("disconnect",(()=>{var e,t;this.connected=!1,this.subscribed=!1,null===(t=(e=this.props).onProgress)||void 0===t||t.call(e,u.CONNECTING),this.onConnectionHandlers.forEach((e=>e(!1)))})),this._socket.on("reauthenticate",(()=>this.authenticate())),this._socket.on("log",(e=>{var t,r;null===(r=(t=this.props).onLog)||void 0===r||r.call(t,e),this.onLogHandlers.forEach((t=>t(e)))})),this._socket.on("error",(e=>{let t;void 0==e?t="":"function"===typeof e.toString?t=e.toString():(t=JSON.stringify(e),console.error("Received strange error: ".concat(t))),t.includes("User not authorized")?this.authenticate():t.includes("websocket error")?(console.error("Socket Error => reload: ".concat(e)),window.location.reload()):console.error("Socket Error: ".concat(e))})),this._socket.on("connect_error",(e=>console.error("Connect error: ".concat(e)))),this._socket.on("permissionError",(e=>this.onError({message:"no permission",operation:e.operation,type:e.type,id:e.id||""}))),this._socket.on("objectChange",((e,t)=>{setTimeout((()=>this.objectChange(e,t)),0)})),this._socket.on("stateChange",((e,t)=>{setTimeout((()=>this.stateChange(e,t)),0)})),this._socket.on("im",((e,t,r)=>{setTimeout((()=>this.instanceMessage(e,t,r)),0)})),this._socket.on("fileChange",((e,t,r)=>{setTimeout((()=>this.fileChange(e,t,r)),0)})),this._socket.on("cmdStdout",((e,t)=>{var r;null===(r=this.onCmdStdoutHandler)||void 0===r||r.call(this,e,t)})),this._socket.on("cmdStderr",((e,t)=>{var r;null===(r=this.onCmdStderrHandler)||void 0===r||r.call(this,e,t)})),this._socket.on("cmdExit",((e,t)=>{var r;null===(r=this.onCmdExitHandler)||void 0===r||r.call(this,e,t)}))}onPreConnect(e,t){var r,o;this._authTimer&&(clearTimeout(this._authTimer),this._authTimer=null),this.connected=!0,this.isSecure=t,this.waitForRestart?window.location.reload():(this.firstConnect?this.loadData():null===(o=(r=this.props).onProgress)||void 0===o||o.call(r,u.READY),this._subscribe(!0),this.onConnectionHandlers.forEach((e=>e(!0)))),this._waitForFirstConnectionPromise.resolve()}isConnected(){return this.connected}waitForFirstConnection(){return this._waitForFirstConnectionPromise}async getUserPermissions(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getUserPermissions",((r,o)=>{r?t(r):e(o)}))}})}async loadData(){if(this.loaded)return;for(let e=1;e<=10;e++){if(this.doLoadData(),this.loaded)return;await(0,h.wait)(1e3)}}async doLoadData(){var e,t,r,o,n,i,s,c,a;if(!this.loaded){if(!this.props.doNotLoadACL)try{this.acl=await this.getUserPermissions()}catch(l){return void this.onError("Cannot read user permissions: ".concat(l))}try{!this.props.admin5only||y.isWeb()||window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?this._systemConfig=await this.getSystemConfig():this._systemConfig=await this.getCompactSystemConfig()}catch(l){return void this.onError("Cannot read system config: ".concat(l))}this.systemLang=null===(e=this._systemConfig.common)||void 0===e?void 0:e.language,this.systemLang||(this.systemLang=window.navigator.userLanguage||window.navigator.language,/^(en|de|ru|pt|nl|fr|it|es|pl|uk)-?/.test(this.systemLang)?this.systemLang=this.systemLang.substr(0,2):/^(en|de|ru|pt|nl|fr|it|es|pl|uk|zh-cn)$/.test(this.systemLang)||(this.systemLang="en"),this._systemConfig.common.language=this.systemLang),null===(r=(t=this.props).onLanguage)||void 0===r||r.call(t,this.systemLang),this.loaded=!0,null===(n=(o=this.props).onProgress)||void 0===n||n.call(o,u.CONNECTED),this.firstConnect=!1,this.props.doNotLoadAllObjects?this.props.admin5only?this.objects={}:this.objects={"system.config":this._systemConfig}:this.objects=await this.getObjects(),null===(s=(i=this.props).onProgress)||void 0===s||s.call(i,u.READY),null===(a=(c=this.props).onReady)||void 0===a||a.call(c,this.objects)}}authenticate(){window.location.search.includes("&href=")?window.location.href="".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname).concat(window.location.search).concat(window.location.hash):window.location.href="".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname,"?login&href=").concat(window.location.search).concat(window.location.hash)}async subscribeState(){let e,t,r;for(var o=arguments.length,n=new Array(o),i=0;i<o;i++)n[i]=arguments[i];if(3===n.length?[e,t,r]=n:([e,r]=n,t=!1),"function"!==typeof r)throw new Error("The state change handler must be a function!");if(this.statesSubscribes[e]?!this.statesSubscribes[e].cbs.includes(r)&&this.statesSubscribes[e].cbs.push(r):(this.statesSubscribes[e]={reg:new RegExp((0,h.pattern2RegEx)(e)),cbs:[r]},this.connected&&e!==this.ignoreState&&this._socket.emit("subscribe",e)),this.connected)if(t){let t;try{t=await this.getBinaryState(e)}catch(s){console.error('Cannot getBinaryState "'.concat(e,'": ').concat(JSON.stringify(s)))}void 0!=t&&r(e,t)}else if(e.includes("*")){let t;try{t=await this.getForeignStates(e)}catch(s){return void console.error('Cannot getForeignStates "'.concat(e,'": ').concat(JSON.stringify(s)))}if(t)for(const[e,o]of Object.entries(t))r(e,o)}else try{r(e,await this.getState(e))}catch(s){return void console.error('Cannot getState "'.concat(e,'": ').concat(s.message))}}async subscribeStateAsync(e,t){return this.subscribeState(e,t)}unsubscribeState(e,t){if(this.statesSubscribes[e]){const r=this.statesSubscribes[e];if(t){const e=r.cbs.indexOf(t);-1!==e&&r.cbs.splice(e,1)}else r.cbs=[];r.cbs&&r.cbs.length||(delete this.statesSubscribes[e],this.connected&&e!==this.ignoreState&&this._socket.emit("unsubscribe",e))}}subscribeObject(e,t){return this.objectsSubscribes[e]?!this.objectsSubscribes[e].cbs.includes(t)&&this.objectsSubscribes[e].cbs.push(t):(this.objectsSubscribes[e]={reg:new RegExp((0,h.pattern2RegEx)(e)),cbs:[t]},this.connected&&this._socket.emit("subscribeObjects",e)),Promise.resolve()}unsubscribeObject(e,t){if(this.objectsSubscribes[e]){const r=this.objectsSubscribes[e];if(t){const e=r.cbs.indexOf(t);-1!==e&&r.cbs.splice(e,1)}else r.cbs=[];!this.connected||r.cbs&&r.cbs.length||(delete this.objectsSubscribes[e],this.connected&&this._socket.emit("unsubscribeObjects",e))}return Promise.resolve()}objectChange(e,t){var r,o;let n;this.objects[e]&&(n={_id:e,type:this.objects[e].type});let i=!1;t?(t._rev&&this.objects[e]&&(this.objects[e]._rev=t._rev),this.objects[e]&&JSON.stringify(this.objects[e])===JSON.stringify(t)||(this.objects[e]=t,i=!0)):this.objects[e]&&(delete this.objects[e],i=!0);for(const[s,c]of Object.entries(this.objectsSubscribes))(s===e||c.reg.test(e))&&c.cbs.forEach((r=>{try{r(e,t,n)}catch(o){console.error("Error by callback of objectChange: ".concat(o))}}));i&&(null===(o=(r=this.props).onObjectChange)||void 0===o||o.call(r,e,t))}stateChange(e,t){for(const o of Object.values(this.statesSubscribes))if(o.reg.test(e))for(const n of o.cbs)try{n(e,null!==t&&void 0!==t?t:null)}catch(r){console.error("Error by callback of stateChanged: ".concat(r))}}instanceMessage(e,t,r){var o;null===(o=this._instanceSubscriptions[t])||void 0===o||o.forEach((o=>{o.messageType===e&&o.callback(r,t,e)}))}fileChange(e,t,r){for(const n of Object.values(this.filesSubscribes))if(n.regId.test(e)&&n.regFilePattern.test(t))for(const i of n.cbs)try{i(e,t,r)}catch(o){console.error("Error by callback of fileChange: ".concat(o))}}async subscribeFiles(e,t,r){if("function"!==typeof r)throw new Error("The state change handler must be a function!");const o="".concat(e,"$%$").concat(t);this.filesSubscribes[o]?!this.filesSubscribes[o].cbs.includes(r)&&this.filesSubscribes[o].cbs.push(r):(this.filesSubscribes[o]={regId:new RegExp((0,h.pattern2RegEx)(e)),regFilePattern:new RegExp((0,h.pattern2RegEx)(t)),cbs:[r]},this.connected&&this._socket.emit("subscribeFiles",e,t))}unsubscribeFiles(e,t,r){const o="".concat(e,"$%$").concat(t);if(this.filesSubscribes[o]){const n=this.filesSubscribes[o];if(r){const e=n.cbs.indexOf(r);-1!==e&&n.cbs.splice(e,1)}else n.cbs=[];n.cbs&&n.cbs.length||(delete this.filesSubscribes[o],this.connected&&this._socket.emit("unsubscribeFiles",e,t))}}async request(e){let{cacheKey:t,forceUpdate:r,commandTimeout:o,onTimeout:n,requireAdmin:i,requireFeatures:s,executor:c}=e;if(i&&y.isWeb())return Promise.reject(p.NOT_ADMIN);if(t&&!r&&t in this._promises)return this._promises[t];if(!this.connected)return Promise.reject(p.NOT_CONNECTED);if(null===s||void 0===s?void 0:s.length)for(const u of s)if(!await this.checkFeatureSupported(u))throw p.NOT_SUPPORTED;const a=new Promise((async(e,t)=>{const r={elapsed:!1,clearTimeout:()=>{}};let i;!1!==o&&(i=setTimeout((()=>{r.elapsed=!0,null===n||void 0===n||n(),t(p.TIMEOUT)}),null!==o&&void 0!==o?o:this.props.cmdTimeout),r.clearTimeout=()=>{clearTimeout(i)});try{await c(e,t,r)}catch(s){t(s)}}));return t&&(this._promises[t]=a),a}resetCache(e,t){t?Object.keys(this._promises).filter((t=>t.startsWith(e))).forEach((e=>{delete this._promises[e]})):delete this._promises[e]}getStates(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getStates",e,((e,o)=>{this.states=null!==o&&void 0!==o?o:{},e?r(e):t(this.states)}))}})}getState(e){return this.request({commandTimeout:!1,executor:(t,r)=>{e&&e===this.ignoreState?t(this.simStates[e]||{val:null,ack:!0}):this._socket.emit("getState",e,((e,o)=>{e?r(e):t(o)}))}})}getBinaryState(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getBinaryState",e,((e,o)=>{e?r(e):t(o)}))}})}setBinaryState(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("setBinaryState",e,t,(e=>{e?o(e):r()}))}})}setState(e,t,r){return"boolean"===typeof r&&(t={val:t,ack:r}),this.request({commandTimeout:!1,executor:(o,n)=>{if(e&&e===this.ignoreState){let n;if(n="boolean"===typeof r||"object"===typeof t&&void 0!==t.val?t:{val:t,ack:!1,ts:Date.now(),lc:Date.now(),from:"system.adapter.vis.0"},this.simStates[e]=n,this.statesSubscribes[e])for(const t of this.statesSubscribes[e].cbs)try{t(e,n)}catch(i){console.error("Error by callback of stateChanged: ".concat(i))}o()}else this._socket.emit("setState",e,t,(e=>{e?n(e):o()}))}})}getObjects(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{e||!this.objects?this._socket.emit(y.isWeb()?"getObjects":"getAllObjects",((e,n)=>{var i,s;t||null===(s=(i=this.props).onProgress)||void 0===s||s.call(i,u.OBJECTS_LOADED),e?o(e):(this.objects=null!==n&&void 0!==n?n:{},r(this.objects))})):r(this.objects)}})}getObjectsById(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getObjects",e,((e,o)=>{e?r(e):t(o)}))}})}_subscribe(e){e&&!this.subscribed?(this.subscribed=!0,this.props.autoSubscribes&&this.props.autoSubscribes.forEach((e=>this._socket.emit("subscribeObjects",e))),Object.keys(this.objectsSubscribes).forEach((e=>this._socket.emit("subscribeObjects",e))),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!0),Object.keys(this.statesSubscribes).forEach((e=>this._socket.emit("subscribe",e))),Object.keys(this.filesSubscribes).forEach((e=>{const[t,r]=e.split("$%$");this._socket.emit("subscribeFiles",t,r)}))):!e&&this.subscribed&&(this.subscribed=!1,this.props.autoSubscribes&&this.props.autoSubscribes.forEach((e=>this._socket.emit("unsubscribeObjects",e))),Object.keys(this.objectsSubscribes).forEach((e=>this._socket.emit("unsubscribeObjects",e))),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!1),Object.keys(this.statesSubscribes).forEach((e=>this._socket.emit("unsubscribe",e))),Object.keys(this.filesSubscribes).forEach((e=>{const[t,r]=e.split("$%$");this._socket.emit("unsubscribeFiles",t,r)})))}requireLog(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("requireLog",e,(e=>{e?r(e):t()}))}})}delObject(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("delObject",e,{maintenance:t},(e=>{e?o(e):r()}))}})}delObjects(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("delObjects",e,{maintenance:t},(e=>{e?o(e):r()}))}})}setObject(e,t){return t?(delete(t=JSON.parse(JSON.stringify(t))).from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("setObject",e,t,(e=>{e?o(e):r()}))}})):Promise.reject("Null object is not allowed")}getObject(e){return this.request({commandTimeout:!1,executor:(t,r)=>{e&&e===this.ignoreState?t({_id:this.ignoreState,type:"state",common:{name:"ignored state",type:"mixed"}}):this._socket.emit("getObject",e,((e,o)=>{e?r(e):t(o)}))}})}sendTo(e,t,r){return this.request({commandTimeout:!1,executor:o=>{this._socket.emit("sendTo",e,t,r,(e=>{o(e)}))}})}extendObject(e,t){return t?(delete(t=JSON.parse(JSON.stringify(t))).from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("extendObject",e,t,(e=>{e?o(e):r()}))}})):Promise.reject("Null object is not allowed")}registerLogHandler(e){this.onLogHandlers.includes(e)||this.onLogHandlers.push(e)}unregisterLogHandler(e){const t=this.onLogHandlers.indexOf(e);-1!==t&&this.onLogHandlers.splice(t,1)}registerConnectionHandler(e){this.onConnectionHandlers.includes(e)||this.onConnectionHandlers.push(e)}unregisterConnectionHandler(e){const t=this.onConnectionHandlers.indexOf(e);-1!==t&&this.onConnectionHandlers.splice(t,1)}registerCmdStdoutHandler(e){this.onCmdStdoutHandler=e}unregisterCmdStdoutHandler(){this.onCmdStdoutHandler=void 0}registerCmdStderrHandler(e){this.onCmdStderrHandler=e}unregisterCmdStderrHandler(){this.onCmdStderrHandler=void 0}registerCmdExitHandler(e){this.onCmdExitHandler=e}unregisterCmdExitHandler(){this.onCmdExitHandler=void 0}getEnums(e,t){return this.request({cacheKey:"enums_".concat(e||"all"),forceUpdate:t,commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getObjectView","system","enum",{startkey:"enum.".concat(e||""),endkey:e?"enum.".concat(e,".\u9999"):"enum.\u9999"},((o,n)=>{if(o)r(o);else{const r={};if(n)for(let t=0;t<n.rows.length;t++)e&&n.rows[t].id==="enum.".concat(e)||(r[n.rows[t].id]=n.rows[t].value);t(r)}}))}})}getObjectView(e,t,r){return this.getObjectViewCustom("system",r,e,t)}getObjectViewSystem(e,t,r){return this.getObjectViewCustom("system",e,t,r)}getObjectViewCustom(e,t,r,o){return this.request({commandTimeout:!1,executor:(n,i)=>{r=r||"",o=o||"\u9999",this._socket.emit("getObjectView",e,t,{startkey:r,endkey:o},((e,t)=>{if(e)i(e);else{const e={};if(t&&t.rows)for(let r=0;r<t.rows.length;r++)e[t.rows[r].id]=t.rows[r].value;n(e)}}))}})}readMetaItems(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getObjectView","system","meta",{startkey:"",endkey:"\u9999"},((r,o)=>{var n;r?t(r):e(null===(n=o.rows)||void 0===n?void 0:n.map((e=>e.value)).filter((e=>!!e)))}))}})}readDir(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("readDir",e,t,((e,t)=>{e?o(e):r(t)}))}})}readFile(e,t,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit(r?"readFile64":"readFile",e,t,((e,t,r)=>{e?n(e):o({file:t,mimeType:r})}))}})}writeFile64(e,t,r){return this.request({commandTimeout:!1,executor:(o,n)=>{if("string"===typeof r)this._socket.emit("writeFile",e,t,r,(e=>{e?n(e):o()}));else{const i=btoa(new Uint8Array(r).reduce(((e,t)=>e+String.fromCharCode(t)),""));this._socket.emit("writeFile64",e,t,i,(e=>{e?n(e):o()}))}}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("deleteFile",e,t,(e=>{e?o(e):r()}))}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("deleteFolder",e,t,(e=>{e?o(e):r()}))}})}rename(e,t,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("rename",e,t,r,(e=>{e?n(e):o()}))}})}renameFile(e,t,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("renameFile",e,t,r,(e=>{e?n(e):o()}))}})}cmdExec(e,t,r,o){return this.request({commandTimeout:o,executor:(o,n,i)=>{e=(0,h.normalizeHostId)(e),this._socket.emit("cmdExec",e,r,t,(e=>{i.elapsed||(i.clearTimeout(),e?n(e):o())}))}})}getSystemConfig(e){return this.request({cacheKey:"systemConfig",forceUpdate:e,commandTimeout:!1,executor:async e=>{var t,r,o,n,i;let s=await this.getObject("system.config");null!==(t=s)&&void 0!==t||(s={}),null!==(r=(n=s).common)&&void 0!==r||(n.common={}),null!==(o=(i=s).native)&&void 0!==o||(i.native={}),e(s)}})}getCompactSystemConfig(e){return this.request({cacheKey:"systemConfigCommon",forceUpdate:e,commandTimeout:!1,requireAdmin:!0,executor:(e,t)=>{this._socket.emit("getCompactSystemConfig",((r,o)=>{var n,i,s,c,a;r?t(r):(null!==(n=o)&&void 0!==n||(o={}),null!==(i=(c=o).common)&&void 0!==i||(c.common={}),null!==(s=(a=o).native)&&void 0!==s||(a.native={}),e(o))}))}})}getForeignStates(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getForeignStates",e||"*",((e,o)=>{e?r(e):t(null!==o&&void 0!==o?o:{})}))}})}getForeignObjects(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("getForeignObjects",e||"*",t,((e,t)=>{e?o(e):r(t)}))}})}setSystemConfig(e){return this.setObject("system.config",e)}getRawSocket(){return this._socket}getHistory(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("getHistory",e,t,((e,t)=>{e?o(e):r(t)}))}})}getHistoryEx(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("getHistory",e,t,((e,t,n,i)=>{e?o(e):r({values:t,sessionId:i,stepIgnore:n})}))}})}getIpAddresses(e,t){return e=(0,h.normalizeHostId)(e),this.request({cacheKey:"IPs_".concat(e),forceUpdate:t,commandTimeout:!1,executor:async t=>{var r;const o=await this.getObject(e);t(null!==(r=null===o||void 0===o?void 0:o.common.address)&&void 0!==r?r:[])}})}getVersion(e){return this.request({cacheKey:"version",forceUpdate:e,commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getVersion",((r,o,n)=>{r&&!o&&"string"===typeof r&&r.match(/\d+\.\d+\.\d+/)?e({version:r,serverName:"socketio"}):r?t(r):e({version:o,serverName:n})}))}})}getWebServerName(){return this.request({cacheKey:"webName",commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getAdapterName",((r,o)=>{r?t(r):e(o)}))}})}fileExists(e,t){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("fileExists",e,t,((e,t)=>{e?o(e):r(!!t)}))}})}getCurrentUser(){return this.request({commandTimeout:!1,executor:e=>{this._socket.emit("authEnabled",((t,r)=>{e(r)}))}})}getUuid(){return this.request({cacheKey:"uuid",commandTimeout:!1,executor:async e=>{var t;const r=await this.getObject("system.meta.uuid");e(null===(t=null===r||void 0===r?void 0:r.native)||void 0===t?void 0:t.uuid)}})}checkFeatureSupported(e,t){return this.request({cacheKey:"supportedFeatures_".concat(e),forceUpdate:t,commandTimeout:!1,executor:(t,r)=>{this._socket.emit("checkFeatureSupported",e,((e,o)=>{e?r(e):t(o)}))}})}getAdapterInstances(e,t){return"boolean"===typeof e&&(t=e,e=""),e=e||"",this.request({cacheKey:"instances_".concat(e),forceUpdate:t,commandTimeout:!1,executor:async t=>{const r=e?"system.adapter.".concat(e,"."):"system.adapter.",o="".concat(r,"\u9999"),n=await this.getObjectViewSystem("instance",r,o),i=Object.values(n);t(e?i.filter((t=>t.common.name===e)):i)}})}getAdapters(e,t){return"boolean"===typeof e&&(t=e,e=""),e=e||"",this.request({cacheKey:"adapter_".concat(e),forceUpdate:t,commandTimeout:!1,executor:async t=>{const r=await this.getObjectViewSystem("adapter","system.adapter.".concat(e||""),"system.adapter.".concat(e||"\u9999")),o=Object.values(r);t(e?o.filter((t=>t.common.name===e)):o)}})}getGroups(e){return this.request({cacheKey:"groups",forceUpdate:e,commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getObjectView","system","group",{startkey:"system.group.",endkey:"system.group.\u9999"},((r,o)=>{r?t(r):e((0,h.getObjectViewResultToArray)(o))}))}})}logout(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("logout",(r=>{r?t(r):e(null)}))}})}subscribeOnInstance(e,t,r,o){return this.request({commandTimeout:!1,executor:(n,i)=>{this._socket.emit("clientSubscribe",e,t,r,((r,s)=>{r?i(r):s&&(s.error?i(s.error):(e.startsWith("system.adapter.")||(e="system.adapter.".concat(e)),this._instanceSubscriptions[e]=this._instanceSubscriptions[e]||[],this._instanceSubscriptions[e].find((e=>e.messageType===t&&e.callback===o))||this._instanceSubscriptions[e].push({messageType:t,callback:o}),n(s)))}))}})}unsubscribeFromInstance(e,t,r){var o;let n;e.startsWith("system.adapter.")||(e="system.adapter.".concat(e));const i=[];do{n=!1;const s=null===(o=this._instanceSubscriptions[e])||void 0===o?void 0:o.findIndex((e=>(!t||e.messageType===t)&&(!r||e.callback===r)));if(void 0!==s&&null!==s&&-1!==s){n=!0;const r=this._instanceSubscriptions[e][s].messageType;this._instanceSubscriptions[e].splice(s,1),this._instanceSubscriptions[e].length||delete this._instanceSubscriptions[e];this._instanceSubscriptions[e]&&this._instanceSubscriptions[e].find((e=>e.messageType===r))||i.push(this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("clientUnsubscribe",e,t,((e,t)=>e?o(e):r(t)))}}))}}while(n&&(!r||!t));return i.length?Promise.all(i).then((e=>!!e.find((e=>e)))):Promise.resolve(!1)}log(e,t){return e?this.request({commandTimeout:!1,executor:r=>(this._socket.emit("log",e,t),r(null))}):Promise.resolve(null)}setStateToIgnore(e){this.ignoreState=e}}},52974:e=>{"use strict";var t,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty;e.exports=(t={},((e,t,s,c)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let a of n(t))i.call(e,a)||a===s||r(e,a,{get:()=>t[a],enumerable:!(c=o(t,a))||c.enumerable});return e})(r({},"__esModule",{value:!0}),t))},99072:e=>{"use strict";var t,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={};function c(){let e,t;const r=new Promise(((r,o)=>{e=r,t=o}));return r.resolve=e,r.reject=t,r}((e,t)=>{for(var o in t)r(e,o,{get:t[o],enumerable:!0})})(s,{createDeferredPromise:()=>c}),e.exports=(t=s,((e,t,s,c)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let a of n(t))i.call(e,a)||a===s||r(e,a,{get:()=>t[a],enumerable:!(c=o(t,a))||c.enumerable});return e})(r({},"__esModule",{value:!0}),t))},71936:(e,t,r)=>{"use strict";var o,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,a=(e,t,r,o)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let a of s(t))c.call(e,a)||a===r||n(e,a,{get:()=>t[a],enumerable:!(o=i(t,a))||o.enumerable});return e},u=(e,t,r)=>(a(e,t,"default"),r&&a(r,t,"default")),l={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(l,{AdminConnection:()=>p.AdminConnection,Connection:()=>d.Connection,ERRORS:()=>d.ERRORS,PROGRESS:()=>d.PROGRESS}),e.exports=(o=l,a(n({},"__esModule",{value:!0}),o)),u(l,r(73171),e.exports);var p=r(73171);u(l,r(19594),e.exports);var d=r(19594);u(l,r(52974),e.exports);r(52974)},57995:e=>{"use strict";var t,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={};function c(e){var t;return null!==(t=null===e||void 0===e?void 0:e.rows.map((e=>e.value)).filter((e=>!!e)))&&void 0!==t?t:[]}function a(e){return(null===e||void 0===e?void 0:e.startsWith("system.host."))||(e="system.host.".concat(e)),e}function u(e){return(null===e||void 0===e?void 0:e.startsWith("system.host."))&&(e=e.substr(12)),e}function l(e){return new Promise((t=>{setTimeout(t,e)}))}function p(e){const t="*"===(e=(e||"").toString())[0],r="*"===e[e.length-1];return(t?"":"^")+(e=e.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"))+(r?"":"$")}((e,t)=>{for(var o in t)r(e,o,{get:t[o],enumerable:!0})})(s,{getObjectViewResultToArray:()=>c,normalizeHostId:()=>a,objectIdToHostname:()=>u,pattern2RegEx:()=>p,wait:()=>l}),e.exports=(t=s,((e,t,s,c)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let a of n(t))i.call(e,a)||a===s||r(e,a,{get:()=>t[a],enumerable:!(c=o(t,a))||c.enumerable});return e})(r({},"__esModule",{value:!0}),t))},64467:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var o=r(59526);function n(e,t,r){return(t=(0,o.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},6326:(e,t,r)=>{"use strict";r.d(t,{Cl:()=>o,YH:()=>i,fX:()=>c,sH:()=>n,zs:()=>s});var o=function(){return o=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};function n(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{a(o.next(e))}catch(t){i(t)}}function c(e){try{a(o.throw(e))}catch(t){i(t)}}function a(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,c)}a((o=o.apply(e,t||[])).next())}))}function i(e,t){var r,o,n,i,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(a){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(s=0)),s;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,o=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(n=(n=s.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){s=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){s.label=c[1];break}if(6===c[0]&&s.label<n[1]){s.label=n[1],n=c;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(c);break}n[2]&&s.ops.pop(),s.trys.pop();continue}c=t.call(e,s)}catch(a){c=[6,a],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}Object.create;function s(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return s}function c(e,t,r){if(r||2===arguments.length)for(var o,n=0,i=t.length;n<i;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}Object.create;"function"===typeof SuppressedError&&SuppressedError}}]);
|
|
3
|
+
//# sourceMappingURL=9964.8b1ee0f5.chunk.js.map
|