iobroker.eos-admin 9.0.28 → 9.0.29

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.
Files changed (70) hide show
  1. package/NEXOWATT_EOS_BUILD_INFO.json +10 -9
  2. package/README.md +9 -9
  3. package/adminWww/.vite/manifest.json +39 -39
  4. package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +107 -107
  5. package/adminWww/assets/{AdapterUpdateDialog-DBLX7GoO.js → AdapterUpdateDialog-DXp4Dgkx.js} +1 -1
  6. package/adminWww/assets/{Adapters-c250DTTU.js → Adapters-1AOp__74.js} +1 -1
  7. package/adminWww/assets/{ConfigManager-BBUXk8hZ.js → ConfigManager-CGGXU4Jp.js} +1 -1
  8. package/adminWww/assets/{Enums-CWJJ2zNF.js → Enums-Bl4EngJF.js} +1 -1
  9. package/adminWww/assets/{Fields-CNefAzNH.js → Fields-zSEjRWOB.js} +1 -1
  10. package/adminWww/assets/{Files-Bf8oZSk6.js → Files-CnYmjEbu.js} +1 -1
  11. package/adminWww/assets/{Hosts-8gg41ODb.js → Hosts-zFJyiuvd.js} +1 -1
  12. package/adminWww/assets/{Instances-PPTEPJQN.js → Instances-D10dnQY4.js} +1 -1
  13. package/adminWww/assets/{Intro-9c_ynpJu.js → Intro-DxLBfGZ8.js} +1 -1
  14. package/adminWww/assets/{Logs-Brgb9kR_.js → Logs-CAc6o-d_.js} +1 -1
  15. package/adminWww/assets/{Objects-DHVNfs_x.js → Objects-I64lF3ZS.js} +1 -1
  16. package/adminWww/assets/{Overview-CgnpH8e8.js → Overview-BQ7HBH-7.js} +1 -1
  17. package/adminWww/assets/{State-vVobamei.js → State-DHLL8gAc.js} +1 -1
  18. package/adminWww/assets/{UsedResources-1fEUqiQ6.js → UsedResources-DlQ_XqoR.js} +1 -1
  19. package/adminWww/assets/{Users-oRpvFtQR.js → Users-CKHDvxG5.js} +1 -1
  20. package/adminWww/assets/{bootstrap-st8VxLDc.js → bootstrap-CIDT4MeX.js} +3 -3
  21. package/adminWww/assets/{hostInit-OQMl4yOT.js → hostInit-Cvl4lPGh.js} +1 -1
  22. package/adminWww/assets/{icons-material-DeF0gQyK.js → icons-material-ngdwOXrt.js} +1 -1
  23. package/adminWww/assets/{index-D4lV2S7J.js → index-B9Tfj1YG.js} +2 -2
  24. package/adminWww/assets/{installSVGRenderer-1WdbDz-H.js → installSVGRenderer-COP6GC9p.js} +1 -1
  25. package/adminWww/assets/{mf-entry-bootstrap-0-3b253ab0.js → mf-entry-bootstrap-0-31191d2e.js} +2 -2
  26. package/adminWww/index.html +23 -23
  27. package/adminWww/mf-manifest.json +1 -1
  28. package/adminWww/mf-stats.json +1 -1
  29. package/adminWww/{remoteEntry-eos-9.0.28.js → remoteEntry-eos-9.0.29.js} +1 -1
  30. package/adminWww/remoteEntry.js +1 -1
  31. package/build/lib/eosTlsHttp.js +25 -0
  32. package/build/lib/eosTlsHttp.js.map +1 -1
  33. package/build/lib/eosTlsManager.js +317 -67
  34. package/build/lib/eosTlsManager.js.map +1 -1
  35. package/docs/README.md +3 -2
  36. package/docs/reports/unified-9.0.29/PRUEFBERICHT.md +30 -0
  37. package/docs/reports/unified-9.0.29/PRUEFERGEBNISSE.json +112 -0
  38. package/docs/reports/unified-9.0.29/raw/INDEX.json +97 -0
  39. package/docs/reports/unified-9.0.29/raw/backend.log +5 -0
  40. package/docs/reports/unified-9.0.29/raw/frontend.log +151 -0
  41. package/docs/reports/unified-9.0.29/raw/installer.log +26 -0
  42. package/docs/reports/unified-9.0.29/raw/lint.log +5 -0
  43. package/docs/reports/unified-9.0.29/raw/modules.log +5 -0
  44. package/docs/reports/unified-9.0.29/raw/node22-tests-final.log +17104 -0
  45. package/docs/reports/unified-9.0.29/raw/node22-version.log +1 -0
  46. package/docs/reports/unified-9.0.29/raw/node24-tests-final.log +2852 -0
  47. package/docs/reports/unified-9.0.29/raw/node24-version.log +1 -0
  48. package/docs/reports/unified-9.0.29/raw/npm-audit-runtime.json +77 -0
  49. package/docs/reports/unified-9.0.29/raw/tls-lint.log +0 -0
  50. package/docs/reports/unified-9.0.29/raw/tls-targeted-build-node22.log +139 -0
  51. package/docs/reports/unified-9.0.29/raw/tls-targeted-node24.log +132 -0
  52. package/docs/reports/unified-9.0.29/raw/typecheck.log +5 -0
  53. package/docs/reports/unified-9.0.29/raw/ui-runtime.log +7 -0
  54. package/docs/start/START_HIER_9.0.29.md +22 -0
  55. package/docs/unified/NEXOWATT_TLS_DE.md +18 -4
  56. package/io-package.json +8 -8
  57. package/package.json +5 -3
  58. package/public/eos-tls/index.html +96 -8
  59. package/public/eos-tls/index.js +194 -41
  60. package/release-manifests/unified/build-environment.cdx.json +6 -6
  61. package/release-manifests/unified/files.json +85 -64
  62. package/release-manifests/unified/frontend.cdx.json +6 -6
  63. package/release-manifests/unified/installer.cdx.json +6 -6
  64. package/release-manifests/unified/obsolete-admin-assets.json +131 -6
  65. package/release-manifests/unified/runtime.cdx.json +26 -26
  66. package/release-manifests/unified/validation.json +15 -15
  67. package/tools/eos-release-manifest.cjs +1 -1
  68. package/ui/io-package.json +5 -1
  69. package/ui/package.json +1 -1
  70. package/ui/www/manifest.webmanifest +2 -2
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./icons-material-DeF0gQyK.js","./loadShare-eager-dmdYQhAl.js","./rolldown-runtime-sJBDdmOt.js","./vite-preload-helper-BbbETgeG.js","./LinearScale-Be5h2beh.js","./ViewList-DVj9ENkU.js","./North-C2whbHM-.js","./Apps-BZHXIYjq.js","./VpnKey-BbZdswcd.js","./Storage-B44xXFFu.js","./Book-Cq8bkU2t.js","./Remove-IN7ZNaCF.js","./DeleteForever-CioJt3X3.js","./PushPinOutlined-BCUm5DLR.js","./PlaylistAdd-O8k92YBd.js","./UnfoldMore-DOHSVdRn.js","./ColorLens-DA51K29x.js","./FileCopy-B16lEuur.js","./InfoOutlined-Bggo2-pX.js","./Cached-DXXpEqUN.js","./Usb-C8HitPqx.js","./Computer-BBU3Cm9-.js","./Lens-9lkeoWGk.js","./Schedule-vdojlve9.js","./Timer-vc3BIs4y.js","./Extension-DIV5Bi1u.js","./TextSnippet-C9R3EbZy.js","./AddLink-0L0E-LsA.js","./Timeline-BtOuO808.js","./PersonOff-DqBq0Fho.js","./date-fns-C1dqkno9.js","./startOfWeek-DJph8SIW.js","./isWithinInterval-Bo1WiDfq.js","./isSameWeek-Crh37s7U.js","./locale-hLcz_Xh2.js","./Overview-CgnpH8e8.js","./AdminUtils-Dc1eHsx5.js","./installSVGRenderer-1WdbDz-H.js","./Adapters-c250DTTU.js","./sentry-DwQQLI7N.js","./AdapterUpdateDialog-DBLX7GoO.js","./zh-cn-B6dBxOyw.js","./State-vVobamei.js","./CustomModal-Do2qVZr7.js","./ctrlEnter-CruFIPb_.js","./Instances-PPTEPJQN.js","./Config-C4k51ggG.js","./AceEditor-BgLZBrSD.js","./UsedResources-1fEUqiQ6.js","./classPrivateFieldGet2-DZ8s9-Td.js","./Intro-9c_ynpJu.js","./Logs-Brgb9kR_.js","./Files-Bf8oZSk6.js","./Objects-DHVNfs_x.js","./Users-oRpvFtQR.js","./Fields-CNefAzNH.js","./Enums-CWJJ2zNF.js","./CustomTab-B4ywHrnT.js","./ConfigManager-BBUXk8hZ.js","./Hosts-8gg41ODb.js","./EasyMode-A2E3hSMo.js"])))=>i.map(i=>d[i]);
2
- import{a as e,r as t,t as n}from"./rolldown-runtime-sJBDdmOt.js";import{t as r}from"./vite-preload-helper-BbbETgeG.js";import{$a as i,$n as a,$r as o,$s as s,Aa as c,An as l,Ao as u,Ar as d,Bn as f,Bo as p,Bt as m,Ci as h,Co as g,Cs as _,Do as v,Ds as y,Eo as b,Es as x,F as ee,Fo as S,Go as C,Gr as w,Ha as T,Hr as te,Hs as E,I as D,In as ne,Io as re,Ja as ie,Jo as O,Ka as k,Ko as A,Ks as ae,Lo as oe,Lt as se,Mo as ce,Mr as le,Ms as ue,No as de,Nr as fe,Oa as pe,On as me,Oo as he,Os as ge,Po as _e,Qa as ve,Qn as ye,Qo as be,Ro as xe,Rt as Se,Sc as Ce,Si as we,Sr as Te,Ss as Ee,Ti as De,To as Oe,Tr as j,Ts as M,Uo as ke,Us as N,Vo as Ae,Vs as je,Wa as Me,Wo as P,Wr as Ne,Xa as Pe,Xn as Fe,Xo as Ie,Xs as Le,Y as Re,Ya as ze,Yn as Be,Yo as Ve,Ys as He,Za as Ue,Zo as We,_o as Ge,_s as Ke,a as qe,ac as Je,ai as Ye,ao as Xe,as as Ze,ba as Qe,bn as $e,bo as et,br as tt,bs as nt,c as rt,cc as it,co as at,cs as ot,dr as st,ds as ct,ea as lt,ec as ut,eo as dt,fc as F,fo as ft,fr as pt,gc as mt,gn as ht,go as I,hs as gt,ic as _t,ir as vt,is as yt,jn as bt,jo as xt,jr as St,ka as Ct,ko as wt,kr as Tt,lc as Et,lo as L,ls as Dt,mo as R,n as Ot,nc as kt,no as At,nr as jt,ns as Mt,oc as Nt,oi as Pt,oo as Ft,os as It,pc as z,po as Lt,pr as Rt,ps as zt,qa as Bt,qn as Vt,qo as B,qs as Ht,r as Ut,ra as Wt,rc as Gt,rn as Kt,ro as qt,rs as Jt,sc as Yt,so as Xt,sr as Zt,tc as Qt,ti as $t,to as V,ts as en,ua as tn,uc as nn,vs as rn,wn as an,wo as on,xc as sn,xo as cn,xs as ln,yo as H,yr as un,ys as dn,zo as fn}from"./loadShare-eager-dmdYQhAl.js";import{dedupeIntegration as pn,init as mn}from"./prod-ChPGnyiA.js";import{r as hn,t as gn}from"./startOfWeek-DJph8SIW.js";import{$ as _n,A as vn,C as yn,D as bn,E as xn,F as Sn,I as Cn,L as wn,M as Tn,N as En,O as Dn,P as On,S as kn,T as An,U as jn,Z as Mn,a as Nn,at as Pn,b as Fn,c as In,ct as Ln,d as Rn,dt as zn,i as Bn,it as Vn,j as Hn,k as Un,l as Wn,lt as Gn,n as Kn,nt as qn,o as Jn,ot as Yn,r as Xn,rt as Zn,s as Qn,st as $n,t as er,tt as tr,u as nr,w as rr,z as ir}from"./isWithinInterval-Bo1WiDfq.js";import{a as ar,n as or,o as sr,r as cr,t as U}from"./AdminUtils-Dc1eHsx5.js";import{t as lr}from"./AceEditor-BgLZBrSD.js";import{t as ur}from"./ctrlEnter-CruFIPb_.js";x();var dr={y:{sectionType:`year`,contentType:`digit`,maxLength:4},yy:`year`,yyy:{sectionType:`year`,contentType:`digit`,maxLength:4},yyyy:`year`,M:{sectionType:`month`,contentType:`digit`,maxLength:2},MM:`month`,MMMM:{sectionType:`month`,contentType:`letter`},MMM:{sectionType:`month`,contentType:`letter`},L:{sectionType:`month`,contentType:`digit`,maxLength:2},LL:`month`,LLL:{sectionType:`month`,contentType:`letter`},LLLL:{sectionType:`month`,contentType:`letter`},d:{sectionType:`day`,contentType:`digit`,maxLength:2},dd:`day`,do:{sectionType:`day`,contentType:`digit-with-letter`},E:{sectionType:`weekDay`,contentType:`letter`},EE:{sectionType:`weekDay`,contentType:`letter`},EEE:{sectionType:`weekDay`,contentType:`letter`},EEEE:{sectionType:`weekDay`,contentType:`letter`},EEEEE:{sectionType:`weekDay`,contentType:`letter`},i:{sectionType:`weekDay`,contentType:`digit`,maxLength:1},ii:`weekDay`,iii:{sectionType:`weekDay`,contentType:`letter`},iiii:{sectionType:`weekDay`,contentType:`letter`},e:{sectionType:`weekDay`,contentType:`digit`,maxLength:1},ee:`weekDay`,eee:{sectionType:`weekDay`,contentType:`letter`},eeee:{sectionType:`weekDay`,contentType:`letter`},eeeee:{sectionType:`weekDay`,contentType:`letter`},eeeeee:{sectionType:`weekDay`,contentType:`letter`},c:{sectionType:`weekDay`,contentType:`digit`,maxLength:1},cc:`weekDay`,ccc:{sectionType:`weekDay`,contentType:`letter`},cccc:{sectionType:`weekDay`,contentType:`letter`},ccccc:{sectionType:`weekDay`,contentType:`letter`},cccccc:{sectionType:`weekDay`,contentType:`letter`},a:`meridiem`,aa:`meridiem`,aaa:`meridiem`,H:{sectionType:`hours`,contentType:`digit`,maxLength:2},HH:`hours`,h:{sectionType:`hours`,contentType:`digit`,maxLength:2},hh:`hours`,K:{sectionType:`hours`,contentType:`digit`,maxLength:2},KK:`hours`,k:{sectionType:`hours`,contentType:`digit`,maxLength:2},kk:`hours`,m:{sectionType:`minutes`,contentType:`digit`,maxLength:2},mm:`minutes`,s:{sectionType:`seconds`,contentType:`digit`,maxLength:2},ss:`seconds`},fr={year:`yyyy`,month:`LLLL`,monthShort:`MMM`,dayOfMonth:`d`,dayOfMonthFull:`do`,weekday:`EEEE`,weekdayShort:`EEEEEE`,hours24h:`HH`,hours12h:`hh`,meridiem:`aa`,minutes:`mm`,seconds:`ss`,fullDate:`PP`,keyboardDate:`P`,shortDate:`MMM d`,normalDate:`d MMMM`,normalDateWithWeekday:`EEE, MMM d`,fullTime12h:`hh:mm aa`,fullTime24h:`HH:mm`,keyboardDateTime12h:`P hh:mm aa`,keyboardDateTime24h:`P HH:mm`},pr=class{constructor(e){M(this,`isMUIAdapter`,!0),M(this,`isTimezoneCompatible`,!1),M(this,`formatTokenMap`,dr),M(this,`escapedCharacters`,{start:`'`,end:`'`}),M(this,`date`,e=>e===void 0?new Date:e===null?null:new Date(e)),M(this,`getInvalidDate`,()=>new Date(`Invalid Date`)),M(this,`getTimezone`,()=>`default`),M(this,`setTimezone`,e=>e),M(this,`toJsDate`,e=>e),M(this,`getCurrentLocaleCode`,()=>this.locale.code),M(this,`is12HourCycleInCurrentLocale`,()=>/a/.test(this.locale.formatLong.time({width:`short`}))),M(this,`expandFormat`,e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=this.longFormatters[t];return n(e,this.locale.formatLong)}return e}).join(``)),M(this,`formatNumber`,e=>e),M(this,`getDayOfWeek`,e=>e.getDay()+1);let{locale:t,formats:n,longFormatters:r,lib:i}=e;this.locale=t,this.formats=ae({},fr,n),this.longFormatters=r,this.lib=i||`date-fns`}};x();var mr=class extends pr{constructor({locale:e,formats:t}={}){super({locale:e??hn,formats:t,longFormatters:ir}),M(this,`parse`,(e,t)=>e===``?null:Rn(e,t,new Date,{locale:this.locale})),M(this,`isValid`,e=>e!=null&&wn(e)),M(this,`format`,(e,t)=>this.formatByString(e,this.formats[t])),M(this,`formatByString`,(e,t)=>Cn(e,t,{locale:this.locale})),M(this,`isEqual`,(e,t)=>e===null&&t===null?!0:e===null||t===null?!1:An(e,t)),M(this,`isSameYear`,(e,t)=>yn(e,t)),M(this,`isSameMonth`,(e,t)=>kn(e,t)),M(this,`isSameDay`,(e,t)=>rr(e,t)),M(this,`isSameHour`,(e,t)=>Fn(e,t)),M(this,`isAfter`,(e,t)=>bn(e,t)),M(this,`isAfterYear`,(e,t)=>bn(e,tr(t))),M(this,`isAfterDay`,(e,t)=>bn(e,Zn(t))),M(this,`isBefore`,(e,t)=>xn(e,t)),M(this,`isBeforeYear`,(e,t)=>xn(e,this.startOfYear(t))),M(this,`isBeforeDay`,(e,t)=>xn(e,this.startOfDay(t))),M(this,`isWithinRange`,(e,[t,n])=>er(e,{start:t,end:n})),M(this,`startOfYear`,e=>Mn(e)),M(this,`startOfMonth`,e=>Xn(e)),M(this,`startOfWeek`,e=>gn(e,{locale:this.locale})),M(this,`startOfDay`,e=>_n(e)),M(this,`endOfYear`,e=>tr(e)),M(this,`endOfMonth`,e=>Kn(e)),M(this,`endOfWeek`,e=>qn(e,{locale:this.locale})),M(this,`endOfDay`,e=>Zn(e)),M(this,`addYears`,(e,t)=>Vn(e,t)),M(this,`addMonths`,(e,t)=>Pn(e,t)),M(this,`addWeeks`,(e,t)=>Yn(e,t)),M(this,`addDays`,(e,t)=>zn(e,t)),M(this,`addHours`,(e,t)=>$n(e,t)),M(this,`addMinutes`,(e,t)=>Ln(e,t)),M(this,`addSeconds`,(e,t)=>Gn(e,t)),M(this,`getYear`,e=>Dn(e)),M(this,`getMonth`,e=>Hn(e)),M(this,`getDate`,e=>Sn(e)),M(this,`getHours`,e=>En(e)),M(this,`getMinutes`,e=>Tn(e)),M(this,`getSeconds`,e=>vn(e)),M(this,`getMilliseconds`,e=>Un(e)),M(this,`setYear`,(e,t)=>Bn(e,t)),M(this,`setMonth`,(e,t)=>Qn(e,t)),M(this,`setDate`,(e,t)=>nr(e,t)),M(this,`setHours`,(e,t)=>Wn(e,t)),M(this,`setMinutes`,(e,t)=>In(e,t)),M(this,`setSeconds`,(e,t)=>Jn(e,t)),M(this,`setMilliseconds`,(e,t)=>Nn(e,t)),M(this,`getDaysInMonth`,e=>On(e)),M(this,`getWeekArray`,e=>{let t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e)),r=0,i=t,a=[];for(;this.isBefore(i,n);){let e=Math.floor(r/7);a[e]=a[e]||[],a[e].push(i),i=this.addDays(i,1),r+=1}return a}),M(this,`getWeekNumber`,e=>jn(e,{locale:this.locale})),M(this,`getYearRange`,([e,t])=>{let n=this.startOfYear(e),r=this.endOfYear(t),i=[],a=n;for(;this.isBefore(a,r);)i.push(a),a=this.addYears(a,1);return i})}};rt();var W={"@mui/icons-material":()=>r(()=>import(`./icons-material-DeF0gQyK.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]),import.meta.url),"date-fns":()=>r(()=>import(`./date-fns-C1dqkno9.js`),__vite__mapDeps([30,31,32,1,2,3,33]),import.meta.url),"date-fns/locale":()=>r(()=>import(`./locale-hLcz_Xh2.js`).then(e=>e.t),__vite__mapDeps([34,2,31,33]),import.meta.url)};function hr(){sn({name:`iobroker_admin`,shared:{},remotes:[]}),Ce(Object.fromEntries(Object.entries(W).map(([e,t])=>[e,{version:{"@mui/icons-material":`9.5.0`,"date-fns":`4.4.0`,"date-fns/locale":`4.4.0`}[e],scope:`default`,get:async()=>{let e=await t();return()=>e},shareConfig:{singleton:!0,requiredVersion:`*`,eager:!1}}])))}var gr={version:`9.0.28`},_r=Le({hostsUpdate:0,adaptersUpdate:0,hosts:null,repository:null,installed:null});function vr({children:e}){let[t]=z({hostsUpdate:0,adaptersUpdate:0,hosts:null,repository:null,installed:null}),{hosts:n,installed:r,repository:i}=t,a=nn(()=>{var e;if(!n||!i)return 0;let t=(e=i[`js-controller`])==null?void 0:e.version,r=0;return n.forEach(e=>{U.updateAvailable(e.common.installedVersion,t,`js-controller on ${e._id}`)&&r++}),r},[n,i]),o=nn(()=>{if(!r||!i)return 0;let e=0;return Object.keys(r).forEach(t=>{let n=r[t],a=i[t];t!==`js-controller`&&t!==`hosts`&&n!=null&&n.version&&a!=null&&a.version&&n.ignoreVersion!==a.version&&U.updateAvailable(n.version,a.version,`adapter "${t}"`)&&e++}),e},[r,i]),s=nn(()=>({...t,hostsUpdate:a,adaptersUpdate:o}),[t,a,o]);return E(_r.Provider,{value:s,children:e})}var yr=Le({dragDropManager:void 0});function br(e){return`Minified Redux error #`+e+`; visit https://redux.js.org/Errors?code=`+e+` for the full message or use the non-minified dev environment for full errors. `}var xr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})(),Sr=function(){return Math.random().toString(36).substring(7).split(``).join(`.`)},Cr={INIT:`@@redux/INIT`+Sr(),REPLACE:`@@redux/REPLACE`+Sr(),PROBE_UNKNOWN_ACTION:function(){return`@@redux/PROBE_UNKNOWN_ACTION`+Sr()}};function wr(e){if(typeof e!=`object`||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Tr(e,t,n){var r;if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(br(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(br(1));return n(Tr)(e,t)}if(typeof e!=`function`)throw Error(br(2));var i=e,a=t,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){if(c)throw Error(br(3));return a}function d(e){if(typeof e!=`function`)throw Error(br(4));if(c)throw Error(br(5));var t=!0;return l(),s.push(e),function(){if(t){if(c)throw Error(br(6));t=!1,l();var n=s.indexOf(e);s.splice(n,1),o=null}}}function f(e){if(!wr(e))throw Error(br(7));if(e.type===void 0)throw Error(br(8));if(c)throw Error(br(9));try{c=!0,a=i(a,e)}finally{c=!1}for(var t=o=s,n=0;n<t.length;n++){var r=t[n];r()}return e}function p(e){if(typeof e!=`function`)throw Error(br(10));i=e,f({type:Cr.REPLACE})}function m(){var e,t=d;return e={subscribe:function(e){if(typeof e!=`object`||!e)throw Error(br(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}},e[xr]=function(){return this},e}return f({type:Cr.INIT}),r={dispatch:f,subscribe:d,getState:u,replaceReducer:p},r[xr]=m,r}function G(e,t,...n){if(Er()&&t===void 0)throw Error(`invariant requires an error message argument`);if(!e){let e;if(t===void 0)e=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{let r=0;e=Error(t.replace(/%s/g,function(){return n[r++]})),e.name=`Invariant Violation`}throw e.framesToPop=1,e}}function Er(){return typeof process<`u`&&!0}function Dr(e,t,n){return t.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:n||null,e)}function Or(e,t){return e.filter(e=>e!==t)}function kr(e){return typeof e==`object`}function Ar(e,t){let n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);let i=[];return n.forEach((e,t)=>{e===1&&i.push(t)}),i}function jr(e,t){return e.filter(e=>t.indexOf(e)>-1)}var Mr=`dnd-core/INIT_COORDS`,Nr=`dnd-core/BEGIN_DRAG`,Pr=`dnd-core/PUBLISH_DRAG_SOURCE`,Fr=`dnd-core/HOVER`,Ir=`dnd-core/DROP`,Lr=`dnd-core/END_DRAG`;function Rr(e,t){return{type:Mr,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var zr={type:Mr,payload:{clientOffset:null,sourceClientOffset:null}};function Br(e){return function(t=[],n={publishSource:!0}){let{publishSource:r=!0,clientOffset:i,getSourceClientOffset:a}=n,o=e.getMonitor(),s=e.getRegistry();e.dispatch(Rr(i)),Vr(t,o,s);let c=Wr(t,o);if(c==null){e.dispatch(zr);return}let l=null;if(i){if(!a)throw Error(`getSourceClientOffset must be defined`);Hr(a),l=a(c)}e.dispatch(Rr(i,l));let u=s.getSource(c).beginDrag(o,c);return u==null?void 0:(Ur(u),s.pinSource(c),{type:Nr,payload:{itemType:s.getSourceType(c),item:u,sourceId:c,clientOffset:i||null,sourceClientOffset:l||null,isSourcePublic:!!r}})}}function Vr(e,t,n){G(!t.isDragging(),`Cannot call beginDrag while dragging.`),e.forEach(function(e){G(n.getSource(e),`Expected sourceIds to be registered.`)})}function Hr(e){G(typeof e==`function`,`When clientOffset is provided, getSourceClientOffset must be a function.`)}function Ur(e){G(kr(e),`Item must be an object.`)}function Wr(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Gr(e,t,n[t])})}return e}function qr(e){return function(t={}){let n=e.getMonitor(),r=e.getRegistry();Jr(n),Zr(n).forEach((i,a)=>{let o={type:Ir,payload:{dropResult:Kr({},t,Yr(i,a,r,n))}};e.dispatch(o)})}}function Jr(e){G(e.isDragging(),`Cannot call drop while not dragging.`),G(!e.didDrop(),`Cannot call drop twice during one drag operation.`)}function Yr(e,t,n,r){let i=n.getTarget(e),a=i?i.drop(r,e):void 0;return Xr(a),a===void 0&&(a=t===0?{}:r.getDropResult()),a}function Xr(e){G(e===void 0||kr(e),`Drop result must either be an object or undefined.`)}function Zr(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Qr(e){return function(){let t=e.getMonitor(),n=e.getRegistry();$r(t);let r=t.getSourceId();return r!=null&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:Lr}}}function $r(e){G(e.isDragging(),`Cannot call endDrag while not dragging.`)}function ei(e,t){return t===null?e===null:Array.isArray(e)?e.some(e=>e===t):e===t}function ti(e){return function(t,{clientOffset:n}={}){ni(t);let r=t.slice(0),i=e.getMonitor(),a=e.getRegistry();return ii(r,a,i.getItemType()),ri(r,i,a),ai(r,i,a),{type:Fr,payload:{targetIds:r,clientOffset:n||null}}}}function ni(e){G(Array.isArray(e),`Expected targetIds to be an array.`)}function ri(e,t,n){G(t.isDragging(),`Cannot call hover while not dragging.`),G(!t.didDrop(),`Cannot call hover after drop.`);for(let t=0;t<e.length;t++){let r=e[t];G(e.lastIndexOf(r)===t,`Expected targetIds to be unique in the passed array.`),G(n.getTarget(r),`Expected targetIds to be registered.`)}}function ii(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r];ei(t.getTargetType(i),n)||e.splice(r,1)}}function ai(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}function oi(e){return function(){if(e.getMonitor().isDragging())return{type:Pr}}}function si(e){return{beginDrag:Br(e),publishDragSource:oi(e),hover:ti(e),drop:qr(e),endDrag:Qr(e)}}var ci=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function n(n){return(...r)=>{let i=n.apply(e,r);i!==void 0&&t(i)}}let r=si(this);return Object.keys(r).reduce((e,t)=>{let i=r[t];return e[t]=n(i),e},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function li(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ui(e,t){return{x:e.x-t.x,y:e.y-t.y}}function di(e){let{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:ui(li(t,r),n)}function fi(e){let{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:ui(t,n)}var pi=[],mi=[];pi.__IS_NONE__=!0,mi.__IS_ALL__=!0;function hi(e,t){return e===pi?!1:e===mi||t===void 0||jr(t,e).length>0}var gi=class{subscribeToStateChange(e,t={}){let{handlerIds:n}=t;G(typeof e==`function`,`listener must be a function.`),G(n===void 0||Array.isArray(n),`handlerIds, when specified, must be an array of strings.`);let r=this.store.getState().stateId;return this.store.subscribe(()=>{let t=this.store.getState(),i=t.stateId;try{i===r||i===r+1&&!hi(t.dirtyHandlerIds,n)||e()}finally{r=i}})}subscribeToOffsetChange(e){G(typeof e==`function`,`listener must be a function.`);let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return G(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return G(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:ei(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return G(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:n}=t;if(!this.isDragging())return!1;let r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!ei(r,i))return!1;let a=this.getTargetIds();if(!a.length)return!1;let o=a.indexOf(e);return n?o===a.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return di(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return fi(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},_i=typeof global<`u`?global:self,vi=_i.MutationObserver||_i.WebKitMutationObserver;function yi(e){return function(){let t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function bi(e){let t=1,n=new vi(e),r=document.createTextNode(``);return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}var xi=typeof vi==`function`?bi:yi,Si=class{enqueueTask(e){let{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=xi(this.flush),this.requestErrorThrow=yi(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},Ci=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},wi=class{create(e){let t=this.freeTasks,n=t.length?t.pop():new Ci(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}},Ti=new Si,Ei=new wi(Ti.registerPendingError);function Di(e){Ti.enqueueTask(Ei.create(e))}var Oi=`dnd-core/ADD_SOURCE`,ki=`dnd-core/ADD_TARGET`,Ai=`dnd-core/REMOVE_SOURCE`,ji=`dnd-core/REMOVE_TARGET`;function Mi(e){return{type:Oi,payload:{sourceId:e}}}function Ni(e){return{type:ki,payload:{targetId:e}}}function Pi(e){return{type:Ai,payload:{sourceId:e}}}function Fi(e){return{type:ji,payload:{targetId:e}}}function Ii(e){G(typeof e.canDrag==`function`,`Expected canDrag to be a function.`),G(typeof e.beginDrag==`function`,`Expected beginDrag to be a function.`),G(typeof e.endDrag==`function`,`Expected endDrag to be a function.`)}function Li(e){G(typeof e.canDrop==`function`,`Expected canDrop to be a function.`),G(typeof e.hover==`function`,`Expected hover to be a function.`),G(typeof e.drop==`function`,`Expected beginDrag to be a function.`)}function Ri(e,t){t&&Array.isArray(e)?e.forEach(e=>Ri(e,!1)):G(typeof e==`string`||typeof e==`symbol`,t?`Type can only be a string, a symbol, or an array of either.`:`Type can only be a string or a symbol.`)}var zi;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(zi||={});var Bi=0;function Vi(){return Bi++}function Hi(e){let t=Vi().toString();switch(e){case zi.SOURCE:return`S${t}`;case zi.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function Ui(e){switch(e[0]){case`S`:return zi.SOURCE;case`T`:return zi.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function Wi(e,t){let n=e.entries(),r=!1;do{let{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}var Gi=class{addSource(e,t){Ri(e),Ii(t);let n=this.addHandler(zi.SOURCE,e,t);return this.store.dispatch(Mi(n)),n}addTarget(e,t){Ri(e,!0),Li(t);let n=this.addHandler(zi.TARGET,e,t);return this.store.dispatch(Ni(n)),n}containsHandler(e){return Wi(this.dragSources,e)||Wi(this.dropTargets,e)}getSource(e,t=!1){return G(this.isSourceId(e),`Expected a valid source ID.`),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return G(this.isTargetId(e),`Expected a valid target ID.`),this.dropTargets.get(e)}getSourceType(e){return G(this.isSourceId(e),`Expected a valid source ID.`),this.types.get(e)}getTargetType(e){return G(this.isTargetId(e),`Expected a valid target ID.`),this.types.get(e)}isSourceId(e){return Ui(e)===zi.SOURCE}isTargetId(e){return Ui(e)===zi.TARGET}removeSource(e){G(this.getSource(e),`Expected an existing source.`),this.store.dispatch(Pi(e)),Di(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){G(this.getTarget(e),`Expected an existing target.`),this.store.dispatch(Fi(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);G(t,`Expected an existing source.`),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){G(this.pinnedSource,`No source is pinned at the time.`),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){let r=Hi(e);return this.types.set(r,t),e===zi.SOURCE?this.dragSources.set(r,n):e===zi.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}},Ki=(e,t)=>e===t;function qi(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Ji(e,t,n=Ki){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function Yi(e=pi,t){switch(t.type){case Fr:break;case Oi:case ki:case ji:case Ai:return pi;case Nr:case Pr:case Lr:case Ir:default:return mi}let{targetIds:n=[],prevTargetIds:r=[]}=t.payload,i=Ar(n,r);if(!(i.length>0||!Ji(n,r)))return pi;let a=r[r.length-1],o=n[n.length-1];return a!==o&&(a&&i.push(a),o&&i.push(o)),i}function Xi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Xi(e,t,n[t])})}return e}var Qi={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function $i(e=Qi,t){let{payload:n}=t;switch(t.type){case Mr:case Nr:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Fr:return qi(e.clientOffset,n.clientOffset)?e:Zi({},e,{clientOffset:n.clientOffset});case Lr:case Ir:return Qi;default:return e}}function ea(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ta(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ea(e,t,n[t])})}return e}var na={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function ra(e=na,t){let{payload:n}=t;switch(t.type){case Nr:return ta({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Pr:return ta({},e,{isSourcePublic:!0});case Fr:return ta({},e,{targetIds:n.targetIds});case ji:return e.targetIds.indexOf(n.targetId)===-1?e:ta({},e,{targetIds:Or(e.targetIds,n.targetId)});case Ir:return ta({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Lr:return ta({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function ia(e=0,t){switch(t.type){case Oi:case ki:return e+1;case Ai:case ji:return e-1;default:return e}}function aa(e=0){return e+1}function oa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){oa(e,t,n[t])})}return e}function ca(e={},t){return{dirtyHandlerIds:Yi(e.dirtyHandlerIds,{type:t.type,payload:sa({},t.payload,{prevTargetIds:Dr(e,`dragOperation.targetIds`,[])})}),dragOffset:$i(e.dragOffset,t),refCount:ia(e.refCount,t),dragOperation:ra(e.dragOperation,t),stateId:aa(e.stateId)}}function la(e,t=void 0,n={},r=!1){let i=K(r),a=new ci(i,new gi(i,new Gi(i))),o=e(a,t,n);return a.receiveBackend(o),a}function K(e){let t=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__;return Tr(ca,e&&t&&t({name:`dnd-core`,instanceId:`dnd-core`}))}function ua(e,t){if(e==null)return{};var n=da(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function da(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var fa=0,pa=Symbol.for(`__REACT_DND_CONTEXT_INSTANCE__`),ma=kt(function(e){var{children:t}=e;let[n,r]=ha(ua(e,[`children`]));return Yt(()=>{if(r){let e=_a();return++fa,()=>{--fa===0&&(e[pa]=null)}}},[]),E(yr.Provider,{value:n,children:t})});function ha(e){return`manager`in e?[{dragDropManager:e.manager},!1]:[ga(e.backend,e.context,e.options,e.debugMode),!e.context]}function ga(e,t=_a(),n,r){let i=t;return i[pa]||(i[pa]={dragDropManager:la(e,t,n,r)}),i[pa]}function _a(){return typeof global<`u`?global:window}var va=n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),ya=typeof window<`u`?Et:Yt,ba=e(va(),1);function xa(e,t,n){let[r,i]=z(()=>t(e)),a=_t(()=>{let a=t(e);(0,ba.default)(r,a)||(i(a),n&&n())},[r,e,n]);return ya(a),[r,a]}function Sa(e,t,n){let[r,i]=xa(e,t,n);return ya(function(){let t=e.getHandlerId();if(t!=null)return e.subscribeToStateChange(i,{handlerIds:[t]})},[e,i]),r}function Ca(e,t,n){return Sa(t,e||(()=>({})),()=>n.reconnect())}function wa(e,t){let n=[...t||[]];return t==null&&typeof e!=`function`&&n.push(e),nn(()=>typeof e==`function`?e():e,n)}function Ta(e){return nn(()=>e.hooks.dragSource(),[e])}function Ea(e){return nn(()=>e.hooks.dragPreview(),[e])}var Da=!1,Oa=!1,ka=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){G(!Da,`You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return Da=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Da=!1}}isDragging(){if(!this.sourceId)return!1;G(!Oa,`You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return Oa=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Oa=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}},Aa=!1,ja=class{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;G(!Aa,`You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor`);try{return Aa=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Aa=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}};function Ma(e,t,n){let r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function Na(e,t,n){let r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function Pa(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;let s=Object.prototype.hasOwnProperty.bind(t);for(let o=0;o<a.length;o++){let c=a[o];if(!s(c))return!1;let l=e[c],u=t[c];if(i=n?n.call(r,l,u,c):void 0,i===!1||i===void 0&&l!==u)return!1}return!0}function Fa(e){return typeof e==`object`&&!!e&&Object.prototype.hasOwnProperty.call(e,`current`)}function Ia(e){if(typeof e.type==`string`)return;let t=e.type.displayName||e.type.name||`the component`;throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function La(e){return(t=null,n=null)=>{if(!ut(t)){let r=t;return e(r,n),r}let r=t;return Ia(r),Ba(r,n?t=>e(t,n):e)}}function Ra(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];if(n.endsWith(`Ref`))t[n]=e[n];else{let e=La(r);t[n]=()=>e}}),t}function za(e,t){typeof e==`function`?e(t):e.current=t}function Ba(e,t){let n=e.ref;return G(typeof n!=`string`,`Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs`),n?He(e,{ref:e=>{za(n,e),za(t,e)}}):He(e,{ref:t})}var Va=class{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){let e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){let e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){let t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Pa(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Pa(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&=(this.dragSourceUnsubscribe(),void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Ra({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,Fa(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,Fa(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}},Ha=class{get connectTarget(){return this.dropTarget}reconnect(){let e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();let t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Pa(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&=(this.unsubscribeDropTarget(),void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Ra({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,Fa(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}};function Ua(){let{dragDropManager:e}=Je(yr);return G(e!=null,`Expected drag drop context`),e}function Wa(e,t){let n=Ua(),r=nn(()=>new Va(n.getBackend()),[n]);return ya(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),ya(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function Ga(){let e=Ua();return nn(()=>new ka(e),[e])}var Ka=class{beginDrag(){let e=this.spec,t=this.monitor,n=null;return n=typeof e.item==`object`?e.item:typeof e.item==`function`?e.item(t):{},n??null}canDrag(){let e=this.spec,t=this.monitor;return typeof e.canDrag==`boolean`?e.canDrag:typeof e.canDrag!=`function`||e.canDrag(t)}isDragging(e,t){let n=this.spec,r=this.monitor,{isDragging:i}=n;return i?i(r):t===e.getSourceId()}endDrag(){let e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}};function qa(e,t,n){let r=nn(()=>new Ka(e,t,n),[t,n]);return Yt(()=>{r.spec=e},[e]),r}function Ja(e){return nn(()=>{let t=e.type;return G(t!=null,`spec.type must be defined`),t},[e])}function Ya(e,t,n){let r=Ua(),i=qa(e,t,n),a=Ja(e);ya(function(){if(a!=null){let[e,o]=Na(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o}},[r,t,n,i,a])}function Xa(e,t){let n=wa(e,t);G(!n.begin,`useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)`);let r=Ga(),i=Wa(n.options,n.previewOptions);return Ya(n,r,i),[Ca(n.collect,r,i),Ta(i),Ea(i)]}function Za(e){let t=Ua().getMonitor(),[n,r]=xa(t,e);return Yt(()=>t.subscribeToOffsetChange(r)),Yt(()=>t.subscribeToStateChange(r)),n}function Qa(e){return nn(()=>e.hooks.dropTarget(),[e])}function $a(e){let t=Ua(),n=nn(()=>new Ha(t.getBackend()),[t]);return ya(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function eo(){let e=Ua();return nn(()=>new ja(e),[e])}function to(e){let{accept:t}=e;return nn(()=>(G(e.accept!=null,`accept must be defined`),Array.isArray(t)?t:[t]),[t])}var no=class{canDrop(){let e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){let e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){let e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}};function ro(e,t){let n=nn(()=>new no(e,t),[t]);return Yt(()=>{n.spec=e},[e]),n}function io(e,t,n){let r=Ua(),i=ro(e,t),a=to(e);ya(function(){let[e,o]=Ma(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o},[r,t,i,n,a.map(e=>e.toString()).join(`|`)])}function ao(e,t){let n=wa(e,t),r=eo(),i=$a(n.options);return io(n,r,i),[Ca(n.collect,r,i),Qa(i)]}function oo(e){let t=null;return()=>(t??=e(),t)}function so(e,t){return e.filter(e=>e!==t)}function co(e,t){let n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);let i=[];return n.forEach(e=>i.push(e)),i}var lo=class{enter(e){let t=this.entered.length,n=t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e));return this.entered=co(this.entered.filter(n),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=so(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},uo=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(n=>{let r=this.config.exposeProperties[n];r!=null&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},fo=t({FILE:()=>po,HTML:()=>go,TEXT:()=>ho,URL:()=>mo}),po=`__NATIVE_FILE__`,mo=`__NATIVE_URL__`,ho=`__NATIVE_TEXT__`,go=`__NATIVE_HTML__`;function _o(e,t,n){return t.reduce((t,n)=>t||e.getData(n),``)??n}var vo={[po]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:[`Files`]},[go]:{exposeProperties:{html:(e,t)=>_o(e,t,``),dataTransfer:e=>e},matchesTypes:[`Html`,`text/html`]},[mo]:{exposeProperties:{urls:(e,t)=>_o(e,t,``).split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./icons-material-ngdwOXrt.js","./loadShare-eager-dmdYQhAl.js","./rolldown-runtime-sJBDdmOt.js","./vite-preload-helper-BbbETgeG.js","./LinearScale-Be5h2beh.js","./ViewList-DVj9ENkU.js","./North-C2whbHM-.js","./Apps-BZHXIYjq.js","./VpnKey-BbZdswcd.js","./Storage-B44xXFFu.js","./Book-Cq8bkU2t.js","./Remove-IN7ZNaCF.js","./DeleteForever-CioJt3X3.js","./PushPinOutlined-BCUm5DLR.js","./PlaylistAdd-O8k92YBd.js","./UnfoldMore-DOHSVdRn.js","./ColorLens-DA51K29x.js","./FileCopy-B16lEuur.js","./InfoOutlined-Bggo2-pX.js","./Cached-DXXpEqUN.js","./Usb-C8HitPqx.js","./Computer-BBU3Cm9-.js","./Lens-9lkeoWGk.js","./Schedule-vdojlve9.js","./Timer-vc3BIs4y.js","./Extension-DIV5Bi1u.js","./TextSnippet-C9R3EbZy.js","./AddLink-0L0E-LsA.js","./Timeline-BtOuO808.js","./PersonOff-DqBq0Fho.js","./date-fns-C1dqkno9.js","./startOfWeek-DJph8SIW.js","./isWithinInterval-Bo1WiDfq.js","./isSameWeek-Crh37s7U.js","./locale-hLcz_Xh2.js","./Overview-BQ7HBH-7.js","./AdminUtils-Dc1eHsx5.js","./installSVGRenderer-COP6GC9p.js","./Adapters-1AOp__74.js","./sentry-DwQQLI7N.js","./AdapterUpdateDialog-DXp4Dgkx.js","./zh-cn-B6dBxOyw.js","./State-DHLL8gAc.js","./CustomModal-Do2qVZr7.js","./ctrlEnter-CruFIPb_.js","./Instances-D10dnQY4.js","./Config-C4k51ggG.js","./AceEditor-BgLZBrSD.js","./UsedResources-DlQ_XqoR.js","./classPrivateFieldGet2-DZ8s9-Td.js","./Intro-DxLBfGZ8.js","./Logs-CAc6o-d_.js","./Files-CnYmjEbu.js","./Objects-I64lF3ZS.js","./Users-CKHDvxG5.js","./Fields-zSEjRWOB.js","./Enums-Bl4EngJF.js","./CustomTab-B4ywHrnT.js","./ConfigManager-CGGXU4Jp.js","./Hosts-zFJyiuvd.js","./EasyMode-A2E3hSMo.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,r as t,t as n}from"./rolldown-runtime-sJBDdmOt.js";import{t as r}from"./vite-preload-helper-BbbETgeG.js";import{$a as i,$n as a,$r as o,$s as s,Aa as c,An as l,Ao as u,Ar as d,Bn as f,Bo as p,Bt as m,Ci as h,Co as g,Cs as _,Do as v,Ds as y,Eo as b,Es as x,F as ee,Fo as S,Go as C,Gr as w,Ha as T,Hr as te,Hs as E,I as D,In as ne,Io as re,Ja as ie,Jo as O,Ka as k,Ko as A,Ks as ae,Lo as oe,Lt as se,Mo as ce,Mr as le,Ms as ue,No as de,Nr as fe,Oa as pe,On as me,Oo as he,Os as ge,Po as _e,Qa as ve,Qn as ye,Qo as be,Ro as xe,Rt as Se,Sc as Ce,Si as we,Sr as Te,Ss as Ee,Ti as De,To as Oe,Tr as j,Ts as M,Uo as ke,Us as N,Vo as Ae,Vs as je,Wa as Me,Wo as P,Wr as Ne,Xa as Pe,Xn as Fe,Xo as Ie,Xs as Le,Y as Re,Ya as ze,Yn as Be,Yo as Ve,Ys as He,Za as Ue,Zo as We,_o as Ge,_s as Ke,a as qe,ac as Je,ai as Ye,ao as Xe,as as Ze,ba as Qe,bn as $e,bo as et,br as tt,bs as nt,c as rt,cc as it,co as at,cs as ot,dr as st,ds as ct,ea as lt,ec as ut,eo as dt,fc as F,fo as ft,fr as pt,gc as mt,gn as ht,go as I,hs as gt,ic as _t,ir as vt,is as yt,jn as bt,jo as xt,jr as St,ka as Ct,ko as wt,kr as Tt,lc as Et,lo as L,ls as Dt,mo as R,n as Ot,nc as kt,no as At,nr as jt,ns as Mt,oc as Nt,oi as Pt,oo as Ft,os as It,pc as z,po as Lt,pr as Rt,ps as zt,qa as Bt,qn as Vt,qo as B,qs as Ht,r as Ut,ra as Wt,rc as Gt,rn as Kt,ro as qt,rs as Jt,sc as Yt,so as Xt,sr as Zt,tc as Qt,ti as $t,to as V,ts as en,ua as tn,uc as nn,vs as rn,wn as an,wo as on,xc as sn,xo as cn,xs as ln,yo as H,yr as un,ys as dn,zo as fn}from"./loadShare-eager-dmdYQhAl.js";import{dedupeIntegration as pn,init as mn}from"./prod-ChPGnyiA.js";import{r as hn,t as gn}from"./startOfWeek-DJph8SIW.js";import{$ as _n,A as vn,C as yn,D as bn,E as xn,F as Sn,I as Cn,L as wn,M as Tn,N as En,O as Dn,P as On,S as kn,T as An,U as jn,Z as Mn,a as Nn,at as Pn,b as Fn,c as In,ct as Ln,d as Rn,dt as zn,i as Bn,it as Vn,j as Hn,k as Un,l as Wn,lt as Gn,n as Kn,nt as qn,o as Jn,ot as Yn,r as Xn,rt as Zn,s as Qn,st as $n,t as er,tt as tr,u as nr,w as rr,z as ir}from"./isWithinInterval-Bo1WiDfq.js";import{a as ar,n as or,o as sr,r as cr,t as U}from"./AdminUtils-Dc1eHsx5.js";import{t as lr}from"./AceEditor-BgLZBrSD.js";import{t as ur}from"./ctrlEnter-CruFIPb_.js";x();var dr={y:{sectionType:`year`,contentType:`digit`,maxLength:4},yy:`year`,yyy:{sectionType:`year`,contentType:`digit`,maxLength:4},yyyy:`year`,M:{sectionType:`month`,contentType:`digit`,maxLength:2},MM:`month`,MMMM:{sectionType:`month`,contentType:`letter`},MMM:{sectionType:`month`,contentType:`letter`},L:{sectionType:`month`,contentType:`digit`,maxLength:2},LL:`month`,LLL:{sectionType:`month`,contentType:`letter`},LLLL:{sectionType:`month`,contentType:`letter`},d:{sectionType:`day`,contentType:`digit`,maxLength:2},dd:`day`,do:{sectionType:`day`,contentType:`digit-with-letter`},E:{sectionType:`weekDay`,contentType:`letter`},EE:{sectionType:`weekDay`,contentType:`letter`},EEE:{sectionType:`weekDay`,contentType:`letter`},EEEE:{sectionType:`weekDay`,contentType:`letter`},EEEEE:{sectionType:`weekDay`,contentType:`letter`},i:{sectionType:`weekDay`,contentType:`digit`,maxLength:1},ii:`weekDay`,iii:{sectionType:`weekDay`,contentType:`letter`},iiii:{sectionType:`weekDay`,contentType:`letter`},e:{sectionType:`weekDay`,contentType:`digit`,maxLength:1},ee:`weekDay`,eee:{sectionType:`weekDay`,contentType:`letter`},eeee:{sectionType:`weekDay`,contentType:`letter`},eeeee:{sectionType:`weekDay`,contentType:`letter`},eeeeee:{sectionType:`weekDay`,contentType:`letter`},c:{sectionType:`weekDay`,contentType:`digit`,maxLength:1},cc:`weekDay`,ccc:{sectionType:`weekDay`,contentType:`letter`},cccc:{sectionType:`weekDay`,contentType:`letter`},ccccc:{sectionType:`weekDay`,contentType:`letter`},cccccc:{sectionType:`weekDay`,contentType:`letter`},a:`meridiem`,aa:`meridiem`,aaa:`meridiem`,H:{sectionType:`hours`,contentType:`digit`,maxLength:2},HH:`hours`,h:{sectionType:`hours`,contentType:`digit`,maxLength:2},hh:`hours`,K:{sectionType:`hours`,contentType:`digit`,maxLength:2},KK:`hours`,k:{sectionType:`hours`,contentType:`digit`,maxLength:2},kk:`hours`,m:{sectionType:`minutes`,contentType:`digit`,maxLength:2},mm:`minutes`,s:{sectionType:`seconds`,contentType:`digit`,maxLength:2},ss:`seconds`},fr={year:`yyyy`,month:`LLLL`,monthShort:`MMM`,dayOfMonth:`d`,dayOfMonthFull:`do`,weekday:`EEEE`,weekdayShort:`EEEEEE`,hours24h:`HH`,hours12h:`hh`,meridiem:`aa`,minutes:`mm`,seconds:`ss`,fullDate:`PP`,keyboardDate:`P`,shortDate:`MMM d`,normalDate:`d MMMM`,normalDateWithWeekday:`EEE, MMM d`,fullTime12h:`hh:mm aa`,fullTime24h:`HH:mm`,keyboardDateTime12h:`P hh:mm aa`,keyboardDateTime24h:`P HH:mm`},pr=class{constructor(e){M(this,`isMUIAdapter`,!0),M(this,`isTimezoneCompatible`,!1),M(this,`formatTokenMap`,dr),M(this,`escapedCharacters`,{start:`'`,end:`'`}),M(this,`date`,e=>e===void 0?new Date:e===null?null:new Date(e)),M(this,`getInvalidDate`,()=>new Date(`Invalid Date`)),M(this,`getTimezone`,()=>`default`),M(this,`setTimezone`,e=>e),M(this,`toJsDate`,e=>e),M(this,`getCurrentLocaleCode`,()=>this.locale.code),M(this,`is12HourCycleInCurrentLocale`,()=>/a/.test(this.locale.formatLong.time({width:`short`}))),M(this,`expandFormat`,e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=this.longFormatters[t];return n(e,this.locale.formatLong)}return e}).join(``)),M(this,`formatNumber`,e=>e),M(this,`getDayOfWeek`,e=>e.getDay()+1);let{locale:t,formats:n,longFormatters:r,lib:i}=e;this.locale=t,this.formats=ae({},fr,n),this.longFormatters=r,this.lib=i||`date-fns`}};x();var mr=class extends pr{constructor({locale:e,formats:t}={}){super({locale:e??hn,formats:t,longFormatters:ir}),M(this,`parse`,(e,t)=>e===``?null:Rn(e,t,new Date,{locale:this.locale})),M(this,`isValid`,e=>e!=null&&wn(e)),M(this,`format`,(e,t)=>this.formatByString(e,this.formats[t])),M(this,`formatByString`,(e,t)=>Cn(e,t,{locale:this.locale})),M(this,`isEqual`,(e,t)=>e===null&&t===null?!0:e===null||t===null?!1:An(e,t)),M(this,`isSameYear`,(e,t)=>yn(e,t)),M(this,`isSameMonth`,(e,t)=>kn(e,t)),M(this,`isSameDay`,(e,t)=>rr(e,t)),M(this,`isSameHour`,(e,t)=>Fn(e,t)),M(this,`isAfter`,(e,t)=>bn(e,t)),M(this,`isAfterYear`,(e,t)=>bn(e,tr(t))),M(this,`isAfterDay`,(e,t)=>bn(e,Zn(t))),M(this,`isBefore`,(e,t)=>xn(e,t)),M(this,`isBeforeYear`,(e,t)=>xn(e,this.startOfYear(t))),M(this,`isBeforeDay`,(e,t)=>xn(e,this.startOfDay(t))),M(this,`isWithinRange`,(e,[t,n])=>er(e,{start:t,end:n})),M(this,`startOfYear`,e=>Mn(e)),M(this,`startOfMonth`,e=>Xn(e)),M(this,`startOfWeek`,e=>gn(e,{locale:this.locale})),M(this,`startOfDay`,e=>_n(e)),M(this,`endOfYear`,e=>tr(e)),M(this,`endOfMonth`,e=>Kn(e)),M(this,`endOfWeek`,e=>qn(e,{locale:this.locale})),M(this,`endOfDay`,e=>Zn(e)),M(this,`addYears`,(e,t)=>Vn(e,t)),M(this,`addMonths`,(e,t)=>Pn(e,t)),M(this,`addWeeks`,(e,t)=>Yn(e,t)),M(this,`addDays`,(e,t)=>zn(e,t)),M(this,`addHours`,(e,t)=>$n(e,t)),M(this,`addMinutes`,(e,t)=>Ln(e,t)),M(this,`addSeconds`,(e,t)=>Gn(e,t)),M(this,`getYear`,e=>Dn(e)),M(this,`getMonth`,e=>Hn(e)),M(this,`getDate`,e=>Sn(e)),M(this,`getHours`,e=>En(e)),M(this,`getMinutes`,e=>Tn(e)),M(this,`getSeconds`,e=>vn(e)),M(this,`getMilliseconds`,e=>Un(e)),M(this,`setYear`,(e,t)=>Bn(e,t)),M(this,`setMonth`,(e,t)=>Qn(e,t)),M(this,`setDate`,(e,t)=>nr(e,t)),M(this,`setHours`,(e,t)=>Wn(e,t)),M(this,`setMinutes`,(e,t)=>In(e,t)),M(this,`setSeconds`,(e,t)=>Jn(e,t)),M(this,`setMilliseconds`,(e,t)=>Nn(e,t)),M(this,`getDaysInMonth`,e=>On(e)),M(this,`getWeekArray`,e=>{let t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e)),r=0,i=t,a=[];for(;this.isBefore(i,n);){let e=Math.floor(r/7);a[e]=a[e]||[],a[e].push(i),i=this.addDays(i,1),r+=1}return a}),M(this,`getWeekNumber`,e=>jn(e,{locale:this.locale})),M(this,`getYearRange`,([e,t])=>{let n=this.startOfYear(e),r=this.endOfYear(t),i=[],a=n;for(;this.isBefore(a,r);)i.push(a),a=this.addYears(a,1);return i})}};rt();var W={"@mui/icons-material":()=>r(()=>import(`./icons-material-ngdwOXrt.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]),import.meta.url),"date-fns":()=>r(()=>import(`./date-fns-C1dqkno9.js`),__vite__mapDeps([30,31,32,1,2,3,33]),import.meta.url),"date-fns/locale":()=>r(()=>import(`./locale-hLcz_Xh2.js`).then(e=>e.t),__vite__mapDeps([34,2,31,33]),import.meta.url)};function hr(){sn({name:`iobroker_admin`,shared:{},remotes:[]}),Ce(Object.fromEntries(Object.entries(W).map(([e,t])=>[e,{version:{"@mui/icons-material":`9.5.0`,"date-fns":`4.4.0`,"date-fns/locale":`4.4.0`}[e],scope:`default`,get:async()=>{let e=await t();return()=>e},shareConfig:{singleton:!0,requiredVersion:`*`,eager:!1}}])))}var gr={version:`9.0.29`},_r=Le({hostsUpdate:0,adaptersUpdate:0,hosts:null,repository:null,installed:null});function vr({children:e}){let[t]=z({hostsUpdate:0,adaptersUpdate:0,hosts:null,repository:null,installed:null}),{hosts:n,installed:r,repository:i}=t,a=nn(()=>{var e;if(!n||!i)return 0;let t=(e=i[`js-controller`])==null?void 0:e.version,r=0;return n.forEach(e=>{U.updateAvailable(e.common.installedVersion,t,`js-controller on ${e._id}`)&&r++}),r},[n,i]),o=nn(()=>{if(!r||!i)return 0;let e=0;return Object.keys(r).forEach(t=>{let n=r[t],a=i[t];t!==`js-controller`&&t!==`hosts`&&n!=null&&n.version&&a!=null&&a.version&&n.ignoreVersion!==a.version&&U.updateAvailable(n.version,a.version,`adapter "${t}"`)&&e++}),e},[r,i]),s=nn(()=>({...t,hostsUpdate:a,adaptersUpdate:o}),[t,a,o]);return E(_r.Provider,{value:s,children:e})}var yr=Le({dragDropManager:void 0});function br(e){return`Minified Redux error #`+e+`; visit https://redux.js.org/Errors?code=`+e+` for the full message or use the non-minified dev environment for full errors. `}var xr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})(),Sr=function(){return Math.random().toString(36).substring(7).split(``).join(`.`)},Cr={INIT:`@@redux/INIT`+Sr(),REPLACE:`@@redux/REPLACE`+Sr(),PROBE_UNKNOWN_ACTION:function(){return`@@redux/PROBE_UNKNOWN_ACTION`+Sr()}};function wr(e){if(typeof e!=`object`||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Tr(e,t,n){var r;if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(br(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(br(1));return n(Tr)(e,t)}if(typeof e!=`function`)throw Error(br(2));var i=e,a=t,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){if(c)throw Error(br(3));return a}function d(e){if(typeof e!=`function`)throw Error(br(4));if(c)throw Error(br(5));var t=!0;return l(),s.push(e),function(){if(t){if(c)throw Error(br(6));t=!1,l();var n=s.indexOf(e);s.splice(n,1),o=null}}}function f(e){if(!wr(e))throw Error(br(7));if(e.type===void 0)throw Error(br(8));if(c)throw Error(br(9));try{c=!0,a=i(a,e)}finally{c=!1}for(var t=o=s,n=0;n<t.length;n++){var r=t[n];r()}return e}function p(e){if(typeof e!=`function`)throw Error(br(10));i=e,f({type:Cr.REPLACE})}function m(){var e,t=d;return e={subscribe:function(e){if(typeof e!=`object`||!e)throw Error(br(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}},e[xr]=function(){return this},e}return f({type:Cr.INIT}),r={dispatch:f,subscribe:d,getState:u,replaceReducer:p},r[xr]=m,r}function G(e,t,...n){if(Er()&&t===void 0)throw Error(`invariant requires an error message argument`);if(!e){let e;if(t===void 0)e=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{let r=0;e=Error(t.replace(/%s/g,function(){return n[r++]})),e.name=`Invariant Violation`}throw e.framesToPop=1,e}}function Er(){return typeof process<`u`&&!0}function Dr(e,t,n){return t.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:n||null,e)}function Or(e,t){return e.filter(e=>e!==t)}function kr(e){return typeof e==`object`}function Ar(e,t){let n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);let i=[];return n.forEach((e,t)=>{e===1&&i.push(t)}),i}function jr(e,t){return e.filter(e=>t.indexOf(e)>-1)}var Mr=`dnd-core/INIT_COORDS`,Nr=`dnd-core/BEGIN_DRAG`,Pr=`dnd-core/PUBLISH_DRAG_SOURCE`,Fr=`dnd-core/HOVER`,Ir=`dnd-core/DROP`,Lr=`dnd-core/END_DRAG`;function Rr(e,t){return{type:Mr,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var zr={type:Mr,payload:{clientOffset:null,sourceClientOffset:null}};function Br(e){return function(t=[],n={publishSource:!0}){let{publishSource:r=!0,clientOffset:i,getSourceClientOffset:a}=n,o=e.getMonitor(),s=e.getRegistry();e.dispatch(Rr(i)),Vr(t,o,s);let c=Wr(t,o);if(c==null){e.dispatch(zr);return}let l=null;if(i){if(!a)throw Error(`getSourceClientOffset must be defined`);Hr(a),l=a(c)}e.dispatch(Rr(i,l));let u=s.getSource(c).beginDrag(o,c);return u==null?void 0:(Ur(u),s.pinSource(c),{type:Nr,payload:{itemType:s.getSourceType(c),item:u,sourceId:c,clientOffset:i||null,sourceClientOffset:l||null,isSourcePublic:!!r}})}}function Vr(e,t,n){G(!t.isDragging(),`Cannot call beginDrag while dragging.`),e.forEach(function(e){G(n.getSource(e),`Expected sourceIds to be registered.`)})}function Hr(e){G(typeof e==`function`,`When clientOffset is provided, getSourceClientOffset must be a function.`)}function Ur(e){G(kr(e),`Item must be an object.`)}function Wr(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Gr(e,t,n[t])})}return e}function qr(e){return function(t={}){let n=e.getMonitor(),r=e.getRegistry();Jr(n),Zr(n).forEach((i,a)=>{let o={type:Ir,payload:{dropResult:Kr({},t,Yr(i,a,r,n))}};e.dispatch(o)})}}function Jr(e){G(e.isDragging(),`Cannot call drop while not dragging.`),G(!e.didDrop(),`Cannot call drop twice during one drag operation.`)}function Yr(e,t,n,r){let i=n.getTarget(e),a=i?i.drop(r,e):void 0;return Xr(a),a===void 0&&(a=t===0?{}:r.getDropResult()),a}function Xr(e){G(e===void 0||kr(e),`Drop result must either be an object or undefined.`)}function Zr(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Qr(e){return function(){let t=e.getMonitor(),n=e.getRegistry();$r(t);let r=t.getSourceId();return r!=null&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:Lr}}}function $r(e){G(e.isDragging(),`Cannot call endDrag while not dragging.`)}function ei(e,t){return t===null?e===null:Array.isArray(e)?e.some(e=>e===t):e===t}function ti(e){return function(t,{clientOffset:n}={}){ni(t);let r=t.slice(0),i=e.getMonitor(),a=e.getRegistry();return ii(r,a,i.getItemType()),ri(r,i,a),ai(r,i,a),{type:Fr,payload:{targetIds:r,clientOffset:n||null}}}}function ni(e){G(Array.isArray(e),`Expected targetIds to be an array.`)}function ri(e,t,n){G(t.isDragging(),`Cannot call hover while not dragging.`),G(!t.didDrop(),`Cannot call hover after drop.`);for(let t=0;t<e.length;t++){let r=e[t];G(e.lastIndexOf(r)===t,`Expected targetIds to be unique in the passed array.`),G(n.getTarget(r),`Expected targetIds to be registered.`)}}function ii(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r];ei(t.getTargetType(i),n)||e.splice(r,1)}}function ai(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}function oi(e){return function(){if(e.getMonitor().isDragging())return{type:Pr}}}function si(e){return{beginDrag:Br(e),publishDragSource:oi(e),hover:ti(e),drop:qr(e),endDrag:Qr(e)}}var ci=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function n(n){return(...r)=>{let i=n.apply(e,r);i!==void 0&&t(i)}}let r=si(this);return Object.keys(r).reduce((e,t)=>{let i=r[t];return e[t]=n(i),e},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function li(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ui(e,t){return{x:e.x-t.x,y:e.y-t.y}}function di(e){let{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:ui(li(t,r),n)}function fi(e){let{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:ui(t,n)}var pi=[],mi=[];pi.__IS_NONE__=!0,mi.__IS_ALL__=!0;function hi(e,t){return e===pi?!1:e===mi||t===void 0||jr(t,e).length>0}var gi=class{subscribeToStateChange(e,t={}){let{handlerIds:n}=t;G(typeof e==`function`,`listener must be a function.`),G(n===void 0||Array.isArray(n),`handlerIds, when specified, must be an array of strings.`);let r=this.store.getState().stateId;return this.store.subscribe(()=>{let t=this.store.getState(),i=t.stateId;try{i===r||i===r+1&&!hi(t.dirtyHandlerIds,n)||e()}finally{r=i}})}subscribeToOffsetChange(e){G(typeof e==`function`,`listener must be a function.`);let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return G(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return G(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:ei(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return G(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:n}=t;if(!this.isDragging())return!1;let r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!ei(r,i))return!1;let a=this.getTargetIds();if(!a.length)return!1;let o=a.indexOf(e);return n?o===a.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return di(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return fi(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},_i=typeof global<`u`?global:self,vi=_i.MutationObserver||_i.WebKitMutationObserver;function yi(e){return function(){let t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function bi(e){let t=1,n=new vi(e),r=document.createTextNode(``);return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}var xi=typeof vi==`function`?bi:yi,Si=class{enqueueTask(e){let{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=xi(this.flush),this.requestErrorThrow=yi(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},Ci=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},wi=class{create(e){let t=this.freeTasks,n=t.length?t.pop():new Ci(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}},Ti=new Si,Ei=new wi(Ti.registerPendingError);function Di(e){Ti.enqueueTask(Ei.create(e))}var Oi=`dnd-core/ADD_SOURCE`,ki=`dnd-core/ADD_TARGET`,Ai=`dnd-core/REMOVE_SOURCE`,ji=`dnd-core/REMOVE_TARGET`;function Mi(e){return{type:Oi,payload:{sourceId:e}}}function Ni(e){return{type:ki,payload:{targetId:e}}}function Pi(e){return{type:Ai,payload:{sourceId:e}}}function Fi(e){return{type:ji,payload:{targetId:e}}}function Ii(e){G(typeof e.canDrag==`function`,`Expected canDrag to be a function.`),G(typeof e.beginDrag==`function`,`Expected beginDrag to be a function.`),G(typeof e.endDrag==`function`,`Expected endDrag to be a function.`)}function Li(e){G(typeof e.canDrop==`function`,`Expected canDrop to be a function.`),G(typeof e.hover==`function`,`Expected hover to be a function.`),G(typeof e.drop==`function`,`Expected beginDrag to be a function.`)}function Ri(e,t){t&&Array.isArray(e)?e.forEach(e=>Ri(e,!1)):G(typeof e==`string`||typeof e==`symbol`,t?`Type can only be a string, a symbol, or an array of either.`:`Type can only be a string or a symbol.`)}var zi;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(zi||={});var Bi=0;function Vi(){return Bi++}function Hi(e){let t=Vi().toString();switch(e){case zi.SOURCE:return`S${t}`;case zi.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function Ui(e){switch(e[0]){case`S`:return zi.SOURCE;case`T`:return zi.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function Wi(e,t){let n=e.entries(),r=!1;do{let{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}var Gi=class{addSource(e,t){Ri(e),Ii(t);let n=this.addHandler(zi.SOURCE,e,t);return this.store.dispatch(Mi(n)),n}addTarget(e,t){Ri(e,!0),Li(t);let n=this.addHandler(zi.TARGET,e,t);return this.store.dispatch(Ni(n)),n}containsHandler(e){return Wi(this.dragSources,e)||Wi(this.dropTargets,e)}getSource(e,t=!1){return G(this.isSourceId(e),`Expected a valid source ID.`),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return G(this.isTargetId(e),`Expected a valid target ID.`),this.dropTargets.get(e)}getSourceType(e){return G(this.isSourceId(e),`Expected a valid source ID.`),this.types.get(e)}getTargetType(e){return G(this.isTargetId(e),`Expected a valid target ID.`),this.types.get(e)}isSourceId(e){return Ui(e)===zi.SOURCE}isTargetId(e){return Ui(e)===zi.TARGET}removeSource(e){G(this.getSource(e),`Expected an existing source.`),this.store.dispatch(Pi(e)),Di(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){G(this.getTarget(e),`Expected an existing target.`),this.store.dispatch(Fi(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);G(t,`Expected an existing source.`),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){G(this.pinnedSource,`No source is pinned at the time.`),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){let r=Hi(e);return this.types.set(r,t),e===zi.SOURCE?this.dragSources.set(r,n):e===zi.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}},Ki=(e,t)=>e===t;function qi(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Ji(e,t,n=Ki){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function Yi(e=pi,t){switch(t.type){case Fr:break;case Oi:case ki:case ji:case Ai:return pi;case Nr:case Pr:case Lr:case Ir:default:return mi}let{targetIds:n=[],prevTargetIds:r=[]}=t.payload,i=Ar(n,r);if(!(i.length>0||!Ji(n,r)))return pi;let a=r[r.length-1],o=n[n.length-1];return a!==o&&(a&&i.push(a),o&&i.push(o)),i}function Xi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Xi(e,t,n[t])})}return e}var Qi={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function $i(e=Qi,t){let{payload:n}=t;switch(t.type){case Mr:case Nr:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Fr:return qi(e.clientOffset,n.clientOffset)?e:Zi({},e,{clientOffset:n.clientOffset});case Lr:case Ir:return Qi;default:return e}}function ea(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ta(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ea(e,t,n[t])})}return e}var na={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function ra(e=na,t){let{payload:n}=t;switch(t.type){case Nr:return ta({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Pr:return ta({},e,{isSourcePublic:!0});case Fr:return ta({},e,{targetIds:n.targetIds});case ji:return e.targetIds.indexOf(n.targetId)===-1?e:ta({},e,{targetIds:Or(e.targetIds,n.targetId)});case Ir:return ta({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Lr:return ta({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function ia(e=0,t){switch(t.type){case Oi:case ki:return e+1;case Ai:case ji:return e-1;default:return e}}function aa(e=0){return e+1}function oa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){oa(e,t,n[t])})}return e}function ca(e={},t){return{dirtyHandlerIds:Yi(e.dirtyHandlerIds,{type:t.type,payload:sa({},t.payload,{prevTargetIds:Dr(e,`dragOperation.targetIds`,[])})}),dragOffset:$i(e.dragOffset,t),refCount:ia(e.refCount,t),dragOperation:ra(e.dragOperation,t),stateId:aa(e.stateId)}}function la(e,t=void 0,n={},r=!1){let i=K(r),a=new ci(i,new gi(i,new Gi(i))),o=e(a,t,n);return a.receiveBackend(o),a}function K(e){let t=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__;return Tr(ca,e&&t&&t({name:`dnd-core`,instanceId:`dnd-core`}))}function ua(e,t){if(e==null)return{};var n=da(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function da(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var fa=0,pa=Symbol.for(`__REACT_DND_CONTEXT_INSTANCE__`),ma=kt(function(e){var{children:t}=e;let[n,r]=ha(ua(e,[`children`]));return Yt(()=>{if(r){let e=_a();return++fa,()=>{--fa===0&&(e[pa]=null)}}},[]),E(yr.Provider,{value:n,children:t})});function ha(e){return`manager`in e?[{dragDropManager:e.manager},!1]:[ga(e.backend,e.context,e.options,e.debugMode),!e.context]}function ga(e,t=_a(),n,r){let i=t;return i[pa]||(i[pa]={dragDropManager:la(e,t,n,r)}),i[pa]}function _a(){return typeof global<`u`?global:window}var va=n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),ya=typeof window<`u`?Et:Yt,ba=e(va(),1);function xa(e,t,n){let[r,i]=z(()=>t(e)),a=_t(()=>{let a=t(e);(0,ba.default)(r,a)||(i(a),n&&n())},[r,e,n]);return ya(a),[r,a]}function Sa(e,t,n){let[r,i]=xa(e,t,n);return ya(function(){let t=e.getHandlerId();if(t!=null)return e.subscribeToStateChange(i,{handlerIds:[t]})},[e,i]),r}function Ca(e,t,n){return Sa(t,e||(()=>({})),()=>n.reconnect())}function wa(e,t){let n=[...t||[]];return t==null&&typeof e!=`function`&&n.push(e),nn(()=>typeof e==`function`?e():e,n)}function Ta(e){return nn(()=>e.hooks.dragSource(),[e])}function Ea(e){return nn(()=>e.hooks.dragPreview(),[e])}var Da=!1,Oa=!1,ka=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){G(!Da,`You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return Da=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Da=!1}}isDragging(){if(!this.sourceId)return!1;G(!Oa,`You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return Oa=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Oa=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}},Aa=!1,ja=class{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;G(!Aa,`You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor`);try{return Aa=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Aa=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}};function Ma(e,t,n){let r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function Na(e,t,n){let r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function Pa(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;let s=Object.prototype.hasOwnProperty.bind(t);for(let o=0;o<a.length;o++){let c=a[o];if(!s(c))return!1;let l=e[c],u=t[c];if(i=n?n.call(r,l,u,c):void 0,i===!1||i===void 0&&l!==u)return!1}return!0}function Fa(e){return typeof e==`object`&&!!e&&Object.prototype.hasOwnProperty.call(e,`current`)}function Ia(e){if(typeof e.type==`string`)return;let t=e.type.displayName||e.type.name||`the component`;throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function La(e){return(t=null,n=null)=>{if(!ut(t)){let r=t;return e(r,n),r}let r=t;return Ia(r),Ba(r,n?t=>e(t,n):e)}}function Ra(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];if(n.endsWith(`Ref`))t[n]=e[n];else{let e=La(r);t[n]=()=>e}}),t}function za(e,t){typeof e==`function`?e(t):e.current=t}function Ba(e,t){let n=e.ref;return G(typeof n!=`string`,`Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs`),n?He(e,{ref:e=>{za(n,e),za(t,e)}}):He(e,{ref:t})}var Va=class{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){let e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){let e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){let t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Pa(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Pa(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&=(this.dragSourceUnsubscribe(),void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Ra({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,Fa(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,Fa(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}},Ha=class{get connectTarget(){return this.dropTarget}reconnect(){let e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();let t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Pa(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&=(this.unsubscribeDropTarget(),void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Ra({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,Fa(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}};function Ua(){let{dragDropManager:e}=Je(yr);return G(e!=null,`Expected drag drop context`),e}function Wa(e,t){let n=Ua(),r=nn(()=>new Va(n.getBackend()),[n]);return ya(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),ya(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function Ga(){let e=Ua();return nn(()=>new ka(e),[e])}var Ka=class{beginDrag(){let e=this.spec,t=this.monitor,n=null;return n=typeof e.item==`object`?e.item:typeof e.item==`function`?e.item(t):{},n??null}canDrag(){let e=this.spec,t=this.monitor;return typeof e.canDrag==`boolean`?e.canDrag:typeof e.canDrag!=`function`||e.canDrag(t)}isDragging(e,t){let n=this.spec,r=this.monitor,{isDragging:i}=n;return i?i(r):t===e.getSourceId()}endDrag(){let e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}};function qa(e,t,n){let r=nn(()=>new Ka(e,t,n),[t,n]);return Yt(()=>{r.spec=e},[e]),r}function Ja(e){return nn(()=>{let t=e.type;return G(t!=null,`spec.type must be defined`),t},[e])}function Ya(e,t,n){let r=Ua(),i=qa(e,t,n),a=Ja(e);ya(function(){if(a!=null){let[e,o]=Na(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o}},[r,t,n,i,a])}function Xa(e,t){let n=wa(e,t);G(!n.begin,`useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)`);let r=Ga(),i=Wa(n.options,n.previewOptions);return Ya(n,r,i),[Ca(n.collect,r,i),Ta(i),Ea(i)]}function Za(e){let t=Ua().getMonitor(),[n,r]=xa(t,e);return Yt(()=>t.subscribeToOffsetChange(r)),Yt(()=>t.subscribeToStateChange(r)),n}function Qa(e){return nn(()=>e.hooks.dropTarget(),[e])}function $a(e){let t=Ua(),n=nn(()=>new Ha(t.getBackend()),[t]);return ya(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function eo(){let e=Ua();return nn(()=>new ja(e),[e])}function to(e){let{accept:t}=e;return nn(()=>(G(e.accept!=null,`accept must be defined`),Array.isArray(t)?t:[t]),[t])}var no=class{canDrop(){let e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){let e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){let e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}};function ro(e,t){let n=nn(()=>new no(e,t),[t]);return Yt(()=>{n.spec=e},[e]),n}function io(e,t,n){let r=Ua(),i=ro(e,t),a=to(e);ya(function(){let[e,o]=Ma(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o},[r,t,i,n,a.map(e=>e.toString()).join(`|`)])}function ao(e,t){let n=wa(e,t),r=eo(),i=$a(n.options);return io(n,r,i),[Ca(n.collect,r,i),Qa(i)]}function oo(e){let t=null;return()=>(t??=e(),t)}function so(e,t){return e.filter(e=>e!==t)}function co(e,t){let n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);let i=[];return n.forEach(e=>i.push(e)),i}var lo=class{enter(e){let t=this.entered.length,n=t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e));return this.entered=co(this.entered.filter(n),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=so(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},uo=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(n=>{let r=this.config.exposeProperties[n];r!=null&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},fo=t({FILE:()=>po,HTML:()=>go,TEXT:()=>ho,URL:()=>mo}),po=`__NATIVE_FILE__`,mo=`__NATIVE_URL__`,ho=`__NATIVE_TEXT__`,go=`__NATIVE_HTML__`;function _o(e,t,n){return t.reduce((t,n)=>t||e.getData(n),``)??n}var vo={[po]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:[`Files`]},[go]:{exposeProperties:{html:(e,t)=>_o(e,t,``),dataTransfer:e=>e},matchesTypes:[`Html`,`text/html`]},[mo]:{exposeProperties:{urls:(e,t)=>_o(e,t,``).split(`
3
3
  `),dataTransfer:e=>e},matchesTypes:[`Url`,`text/uri-list`]},[ho]:{exposeProperties:{text:(e,t)=>_o(e,t,``),dataTransfer:e=>e},matchesTypes:[`Text`,`text/plain`]}};function yo(e,t){let n=vo[e];if(!n)throw Error(`native type ${e} has no configuration`);let r=new uo(n);return r.loadDataTransfer(t),r}function bo(e){if(!e)return null;let t=Array.prototype.slice.call(e.types||[]);return Object.keys(vo).filter(e=>{let n=vo[e];return n!=null&&n.matchesTypes?n.matchesTypes.some(e=>t.indexOf(e)>-1):!1})[0]||null}var xo=oo(()=>/firefox/i.test(navigator.userAgent)),So=oo(()=>!!window.safari),Co=class{interpolate(e){let{xs:t,ys:n,c1s:r,c2s:i,c3s:a}=this,o=t.length-1;if(e===t[o])return n[o];let s=0,c=a.length-1,l;for(;s<=c;){l=Math.floor(.5*(s+c));let r=t[l];if(r<e)s=l+1;else if(r>e)c=l-1;else return n[l]}o=Math.max(0,c);let u=e-t[o],d=u*u;return n[o]+r[o]*u+i[o]*d+a[o]*u*d}constructor(e,t){let{length:n}=e,r=[];for(let e=0;e<n;e++)r.push(e);r.sort((t,n)=>e[t]<e[n]?-1:1);let i=[],a=[],o=[],s,c;for(let r=0;r<n-1;r++)s=e[r+1]-e[r],c=t[r+1]-t[r],a.push(s),i.push(c),o.push(c/s);let l=[o[0]];for(let e=0;e<a.length-1;e++){let t=o[e],n=o[e+1];if(t*n<=0)l.push(0);else{s=a[e];let r=a[e+1],i=s+r;l.push(3*i/((i+r)/t+(i+s)/n))}}l.push(o[o.length-1]);let u=[],d=[],f;for(let e=0;e<l.length-1;e++){f=o[e];let t=l[e],n=1/a[e],r=t+l[e+1]-f-f;u.push((f-t-r)*n),d.push(r*n*n)}this.xs=e,this.ys=t,this.c1s=l,this.c2s=u,this.c3s=d}},wo=1;function To(e){let t=e.nodeType===wo?e:e.parentElement;if(!t)return null;let{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Eo(e){return{x:e.clientX,y:e.clientY}}function Do(e){var t;return e.nodeName===`IMG`&&(xo()||!((t=document.documentElement)!=null&&t.contains(e)))}function Oo(e,t,n,r){let i=e?t.width:n,a=e?t.height:r;return So()&&e&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function ko(e,t,n,r,i){let a=Do(t),o=To(a?e:t),s={x:n.x-o.x,y:n.y-o.y},{offsetWidth:c,offsetHeight:l}=e,{anchorX:u,anchorY:d}=r,{dragPreviewWidth:f,dragPreviewHeight:p}=Oo(a,t,c,l),m=()=>{let e=new Co([0,.5,1],[s.y,s.y/l*p,s.y+p-l]).interpolate(d);return So()&&a&&(e+=(window.devicePixelRatio-1)*p),e},h=()=>new Co([0,.5,1],[s.x,s.x/c*f,s.x+f-c]).interpolate(u),{offsetX:g,offsetY:_}=i,v=g===0||g,y=_===0||_;return{x:v?g:h(),y:y?_:m()}}var Ao=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<`u`)return window}get document(){var e;if((e=this.globalContext)!=null&&e.document)return this.globalContext.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.optionsArgs)==null?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function jo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){jo(e,t,n[t])})}return e}var q=class{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)==null?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((t=this.dragOverTargetIds)==null?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){let e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw Error(`Cannot have two HTML5 backends at the same time.`);e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){let e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var t;(t=this.window)==null||t.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);let r=t=>this.handleDragStart(t,e),i=e=>this.handleSelectStart(e);return t.setAttribute(`draggable`,`true`),t.addEventListener(`dragstart`,r),t.addEventListener(`selectstart`,i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener(`dragstart`,r),t.removeEventListener(`selectstart`,i),t.setAttribute(`draggable`,`false`)}}connectDropTarget(e,t){let n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),i=t=>this.handleDrop(t,e);return t.addEventListener(`dragenter`,n),t.addEventListener(`dragover`,r),t.addEventListener(`drop`,i),()=>{t.removeEventListener(`dragenter`,n),t.removeEventListener(`dragover`,r),t.removeEventListener(`drop`,i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener(`dragstart`,this.handleTopDragStart),e.addEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.addEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.addEventListener(`dragenter`,this.handleTopDragEnter),e.addEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.addEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.addEventListener(`dragover`,this.handleTopDragOver),e.addEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.addEventListener(`drop`,this.handleTopDrop),e.addEventListener(`drop`,this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener(`dragstart`,this.handleTopDragStart),e.removeEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.removeEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.removeEventListener(`dragenter`,this.handleTopDragEnter),e.removeEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.removeEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.removeEventListener(`dragover`,this.handleTopDragOver),e.removeEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.removeEventListener(`drop`,this.handleTopDrop),e.removeEventListener(`drop`,this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){let e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Mo({dropEffect:this.altKeyPressed?`copy`:`move`},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?`copy`:this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){let e=this.monitor.getSourceId();return Mo({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){let e=this.monitor.getItemType();return Object.keys(fo).some(t=>fo[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=yo(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return(e=this.rootElement)==null?void 0:e.addEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)==null||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||=[],this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{let t=this.sourceNodes.get(e);return t&&To(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>!!(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{let e=this.currentDragSourceNode;e==null||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{this.hoverRafId===null&&typeof requestAnimationFrame<`u`&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<`u`&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;let{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;let n=Eo(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});let{dataTransfer:r}=e,i=bo(r);if(this.monitor.isDragging()){if(r&&typeof r.setDragImage==`function`){let e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),i=this.sourcePreviewNodes.get(e)||t;if(i){let{anchorX:e,anchorY:a,offsetX:o,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c=ko(t,i,n,{anchorX:e,anchorY:a},{offsetX:o,offsetY:s});r.setDragImage(i,c.x,c.y)}}try{r==null||r.setData(`application/json`,{})}catch{}this.setCurrentDragSourceNode(e.target);let{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(i)this.beginDragNativeItem(i);else if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute(`draggable`)))return;else e.preventDefault()},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;let{dataTransfer:n}=e,r=bo(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{let{dragEnterTargetIds:t}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:Eo(e)}),t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=e=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}},this.handleTopDragOver=e=>{let{dragOverTargetIds:t}=this;this.dragOverTargetIds=[],this.monitor.isDragging()?(this.altKeyPressed=e.altKey,this.lastClientOffset=Eo(e),this.scheduleHover(t),(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`))):(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault(),this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var t;e.preventDefault(),(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}else bo(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{let{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:Eo(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{let t=e.target;typeof t.dragDrop==`function`&&(t.tagName===`INPUT`||t.tagName===`SELECT`||t.tagName===`TEXTAREA`||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new Ao(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new lo(this.isNodeInDocument)}},No;function Po(){return No||(No=new Image,No.src=`data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==`),No}var Fo=function(e,t,n){return new q(e,t,n)},Io;(function(e){e.mouse=`mouse`,e.touch=`touch`,e.keyboard=`keyboard`})(Io||={});var Lo=class{get delay(){return this.args.delay??0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){return this.args.ignoreContextMenu??!1}get enableHoverOutsideTarget(){return this.args.enableHoverOutsideTarget??!1}get enableKeyboardEvents(){return this.args.enableKeyboardEvents??!1}get enableMouseEvents(){return this.args.enableMouseEvents??!1}get enableTouchEvents(){return this.args.enableTouchEvents??!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var e,t;return((e=this.args)==null?void 0:e.delayTouchStart)??((t=this.args)==null?void 0:t.delay)??0}get delayMouseStart(){var e,t;return((e=this.args)==null?void 0:e.delayMouseStart)??((t=this.args)==null?void 0:t.delay)??0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<`u`)return window}get document(){var e;if((e=this.context)!=null&&e.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.args)==null?void 0:e.rootElement)||this.document}constructor(e,t){this.args=e,this.context=t}};function Ro(e,t,n,r){return Math.sqrt(Math.abs(n-e)**2+Math.abs(r-t)**2)}function zo(e,t,n,r,i){if(!i)return!1;let a=Math.atan2(r-t,n-e)*180/Math.PI+180;for(let e=0;e<i.length;++e){let t=i[e];if(t&&(t.start==null||a>=t.start)&&(t.end==null||a<=t.end))return!0}return!1}var Bo={Left:1,Right:2,Center:4},Vo={Left:0,Center:1,Right:2};function Ho(e){return e.button===void 0||e.button===Vo.Left}function Uo(e){return e.buttons===void 0||(e.buttons&Bo.Left)===0}function Wo(e){return!!e.targetTouches}var Go=1;function Ko(e){let t=e.nodeType===Go?e:e.parentElement;if(!t)return;let{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function qo(e,t){if(e.targetTouches.length===1)return Jo(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return Jo(e.touches[0])}function Jo(e,t){return Wo(e)?qo(e,t):{x:e.clientX,y:e.clientY}}var Yo=(()=>{let e=!1;try{addEventListener(`test`,()=>{},Object.defineProperty({},"passive",{get(){return e=!0,!0}}))}catch{}return e})(),Xo={[Io.mouse]:{start:`mousedown`,move:`mousemove`,end:`mouseup`,contextmenu:`contextmenu`},[Io.touch]:{start:`touchstart`,move:`touchmove`,end:`touchend`},[Io.keyboard]:{keydown:`keydown`}},Zo=class e{profile(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((e=this.dragOverTargetIds)==null?void 0:e.length)||0}}get document(){return this.options.document}setup(){let t=this.options.rootElement;t&&(G(!e.isSetUp,`Cannot have two Touch backends at the same time.`),e.isSetUp=!0,this.addEventListener(t,`start`,this.getTopMoveStartHandler()),this.addEventListener(t,`start`,this.handleTopMoveStartCapture,!0),this.addEventListener(t,`move`,this.handleTopMove),this.addEventListener(t,`move`,this.handleTopMoveCapture,!0),this.addEventListener(t,`end`,this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,`contextmenu`,this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,`keydown`,this.handleCancelOnEscape,!0))}teardown(){let t=this.options.rootElement;t&&(e.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,`start`,this.handleTopMoveStartCapture,!0),this.removeEventListener(t,`start`,this.handleTopMoveStart),this.removeEventListener(t,`move`,this.handleTopMoveCapture,!0),this.removeEventListener(t,`move`,this.handleTopMove),this.removeEventListener(t,`end`,this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,`contextmenu`,this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,`keydown`,this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(e,t,n,r=!1){let i=Yo?{capture:r,passive:!1}:r;this.listenerTypes.forEach(function(r){let a=Xo[r][t];a&&e.addEventListener(a,n,i)})}removeEventListener(e,t,n,r=!1){let i=Yo?{capture:r,passive:!1}:r;this.listenerTypes.forEach(function(r){let a=Xo[r][t];a&&e.removeEventListener(a,n,i)})}connectDragSource(e,t){let n=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,t),this.addEventListener(t,`start`,n),()=>{this.sourceNodes.delete(e),this.removeEventListener(t,`start`,n)}}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDropTarget(e,t){let n=this.options.rootElement;if(!this.document||!n)return()=>{};let r=r=>{if(!this.document||!n||!this.monitor.isDragging())return;let i;switch(r.type){case Xo.mouse.move:i={x:r.clientX,y:r.clientY};break;case Xo.touch.move:var a,o;i={x:((a=r.touches[0])==null?void 0:a.clientX)||0,y:((o=r.touches[0])==null?void 0:o.clientY)||0}}let s=i==null?void 0:this.document.elementFromPoint(i.x,i.y),c=s&&t.contains(s);if(s===t||c)return this.handleMove(r,e)};return this.addEventListener(this.document.body,`move`,r),this.targetNodes.set(e,t),()=>{this.document&&(this.targetNodes.delete(e),this.removeEventListener(this.document.body,`move`,r))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(e){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{e&&!e.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display=`none`,this.draggedSourceNode.removeAttribute(`data-reactid`),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(e,t,n){this.getSourceClientOffset=e=>{let t=this.sourceNodes.get(e);return t&&Ko(t)},this.handleTopMoveStartCapture=e=>{Ho(e)&&(this.moveStartSourceIds=[])},this.handleMoveStart=e=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(e)},this.handleTopMoveStart=e=>{if(!Ho(e))return;let t=Jo(e);t&&(Wo(e)&&(this.lastTargetTouchFallback=e.targetTouches[0]),this._mouseClientOffset=t),this.waitingForDelay=!1},this.handleTopMoveStartDelay=e=>{if(!Ho(e))return;let t=e.type===Xo.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,e),t),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(e,t)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(t)},this.handleTopMove=e=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;let{moveStartSourceIds:t,dragOverTargetIds:n}=this,r=this.options.enableHoverOutsideTarget,i=Jo(e,this.lastTargetTouchFallback);if(!i)return;if(this._isScrolling||!this.monitor.isDragging()&&zo(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,i.x,i.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty(`x`)&&t&&Ro(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,i.x,i.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(t,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;let a=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(a),this.actions.publishDragSource(),e.cancelable&&e.preventDefault();let o=(n||[]).map(e=>this.targetNodes.get(e)).filter(e=>!!e),s=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(i.x,i.y,o):this.document.elementsFromPoint(i.x,i.y),c=[];for(let e in s){if(!s.hasOwnProperty(e))continue;let t=s[e];for(t!=null&&c.push(t);t;)t=t.parentElement,t&&c.indexOf(t)===-1&&c.push(t)}let l=c.filter(e=>o.indexOf(e)>-1).map(e=>this._getDropTargetId(e)).filter(e=>!!e).filter((e,t,n)=>n.indexOf(e)===t);if(r)for(let e in this.targetNodes){let t=this.targetNodes.get(e);if(a&&t&&t.contains(a)&&l.indexOf(e)===-1){l.unshift(e);break}}l.reverse(),this.actions.hover(l,{clientOffset:i})},this._getDropTargetId=e=>{let t=this.targetNodes.keys(),n=t.next();for(;n.done===!1;){let r=n.value;if(e===this.targetNodes.get(r))return r;n=t.next()}},this.handleTopMoveEndCapture=e=>{this._isScrolling=!1,this.lastTargetTouchFallback=void 0,Uo(e)&&(!this.monitor.isDragging()||this.monitor.didDrop()?this.moveStartSourceIds=void 0:(e.cancelable&&e.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()))},this.handleCancelOnEscape=e=>{e.key===`Escape`&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new Lo(n,t),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(Io.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Io.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Io.keyboard)}},Qo=function(e,t={},n={}){return new Zo(e,t,n)},$o=y(E(`path`,{d:`M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z`}),`Update`),es=y(E(`path`,{d:`M19 11h-8v6h8zm4 8V4.98C23 3.88 22.1 3 21 3H3c-1.1 0-2 .88-2 1.98V19c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2m-2 .02H3V4.97h18z`}),`PictureInPictureAlt`),ts=y(E(`path`,{d:`M21.5 14.98c-.02 0-.03 0-.05.01C21.2 13.3 19.76 12 18 12c-1.4 0-2.6.83-3.16 2.02C13.26 14.1 12 15.4 12 17c0 1.66 1.34 3 3 3l6.5-.02c1.38 0 2.5-1.12 2.5-2.5s-1.12-2.5-2.5-2.5M10 4.26v2.09C7.67 7.18 6 9.39 6 12c0 1.77.78 3.34 2 4.44V14h2v6H4v-2h2.73C5.06 16.54 4 14.4 4 12c0-3.73 2.55-6.85 6-7.74M20 6h-2.73c1.43 1.26 2.41 3.01 2.66 5h-2.02c-.23-1.36-.93-2.55-1.91-3.44V10h-2V4h6z`}),`CloudSync`),ns=y(E(`path`,{d:`M10 6.35V4.26c-.8.21-1.55.54-2.23.96l1.46 1.46c.25-.12.5-.24.77-.33m-7.14-.94 2.36 2.36C4.45 8.99 4 10.44 4 12c0 2.21.91 4.2 2.36 5.64L4 20h6v-6l-2.24 2.24C6.68 15.15 6 13.66 6 12c0-1 .25-1.94.68-2.77l8.08 8.08c-.25.13-.5.25-.77.34v2.09c.8-.21 1.55-.54 2.23-.96l2.36 2.36 1.27-1.27L4.14 4.14zM20 4h-6v6l2.24-2.24C17.32 8.85 18 10.34 18 12c0 1-.25 1.94-.68 2.77l1.46 1.46C19.55 15.01 20 13.56 20 12c0-2.21-.91-4.2-2.36-5.64z`}),`SyncDisabled`),rs=y(E(`path`,{d:`M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z`}),`Notifications`),is=y(E(`path`,{d:`m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z`}),`Logout`);x();var as={message:{position:`relative`,display:`block`,width:`100%`},offline:{position:`relative`,justifyContent:`space-between`,display:`flex`,width:`100%`,alignItems:`center`,opacity:.7,"@media screen and (max-width: 550px)":{flexWrap:`wrap`}},timestamp:{color:`text.secondary`,position:`absolute`,top:5,right:25,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}},simpleMessage:{fontFamily:`monospace`,fontSize:14,ml:`20px`,mb:`10px`,width:`100%`,display:`block`,whiteSpace:`pre-wrap`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`,ml:0}}},os={alert:0,notify:1,info:2};function ss(e){return e===`notify`||e===`info`?e:`alert`}function cs(e,t){return os[ss(e)]-os[ss(t)]}var ls=class extends Qt{constructor(e){super(e),M(this,`lastAlive`,0),M(this,`onAliveChanged`,(e,t)=>{if(e===`${this.props.instanceId}.alive`&&t&&this.state.alive!==!!t.val){if(t.val){if(this.lastAlive&&Date.now()-this.lastAlive<500)return;this.lastAlive=Date.now()}this.setState({alive:!!t.val},()=>this.getGui())}}),this.state={alive:!1,data:{},schema:null,updateData:0}}async componentDidMount(){var e;if((e=this.props.message.contextData)!=null&&(e=e.admin)!=null&&e.notification){let e=await this.props.socket.getState(`${this.props.instanceId}.alive`);this.lastAlive=e!=null&&e.val?Date.now():0,this.setState({alive:!!(e!=null&&e.val)},()=>this.getGui()),await this.props.socket.subscribeState(`${this.props.instanceId}.alive`,this.onAliveChanged)}}getGui(){var e;if(this.state.alive&&(e=this.props.message.contextData)!=null&&(e=e.admin)!=null&&e.notification){var t;let e=JSON.parse(JSON.stringify((t=this.props.message.contextData)==null||(t=t.admin)==null?void 0:t.notification));e.offlineMessage&&delete e.offlineMessage,this.props.socket.sendTo(this.props.instanceId.replace(`system.adapter.`,``),`admin:getNotificationSchema`,e).then(e=>{e&&this.setState({schema:e.schema,data:e.data||this.state.data,updateData:this.state.updateData+1})})}}renderCustomGui(){if(!this.state.schema||!this.state.data||!this.state.alive){var e;let t=(e=this.props.message.contextData)==null||(e=e.admin)==null?void 0:e.notification;if(t){if(!this.state.alive){let e=t.offlineMessage;if(e){let t=typeof e==`string`?e:e[this.props.socket.systemLang]||e.en;return E(I,{sx:as.offline,children:Ne.renderTextWithA(t)})}return E(R,{children:j.t(`Instance is not alive`)})}return E(Ie,{})}return null}let[,,t,n]=this.props.instanceId.split(`.`);return N(je,{children:[this.state.error&&E(`div`,{style:{color:`red`},children:this.state.error}),E(se,{style:{width:`100%`},updateData:this.state.updateData,socket:this.props.socket,adapterName:t,instance:parseInt(n,10),schema:this.state.schema,data:this.state.data,onError:e=>this.setState({error:e}),onChange:e=>this.setState({data:e||{}}),onBackEndCommand:e=>{e&&(e.schema&&this.setState({schema:e.schema,data:e.data||this.state.data}),(e.command===`refresh`||e.refresh)&&this.getGui(),e.command===`link`&&this.props.onLink(e))},embedded:!0,themeName:this.props.themeName,themeType:this.props.themeType,theme:this.props.theme,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat,AceEditor:lr})]})}renderSimpleMessage(){return this.props.message.message?E(I,{sx:as.simpleMessage,children:Ne.renderTextWithA(this.props.message.message)}):null}render(){return N(R,{component:`div`,sx:as.message,children:[E(I,{sx:as.timestamp,children:new Date(this.props.message.ts).toLocaleString()}),this.renderSimpleMessage(),this.renderCustomGui()]})}},us={root:e=>({backgroundColor:e.palette.background.paper,width:`100%`,height:`auto`,display:`flex`,borderRadius:`4px`,flexDirection:`column`}),paper:{maxWidth:1e3,width:`100%`},flex:{display:`flex`},overflowHidden:{overflow:`hidden`},overflowAuto:{overflowY:`auto`},column:{flexDirection:`column`},headerText:e=>({fontWeight:`bold`,fontSize:20,color:e.palette.mode===`dark`?`#DDD`:`#111`}),descriptionHeaderText:e=>({margin:`18px 0`,color:e.palette.mode===`dark`?`#CCC`:`#222`}),button:{paddingTop:5,paddingBottom:5,position:`sticky`,bottom:0,zIndex:3},img2:{width:25,height:25,margin:`auto 0`,mr:`10px`,position:`relative`,"&:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`}},heading:{display:`flex`,alignItems:`center`,overflow:`hidden`,width:`100%`},headingTop:{display:`flex`,alignItems:`center`},classNameBox:{p:`8px`,"@media screen and (max-width: 550px)":{p:`4px`}},textStyle:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}},content:{overflow:`hidden`},buttonStyle:{m:`3px`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}}};function ds({severity:e,isDark:t,...n}){return e=ss(e),e===`notify`?E(rs,{color:t?`primary`:`secondary`,...n}):e===`info`?E(lt,{color:`info`,...n}):E(Pt,{style:{color:`#ffca00`},...n})}function fs(e){return{id:`scrollable-force-tab-${e}`,"aria-controls":`scrollable-force-tabpanel-${e}`}}var ps=({children:e,index:t,sxBox:n,style:r})=>E(`div`,{role:`tabpanel`,id:`scrollable-force-tabpanel-${t}`,"aria-labelledby":`scrollable-force-tab-${t}`,style:r,children:E(I,{sx:n,children:E(R,{component:`div`,children:e})})});function ms(e,t=``){return e?typeof e==`string`?e:e[j.getLanguage()]||e.en||t:t}function hs(e,t,n){let r,i=``;e.url?e.url.toString().startsWith(`#`)||e.url.toString().startsWith(`/`)?(r=e.target||`_self`,i=e.url):e.url.startsWith(`http://`)||e.url.startsWith(`https://`)?(r=e.target||`_blank`,i=e.url):(i=`#tab-instances/config/${t}/${e.url}`,r=e.target||`_self`):(i=`#tab-instances/config/${t}`,r=e.target||`_self`),r===`_self`?(setTimeout(e=>{e.startsWith(`#`)?window.location.hash=e:e.startsWith(`/`)?i=`${window.location.protocol}:${window.location.host}${i}`:(e.startsWith(`http://`)||e.startsWith(`https://`))&&(window.location.href=e)},100,i),e.close&&typeof n==`function`&&n()):(i.startsWith(`#`)?i=`${window.location.protocol}:${window.location.host}${window.location.pathname}${i}`:i.startsWith(`/`)&&(i=`${window.location.protocol}:${window.location.host}${i}`),window.open(i,r))}var gs=({notifications:e,onClose:t,ackCallback:n,dateFormat:r,themeType:i,instances:a,themeName:o,theme:s,isFloatComma:c,socket:d})=>{let[f,p]=z(``),[m,h]=z([]),[g,_]=z(``),[v,y]=z(!0),b=(e,t)=>{y(!0),p(t),_(``)},x=e=>(t,n)=>_(n?e:``),ee=i===`dark`,S=!!Object.values(a).find(e=>e.common.name===`notification-manager`),C=nn(()=>{let t={};for(let[n,r]of Object.entries(e))for(let[e,i]of Object.entries(r.result))if(e!==`system`)for(let[r,a]of Object.entries(i.categories))t[e]=t[e]||{},t[e][r]={...a,host:n};return t},[e]),w=nn(()=>Object.keys(C).flatMap(e=>Object.keys(C[e]).map(t=>({scope:e,name:t,entry:C[e][t]}))).sort((e,t)=>cs(e.entry.severity,t.entry.severity)),[C]),T=w.length?`${w[0].scope}--${w[0].name}`:``,te=f;if(!te)te=T;else{let[e,t]=te.split(`--`);if(!C[e])te=T;else if(!C[e][t]){let t=Object.keys(C[e])[0];te=t?`${e}--${t}`:T}}let[D,ne]=te.split(`--`),ie=D&&ne?`${D}--${ne}`:``,O=D&&ne?C[D][ne]:null;return N(u,{onClose:()=>t(),open:!0,sx:{"& .MuiDialog-paper":us.paper},children:[N(`h2`,{style:us.headingTop,children:[E(rs,{sx:{color:`primary.main`},style:{fontSize:36,marginLeft:25,marginRight:10}}),j.t(`Notifications`),S?null:E(Lt,{sx:{position:`absolute`,right:24,color:`text.primary`},title:j.t(`Tip: Use the "notification-manager" adapter to receive notifications automatically via messaging adapters.`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:E(lt,{})})]}),E(ce,{style:{...us.flex,...us.overflowHidden},dividers:!0,children:N(I,{component:`div`,sx:us.root,children:[E(yt,{position:`static`,color:`default`,children:E(Xt,{value:te,onChange:b,variant:`scrollable`,scrollButtons:!0,indicatorColor:ee?`primary`:`secondary`,textColor:ee?`primary`:`secondary`,children:w.map(({scope:e,name:t,entry:n},r)=>{let i=`${e}--${t}`;return E(ve,{disabled:m.includes(i),value:i,label:ms(n.name,t),icon:E(ds,{severity:n.severity,isDark:ee}),...fs(r)},i)})})}),O?N(ps,{sxBox:us.classNameBox,style:{...us.overflowAuto,color:ee?`black`:void 0},index:te,children:[E(I,{component:`div`,sx:us.headerText,style:{fontWeight:`bold`},children:ms(O.name,ne)}),E(I,{component:`div`,sx:us.descriptionHeaderText,children:ms(O.description)}),E(`div`,{children:O.instances?Object.keys(O.instances).map(e=>{let n=`${te}--${e}`;v&&(x(n)(``,!0),y(!1));let u=a&&a[e],f=u&&un(u)||`img/no-image.svg`;return N(Bt,{style:ee?void 0:{backgroundColor:`#c0c0c052`},expanded:g===n,onChange:x(n),children:[E(re,{expandIcon:E(l,{}),sx:{"& .MuiAccordionSummary-content":us.content},"aria-controls":`panel1bh-content`,id:`panel1bh-header`,children:N(R,{style:us.heading,children:[E(on,{sx:us.img2,component:`img`,image:f}),E(I,{component:`div`,sx:us.textStyle,style:{marginLeft:8},children:e.replace(/^system\.adapter\./,``)})]})}),E(he,{style:us.column,children:O.instances[e].messages.map((n,a)=>E(ls,{message:n,dateFormat:r,instanceId:e,socket:d,themeType:i,themeName:o,theme:s,isFloatComma:c,onLink:n=>hs(n,e,t)},a))})]},n)}):null})]},`tabPanel-${ne}`):null]})}),N(xt,{children:[D&&ne?E(H,{variant:`contained`,autoFocus:Object.keys(C[D]).length!==1,disabled:m.includes(ie),style:m.includes(ie)?{backgroundColor:`silver`}:void 0,sx:us.buttonStyle,onClick:e=>{e.stopPropagation(),n(C[D][ne].host,ne),h([...m,ie])},color:Object.keys(C[D]).length===1?`grey`:`primary`,startIcon:E(Me,{}),children:j.t(`Acknowledge`)}):null,D&&ne&&Object.keys(C[D]).length===1&&E(H,{variant:`contained`,disabled:m.includes(ie),sx:us.buttonStyle,style:m.includes(ie)?{backgroundColor:`silver`}:void 0,onClick:e=>{e.stopPropagation(),h([...m,ie]),n(C[D][ne].host,ne),t()},startIcon:N(je,{children:[E(Me,{}),E(k,{})]}),color:`primary`,children:j.t(`Acknowledge & close`)}),E(`div`,{style:{flexGrow:1}}),E(H,{id:`notifications-dialog-close`,variant:`contained`,onClick:e=>{e.stopPropagation(),t()},startIcon:E(k,{}),color:`grey`,children:j.t(`Close`)})]})]})};function _s({label:e,compact:t=!1}){return N(`div`,{className:`eos-boot-loader${t?` eos-boot-loader--compact`:``}`,role:`status`,"aria-live":`polite`,"aria-busy":`true`,children:[E(`img`,{className:`eos-boot-loader__logo`,src:`img/eos/nexowatt-eos-brand-wide.png`,width:1200,height:342,alt:`NexoWatt EOS – Energy Operation System`}),E(`span`,{className:`eos-boot-loader__spinner`,"aria-hidden":`true`}),E(`p`,{className:`eos-boot-loader__label`,children:e})]})}var vs=y(E(`path`,{d:`M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2m-7 6-4 4h3v6h2v-6h3z`}),`OpenInBrowser`);x();var ys={log:{height:400,width:860,padding:8,overflowY:`auto`},logNoSpacing:{height:`100%`,width:`calc(100% - 8px)`,marginLeft:8,padding:8,overflowY:`auto`},error:{color:`#f44336`},info:{color:`#2196f3`},warn:{color:`#ffc107`}},bs=class e extends Qt{constructor(t){super(t),M(this,`logRef`,void 0),M(this,`regExp`,void 0),this.state={log:[`$ iobroker ${t.cmd||``}`],init:!1,max:null,value:null,moreChecked:!0,stopped:!1},this.logRef=Ht.createRef(),this.regExp=new RegExp(e.pattern.join(`|`),`i`)}componentDidMount(){this.props.ready&&this.props.cmd&&(console.log(`STARTED: ${this.props.cmd}`),this.executeCommand())}componentDidUpdate(){var e;!this.state.init&&this.props.ready&&this.props.cmd&&this.executeCommand(),this.props.logsRead&&JSON.stringify(this.props.logsRead)!==JSON.stringify(this.state.log)&&this.setState({log:this.props.logsRead}),(e=this.logRef.current)==null||e.scrollIntoView()}executeCommand(){var e;this.setState({init:!0},()=>this.props.onSetCommandRunning&&this.props.onSetCommandRunning(!0)),this.props.socket.registerCmdStdoutHandler((e,t)=>this.cmdStdoutHandler(e,t)),this.props.socket.registerCmdStderrHandler((e,t)=>this.cmdStderrHandler(e,t)),this.props.socket.registerCmdExitHandler((e,t)=>this.cmdExitHandler(e,t));let t=Math.floor(Math.random()*268435454)+1;this.setState({activeCmdId:t});let n=this.props.host.startsWith(`system.host.`)?this.props.host:`system.host.${this.props.host}`;this.props.socket.cmdExec.bind(this.props.socket)(n,this.props.cmd,t,void 0,(e=this.props.files)!=null&&e.length?this.props.files:void 0).catch(e=>console.log(e))}cmdStdoutHandler(e,t){if(this.state.activeCmdId&&this.state.activeCmdId===e){let e=this.state.log.slice();e.push(t);let n=t.match(/^upload \[(\d+)]/),r=n?null:t.match(/^got [-_:/\\.\w\d]+\/admin$/),i=r?null:t.match(/^got [-_:/\\.\w\d]+\/www$/),a=this.state.max,o=null;n?(a||=parseInt(n[1],10),o=parseInt(n[1],10)):(r||i)&&(a=null),this.setState({log:e,max:a,value:o}),console.log(`cmdStdout`)}}cmdStderrHandler(e,t){if(this.state.activeCmdId&&this.state.activeCmdId===e){let n=this.state.log.slice();n.push(t),this.setState({log:n}),console.log(`cmdStderr`),console.log(e),console.log(t)}}cmdExitHandler(e,t){if(this.state.activeCmdId&&this.state.activeCmdId===e){let n=this.state.log.slice();if(!window.document.hidden&&t===0&&n.length&&n[n.length-1].endsWith(`created`)&&this.props.callback){let e=n[n.length-1].split(` `).find(e=>e.startsWith(`system`));e&&setTimeout(e=>{this.props.socket.getObject(e).then(t=>{var n;U.fixAdminUI(t),t&&((n=t.common)==null||(n=n.adminUI)==null?void 0:n.config)!==`none`&&d.doNavigate(`tab-instances`,`config`,e)})},1e3,e)}n.push(`${t===0?``:`ERROR: `}Process exited with code ${t}`),this.setState({log:n,stopped:!0},()=>{this.props.onSetCommandRunning&&this.props.onSetCommandRunning(!1),t!==0||this.state.log[this.state.log.length-1].toLowerCase().includes(`error`)?this.props.errorFunc&&this.props.errorFunc(t,this.state.log):(this.props.performed&&this.props.performed(),this.props.onFinished(t,this.state.log)),console.log(`cmdExit`),console.log(e),console.log(t),typeof this.props.callback==`function`&&this.props.callback(t)})}}colorize(e,t){t&&(e=e.substring(0,t));let n=U.parseColorMessage(e);if(typeof n==`object`)return n.parts.map((e,t)=>E(`span`,{style:e.style,children:e.text},t));if(e.search(this.regExp)!==-1){let t=[];for(;e.search(this.regExp)>=0;){let[n]=e.match(this.regExp)||[``],r=e.search(this.regExp);if(r>0){let n=e.substring(0,r),i=U.parseColorMessage(n);t.push(E(`span`,{children:typeof i==`object`?i.parts.map((e,t)=>E(`span`,{style:e.style,children:e.text},t)):i},t.length)),e=e.replace(n,``)}let i=e.substring(0,n.length);if(i){let r=U.parseColorMessage(i);t.push(E(`span`,{style:ys[n.toLowerCase()],children:typeof r==`object`?r.parts.map((e,t)=>E(`span`,{style:e.style,children:e.text},t)):r},t.length)),e=e.replace(i,``)}}if(e){let n=U.parseColorMessage(e);t.push(E(`span`,{children:typeof n==`object`?n.parts.map((e,t)=>E(`span`,{style:e.style,children:e.text},t)):n},t.length))}return t}return e}getLog(){return this.state.log.map((e,t)=>{let n=e.startsWith(`$ `);return E(R,{ref:t===this.state.log.length-1?this.logRef:void 0,component:`p`,variant:`body2`,sx:n?e=>({fontWeight:`bold`,backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.06)`,borderRadius:`4px`,py:`2px`,px:`6px`,mx:`-6px`,mb:`6px`}):void 0,children:this.colorize(e)},t)})}render(){return N(P,{style:this.props.noSpacing?{height:`100%`,width:`100%`}:{},container:!0,spacing:this.props.noSpacing?0:2,sx:{flexDirection:`column`},children:[this.props.showElement===void 0||this.props.showElement===!0?E(P,{children:!this.state.stopped&&E(Ie,{style:this.props.commandError?{backgroundColor:`#f44336`}:void 0,variant:this.props.inBackground?`determinate`:`indeterminate`,value:this.state.max&&this.state.value?100-Math.round(this.state.value/this.state.max*100):this.props.commandError?0:100})}):null,N(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:this.props.inBackground?`space-between`:`flex-end`},children:[E(R,{style:this.props.inBackground?{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}:{display:`none`},component:`div`,children:this.colorize(this.state.log[this.state.log.length-1])}),this.props.showElement===void 0||this.props.showElement===!0?N(`div`,{style:{display:`flex`,flexDirection:`row`,alignItems:`center`,justifyContent:`end`,gap:8,flexWrap:`nowrap`},children:[E(I,{style:{whiteSpace:`nowrap`},sx:{"@media (max-width: 600px)":{display:`none`}},children:this.props.t(`less output`)}),E(Ue,{checked:this.state.moreChecked,onChange:e=>this.setState({moreChecked:e.target.checked}),color:`primary`}),E(I,{style:{whiteSpace:`nowrap`},sx:{"@media (max-width: 600px)":{display:`none`}},children:this.props.t(`more output`)})]}):null]}),E(P,{style:this.props.noSpacing?{height:`calc(100% - 45px)`,width:`100%`}:{},children:this.state.moreChecked&&E(Dt,{style:this.props.noSpacing?ys.logNoSpacing:ys.log,children:this.getLog()})})]})}};M(bs,`pattern`,[`error`,`warn`,`info`]),x();var xs={closeButton:e=>({position:`absolute`,right:8,top:8,color:e.palette.grey[500]}),hiddenDialog:{display:`none`},dialogRoot:{height:`calc(100% - 64px)`}},Ss=class extends Qt{constructor(e){super(e),M(this,`paperRef`,Ht.createRef()),M(this,`handleResize`,()=>{this.paperRef.current&&(this.paperRef.current.offsetWidth||0)!==this.state.dialogWidth&&this.setState({dialogWidth:this.paperRef.current.offsetWidth||0})}),this.state={progressText:``,isError:!1,closeOnReady:(window._localStorage||window.localStorage).getItem(`CommandDialog.closeOnReady`)===`true`,dialogWidth:0}}componentDidMount(){window.addEventListener(`resize`,this.handleResize)}componentWillUnmount(){window.removeEventListener(`resize`,this.handleResize)}componentDidUpdate(){var e;if(this.state.dialogWidth!==(((e=this.paperRef.current)==null?void 0:e.offsetWidth)||0)){var t;this.setState({dialogWidth:((t=this.paperRef.current)==null?void 0:t.offsetWidth)||0})}}render(){return N(u,{scroll:`paper`,fullWidth:!0,sx:{"&.MuiDialog-root":this.props.visible?void 0:xs.hiddenDialog,"& .MuiDialog-paper":xs.dialogRoot},onClose:this.props.inBackground?this.props.onClose:this.props.onInBackground,open:!0,maxWidth:`md`,ref:this.paperRef,children:[N(_e,{children:[this.state.progressText||this.props.t(`Running command`),E(A,{size:`large`,sx:xs.closeButton,onClick:this.props.onClose,disabled:this.props.inBackground,children:E(k,{})})]}),E(ce,{dividers:!0,style:{height:`100%`},children:E(bs,{noSpacing:!0,ready:this.props.ready,host:this.props.host,socket:this.props.socket,t:this.props.t,inBackground:this.props.inBackground,commandError:this.props.commandError,errorFunc:()=>{this.setState({isError:!0}),this.props.errorFunc()},performed:this.props.performed,callback:this.props.callback,cmd:this.props.cmd,files:this.props.files,onFinished:()=>this.state.closeOnReady&&this.props.onClose(),onSetCommandRunning:e=>this.props.onSetCommandRunning(e)},`command`)}),N(xt,{style:{justifyContent:`space-between`,gap:8},children:[E(Ae,{style:{marginLeft:16},control:E(Oe,{disabled:this.props.inBackground,checked:this.state.closeOnReady,onChange:e=>{this.setState({closeOnReady:e.target.checked}),(window._localStorage||window.localStorage).setItem(`CommandDialog.closeOnReady`,e.target.checked?`true`:`false`)}}),label:this.props.t(`close on ready`)}),E(`div`,{style:{flexGrow:1}}),E(H,{variant:`contained`,autoFocus:!0,title:this.props.confirmText||this.props.t(`In background`),disabled:this.props.inBackground,onClick:this.props.onInBackground,startIcon:this.state.dialogWidth>600?E(vs,{}):null,color:`primary`,children:this.state.dialogWidth<=600?E(vs,{}):this.props.confirmText||this.props.t(`In background`)}),E(H,{variant:`contained`,disabled:!this.props.inBackground,onClick:this.props.onClose,color:`grey`,style:{backgroundColor:this.state.isError?`#834141`:void 0,color:this.state.isError?`#fff`:void 0},startIcon:this.state.dialogWidth>600?E(k,{}):null,children:this.state.dialogWidth<=600?E(k,{}):this.props.t(`Close`)})]})]})}},Cs=y(E(`path`,{d:`M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z`}),`ChevronLeft`),ws=y(E(`path`,{d:`M11 21H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h6zm2 0h6c1.1 0 2-.9 2-2v-7h-8zm8-11V5c0-1.1-.9-2-2-2h-6v7z`}),`SpaceDashboard`),Ts=y(E(`path`,{d:`M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1m-1 9h-4v-7h4z`}),`Devices`),Es=y(E(`path`,{d:`M8.4 18.2c.38.5.6 1.12.6 1.8 0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3c.44 0 .85.09 1.23.26l1.41-1.77c-.92-1.03-1.29-2.39-1.09-3.69l-2.03-.68c-.54.83-1.46 1.38-2.52 1.38-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3c0 .07 0 .14-.01.21l2.03.68c.64-1.21 1.82-2.09 3.22-2.32V5.91C9.96 5.57 9 4.4 9 3c0-1.66 1.34-3 3-3s3 1.34 3 3c0 1.4-.96 2.57-2.25 2.91v2.16c1.4.23 2.58 1.11 3.22 2.32L18 9.71V9.5c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3c-1.06 0-1.98-.55-2.52-1.37l-2.03.68c.2 1.29-.16 2.65-1.09 3.69l1.41 1.77Q17.34 17 18 17c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3c0-.68.22-1.3.6-1.8l-1.41-1.77c-1.35.75-3.01.76-4.37 0z`}),`Hub`),Ds=y(E(`path`,{d:`M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z`}),`Backup`),Os=y(E(`path`,{d:`M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z`}),`Https`),ks=y(E(`path`,{d:`M19 3H4.99c-1.11 0-1.98.9-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19zm-3-5h-2V7h-4v3H8l4 4z`}),`MoveToInbox`);function As(e,t){if(!e||t===void 0)return null;typeof t!=`object`&&(t=t.split(`.`));let n=t.shift(),r=n===void 0?void 0:e[n];return t.length?typeof r==`object`?As(r,t):null:r}function js(e){let{config:t,children:n,name:r,value:i}=e;return i===void 0?!t||As(t,r)!==!1?n:null:i===!1?null:n}var Ms=e(n(((e,t,n)=>{(function(){var n,r=`Expected a function`,i=`__lodash_hash_undefined__`,a=`__lodash_placeholder__`,o=1,s=2,c=8,l=16,u=32,d=64,f=128,p=256,m=512,h=1/0,g=9007199254740991,_=17976931348623157e292,v=NaN,y=4294967295,b=y-1,x=y>>>1,ee=[[`ary`,f],[`bind`,o],[`bindKey`,s],[`curry`,c],[`curryRight`,l],[`flip`,m],[`partial`,u],[`partialRight`,d],[`rearg`,p]],S=`[object Arguments]`,C=`[object Array]`,w=`[object AsyncFunction]`,T=`[object Boolean]`,te=`[object Date]`,E=`[object DOMException]`,D=`[object Error]`,ne=`[object Function]`,re=`[object GeneratorFunction]`,ie=`[object Map]`,O=`[object Number]`,k=`[object Null]`,A=`[object Object]`,ae=`[object Promise]`,oe=`[object Proxy]`,se=`[object RegExp]`,ce=`[object Set]`,le=`[object String]`,ue=`[object Symbol]`,de=`[object Undefined]`,fe=`[object WeakMap]`,pe=`[object WeakSet]`,me=`[object ArrayBuffer]`,he=`[object DataView]`,ge=`[object Float32Array]`,_e=`[object Float64Array]`,ve=`[object Int8Array]`,ye=`[object Int16Array]`,be=`[object Int32Array]`,xe=`[object Uint8Array]`,Se=`[object Uint8ClampedArray]`,Ce=`[object Uint16Array]`,we=`[object Uint32Array]`,Te=/\b__p \+= '';/g,Ee=/\b(__p \+=) '' \+/g,De=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Oe=/&(?:amp|lt|gt|quot|#39);/g,j=/[&<>"']/g,M=RegExp(Oe.source),ke=RegExp(j.source),N=/<%-([\s\S]+?)%>/g,Ae=/<%([\s\S]+?)%>/g,je=/<%=([\s\S]+?)%>/g,Me=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,P=/^\w*$/,Ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pe=/[\\^$.*+?()[\]{}|]/g,Fe=RegExp(Pe.source),Ie=/^\s+/,Le=/\s/,Re=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ze=/\{\n\/\* \[wrapped with (.+)\] \*/,Be=/,? & /,Ve=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,He=/[()=,{}\[\]\/\s]/,Ue=/\\(\\)?/g,We=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ge=/\w*$/,Ke=/^[-+]0x[0-9a-f]+$/i,qe=/^0b[01]+$/i,Je=/^\[object .+?Constructor\]$/,Ye=/^0o[0-7]+$/i,Xe=/^(?:0|[1-9]\d*)$/,Ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,$e=/['\n\r\u2028\u2029\\]/g,et=`\\ud800-\\udfff`,tt=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,nt=`\\u2700-\\u27bf`,rt=`a-z\\xdf-\\xf6\\xf8-\\xff`,it=`\\xac\\xb1\\xd7\\xf7`,at=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,ot=`\\u2000-\\u206f`,st=` \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000`,ct=`A-Z\\xc0-\\xd6\\xd8-\\xde`,lt=`\\ufe0e\\ufe0f`,ut=it+at+ot+st,dt=`['’]`,F=`[`+et+`]`,ft=`[`+ut+`]`,pt=`[`+tt+`]`,mt=`\\d+`,ht=`[`+nt+`]`,I=`[`+rt+`]`,gt=`[^`+et+ut+mt+nt+rt+ct+`]`,_t=`\\ud83c[\\udffb-\\udfff]`,vt=`(?:`+pt+`|`+_t+`)`,yt=`[^`+et+`]`,bt=`(?:\\ud83c[\\udde6-\\uddff]){2}`,xt=`[\\ud800-\\udbff][\\udc00-\\udfff]`,St=`[`+ct+`]`,Ct=`\\u200d`,wt=`(?:`+I+`|`+gt+`)`,Tt=`(?:`+St+`|`+gt+`)`,Et=`(?:`+dt+`(?:d|ll|m|re|s|t|ve))?`,L=`(?:`+dt+`(?:D|LL|M|RE|S|T|VE))?`,Dt=vt+`?`,R=`[`+lt+`]?`,Ot=`(?:`+Ct+`(?:`+[yt,bt,xt].join(`|`)+`)`+R+Dt+`)*`,kt=`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,At=`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,jt=R+Dt+Ot,Mt=`(?:`+[ht,bt,xt].join(`|`)+`)`+jt,Nt=`(?:`+[yt+pt+`?`,pt,bt,xt,F].join(`|`)+`)`,Pt=RegExp(dt,`g`),Ft=RegExp(pt,`g`),It=RegExp(_t+`(?=`+_t+`)|`+Nt+jt,`g`),z=RegExp([St+`?`+I+`+`+Et+`(?=`+[ft,St,`$`].join(`|`)+`)`,Tt+`+`+L+`(?=`+[ft,St+wt,`$`].join(`|`)+`)`,St+`?`+wt+`+`+Et,St+`+`+L,At,kt,mt,Mt].join(`|`),`g`),Lt=RegExp(`[`+Ct+et+tt+lt+`]`),Rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zt=`Array.Buffer.DataView.Date.Error.Float32Array.Float64Array.Function.Int8Array.Int16Array.Int32Array.Map.Math.Object.Promise.RegExp.Set.String.Symbol.TypeError.Uint8Array.Uint8ClampedArray.Uint16Array.Uint32Array.WeakMap._.clearTimeout.isFinite.parseInt.setTimeout`.split(`.`),Bt=-1,Vt={};Vt[ge]=Vt[_e]=Vt[ve]=Vt[ye]=Vt[be]=Vt[xe]=Vt[Se]=Vt[Ce]=Vt[we]=!0,Vt[S]=Vt[C]=Vt[me]=Vt[T]=Vt[he]=Vt[te]=Vt[D]=Vt[ne]=Vt[ie]=Vt[O]=Vt[A]=Vt[se]=Vt[ce]=Vt[le]=Vt[fe]=!1;var B={};B[S]=B[C]=B[me]=B[he]=B[T]=B[te]=B[ge]=B[_e]=B[ve]=B[ye]=B[be]=B[ie]=B[O]=B[A]=B[se]=B[ce]=B[le]=B[ue]=B[xe]=B[Se]=B[Ce]=B[we]=!0,B[D]=B[ne]=B[fe]=!1;var Ht={À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,Ç:`C`,ç:`c`,Ð:`D`,ð:`d`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,è:`e`,é:`e`,ê:`e`,ë:`e`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,ì:`i`,í:`i`,î:`i`,ï:`i`,Ñ:`N`,ñ:`n`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,ò:`o`,ó:`o`,ô:`o`,õ:`o`,ö:`o`,ø:`o`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,ù:`u`,ú:`u`,û:`u`,ü:`u`,Ý:`Y`,ý:`y`,ÿ:`y`,Æ:`Ae`,æ:`ae`,Þ:`Th`,þ:`th`,ß:`ss`,Ā:`A`,Ă:`A`,Ą:`A`,ā:`a`,ă:`a`,ą:`a`,Ć:`C`,Ĉ:`C`,Ċ:`C`,Č:`C`,ć:`c`,ĉ:`c`,ċ:`c`,č:`c`,Ď:`D`,Đ:`D`,ď:`d`,đ:`d`,Ē:`E`,Ĕ:`E`,Ė:`E`,Ę:`E`,Ě:`E`,ē:`e`,ĕ:`e`,ė:`e`,ę:`e`,ě:`e`,Ĝ:`G`,Ğ:`G`,Ġ:`G`,Ģ:`G`,ĝ:`g`,ğ:`g`,ġ:`g`,ģ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ī:`I`,Ĭ:`I`,Į:`I`,İ:`I`,ĩ:`i`,ī:`i`,ĭ:`i`,į:`i`,ı:`i`,Ĵ:`J`,ĵ:`j`,Ķ:`K`,ķ:`k`,ĸ:`k`,Ĺ:`L`,Ļ:`L`,Ľ:`L`,Ŀ:`L`,Ł:`L`,ĺ:`l`,ļ:`l`,ľ:`l`,ŀ:`l`,ł:`l`,Ń:`N`,Ņ:`N`,Ň:`N`,Ŋ:`N`,ń:`n`,ņ:`n`,ň:`n`,ŋ:`n`,Ō:`O`,Ŏ:`O`,Ő:`O`,ō:`o`,ŏ:`o`,ő:`o`,Ŕ:`R`,Ŗ:`R`,Ř:`R`,ŕ:`r`,ŗ:`r`,ř:`r`,Ś:`S`,Ŝ:`S`,Ş:`S`,Š:`S`,ś:`s`,ŝ:`s`,ş:`s`,š:`s`,Ţ:`T`,Ť:`T`,Ŧ:`T`,ţ:`t`,ť:`t`,ŧ:`t`,Ũ:`U`,Ū:`U`,Ŭ:`U`,Ů:`U`,Ű:`U`,Ų:`U`,ũ:`u`,ū:`u`,ŭ:`u`,ů:`u`,ű:`u`,ų:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ŷ:`y`,Ÿ:`Y`,Ź:`Z`,Ż:`Z`,Ž:`Z`,ź:`z`,ż:`z`,ž:`z`,IJ:`IJ`,ij:`ij`,Œ:`Oe`,œ:`oe`,ʼn:`'n`,ſ:`s`},Ut={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Wt={"&amp;":`&`,"&lt;":`<`,"&gt;":`>`,"&quot;":`"`,"&#39;":`'`},Gt={"\\":`\\`,"'":`'`,"\n":`n`,"\r":`r`,"\u2028":`u2028`,"\u2029":`u2029`},Kt=parseFloat,qt=parseInt,Jt=typeof global==`object`&&global&&global.Object===Object&&global,Yt=typeof self==`object`&&self&&self.Object===Object&&self,Xt=Jt||Yt||Function(`return this`)(),Zt=typeof e==`object`&&e&&!e.nodeType&&e,Qt=Zt&&typeof t==`object`&&t&&!t.nodeType&&t,$t=Qt&&Qt.exports===Zt,V=$t&&Jt.process,en=function(){try{return Qt&&Qt.require&&Qt.require(`util`).types||V&&V.binding&&V.binding(`util`)}catch{}}(),tn=en&&en.isArrayBuffer,nn=en&&en.isDate,rn=en&&en.isMap,an=en&&en.isRegExp,on=en&&en.isSet,sn=en&&en.isTypedArray;function cn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ln(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function H(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function un(e,t){for(var n=e==null?0:e.length;n--&&t(e[n],n,e)!==!1;);return e}function dn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function fn(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function pn(e,t){return!!(e!=null&&e.length)&&Tn(e,t,0)>-1}function mn(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function hn(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function gn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function _n(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function vn(e,t,n,r){var i=e==null?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function yn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bn=kn(`length`);function xn(e){return e.split(``)}function Sn(e){return e.match(Ve)||[]}function Cn(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function wn(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Tn(e,t,n){return t===t?tr(e,t,n):wn(e,Dn,n)}function En(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1}function Dn(e){return e!==e}function On(e,t){var n=e==null?0:e.length;return n?Nn(e,t)/n:v}function kn(e){return function(t){return t==null?n:t[e]}}function An(e){return function(t){return e==null?n:e[t]}}function jn(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function Mn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Nn(e,t){for(var r,i=-1,a=e.length;++i<a;){var o=t(e[i]);o!==n&&(r=r===n?o:r+o)}return r}function Pn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Fn(e,t){return hn(t,function(t){return[t,e[t]]})}function In(e){return e&&e.slice(0,ar(e)+1).replace(Ie,``)}function Ln(e){return function(t){return e(t)}}function Rn(e,t){return hn(t,function(t){return e[t]})}function zn(e,t){return e.has(t)}function Bn(e,t){for(var n=-1,r=e.length;++n<r&&Tn(t,e[n],0)>-1;);return n}function Vn(e,t){for(var n=e.length;n--&&Tn(t,e[n],0)>-1;);return n}function Hn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Un=An(Ht),Wn=An(Ut);function Gn(e){return`\\`+Gt[e]}function Kn(e,t){return e==null?n:e[t]}function qn(e){return Lt.test(e)}function Jn(e){return Rt.test(e)}function Yn(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function Xn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Zn(e,t){return function(n){return e(t(n))}}function Qn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];(s===t||s===a)&&(e[n]=a,o[i++]=n)}return o}function $n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function er(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function tr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function nr(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function rr(e){return qn(e)?sr(e):bn(e)}function ir(e){return qn(e)?cr(e):xn(e)}function ar(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var or=An(Wt);function sr(e){for(var t=It.lastIndex=0;It.test(e);)++t;return t}function cr(e){return e.match(It)||[]}function U(e){return e.match(z)||[]}var lr=(function e(t){t=t==null?Xt:lr.defaults(Xt.Object(),t,lr.pick(Xt,zt));var Le=t.Array,Ve=t.Date,et=t.Error,tt=t.Function,nt=t.Math,rt=t.Object,it=t.RegExp,at=t.String,ot=t.TypeError,st=Le.prototype,ct=tt.prototype,lt=rt.prototype,ut=t[`__core-js_shared__`],dt=ct.toString,F=lt.hasOwnProperty,ft=0,pt=function(){var e=/[^.]+$/.exec(ut&&ut.keys&&ut.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),mt=lt.toString,ht=dt.call(rt),I=Xt._,gt=it(`^`+dt.call(F).replace(Pe,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),_t=$t?t.Buffer:n,vt=t.Symbol,yt=t.Uint8Array,bt=_t?_t.allocUnsafe:n,xt=Zn(rt.getPrototypeOf,rt),St=rt.create,Ct=lt.propertyIsEnumerable,wt=st.splice,Tt=vt?vt.isConcatSpreadable:n,Et=vt?vt.iterator:n,L=vt?vt.toStringTag:n,Dt=function(){try{var e=Fo(rt,`defineProperty`);return e({},``,{}),e}catch{}}(),R=t.clearTimeout!==Xt.clearTimeout&&t.clearTimeout,Ot=Ve&&Ve.now!==Xt.Date.now&&Ve.now,kt=t.setTimeout!==Xt.setTimeout&&t.setTimeout,At=nt.ceil,jt=nt.floor,Mt=rt.getOwnPropertySymbols,Nt=_t?_t.isBuffer:n,It=t.isFinite,z=st.join,Lt=Zn(rt.keys,rt),Rt=nt.max,Ht=nt.min,Ut=Ve.now,Wt=t.parseInt,Gt=nt.random,Jt=st.reverse,Yt=Fo(t,`DataView`),Zt=Fo(t,`Map`),Qt=Fo(t,`Promise`),V=Fo(t,`Set`),en=Fo(t,`WeakMap`),bn=Fo(rt,`create`),xn=en&&new en,An={},tr=bs(Yt),sr=bs(Zt),cr=bs(Qt),ur=bs(V),dr=bs(en),fr=vt?vt.prototype:n,pr=fr?fr.valueOf:n,mr=fr?fr.toString:n;function W(e){if(du(e)&&!Y(e)&&!(e instanceof vr)){if(e instanceof _r)return e;if(F.call(e,`__wrapped__`))return Ss(e)}return new _r(e)}var hr=function(){function e(){}return function(t){if(!uu(t))return{};if(St)return St(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function gr(){}function _r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}W.templateSettings={escape:N,evaluate:Ae,interpolate:je,variable:``,imports:{_:W}},W.prototype=gr.prototype,W.prototype.constructor=W,_r.prototype=hr(gr.prototype),_r.prototype.constructor=_r;function vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=y,this.__views__=[]}function yr(){var e=new vr(this.__wrapped__);return e.__actions__=Ka(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ka(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ka(this.__views__),e}function br(){if(this.__filtered__){var e=new vr(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function xr(){var e=this.__wrapped__.value(),t=this.__dir__,n=Y(e),r=t<0,i=n?e.length:0,a=Bo(0,i,this.__views__),o=a.start,s=a.end,c=s-o,l=r?s:o-1,u=this.__iteratees__,d=u.length,f=0,p=Ht(c,this.__takeCount__);if(!n||!r&&i==c&&p==c)return Da(e,this.__actions__);var m=[];outer:for(;c--&&f<p;){l+=t;for(var h=-1,g=e[l];++h<d;){var _=u[h],v=_.iteratee,y=_.type,b=v(g);if(y==2)g=b;else if(!b){if(y==1)continue outer;break outer}}m[f++]=g}return m}vr.prototype=hr(gr.prototype),vr.prototype.constructor=vr;function Sr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Cr(){this.__data__=bn?bn(null):{},this.size=0}function wr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}function Tr(e){var t=this.__data__;if(bn){var r=t[e];return r===i?n:r}return F.call(t,e)?t[e]:n}function G(e){var t=this.__data__;return bn?t[e]!==n:F.call(t,e)}function Er(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=bn&&t===n?i:t,this}Sr.prototype.clear=Cr,Sr.prototype.delete=wr,Sr.prototype.get=Tr,Sr.prototype.has=G,Sr.prototype.set=Er;function Dr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Or(){this.__data__=[],this.size=0}function kr(e){var t=this.__data__,n=ei(t,e);return n<0?!1:(n==t.length-1?t.pop():wt.call(t,n,1),--this.size,!0)}function Ar(e){var t=this.__data__,r=ei(t,e);return r<0?n:t[r][1]}function jr(e){return ei(this.__data__,e)>-1}function Mr(e,t){var n=this.__data__,r=ei(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}Dr.prototype.clear=Or,Dr.prototype.delete=kr,Dr.prototype.get=Ar,Dr.prototype.has=jr,Dr.prototype.set=Mr;function Nr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pr(){this.size=0,this.__data__={hash:new Sr,map:new(Zt||Dr),string:new Sr}}function Fr(e){var t=No(this,e).delete(e);return this.size-=+!!t,t}function Ir(e){return No(this,e).get(e)}function Lr(e){return No(this,e).has(e)}function Rr(e,t){var n=No(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}Nr.prototype.clear=Pr,Nr.prototype.delete=Fr,Nr.prototype.get=Ir,Nr.prototype.has=Lr,Nr.prototype.set=Rr;function zr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Nr;++t<n;)this.add(e[t])}function Br(e){return this.__data__.set(e,i),this}function Vr(e){return this.__data__.has(e)}zr.prototype.add=zr.prototype.push=Br,zr.prototype.has=Vr;function Hr(e){var t=this.__data__=new Dr(e);this.size=t.size}function Ur(){this.__data__=new Dr,this.size=0}function Wr(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Gr(e){return this.__data__.get(e)}function Kr(e){return this.__data__.has(e)}function qr(e,t){var n=this.__data__;if(n instanceof Dr){var r=n.__data__;if(!Zt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Nr(r)}return n.set(e,t),this.size=n.size,this}Hr.prototype.clear=Ur,Hr.prototype.delete=Wr,Hr.prototype.get=Gr,Hr.prototype.has=Kr,Hr.prototype.set=qr;function Jr(e,t){var n=Y(e),r=!n&&Jl(e),i=!n&&!r&&$l(e),a=!n&&!r&&!i&&Eu(e),o=n||r||i||a,s=o?Pn(e.length,at):[],c=s.length;for(var l in e)(t||F.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Jo(l,c)))&&s.push(l);return s}function Yr(e){var t=e.length;return t?e[sa(0,t-1)]:n}function Xr(e,t){return _s(Ka(e),oi(t,0,e.length))}function Zr(e){return _s(Ka(e))}function Qr(e,t,r){(r!==n&&!Gl(e[t],r)||r===n&&!(t in e))&&ii(e,t,r)}function $r(e,t,r){var i=e[t];(!(F.call(e,t)&&Gl(i,r))||r===n&&!(t in e))&&ii(e,t,r)}function ei(e,t){for(var n=e.length;n--;)if(Gl(e[n][0],t))return n;return-1}function ti(e,t,n,r){return fi(e,function(e,i,a){t(r,e,n(e),a)}),r}function ni(e,t){return e&&qa(t,sd(t),e)}function ri(e,t){return e&&qa(t,cd(t),e)}function ii(e,t,n){t==`__proto__`&&Dt?Dt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ai(e,t){for(var r=-1,i=t.length,a=Le(i),o=e==null;++r<i;)a[r]=o?n:td(e,t[r]);return a}function oi(e,t,r){return e===e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function si(e,t,r,i,a,o){var s,c=t&1,l=t&2,u=t&4;if(r&&(s=a?r(e,i,a,o):r(e)),s!==n)return s;if(!uu(e))return e;var d=Y(e);if(d){if(s=Uo(e),!c)return Ka(e,s)}else{var f=zo(e),p=f==ne||f==re;if($l(e))return Ia(e,c);if(f==A||f==S||p&&!a){if(s=l||p?{}:Wo(e),!c)return l?Ya(e,ri(s,e)):Ja(e,ni(s,e))}else{if(!B[f])return a?e:{};s=Go(e,f,c)}}o||=new Hr;var m=o.get(e);if(m)return m;o.set(e,s),Cu(e)?e.forEach(function(n){s.add(si(n,t,r,n,e,o))}):fu(e)&&e.forEach(function(n,i){s.set(i,si(n,t,r,i,e,o))});var h=d?n:(u?l?ko:Oo:l?cd:sd)(e);return H(h||e,function(n,i){h&&(i=n,n=e[i]),$r(s,i,si(n,t,r,i,e,o))}),s}function ci(e){var t=sd(e);return function(n){return li(n,e,t)}}function li(e,t,r){var i=r.length;if(e==null)return!i;for(e=rt(e);i--;){var a=r[i],o=t[a],s=e[a];if(s===n&&!(a in e)||!o(s))return!1}return!0}function ui(e,t,i){if(typeof e!=`function`)throw new ot(r);return ps(function(){e.apply(n,i)},t)}function di(e,t,n,r){var i=-1,a=pn,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=hn(t,Ln(n))),r?(a=mn,o=!1):t.length>=200&&(a=zn,o=!1,t=new zr(t));outer:for(;++i<s;){var u=e[i],d=n==null?u:n(u);if(u=r||u!==0?u:0,o&&d===d){for(var f=l;f--;)if(t[f]===d)continue outer;c.push(u)}else a(t,d,r)||c.push(u)}return c}var fi=Qa(xi),pi=Qa(Si,!0);function mi(e,t){var n=!0;return fi(e,function(e,r,i){return n=!!t(e,r,i),n}),n}function hi(e,t,r){for(var i=-1,a=e.length;++i<a;){var o=e[i],s=t(o);if(s!=null&&(c===n?s===s&&!Tu(s):r(s,c)))var c=s,l=o}return l}function gi(e,t,r,i){var a=e.length;for(r=X(r),r<0&&(r=-r>a?0:a+r),i=i===n||i>a?a:X(i),i<0&&(i+=a),i=r>i?0:Pu(i);r<i;)e[r++]=t;return e}function _i(e,t){var n=[];return fi(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function vi(e,t,n,r,i){var a=-1,o=e.length;for(n||=qo,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?vi(s,t-1,n,r,i):gn(i,s):r||(i[i.length]=s)}return i}var yi=$a(),bi=$a(!0);function xi(e,t){return e&&yi(e,t,sd)}function Si(e,t){return e&&bi(e,t,sd)}function Ci(e,t){return fn(t,function(t){return su(e[t])})}function wi(e,t){t=Ma(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[ys(t[r++])];return r&&r==i?e:n}function Ti(e,t,n){var r=t(e);return Y(e)?r:gn(r,n(e))}function Ei(e){return e==null?e===n?de:k:L&&L in rt(e)?Io(e):ss(e)}function Di(e,t){return e>t}function Oi(e,t){return e!=null&&F.call(e,t)}function ki(e,t){return e!=null&&t in rt(e)}function Ai(e,t,n){return e>=Ht(t,n)&&e<Rt(t,n)}function ji(e,t,r){for(var i=r?mn:pn,a=e[0].length,o=e.length,s=o,c=Le(o),l=1/0,u=[];s--;){var d=e[s];s&&t&&(d=hn(d,Ln(t))),l=Ht(d.length,l),c[s]=!r&&(t||a>=120&&d.length>=120)?new zr(s&&d):n}d=e[0];var f=-1,p=c[0];outer:for(;++f<a&&u.length<l;){var m=d[f],h=t?t(m):m;if(m=r||m!==0?m:0,!(p?zn(p,h):i(u,h,r))){for(s=o;--s;){var g=c[s];if(!(g?zn(g,h):i(e[s],h,r)))continue outer}p&&p.push(h),u.push(m)}}return u}function Mi(e,t,n,r){return xi(e,function(e,i,a){t(r,n(e),i,a)}),r}function Ni(e,t,r){t=Ma(t,e),e=ls(e,t);var i=e==null?e:e[ys(qs(t))];return i==null?n:cn(i,e,r)}function Pi(e){return du(e)&&Ei(e)==S}function Fi(e){return du(e)&&Ei(e)==me}function Ii(e){return du(e)&&Ei(e)==te}function Li(e,t,n,r,i){return e===t?!0:e==null||t==null||!du(e)&&!du(t)?e!==e&&t!==t:Ri(e,t,n,r,Li,i)}function Ri(e,t,n,r,i,a){var o=Y(e),s=Y(t),c=o?C:zo(e),l=s?C:zo(t);c=c==S?A:c,l=l==S?A:l;var u=c==A,d=l==A,f=c==l;if(f&&$l(e)){if(!$l(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new Hr,o||Eu(e)?wo(e,t,n,r,i,a):To(e,t,c,n,r,i,a);if(!(n&1)){var p=u&&F.call(e,`__wrapped__`),m=d&&F.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new Hr,i(h,g,n,r,a)}}return f?(a||=new Hr,Eo(e,t,n,r,i,a)):!1}function zi(e){return du(e)&&zo(e)==ie}function Bi(e,t,r,i){var a=r.length,o=a,s=!i;if(e==null)return!o;for(e=rt(e);a--;){var c=r[a];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<o;){c=r[a];var l=c[0],u=e[l],d=c[1];if(s&&c[2]){if(u===n&&!(l in e))return!1}else{var f=new Hr;if(i)var p=i(u,d,l,e,t,f);if(!(p===n?Li(d,u,3,i,f):p))return!1}}return!0}function Vi(e){return!uu(e)||$o(e)?!1:(su(e)?gt:Je).test(bs(e))}function Hi(e){return du(e)&&Ei(e)==se}function Ui(e){return du(e)&&zo(e)==ce}function Wi(e){return du(e)&&lu(e.length)&&!!Vt[Ei(e)]}function Gi(e){return typeof e==`function`?e:e==null?mf:typeof e==`object`?Y(e)?Zi(e[0],e[1]):Xi(e):Df(e)}function Ki(e){if(!ts(e))return Lt(e);var t=[];for(var n in rt(e))F.call(e,n)&&n!=`constructor`&&t.push(n);return t}function qi(e){if(!uu(e))return os(e);var t=ts(e),n=[];for(var r in e)(r!=`constructor`||!t&&F.call(e,r))&&n.push(r);return n}function Ji(e,t){return e<t}function Yi(e,t){var n=-1,r=Xl(e)?Le(e.length):[];return fi(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function Xi(e){var t=Po(e);return t.length==1&&t[0][2]?rs(t[0][0],t[0][1]):function(n){return n===e||Bi(n,e,t)}}function Zi(e,t){return Xo(e)&&ns(t)?rs(ys(e),t):function(r){var i=td(r,e);return i===n&&i===t?rd(r,e):Li(t,i,3)}}function Qi(e,t,r,i,a){e!==t&&yi(t,function(o,s){if(a||=new Hr,uu(o))$i(e,t,s,r,Qi,i,a);else{var c=i?i(ds(e,s),o,s+``,e,t,a):n;c===n&&(c=o),Qr(e,s,c)}},cd)}function $i(e,t,r,i,a,o,s){var c=ds(e,r),l=ds(t,r),u=s.get(l);if(u)Qr(e,r,u);else{var d=o?o(c,l,r+``,e,t,s):n,f=d===n;if(f){var p=Y(l),m=!p&&$l(l),h=!p&&!m&&Eu(l);d=l,p||m||h?Y(c)?d=c:Zl(c)?d=Ka(c):m?(f=!1,d=Ia(l,!0)):h?(f=!1,d=Va(l,!0)):d=[]:bu(l)||Jl(l)?(d=c,Jl(c)?d=Iu(c):(!uu(c)||su(c))&&(d=Wo(l))):f=!1}f&&(s.set(l,d),a(d,l,i,o,s),s.delete(l)),Qr(e,r,d)}}function ea(e,t){var r=e.length;if(r)return t+=t<0?r:0,Jo(t,r)?e[t]:n}function ta(e,t,n){t=t.length?hn(t,function(e){return Y(e)?function(t){return wi(t,e.length===1?e[0]:e)}:e}):[mf];var r=-1;return t=hn(t,Ln(q())),Mn(Yi(e,function(e,n,i){return{criteria:hn(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return Ua(e,t,n)})}function na(e,t){return ra(e,t,function(t,n){return rd(e,n)})}function ra(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=wi(e,o);n(s,o)&&fa(a,Ma(o,e),s)}return a}function ia(e){return function(t){return wi(t,e)}}function aa(e,t,n,r){var i=r?En:Tn,a=-1,o=t.length,s=e;for(e===t&&(t=Ka(t)),n&&(s=hn(e,Ln(n)));++a<o;)for(var c=0,l=t[a],u=n?n(l):l;(c=i(s,u,c,r))>-1;)s!==e&&wt.call(s,c,1),wt.call(e,c,1);return e}function oa(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;Jo(i)?wt.call(e,i,1):wa(e,i)}}return e}function sa(e,t){return e+jt(Gt()*(t-e+1))}function ca(e,t,n,r){for(var i=-1,a=Rt(At((t-e)/(n||1)),0),o=Le(a);a--;)o[r?a:++i]=e,e+=n;return o}function la(e,t){var n=``;if(!e||t<1||t>g)return n;do t%2&&(n+=e),t=jt(t/2),t&&(e+=e);while(t);return n}function K(e,t){return ms(cs(e,t,mf),e+``)}function ua(e){return Yr(Ed(e))}function da(e,t){var n=Ed(e);return _s(n,oi(t,0,n.length))}function fa(e,t,r,i){if(!uu(e))return e;t=Ma(t,e);for(var a=-1,o=t.length,s=o-1,c=e;c!=null&&++a<o;){var l=ys(t[a]),u=r;if(l===`__proto__`||l===`constructor`||l===`prototype`)return e;if(a!=s){var d=c[l];u=i?i(d,l,c):n,u===n&&(u=uu(d)?d:Jo(t[a+1])?[]:{})}$r(c,l,u),c=c[l]}return e}var pa=xn?function(e,t){return xn.set(e,t),e}:mf,ma=Dt?function(e,t){return Dt(e,`toString`,{configurable:!0,enumerable:!1,value:uf(t),writable:!0})}:mf;function ha(e){return _s(Ed(e))}function ga(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Le(i);++r<i;)a[r]=e[r+t];return a}function _a(e,t){var n;return fi(e,function(e,r,i){return n=t(e,r,i),!n}),!!n}function va(e,t,n){var r=0,i=e==null?r:e.length;if(typeof t==`number`&&t===t&&i<=x){for(;r<i;){var a=r+i>>>1,o=e[a];o!==null&&!Tu(o)&&(n?o<=t:o<t)?r=a+1:i=a}return i}return ya(e,t,mf,n)}function ya(e,t,r,i){var a=0,o=e==null?0:e.length;if(o===0)return 0;t=r(t);for(var s=t!==t,c=t===null,l=Tu(t),u=t===n;a<o;){var d=jt((a+o)/2),f=r(e[d]),p=f!==n,m=f===null,h=f===f,g=Tu(f);if(s)var _=i||h;else _=u?h&&(i||p):c?h&&p&&(i||!m):l?h&&p&&!m&&(i||!g):m||g?!1:i?f<=t:f<t;_?a=d+1:o=d}return Ht(o,b)}function ba(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n],s=t?t(o):o;if(!n||!Gl(s,c)){var c=s;a[i++]=o===0?0:o}}return a}function xa(e){return typeof e==`number`?e:Tu(e)?v:+e}function Sa(e){if(typeof e==`string`)return e;if(Y(e))return hn(e,Sa)+``;if(Tu(e))return mr?mr.call(e):``;var t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function Ca(e,t,n){var r=-1,i=pn,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=mn;else if(a>=200){var l=t?null:vo(e);if(l)return $n(l);o=!1,i=zn,c=new zr}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}function wa(e,t){t=Ma(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=ys(t[n]);if(i===`__proto__`&&!F.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=ls(e,t);return a==null||delete a[ys(qs(t))]}function Ta(e,t,n,r){return fa(e,t,n(wi(e,t)),r)}function Ea(e,t,n,r){for(var i=e.length,a=r?i:-1;(r?a--:++a<i)&&t(e[a],a,e););return n?ga(e,r?0:a,r?a+1:i):ga(e,r?a+1:0,r?i:a)}function Da(e,t){var n=e;return n instanceof vr&&(n=n.value()),_n(t,function(e,t){return t.func.apply(t.thisArg,gn([e],t.args))},n)}function Oa(e,t,n){var r=e.length;if(r<2)return r?Ca(e[0]):[];for(var i=-1,a=Le(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=di(a[i]||o,e[s],t,n));return Ca(vi(a,1),t,n)}function ka(e,t,r){for(var i=-1,a=e.length,o=t.length,s={};++i<a;){var c=i<o?t[i]:n;r(s,e[i],c)}return s}function Aa(e){return Zl(e)?e:[]}function ja(e){return typeof e==`function`?e:mf}function Ma(e,t){return Y(e)?e:Xo(e,t)?[e]:vs(Ru(e))}var Na=K;function Pa(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:ga(e,t,r)}var Fa=R||function(e){return Xt.clearTimeout(e)};function Ia(e,t){if(t)return e.slice();var n=e.length,r=bt?bt(n):new e.constructor(n);return e.copy(r),r}function La(e){var t=new e.constructor(e.byteLength);return new yt(t).set(new yt(e)),t}function Ra(e,t){var n=t?La(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function za(e){var t=new e.constructor(e.source,Ge.exec(e));return t.lastIndex=e.lastIndex,t}function Ba(e){return pr?rt(pr.call(e)):{}}function Va(e,t){var n=t?La(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ha(e,t){if(e!==t){var r=e!==n,i=e===null,a=e===e,o=Tu(e),s=t!==n,c=t===null,l=t===t,u=Tu(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}function Ua(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=Ha(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function Wa(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=Rt(a-o,0),u=Le(c+l),d=!r;++s<c;)u[s]=t[s];for(;++i<o;)(d||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}function Ga(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=Rt(a-s,0),d=Le(u+l),f=!r;++i<u;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++o<s;)(f||i<a)&&(d[p+n[o]]=e[i++]);return d}function Ka(e,t){var n=-1,r=e.length;for(t||=Le(r);++n<r;)t[n]=e[n];return t}function qa(e,t,r,i){var a=!r;r||={};for(var o=-1,s=t.length;++o<s;){var c=t[o],l=i?i(r[c],e[c],c,r,e):n;l===n&&(l=e[c]),a?ii(r,c,l):$r(r,c,l)}return r}function Ja(e,t){return qa(e,Lo(e),t)}function Ya(e,t){return qa(e,Ro(e),t)}function Xa(e,t){return function(n,r){var i=Y(n)?ln:ti,a=t?t():{};return i(n,e,q(r,2),a)}}function Za(e){return K(function(t,r){var i=-1,a=r.length,o=a>1?r[a-1]:n,s=a>2?r[2]:n;for(o=e.length>3&&typeof o==`function`?(a--,o):n,s&&Yo(r[0],r[1],s)&&(o=a<3?n:o,a=1),t=rt(t);++i<a;){var c=r[i];c&&e(t,c,i,o)}return t})}function Qa(e,t){return function(n,r){if(n==null)return n;if(!Xl(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=rt(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}function $a(e){return function(t,n,r){for(var i=-1,a=rt(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}function eo(e,t,n){var r=t&o,i=ro(e);function a(){return(this&&this!==Xt&&this instanceof a?i:e).apply(r?n:this,arguments)}return a}function to(e){return function(t){t=Ru(t);var r=qn(t)?ir(t):n,i=r?r[0]:t.charAt(0),a=r?Pa(r,1).join(``):t.slice(1);return i[e]()+a}}function no(e){return function(t){return _n(Z(Nd(t).replace(Pt,``)),e,``)}}function ro(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=hr(e.prototype),r=e.apply(n,t);return uu(r)?r:n}}function io(e,t,r){var i=ro(e);function a(){for(var o=arguments.length,s=Le(o),c=o,l=Mo(a);c--;)s[c]=arguments[c];var u=o<3&&s[0]!==l&&s[o-1]!==l?[]:Qn(s,l);return o-=u.length,o<r?go(e,t,so,a.placeholder,n,s,u,n,n,r-o):cn(this&&this!==Xt&&this instanceof a?i:e,this,s)}return a}function ao(e){return function(t,r,i){var a=rt(t);if(!Xl(t)){var o=q(r,3);t=sd(t),r=function(e){return o(a[e],e,a)}}var s=e(t,r,i);return s>-1?a[o?t[s]:s]:n}}function oo(e){return Do(function(t){var i=t.length,a=i,o=_r.prototype.thru;for(e&&t.reverse();a--;){var s=t[a];if(typeof s!=`function`)throw new ot(r);if(o&&!l&&jo(s)==`wrapper`)var l=new _r([],!0)}for(a=l?a:i;++a<i;){s=t[a];var d=jo(s),m=d==`wrapper`?Ao(s):n;l=m&&Qo(m[0])&&m[1]==(f|c|u|p)&&!m[4].length&&m[9]==1?l[jo(m[0])].apply(l,m[3]):s.length==1&&Qo(s)?l[d]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&e.length==1&&Y(n))return l.plant(n).value();for(var r=0,a=i?t[r].apply(this,e):n;++r<i;)a=t[r].call(this,a);return a}})}function so(e,t,r,i,a,u,d,p,h,g){var _=t&f,v=t&o,y=t&s,b=t&(c|l),x=t&m,ee=y?n:ro(e);function S(){for(var n=arguments.length,o=Le(n),s=n;s--;)o[s]=arguments[s];if(b)var c=Mo(S),l=Hn(o,c);if(i&&(o=Wa(o,i,a,b)),u&&(o=Ga(o,u,d,b)),n-=l,b&&n<g){var f=Qn(o,c);return go(e,t,so,S.placeholder,r,o,f,p,h,g-n)}var m=v?r:this,C=y?m[e]:e;return n=o.length,p?o=us(o,p):x&&n>1&&o.reverse(),_&&h<n&&(o.length=h),this&&this!==Xt&&this instanceof S&&(C=ee||ro(C)),C.apply(m,o)}return S}function co(e,t){return function(n,r){return Mi(n,e,t(r),{})}}function lo(e,t){return function(r,i){var a;if(r===n&&i===n)return t;if(r!==n&&(a=r),i!==n){if(a===n)return i;typeof r==`string`||typeof i==`string`?(r=Sa(r),i=Sa(i)):(r=xa(r),i=xa(i)),a=e(r,i)}return a}}function uo(e){return Do(function(t){return t=hn(t,Ln(q())),K(function(n){var r=this;return e(t,function(e){return cn(e,r,n)})})})}function fo(e,t){t=t===n?` `:Sa(t);var r=t.length;if(r<2)return r?la(t,e):t;var i=la(t,At(e/rr(t)));return qn(t)?Pa(ir(i),0,e).join(``):i.slice(0,e)}function po(e,t,n,r){var i=t&o,a=ro(e);function s(){for(var t=-1,o=arguments.length,c=-1,l=r.length,u=Le(l+o),d=this&&this!==Xt&&this instanceof s?a:e;++c<l;)u[c]=r[c];for(;o--;)u[c++]=arguments[++t];return cn(d,i?n:this,u)}return s}function mo(e){return function(t,r,i){return i&&typeof i!=`number`&&Yo(t,r,i)&&(r=i=n),t=Nu(t),r===n?(r=t,t=0):r=Nu(r),i=i===n?t<r?1:-1:Nu(i),ca(t,r,i,e)}}function ho(e){return function(t,n){return(typeof t!=`string`||typeof n!=`string`)&&(t=Fu(t),n=Fu(n)),e(t,n)}}function go(e,t,r,i,a,l,f,p,m,h){var g=t&c,_=g?f:n,v=g?n:f,y=g?l:n,b=g?n:l;t|=g?u:d,t&=~(g?d:u),t&4||(t&=~(o|s));var x=[e,t,a,y,_,b,v,p,m,h],ee=r.apply(n,x);return Qo(e)&&fs(ee,x),ee.placeholder=i,hs(ee,e,t)}function _o(e){var t=nt[e];return function(e,n){if(e=Fu(e),n=n==null?0:Ht(X(n),292),n&&It(e)){var r=(Ru(e)+`e`).split(`e`);return r=(Ru(t(r[0]+`e`+(+r[1]+n)))+`e`).split(`e`),+(r[0]+`e`+(+r[1]-n))}return t(e)}}var vo=V&&1/$n(new V([,-0]))[1]==h?function(e){return new V(e)}:Sf;function yo(e){return function(t){var n=zo(t);return n==ie?Xn(t):n==ce?er(t):Fn(t,e(t))}}function bo(e,t,i,a,f,p,m,h){var g=t&s;if(!g&&typeof e!=`function`)throw new ot(r);var _=a?a.length:0;if(_||(t&=~(u|d),a=f=n),m=m===n?m:Rt(X(m),0),h=h===n?h:X(h),_-=f?f.length:0,t&d){var v=a,y=f;a=f=n}var b=g?n:Ao(e),x=[e,t,i,a,f,v,y,p,m,h];if(b&&as(x,b),e=x[0],t=x[1],i=x[2],a=x[3],f=x[4],h=x[9]=x[9]===n?g?0:e.length:Rt(x[9]-_,0),!h&&t&(c|l)&&(t&=~(c|l)),!t||t==o)var ee=eo(e,t,i);else ee=t==c||t==l?io(e,t,h):(t==u||t==(o|u))&&!f.length?po(e,t,i,a):so.apply(n,x);return hs((b?pa:fs)(ee,x),e,t)}function xo(e,t,r,i){return e===n||Gl(e,lt[r])&&!F.call(i,r)?t:e}function So(e,t,r,i,a,o){return uu(e)&&uu(t)&&(o.set(t,e),Qi(e,t,n,So,o),o.delete(t)),e}function Co(e){return bu(e)?n:e}function wo(e,t,r,i,a,o){var s=r&1,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=r&2?new zr:n;for(o.set(e,t),o.set(t,e);++f<c;){var h=e[f],g=t[f];if(i)var _=s?i(g,h,f,t,e,o):i(h,g,f,e,t,o);if(_!==n){if(_)continue;p=!1;break}if(m){if(!yn(t,function(e,t){if(!zn(m,t)&&(h===e||a(h,e,r,i,o)))return m.push(t)})){p=!1;break}}else if(!(h===g||a(h,g,r,i,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function To(e,t,n,r,i,a,o){switch(n){case he:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case me:return!(e.byteLength!=t.byteLength||!a(new yt(e),new yt(t)));case T:case te:case O:return Gl(+e,+t);case D:return e.name==t.name&&e.message==t.message;case se:case le:return e==t+``;case ie:var s=Xn;case ce:var c=r&1;if(s||=$n,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=2,o.set(e,t);var u=wo(s(e),s(t),r,i,a,o);return o.delete(e),u;case ue:if(pr)return pr.call(e)==pr.call(t)}return!1}function Eo(e,t,r,i,a,o){var s=r&1,c=Oo(e),l=c.length;if(l!=Oo(t).length&&!s)return!1;for(var u=l;u--;){var d=c[u];if(!(s?d in t:F.call(t,d)))return!1}var f=o.get(e),p=o.get(t);if(f&&p)return f==t&&p==e;var m=!0;o.set(e,t),o.set(t,e);for(var h=s;++u<l;){d=c[u];var g=e[d],_=t[d];if(i)var v=s?i(_,g,d,t,e,o):i(g,_,d,e,t,o);if(!(v===n?g===_||a(g,_,r,i,o):v)){m=!1;break}h||=d==`constructor`}if(m&&!h){var y=e.constructor,b=t.constructor;y!=b&&`constructor`in e&&`constructor`in t&&!(typeof y==`function`&&y instanceof y&&typeof b==`function`&&b instanceof b)&&(m=!1)}return o.delete(e),o.delete(t),m}function Do(e){return ms(cs(e,n,Is),e+``)}function Oo(e){return Ti(e,sd,Lo)}function ko(e){return Ti(e,cd,Ro)}var Ao=xn?function(e){return xn.get(e)}:Sf;function jo(e){for(var t=e.name+``,n=An[t],r=F.call(An,t)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==e)return i.name}return t}function Mo(e){return(F.call(W,`placeholder`)?W:e).placeholder}function q(){var e=W.iteratee||hf;return e=e===hf?Gi:e,arguments.length?e(arguments[0],arguments[1]):e}function No(e,t){var n=e.__data__;return Zo(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Po(e){for(var t=sd(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ns(i)]}return t}function Fo(e,t){var r=Kn(e,t);return Vi(r)?r:n}function Io(e){var t=F.call(e,L),r=e[L];try{e[L]=n;var i=!0}catch{}var a=mt.call(e);return i&&(t?e[L]=r:delete e[L]),a}var Lo=Mt?function(e){return e==null?[]:(e=rt(e),fn(Mt(e),function(t){return Ct.call(e,t)}))}:jf,Ro=Mt?function(e){for(var t=[];e;)gn(t,Lo(e)),e=xt(e);return t}:jf,zo=Ei;(Yt&&zo(new Yt(new ArrayBuffer(1)))!=he||Zt&&zo(new Zt)!=ie||Qt&&zo(Qt.resolve())!=ae||V&&zo(new V)!=ce||en&&zo(new en)!=fe)&&(zo=function(e){var t=Ei(e),r=t==A?e.constructor:n,i=r?bs(r):``;if(i)switch(i){case tr:return he;case sr:return ie;case cr:return ae;case ur:return ce;case dr:return fe}return t});function Bo(e,t,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case`drop`:e+=o;break;case`dropRight`:t-=o;break;case`take`:t=Ht(t,e+o);break;case`takeRight`:e=Rt(e,t-o)}}return{start:e,end:t}}function Vo(e){var t=e.match(ze);return t?t[1].split(Be):[]}function Ho(e,t,n){t=Ma(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=ys(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&lu(i)&&Jo(o,i)&&(Y(e)||Jl(e)))}function Uo(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&F.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function Wo(e){return typeof e.constructor==`function`&&!ts(e)?hr(xt(e)):{}}function Go(e,t,n){var r=e.constructor;switch(t){case me:return La(e);case T:case te:return new r(+e);case he:return Ra(e,n);case ge:case _e:case ve:case ye:case be:case xe:case Se:case Ce:case we:return Va(e,n);case ie:return new r;case O:case le:return new r(e);case se:return za(e);case ce:return new r;case ue:return Ba(e)}}function Ko(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?`& `:``)+t[r],t=t.join(n>2?`, `:` `),e.replace(Re,`{
4
4
  /* [wrapped with `+t+`] */
5
5
  `)}function qo(e){return Y(e)||Jl(e)||!!(Tt&&e&&e[Tt])}function Jo(e,t){var n=typeof e;return t??=g,!!t&&(n==`number`||n!=`symbol`&&Xe.test(e))&&e>-1&&e%1==0&&e<t}function Yo(e,t,n){if(!uu(n))return!1;var r=typeof t;return(r==`number`?Xl(n)&&Jo(t,n.length):r==`string`&&t in n)?Gl(n[t],e):!1}function Xo(e,t){if(Y(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Tu(e)?!0:P.test(e)||!Me.test(e)||t!=null&&e in rt(t)}function Zo(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Qo(e){var t=jo(e),n=W[t];if(typeof n!=`function`||!(t in vr.prototype))return!1;if(e===n)return!0;var r=Ao(n);return!!r&&e===r[0]}function $o(e){return!!pt&&pt in e}var es=ut?su:Mf;function ts(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||lt)}function ns(e){return e===e&&!uu(e)}function rs(e,t){return function(r){return r!=null&&r[e]===t&&(t!==n||e in rt(r))}}function is(e){var t=Dl(e,function(e){return n.size===500&&n.clear(),e}),n=t.cache;return t}function as(e,t){var n=e[1],r=t[1],i=n|r,l=i<(o|s|f),u=r==f&&n==c||r==f&&n==p&&e[7].length<=t[8]||r==(f|p)&&t[7].length<=t[8]&&n==c;if(!(l||u))return e;r&o&&(e[2]=t[2],i|=n&o?0:4);var d=t[3];if(d){var m=e[3];e[3]=m?Wa(m,d,t[4]):d,e[4]=m?Qn(e[3],a):t[4]}return d=t[5],d&&(m=e[5],e[5]=m?Ga(m,d,t[6]):d,e[6]=m?Qn(e[5],a):t[6]),d=t[7],d&&(e[7]=d),r&f&&(e[8]=e[8]==null?t[8]:Ht(e[8],t[8])),e[9]??=t[9],e[0]=t[0],e[1]=i,e}function os(e){var t=[];if(e!=null)for(var n in rt(e))t.push(n);return t}function ss(e){return mt.call(e)}function cs(e,t,r){return t=Rt(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Rt(n.length-t,0),o=Le(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=Le(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),cn(e,this,s)}}function ls(e,t){return t.length<2?e:wi(e,ga(t,0,-1))}function us(e,t){for(var r=e.length,i=Ht(t.length,r),a=Ka(e);i--;){var o=t[i];e[i]=Jo(o,r)?a[o]:n}return e}function ds(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}var fs=gs(pa),ps=kt||function(e,t){return Xt.setTimeout(e,t)},ms=gs(ma);function hs(e,t,n){var r=t+``;return ms(e,Ko(r,xs(Vo(r),n)))}function gs(e){var t=0,r=0;return function(){var i=Ut(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function _s(e,t){var r=-1,i=e.length,a=i-1;for(t=t===n?i:t;++r<t;){var o=sa(r,a),s=e[o];e[o]=e[r],e[r]=s}return e.length=t,e}var vs=is(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Ne,function(e,n,r,i){t.push(r?i.replace(Ue,`$1`):n||e)}),t});function ys(e){if(typeof e==`string`||Tu(e))return e;var t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function bs(e){if(e!=null){try{return dt.call(e)}catch{}try{return e+``}catch{}}return``}function xs(e,t){return H(ee,function(n){var r=`_.`+n[0];t&n[1]&&!pn(e,r)&&e.push(r)}),e.sort()}function Ss(e){if(e instanceof vr)return e.clone();var t=new _r(e.__wrapped__,e.__chain__);return t.__actions__=Ka(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Cs(e,t,r){t=(r?Yo(e,t,r):t===n)?1:Rt(X(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var a=0,o=0,s=Le(At(i/t));a<i;)s[o++]=ga(e,a,a+=t);return s}function ws(e){for(var t=-1,n=e==null?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i}function Ts(){var e=arguments.length;if(!e)return[];for(var t=Le(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return gn(Y(n)?Ka(n):[n],vi(t,1))}var Es=K(function(e,t){return Zl(e)?di(e,vi(t,1,Zl,!0)):[]}),Ds=K(function(e,t){var r=qs(t);return Zl(r)&&(r=n),Zl(e)?di(e,vi(t,1,Zl,!0),q(r,2)):[]}),Os=K(function(e,t){var r=qs(t);return Zl(r)&&(r=n),Zl(e)?di(e,vi(t,1,Zl,!0),n,r):[]});function ks(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:X(t),ga(e,t<0?0:t,i)):[]}function As(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:X(t),t=i-t,ga(e,0,t<0?0:t)):[]}function js(e,t){return e&&e.length?Ea(e,q(t,3),!0,!0):[]}function Ms(e,t){return e&&e.length?Ea(e,q(t,3),!0):[]}function Ns(e,t,n,r){var i=e==null?0:e.length;return i?(n&&typeof n!=`number`&&Yo(e,t,n)&&(n=0,r=i),gi(e,t,n,r)):[]}function Ps(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:X(n);return i<0&&(i=Rt(r+i,0)),wn(e,q(t,3),i)}function Fs(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var a=i-1;return r!==n&&(a=X(r),a=r<0?Rt(i+a,0):Ht(a,i-1)),wn(e,q(t,3),a,!0)}function Is(e){return e!=null&&e.length?vi(e,1):[]}function Ls(e){return e!=null&&e.length?vi(e,h):[]}function Rs(e,t){return e!=null&&e.length?(t=t===n?1:X(t),vi(e,t)):[]}function zs(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];ii(r,i[0],i[1])}return r}function Bs(e){return e&&e.length?e[0]:n}function Vs(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:X(n);return i<0&&(i=Rt(r+i,0)),Tn(e,t,i)}function Hs(e){return e!=null&&e.length?ga(e,0,-1):[]}var Us=K(function(e){var t=hn(e,Aa);return t.length&&t[0]===e[0]?ji(t):[]}),Ws=K(function(e){var t=qs(e),r=hn(e,Aa);return t===qs(r)?t=n:r.pop(),r.length&&r[0]===e[0]?ji(r,q(t,2)):[]}),Gs=K(function(e){var t=qs(e),r=hn(e,Aa);return t=typeof t==`function`?t:n,t&&r.pop(),r.length&&r[0]===e[0]?ji(r,n,t):[]});function Ks(e,t){return e==null?``:z.call(e,t)}function qs(e){var t=e==null?0:e.length;return t?e[t-1]:n}function Js(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var a=i;return r!==n&&(a=X(r),a=a<0?Rt(i+a,0):Ht(a,i-1)),t===t?nr(e,t,a):wn(e,Dn,a,!0)}function Ys(e,t){return e&&e.length?ea(e,X(t)):n}var Xs=K(Zs);function Zs(e,t){return e&&e.length&&t&&t.length?aa(e,t):e}function Qs(e,t,n){return e&&e.length&&t&&t.length?aa(e,t,q(n,2)):e}function $s(e,t,r){return e&&e.length&&t&&t.length?aa(e,t,n,r):e}var ec=Do(function(e,t){var n=e==null?0:e.length,r=ai(e,t);return oa(e,hn(t,function(e){return Jo(e,n)?+e:e}).sort(Ha)),r});function tc(e,t){var n=[];if(!(e&&e.length))return n;var r=-1,i=[],a=e.length;for(t=q(t,3);++r<a;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return oa(e,i),n}function nc(e){return e==null?e:Jt.call(e)}function rc(e,t,r){var i=e==null?0:e.length;return i?(r&&typeof r!=`number`&&Yo(e,t,r)?(t=0,r=i):(t=t==null?0:X(t),r=r===n?i:X(r)),ga(e,t,r)):[]}function ic(e,t){return va(e,t)}function ac(e,t,n){return ya(e,t,q(n,2))}function oc(e,t){var n=e==null?0:e.length;if(n){var r=va(e,t);if(r<n&&Gl(e[r],t))return r}return-1}function sc(e,t){return va(e,t,!0)}function cc(e,t,n){return ya(e,t,q(n,2),!0)}function lc(e,t){if(e!=null&&e.length){var n=va(e,t,!0)-1;if(Gl(e[n],t))return n}return-1}function uc(e){return e&&e.length?ba(e):[]}function dc(e,t){return e&&e.length?ba(e,q(t,2)):[]}function J(e){var t=e==null?0:e.length;return t?ga(e,1,t):[]}function fc(e,t,r){return e&&e.length?(t=r||t===n?1:X(t),ga(e,0,t<0?0:t)):[]}function pc(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:X(t),t=i-t,ga(e,t<0?0:t,i)):[]}function mc(e,t){return e&&e.length?Ea(e,q(t,3),!1,!0):[]}function hc(e,t){return e&&e.length?Ea(e,q(t,3)):[]}var gc=K(function(e){return Ca(vi(e,1,Zl,!0))}),_c=K(function(e){var t=qs(e);return Zl(t)&&(t=n),Ca(vi(e,1,Zl,!0),q(t,2))}),vc=K(function(e){var t=qs(e);return t=typeof t==`function`?t:n,Ca(vi(e,1,Zl,!0),n,t)});function yc(e){return e&&e.length?Ca(e):[]}function bc(e,t){return e&&e.length?Ca(e,q(t,2)):[]}function xc(e,t){return t=typeof t==`function`?t:n,e&&e.length?Ca(e,n,t):[]}function Sc(e){if(!(e&&e.length))return[];var t=0;return e=fn(e,function(e){if(Zl(e))return t=Rt(e.length,t),!0}),Pn(t,function(t){return hn(e,kn(t))})}function Cc(e,t){if(!(e&&e.length))return[];var r=Sc(e);return t==null?r:hn(r,function(e){return cn(t,n,e)})}var wc=K(function(e,t){return Zl(e)?di(e,t):[]}),Tc=K(function(e){return Oa(fn(e,Zl))}),Ec=K(function(e){var t=qs(e);return Zl(t)&&(t=n),Oa(fn(e,Zl),q(t,2))}),Dc=K(function(e){var t=qs(e);return t=typeof t==`function`?t:n,Oa(fn(e,Zl),n,t)}),Oc=K(Sc);function kc(e,t){return ka(e||[],t||[],$r)}function Ac(e,t){return ka(e||[],t||[],fa)}var jc=K(function(e){var t=e.length,r=t>1?e[t-1]:n;return r=typeof r==`function`?(e.pop(),r):n,Cc(e,r)});function Mc(e){var t=W(e);return t.__chain__=!0,t}function Nc(e,t){return t(e),e}function Pc(e,t){return t(e)}var Fc=Do(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,a=function(t){return ai(t,e)};return t>1||this.__actions__.length||!(i instanceof vr)||!Jo(r)?this.thru(a):(i=i.slice(r,+r+ +!!t),i.__actions__.push({func:Pc,args:[a],thisArg:n}),new _r(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e}))});function Ic(){return Mc(this)}function Lc(){return new _r(this.value(),this.__chain__)}function Rc(){this.__values__===n&&(this.__values__=Mu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}}function zc(){return this}function Bc(e){for(var t,r=this;r instanceof gr;){var i=Ss(r);i.__index__=0,i.__values__=n,t?a.__wrapped__=i:t=i;var a=i;r=r.__wrapped__}return a.__wrapped__=e,t}function Vc(){var e=this.__wrapped__;if(e instanceof vr){var t=e;return this.__actions__.length&&(t=new vr(this)),t=t.reverse(),t.__actions__.push({func:Pc,args:[nc],thisArg:n}),new _r(t,this.__chain__)}return this.thru(nc)}function Hc(){return Da(this.__wrapped__,this.__actions__)}var Uc=Xa(function(e,t,n){F.call(e,n)?++e[n]:ii(e,n,1)});function Wc(e,t,r){var i=Y(e)?dn:mi;return r&&Yo(e,t,r)&&(t=n),i(e,q(t,3))}function Gc(e,t){return(Y(e)?fn:_i)(e,q(t,3))}var Kc=ao(Ps),qc=ao(Fs);function Jc(e,t){return vi(rl(e,t),1)}function Yc(e,t){return vi(rl(e,t),h)}function Xc(e,t,r){return r=r===n?1:X(r),vi(rl(e,t),r)}function Zc(e,t){return(Y(e)?H:fi)(e,q(t,3))}function Qc(e,t){return(Y(e)?un:pi)(e,q(t,3))}var $c=Xa(function(e,t,n){F.call(e,n)?e[n].push(t):ii(e,n,[t])});function el(e,t,n,r){e=Xl(e)?e:Ed(e),n=n&&!r?X(n):0;var i=e.length;return n<0&&(n=Rt(i+n,0)),wu(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Tn(e,t,n)>-1}var tl=K(function(e,t,n){var r=-1,i=typeof t==`function`,a=Xl(e)?Le(e.length):[];return fi(e,function(e){a[++r]=i?cn(t,e,n):Ni(e,t,n)}),a}),nl=Xa(function(e,t,n){ii(e,n,t)});function rl(e,t){return(Y(e)?hn:Yi)(e,q(t,3))}function il(e,t,r,i){return e==null?[]:(Y(t)||(t=t==null?[]:[t]),r=i?n:r,Y(r)||(r=r==null?[]:[r]),ta(e,t,r))}var al=Xa(function(e,t,n){e[+!n].push(t)},function(){return[[],[]]});function ol(e,t,n){var r=Y(e)?_n:jn,i=arguments.length<3;return r(e,q(t,4),n,i,fi)}function sl(e,t,n){var r=Y(e)?vn:jn,i=arguments.length<3;return r(e,q(t,4),n,i,pi)}function cl(e,t){return(Y(e)?fn:_i)(e,Ol(q(t,3)))}function ll(e){return(Y(e)?Yr:ua)(e)}function ul(e,t,r){return t=(r?Yo(e,t,r):t===n)?1:X(t),(Y(e)?Xr:da)(e,t)}function dl(e){return(Y(e)?Zr:ha)(e)}function fl(e){if(e==null)return 0;if(Xl(e))return wu(e)?rr(e):e.length;var t=zo(e);return t==ie||t==ce?e.size:Ki(e).length}function pl(e,t,r){var i=Y(e)?yn:_a;return r&&Yo(e,t,r)&&(t=n),i(e,q(t,3))}var ml=K(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Yo(e,t[0],t[1])?t=[]:n>2&&Yo(t[0],t[1],t[2])&&(t=[t[0]]),ta(e,vi(t,1),[])}),hl=Ot||function(){return Xt.Date.now()};function gl(e,t){if(typeof t!=`function`)throw new ot(r);return e=X(e),function(){if(--e<1)return t.apply(this,arguments)}}function _l(e,t,r){return t=r?n:t,t=e&&t==null?e.length:t,bo(e,f,n,n,n,n,t)}function vl(e,t){var i;if(typeof t!=`function`)throw new ot(r);return e=X(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var yl=K(function(e,t,n){var r=o;if(n.length){var i=Qn(n,Mo(yl));r|=u}return bo(e,r,t,n,i)}),bl=K(function(e,t,n){var r=o|s;if(n.length){var i=Qn(n,Mo(bl));r|=u}return bo(t,r,e,n,i)});function xl(e,t,r){t=r?n:t;var i=bo(e,c,n,n,n,n,n,t);return i.placeholder=xl.placeholder,i}function Sl(e,t,r){t=r?n:t;var i=bo(e,l,n,n,n,n,n,t);return i.placeholder=Sl.placeholder,i}function Cl(e,t,i){var a,o,s,c,l,u,d=0,f=!1,p=!1,m=!0;if(typeof e!=`function`)throw new ot(r);t=Fu(t)||0,uu(i)&&(f=!!i.leading,p=`maxWait`in i,s=p?Rt(Fu(i.maxWait)||0,t):s,m=`trailing`in i?!!i.trailing:m);function h(t){var r=a,i=o;return a=o=n,d=t,c=e.apply(i,r),c}function g(e){return d=e,l=ps(y,t),f?h(e):c}function _(e){var n=e-u,r=e-d,i=t-n;return p?Ht(i,s-r):i}function v(e){var r=e-u,i=e-d;return u===n||r>=t||r<0||p&&i>=s}function y(){var e=hl();if(v(e))return b(e);l=ps(y,_(e))}function b(e){return l=n,m&&a?h(e):(a=o=n,c)}function x(){l!==n&&Fa(l),d=0,a=u=o=l=n}function ee(){return l===n?c:b(hl())}function S(){var e=hl(),r=v(e);if(a=arguments,o=this,u=e,r){if(l===n)return g(u);if(p)return Fa(l),l=ps(y,t),h(u)}return l===n&&(l=ps(y,t)),c}return S.cancel=x,S.flush=ee,S}var wl=K(function(e,t){return ui(e,1,t)}),Tl=K(function(e,t,n){return ui(e,Fu(t)||0,n)});function El(e){return bo(e,m)}function Dl(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw new ot(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Dl.Cache||Nr),n}Dl.Cache=Nr;function Ol(e){if(typeof e!=`function`)throw new ot(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function kl(e){return vl(2,e)}var Al=Na(function(e,t){t=t.length==1&&Y(t[0])?hn(t[0],Ln(q())):hn(vi(t,1),Ln(q()));var n=t.length;return K(function(r){for(var i=-1,a=Ht(r.length,n);++i<a;)r[i]=t[i].call(this,r[i]);return cn(e,this,r)})}),jl=K(function(e,t){return bo(e,u,n,t,Qn(t,Mo(jl)))}),Ml=K(function(e,t){return bo(e,d,n,t,Qn(t,Mo(Ml)))}),Nl=Do(function(e,t){return bo(e,p,n,n,n,t)});function Pl(e,t){if(typeof e!=`function`)throw new ot(r);return t=t===n?t:X(t),K(e,t)}function Fl(e,t){if(typeof e!=`function`)throw new ot(r);return t=t==null?0:Rt(X(t),0),K(function(n){var r=n[t],i=Pa(n,0,t);return r&&gn(i,r),cn(e,this,i)})}function Il(e,t,n){var i=!0,a=!0;if(typeof e!=`function`)throw new ot(r);return uu(n)&&(i=`leading`in n?!!n.leading:i,a=`trailing`in n?!!n.trailing:a),Cl(e,t,{leading:i,maxWait:t,trailing:a})}function Ll(e){return _l(e,1)}function Rl(e,t){return jl(ja(t),e)}function zl(){if(!arguments.length)return[];var e=arguments[0];return Y(e)?e:[e]}function Bl(e){return si(e,4)}function Vl(e,t){return t=typeof t==`function`?t:n,si(e,4,t)}function Hl(e){return si(e,5)}function Ul(e,t){return t=typeof t==`function`?t:n,si(e,5,t)}function Wl(e,t){return t==null||li(e,t,sd(t))}function Gl(e,t){return e===t||e!==e&&t!==t}var Kl=ho(Di),ql=ho(function(e,t){return e>=t}),Jl=Pi(function(){return arguments}())?Pi:function(e){return du(e)&&F.call(e,`callee`)&&!Ct.call(e,`callee`)},Y=Le.isArray,Yl=tn?Ln(tn):Fi;function Xl(e){return e!=null&&lu(e.length)&&!su(e)}function Zl(e){return du(e)&&Xl(e)}function Ql(e){return e===!0||e===!1||du(e)&&Ei(e)==T}var $l=Nt||Mf,eu=nn?Ln(nn):Ii;function tu(e){return du(e)&&e.nodeType===1&&!bu(e)}function nu(e){if(e==null)return!0;if(Xl(e)&&(Y(e)||typeof e==`string`||typeof e.splice==`function`||$l(e)||Eu(e)||Jl(e)))return!e.length;var t=zo(e);if(t==ie||t==ce)return!e.size;if(ts(e))return!Ki(e).length;for(var n in e)if(F.call(e,n))return!1;return!0}function ru(e,t){return Li(e,t)}function iu(e,t,r){r=typeof r==`function`?r:n;var i=r?r(e,t):n;return i===n?Li(e,t,n,r):!!i}function au(e){if(!du(e))return!1;var t=Ei(e);return t==D||t==E||typeof e.message==`string`&&typeof e.name==`string`&&!bu(e)}function ou(e){return typeof e==`number`&&It(e)}function su(e){if(!uu(e))return!1;var t=Ei(e);return t==ne||t==re||t==w||t==oe}function cu(e){return typeof e==`number`&&e==X(e)}function lu(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=g}function uu(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function du(e){return typeof e==`object`&&!!e}var fu=rn?Ln(rn):zi;function pu(e,t){return e===t||Bi(e,t,Po(t))}function mu(e,t,r){return r=typeof r==`function`?r:n,Bi(e,t,Po(t),r)}function hu(e){return yu(e)&&e!=+e}function gu(e){if(es(e))throw new et(`Unsupported core-js use. Try https://npms.io/search?q=ponyfill.`);return Vi(e)}function _u(e){return e===null}function vu(e){return e==null}function yu(e){return typeof e==`number`||du(e)&&Ei(e)==O}function bu(e){if(!du(e)||Ei(e)!=A)return!1;var t=xt(e);if(t===null)return!0;var n=F.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&dt.call(n)==ht}var xu=an?Ln(an):Hi;function Su(e){return cu(e)&&e>=-g&&e<=g}var Cu=on?Ln(on):Ui;function wu(e){return typeof e==`string`||!Y(e)&&du(e)&&Ei(e)==le}function Tu(e){return typeof e==`symbol`||du(e)&&Ei(e)==ue}var Eu=sn?Ln(sn):Wi;function Du(e){return e===n}function Ou(e){return du(e)&&zo(e)==fe}function ku(e){return du(e)&&Ei(e)==pe}var Au=ho(Ji),ju=ho(function(e,t){return e<=t});function Mu(e){if(!e)return[];if(Xl(e))return wu(e)?ir(e):Ka(e);if(Et&&e[Et])return Yn(e[Et]());var t=zo(e);return(t==ie?Xn:t==ce?$n:Ed)(e)}function Nu(e){return e?(e=Fu(e),e===h||e===-1/0?(e<0?-1:1)*_:e===e?e:0):e===0?e:0}function X(e){var t=Nu(e),n=t%1;return t===t?n?t-n:t:0}function Pu(e){return e?oi(X(e),0,y):0}function Fu(e){if(typeof e==`number`)return e;if(Tu(e))return v;if(uu(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=uu(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=In(e);var n=qe.test(e);return n||Ye.test(e)?qt(e.slice(2),n?2:8):Ke.test(e)?v:+e}function Iu(e){return qa(e,cd(e))}function Lu(e){return e?oi(X(e),-g,g):e===0?e:0}function Ru(e){return e==null?``:Sa(e)}var zu=Za(function(e,t){if(ts(t)||Xl(t))qa(t,sd(t),e);else for(var n in t)F.call(t,n)&&$r(e,n,t[n])}),Bu=Za(function(e,t){qa(t,cd(t),e)}),Vu=Za(function(e,t,n,r){qa(t,cd(t),e,r)}),Hu=Za(function(e,t,n,r){qa(t,sd(t),e,r)}),Uu=Do(ai);function Wu(e,t){var n=hr(e);return t==null?n:ni(n,t)}var Gu=K(function(e,t){e=rt(e);var r=-1,i=t.length,a=i>2?t[2]:n;for(a&&Yo(t[0],t[1],a)&&(i=1);++r<i;)for(var o=t[r],s=cd(o),c=-1,l=s.length;++c<l;){var u=s[c],d=e[u];(d===n||Gl(d,lt[u])&&!F.call(e,u))&&(e[u]=o[u])}return e}),Ku=K(function(e){return e.push(n,So),cn(fd,n,e)});function qu(e,t){return Cn(e,q(t,3),xi)}function Ju(e,t){return Cn(e,q(t,3),Si)}function Yu(e,t){return e==null?e:yi(e,q(t,3),cd)}function Xu(e,t){return e==null?e:bi(e,q(t,3),cd)}function Zu(e,t){return e&&xi(e,q(t,3))}function Qu(e,t){return e&&Si(e,q(t,3))}function $u(e){return e==null?[]:Ci(e,sd(e))}function ed(e){return e==null?[]:Ci(e,cd(e))}function td(e,t,r){var i=e==null?n:wi(e,t);return i===n?r:i}function nd(e,t){return e!=null&&Ho(e,t,Oi)}function rd(e,t){return e!=null&&Ho(e,t,ki)}var id=co(function(e,t,n){t!=null&&typeof t.toString!=`function`&&(t=mt.call(t)),e[t]=n},uf(mf)),ad=co(function(e,t,n){t!=null&&typeof t.toString!=`function`&&(t=mt.call(t)),F.call(e,t)?e[t].push(n):e[t]=[n]},q),od=K(Ni);function sd(e){return Xl(e)?Jr(e):Ki(e)}function cd(e){return Xl(e)?Jr(e,!0):qi(e)}function ld(e,t){var n={};return t=q(t,3),xi(e,function(e,r,i){ii(n,t(e,r,i),e)}),n}function ud(e,t){var n={};return t=q(t,3),xi(e,function(e,r,i){ii(n,r,t(e,r,i))}),n}var dd=Za(function(e,t,n){Qi(e,t,n)}),fd=Za(function(e,t,n,r){Qi(e,t,n,r)}),pd=Do(function(e,t){var n={};if(e==null)return n;var r=!1;t=hn(t,function(t){return t=Ma(t,e),r||=t.length>1,t}),qa(e,ko(e),n),r&&(n=si(n,7,Co));for(var i=t.length;i--;)wa(n,t[i]);return n});function md(e,t){return gd(e,Ol(q(t)))}var hd=Do(function(e,t){return e==null?{}:na(e,t)});function gd(e,t){if(e==null)return{};var n=hn(ko(e),function(e){return[e]});return t=q(t),ra(e,n,function(e,n){return t(e,n[0])})}function _d(e,t,r){t=Ma(t,e);var i=-1,a=t.length;for(a||(a=1,e=n);++i<a;){var o=e==null?n:e[ys(t[i])];o===n&&(i=a,o=r),e=su(o)?o.call(e):o}return e}function vd(e,t,n){return e==null?e:fa(e,t,n)}function yd(e,t,r,i){return i=typeof i==`function`?i:n,e==null?e:fa(e,t,r,i)}var bd=yo(sd),xd=yo(cd);function Sd(e,t,n){var r=Y(e),i=r||$l(e)||Eu(e);if(t=q(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:uu(e)&&su(a)?hr(xt(e)):{}}return(i?H:xi)(e,function(e,r,i){return t(n,e,r,i)}),n}function Cd(e,t){return e==null||wa(e,t)}function wd(e,t,n){return e==null?e:Ta(e,t,ja(n))}function Td(e,t,r,i){return i=typeof i==`function`?i:n,e==null?e:Ta(e,t,ja(r),i)}function Ed(e){return e==null?[]:Rn(e,sd(e))}function Dd(e){return e==null?[]:Rn(e,cd(e))}function Od(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=Fu(r),r=r===r?r:0),t!==n&&(t=Fu(t),t=t===t?t:0),oi(Fu(e),t,r)}function kd(e,t,r){return t=Nu(t),r===n?(r=t,t=0):r=Nu(r),e=Fu(e),Ai(e,t,r)}function Ad(e,t,r){if(r&&typeof r!=`boolean`&&Yo(e,t,r)&&(t=r=n),r===n&&(typeof t==`boolean`?(r=t,t=n):typeof e==`boolean`&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=Nu(e),t===n?(t=e,e=0):t=Nu(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var a=Gt();return Ht(e+a*(t-e+Kt(`1e-`+((a+``).length-1))),t)}return sa(e,t)}var jd=no(function(e,t,n){return t=t.toLowerCase(),e+(n?Md(t):t)});function Md(e){return of(Ru(e).toLowerCase())}function Nd(e){return e=Ru(e),e&&e.replace(Ze,Un).replace(Ft,``)}function Pd(e,t,r){e=Ru(e),t=Sa(t);var i=e.length;r=r===n?i:oi(X(r),0,i);var a=r;return r-=t.length,r>=0&&e.slice(r,a)==t}function Fd(e){return e=Ru(e),e&&ke.test(e)?e.replace(j,Wn):e}function Id(e){return e=Ru(e),e&&Fe.test(e)?e.replace(Pe,`\\$&`):e}var Ld=no(function(e,t,n){return e+(n?`-`:``)+t.toLowerCase()}),Rd=no(function(e,t,n){return e+(n?` `:``)+t.toLowerCase()}),zd=to(`toLowerCase`);function Bd(e,t,n){e=Ru(e),t=X(t);var r=t?rr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return fo(jt(i),n)+e+fo(At(i),n)}function Vd(e,t,n){e=Ru(e),t=X(t);var r=t?rr(e):0;return t&&r<t?e+fo(t-r,n):e}function Hd(e,t,n){e=Ru(e),t=X(t);var r=t?rr(e):0;return t&&r<t?fo(t-r,n)+e:e}function Ud(e,t,n){return n||t==null?t=0:t&&=+t,Wt(Ru(e).replace(Ie,``),t||0)}function Wd(e,t,r){return t=(r?Yo(e,t,r):t===n)?1:X(t),la(Ru(e),t)}function Gd(){var e=arguments,t=Ru(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Kd=no(function(e,t,n){return e+(n?`_`:``)+t.toLowerCase()});function qd(e,t,r){return r&&typeof r!=`number`&&Yo(e,t,r)&&(t=r=n),r=r===n?y:r>>>0,r?(e=Ru(e),e&&(typeof t==`string`||t!=null&&!xu(t))&&(t=Sa(t),!t&&qn(e))?Pa(ir(e),0,r):e.split(t,r)):[]}var Jd=no(function(e,t,n){return e+(n?` `:``)+of(t)});function Yd(e,t,n){return e=Ru(e),n=n==null?0:oi(X(n),0,e.length),t=Sa(t),e.slice(n,n+t.length)==t}function Xd(e,t,r){var i=W.templateSettings;r&&Yo(e,t,r)&&(t=n),e=Ru(e),t=Hu({},t,i,xo);var a=Hu({},t.imports,i.imports,xo),o=sd(a),s=Rn(a,o);H(o,function(e){if(He.test(e))throw new et("Invalid `imports` option passed into `_.template`")});var c,l,u=0,d=t.interpolate||Qe,f=`__p += '`,p=it((t.escape||Qe).source+`|`+d.source+`|`+(d===je?We:Qe).source+`|`+(t.evaluate||Qe).source+`|$`,`g`),m=`//# sourceURL=`+(F.call(t,`sourceURL`)?(t.sourceURL+``).replace(/\s/g,` `):`lodash.templateSources[`+ ++Bt+`]`)+`
@@ -201,7 +201,7 @@ lub „Dalej”, aby użyć urządzeń z poprzedniego procesu wykrywania`,proces
201
201
  举个简单的例子: 如果可用存储空间出现问题,您就会立即收到通知,而不用再纠结自动化系统的某些部分为何不再正常工作。
202
202
 
203
203
  您可以根据消息类别自由配置用于通知的适配器(如 Telegram)。如果您最喜欢的消息适配器崩溃了,您也可以配置一个替代消息适配器来接管。`,"notifications wizard category":`此类别中的适配器允许您收到系统中的事件通知并向您发送个性化消息。`,"npm error":`npm错误`,npm_warning:`使用此对话框,您可以直接从 %s 安装 Beta/最新适配器版本。这些版本可能尚未经过全面测试,因此仅当您需要这些版本的修复或新功能时才安装它们。当开发人员认为版本稳定时,它将在稳定存储库中进行更新。`,number:`数`,object:`设备`,"object permissions":`设备权限`,"object(s)":`对象`,of:`/`,offline:`offline`,ok:`好的`,once:`运行一次`,online:`online`,"only in this browser session":`仅在此浏览器会话中`,"open web page":`打开插件的网页`,"or reboot server, then ioBroker should restart and you can be sure that all old processes were finished.":`或重新启动服务器,然后NexoWatt EOS应该重新启动,并且您可以确保所有旧进程都已完成。`,os:`操作系统`,"other permissions":`其他权限`,"output events":`输出事件`,"parent name":`父节点名字`,password:`密码`,permissionError:`权限错误`,"place here":`将文件放在这里`,planned:`计划`,platform:`平台`,point:`点`,popular:`流行`,press_discover:`按“发现”查找网络中的设备(之前关闭网络防火墙/流量分析系统!)
204
- 或“下一步”使用先前发现过程中的设备`,process:`处理`,processes:`流程`,protocols_group:`协议`,"pushover wizard description":`有了 NexoWatt EOS Pushover 适配器,您就可以自己向安卓和 iOS 设备发送信息,并使用 Pushover API 的各种功能。通过这些功能,您不仅可以发送简单的文本信息,还可以附加图片和其他文件。您还可以通过设置不同的优先级或为不同事件设置特定的声音,根据个人需要定制通知。`,raw:`原始(仅限专家)`,read:`读`,"read only":`只读`,"read operation":`读`,readme:`自述`,reload:`重新加载`,"reload instance":`重新加载程序`,repeat:`重复`,repo_update_hint:`您已配置为运行“beta”存储库的自动升级,请注意,如果 beta 存储库处于活动状态,则此适配器将根据此配置自动提取 beta 更新!`,repository:`repository`,rest:`休息(只读)`,restart:`自动重启`,"restart script":`重启自动化`,restartLoop:`重新启动循环`,role:`角色`,runtime:`运行`,save:`保存`,"saved:":`已保存:`,"scenes wizard description":`使用 NexoWatt EOS 场景适配器,您可以将多个数据点组合到场景中,只需点击一下即可触发复杂的操作。试想一下,创建一个名为 "影院 "的场景,在这个场景中,Harmony Hub 会打开所有必要的设备,调暗灯光,并在屏幕降低时打开阅读灯。您还可以设置群组,根据场景的活动或非活动状态,为每个场景定义两种不同的连接数据点状态。`,schedule:`日程`,schedule_group:`时间表`,script_group:`自动化`,"select member by double click":`双击选择成员`,"sendto operation":`发送操作`,"serial number (UUID) in license is for other device":`许可证中的序列号 (UUID) 用于其他设备`,service_group:`保养`,severity:`严重`,"show (default)":`显示(默认)`,"show ignored":`显示被忽略`,"show suggested":`显示建议`,"show/hide item":`显示/隐藏项目`,"signal-cmb wizard description":`有了 NexoWatt EOS Signal-CMB 适配器,您就可以使用 Signal 信使通过 CallMeBot 服务发送消息。支持文本内容和表情符号,让您的信息栩栩如生。用户可以方便地了解智能家居中发生的事件,即使在旅行中也能始终掌握最新信息。`,silly:`愚蠢`,"sql wizard description":`使用 NexoWatt EOS SQL 适配器,您可以记录数据,以便对其进行长期可视化或历史分析。SQL 适配器将数据写入外部 SQL 数据库,该数据库可在同一主机或不同主机上运行。也支持 SQLite 数据库。与历史适配器相比,SQL 更适合记录大量数据,但需要手动设置。`,stable:`稳定`,"standalone MCP adapter":`独立式 MCP 适配器`,state:`州`,"state permissions":`状态权限`,stepEnd:`步骤 (至当前值)`,stepMiddle:`步骤 (中间)`,stepStart:`步骤 (值至下一个)`,stop_admin:`您正在尝试停止当前的管理实例。您将无法通过浏览器配置NexoWatt EOS。您可以稍后通过CLI命令“ iob start %s”启动admin。你确定吗?`,storage_group:`存储`,string:`串`,subscribe:`订阅`,sunday:`星期日`,switch:`开关`,switch_db_note:`建议不要在此设置中更改数据库的类型,因为不会进行任何数据迁移。最好使用CLI命令“ iob setup custom”,以便将所有数据迁移到新数据库。确定要在此处切换数据库类型吗?`,"telegram wizard description":`有了 NexoWatt EOS Telegram 适配器,您就可以通过 Telegram Messenger 向自己发送信息,这样当系统发生变化时,您就可以随时了解最新情况。除文本信息外,您还可以发送图片和其他文件。您甚至可以发送问题,并直接在 NexoWatt EOS 中处理答案。`,"temporary log level":`临时日志级别`,terminal:`终端`,"third-party_group":`第三方`,"this 2 weeks":`这2个星期`,"this adapter does not allow multiple instances":`此插件不允许多个程序同时运行`,"this day":`这天`,"this month":`这个月`,"this week":`本星期`,"this year":`今年`,time:`时间`,"time-and-date_group":`时间和日期`,timeOffset:`时间偏移`,title:`标题`,"to apply one item":`申请一件`,"to apply with children":`申请项目和儿童`,"to fix these issues and upgrade command run again.":`解决这些问题并再次运行upgrade命令。`,today:`今天`,tooltip_ack:`已确认`,tooltip_copyState:`将状态值复制到剪贴板`,tooltip_customConfig:`设定值`,tooltip_deleteObject:`删除物件`,tooltip_editObject:`编辑物件`,tooltip_editState:`修改状态值`,tooltip_from:`资源`,tooltip_lc:`最后更改时间`,tooltip_quality:`质量`,tooltip_ts:`时间戳记`,tooltip_user:`用户`,tooltip_value:`值`,true:`正常`,ts:`时间戳`,type:`类型`,unit:`单元`,unknown:`未知`,update:`刷新`,"update adapter information":`更新插件信息`,update_info_no_net:`有关更新控制器的信息,请访问以下页面: <a href="https://github.com/NexoWatt EOS/NexoWatt EOS.docs/blob/master/admin/zh-cn/controller-upgrade.md" target="_blank">Update JS-Contoller</a>`,updated:`刷新`,updates:`刷新`,"updating %s to %s...":`更新 %s 到 %s...`,upload:`上传`,"use GitHub for issues":`我们重视您对我们软件的评分和想法。对于错误报告,请使用我们的 GitHub 问题跟踪器,当您留下评论时,请考虑未解决的问题可能会影响您的体验。您的反馈有助于我们改善。感谢您成为我们社区的一部分!`,"user permissions":`用户权限`,users:`用户`,"users permissions":`用户权限`,utility_group:`实用工具`,val:`值`,value:`值`,"value.from":`来自于`,"value.lc":`上次更新`,"value.q":`质量`,"value.ts":`时间戳`,"value.val":`值`,vehicle_group:`车辆`,version:`版本`,"vis-2 wizard description":`NexoWatt EOS Vis 2 适配器是为您的智能家居提供的现代化、功能强大的可视化解决方案。有了这个适配器,您就可以根据自己的意愿,用现代小部件创建自己的可视化系统。无论您是想将仪表盘设计成简约风格还是具有多种功能,都有无限可能。按自己喜欢的方式设计智能家居界面吧!`,vis_group:`NexoWatt EOS.vis`,visualisation_group:`可视化`,"visualization wizard category":`借助此类适配器,您可以构建仪表板以通过 NexoWatt EOS Visu 应用程序或 Web 界面控制您的家庭。`,"visualization-icons_group":`可视化图标`,"visualization-widgets_group":`可视化小部件`,visualization_group:`可视化`,vote:`投票`,vote21:`选票`,votes:`票数`,votes2:`选票`,warn:`警告`,weather:`天气`,"weather wizard category":`通过天气适配器,您可以获得当地天气信息并将其用于可视化和自动化。`,weather_group:`天气`,"weatherunderground wizard description":`有了 NexoWatt EOS Weather Underground 适配器,您就可以在 NexoWatt EOS 中使用天气数据。例如,这意味着下雨时可以提醒您关闭打开的窗户,或者在暴风雨来临时自动收回遮阳篷。这样,您的智能家居就能更好地适应当前的天气条件,确保更加舒适和安全。`,wetty:`Wetty`,"with js-controller":`带有 js 控制器`,"wizard adapter general description":`从您希望直接安装的适配器中进行选择。您可以稍后在 "适配器 "选项卡中安装其他适配器。`,"wizard welcome description":`此向导将引导您完成新 ioBroker 安装的最重要设置。只需几分钟,所有设置以后都可以更改。`,write:`写`,"write operation":`写`,wrongPassword:`用户名或密码无效`,yesterday:`昨天`,"Åland Islands":`奥兰群岛`,"Serial port":`串口`,"TCP port":`TCP 端口`,"UDP port":`UDP 端口`,"USB device":`USB 设备`,Bluetooth:`蓝牙`,GPIO:`GPIO`,"Also registered by: %s":`也被以下实例注册:%s`,Resource:`资源`,Registered:`注册时间`,"The instance runs and holds the resource":`实例正在运行并占用该资源`,"The instance does not run and would take the resource when started":`实例未运行,启动时将占用该资源`,"In use":`使用中`,Reserved:`已预留`,"Used resources":`已占用的资源`,"No instance has registered a resource":`没有实例注册资源`,'Adapter "%s" allows only one instance, and %s exists already':`适配器 "%s" 只允许一个实例,而 %s 已存在`,'Adapter "%s" allows only one instance per host, and %s exists already on host "%s"':`适配器 "%s" 每个主机只允许一个实例,而 %s 已存在于主机 "%s" 上`,"The admin was updated. Please load the page anew.":`管理界面已更新,请重新加载页面。`,"The connection is not ready yet. Please wait a moment and try again.":`连接尚未就绪。请稍等片刻后重试。`},gy=`admin.chunkReloadTs`,_y=2e4;function vy(e){let{message:t,name:n}=typeof e==`object`&&e?e:{message:e};return typeof t==`string`?t.includes(`Failed to fetch dynamically imported module`)||t.includes(`error loading dynamically imported module`)||t.includes(`Importing a module script failed`)||t.includes(`Unable to preload CSS`)||n===`ChunkLoadError`:!1}function yy(){let e=0;try{e=parseInt(window.sessionStorage.getItem(gy)||`0`,10)||0}catch{}if(Date.now()-e<_y)return!1;try{window.sessionStorage.setItem(gy,Date.now().toString())}catch{}return window.location.reload(),!0}function by(e){yy()&&e.preventDefault()}function xy(e){return Ht.lazy(()=>e().catch(e=>{if(vy(e)&&yy())return new Promise(()=>{});throw e}))}x();var Sy=[`tab-overview`,`tab-adapters`,`tab-instances`,`tab-logs`],Cy=[`tab-overview`,`tab-intro`,`tab-adapters`,`tab-instances`,`tab-objects`,`tab-enums`,`tab-logs`,`tab-users`,`tab-hosts`,`tab-files`,`tab-devicemanager`],wy=xy(()=>r(()=>import(`./Overview-CgnpH8e8.js`),__vite__mapDeps([35,1,2,3,36,9,15,25,37,28]),import.meta.url)),Ty=xy(()=>r(()=>import(`./Adapters-c250DTTU.js`),__vite__mapDeps([38,1,2,3,36,4,5,6,39,7,8,9,40,41,10,42,11,12,43,44]),import.meta.url)),Ey=xy(()=>r(()=>import(`./Instances-PPTEPJQN.js`),__vite__mapDeps([45,2,1,3,36,4,5,9,39,7,8,42,43,44,46,47,20,48,22,49,23]),import.meta.url)),Dy=xy(()=>r(()=>import(`./Intro-9c_ynpJu.js`),__vite__mapDeps([50,1,2,3,36,7,9,18,21,49,23,24,25]),import.meta.url)),Oy=xy(()=>r(()=>import(`./Logs-Brgb9kR_.js`),__vite__mapDeps([51,1,2,3,36,12,26]),import.meta.url)),ky=xy(()=>r(()=>import(`./Files-Bf8oZSk6.js`),__vite__mapDeps([52,2,1,3,36,43,44]),import.meta.url)),Ay=xy(()=>r(()=>import(`./Objects-DHVNfs_x.js`),__vite__mapDeps([53,2,1,3,31,36,47,44,41,11,43,17,34,33,27,37]),import.meta.url)),jy=xy(()=>r(()=>import(`./Users-oRpvFtQR.js`),__vite__mapDeps([54,1,2,3,36,8,55,16,29]),import.meta.url)),My=xy(()=>r(()=>import(`./Enums-CWJJ2zNF.js`),__vite__mapDeps([56,2,1,3,36,55,14,15,16,17,18]),import.meta.url)),Ny=xy(()=>r(()=>import(`./CustomTab-B4ywHrnT.js`),__vite__mapDeps([57,2,1,3,36,47]),import.meta.url)),Py=xy(()=>r(()=>import(`./ConfigManager-BBUXk8hZ.js`),__vite__mapDeps([58,1,2,3,13]),import.meta.url)),Fy=xy(()=>r(()=>import(`./Hosts-8gg41ODb.js`),__vite__mapDeps([59,2,1,3,36,5,40,41,10,42,43,44,19,20,21,48]),import.meta.url)),Iy=xy(()=>r(()=>import(`./EasyMode-A2E3hSMo.js`),__vite__mapDeps([60,1,2,3,46,36,47]),import.meta.url)),Ly={},Ry=()=>String(window.NEXOWATT_EOS_ACCESS_ROLE||`unknown`).toLowerCase(),zy=(e=Ry())=>[`admin`,`service`].includes(e);(window.location.search||``).replace(/^\?/,``).split(`&`).forEach(e=>{let t=e.split(`=`);t[0]&&(Ly[t[0]]=t[1]===void 0||decodeURIComponent(t[1]))});var By={root:{display:`flex`,height:`100%`},appBar:e=>({transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})}),logoWhite:{backgroundColor:`#FFFFFF`},appBarShift:e=>({width:`calc(100% - 180px)`,ml:180/8,transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}),appBarShiftEdit:e=>({width:`calc(100% - 250px)`,ml:250/8,transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}),appBarShiftCompact:e=>({width:`calc(100% - 50px)`,ml:50/8,transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}),menuButton:{marginRight:16},hide:{display:`none`},content:e=>{var t,n,r;return{flexGrow:1,padding:1,paddingTop:0,transition:e.transitions.create(`margin`,{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowY:`auto`,mt:`${(t=e.mixins.toolbar)==null?void 0:t.minHeight}px`,"@media (min-width:0px) and (orientation: landscape)":{mt:(n=e.mixins.toolbar[`@media (min-width:0px) and (orientation: landscape)`])!=null&&n.minHeight?`${e.mixins.toolbar[`@media (min-width:0px) and (orientation: landscape)`].minHeight}px`:void 0},"@media (min-width:600px)":{mt:(r=e.mixins.toolbar[`@media (min-width:600px)`])!=null&&r.minHeight?`${e.mixins.toolbar[`@media (min-width:600px)`].minHeight}px`:void 0}}},contentMargin:{ml:-180/8},contentMarginEdit:{ml:-250/8},contentMarginCompact:{ml:-50/8},contentShift:e=>({transition:e.transitions.create(`margin`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),ml:0}),expertIcon:{width:22,height:22},expertIconActive:{},baseSettingsButton:{color:`red`},avatarNotVisible:{opacity:0,marginLeft:5,transition:`opacity 0.3s`,width:`initial`},avatarVisible:{opacity:1},cmd:{animation:`1s linear infinite alternate $myEffect`,opacity:.2},errorCmd:{color:`#a90000`,animation:`0.2s linear infinite alternate myEffect2`},performed:e=>({color:e.palette.mode===`light`?`#3bfd44`:`#388e3c`,animation:`0.2s linear infinite alternate myEffect2`}),wrapperButtons:{display:`flex`,marginRight:`auto`,overflowY:`auto`,alignItems:`center`},flexGrow:{flexGrow:2},floatingButtons:{position:`fixed`,top:4,left:4,zIndex:1200,display:`flex`,gap:.5},contentNoAppBar:{mt:0,"@media (min-width:0px) and (orientation: landscape)":{mt:0},"@media (min-width:600px)":{mt:0}},contentMenuButtonSpace:{pt:`44px`},styleVersion:{fontSize:10},wrapperName:{display:`flex`,flexDirection:`column`,marginRight:10},expertBadge:{mt:`11px`,mr:`11px`},siteName:{lineHeight:`48px`,fontSize:24,marginLeft:10,marginRight:10,display:`inline-block`,verticalAlign:`middle`},tooltip:{pointerEvents:`none`}};function Vy(e){return e.native||={localStorage:{},sessionStorage:{}},e.native.localStorage||(e.native={localStorage:e.native,sessionStorage:{}}),e.native.sessionStorage||={},e}var Hy=1e4,Uy=5e3,Wy=5e3,Gy=1e3;function Ky(e,t){let n;return Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>r(Error(`${t} got no answer`)),Hy)})]).finally(()=>clearTimeout(n))}function qy(e,t){for(let n of[`localStorage`,`sessionStorage`])for(let[r,i]of Object.entries(t[n]))i===null?delete e[n][r]:e[n][r]=i}var Jy={_id:``,type:`state`,common:{name:`Admin settings`,type:`boolean`,read:!0,write:!1,role:`state`},native:{localStorage:{},sessionStorage:{}}},Yy=class e extends d{constructor(t){super(t),M(this,`translations`,void 0),M(this,`_tempAllStored`,!0),M(this,`refConfigIframe`,null),M(this,`expireInSecInterval`,null),M(this,`toggleThemePossible`,void 0),M(this,`adminGuiConfig`,void 0),M(this,`logsWorker`,null),M(this,`instancesWorker`,null),M(this,`hostsWorker`,null),M(this,`adaptersWorker`,null),M(this,`objectsWorker`,null),M(this,`repoInfoPromise`,null),M(this,`repoInfoRun`,0),M(this,`guiSettings`,null),M(this,`guiSettingsChanges`,{localStorage:{},sessionStorage:{}}),M(this,`guiSettingsWrite`,Promise.resolve()),M(this,`localStorageTimer`,null),M(this,`guiSettingsRetryTimer`,null),M(this,`languageSet`,!1),M(this,`socket`,null),M(this,`adminInstance`,``),M(this,`newsSubscription`,void 0),M(this,`newsSubscribeTimer`,null),M(this,`doNotAskSessionExpiration`,0),M(this,`tabsInfo`,null),M(this,`pendingCommandTimer`,null),M(this,`pendingCommand`,null),M(this,`chatBusy`,!1),M(this,`lastHash`,window.location.hash),M(this,`chatLeaveConfirmed`,!1),M(this,`connectionLostAt`,0),M(this,`localStorageGetItem`,e=>{var t;return(t=this.guiSettings)==null?void 0:t.native.localStorage[e]}),M(this,`localStorageSetItem`,(e,t)=>{if(t===null)t=`null`;else if(t===void 0){this.localStorageRemoveItem(e);return}this.guiSettings&&(this.guiSettings.native.localStorage[e]=t.toString(),this.guiSettingsChanges.localStorage[e]=t.toString()),this.localStorageSave()}),M(this,`localStorageRemoveItem`,e=>{this.guiSettings&&Object.prototype.hasOwnProperty.call(this.guiSettings.native.localStorage,e)&&(delete this.guiSettings.native.localStorage[e],this.guiSettingsChanges.localStorage[e]=null,this.localStorageSave())}),M(this,`sessionStorageGetItem`,e=>{var t;return(t=this.guiSettings)==null?void 0:t.native.sessionStorage[e]}),M(this,`sessionStorageSetItem`,(e,t)=>{if(t===null)t=`null`;else if(t===void 0){this.sessionStorageRemoveItem(e);return}this.guiSettings&&(this.guiSettings.native.sessionStorage[e]=t.toString(),this.guiSettingsChanges.sessionStorage[e]=t.toString()),this.localStorageSave()}),M(this,`sessionStorageRemoveItem`,e=>{this.guiSettings&&Object.prototype.hasOwnProperty.call(this.guiSettings.native.sessionStorage,e)&&(delete this.guiSettings.native.sessionStorage[e],this.guiSettingsChanges.sessionStorage[e]=null,this.localStorageSave())}),M(this,`toggleTranslation`,()=>{(window._localStorage||window.localStorage).setItem(`App.noTranslation`,this.state.noTranslation?`false`:`true`),this.setState({noTranslation:!this.state.noTranslation})}),M(this,`onEosPolicyChanged`,e=>{var t;let n=e instanceof CustomEvent?e.detail:null;if(!n||typeof n!=`object`||!(`policy`in n))return;let r=n.policy,i=`unknown`;if(r&&typeof r==`object`&&`authenticated`in r&&r.authenticated===!0&&`role`in r&&typeof r.role==`string`&&[`admin`,`service`,`installer`,`enduser`].includes(r.role)&&!(`mustChangePassword`in r&&r.mustChangePassword===!0)&&(i=r.role),window.NEXOWATT_EOS_ACCESS_ROLE=i,i===this.state.eosAccessRole)return;let a=[`admin`,`service`].includes(i),o=(window._sessionStorage||window.sessionStorage).getItem(`App.expertMode`);this.setState({eosAccessRole:i,expertMode:a&&(o?o===`true`:!!((t=this.state.systemConfig)!=null&&t.common.expertMode)),expertModeDialog:!1})}),M(this,`updateHosts`,e=>{let t=JSON.parse(JSON.stringify(this.state.hosts));e.forEach(e=>{let n=t.find(t=>t._id===e.id);if(n){let r=t.indexOf(n);e.obj?t[r]=e.obj:t.splice(r,1)}else t.push(e.obj)}),this.setState({hosts:t})}),M(this,`repoChangeHandler`,()=>{this.readRepoAndInstalledInfo(this.state.currentHost,{update:!0}).then(()=>console.log(`Repo updated!`))}),M(this,`adaptersChangeHandler`,e=>{let t=JSON.parse(JSON.stringify(this.state.installed)),n=!1;e.forEach(e=>{let r=e.id.split(`.`)[2];e.type===`deleted`||!e.obj?t[r]&&(n=!0,delete t[r]):t[r]?Object.keys(t[r]).forEach(i=>{e.obj&&t[r][i]!==e.obj.common[i]&&(t[r][i]=e.obj.common[i],n=!0)}):(t[r]={version:e.obj.common.version},n=!0)}),n&&this.setState({installed:t})}),M(this,`onSessionExpiration`,e=>new Promise(t=>{let n=Math.max(0,e-Date.now()+500);this.expireInSecInterval&&=(clearInterval(this.expireInSecInterval),null),this.expireInSecInterval=setTimeout(()=>{ln.deleteTokensStatic(),window.location.replace(`/login.html`)},n),t(!1)})),M(this,`onDiscoveryAlive`,(e,t)=>{!!(t!=null&&t.val)!==this.state.discoveryAlive&&this.setState({discoveryAlive:!!(t!=null&&t.val)})}),M(this,`onDiscoveryObject`,(e,t)=>{let n=Bv(t);n!==this.state.discoveryProposals&&this.setState({discoveryProposals:n})}),M(this,`getDiscoveryModal`,()=>this.state.systemConfig&&this.socket?E(Kv,{themeType:this.state.themeType,themeName:this.state.themeName,theme:this.state.theme,socket:this.socket,systemConfig:this.state.systemConfig.common,dateFormat:this.state.systemConfig.common.dateFormat,currentHost:this.state.currentHost,defaultLogLevel:this.state.systemConfig.common.defaultLogLevel||`info`,repository:this.state.repository,hosts:this.state.hosts,onClose:()=>d.doNavigate(null)}):null),M(this,`handleNewNotifications`,async e=>{let t={warning:0,other:0};if(!e)this.setState({noNotifications:t,notifications:{}});else{for(let n of Object.values(e))if(n!=null&&n.result){for(let[e,r]of Object.entries(n.result))if(e!==`system`)for(let e of Object.values(r.categories))for(let n of Object.values(e.instances)){let r=e.severity===`alert`;t[r?`warning`:`other`]+=n.messages.length}}if(this.instancesWorker){let n=await this.instancesWorker.getObjects();this.setState({noNotifications:t,notifications:{notifications:e,instances:n}})}}}),M(this,`showAdaptersWarning`,async(e,t)=>{if(!e||!e[t]||!e[t].result)return;let n=e[t].result;if(n!=null&&n.system&&Object.keys(n.system.categories).length){var r;await((r=this.instancesWorker)==null?void 0:r.getObjects().then(e=>e&&this.setState({showHostWarning:{host:t,instances:e,result:n}})))}}),M(this,`onNews`,async(e,t)=>{if(!this.socket)throw Error(`Socket not initialized`);try{var n;if(!((n=this.state.systemConfig)!=null&&n.common.licenseConfirmed))return;let e=await this.socket.getState(this.ownNewsState(`newsLastId`));if(t!=null&&t.val){let n=null;try{n=JSON.parse(t.val)}catch{console.error(`Cannot parse news: ${t.val}`)}if(n!=null&&n.length&&n[0].id!==(e==null?void 0:e.val)){var r,i,a;let t=await this.socket.getUuid(),o=await this.socket.getHostInfo(this.state.currentHost).catch(()=>null),s=await this.socket.getCompactInstances().catch(()=>null),c;if(this.state.currentHost){let e=await this.socket.getDiagData(this.state.currentHost,`normal`);c=e==null?void 0:e.objectsType}let l=await((r=this.objectsWorker)==null?void 0:r.getObjects()),u=Object.keys(l||{}).length;await((i=this.repoInfoPromise)==null?void 0:i.catch(()=>{}));let d=bd(n,e==null?void 0:e.val,{lang:j.getLanguage(),adapters:this.state.adapters,instances:s||{},nodeVersion:o&&o[`Node.js`]||`?`,npmVersion:o&&o.NPM||`?`,jsControllerVersion:((a=this.state.installed)==null||(a=a[`js-controller`])==null?void 0:a.version)||``,os:o&&o.os||`?`,activeRepo:this.state.systemConfig.common.activeRepo,uuid:t,objectsDbType:c||`jsonl`,noObjects:u});d!=null&&d.length&&this.setState({showNews:{checkNews:d,lastNewsId:e==null?void 0:e.val}})}}}catch(e){console.error(`Could not process news: ${e.stack}`),this.showAlert(`Could not process news: ${e.stack}`,`error`)}}),M(this,`logsWorkerChanged`,e=>{var t;(t=this.logsWorker)==null||t.setCurrentHost(e)}),M(this,`onHashChanged`,()=>{let t=window.location.hash;this.chatBlocksLeaving(e.tabOfHash(t))?(window.history.replaceState(null,``,this.lastHash||`${window.location.pathname}${window.location.search}`),this.setState({chatLeaveDialog:{target:{hash:t},reason:`busy`}})):(this.lastHash=t,this.setState({currentTab:d.getLocation()},()=>this.setCurrentTabTitle()))}),M(this,`toggleTheme`,t=>{let n=this.state.themeName,r=t||Ne.toggleTheme(n),i=e.createTheme(r);this.setState({theme:i,themeName:r,themeType:e.getThemeType(i)},()=>{var e,t;(e=this.refConfigIframe)==null||(e=e.contentWindow)==null||e.postMessage(`updateTheme`,`*`),(t=this.refConfigIframe)==null||(t=t.contentWindow)==null||t.postMessage({type:`updateTheme`,themeName:r},`*`)})}),M(this,`handleNavigation`,(e,t,n)=>{var r;if(e){if(this.chatBlocksLeaving(e)){this.setState({chatLeaveDialog:{target:{tab:e,subTab:t,param:n},reason:`busy`}});return}this._tempAllStored?(d.doNavigate(e,t,n),this.lastHash=window.location.hash,this.setState({currentTab:d.getLocation()})):this.setState({dataNotStoredDialog:!0,dataNotStoredTab:{tab:e,subTab:t,param:n}})}(this.props.width===`xs`||this.props.width===`sm`)&&this.handleDrawerState(J.closed),e||=((r=this.state.currentTab)==null?void 0:r.tab)||``,this.setTitle(e.replace(`tab-`,``))});try{window.alert=e=>{let t=(e==null?void 0:e.toString())??``,n=Date.now();this.isCausedByConnectionLoss(t,n)?console.warn(`Not shown, as the connection to admin is lost: ${t}`):t.toLowerCase().includes(`error`)?(console.error(t),setTimeout(()=>{this.isCausedByConnectionLoss(t,n)?console.warn(`Not shown, as the connection to admin is lost: ${t}`):this.showAlert(t,`error`)},Gy)):(console.log(t),this.showAlert(t,`info`))}}catch{}this.translations=Rt;let n={en:ay,de:oy,ru:sy,pt:cy,nl:ly,fr:uy,it:dy,es:fy,pl:py,uk:my,"zh-cn":hy};Object.keys(n).forEach(e=>Object.assign(this.translations[e],n[e])),j.extendTranslations(this.translations),j.setLanguage((window.navigator.language||window.navigator.userLanguage||`en`).substring(0,2).toLowerCase()),this.adminGuiConfig={admin:{menu:{},settings:{},adapters:{},login:{}}};let r=window.vendorPrefix;if(this.toggleThemePossible=!r||r===`@@vendorPrefix@@`||r===`MV`,Ly.login){let t=e.createTheme();this.state={login:!0,theme:t,themeName:e.getThemeName(t),themeType:e.getThemeType(t)}}else{let t=(window._localStorage||window.localStorage).getItem(`App.drawerState`),n;n=t?parseInt(t,10):this.props.width===`xs`?J.closed:J.opened;let r=e.createTheme();Object.defineProperty(window,"configNotSaved",{get:()=>this.state.configNotSaved,set:e=>{let t=!e;t!==this._tempAllStored&&(this._tempAllStored=t,this.forceUpdate())},configurable:!0}),this.state={connected:!1,progress:0,ready:!1,lang:`en`,hostname:window.location.hostname,expertMode:!1,eosAccessRole:Ry(),chatDockWidth:0,hosts:[],currentHost:``,currentHostName:``,ownHost:``,currentTab:d.getLocation(),systemConfig:null,user:null,repository:{},installed:{},waitForRestart:!1,tabs:null,config:{},stateChanged:!1,theme:r,themeName:e.getThemeName(r),themeType:e.getThemeType(r),alert:!1,alertType:`info`,alertMessage:``,drawerState:n,editMenuList:!1,tab:null,dataNotStoredDialog:!1,dataNotStoredTab:null,chatLeaveDialog:null,baseSettingsOpened:!1,unsavedDataInDialog:!1,systemSettingsOpened:!1,cmd:null,cmdDialog:!1,commandHost:null,commandError:!1,commandRunning:!1,wizard:!0,performed:!1,showTips:!1,discoveryAlive:!1,discoveryProposals:0,readTimeoutMs:Xv.getReadTimeoutMs(),showSlowConnectionWarning:!1,versionAdmin:``,forceUpdateAdapters:0,noTranslation:(window._localStorage||window.localStorage).getItem(`App.noTranslation`)!==`false`,cloudNotConnected:!1,cloudReconnect:0,showRedirect:``,redirectCountDown:0,triggerAdapterUpdate:0,updating:!1,notificationsDialog:!1,notifications:{},noNotifications:{warning:0,other:0},configNotSaved:!1,login:!1,showHostWarning:null,adapters:{},askForTokenRefresh:null},this.logsWorker=null,this.instancesWorker=null,this.hostsWorker=null}}static getDerivedStateFromError(e){return{hasGlobalError:e}}componentDidCatch(e){this.setState({hasGlobalError:e})}static async checkSsoResponse(){let e=new URLSearchParams(window.location.search);if(e.has(`ssoCode`)){try{let t=await fetch(sr(`sso-token`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({code:e.get(`ssoCode`)})}),n=await t.json();t.ok&&n.access_token&&ln.saveTokensStatic(n,!0)}catch(e){console.error(`Cannot finish the single sign-on: ${e}`)}window.localStorage.removeItem(`oidc_id_token`),window.location.search=``}else if(e.has(`id_token`)&&(window.localStorage.setItem(`oidc_id_token`,e.get(`id_token`)),window.location.search=``),e.has(`ssoLoginResponse`)){let t=JSON.parse(e.get(`ssoLoginResponse`));ln.saveTokensStatic(t,!0),window.location.search=``}}setUnsavedData(e){e!==this.state.unsavedDataInDialog&&this.setState({unsavedDataInDialog:e})}mustInvertBackground(e){if(!e)return!1;let t=Ne.invertColor(e,!0);return t===`#FFFFFF`&&this.state.themeType===`dark`||t===`#000000`&&this.state.themeType===`light`}localStorageSave(){this.localStorageTimer&&clearTimeout(this.localStorageTimer),this.guiSettingsRetryTimer&&=(clearTimeout(this.guiSettingsRetryTimer),null),this.localStorageTimer=setTimeout(()=>{this.localStorageTimer=null,this.guiSettingsWrite=this.guiSettingsWrite.then(()=>this.writeGuiSettings())},200)}async writeGuiSettings(){let e=this.guiSettingsChanges;if(!this.guiSettings||!this.socket||!Object.keys(e.localStorage).length&&!Object.keys(e.sessionStorage).length)return;this.guiSettingsChanges={localStorage:{},sessionStorage:{}};let t=`system.adapter.${this.adminInstance}.guiSettings`;try{let n=Vy(await Ky(this.socket.getObject(t),`Reading`)||JSON.parse(JSON.stringify(this.guiSettings)));qy(n.native,e),await Ky(this.socket.setObject(t,n),`Writing`),this.guiSettings&&(this.guiSettings=n,qy(this.guiSettings.native,this.guiSettingsChanges))}catch(r){var n;for(let t of[`localStorage`,`sessionStorage`])this.guiSettingsChanges[t]={...e[t],...this.guiSettingsChanges[t]};console.warn(`Could not save "${t}": ${r.message}`),(n=this.socket)!=null&&n.isConnected()&&!this.localStorageTimer&&!this.guiSettingsRetryTimer&&(this.guiSettingsRetryTimer=setTimeout(()=>{this.guiSettingsRetryTimer=null,this.localStorageSave()},Uy))}}async getGUISettings(){let e=null;if(!this.adminInstance||!this.socket)return;let t=!1;try{e=await this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`)}catch(e){t=!0,console.warn(`Could not get "system.adapter.${this.adminInstance}.guiSettings": ${e.message}`)}if(!e&&!t){e=JSON.parse(JSON.stringify(Jy));try{await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`,e)}catch(e){console.warn(`Could not update "system.adapter.${this.adminInstance}.guiSettings": ${e.message}`)}}let n;try{n=await this.socket.getState(`system.adapter.${this.adminInstance}.guiSettings`)}catch{n={val:!1}}if(n!=null&&n.val){this.guiSettings=Vy(e||JSON.parse(JSON.stringify(Jy))),(Object.keys(this.guiSettingsChanges.localStorage).length||Object.keys(this.guiSettingsChanges.sessionStorage).length)&&(qy(this.guiSettings.native,this.guiSettingsChanges),this.localStorageSave()),window._localStorage={getItem:this.localStorageGetItem,setItem:this.localStorageSetItem,removeItem:this.localStorageRemoveItem},window._sessionStorage={getItem:this.sessionStorageGetItem,setItem:this.sessionStorageSetItem,removeItem:this.sessionStorageRemoveItem};let t=(window._localStorage||window.localStorage).getItem(`App.drawerState`),n;n=t?parseInt(t,10):this.props.width===`xs`?J.closed:J.opened;let r=(window._localStorage||window.localStorage).getItem(`App.noTranslation`)!==`false`;this.setState({guiSettings:!0,drawerState:n,noTranslation:r},()=>{Ne.getThemeName()!==this.state.theme.name&&this.toggleTheme(Ne.getThemeName())})}else this.state.guiSettings&&(window._localStorage=void 0,window._sessionStorage=void 0,this.setState({guiSettings:!1}))}async enableGuiSettings(e,t){if(e&&!this.guiSettings&&this.socket){let e=await this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`);this.guiSettings=e||JSON.parse(JSON.stringify(Jy)),t||!this.guiSettings.native||!Object.keys(this.guiSettings.native).length?(this.guiSettings.native={localStorage:{},sessionStorage:{}},Object.keys(window.localStorage).forEach(e=>{e!==`getItem`&&e!==`setItem`&&e!==`removeItem`&&e!==`clear`&&e!==`key`&&e!==`length`&&(this.guiSettings.native.localStorage[e]=window.localStorage.getItem(e))}),Object.keys(window.sessionStorage).forEach(e=>{e!==`getItem`&&e!==`setItem`&&e!==`removeItem`&&e!==`clear`&&e!==`key`&&e!==`length`&&(this.guiSettings.native.sessionStorage[e]=window.sessionStorage.getItem(e))}),await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`,this.guiSettings),await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`,{val:!0,ack:!0})):(await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`,{val:!0,ack:!0}),window.location.reload()),await this.getGUISettings()}else if(!e&&this.guiSettings&&this.socket){if(!await this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`))try{await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`,Jy)}catch(e){console.error(`Cannot create system.adapter.${this.adminInstance}.guiSettings": ${e}`)}window._localStorage=void 0,window._sessionStorage=void 0,Object.keys(window.localStorage).forEach(e=>window.localStorage.removeItem(e)),Object.keys(window.sessionStorage).forEach(e=>window.sessionStorage.removeItem(e)),Object.keys(this.guiSettings.native.localStorage).forEach(e=>window.localStorage.setItem(e,this.guiSettings.native.localStorage[e])),Object.keys(this.guiSettings.native.sessionStorage).forEach(e=>window.sessionStorage.setItem(e,this.guiSettings.native.sessionStorage[e])),this.guiSettings=null,this.guiSettingsChanges={localStorage:{},sessionStorage:{}},this.guiSettingsRetryTimer&&=(clearTimeout(this.guiSettingsRetryTimer),null);try{await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`,{val:!1,ack:!0})}catch(e){window.alert(`Cannot disable settings: ${e}`)}this.setState({guiSettings:!1})}}componentDidMount(){Ly.login?window.location.replace(`/login.html`):(ln.deleteTokensStatic(),window.addEventListener(`vite:preloadError`,by),window.addEventListener(`nexowatt-eos-policy`,this.onEosPolicyChanged),this.state.login||(window.addEventListener(`hashchange`,this.onHashChanged,!1),this.state.currentTab.tab?this.setTitle(this.state.currentTab.tab.replace(`tab-`,``)):this.handleNavigation(`tab-intro`),this.socket=new ln({protocol:window.location.protocol,host:window.location.hostname,name:`eos-admin`,admin5only:!0,port:e.getPort(),cmdTimeout:this.state.readTimeoutMs,autoSubscribes:[`system.adapter.*`],autoSubscribeLog:!0,tokenTimeoutHandler:this.onSessionExpiration,onProgress:async e=>{if(this.socket){if(e===_.CONNECTING)this.state.connected&&(this.connectionLostAt=Date.now()),this.setState({connected:!1});else if(e===_.READY)try{let e=await this.socket.getVersion();console.log(`Stored version: ${this.state.versionAdmin}, new version: ${e.version}`),this.state.versionAdmin&&this.state.versionAdmin!==e.version&&(window.alert(`New adapter version detected. Reloading...`),setTimeout(()=>window.location.reload(),500)),this.adminInstance||=await this.socket.getCurrentInstance(),await this.getGUISettings();let n={connected:!0,progress:100,versionAdmin:e.version,disableMcp:!0};if(this.state.cmd&&/\b(?:admin|eos-admin)(?:@[-.\w]+)?(?:\s+--debug)?$/.test(this.state.cmd))n.commandRunning=!1,n.forceUpdateAdapters=this.state.forceUpdateAdapters+1,this.closeCmdDialog(()=>{this.setState(n),window.location.reload()});else{try{var t;let e=await this.socket.getObject(`system.adapter.${this.adminInstance}`);n.disableMcp=!0,e!=null&&(t=e.native)!=null&&t.language?e.native.language!==j.getLanguage()&&(console.log(`Language changed to ${e.native.language}`),j.setLanguage(e.native.language),this.languageSet?window.location.reload():this.languageSet=!0):this.socket.systemLang!==j.getLanguage()&&(console.log(`Language changed to ${this.socket.systemLang}`),j.setLanguage(this.socket.systemLang),this.languageSet?window.location.reload():this.languageSet=!0)}catch(e){console.error(`Cannot read admin settings: ${e}`)}this.setState(n)}}catch(e){console.error(`Cannot read version: ${e}`),e===`ioBroker is not connected`&&(setInterval(()=>{this.state.cloudReconnect>0?this.setState({cloudReconnect:this.state.cloudReconnect-1}):window.location.reload()},1e3),this.setState({cloudNotConnected:!0,cloudReconnect:10}))}else this.setState({connected:!0,progress:Math.round(_.READY/e*100)})}},onReady:async()=>{var e;if(!this.socket)throw Error(`Socket not initialized`);this.adminGuiConfig={admin:{menu:{},settings:{},adapters:{},login:{}},...(e=this.socket)==null||(e=e.systemConfig)==null||(e=e.native)==null?void 0:e.vendor},this.adminGuiConfig.admin.menu||={},this.adminGuiConfig.admin.settings||={},this.adminGuiConfig.admin.adapters||={},this.adminGuiConfig.admin.login||={};try{var t,n;try{var r;this.adminInstance||=await this.socket.getCurrentInstance(),this.adminInstance||console.error(`Cannot read admin instance!`);let e=await this.socket.getObject(`system.adapter.${this.adminInstance}`);e!=null&&(r=e.native)!=null&&r.language?j.setLanguage(e.native.language):j.setLanguage(this.socket.systemLang)}catch(e){console.warn(`Cannot read the settings of this admin: ${e.message}`),j.setLanguage(this.socket.systemLang)}this.languageSet=!0;let e=!1;try{e=await this.socket.getIsEasyModeStrict()}catch(e){console.warn(`Cannot read the easy mode: ${e.message}`)}if(await this.getGUISettings(),e){let e=await this.socket.getEasyMode();this.setState({lang:this.socket.systemLang,ready:!0,strictEasyMode:!0,easyModeConfigs:e.configs});return}this.logsWorker||=new Fd(this.socket,1e3),this.instancesWorker||=new Ld(this.socket),this.hostsWorker||=new Rd(this.socket),this.adaptersWorker||=new zd(this.socket),this.objectsWorker||=new Bd(this.socket);let a={lang:this.socket.systemLang,ready:!0};try{a.systemConfig=await this.socket.getCompactSystemConfig(),a.wizard=!a.systemConfig.common.licenseConfirmed,a.showTips=!a.wizard&&!a.systemConfig.common.tipsDisabled,await this.findCurrentHost(a),a.currentHost&&this.readRepoAndInstalledInfo(a.currentHost)}catch(e){console.log(`Error reading repo in onReady: ${e.stack}`)}this.adaptersWorker.registerRepositoryHandler(this.repoChangeHandler),this.adaptersWorker.registerHandler(this.adaptersChangeHandler),this.hostsWorker.registerHandler(this.updateHosts),this.hostsWorker.registerNotificationHandler(this.handleNewNotifications);let o=(window._sessionStorage||window.sessionStorage).getItem(`App.expertMode`);if(a.expertMode=zy(this.state.eosAccessRole)&&(o?o===`true`:!!((t=a.systemConfig)!=null&&t.common.expertMode)),this.socket.isSecure||(n=this.socket.systemConfig)!=null&&(n=n.native)!=null&&n.vendor)try{var i;let e=await this.socket.getCurrentUser(),t=await this.socket.getObject(`system.user.${e}`);t!=null&&(i=t.native)!=null&&i.vendor&&Object.assign(this.adminGuiConfig,t.native.vendor),this.socket.isSecure&&t&&this.setState({user:{id:t._id,name:Ne.getObjectNameFromObj(t,this.socket.systemLang),color:t.common.color,icon:t.common.icon,invertBackground:t.common.color?this.mustInvertBackground(t.common.color):!1,group:await this.getLeadingGroupName(t._id)}})}catch(e){console.error(`Could not determine user to show: ${e.toString()}, ${e.stack}`),this.showAlert(e.toString(),`error`)}this.setState(a,()=>this.setCurrentTabTitle()),this.socket.subscribeState(`system.adapter.discovery.0.alive`,this.onDiscoveryAlive),this.socket.getObject(`system.discovery`).then(e=>this.onDiscoveryObject(`system.discovery`,e)).catch(e=>console.warn(`Cannot read system.discovery: ${e}`)),this.socket.subscribeObject(`system.discovery`,this.onDiscoveryObject),setTimeout(()=>this.logsWorkerChanged(this.state.currentHost),1e3),this.newsSubscribeTimer&&clearTimeout(this.newsSubscribeTimer),this.newsSubscribeTimer=setTimeout(()=>{this.newsSubscribeTimer=null,this.subscribeOwnNews().catch(e=>console.warn(`Cannot subscribe EOS news: ${e}`))},5e3),setTimeout(async()=>{var e;let t=await((e=this.hostsWorker)==null?void 0:e.getNotifications(a.currentHost));await this.handleNewNotifications(t)},3e3)}catch(e){console.error(`Error in onReady: ${e.stack}`),this.showAlert(`Error in onReady: ${e.stack}`,`error`),this.setState({ready:!0})}},onError:e=>{console.error(e);let t;t=e instanceof Error&&e.message||e.toString(),t===`ioBroker is not connected`?this.state.cloudNotConnected||(this.showAlert(j.t(t),`error`),setInterval(()=>{this.state.cloudReconnect>0?this.setState({cloudReconnect:this.state.cloudReconnect-1}):window.location.reload()},1e3),this.setState({cloudNotConnected:!0,cloudReconnect:10})):this.showAlert(t,`error`)}}),window.NEXOWATT_EOS_ADMIN_SOCKET=this.socket,window.NEXOWATT_EOS_SOCKET=this.socket,window.dispatchEvent(new CustomEvent(`nexowatt-eos-admin-socket-ready`))))}componentWillUnmount(){var e,t,n,r,i;if(window.removeEventListener(`hashchange`,this.onHashChanged,!1),window.removeEventListener(`vite:preloadError`,by),window.removeEventListener(`nexowatt-eos-policy`,this.onEosPolicyChanged),(e=this.socket)==null||e.unsubscribeState(`system.adapter.discovery.0.alive`,this.onDiscoveryAlive),(t=this.socket)==null||t.unsubscribeObject(`system.discovery`,this.onDiscoveryObject),this.newsSubscribeTimer&&=(clearTimeout(this.newsSubscribeTimer),null),this.newsSubscription){var a;(a=this.socket)==null||a.unsubscribeState(this.newsSubscription,this.onNews),this.newsSubscription=void 0}(n=this.adaptersWorker)==null||n.unregisterRepositoryHandler(this.repoChangeHandler),(r=this.adaptersWorker)==null||r.unregisterHandler(this.adaptersChangeHandler),(i=this.hostsWorker)==null||i.unregisterHandler(this.updateHosts),this.expireInSecInterval&&=(clearInterval(this.expireInSecInterval),null),this.guiSettingsRetryTimer&&=(clearTimeout(this.guiSettingsRetryTimer),null),this.pendingCommandTimer&&=(clearTimeout(this.pendingCommandTimer),null),this.pendingCommand=null,window._localStorage&&(window._localStorage=void 0,window._sessionStorage=void 0)}async findCurrentHost(e){if(!this.socket)return;if(e.hosts=await this.socket.getCompactHosts(),!this.state.currentHost){let r=(window._localStorage||window.localStorage).getItem(`App.currentHost`),i=e.hosts.find(e=>e._id===r);if(r&&i){var t;e.currentHost=i._id,e.currentHostName=((t=i.common)==null?void 0:t.name)||i._id.replace(`system.host.`,``)}else{var n;e.currentHost=e.hosts[0]._id,e.currentHostName=((n=e.hosts[0].common)==null?void 0:n.name)||e.hosts[0]._id.replace(`system.host.`,``)}}e.ownHost=e.currentHost;let r;try{r=await this.socket.getState(`${e.currentHost}.alive`)}catch(t){r=null,console.warn(`Cannot get state ${e.currentHost}.alive: ${t}`)}if(!(r!=null&&r.val))for(let t=0;t<e.hosts.length;t++)r=await this.socket.getState(`${e.hosts[t]._id}.alive`),r!=null&&r.val&&(e.currentHost=e.hosts[t]._id,e.currentHostName=e.hosts[t].common.name)}renderTokenTimeoutDialog(){return this.state.askForTokenRefresh?N(u,{open:!0,onClose:()=>e.logout(),children:[N(ce,{children:[E(de,{children:j.t(`ra_Session will expire in %s seconds. Continue?`,Math.round((this.state.askForTokenRefresh.expireAt-Date.now())/1e3))}),E(`div`,{children:E(Ae,{label:j.t(`ra_Do not ask for next 2 hours in this session`),control:E(Oe,{checked:this.state.askForTokenRefresh.doNotAsk,onChange:()=>{var e;let t={...this.state.askForTokenRefresh};t.doNotAsk=!((e=this.state.askForTokenRefresh)!=null&&e.doNotAsk),this.setState({askForTokenRefresh:t})}})})})]}),N(xt,{children:[E(H,{onClick:()=>{var e,t;let n=(e=this.state.askForTokenRefresh)==null?void 0:e.resolve;(t=this.state.askForTokenRefresh)!=null&&t.doNotAsk&&(this.doNotAskSessionExpiration=Date.now()+72e5),this.expireInSecInterval&&=(clearInterval(this.expireInSecInterval),null),this.setState({askForTokenRefresh:null},()=>n==null?void 0:n(!0))},variant:`contained`,startIcon:E($o,{}),children:j.t(`ra_Continue`)}),E(H,{onClick:()=>e.logout(),variant:`outlined`,color:`grey`,startIcon:E(is,{}),children:j.t(`ra_Logout`)})]})]}):null}ownNewsState(e){if(!/^eos-admin\.(0|[1-9]\d*)$/.test(this.adminInstance))throw Error(`EOS_NEWS_INSTANCE_UNAVAILABLE`);return`${this.adminInstance}.info.${e}`}async subscribeOwnNews(){if(!this.socket)return;let e=this.ownNewsState(`newsFeed`);this.newsSubscription&&this.newsSubscription!==e&&this.socket.unsubscribeState(this.newsSubscription,this.onNews),this.newsSubscription=e,await this.socket.subscribeState(e,this.onNews)}renderNotificationsDialog(){var e,t;return!this.state.notificationsDialog||!this.state.systemConfig||!this.socket?null:E(gs,{notifications:((e=this.state.notifications)==null?void 0:e.notifications)||{},instances:((t=this.state.notifications)==null?void 0:t.instances)||{},onClose:()=>this.setState({notificationsDialog:!1}),ackCallback:(e,t)=>this.socket.clearNotifications(e,t),dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma,themeType:this.state.themeType,themeName:this.state.themeName,theme:this.state.theme,socket:this.socket})}renderHostWarningDialog(){return!this.state.showHostWarning||!this.state.systemConfig||!this.socket?null:E(jd,{instances:this.state.showHostWarning.instances,messages:this.state.showHostWarning.result.system.categories,dateFormat:this.state.systemConfig.common.dateFormat,themeType:this.state.themeType,ackCallback:e=>this.socket.clearNotifications(this.state.showHostWarning.host,e),onClose:()=>this.setState({showHostWarning:null})})}renderNewsDialog(){return!this.state.showNews||!this.socket?null:E(xd,{newsArr:this.state.showNews.checkNews,current:this.state.showNews.lastNewsId,onSetLastNewsId:async e=>{e&&await this.socket.setState(this.ownNewsState(`newsLastId`),{val:e,ack:!0}),this.setState({showNews:null})}})}renderTipsDialog(){return!this.state.showTips||this.state.wizard||this.state.showNews||this.state.showHostWarning?null:E(iy,{t:j.t,lang:this.state.lang,lastTipId:(window._localStorage||window.localStorage).getItem(e.LAST_TIP_ID),onClose:(t,n)=>{(window._localStorage||window.localStorage).setItem(e.LAST_TIP_ID,n),this.setState({showTips:!1}),t&&this.disableTips()}})}async disableTips(){if(this.socket)try{var e;let t=await this.socket.getSystemConfig(!0);t!=null&&t.common&&!t.common.tipsDisabled&&(t.common.tipsDisabled=!0,await this.socket.setSystemConfig(t)),(e=this.state.systemConfig)!=null&&e.common&&this.setState({systemConfig:{...this.state.systemConfig,common:{...this.state.systemConfig.common,tipsDisabled:!0}}})}catch(e){this.showAlert(`Cannot save system configuration: ${e.toString()}`,`error`)}}renderSlowConnectionWarning(){return this.state.showSlowConnectionWarning?E(Xv,{readTimeoutMs:this.state.readTimeoutMs,t:j.t,onClose:e=>{e?this.setState({showSlowConnectionWarning:!1,readTimeoutMs:e},()=>this.readRepoAndInstalledInfo(this.state.currentHost,{offerLongerTimeout:!0})):this.setState({showSlowConnectionWarning:!1})}}):null}readRepoAndInstalledInfo(e,t){let n=this.readRepoAndInstalledInfoRun(e,++this.repoInfoRun,t);return this.repoInfoPromise=n,n}async readRepoAndInstalledInfoRun(e,t,n){if(!this.socket)throw Error(`Socket not initialized`);let r=n==null?void 0:n.update,i=()=>{n!=null&&n.offerLongerTimeout&&this.setState({showSlowConnectionWarning:!0})},[a,o,s]=await Promise.all([this.socket.getCompactRepository(e,r,this.state.readTimeoutMs).catch(e=>(window.alert(`Cannot getRepositoryCompact: ${e}`),e.toString().includes(`timeout`)&&i(),{})),this.socket.getCompactInstalled(e,r,this.state.readTimeoutMs).catch(e=>(window.alert(`Cannot getInstalled: ${e}`),e.toString().includes(`timeout`)&&i(),{})),this.socket.getCompactAdapters(r).then(e=>(t===this.repoInfoRun&&this.setState({adapters:e}),e)).catch(e=>(window.alert(`Cannot read adapters: ${e}`),{}))]);t===this.repoInfoRun&&(o&&s&&Object.keys(s).forEach(e=>{o[e]&&s[e].iv&&(o[e].ignoreVersion=s[e].iv)}),this.setState({repository:a,installed:o,adapters:s}))}static tabOfHash(e){return e.replace(/^#/,``).split(`/`)[0]}static isAdminTab(e){return!e||Cy.includes(e)}chatBlocksLeaving(t){return this.chatLeaveConfirmed?(this.chatLeaveConfirmed=!1,!1):this.chatBusy&&e.isAdminTab(e.tabOfHash(this.lastHash))&&!e.isAdminTab(t)}assistantNavigate(t){let n=t.startsWith(`#`)?t:`#${t}`;return e.isAdminTab(e.tabOfHash(n))?(window.location.hash=n,Promise.resolve(!0)):new Promise(e=>this.setState({chatLeaveDialog:{target:{hash:n},reason:`assistant`,resolve:e}}))}onChatLeaveDialog(e){let t=this.state.chatLeaveDialog;this.setState({chatLeaveDialog:null},()=>{var n;t==null||(n=t.resolve)==null||n.call(t,e);let r=t==null?void 0:t.target;e&&r&&(this.chatLeaveConfirmed=!0,`hash`in r?window.location.hash=r.hash:this.handleNavigation(r.tab,r.subTab,r.param))})}static getPort(){let t=parseInt(window.location.port,10);if(Number.isNaN(t))switch(e.getProtocol()){case`https:`:t=443;break;case`http:`:t=80}return t&&t!==3e3||(t=8188),t}static getProtocol(){return window.location.protocol}static createTheme(e){return a(Ne.getThemeName(e))}static getThemeName(e){return e.name}static getThemeType(e){return e.palette.mode}renderHostSelector(){return!this.socket||!this.hostsWorker?null:E(js,{name:`admin.appBar.hostSelector`,config:this.adminGuiConfig,children:E(fd,{themeType:this.state.themeType,expertMode:this.state.expertMode,socket:this.socket,hostsWorker:this.hostsWorker,currentHost:this.state.currentHost,setCurrentHost:(e,t)=>{this.setState({currentHostName:e,currentHost:t},async()=>{var e;this.logsWorkerChanged(t),(window._localStorage||window.localStorage).setItem(`App.currentHost`,t),await this.readRepoAndInstalledInfo(t,{offerLongerTimeout:!0});let n=await((e=this.hostsWorker)==null?void 0:e.getNotifications(t));await this.handleNewNotifications(n)})}})})}setCurrentTabTitle(){this.setTitle(this.state.currentTab.tab.replace(`tab-`,``))}setTitle(e){document.title=`${e} - ${this.state.currentHostName||`NexoWatt EOS`}`}getCurrentTab(){var e;if(!this.socket||!this.hostsWorker||!this.adaptersWorker||!this.instancesWorker||!this.objectsWorker||!this.state.systemConfig||!this.logsWorker)return null;if((e=this.state)!=null&&(e=e.currentTab)!=null&&e.tab){if(this.state.currentTab.tab===`tab-adapters`){let e=this.props.width===`xs`||this.props.width===`sm`,t=!e&&this.state.drawerState===J.opened,n=e||this.state.drawerState===J.closed;return E(mt,{fallback:E(Sc,{}),children:E(Ty,{theme:this.state.theme,triggerUpdate:this.state.triggerAdapterUpdate,forceUpdateAdapters:this.state.forceUpdateAdapters,adaptersWorker:this.adaptersWorker,instancesWorker:this.instancesWorker,themeType:this.state.themeType,systemConfig:this.state.systemConfig,socket:this.socket,adminHost:this.state.ownHost,hostsWorker:this.hostsWorker,currentHost:this.state.currentHost,ready:this.state.ready&&this.state.connected,t:j.t,lang:j.getLanguage(),expertMode:this.state.expertMode,executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),commandRunning:this.state.commandRunning,onSetCommandRunning:e=>this.setState({commandRunning:e}),menuOpened:t,menuClosed:n,adminGuiConfig:this.adminGuiConfig,toggleTranslation:this.toggleTranslation,noTranslation:this.state.noTranslation,adminInstance:this.adminInstance,currentAdminVersion:this.state.versionAdmin,onUpdating:e=>this.setState({updating:e}),hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`adapters`)})}if(this.state.currentTab.tab===`tab-instances`)return E(mt,{fallback:E(Sc,{}),children:E(Ey,{menuPadding:this.state.drawerState===J.closed?0:this.state.drawerState===J.opened?this.state.editMenuList?250:180:50,socket:this.socket,instancesWorker:this.instancesWorker,lang:j.getLanguage(),hostname:this.state.hostname,adminInstance:this.adminInstance,repository:this.state.repository,hosts:this.state.hosts,themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,expertMode:this.state.expertMode,currentHost:this.state.currentHost,currentHostName:this.state.currentHostName,t:j.t,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma,width:this.props.width,configStored:e=>this.allStored(e),executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),inBackgroundCommand:this.state.commandError||this.state.performed,onRegisterIframeRef:e=>this.refConfigIframe=e,onUnregisterIframeRef:e=>{this.refConfigIframe===e&&(this.refConfigIframe=null)},handleNavigation:this.handleNavigation,hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`instances`)});if(this.state.currentTab.tab===`tab-overview`)return E(mt,{fallback:E(Sc,{}),children:E(wy,{t:j.t,lang:this.state.lang,socket:this.socket,theme:this.state.theme,themeType:this.state.themeType,currentHost:this.state.currentHost,currentHostName:this.state.currentHostName,hostsWorker:this.hostsWorker,instancesWorker:this.instancesWorker,objectsWorker:this.objectsWorker,logsWorker:this.logsWorker,expertMode:this.state.expertMode,installed:this.state.installed,repository:this.state.repository,handleNavigation:e=>this.handleNavigation(e),hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`overview`)});if(this.state.currentTab.tab===`tab-intro`)return E(mt,{fallback:E(Sc,{}),children:E(Dy,{hostname:this.state.hostname,adminInstance:this.adminInstance,instancesWorker:this.instancesWorker,hostsWorker:this.hostsWorker,showAlert:(e,t)=>this.showAlert(e,t),socket:this.socket,t:j.t,lang:j.getLanguage(),theme:this.state.theme},`intro`)});if(this.state.currentTab.tab===`tab-logs`)return E(mt,{fallback:E(Sc,{}),children:E(Oy,{t:j.t,width:this.props.width,lang:this.state.lang,socket:this.socket,themeType:this.state.themeType,theme:this.state.theme,ready:this.state.ready,logsWorker:this.logsWorker,expertMode:this.state.expertMode,currentHost:this.state.currentHost,hostsWorker:this.hostsWorker,clearErrors:()=>this.clearLogErrors(),hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`logs`)});if(this.state.currentTab.tab===`tab-files`)return E(mt,{fallback:E(Sc,{}),children:E(ky,{ready:this.state.ready,t:j.t,expertMode:this.state.expertMode,lang:j.getLanguage(),socket:this.socket,themeType:this.state.themeType,theme:this.state.theme},`files`)});if(this.state.currentTab.tab===`tab-users`)return E(mt,{fallback:E(Sc,{}),children:E(jy,{ready:this.state.ready,t:j.t,expertMode:this.state.expertMode,lang:j.getLanguage(),socket:this.socket,themeType:this.state.themeType,theme:this.state.theme},`users`)});if(this.state.currentTab.tab===`tab-enums`)return E(mt,{fallback:E(Sc,{}),children:E(My,{t:j.t,lang:j.getLanguage(),socket:this.socket,themeType:this.state.themeType,theme:this.state.theme},`enums`)});if(this.state.currentTab.tab===`tab-objects`)return E(mt,{fallback:E(Sc,{}),children:E(Ay,{t:j.t,theme:this.state.theme,themeName:this.state.themeName,themeType:this.state.themeType,expertMode:this.state.expertMode,objectsWorker:this.objectsWorker,lang:j.getLanguage(),socket:this.socket,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma})},`objects`);if(this.state.currentTab.tab===`tab-hosts`)return E(mt,{fallback:E(Sc,{}),children:E(Fy,{socket:this.socket,lang:j.getLanguage(),hostsWorker:this.hostsWorker,toggleTranslation:this.toggleTranslation,noTranslation:this.state.noTranslation,themeType:this.state.themeType,theme:this.state.theme,expertMode:this.state.expertMode,t:j.t,currentHost:this.state.currentHost,executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),systemConfig:this.state.systemConfig,showAdaptersWarning:this.showAdaptersWarning,adminInstance:this.adminInstance,onUpdating:e=>this.setState({updating:e})})});if(this.state.currentTab.tab===`tab-devicemanager`)return E(mt,{fallback:E(Sc,{}),children:E(Py,{themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,socket:this.socket,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma},this.state.currentTab.tab)});let e=this.state.currentTab.tab.match(/^tab-([-\w]+?)(?:-(\d+))?$/);if(e){var t;let n=(t=this.tabsInfo)==null?void 0:t.find(t=>t.name===e[0]||t.name===`tab-${e[1]}`);return E(mt,{fallback:E(Sc,{}),children:E(Ny,{hostname:this.state.hostname,adminInstance:this.adminInstance,hosts:this.state.hosts,instancesWorker:this.instancesWorker,tab:this.state.currentTab.tab,themeName:this.state.themeName,theme:this.state.theme,expertMode:this.state.expertMode,socket:this.socket,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma,onRegisterIframeRef:e=>this.refConfigIframe=e,onUnregisterIframeRef:e=>{this.refConfigIframe===e&&(this.refConfigIframe=null)},icon:n==null?void 0:n.icon,supportsLoadingMessage:n==null?void 0:n.supportsLoadingMessage},this.state.currentTab.tab)})}}return null}clearLogErrors(){var e,t;(e=this.logsWorker)==null||e.resetErrors(),(t=this.logsWorker)==null||t.resetWarnings()}getCurrentDialog(){if(this.state&&this.state.currentTab&&this.state.currentTab.dialog){if(this.state.currentTab.dialog===`system`)return this.getSystemSettingsDialog();if(this.state.currentTab.dialog===`discovery`)return this.getDiscoveryModal()}return null}getSystemSettingsDialog(){return zy(this.state.eosAccessRole)?E(od,{eosAccessRole:this.state.eosAccessRole,adminGuiConfig:this.adminGuiConfig,width:this.props.width,currentHost:this.state.currentHost,themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,onClose:async e=>{var t;d.doNavigate(null);let n=await((t=this.socket)==null?void 0:t.getObject(`system.config`));n&&(e?this.setState({triggerAdapterUpdate:this.state.triggerAdapterUpdate+1,systemConfig:n}):this.setState({systemConfig:n}))},lang:this.state.lang,socket:this.socket,currentTab:this.state.currentTab,expertModeFunc:e=>{if(!zy(this.state.eosAccessRole))return;(window._sessionStorage||window.sessionStorage).removeItem(`App.expertMode`);let t=JSON.parse(JSON.stringify(this.state.systemConfig));t.common.expertMode=e,this.setState({expertMode:e,systemConfig:t})},t:j.t},`systemSettings`):null}handleAlertClose(e,t){t!==`clickaway`&&this.setState({alert:!1})}isCausedByConnectionLoss(e,t){var n;return e.includes(`notConnectedError`)?!0:this.connectionLostAt?!((n=this.socket)!=null&&n.isConnected())||this.connectionLostAt>t-Wy:!1}getConnectionLostText(){return this.connectionLostAt?j.t(`Connection to admin lost. Waiting for reconnection...`):void 0}showAlert(e,t){t!==`error`&&t!==`warning`&&t!==`info`&&t!==`success`&&(t=`info`);let n;n=typeof e==`string`?e:e instanceof Error?e.message||e.toString():e==null?`null`:e.toString(),this.setState({alert:!0,alertType:t,alertMessage:n})}handleDrawerState(e){(window._localStorage||window.localStorage).setItem(`App.drawerState`,e.toString()),this.setState({drawerState:e})}static logout(){ud().then(()=>{ln.deleteTokensStatic(),window.location.replace(`/login.html`)}).catch(()=>{window.alert(`Abmeldung konnte nicht bestätigt werden. Bitte erneut versuchen.`)})}allStored(e){this._tempAllStored!==e&&(this._tempAllStored=e,this.forceUpdate())}closeDataNotStoredDialog(){this.setState({dataNotStoredDialog:!1})}confirmDataNotStored(){this._tempAllStored=!0,this.setState({dataNotStoredDialog:!1},()=>{var e,t,n;return this.handleNavigation((e=this.state.dataNotStoredTab)==null?void 0:e.tab,(t=this.state.dataNotStoredTab)==null?void 0:t.subTab,(n=this.state.dataNotStoredTab)==null?void 0:n.param)})}executeCommand(e,t,n,r){if(typeof t==`boolean`&&(n=t,t=void 0),!(this.state.connected&&this.state.ready&&this.socket&&(typeof this.socket.isConnected!=`function`||this.socket.isConnected()))){if(this.pendingCommand){this.showAlert(`EOS stellt die Verbindung noch her. Ein Installations- oder Updatebefehl wartet bereits.`,`warning`);return}let i={cmd:e,host:t,callback:n||void 0,files:r,started:Date.now()};this.pendingCommand=i,this.showAlert(`EOS stellt die Verbindung noch her. Der Befehl wird automatisch gestartet, sobald das System bereit ist.`,`info`);let a=()=>{this.pendingCommand===i&&(this.state.connected&&this.state.ready&&this.socket&&(typeof this.socket.isConnected!=`function`||this.socket.isConnected())?(this.pendingCommand=null,this.pendingCommandTimer=null,this.executeCommand(i.cmd,i.host||void 0,i.callback,i.files)):Date.now()-i.started>=6e4?(this.pendingCommand=null,this.pendingCommandTimer=null,this.showAlert(`Der Befehl wurde nicht gestartet, weil die EOS-Verbindung innerhalb von 60 Sekunden nicht bereit war.`,`error`)):this.pendingCommandTimer=setTimeout(a,500))};this.pendingCommandTimer=setTimeout(a,250)}else this.state.commandRunning?this.showAlert(`Es läuft bereits ein Installations- oder Updatebefehl.`,`warning`):this.state.performed||this.state.commandError?this.setState({cmd:null,cmdDialog:!1,commandError:!1,performed:!1,callback:null,commandHost:null,cmdFiles:null},()=>this.setState({cmd:e,cmdDialog:!0,callback:n,commandHost:t||this.state.currentHost,cmdFiles:r||null})):(console.log(`Execute: ${e}`),this.setState({cmd:e,cmdDialog:!0,callback:n,commandHost:t||this.state.currentHost,cmdFiles:r||null}))}closeCmdDialog(e){this.setState({cmd:null,cmdDialog:!1,commandError:!1,performed:!1,callback:null,commandHost:null,cmdFiles:null},()=>e&&e())}renderWizardDialog(){return this.state.wizard?E(Sl,{executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),host:this.state.currentHost,socket:this.socket,themeName:this.state.themeName,themeType:this.state.themeType,toggleTheme:this.toggleTheme,lang:j.getLanguage(),onClose:e=>{this.setState({wizard:!1,showRedirect:e,redirectCountDown:10,lang:j.getLanguage()},()=>{this.state.showRedirect&&setInterval(()=>{this.state.redirectCountDown>0?this.setState({redirectCountDown:this.state.redirectCountDown-1}):window.location.href=this.state.showRedirect},1e3)})},onNavigate:(e,t,n)=>{d.doNavigate(e,t,n),window.location.reload()}}):null}showRedirectDialog(){if(this.state.showRedirect){var e;return N(u,{open:!0,onClose:()=>{},children:[E(_e,{children:j.t(`Waiting for admin restart...`)}),E(ce,{children:E(de,{children:j.t(`Redirect in %s second(s)`,this.state.redirectCountDown)})}),N(xt,{children:[window.sidebar||window.opera&&window.print||window.document.all&&(e=window.external)!=null&&e.AddFavorite?E(H,{onClick:()=>{if(window.sidebar&&this.state.showRedirect)window.sidebar.addPanel(`NexoWatt EOS`,this.state.showRedirect,``);else if(window.opera&&this.state.showRedirect&&window.print){let e=document.createElement(`a`);e.setAttribute(`href`,this.state.showRedirect),e.setAttribute(`title`,`NexoWatt EOS`),e.setAttribute(`rel`,`sidebar`),e.click()}else document.all&&window.external.AddFavorite(this.state.showRedirect,`NexoWatt EOS`)},children:j.t(`Bookmark admin`)}):null,this.state.redirectCountDown?E(H,{variant:`contained`,onClick:()=>this.state.showRedirect&&(window.location.href=this.state.showRedirect),children:j.t(`Go to admin now`)}):null]})]})}return null}renderCommandDialog(){return this.state.cmd&&this.socket?E(Ss,{onSetCommandRunning:e=>this.setState({commandRunning:e}),onClose:()=>this.closeCmdDialog(()=>this.setState({commandRunning:!1})),visible:this.state.cmdDialog,callback:this.state.callback,onInBackground:()=>this.setState({cmdDialog:!1}),cmd:this.state.cmd,files:this.state.cmdFiles||void 0,errorFunc:()=>this.setState({commandError:!0}),performed:()=>this.setState({performed:!0}),inBackground:this.state.commandError||this.state.performed,commandError:this.state.commandError,socket:this.socket,host:this.state.commandHost||this.state.currentHost,ready:this.state.ready&&this.state.connected,t:j.t}):null}async getLeadingGroupName(e){if(!this.socket)throw Error(`Socket not ready`);try{let t=await this.socket.getForeignObjects(`system.group.*`,`group`),n=Object.values(t||{}).filter(t=>{var n;return t==null||(n=t.common)==null||(n=n.members)==null?void 0:n.includes(e)}),r=n.find(e=>e._id===`system.group.administrator`)||n[0];return r?Ne.getObjectNameFromObj(r,this.socket.systemLang):``}catch(t){return console.warn(`Cannot read groups of ${e}: ${t}`),``}}renderSiteName(){var e;let t=(e=this.state.systemConfig)==null||(e=e.common)==null?void 0:e.siteName;return t?E(`div`,{style:By.siteName,children:t}):null}needsMenuButtonSpace(){var e;return!((e=this.state.systemConfig)!=null&&(e=e.common)!=null&&e.siteName)&&this.state.drawerState===J.closed}renderFloatingButtons(){let e=this.state.drawerState===J.closed,t=this.state.cmd&&!this.state.cmdDialog;return!e&&!t?null:N(I,{sx:By.floatingButtons,children:[e?E(A,{onClick:()=>this.handleDrawerState(J.opened),children:E(bt,{})}):null,t?E(A,{onClick:()=>this.setState({cmdDialog:!0}),children:E(es,{style:this.state.commandError?By.errorCmd:this.state.performed?Ne.getStyle(this.state.theme,By.performed):By.cmd})}):null]})}renderAlertSnackbar(){return E(Ke,{open:this.state.alert,autoHideDuration:6e3,onClose:()=>this.handleAlertClose(),children:E(C,{severity:this.state.alertType,variant:`filled`,onClose:()=>this.handleAlertClose(),children:this.state.alertMessage})})}renderDialogConfirm(){return this.state.dataNotStoredDialog?E(Zt,{title:j.t(`ra_Please confirm`),text:j.t(`ra_Some data are not stored. Discard?`),ok:j.t(`ra_Discard`),cancel:j.t(`ra_Cancel`),onClose:e=>e?this.confirmDataNotStored():this.closeDataNotStoredDialog()}):null}renderChatLeaveDialog(){if(!this.state.chatLeaveDialog)return null;let e=this.state.chatLeaveDialog.reason===`busy`;return E(Zt,{title:j.t(`ra_Please confirm`),text:j.t(e?`The assistant is still working on an answer, which is lost on this tab. Leave anyway?`:`The assistant is not available on this tab and will be closed. Continue?`),ok:j.t(e?`Leave anyway`:`Continue`),cancel:j.t(`ra_Cancel`),onClose:e=>this.onChatLeaveDialog(e)})}renderExpertDialog(){return!this.state.expertModeDialog||!zy(this.state.eosAccessRole)?null:E(md,{onClose:e=>{if(!zy(this.state.eosAccessRole))this.setState({expertModeDialog:!1,expertMode:!1});else if(e===`openSettings`)d.doNavigate(null,`system`);else if(e){var t;(window._sessionStorage||window.sessionStorage).setItem(`App.expertMode`,this.state.expertMode?`false`:`true`),(t=this.refConfigIframe)==null||(t=t.contentWindow)==null||t.postMessage(`updateExpertMode`,`*`),this.setState({expertModeDialog:!1,expertMode:!this.state.expertMode})}else this.state.expertModeDialog&&this.setState({expertModeDialog:!1})},expertMode:this.state.expertMode})}renderShowGuiSettings(){return this.state.showGuiSettings?N(Ze,{anchorEl:this.state.showGuiSettings,open:!0,onClose:()=>this.setState({showGuiSettings:null}),children:[E(It,{onClick:()=>{this.setState({showGuiSettings:null}),this.enableGuiSettings(!0).catch(e=>console.error(`Cannot enable GUI settings: ${e}`))},children:j.t(`Use settings of other browsers`)}),E(It,{onClick:()=>{this.setState({showGuiSettings:null}),this.enableGuiSettings(!0,!0).catch(e=>console.error(`Cannot enable GUI settings: ${e}`))},children:j.t(`Use settings of this browser`)}),N(It,{onClick:()=>this.setState({showGuiSettings:null}),children:[E(Mt,{children:E(k,{fontSize:`small`})}),E(Jt,{children:j.t(`Cancel`)})]})]}):null}renderExpertModeButton(){var e;let t=(window._sessionStorage||window.sessionStorage).getItem(`App.expertMode`),n=!t||t===`true`==!!((e=this.state.systemConfig)!=null&&e.common.expertMode);return zy(this.state.eosAccessRole)?E(js,{name:`admin.appBar.expertMode`,config:this.adminGuiConfig,children:E(Lt,{title:`${j.t(`Toggle expert mode`)} ${n?``:` (${j.t(`only in this browser session`)})`}`,slotProps:{popper:{sx:By.tooltip}},children:E(at,{color:`secondary`,variant:`dot`,sx:{"& .MuiBadge-badge":By.expertBadge},invisible:n,children:E(A,{"data-eos-expert-control":`1`,"aria-label":j.t(`Toggle expert mode`),"aria-pressed":this.state.expertMode,onClick:()=>{var e;if(zy(this.state.eosAccessRole)){if(!!((e=this.state.systemConfig)!=null&&e.common.expertMode)==!this.state.expertMode){var t;(window._sessionStorage||window.sessionStorage).setItem(`App.expertMode`,this.state.expertMode?`false`:`true`),this.setState({expertMode:!this.state.expertMode}),(t=this.refConfigIframe)==null||(t=t.contentWindow)==null||t.postMessage(`updateExpertMode`,`*`)}else if((window._sessionStorage||window.sessionStorage).getItem(`App.doNotShowExpertDialog`)===`true`){var n;(window._sessionStorage||window.sessionStorage).setItem(`App.expertMode`,this.state.expertMode?`false`:`true`),this.setState({expertMode:!this.state.expertMode}),(n=this.refConfigIframe)==null||(n=n.contentWindow)==null||n.postMessage(`updateExpertMode`,`*`)}else this.setState({expertModeDialog:!0})}},style:{color:this.state.expertMode?this.state.theme.palette.expert:void 0},color:`default`,children:E(jt,{style:{...By.expertIcon,...this.state.expertMode?By.expertIconActive:void 0}})})})})}):null}renderMenuButtons(){let e=this.state.noNotifications.warning+this.state.noNotifications.other;return N(je,{children:[E(Lt,{title:j.t(`Notifications`),slotProps:{popper:{sx:By.tooltip}},children:E(A,{disableRipple:!e,style:{opacity:e?1:.3},onClick:e?()=>this.setState({notificationsDialog:!0}):void 0,children:E(at,{badgeContent:this.state.noNotifications.other+this.state.noNotifications.warning,color:this.state.noNotifications.warning>0?`error`:`secondary`,max:99,children:E(rs,{})})})}),E(js,{name:`admin.appBar.discovery`,config:this.adminGuiConfig,children:this.state.discoveryAlive?E(Lt,{title:this.state.discoveryProposals?`${j.t(`Discovery devices`)} - ${j.t(`New adapter proposals`)}: ${this.state.discoveryProposals}`:j.t(`Discovery devices`),slotProps:{popper:{sx:By.tooltip}},children:E(A,{onClick:()=>d.doNavigate(null,`discovery`),children:E(at,{badgeContent:this.state.discoveryProposals,color:`secondary`,max:99,children:E(Ye,{})})})}):E(`div`,{style:{display:`none`}})}),this.toggleThemePossible?E(js,{name:`admin.appBar.toggleTheme`,config:this.adminGuiConfig,children:E(te,{toggleTheme:this.toggleTheme,themeName:this.state.themeName,t:j.t})}):null,zy(this.state.eosAccessRole)&&this.state.expertMode?E(Lt,{title:j.t(`Synchronize admin settings between all opened browser windows`),slotProps:{popper:{sx:By.tooltip}},children:E(A,{onClick:e=>this.state.guiSettings?this.enableGuiSettings(!1):this.setState({showGuiSettings:e.target}),style:{color:this.state.guiSettings?this.state.theme.palette.expert:void 0},children:this.state.guiSettings?E(ts,{}):E(ns,{})})}):null]})}renderToolbar(e){let t=Ne.getStyle(this.state.theme,By.performed);return N(ft,{children:[E(A,{size:`large`,edge:`start`,"data-eos-menu-toggle":`1`,"aria-label":j.t(`Open menu`),"aria-expanded":this.state.drawerState!==J.closed,style:{...By.menuButton,...!e&&this.state.drawerState!==J.closed?By.hide:void 0},onClick:()=>this.handleDrawerState(J.opened),children:E(bt,{})}),N(`div`,{style:By.wrapperButtons,children:[E(I,{className:`eos-header-controls`,children:this.renderMenuButtons()}),E(`div`,{style:By.flexGrow}),this.state.cmd&&!this.state.cmdDialog&&E(A,{size:`large`,onClick:()=>this.setState({cmdDialog:!0}),children:E(es,{style:this.state.commandError?By.errorCmd:this.state.performed?t:By.cmd})})]}),this.renderSiteName(),this.state.drawerState!==J.opened&&!this.state.expertMode&&window.innerWidth>450&&N(P,{container:!0,style:{...By.avatarNotVisible,...this.state.drawerState===J.opened?void 0:By.avatarVisible},spacing:1,sx:{alignItems:`center`},children:[this.state.user?null:N(I,{component:`div`,style:By.wrapperName,children:[E(R,{children:`admin`}),!this.adminGuiConfig.icon&&this.state.versionAdmin&&N(R,{style:{...By.styleVersion,color:this.state.themeType===`dark`?`#ffffff80`:`#00000080`},children:[`v`,this.state.versionAdmin]})]}),E(P,{children:E(`a`,{href:`#easy`,onClick:e=>e.preventDefault(),style:{color:`inherit`,textDecoration:`none`},children:this.adminGuiConfig.icon?E(`div`,{style:{height:50,width:102,lineHeight:`50px`,background:`white`,borderRadius:5,padding:5},children:E(`img`,{src:this.adminGuiConfig.icon,alt:`logo`,style:{maxWidth:`100%`,maxHeight:`100%`}})}):E(gt,{onClick:()=>this.handleNavigation(`easy`),style:this.state.themeName===`colored`||this.state.themeName===`blue`?By.logoWhite:void 0,alt:`NexoWatt EOS`,src:`img/no-image.svg`})})})]})]})}renderSampleError(){var e,t;let n=(e=this.state.hasGlobalError)==null?void 0:e.message,r=(t=this.state.hasGlobalError)==null?void 0:t.stack;return vy(this.state.hasGlobalError)?N(`div`,{style:{textAlign:`center`,fontSize:22,marginTop:50},children:[E(`h2`,{children:j.t(`The admin was updated. Please load the page anew.`)}),E(H,{variant:`contained`,onClick:()=>window.location.reload(),children:j.t(`Reload`)}),E(`div`,{style:{color:`#888`,fontSize:14,marginTop:20},children:n})]}):N(`div`,{style:{textAlign:`center`,fontSize:22,marginTop:50,height:`calc(100% - 50px)`,overflow:`auto`},children:[E(`h1`,{style:{color:`#F00`},children:`Error in GUI!`}),`Please open the browser console (F12), copy error text from there and create the issue on`,` `,E(`a`,{href:`https://nexowatt.com`,target:`_blank`,rel:`noreferrer`,children:`github`}),E(`br`,{}),`Without this information it is not possible to analyse the error.`,E(`br`,{}),`It should looks like `,E(`br`,{}),E(`img`,{src:`img/browserError.png`,alt:`error`}),E(`br`,{}),`If in the second line you will see`,` `,E(`code`,{style:{color:`#888`,fontFamily:`monospace`,fontSize:16},children:`at :3000/static/js/main.chunk.js:36903`}),` `,`and not the normal file name,`,E(`br`,{}),`please try to reproduce an error with opened browser console. In this case the special "map" files will be loaded and the developers can see the real name of functions and files.`,E(`div`,{style:{color:`#F88`,fontSize:14,marginTop:20},children:n}),E(`pre`,{style:{color:`#F88`,fontSize:12,fontFamily:`monospace`,textAlign:`left`,marginTop:20,padding:20},children:(r||``).toString().split(`
204
+ 或“下一步”使用先前发现过程中的设备`,process:`处理`,processes:`流程`,protocols_group:`协议`,"pushover wizard description":`有了 NexoWatt EOS Pushover 适配器,您就可以自己向安卓和 iOS 设备发送信息,并使用 Pushover API 的各种功能。通过这些功能,您不仅可以发送简单的文本信息,还可以附加图片和其他文件。您还可以通过设置不同的优先级或为不同事件设置特定的声音,根据个人需要定制通知。`,raw:`原始(仅限专家)`,read:`读`,"read only":`只读`,"read operation":`读`,readme:`自述`,reload:`重新加载`,"reload instance":`重新加载程序`,repeat:`重复`,repo_update_hint:`您已配置为运行“beta”存储库的自动升级,请注意,如果 beta 存储库处于活动状态,则此适配器将根据此配置自动提取 beta 更新!`,repository:`repository`,rest:`休息(只读)`,restart:`自动重启`,"restart script":`重启自动化`,restartLoop:`重新启动循环`,role:`角色`,runtime:`运行`,save:`保存`,"saved:":`已保存:`,"scenes wizard description":`使用 NexoWatt EOS 场景适配器,您可以将多个数据点组合到场景中,只需点击一下即可触发复杂的操作。试想一下,创建一个名为 "影院 "的场景,在这个场景中,Harmony Hub 会打开所有必要的设备,调暗灯光,并在屏幕降低时打开阅读灯。您还可以设置群组,根据场景的活动或非活动状态,为每个场景定义两种不同的连接数据点状态。`,schedule:`日程`,schedule_group:`时间表`,script_group:`自动化`,"select member by double click":`双击选择成员`,"sendto operation":`发送操作`,"serial number (UUID) in license is for other device":`许可证中的序列号 (UUID) 用于其他设备`,service_group:`保养`,severity:`严重`,"show (default)":`显示(默认)`,"show ignored":`显示被忽略`,"show suggested":`显示建议`,"show/hide item":`显示/隐藏项目`,"signal-cmb wizard description":`有了 NexoWatt EOS Signal-CMB 适配器,您就可以使用 Signal 信使通过 CallMeBot 服务发送消息。支持文本内容和表情符号,让您的信息栩栩如生。用户可以方便地了解智能家居中发生的事件,即使在旅行中也能始终掌握最新信息。`,silly:`愚蠢`,"sql wizard description":`使用 NexoWatt EOS SQL 适配器,您可以记录数据,以便对其进行长期可视化或历史分析。SQL 适配器将数据写入外部 SQL 数据库,该数据库可在同一主机或不同主机上运行。也支持 SQLite 数据库。与历史适配器相比,SQL 更适合记录大量数据,但需要手动设置。`,stable:`稳定`,"standalone MCP adapter":`独立式 MCP 适配器`,state:`州`,"state permissions":`状态权限`,stepEnd:`步骤 (至当前值)`,stepMiddle:`步骤 (中间)`,stepStart:`步骤 (值至下一个)`,stop_admin:`您正在尝试停止当前的管理实例。您将无法通过浏览器配置NexoWatt EOS。您可以稍后通过CLI命令“ iob start %s”启动admin。你确定吗?`,storage_group:`存储`,string:`串`,subscribe:`订阅`,sunday:`星期日`,switch:`开关`,switch_db_note:`建议不要在此设置中更改数据库的类型,因为不会进行任何数据迁移。最好使用CLI命令“ iob setup custom”,以便将所有数据迁移到新数据库。确定要在此处切换数据库类型吗?`,"telegram wizard description":`有了 NexoWatt EOS Telegram 适配器,您就可以通过 Telegram Messenger 向自己发送信息,这样当系统发生变化时,您就可以随时了解最新情况。除文本信息外,您还可以发送图片和其他文件。您甚至可以发送问题,并直接在 NexoWatt EOS 中处理答案。`,"temporary log level":`临时日志级别`,terminal:`终端`,"third-party_group":`第三方`,"this 2 weeks":`这2个星期`,"this adapter does not allow multiple instances":`此插件不允许多个程序同时运行`,"this day":`这天`,"this month":`这个月`,"this week":`本星期`,"this year":`今年`,time:`时间`,"time-and-date_group":`时间和日期`,timeOffset:`时间偏移`,title:`标题`,"to apply one item":`申请一件`,"to apply with children":`申请项目和儿童`,"to fix these issues and upgrade command run again.":`解决这些问题并再次运行upgrade命令。`,today:`今天`,tooltip_ack:`已确认`,tooltip_copyState:`将状态值复制到剪贴板`,tooltip_customConfig:`设定值`,tooltip_deleteObject:`删除物件`,tooltip_editObject:`编辑物件`,tooltip_editState:`修改状态值`,tooltip_from:`资源`,tooltip_lc:`最后更改时间`,tooltip_quality:`质量`,tooltip_ts:`时间戳记`,tooltip_user:`用户`,tooltip_value:`值`,true:`正常`,ts:`时间戳`,type:`类型`,unit:`单元`,unknown:`未知`,update:`刷新`,"update adapter information":`更新插件信息`,update_info_no_net:`有关更新控制器的信息,请访问以下页面: <a href="https://github.com/NexoWatt EOS/NexoWatt EOS.docs/blob/master/admin/zh-cn/controller-upgrade.md" target="_blank">Update JS-Contoller</a>`,updated:`刷新`,updates:`刷新`,"updating %s to %s...":`更新 %s 到 %s...`,upload:`上传`,"use GitHub for issues":`我们重视您对我们软件的评分和想法。对于错误报告,请使用我们的 GitHub 问题跟踪器,当您留下评论时,请考虑未解决的问题可能会影响您的体验。您的反馈有助于我们改善。感谢您成为我们社区的一部分!`,"user permissions":`用户权限`,users:`用户`,"users permissions":`用户权限`,utility_group:`实用工具`,val:`值`,value:`值`,"value.from":`来自于`,"value.lc":`上次更新`,"value.q":`质量`,"value.ts":`时间戳`,"value.val":`值`,vehicle_group:`车辆`,version:`版本`,"vis-2 wizard description":`NexoWatt EOS Vis 2 适配器是为您的智能家居提供的现代化、功能强大的可视化解决方案。有了这个适配器,您就可以根据自己的意愿,用现代小部件创建自己的可视化系统。无论您是想将仪表盘设计成简约风格还是具有多种功能,都有无限可能。按自己喜欢的方式设计智能家居界面吧!`,vis_group:`NexoWatt EOS.vis`,visualisation_group:`可视化`,"visualization wizard category":`借助此类适配器,您可以构建仪表板以通过 NexoWatt EOS Visu 应用程序或 Web 界面控制您的家庭。`,"visualization-icons_group":`可视化图标`,"visualization-widgets_group":`可视化小部件`,visualization_group:`可视化`,vote:`投票`,vote21:`选票`,votes:`票数`,votes2:`选票`,warn:`警告`,weather:`天气`,"weather wizard category":`通过天气适配器,您可以获得当地天气信息并将其用于可视化和自动化。`,weather_group:`天气`,"weatherunderground wizard description":`有了 NexoWatt EOS Weather Underground 适配器,您就可以在 NexoWatt EOS 中使用天气数据。例如,这意味着下雨时可以提醒您关闭打开的窗户,或者在暴风雨来临时自动收回遮阳篷。这样,您的智能家居就能更好地适应当前的天气条件,确保更加舒适和安全。`,wetty:`Wetty`,"with js-controller":`带有 js 控制器`,"wizard adapter general description":`从您希望直接安装的适配器中进行选择。您可以稍后在 "适配器 "选项卡中安装其他适配器。`,"wizard welcome description":`此向导将引导您完成新 ioBroker 安装的最重要设置。只需几分钟,所有设置以后都可以更改。`,write:`写`,"write operation":`写`,wrongPassword:`用户名或密码无效`,yesterday:`昨天`,"Åland Islands":`奥兰群岛`,"Serial port":`串口`,"TCP port":`TCP 端口`,"UDP port":`UDP 端口`,"USB device":`USB 设备`,Bluetooth:`蓝牙`,GPIO:`GPIO`,"Also registered by: %s":`也被以下实例注册:%s`,Resource:`资源`,Registered:`注册时间`,"The instance runs and holds the resource":`实例正在运行并占用该资源`,"The instance does not run and would take the resource when started":`实例未运行,启动时将占用该资源`,"In use":`使用中`,Reserved:`已预留`,"Used resources":`已占用的资源`,"No instance has registered a resource":`没有实例注册资源`,'Adapter "%s" allows only one instance, and %s exists already':`适配器 "%s" 只允许一个实例,而 %s 已存在`,'Adapter "%s" allows only one instance per host, and %s exists already on host "%s"':`适配器 "%s" 每个主机只允许一个实例,而 %s 已存在于主机 "%s" 上`,"The admin was updated. Please load the page anew.":`管理界面已更新,请重新加载页面。`,"The connection is not ready yet. Please wait a moment and try again.":`连接尚未就绪。请稍等片刻后重试。`},gy=`admin.chunkReloadTs`,_y=2e4;function vy(e){let{message:t,name:n}=typeof e==`object`&&e?e:{message:e};return typeof t==`string`?t.includes(`Failed to fetch dynamically imported module`)||t.includes(`error loading dynamically imported module`)||t.includes(`Importing a module script failed`)||t.includes(`Unable to preload CSS`)||n===`ChunkLoadError`:!1}function yy(){let e=0;try{e=parseInt(window.sessionStorage.getItem(gy)||`0`,10)||0}catch{}if(Date.now()-e<_y)return!1;try{window.sessionStorage.setItem(gy,Date.now().toString())}catch{}return window.location.reload(),!0}function by(e){yy()&&e.preventDefault()}function xy(e){return Ht.lazy(()=>e().catch(e=>{if(vy(e)&&yy())return new Promise(()=>{});throw e}))}x();var Sy=[`tab-overview`,`tab-adapters`,`tab-instances`,`tab-logs`],Cy=[`tab-overview`,`tab-intro`,`tab-adapters`,`tab-instances`,`tab-objects`,`tab-enums`,`tab-logs`,`tab-users`,`tab-hosts`,`tab-files`,`tab-devicemanager`],wy=xy(()=>r(()=>import(`./Overview-BQ7HBH-7.js`),__vite__mapDeps([35,1,2,3,36,9,15,25,37,28]),import.meta.url)),Ty=xy(()=>r(()=>import(`./Adapters-1AOp__74.js`),__vite__mapDeps([38,1,2,3,36,4,5,6,39,7,8,9,40,41,10,42,11,12,43,44]),import.meta.url)),Ey=xy(()=>r(()=>import(`./Instances-D10dnQY4.js`),__vite__mapDeps([45,2,1,3,36,4,5,9,39,7,8,42,43,44,46,47,20,48,22,49,23]),import.meta.url)),Dy=xy(()=>r(()=>import(`./Intro-DxLBfGZ8.js`),__vite__mapDeps([50,1,2,3,36,7,9,18,21,49,23,24,25]),import.meta.url)),Oy=xy(()=>r(()=>import(`./Logs-CAc6o-d_.js`),__vite__mapDeps([51,1,2,3,36,12,26]),import.meta.url)),ky=xy(()=>r(()=>import(`./Files-CnYmjEbu.js`),__vite__mapDeps([52,2,1,3,36,43,44]),import.meta.url)),Ay=xy(()=>r(()=>import(`./Objects-I64lF3ZS.js`),__vite__mapDeps([53,2,1,3,31,36,47,44,41,11,43,17,34,33,27,37]),import.meta.url)),jy=xy(()=>r(()=>import(`./Users-CKHDvxG5.js`),__vite__mapDeps([54,1,2,3,36,8,55,16,29]),import.meta.url)),My=xy(()=>r(()=>import(`./Enums-Bl4EngJF.js`),__vite__mapDeps([56,2,1,3,36,55,14,15,16,17,18]),import.meta.url)),Ny=xy(()=>r(()=>import(`./CustomTab-B4ywHrnT.js`),__vite__mapDeps([57,2,1,3,36,47]),import.meta.url)),Py=xy(()=>r(()=>import(`./ConfigManager-CGGXU4Jp.js`),__vite__mapDeps([58,1,2,3,13]),import.meta.url)),Fy=xy(()=>r(()=>import(`./Hosts-zFJyiuvd.js`),__vite__mapDeps([59,2,1,3,36,5,40,41,10,42,43,44,19,20,21,48]),import.meta.url)),Iy=xy(()=>r(()=>import(`./EasyMode-A2E3hSMo.js`),__vite__mapDeps([60,1,2,3,46,36,47]),import.meta.url)),Ly={},Ry=()=>String(window.NEXOWATT_EOS_ACCESS_ROLE||`unknown`).toLowerCase(),zy=(e=Ry())=>[`admin`,`service`].includes(e);(window.location.search||``).replace(/^\?/,``).split(`&`).forEach(e=>{let t=e.split(`=`);t[0]&&(Ly[t[0]]=t[1]===void 0||decodeURIComponent(t[1]))});var By={root:{display:`flex`,height:`100%`},appBar:e=>({transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})}),logoWhite:{backgroundColor:`#FFFFFF`},appBarShift:e=>({width:`calc(100% - 180px)`,ml:180/8,transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}),appBarShiftEdit:e=>({width:`calc(100% - 250px)`,ml:250/8,transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}),appBarShiftCompact:e=>({width:`calc(100% - 50px)`,ml:50/8,transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}),menuButton:{marginRight:16},hide:{display:`none`},content:e=>{var t,n,r;return{flexGrow:1,padding:1,paddingTop:0,transition:e.transitions.create(`margin`,{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowY:`auto`,mt:`${(t=e.mixins.toolbar)==null?void 0:t.minHeight}px`,"@media (min-width:0px) and (orientation: landscape)":{mt:(n=e.mixins.toolbar[`@media (min-width:0px) and (orientation: landscape)`])!=null&&n.minHeight?`${e.mixins.toolbar[`@media (min-width:0px) and (orientation: landscape)`].minHeight}px`:void 0},"@media (min-width:600px)":{mt:(r=e.mixins.toolbar[`@media (min-width:600px)`])!=null&&r.minHeight?`${e.mixins.toolbar[`@media (min-width:600px)`].minHeight}px`:void 0}}},contentMargin:{ml:-180/8},contentMarginEdit:{ml:-250/8},contentMarginCompact:{ml:-50/8},contentShift:e=>({transition:e.transitions.create(`margin`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),ml:0}),expertIcon:{width:22,height:22},expertIconActive:{},baseSettingsButton:{color:`red`},avatarNotVisible:{opacity:0,marginLeft:5,transition:`opacity 0.3s`,width:`initial`},avatarVisible:{opacity:1},cmd:{animation:`1s linear infinite alternate $myEffect`,opacity:.2},errorCmd:{color:`#a90000`,animation:`0.2s linear infinite alternate myEffect2`},performed:e=>({color:e.palette.mode===`light`?`#3bfd44`:`#388e3c`,animation:`0.2s linear infinite alternate myEffect2`}),wrapperButtons:{display:`flex`,marginRight:`auto`,overflowY:`auto`,alignItems:`center`},flexGrow:{flexGrow:2},floatingButtons:{position:`fixed`,top:4,left:4,zIndex:1200,display:`flex`,gap:.5},contentNoAppBar:{mt:0,"@media (min-width:0px) and (orientation: landscape)":{mt:0},"@media (min-width:600px)":{mt:0}},contentMenuButtonSpace:{pt:`44px`},styleVersion:{fontSize:10},wrapperName:{display:`flex`,flexDirection:`column`,marginRight:10},expertBadge:{mt:`11px`,mr:`11px`},siteName:{lineHeight:`48px`,fontSize:24,marginLeft:10,marginRight:10,display:`inline-block`,verticalAlign:`middle`},tooltip:{pointerEvents:`none`}};function Vy(e){return e.native||={localStorage:{},sessionStorage:{}},e.native.localStorage||(e.native={localStorage:e.native,sessionStorage:{}}),e.native.sessionStorage||={},e}var Hy=1e4,Uy=5e3,Wy=5e3,Gy=1e3;function Ky(e,t){let n;return Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>r(Error(`${t} got no answer`)),Hy)})]).finally(()=>clearTimeout(n))}function qy(e,t){for(let n of[`localStorage`,`sessionStorage`])for(let[r,i]of Object.entries(t[n]))i===null?delete e[n][r]:e[n][r]=i}var Jy={_id:``,type:`state`,common:{name:`Admin settings`,type:`boolean`,read:!0,write:!1,role:`state`},native:{localStorage:{},sessionStorage:{}}},Yy=class e extends d{constructor(t){super(t),M(this,`translations`,void 0),M(this,`_tempAllStored`,!0),M(this,`refConfigIframe`,null),M(this,`expireInSecInterval`,null),M(this,`toggleThemePossible`,void 0),M(this,`adminGuiConfig`,void 0),M(this,`logsWorker`,null),M(this,`instancesWorker`,null),M(this,`hostsWorker`,null),M(this,`adaptersWorker`,null),M(this,`objectsWorker`,null),M(this,`repoInfoPromise`,null),M(this,`repoInfoRun`,0),M(this,`guiSettings`,null),M(this,`guiSettingsChanges`,{localStorage:{},sessionStorage:{}}),M(this,`guiSettingsWrite`,Promise.resolve()),M(this,`localStorageTimer`,null),M(this,`guiSettingsRetryTimer`,null),M(this,`languageSet`,!1),M(this,`socket`,null),M(this,`adminInstance`,``),M(this,`newsSubscription`,void 0),M(this,`newsSubscribeTimer`,null),M(this,`doNotAskSessionExpiration`,0),M(this,`tabsInfo`,null),M(this,`pendingCommandTimer`,null),M(this,`pendingCommand`,null),M(this,`chatBusy`,!1),M(this,`lastHash`,window.location.hash),M(this,`chatLeaveConfirmed`,!1),M(this,`connectionLostAt`,0),M(this,`localStorageGetItem`,e=>{var t;return(t=this.guiSettings)==null?void 0:t.native.localStorage[e]}),M(this,`localStorageSetItem`,(e,t)=>{if(t===null)t=`null`;else if(t===void 0){this.localStorageRemoveItem(e);return}this.guiSettings&&(this.guiSettings.native.localStorage[e]=t.toString(),this.guiSettingsChanges.localStorage[e]=t.toString()),this.localStorageSave()}),M(this,`localStorageRemoveItem`,e=>{this.guiSettings&&Object.prototype.hasOwnProperty.call(this.guiSettings.native.localStorage,e)&&(delete this.guiSettings.native.localStorage[e],this.guiSettingsChanges.localStorage[e]=null,this.localStorageSave())}),M(this,`sessionStorageGetItem`,e=>{var t;return(t=this.guiSettings)==null?void 0:t.native.sessionStorage[e]}),M(this,`sessionStorageSetItem`,(e,t)=>{if(t===null)t=`null`;else if(t===void 0){this.sessionStorageRemoveItem(e);return}this.guiSettings&&(this.guiSettings.native.sessionStorage[e]=t.toString(),this.guiSettingsChanges.sessionStorage[e]=t.toString()),this.localStorageSave()}),M(this,`sessionStorageRemoveItem`,e=>{this.guiSettings&&Object.prototype.hasOwnProperty.call(this.guiSettings.native.sessionStorage,e)&&(delete this.guiSettings.native.sessionStorage[e],this.guiSettingsChanges.sessionStorage[e]=null,this.localStorageSave())}),M(this,`toggleTranslation`,()=>{(window._localStorage||window.localStorage).setItem(`App.noTranslation`,this.state.noTranslation?`false`:`true`),this.setState({noTranslation:!this.state.noTranslation})}),M(this,`onEosPolicyChanged`,e=>{var t;let n=e instanceof CustomEvent?e.detail:null;if(!n||typeof n!=`object`||!(`policy`in n))return;let r=n.policy,i=`unknown`;if(r&&typeof r==`object`&&`authenticated`in r&&r.authenticated===!0&&`role`in r&&typeof r.role==`string`&&[`admin`,`service`,`installer`,`enduser`].includes(r.role)&&!(`mustChangePassword`in r&&r.mustChangePassword===!0)&&(i=r.role),window.NEXOWATT_EOS_ACCESS_ROLE=i,i===this.state.eosAccessRole)return;let a=[`admin`,`service`].includes(i),o=(window._sessionStorage||window.sessionStorage).getItem(`App.expertMode`);this.setState({eosAccessRole:i,expertMode:a&&(o?o===`true`:!!((t=this.state.systemConfig)!=null&&t.common.expertMode)),expertModeDialog:!1})}),M(this,`updateHosts`,e=>{let t=JSON.parse(JSON.stringify(this.state.hosts));e.forEach(e=>{let n=t.find(t=>t._id===e.id);if(n){let r=t.indexOf(n);e.obj?t[r]=e.obj:t.splice(r,1)}else t.push(e.obj)}),this.setState({hosts:t})}),M(this,`repoChangeHandler`,()=>{this.readRepoAndInstalledInfo(this.state.currentHost,{update:!0}).then(()=>console.log(`Repo updated!`))}),M(this,`adaptersChangeHandler`,e=>{let t=JSON.parse(JSON.stringify(this.state.installed)),n=!1;e.forEach(e=>{let r=e.id.split(`.`)[2];e.type===`deleted`||!e.obj?t[r]&&(n=!0,delete t[r]):t[r]?Object.keys(t[r]).forEach(i=>{e.obj&&t[r][i]!==e.obj.common[i]&&(t[r][i]=e.obj.common[i],n=!0)}):(t[r]={version:e.obj.common.version},n=!0)}),n&&this.setState({installed:t})}),M(this,`onSessionExpiration`,e=>new Promise(t=>{let n=Math.max(0,e-Date.now()+500);this.expireInSecInterval&&=(clearInterval(this.expireInSecInterval),null),this.expireInSecInterval=setTimeout(()=>{ln.deleteTokensStatic(),window.location.replace(`/login.html`)},n),t(!1)})),M(this,`onDiscoveryAlive`,(e,t)=>{!!(t!=null&&t.val)!==this.state.discoveryAlive&&this.setState({discoveryAlive:!!(t!=null&&t.val)})}),M(this,`onDiscoveryObject`,(e,t)=>{let n=Bv(t);n!==this.state.discoveryProposals&&this.setState({discoveryProposals:n})}),M(this,`getDiscoveryModal`,()=>this.state.systemConfig&&this.socket?E(Kv,{themeType:this.state.themeType,themeName:this.state.themeName,theme:this.state.theme,socket:this.socket,systemConfig:this.state.systemConfig.common,dateFormat:this.state.systemConfig.common.dateFormat,currentHost:this.state.currentHost,defaultLogLevel:this.state.systemConfig.common.defaultLogLevel||`info`,repository:this.state.repository,hosts:this.state.hosts,onClose:()=>d.doNavigate(null)}):null),M(this,`handleNewNotifications`,async e=>{let t={warning:0,other:0};if(!e)this.setState({noNotifications:t,notifications:{}});else{for(let n of Object.values(e))if(n!=null&&n.result){for(let[e,r]of Object.entries(n.result))if(e!==`system`)for(let e of Object.values(r.categories))for(let n of Object.values(e.instances)){let r=e.severity===`alert`;t[r?`warning`:`other`]+=n.messages.length}}if(this.instancesWorker){let n=await this.instancesWorker.getObjects();this.setState({noNotifications:t,notifications:{notifications:e,instances:n}})}}}),M(this,`showAdaptersWarning`,async(e,t)=>{if(!e||!e[t]||!e[t].result)return;let n=e[t].result;if(n!=null&&n.system&&Object.keys(n.system.categories).length){var r;await((r=this.instancesWorker)==null?void 0:r.getObjects().then(e=>e&&this.setState({showHostWarning:{host:t,instances:e,result:n}})))}}),M(this,`onNews`,async(e,t)=>{if(!this.socket)throw Error(`Socket not initialized`);try{var n;if(!((n=this.state.systemConfig)!=null&&n.common.licenseConfirmed))return;let e=await this.socket.getState(this.ownNewsState(`newsLastId`));if(t!=null&&t.val){let n=null;try{n=JSON.parse(t.val)}catch{console.error(`Cannot parse news: ${t.val}`)}if(n!=null&&n.length&&n[0].id!==(e==null?void 0:e.val)){var r,i,a;let t=await this.socket.getUuid(),o=await this.socket.getHostInfo(this.state.currentHost).catch(()=>null),s=await this.socket.getCompactInstances().catch(()=>null),c;if(this.state.currentHost){let e=await this.socket.getDiagData(this.state.currentHost,`normal`);c=e==null?void 0:e.objectsType}let l=await((r=this.objectsWorker)==null?void 0:r.getObjects()),u=Object.keys(l||{}).length;await((i=this.repoInfoPromise)==null?void 0:i.catch(()=>{}));let d=bd(n,e==null?void 0:e.val,{lang:j.getLanguage(),adapters:this.state.adapters,instances:s||{},nodeVersion:o&&o[`Node.js`]||`?`,npmVersion:o&&o.NPM||`?`,jsControllerVersion:((a=this.state.installed)==null||(a=a[`js-controller`])==null?void 0:a.version)||``,os:o&&o.os||`?`,activeRepo:this.state.systemConfig.common.activeRepo,uuid:t,objectsDbType:c||`jsonl`,noObjects:u});d!=null&&d.length&&this.setState({showNews:{checkNews:d,lastNewsId:e==null?void 0:e.val}})}}}catch(e){console.error(`Could not process news: ${e.stack}`),this.showAlert(`Could not process news: ${e.stack}`,`error`)}}),M(this,`logsWorkerChanged`,e=>{var t;(t=this.logsWorker)==null||t.setCurrentHost(e)}),M(this,`onHashChanged`,()=>{let t=window.location.hash;this.chatBlocksLeaving(e.tabOfHash(t))?(window.history.replaceState(null,``,this.lastHash||`${window.location.pathname}${window.location.search}`),this.setState({chatLeaveDialog:{target:{hash:t},reason:`busy`}})):(this.lastHash=t,this.setState({currentTab:d.getLocation()},()=>this.setCurrentTabTitle()))}),M(this,`toggleTheme`,t=>{let n=this.state.themeName,r=t||Ne.toggleTheme(n),i=e.createTheme(r);this.setState({theme:i,themeName:r,themeType:e.getThemeType(i)},()=>{var e,t;(e=this.refConfigIframe)==null||(e=e.contentWindow)==null||e.postMessage(`updateTheme`,`*`),(t=this.refConfigIframe)==null||(t=t.contentWindow)==null||t.postMessage({type:`updateTheme`,themeName:r},`*`)})}),M(this,`handleNavigation`,(e,t,n)=>{var r;if(e){if(this.chatBlocksLeaving(e)){this.setState({chatLeaveDialog:{target:{tab:e,subTab:t,param:n},reason:`busy`}});return}this._tempAllStored?(d.doNavigate(e,t,n),this.lastHash=window.location.hash,this.setState({currentTab:d.getLocation()})):this.setState({dataNotStoredDialog:!0,dataNotStoredTab:{tab:e,subTab:t,param:n}})}(this.props.width===`xs`||this.props.width===`sm`)&&this.handleDrawerState(J.closed),e||=((r=this.state.currentTab)==null?void 0:r.tab)||``,this.setTitle(e.replace(`tab-`,``))});try{window.alert=e=>{let t=(e==null?void 0:e.toString())??``,n=Date.now();this.isCausedByConnectionLoss(t,n)?console.warn(`Not shown, as the connection to admin is lost: ${t}`):t.toLowerCase().includes(`error`)?(console.error(t),setTimeout(()=>{this.isCausedByConnectionLoss(t,n)?console.warn(`Not shown, as the connection to admin is lost: ${t}`):this.showAlert(t,`error`)},Gy)):(console.log(t),this.showAlert(t,`info`))}}catch{}this.translations=Rt;let n={en:ay,de:oy,ru:sy,pt:cy,nl:ly,fr:uy,it:dy,es:fy,pl:py,uk:my,"zh-cn":hy};Object.keys(n).forEach(e=>Object.assign(this.translations[e],n[e])),j.extendTranslations(this.translations),j.setLanguage((window.navigator.language||window.navigator.userLanguage||`en`).substring(0,2).toLowerCase()),this.adminGuiConfig={admin:{menu:{},settings:{},adapters:{},login:{}}};let r=window.vendorPrefix;if(this.toggleThemePossible=!r||r===`@@vendorPrefix@@`||r===`MV`,Ly.login){let t=e.createTheme();this.state={login:!0,theme:t,themeName:e.getThemeName(t),themeType:e.getThemeType(t)}}else{let t=(window._localStorage||window.localStorage).getItem(`App.drawerState`),n;n=t?parseInt(t,10):this.props.width===`xs`?J.closed:J.opened;let r=e.createTheme();Object.defineProperty(window,"configNotSaved",{get:()=>this.state.configNotSaved,set:e=>{let t=!e;t!==this._tempAllStored&&(this._tempAllStored=t,this.forceUpdate())},configurable:!0}),this.state={connected:!1,progress:0,ready:!1,lang:`en`,hostname:window.location.hostname,expertMode:!1,eosAccessRole:Ry(),chatDockWidth:0,hosts:[],currentHost:``,currentHostName:``,ownHost:``,currentTab:d.getLocation(),systemConfig:null,user:null,repository:{},installed:{},waitForRestart:!1,tabs:null,config:{},stateChanged:!1,theme:r,themeName:e.getThemeName(r),themeType:e.getThemeType(r),alert:!1,alertType:`info`,alertMessage:``,drawerState:n,editMenuList:!1,tab:null,dataNotStoredDialog:!1,dataNotStoredTab:null,chatLeaveDialog:null,baseSettingsOpened:!1,unsavedDataInDialog:!1,systemSettingsOpened:!1,cmd:null,cmdDialog:!1,commandHost:null,commandError:!1,commandRunning:!1,wizard:!0,performed:!1,showTips:!1,discoveryAlive:!1,discoveryProposals:0,readTimeoutMs:Xv.getReadTimeoutMs(),showSlowConnectionWarning:!1,versionAdmin:``,forceUpdateAdapters:0,noTranslation:(window._localStorage||window.localStorage).getItem(`App.noTranslation`)!==`false`,cloudNotConnected:!1,cloudReconnect:0,showRedirect:``,redirectCountDown:0,triggerAdapterUpdate:0,updating:!1,notificationsDialog:!1,notifications:{},noNotifications:{warning:0,other:0},configNotSaved:!1,login:!1,showHostWarning:null,adapters:{},askForTokenRefresh:null},this.logsWorker=null,this.instancesWorker=null,this.hostsWorker=null}}static getDerivedStateFromError(e){return{hasGlobalError:e}}componentDidCatch(e){this.setState({hasGlobalError:e})}static async checkSsoResponse(){let e=new URLSearchParams(window.location.search);if(e.has(`ssoCode`)){try{let t=await fetch(sr(`sso-token`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({code:e.get(`ssoCode`)})}),n=await t.json();t.ok&&n.access_token&&ln.saveTokensStatic(n,!0)}catch(e){console.error(`Cannot finish the single sign-on: ${e}`)}window.localStorage.removeItem(`oidc_id_token`),window.location.search=``}else if(e.has(`id_token`)&&(window.localStorage.setItem(`oidc_id_token`,e.get(`id_token`)),window.location.search=``),e.has(`ssoLoginResponse`)){let t=JSON.parse(e.get(`ssoLoginResponse`));ln.saveTokensStatic(t,!0),window.location.search=``}}setUnsavedData(e){e!==this.state.unsavedDataInDialog&&this.setState({unsavedDataInDialog:e})}mustInvertBackground(e){if(!e)return!1;let t=Ne.invertColor(e,!0);return t===`#FFFFFF`&&this.state.themeType===`dark`||t===`#000000`&&this.state.themeType===`light`}localStorageSave(){this.localStorageTimer&&clearTimeout(this.localStorageTimer),this.guiSettingsRetryTimer&&=(clearTimeout(this.guiSettingsRetryTimer),null),this.localStorageTimer=setTimeout(()=>{this.localStorageTimer=null,this.guiSettingsWrite=this.guiSettingsWrite.then(()=>this.writeGuiSettings())},200)}async writeGuiSettings(){let e=this.guiSettingsChanges;if(!this.guiSettings||!this.socket||!Object.keys(e.localStorage).length&&!Object.keys(e.sessionStorage).length)return;this.guiSettingsChanges={localStorage:{},sessionStorage:{}};let t=`system.adapter.${this.adminInstance}.guiSettings`;try{let n=Vy(await Ky(this.socket.getObject(t),`Reading`)||JSON.parse(JSON.stringify(this.guiSettings)));qy(n.native,e),await Ky(this.socket.setObject(t,n),`Writing`),this.guiSettings&&(this.guiSettings=n,qy(this.guiSettings.native,this.guiSettingsChanges))}catch(r){var n;for(let t of[`localStorage`,`sessionStorage`])this.guiSettingsChanges[t]={...e[t],...this.guiSettingsChanges[t]};console.warn(`Could not save "${t}": ${r.message}`),(n=this.socket)!=null&&n.isConnected()&&!this.localStorageTimer&&!this.guiSettingsRetryTimer&&(this.guiSettingsRetryTimer=setTimeout(()=>{this.guiSettingsRetryTimer=null,this.localStorageSave()},Uy))}}async getGUISettings(){let e=null;if(!this.adminInstance||!this.socket)return;let t=!1;try{e=await this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`)}catch(e){t=!0,console.warn(`Could not get "system.adapter.${this.adminInstance}.guiSettings": ${e.message}`)}if(!e&&!t){e=JSON.parse(JSON.stringify(Jy));try{await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`,e)}catch(e){console.warn(`Could not update "system.adapter.${this.adminInstance}.guiSettings": ${e.message}`)}}let n;try{n=await this.socket.getState(`system.adapter.${this.adminInstance}.guiSettings`)}catch{n={val:!1}}if(n!=null&&n.val){this.guiSettings=Vy(e||JSON.parse(JSON.stringify(Jy))),(Object.keys(this.guiSettingsChanges.localStorage).length||Object.keys(this.guiSettingsChanges.sessionStorage).length)&&(qy(this.guiSettings.native,this.guiSettingsChanges),this.localStorageSave()),window._localStorage={getItem:this.localStorageGetItem,setItem:this.localStorageSetItem,removeItem:this.localStorageRemoveItem},window._sessionStorage={getItem:this.sessionStorageGetItem,setItem:this.sessionStorageSetItem,removeItem:this.sessionStorageRemoveItem};let t=(window._localStorage||window.localStorage).getItem(`App.drawerState`),n;n=t?parseInt(t,10):this.props.width===`xs`?J.closed:J.opened;let r=(window._localStorage||window.localStorage).getItem(`App.noTranslation`)!==`false`;this.setState({guiSettings:!0,drawerState:n,noTranslation:r},()=>{Ne.getThemeName()!==this.state.theme.name&&this.toggleTheme(Ne.getThemeName())})}else this.state.guiSettings&&(window._localStorage=void 0,window._sessionStorage=void 0,this.setState({guiSettings:!1}))}async enableGuiSettings(e,t){if(e&&!this.guiSettings&&this.socket){let e=await this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`);this.guiSettings=e||JSON.parse(JSON.stringify(Jy)),t||!this.guiSettings.native||!Object.keys(this.guiSettings.native).length?(this.guiSettings.native={localStorage:{},sessionStorage:{}},Object.keys(window.localStorage).forEach(e=>{e!==`getItem`&&e!==`setItem`&&e!==`removeItem`&&e!==`clear`&&e!==`key`&&e!==`length`&&(this.guiSettings.native.localStorage[e]=window.localStorage.getItem(e))}),Object.keys(window.sessionStorage).forEach(e=>{e!==`getItem`&&e!==`setItem`&&e!==`removeItem`&&e!==`clear`&&e!==`key`&&e!==`length`&&(this.guiSettings.native.sessionStorage[e]=window.sessionStorage.getItem(e))}),await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`,this.guiSettings),await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`,{val:!0,ack:!0})):(await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`,{val:!0,ack:!0}),window.location.reload()),await this.getGUISettings()}else if(!e&&this.guiSettings&&this.socket){if(!await this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`))try{await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`,Jy)}catch(e){console.error(`Cannot create system.adapter.${this.adminInstance}.guiSettings": ${e}`)}window._localStorage=void 0,window._sessionStorage=void 0,Object.keys(window.localStorage).forEach(e=>window.localStorage.removeItem(e)),Object.keys(window.sessionStorage).forEach(e=>window.sessionStorage.removeItem(e)),Object.keys(this.guiSettings.native.localStorage).forEach(e=>window.localStorage.setItem(e,this.guiSettings.native.localStorage[e])),Object.keys(this.guiSettings.native.sessionStorage).forEach(e=>window.sessionStorage.setItem(e,this.guiSettings.native.sessionStorage[e])),this.guiSettings=null,this.guiSettingsChanges={localStorage:{},sessionStorage:{}},this.guiSettingsRetryTimer&&=(clearTimeout(this.guiSettingsRetryTimer),null);try{await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`,{val:!1,ack:!0})}catch(e){window.alert(`Cannot disable settings: ${e}`)}this.setState({guiSettings:!1})}}componentDidMount(){Ly.login?window.location.replace(`/login.html`):(ln.deleteTokensStatic(),window.addEventListener(`vite:preloadError`,by),window.addEventListener(`nexowatt-eos-policy`,this.onEosPolicyChanged),this.state.login||(window.addEventListener(`hashchange`,this.onHashChanged,!1),this.state.currentTab.tab?this.setTitle(this.state.currentTab.tab.replace(`tab-`,``)):this.handleNavigation(`tab-intro`),this.socket=new ln({protocol:window.location.protocol,host:window.location.hostname,name:`eos-admin`,admin5only:!0,port:e.getPort(),cmdTimeout:this.state.readTimeoutMs,autoSubscribes:[`system.adapter.*`],autoSubscribeLog:!0,tokenTimeoutHandler:this.onSessionExpiration,onProgress:async e=>{if(this.socket){if(e===_.CONNECTING)this.state.connected&&(this.connectionLostAt=Date.now()),this.setState({connected:!1});else if(e===_.READY)try{let e=await this.socket.getVersion();console.log(`Stored version: ${this.state.versionAdmin}, new version: ${e.version}`),this.state.versionAdmin&&this.state.versionAdmin!==e.version&&(window.alert(`New adapter version detected. Reloading...`),setTimeout(()=>window.location.reload(),500)),this.adminInstance||=await this.socket.getCurrentInstance(),await this.getGUISettings();let n={connected:!0,progress:100,versionAdmin:e.version,disableMcp:!0};if(this.state.cmd&&/\b(?:admin|eos-admin)(?:@[-.\w]+)?(?:\s+--debug)?$/.test(this.state.cmd))n.commandRunning=!1,n.forceUpdateAdapters=this.state.forceUpdateAdapters+1,this.closeCmdDialog(()=>{this.setState(n),window.location.reload()});else{try{var t;let e=await this.socket.getObject(`system.adapter.${this.adminInstance}`);n.disableMcp=!0,e!=null&&(t=e.native)!=null&&t.language?e.native.language!==j.getLanguage()&&(console.log(`Language changed to ${e.native.language}`),j.setLanguage(e.native.language),this.languageSet?window.location.reload():this.languageSet=!0):this.socket.systemLang!==j.getLanguage()&&(console.log(`Language changed to ${this.socket.systemLang}`),j.setLanguage(this.socket.systemLang),this.languageSet?window.location.reload():this.languageSet=!0)}catch(e){console.error(`Cannot read admin settings: ${e}`)}this.setState(n)}}catch(e){console.error(`Cannot read version: ${e}`),e===`ioBroker is not connected`&&(setInterval(()=>{this.state.cloudReconnect>0?this.setState({cloudReconnect:this.state.cloudReconnect-1}):window.location.reload()},1e3),this.setState({cloudNotConnected:!0,cloudReconnect:10}))}else this.setState({connected:!0,progress:Math.round(_.READY/e*100)})}},onReady:async()=>{var e;if(!this.socket)throw Error(`Socket not initialized`);this.adminGuiConfig={admin:{menu:{},settings:{},adapters:{},login:{}},...(e=this.socket)==null||(e=e.systemConfig)==null||(e=e.native)==null?void 0:e.vendor},this.adminGuiConfig.admin.menu||={},this.adminGuiConfig.admin.settings||={},this.adminGuiConfig.admin.adapters||={},this.adminGuiConfig.admin.login||={};try{var t,n;try{var r;this.adminInstance||=await this.socket.getCurrentInstance(),this.adminInstance||console.error(`Cannot read admin instance!`);let e=await this.socket.getObject(`system.adapter.${this.adminInstance}`);e!=null&&(r=e.native)!=null&&r.language?j.setLanguage(e.native.language):j.setLanguage(this.socket.systemLang)}catch(e){console.warn(`Cannot read the settings of this admin: ${e.message}`),j.setLanguage(this.socket.systemLang)}this.languageSet=!0;let e=!1;try{e=await this.socket.getIsEasyModeStrict()}catch(e){console.warn(`Cannot read the easy mode: ${e.message}`)}if(await this.getGUISettings(),e){let e=await this.socket.getEasyMode();this.setState({lang:this.socket.systemLang,ready:!0,strictEasyMode:!0,easyModeConfigs:e.configs});return}this.logsWorker||=new Fd(this.socket,1e3),this.instancesWorker||=new Ld(this.socket),this.hostsWorker||=new Rd(this.socket),this.adaptersWorker||=new zd(this.socket),this.objectsWorker||=new Bd(this.socket);let a={lang:this.socket.systemLang,ready:!0};try{a.systemConfig=await this.socket.getCompactSystemConfig(),a.wizard=!a.systemConfig.common.licenseConfirmed,a.showTips=!a.wizard&&!a.systemConfig.common.tipsDisabled,await this.findCurrentHost(a),a.currentHost&&this.readRepoAndInstalledInfo(a.currentHost)}catch(e){console.log(`Error reading repo in onReady: ${e.stack}`)}this.adaptersWorker.registerRepositoryHandler(this.repoChangeHandler),this.adaptersWorker.registerHandler(this.adaptersChangeHandler),this.hostsWorker.registerHandler(this.updateHosts),this.hostsWorker.registerNotificationHandler(this.handleNewNotifications);let o=(window._sessionStorage||window.sessionStorage).getItem(`App.expertMode`);if(a.expertMode=zy(this.state.eosAccessRole)&&(o?o===`true`:!!((t=a.systemConfig)!=null&&t.common.expertMode)),this.socket.isSecure||(n=this.socket.systemConfig)!=null&&(n=n.native)!=null&&n.vendor)try{var i;let e=await this.socket.getCurrentUser(),t=await this.socket.getObject(`system.user.${e}`);t!=null&&(i=t.native)!=null&&i.vendor&&Object.assign(this.adminGuiConfig,t.native.vendor),this.socket.isSecure&&t&&this.setState({user:{id:t._id,name:Ne.getObjectNameFromObj(t,this.socket.systemLang),color:t.common.color,icon:t.common.icon,invertBackground:t.common.color?this.mustInvertBackground(t.common.color):!1,group:await this.getLeadingGroupName(t._id)}})}catch(e){console.error(`Could not determine user to show: ${e.toString()}, ${e.stack}`),this.showAlert(e.toString(),`error`)}this.setState(a,()=>this.setCurrentTabTitle()),this.socket.subscribeState(`system.adapter.discovery.0.alive`,this.onDiscoveryAlive),this.socket.getObject(`system.discovery`).then(e=>this.onDiscoveryObject(`system.discovery`,e)).catch(e=>console.warn(`Cannot read system.discovery: ${e}`)),this.socket.subscribeObject(`system.discovery`,this.onDiscoveryObject),setTimeout(()=>this.logsWorkerChanged(this.state.currentHost),1e3),this.newsSubscribeTimer&&clearTimeout(this.newsSubscribeTimer),this.newsSubscribeTimer=setTimeout(()=>{this.newsSubscribeTimer=null,this.subscribeOwnNews().catch(e=>console.warn(`Cannot subscribe EOS news: ${e}`))},5e3),setTimeout(async()=>{var e;let t=await((e=this.hostsWorker)==null?void 0:e.getNotifications(a.currentHost));await this.handleNewNotifications(t)},3e3)}catch(e){console.error(`Error in onReady: ${e.stack}`),this.showAlert(`Error in onReady: ${e.stack}`,`error`),this.setState({ready:!0})}},onError:e=>{console.error(e);let t;t=e instanceof Error&&e.message||e.toString(),t===`ioBroker is not connected`?this.state.cloudNotConnected||(this.showAlert(j.t(t),`error`),setInterval(()=>{this.state.cloudReconnect>0?this.setState({cloudReconnect:this.state.cloudReconnect-1}):window.location.reload()},1e3),this.setState({cloudNotConnected:!0,cloudReconnect:10})):this.showAlert(t,`error`)}}),window.NEXOWATT_EOS_ADMIN_SOCKET=this.socket,window.NEXOWATT_EOS_SOCKET=this.socket,window.dispatchEvent(new CustomEvent(`nexowatt-eos-admin-socket-ready`))))}componentWillUnmount(){var e,t,n,r,i;if(window.removeEventListener(`hashchange`,this.onHashChanged,!1),window.removeEventListener(`vite:preloadError`,by),window.removeEventListener(`nexowatt-eos-policy`,this.onEosPolicyChanged),(e=this.socket)==null||e.unsubscribeState(`system.adapter.discovery.0.alive`,this.onDiscoveryAlive),(t=this.socket)==null||t.unsubscribeObject(`system.discovery`,this.onDiscoveryObject),this.newsSubscribeTimer&&=(clearTimeout(this.newsSubscribeTimer),null),this.newsSubscription){var a;(a=this.socket)==null||a.unsubscribeState(this.newsSubscription,this.onNews),this.newsSubscription=void 0}(n=this.adaptersWorker)==null||n.unregisterRepositoryHandler(this.repoChangeHandler),(r=this.adaptersWorker)==null||r.unregisterHandler(this.adaptersChangeHandler),(i=this.hostsWorker)==null||i.unregisterHandler(this.updateHosts),this.expireInSecInterval&&=(clearInterval(this.expireInSecInterval),null),this.guiSettingsRetryTimer&&=(clearTimeout(this.guiSettingsRetryTimer),null),this.pendingCommandTimer&&=(clearTimeout(this.pendingCommandTimer),null),this.pendingCommand=null,window._localStorage&&(window._localStorage=void 0,window._sessionStorage=void 0)}async findCurrentHost(e){if(!this.socket)return;if(e.hosts=await this.socket.getCompactHosts(),!this.state.currentHost){let r=(window._localStorage||window.localStorage).getItem(`App.currentHost`),i=e.hosts.find(e=>e._id===r);if(r&&i){var t;e.currentHost=i._id,e.currentHostName=((t=i.common)==null?void 0:t.name)||i._id.replace(`system.host.`,``)}else{var n;e.currentHost=e.hosts[0]._id,e.currentHostName=((n=e.hosts[0].common)==null?void 0:n.name)||e.hosts[0]._id.replace(`system.host.`,``)}}e.ownHost=e.currentHost;let r;try{r=await this.socket.getState(`${e.currentHost}.alive`)}catch(t){r=null,console.warn(`Cannot get state ${e.currentHost}.alive: ${t}`)}if(!(r!=null&&r.val))for(let t=0;t<e.hosts.length;t++)r=await this.socket.getState(`${e.hosts[t]._id}.alive`),r!=null&&r.val&&(e.currentHost=e.hosts[t]._id,e.currentHostName=e.hosts[t].common.name)}renderTokenTimeoutDialog(){return this.state.askForTokenRefresh?N(u,{open:!0,onClose:()=>e.logout(),children:[N(ce,{children:[E(de,{children:j.t(`ra_Session will expire in %s seconds. Continue?`,Math.round((this.state.askForTokenRefresh.expireAt-Date.now())/1e3))}),E(`div`,{children:E(Ae,{label:j.t(`ra_Do not ask for next 2 hours in this session`),control:E(Oe,{checked:this.state.askForTokenRefresh.doNotAsk,onChange:()=>{var e;let t={...this.state.askForTokenRefresh};t.doNotAsk=!((e=this.state.askForTokenRefresh)!=null&&e.doNotAsk),this.setState({askForTokenRefresh:t})}})})})]}),N(xt,{children:[E(H,{onClick:()=>{var e,t;let n=(e=this.state.askForTokenRefresh)==null?void 0:e.resolve;(t=this.state.askForTokenRefresh)!=null&&t.doNotAsk&&(this.doNotAskSessionExpiration=Date.now()+72e5),this.expireInSecInterval&&=(clearInterval(this.expireInSecInterval),null),this.setState({askForTokenRefresh:null},()=>n==null?void 0:n(!0))},variant:`contained`,startIcon:E($o,{}),children:j.t(`ra_Continue`)}),E(H,{onClick:()=>e.logout(),variant:`outlined`,color:`grey`,startIcon:E(is,{}),children:j.t(`ra_Logout`)})]})]}):null}ownNewsState(e){if(!/^eos-admin\.(0|[1-9]\d*)$/.test(this.adminInstance))throw Error(`EOS_NEWS_INSTANCE_UNAVAILABLE`);return`${this.adminInstance}.info.${e}`}async subscribeOwnNews(){if(!this.socket)return;let e=this.ownNewsState(`newsFeed`);this.newsSubscription&&this.newsSubscription!==e&&this.socket.unsubscribeState(this.newsSubscription,this.onNews),this.newsSubscription=e,await this.socket.subscribeState(e,this.onNews)}renderNotificationsDialog(){var e,t;return!this.state.notificationsDialog||!this.state.systemConfig||!this.socket?null:E(gs,{notifications:((e=this.state.notifications)==null?void 0:e.notifications)||{},instances:((t=this.state.notifications)==null?void 0:t.instances)||{},onClose:()=>this.setState({notificationsDialog:!1}),ackCallback:(e,t)=>this.socket.clearNotifications(e,t),dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma,themeType:this.state.themeType,themeName:this.state.themeName,theme:this.state.theme,socket:this.socket})}renderHostWarningDialog(){return!this.state.showHostWarning||!this.state.systemConfig||!this.socket?null:E(jd,{instances:this.state.showHostWarning.instances,messages:this.state.showHostWarning.result.system.categories,dateFormat:this.state.systemConfig.common.dateFormat,themeType:this.state.themeType,ackCallback:e=>this.socket.clearNotifications(this.state.showHostWarning.host,e),onClose:()=>this.setState({showHostWarning:null})})}renderNewsDialog(){return!this.state.showNews||!this.socket?null:E(xd,{newsArr:this.state.showNews.checkNews,current:this.state.showNews.lastNewsId,onSetLastNewsId:async e=>{e&&await this.socket.setState(this.ownNewsState(`newsLastId`),{val:e,ack:!0}),this.setState({showNews:null})}})}renderTipsDialog(){return!this.state.showTips||this.state.wizard||this.state.showNews||this.state.showHostWarning?null:E(iy,{t:j.t,lang:this.state.lang,lastTipId:(window._localStorage||window.localStorage).getItem(e.LAST_TIP_ID),onClose:(t,n)=>{(window._localStorage||window.localStorage).setItem(e.LAST_TIP_ID,n),this.setState({showTips:!1}),t&&this.disableTips()}})}async disableTips(){if(this.socket)try{var e;let t=await this.socket.getSystemConfig(!0);t!=null&&t.common&&!t.common.tipsDisabled&&(t.common.tipsDisabled=!0,await this.socket.setSystemConfig(t)),(e=this.state.systemConfig)!=null&&e.common&&this.setState({systemConfig:{...this.state.systemConfig,common:{...this.state.systemConfig.common,tipsDisabled:!0}}})}catch(e){this.showAlert(`Cannot save system configuration: ${e.toString()}`,`error`)}}renderSlowConnectionWarning(){return this.state.showSlowConnectionWarning?E(Xv,{readTimeoutMs:this.state.readTimeoutMs,t:j.t,onClose:e=>{e?this.setState({showSlowConnectionWarning:!1,readTimeoutMs:e},()=>this.readRepoAndInstalledInfo(this.state.currentHost,{offerLongerTimeout:!0})):this.setState({showSlowConnectionWarning:!1})}}):null}readRepoAndInstalledInfo(e,t){let n=this.readRepoAndInstalledInfoRun(e,++this.repoInfoRun,t);return this.repoInfoPromise=n,n}async readRepoAndInstalledInfoRun(e,t,n){if(!this.socket)throw Error(`Socket not initialized`);let r=n==null?void 0:n.update,i=()=>{n!=null&&n.offerLongerTimeout&&this.setState({showSlowConnectionWarning:!0})},[a,o,s]=await Promise.all([this.socket.getCompactRepository(e,r,this.state.readTimeoutMs).catch(e=>(window.alert(`Cannot getRepositoryCompact: ${e}`),e.toString().includes(`timeout`)&&i(),{})),this.socket.getCompactInstalled(e,r,this.state.readTimeoutMs).catch(e=>(window.alert(`Cannot getInstalled: ${e}`),e.toString().includes(`timeout`)&&i(),{})),this.socket.getCompactAdapters(r).then(e=>(t===this.repoInfoRun&&this.setState({adapters:e}),e)).catch(e=>(window.alert(`Cannot read adapters: ${e}`),{}))]);t===this.repoInfoRun&&(o&&s&&Object.keys(s).forEach(e=>{o[e]&&s[e].iv&&(o[e].ignoreVersion=s[e].iv)}),this.setState({repository:a,installed:o,adapters:s}))}static tabOfHash(e){return e.replace(/^#/,``).split(`/`)[0]}static isAdminTab(e){return!e||Cy.includes(e)}chatBlocksLeaving(t){return this.chatLeaveConfirmed?(this.chatLeaveConfirmed=!1,!1):this.chatBusy&&e.isAdminTab(e.tabOfHash(this.lastHash))&&!e.isAdminTab(t)}assistantNavigate(t){let n=t.startsWith(`#`)?t:`#${t}`;return e.isAdminTab(e.tabOfHash(n))?(window.location.hash=n,Promise.resolve(!0)):new Promise(e=>this.setState({chatLeaveDialog:{target:{hash:n},reason:`assistant`,resolve:e}}))}onChatLeaveDialog(e){let t=this.state.chatLeaveDialog;this.setState({chatLeaveDialog:null},()=>{var n;t==null||(n=t.resolve)==null||n.call(t,e);let r=t==null?void 0:t.target;e&&r&&(this.chatLeaveConfirmed=!0,`hash`in r?window.location.hash=r.hash:this.handleNavigation(r.tab,r.subTab,r.param))})}static getPort(){let t=parseInt(window.location.port,10);if(Number.isNaN(t))switch(e.getProtocol()){case`https:`:t=443;break;case`http:`:t=80}return t&&t!==3e3||(t=8188),t}static getProtocol(){return window.location.protocol}static createTheme(e){return a(Ne.getThemeName(e))}static getThemeName(e){return e.name}static getThemeType(e){return e.palette.mode}renderHostSelector(){return!this.socket||!this.hostsWorker?null:E(js,{name:`admin.appBar.hostSelector`,config:this.adminGuiConfig,children:E(fd,{themeType:this.state.themeType,expertMode:this.state.expertMode,socket:this.socket,hostsWorker:this.hostsWorker,currentHost:this.state.currentHost,setCurrentHost:(e,t)=>{this.setState({currentHostName:e,currentHost:t},async()=>{var e;this.logsWorkerChanged(t),(window._localStorage||window.localStorage).setItem(`App.currentHost`,t),await this.readRepoAndInstalledInfo(t,{offerLongerTimeout:!0});let n=await((e=this.hostsWorker)==null?void 0:e.getNotifications(t));await this.handleNewNotifications(n)})}})})}setCurrentTabTitle(){this.setTitle(this.state.currentTab.tab.replace(`tab-`,``))}setTitle(e){document.title=`${e} - ${this.state.currentHostName||`NexoWatt EOS`}`}getCurrentTab(){var e;if(!this.socket||!this.hostsWorker||!this.adaptersWorker||!this.instancesWorker||!this.objectsWorker||!this.state.systemConfig||!this.logsWorker)return null;if((e=this.state)!=null&&(e=e.currentTab)!=null&&e.tab){if(this.state.currentTab.tab===`tab-adapters`){let e=this.props.width===`xs`||this.props.width===`sm`,t=!e&&this.state.drawerState===J.opened,n=e||this.state.drawerState===J.closed;return E(mt,{fallback:E(Sc,{}),children:E(Ty,{theme:this.state.theme,triggerUpdate:this.state.triggerAdapterUpdate,forceUpdateAdapters:this.state.forceUpdateAdapters,adaptersWorker:this.adaptersWorker,instancesWorker:this.instancesWorker,themeType:this.state.themeType,systemConfig:this.state.systemConfig,socket:this.socket,adminHost:this.state.ownHost,hostsWorker:this.hostsWorker,currentHost:this.state.currentHost,ready:this.state.ready&&this.state.connected,t:j.t,lang:j.getLanguage(),expertMode:this.state.expertMode,executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),commandRunning:this.state.commandRunning,onSetCommandRunning:e=>this.setState({commandRunning:e}),menuOpened:t,menuClosed:n,adminGuiConfig:this.adminGuiConfig,toggleTranslation:this.toggleTranslation,noTranslation:this.state.noTranslation,adminInstance:this.adminInstance,currentAdminVersion:this.state.versionAdmin,onUpdating:e=>this.setState({updating:e}),hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`adapters`)})}if(this.state.currentTab.tab===`tab-instances`)return E(mt,{fallback:E(Sc,{}),children:E(Ey,{menuPadding:this.state.drawerState===J.closed?0:this.state.drawerState===J.opened?this.state.editMenuList?250:180:50,socket:this.socket,instancesWorker:this.instancesWorker,lang:j.getLanguage(),hostname:this.state.hostname,adminInstance:this.adminInstance,repository:this.state.repository,hosts:this.state.hosts,themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,expertMode:this.state.expertMode,currentHost:this.state.currentHost,currentHostName:this.state.currentHostName,t:j.t,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma,width:this.props.width,configStored:e=>this.allStored(e),executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),inBackgroundCommand:this.state.commandError||this.state.performed,onRegisterIframeRef:e=>this.refConfigIframe=e,onUnregisterIframeRef:e=>{this.refConfigIframe===e&&(this.refConfigIframe=null)},handleNavigation:this.handleNavigation,hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`instances`)});if(this.state.currentTab.tab===`tab-overview`)return E(mt,{fallback:E(Sc,{}),children:E(wy,{t:j.t,lang:this.state.lang,socket:this.socket,theme:this.state.theme,themeType:this.state.themeType,currentHost:this.state.currentHost,currentHostName:this.state.currentHostName,hostsWorker:this.hostsWorker,instancesWorker:this.instancesWorker,objectsWorker:this.objectsWorker,logsWorker:this.logsWorker,expertMode:this.state.expertMode,installed:this.state.installed,repository:this.state.repository,handleNavigation:e=>this.handleNavigation(e),hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`overview`)});if(this.state.currentTab.tab===`tab-intro`)return E(mt,{fallback:E(Sc,{}),children:E(Dy,{hostname:this.state.hostname,adminInstance:this.adminInstance,instancesWorker:this.instancesWorker,hostsWorker:this.hostsWorker,showAlert:(e,t)=>this.showAlert(e,t),socket:this.socket,t:j.t,lang:j.getLanguage(),theme:this.state.theme},`intro`)});if(this.state.currentTab.tab===`tab-logs`)return E(mt,{fallback:E(Sc,{}),children:E(Oy,{t:j.t,width:this.props.width,lang:this.state.lang,socket:this.socket,themeType:this.state.themeType,theme:this.state.theme,ready:this.state.ready,logsWorker:this.logsWorker,expertMode:this.state.expertMode,currentHost:this.state.currentHost,hostsWorker:this.hostsWorker,clearErrors:()=>this.clearLogErrors(),hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`logs`)});if(this.state.currentTab.tab===`tab-files`)return E(mt,{fallback:E(Sc,{}),children:E(ky,{ready:this.state.ready,t:j.t,expertMode:this.state.expertMode,lang:j.getLanguage(),socket:this.socket,themeType:this.state.themeType,theme:this.state.theme},`files`)});if(this.state.currentTab.tab===`tab-users`)return E(mt,{fallback:E(Sc,{}),children:E(jy,{ready:this.state.ready,t:j.t,expertMode:this.state.expertMode,lang:j.getLanguage(),socket:this.socket,themeType:this.state.themeType,theme:this.state.theme},`users`)});if(this.state.currentTab.tab===`tab-enums`)return E(mt,{fallback:E(Sc,{}),children:E(My,{t:j.t,lang:j.getLanguage(),socket:this.socket,themeType:this.state.themeType,theme:this.state.theme},`enums`)});if(this.state.currentTab.tab===`tab-objects`)return E(mt,{fallback:E(Sc,{}),children:E(Ay,{t:j.t,theme:this.state.theme,themeName:this.state.themeName,themeType:this.state.themeType,expertMode:this.state.expertMode,objectsWorker:this.objectsWorker,lang:j.getLanguage(),socket:this.socket,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma})},`objects`);if(this.state.currentTab.tab===`tab-hosts`)return E(mt,{fallback:E(Sc,{}),children:E(Fy,{socket:this.socket,lang:j.getLanguage(),hostsWorker:this.hostsWorker,toggleTranslation:this.toggleTranslation,noTranslation:this.state.noTranslation,themeType:this.state.themeType,theme:this.state.theme,expertMode:this.state.expertMode,t:j.t,currentHost:this.state.currentHost,executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),systemConfig:this.state.systemConfig,showAdaptersWarning:this.showAdaptersWarning,adminInstance:this.adminInstance,onUpdating:e=>this.setState({updating:e})})});if(this.state.currentTab.tab===`tab-devicemanager`)return E(mt,{fallback:E(Sc,{}),children:E(Py,{themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,socket:this.socket,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma},this.state.currentTab.tab)});let e=this.state.currentTab.tab.match(/^tab-([-\w]+?)(?:-(\d+))?$/);if(e){var t;let n=(t=this.tabsInfo)==null?void 0:t.find(t=>t.name===e[0]||t.name===`tab-${e[1]}`);return E(mt,{fallback:E(Sc,{}),children:E(Ny,{hostname:this.state.hostname,adminInstance:this.adminInstance,hosts:this.state.hosts,instancesWorker:this.instancesWorker,tab:this.state.currentTab.tab,themeName:this.state.themeName,theme:this.state.theme,expertMode:this.state.expertMode,socket:this.socket,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma,onRegisterIframeRef:e=>this.refConfigIframe=e,onUnregisterIframeRef:e=>{this.refConfigIframe===e&&(this.refConfigIframe=null)},icon:n==null?void 0:n.icon,supportsLoadingMessage:n==null?void 0:n.supportsLoadingMessage},this.state.currentTab.tab)})}}return null}clearLogErrors(){var e,t;(e=this.logsWorker)==null||e.resetErrors(),(t=this.logsWorker)==null||t.resetWarnings()}getCurrentDialog(){if(this.state&&this.state.currentTab&&this.state.currentTab.dialog){if(this.state.currentTab.dialog===`system`)return this.getSystemSettingsDialog();if(this.state.currentTab.dialog===`discovery`)return this.getDiscoveryModal()}return null}getSystemSettingsDialog(){return zy(this.state.eosAccessRole)?E(od,{eosAccessRole:this.state.eosAccessRole,adminGuiConfig:this.adminGuiConfig,width:this.props.width,currentHost:this.state.currentHost,themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,onClose:async e=>{var t;d.doNavigate(null);let n=await((t=this.socket)==null?void 0:t.getObject(`system.config`));n&&(e?this.setState({triggerAdapterUpdate:this.state.triggerAdapterUpdate+1,systemConfig:n}):this.setState({systemConfig:n}))},lang:this.state.lang,socket:this.socket,currentTab:this.state.currentTab,expertModeFunc:e=>{if(!zy(this.state.eosAccessRole))return;(window._sessionStorage||window.sessionStorage).removeItem(`App.expertMode`);let t=JSON.parse(JSON.stringify(this.state.systemConfig));t.common.expertMode=e,this.setState({expertMode:e,systemConfig:t})},t:j.t},`systemSettings`):null}handleAlertClose(e,t){t!==`clickaway`&&this.setState({alert:!1})}isCausedByConnectionLoss(e,t){var n;return e.includes(`notConnectedError`)?!0:this.connectionLostAt?!((n=this.socket)!=null&&n.isConnected())||this.connectionLostAt>t-Wy:!1}getConnectionLostText(){return this.connectionLostAt?j.t(`Connection to admin lost. Waiting for reconnection...`):void 0}showAlert(e,t){t!==`error`&&t!==`warning`&&t!==`info`&&t!==`success`&&(t=`info`);let n;n=typeof e==`string`?e:e instanceof Error?e.message||e.toString():e==null?`null`:e.toString(),this.setState({alert:!0,alertType:t,alertMessage:n})}handleDrawerState(e){(window._localStorage||window.localStorage).setItem(`App.drawerState`,e.toString()),this.setState({drawerState:e})}static logout(){ud().then(()=>{ln.deleteTokensStatic(),window.location.replace(`/login.html`)}).catch(()=>{window.alert(`Abmeldung konnte nicht bestätigt werden. Bitte erneut versuchen.`)})}allStored(e){this._tempAllStored!==e&&(this._tempAllStored=e,this.forceUpdate())}closeDataNotStoredDialog(){this.setState({dataNotStoredDialog:!1})}confirmDataNotStored(){this._tempAllStored=!0,this.setState({dataNotStoredDialog:!1},()=>{var e,t,n;return this.handleNavigation((e=this.state.dataNotStoredTab)==null?void 0:e.tab,(t=this.state.dataNotStoredTab)==null?void 0:t.subTab,(n=this.state.dataNotStoredTab)==null?void 0:n.param)})}executeCommand(e,t,n,r){if(typeof t==`boolean`&&(n=t,t=void 0),!(this.state.connected&&this.state.ready&&this.socket&&(typeof this.socket.isConnected!=`function`||this.socket.isConnected()))){if(this.pendingCommand){this.showAlert(`EOS stellt die Verbindung noch her. Ein Installations- oder Updatebefehl wartet bereits.`,`warning`);return}let i={cmd:e,host:t,callback:n||void 0,files:r,started:Date.now()};this.pendingCommand=i,this.showAlert(`EOS stellt die Verbindung noch her. Der Befehl wird automatisch gestartet, sobald das System bereit ist.`,`info`);let a=()=>{this.pendingCommand===i&&(this.state.connected&&this.state.ready&&this.socket&&(typeof this.socket.isConnected!=`function`||this.socket.isConnected())?(this.pendingCommand=null,this.pendingCommandTimer=null,this.executeCommand(i.cmd,i.host||void 0,i.callback,i.files)):Date.now()-i.started>=6e4?(this.pendingCommand=null,this.pendingCommandTimer=null,this.showAlert(`Der Befehl wurde nicht gestartet, weil die EOS-Verbindung innerhalb von 60 Sekunden nicht bereit war.`,`error`)):this.pendingCommandTimer=setTimeout(a,500))};this.pendingCommandTimer=setTimeout(a,250)}else this.state.commandRunning?this.showAlert(`Es läuft bereits ein Installations- oder Updatebefehl.`,`warning`):this.state.performed||this.state.commandError?this.setState({cmd:null,cmdDialog:!1,commandError:!1,performed:!1,callback:null,commandHost:null,cmdFiles:null},()=>this.setState({cmd:e,cmdDialog:!0,callback:n,commandHost:t||this.state.currentHost,cmdFiles:r||null})):(console.log(`Execute: ${e}`),this.setState({cmd:e,cmdDialog:!0,callback:n,commandHost:t||this.state.currentHost,cmdFiles:r||null}))}closeCmdDialog(e){this.setState({cmd:null,cmdDialog:!1,commandError:!1,performed:!1,callback:null,commandHost:null,cmdFiles:null},()=>e&&e())}renderWizardDialog(){return this.state.wizard?E(Sl,{executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),host:this.state.currentHost,socket:this.socket,themeName:this.state.themeName,themeType:this.state.themeType,toggleTheme:this.toggleTheme,lang:j.getLanguage(),onClose:e=>{this.setState({wizard:!1,showRedirect:e,redirectCountDown:10,lang:j.getLanguage()},()=>{this.state.showRedirect&&setInterval(()=>{this.state.redirectCountDown>0?this.setState({redirectCountDown:this.state.redirectCountDown-1}):window.location.href=this.state.showRedirect},1e3)})},onNavigate:(e,t,n)=>{d.doNavigate(e,t,n),window.location.reload()}}):null}showRedirectDialog(){if(this.state.showRedirect){var e;return N(u,{open:!0,onClose:()=>{},children:[E(_e,{children:j.t(`Waiting for admin restart...`)}),E(ce,{children:E(de,{children:j.t(`Redirect in %s second(s)`,this.state.redirectCountDown)})}),N(xt,{children:[window.sidebar||window.opera&&window.print||window.document.all&&(e=window.external)!=null&&e.AddFavorite?E(H,{onClick:()=>{if(window.sidebar&&this.state.showRedirect)window.sidebar.addPanel(`NexoWatt EOS`,this.state.showRedirect,``);else if(window.opera&&this.state.showRedirect&&window.print){let e=document.createElement(`a`);e.setAttribute(`href`,this.state.showRedirect),e.setAttribute(`title`,`NexoWatt EOS`),e.setAttribute(`rel`,`sidebar`),e.click()}else document.all&&window.external.AddFavorite(this.state.showRedirect,`NexoWatt EOS`)},children:j.t(`Bookmark admin`)}):null,this.state.redirectCountDown?E(H,{variant:`contained`,onClick:()=>this.state.showRedirect&&(window.location.href=this.state.showRedirect),children:j.t(`Go to admin now`)}):null]})]})}return null}renderCommandDialog(){return this.state.cmd&&this.socket?E(Ss,{onSetCommandRunning:e=>this.setState({commandRunning:e}),onClose:()=>this.closeCmdDialog(()=>this.setState({commandRunning:!1})),visible:this.state.cmdDialog,callback:this.state.callback,onInBackground:()=>this.setState({cmdDialog:!1}),cmd:this.state.cmd,files:this.state.cmdFiles||void 0,errorFunc:()=>this.setState({commandError:!0}),performed:()=>this.setState({performed:!0}),inBackground:this.state.commandError||this.state.performed,commandError:this.state.commandError,socket:this.socket,host:this.state.commandHost||this.state.currentHost,ready:this.state.ready&&this.state.connected,t:j.t}):null}async getLeadingGroupName(e){if(!this.socket)throw Error(`Socket not ready`);try{let t=await this.socket.getForeignObjects(`system.group.*`,`group`),n=Object.values(t||{}).filter(t=>{var n;return t==null||(n=t.common)==null||(n=n.members)==null?void 0:n.includes(e)}),r=n.find(e=>e._id===`system.group.administrator`)||n[0];return r?Ne.getObjectNameFromObj(r,this.socket.systemLang):``}catch(t){return console.warn(`Cannot read groups of ${e}: ${t}`),``}}renderSiteName(){var e;let t=(e=this.state.systemConfig)==null||(e=e.common)==null?void 0:e.siteName;return t?E(`div`,{style:By.siteName,children:t}):null}needsMenuButtonSpace(){var e;return!((e=this.state.systemConfig)!=null&&(e=e.common)!=null&&e.siteName)&&this.state.drawerState===J.closed}renderFloatingButtons(){let e=this.state.drawerState===J.closed,t=this.state.cmd&&!this.state.cmdDialog;return!e&&!t?null:N(I,{sx:By.floatingButtons,children:[e?E(A,{onClick:()=>this.handleDrawerState(J.opened),children:E(bt,{})}):null,t?E(A,{onClick:()=>this.setState({cmdDialog:!0}),children:E(es,{style:this.state.commandError?By.errorCmd:this.state.performed?Ne.getStyle(this.state.theme,By.performed):By.cmd})}):null]})}renderAlertSnackbar(){return E(Ke,{open:this.state.alert,autoHideDuration:6e3,onClose:()=>this.handleAlertClose(),children:E(C,{severity:this.state.alertType,variant:`filled`,onClose:()=>this.handleAlertClose(),children:this.state.alertMessage})})}renderDialogConfirm(){return this.state.dataNotStoredDialog?E(Zt,{title:j.t(`ra_Please confirm`),text:j.t(`ra_Some data are not stored. Discard?`),ok:j.t(`ra_Discard`),cancel:j.t(`ra_Cancel`),onClose:e=>e?this.confirmDataNotStored():this.closeDataNotStoredDialog()}):null}renderChatLeaveDialog(){if(!this.state.chatLeaveDialog)return null;let e=this.state.chatLeaveDialog.reason===`busy`;return E(Zt,{title:j.t(`ra_Please confirm`),text:j.t(e?`The assistant is still working on an answer, which is lost on this tab. Leave anyway?`:`The assistant is not available on this tab and will be closed. Continue?`),ok:j.t(e?`Leave anyway`:`Continue`),cancel:j.t(`ra_Cancel`),onClose:e=>this.onChatLeaveDialog(e)})}renderExpertDialog(){return!this.state.expertModeDialog||!zy(this.state.eosAccessRole)?null:E(md,{onClose:e=>{if(!zy(this.state.eosAccessRole))this.setState({expertModeDialog:!1,expertMode:!1});else if(e===`openSettings`)d.doNavigate(null,`system`);else if(e){var t;(window._sessionStorage||window.sessionStorage).setItem(`App.expertMode`,this.state.expertMode?`false`:`true`),(t=this.refConfigIframe)==null||(t=t.contentWindow)==null||t.postMessage(`updateExpertMode`,`*`),this.setState({expertModeDialog:!1,expertMode:!this.state.expertMode})}else this.state.expertModeDialog&&this.setState({expertModeDialog:!1})},expertMode:this.state.expertMode})}renderShowGuiSettings(){return this.state.showGuiSettings?N(Ze,{anchorEl:this.state.showGuiSettings,open:!0,onClose:()=>this.setState({showGuiSettings:null}),children:[E(It,{onClick:()=>{this.setState({showGuiSettings:null}),this.enableGuiSettings(!0).catch(e=>console.error(`Cannot enable GUI settings: ${e}`))},children:j.t(`Use settings of other browsers`)}),E(It,{onClick:()=>{this.setState({showGuiSettings:null}),this.enableGuiSettings(!0,!0).catch(e=>console.error(`Cannot enable GUI settings: ${e}`))},children:j.t(`Use settings of this browser`)}),N(It,{onClick:()=>this.setState({showGuiSettings:null}),children:[E(Mt,{children:E(k,{fontSize:`small`})}),E(Jt,{children:j.t(`Cancel`)})]})]}):null}renderExpertModeButton(){var e;let t=(window._sessionStorage||window.sessionStorage).getItem(`App.expertMode`),n=!t||t===`true`==!!((e=this.state.systemConfig)!=null&&e.common.expertMode);return zy(this.state.eosAccessRole)?E(js,{name:`admin.appBar.expertMode`,config:this.adminGuiConfig,children:E(Lt,{title:`${j.t(`Toggle expert mode`)} ${n?``:` (${j.t(`only in this browser session`)})`}`,slotProps:{popper:{sx:By.tooltip}},children:E(at,{color:`secondary`,variant:`dot`,sx:{"& .MuiBadge-badge":By.expertBadge},invisible:n,children:E(A,{"data-eos-expert-control":`1`,"aria-label":j.t(`Toggle expert mode`),"aria-pressed":this.state.expertMode,onClick:()=>{var e;if(zy(this.state.eosAccessRole)){if(!!((e=this.state.systemConfig)!=null&&e.common.expertMode)==!this.state.expertMode){var t;(window._sessionStorage||window.sessionStorage).setItem(`App.expertMode`,this.state.expertMode?`false`:`true`),this.setState({expertMode:!this.state.expertMode}),(t=this.refConfigIframe)==null||(t=t.contentWindow)==null||t.postMessage(`updateExpertMode`,`*`)}else if((window._sessionStorage||window.sessionStorage).getItem(`App.doNotShowExpertDialog`)===`true`){var n;(window._sessionStorage||window.sessionStorage).setItem(`App.expertMode`,this.state.expertMode?`false`:`true`),this.setState({expertMode:!this.state.expertMode}),(n=this.refConfigIframe)==null||(n=n.contentWindow)==null||n.postMessage(`updateExpertMode`,`*`)}else this.setState({expertModeDialog:!0})}},style:{color:this.state.expertMode?this.state.theme.palette.expert:void 0},color:`default`,children:E(jt,{style:{...By.expertIcon,...this.state.expertMode?By.expertIconActive:void 0}})})})})}):null}renderMenuButtons(){let e=this.state.noNotifications.warning+this.state.noNotifications.other;return N(je,{children:[E(Lt,{title:j.t(`Notifications`),slotProps:{popper:{sx:By.tooltip}},children:E(A,{disableRipple:!e,style:{opacity:e?1:.3},onClick:e?()=>this.setState({notificationsDialog:!0}):void 0,children:E(at,{badgeContent:this.state.noNotifications.other+this.state.noNotifications.warning,color:this.state.noNotifications.warning>0?`error`:`secondary`,max:99,children:E(rs,{})})})}),E(js,{name:`admin.appBar.discovery`,config:this.adminGuiConfig,children:this.state.discoveryAlive?E(Lt,{title:this.state.discoveryProposals?`${j.t(`Discovery devices`)} - ${j.t(`New adapter proposals`)}: ${this.state.discoveryProposals}`:j.t(`Discovery devices`),slotProps:{popper:{sx:By.tooltip}},children:E(A,{onClick:()=>d.doNavigate(null,`discovery`),children:E(at,{badgeContent:this.state.discoveryProposals,color:`secondary`,max:99,children:E(Ye,{})})})}):E(`div`,{style:{display:`none`}})}),this.toggleThemePossible?E(js,{name:`admin.appBar.toggleTheme`,config:this.adminGuiConfig,children:E(te,{toggleTheme:this.toggleTheme,themeName:this.state.themeName,t:j.t})}):null,zy(this.state.eosAccessRole)&&this.state.expertMode?E(Lt,{title:j.t(`Synchronize admin settings between all opened browser windows`),slotProps:{popper:{sx:By.tooltip}},children:E(A,{onClick:e=>this.state.guiSettings?this.enableGuiSettings(!1):this.setState({showGuiSettings:e.target}),style:{color:this.state.guiSettings?this.state.theme.palette.expert:void 0},children:this.state.guiSettings?E(ts,{}):E(ns,{})})}):null]})}renderToolbar(e){let t=Ne.getStyle(this.state.theme,By.performed);return N(ft,{children:[E(A,{size:`large`,edge:`start`,"data-eos-menu-toggle":`1`,"aria-label":j.t(`Open menu`),"aria-expanded":this.state.drawerState!==J.closed,style:{...By.menuButton,...!e&&this.state.drawerState!==J.closed?By.hide:void 0},onClick:()=>this.handleDrawerState(J.opened),children:E(bt,{})}),N(`div`,{style:By.wrapperButtons,children:[E(I,{className:`eos-header-controls`,children:this.renderMenuButtons()}),E(`div`,{style:By.flexGrow}),this.state.cmd&&!this.state.cmdDialog&&E(A,{size:`large`,onClick:()=>this.setState({cmdDialog:!0}),children:E(es,{style:this.state.commandError?By.errorCmd:this.state.performed?t:By.cmd})})]}),this.renderSiteName(),this.state.drawerState!==J.opened&&!this.state.expertMode&&window.innerWidth>450&&N(P,{container:!0,style:{...By.avatarNotVisible,...this.state.drawerState===J.opened?void 0:By.avatarVisible},spacing:1,sx:{alignItems:`center`},children:[this.state.user?null:N(I,{component:`div`,style:By.wrapperName,children:[E(R,{children:`admin`}),!this.adminGuiConfig.icon&&this.state.versionAdmin&&N(R,{style:{...By.styleVersion,color:this.state.themeType===`dark`?`#ffffff80`:`#00000080`},children:[`v`,this.state.versionAdmin]})]}),E(P,{children:E(`a`,{href:`#easy`,onClick:e=>e.preventDefault(),style:{color:`inherit`,textDecoration:`none`},children:this.adminGuiConfig.icon?E(`div`,{style:{height:50,width:102,lineHeight:`50px`,background:`white`,borderRadius:5,padding:5},children:E(`img`,{src:this.adminGuiConfig.icon,alt:`logo`,style:{maxWidth:`100%`,maxHeight:`100%`}})}):E(gt,{onClick:()=>this.handleNavigation(`easy`),style:this.state.themeName===`colored`||this.state.themeName===`blue`?By.logoWhite:void 0,alt:`NexoWatt EOS`,src:`img/no-image.svg`})})})]})]})}renderSampleError(){var e,t;let n=(e=this.state.hasGlobalError)==null?void 0:e.message,r=(t=this.state.hasGlobalError)==null?void 0:t.stack;return vy(this.state.hasGlobalError)?N(`div`,{style:{textAlign:`center`,fontSize:22,marginTop:50},children:[E(`h2`,{children:j.t(`The admin was updated. Please load the page anew.`)}),E(H,{variant:`contained`,onClick:()=>window.location.reload(),children:j.t(`Reload`)}),E(`div`,{style:{color:`#888`,fontSize:14,marginTop:20},children:n})]}):N(`div`,{style:{textAlign:`center`,fontSize:22,marginTop:50,height:`calc(100% - 50px)`,overflow:`auto`},children:[E(`h1`,{style:{color:`#F00`},children:`Error in GUI!`}),`Please open the browser console (F12), copy error text from there and create the issue on`,` `,E(`a`,{href:`https://nexowatt.com`,target:`_blank`,rel:`noreferrer`,children:`github`}),E(`br`,{}),`Without this information it is not possible to analyse the error.`,E(`br`,{}),`It should looks like `,E(`br`,{}),E(`img`,{src:`img/browserError.png`,alt:`error`}),E(`br`,{}),`If in the second line you will see`,` `,E(`code`,{style:{color:`#888`,fontFamily:`monospace`,fontSize:16},children:`at :3000/static/js/main.chunk.js:36903`}),` `,`and not the normal file name,`,E(`br`,{}),`please try to reproduce an error with opened browser console. In this case the special "map" files will be loaded and the developers can see the real name of functions and files.`,E(`div`,{style:{color:`#F88`,fontSize:14,marginTop:20},children:n}),E(`pre`,{style:{color:`#F88`,fontSize:12,fontFamily:`monospace`,textAlign:`left`,marginTop:20,padding:20},children:(r||``).toString().split(`
205
205
  `).map((e,t)=>N(`div`,{children:[e,E(`br`,{})]},t))})]})}renderEasyMode(){var e,t;return this.socket?E(ue,{injectFirst:!0,children:E(ge,{theme:this.state.theme,children:N(`div`,{style:{height:`100%`},children:[!this.state.connected&&E(Sc,{text:this.getConnectionLostText()}),E(mt,{fallback:E(Sc,{}),children:E(Iy,{navigate:d.doNavigate,getLocation:d.getLocation,location:this.state.currentTab,toggleTheme:this.toggleTheme,themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,width:this.props.width,adminInstance:this.adminInstance,configs:this.state.easyModeConfigs,socket:this.socket,configStored:e=>this.allStored(e),isFloatComma:!!((e=this.state.systemConfig)!=null&&e.common.isFloatComma),dateFormat:((t=this.state.systemConfig)==null?void 0:t.common.dateFormat)||`DD.MM.YYYY`,t:j.t,lang:j.getLanguage(),onRegisterIframeRef:e=>this.refConfigIframe=e,onUnregisterIframeRef:e=>{this.refConfigIframe===e&&(this.refConfigIframe=null)},handleNavigation:this.handleNavigation})})]})})}):null}render(){var t,n;let r=this.props.width===`xs`||this.props.width===`sm`,i=this.needsMenuButtonSpace();return this.state.cloudNotConnected?E(ue,{injectFirst:!0,children:N(ge,{theme:this.state.theme,children:[E(_s,{label:N(je,{children:[j.t(`Waiting for connection of ioBroker...`),` `,E(`span`,{style:{fontSize:18},children:this.state.cloudReconnect})]})}),this.renderAlertSnackbar()]})}):this.state.hasGlobalError?this.renderSampleError():this.state.login?E(ue,{injectFirst:!0,children:N(ge,{theme:this.state.theme,children:[E(ld,{}),this.renderAlertSnackbar()]})}):!this.state.ready&&!this.state.updating?E(ue,{injectFirst:!0,children:N(ge,{theme:this.state.theme,children:[E(wt,{}),E(_s,{label:j.t(`Loading...`)}),this.renderAlertSnackbar()]})}):this.state.strictEasyMode||this.state.currentTab.tab===`easy`?this.renderEasyMode():E(ue,{injectFirst:!0,children:N(ge,{theme:this.state.theme,children:[E(le,{theme:this.state.theme}),E(wt,{}),E(`style`,{children:`@keyframes myEffect2 {
206
206
  0% {
207
207
  opacity: 1;