diff --git a/README.md b/README.md
index 63b9b9b..aa6084d 100644
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@ More description could be found [here](https://github.com/ioBroker/ioBroker.s7/b
 -->
 
 ## Changelog
-### 1.3.4 (2021-07-06)
+### 1.3.5 (2021-07-07)
 * (bluefox) Change edit mode behaviour
 
 ### 1.3.3 (2021-06-28)
diff --git a/admin/asset-manifest.json b/admin/asset-manifest.json
index bf32b3c..50fe495 100644
--- a/admin/asset-manifest.json
+++ b/admin/asset-manifest.json
@@ -1,8 +1,8 @@
 {
   "files": {
     "main.css": "./static/css/main.c9480e85.chunk.css",
-    "main.js": "./static/js/main.ce479555.chunk.js",
-    "main.js.map": "./static/js/main.ce479555.chunk.js.map",
+    "main.js": "./static/js/main.84c400bc.chunk.js",
+    "main.js.map": "./static/js/main.84c400bc.chunk.js.map",
     "runtime-main.js": "./static/js/runtime-main.0b37ba43.js",
     "runtime-main.js.map": "./static/js/runtime-main.0b37ba43.js.map",
     "static/css/2.c04f2d9d.chunk.css": "./static/css/2.c04f2d9d.chunk.css",
@@ -18,6 +18,6 @@
     "static/css/2.c04f2d9d.chunk.css",
     "static/js/2.3473ead8.chunk.js",
     "static/css/main.c9480e85.chunk.css",
-    "static/js/main.ce479555.chunk.js"
+    "static/js/main.84c400bc.chunk.js"
   ]
 }
\ No newline at end of file
diff --git a/admin/index_m.html b/admin/index_m.html
index aa52afd..39d818b 100644
--- a/admin/index_m.html
+++ b/admin/index_m.html
@@ -1 +1 @@
-<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><script type="text/javascript" src="./../../lib/js/socket.io.js"></script><title>s7</title><link href="./static/css/2.c04f2d9d.chunk.css" rel="stylesheet"><link href="./static/css/main.c9480e85.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,l=r[0],a=r[1],f=r[2],c=0,s=[];c<l.length;c++)i=l[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var a=t[l];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="./";var l=this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[],a=l.push.bind(l);l.push=r,l=l.slice();for(var f=0;f<l.length;f++)r(l[f]);var p=a;t()}([])</script><script src="./static/js/2.3473ead8.chunk.js"></script><script src="./static/js/main.ce479555.chunk.js"></script></body></html>
\ No newline at end of file
+<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><script type="text/javascript" src="./../../lib/js/socket.io.js"></script><title>s7</title><link href="./static/css/2.c04f2d9d.chunk.css" rel="stylesheet"><link href="./static/css/main.c9480e85.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,l=r[0],a=r[1],f=r[2],c=0,s=[];c<l.length;c++)i=l[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var a=t[l];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="./";var l=this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[],a=l.push.bind(l);l.push=r,l=l.slice();for(var f=0;f<l.length;f++)r(l[f]);var p=a;t()}([])</script><script src="./static/js/2.3473ead8.chunk.js"></script><script src="./static/js/main.84c400bc.chunk.js"></script></body></html>
\ No newline at end of file
diff --git a/admin/static/js/main.84c400bc.chunk.js b/admin/static/js/main.84c400bc.chunk.js
new file mode 100644
index 0000000..03e3a06
--- /dev/null
+++ b/admin/static/js/main.84c400bc.chunk.js
@@ -0,0 +1,2 @@
+(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[0],{311:function(e){e.exports=JSON.parse('[{"name":"ip","type":"text","title":"PLC IP Address"},{"name":"s7logo","type":"checkbox","title":"S7 LOGO!"},{"name":"rack","type":"text","title":"PLC Rack"},{"name":"slot","type":"text","title":"PLC Slot"},{"name":"localTSAP","type":"hex","title":"Local TSAP"},{"name":"remoteTSAP","type":"hex","title":"Remote TSAP"}]')},312:function(e){e.exports=JSON.parse('[{"name":"round","type":"number","title":"Round Real to"},{"name":"poll","type":"number","title":"Poll delay","dimension":"ms"},{"name":"recon","type":"number","title":"Reconnect time","dimension":"ms"},{"name":"pulsetime","type":"number","title":"Pulse time","dimension":"ms"},{"name":"timeFormat","type":"select","title":"S7 Time mode","options":[{"value":"","title":"Local time"},{"value":"utc","title":"UTC"},{"value":"summer","title":"Time offset (with day saving time)"},{"value":"offset","title":"Time offset (no day saving time)"}]},{"name":"timeOffset","type":"number","title":"Time offset","dimension":"minutes"}]')},315:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"value","title":"value"},{"value":"level","title":"level"},{"value":"state","title":"state"},{"value":"switch","title":"switch"},{"value":"value.temperature","title":"value.temperature"},{"value":"value.humidity","title":"value.humidity"},{"value":"value.brightness","title":"value.brightness"},{"value":"value.uv","title":"value.uv"},{"value":"value.pressure","title":"value.pressure"},{"value":"value.battery","title":"value.battery"},{"value":"value.valve","title":"value.valve"},{"value":"value.time","title":"value.time"},{"value":"value.interval","title":"value.interval"},{"value":"value.window","title":"value.window"},{"value":"button","title":"button"},{"value":"indicator","title":"indicator"},{"value":"level.dimmer","title":"level.dimmer"},{"value":"level.valve","title":"level.valve"},{"value":"level.blind","title":"level.blind"},{"value":"level.temperature","title":"level.temperature"},{"value":"level.interval","title":"level.interval"}]')},316:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"BOOL","title":"BOOL"},{"value":"BYTE","title":"BYTE"},{"value":"WORD","title":"WORD"},{"value":"DWORD","title":"DWORD"},{"value":"INT","title":"INT"},{"value":"DINT","title":"DINT"},{"value":"REAL","title":"REAL"},{"value":"S7STRING","title":"S7STRING"},{"value":"STRING","title":"STRING"},{"value":"ARRAY","title":"ARRAY"},{"value":"S5TIME","title":"S5TIME"},{"value":"S7TIME","title":"S7TIME"}]')},327:function(e){e.exports=JSON.parse('{"a":"1.3.5"}')},342:function(e,t,a){},407:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Local time","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Time offset (no day saving time)","Offset (with day saving time)":"Time offset (with day saving time)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Polling","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 Time mode","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Time offset","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Write access","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutes","poll":"poll","sec":"sec.","write as Pulse":"write as Pulse","Drag \'n\' drop file here, or click to select file":"Drag \'n\' drop file here, or click to select file","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Change all","Delete all":"Delete all","Edit as TSV (Tab separated values)":"Edit as TSV (Tab separated values)","Add line":"Add line","Delete":"Delete","Are you sure to delete item with address \\"%s\\"?":"Are you sure to delete item with address \\"%s\\"?","Don\'t show this message in 5 minutes":"Don\'t show this message in 5 minutes","Cancel":"Cancel","Delete all items":"Delete all items","Are you sure to delete all items?":"Are you sure to delete all items?","Edit mode":"Edit mode","Toggle extended mode":"Toggle extended mode","Edit data as TSV":"Edit data as TSV","You can copy, paste and edit data as TSV.":"You can copy, paste and edit data as TSV.","Copy to clipboard":"Copy to clipboard","Nothing":"Nothing","Delete item":"Delete item","Load symbols":"Load symbols","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack and slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV was copied to clipboard"}')},408:function(e){e.exports=JSON.parse('{"Add DB":"DB hinzuf\xfcgen","Address":"Adresse","All entries will be deleted. Are you sure?":"Alle Eintr\xe4ge werden gel\xf6scht. Sind sie sicher?","Close":"Zumachen","Delete all entries":"Alle Eintr\xe4ge l\xf6schen","Description":"Beschreibung","Enable polling of data point":"Zyklische Abfrage vom Datenpunkt","Export":"Export","Export to CSV":"Export in CSV","General":"Allgemein","Import":"Import","Import DB file":"DB-Datei importieren","Import from CSV":"Import aus CSV","Import symbols file":"Symboldatei Importieren","Inputs":"Eing\xe4nge","Length":"L\xe4nge","Load Symbols":"Lade Symbole","Local TSAP":"Local TSAP","Local time":"Ortszeit","Marker":"Merker","Name":"Name","Offset (no day saving time)":"Zeit-Offset (ohne Sommerzeit)","Offset (with day saving time)":"Zeit-Offset (mit Sommerzeit)","Outputs":"Ausg\xe4nge","PLC Connection":"SPS Verbindung","PLC IP Address":"SPS IP Adresse","PLC Rack":"SPS Rack","PLC Slot":"SPS Slot","Poll delay":"Poll delay","Polling":"Abfrage","Pulse time":"Pulsetime","RW":"RW","Reconnect time":"Reconnectzeit","Remote TSAP":"Remote TSAP","Role":"Rolle","Room":"Raum","Round Real to":"Aufrunden Real auf","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7-Zeitmodus","Text copied to clipboard. Click to close the window":"Text wurde in der Zwischenablage kopiert. Klick um Fenster zu zumachen.","Time offset":"Zeitverschiebung","Toggle RW":"RW umschalten","Toggle WP":"WP umschalten","Toggle poll":"Poll umschalten","Type":"Typ","UTC":"UTC","Unit":"Einheit","WP":"WP","Write access":"Schreibzugriff","Write access allowed":"Schreiben erlaubt","Write pulses (true=>false edge)":"Schreibe Pulse (Ja=>Nein Kante)","minutes":"Minuten","poll":"poll","sec":"Sek.","write as Pulse":"schreibe als Impuls","Drag \'n\' drop file here, or click to select file":"Die Datei hierher ziehen , oder klicken, um die Datei auszuw\xe4hlen","DBs":"DBs","ms":"ms","Poll":"Abfrage","Change all":"\xc4ndere Alles","Delete all":"Alles l\xf6schen","Edit as TSV (Tab separated values)":"Als TSV bearbeiten (Tabulatorgetrennte Werte)","Add line":"Zeile hinzuf\xfcgen","Delete":"L\xf6schen","Are you sure to delete item with address \\"%s\\"?":"M\xf6chten Sie den Artikel mit der Adresse \\"%s\\" wirklich l\xf6schen?","Don\'t show this message in 5 minutes":"Diese Nachricht nicht in 5\xa0Minuten anzeigen","Cancel":"Abbrechen","Delete all items":"Alle Elemente l\xf6schen","Are you sure to delete all items?":"M\xf6chten Sie wirklich alle Elemente l\xf6schen?","Edit mode":"Bearbeitungsmodus","Toggle extended mode":"Erweiterten Modus umschalten","Edit data as TSV":"Daten als TSV bearbeiten","You can copy, paste and edit data as TSV.":"Sie k\xf6nnen Daten als TSV kopieren, einf\xfcgen und bearbeiten.","Copy to clipboard":"In die Zwischenablage kopieren","Nothing":"Keins","Delete item":"Item l\xf6schen","Load symbols":"Symbole laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Verbindungstyp: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack und Steckplatz: [Rack * 0x20 + Steckplatz]","TSV was copied to clipboard":"TSV wurde in die Zwischenablage kopiert"}')},409:function(e){e.exports=JSON.parse('{"Add DB":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DB","Address":"\u0410\u0434\u0440\u0435\u0441","All entries will be deleted. Are you sure?":"\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b?","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Delete all entries":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Enable polling of data point":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435","Export":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","Export to CSV":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","General":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435","Import":"\u0418\u043f\u043c\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c","Import DB file":"\u0418\u043f\u043c\u043e\u0440\u0442 DB \u0444\u0430\u0439\u043b\u043e\u0432","Import from CSV":"\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 CSV","Import symbols file":"\u0418\u043f\u043c\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432","Inputs":"\u0412\u0445\u043e\u0434\u044b","Length":"Length","Load Symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Local TSAP":"Local TSAP","Local time":"\u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f","Marker":"\u041c\u0430\u0440\u043a\u0435\u0440\u044b","Name":"\u0418\u043c\u044f","Offset (no day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0431\u0435\u0437 \u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)","Offset (with day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u043b\u0435\u0442\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c)","Outputs":"\u0412\u044b\u0445\u043e\u0434\u044b","PLC Connection":"PLC \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","PLC IP Address":"PLC IP \u0430\u0434\u0440\u0435\u0441","PLC Rack":"PLC Rack","PLC Slot":"PLC \u0441\u043b\u043e\u0442","Poll delay":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u043f\u0440\u043e\u0441\u0430","Polling":"\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"\u0420\u043e\u043b\u044c","Room":"\u041a\u043e\u043c\u043d\u0430\u0442\u0430","Round Real to":"\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c real \u0434\u043e","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 \u0420\u0435\u0436\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Text copied to clipboard. Click to close the window":"\u0422\u0435\u043a\u0441\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u043a\u043e\u0439 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e","Time offset":"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Toggle RW":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c RW","Toggle WP":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c WP","Toggle poll":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c poll","Type":"\u0422\u0438\u043f","UTC":"UTC","Unit":"\u0415\u0434\u0438\u043d\u0438\u0446\u044b","WP":"WP","Write access":"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438","Write access allowed":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e","Write pulses (true=>false edge)":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b (1 => 0)","minutes":"\u043c\u0438\u043d\u0443\u0442\u044b","poll":"poll","sec":"\u0441\u0435\u043a.","write as Pulse":"\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a Pulse","Drag \'n\' drop file here, or click to select file":"\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b","DBs":"DBs","ms":"ms","Poll":"\u041e\u043f\u0440\u043e\u0441","Change all":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435","Delete all":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435","Edit as TSV (Tab separated values)":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a TSV (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0435\u0439)","Add line":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","Delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","Are you sure to delete item with address \\"%s\\"?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \\"%s\\"?","Don\'t show this message in 5 minutes":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 5 \u043c\u0438\u043d\u0443\u0442","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","Delete all items":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Are you sure to delete all items?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b?","Edit mode":"\u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Toggle extended mode":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c","Edit data as TSV":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV","You can copy, paste and edit data as TSV.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV.","Copy to clipboard":"\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430","Nothing":"\u041d\u0438\u0447\u0435\u0433\u043e","Delete item":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442","Load symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u0422\u0438\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u0421\u0442\u043e\u0439\u043a\u0430 \u0438 \u0441\u043b\u043e\u0442: [\u0421\u0442\u043e\u0439\u043a\u0430 * 0x20 + \u0441\u043b\u043e\u0442]","TSV was copied to clipboard":"TSV \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430"}')},410:function(e){e.exports=JSON.parse('{"Add DB":"Adicionar DB","Address":"Endere\xe7o","All entries will be deleted. Are you sure?":"Todas as entradas ser\xe3o exclu\xeddas. Voc\xea tem certeza?","Close":"Fechar","Delete all entries":"Eliminar todas as entradas","Description":"Descri\xe7\xe3o","Enable polling of data point":"Habilitar a vota\xe7\xe3o do ponto de dados","Export":"Exportar","Export to CSV":"Exportar para CSV","General":"Geral","Import":"Importar","Import DB file":"Importar arquivo DB","Import from CSV":"Importa\xe7\xe3o de CSV","Import symbols file":"Arquivo de s\xedmbolos de importa\xe7\xe3o","Inputs":"Entradas","Length":"comprimento","Load Symbols":"Carregar s\xedmbolos","Local TSAP":"TSAP local","Local time":"Hor\xe1rio local","Marker":"Marcador","Name":"Nome","Offset (no day saving time)":"Deslocamento (sem hor\xe1rio)","Offset (with day saving time)":"Offset (com tempo de economia de hora)","Outputs":"Sa\xeddas","PLC Connection":"Conex\xe3o do PLC","PLC IP Address":"Endere\xe7o IP do PLC","PLC Rack":"PLC Rack","PLC Slot":"Slot PLC","Poll delay":"Retardo de enquete","Polling":"Polling","Pulse time":"Tempo de pulso","RW":"RW","Reconnect time":"Reconectar o tempo","Remote TSAP":"TSAP remoto","Role":"Fun\xe7\xe3o","Room":"Quarto","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO !","S7 Time mode":"Modo de tempo S7","Text copied to clipboard. Click to close the window":"Texto copiado para a \xe1rea de transfer\xeancia. Clique para fechar a janela","Time offset":"Deslocamento de tempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Alternar pesquisa","Type":"Tipo","UTC":"UTC","Unit":"Unidade","WP":"WP","Write access":"Acesso de grava\xe7\xe3o","Write access allowed":"Acesso de acesso permitido","Write pulses (true=>false edge)":"Escrever pulsos (true => false edge)","minutes":"minutos","poll":"vota\xe7\xe3o","sec":"seg.","write as Pulse":"escreva como pulso","Drag \'n\' drop file here, or click to select file":"Arraste e solte o arquivo aqui ou clique para selecionar o arquivo","DBs":"DBs","ms":"ms","Poll":"Enquete","Change all":"Mude tudo","Delete all":"Apagar tudo","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabula\xe7\xe3o)","Add line":"Adicionar linha","Delete":"Excluir","Are you sure to delete item with address \\"%s\\"?":"Tem certeza de que deseja excluir o item com o endere\xe7o \\"%s\\"?","Don\'t show this message in 5 minutes":"N\xe3o mostre esta mensagem em 5 minutos","Cancel":"Cancelar","Delete all items":"Apagar todos os itens","Are you sure to delete all items?":"Tem certeza de que deseja excluir todos os itens?","Edit mode":"Modo de edi\xe7\xe3o","Toggle extended mode":"Alternar modo estendido","Edit data as TSV":"Editar dados como TSV","You can copy, paste and edit data as TSV.":"Voc\xea pode copiar, colar e editar dados como TSV.","Copy to clipboard":"Copiar para \xe1rea de transfer\xeancia","Nothing":"Nada","Delete item":"Apagar item","Load symbols":"S\xedmbolos de carga","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conex\xe3o: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 B\xe1sico","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV foi copiado para a \xe1rea de transfer\xeancia"}')},411:function(e){e.exports=JSON.parse('{"Add DB":"Voeg DB toe","Address":"Adres","All entries will be deleted. Are you sure?":"Alle inzendingen worden verwijderd. Weet je het zeker?","Close":"Dichtbij","Delete all entries":"Verwijder alle vermeldingen","Description":"Beschrijving","Enable polling of data point":"Polling van gegevenspunt inschakelen","Export":"Exporteren","Export to CSV":"Exporteren naar CSV","General":"Algemeen","Import":"Importeren","Import DB file":"DB-bestand importeren","Import from CSV":"Importeren vanuit CSV","Import symbols file":"Symboolbestand importeren","Inputs":"ingangen","Length":"Lengte","Load Symbols":"Laad symbolen","Local TSAP":"Lokale TSAP","Local time":"Lokale tijd","Marker":"Markeerstift","Name":"Naam","Offset (no day saving time)":"Offset (geen dagbesparende tijd)","Offset (with day saving time)":"Offset (met dagbesparende tijd)","Outputs":"uitgangen","PLC Connection":"PLC-verbinding","PLC IP Address":"PLC IP-adres","PLC Rack":"PLC Rack","PLC Slot":"PLC-slot","Poll delay":"Poll vertraging","Polling":"stemming","Pulse time":"Pulstijd","RW":"RW","Reconnect time":"Reconnect tijd","Remote TSAP":"TSAP op afstand","Role":"Rol","Room":"Kamer","Round Real to":"Rond echt naar","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tijdmodus","Text copied to clipboard. Click to close the window":"Tekst gekopieerd naar klembord. Klik om het venster te sluiten","Time offset":"Tijd offset","Toggle RW":"RW omschakelen","Toggle WP":"Wissel WP","Toggle poll":"Poll wisselen","Type":"Type","UTC":"UTC","Unit":"Eenheid","WP":"WP","Write access":"Schrijf toegang","Write access allowed":"Schrijftoegang toegestaan","Write pulses (true=>false edge)":"Schrijf pulsen (true => false edge)","minutes":"minuut","poll":"poll","sec":"seconde","write as Pulse":"schrijf als Pulse","Drag \'n\' drop file here, or click to select file":"Sleep het bestand hierheen, of klik om het bestand te selecteren","DBs":"DBs","ms":"ms","Poll":"Opiniepeiling","Change all":"Verander alles","Delete all":"Verwijder alles","Edit as TSV (Tab separated values)":"Bewerken als TSV (door tabs gescheiden waarden)","Add line":"Lijn toevoegen","Delete":"Verwijderen","Are you sure to delete item with address \\"%s\\"?":"Weet u zeker dat u het item met adres \\"%s\\" wilt verwijderen?","Don\'t show this message in 5 minutes":"Dit bericht niet binnen 5 minuten weergeven","Cancel":"annuleren","Delete all items":"Alle items verwijderen","Are you sure to delete all items?":"Weet je zeker dat je alle items wilt verwijderen?","Edit mode":"Bewerkingsmodus","Toggle extended mode":"Schakel uitgebreide modus in","Edit data as TSV":"Gegevens bewerken als TSV","You can copy, paste and edit data as TSV.":"U kunt gegevens kopi\xebren, plakken en bewerken als TSV.","Copy to clipboard":"Kopieer naar klembord","Nothing":"Niets","Delete item":"Verwijder item","Load symbols":"Symbolen laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Aansluittype: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rek en sleuf: [Rack * 0x20 + sleuf]","TSV was copied to clipboard":"TSV is gekopieerd naar het klembord"}')},412:function(e){e.exports=JSON.parse('{"Add DB":"Ajouter une DB","Address":"Adresse","All entries will be deleted. Are you sure?":"Toutes les entr\xe9es seront supprim\xe9es. \xcates-vous s\xfbr?","Close":"Fermer","Delete all entries":"Supprimer toutes les entr\xe9es","Description":"La description","Enable polling of data point":"Activer l\'interrogation du point de donn\xe9es","Export":"Exportation","Export to CSV":"Exporter au format CSV","General":"G\xe9n\xe9ral","Import":"Importer","Import DB file":"Importer un fichier DB","Import from CSV":"Importer \xe0 partir du fichier CSV","Import symbols file":"Importer un fichier de symboles","Inputs":"Contributions","Length":"Longueur","Load Symbols":"Charger des symboles","Local TSAP":"TSAP local","Local time":"Heure locale","Marker":"Marqueur","Name":"pr\xe9nom","Offset (no day saving time)":"D\xe9calage (pas de temps pour gagner du temps)","Offset (with day saving time)":"D\xe9calage (avec un gain de temps de jour)","Outputs":"Les sorties","PLC Connection":"Connexion PLC","PLC IP Address":"Adresse IP de l\'API","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"D\xe9lai d\'interrogation","Polling":"Vote","Pulse time":"Temps d\'impulsion","RW":"RW","Reconnect time":"Reconnectez le temps","Remote TSAP":"TSAP distant","Role":"R\xf4le","Room":"Chambre","Round Real to":"Rond r\xe9el \xe0","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Mode heure","Text copied to clipboard. Click to close the window":"Texte copi\xe9 dans le presse-papier Cliquez pour fermer la fen\xeatre","Time offset":"D\xe9calage temporel","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Basculer le sondage","Type":"Type","UTC":"UTC","Unit":"Unit\xe9","WP":"WP","Write access":"Acc\xe8s en \xe9criture","Write access allowed":"Acc\xe8s en \xe9criture autoris\xe9","Write pulses (true=>false edge)":"\xc9crire des impulsions (true => false edge)","minutes":"minutes","poll":"sondage","sec":"seconde.","write as Pulse":"\xe9crire comme Pulse","Drag \'n\' drop file here, or click to select file":"Glissez-d\xe9posez le fichier ici, ou cliquez pour s\xe9lectionner le fichier","DBs":"DBs","ms":"ms","Poll":"Sondage","Change all":"Change tout","Delete all":"Tout supprimer","Edit as TSV (Tab separated values)":"Modifier en tant que TSV (valeurs s\xe9par\xe9es par des tabulations)","Add line":"Ajouter une ligne","Delete":"Effacer","Are you sure to delete item with address \\"%s\\"?":"\xcates-vous s\xfbr de supprimer l\'\xe9l\xe9ment avec l\'adresse \xab\xa0%s\xa0\xbb\xa0?","Don\'t show this message in 5 minutes":"Ne pas afficher ce message dans 5 minutes","Cancel":"Annuler","Delete all items":"Supprimer tous les \xe9l\xe9ments","Are you sure to delete all items?":"\xcates-vous s\xfbr de supprimer tous les \xe9l\xe9ments\xa0?","Edit mode":"Mode \xe9dition","Toggle extended mode":"Basculer en mode \xe9tendu","Edit data as TSV":"Modifier les donn\xe9es en tant que TSV","You can copy, paste and edit data as TSV.":"Vous pouvez copier, coller et modifier des donn\xe9es au format TSV.","Copy to clipboard":"Copier dans le presse-papier","Nothing":"Rien","Delete item":"Effacer l\'article","Load symbols":"Charger des symboles","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Type de connexion : 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack et slot : [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV a \xe9t\xe9 copi\xe9 dans le presse-papiers"}')},413:function(e){e.exports=JSON.parse('{"Add DB":"Aggiungi DB","Address":"Indirizzo","All entries will be deleted. Are you sure?":"Tutte le voci saranno cancellate. Sei sicuro?","Close":"Vicino","Delete all entries":"Elimina tutte le voci","Description":"Descrizione","Enable polling of data point":"Abilita il polling del punto dati","Export":"Esportare","Export to CSV":"Esporta in CSV","General":"Generale","Import":"Importare","Import DB file":"Importa file DB","Import from CSV":"Importa da CSV","Import symbols file":"Importa file simboli","Inputs":"ingressi","Length":"Lunghezza","Load Symbols":"Carica simboli","Local TSAP":"TSAP locale","Local time":"Ora locale","Marker":"marcatore","Name":"Nome","Offset (no day saving time)":"Offset (nessun giorno risparmiando tempo)","Offset (with day saving time)":"Offset (con ora del giorno)","Outputs":"Uscite","PLC Connection":"Connessione PLC","PLC IP Address":"Indirizzo IP del PLC","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"Ritardo del sondaggio","Polling":"votazione","Pulse time":"Tempo di impulso","RW":"RW","Reconnect time":"Tempo di riconnessione","Remote TSAP":"TSAP remoto","Role":"Ruolo","Room":"Camera","Round Real to":"Round reale a","S7 LOGO!":"LOGO S7 !","S7 Time mode":"Modalit\xe0 ora S7","Text copied to clipboard. Click to close the window":"Testo copiato negli appunti. Clicca per chiudere la finestra","Time offset":"Differenza di fuso orario","Toggle RW":"Attiva / disattiva RW","Toggle WP":"Attiva / disattiva WP","Toggle poll":"Attiva / disattiva sondaggio","Type":"genere","UTC":"UTC","Unit":"Unit\xe0","WP":"WP","Write access":"Accesso in scrittura","Write access allowed":"Accesso in scrittura consentito","Write pulses (true=>false edge)":"Scrivi impulsi (true => falso bordo)","minutes":"minuti","poll":"sondaggio","sec":"sec.","write as Pulse":"scrivi come Pulse","Drag \'n\' drop file here, or click to select file":"Trascina e rilascia il file qui o fai clic per selezionare il file","DBs":"DBs","ms":"ms","Poll":"Sondaggio","Change all":"Cambia tutto","Delete all":"Cancella tutto","Edit as TSV (Tab separated values)":"Modifica come TSV (valori separati da tabulazioni)","Add line":"Aggiungi riga","Delete":"Elimina","Are you sure to delete item with address \\"%s\\"?":"Sei sicuro di eliminare l\'elemento con l\'indirizzo \\"%s\\"?","Don\'t show this message in 5 minutes":"Non mostrare questo messaggio in 5 minuti","Cancel":"Annulla","Delete all items":"Elimina tutti gli elementi","Are you sure to delete all items?":"Sei sicuro di eliminare tutti gli elementi?","Edit mode":"Modalit\xe0 Modifica","Toggle extended mode":"Attiva/disattiva modalit\xe0 estesa","Edit data as TSV":"Modifica dati come TSV","You can copy, paste and edit data as TSV.":"Puoi copiare, incollare e modificare i dati come TSV.","Copy to clipboard":"Copia negli appunti","Nothing":"Niente","Delete item":"Cancellare l\'oggetto","Load symbols":"Simboli di carico","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo di collegamento: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV \xe8 stato copiato negli appunti"}')},414:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Hora local","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Desplazamiento (sin horario de guardado)","Offset (with day saving time)":"Desplazamiento (con horario de ahorro de d\xeda)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Votaci\xf3n","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"Modo de tiempo S7","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Desplazamiento de tiempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Acceso de escritura","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutos","poll":"poll","sec":"sec.","write as Pulse":"escribe como Pulso","Drag \'n\' drop file here, or click to select file":"Arrastre y suelte el archivo aqu\xed o haga clic para seleccionar el archivo","DBs":"DBs","ms":"ms","Poll":"Encuesta","Change all":"Cambia todo","Delete all":"Eliminar todos","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabulaciones)","Add line":"A\xf1adir l\xednea","Delete":"Borrar","Are you sure to delete item with address \\"%s\\"?":"\xbfEst\xe1 seguro de eliminar el elemento con la direcci\xf3n \\"%s\\"?","Don\'t show this message in 5 minutes":"No muestre este mensaje en 5 minutos","Cancel":"Cancelar","Delete all items":"Eliminar todos los elementos","Are you sure to delete all items?":"\xbfEst\xe1 seguro de eliminar todos los elementos?","Edit mode":"Modo de edici\xf3n","Toggle extended mode":"Alternar modo extendido","Edit data as TSV":"Editar datos como TSV","You can copy, paste and edit data as TSV.":"Puede copiar, pegar y editar datos como TSV.","Copy to clipboard":"Copiar al portapapeles","Nothing":"Nada","Delete item":"Eliminar elemento","Load symbols":"Cargar s\xedmbolos","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conexi\xf3n: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack y ranura: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV se copi\xf3 al portapapeles"}')},415:function(e){e.exports=JSON.parse('{"Add DB":"Dodaj DB","Address":"Adres","All entries will be deleted. Are you sure?":"Wszystkie wpisy zostan\u0105 usuni\u0119te. Jeste\u015b pewny?","Close":"Blisko","Delete all entries":"Usu\u0144 wszystkie wpisy","Description":"Opis","Enable polling of data point":"W\u0142\u0105cz odpytywanie punktu danych","Export":"Eksport","Export to CSV":"Eksportuj do pliku CSV","General":"Genera\u0142","Import":"Import","Import DB file":"Importuj plik DB","Import from CSV":"Importuj z CSV","Import symbols file":"Importuj plik symboli","Inputs":"Wej\u015bcia","Length":"D\u0142ugo\u015b\u0107","Load Symbols":"Za\u0142aduj symbole","Local TSAP":"Lokalny TSAP","Local time":"Czas lokalny","Marker":"Znacznik","Name":"Nazwa","Offset (no day saving time)":"Przesuni\u0119cie (brak czasu na dzie\u0144)","Offset (with day saving time)":"Przesuni\u0119cie (z czasem oszcz\u0119dzania dziennego)","Outputs":"Wyj\u015bcia","PLC Connection":"Po\u0142\u0105czenie PLC","PLC IP Address":"Adres IP sterownika PLC","PLC Rack":"Rack PLC","PLC Slot":"Gniazdo PLC","Poll delay":"Op\xf3\u017anienie ankiety","Polling":"Ankieta","Pulse time":"Czas impulsu","RW":"RW","Reconnect time":"Czas ponownego po\u0142\u0105czenia","Remote TSAP":"Zdalny TSAP","Role":"Rola","Room":"Pok\xf3j","Round Real to":"Runda prawdziwa do","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tryb czasu","Text copied to clipboard. Click to close the window":"Tekst skopiowany do schowka. Kliknij, aby zamkn\u0105\u0107 okno","Time offset":"Przesuni\u0119cie czasu","Toggle RW":"Prze\u0142\u0105cz RW","Toggle WP":"Prze\u0142\u0105cz WP","Toggle poll":"Prze\u0142\u0105cz ankiet\u0119","Type":"Rodzaj","UTC":"UTC","Unit":"Jednostka","WP":"WP","Write access":"Dost\u0119p do zapisu","Write access allowed":"Dost\u0119p do zapisu dozwolony","Write pulses (true=>false edge)":"Pisz impulsy (true => false edge)","minutes":"minuty","poll":"g\u0142osowanie","sec":"sec.","write as Pulse":"napisz jako Pulse","Drag \'n\' drop file here, or click to select file":"Przeci\u0105gnij i upu\u015b\u0107 plik tutaj lub kliknij, aby wybra\u0107 plik","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Zmieni\u0107 wszystko","Delete all":"Usu\u0144 wszystko","Edit as TSV (Tab separated values)":"Edytuj jako TSV (warto\u015bci rozdzielone tabulatorami)","Add line":"Dodaj lini\u0119","Delete":"Kasowa\u0107","Are you sure to delete item with address \\"%s\\"?":"Czy na pewno chcesz usun\u0105\u0107 element o adresie \u201e%s\u201d?","Don\'t show this message in 5 minutes":"Nie pokazuj tej wiadomo\u015bci za 5 minut","Cancel":"Anuluj","Delete all items":"Usu\u0144 wszystkie elementy","Are you sure to delete all items?":"Czy na pewno chcesz usun\u0105\u0107 wszystkie elementy?","Edit mode":"Tryb edycji","Toggle extended mode":"Prze\u0142\u0105cz tryb rozszerzony","Edit data as TSV":"Edytuj dane jako TSV","You can copy, paste and edit data as TSV.":"Mo\u017cesz kopiowa\u0107, wkleja\u0107 i edytowa\u0107 dane jako TSV.","Copy to clipboard":"Skopiuj do schowka","Nothing":"Nic","Delete item":"Usu\u0144 przedmiot","Load symbols":"Za\u0142aduj symbole","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Typ po\u0142\u0105czenia: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Szafa i gniazdo: [Stela\u017c * 0x20 + Slot]","TSV was copied to clipboard":"TSV zosta\u0142 skopiowany do schowka"}')},416:function(e){e.exports=JSON.parse('{"Add DB":"\u6dfb\u52a0\u6570\u636e\u5e93","Address":"\u5730\u5740","All entries will be deleted. Are you sure?":"\u6240\u6709\u6761\u76ee\u5c06\u88ab\u5220\u9664\u3002","Close":"\u5173\u95ed","Delete all entries":"\u5220\u9664\u6240\u6709\u6761\u76ee","Description":"\u63cf\u8ff0","Enable polling of data point":"\u542f\u7528\u6570\u636e\u70b9\u8f6e\u8be2","Export":"\u51fa\u53e3","Export to CSV":"\u5bfc\u51fa\u4e3aCSV","General":"\u4e00\u822c\u7684","Import":"\u8fdb\u53e3","Import DB file":"\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff1a","Import from CSV":"\u4eceCSV\u5bfc\u5165","Import symbols file":"\u5bfc\u5165\u7b26\u53f7\u6587\u4ef6\uff1a","Inputs":"\u8f93\u5165\u9879","Length":"\u957f\u5ea6","Load Symbols":"\u52a0\u8f7d\u7b26\u53f7","Local TSAP":"\u672c\u5730TSAP\uff1a","Local time":"\u5f53\u5730\u65f6\u95f4","Marker":"\u8bb0\u53f7\u7b14","Name":"\u540d\u79f0","Offset (no day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u65e0\u590f\u4ee4\u65f6\uff09","Offset (with day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u5e26\u590f\u65f6\u5236\uff09","Outputs":"\u4ea7\u51fa","PLC Connection":"PLC\u8fde\u63a5\uff1a","PLC IP Address":"PLC IP\u5730\u5740\uff1a","PLC Rack":"PLC\u673a\u67b6\uff1a","PLC Slot":"PLC\u63d2\u69fd\uff1a","Poll delay":"\u8f6e\u8be2\u5ef6\u8fdf\uff1a","Polling":"\u8f6e\u8be2","Pulse time":"\u8109\u51b2\u65f6\u95f4\uff1a","RW":"\u8bfb\u5199\u5668","Reconnect time":"\u91cd\u65b0\u8fde\u63a5\u65f6\u95f4\uff1a","Remote TSAP":"\u8fdc\u7a0bTSAP\uff1a","Role":"\u89d2\u8272","Room":"\u623f\u95f4","Round Real to":"\u820d\u5165\u4e3a\uff1a","S7 LOGO!":"S7 LOGO !\uff1a","S7 Time mode":"S7\u65f6\u95f4\u6a21\u5f0f","Text copied to clipboard. Click to close the window":"\u6587\u672c\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f\u3002","Time offset":"\u65f6\u95f4\u504f\u79fb\uff1a","Toggle RW":"\u5207\u6362RW","Toggle WP":"\u5207\u6362WP","Toggle poll":"\u5207\u6362\u6c11\u610f\u8c03\u67e5","Type":"\u7c7b\u578b","UTC":"\u4e16\u754c\u6807\u51c6\u65f6\u95f4","Unit":"\u5355\u5143","WP":"\u53ef\u6e7f\u6027\u7c89\u5242","Write access":"\u5199\u8bbf\u95ee","Write access allowed":"\u5141\u8bb8\u5199\u8bbf\u95ee","Write pulses (true=>false edge)":"\u5199\u8109\u51b2\uff08\u771f=>\u5047\u8fb9\uff09","minutes":"\u5206\u949f","poll":"\u8f6e\u8be2","sec":"\u79d2","write as Pulse":"\u5199\u4e3a\u8109\u51b2","Drag \'n\' drop file here, or click to select file":"\u5c06\u201cn\u201d\u6587\u4ef6\u62d6\u5230\u6b64\u5904\uff0c\u6216\u5355\u51fb\u4ee5\u9009\u62e9\u6587\u4ef6","DBs":"DBs","ms":"ms","Poll":"\u8f6e\u8be2","Change all":"\u5168\u90e8\u66f4\u6539","Delete all":"\u5220\u9664\u6240\u6709","Edit as TSV (Tab separated values)":"\u7f16\u8f91\u4e3a TSV\uff08\u5236\u8868\u7b26\u5206\u9694\u503c\uff09","Add line":"\u6dfb\u52a0\u884c","Delete":"\u5220\u9664","Are you sure to delete item with address \\"%s\\"?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u5730\u5740\u4e3a\u201c%s\u201d\u7684\u9879\u76ee\u5417\uff1f","Don\'t show this message in 5 minutes":"5 \u5206\u949f\u5185\u4e0d\u8981\u663e\u793a\u6b64\u6d88\u606f","Cancel":"\u53d6\u6d88","Delete all items":"\u5220\u9664\u6240\u6709\u9879\u76ee","Are you sure to delete all items?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u6240\u6709\u9879\u76ee\u5417\uff1f","Edit mode":"\u7f16\u8f91\u6a21\u5f0f","Toggle extended mode":"\u5207\u6362\u6269\u5c55\u6a21\u5f0f","Edit data as TSV":"\u5c06\u6570\u636e\u7f16\u8f91\u4e3a TSV","You can copy, paste and edit data as TSV.":"\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u590d\u5236\u3001\u7c98\u8d34\u548c\u7f16\u8f91\u4e3a TSV\u3002","Copy to clipboard":"\u590d\u5236\u5230\u526a\u8d34\u677f","Nothing":"\u6ca1\u6709\u4ec0\u4e48","Delete item":"\u5220\u9664\u9879\u76ee","Load symbols":"\u52a0\u8f7d\u7b26\u53f7","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u8fde\u63a5\u7c7b\u578b\uff1a0x1 - PG\u30010x2 - OP\u30010x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u673a\u67b6\u548c\u63d2\u69fd\uff1a[\u673a\u67b6 * 0x20 + \u63d2\u69fd]","TSV was copied to clipboard":"TSV \u88ab\u590d\u5236\u5230\u526a\u8d34\u677f"}')},418:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a(15),i=a.n(s),n=a(447),l=(a(342),a(67)),r=a(41),d=a(91),c=a(329),p=a(73),u=a(43),m=a(42),h=a(5),g=a(92),b=a(454),f=a(463),S=a(455),v=a(308),x=a.n(v),j=a(218),T=a.n(j),y=a(13),O=a.n(y),P=a(328),C=a(171),A=a(452),k=a(464),R=a(439),D=a(451),w=a(450),L=a(220),I=a(333),E=a(429),W=a(453),V=a(449),B=a(170),N=a(209),z=a(311),G=a(312),M=a(6),U=function(e){var t=Object(g.b)().enqueueSnackbar,a=Object(o.useCallback)((function(a){e.onChange(a),t(O.a.t("Data updated"))}),[]),s=Object(P.a)({onDrop:a,accept:e.accept}),i=s.getRootProps,n=s.getInputProps,r=s.isDragActive;return Object(M.jsxs)(L.a,{style:{padding:3,paddingRight:40},children:[Object(M.jsx)(C.a,{variant:"h6",gutterBottom:!0,children:O.a.t(e.label)}),Object(M.jsxs)("div",Object(l.a)(Object(l.a)({},i()),{},{className:e.classes.fileInput,style:r?{backgroundColor:"rgba(0, 255, 0, 0.1)"}:{cursor:"pointer"},children:[Object(M.jsx)("input",Object(l.a)({},n())),r?Object(M.jsx)("p",{children:O.a.t("Drop the file here ...")}):Object(M.jsx)("p",{children:O.a.t("Drag 'n' drop file here, or click to select file")})]}))]})},F=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).inputDisabled=function(e){return!1},o.inputDisplay=function(e){if(null===o.props.native.params.slot){if(["rack","slot"].includes(e.name))return!1}else if(["localTSAP","remoteTSAP"].includes(e.name))return!1;return"timeOffset"!==e.name||["summer","offset"].includes(o.props.native.params.timeFormat)},o.changeParam=function(e,t){var a=JSON.parse(JSON.stringify(o.props.native));"s7logo"===e?t?(a.params.localTSAP="",a.params.remoteTSAP="",a.params.rack=null,a.params.slot=null):(a.params.localTSAP=null,a.params.remoteTSAP=null,a.params.rack="",a.params.slot=""):a.params[e]=t,o.props.changeNative(a)},o.loadSymbols=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){var s={inputs:[],outputs:[],markers:[]},i=a.result;(i=i.split("126,")).forEach((function(e){var t=e.slice(23,29).replace(/( )/g,""),a={Name:e.slice(0,23).replace(/( ){2,}/g,""),Address:e.slice(29,36).replace(/( )/g,""),Type:e.slice(36,41).replace(/( )/g,""),Description:e.slice(46,126).replace(/( ){2,}/,""),Unit:"",poll:!0,RW:!1,WP:!1};"E"!==t&&"EB"!==t&&"EW"!==t&&"ED"!==t||s.inputs.push(a),"A"!==t&&"AB"!==t&&"AW"!==t&&"AD"!==t||s.outputs.push(a),"M"!==t&&"MB"!==t&&"MW"!==t&&"MD"!==t||s.markers.push(a)})),["inputs","outputs","markers"].forEach((function(e){t[e]=s[e]})),o.props.changeNative(t)},a.readAsText(e[0],"ISO-8859-1")},o.addDb=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){setTimeout((function(){var e=a.result,o={inputs:!1,outputs:!1,markers:!1,dbs:!1},s={inputs:t.inputs||[],outputs:t.outputs||[],markers:t.markers||[],dbs:t.dbs||[]};if(-1!==e.indexOf("Leseanforderung")){for(var i=e.replace(/\r\n/g,"\n").split("\n"),n={Name:{attr:"Name"},Typ:{attr:""},Operand:{attr:"Address",process:function(e){var t=(e=e.trim()).match(/^DB (\d+)/);if(!t){var a=e.match(/^MB? (\d+)\.?(\d+)?$/);return a?"M "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^AB? (\d+)\.?(\d+)?$/))?"OUT "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^EB? (\d+)\.?(\d+)?$/))?"IN "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):e}var o=e.match(/(\d+).?(\d+)?$/);return t&&o?"DB".concat(t[1]," ").concat(o[1]).concat(void 0!==o[2]?"."+o[2]:""):e}},"SPS-Format":{attr:"Type",process:function(e){return e}},Byteanzahl:{attr:"Length",process:function(e){return parseInt(e,10)}},Zugriff:{attr:"RW",process:function(e){return"read"!==e}},Leseanforderung:{attr:"poll",process:function(e){return"zyklisch"===e}},"AktZeit (ms)":{attr:""},Kommentar:{attr:"Description"},"Clients (Anzahl)":{attr:""}},l=i[0].split(","),r=[],d=0;d<l.length;d++)l[d]=l[d].replace(/"/g,""),r.push(n[l[d]]);for(var c=1;c<i.length;c++)if(i[c]=i[c].trim(),i[c]){l=i[c].trim().split(",");for(var p={Type:"ARRAY",Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},u=0;u<r.length;u++)if(r[u].attr){if(!l[u]){console.log("error");break}if(l[u]=l[u].replace(/"/g,""),p[r[u].attr]=r[u].process?r[u].process(l[u]):l[u],p.Name.match(/^@/)){p=null;break}}if(p){"BYTE"===p.Type&&1!==p.Length&&(p.Type="ARRAY"),"CHAR"===p.Type&&(p.Type="STRING"),"BYTE"!==p.Type&&"BOOL"!==p.Type&&"INT"!==p.Type||(p.Length="");var m=void 0;if(p.Address.match(/^DB/))m="dbs";else if(p.Address.match(/^IN/))p.Address=p.Address.replace(/^IN\s?/,""),m="inputs";else if(p.Address.match(/^OUT/))m="outputs",p.Address=p.Address.replace(/^OUT\s?/,"");else{if(!p.Address.match(/^M/)){console.error("Unknown TYPE: "+p.Address);continue}m="markers",p.Address=p.Address.replace(/^M\s?/,"")}for(var h=0;h<s[m].length;h++)if(s[m][h].Address===p.Address){s[m][h]=p,o[m]=!0,p=null;break}p&&(o[m]=!0,s[m].push(p))}}}else{var g=e.match(/(DB)[0-9]+\s-\s/g),b=g?g[0].replace(" - ",""):"",f=e.split("STRUCT");(f[1]?f[1].split("=")[0].split("\n"):[]).forEach((function(e){if(e.length>10){var t=e.split(/\s+/g);t.shift();for(var a={Address:b+" "+t.shift(),Name:t.shift(),Type:t.shift(),dec:t.shift(),Description:t.join(" "),Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},i=0;i<s.dbs.length;i++)if(s.dbs[i].Address===a.Address){s.dbs[i]=a,o.dbs=!0,a=null;break}a&&(o.dbs=!0,s.dbs.push(a))}}))}for(var S in s)s.hasOwnProperty(S)&&s[S].sort((function(e,t){var a=e.Address.match(/^D?B?\s?(\d+)/),o=t.Address.match(/^D?B?\s?(\d+)/);if(!a)return-1;if(!o)return 1;if(parseInt(a[1],10)>parseInt(o[1],10))return 1;if(parseInt(a[1],10)<parseInt(o[1],10))return-1;var s=e.Address.match(/\s(\d+).?(\d+)?$/),i=t.Address.match(/\s(\d+).?(\d+)?$/);return s?i?parseInt(s[1],10)>parseInt(i[1],10)?1:parseInt(s[1],10)<parseInt(i[1],10)?-1:void 0===s[2]&&void 0!==i[2]?1:void 0===i[2]&&void 0!==s[2]?-1:void 0===s[2]&&void 0===i[2]?0:parseInt(s[2],10)>parseInt(i[2],10)?1:parseInt(s[2],10)<parseInt(i[1],10)?-1:0:1:-1}));o.dbs&&(t.dbs=s.dbs),o.inputs&&(t.inputs=s.inputs),o.outputs&&(t.outputs=s.outputs),o.markers&&(t.markers=s.markers),console.log(t)}),200)},a.readAsText(e[0],"ISO-8859-1")},o.state={},o}return Object(d.a)(a,[{key:"getValue",value:function(e){return"s7logo"===e?null===this.props.native.params.slot:this.props.native.params[e]}},{key:"getInputsBlock",value:function(e,t){var a=this;return Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t(t)}),Object(M.jsx)(V.a,{container:!0,spacing:2,direction:"column",children:e.map((function(e){if(!a.inputDisplay(e))return null;if("checkbox"===e.type)return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(w.a,{label:O.a.t(e.title),control:Object(M.jsx)(k.a,{label:O.a.t(e.title),className:a.props.classes.optionsCheckbox,disabled:a.inputDisabled(e),checked:a.getValue(e.name),onChange:function(t){return a.changeParam(e.name,t.target.checked)}})})," ",e.dimension?O.a.t(e.dimension):null]},e.name);if("select"===e.type)return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsxs)(L.a,{children:[Object(M.jsx)(E.a,{shrink:!0,children:O.a.t(e.title)}),Object(M.jsx)(R.a,{className:a.props.classes.optionsSelect,displayEmpty:!0,disabled:a.inputDisabled(e),value:a.getValue(e.name),onChange:function(t){return a.changeParam(e.name,t.target.value)},children:e.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title},e.value)}))})]})," ",e.dimension?O.a.t(e.dimension):null]},e.name);if("hex"===e.type){var t=parseInt(a.getValue(e.name))?parseInt(a.getValue(e.name)):0,o=t>>8&255,s=255&t;return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(E.a,{className:a.props.classes.optionsLabel,children:O.a.t(e.title)}),Object(M.jsx)(I.a,{title:O.a.t("Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic"),style:{width:"6ch"},value:o.toString(16)?o.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,parseInt(t.target.value,16)<<8|s)}}),Object(M.jsx)(I.a,{title:O.a.t("Rack and slot: [Rack * 0x20 + Slot]"),style:{marginLeft:5,width:"6ch"},value:s.toString(16)?s.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,o<<8|parseInt(t.target.value,16))}})]},e.name)}return Object(M.jsx)(V.a,{item:!0,className:a.props.classes.optionContainer,children:Object(M.jsx)(A.a,{type:e.type,label:O.a.t(e.title),className:a.props.classes.optionsTextField,disabled:a.inputDisabled(e),value:a.getValue(e.name),InputProps:{endAdornment:e.dimension?Object(M.jsx)(W.a,{position:"end",children:O.a.t(e.dimension)}):null},onChange:function(t){return a.changeParam(e.name,t.target.value)}})},e.name)}))})]})}},{key:"getImportsBlock",value:function(){return Object(M.jsx)(M.Fragment,{children:Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t("Import")}),Object(M.jsxs)(N.a,{className:this.props.classes.optionContainer,children:[Object(M.jsx)(U,{classes:this.props.classes,onChange:this.loadSymbols,label:"Load symbols",accept:".asc"}),Object(M.jsx)(U,{classes:this.props.classes,onChange:this.addDb,label:"Add DB",accept:".csv,.prn"})]})]})})}},{key:"render",value:function(){return Object(M.jsx)("form",{className:this.props.classes.tab,children:Object(M.jsxs)(V.a,{container:!0,spacing:2,children:[Object(M.jsxs)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:[this.getInputsBlock(z,"PLC Connection"),this.getImportsBlock()]}),Object(M.jsx)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:this.getInputsBlock(G,"General")})]})})}}]),a}(o.Component),q=Object(h.a)((function(e){return{optionsSelect:{width:280},optionsTextField:{width:280},optionContainer:{},optionsContainer:{width:"calc(100% - ".concat(e.spacing(4),"px)"),padding:e.spacing(2),marginBottom:20,display:"inline-block",textAlign:"left"},optionsGrid:{textAlign:"center",padding:e.spacing(2)},optionsLabel:{fontSize:12},header:{fontSize:24},fileInput:{textAlign:"center",display:"inline-block",height:80,width:200,border:"2px dashed #777",borderRadius:10,marginTop:12,padding:4}}}))(F),J=a(4),Y=a.n(J),$=a(315),Z=a(316),H=a(56),K=a(456),_=a(459),Q=a(457),X=a(460),ee=a(458),te=a(215),ae=a(465),oe=a(462),se=a(78),ie=a.n(se),ne=a(325),le=a.n(ne),re=a(326),de=a.n(re),ce=a(60),pe=a.n(ce),ue=a(317),me=a.n(ue),he=a(318),ge=a.n(he),be=a(320),fe=a.n(be),Se=a(222),ve=a(322),xe=a.n(ve),je=a(323),Te=a.n(je),ye=a(289),Oe=a(290),Pe=a(291),Ce=a(292),Ae=a(293),ke=a(288),Re=a(103),De=a.n(Re),we=a(219),Le=a.n(we),Ie=a(324),Ee=a.n(Ie),We=Object(h.a)((function(e){return{tsvEditor:{width:"100%",height:400},tsvEditorTextarea:{fontFamily:"monospace"}}}))((function(e){var t=Object(o.useState)(""),a=Object(H.a)(t,2),s=a[0],i=a[1];Object(o.useEffect)((function(){var t=[];t.push(e.fields.map((function(e){return e.name}))),e.data.forEach((function(a){return t.push(e.fields.map((function(e){return void 0!==a[e.name]&&null!==a[e.name]?a[e.name].toString():""})))})),i(Object(Se.json2tsv)(t))}),[e.open]);var n=Object(g.b)().enqueueSnackbar;if(!e.open)return null;return Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,maxWidth:"lg",fullWidth:!0,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Edit data as TSV")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("You can copy, paste and edit data as TSV.")}),Object(M.jsx)("div",{children:Object(M.jsx)(xe.a,{onChange:function(e){return i(e)},height:"400px",showPrintMargin:!1,value:s,className:e.classes.tsvEditor,width:"100%",setOptions:{firstLineNumber:0},mode:null})})]}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"outlined",color:"primary",onClick:function(){Te()(s),n(O.a.t("TSV was copied to clipboard"))},startIcon:Object(M.jsx)(Ee.a,{}),children:O.a.t("Copy to clipboard")}),Object(M.jsx)(ke.a,{variant:"contained",color:"primary",onClick:function(){var t=Object(Se.tsv2json)(s),a=t.shift(),o=!0,i=[];for(var l in e.fields)e.fields[l].name!==a[l]&&(i.push(Object(M.jsxs)(M.Fragment,{children:["No field ",Object(M.jsx)("i",{children:e.fields[l].name})," in position ",Object(M.jsx)("i",{children:parseInt(l)+1}),"!"]})),o=!1);t=t.map((function(t,a){var s={};for(var n in e.fields)"select"!==e.fields[n].type||e.fields[n].options.map((function(e){return e.value})).includes(t[n])||(i.push(Object(M.jsxs)(M.Fragment,{children:["Value ",Object(M.jsx)("i",{children:t[n]})," is wrong for field ",Object(M.jsx)("i",{children:e.fields[n].name})," in position ",Object(M.jsx)("i",{children:parseInt(a)+1}),"!"]})),o=!1),"checkbox"===e.fields[n].type&&(t[n]="true"===t[n]),s[e.fields[n].name]=t[n];return s})),o?(e.save(t),e.onClose()):n(Object(M.jsx)("div",{children:i.map((function(e,t){return Object(M.jsx)("div",{children:e},t)}))}),{variant:"error"})},startIcon:Object(M.jsx)(Le.a,{}),children:O.a.t("Import")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Close")})]})]})})),Ve=function(e){return e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete all items")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("Are you sure to delete all items?")}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(),e.onClose()},children:O.a.t("Delete all items")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Be=function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1];return Object(o.useEffect)((function(){i(!1)}),[e.open]),e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete item")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t('Are you sure to delete item with address "%s"?',e.item._address)}),Object(M.jsx)(Ce.a,{children:Object(M.jsx)(w.a,{label:O.a.t("Don't show this message in 5 minutes"),control:Object(M.jsx)(k.a,{checked:s,onChange:function(e){return i(e.target.checked)}})})}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(s),e.onClose()},children:O.a.t("Delete")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Ne=function(e){var t,a=e.sortedItem,s=e.field,i=e.editMode,n=e.setEditMode,l=Object(o.useRef)(),r=a.item;if("checkbox"===s.type)t=Object(M.jsx)(oe.a,{title:O.a.t(s.title),children:Object(M.jsx)(k.a,{inputRef:l,className:e.classes.tableCheckbox,checked:!!r[s.name],disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.checked)}})});else if("rooms"===s.type)t=i?Object(M.jsx)(fe.a,{list:e.rooms,allowNone:!0,value:r[s.name],dense:!0,themeType:e.themeType,inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t)},className:e.classes.tableSelectContainer}):Object(M.jsx)(ge.a,{list:e.rooms,value:r[s.name],themeType:e.themeType});else if("select"===s.type)if(i)t=Object(M.jsx)(R.a,{value:r[s.name],inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},className:e.classes.tableSelectContainer,children:s.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title?e.title:Object(M.jsx)("i",{children:O.a.t("Nothing")})},e.value)}))});else{var d=s.options.find((function(e){return e.value===r[s.name]}));t=d?d.title:""}else t=i?Object(M.jsx)(A.a,{value:r[s.name],className:e.classes.tableTextFieldContainer,inputProps:{ref:l,className:e.classes.tableTextField},type:s.type,onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},disabled:e.getDisable(a.$index,s.name)}):r[s.name]?r[s.name]:null;return Object(M.jsx)(ee.a,{className:pe.a.clsx(e.classes.tableCell,!i&&e.classes.nonEditMode),onClick:function(e){n(!0),window.localStorage.setItem("Modbus.editMode","true"),window.setTimeout((function(){return l.current&&l.current.focus()}),100)},children:t})},ze=Object(h.a)((function(e){return{tableHeader:{whiteSpace:"nowrap",fontWeight:"bold",fontSize:"80%",padding:"0px 8px"},tableHeaderExtended:{color:"dark"===e.palette.type?e.palette.primary.light:e.palette.primary.dark},tableCell:{whiteSpace:"nowrap",fontSize:"80%",padding:"0px 8px"},tableContainer:{overflow:"auto",maxHeight:"calc(100vh - 180px)"},tableTextField:{fontSize:"80%"},tableSelect:{fontSize:"80%"},tableTextFieldContainer:{width:"100%"},tableSelectContainer:{width:"100%"},nonEditMode:{cursor:"pointer"}}}))((function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1],n=Object(o.useState)(parseInt(window.localStorage.getItem("Modbus.editMode"),10)||0),r=Object(H.a)(n,2),d=r[0],c=r[1],p=Object(o.useState)("true"===window.localStorage.getItem("Modbus.extendedMode")),u=Object(H.a)(p,2),m=u[0],h=u[1],g=Object(o.useState)({open:!1,action:null}),b=Object(H.a)(g,2),f=b[0],S=b[1],v=Object(o.useState)({open:!1,item:null,action:null}),x=Object(H.a)(v,2),j=x[0],T=x[1],y=e.getSortedData(e.data,e.orderBy,e.order);return Object(M.jsxs)("div",{children:[Object(M.jsxs)("div",{children:[Object(M.jsx)(oe.a,{title:O.a.t("Add line"),children:Object(M.jsx)(te.a,{onClick:function(t){return e.addItem()},children:Object(M.jsx)(le.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Edit as TSV (Tab separated values)"),children:Object(M.jsx)(te.a,{onClick:function(){return i(!0)},children:Object(M.jsx)(de.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Toggle extended mode"),children:Object(M.jsx)(te.a,{color:m?"primary":"inherit",onClick:function(){window.localStorage.setItem("Modbus.extendedMode",m?"false":"true"),h(!m)},children:Object(M.jsx)(me.a,{})})})]}),Object(M.jsx)("div",{className:e.classes.tableContainer,children:Object(M.jsxs)(K.a,{size:"small",stickyHeader:!0,padding:"none",children:[Object(M.jsx)(_.a,{children:Object(M.jsxs)(X.a,{children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(t){var a=!1,o=!1,s=!1,i=!1;for(var n in e.data)if(e.data[n][t.name]?(a=!0,s=!0):(a=!1,i=!0),s&&i){o=!0,a=!1;break}return Object(M.jsxs)(ee.a,{style:{width:"checkbox"===t.type?20:t.width},className:pe.a.clsx(e.classes.tableHeader,t.expert&&e.classes.tableHeaderExtended),title:t.tooltip?O.a.t(t.tooltip):null,children:["checkbox"===t.type?Object(M.jsx)(oe.a,{title:O.a.t("Change all"),children:Object(M.jsx)(k.a,{indeterminate:o,checked:a,onChange:function(a){var o=JSON.parse(JSON.stringify(e.data));o.forEach((function(e){return e[t.name]=a.target.checked})),e.changeData(o)}})}):null,t.sorted?Object(M.jsx)(ae.a,{active:t.name===e.orderBy,direction:e.order,onClick:function(a){var o=e.orderBy===t.name&&"asc"===e.order;e.onChangeOrder(t.name,o?"desc":"asc")},children:O.a.t(t.title)}):O.a.t(t.title)]},t.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete all"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(t){return S({open:!0,action:function(){return e.changeData([])}})},disabled:!e.data.length,children:Object(M.jsx)(ie.a,{})})})})})]})}),Object(M.jsx)(Q.a,{children:y.map((function(t){return Object(M.jsxs)(X.a,{hover:!0,children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(a){return Object(M.jsx)(Ne,Object(l.a)({themeType:e.themeType,sortedItem:t,field:a,editMode:d===t.$index,rooms:e.rooms,setEditMode:function(){return c(t.$index)}},e),a.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(a){var o=window.sessionStorage.getItem("disableDeleteDialogs");o&&new Date-new Date(o)<3e5?e.deleteItem(t.$index):T({open:!0,action:function(a){a&&window.sessionStorage.setItem("disableDeleteDialogs",(new Date).toISOString()),e.deleteItem(t.$index)},item:t.item})},children:Object(M.jsx)(ie.a,{})})})})})]},t.$index)}))})]})}),s?Object(M.jsx)(We,{open:!0,save:function(t){e.prefix&&t.forEach((function(t){t.Address=(t.Address||"").toUpperCase(),t.Address&&!t.Address.startsWith(e.prefix)&&(t.Address=e.prefix+t.Address)})),e.changeData(t)},onClose:function(){return i(!1)},data:e.data,fields:e.fields}):null,Object(M.jsx)(Ve,{open:f.open,action:f.action,onClose:function(){return S({open:!1,action:null})}}),Object(M.jsx)(Be,{open:j.open,action:j.action,onClose:function(){return T({open:!1,action:null,item:null})},item:j.item})]})})),Ge=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).changeParam=function(e,t,a){var s=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));if(s[e][t]=a,"Type"===t)if(["BOOL"].includes(a)?s[e].Length=.1:["","BYTE"].includes(a)?s[e].Length=1:["WORD","INT","STRING","S5TIME"].includes(a)?s[e].Length=2:["DWORD","DINT","REAL"].includes(a)?s[e].Length=4:["S7TIME"].includes(a)?s[e].Length=8:["S7STRING","ARRAY"].includes(a)&&(s[e].Length=32),"BOOL"===a){var i=o.address2struct(s[e].Address);void 0===i.bit&&(i.bit=0,s[e].Address=o.struct2address(i))}else{var n=o.address2struct(s[e].Address);void 0!==n.bit&&(n.bit>0&&n.byte++,delete n.bit,s[e].Address=o.struct2address(n))}o.props.onChange(o.nativeField,s)},o.addItem=function(){var e=JSON.parse(JSON.stringify(o.props.native[o.nativeField])),t={};if(o.getFields().forEach((function(e){return t[e.name]=""})),e.length){var a=JSON.parse(JSON.stringify(e));a.sort((function(e,t){return e.Address>t.Address?1:-1}));var s=a[a.length-1],i=o.address2struct(s.Address);"BOOL"===s.Type?(i.bit=i.bit||0,i.bit++,i.bit>=8&&(i.bit=i.bit%8,i.byte++)):(delete i.bit,i.byte+=s.Length),void 0!==i.db&&i.byte+s.Length>65535&&(i.db++,i.byte=0,"BOOL"===s.Type&&(i.bit=0)),t.Address=o.struct2address(i),t.Type=s.Type,t.Length=s.Length,t.Unit=s.Unit,t.Role=s.Role,t.Room=s.Room,t.poll=s.poll,t.RW=s.RW,t.WP=s.WP}else t.role="level",t.Type="BOOL",t.Length="0.1",t.poll=!0,"dbs"===o.nativeField?t.Address="DB1 0.0":t.Address="0.0";e.push(t),o.props.onChange(o.nativeField,e)},o.deleteItem=function(e){var t=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));t.splice(e,1),o.props.onChange(o.nativeField,t)},o.changeData=function(e){o.props.onChange(o.nativeField,e)},o.getDisable=function(e,t){return"Length"===t&&!["STRING","S7STRING","ARRAY"].includes(o.props.native[o.nativeField][e].type)},o.getSortedData=function(e,t,a){o.fields=o.fields||o.getFields(),e=e||o.props.native[o.nativeField],t=t||o.state.orderBy,a=a||o.state.order;var s=[];e.forEach((function(e,t){s[t]={item:e,$index:t}}));var i=o.fields.find((function(e){return e.name===t}));return s.sort((function(e,s){var n,l;if("Address"===t){var r=o.address2struct(e.item.Address),d=o.address2struct(s.item.Address);n=0,void 0!==r.db&&(n=r.db<<24),void 0!==d.db&&(l=d.db<<24),n|=r.byte<<8,l|=d.byte<<8,n|=r.bit||0,l|=d.bit||0}else"$index"===t?(n=e[t],l=s[t]):i&&"number"===i.type?(n=parseInt(e.item[t],10),l=parseInt(s.item[t],10)):(n=e.item[t],l=s.item[t]);return("asc"===a?n>l:n<l)?1:-1})),s},o.nativeField="",o.state={order:window.localStorage.getItem("Modbus.order")||"asc",orderBy:window.localStorage.getItem("Modbus.orderBy")||"Address"},o}return Object(d.a)(a,[{key:"getRooms",value:function(){var e=O.a.getLanguage();return this.props.rooms?Object.values(this.props.rooms).map((function(t){return{value:t._id,title:"object"===typeof t.common.name?t.common.name[e]:t.common.name}})):[]}},{key:"getFields",value:function(){var e=this.getRooms();e.unshift({value:"",title:""});var t=[{name:"Address",title:"Address",type:"text",sorted:!0,width:20},{name:"Name",title:"Name",type:"text",sorted:!0},{name:"Description",title:"Description",type:"text",sorted:!0},{name:"Type",title:"Type",type:"select",options:Z,sorted:!0},{name:"Length",title:"Length",type:"text",width:20},{name:"Unit",title:"Unit",type:"text",width:30},{name:"Role",title:"Role",type:"select",options:$,sorted:!0},{name:"Room",title:"Room",type:"rooms",options:e,sorted:!0},{name:"poll",title:"Poll",type:"checkbox"},{name:"RW",title:"RW",type:"checkbox",expert:!0},{name:"WP",title:"WP",type:"checkbox",expert:!0}];return this.props.native.params.multiDeviceId&&t.splice(1,0,{name:"deviceId",title:"Slave ID",type:"number",sorted:!0,width:20}),t}},{key:"address2struct",value:function(e){if("dbs"===this.nativeField){var t=e.split(" "),a=parseInt(t[0].replace("DB","").replace("db","").trim(),10);if(t[1]&&t[1].includes(".")){var o=parseFloat(t[1]);return{db:a,byte:Math.floor(o),bit:10*o%10}}return{db:a,byte:parseInt(t[1],10)}}if(e.includes(".")){var s=parseFloat(e);return{byte:Math.floor(s),bit:10*s%10}}return{byte:parseInt(e,10)}}},{key:"struct2address",value:function(e){return void 0!==e.db?void 0!==e.bit?"DB"+e.db+" "+e.byte+"."+e.bit:"DB"+e.db+" "+e.byte:void 0!==e.bit?e.byte+"."+e.bit:e.byte}},{key:"render",value:function(){var e=this;return this.fields=this.fields||this.getFields(),Object(M.jsx)(B.a,{children:Object(M.jsx)(ze,{prefix:"dbs"===this.nativeField?"DB":"",fields:this.fields,getSortedData:this.getSortedData,data:this.props.native[this.nativeField],changeParam:this.changeParam,addItem:this.addItem,deleteItem:this.deleteItem,changeData:this.changeData,getDisable:this.getDisable,themeType:this.props.themeType,rooms:this.props.rooms,order:this.state.order,orderBy:this.state.orderBy,onChangeOrder:function(t,a){e.setState({orderBy:t,order:a}),window.localStorage.setItem("Modbus.orderBy",t),window.localStorage.setItem("Modbus.order",a)}})})}}]),a}(o.Component),Me=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="inputs",e}return a}(Ge);Me.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var Ue=Me,Fe=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="outputs",e}return a}(Ge);Fe.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var qe=Fe,Je=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="markers",e}return a}(Ge);Je.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var Ye=Je,$e=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="dbs",e}return a}(Ge);$e.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var Ze=[{name:"general",title:"General",component:q},{name:"inputs",title:"Inputs",component:Ue},{name:"outputs",title:"Outputs",component:qe},{name:"marker",title:"Marker",component:Ye},{name:"dbs",title:"DBs",component:$e}],He=function(e){Object(u.a)(o,e);var t=Object(m.a)(o);function o(e){var s;Object(r.a)(this,o);var i=Object(l.a)({},e);return i.encryptedFields=["pass"],i.translations={en:a(407),de:a(408),ru:a(409),pt:a(410),nl:a(411),fr:a(412),it:a(413),es:a(414),pl:a(415),"zh-cn":a(416)},(s=t.call(this,e,i)).state.moreLoaded=!1,s.state.rooms=null,s}return Object(d.a)(o,[{key:"onConnectionReady",value:function(){var e=this;Object(c.a)(Object(p.a)(o.prototype),"onConnectionReady",this).call(this),this.socket.getForeignObjects("enum.rooms.*","enum").then((function(t){return e.setState({moreLoaded:!0,rooms:t})}))}},{key:"getSelectedTab",value:function(){var e=this.state.selectedTab;return e?Ze.findIndex((function(t){return t.name===e})):0}},{key:"render",value:function(){var e=this;return this.state.loaded&&this.state.moreLoaded?Object(M.jsx)(n.a,{theme:this.state.theme,children:Object(M.jsx)(g.a,{children:Object(M.jsxs)("div",{className:"App",style:{background:this.state.theme.palette.background.default,color:this.state.theme.palette.text.primary},children:[Object(M.jsx)(b.a,{position:"static",children:Object(M.jsx)(f.a,{value:this.getSelectedTab(),onChange:function(t,a){return e.selectTab(Ze[a].name,a)},variant:"scrollable",scrollButtons:"auto",children:Ze.map((function(e){return Object(M.jsx)(S.a,{label:e.icon?Object(M.jsxs)(M.Fragment,{children:[e.icon,O.a.t(e.title)]}):O.a.t(e.title),"data-name":e.name,title:e.tooltip?O.a.t(e.tooltip):void 0},e.name)}))})}),Object(M.jsx)("div",{className:this.isIFrame?this.props.classes.tabContentIFrame:this.props.classes.tabContent,children:Ze.map((function(t,a){var o=t.component;if(e.state.selectedTab){if(e.state.selectedTab!==t.name)return null}else if(0!==a)return null;return Object(M.jsx)(o,{themeType:e.state.themeType,common:e.common,socket:e.socket,native:e.state.native,onError:function(t){return e.setState({errorText:!t&&0!==t||"string"===typeof t?t:t.toString()})},onLoad:function(t){return e.onLoadConfig(t)},instance:e.instance,adapterName:e.adapterName,changed:e.state.changed,onChange:function(t,a,o){return e.updateNativeValue(t,a,o)},changeNative:function(t){return e.setState({native:t,changed:e.getIsChanged(t)})},rooms:e.state.rooms},t.name)}))}),this.renderError(),this.renderSaveCloseButtons()]})})}):Object(M.jsx)(n.a,{theme:this.state.theme,children:Object(M.jsx)(T.a,{theme:this.state.themeType})})}}]),o}(x.a),Ke=Object(h.a)((function(e){return{root:{},tabContent:{padding:10,height:"calc(100% - 64px - 48px - 20px)",overflow:"auto"},tabContentIFrame:{padding:10,height:"calc(100% - 64px - 48px - 20px - 38px)",overflow:"auto"},tab:{width:"100%",minHeight:"100%"}}}))(He);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var _e=a(327),Qe=a(217),Xe=a.n(Qe);window.adapterName="s7";var et=pe.a.getThemeName();console.log("iobroker.".concat(window.adapterName,"@").concat(_e.a,' using theme "').concat(et,'"')),function e(){return i.a.render(Object(M.jsx)(n.a,{theme:Xe()(et),children:Object(M.jsx)(Ke,{onThemeChange:function(t){et=t,e()}})}),document.getElementById("root"))}(),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[418,1,2]]]);
+//# sourceMappingURL=main.84c400bc.chunk.js.map
\ No newline at end of file
diff --git a/admin/static/js/main.84c400bc.chunk.js.map b/admin/static/js/main.84c400bc.chunk.js.map
new file mode 100644
index 0000000..a7d9cc2
--- /dev/null
+++ b/admin/static/js/main.84c400bc.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["Tabs/Options.js","Components/TsvDialog.js","Components/DeleteAllDialog.js","Components/DeleteDialog.js","Components/RegisterTable.js","Tabs/BaseRegisters.js","Tabs/Inputs.js","Tabs/Outputs.js","Tabs/Marker.js","Tabs/DBs.js","App.js","serviceWorker.js","index.js"],"names":["FileInput","props","enqueueSnackbar","useSnackbar","onDrop","useCallback","acceptedFiles","onChange","I18n","t","useDropzone","accept","getRootProps","getInputProps","isDragActive","FormControl","style","padding","paddingRight","Typography","variant","gutterBottom","label","className","classes","fileInput","backgroundColor","cursor","Options","inputDisabled","input","inputDisplay","native","params","slot","includes","name","timeFormat","changeParam","value","JSON","parse","stringify","localTSAP","remoteTSAP","rack","changeNative","loadSymbols","e","reader","FileReader","onload","localData","inputs","outputs","markers","text","result","split","forEach","line","typ","slice","replace","d","Name","Address","Type","Description","Unit","poll","RW","WP","push","table","readAsText","addDb","setTimeout","changes","dbs","newParts","indexOf","lines","mapping","attr","process","f","db","trim","match","m","parseInt","undefined","offset","sFields","fields","length","l","obj","Role","Room","console","log","Length","_attr","error","aaa","mm","vv","item","x","shift","dec","join","hasOwnProperty","sort","a","b","aDB","bDB","aOffset","bOffset","state","this","title","Paper","optionsContainer","header","Grid","container","spacing","direction","map","type","optionContainer","FormControlLabel","control","Checkbox","optionsCheckbox","disabled","checked","getValue","target","dimension","InputLabel","shrink","Select","optionsSelect","displayEmpty","options","option","MenuItem","top","bottom","optionsLabel","Input","width","toString","toUpperCase","marginLeft","TextField","optionsTextField","InputProps","endAdornment","InputAdornment","position","Box","tab","xs","md","optionsGrid","getInputsBlock","connectionInputs","getImportsBlock","generalInputs","Component","withStyles","theme","marginBottom","display","textAlign","fontSize","height","border","borderRadius","marginTop","tsvEditor","tsvEditorTextarea","fontFamily","useState","tsv","setTsv","useEffect","tsvResult","field","data","json2tsv","open","Dialog","onClose","maxWidth","fullWidth","DialogTitle","DialogContent","DialogContentText","showPrintMargin","setOptions","firstLineNumber","mode","DialogActions","Button","color","onClick","copy","startIcon","tsv2json","success","errors","index","itemValues","itemIndex","save","DeleteAllDialog","action","DeleteDialog","disableWarnings","setDisableWarnings","_address","DataCell","sortedItem","editMode","setEditMode","ref","useRef","Tooltip","inputRef","tableCheckbox","getDisable","$index","list","rooms","allowNone","dense","themeType","inputProps","tableSelect","tableSelectContainer","find","tableTextFieldContainer","tableTextField","TableCell","Utils","clsx","tableCell","nonEditMode","window","localStorage","setItem","current","focus","tableHeader","whiteSpace","fontWeight","tableHeaderExtended","palette","primary","light","dark","tableContainer","overflow","maxHeight","tsvDialogOpen","setTsvDialogOpen","getItem","extendedMode","setExtendedMode","deleteAllDialog","setDeleteAllDialog","deleteDialog","setDeleteDialog","sortedData","getSortedData","orderBy","order","IconButton","addItem","Table","size","stickyHeader","TableHead","TableRow","filter","expert","formulaDisabled","isChecked","indeterminate","trueFound","falseFound","k","tooltip","newData","changeData","sorted","TableSortLabel","active","isAsc","onChangeOrder","TableBody","hover","lastTime","sessionStorage","Date","deleteItem","disableDialogs","toISOString","prefix","startsWith","BaseRegisters","nativeField","struct","address2struct","bit","struct2address","byte","newItem","getFields","item1","item2","lastItem","role","splice","sortedItem1","sortedItem2","sort1","sort2","a1","a2","lang","getLanguage","Object","values","room","_id","common","getRooms","unshift","types","roles","multiDeviceId","address","parts","parseFloat","Math","floor","setState","Inputs","propTypes","PropTypes","object","isRequired","instance","number","adapterName","string","onError","func","onLoad","changed","bool","socket","Outputs","Marker","Dbs","tabs","component","TabOptions","TabInputs","TabOutputs","TabMarker","App","extendedProps","encryptedFields","translations","require","moreLoaded","getForeignObjects","then","selectedTab","findIndex","loaded","background","default","AppBar","Tabs","getSelectedTab","selectTab","scrollButtons","Tab","icon","data-name","isIFrame","tabContentIFrame","tabContent","TabComponent","errorText","onLoadConfig","cb","updateNativeValue","getIsChanged","renderError","renderSaveCloseButtons","GenericApp","root","minHeight","Boolean","location","hostname","themeName","getThemeName","version","build","ReactDOM","render","onThemeChange","_theme","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"i0wCA+DIA,EAAY,SAAUC,GACtB,IAAQC,EAAoBC,cAApBD,gBACFE,EAASC,uBAAY,SAAAC,GACvBL,EAAMM,SAASD,GACfJ,EAAgBM,IAAKC,EAAE,mBACxB,IAED,EAAoDC,YAAY,CAACN,SAAQO,OAAQV,EAAMU,SAAhFC,EAAP,EAAOA,aAAcC,EAArB,EAAqBA,cAAeC,EAApC,EAAoCA,aAEpC,OAAO,eAACC,EAAA,EAAD,CAAaC,MAAO,CAACC,QAAS,EAAGC,aAAc,IAA/C,UACL,cAACC,EAAA,EAAD,CAAYC,QAAQ,KAAKC,cAAY,EAArC,SAAwCb,IAAKC,EAAER,EAAMqB,SACrD,gDAASV,KAAT,IAAyBW,UAAWtB,EAAMuB,QAAQC,UAAWT,MAAOF,EAAe,CAACY,gBAAiB,wBA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,ICzJdmC,QACW,cAA7B/J,OAAOgK,SAASC,UAEe,UAA7BjK,OAAOgK,SAASC,UAEhBjK,OAAOgK,SAASC,SAASvU,MACvB,2D,mCCNNsK,OAAO2G,YAAc,KACrB,IAAIuD,GAAYtK,KAAMuK,eAEtB7T,QAAQC,IAAR,mBAAwByJ,OAAO2G,YAA/B,YAA8CyD,KAA9C,yBAAsEF,GAAtE,MAEA,SAASG,IACL,OAAOC,IAASC,OACZ,cAAC,IAAD,CAAkBrP,MAAOA,KAAMgP,IAA/B,SACI,cAAC,GAAD,CACIM,cAAe,SAAAC,GACXP,GAAYO,EACZJ,SAIZK,SAASC,eAAe,SAchCN,GDwFM,kBAAmBO,WACrBA,UAAUC,cAAcC,MAAM3C,MAAK,SAAA4C,GACjCA,EAAaC,kB","file":"static/js/main.84c400bc.chunk.js","sourcesContent":["import {Component, useCallback} from 'react';\r\nimport {useDropzone} from 'react-dropzone';\r\nimport { useSnackbar } from 'notistack';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Typography from '@material-ui/core/Typography';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport Input from '@material-ui/core/Input';\r\nimport InputLabel from '@material-ui/core/InputLabel';\r\nimport InputAdornment from '@material-ui/core/InputAdornment';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport Box from '@material-ui/core/Box';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport connectionInputs from '../data/optionsConnection';\r\nimport generalInputs from '../data/optionsGeneral';\r\n\r\nconst styles = theme => ({\r\n    optionsSelect: {\r\n        width: 280\r\n    },\r\n    optionsTextField: {\r\n        width: 280\r\n    },\r\n    optionContainer: {\r\n    },\r\n    optionsContainer: {\r\n        width: `calc(100% - ${theme.spacing(4)}px)`,\r\n        padding: theme.spacing(2),\r\n        marginBottom: 20,\r\n        display: 'inline-block',\r\n        textAlign: 'left'\r\n    },\r\n    optionsGrid: {\r\n        textAlign: 'center',\r\n        padding: theme.spacing(2),\r\n    },\r\n    optionsLabel: {\r\n        fontSize: 12,\r\n    },\r\n    header: {\r\n        fontSize: 24,\r\n    },\r\n    fileInput: {\r\n        textAlign: 'center',\r\n        display: 'inline-block',\r\n        height: 80,\r\n        width: 200,\r\n        border: '2px dashed #777',\r\n        borderRadius: 10,\r\n        marginTop: 12,\r\n        padding: 4\r\n    }\r\n});\r\n\r\nlet FileInput = function (props) {\r\n    const { enqueueSnackbar } = useSnackbar();\r\n    const onDrop = useCallback(acceptedFiles => {\r\n        props.onChange(acceptedFiles);\r\n        enqueueSnackbar(I18n.t('Data updated'));\r\n    }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n      const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop, accept: props.accept});\r\n\r\n      return <FormControl style={{padding: 3, paddingRight: 40}}>\r\n        <Typography variant=\"h6\" gutterBottom>{ I18n.t(props.label)}</Typography>\r\n        <div {...getRootProps()} className={props.classes.fileInput} style={isDragActive ? {backgroundColor: 'rgba(0, 255, 0, 0.1)'} : {cursor: 'pointer'}}>\r\n            <input {...getInputProps()} />\r\n            {\r\n                isDragActive ?\r\n                <p>{I18n.t('Drop the file here ...')}</p> :\r\n                <p>{I18n.t(`Drag 'n' drop file here, or click to select file`)}</p>\r\n            }\r\n        </div>\r\n    </FormControl>;\r\n};\r\n\r\nclass Options extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n\r\n        this.state = {\r\n        };\r\n    }\r\n\r\n    getValue(name) {\r\n        if (name === 's7logo') {\r\n            return this.props.native.params.slot === null;\r\n        }\r\n        return this.props.native.params[name];\r\n    }\r\n\r\n    inputDisabled = input => {\r\n        return false;\r\n    }\r\n\r\n    inputDisplay = input => {\r\n        if (this.props.native.params.slot === null) {\r\n            if (['rack', 'slot'].includes(input.name)) {\r\n                return false;\r\n            }\r\n        } else {\r\n            if (['localTSAP', 'remoteTSAP'].includes(input.name)) {\r\n                return false;\r\n            }\r\n        }\r\n        if (input.name === 'timeOffset') {\r\n            return ['summer', 'offset'].includes(this.props.native.params.timeFormat);\r\n        }\r\n        return true;\r\n    }\r\n\r\n    getInputsBlock(inputs, title) {\r\n        return <Paper className={this.props.classes.optionsContainer}>\r\n            <Typography variant=\"h4\" gutterBottom className={this.props.classes.header}>{I18n.t(title)}</Typography>\r\n            <Grid container spacing={2} direction=\"column\">\r\n                {inputs.map(input => {\r\n                    if (!this.inputDisplay(input)) {\r\n                        return null;\r\n                    }\r\n                    if (input.type === 'checkbox') {\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}>\r\n                            <FormControlLabel\r\n                                label={I18n.t(input.title)}\r\n                                control={<Checkbox\r\n                                    label={I18n.t(input.title)}\r\n                                    className={this.props.classes.optionsCheckbox}\r\n                                    disabled={this.inputDisabled(input)}\r\n                                    checked={this.getValue(input.name)}\r\n                                    onChange={e => this.changeParam(input.name, e.target.checked)}\r\n                                />}/> {input.dimension ? I18n.t(input.dimension) : null}</Grid>;\r\n                    } else if (input.type === 'select') {\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}>\r\n                            <FormControl>\r\n                                <InputLabel shrink>{I18n.t(input.title)}</InputLabel>\r\n                                <Select\r\n                                    className={this.props.classes.optionsSelect}\r\n                                    displayEmpty\r\n                                    disabled={this.inputDisabled(input)}\r\n                                    value={this.getValue(input.name)}\r\n                                    onChange={e => this.changeParam(input.name, e.target.value)}\r\n                                >\r\n                                    {input.options.map(option =>\r\n                                        <MenuItem key={option.value} value={option.value}>{option.title}</MenuItem>\r\n                                    )}\r\n                                </Select>\r\n                            </FormControl> {input.dimension ? I18n.t(input.dimension) : null}\r\n                        </Grid>;\r\n                    } else if (input.type === 'hex') {\r\n                        let value = parseInt(this.getValue(input.name)) ? parseInt(this.getValue(input.name)) : 0;\r\n                        let top = (value >> 8) & 0xFF;\r\n                        let bottom = value & 0xFF;\r\n\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}>\r\n                            <InputLabel className={this.props.classes.optionsLabel}>{I18n.t(input.title)}</InputLabel>\r\n                            <Input\r\n                                title={I18n.t('Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic')}\r\n                                style={{width: '6ch'}}\r\n                                value={top.toString(16) ? top.toString(16).toUpperCase() : 0}\r\n                               onChange={e => {\r\n                                   if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n                                       return;\r\n                                   }\r\n                                   this.changeParam(input.name, (parseInt(e.target.value, 16) << 8) | bottom);\r\n                               }}\r\n                            />\r\n                            <Input\r\n                                title={I18n.t('Rack and slot: [Rack * 0x20 + Slot]')}\r\n                                style={{marginLeft: 5, width: '6ch'}}\r\n                                value={bottom.toString(16) ? bottom.toString(16).toUpperCase() : 0}\r\n                                onChange={e => {\r\n                                    if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n                                        return;\r\n                                    }\r\n                                    this.changeParam(input.name, (top << 8) | parseInt(e.target.value, 16));\r\n                                }}\r\n                            />\r\n                        </Grid>;\r\n                    } else {\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}><TextField\r\n                            type={input.type}\r\n                            label={I18n.t(input.title)}\r\n                            className={this.props.classes.optionsTextField}\r\n                            disabled={this.inputDisabled(input)}\r\n                            value={this.getValue(input.name)}\r\n                            InputProps={{\r\n                                endAdornment: input.dimension ?\r\n                                    <InputAdornment position=\"end\">{I18n.t(input.dimension)}</InputAdornment> : null\r\n                            }}\r\n                            onChange={e => this.changeParam(input.name, e.target.value)}\r\n                        /></Grid>;\r\n                    }\r\n                })}\r\n            </Grid>\r\n        </Paper>;\r\n    }\r\n\r\n    getImportsBlock() {\r\n        return <><Paper className={this.props.classes.optionsContainer}>\r\n            <Typography variant=\"h4\" gutterBottom className={this.props.classes.header}>{I18n.t('Import')}</Typography>\r\n                <Box className={this.props.classes.optionContainer}>\r\n                <FileInput classes={this.props.classes} onChange={this.loadSymbols} label=\"Load symbols\" accept=\".asc\"/>\r\n                <FileInput classes={this.props.classes} onChange={this.addDb} label=\"Add DB\" accept=\".csv,.prn\"/>\r\n                </Box>\r\n        </Paper></>;\r\n    }\r\n\r\n    render() {\r\n        return <form className={ this.props.classes.tab }>\r\n            <Grid container spacing={2} >\r\n                <Grid item xs={12} md={6} className={ this.props.classes.optionsGrid }>\r\n                    {this.getInputsBlock(connectionInputs, 'PLC Connection')}\r\n                    {this.getImportsBlock()}\r\n                </Grid>\r\n                <Grid item xs={12} md={6} className={ this.props.classes.optionsGrid }>{this.getInputsBlock(generalInputs, 'General')}</Grid>\r\n            </Grid>\r\n        </form>;\r\n    }\r\n\r\n    changeParam = (name, value) => {\r\n        let native = JSON.parse(JSON.stringify(this.props.native));\r\n        if (name === 's7logo') {\r\n            if (value) {\r\n                native.params.localTSAP = '';\r\n                native.params.remoteTSAP = '';\r\n                native.params.rack = null;\r\n                native.params.slot = null;\r\n            } else {\r\n                native.params.localTSAP = null;\r\n                native.params.remoteTSAP = null;\r\n                native.params.rack = '';\r\n                native.params.slot = '';\r\n            }\r\n        } else {\r\n            native.params[name] = value;\r\n        }\r\n        this.props.changeNative(native);\r\n    }\r\n\r\n    loadSymbols = e => {\r\n        let native = JSON.parse(JSON.stringify(this.props.native));\r\n        const reader = new FileReader();\r\n\r\n        reader.onload = e => {\r\n            const localData = {\r\n                inputs:  [],\r\n                outputs: [],\r\n                markers: []\r\n//                counter: [],\r\n//                timer: [],\r\n//                dbs: []\r\n            };\r\n            let text = reader.result;\r\n\r\n            text = text.split('126,');\r\n            text.forEach(line => {\r\n                const typ = line.slice(23, 29).replace(/( )/g, '');\r\n\r\n                const d = {\r\n                    Name:         line.slice(0, 23).replace(/( ){2,}/g, ''),\r\n                    Address:      line.slice(29, 36).replace(/( )/g, ''),\r\n                    Type:         line.slice(36, 41).replace(/( )/g, ''),\r\n                    Description:  line.slice(46, 126).replace(/( ){2,}/, ''),\r\n                    Unit:         '',\r\n//                    Role:         '',\r\n//                    Room:         '',\r\n                    poll:         true,\r\n                    RW:           false,\r\n                    WP:           false\r\n                };\r\n\r\n//                    if (typ == 'E' || typ == 'EB' ||typ == 'EW' ||typ == 'ED'||typ == 'PEB'||typ == 'PEW'||typ == 'PED')data.inputs.push(d);\r\n//                    if (typ == 'A' || typ == 'AB' ||typ == 'AW' ||typ == 'AD'||typ == 'PAB'||typ == 'PAW'||typ == 'PAD')data.outputs.push(d);\r\n                if (typ === 'E' || typ === 'EB' || typ === 'EW' || typ === 'ED') localData.inputs.push(d);\r\n                if (typ === 'A' || typ === 'AB' || typ === 'AW' || typ === 'AD') localData.outputs.push(d);\r\n                if (typ === 'M' || typ === 'MB' || typ === 'MW' || typ === 'MD') localData.markers.push(d);\r\n//                if (typ == 'C')data.counter.push(d);\r\n//                if (typ == 'T')data.timer.push(d);\r\n//                if (typ == 'DB')data.dbs.push(d);\r\n            });\r\n\r\n            ['inputs', 'outputs', 'markers'].forEach(table => {\r\n                native[table] = localData[table];\r\n            });\r\n            this.props.changeNative(native);\r\n        };\r\n\r\n        reader.readAsText(e[0], 'ISO-8859-1');\r\n    }\r\n\r\n    addDb = e => {\r\n        let native = JSON.parse(JSON.stringify(this.props.native));\r\n        const reader = new FileReader();\r\n\r\n        reader.onload = e => {\r\n            setTimeout(function () {\r\n                const text       = reader.result;\r\n                const changes  = {\r\n                    inputs: false,\r\n                    outputs: false,\r\n                    markers: false,\r\n                    dbs: false\r\n                };\r\n                const newParts = {\r\n                    inputs:     native.inputs || [],\r\n                    outputs:    native.outputs || [],\r\n                    markers:    native.markers || [],\r\n                    dbs:        native.dbs || []\r\n                };\r\n\r\n                if (text.indexOf('Leseanforderung') !== -1) {\r\n                    // Graphpic format\r\n                    const lines = text.replace(/\\r\\n/g, '\\n').split('\\n');\r\n                    const mapping = {\r\n                        'Name':             {attr: 'Name'},\r\n                        'Typ':              {attr: ''},\r\n                        'Operand':          {attr: 'Address',       process: f => {\r\n                            // DB 504.DBW 1462 => DB504 1462\r\n                            f = f.trim();\r\n                            const db     = f.match(/^DB (\\d+)/);\r\n                            if (!db) {\r\n                                // M\r\n                                // MB\r\n                                let m = f.match(/^MB? (\\d+)\\.?(\\d+)?$/);\r\n                                if (m) {\r\n                                    return 'M ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n                                } else {\r\n                                    m = f.match(/^AB? (\\d+)\\.?(\\d+)?$/);\r\n                                    if (m) {\r\n                                        return 'OUT ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n                                    } else {\r\n                                        m = f.match(/^EB? (\\d+)\\.?(\\d+)?$/);\r\n                                        if (m) {\r\n                                            return 'IN ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n                                        } else {\r\n                                            return f;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            const offset = f.match(/(\\d+).?(\\d+)?$/);\r\n                            if (db && offset) {\r\n                                return `DB${db[1]} ${offset[1]}${offset[2] !== undefined ? '.' + offset[2] : ''}`;\r\n                            } else {\r\n                                return f;\r\n                            }\r\n                        }},\r\n                        'SPS-Format':       {attr: 'Type',          process: function (f) {return f;} },\r\n                        'Byteanzahl':       {attr: 'Length',        process: function (f) {return parseInt(f, 10);} },\r\n                        'Zugriff':          {attr: 'RW',            process: function (f) {return f !== 'read';} },\r\n                        'Leseanforderung':  {attr: 'poll',          process: function (f) {return f === 'zyklisch';} },\r\n                        'AktZeit (ms)':     {attr: ''},\r\n                        'Kommentar':        {attr: 'Description'},\r\n                        'Clients (Anzahl)': {attr: ''}\r\n                    };\r\n                    // First line\r\n                    // \"Name\",\"Typ\",\"Operand\",\"SPS-Format\",\"Byteanzahl\",\"Zugriff\",\"Leseanforderung\",\"AktZeit (ms)\",\"Kommentar\",\"Clients (Anzahl)\"\r\n                    let sFields = lines[0].split(',');\r\n                    // create mapping\r\n                    const fields = [];\r\n                    for (let m = 0; m < sFields.length; m++) {\r\n                        sFields[m] = sFields[m].replace(/\"/g, '');\r\n                        fields.push(mapping[sFields[m]]);\r\n                    }\r\n                    for (let l = 1; l < lines.length; l++) {\r\n                        lines[l] = lines[l].trim();\r\n                        if (!lines[l]) continue;\r\n                        sFields = lines[l].trim().split(',');\r\n                        let obj = {\r\n                            Type:           'ARRAY',\r\n                            Unit:           '',\r\n                            Role:           '',\r\n                            Room:           '',\r\n                            poll:           true,\r\n                            RW:             false,\r\n                            WP:             false\r\n                        };\r\n                        for (let f = 0; f < fields.length; f++) {\r\n                            if (!fields[f].attr) {\r\n                                continue;\r\n                            }\r\n                            if (!sFields[f]) {\r\n                                console.log('error');\r\n                                break;\r\n                            }\r\n                            sFields[f] = sFields[f].replace(/\"/g, '');\r\n                            obj[fields[f].attr] = fields[f].process ? fields[f].process(sFields[f]) : sFields[f];\r\n\r\n                            if (obj.Name.match(/^@/)) {\r\n                                obj = null;\r\n                                break;\r\n                            }\r\n                        }\r\n                        if (obj) {\r\n                            if (obj.Type === 'BYTE' && obj.Length !== 1) {\r\n                                obj.Type = 'ARRAY';\r\n                            }\r\n                            if (obj.Type === 'CHAR') {\r\n                                obj.Type = 'STRING';\r\n                            }\r\n                            if (obj.Type === 'BYTE' || obj.Type === 'BOOL' || obj.Type === 'INT') {\r\n                                obj.Length = '';\r\n                            }\r\n                            let _attr;\r\n                            if (obj.Address.match(/^DB/)) {\r\n                                _attr = 'dbs';\r\n                            } else if (obj.Address.match(/^IN/)) {\r\n                                obj.Address = obj.Address.replace(/^IN\\s?/, '');\r\n                                _attr = 'inputs';\r\n                            } else if (obj.Address.match(/^OUT/)) {\r\n                                _attr = 'outputs';\r\n                                obj.Address = obj.Address.replace(/^OUT\\s?/, '');\r\n                            } else if (obj.Address.match(/^M/)) {\r\n                                _attr = 'markers';\r\n                                obj.Address = obj.Address.replace(/^M\\s?/, '');\r\n                            } else {\r\n                                console.error('Unknown TYPE: ' + obj.Address);\r\n                                continue;\r\n                            }\r\n                            // try to find same address\r\n                            for (let aaa = 0; aaa < newParts[_attr].length; aaa++) {\r\n                                if (newParts[_attr][aaa].Address === obj.Address) {\r\n                                    newParts[_attr][aaa] = obj;\r\n                                    changes[_attr] = true;\r\n                                    obj = null;\r\n                                    break;\r\n                                }\r\n                            }\r\n                            if (obj) {\r\n                                changes[_attr] = true;\r\n                                newParts[_attr].push(obj);\r\n                            }\r\n                        }\r\n                    }\r\n                } else {\r\n                    const mm = text.match(/(DB)[0-9]+\\s-\\s/g);\r\n                    const db = mm ? mm[0].replace(' - ', '') : '';\r\n                    const vv = text.split('STRUCT');\r\n\r\n                    const struck = vv[1] ? vv[1].split('=')[0].split('\\n') : [];\r\n\r\n                    struck.forEach((item) => {\r\n                        if (item.length > 10) {\r\n                            const x = item.split(/\\s+/g);\r\n                            x.shift();\r\n\r\n                            let obj = {\r\n                                Address:        db + ' ' + x.shift(),\r\n                                Name:           x.shift(),\r\n                                Type:           x.shift(),\r\n                                dec:            x.shift(),\r\n                                Description:    x.join(' '),\r\n                                Unit:           '',\r\n                                Role:           '',\r\n                                Room:           '',\r\n                                poll:           true,\r\n                                RW:             false,\r\n                                WP:             false\r\n                            };\r\n\r\n                            // try to find same address\r\n                            for (let aaa = 0; aaa < newParts.dbs.length; aaa++) {\r\n                                if (newParts.dbs[aaa].Address === obj.Address) {\r\n                                    newParts.dbs[aaa] = obj;\r\n                                    changes.dbs = true;\r\n                                    obj = null;\r\n                                    break;\r\n                                }\r\n                            }\r\n                            if (obj) {\r\n                                changes.dbs = true;\r\n                                newParts.dbs.push(obj);\r\n                            }\r\n                        }\r\n                    });\r\n                }\r\n                for (const attr in newParts) {\r\n                    if (!newParts.hasOwnProperty(attr)) {\r\n                        continue;\r\n                    }\r\n                    newParts[attr].sort((a, b) => {\r\n                        const aDB = a.Address.match(/^D?B?\\s?(\\d+)/);\r\n                        const bDB = b.Address.match(/^D?B?\\s?(\\d+)/);\r\n                        if (!aDB) return -1;\r\n                        if (!bDB) return 1;\r\n                        if (parseInt(aDB[1], 10) > parseInt(bDB[1], 10)) return 1;\r\n                        if (parseInt(aDB[1], 10) < parseInt(bDB[1], 10)) return -1;\r\n                        const aOffset = a.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n                        const bOffset = b.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n                        if (!aOffset) return -1;\r\n                        if (!bOffset) return 1;\r\n                        if (parseInt(aOffset[1], 10) > parseInt(bOffset[1], 10)) return 1;\r\n                        if (parseInt(aOffset[1], 10) < parseInt(bOffset[1], 10)) return -1;\r\n                        if (aOffset[2] === undefined && bOffset[2] !== undefined) return 1;\r\n                        if (bOffset[2] === undefined && aOffset[2] !== undefined) return -1;\r\n                        if (aOffset[2] === undefined && bOffset[2] === undefined) return 0;\r\n                        if (parseInt(aOffset[2], 10) > parseInt(bOffset[2], 10)) return 1;\r\n                        if (parseInt(aOffset[2], 10) < parseInt(bOffset[1], 10)) return -1;\r\n                        return 0;\r\n                    });\r\n                }\r\n                if (changes.dbs) {\r\n                    native.dbs = newParts.dbs;\r\n                }\r\n                if (changes.inputs) {\r\n                    native.inputs = newParts.inputs;\r\n                }\r\n                if (changes.outputs) {\r\n                    native.outputs = newParts.outputs;\r\n                }\r\n                if (changes.markers) {\r\n                    native.markers = newParts.markers;\r\n                }\r\n                console.log(native);\r\n                //this.props.changeNative(native);\r\n            }, 200);\r\n        };\r\n\r\n        reader.readAsText(e[0], 'ISO-8859-1');\r\n    }\r\n}\r\n\r\nOptions.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default withStyles(styles)(Options);\r\n","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport { tsv2json, json2tsv } from 'tsv-json';\r\nimport { useSnackbar } from 'notistack';\r\nimport AceEditor from \"react-ace\";\r\nimport copy from 'copy-to-clipboard';\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport SaveIcon from '@material-ui/icons/Save';\r\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\r\n\r\nconst styles = theme => ({\r\n    tsvEditor: {\r\n        width: '100%',\r\n        height: 400\r\n    },\r\n    tsvEditorTextarea: {\r\n        fontFamily: 'monospace'\r\n    }\r\n});\r\n\r\nconst TsvDialog = props => {\r\n    const [tsv, setTsv] = useState('');\r\n    useEffect(() => {\r\n        let tsvResult = [];\r\n        tsvResult.push(props.fields.map(field => field.name));\r\n        props.data.forEach(item =>\r\n            tsvResult.push(props.fields.map(field => item[field.name] !== undefined && item[field.name] !== null ? item[field.name].toString() : ''))\r\n        );\r\n        setTsv(json2tsv(tsvResult));\r\n    }, [props.open]); // eslint-disable-line react-hooks/exhaustive-deps\r\n    const { enqueueSnackbar } = useSnackbar();\r\n\r\n    if (!props.open) {\r\n        return null;\r\n    }\r\n\r\n    const saveTsv = () => {\r\n        let data = tsv2json(tsv);\r\n        let fields = data.shift();\r\n        let success = true;\r\n        let errors = [];\r\n        for (let index in props.fields) {\r\n            if (props.fields[index].name !== fields[index]) {\r\n                errors.push(<>No field <i>{props.fields[index].name}</i> in position <i>{parseInt(index) + 1}</i>!</>);\r\n                success = false;\r\n            }\r\n        }\r\n\r\n        data = data.map((itemValues, itemIndex) => {\r\n            let item = {};\r\n            for (let index in props.fields) {\r\n                if (props.fields[index].type === 'select' && !props.fields[index].options.map(option => option.value).includes(itemValues[index])) {\r\n                    errors.push(<>Value <i>{itemValues[index]}</i> is wrong for field <i>{props.fields[index].name}</i> in position <i>{parseInt(itemIndex) + 1}</i>!</>);\r\n                    success = false;\r\n                }\r\n                if (props.fields[index].type === 'checkbox') {\r\n                    itemValues[index] = itemValues[index] === 'true';\r\n                }\r\n                item[props.fields[index].name] = itemValues[index];\r\n            }\r\n            return item;\r\n        });\r\n\r\n        if (!success) {\r\n            enqueueSnackbar(<div>{errors.map((error, index) => <div key={index}>{error}</div>)}</div>, { variant: 'error' });\r\n            return;\r\n        }\r\n        props.save(data);\r\n        props.onClose();\r\n    };\r\n\r\n    return <Dialog\r\n        open={props.open}\r\n        onClose={props.onClose}\r\n        maxWidth=\"lg\"\r\n        fullWidth\r\n    >\r\n        <DialogTitle>{I18n.t('Edit data as TSV')}</DialogTitle>\r\n        <DialogContent>\r\n            <DialogContentText>{I18n.t('You can copy, paste and edit data as TSV.')}</DialogContentText>\r\n            <div>\r\n                <AceEditor\r\n                    onChange={e => setTsv(e)}\r\n                    height=\"400px\"\r\n                    showPrintMargin={false}\r\n                    value={tsv}\r\n                    className={props.classes.tsvEditor}\r\n                    width=\"100%\"\r\n                    setOptions={{firstLineNumber: 0}}\r\n                    mode={null}\r\n                />\r\n            </div>\r\n        </DialogContent>\r\n        <DialogActions>\r\n            <Button variant=\"outlined\" color=\"primary\" onClick={() => {\r\n                //Utils.copyToClipboard(tsv);\r\n                copy(tsv);\r\n                enqueueSnackbar(I18n.t('TSV was copied to clipboard'));\r\n            }} startIcon={<FileCopyIcon />}>{I18n.t('Copy to clipboard')}</Button>\r\n            <Button variant=\"contained\" color=\"primary\" onClick={saveTsv} startIcon={<SaveIcon />}>{I18n.t('Import')}</Button>\r\n            <Button variant=\"contained\" onClick={props.onClose} startIcon={<ClearIcon />}>{I18n.t('Close')}</Button>\r\n        </DialogActions>\r\n    </Dialog>\r\n};\r\n\r\nTsvDialog.propTypes = {\r\n    open: PropTypes.bool,\r\n    onClose: PropTypes.func,\r\n    classes: PropTypes.object,\r\n    save: PropTypes.func,\r\n    fields: PropTypes.array,\r\n    data: PropTypes.array\r\n};\r\n\r\nexport default withStyles(styles)(TsvDialog);","import PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteAllDialog = (props) => {\r\n    return props.open ? <Dialog open={props.open} onClose={props.onClose}>\r\n        <DialogTitle>{I18n.t('Delete all items')}</DialogTitle>\r\n        <DialogContent>\r\n            <DialogContentText>{I18n.t('Are you sure to delete all items?')}</DialogContentText>\r\n            <DialogActions>\r\n                <Button variant=\"contained\" color=\"secondary\" startIcon={<DeleteIcon />} onClick={() => {\r\n                    props.action();\r\n                    props.onClose();\r\n                }}>{I18n.t('Delete all items')}</Button>\r\n                <Button variant=\"contained\" onClick={props.onClose} startIcon={<ClearIcon />}>{I18n.t('Cancel')}</Button>\r\n            </DialogActions>\r\n        </DialogContent>\r\n    </Dialog> : null;\r\n}\r\n\r\nDeleteAllDialog.propTypes = {\r\n    open: PropTypes.bool,\r\n    action: PropTypes.func,\r\n    onClose: PropTypes.func,\r\n    classes: PropTypes.object,\r\n}\r\n\r\nexport default DeleteAllDialog;","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteDialog = (props) => {\r\n    const [disableWarnings, setDisableWarnings] = useState(false);\r\n    useEffect(() => {\r\n        setDisableWarnings(false);\r\n    }, [props.open]);\r\n\r\n    return props.open ? <Dialog open={props.open} onClose={props.onClose}>\r\n        <DialogTitle>{I18n.t('Delete item')}</DialogTitle>\r\n        <DialogContent>\r\n            <DialogContentText>{I18n.t('Are you sure to delete item with address \"%s\"?', props.item._address)}</DialogContentText>\r\n            <DialogContentText><FormControlLabel\r\n                label={I18n.t('Don\\'t show this message in 5 minutes')}\r\n                control={<Checkbox\r\n                    checked={disableWarnings}\r\n                    onChange={e => setDisableWarnings(e.target.checked)}\r\n            />}/></DialogContentText>\r\n            <DialogActions>\r\n                <Button variant=\"contained\" color=\"secondary\" startIcon={<DeleteIcon />} onClick={() => {\r\n                    props.action(disableWarnings);\r\n                    props.onClose();\r\n                }}>{I18n.t('Delete')}</Button>\r\n                <Button variant=\"contained\" onClick={props.onClose} startIcon={<ClearIcon />}>{I18n.t('Cancel')}</Button>\r\n            </DialogActions>\r\n        </DialogContent>\r\n    </Dialog> : null;\r\n}\r\n\r\nDeleteDialog.propTypes = {\r\n    open: PropTypes.bool,\r\n    onClose: PropTypes.func,\r\n    classes: PropTypes.object,\r\n    action: PropTypes.func,\r\n    item: PropTypes.object,\r\n}\r\n\r\nexport default DeleteDialog;","import { useState, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Table from '@material-ui/core/Table';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport TableSortLabel from '@material-ui/core/TableSortLabel';\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport AddIcon from '@material-ui/icons/Add';\r\nimport ImportExport from '@material-ui/icons/ImportExport';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nimport ExpertIcon from '@iobroker/adapter-react/icons/IconExpert';\r\nimport TextWithIcon from '@iobroker/adapter-react/Components/TextWithIcon';\r\nimport SelectWithIcon from '@iobroker/adapter-react/Components/SelectWithIcon';\r\n\r\nimport TsvDialog from './TsvDialog';\r\nimport DeleteAllDialog from './DeleteAllDialog';\r\nimport DeleteDialog from './DeleteDialog';\r\n\r\nconst styles = theme => ({\r\n    tableHeader: {\r\n        whiteSpace: 'nowrap',\r\n        fontWeight: 'bold',\r\n        fontSize: '80%',\r\n        padding: '0px 8px'\r\n    },\r\n    tableHeaderExtended: {\r\n        color: theme.palette.type === 'dark' ? theme.palette.primary.light : theme.palette.primary.dark\r\n    },\r\n    tableCell: {\r\n        whiteSpace: 'nowrap',\r\n        fontSize: '80%',\r\n        padding: '0px 8px'\r\n    },\r\n    tableContainer: {\r\n        overflow: 'auto',\r\n        maxHeight: 'calc(100vh - 180px)'\r\n    },\r\n    tableTextField: {\r\n        fontSize: '80%'\r\n    },\r\n    tableSelect: {\r\n        fontSize: '80%'\r\n    },\r\n    tableTextFieldContainer: {\r\n        width: '100%'\r\n    },\r\n    tableSelectContainer: {\r\n        width: '100%'\r\n    },\r\n    nonEditMode: {\r\n        cursor: 'pointer'\r\n    }\r\n});\r\n\r\nconst DataCell = props => {\r\n    const sortedItem = props.sortedItem;\r\n    const field = props.field;\r\n    const editMode = props.editMode;\r\n    const setEditMode = props.setEditMode;\r\n\r\n    const ref = useRef();\r\n    /*useEffect(() => {\r\n         if (props.editMode) {\r\n             // ref.current && ref.current.focus()\r\n             //window.setTimeout(() => ref.current && ref.current.focus(), 1000);\r\n         }\r\n    }, [props.editMode])*/\r\n\r\n    let item = sortedItem.item;\r\n    let result;\r\n    if (field.type === 'checkbox') {\r\n        result = <Tooltip title={I18n.t(field.title)}>\r\n            <Checkbox\r\n                inputRef={ref}\r\n                className={props.classes.tableCheckbox}\r\n                checked={!!item[field.name]}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n                onChange={e => props.changeParam(sortedItem.$index, field.name, e.target.checked)}\r\n            />\r\n        </Tooltip>;\r\n    } else if (field.type === 'rooms') {\r\n        if (!editMode) {\r\n            result = <TextWithIcon list={props.rooms} value={item[field.name]} themeType={props.themeType}/>;\r\n        } else {\r\n            result = <SelectWithIcon\r\n                list={props.rooms}\r\n                allowNone={true}\r\n                value={item[field.name]}\r\n                dense={true}\r\n                themeType={props.themeType}\r\n                inputProps={{ref, className: props.classes.tableSelect}}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n                onChange={value => props.changeParam(sortedItem.$index, field.name, value)}\r\n                className={props.classes.tableSelectContainer}\r\n            />;\r\n        }\r\n    } else if (field.type === 'select') {\r\n        if (!editMode) {\r\n            let option = field.options.find(option => option.value === item[field.name]);\r\n            result = option ? option.title : '';\r\n        } else {\r\n            result = <Select\r\n                value={item[field.name]}\r\n                inputProps={{ref, className: props.classes.tableSelect}}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n                onChange={e => props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n                className={props.classes.tableSelectContainer}\r\n            >\r\n                {field.options.map(option =>\r\n                    <MenuItem key={option.value} value={option.value}>{option.title ? option.title : <i>{I18n.t('Nothing')}</i>}</MenuItem>\r\n                )}\r\n            </Select>;\r\n        }\r\n    } else {\r\n        if (!editMode) {\r\n            result = item[field.name] ? item[field.name] : null;\r\n        } else {\r\n            result = <TextField value={item[field.name]} className={props.classes.tableTextFieldContainer}\r\n                inputProps={{ref: ref, className: props.classes.tableTextField}}\r\n                type={field.type}\r\n                onChange={e => props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n            />;\r\n        }\r\n    }\r\n\r\n    return <TableCell\r\n        className={Utils.clsx(props.classes.tableCell, !editMode && props.classes.nonEditMode)}\r\n        onClick={e => {\r\n            setEditMode(true);\r\n            window.localStorage.setItem('Modbus.editMode', 'true');\r\n            window.setTimeout(() => ref.current && ref.current.focus(), 100);\r\n        }}\r\n    >\r\n        {result}\r\n    </TableCell>;\r\n}\r\n\r\nconst RegisterTable = props => {\r\n    const [tsvDialogOpen, setTsvDialogOpen] = useState(false);\r\n    const [editMode, setEditMode] = useState(parseInt(window.localStorage.getItem('Modbus.editMode'), 10) || 0);\r\n    const [extendedMode, setExtendedMode] = useState(window.localStorage.getItem('Modbus.extendedMode') === 'true');\r\n    const [deleteAllDialog, setDeleteAllDialog] = useState({\r\n        open: false,\r\n        action: null,\r\n    });\r\n    const [deleteDialog, setDeleteDialog] = useState({\r\n        open: false,\r\n        item: null,\r\n        action: null,\r\n    });\r\n\r\n    let sortedData = props.getSortedData(props.data, props.orderBy, props.order);\r\n\r\n    return <div>\r\n        <div>\r\n            <Tooltip title={I18n.t('Add line')}>\r\n                <IconButton onClick={e => props.addItem()}>\r\n                    <AddIcon/>\r\n                </IconButton>\r\n            </Tooltip>\r\n            <Tooltip title={I18n.t('Edit as TSV (Tab separated values)')}>\r\n                <IconButton onClick={() => setTsvDialogOpen(true)}>\r\n                    <ImportExport/>\r\n                </IconButton>\r\n            </Tooltip>\r\n            <Tooltip title={I18n.t('Toggle extended mode')}>\r\n                <IconButton\r\n                    color={extendedMode ? 'primary' : 'inherit'}\r\n                    onClick={() => {\r\n                        window.localStorage.setItem('Modbus.extendedMode', extendedMode ? 'false' : 'true');\r\n                        setExtendedMode(!extendedMode);\r\n                    }}>\r\n                    <ExpertIcon/>\r\n                </IconButton>\r\n            </Tooltip>\r\n        </div>\r\n        <div className={props.classes.tableContainer}>\r\n            <Table size=\"small\"\r\n                   stickyHeader\r\n                   padding=\"none\"\r\n            >\r\n                <TableHead>\r\n                    <TableRow>\r\n                        {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field => {\r\n                            let isChecked = false;\r\n                            let indeterminate = false;\r\n                            let trueFound = false;\r\n                            let falseFound = false;\r\n                            for (let k in props.data) {\r\n                                if (props.data[k][field.name]) {\r\n                                    isChecked = true;\r\n                                    trueFound = true;\r\n                                } else {\r\n                                    isChecked = false;\r\n                                    falseFound = true;\r\n                                }\r\n\r\n                                if (trueFound && falseFound) {\r\n                                    indeterminate = true;\r\n                                    isChecked = false;\r\n                                    break;\r\n                                }\r\n                            }\r\n\r\n                            return <TableCell\r\n                                key={field.name}\r\n                                style={{width: field.type === 'checkbox' ? 20 : field.width}}\r\n                                className={Utils.clsx(props.classes.tableHeader, field.expert && props.classes.tableHeaderExtended)}\r\n                                title={field.tooltip ? I18n.t(field.tooltip) : null}\r\n                            >\r\n                                {field.type === 'checkbox' ?\r\n                                    <Tooltip title={I18n.t('Change all')}>\r\n                                        <Checkbox\r\n                                            indeterminate={indeterminate}\r\n                                            checked={isChecked}\r\n                                            onChange={e => {\r\n                                                let newData = JSON.parse(JSON.stringify(props.data));\r\n                                                newData.forEach(item =>\r\n                                                    item[field.name] = e.target.checked);\r\n                                                props.changeData(newData);\r\n                                            }}\r\n                                        />\r\n                                    </Tooltip>\r\n                                    : null}\r\n                                {field.sorted ? <TableSortLabel\r\n                                    active={field.name === props.orderBy}\r\n                                    direction={props.order}\r\n                                    onClick={e => {\r\n                                        const isAsc = props.orderBy === field.name && props.order === 'asc';\r\n                                        props.onChangeOrder(field.name, isAsc ? 'desc' : 'asc');\r\n                                    }}\r\n                                >{I18n.t(field.title)}</TableSortLabel> : I18n.t(field.title)}\r\n                            </TableCell>\r\n                        })}\r\n                        <TableCell>\r\n                            <Tooltip title={I18n.t('Delete all')}>\r\n                                <div>\r\n                                    <IconButton\r\n                                        size=\"small\"\r\n                                        onClick={e => setDeleteAllDialog({\r\n                                            open: true,\r\n                                            action: () => props.changeData([]),\r\n                                        })}\r\n                                        disabled={!props.data.length}\r\n                                    >\r\n                                        <DeleteIcon/>\r\n                                    </IconButton>\r\n                                </div>\r\n                            </Tooltip>\r\n                        </TableCell>\r\n                    </TableRow>\r\n                </TableHead>\r\n                <TableBody>\r\n                    {\r\n                        sortedData.map(sortedItem =>\r\n                            <TableRow hover key={sortedItem.$index}>\r\n                                {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field =>\r\n                                    <DataCell\r\n                                        key={field.name}\r\n                                        themeType={props.themeType}\r\n                                        sortedItem={sortedItem}\r\n                                        field={field}\r\n                                        editMode={editMode === sortedItem.$index}\r\n                                        rooms={props.rooms}\r\n                                        setEditMode={() => setEditMode(sortedItem.$index)}\r\n                                        {...props}\r\n                                    />\r\n                                )}\r\n                                <TableCell>\r\n                                    <Tooltip title={I18n.t('Delete')}>\r\n                                        <div>\r\n                                            <IconButton size=\"small\" onClick={e => {\r\n                                                let lastTime = window.sessionStorage.getItem('disableDeleteDialogs');\r\n                                                if (lastTime && (new Date() - new Date(lastTime)) < 1000 * 60 * 5) {\r\n                                                    props.deleteItem(sortedItem.$index);\r\n                                                    return;\r\n                                                }\r\n                                                setDeleteDialog({\r\n                                                    open: true,\r\n                                                    action: disableDialogs => {\r\n                                                        if (disableDialogs) {\r\n                                                            window.sessionStorage.setItem('disableDeleteDialogs', (new Date()).toISOString());\r\n                                                        }\r\n                                                        props.deleteItem(sortedItem.$index);\r\n                                                    },\r\n                                                    item: sortedItem.item\r\n                                                })\r\n                                            }}>\r\n                                                <DeleteIcon/>\r\n                                            </IconButton>\r\n                                        </div>\r\n                                    </Tooltip>\r\n                                </TableCell>\r\n                            </TableRow>\r\n                        )\r\n                    }\r\n                </TableBody>\r\n            </Table>\r\n        </div>\r\n        {tsvDialogOpen ?\r\n            <TsvDialog\r\n                open={true}\r\n                save={data => {\r\n                    if (props.prefix) {\r\n                        data.forEach(line => {\r\n                            line.Address = (line.Address || '').toUpperCase();\r\n                            if (line.Address && !line.Address.startsWith(props.prefix)) {\r\n                                line.Address = props.prefix + line.Address;\r\n                            }\r\n                        });\r\n                    }\r\n                    props.changeData(data);\r\n                }}\r\n                onClose={() => setTsvDialogOpen(false)}\r\n                data={props.data}\r\n                fields={props.fields}\r\n            /> : null\r\n        }\r\n        <DeleteAllDialog\r\n            open={deleteAllDialog.open}\r\n            action={deleteAllDialog.action}\r\n            onClose={() => setDeleteAllDialog({\r\n                open: false,\r\n                action: null,\r\n            })}\r\n        />\r\n        <DeleteDialog\r\n            open={deleteDialog.open}\r\n            action={deleteDialog.action}\r\n            onClose={() => setDeleteDialog({\r\n                open: false,\r\n                action: null,\r\n                item: null\r\n            })}\r\n            item={deleteDialog.item}\r\n        />\r\n    </div>;\r\n}\r\n\r\nRegisterTable.propTypes = {\r\n    data: PropTypes.array,\r\n    fields: PropTypes.array,\r\n    classes: PropTypes.object,\r\n    addItem: PropTypes.func,\r\n    changeData: PropTypes.func,\r\n    deleteItem: PropTypes.func,\r\n    rooms: PropTypes.object,\r\n    formulaDisabled: PropTypes.bool,\r\n    getSortedData: PropTypes.func,\r\n    themeType: PropTypes.string,\r\n    prefix: PropTypes.string,\r\n};\r\n\r\nexport default withStyles(styles)(RegisterTable);","import {Component} from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Paper from '@material-ui/core/Paper';\r\n\r\nimport roles from '../data/roles';\r\nimport types from '../data/types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport RegisterTable from '../Components/RegisterTable';\r\n\r\nclass BaseRegisters extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.nativeField = '';\r\n        this.state = {\r\n            order: window.localStorage.getItem('Modbus.order') || 'asc',\r\n            orderBy: window.localStorage.getItem('Modbus.orderBy') || 'Address',\r\n        };\r\n    }\r\n\r\n    getRooms() {\r\n        const lang = I18n.getLanguage();\r\n        return this.props.rooms ? Object.values(this.props.rooms).map(room => ({\r\n            value: room._id,\r\n            title: typeof room.common.name === 'object' ? room.common.name[lang] : room.common.name\r\n        })) : [];\r\n    }\r\n\r\n    getFields() {\r\n        let rooms = this.getRooms();\r\n        rooms.unshift({value: '', title: ''});\r\n\r\n        let result = [\r\n            {name: 'Address', title: 'Address', type: 'text', sorted: true, width: 20},\r\n            {name: 'Name', title: 'Name', type: 'text', sorted: true},\r\n            {name: 'Description', title: 'Description', type: 'text', sorted: true},\r\n            {name: 'Type', title: 'Type', type: 'select', options: types, sorted: true},\r\n            {name: 'Length', title: 'Length', type: 'text', width: 20},\r\n            {name: 'Unit', title: 'Unit', type: 'text', width: 30},\r\n            {name: 'Role', title: 'Role', type: 'select', options: roles, sorted: true},\r\n            {name: 'Room', title: 'Room', type: 'rooms', options: rooms, sorted: true},\r\n            {name: 'poll', title: 'Poll', type: 'checkbox'},\r\n            {name: 'RW', title: 'RW', type: 'checkbox', expert: true},\r\n            {name: 'WP', title: 'WP', type: 'checkbox', expert: true},\r\n        ]\r\n\r\n        if (this.props.native.params.multiDeviceId) {\r\n            result.splice(1, 0,\r\n                {name: 'deviceId', title: 'Slave ID', type: 'number', sorted: true, width: 20},\r\n            );\r\n        }\r\n\r\n        return result;\r\n    }\r\n\r\n    address2struct(address) {\r\n        if (this.nativeField === 'dbs') {\r\n            const parts = address.split(' ');\r\n            const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);\r\n            if (parts[1] && parts[1].includes('.')) {\r\n                const a = parseFloat(parts[1]);\r\n                return {db, byte: Math.floor(a), bit: (a * 10) % 10};\r\n            } else {\r\n                return {db, byte: parseInt(parts[1], 10)};\r\n            }\r\n        } else {\r\n            if (address.includes('.')) {\r\n                const a = parseFloat(address);\r\n                return {byte: Math.floor(a), bit: (a * 10) % 10};\r\n            } else {\r\n                return {byte: parseInt(address, 10)};\r\n            }\r\n        }\r\n    }\r\n\r\n    struct2address(struct) {\r\n        if (struct.db !== undefined) {\r\n            if (struct.bit !== undefined) {\r\n                return 'DB' + struct.db + ' ' + struct.byte + '.' + struct.bit;\r\n            } else  {\r\n                return 'DB' + struct.db + ' ' + struct.byte;\r\n            }\r\n        } else if (struct.bit !== undefined) {\r\n            return struct.byte + '.' + struct.bit;\r\n        } else  {\r\n            return struct.byte;\r\n        }\r\n    }\r\n\r\n    changeParam = (index, name, value) => {\r\n        let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n        data[index][name] = value;\r\n        if (name === 'Type') {\r\n            if (['BOOL'].includes(value)) {\r\n                data[index].Length = 0.1;\r\n            } else\r\n            if (['', 'BYTE'].includes(value)) {\r\n                data[index].Length = 1;\r\n            } else\r\n            if (['WORD', 'INT', 'STRING', 'S5TIME'].includes(value)) {\r\n                data[index].Length = 2;\r\n            } else\r\n            if (['DWORD', 'DINT', 'REAL'].includes(value)) {\r\n                data[index].Length = 4;\r\n            } else\r\n            if (['S7TIME'].includes(value)) {\r\n                data[index].Length = 8;\r\n            } else\r\n            if (['S7STRING', 'ARRAY'].includes(value)) {\r\n                data[index].Length = 32;\r\n            }\r\n\r\n            if (value === 'BOOL') {\r\n                const struct = this.address2struct(data[index].Address);\r\n                if (struct.bit === undefined) {\r\n                    struct.bit = 0;\r\n                    data[index].Address = this.struct2address(struct);\r\n                }\r\n            } else {\r\n                const struct = this.address2struct(data[index].Address);\r\n                if (struct.bit !== undefined) {\r\n                    if (struct.bit > 0) {\r\n                        struct.byte++;\r\n                    }\r\n                    delete struct.bit;\r\n\r\n                    data[index].Address = this.struct2address(struct);\r\n                }\r\n            }\r\n        }\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    addItem = () => {\r\n        let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n        let newItem = {}\r\n        this.getFields().forEach(field => newItem[field.name] = '')\r\n        if (data.length) {\r\n            let sortedData = JSON.parse(JSON.stringify(data));\r\n            sortedData.sort((item1, item2) => item1.Address > item2.Address ? 1 : -1);\r\n            let lastItem = sortedData[sortedData.length - 1];\r\n            const struct = this.address2struct(lastItem.Address);\r\n            if (lastItem.Type === 'BOOL') {\r\n                struct.bit = struct.bit || 0;\r\n                struct.bit++;\r\n                if (struct.bit >= 8) {\r\n                    struct.bit = struct.bit % 8;\r\n                    struct.byte++;\r\n                }\r\n            } else {\r\n                delete struct.bit;\r\n                struct.byte += lastItem.Length;\r\n            }\r\n\r\n            if (struct.db !== undefined && struct.byte + lastItem.Length > 0xFFFF) {\r\n                struct.db++;\r\n                struct.byte = 0;\r\n                if (lastItem.Type === 'BOOL') {\r\n                    struct.bit = 0;\r\n                }\r\n            }\r\n\r\n            newItem.Address = this.struct2address(struct);\r\n            newItem.Type = lastItem.Type;\r\n            newItem.Length = lastItem.Length;\r\n            newItem.Unit = lastItem.Unit;\r\n            newItem.Role = lastItem.Role;\r\n            newItem.Room = lastItem.Room;\r\n            newItem.poll = lastItem.poll;\r\n            newItem.RW = lastItem.RW;\r\n            newItem.WP = lastItem.WP;\r\n        } else {\r\n            newItem.role = 'level';\r\n            newItem.Type = 'BOOL';\r\n            newItem.Length = '0.1';\r\n            newItem.poll = true;\r\n            if (this.nativeField === 'dbs') {\r\n                newItem.Address = 'DB1 0.0';\r\n            } else {\r\n                newItem.Address = '0.0';\r\n            }\r\n        }\r\n        data.push(newItem);\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    deleteItem = (index) => {\r\n        let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n        data.splice(index, 1);\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    changeData = (data) => {\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    getDisable = (index, name) => {\r\n        return name === 'Length' &&\r\n            !['STRING', 'S7STRING', 'ARRAY'].includes(this.props.native[this.nativeField][index].type);\r\n    }\r\n\r\n    getSortedData = (data, orderBy, order) => {\r\n        this.fields = this.fields || this.getFields();\r\n\r\n        data = data || this.props.native[this.nativeField];\r\n        orderBy = orderBy || this.state.orderBy;\r\n        order = order || this.state.order;\r\n        let sortedData = [];\r\n        data.forEach((item, index) => {sortedData[index] = {item, $index: index}});\r\n        const field = this.fields.find(item => item.name === orderBy);\r\n\r\n        sortedData.sort((sortedItem1, sortedItem2) => {\r\n            let sort1;\r\n            let sort2;\r\n            if (orderBy === 'Address') {\r\n                const a1 = this.address2struct(sortedItem1.item.Address);\r\n                const a2 = this.address2struct(sortedItem2.item.Address);\r\n\r\n                sort1 = 0;\r\n                if (a1.db !== undefined) {\r\n                    sort1 = a1.db << 24;\r\n                }\r\n                if (a2.db !== undefined) {\r\n                    sort2 = a2.db << 24;\r\n                }\r\n                sort1 |= a1.byte << 8;\r\n                sort2 |= a2.byte << 8;\r\n                sort1 |= a1.bit || 0;\r\n                sort2 |= a2.bit || 0;\r\n            } else if (orderBy === '$index') {\r\n                sort1 = sortedItem1[orderBy];\r\n                sort2 = sortedItem2[orderBy];\r\n            } else if (field && field.type === 'number') {\r\n                sort1 = parseInt(sortedItem1.item[orderBy], 10);\r\n                sort2 = parseInt(sortedItem2.item[orderBy], 10);\r\n            } else {\r\n                sort1 = sortedItem1.item[orderBy];\r\n                sort2 = sortedItem2.item[orderBy];\r\n            }\r\n            return (order === 'asc' ? sort1 > sort2 : sort1 < sort2) ? 1 : -1;\r\n        });\r\n\r\n        return sortedData;\r\n    }\r\n\r\n    render() {\r\n        this.fields = this.fields || this.getFields();\r\n\r\n        return <Paper>\r\n            <RegisterTable\r\n                prefix={this.nativeField === 'dbs' ? 'DB' : ''}\r\n                fields={this.fields}\r\n                getSortedData={this.getSortedData}\r\n                data={this.props.native[this.nativeField]}\r\n                changeParam={this.changeParam}\r\n                addItem={this.addItem}\r\n                deleteItem={this.deleteItem}\r\n                changeData={this.changeData}\r\n                getDisable={this.getDisable}\r\n                themeType={this.props.themeType}\r\n                rooms={this.props.rooms}\r\n                order={this.state.order}\r\n                orderBy={this.state.orderBy}\r\n                onChangeOrder={(orderBy, order) => {\r\n                    this.setState({orderBy, order});\r\n                    window.localStorage.setItem('Modbus.orderBy', orderBy);\r\n                    window.localStorage.setItem('Modbus.order', order);\r\n                }}\r\n            />\r\n        </Paper>\r\n    }\r\n}\r\n\r\nBaseRegisters.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n    themeType: PropTypes.string,\r\n};\r\n\r\nexport default BaseRegisters;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Inputs extends BaseRegisters {\r\n    nativeField = 'inputs'\r\n}\r\n\r\nInputs.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Inputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Outputs extends BaseRegisters {\r\n    nativeField = 'outputs'\r\n}\r\n\r\nOutputs.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Outputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Marker extends BaseRegisters {\r\n    nativeField = 'markers'\r\n}\r\n\r\nMarker.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Marker;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Dbs extends BaseRegisters {\r\n    nativeField = 'dbs';\r\n}\r\n\r\nDbs.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Dbs;\r\n","import React from 'react';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport { MuiThemeProvider } from '@material-ui/core/styles';\r\nimport { SnackbarProvider } from 'notistack';\r\n\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Tabs from '@material-ui/core/Tabs';\r\nimport Tab from '@material-ui/core/Tab';\r\n\r\nimport GenericApp from '@iobroker/adapter-react/GenericApp';\r\nimport Loader from '@iobroker/adapter-react/Components/Loader'\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport TabOptions from './Tabs/Options';\r\nimport TabInputs from './Tabs/Inputs';\r\nimport TabOutputs from './Tabs/Outputs';\r\nimport TabMarker from './Tabs/Marker';\r\nimport TabDbs from './Tabs/DBs';\r\n\r\nconst styles = theme => ({\r\n    root: {},\r\n    tabContent: {\r\n        padding: 10,\r\n        height: 'calc(100% - 64px - 48px - 20px)',\r\n        overflow: 'auto',\r\n    },\r\n    tabContentIFrame: {\r\n        padding: 10,\r\n        height: 'calc(100% - 64px - 48px - 20px - 38px)',\r\n        overflow: 'auto'\r\n    },\r\n    tab: {\r\n        width: '100%',\r\n        minHeight: '100%'\r\n    }\r\n});\r\n\r\nconst tabs = [\r\n    {\r\n        name: 'general',\r\n        title: 'General',\r\n        component: TabOptions,\r\n    },\r\n    {\r\n        name: 'inputs',\r\n        title: 'Inputs',\r\n        component: TabInputs,\r\n    },\r\n    {\r\n        name: 'outputs',\r\n        title: 'Outputs',\r\n        component: TabOutputs,\r\n    },\r\n    {\r\n        name: 'marker',\r\n        title: 'Marker',\r\n        component: TabMarker,\r\n    },\r\n    {\r\n        name: 'dbs',\r\n        title: 'DBs',\r\n        component: TabDbs,\r\n    },\r\n]\r\n\r\nclass App extends GenericApp {\r\n    constructor(props) {\r\n        const extendedProps = {...props};\r\n        extendedProps.encryptedFields = ['pass'];\r\n\r\n        extendedProps.translations = {\r\n            'en': require('./i18n/en'),\r\n            'de': require('./i18n/de'),\r\n            'ru': require('./i18n/ru'),\r\n            'pt': require('./i18n/pt'),\r\n            'nl': require('./i18n/nl'),\r\n            'fr': require('./i18n/fr'),\r\n            'it': require('./i18n/it'),\r\n            'es': require('./i18n/es'),\r\n            'pl': require('./i18n/pl'),\r\n            'zh-cn': require('./i18n/zh-cn'),\r\n        };\r\n\r\n        super(props, extendedProps);\r\n        this.state.moreLoaded = false;\r\n        this.state.rooms = null;\r\n    }\r\n\r\n    onConnectionReady() {\r\n        super.onConnectionReady()\r\n        this.socket.getForeignObjects('enum.rooms.*', 'enum')\r\n            .then(rooms =>\r\n                this.setState({moreLoaded: true, rooms}));\r\n    }\r\n\r\n    getSelectedTab() {\r\n        const selectedTab = this.state.selectedTab;\r\n        if (!selectedTab) {\r\n            return 0;\r\n        } else {\r\n            return tabs.findIndex(tab => tab.name === selectedTab);\r\n        }\r\n    }\r\n\r\n    render() {\r\n        if (!this.state.loaded || !this.state.moreLoaded) {\r\n            return <MuiThemeProvider theme={this.state.theme}>\r\n                <Loader theme={this.state.themeType} />\r\n            </MuiThemeProvider>;\r\n        }\r\n\r\n        return <MuiThemeProvider theme={this.state.theme}>\r\n            <SnackbarProvider>\r\n                <div className=\"App\" style={{background: this.state.theme.palette.background.default, color: this.state.theme.palette.text.primary}}>\r\n                    <AppBar position=\"static\">\r\n                        <Tabs\r\n                            value={this.getSelectedTab()}\r\n                            onChange={(e, index) => this.selectTab(tabs[index].name, index)}\r\n                            variant=\"scrollable\" scrollButtons=\"auto\">\r\n                            {tabs.map(tab => <Tab\r\n                                label={tab.icon ? <>{tab.icon}{I18n.t(tab.title)}</> : I18n.t(tab.title)}\r\n                                data-name={tab.name}\r\n                                key={tab.name}\r\n                                title={tab.tooltip ? I18n.t(tab.tooltip) : undefined}\r\n                            />)}\r\n                        </Tabs>\r\n                    </AppBar>\r\n                    <div className={this.isIFrame ? this.props.classes.tabContentIFrame : this.props.classes.tabContent}>\r\n                        {tabs.map((tab, index) => {\r\n                            const TabComponent = tab.component;\r\n                            if (this.state.selectedTab) {\r\n                                if (this.state.selectedTab !== tab.name) {\r\n                                    return null;\r\n                                }\r\n                            } else {\r\n                                if (index !== 0) {\r\n                                    return null;\r\n                                }\r\n                            }\r\n                            return <TabComponent\r\n                                key={tab.name}\r\n                                themeType={this.state.themeType}\r\n                                common={this.common}\r\n                                socket={this.socket}\r\n                                native={this.state.native}\r\n                                onError={text => this.setState({errorText: (text || text === 0) && typeof text !== 'string' ? text.toString() : text})}\r\n                                onLoad={native => this.onLoadConfig(native)}\r\n                                instance={this.instance}\r\n                                adapterName={this.adapterName}\r\n                                changed={this.state.changed}\r\n                                onChange={(attr, value, cb) => this.updateNativeValue(attr, value, cb)}\r\n                                changeNative={value => this.setState({native: value, changed: this.getIsChanged(value)})}\r\n                                rooms={this.state.rooms}\r\n                            />\r\n                        })}\r\n                        {/*<pre>{JSON.stringify(this.state.native, null, 2)}</pre>*/}\r\n                    </div>\r\n                    {this.renderError()}\r\n                    {this.renderSaveCloseButtons()}\r\n                </div>\r\n            </SnackbarProvider>\r\n        </MuiThemeProvider>;\r\n    }\r\n}\r\n\r\nexport default withStyles(styles)(App);\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read http://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n  window.location.hostname === 'localhost' ||\r\n    // [::1] is the IPv6 localhost address.\r\n    window.location.hostname === '[::1]' ||\r\n    // 127.0.0.1/8 is considered localhost for IPv4.\r\n    window.location.hostname.match(\r\n      /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n    )\r\n);\r\n\r\nexport function register(config) {\r\n  if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n    // The URL constructor is available in all browsers that support SW.\r\n    const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n    if (publicUrl.origin !== window.location.origin) {\r\n      // Our service worker won't work if PUBLIC_URL is on a different origin\r\n      // from what our page is served on. This might happen if a CDN is used to\r\n      // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n      return;\r\n    }\r\n\r\n    window.addEventListener('load', () => {\r\n      const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n      if (isLocalhost) {\r\n        // This is running on localhost. Let's check if a service worker still exists or not.\r\n        checkValidServiceWorker(swUrl, config);\r\n\r\n        // Add some additional logging to localhost, pointing developers to the\r\n        // service worker/PWA documentation.\r\n        navigator.serviceWorker.ready.then(() => {\r\n          console.log(\r\n            'This web app is being served cache-first by a service ' +\r\n              'worker. To learn more, visit http://bit.ly/CRA-PWA'\r\n          );\r\n        });\r\n      } else {\r\n        // Is not localhost. Just register service worker\r\n        registerValidSW(swUrl, config);\r\n      }\r\n    });\r\n  }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n  navigator.serviceWorker\r\n    .register(swUrl)\r\n    .then(registration => {\r\n      registration.onupdatefound = () => {\r\n        const installingWorker = registration.installing;\r\n        if (installingWorker == null) {\r\n          return;\r\n        }\r\n        installingWorker.onstatechange = () => {\r\n          if (installingWorker.state === 'installed') {\r\n            if (navigator.serviceWorker.controller) {\r\n              // At this point, the updated precached content has been fetched,\r\n              // but the previous service worker will still serve the older\r\n              // content until all client tabs are closed.\r\n              console.log(\r\n                'New content is available and will be used when all ' +\r\n                  'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\r\n              );\r\n\r\n              // Execute callback\r\n              if (config && config.onUpdate) {\r\n                config.onUpdate(registration);\r\n              }\r\n            } else {\r\n              // At this point, everything has been precached.\r\n              // It's the perfect time to display a\r\n              // \"Content is cached for offline use.\" message.\r\n              console.log('Content is cached for offline use.');\r\n\r\n              // Execute callback\r\n              if (config && config.onSuccess) {\r\n                config.onSuccess(registration);\r\n              }\r\n            }\r\n          }\r\n        };\r\n      };\r\n    })\r\n    .catch(error => {\r\n      console.error('Error during service worker registration:', error);\r\n    });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n  // Check if the service worker can be found. If it can't reload the page.\r\n  fetch(swUrl)\r\n    .then(response => {\r\n      // Ensure service worker exists, and that we really are getting a JS file.\r\n      const contentType = response.headers.get('content-type');\r\n      if (\r\n        response.status === 404 ||\r\n        (contentType != null && contentType.indexOf('javascript') === -1)\r\n      ) {\r\n        // No service worker found. Probably a different app. Reload the page.\r\n        navigator.serviceWorker.ready.then(registration => {\r\n          registration.unregister().then(() => {\r\n            window.location.reload();\r\n          });\r\n        });\r\n      } else {\r\n        // Service worker found. Proceed as normal.\r\n        registerValidSW(swUrl, config);\r\n      }\r\n    })\r\n    .catch(() => {\r\n      console.log(\r\n        'No internet connection found. App is running in offline mode.'\r\n      );\r\n    });\r\n}\r\n\r\nexport function unregister() {\r\n  if ('serviceWorker' in navigator) {\r\n    navigator.serviceWorker.ready.then(registration => {\r\n      registration.unregister();\r\n    });\r\n  }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport * as Sentry from '@sentry/browser';\r\nimport * as SentryIntegrations from '@sentry/integrations';\r\nimport { MuiThemeProvider} from '@material-ui/core/styles';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport {version} from '../package.json';\r\nimport theme from '@iobroker/adapter-react/Theme';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nwindow.adapterName = 's7';\r\nlet themeName = Utils.getThemeName();\r\n\r\nconsole.log(`iobroker.${window.adapterName}@${version} using theme \"${themeName}\"`);\r\n\r\nfunction build() {\r\n    return ReactDOM.render(\r\n        <MuiThemeProvider theme={theme(themeName)}>\r\n            <App\r\n                onThemeChange={_theme => {\r\n                    themeName = _theme;\r\n                    build();\r\n                }}\r\n            />\r\n        </MuiThemeProvider>,\r\n        document.getElementById('root')\r\n    );\r\n}\r\n\r\nif (false && window.location.host !== 'localhost:3000') {\r\n    Sentry.init({\r\n        dsn: 'https://5ad729dbed504d15aa8bde423cae9a8e@sentry.iobroker.net/57',\r\n        release: `iobroker.${window.adapterName}@${version}`,\r\n        integrations: [\r\n            new SentryIntegrations.Dedupe()\r\n        ]\r\n    });\r\n}\r\n\r\nbuild();\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/admin/static/js/main.ce479555.chunk.js b/admin/static/js/main.ce479555.chunk.js
deleted file mode 100644
index 2d13eef..0000000
--- a/admin/static/js/main.ce479555.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[0],{311:function(e){e.exports=JSON.parse('[{"name":"ip","type":"text","title":"PLC IP Address"},{"name":"s7logo","type":"checkbox","title":"S7 LOGO!"},{"name":"rack","type":"text","title":"PLC Rack"},{"name":"slot","type":"text","title":"PLC Slot"},{"name":"localTSAP","type":"hex","title":"Local TSAP"},{"name":"remoteTSAP","type":"hex","title":"Remote TSAP"}]')},312:function(e){e.exports=JSON.parse('[{"name":"round","type":"number","title":"Round Real to"},{"name":"poll","type":"number","title":"Poll delay","dimension":"ms"},{"name":"recon","type":"number","title":"Reconnect time","dimension":"ms"},{"name":"pulsetime","type":"number","title":"Pulse time","dimension":"ms"},{"name":"timeFormat","type":"select","title":"S7 Time mode","options":[{"value":"","title":"Local time"},{"value":"utc","title":"UTC"},{"value":"summer","title":"Time offset (with day saving time)"},{"value":"offset","title":"Time offset (no day saving time)"}]},{"name":"timeOffset","type":"number","title":"Time offset","dimension":"minutes"}]')},315:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"value","title":"value"},{"value":"level","title":"level"},{"value":"state","title":"state"},{"value":"switch","title":"switch"},{"value":"value.temperature","title":"value.temperature"},{"value":"value.humidity","title":"value.humidity"},{"value":"value.brightness","title":"value.brightness"},{"value":"value.uv","title":"value.uv"},{"value":"value.pressure","title":"value.pressure"},{"value":"value.battery","title":"value.battery"},{"value":"value.valve","title":"value.valve"},{"value":"value.time","title":"value.time"},{"value":"value.interval","title":"value.interval"},{"value":"value.window","title":"value.window"},{"value":"button","title":"button"},{"value":"indicator","title":"indicator"},{"value":"level.dimmer","title":"level.dimmer"},{"value":"level.valve","title":"level.valve"},{"value":"level.blind","title":"level.blind"},{"value":"level.temperature","title":"level.temperature"},{"value":"level.interval","title":"level.interval"}]')},316:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"BOOL","title":"BOOL"},{"value":"BYTE","title":"BYTE"},{"value":"WORD","title":"WORD"},{"value":"DWORD","title":"DWORD"},{"value":"INT","title":"INT"},{"value":"DINT","title":"DINT"},{"value":"REAL","title":"REAL"},{"value":"S7STRING","title":"S7STRING"},{"value":"STRING","title":"STRING"},{"value":"ARRAY","title":"ARRAY"},{"value":"S5TIME","title":"S5TIME"},{"value":"S7TIME","title":"S7TIME"}]')},327:function(e){e.exports=JSON.parse('{"a":"1.3.4"}')},342:function(e,t,a){},407:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Local time","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Time offset (no day saving time)","Offset (with day saving time)":"Time offset (with day saving time)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Polling","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 Time mode","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Time offset","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Write access","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutes","poll":"poll","sec":"sec.","write as Pulse":"write as Pulse","Drag \'n\' drop file here, or click to select file":"Drag \'n\' drop file here, or click to select file","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Change all","Delete all":"Delete all","Edit as TSV (Tab separated values)":"Edit as TSV (Tab separated values)","Add line":"Add line","Delete":"Delete","Are you sure to delete item with address \\"%s\\"?":"Are you sure to delete item with address \\"%s\\"?","Don\'t show this message in 5 minutes":"Don\'t show this message in 5 minutes","Cancel":"Cancel","Delete all items":"Delete all items","Are you sure to delete all items?":"Are you sure to delete all items?","Edit mode":"Edit mode","Toggle extended mode":"Toggle extended mode","Edit data as TSV":"Edit data as TSV","You can copy, paste and edit data as TSV.":"You can copy, paste and edit data as TSV.","Copy to clipboard":"Copy to clipboard","Nothing":"Nothing","Delete item":"Delete item","Load symbols":"Load symbols","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack and slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV was copied to clipboard"}')},408:function(e){e.exports=JSON.parse('{"Add DB":"DB einf\xfcgen","Address":"Adresse","All entries will be deleted. Are you sure?":"Alle Eintr\xe4ge werden gel\xf6scht. Sind sie sicher?","Close":"Zumachen","Delete all entries":"Alle Eintr\xe4ge l\xf6schen","Description":"Beschreibung","Enable polling of data point":"Zyklische Abfrage vom Datenpunkt","Export":"Export","Export to CSV":"Export in CSV","General":"Allgemein","Import":"Importieren","Import DB file":"DB-Datei importieren","Import from CSV":"Import aus CSV","Import symbols file":"Symboldatei Importieren","Inputs":"Eing\xe4nge","Length":"L\xe4nge","Load Symbols":"Lade Symbole","Local TSAP":"Local TSAP","Local time":"Ortszeit","Marker":"Merker","Name":"Name","Offset (no day saving time)":"Zeit-Offset (kein Sommerzeit)","Offset (with day saving time)":"Zeit-Offset (mit Sommerzeit)","Outputs":"Ausg\xe4nge","PLC Connection":"SPS Verbindung","PLC IP Address":"SPS IP Adresse","PLC Rack":"SPS Rack","PLC Slot":"SPS Slot","Poll delay":"Poll delay","Polling":"Abfrage","Pulse time":"Pulsetime","RW":"RW","Reconnect time":"Reconnectzeit","Remote TSAP":"Remote TSAP","Role":"Rolle","Room":"Raum","Round Real to":"Aufrunden Real auf","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7-Zeitmodus","Text copied to clipboard. Click to close the window":"Text wurde in der Zwischenablage kopiert. Klick um Fenster zu zumachen.","Time offset":"Zeitverschiebung","Toggle RW":"RW umschalten","Toggle WP":"WP umschalten","Toggle poll":"Poll umschalten","Type":"Typ","UTC":"UTC","Unit":"Einheit","WP":"WP","Write access":"Schreibzugriff","Write access allowed":"Schreiben erlaubt","Write pulses (true=>false edge)":"Schreibe Pulse (Ja=>Nein Kante)","minutes":"Minuten","poll":"poll","sec":"Sek.","write as Pulse":"schreibe als Impuls","Drag \'n\' drop file here, or click to select file":"Die Datei hierher ziehen , oder klicken, um die Datei auszuw\xe4hlen","DBs":"DBs","ms":"ms","Poll":"Abfrage","Change all":"\xc4ndere Alles","Delete all":"Alles l\xf6schen","Edit as TSV (Tab separated values)":"Als TSV bearbeiten (Tabulatorgetrennte Werte)","Add line":"Zeile hinzuf\xfcgen","Delete":"L\xf6schen","Are you sure to delete item with address \\"%s\\"?":"M\xf6chten Sie den Artikel mit der Adresse \\"%s\\" wirklich l\xf6schen?","Don\'t show this message in 5 minutes":"Diese Nachricht nicht in 5\xa0Minuten anzeigen","Cancel":"Abbrechen","Delete all items":"Alle Elemente l\xf6schen","Are you sure to delete all items?":"M\xf6chten Sie wirklich alle Elemente l\xf6schen?","Edit mode":"Bearbeitungsmodus","Toggle extended mode":"Erweiterten Modus umschalten","Edit data as TSV":"Daten als TSV bearbeiten","You can copy, paste and edit data as TSV.":"Sie k\xf6nnen Daten als TSV kopieren, einf\xfcgen und bearbeiten.","Copy to clipboard":"In die Zwischenablage kopieren","Nothing":"Keins","Delete item":"Item l\xf6schen","Load symbols":"Symbole laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Verbindungstyp: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack und Steckplatz: [Rack * 0x20 + Steckplatz]","TSV was copied to clipboard":"TSV wurde in die Zwischenablage kopiert"}')},409:function(e){e.exports=JSON.parse('{"Add DB":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DB","Address":"\u0410\u0434\u0440\u0435\u0441","All entries will be deleted. Are you sure?":"\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b?","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Delete all entries":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Enable polling of data point":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435","Export":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","Export to CSV":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","General":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435","Import":"\u0418\u043f\u043c\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c","Import DB file":"\u0418\u043f\u043c\u043e\u0440\u0442 DB \u0444\u0430\u0439\u043b\u043e\u0432","Import from CSV":"\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 CSV","Import symbols file":"\u0418\u043f\u043c\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432","Inputs":"\u0412\u0445\u043e\u0434\u044b","Length":"Length","Load Symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Local TSAP":"Local TSAP","Local time":"\u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f","Marker":"\u041c\u0430\u0440\u043a\u0435\u0440\u044b","Name":"\u0418\u043c\u044f","Offset (no day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0431\u0435\u0437 \u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)","Offset (with day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u043b\u0435\u0442\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c)","Outputs":"\u0412\u044b\u0445\u043e\u0434\u044b","PLC Connection":"PLC \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","PLC IP Address":"PLC IP \u0430\u0434\u0440\u0435\u0441","PLC Rack":"PLC Rack","PLC Slot":"PLC \u0441\u043b\u043e\u0442","Poll delay":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u043f\u0440\u043e\u0441\u0430","Polling":"\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"\u0420\u043e\u043b\u044c","Room":"\u041a\u043e\u043c\u043d\u0430\u0442\u0430","Round Real to":"\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c real \u0434\u043e","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 \u0420\u0435\u0436\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Text copied to clipboard. Click to close the window":"\u0422\u0435\u043a\u0441\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u043a\u043e\u0439 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e","Time offset":"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Toggle RW":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c RW","Toggle WP":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c WP","Toggle poll":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c poll","Type":"\u0422\u0438\u043f","UTC":"UTC","Unit":"\u0415\u0434\u0438\u043d\u0438\u0446\u044b","WP":"WP","Write access":"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438","Write access allowed":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e","Write pulses (true=>false edge)":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b (1 => 0)","minutes":"\u043c\u0438\u043d\u0443\u0442\u044b","poll":"poll","sec":"\u0441\u0435\u043a.","write as Pulse":"\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a Pulse","Drag \'n\' drop file here, or click to select file":"\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b","DBs":"DBs","ms":"ms","Poll":"\u041e\u043f\u0440\u043e\u0441","Change all":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435","Delete all":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435","Edit as TSV (Tab separated values)":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a TSV (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0435\u0439)","Add line":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","Delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","Are you sure to delete item with address \\"%s\\"?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \\"%s\\"?","Don\'t show this message in 5 minutes":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 5 \u043c\u0438\u043d\u0443\u0442","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","Delete all items":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Are you sure to delete all items?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b?","Edit mode":"\u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Toggle extended mode":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c","Edit data as TSV":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV","You can copy, paste and edit data as TSV.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV.","Copy to clipboard":"\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430","Nothing":"\u041d\u0438\u0447\u0435\u0433\u043e","Delete item":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442","Load symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u0422\u0438\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u0421\u0442\u043e\u0439\u043a\u0430 \u0438 \u0441\u043b\u043e\u0442: [\u0421\u0442\u043e\u0439\u043a\u0430 * 0x20 + \u0441\u043b\u043e\u0442]","TSV was copied to clipboard":"TSV \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430"}')},410:function(e){e.exports=JSON.parse('{"Add DB":"Adicionar DB","Address":"Endere\xe7o","All entries will be deleted. Are you sure?":"Todas as entradas ser\xe3o exclu\xeddas. Voc\xea tem certeza?","Close":"Fechar","Delete all entries":"Eliminar todas as entradas","Description":"Descri\xe7\xe3o","Enable polling of data point":"Habilitar a vota\xe7\xe3o do ponto de dados","Export":"Exportar","Export to CSV":"Exportar para CSV","General":"Geral","Import":"Importar","Import DB file":"Importar arquivo DB","Import from CSV":"Importa\xe7\xe3o de CSV","Import symbols file":"Arquivo de s\xedmbolos de importa\xe7\xe3o","Inputs":"Entradas","Length":"comprimento","Load Symbols":"Carregar s\xedmbolos","Local TSAP":"TSAP local","Local time":"Hor\xe1rio local","Marker":"Marcador","Name":"Nome","Offset (no day saving time)":"Deslocamento (sem hor\xe1rio)","Offset (with day saving time)":"Offset (com tempo de economia de hora)","Outputs":"Sa\xeddas","PLC Connection":"Conex\xe3o do PLC","PLC IP Address":"Endere\xe7o IP do PLC","PLC Rack":"PLC Rack","PLC Slot":"Slot PLC","Poll delay":"Retardo de enquete","Polling":"Polling","Pulse time":"Tempo de pulso","RW":"RW","Reconnect time":"Reconectar o tempo","Remote TSAP":"TSAP remoto","Role":"Fun\xe7\xe3o","Room":"Quarto","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO !","S7 Time mode":"Modo de tempo S7","Text copied to clipboard. Click to close the window":"Texto copiado para a \xe1rea de transfer\xeancia. Clique para fechar a janela","Time offset":"Deslocamento de tempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Alternar pesquisa","Type":"Tipo","UTC":"UTC","Unit":"Unidade","WP":"WP","Write access":"Acesso de grava\xe7\xe3o","Write access allowed":"Acesso de acesso permitido","Write pulses (true=>false edge)":"Escrever pulsos (true => false edge)","minutes":"minutos","poll":"vota\xe7\xe3o","sec":"seg.","write as Pulse":"escreva como pulso","Drag \'n\' drop file here, or click to select file":"Arraste e solte o arquivo aqui ou clique para selecionar o arquivo","DBs":"DBs","ms":"ms","Poll":"Enquete","Change all":"Mude tudo","Delete all":"Apagar tudo","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabula\xe7\xe3o)","Add line":"Adicionar linha","Delete":"Excluir","Are you sure to delete item with address \\"%s\\"?":"Tem certeza de que deseja excluir o item com o endere\xe7o \\"%s\\"?","Don\'t show this message in 5 minutes":"N\xe3o mostre esta mensagem em 5 minutos","Cancel":"Cancelar","Delete all items":"Apagar todos os itens","Are you sure to delete all items?":"Tem certeza de que deseja excluir todos os itens?","Edit mode":"Modo de edi\xe7\xe3o","Toggle extended mode":"Alternar modo estendido","Edit data as TSV":"Editar dados como TSV","You can copy, paste and edit data as TSV.":"Voc\xea pode copiar, colar e editar dados como TSV.","Copy to clipboard":"Copiar para \xe1rea de transfer\xeancia","Nothing":"Nada","Delete item":"Apagar item","Load symbols":"S\xedmbolos de carga","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conex\xe3o: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 B\xe1sico","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV foi copiado para a \xe1rea de transfer\xeancia"}')},411:function(e){e.exports=JSON.parse('{"Add DB":"Voeg DB toe","Address":"Adres","All entries will be deleted. Are you sure?":"Alle inzendingen worden verwijderd. Weet je het zeker?","Close":"Dichtbij","Delete all entries":"Verwijder alle vermeldingen","Description":"Beschrijving","Enable polling of data point":"Polling van gegevenspunt inschakelen","Export":"Exporteren","Export to CSV":"Exporteren naar CSV","General":"Algemeen","Import":"Importeren","Import DB file":"DB-bestand importeren","Import from CSV":"Importeren vanuit CSV","Import symbols file":"Symboolbestand importeren","Inputs":"ingangen","Length":"Lengte","Load Symbols":"Laad symbolen","Local TSAP":"Lokale TSAP","Local time":"Lokale tijd","Marker":"Markeerstift","Name":"Naam","Offset (no day saving time)":"Offset (geen dagbesparende tijd)","Offset (with day saving time)":"Offset (met dagbesparende tijd)","Outputs":"uitgangen","PLC Connection":"PLC-verbinding","PLC IP Address":"PLC IP-adres","PLC Rack":"PLC Rack","PLC Slot":"PLC-slot","Poll delay":"Poll vertraging","Polling":"stemming","Pulse time":"Pulstijd","RW":"RW","Reconnect time":"Reconnect tijd","Remote TSAP":"TSAP op afstand","Role":"Rol","Room":"Kamer","Round Real to":"Rond echt naar","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tijdmodus","Text copied to clipboard. Click to close the window":"Tekst gekopieerd naar klembord. Klik om het venster te sluiten","Time offset":"Tijd offset","Toggle RW":"RW omschakelen","Toggle WP":"Wissel WP","Toggle poll":"Poll wisselen","Type":"Type","UTC":"UTC","Unit":"Eenheid","WP":"WP","Write access":"Schrijf toegang","Write access allowed":"Schrijftoegang toegestaan","Write pulses (true=>false edge)":"Schrijf pulsen (true => false edge)","minutes":"minuut","poll":"poll","sec":"seconde","write as Pulse":"schrijf als Pulse","Drag \'n\' drop file here, or click to select file":"Sleep het bestand hierheen, of klik om het bestand te selecteren","DBs":"DBs","ms":"ms","Poll":"Opiniepeiling","Change all":"Verander alles","Delete all":"Verwijder alles","Edit as TSV (Tab separated values)":"Bewerken als TSV (door tabs gescheiden waarden)","Add line":"Lijn toevoegen","Delete":"Verwijderen","Are you sure to delete item with address \\"%s\\"?":"Weet u zeker dat u het item met adres \\"%s\\" wilt verwijderen?","Don\'t show this message in 5 minutes":"Dit bericht niet binnen 5 minuten weergeven","Cancel":"annuleren","Delete all items":"Alle items verwijderen","Are you sure to delete all items?":"Weet je zeker dat je alle items wilt verwijderen?","Edit mode":"Bewerkingsmodus","Toggle extended mode":"Schakel uitgebreide modus in","Edit data as TSV":"Gegevens bewerken als TSV","You can copy, paste and edit data as TSV.":"U kunt gegevens kopi\xebren, plakken en bewerken als TSV.","Copy to clipboard":"Kopieer naar klembord","Nothing":"Niets","Delete item":"Verwijder item","Load symbols":"Symbolen laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Aansluittype: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rek en sleuf: [Rack * 0x20 + sleuf]","TSV was copied to clipboard":"TSV is gekopieerd naar het klembord"}')},412:function(e){e.exports=JSON.parse('{"Add DB":"Ajouter une DB","Address":"Adresse","All entries will be deleted. Are you sure?":"Toutes les entr\xe9es seront supprim\xe9es. \xcates-vous s\xfbr?","Close":"Fermer","Delete all entries":"Supprimer toutes les entr\xe9es","Description":"La description","Enable polling of data point":"Activer l\'interrogation du point de donn\xe9es","Export":"Exportation","Export to CSV":"Exporter au format CSV","General":"G\xe9n\xe9ral","Import":"Importer","Import DB file":"Importer un fichier DB","Import from CSV":"Importer \xe0 partir du fichier CSV","Import symbols file":"Importer un fichier de symboles","Inputs":"Contributions","Length":"Longueur","Load Symbols":"Charger des symboles","Local TSAP":"TSAP local","Local time":"Heure locale","Marker":"Marqueur","Name":"pr\xe9nom","Offset (no day saving time)":"D\xe9calage (pas de temps pour gagner du temps)","Offset (with day saving time)":"D\xe9calage (avec un gain de temps de jour)","Outputs":"Les sorties","PLC Connection":"Connexion PLC","PLC IP Address":"Adresse IP de l\'API","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"D\xe9lai d\'interrogation","Polling":"Vote","Pulse time":"Temps d\'impulsion","RW":"RW","Reconnect time":"Reconnectez le temps","Remote TSAP":"TSAP distant","Role":"R\xf4le","Room":"Chambre","Round Real to":"Rond r\xe9el \xe0","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Mode heure","Text copied to clipboard. Click to close the window":"Texte copi\xe9 dans le presse-papier Cliquez pour fermer la fen\xeatre","Time offset":"D\xe9calage temporel","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Basculer le sondage","Type":"Type","UTC":"UTC","Unit":"Unit\xe9","WP":"WP","Write access":"Acc\xe8s en \xe9criture","Write access allowed":"Acc\xe8s en \xe9criture autoris\xe9","Write pulses (true=>false edge)":"\xc9crire des impulsions (true => false edge)","minutes":"minutes","poll":"sondage","sec":"seconde.","write as Pulse":"\xe9crire comme Pulse","Drag \'n\' drop file here, or click to select file":"Glissez-d\xe9posez le fichier ici, ou cliquez pour s\xe9lectionner le fichier","DBs":"DBs","ms":"ms","Poll":"Sondage","Change all":"Change tout","Delete all":"Tout supprimer","Edit as TSV (Tab separated values)":"Modifier en tant que TSV (valeurs s\xe9par\xe9es par des tabulations)","Add line":"Ajouter une ligne","Delete":"Effacer","Are you sure to delete item with address \\"%s\\"?":"\xcates-vous s\xfbr de supprimer l\'\xe9l\xe9ment avec l\'adresse \xab\xa0%s\xa0\xbb\xa0?","Don\'t show this message in 5 minutes":"Ne pas afficher ce message dans 5 minutes","Cancel":"Annuler","Delete all items":"Supprimer tous les \xe9l\xe9ments","Are you sure to delete all items?":"\xcates-vous s\xfbr de supprimer tous les \xe9l\xe9ments\xa0?","Edit mode":"Mode \xe9dition","Toggle extended mode":"Basculer en mode \xe9tendu","Edit data as TSV":"Modifier les donn\xe9es en tant que TSV","You can copy, paste and edit data as TSV.":"Vous pouvez copier, coller et modifier des donn\xe9es au format TSV.","Copy to clipboard":"Copier dans le presse-papier","Nothing":"Rien","Delete item":"Effacer l\'article","Load symbols":"Charger des symboles","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Type de connexion : 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack et slot : [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV a \xe9t\xe9 copi\xe9 dans le presse-papiers"}')},413:function(e){e.exports=JSON.parse('{"Add DB":"Aggiungi DB","Address":"Indirizzo","All entries will be deleted. Are you sure?":"Tutte le voci saranno cancellate. Sei sicuro?","Close":"Vicino","Delete all entries":"Elimina tutte le voci","Description":"Descrizione","Enable polling of data point":"Abilita il polling del punto dati","Export":"Esportare","Export to CSV":"Esporta in CSV","General":"Generale","Import":"Importare","Import DB file":"Importa file DB","Import from CSV":"Importa da CSV","Import symbols file":"Importa file simboli","Inputs":"ingressi","Length":"Lunghezza","Load Symbols":"Carica simboli","Local TSAP":"TSAP locale","Local time":"Ora locale","Marker":"marcatore","Name":"Nome","Offset (no day saving time)":"Offset (nessun giorno risparmiando tempo)","Offset (with day saving time)":"Offset (con ora del giorno)","Outputs":"Uscite","PLC Connection":"Connessione PLC","PLC IP Address":"Indirizzo IP del PLC","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"Ritardo del sondaggio","Polling":"votazione","Pulse time":"Tempo di impulso","RW":"RW","Reconnect time":"Tempo di riconnessione","Remote TSAP":"TSAP remoto","Role":"Ruolo","Room":"Camera","Round Real to":"Round reale a","S7 LOGO!":"LOGO S7 !","S7 Time mode":"Modalit\xe0 ora S7","Text copied to clipboard. Click to close the window":"Testo copiato negli appunti. Clicca per chiudere la finestra","Time offset":"Differenza di fuso orario","Toggle RW":"Attiva / disattiva RW","Toggle WP":"Attiva / disattiva WP","Toggle poll":"Attiva / disattiva sondaggio","Type":"genere","UTC":"UTC","Unit":"Unit\xe0","WP":"WP","Write access":"Accesso in scrittura","Write access allowed":"Accesso in scrittura consentito","Write pulses (true=>false edge)":"Scrivi impulsi (true => falso bordo)","minutes":"minuti","poll":"sondaggio","sec":"sec.","write as Pulse":"scrivi come Pulse","Drag \'n\' drop file here, or click to select file":"Trascina e rilascia il file qui o fai clic per selezionare il file","DBs":"DBs","ms":"ms","Poll":"Sondaggio","Change all":"Cambia tutto","Delete all":"Cancella tutto","Edit as TSV (Tab separated values)":"Modifica come TSV (valori separati da tabulazioni)","Add line":"Aggiungi riga","Delete":"Elimina","Are you sure to delete item with address \\"%s\\"?":"Sei sicuro di eliminare l\'elemento con l\'indirizzo \\"%s\\"?","Don\'t show this message in 5 minutes":"Non mostrare questo messaggio in 5 minuti","Cancel":"Annulla","Delete all items":"Elimina tutti gli elementi","Are you sure to delete all items?":"Sei sicuro di eliminare tutti gli elementi?","Edit mode":"Modalit\xe0 Modifica","Toggle extended mode":"Attiva/disattiva modalit\xe0 estesa","Edit data as TSV":"Modifica dati come TSV","You can copy, paste and edit data as TSV.":"Puoi copiare, incollare e modificare i dati come TSV.","Copy to clipboard":"Copia negli appunti","Nothing":"Niente","Delete item":"Cancellare l\'oggetto","Load symbols":"Simboli di carico","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo di collegamento: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV \xe8 stato copiato negli appunti"}')},414:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Hora local","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Desplazamiento (sin horario de guardado)","Offset (with day saving time)":"Desplazamiento (con horario de ahorro de d\xeda)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Votaci\xf3n","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"Modo de tiempo S7","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Desplazamiento de tiempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Acceso de escritura","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutos","poll":"poll","sec":"sec.","write as Pulse":"escribe como Pulso","Drag \'n\' drop file here, or click to select file":"Arrastre y suelte el archivo aqu\xed o haga clic para seleccionar el archivo","DBs":"DBs","ms":"ms","Poll":"Encuesta","Change all":"Cambia todo","Delete all":"Eliminar todos","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabulaciones)","Add line":"A\xf1adir l\xednea","Delete":"Borrar","Are you sure to delete item with address \\"%s\\"?":"\xbfEst\xe1 seguro de eliminar el elemento con la direcci\xf3n \\"%s\\"?","Don\'t show this message in 5 minutes":"No muestre este mensaje en 5 minutos","Cancel":"Cancelar","Delete all items":"Eliminar todos los elementos","Are you sure to delete all items?":"\xbfEst\xe1 seguro de eliminar todos los elementos?","Edit mode":"Modo de edici\xf3n","Toggle extended mode":"Alternar modo extendido","Edit data as TSV":"Editar datos como TSV","You can copy, paste and edit data as TSV.":"Puede copiar, pegar y editar datos como TSV.","Copy to clipboard":"Copiar al portapapeles","Nothing":"Nada","Delete item":"Eliminar elemento","Load symbols":"Cargar s\xedmbolos","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conexi\xf3n: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack y ranura: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV se copi\xf3 al portapapeles"}')},415:function(e){e.exports=JSON.parse('{"Add DB":"Dodaj DB","Address":"Adres","All entries will be deleted. Are you sure?":"Wszystkie wpisy zostan\u0105 usuni\u0119te. Jeste\u015b pewny?","Close":"Blisko","Delete all entries":"Usu\u0144 wszystkie wpisy","Description":"Opis","Enable polling of data point":"W\u0142\u0105cz odpytywanie punktu danych","Export":"Eksport","Export to CSV":"Eksportuj do pliku CSV","General":"Genera\u0142","Import":"Import","Import DB file":"Importuj plik DB","Import from CSV":"Importuj z CSV","Import symbols file":"Importuj plik symboli","Inputs":"Wej\u015bcia","Length":"D\u0142ugo\u015b\u0107","Load Symbols":"Za\u0142aduj symbole","Local TSAP":"Lokalny TSAP","Local time":"Czas lokalny","Marker":"Znacznik","Name":"Nazwa","Offset (no day saving time)":"Przesuni\u0119cie (brak czasu na dzie\u0144)","Offset (with day saving time)":"Przesuni\u0119cie (z czasem oszcz\u0119dzania dziennego)","Outputs":"Wyj\u015bcia","PLC Connection":"Po\u0142\u0105czenie PLC","PLC IP Address":"Adres IP sterownika PLC","PLC Rack":"Rack PLC","PLC Slot":"Gniazdo PLC","Poll delay":"Op\xf3\u017anienie ankiety","Polling":"Ankieta","Pulse time":"Czas impulsu","RW":"RW","Reconnect time":"Czas ponownego po\u0142\u0105czenia","Remote TSAP":"Zdalny TSAP","Role":"Rola","Room":"Pok\xf3j","Round Real to":"Runda prawdziwa do","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tryb czasu","Text copied to clipboard. Click to close the window":"Tekst skopiowany do schowka. Kliknij, aby zamkn\u0105\u0107 okno","Time offset":"Przesuni\u0119cie czasu","Toggle RW":"Prze\u0142\u0105cz RW","Toggle WP":"Prze\u0142\u0105cz WP","Toggle poll":"Prze\u0142\u0105cz ankiet\u0119","Type":"Rodzaj","UTC":"UTC","Unit":"Jednostka","WP":"WP","Write access":"Dost\u0119p do zapisu","Write access allowed":"Dost\u0119p do zapisu dozwolony","Write pulses (true=>false edge)":"Pisz impulsy (true => false edge)","minutes":"minuty","poll":"g\u0142osowanie","sec":"sec.","write as Pulse":"napisz jako Pulse","Drag \'n\' drop file here, or click to select file":"Przeci\u0105gnij i upu\u015b\u0107 plik tutaj lub kliknij, aby wybra\u0107 plik","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Zmieni\u0107 wszystko","Delete all":"Usu\u0144 wszystko","Edit as TSV (Tab separated values)":"Edytuj jako TSV (warto\u015bci rozdzielone tabulatorami)","Add line":"Dodaj lini\u0119","Delete":"Kasowa\u0107","Are you sure to delete item with address \\"%s\\"?":"Czy na pewno chcesz usun\u0105\u0107 element o adresie \u201e%s\u201d?","Don\'t show this message in 5 minutes":"Nie pokazuj tej wiadomo\u015bci za 5 minut","Cancel":"Anuluj","Delete all items":"Usu\u0144 wszystkie elementy","Are you sure to delete all items?":"Czy na pewno chcesz usun\u0105\u0107 wszystkie elementy?","Edit mode":"Tryb edycji","Toggle extended mode":"Prze\u0142\u0105cz tryb rozszerzony","Edit data as TSV":"Edytuj dane jako TSV","You can copy, paste and edit data as TSV.":"Mo\u017cesz kopiowa\u0107, wkleja\u0107 i edytowa\u0107 dane jako TSV.","Copy to clipboard":"Skopiuj do schowka","Nothing":"Nic","Delete item":"Usu\u0144 przedmiot","Load symbols":"Za\u0142aduj symbole","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Typ po\u0142\u0105czenia: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Szafa i gniazdo: [Stela\u017c * 0x20 + Slot]","TSV was copied to clipboard":"TSV zosta\u0142 skopiowany do schowka"}')},416:function(e){e.exports=JSON.parse('{"Add DB":"\u6dfb\u52a0\u6570\u636e\u5e93","Address":"\u5730\u5740","All entries will be deleted. Are you sure?":"\u6240\u6709\u6761\u76ee\u5c06\u88ab\u5220\u9664\u3002","Close":"\u5173\u95ed","Delete all entries":"\u5220\u9664\u6240\u6709\u6761\u76ee","Description":"\u63cf\u8ff0","Enable polling of data point":"\u542f\u7528\u6570\u636e\u70b9\u8f6e\u8be2","Export":"\u51fa\u53e3","Export to CSV":"\u5bfc\u51fa\u4e3aCSV","General":"\u4e00\u822c\u7684","Import":"\u8fdb\u53e3","Import DB file":"\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff1a","Import from CSV":"\u4eceCSV\u5bfc\u5165","Import symbols file":"\u5bfc\u5165\u7b26\u53f7\u6587\u4ef6\uff1a","Inputs":"\u8f93\u5165\u9879","Length":"\u957f\u5ea6","Load Symbols":"\u52a0\u8f7d\u7b26\u53f7","Local TSAP":"\u672c\u5730TSAP\uff1a","Local time":"\u5f53\u5730\u65f6\u95f4","Marker":"\u8bb0\u53f7\u7b14","Name":"\u540d\u79f0","Offset (no day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u65e0\u590f\u4ee4\u65f6\uff09","Offset (with day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u5e26\u590f\u65f6\u5236\uff09","Outputs":"\u4ea7\u51fa","PLC Connection":"PLC\u8fde\u63a5\uff1a","PLC IP Address":"PLC IP\u5730\u5740\uff1a","PLC Rack":"PLC\u673a\u67b6\uff1a","PLC Slot":"PLC\u63d2\u69fd\uff1a","Poll delay":"\u8f6e\u8be2\u5ef6\u8fdf\uff1a","Polling":"\u8f6e\u8be2","Pulse time":"\u8109\u51b2\u65f6\u95f4\uff1a","RW":"\u8bfb\u5199\u5668","Reconnect time":"\u91cd\u65b0\u8fde\u63a5\u65f6\u95f4\uff1a","Remote TSAP":"\u8fdc\u7a0bTSAP\uff1a","Role":"\u89d2\u8272","Room":"\u623f\u95f4","Round Real to":"\u820d\u5165\u4e3a\uff1a","S7 LOGO!":"S7 LOGO !\uff1a","S7 Time mode":"S7\u65f6\u95f4\u6a21\u5f0f","Text copied to clipboard. Click to close the window":"\u6587\u672c\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f\u3002","Time offset":"\u65f6\u95f4\u504f\u79fb\uff1a","Toggle RW":"\u5207\u6362RW","Toggle WP":"\u5207\u6362WP","Toggle poll":"\u5207\u6362\u6c11\u610f\u8c03\u67e5","Type":"\u7c7b\u578b","UTC":"\u4e16\u754c\u6807\u51c6\u65f6\u95f4","Unit":"\u5355\u5143","WP":"\u53ef\u6e7f\u6027\u7c89\u5242","Write access":"\u5199\u8bbf\u95ee","Write access allowed":"\u5141\u8bb8\u5199\u8bbf\u95ee","Write pulses (true=>false edge)":"\u5199\u8109\u51b2\uff08\u771f=>\u5047\u8fb9\uff09","minutes":"\u5206\u949f","poll":"\u8f6e\u8be2","sec":"\u79d2","write as Pulse":"\u5199\u4e3a\u8109\u51b2","Drag \'n\' drop file here, or click to select file":"\u5c06\u201cn\u201d\u6587\u4ef6\u62d6\u5230\u6b64\u5904\uff0c\u6216\u5355\u51fb\u4ee5\u9009\u62e9\u6587\u4ef6","DBs":"DBs","ms":"ms","Poll":"\u8f6e\u8be2","Change all":"\u5168\u90e8\u66f4\u6539","Delete all":"\u5220\u9664\u6240\u6709","Edit as TSV (Tab separated values)":"\u7f16\u8f91\u4e3a TSV\uff08\u5236\u8868\u7b26\u5206\u9694\u503c\uff09","Add line":"\u6dfb\u52a0\u884c","Delete":"\u5220\u9664","Are you sure to delete item with address \\"%s\\"?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u5730\u5740\u4e3a\u201c%s\u201d\u7684\u9879\u76ee\u5417\uff1f","Don\'t show this message in 5 minutes":"5 \u5206\u949f\u5185\u4e0d\u8981\u663e\u793a\u6b64\u6d88\u606f","Cancel":"\u53d6\u6d88","Delete all items":"\u5220\u9664\u6240\u6709\u9879\u76ee","Are you sure to delete all items?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u6240\u6709\u9879\u76ee\u5417\uff1f","Edit mode":"\u7f16\u8f91\u6a21\u5f0f","Toggle extended mode":"\u5207\u6362\u6269\u5c55\u6a21\u5f0f","Edit data as TSV":"\u5c06\u6570\u636e\u7f16\u8f91\u4e3a TSV","You can copy, paste and edit data as TSV.":"\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u590d\u5236\u3001\u7c98\u8d34\u548c\u7f16\u8f91\u4e3a TSV\u3002","Copy to clipboard":"\u590d\u5236\u5230\u526a\u8d34\u677f","Nothing":"\u6ca1\u6709\u4ec0\u4e48","Delete item":"\u5220\u9664\u9879\u76ee","Load symbols":"\u52a0\u8f7d\u7b26\u53f7","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u8fde\u63a5\u7c7b\u578b\uff1a0x1 - PG\u30010x2 - OP\u30010x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u673a\u67b6\u548c\u63d2\u69fd\uff1a[\u673a\u67b6 * 0x20 + \u63d2\u69fd]","TSV was copied to clipboard":"TSV \u88ab\u590d\u5236\u5230\u526a\u8d34\u677f"}')},418:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a(15),i=a.n(s),n=a(447),l=(a(342),a(67)),r=a(41),d=a(91),c=a(329),p=a(73),u=a(43),m=a(42),h=a(5),g=a(92),b=a(454),f=a(463),S=a(455),v=a(308),x=a.n(v),j=a(218),T=a.n(j),y=a(13),O=a.n(y),P=a(328),C=a(171),A=a(452),k=a(464),R=a(439),D=a(451),w=a(450),L=a(220),I=a(333),E=a(429),W=a(453),V=a(449),B=a(170),N=a(209),z=a(311),G=a(312),M=a(6),U=function(e){var t=Object(g.b)().enqueueSnackbar,a=Object(o.useCallback)((function(a){e.onChange(a),t(O.a.t("Data updated"))}),[]),s=Object(P.a)({onDrop:a,accept:e.accept}),i=s.getRootProps,n=s.getInputProps,r=s.isDragActive;return Object(M.jsxs)(L.a,{style:{padding:3,paddingRight:40},children:[Object(M.jsx)(C.a,{variant:"h6",gutterBottom:!0,children:O.a.t(e.label)}),Object(M.jsxs)("div",Object(l.a)(Object(l.a)({},i()),{},{className:e.classes.fileInput,style:r?{backgroundColor:"rgba(0, 255, 0, 0.1)"}:{cursor:"pointer"},children:[Object(M.jsx)("input",Object(l.a)({},n())),r?Object(M.jsx)("p",{children:O.a.t("Drop the file here ...")}):Object(M.jsx)("p",{children:O.a.t("Drag 'n' drop file here, or click to select file")})]}))]})},F=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).inputDisabled=function(e){return!1},o.inputDisplay=function(e){if(null===o.props.native.params.slot){if(["rack","slot"].includes(e.name))return!1}else if(["localTSAP","remoteTSAP"].includes(e.name))return!1;return"timeOffset"!==e.name||["summer","offset"].includes(o.props.native.params.timeFormat)},o.changeParam=function(e,t){var a=JSON.parse(JSON.stringify(o.props.native));"s7logo"===e?t?(a.params.localTSAP="",a.params.remoteTSAP="",a.params.rack=null,a.params.slot=null):(a.params.localTSAP=null,a.params.remoteTSAP=null,a.params.rack="",a.params.slot=""):a.params[e]=t,o.props.changeNative(a)},o.loadSymbols=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){var s={inputs:[],outputs:[],markers:[]},i=a.result;(i=i.split("126,")).forEach((function(e){var t=e.slice(23,29).replace(/( )/g,""),a={Name:e.slice(0,23).replace(/( ){2,}/g,""),Address:e.slice(29,36).replace(/( )/g,""),Type:e.slice(36,41).replace(/( )/g,""),Description:e.slice(46,126).replace(/( ){2,}/,""),Unit:"",poll:!0,RW:!1,WP:!1};"E"!==t&&"EB"!==t&&"EW"!==t&&"ED"!==t||s.inputs.push(a),"A"!==t&&"AB"!==t&&"AW"!==t&&"AD"!==t||s.outputs.push(a),"M"!==t&&"MB"!==t&&"MW"!==t&&"MD"!==t||s.markers.push(a)})),["inputs","outputs","markers"].forEach((function(e){t[e]=s[e]})),o.props.changeNative(t)},a.readAsText(e[0],"ISO-8859-1")},o.addDb=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){setTimeout((function(){var e=a.result,o={inputs:!1,outputs:!1,markers:!1,dbs:!1},s={inputs:t.inputs||[],outputs:t.outputs||[],markers:t.markers||[],dbs:t.dbs||[]};if(-1!==e.indexOf("Leseanforderung")){for(var i=e.replace(/\r\n/g,"\n").split("\n"),n={Name:{attr:"Name"},Typ:{attr:""},Operand:{attr:"Address",process:function(e){var t=(e=e.trim()).match(/^DB (\d+)/);if(!t){var a=e.match(/^MB? (\d+)\.?(\d+)?$/);return a?"M "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^AB? (\d+)\.?(\d+)?$/))?"OUT "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^EB? (\d+)\.?(\d+)?$/))?"IN "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):e}var o=e.match(/(\d+).?(\d+)?$/);return t&&o?"DB".concat(t[1]," ").concat(o[1]).concat(void 0!==o[2]?"."+o[2]:""):e}},"SPS-Format":{attr:"Type",process:function(e){return e}},Byteanzahl:{attr:"Length",process:function(e){return parseInt(e,10)}},Zugriff:{attr:"RW",process:function(e){return"read"!==e}},Leseanforderung:{attr:"poll",process:function(e){return"zyklisch"===e}},"AktZeit (ms)":{attr:""},Kommentar:{attr:"Description"},"Clients (Anzahl)":{attr:""}},l=i[0].split(","),r=[],d=0;d<l.length;d++)l[d]=l[d].replace(/"/g,""),r.push(n[l[d]]);for(var c=1;c<i.length;c++)if(i[c]=i[c].trim(),i[c]){l=i[c].trim().split(",");for(var p={Type:"ARRAY",Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},u=0;u<r.length;u++)if(r[u].attr){if(!l[u]){console.log("error");break}if(l[u]=l[u].replace(/"/g,""),p[r[u].attr]=r[u].process?r[u].process(l[u]):l[u],p.Name.match(/^@/)){p=null;break}}if(p){"BYTE"===p.Type&&1!==p.Length&&(p.Type="ARRAY"),"CHAR"===p.Type&&(p.Type="STRING"),"BYTE"!==p.Type&&"BOOL"!==p.Type&&"INT"!==p.Type||(p.Length="");var m=void 0;if(p.Address.match(/^DB/))m="dbs";else if(p.Address.match(/^IN/))p.Address=p.Address.replace(/^IN\s?/,""),m="inputs";else if(p.Address.match(/^OUT/))m="outputs",p.Address=p.Address.replace(/^OUT\s?/,"");else{if(!p.Address.match(/^M/)){console.error("Unknown TYPE: "+p.Address);continue}m="markers",p.Address=p.Address.replace(/^M\s?/,"")}for(var h=0;h<s[m].length;h++)if(s[m][h].Address===p.Address){s[m][h]=p,o[m]=!0,p=null;break}p&&(o[m]=!0,s[m].push(p))}}}else{var g=e.match(/(DB)[0-9]+\s-\s/g),b=g?g[0].replace(" - ",""):"",f=e.split("STRUCT");(f[1]?f[1].split("=")[0].split("\n"):[]).forEach((function(e){if(e.length>10){var t=e.split(/\s+/g);t.shift();for(var a={Address:b+" "+t.shift(),Name:t.shift(),Type:t.shift(),dec:t.shift(),Description:t.join(" "),Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},i=0;i<s.dbs.length;i++)if(s.dbs[i].Address===a.Address){s.dbs[i]=a,o.dbs=!0,a=null;break}a&&(o.dbs=!0,s.dbs.push(a))}}))}for(var S in s)s.hasOwnProperty(S)&&s[S].sort((function(e,t){var a=e.Address.match(/^D?B?\s?(\d+)/),o=t.Address.match(/^D?B?\s?(\d+)/);if(!a)return-1;if(!o)return 1;if(parseInt(a[1],10)>parseInt(o[1],10))return 1;if(parseInt(a[1],10)<parseInt(o[1],10))return-1;var s=e.Address.match(/\s(\d+).?(\d+)?$/),i=t.Address.match(/\s(\d+).?(\d+)?$/);return s?i?parseInt(s[1],10)>parseInt(i[1],10)?1:parseInt(s[1],10)<parseInt(i[1],10)?-1:void 0===s[2]&&void 0!==i[2]?1:void 0===i[2]&&void 0!==s[2]?-1:void 0===s[2]&&void 0===i[2]?0:parseInt(s[2],10)>parseInt(i[2],10)?1:parseInt(s[2],10)<parseInt(i[1],10)?-1:0:1:-1}));o.dbs&&(t.dbs=s.dbs),o.inputs&&(t.inputs=s.inputs),o.outputs&&(t.outputs=s.outputs),o.markers&&(t.markers=s.markers),console.log(t)}),200)},a.readAsText(e[0],"ISO-8859-1")},o.state={},o}return Object(d.a)(a,[{key:"getValue",value:function(e){return"s7logo"===e?null===this.props.native.params.slot:this.props.native.params[e]}},{key:"getInputsBlock",value:function(e,t){var a=this;return Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t(t)}),Object(M.jsx)(V.a,{container:!0,spacing:2,direction:"column",children:e.map((function(e){if(!a.inputDisplay(e))return null;if("checkbox"===e.type)return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(w.a,{label:O.a.t(e.title),control:Object(M.jsx)(k.a,{label:O.a.t(e.title),className:a.props.classes.optionsCheckbox,disabled:a.inputDisabled(e),checked:a.getValue(e.name),onChange:function(t){return a.changeParam(e.name,t.target.checked)}})})," ",e.dimension?O.a.t(e.dimension):null]},e.name);if("select"===e.type)return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsxs)(L.a,{children:[Object(M.jsx)(E.a,{shrink:!0,children:O.a.t(e.title)}),Object(M.jsx)(R.a,{className:a.props.classes.optionsSelect,displayEmpty:!0,disabled:a.inputDisabled(e),value:a.getValue(e.name),onChange:function(t){return a.changeParam(e.name,t.target.value)},children:e.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title},e.value)}))})]})," ",e.dimension?O.a.t(e.dimension):null]},e.name);if("hex"===e.type){var t=parseInt(a.getValue(e.name))?parseInt(a.getValue(e.name)):0,o=t>>8&255,s=255&t;return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(E.a,{className:a.props.classes.optionsLabel,children:O.a.t(e.title)}),Object(M.jsx)(I.a,{title:O.a.t("Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic"),style:{width:"6ch"},value:o.toString(16)?o.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,parseInt(t.target.value,16)<<8|s)}}),Object(M.jsx)(I.a,{title:O.a.t("Rack and slot: [Rack * 0x20 + Slot]"),style:{marginLeft:5,width:"6ch"},value:s.toString(16)?s.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,o<<8|parseInt(t.target.value,16))}})]},e.name)}return Object(M.jsx)(V.a,{item:!0,className:a.props.classes.optionContainer,children:Object(M.jsx)(A.a,{type:e.type,label:O.a.t(e.title),className:a.props.classes.optionsTextField,disabled:a.inputDisabled(e),value:a.getValue(e.name),InputProps:{endAdornment:e.dimension?Object(M.jsx)(W.a,{position:"end",children:O.a.t(e.dimension)}):null},onChange:function(t){return a.changeParam(e.name,t.target.value)}})},e.name)}))})]})}},{key:"getImportsBlock",value:function(){return Object(M.jsx)(M.Fragment,{children:Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t("Import")}),Object(M.jsxs)(N.a,{className:this.props.classes.optionContainer,children:[Object(M.jsx)(U,{classes:this.props.classes,onChange:this.loadSymbols,label:"Load symbols",accept:".asc"}),Object(M.jsx)(U,{classes:this.props.classes,onChange:this.addDb,label:"Add DB",accept:".csv,.prn"})]})]})})}},{key:"render",value:function(){return Object(M.jsx)("form",{className:this.props.classes.tab,children:Object(M.jsxs)(V.a,{container:!0,spacing:2,children:[Object(M.jsxs)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:[this.getInputsBlock(z,"PLC Connection"),this.getImportsBlock()]}),Object(M.jsx)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:this.getInputsBlock(G,"General")})]})})}}]),a}(o.Component),q=Object(h.a)((function(e){return{optionsSelect:{width:280},optionsTextField:{width:280},optionContainer:{},optionsContainer:{width:"calc(100% - ".concat(e.spacing(4),"px)"),padding:e.spacing(2),marginBottom:20,display:"inline-block",textAlign:"left"},optionsGrid:{textAlign:"center",padding:e.spacing(2)},optionsLabel:{fontSize:12},header:{fontSize:24},fileInput:{textAlign:"center",display:"inline-block",height:80,width:200,border:"2px dashed #777",borderRadius:10,marginTop:12,padding:4}}}))(F),J=a(4),Y=a.n(J),$=a(315),Z=a(316),H=a(56),K=a(456),_=a(459),Q=a(457),X=a(460),ee=a(458),te=a(215),ae=a(465),oe=a(462),se=a(78),ie=a.n(se),ne=a(325),le=a.n(ne),re=a(326),de=a.n(re),ce=a(60),pe=a.n(ce),ue=a(317),me=a.n(ue),he=a(318),ge=a.n(he),be=a(320),fe=a.n(be),Se=a(222),ve=a(322),xe=a.n(ve),je=a(323),Te=a.n(je),ye=a(289),Oe=a(290),Pe=a(291),Ce=a(292),Ae=a(293),ke=a(288),Re=a(103),De=a.n(Re),we=a(219),Le=a.n(we),Ie=a(324),Ee=a.n(Ie),We=Object(h.a)((function(e){return{tsvEditor:{width:"100%",height:400},tsvEditorTextarea:{fontFamily:"monospace"}}}))((function(e){var t=Object(o.useState)(""),a=Object(H.a)(t,2),s=a[0],i=a[1];Object(o.useEffect)((function(){var t=[];t.push(e.fields.map((function(e){return e.name}))),e.data.forEach((function(a){return t.push(e.fields.map((function(e){return void 0!==a[e.name]&&null!==a[e.name]?a[e.name].toString():""})))})),i(Object(Se.json2tsv)(t))}),[e.open]);var n=Object(g.b)().enqueueSnackbar;if(!e.open)return null;return Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,maxWidth:"lg",fullWidth:!0,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Edit data as TSV")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("You can copy, paste and edit data as TSV.")}),Object(M.jsx)("div",{children:Object(M.jsx)(xe.a,{onChange:function(e){return i(e)},height:"400px",showPrintMargin:!1,value:s,className:e.classes.tsvEditor,width:"100%",setOptions:{firstLineNumber:0},mode:null})})]}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"outlined",color:"primary",onClick:function(){Te()(s),n(O.a.t("TSV was copied to clipboard"))},startIcon:Object(M.jsx)(Ee.a,{}),children:O.a.t("Copy to clipboard")}),Object(M.jsx)(ke.a,{variant:"contained",color:"primary",onClick:function(){var t=Object(Se.tsv2json)(s),a=t.shift(),o=!0,i=[];for(var l in e.fields)e.fields[l].name!==a[l]&&(i.push(Object(M.jsxs)(M.Fragment,{children:["No field ",Object(M.jsx)("i",{children:e.fields[l].name})," in position ",Object(M.jsx)("i",{children:parseInt(l)+1}),"!"]})),o=!1);t=t.map((function(t,a){var s={};for(var n in e.fields)"select"!==e.fields[n].type||e.fields[n].options.map((function(e){return e.value})).includes(t[n])||(i.push(Object(M.jsxs)(M.Fragment,{children:["Value ",Object(M.jsx)("i",{children:t[n]})," is wrong for field ",Object(M.jsx)("i",{children:e.fields[n].name})," in position ",Object(M.jsx)("i",{children:parseInt(a)+1}),"!"]})),o=!1),"checkbox"===e.fields[n].type&&(t[n]="true"===t[n]),s[e.fields[n].name]=t[n];return s})),o?(e.save(t),e.onClose()):n(Object(M.jsx)("div",{children:i.map((function(e,t){return Object(M.jsx)("div",{children:e},t)}))}),{variant:"error"})},startIcon:Object(M.jsx)(Le.a,{}),children:O.a.t("Import")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Close")})]})]})})),Ve=function(e){return e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete all items")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("Are you sure to delete all items?")}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(),e.onClose()},children:O.a.t("Delete all items")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Be=function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1];return Object(o.useEffect)((function(){i(!1)}),[e.open]),e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete item")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t('Are you sure to delete item with address "%s"?',e.item._address)}),Object(M.jsx)(Ce.a,{children:Object(M.jsx)(w.a,{label:O.a.t("Don't show this message in 5 minutes"),control:Object(M.jsx)(k.a,{checked:s,onChange:function(e){return i(e.target.checked)}})})}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(s),e.onClose()},children:O.a.t("Delete")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Ne=function(e){var t,a=e.sortedItem,s=e.field,i=e.editMode,n=e.setEditMode,l=Object(o.useRef)(),r=a.item;if("checkbox"===s.type)t=Object(M.jsx)(oe.a,{title:O.a.t(s.title),children:Object(M.jsx)(k.a,{inputRef:l,className:e.classes.tableCheckbox,checked:!!r[s.name],disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.checked)}})});else if("rooms"===s.type)t=i?Object(M.jsx)(fe.a,{list:e.rooms,allowNone:!0,value:r[s.name],dense:!0,themeType:e.themeType,inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t)},className:e.classes.tableSelectContainer}):Object(M.jsx)(ge.a,{list:e.rooms,value:r[s.name],themeType:e.themeType});else if("select"===s.type)if(i)t=Object(M.jsx)(R.a,{value:r[s.name],inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},className:e.classes.tableSelectContainer,children:s.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title?e.title:Object(M.jsx)("i",{children:O.a.t("Nothing")})},e.value)}))});else{var d=s.options.find((function(e){return e.value===r[s.name]}));t=d?d.title:""}else t=i?Object(M.jsx)(A.a,{value:r[s.name],className:e.classes.tableTextFieldContainer,inputProps:{ref:l,className:e.classes.tableTextField},type:s.type,onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},disabled:e.getDisable(a.$index,s.name)}):r[s.name]?r[s.name]:null;return Object(M.jsx)(ee.a,{className:pe.a.clsx(e.classes.tableCell,!i&&e.classes.nonEditMode),onClick:function(e){n(!0),window.localStorage.setItem("Modbus.editMode","true"),window.setTimeout((function(){return l.current&&l.current.focus()}),100)},children:t})},ze=Object(h.a)((function(e){return{tableHeader:{whiteSpace:"nowrap",fontWeight:"bold",fontSize:"80%",padding:"0px 8px"},tableHeaderExtended:{color:"dark"===e.palette.type?e.palette.primary.light:e.palette.primary.dark},tableCell:{whiteSpace:"nowrap",fontSize:"80%",padding:"0px 8px"},tableContainer:{overflow:"auto",maxHeight:"calc(100vh - 180px)"},tableTextField:{fontSize:"80%"},tableSelect:{fontSize:"80%"},tableTextFieldContainer:{width:"100%"},tableSelectContainer:{width:"100%"},nonEditMode:{cursor:"pointer"}}}))((function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1],n=Object(o.useState)(parseInt(window.localStorage.getItem("Modbus.editMode"),10)||0),r=Object(H.a)(n,2),d=r[0],c=r[1],p=Object(o.useState)("true"===window.localStorage.getItem("Modbus.extendedMode")),u=Object(H.a)(p,2),m=u[0],h=u[1],g=Object(o.useState)({open:!1,action:null}),b=Object(H.a)(g,2),f=b[0],S=b[1],v=Object(o.useState)({open:!1,item:null,action:null}),x=Object(H.a)(v,2),j=x[0],T=x[1],y=e.getSortedData(e.data,e.orderBy,e.order);return Object(M.jsxs)("div",{children:[Object(M.jsxs)("div",{children:[Object(M.jsx)(oe.a,{title:O.a.t("Add line"),children:Object(M.jsx)(te.a,{onClick:function(t){return e.addItem()},children:Object(M.jsx)(le.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Edit as TSV (Tab separated values)"),children:Object(M.jsx)(te.a,{onClick:function(){return i(!0)},children:Object(M.jsx)(de.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Toggle extended mode"),children:Object(M.jsx)(te.a,{color:m?"primary":"inherit",onClick:function(){window.localStorage.setItem("Modbus.extendedMode",m?"false":"true"),h(!m)},children:Object(M.jsx)(me.a,{})})})]}),Object(M.jsx)("div",{className:e.classes.tableContainer,children:Object(M.jsxs)(K.a,{size:"small",stickyHeader:!0,padding:"none",children:[Object(M.jsx)(_.a,{children:Object(M.jsxs)(X.a,{children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(t){var a=!1,o=!1,s=!1,i=!1;for(var n in e.data)if(e.data[n][t.name]?(a=!0,s=!0):(a=!1,i=!0),s&&i){o=!0,a=!1;break}return Object(M.jsxs)(ee.a,{style:{width:"checkbox"===t.type?20:t.width},className:pe.a.clsx(e.classes.tableHeader,t.expert&&e.classes.tableHeaderExtended),title:t.tooltip?O.a.t(t.tooltip):null,children:["checkbox"===t.type?Object(M.jsx)(oe.a,{title:O.a.t("Change all"),children:Object(M.jsx)(k.a,{indeterminate:o,checked:a,onChange:function(a){var o=JSON.parse(JSON.stringify(e.data));o.forEach((function(e){return e[t.name]=a.target.checked})),e.changeData(o)}})}):null,t.sorted?Object(M.jsx)(ae.a,{active:t.name===e.orderBy,direction:e.order,onClick:function(a){var o=e.orderBy===t.name&&"asc"===e.order;e.onChangeOrder(t.name,o?"desc":"asc")},children:O.a.t(t.title)}):O.a.t(t.title)]},t.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete all"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(t){return S({open:!0,action:function(){return e.changeData([])}})},disabled:!e.data.length,children:Object(M.jsx)(ie.a,{})})})})})]})}),Object(M.jsx)(Q.a,{children:y.map((function(t){return Object(M.jsxs)(X.a,{hover:!0,children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(a){return Object(M.jsx)(Ne,Object(l.a)({themeType:e.themeType,sortedItem:t,field:a,editMode:d===t.$index,rooms:e.rooms,setEditMode:function(){return c(t.$index)},ey:a.name},e),a.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(a){var o=window.sessionStorage.getItem("disableDeleteDialogs");o&&new Date-new Date(o)<3e5?e.deleteItem(t.$index):T({open:!0,action:function(a){a&&window.sessionStorage.setItem("disableDeleteDialogs",(new Date).toISOString()),e.deleteItem(t.$index)},item:t.item})},children:Object(M.jsx)(ie.a,{})})})})})]},t.$index)}))})]})}),s?Object(M.jsx)(We,{open:!0,save:function(t){e.prefix&&t.forEach((function(t){t.Address=(t.Address||"").toUpperCase(),t.Address&&!t.Address.startsWith(e.prefix)&&(t.Address=e.prefix+t.Address)})),e.changeData(t)},onClose:function(){return i(!1)},data:e.data,fields:e.fields}):null,Object(M.jsx)(Ve,{open:f.open,action:f.action,onClose:function(){return S({open:!1,action:null})}}),Object(M.jsx)(Be,{open:j.open,action:j.action,onClose:function(){return T({open:!1,action:null,item:null})},item:j.item})]})})),Ge=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).changeParam=function(e,t,a){var s=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));if(s[e][t]=a,"Type"===t)if(["BOOL"].includes(a)?s[e].Length=.1:["","BYTE"].includes(a)?s[e].Length=1:["WORD","INT","STRING","S5TIME"].includes(a)?s[e].Length=2:["DWORD","DINT","REAL"].includes(a)?s[e].Length=4:["S7TIME"].includes(a)?s[e].Length=8:["S7STRING","ARRAY"].includes(a)&&(s[e].Length=32),"BOOL"===a){var i=o.address2struct(s[e].Address);void 0===i.bit&&(i.bit=0,s[e].Address=o.struct2address(i))}else{var n=o.address2struct(s[e].Address);void 0!==n.bit&&(n.bit>0&&n.byte++,delete n.bit,s[e].Address=o.struct2address(n))}o.props.onChange(o.nativeField,s)},o.addItem=function(){var e=JSON.parse(JSON.stringify(o.props.native[o.nativeField])),t={};if(o.getFields().forEach((function(e){return t[e.name]=""})),e.length){var a=JSON.parse(JSON.stringify(e));a.sort((function(e,t){return e.Address>t.Address?1:-1}));var s=a[a.length-1],i=o.address2struct(s.Address);"BOOL"===s.Type?(i.bit=i.bit||0,i.bit++,i.bit>=8&&(i.bit=i.bit%8,i.byte++)):(delete i.bit,i.byte+=s.Length),void 0!==i.db&&i.byte+s.Length>65535&&(i.db++,i.byte=0,"BOOL"===s.Type&&(i.bit=0)),t.Address=o.struct2address(i),t.Type=s.Type,t.Length=s.Length,t.Unit=s.Unit,t.Role=s.Role,t.Room=s.Room,t.poll=s.poll,t.RW=s.RW,t.WP=s.WP}else t.role="level",t.Type="BOOL",t.Length="0.1",t.poll=!0,"dbs"===o.nativeField?t.Address="DB1 0.0":t.Address="0.0";e.push(t),o.props.onChange(o.nativeField,e)},o.deleteItem=function(e){var t=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));t.splice(e,1),o.props.onChange(o.nativeField,t)},o.changeData=function(e){o.props.onChange(o.nativeField,e)},o.getDisable=function(e,t){return"Length"===t&&!["STRING","S7STRING","ARRAY"].includes(o.props.native[o.nativeField][e].type)},o.getSortedData=function(e,t,a){o.fields=o.fields||o.getFields(),e=e||o.props.native[o.nativeField],t=t||o.state.orderBy,a=a||o.state.order;var s=[];e.forEach((function(e,t){s[t]={item:e,$index:t}}));var i=o.fields.find((function(e){return e.name===t}));return s.sort((function(e,s){var n,l;if("Address"===t){var r=o.address2struct(e.item.Address),d=o.address2struct(s.item.Address);n=0,void 0!==r.db&&(n=r.db<<24),void 0!==d.db&&(l=d.db<<24),n|=r.byte<<8,l|=d.byte<<8,n|=r.bit||0,l|=d.bit||0}else"$index"===t?(n=e[t],l=s[t]):i&&"number"===i.type?(n=parseInt(e.item[t],10),l=parseInt(s.item[t],10)):(n=e.item[t],l=s.item[t]);return("asc"===a?n>l:n<l)?1:-1})),s},o.nativeField="",o.state={order:window.localStorage.getItem("Modbus.order")||"asc",orderBy:window.localStorage.getItem("Modbus.orderBy")||"Address"},o}return Object(d.a)(a,[{key:"getRooms",value:function(){var e=O.a.getLanguage();return this.props.rooms?Object.values(this.props.rooms).map((function(t){return{value:t._id,title:"object"===typeof t.common.name?t.common.name[e]:t.common.name}})):[]}},{key:"getFields",value:function(){var e=this.getRooms();e.unshift({value:"",title:""});var t=[{name:"Address",title:"Address",type:"text",sorted:!0,width:20},{name:"Name",title:"Name",type:"text",sorted:!0},{name:"Description",title:"Description",type:"text",sorted:!0},{name:"Type",title:"Type",type:"select",options:Z,sorted:!0},{name:"Length",title:"Length",type:"text",width:20},{name:"Unit",title:"Unit",type:"text",width:30},{name:"Role",title:"Role",type:"select",options:$,sorted:!0},{name:"Room",title:"Room",type:"rooms",options:e,sorted:!0},{name:"poll",title:"Poll",type:"checkbox"},{name:"RW",title:"RW",type:"checkbox",expert:!0},{name:"WP",title:"WP",type:"checkbox",expert:!0}];return this.props.native.params.multiDeviceId&&t.splice(1,0,{name:"deviceId",title:"Slave ID",type:"number",sorted:!0,width:20}),t}},{key:"address2struct",value:function(e){if("dbs"===this.nativeField){var t=e.split(" "),a=parseInt(t[0].replace("DB","").replace("db","").trim(),10);if(t[1].includes(".")){var o=parseFloat(t[1]);return{db:a,byte:Math.floor(o),bit:10*o%10}}return{db:a,byte:parseInt(t[1],10)}}if(e.includes(".")){var s=parseFloat(e);return{byte:Math.floor(s),bit:10*s%10}}return{byte:parseInt(e,10)}}},{key:"struct2address",value:function(e){return void 0!==e.db?void 0!==e.bit?"DB"+e.db+" "+e.byte+"."+e.bit:"DB"+e.db+" "+e.byte:void 0!==e.bit?e.byte+"."+e.bit:e.byte}},{key:"render",value:function(){var e=this;return this.fields=this.fields||this.getFields(),Object(M.jsx)(B.a,{children:Object(M.jsx)(ze,{prefix:"dbs"===this.nativeField?"DB":"",fields:this.fields,getSortedData:this.getSortedData,data:this.props.native[this.nativeField],changeParam:this.changeParam,addItem:this.addItem,deleteItem:this.deleteItem,changeData:this.changeData,getDisable:this.getDisable,themeType:this.props.themeType,rooms:this.props.rooms,order:this.state.order,orderBy:this.state.orderBy,onChangeOrder:function(t,a){e.setState({orderBy:t,order:a}),window.localStorage.setItem("Modbus.orderBy",t),window.localStorage.setItem("Modbus.order",a)}})})}}]),a}(o.Component),Me=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="inputs",e}return a}(Ge);Me.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var Ue=Me,Fe=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="outputs",e}return a}(Ge);Fe.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var qe=Fe,Je=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="markers",e}return a}(Ge);Je.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var Ye=Je,$e=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="dbs",e}return a}(Ge);$e.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var Ze=[{name:"general",title:"General",component:q},{name:"inputs",title:"Inputs",component:Ue},{name:"outputs",title:"Outputs",component:qe},{name:"marker",title:"Marker",component:Ye},{name:"dbs",title:"DBs",component:$e}],He=function(e){Object(u.a)(o,e);var t=Object(m.a)(o);function o(e){var s;Object(r.a)(this,o);var i=Object(l.a)({},e);return i.encryptedFields=["pass"],i.translations={en:a(407),de:a(408),ru:a(409),pt:a(410),nl:a(411),fr:a(412),it:a(413),es:a(414),pl:a(415),"zh-cn":a(416)},(s=t.call(this,e,i)).state.moreLoaded=!1,s.state.rooms=null,s}return Object(d.a)(o,[{key:"onConnectionReady",value:function(){var e=this;Object(c.a)(Object(p.a)(o.prototype),"onConnectionReady",this).call(this),this.socket.getForeignObjects("enum.rooms.*","enum").then((function(t){return e.setState({moreLoaded:!0,rooms:t})}))}},{key:"getSelectedTab",value:function(){var e=this.state.selectedTab;return e?Ze.findIndex((function(t){return t.name===e})):0}},{key:"render",value:function(){var e=this;return this.state.loaded&&this.state.moreLoaded?Object(M.jsx)(n.a,{theme:this.state.theme,children:Object(M.jsx)(g.a,{children:Object(M.jsxs)("div",{className:"App",style:{background:this.state.theme.palette.background.default,color:this.state.theme.palette.text.primary},children:[Object(M.jsx)(b.a,{position:"static",children:Object(M.jsx)(f.a,{value:this.getSelectedTab(),onChange:function(t,a){return e.selectTab(Ze[a].name,a)},variant:"scrollable",scrollButtons:"auto",children:Ze.map((function(e){return Object(M.jsx)(S.a,{label:e.icon?Object(M.jsxs)(M.Fragment,{children:[e.icon,O.a.t(e.title)]}):O.a.t(e.title),"data-name":e.name,title:e.tooltip?O.a.t(e.tooltip):void 0},e.name)}))})}),Object(M.jsx)("div",{className:this.isIFrame?this.props.classes.tabContentIFrame:this.props.classes.tabContent,children:Ze.map((function(t,a){var o=t.component;if(e.state.selectedTab){if(e.state.selectedTab!==t.name)return null}else if(0!==a)return null;return Object(M.jsx)(o,{themeType:e.state.themeType,common:e.common,socket:e.socket,native:e.state.native,onError:function(t){return e.setState({errorText:!t&&0!==t||"string"===typeof t?t:t.toString()})},onLoad:function(t){return e.onLoadConfig(t)},instance:e.instance,adapterName:e.adapterName,changed:e.state.changed,onChange:function(t,a,o){return e.updateNativeValue(t,a,o)},changeNative:function(t){return e.setState({native:t,changed:e.getIsChanged(t)})},rooms:e.state.rooms},t.name)}))}),this.renderError(),this.renderSaveCloseButtons()]})})}):Object(M.jsx)(n.a,{theme:this.state.theme,children:Object(M.jsx)(T.a,{theme:this.state.themeType})})}}]),o}(x.a),Ke=Object(h.a)((function(e){return{root:{},tabContent:{padding:10,height:"calc(100% - 64px - 48px - 20px)",overflow:"auto"},tabContentIFrame:{padding:10,height:"calc(100% - 64px - 48px - 20px - 38px)",overflow:"auto"},tab:{width:"100%",minHeight:"100%"}}}))(He);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var _e=a(327),Qe=a(217),Xe=a.n(Qe);window.adapterName="s7";var et=pe.a.getThemeName();console.log("iobroker.".concat(window.adapterName,"@").concat(_e.a,' using theme "').concat(et,'"')),function e(){return i.a.render(Object(M.jsx)(n.a,{theme:Xe()(et),children:Object(M.jsx)(Ke,{onThemeChange:function(t){et=t,e()}})}),document.getElementById("root"))}(),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[418,1,2]]]);
-//# sourceMappingURL=main.ce479555.chunk.js.map
\ No newline at end of file
diff --git a/admin/static/js/main.ce479555.chunk.js.map b/admin/static/js/main.ce479555.chunk.js.map
deleted file mode 100644
index 017cb01..0000000
--- a/admin/static/js/main.ce479555.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["Tabs/Options.js","Components/TsvDialog.js","Components/DeleteAllDialog.js","Components/DeleteDialog.js","Components/RegisterTable.js","Tabs/BaseRegisters.js","Tabs/Inputs.js","Tabs/Outputs.js","Tabs/Marker.js","Tabs/DBs.js","App.js","serviceWorker.js","index.js"],"names":["FileInput","props","enqueueSnackbar","useSnackbar","onDrop","useCallback","acceptedFiles","onChange","I18n","t","useDropzone","accept","getRootProps","getInputProps","isDragActive","FormControl","style","padding","paddingRight","Typography","variant","gutterBottom","label","className","classes","fileInput","backgroundColor","cursor","Options","inputDisabled","input","inputDisplay","native","params","slot","includes","name","timeFormat","changeParam","value","JSON","parse","stringify","localTSAP","remoteTSAP","rack","changeNative","loadSymbols","e","reader","FileReader","onload","localData","inputs","outputs","markers","text","result","split","forEach","line","typ","slice","replace","d","Name","Address","Type","Description","Unit","poll","RW","WP","push","table","readAsText","addDb","setTimeout","changes","dbs","newParts","indexOf","lines","mapping","attr","process","f","db","trim","match","m","parseInt","undefined","offset","sFields","fields","length","l","obj","Role","Room","console","log","Length","_attr","error","aaa","mm","vv","item","x","shift","dec","join","hasOwnProperty","sort","a","b","aDB","bDB","aOffset","bOffset","state","this","title","Paper","optionsContainer","header","Grid","container","spacing","direction","map","type","optionContainer","FormControlLabel","control","Checkbox","optionsCheckbox","disabled","checked","getValue","target","dimension","InputLabel","shrink","Select","optionsSelect","displayEmpty","options","option","MenuItem","top","bottom","optionsLabel","Input","width","toString","toUpperCase","marginLeft","TextField","optionsTextField","InputProps","endAdornment","InputAdornment","position","Box","tab","xs","md","optionsGrid","getInputsBlock","connectionInputs","getImportsBlock","generalInputs","Component","withStyles","theme","marginBottom","display","textAlign","fontSize","height","border","borderRadius","marginTop","tsvEditor","tsvEditorTextarea","fontFamily","useState","tsv","setTsv","useEffect","tsvResult","field","data","json2tsv","open","Dialog","onClose","maxWidth","fullWidth","DialogTitle","DialogContent","DialogContentText","showPrintMargin","setOptions","firstLineNumber","mode","DialogActions","Button","color","onClick","copy","startIcon","tsv2json","success","errors","index","itemValues","itemIndex","save","DeleteAllDialog","action","DeleteDialog","disableWarnings","setDisableWarnings","_address","DataCell","sortedItem","editMode","setEditMode","ref","useRef","Tooltip","inputRef","tableCheckbox","getDisable","$index","list","rooms","allowNone","dense","themeType","inputProps","tableSelect","tableSelectContainer","find","tableTextFieldContainer","tableTextField","TableCell","Utils","clsx","tableCell","nonEditMode","window","localStorage","setItem","current","focus","tableHeader","whiteSpace","fontWeight","tableHeaderExtended","palette","primary","light","dark","tableContainer","overflow","maxHeight","tsvDialogOpen","setTsvDialogOpen","getItem","extendedMode","setExtendedMode","deleteAllDialog","setDeleteAllDialog","deleteDialog","setDeleteDialog","sortedData","getSortedData","orderBy","order","IconButton","addItem","Table","size","stickyHeader","TableHead","TableRow","filter","expert","formulaDisabled","isChecked","indeterminate","trueFound","falseFound","k","tooltip","newData","changeData","sorted","TableSortLabel","active","isAsc","onChangeOrder","TableBody","hover","ey","lastTime","sessionStorage","Date","deleteItem","disableDialogs","toISOString","prefix","startsWith","BaseRegisters","nativeField","struct","address2struct","bit","struct2address","byte","newItem","getFields","item1","item2","lastItem","role","splice","sortedItem1","sortedItem2","sort1","sort2","a1","a2","lang","getLanguage","Object","values","room","_id","common","getRooms","unshift","types","roles","multiDeviceId","address","parts","parseFloat","Math","floor","setState","Inputs","propTypes","PropTypes","object","isRequired","instance","number","adapterName","string","onError","func","onLoad","changed","bool","socket","Outputs","Marker","Dbs","tabs","component","TabOptions","TabInputs","TabOutputs","TabMarker","App","extendedProps","encryptedFields","translations","require","moreLoaded","getForeignObjects","then","selectedTab","findIndex","loaded","background","default","AppBar","Tabs","getSelectedTab","selectTab","scrollButtons","Tab","icon","data-name","isIFrame","tabContentIFrame","tabContent","TabComponent","errorText","onLoadConfig","cb","updateNativeValue","getIsChanged","renderError","renderSaveCloseButtons","GenericApp","root","minHeight","Boolean","location","hostname","themeName","getThemeName","version","build","ReactDOM","render","onThemeChange","_theme","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"o0wCA+DIA,EAAY,SAAUC,GACtB,IAAQC,EAAoBC,cAApBD,gBACFE,EAASC,uBAAY,SAAAC,GACvBL,EAAMM,SAASD,GACfJ,EAAgBM,IAAKC,EAAE,mBACxB,IAED,EAAoDC,YAAY,CAACN,SAAQO,OAAQV,EAAMU,SAAhFC,EAAP,EAAOA,aAAcC,EAArB,EAAqBA,cAAeC,EAApC,EAAoCA,aAEpC,OAAO,eAACC,EAAA,EAAD,CAAaC,MAAO,CAACC,QAAS,EAAGC,aAAc,IAA/C,UACL,cAACC,EAAA,EAAD,CAAYC,QAAQ,KAAKC,cAAY,EAArC,SAAwCb,IAAKC,EAAER,EAAMqB,SACrD,gDAASV,KAAT,IAAyBW,UAAWtB,EAAMuB,QAAQC,UAAWT,MAAOF,EAAe,CAACY,gBAAiB,wBAA0B,CAACC,OAAQ,WAAxI,UACI,qCAAWd,MAEPC,EACA,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e,UAA7BlK,OAAOiK,SAASC,UAEhBlK,OAAOiK,SAASC,SAASxU,MACvB,2D,mCCNNsK,OAAO4G,YAAc,KACrB,IAAIuD,GAAYvK,KAAMwK,eAEtB9T,QAAQC,IAAR,mBAAwByJ,OAAO4G,YAA/B,YAA8CyD,KAA9C,yBAAsEF,GAAtE,MAEA,SAASG,IACL,OAAOC,IAASC,OACZ,cAAC,IAAD,CAAkBtP,MAAOA,KAAMiP,IAA/B,SACI,cAAC,GAAD,CACIM,cAAe,SAAAC,GACXP,GAAYO,EACZJ,SAIZK,SAASC,eAAe,SAchCN,GDwFM,kBAAmBO,WACrBA,UAAUC,cAAcC,MAAM3C,MAAK,SAAA4C,GACjCA,EAAaC,kB","file":"static/js/main.ce479555.chunk.js","sourcesContent":["import {Component, useCallback} from 'react';\r\nimport {useDropzone} from 'react-dropzone';\r\nimport { useSnackbar } from 'notistack';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Typography from '@material-ui/core/Typography';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport Input from '@material-ui/core/Input';\r\nimport InputLabel from '@material-ui/core/InputLabel';\r\nimport InputAdornment from '@material-ui/core/InputAdornment';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport Box from '@material-ui/core/Box';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport connectionInputs from '../data/optionsConnection';\r\nimport generalInputs from '../data/optionsGeneral';\r\n\r\nconst styles = theme => ({\r\n    optionsSelect: {\r\n        width: 280\r\n    },\r\n    optionsTextField: {\r\n        width: 280\r\n    },\r\n    optionContainer: {\r\n    },\r\n    optionsContainer: {\r\n        width: `calc(100% - ${theme.spacing(4)}px)`,\r\n        padding: theme.spacing(2),\r\n        marginBottom: 20,\r\n        display: 'inline-block',\r\n        textAlign: 'left'\r\n    },\r\n    optionsGrid: {\r\n        textAlign: 'center',\r\n        padding: theme.spacing(2),\r\n    },\r\n    optionsLabel: {\r\n        fontSize: 12,\r\n    },\r\n    header: {\r\n        fontSize: 24,\r\n    },\r\n    fileInput: {\r\n        textAlign: 'center',\r\n        display: 'inline-block',\r\n        height: 80,\r\n        width: 200,\r\n        border: '2px dashed #777',\r\n        borderRadius: 10,\r\n        marginTop: 12,\r\n        padding: 4\r\n    }\r\n});\r\n\r\nlet FileInput = function (props) {\r\n    const { enqueueSnackbar } = useSnackbar();\r\n    const onDrop = useCallback(acceptedFiles => {\r\n        props.onChange(acceptedFiles);\r\n        enqueueSnackbar(I18n.t('Data updated'));\r\n    }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n      const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop, accept: props.accept});\r\n\r\n      return <FormControl style={{padding: 3, paddingRight: 40}}>\r\n        <Typography variant=\"h6\" gutterBottom>{ I18n.t(props.label)}</Typography>\r\n        <div {...getRootProps()} className={props.classes.fileInput} style={isDragActive ? {backgroundColor: 'rgba(0, 255, 0, 0.1)'} : {cursor: 'pointer'}}>\r\n            <input {...getInputProps()} />\r\n            {\r\n                isDragActive ?\r\n                <p>{I18n.t('Drop the file here ...')}</p> :\r\n                <p>{I18n.t(`Drag 'n' drop file here, or click to select file`)}</p>\r\n            }\r\n        </div>\r\n    </FormControl>;\r\n};\r\n\r\nclass Options extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n\r\n        this.state = {\r\n        };\r\n    }\r\n\r\n    getValue(name) {\r\n        if (name === 's7logo') {\r\n            return this.props.native.params.slot === null;\r\n        }\r\n        return this.props.native.params[name];\r\n    }\r\n\r\n    inputDisabled = input => {\r\n        return false;\r\n    }\r\n\r\n    inputDisplay = input => {\r\n        if (this.props.native.params.slot === null) {\r\n            if (['rack', 'slot'].includes(input.name)) {\r\n                return false;\r\n            }\r\n        } else {\r\n            if (['localTSAP', 'remoteTSAP'].includes(input.name)) {\r\n                return false;\r\n            }\r\n        }\r\n        if (input.name === 'timeOffset') {\r\n            return ['summer', 'offset'].includes(this.props.native.params.timeFormat);\r\n        }\r\n        return true;\r\n    }\r\n\r\n    getInputsBlock(inputs, title) {\r\n        return <Paper className={this.props.classes.optionsContainer}>\r\n            <Typography variant=\"h4\" gutterBottom className={this.props.classes.header}>{I18n.t(title)}</Typography>\r\n            <Grid container spacing={2} direction=\"column\">\r\n                {inputs.map(input => {\r\n                    if (!this.inputDisplay(input)) {\r\n                        return null;\r\n                    }\r\n                    if (input.type === 'checkbox') {\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}>\r\n                            <FormControlLabel\r\n                                label={I18n.t(input.title)}\r\n                                control={<Checkbox\r\n                                    label={I18n.t(input.title)}\r\n                                    className={this.props.classes.optionsCheckbox}\r\n                                    disabled={this.inputDisabled(input)}\r\n                                    checked={this.getValue(input.name)}\r\n                                    onChange={e => this.changeParam(input.name, e.target.checked)}\r\n                                />}/> {input.dimension ? I18n.t(input.dimension) : null}</Grid>;\r\n                    } else if (input.type === 'select') {\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}>\r\n                            <FormControl>\r\n                                <InputLabel shrink>{I18n.t(input.title)}</InputLabel>\r\n                                <Select\r\n                                    className={this.props.classes.optionsSelect}\r\n                                    displayEmpty\r\n                                    disabled={this.inputDisabled(input)}\r\n                                    value={this.getValue(input.name)}\r\n                                    onChange={e => this.changeParam(input.name, e.target.value)}\r\n                                >\r\n                                    {input.options.map(option =>\r\n                                        <MenuItem key={option.value} value={option.value}>{option.title}</MenuItem>\r\n                                    )}\r\n                                </Select>\r\n                            </FormControl> {input.dimension ? I18n.t(input.dimension) : null}\r\n                        </Grid>;\r\n                    } else if (input.type === 'hex') {\r\n                        let value = parseInt(this.getValue(input.name)) ? parseInt(this.getValue(input.name)) : 0;\r\n                        let top = (value >> 8) & 0xFF;\r\n                        let bottom = value & 0xFF;\r\n\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}>\r\n                            <InputLabel className={this.props.classes.optionsLabel}>{I18n.t(input.title)}</InputLabel>\r\n                            <Input\r\n                                title={I18n.t('Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic')}\r\n                                style={{width: '6ch'}}\r\n                                value={top.toString(16) ? top.toString(16).toUpperCase() : 0}\r\n                               onChange={e => {\r\n                                   if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n                                       return;\r\n                                   }\r\n                                   this.changeParam(input.name, (parseInt(e.target.value, 16) << 8) | bottom);\r\n                               }}\r\n                            />\r\n                            <Input\r\n                                title={I18n.t('Rack and slot: [Rack * 0x20 + Slot]')}\r\n                                style={{marginLeft: 5, width: '6ch'}}\r\n                                value={bottom.toString(16) ? bottom.toString(16).toUpperCase() : 0}\r\n                                onChange={e => {\r\n                                    if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n                                        return;\r\n                                    }\r\n                                    this.changeParam(input.name, (top << 8) | parseInt(e.target.value, 16));\r\n                                }}\r\n                            />\r\n                        </Grid>;\r\n                    } else {\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}><TextField\r\n                            type={input.type}\r\n                            label={I18n.t(input.title)}\r\n                            className={this.props.classes.optionsTextField}\r\n                            disabled={this.inputDisabled(input)}\r\n                            value={this.getValue(input.name)}\r\n                            InputProps={{\r\n                                endAdornment: input.dimension ?\r\n                                    <InputAdornment position=\"end\">{I18n.t(input.dimension)}</InputAdornment> : null\r\n                            }}\r\n                            onChange={e => this.changeParam(input.name, e.target.value)}\r\n                        /></Grid>;\r\n                    }\r\n                })}\r\n            </Grid>\r\n        </Paper>;\r\n    }\r\n\r\n    getImportsBlock() {\r\n        return <><Paper className={this.props.classes.optionsContainer}>\r\n            <Typography variant=\"h4\" gutterBottom className={this.props.classes.header}>{I18n.t('Import')}</Typography>\r\n                <Box className={this.props.classes.optionContainer}>\r\n                <FileInput classes={this.props.classes} onChange={this.loadSymbols} label=\"Load symbols\" accept=\".asc\"/>\r\n                <FileInput classes={this.props.classes} onChange={this.addDb} label=\"Add DB\" accept=\".csv,.prn\"/>\r\n                </Box>\r\n        </Paper></>;\r\n    }\r\n\r\n    render() {\r\n        return <form className={ this.props.classes.tab }>\r\n            <Grid container spacing={2} >\r\n                <Grid item xs={12} md={6} className={ this.props.classes.optionsGrid }>\r\n                    {this.getInputsBlock(connectionInputs, 'PLC Connection')}\r\n                    {this.getImportsBlock()}\r\n                </Grid>\r\n                <Grid item xs={12} md={6} className={ this.props.classes.optionsGrid }>{this.getInputsBlock(generalInputs, 'General')}</Grid>\r\n            </Grid>\r\n        </form>;\r\n    }\r\n\r\n    changeParam = (name, value) => {\r\n        let native = JSON.parse(JSON.stringify(this.props.native));\r\n        if (name === 's7logo') {\r\n            if (value) {\r\n                native.params.localTSAP = '';\r\n                native.params.remoteTSAP = '';\r\n                native.params.rack = null;\r\n                native.params.slot = null;\r\n            } else {\r\n                native.params.localTSAP = null;\r\n                native.params.remoteTSAP = null;\r\n                native.params.rack = '';\r\n                native.params.slot = '';\r\n            }\r\n        } else {\r\n            native.params[name] = value;\r\n        }\r\n        this.props.changeNative(native);\r\n    }\r\n\r\n    loadSymbols = e => {\r\n        let native = JSON.parse(JSON.stringify(this.props.native));\r\n        const reader = new FileReader();\r\n\r\n        reader.onload = e => {\r\n            const localData = {\r\n                inputs:  [],\r\n                outputs: [],\r\n                markers: []\r\n//                counter: [],\r\n//                timer: [],\r\n//                dbs: []\r\n            };\r\n            let text = reader.result;\r\n\r\n            text = text.split('126,');\r\n            text.forEach(line => {\r\n                const typ = line.slice(23, 29).replace(/( )/g, '');\r\n\r\n                const d = {\r\n                    Name:         line.slice(0, 23).replace(/( ){2,}/g, ''),\r\n                    Address:      line.slice(29, 36).replace(/( )/g, ''),\r\n                    Type:         line.slice(36, 41).replace(/( )/g, ''),\r\n                    Description:  line.slice(46, 126).replace(/( ){2,}/, ''),\r\n                    Unit:         '',\r\n//                    Role:         '',\r\n//                    Room:         '',\r\n                    poll:         true,\r\n                    RW:           false,\r\n                    WP:           false\r\n                };\r\n\r\n//                    if (typ == 'E' || typ == 'EB' ||typ == 'EW' ||typ == 'ED'||typ == 'PEB'||typ == 'PEW'||typ == 'PED')data.inputs.push(d);\r\n//                    if (typ == 'A' || typ == 'AB' ||typ == 'AW' ||typ == 'AD'||typ == 'PAB'||typ == 'PAW'||typ == 'PAD')data.outputs.push(d);\r\n                if (typ === 'E' || typ === 'EB' || typ === 'EW' || typ === 'ED') localData.inputs.push(d);\r\n                if (typ === 'A' || typ === 'AB' || typ === 'AW' || typ === 'AD') localData.outputs.push(d);\r\n                if (typ === 'M' || typ === 'MB' || typ === 'MW' || typ === 'MD') localData.markers.push(d);\r\n//                if (typ == 'C')data.counter.push(d);\r\n//                if (typ == 'T')data.timer.push(d);\r\n//                if (typ == 'DB')data.dbs.push(d);\r\n            });\r\n\r\n            ['inputs', 'outputs', 'markers'].forEach(table => {\r\n                native[table] = localData[table];\r\n            });\r\n            this.props.changeNative(native);\r\n        };\r\n\r\n        reader.readAsText(e[0], 'ISO-8859-1');\r\n    }\r\n\r\n    addDb = e => {\r\n        let native = JSON.parse(JSON.stringify(this.props.native));\r\n        const reader = new FileReader();\r\n\r\n        reader.onload = e => {\r\n            setTimeout(function () {\r\n                const text       = reader.result;\r\n                const changes  = {\r\n                    inputs: false,\r\n                    outputs: false,\r\n                    markers: false,\r\n                    dbs: false\r\n                };\r\n                const newParts = {\r\n                    inputs:     native.inputs || [],\r\n                    outputs:    native.outputs || [],\r\n                    markers:    native.markers || [],\r\n                    dbs:        native.dbs || []\r\n                };\r\n\r\n                if (text.indexOf('Leseanforderung') !== -1) {\r\n                    // Graphpic format\r\n                    const lines = text.replace(/\\r\\n/g, '\\n').split('\\n');\r\n                    const mapping = {\r\n                        'Name':             {attr: 'Name'},\r\n                        'Typ':              {attr: ''},\r\n                        'Operand':          {attr: 'Address',       process: f => {\r\n                            // DB 504.DBW 1462 => DB504 1462\r\n                            f = f.trim();\r\n                            const db     = f.match(/^DB (\\d+)/);\r\n                            if (!db) {\r\n                                // M\r\n                                // MB\r\n                                let m = f.match(/^MB? (\\d+)\\.?(\\d+)?$/);\r\n                                if (m) {\r\n                                    return 'M ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n                                } else {\r\n                                    m = f.match(/^AB? (\\d+)\\.?(\\d+)?$/);\r\n                                    if (m) {\r\n                                        return 'OUT ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n                                    } else {\r\n                                        m = f.match(/^EB? (\\d+)\\.?(\\d+)?$/);\r\n                                        if (m) {\r\n                                            return 'IN ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n                                        } else {\r\n                                            return f;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            const offset = f.match(/(\\d+).?(\\d+)?$/);\r\n                            if (db && offset) {\r\n                                return `DB${db[1]} ${offset[1]}${offset[2] !== undefined ? '.' + offset[2] : ''}`;\r\n                            } else {\r\n                                return f;\r\n                            }\r\n                        }},\r\n                        'SPS-Format':       {attr: 'Type',          process: function (f) {return f;} },\r\n                        'Byteanzahl':       {attr: 'Length',        process: function (f) {return parseInt(f, 10);} },\r\n                        'Zugriff':          {attr: 'RW',            process: function (f) {return f !== 'read';} },\r\n                        'Leseanforderung':  {attr: 'poll',          process: function (f) {return f === 'zyklisch';} },\r\n                        'AktZeit (ms)':     {attr: ''},\r\n                        'Kommentar':        {attr: 'Description'},\r\n                        'Clients (Anzahl)': {attr: ''}\r\n                    };\r\n                    // First line\r\n                    // \"Name\",\"Typ\",\"Operand\",\"SPS-Format\",\"Byteanzahl\",\"Zugriff\",\"Leseanforderung\",\"AktZeit (ms)\",\"Kommentar\",\"Clients (Anzahl)\"\r\n                    let sFields = lines[0].split(',');\r\n                    // create mapping\r\n                    const fields = [];\r\n                    for (let m = 0; m < sFields.length; m++) {\r\n                        sFields[m] = sFields[m].replace(/\"/g, '');\r\n                        fields.push(mapping[sFields[m]]);\r\n                    }\r\n                    for (let l = 1; l < lines.length; l++) {\r\n                        lines[l] = lines[l].trim();\r\n                        if (!lines[l]) continue;\r\n                        sFields = lines[l].trim().split(',');\r\n                        let obj = {\r\n                            Type:           'ARRAY',\r\n                            Unit:           '',\r\n                            Role:           '',\r\n                            Room:           '',\r\n                            poll:           true,\r\n                            RW:             false,\r\n                            WP:             false\r\n                        };\r\n                        for (let f = 0; f < fields.length; f++) {\r\n                            if (!fields[f].attr) {\r\n                                continue;\r\n                            }\r\n                            if (!sFields[f]) {\r\n                                console.log('error');\r\n                                break;\r\n                            }\r\n                            sFields[f] = sFields[f].replace(/\"/g, '');\r\n                            obj[fields[f].attr] = fields[f].process ? fields[f].process(sFields[f]) : sFields[f];\r\n\r\n                            if (obj.Name.match(/^@/)) {\r\n                                obj = null;\r\n                                break;\r\n                            }\r\n                        }\r\n                        if (obj) {\r\n                            if (obj.Type === 'BYTE' && obj.Length !== 1) {\r\n                                obj.Type = 'ARRAY';\r\n                            }\r\n                            if (obj.Type === 'CHAR') {\r\n                                obj.Type = 'STRING';\r\n                            }\r\n                            if (obj.Type === 'BYTE' || obj.Type === 'BOOL' || obj.Type === 'INT') {\r\n                                obj.Length = '';\r\n                            }\r\n                            let _attr;\r\n                            if (obj.Address.match(/^DB/)) {\r\n                                _attr = 'dbs';\r\n                            } else if (obj.Address.match(/^IN/)) {\r\n                                obj.Address = obj.Address.replace(/^IN\\s?/, '');\r\n                                _attr = 'inputs';\r\n                            } else if (obj.Address.match(/^OUT/)) {\r\n                                _attr = 'outputs';\r\n                                obj.Address = obj.Address.replace(/^OUT\\s?/, '');\r\n                            } else if (obj.Address.match(/^M/)) {\r\n                                _attr = 'markers';\r\n                                obj.Address = obj.Address.replace(/^M\\s?/, '');\r\n                            } else {\r\n                                console.error('Unknown TYPE: ' + obj.Address);\r\n                                continue;\r\n                            }\r\n                            // try to find same address\r\n                            for (let aaa = 0; aaa < newParts[_attr].length; aaa++) {\r\n                                if (newParts[_attr][aaa].Address === obj.Address) {\r\n                                    newParts[_attr][aaa] = obj;\r\n                                    changes[_attr] = true;\r\n                                    obj = null;\r\n                                    break;\r\n                                }\r\n                            }\r\n                            if (obj) {\r\n                                changes[_attr] = true;\r\n                                newParts[_attr].push(obj);\r\n                            }\r\n                        }\r\n                    }\r\n                } else {\r\n                    const mm = text.match(/(DB)[0-9]+\\s-\\s/g);\r\n                    const db = mm ? mm[0].replace(' - ', '') : '';\r\n                    const vv = text.split('STRUCT');\r\n\r\n                    const struck = vv[1] ? vv[1].split('=')[0].split('\\n') : [];\r\n\r\n                    struck.forEach((item) => {\r\n                        if (item.length > 10) {\r\n                            const x = item.split(/\\s+/g);\r\n                            x.shift();\r\n\r\n                            let obj = {\r\n                                Address:        db + ' ' + x.shift(),\r\n                                Name:           x.shift(),\r\n                                Type:           x.shift(),\r\n                                dec:            x.shift(),\r\n                                Description:    x.join(' '),\r\n                                Unit:           '',\r\n                                Role:           '',\r\n                                Room:           '',\r\n                                poll:           true,\r\n                                RW:             false,\r\n                                WP:             false\r\n                            };\r\n\r\n                            // try to find same address\r\n                            for (let aaa = 0; aaa < newParts.dbs.length; aaa++) {\r\n                                if (newParts.dbs[aaa].Address === obj.Address) {\r\n                                    newParts.dbs[aaa] = obj;\r\n                                    changes.dbs = true;\r\n                                    obj = null;\r\n                                    break;\r\n                                }\r\n                            }\r\n                            if (obj) {\r\n                                changes.dbs = true;\r\n                                newParts.dbs.push(obj);\r\n                            }\r\n                        }\r\n                    });\r\n                }\r\n                for (const attr in newParts) {\r\n                    if (!newParts.hasOwnProperty(attr)) {\r\n                        continue;\r\n                    }\r\n                    newParts[attr].sort((a, b) => {\r\n                        const aDB = a.Address.match(/^D?B?\\s?(\\d+)/);\r\n                        const bDB = b.Address.match(/^D?B?\\s?(\\d+)/);\r\n                        if (!aDB) return -1;\r\n                        if (!bDB) return 1;\r\n                        if (parseInt(aDB[1], 10) > parseInt(bDB[1], 10)) return 1;\r\n                        if (parseInt(aDB[1], 10) < parseInt(bDB[1], 10)) return -1;\r\n                        const aOffset = a.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n                        const bOffset = b.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n                        if (!aOffset) return -1;\r\n                        if (!bOffset) return 1;\r\n                        if (parseInt(aOffset[1], 10) > parseInt(bOffset[1], 10)) return 1;\r\n                        if (parseInt(aOffset[1], 10) < parseInt(bOffset[1], 10)) return -1;\r\n                        if (aOffset[2] === undefined && bOffset[2] !== undefined) return 1;\r\n                        if (bOffset[2] === undefined && aOffset[2] !== undefined) return -1;\r\n                        if (aOffset[2] === undefined && bOffset[2] === undefined) return 0;\r\n                        if (parseInt(aOffset[2], 10) > parseInt(bOffset[2], 10)) return 1;\r\n                        if (parseInt(aOffset[2], 10) < parseInt(bOffset[1], 10)) return -1;\r\n                        return 0;\r\n                    });\r\n                }\r\n                if (changes.dbs) {\r\n                    native.dbs = newParts.dbs;\r\n                }\r\n                if (changes.inputs) {\r\n                    native.inputs = newParts.inputs;\r\n                }\r\n                if (changes.outputs) {\r\n                    native.outputs = newParts.outputs;\r\n                }\r\n                if (changes.markers) {\r\n                    native.markers = newParts.markers;\r\n                }\r\n                console.log(native);\r\n                //this.props.changeNative(native);\r\n            }, 200);\r\n        };\r\n\r\n        reader.readAsText(e[0], 'ISO-8859-1');\r\n    }\r\n}\r\n\r\nOptions.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default withStyles(styles)(Options);\r\n","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport { tsv2json, json2tsv } from 'tsv-json';\r\nimport { useSnackbar } from 'notistack';\r\nimport AceEditor from \"react-ace\";\r\nimport copy from 'copy-to-clipboard';\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport SaveIcon from '@material-ui/icons/Save';\r\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\r\n\r\nconst styles = theme => ({\r\n    tsvEditor: {\r\n        width: '100%',\r\n        height: 400\r\n    },\r\n    tsvEditorTextarea: {\r\n        fontFamily: 'monospace'\r\n    }\r\n});\r\n\r\nconst TsvDialog = props => {\r\n    const [tsv, setTsv] = useState('');\r\n    useEffect(() => {\r\n        let tsvResult = [];\r\n        tsvResult.push(props.fields.map(field => field.name));\r\n        props.data.forEach(item =>\r\n            tsvResult.push(props.fields.map(field => item[field.name] !== undefined && item[field.name] !== null ? item[field.name].toString() : ''))\r\n        );\r\n        setTsv(json2tsv(tsvResult));\r\n    }, [props.open]); // eslint-disable-line react-hooks/exhaustive-deps\r\n    const { enqueueSnackbar } = useSnackbar();\r\n\r\n    if (!props.open) {\r\n        return null;\r\n    }\r\n\r\n    const saveTsv = () => {\r\n        let data = tsv2json(tsv);\r\n        let fields = data.shift();\r\n        let success = true;\r\n        let errors = [];\r\n        for (let index in props.fields) {\r\n            if (props.fields[index].name !== fields[index]) {\r\n                errors.push(<>No field <i>{props.fields[index].name}</i> in position <i>{parseInt(index) + 1}</i>!</>);\r\n                success = false;\r\n            }\r\n        }\r\n\r\n        data = data.map((itemValues, itemIndex) => {\r\n            let item = {};\r\n            for (let index in props.fields) {\r\n                if (props.fields[index].type === 'select' && !props.fields[index].options.map(option => option.value).includes(itemValues[index])) {\r\n                    errors.push(<>Value <i>{itemValues[index]}</i> is wrong for field <i>{props.fields[index].name}</i> in position <i>{parseInt(itemIndex) + 1}</i>!</>);\r\n                    success = false;\r\n                }\r\n                if (props.fields[index].type === 'checkbox') {\r\n                    itemValues[index] = itemValues[index] === 'true';\r\n                }\r\n                item[props.fields[index].name] = itemValues[index];\r\n            }\r\n            return item;\r\n        });\r\n\r\n        if (!success) {\r\n            enqueueSnackbar(<div>{errors.map((error, index) => <div key={index}>{error}</div>)}</div>, { variant: 'error' });\r\n            return;\r\n        }\r\n        props.save(data);\r\n        props.onClose();\r\n    };\r\n\r\n    return <Dialog\r\n        open={props.open}\r\n        onClose={props.onClose}\r\n        maxWidth=\"lg\"\r\n        fullWidth\r\n    >\r\n        <DialogTitle>{I18n.t('Edit data as TSV')}</DialogTitle>\r\n        <DialogContent>\r\n            <DialogContentText>{I18n.t('You can copy, paste and edit data as TSV.')}</DialogContentText>\r\n            <div>\r\n                <AceEditor\r\n                    onChange={e => setTsv(e)}\r\n                    height=\"400px\"\r\n                    showPrintMargin={false}\r\n                    value={tsv}\r\n                    className={props.classes.tsvEditor}\r\n                    width=\"100%\"\r\n                    setOptions={{firstLineNumber: 0}}\r\n                    mode={null}\r\n                />\r\n            </div>\r\n        </DialogContent>\r\n        <DialogActions>\r\n            <Button variant=\"outlined\" color=\"primary\" onClick={() => {\r\n                //Utils.copyToClipboard(tsv);\r\n                copy(tsv);\r\n                enqueueSnackbar(I18n.t('TSV was copied to clipboard'));\r\n            }} startIcon={<FileCopyIcon />}>{I18n.t('Copy to clipboard')}</Button>\r\n            <Button variant=\"contained\" color=\"primary\" onClick={saveTsv} startIcon={<SaveIcon />}>{I18n.t('Import')}</Button>\r\n            <Button variant=\"contained\" onClick={props.onClose} startIcon={<ClearIcon />}>{I18n.t('Close')}</Button>\r\n        </DialogActions>\r\n    </Dialog>\r\n};\r\n\r\nTsvDialog.propTypes = {\r\n    open: PropTypes.bool,\r\n    onClose: PropTypes.func,\r\n    classes: PropTypes.object,\r\n    save: PropTypes.func,\r\n    fields: PropTypes.array,\r\n    data: PropTypes.array\r\n};\r\n\r\nexport default withStyles(styles)(TsvDialog);","import PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteAllDialog = (props) => {\r\n    return props.open ? <Dialog open={props.open} onClose={props.onClose}>\r\n        <DialogTitle>{I18n.t('Delete all items')}</DialogTitle>\r\n        <DialogContent>\r\n            <DialogContentText>{I18n.t('Are you sure to delete all items?')}</DialogContentText>\r\n            <DialogActions>\r\n                <Button variant=\"contained\" color=\"secondary\" startIcon={<DeleteIcon />} onClick={() => {\r\n                    props.action();\r\n                    props.onClose();\r\n                }}>{I18n.t('Delete all items')}</Button>\r\n                <Button variant=\"contained\" onClick={props.onClose} startIcon={<ClearIcon />}>{I18n.t('Cancel')}</Button>\r\n            </DialogActions>\r\n        </DialogContent>\r\n    </Dialog> : null;\r\n}\r\n\r\nDeleteAllDialog.propTypes = {\r\n    open: PropTypes.bool,\r\n    action: PropTypes.func,\r\n    onClose: PropTypes.func,\r\n    classes: PropTypes.object,\r\n}\r\n\r\nexport default DeleteAllDialog;","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteDialog = (props) => {\r\n    const [disableWarnings, setDisableWarnings] = useState(false);\r\n    useEffect(() => {\r\n        setDisableWarnings(false);\r\n    }, [props.open]);\r\n\r\n    return props.open ? <Dialog open={props.open} onClose={props.onClose}>\r\n        <DialogTitle>{I18n.t('Delete item')}</DialogTitle>\r\n        <DialogContent>\r\n            <DialogContentText>{I18n.t('Are you sure to delete item with address \"%s\"?', props.item._address)}</DialogContentText>\r\n            <DialogContentText><FormControlLabel\r\n                label={I18n.t('Don\\'t show this message in 5 minutes')}\r\n                control={<Checkbox\r\n                    checked={disableWarnings}\r\n                    onChange={e => setDisableWarnings(e.target.checked)}\r\n            />}/></DialogContentText>\r\n            <DialogActions>\r\n                <Button variant=\"contained\" color=\"secondary\" startIcon={<DeleteIcon />} onClick={() => {\r\n                    props.action(disableWarnings);\r\n                    props.onClose();\r\n                }}>{I18n.t('Delete')}</Button>\r\n                <Button variant=\"contained\" onClick={props.onClose} startIcon={<ClearIcon />}>{I18n.t('Cancel')}</Button>\r\n            </DialogActions>\r\n        </DialogContent>\r\n    </Dialog> : null;\r\n}\r\n\r\nDeleteDialog.propTypes = {\r\n    open: PropTypes.bool,\r\n    onClose: PropTypes.func,\r\n    classes: PropTypes.object,\r\n    action: PropTypes.func,\r\n    item: PropTypes.object,\r\n}\r\n\r\nexport default DeleteDialog;","import { useState, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Table from '@material-ui/core/Table';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport TableSortLabel from '@material-ui/core/TableSortLabel';\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport AddIcon from '@material-ui/icons/Add';\r\nimport ImportExport from '@material-ui/icons/ImportExport';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nimport ExpertIcon from '@iobroker/adapter-react/icons/IconExpert';\r\nimport TextWithIcon from '@iobroker/adapter-react/Components/TextWithIcon';\r\nimport SelectWithIcon from '@iobroker/adapter-react/Components/SelectWithIcon';\r\n\r\nimport TsvDialog from './TsvDialog';\r\nimport DeleteAllDialog from './DeleteAllDialog';\r\nimport DeleteDialog from './DeleteDialog';\r\n\r\nconst styles = theme => ({\r\n    tableHeader: {\r\n        whiteSpace: 'nowrap',\r\n        fontWeight: 'bold',\r\n        fontSize: '80%',\r\n        padding: '0px 8px'\r\n    },\r\n    tableHeaderExtended: {\r\n        color: theme.palette.type === 'dark' ? theme.palette.primary.light : theme.palette.primary.dark\r\n    },\r\n    tableCell: {\r\n        whiteSpace: 'nowrap',\r\n        fontSize: '80%',\r\n        padding: '0px 8px'\r\n    },\r\n    tableContainer: {\r\n        overflow: 'auto',\r\n        maxHeight: 'calc(100vh - 180px)'\r\n    },\r\n    tableTextField: {\r\n        fontSize: '80%'\r\n    },\r\n    tableSelect: {\r\n        fontSize: '80%'\r\n    },\r\n    tableTextFieldContainer: {\r\n        width: '100%'\r\n    },\r\n    tableSelectContainer: {\r\n        width: '100%'\r\n    },\r\n    nonEditMode: {\r\n        cursor: 'pointer'\r\n    }\r\n});\r\n\r\nconst DataCell = props => {\r\n    const sortedItem = props.sortedItem;\r\n    const field = props.field;\r\n    const editMode = props.editMode;\r\n    const setEditMode = props.setEditMode;\r\n\r\n    const ref = useRef();\r\n    /*useEffect(() => {\r\n         if (props.editMode) {\r\n             // ref.current && ref.current.focus()\r\n             //window.setTimeout(() => ref.current && ref.current.focus(), 1000);\r\n         }\r\n    }, [props.editMode])*/\r\n\r\n    let item = sortedItem.item;\r\n    let result;\r\n    if (field.type === 'checkbox') {\r\n        result = <Tooltip title={I18n.t(field.title)}>\r\n            <Checkbox\r\n                inputRef={ref}\r\n                className={props.classes.tableCheckbox}\r\n                checked={!!item[field.name]}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n                onChange={e => props.changeParam(sortedItem.$index, field.name, e.target.checked)}\r\n            />\r\n        </Tooltip>;\r\n    } else if (field.type === 'rooms') {\r\n        if (!editMode) {\r\n            result = <TextWithIcon list={props.rooms} value={item[field.name]} themeType={props.themeType}/>;\r\n        } else {\r\n            result = <SelectWithIcon\r\n                list={props.rooms}\r\n                allowNone={true}\r\n                value={item[field.name]}\r\n                dense={true}\r\n                themeType={props.themeType}\r\n                inputProps={{ref, className: props.classes.tableSelect}}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n                onChange={value => props.changeParam(sortedItem.$index, field.name, value)}\r\n                className={props.classes.tableSelectContainer}\r\n            />;\r\n        }\r\n    } else if (field.type === 'select') {\r\n        if (!editMode) {\r\n            let option = field.options.find(option => option.value === item[field.name]);\r\n            result = option ? option.title : '';\r\n        } else {\r\n            result = <Select\r\n                value={item[field.name]}\r\n                inputProps={{ref, className: props.classes.tableSelect}}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n                onChange={e => props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n                className={props.classes.tableSelectContainer}\r\n            >\r\n                {field.options.map(option =>\r\n                    <MenuItem key={option.value} value={option.value}>{option.title ? option.title : <i>{I18n.t('Nothing')}</i>}</MenuItem>\r\n                )}\r\n            </Select>;\r\n        }\r\n    } else {\r\n        if (!editMode) {\r\n            result = item[field.name] ? item[field.name] : null;\r\n        } else {\r\n            result = <TextField value={item[field.name]} className={props.classes.tableTextFieldContainer}\r\n                inputProps={{ref: ref, className: props.classes.tableTextField}}\r\n                type={field.type}\r\n                onChange={e => props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n            />;\r\n        }\r\n    }\r\n\r\n    return <TableCell\r\n        className={Utils.clsx(props.classes.tableCell, !editMode && props.classes.nonEditMode)}\r\n        onClick={e => {\r\n            setEditMode(true);\r\n            window.localStorage.setItem('Modbus.editMode', 'true');\r\n            window.setTimeout(() => ref.current && ref.current.focus(), 100);\r\n        }}\r\n    >\r\n        {result}\r\n    </TableCell>;\r\n}\r\n\r\nconst RegisterTable = props => {\r\n    const [tsvDialogOpen, setTsvDialogOpen] = useState(false);\r\n    const [editMode, setEditMode] = useState(parseInt(window.localStorage.getItem('Modbus.editMode'), 10) || 0);\r\n    const [extendedMode, setExtendedMode] = useState(window.localStorage.getItem('Modbus.extendedMode') === 'true');\r\n    const [deleteAllDialog, setDeleteAllDialog] = useState({\r\n        open: false,\r\n        action: null,\r\n    });\r\n    const [deleteDialog, setDeleteDialog] = useState({\r\n        open: false,\r\n        item: null,\r\n        action: null,\r\n    });\r\n\r\n    let sortedData = props.getSortedData(props.data, props.orderBy, props.order);\r\n\r\n    return <div>\r\n        <div>\r\n            <Tooltip title={I18n.t('Add line')}>\r\n                <IconButton onClick={e => props.addItem()}>\r\n                    <AddIcon/>\r\n                </IconButton>\r\n            </Tooltip>\r\n            <Tooltip title={I18n.t('Edit as TSV (Tab separated values)')}>\r\n                <IconButton onClick={() => setTsvDialogOpen(true)}>\r\n                    <ImportExport/>\r\n                </IconButton>\r\n            </Tooltip>\r\n            <Tooltip title={I18n.t('Toggle extended mode')}>\r\n                <IconButton\r\n                    color={extendedMode ? 'primary' : 'inherit'}\r\n                    onClick={() => {\r\n                        window.localStorage.setItem('Modbus.extendedMode', extendedMode ? 'false' : 'true');\r\n                        setExtendedMode(!extendedMode);\r\n                    }}>\r\n                    <ExpertIcon/>\r\n                </IconButton>\r\n            </Tooltip>\r\n        </div>\r\n        <div className={props.classes.tableContainer}>\r\n            <Table size=\"small\"\r\n                   stickyHeader\r\n                   padding=\"none\"\r\n            >\r\n                <TableHead>\r\n                    <TableRow>\r\n                        {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field => {\r\n                            let isChecked = false;\r\n                            let indeterminate = false;\r\n                            let trueFound = false;\r\n                            let falseFound = false;\r\n                            for (let k in props.data) {\r\n                                if (props.data[k][field.name]) {\r\n                                    isChecked = true;\r\n                                    trueFound = true;\r\n                                } else {\r\n                                    isChecked = false;\r\n                                    falseFound = true;\r\n                                }\r\n\r\n                                if (trueFound && falseFound) {\r\n                                    indeterminate = true;\r\n                                    isChecked = false;\r\n                                    break;\r\n                                }\r\n                            }\r\n\r\n                            return <TableCell\r\n                                key={field.name}\r\n                                style={{width: field.type === 'checkbox' ? 20 : field.width}}\r\n                                className={Utils.clsx(props.classes.tableHeader, field.expert && props.classes.tableHeaderExtended)}\r\n                                title={field.tooltip ? I18n.t(field.tooltip) : null}\r\n                            >\r\n                                {field.type === 'checkbox' ?\r\n                                    <Tooltip title={I18n.t('Change all')}>\r\n                                        <Checkbox\r\n                                            indeterminate={indeterminate}\r\n                                            checked={isChecked}\r\n                                            onChange={e => {\r\n                                                let newData = JSON.parse(JSON.stringify(props.data));\r\n                                                newData.forEach(item =>\r\n                                                    item[field.name] = e.target.checked);\r\n                                                props.changeData(newData);\r\n                                            }}\r\n                                        />\r\n                                    </Tooltip>\r\n                                    : null}\r\n                                {field.sorted ? <TableSortLabel\r\n                                    active={field.name === props.orderBy}\r\n                                    direction={props.order}\r\n                                    onClick={e => {\r\n                                        const isAsc = props.orderBy === field.name && props.order === 'asc';\r\n                                        props.onChangeOrder(field.name, isAsc ? 'desc' : 'asc');\r\n                                    }}\r\n                                >{I18n.t(field.title)}</TableSortLabel> : I18n.t(field.title)}\r\n                            </TableCell>\r\n                        })}\r\n                        <TableCell>\r\n                            <Tooltip title={I18n.t('Delete all')}>\r\n                                <div>\r\n                                    <IconButton\r\n                                        size=\"small\"\r\n                                        onClick={e => setDeleteAllDialog({\r\n                                            open: true,\r\n                                            action: () => props.changeData([]),\r\n                                        })}\r\n                                        disabled={!props.data.length}\r\n                                    >\r\n                                        <DeleteIcon/>\r\n                                    </IconButton>\r\n                                </div>\r\n                            </Tooltip>\r\n                        </TableCell>\r\n                    </TableRow>\r\n                </TableHead>\r\n                <TableBody>\r\n                    {\r\n                        sortedData.map(sortedItem =>\r\n                            <TableRow hover key={sortedItem.$index}>\r\n                                {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field =>\r\n                                    <DataCell\r\n                                        key={field.name}\r\n                                        themeType={props.themeType}\r\n                                        sortedItem={sortedItem}\r\n                                        field={field}\r\n                                        editMode={editMode === sortedItem.$index}\r\n                                        rooms={props.rooms}\r\n                                        setEditMode={() => setEditMode(sortedItem.$index)}\r\n                                        ey={field.name}\r\n                                        {...props}\r\n                                    />\r\n                                )}\r\n                                <TableCell>\r\n                                    <Tooltip title={I18n.t('Delete')}>\r\n                                        <div>\r\n                                            <IconButton size=\"small\" onClick={e => {\r\n                                                let lastTime = window.sessionStorage.getItem('disableDeleteDialogs');\r\n                                                if (lastTime && (new Date() - new Date(lastTime)) < 1000 * 60 * 5) {\r\n                                                    props.deleteItem(sortedItem.$index);\r\n                                                    return;\r\n                                                }\r\n                                                setDeleteDialog({\r\n                                                    open: true,\r\n                                                    action: disableDialogs => {\r\n                                                        if (disableDialogs) {\r\n                                                            window.sessionStorage.setItem('disableDeleteDialogs', (new Date()).toISOString());\r\n                                                        }\r\n                                                        props.deleteItem(sortedItem.$index);\r\n                                                    },\r\n                                                    item: sortedItem.item\r\n                                                })\r\n                                            }}>\r\n                                                <DeleteIcon/>\r\n                                            </IconButton>\r\n                                        </div>\r\n                                    </Tooltip>\r\n                                </TableCell>\r\n                            </TableRow>\r\n                        )\r\n                    }\r\n                </TableBody>\r\n            </Table>\r\n        </div>\r\n        {tsvDialogOpen ?\r\n            <TsvDialog\r\n                open={true}\r\n                save={data => {\r\n                    if (props.prefix) {\r\n                        data.forEach(line => {\r\n                            line.Address = (line.Address || '').toUpperCase();\r\n                            if (line.Address && !line.Address.startsWith(props.prefix)) {\r\n                                line.Address = props.prefix + line.Address;\r\n                            }\r\n                        });\r\n                    }\r\n                    props.changeData(data);\r\n                }}\r\n                onClose={() => setTsvDialogOpen(false)}\r\n                data={props.data}\r\n                fields={props.fields}\r\n            /> : null\r\n        }\r\n        <DeleteAllDialog\r\n            open={deleteAllDialog.open}\r\n            action={deleteAllDialog.action}\r\n            onClose={() => setDeleteAllDialog({\r\n                open: false,\r\n                action: null,\r\n            })}\r\n        />\r\n        <DeleteDialog\r\n            open={deleteDialog.open}\r\n            action={deleteDialog.action}\r\n            onClose={() => setDeleteDialog({\r\n                open: false,\r\n                action: null,\r\n                item: null\r\n            })}\r\n            item={deleteDialog.item}\r\n        />\r\n    </div>;\r\n}\r\n\r\nRegisterTable.propTypes = {\r\n    data: PropTypes.array,\r\n    fields: PropTypes.array,\r\n    classes: PropTypes.object,\r\n    addItem: PropTypes.func,\r\n    changeData: PropTypes.func,\r\n    deleteItem: PropTypes.func,\r\n    rooms: PropTypes.object,\r\n    formulaDisabled: PropTypes.bool,\r\n    getSortedData: PropTypes.func,\r\n    themeType: PropTypes.string,\r\n    prefix: PropTypes.string,\r\n};\r\n\r\nexport default withStyles(styles)(RegisterTable);","import {Component} from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Paper from '@material-ui/core/Paper';\r\n\r\nimport roles from '../data/roles';\r\nimport types from '../data/types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport RegisterTable from '../Components/RegisterTable';\r\n\r\nclass BaseRegisters extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.nativeField = '';\r\n        this.state = {\r\n            order: window.localStorage.getItem('Modbus.order') || 'asc',\r\n            orderBy: window.localStorage.getItem('Modbus.orderBy') || 'Address',\r\n        };\r\n    }\r\n\r\n    getRooms() {\r\n        const lang = I18n.getLanguage();\r\n        return this.props.rooms ? Object.values(this.props.rooms).map(room => ({\r\n            value: room._id,\r\n            title: typeof room.common.name === 'object' ? room.common.name[lang] : room.common.name\r\n        })) : [];\r\n    }\r\n\r\n    getFields() {\r\n        let rooms = this.getRooms();\r\n        rooms.unshift({value: '', title: ''});\r\n\r\n        let result = [\r\n            {name: 'Address', title: 'Address', type: 'text', sorted: true, width: 20},\r\n            {name: 'Name', title: 'Name', type: 'text', sorted: true},\r\n            {name: 'Description', title: 'Description', type: 'text', sorted: true},\r\n            {name: 'Type', title: 'Type', type: 'select', options: types, sorted: true},\r\n            {name: 'Length', title: 'Length', type: 'text', width: 20},\r\n            {name: 'Unit', title: 'Unit', type: 'text', width: 30},\r\n            {name: 'Role', title: 'Role', type: 'select', options: roles, sorted: true},\r\n            {name: 'Room', title: 'Room', type: 'rooms', options: rooms, sorted: true},\r\n            {name: 'poll', title: 'Poll', type: 'checkbox'},\r\n            {name: 'RW', title: 'RW', type: 'checkbox', expert: true},\r\n            {name: 'WP', title: 'WP', type: 'checkbox', expert: true},\r\n        ]\r\n\r\n        if (this.props.native.params.multiDeviceId) {\r\n            result.splice(1, 0,\r\n                {name: 'deviceId', title: 'Slave ID', type: 'number', sorted: true, width: 20},\r\n            );\r\n        }\r\n\r\n        return result;\r\n    }\r\n\r\n    address2struct(address) {\r\n        if (this.nativeField === 'dbs') {\r\n            const parts = address.split(' ');\r\n            const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);\r\n            if (parts[1].includes('.')) {\r\n                const a = parseFloat(parts[1]);\r\n                return {db, byte: Math.floor(a), bit: (a * 10) % 10};\r\n            } else {\r\n                return {db, byte: parseInt(parts[1], 10)};\r\n            }\r\n        } else {\r\n            if (address.includes('.')) {\r\n                const a = parseFloat(address);\r\n                return {byte: Math.floor(a), bit: (a * 10) % 10};\r\n            } else {\r\n                return {byte: parseInt(address, 10)};\r\n            }\r\n        }\r\n    }\r\n\r\n    struct2address(struct) {\r\n        if (struct.db !== undefined) {\r\n            if (struct.bit !== undefined) {\r\n                return 'DB' + struct.db + ' ' + struct.byte + '.' + struct.bit;\r\n            } else  {\r\n                return 'DB' + struct.db + ' ' + struct.byte;\r\n            }\r\n        } else if (struct.bit !== undefined) {\r\n            return struct.byte + '.' + struct.bit;\r\n        } else  {\r\n            return struct.byte;\r\n        }\r\n    }\r\n\r\n    changeParam = (index, name, value) => {\r\n        let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n        data[index][name] = value;\r\n        if (name === 'Type') {\r\n            if (['BOOL'].includes(value)) {\r\n                data[index].Length = 0.1;\r\n            } else\r\n            if (['', 'BYTE'].includes(value)) {\r\n                data[index].Length = 1;\r\n            } else\r\n            if (['WORD', 'INT', 'STRING', 'S5TIME'].includes(value)) {\r\n                data[index].Length = 2;\r\n            } else\r\n            if (['DWORD', 'DINT', 'REAL'].includes(value)) {\r\n                data[index].Length = 4;\r\n            } else\r\n            if (['S7TIME'].includes(value)) {\r\n                data[index].Length = 8;\r\n            } else\r\n            if (['S7STRING', 'ARRAY'].includes(value)) {\r\n                data[index].Length = 32;\r\n            }\r\n\r\n            if (value === 'BOOL') {\r\n                const struct = this.address2struct(data[index].Address);\r\n                if (struct.bit === undefined) {\r\n                    struct.bit = 0;\r\n                    data[index].Address = this.struct2address(struct);\r\n                }\r\n            } else {\r\n                const struct = this.address2struct(data[index].Address);\r\n                if (struct.bit !== undefined) {\r\n                    if (struct.bit > 0) {\r\n                        struct.byte++;\r\n                    }\r\n                    delete struct.bit;\r\n\r\n                    data[index].Address = this.struct2address(struct);\r\n                }\r\n            }\r\n        }\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    addItem = () => {\r\n        let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n        let newItem = {}\r\n        this.getFields().forEach(field => newItem[field.name] = '')\r\n        if (data.length) {\r\n            let sortedData = JSON.parse(JSON.stringify(data));\r\n            sortedData.sort((item1, item2) => item1.Address > item2.Address ? 1 : -1);\r\n            let lastItem = sortedData[sortedData.length - 1];\r\n            const struct = this.address2struct(lastItem.Address);\r\n            if (lastItem.Type === 'BOOL') {\r\n                struct.bit = struct.bit || 0;\r\n                struct.bit++;\r\n                if (struct.bit >= 8) {\r\n                    struct.bit = struct.bit % 8;\r\n                    struct.byte++;\r\n                }\r\n            } else {\r\n                delete struct.bit;\r\n                struct.byte += lastItem.Length;\r\n            }\r\n\r\n            if (struct.db !== undefined && struct.byte + lastItem.Length > 0xFFFF) {\r\n                struct.db++;\r\n                struct.byte = 0;\r\n                if (lastItem.Type === 'BOOL') {\r\n                    struct.bit = 0;\r\n                }\r\n            }\r\n\r\n            newItem.Address = this.struct2address(struct);\r\n            newItem.Type = lastItem.Type;\r\n            newItem.Length = lastItem.Length;\r\n            newItem.Unit = lastItem.Unit;\r\n            newItem.Role = lastItem.Role;\r\n            newItem.Room = lastItem.Room;\r\n            newItem.poll = lastItem.poll;\r\n            newItem.RW = lastItem.RW;\r\n            newItem.WP = lastItem.WP;\r\n        } else {\r\n            newItem.role = 'level';\r\n            newItem.Type = 'BOOL';\r\n            newItem.Length = '0.1';\r\n            newItem.poll = true;\r\n            if (this.nativeField === 'dbs') {\r\n                newItem.Address = 'DB1 0.0';\r\n            } else {\r\n                newItem.Address = '0.0';\r\n            }\r\n        }\r\n        data.push(newItem);\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    deleteItem = (index) => {\r\n        let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n        data.splice(index, 1);\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    changeData = (data) => {\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    getDisable = (index, name) => {\r\n        return name === 'Length' &&\r\n            !['STRING', 'S7STRING', 'ARRAY'].includes(this.props.native[this.nativeField][index].type);\r\n    }\r\n\r\n    getSortedData = (data, orderBy, order) => {\r\n        this.fields = this.fields || this.getFields();\r\n\r\n        data = data || this.props.native[this.nativeField];\r\n        orderBy = orderBy || this.state.orderBy;\r\n        order = order || this.state.order;\r\n        let sortedData = [];\r\n        data.forEach((item, index) => {sortedData[index] = {item, $index: index}});\r\n        const field = this.fields.find(item => item.name === orderBy);\r\n\r\n        sortedData.sort((sortedItem1, sortedItem2) => {\r\n            let sort1;\r\n            let sort2;\r\n            if (orderBy === 'Address') {\r\n                const a1 = this.address2struct(sortedItem1.item.Address);\r\n                const a2 = this.address2struct(sortedItem2.item.Address);\r\n\r\n                sort1 = 0;\r\n                if (a1.db !== undefined) {\r\n                    sort1 = a1.db << 24;\r\n                }\r\n                if (a2.db !== undefined) {\r\n                    sort2 = a2.db << 24;\r\n                }\r\n                sort1 |= a1.byte << 8;\r\n                sort2 |= a2.byte << 8;\r\n                sort1 |= a1.bit || 0;\r\n                sort2 |= a2.bit || 0;\r\n            } else if (orderBy === '$index') {\r\n                sort1 = sortedItem1[orderBy];\r\n                sort2 = sortedItem2[orderBy];\r\n            } else if (field && field.type === 'number') {\r\n                sort1 = parseInt(sortedItem1.item[orderBy], 10);\r\n                sort2 = parseInt(sortedItem2.item[orderBy], 10);\r\n            } else {\r\n                sort1 = sortedItem1.item[orderBy];\r\n                sort2 = sortedItem2.item[orderBy];\r\n            }\r\n            return (order === 'asc' ? sort1 > sort2 : sort1 < sort2) ? 1 : -1;\r\n        });\r\n\r\n        return sortedData;\r\n    }\r\n\r\n    render() {\r\n        this.fields = this.fields || this.getFields();\r\n\r\n        return <Paper>\r\n            <RegisterTable\r\n                prefix={this.nativeField === 'dbs' ? 'DB' : ''}\r\n                fields={this.fields}\r\n                getSortedData={this.getSortedData}\r\n                data={this.props.native[this.nativeField]}\r\n                changeParam={this.changeParam}\r\n                addItem={this.addItem}\r\n                deleteItem={this.deleteItem}\r\n                changeData={this.changeData}\r\n                getDisable={this.getDisable}\r\n                themeType={this.props.themeType}\r\n                rooms={this.props.rooms}\r\n                order={this.state.order}\r\n                orderBy={this.state.orderBy}\r\n                onChangeOrder={(orderBy, order) => {\r\n                    this.setState({orderBy, order});\r\n                    window.localStorage.setItem('Modbus.orderBy', orderBy);\r\n                    window.localStorage.setItem('Modbus.order', order);\r\n                }}\r\n            />\r\n        </Paper>\r\n    }\r\n}\r\n\r\nBaseRegisters.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n    themeType: PropTypes.string,\r\n};\r\n\r\nexport default BaseRegisters;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Inputs extends BaseRegisters {\r\n    nativeField = 'inputs'\r\n}\r\n\r\nInputs.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Inputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Outputs extends BaseRegisters {\r\n    nativeField = 'outputs'\r\n}\r\n\r\nOutputs.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Outputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Marker extends BaseRegisters {\r\n    nativeField = 'markers'\r\n}\r\n\r\nMarker.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Marker;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Dbs extends BaseRegisters {\r\n    nativeField = 'dbs';\r\n}\r\n\r\nDbs.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Dbs;\r\n","import React from 'react';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport { MuiThemeProvider } from '@material-ui/core/styles';\r\nimport { SnackbarProvider } from 'notistack';\r\n\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Tabs from '@material-ui/core/Tabs';\r\nimport Tab from '@material-ui/core/Tab';\r\n\r\nimport GenericApp from '@iobroker/adapter-react/GenericApp';\r\nimport Loader from '@iobroker/adapter-react/Components/Loader'\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport TabOptions from './Tabs/Options';\r\nimport TabInputs from './Tabs/Inputs';\r\nimport TabOutputs from './Tabs/Outputs';\r\nimport TabMarker from './Tabs/Marker';\r\nimport TabDbs from './Tabs/DBs';\r\n\r\nconst styles = theme => ({\r\n    root: {},\r\n    tabContent: {\r\n        padding: 10,\r\n        height: 'calc(100% - 64px - 48px - 20px)',\r\n        overflow: 'auto',\r\n    },\r\n    tabContentIFrame: {\r\n        padding: 10,\r\n        height: 'calc(100% - 64px - 48px - 20px - 38px)',\r\n        overflow: 'auto'\r\n    },\r\n    tab: {\r\n        width: '100%',\r\n        minHeight: '100%'\r\n    }\r\n});\r\n\r\nconst tabs = [\r\n    {\r\n        name: 'general',\r\n        title: 'General',\r\n        component: TabOptions,\r\n    },\r\n    {\r\n        name: 'inputs',\r\n        title: 'Inputs',\r\n        component: TabInputs,\r\n    },\r\n    {\r\n        name: 'outputs',\r\n        title: 'Outputs',\r\n        component: TabOutputs,\r\n    },\r\n    {\r\n        name: 'marker',\r\n        title: 'Marker',\r\n        component: TabMarker,\r\n    },\r\n    {\r\n        name: 'dbs',\r\n        title: 'DBs',\r\n        component: TabDbs,\r\n    },\r\n]\r\n\r\nclass App extends GenericApp {\r\n    constructor(props) {\r\n        const extendedProps = {...props};\r\n        extendedProps.encryptedFields = ['pass'];\r\n\r\n        extendedProps.translations = {\r\n            'en': require('./i18n/en'),\r\n            'de': require('./i18n/de'),\r\n            'ru': require('./i18n/ru'),\r\n            'pt': require('./i18n/pt'),\r\n            'nl': require('./i18n/nl'),\r\n            'fr': require('./i18n/fr'),\r\n            'it': require('./i18n/it'),\r\n            'es': require('./i18n/es'),\r\n            'pl': require('./i18n/pl'),\r\n            'zh-cn': require('./i18n/zh-cn'),\r\n        };\r\n\r\n        super(props, extendedProps);\r\n        this.state.moreLoaded = false;\r\n        this.state.rooms = null;\r\n    }\r\n\r\n    onConnectionReady() {\r\n        super.onConnectionReady()\r\n        this.socket.getForeignObjects('enum.rooms.*', 'enum')\r\n            .then(rooms =>\r\n                this.setState({moreLoaded: true, rooms}));\r\n    }\r\n\r\n    getSelectedTab() {\r\n        const selectedTab = this.state.selectedTab;\r\n        if (!selectedTab) {\r\n            return 0;\r\n        } else {\r\n            return tabs.findIndex(tab => tab.name === selectedTab);\r\n        }\r\n    }\r\n\r\n    render() {\r\n        if (!this.state.loaded || !this.state.moreLoaded) {\r\n            return <MuiThemeProvider theme={this.state.theme}>\r\n                <Loader theme={this.state.themeType} />\r\n            </MuiThemeProvider>;\r\n        }\r\n\r\n        return <MuiThemeProvider theme={this.state.theme}>\r\n            <SnackbarProvider>\r\n                <div className=\"App\" style={{background: this.state.theme.palette.background.default, color: this.state.theme.palette.text.primary}}>\r\n                    <AppBar position=\"static\">\r\n                        <Tabs\r\n                            value={this.getSelectedTab()}\r\n                            onChange={(e, index) => this.selectTab(tabs[index].name, index)}\r\n                            variant=\"scrollable\" scrollButtons=\"auto\">\r\n                            {tabs.map(tab => <Tab\r\n                                label={tab.icon ? <>{tab.icon}{I18n.t(tab.title)}</> : I18n.t(tab.title)}\r\n                                data-name={tab.name}\r\n                                key={tab.name}\r\n                                title={tab.tooltip ? I18n.t(tab.tooltip) : undefined}\r\n                            />)}\r\n                        </Tabs>\r\n                    </AppBar>\r\n                    <div className={this.isIFrame ? this.props.classes.tabContentIFrame : this.props.classes.tabContent}>\r\n                        {tabs.map((tab, index) => {\r\n                            const TabComponent = tab.component;\r\n                            if (this.state.selectedTab) {\r\n                                if (this.state.selectedTab !== tab.name) {\r\n                                    return null;\r\n                                }\r\n                            } else {\r\n                                if (index !== 0) {\r\n                                    return null;\r\n                                }\r\n                            }\r\n                            return <TabComponent\r\n                                key={tab.name}\r\n                                themeType={this.state.themeType}\r\n                                common={this.common}\r\n                                socket={this.socket}\r\n                                native={this.state.native}\r\n                                onError={text => this.setState({errorText: (text || text === 0) && typeof text !== 'string' ? text.toString() : text})}\r\n                                onLoad={native => this.onLoadConfig(native)}\r\n                                instance={this.instance}\r\n                                adapterName={this.adapterName}\r\n                                changed={this.state.changed}\r\n                                onChange={(attr, value, cb) => this.updateNativeValue(attr, value, cb)}\r\n                                changeNative={value => this.setState({native: value, changed: this.getIsChanged(value)})}\r\n                                rooms={this.state.rooms}\r\n                            />\r\n                        })}\r\n                        {/*<pre>{JSON.stringify(this.state.native, null, 2)}</pre>*/}\r\n                    </div>\r\n                    {this.renderError()}\r\n                    {this.renderSaveCloseButtons()}\r\n                </div>\r\n            </SnackbarProvider>\r\n        </MuiThemeProvider>;\r\n    }\r\n}\r\n\r\nexport default withStyles(styles)(App);\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read http://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n  window.location.hostname === 'localhost' ||\r\n    // [::1] is the IPv6 localhost address.\r\n    window.location.hostname === '[::1]' ||\r\n    // 127.0.0.1/8 is considered localhost for IPv4.\r\n    window.location.hostname.match(\r\n      /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n    )\r\n);\r\n\r\nexport function register(config) {\r\n  if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n    // The URL constructor is available in all browsers that support SW.\r\n    const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n    if (publicUrl.origin !== window.location.origin) {\r\n      // Our service worker won't work if PUBLIC_URL is on a different origin\r\n      // from what our page is served on. This might happen if a CDN is used to\r\n      // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n      return;\r\n    }\r\n\r\n    window.addEventListener('load', () => {\r\n      const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n      if (isLocalhost) {\r\n        // This is running on localhost. Let's check if a service worker still exists or not.\r\n        checkValidServiceWorker(swUrl, config);\r\n\r\n        // Add some additional logging to localhost, pointing developers to the\r\n        // service worker/PWA documentation.\r\n        navigator.serviceWorker.ready.then(() => {\r\n          console.log(\r\n            'This web app is being served cache-first by a service ' +\r\n              'worker. To learn more, visit http://bit.ly/CRA-PWA'\r\n          );\r\n        });\r\n      } else {\r\n        // Is not localhost. Just register service worker\r\n        registerValidSW(swUrl, config);\r\n      }\r\n    });\r\n  }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n  navigator.serviceWorker\r\n    .register(swUrl)\r\n    .then(registration => {\r\n      registration.onupdatefound = () => {\r\n        const installingWorker = registration.installing;\r\n        if (installingWorker == null) {\r\n          return;\r\n        }\r\n        installingWorker.onstatechange = () => {\r\n          if (installingWorker.state === 'installed') {\r\n            if (navigator.serviceWorker.controller) {\r\n              // At this point, the updated precached content has been fetched,\r\n              // but the previous service worker will still serve the older\r\n              // content until all client tabs are closed.\r\n              console.log(\r\n                'New content is available and will be used when all ' +\r\n                  'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\r\n              );\r\n\r\n              // Execute callback\r\n              if (config && config.onUpdate) {\r\n                config.onUpdate(registration);\r\n              }\r\n            } else {\r\n              // At this point, everything has been precached.\r\n              // It's the perfect time to display a\r\n              // \"Content is cached for offline use.\" message.\r\n              console.log('Content is cached for offline use.');\r\n\r\n              // Execute callback\r\n              if (config && config.onSuccess) {\r\n                config.onSuccess(registration);\r\n              }\r\n            }\r\n          }\r\n        };\r\n      };\r\n    })\r\n    .catch(error => {\r\n      console.error('Error during service worker registration:', error);\r\n    });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n  // Check if the service worker can be found. If it can't reload the page.\r\n  fetch(swUrl)\r\n    .then(response => {\r\n      // Ensure service worker exists, and that we really are getting a JS file.\r\n      const contentType = response.headers.get('content-type');\r\n      if (\r\n        response.status === 404 ||\r\n        (contentType != null && contentType.indexOf('javascript') === -1)\r\n      ) {\r\n        // No service worker found. Probably a different app. Reload the page.\r\n        navigator.serviceWorker.ready.then(registration => {\r\n          registration.unregister().then(() => {\r\n            window.location.reload();\r\n          });\r\n        });\r\n      } else {\r\n        // Service worker found. Proceed as normal.\r\n        registerValidSW(swUrl, config);\r\n      }\r\n    })\r\n    .catch(() => {\r\n      console.log(\r\n        'No internet connection found. App is running in offline mode.'\r\n      );\r\n    });\r\n}\r\n\r\nexport function unregister() {\r\n  if ('serviceWorker' in navigator) {\r\n    navigator.serviceWorker.ready.then(registration => {\r\n      registration.unregister();\r\n    });\r\n  }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport * as Sentry from '@sentry/browser';\r\nimport * as SentryIntegrations from '@sentry/integrations';\r\nimport { MuiThemeProvider} from '@material-ui/core/styles';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport {version} from '../package.json';\r\nimport theme from '@iobroker/adapter-react/Theme';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nwindow.adapterName = 's7';\r\nlet themeName = Utils.getThemeName();\r\n\r\nconsole.log(`iobroker.${window.adapterName}@${version} using theme \"${themeName}\"`);\r\n\r\nfunction build() {\r\n    return ReactDOM.render(\r\n        <MuiThemeProvider theme={theme(themeName)}>\r\n            <App\r\n                onThemeChange={_theme => {\r\n                    themeName = _theme;\r\n                    build();\r\n                }}\r\n            />\r\n        </MuiThemeProvider>,\r\n        document.getElementById('root')\r\n    );\r\n}\r\n\r\nif (false && window.location.host !== 'localhost:3000') {\r\n    Sentry.init({\r\n        dsn: 'https://5ad729dbed504d15aa8bde423cae9a8e@sentry.iobroker.net/57',\r\n        release: `iobroker.${window.adapterName}@${version}`,\r\n        integrations: [\r\n            new SentryIntegrations.Dedupe()\r\n        ]\r\n    });\r\n}\r\n\r\nbuild();\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/io-package.json b/io-package.json
index adc74a9..8c03a0a 100644
--- a/io-package.json
+++ b/io-package.json
@@ -1,8 +1,20 @@
 {
     "common": {
         "name": "s7",
-        "version": "1.3.4",
+        "version": "1.3.5",
         "news": {
+            "1.3.5": {
+                "en": "Change edit mode behaviour",
+                "de": "Verhalten im Bearbeitungsmodus ändern",
+                "ru": "Изменить поведение режима редактирования",
+                "pt": "Alterar o comportamento do modo de edição",
+                "nl": "Gedrag van bewerkingsmodus wijzigen",
+                "fr": "Modifier le comportement du mode édition",
+                "it": "Modifica il comportamento della modalità di modifica",
+                "es": "Cambiar el comportamiento del modo de edición",
+                "pl": "Zmień zachowanie trybu edycji",
+                "zh-cn": "更改编辑模式行为"
+            },
             "1.3.4": {
                 "en": "Change edit mode behaviour",
                 "de": "Verhalten im Bearbeitungsmodus ändern",
@@ -230,18 +242,6 @@
                 "es": "Corregir cadenas",
                 "pl": "Napraw ciągi",
                 "zh-cn": "修正字串"
-            },
-            "1.1.1": {
-                "en": "Fix LOGO! support",
-                "de": "LOGO! Unterstützung korrigiert",
-                "ru": "Исправьте LOGO! поддержка",
-                "pt": "Corrigir LOGO!",
-                "nl": "LOGO! repareren",
-                "fr": "Corriger les LOGO!",
-                "it": "Correggi le LOGO!",
-                "es": "Corregir LOGO!",
-                "pl": "Napraw LOGO! ",
-                "zh-cn": "修复LOGO!"
             }
         },
         "title": "Siemens Simatic S7",
diff --git a/package.json b/package.json
index f4308ac..62b7f73 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "iobroker.s7",
-  "version": "1.3.4",
+  "version": "1.3.5",
   "description": "Siemens S7 over Snap7",
   "author": {
     "name": "smiling_Jack",
diff --git a/src/build/asset-manifest.json b/src/build/asset-manifest.json
index bf32b3c..50fe495 100644
--- a/src/build/asset-manifest.json
+++ b/src/build/asset-manifest.json
@@ -1,8 +1,8 @@
 {
   "files": {
     "main.css": "./static/css/main.c9480e85.chunk.css",
-    "main.js": "./static/js/main.ce479555.chunk.js",
-    "main.js.map": "./static/js/main.ce479555.chunk.js.map",
+    "main.js": "./static/js/main.84c400bc.chunk.js",
+    "main.js.map": "./static/js/main.84c400bc.chunk.js.map",
     "runtime-main.js": "./static/js/runtime-main.0b37ba43.js",
     "runtime-main.js.map": "./static/js/runtime-main.0b37ba43.js.map",
     "static/css/2.c04f2d9d.chunk.css": "./static/css/2.c04f2d9d.chunk.css",
@@ -18,6 +18,6 @@
     "static/css/2.c04f2d9d.chunk.css",
     "static/js/2.3473ead8.chunk.js",
     "static/css/main.c9480e85.chunk.css",
-    "static/js/main.ce479555.chunk.js"
+    "static/js/main.84c400bc.chunk.js"
   ]
 }
\ No newline at end of file
diff --git a/src/build/index.html b/src/build/index.html
index aa52afd..39d818b 100644
--- a/src/build/index.html
+++ b/src/build/index.html
@@ -1 +1 @@
-<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><script type="text/javascript" src="./../../lib/js/socket.io.js"></script><title>s7</title><link href="./static/css/2.c04f2d9d.chunk.css" rel="stylesheet"><link href="./static/css/main.c9480e85.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,l=r[0],a=r[1],f=r[2],c=0,s=[];c<l.length;c++)i=l[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var a=t[l];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="./";var l=this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[],a=l.push.bind(l);l.push=r,l=l.slice();for(var f=0;f<l.length;f++)r(l[f]);var p=a;t()}([])</script><script src="./static/js/2.3473ead8.chunk.js"></script><script src="./static/js/main.ce479555.chunk.js"></script></body></html>
\ No newline at end of file
+<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><script type="text/javascript" src="./../../lib/js/socket.io.js"></script><title>s7</title><link href="./static/css/2.c04f2d9d.chunk.css" rel="stylesheet"><link href="./static/css/main.c9480e85.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,l=r[0],a=r[1],f=r[2],c=0,s=[];c<l.length;c++)i=l[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var a=t[l];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="./";var l=this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[],a=l.push.bind(l);l.push=r,l=l.slice();for(var f=0;f<l.length;f++)r(l[f]);var p=a;t()}([])</script><script src="./static/js/2.3473ead8.chunk.js"></script><script src="./static/js/main.84c400bc.chunk.js"></script></body></html>
\ No newline at end of file
diff --git a/src/build/static/js/main.84c400bc.chunk.js b/src/build/static/js/main.84c400bc.chunk.js
new file mode 100644
index 0000000..03e3a06
--- /dev/null
+++ b/src/build/static/js/main.84c400bc.chunk.js
@@ -0,0 +1,2 @@
+(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[0],{311:function(e){e.exports=JSON.parse('[{"name":"ip","type":"text","title":"PLC IP Address"},{"name":"s7logo","type":"checkbox","title":"S7 LOGO!"},{"name":"rack","type":"text","title":"PLC Rack"},{"name":"slot","type":"text","title":"PLC Slot"},{"name":"localTSAP","type":"hex","title":"Local TSAP"},{"name":"remoteTSAP","type":"hex","title":"Remote TSAP"}]')},312:function(e){e.exports=JSON.parse('[{"name":"round","type":"number","title":"Round Real to"},{"name":"poll","type":"number","title":"Poll delay","dimension":"ms"},{"name":"recon","type":"number","title":"Reconnect time","dimension":"ms"},{"name":"pulsetime","type":"number","title":"Pulse time","dimension":"ms"},{"name":"timeFormat","type":"select","title":"S7 Time mode","options":[{"value":"","title":"Local time"},{"value":"utc","title":"UTC"},{"value":"summer","title":"Time offset (with day saving time)"},{"value":"offset","title":"Time offset (no day saving time)"}]},{"name":"timeOffset","type":"number","title":"Time offset","dimension":"minutes"}]')},315:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"value","title":"value"},{"value":"level","title":"level"},{"value":"state","title":"state"},{"value":"switch","title":"switch"},{"value":"value.temperature","title":"value.temperature"},{"value":"value.humidity","title":"value.humidity"},{"value":"value.brightness","title":"value.brightness"},{"value":"value.uv","title":"value.uv"},{"value":"value.pressure","title":"value.pressure"},{"value":"value.battery","title":"value.battery"},{"value":"value.valve","title":"value.valve"},{"value":"value.time","title":"value.time"},{"value":"value.interval","title":"value.interval"},{"value":"value.window","title":"value.window"},{"value":"button","title":"button"},{"value":"indicator","title":"indicator"},{"value":"level.dimmer","title":"level.dimmer"},{"value":"level.valve","title":"level.valve"},{"value":"level.blind","title":"level.blind"},{"value":"level.temperature","title":"level.temperature"},{"value":"level.interval","title":"level.interval"}]')},316:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"BOOL","title":"BOOL"},{"value":"BYTE","title":"BYTE"},{"value":"WORD","title":"WORD"},{"value":"DWORD","title":"DWORD"},{"value":"INT","title":"INT"},{"value":"DINT","title":"DINT"},{"value":"REAL","title":"REAL"},{"value":"S7STRING","title":"S7STRING"},{"value":"STRING","title":"STRING"},{"value":"ARRAY","title":"ARRAY"},{"value":"S5TIME","title":"S5TIME"},{"value":"S7TIME","title":"S7TIME"}]')},327:function(e){e.exports=JSON.parse('{"a":"1.3.5"}')},342:function(e,t,a){},407:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Local time","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Time offset (no day saving time)","Offset (with day saving time)":"Time offset (with day saving time)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Polling","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 Time mode","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Time offset","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Write access","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutes","poll":"poll","sec":"sec.","write as Pulse":"write as Pulse","Drag \'n\' drop file here, or click to select file":"Drag \'n\' drop file here, or click to select file","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Change all","Delete all":"Delete all","Edit as TSV (Tab separated values)":"Edit as TSV (Tab separated values)","Add line":"Add line","Delete":"Delete","Are you sure to delete item with address \\"%s\\"?":"Are you sure to delete item with address \\"%s\\"?","Don\'t show this message in 5 minutes":"Don\'t show this message in 5 minutes","Cancel":"Cancel","Delete all items":"Delete all items","Are you sure to delete all items?":"Are you sure to delete all items?","Edit mode":"Edit mode","Toggle extended mode":"Toggle extended mode","Edit data as TSV":"Edit data as TSV","You can copy, paste and edit data as TSV.":"You can copy, paste and edit data as TSV.","Copy to clipboard":"Copy to clipboard","Nothing":"Nothing","Delete item":"Delete item","Load symbols":"Load symbols","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack and slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV was copied to clipboard"}')},408:function(e){e.exports=JSON.parse('{"Add DB":"DB hinzuf\xfcgen","Address":"Adresse","All entries will be deleted. Are you sure?":"Alle Eintr\xe4ge werden gel\xf6scht. Sind sie sicher?","Close":"Zumachen","Delete all entries":"Alle Eintr\xe4ge l\xf6schen","Description":"Beschreibung","Enable polling of data point":"Zyklische Abfrage vom Datenpunkt","Export":"Export","Export to CSV":"Export in CSV","General":"Allgemein","Import":"Import","Import DB file":"DB-Datei importieren","Import from CSV":"Import aus CSV","Import symbols file":"Symboldatei Importieren","Inputs":"Eing\xe4nge","Length":"L\xe4nge","Load Symbols":"Lade Symbole","Local TSAP":"Local TSAP","Local time":"Ortszeit","Marker":"Merker","Name":"Name","Offset (no day saving time)":"Zeit-Offset (ohne Sommerzeit)","Offset (with day saving time)":"Zeit-Offset (mit Sommerzeit)","Outputs":"Ausg\xe4nge","PLC Connection":"SPS Verbindung","PLC IP Address":"SPS IP Adresse","PLC Rack":"SPS Rack","PLC Slot":"SPS Slot","Poll delay":"Poll delay","Polling":"Abfrage","Pulse time":"Pulsetime","RW":"RW","Reconnect time":"Reconnectzeit","Remote TSAP":"Remote TSAP","Role":"Rolle","Room":"Raum","Round Real to":"Aufrunden Real auf","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7-Zeitmodus","Text copied to clipboard. Click to close the window":"Text wurde in der Zwischenablage kopiert. Klick um Fenster zu zumachen.","Time offset":"Zeitverschiebung","Toggle RW":"RW umschalten","Toggle WP":"WP umschalten","Toggle poll":"Poll umschalten","Type":"Typ","UTC":"UTC","Unit":"Einheit","WP":"WP","Write access":"Schreibzugriff","Write access allowed":"Schreiben erlaubt","Write pulses (true=>false edge)":"Schreibe Pulse (Ja=>Nein Kante)","minutes":"Minuten","poll":"poll","sec":"Sek.","write as Pulse":"schreibe als Impuls","Drag \'n\' drop file here, or click to select file":"Die Datei hierher ziehen , oder klicken, um die Datei auszuw\xe4hlen","DBs":"DBs","ms":"ms","Poll":"Abfrage","Change all":"\xc4ndere Alles","Delete all":"Alles l\xf6schen","Edit as TSV (Tab separated values)":"Als TSV bearbeiten (Tabulatorgetrennte Werte)","Add line":"Zeile hinzuf\xfcgen","Delete":"L\xf6schen","Are you sure to delete item with address \\"%s\\"?":"M\xf6chten Sie den Artikel mit der Adresse \\"%s\\" wirklich l\xf6schen?","Don\'t show this message in 5 minutes":"Diese Nachricht nicht in 5\xa0Minuten anzeigen","Cancel":"Abbrechen","Delete all items":"Alle Elemente l\xf6schen","Are you sure to delete all items?":"M\xf6chten Sie wirklich alle Elemente l\xf6schen?","Edit mode":"Bearbeitungsmodus","Toggle extended mode":"Erweiterten Modus umschalten","Edit data as TSV":"Daten als TSV bearbeiten","You can copy, paste and edit data as TSV.":"Sie k\xf6nnen Daten als TSV kopieren, einf\xfcgen und bearbeiten.","Copy to clipboard":"In die Zwischenablage kopieren","Nothing":"Keins","Delete item":"Item l\xf6schen","Load symbols":"Symbole laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Verbindungstyp: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack und Steckplatz: [Rack * 0x20 + Steckplatz]","TSV was copied to clipboard":"TSV wurde in die Zwischenablage kopiert"}')},409:function(e){e.exports=JSON.parse('{"Add DB":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DB","Address":"\u0410\u0434\u0440\u0435\u0441","All entries will be deleted. Are you sure?":"\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b?","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Delete all entries":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Enable polling of data point":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435","Export":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","Export to CSV":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","General":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435","Import":"\u0418\u043f\u043c\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c","Import DB file":"\u0418\u043f\u043c\u043e\u0440\u0442 DB \u0444\u0430\u0439\u043b\u043e\u0432","Import from CSV":"\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 CSV","Import symbols file":"\u0418\u043f\u043c\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432","Inputs":"\u0412\u0445\u043e\u0434\u044b","Length":"Length","Load Symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Local TSAP":"Local TSAP","Local time":"\u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f","Marker":"\u041c\u0430\u0440\u043a\u0435\u0440\u044b","Name":"\u0418\u043c\u044f","Offset (no day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0431\u0435\u0437 \u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)","Offset (with day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u043b\u0435\u0442\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c)","Outputs":"\u0412\u044b\u0445\u043e\u0434\u044b","PLC Connection":"PLC \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","PLC IP Address":"PLC IP \u0430\u0434\u0440\u0435\u0441","PLC Rack":"PLC Rack","PLC Slot":"PLC \u0441\u043b\u043e\u0442","Poll delay":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u043f\u0440\u043e\u0441\u0430","Polling":"\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"\u0420\u043e\u043b\u044c","Room":"\u041a\u043e\u043c\u043d\u0430\u0442\u0430","Round Real to":"\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c real \u0434\u043e","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 \u0420\u0435\u0436\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Text copied to clipboard. Click to close the window":"\u0422\u0435\u043a\u0441\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u043a\u043e\u0439 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e","Time offset":"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Toggle RW":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c RW","Toggle WP":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c WP","Toggle poll":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c poll","Type":"\u0422\u0438\u043f","UTC":"UTC","Unit":"\u0415\u0434\u0438\u043d\u0438\u0446\u044b","WP":"WP","Write access":"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438","Write access allowed":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e","Write pulses (true=>false edge)":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b (1 => 0)","minutes":"\u043c\u0438\u043d\u0443\u0442\u044b","poll":"poll","sec":"\u0441\u0435\u043a.","write as Pulse":"\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a Pulse","Drag \'n\' drop file here, or click to select file":"\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b","DBs":"DBs","ms":"ms","Poll":"\u041e\u043f\u0440\u043e\u0441","Change all":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435","Delete all":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435","Edit as TSV (Tab separated values)":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a TSV (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0435\u0439)","Add line":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","Delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","Are you sure to delete item with address \\"%s\\"?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \\"%s\\"?","Don\'t show this message in 5 minutes":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 5 \u043c\u0438\u043d\u0443\u0442","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","Delete all items":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Are you sure to delete all items?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b?","Edit mode":"\u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Toggle extended mode":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c","Edit data as TSV":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV","You can copy, paste and edit data as TSV.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV.","Copy to clipboard":"\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430","Nothing":"\u041d\u0438\u0447\u0435\u0433\u043e","Delete item":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442","Load symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u0422\u0438\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u0421\u0442\u043e\u0439\u043a\u0430 \u0438 \u0441\u043b\u043e\u0442: [\u0421\u0442\u043e\u0439\u043a\u0430 * 0x20 + \u0441\u043b\u043e\u0442]","TSV was copied to clipboard":"TSV \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430"}')},410:function(e){e.exports=JSON.parse('{"Add DB":"Adicionar DB","Address":"Endere\xe7o","All entries will be deleted. Are you sure?":"Todas as entradas ser\xe3o exclu\xeddas. Voc\xea tem certeza?","Close":"Fechar","Delete all entries":"Eliminar todas as entradas","Description":"Descri\xe7\xe3o","Enable polling of data point":"Habilitar a vota\xe7\xe3o do ponto de dados","Export":"Exportar","Export to CSV":"Exportar para CSV","General":"Geral","Import":"Importar","Import DB file":"Importar arquivo DB","Import from CSV":"Importa\xe7\xe3o de CSV","Import symbols file":"Arquivo de s\xedmbolos de importa\xe7\xe3o","Inputs":"Entradas","Length":"comprimento","Load Symbols":"Carregar s\xedmbolos","Local TSAP":"TSAP local","Local time":"Hor\xe1rio local","Marker":"Marcador","Name":"Nome","Offset (no day saving time)":"Deslocamento (sem hor\xe1rio)","Offset (with day saving time)":"Offset (com tempo de economia de hora)","Outputs":"Sa\xeddas","PLC Connection":"Conex\xe3o do PLC","PLC IP Address":"Endere\xe7o IP do PLC","PLC Rack":"PLC Rack","PLC Slot":"Slot PLC","Poll delay":"Retardo de enquete","Polling":"Polling","Pulse time":"Tempo de pulso","RW":"RW","Reconnect time":"Reconectar o tempo","Remote TSAP":"TSAP remoto","Role":"Fun\xe7\xe3o","Room":"Quarto","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO !","S7 Time mode":"Modo de tempo S7","Text copied to clipboard. Click to close the window":"Texto copiado para a \xe1rea de transfer\xeancia. Clique para fechar a janela","Time offset":"Deslocamento de tempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Alternar pesquisa","Type":"Tipo","UTC":"UTC","Unit":"Unidade","WP":"WP","Write access":"Acesso de grava\xe7\xe3o","Write access allowed":"Acesso de acesso permitido","Write pulses (true=>false edge)":"Escrever pulsos (true => false edge)","minutes":"minutos","poll":"vota\xe7\xe3o","sec":"seg.","write as Pulse":"escreva como pulso","Drag \'n\' drop file here, or click to select file":"Arraste e solte o arquivo aqui ou clique para selecionar o arquivo","DBs":"DBs","ms":"ms","Poll":"Enquete","Change all":"Mude tudo","Delete all":"Apagar tudo","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabula\xe7\xe3o)","Add line":"Adicionar linha","Delete":"Excluir","Are you sure to delete item with address \\"%s\\"?":"Tem certeza de que deseja excluir o item com o endere\xe7o \\"%s\\"?","Don\'t show this message in 5 minutes":"N\xe3o mostre esta mensagem em 5 minutos","Cancel":"Cancelar","Delete all items":"Apagar todos os itens","Are you sure to delete all items?":"Tem certeza de que deseja excluir todos os itens?","Edit mode":"Modo de edi\xe7\xe3o","Toggle extended mode":"Alternar modo estendido","Edit data as TSV":"Editar dados como TSV","You can copy, paste and edit data as TSV.":"Voc\xea pode copiar, colar e editar dados como TSV.","Copy to clipboard":"Copiar para \xe1rea de transfer\xeancia","Nothing":"Nada","Delete item":"Apagar item","Load symbols":"S\xedmbolos de carga","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conex\xe3o: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 B\xe1sico","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV foi copiado para a \xe1rea de transfer\xeancia"}')},411:function(e){e.exports=JSON.parse('{"Add DB":"Voeg DB toe","Address":"Adres","All entries will be deleted. Are you sure?":"Alle inzendingen worden verwijderd. Weet je het zeker?","Close":"Dichtbij","Delete all entries":"Verwijder alle vermeldingen","Description":"Beschrijving","Enable polling of data point":"Polling van gegevenspunt inschakelen","Export":"Exporteren","Export to CSV":"Exporteren naar CSV","General":"Algemeen","Import":"Importeren","Import DB file":"DB-bestand importeren","Import from CSV":"Importeren vanuit CSV","Import symbols file":"Symboolbestand importeren","Inputs":"ingangen","Length":"Lengte","Load Symbols":"Laad symbolen","Local TSAP":"Lokale TSAP","Local time":"Lokale tijd","Marker":"Markeerstift","Name":"Naam","Offset (no day saving time)":"Offset (geen dagbesparende tijd)","Offset (with day saving time)":"Offset (met dagbesparende tijd)","Outputs":"uitgangen","PLC Connection":"PLC-verbinding","PLC IP Address":"PLC IP-adres","PLC Rack":"PLC Rack","PLC Slot":"PLC-slot","Poll delay":"Poll vertraging","Polling":"stemming","Pulse time":"Pulstijd","RW":"RW","Reconnect time":"Reconnect tijd","Remote TSAP":"TSAP op afstand","Role":"Rol","Room":"Kamer","Round Real to":"Rond echt naar","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tijdmodus","Text copied to clipboard. Click to close the window":"Tekst gekopieerd naar klembord. Klik om het venster te sluiten","Time offset":"Tijd offset","Toggle RW":"RW omschakelen","Toggle WP":"Wissel WP","Toggle poll":"Poll wisselen","Type":"Type","UTC":"UTC","Unit":"Eenheid","WP":"WP","Write access":"Schrijf toegang","Write access allowed":"Schrijftoegang toegestaan","Write pulses (true=>false edge)":"Schrijf pulsen (true => false edge)","minutes":"minuut","poll":"poll","sec":"seconde","write as Pulse":"schrijf als Pulse","Drag \'n\' drop file here, or click to select file":"Sleep het bestand hierheen, of klik om het bestand te selecteren","DBs":"DBs","ms":"ms","Poll":"Opiniepeiling","Change all":"Verander alles","Delete all":"Verwijder alles","Edit as TSV (Tab separated values)":"Bewerken als TSV (door tabs gescheiden waarden)","Add line":"Lijn toevoegen","Delete":"Verwijderen","Are you sure to delete item with address \\"%s\\"?":"Weet u zeker dat u het item met adres \\"%s\\" wilt verwijderen?","Don\'t show this message in 5 minutes":"Dit bericht niet binnen 5 minuten weergeven","Cancel":"annuleren","Delete all items":"Alle items verwijderen","Are you sure to delete all items?":"Weet je zeker dat je alle items wilt verwijderen?","Edit mode":"Bewerkingsmodus","Toggle extended mode":"Schakel uitgebreide modus in","Edit data as TSV":"Gegevens bewerken als TSV","You can copy, paste and edit data as TSV.":"U kunt gegevens kopi\xebren, plakken en bewerken als TSV.","Copy to clipboard":"Kopieer naar klembord","Nothing":"Niets","Delete item":"Verwijder item","Load symbols":"Symbolen laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Aansluittype: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rek en sleuf: [Rack * 0x20 + sleuf]","TSV was copied to clipboard":"TSV is gekopieerd naar het klembord"}')},412:function(e){e.exports=JSON.parse('{"Add DB":"Ajouter une DB","Address":"Adresse","All entries will be deleted. Are you sure?":"Toutes les entr\xe9es seront supprim\xe9es. \xcates-vous s\xfbr?","Close":"Fermer","Delete all entries":"Supprimer toutes les entr\xe9es","Description":"La description","Enable polling of data point":"Activer l\'interrogation du point de donn\xe9es","Export":"Exportation","Export to CSV":"Exporter au format CSV","General":"G\xe9n\xe9ral","Import":"Importer","Import DB file":"Importer un fichier DB","Import from CSV":"Importer \xe0 partir du fichier CSV","Import symbols file":"Importer un fichier de symboles","Inputs":"Contributions","Length":"Longueur","Load Symbols":"Charger des symboles","Local TSAP":"TSAP local","Local time":"Heure locale","Marker":"Marqueur","Name":"pr\xe9nom","Offset (no day saving time)":"D\xe9calage (pas de temps pour gagner du temps)","Offset (with day saving time)":"D\xe9calage (avec un gain de temps de jour)","Outputs":"Les sorties","PLC Connection":"Connexion PLC","PLC IP Address":"Adresse IP de l\'API","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"D\xe9lai d\'interrogation","Polling":"Vote","Pulse time":"Temps d\'impulsion","RW":"RW","Reconnect time":"Reconnectez le temps","Remote TSAP":"TSAP distant","Role":"R\xf4le","Room":"Chambre","Round Real to":"Rond r\xe9el \xe0","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Mode heure","Text copied to clipboard. Click to close the window":"Texte copi\xe9 dans le presse-papier Cliquez pour fermer la fen\xeatre","Time offset":"D\xe9calage temporel","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Basculer le sondage","Type":"Type","UTC":"UTC","Unit":"Unit\xe9","WP":"WP","Write access":"Acc\xe8s en \xe9criture","Write access allowed":"Acc\xe8s en \xe9criture autoris\xe9","Write pulses (true=>false edge)":"\xc9crire des impulsions (true => false edge)","minutes":"minutes","poll":"sondage","sec":"seconde.","write as Pulse":"\xe9crire comme Pulse","Drag \'n\' drop file here, or click to select file":"Glissez-d\xe9posez le fichier ici, ou cliquez pour s\xe9lectionner le fichier","DBs":"DBs","ms":"ms","Poll":"Sondage","Change all":"Change tout","Delete all":"Tout supprimer","Edit as TSV (Tab separated values)":"Modifier en tant que TSV (valeurs s\xe9par\xe9es par des tabulations)","Add line":"Ajouter une ligne","Delete":"Effacer","Are you sure to delete item with address \\"%s\\"?":"\xcates-vous s\xfbr de supprimer l\'\xe9l\xe9ment avec l\'adresse \xab\xa0%s\xa0\xbb\xa0?","Don\'t show this message in 5 minutes":"Ne pas afficher ce message dans 5 minutes","Cancel":"Annuler","Delete all items":"Supprimer tous les \xe9l\xe9ments","Are you sure to delete all items?":"\xcates-vous s\xfbr de supprimer tous les \xe9l\xe9ments\xa0?","Edit mode":"Mode \xe9dition","Toggle extended mode":"Basculer en mode \xe9tendu","Edit data as TSV":"Modifier les donn\xe9es en tant que TSV","You can copy, paste and edit data as TSV.":"Vous pouvez copier, coller et modifier des donn\xe9es au format TSV.","Copy to clipboard":"Copier dans le presse-papier","Nothing":"Rien","Delete item":"Effacer l\'article","Load symbols":"Charger des symboles","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Type de connexion : 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack et slot : [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV a \xe9t\xe9 copi\xe9 dans le presse-papiers"}')},413:function(e){e.exports=JSON.parse('{"Add DB":"Aggiungi DB","Address":"Indirizzo","All entries will be deleted. Are you sure?":"Tutte le voci saranno cancellate. Sei sicuro?","Close":"Vicino","Delete all entries":"Elimina tutte le voci","Description":"Descrizione","Enable polling of data point":"Abilita il polling del punto dati","Export":"Esportare","Export to CSV":"Esporta in CSV","General":"Generale","Import":"Importare","Import DB file":"Importa file DB","Import from CSV":"Importa da CSV","Import symbols file":"Importa file simboli","Inputs":"ingressi","Length":"Lunghezza","Load Symbols":"Carica simboli","Local TSAP":"TSAP locale","Local time":"Ora locale","Marker":"marcatore","Name":"Nome","Offset (no day saving time)":"Offset (nessun giorno risparmiando tempo)","Offset (with day saving time)":"Offset (con ora del giorno)","Outputs":"Uscite","PLC Connection":"Connessione PLC","PLC IP Address":"Indirizzo IP del PLC","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"Ritardo del sondaggio","Polling":"votazione","Pulse time":"Tempo di impulso","RW":"RW","Reconnect time":"Tempo di riconnessione","Remote TSAP":"TSAP remoto","Role":"Ruolo","Room":"Camera","Round Real to":"Round reale a","S7 LOGO!":"LOGO S7 !","S7 Time mode":"Modalit\xe0 ora S7","Text copied to clipboard. Click to close the window":"Testo copiato negli appunti. Clicca per chiudere la finestra","Time offset":"Differenza di fuso orario","Toggle RW":"Attiva / disattiva RW","Toggle WP":"Attiva / disattiva WP","Toggle poll":"Attiva / disattiva sondaggio","Type":"genere","UTC":"UTC","Unit":"Unit\xe0","WP":"WP","Write access":"Accesso in scrittura","Write access allowed":"Accesso in scrittura consentito","Write pulses (true=>false edge)":"Scrivi impulsi (true => falso bordo)","minutes":"minuti","poll":"sondaggio","sec":"sec.","write as Pulse":"scrivi come Pulse","Drag \'n\' drop file here, or click to select file":"Trascina e rilascia il file qui o fai clic per selezionare il file","DBs":"DBs","ms":"ms","Poll":"Sondaggio","Change all":"Cambia tutto","Delete all":"Cancella tutto","Edit as TSV (Tab separated values)":"Modifica come TSV (valori separati da tabulazioni)","Add line":"Aggiungi riga","Delete":"Elimina","Are you sure to delete item with address \\"%s\\"?":"Sei sicuro di eliminare l\'elemento con l\'indirizzo \\"%s\\"?","Don\'t show this message in 5 minutes":"Non mostrare questo messaggio in 5 minuti","Cancel":"Annulla","Delete all items":"Elimina tutti gli elementi","Are you sure to delete all items?":"Sei sicuro di eliminare tutti gli elementi?","Edit mode":"Modalit\xe0 Modifica","Toggle extended mode":"Attiva/disattiva modalit\xe0 estesa","Edit data as TSV":"Modifica dati come TSV","You can copy, paste and edit data as TSV.":"Puoi copiare, incollare e modificare i dati come TSV.","Copy to clipboard":"Copia negli appunti","Nothing":"Niente","Delete item":"Cancellare l\'oggetto","Load symbols":"Simboli di carico","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo di collegamento: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV \xe8 stato copiato negli appunti"}')},414:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Hora local","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Desplazamiento (sin horario de guardado)","Offset (with day saving time)":"Desplazamiento (con horario de ahorro de d\xeda)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Votaci\xf3n","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"Modo de tiempo S7","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Desplazamiento de tiempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Acceso de escritura","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutos","poll":"poll","sec":"sec.","write as Pulse":"escribe como Pulso","Drag \'n\' drop file here, or click to select file":"Arrastre y suelte el archivo aqu\xed o haga clic para seleccionar el archivo","DBs":"DBs","ms":"ms","Poll":"Encuesta","Change all":"Cambia todo","Delete all":"Eliminar todos","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabulaciones)","Add line":"A\xf1adir l\xednea","Delete":"Borrar","Are you sure to delete item with address \\"%s\\"?":"\xbfEst\xe1 seguro de eliminar el elemento con la direcci\xf3n \\"%s\\"?","Don\'t show this message in 5 minutes":"No muestre este mensaje en 5 minutos","Cancel":"Cancelar","Delete all items":"Eliminar todos los elementos","Are you sure to delete all items?":"\xbfEst\xe1 seguro de eliminar todos los elementos?","Edit mode":"Modo de edici\xf3n","Toggle extended mode":"Alternar modo extendido","Edit data as TSV":"Editar datos como TSV","You can copy, paste and edit data as TSV.":"Puede copiar, pegar y editar datos como TSV.","Copy to clipboard":"Copiar al portapapeles","Nothing":"Nada","Delete item":"Eliminar elemento","Load symbols":"Cargar s\xedmbolos","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conexi\xf3n: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack y ranura: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV se copi\xf3 al portapapeles"}')},415:function(e){e.exports=JSON.parse('{"Add DB":"Dodaj DB","Address":"Adres","All entries will be deleted. Are you sure?":"Wszystkie wpisy zostan\u0105 usuni\u0119te. Jeste\u015b pewny?","Close":"Blisko","Delete all entries":"Usu\u0144 wszystkie wpisy","Description":"Opis","Enable polling of data point":"W\u0142\u0105cz odpytywanie punktu danych","Export":"Eksport","Export to CSV":"Eksportuj do pliku CSV","General":"Genera\u0142","Import":"Import","Import DB file":"Importuj plik DB","Import from CSV":"Importuj z CSV","Import symbols file":"Importuj plik symboli","Inputs":"Wej\u015bcia","Length":"D\u0142ugo\u015b\u0107","Load Symbols":"Za\u0142aduj symbole","Local TSAP":"Lokalny TSAP","Local time":"Czas lokalny","Marker":"Znacznik","Name":"Nazwa","Offset (no day saving time)":"Przesuni\u0119cie (brak czasu na dzie\u0144)","Offset (with day saving time)":"Przesuni\u0119cie (z czasem oszcz\u0119dzania dziennego)","Outputs":"Wyj\u015bcia","PLC Connection":"Po\u0142\u0105czenie PLC","PLC IP Address":"Adres IP sterownika PLC","PLC Rack":"Rack PLC","PLC Slot":"Gniazdo PLC","Poll delay":"Op\xf3\u017anienie ankiety","Polling":"Ankieta","Pulse time":"Czas impulsu","RW":"RW","Reconnect time":"Czas ponownego po\u0142\u0105czenia","Remote TSAP":"Zdalny TSAP","Role":"Rola","Room":"Pok\xf3j","Round Real to":"Runda prawdziwa do","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tryb czasu","Text copied to clipboard. Click to close the window":"Tekst skopiowany do schowka. Kliknij, aby zamkn\u0105\u0107 okno","Time offset":"Przesuni\u0119cie czasu","Toggle RW":"Prze\u0142\u0105cz RW","Toggle WP":"Prze\u0142\u0105cz WP","Toggle poll":"Prze\u0142\u0105cz ankiet\u0119","Type":"Rodzaj","UTC":"UTC","Unit":"Jednostka","WP":"WP","Write access":"Dost\u0119p do zapisu","Write access allowed":"Dost\u0119p do zapisu dozwolony","Write pulses (true=>false edge)":"Pisz impulsy (true => false edge)","minutes":"minuty","poll":"g\u0142osowanie","sec":"sec.","write as Pulse":"napisz jako Pulse","Drag \'n\' drop file here, or click to select file":"Przeci\u0105gnij i upu\u015b\u0107 plik tutaj lub kliknij, aby wybra\u0107 plik","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Zmieni\u0107 wszystko","Delete all":"Usu\u0144 wszystko","Edit as TSV (Tab separated values)":"Edytuj jako TSV (warto\u015bci rozdzielone tabulatorami)","Add line":"Dodaj lini\u0119","Delete":"Kasowa\u0107","Are you sure to delete item with address \\"%s\\"?":"Czy na pewno chcesz usun\u0105\u0107 element o adresie \u201e%s\u201d?","Don\'t show this message in 5 minutes":"Nie pokazuj tej wiadomo\u015bci za 5 minut","Cancel":"Anuluj","Delete all items":"Usu\u0144 wszystkie elementy","Are you sure to delete all items?":"Czy na pewno chcesz usun\u0105\u0107 wszystkie elementy?","Edit mode":"Tryb edycji","Toggle extended mode":"Prze\u0142\u0105cz tryb rozszerzony","Edit data as TSV":"Edytuj dane jako TSV","You can copy, paste and edit data as TSV.":"Mo\u017cesz kopiowa\u0107, wkleja\u0107 i edytowa\u0107 dane jako TSV.","Copy to clipboard":"Skopiuj do schowka","Nothing":"Nic","Delete item":"Usu\u0144 przedmiot","Load symbols":"Za\u0142aduj symbole","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Typ po\u0142\u0105czenia: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Szafa i gniazdo: [Stela\u017c * 0x20 + Slot]","TSV was copied to clipboard":"TSV zosta\u0142 skopiowany do schowka"}')},416:function(e){e.exports=JSON.parse('{"Add DB":"\u6dfb\u52a0\u6570\u636e\u5e93","Address":"\u5730\u5740","All entries will be deleted. Are you sure?":"\u6240\u6709\u6761\u76ee\u5c06\u88ab\u5220\u9664\u3002","Close":"\u5173\u95ed","Delete all entries":"\u5220\u9664\u6240\u6709\u6761\u76ee","Description":"\u63cf\u8ff0","Enable polling of data point":"\u542f\u7528\u6570\u636e\u70b9\u8f6e\u8be2","Export":"\u51fa\u53e3","Export to CSV":"\u5bfc\u51fa\u4e3aCSV","General":"\u4e00\u822c\u7684","Import":"\u8fdb\u53e3","Import DB file":"\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff1a","Import from CSV":"\u4eceCSV\u5bfc\u5165","Import symbols file":"\u5bfc\u5165\u7b26\u53f7\u6587\u4ef6\uff1a","Inputs":"\u8f93\u5165\u9879","Length":"\u957f\u5ea6","Load Symbols":"\u52a0\u8f7d\u7b26\u53f7","Local TSAP":"\u672c\u5730TSAP\uff1a","Local time":"\u5f53\u5730\u65f6\u95f4","Marker":"\u8bb0\u53f7\u7b14","Name":"\u540d\u79f0","Offset (no day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u65e0\u590f\u4ee4\u65f6\uff09","Offset (with day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u5e26\u590f\u65f6\u5236\uff09","Outputs":"\u4ea7\u51fa","PLC Connection":"PLC\u8fde\u63a5\uff1a","PLC IP Address":"PLC IP\u5730\u5740\uff1a","PLC Rack":"PLC\u673a\u67b6\uff1a","PLC Slot":"PLC\u63d2\u69fd\uff1a","Poll delay":"\u8f6e\u8be2\u5ef6\u8fdf\uff1a","Polling":"\u8f6e\u8be2","Pulse time":"\u8109\u51b2\u65f6\u95f4\uff1a","RW":"\u8bfb\u5199\u5668","Reconnect time":"\u91cd\u65b0\u8fde\u63a5\u65f6\u95f4\uff1a","Remote TSAP":"\u8fdc\u7a0bTSAP\uff1a","Role":"\u89d2\u8272","Room":"\u623f\u95f4","Round Real to":"\u820d\u5165\u4e3a\uff1a","S7 LOGO!":"S7 LOGO !\uff1a","S7 Time mode":"S7\u65f6\u95f4\u6a21\u5f0f","Text copied to clipboard. Click to close the window":"\u6587\u672c\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f\u3002","Time offset":"\u65f6\u95f4\u504f\u79fb\uff1a","Toggle RW":"\u5207\u6362RW","Toggle WP":"\u5207\u6362WP","Toggle poll":"\u5207\u6362\u6c11\u610f\u8c03\u67e5","Type":"\u7c7b\u578b","UTC":"\u4e16\u754c\u6807\u51c6\u65f6\u95f4","Unit":"\u5355\u5143","WP":"\u53ef\u6e7f\u6027\u7c89\u5242","Write access":"\u5199\u8bbf\u95ee","Write access allowed":"\u5141\u8bb8\u5199\u8bbf\u95ee","Write pulses (true=>false edge)":"\u5199\u8109\u51b2\uff08\u771f=>\u5047\u8fb9\uff09","minutes":"\u5206\u949f","poll":"\u8f6e\u8be2","sec":"\u79d2","write as Pulse":"\u5199\u4e3a\u8109\u51b2","Drag \'n\' drop file here, or click to select file":"\u5c06\u201cn\u201d\u6587\u4ef6\u62d6\u5230\u6b64\u5904\uff0c\u6216\u5355\u51fb\u4ee5\u9009\u62e9\u6587\u4ef6","DBs":"DBs","ms":"ms","Poll":"\u8f6e\u8be2","Change all":"\u5168\u90e8\u66f4\u6539","Delete all":"\u5220\u9664\u6240\u6709","Edit as TSV (Tab separated values)":"\u7f16\u8f91\u4e3a TSV\uff08\u5236\u8868\u7b26\u5206\u9694\u503c\uff09","Add line":"\u6dfb\u52a0\u884c","Delete":"\u5220\u9664","Are you sure to delete item with address \\"%s\\"?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u5730\u5740\u4e3a\u201c%s\u201d\u7684\u9879\u76ee\u5417\uff1f","Don\'t show this message in 5 minutes":"5 \u5206\u949f\u5185\u4e0d\u8981\u663e\u793a\u6b64\u6d88\u606f","Cancel":"\u53d6\u6d88","Delete all items":"\u5220\u9664\u6240\u6709\u9879\u76ee","Are you sure to delete all items?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u6240\u6709\u9879\u76ee\u5417\uff1f","Edit mode":"\u7f16\u8f91\u6a21\u5f0f","Toggle extended mode":"\u5207\u6362\u6269\u5c55\u6a21\u5f0f","Edit data as TSV":"\u5c06\u6570\u636e\u7f16\u8f91\u4e3a TSV","You can copy, paste and edit data as TSV.":"\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u590d\u5236\u3001\u7c98\u8d34\u548c\u7f16\u8f91\u4e3a TSV\u3002","Copy to clipboard":"\u590d\u5236\u5230\u526a\u8d34\u677f","Nothing":"\u6ca1\u6709\u4ec0\u4e48","Delete item":"\u5220\u9664\u9879\u76ee","Load symbols":"\u52a0\u8f7d\u7b26\u53f7","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u8fde\u63a5\u7c7b\u578b\uff1a0x1 - PG\u30010x2 - OP\u30010x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u673a\u67b6\u548c\u63d2\u69fd\uff1a[\u673a\u67b6 * 0x20 + \u63d2\u69fd]","TSV was copied to clipboard":"TSV \u88ab\u590d\u5236\u5230\u526a\u8d34\u677f"}')},418:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a(15),i=a.n(s),n=a(447),l=(a(342),a(67)),r=a(41),d=a(91),c=a(329),p=a(73),u=a(43),m=a(42),h=a(5),g=a(92),b=a(454),f=a(463),S=a(455),v=a(308),x=a.n(v),j=a(218),T=a.n(j),y=a(13),O=a.n(y),P=a(328),C=a(171),A=a(452),k=a(464),R=a(439),D=a(451),w=a(450),L=a(220),I=a(333),E=a(429),W=a(453),V=a(449),B=a(170),N=a(209),z=a(311),G=a(312),M=a(6),U=function(e){var t=Object(g.b)().enqueueSnackbar,a=Object(o.useCallback)((function(a){e.onChange(a),t(O.a.t("Data updated"))}),[]),s=Object(P.a)({onDrop:a,accept:e.accept}),i=s.getRootProps,n=s.getInputProps,r=s.isDragActive;return Object(M.jsxs)(L.a,{style:{padding:3,paddingRight:40},children:[Object(M.jsx)(C.a,{variant:"h6",gutterBottom:!0,children:O.a.t(e.label)}),Object(M.jsxs)("div",Object(l.a)(Object(l.a)({},i()),{},{className:e.classes.fileInput,style:r?{backgroundColor:"rgba(0, 255, 0, 0.1)"}:{cursor:"pointer"},children:[Object(M.jsx)("input",Object(l.a)({},n())),r?Object(M.jsx)("p",{children:O.a.t("Drop the file here ...")}):Object(M.jsx)("p",{children:O.a.t("Drag 'n' drop file here, or click to select file")})]}))]})},F=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).inputDisabled=function(e){return!1},o.inputDisplay=function(e){if(null===o.props.native.params.slot){if(["rack","slot"].includes(e.name))return!1}else if(["localTSAP","remoteTSAP"].includes(e.name))return!1;return"timeOffset"!==e.name||["summer","offset"].includes(o.props.native.params.timeFormat)},o.changeParam=function(e,t){var a=JSON.parse(JSON.stringify(o.props.native));"s7logo"===e?t?(a.params.localTSAP="",a.params.remoteTSAP="",a.params.rack=null,a.params.slot=null):(a.params.localTSAP=null,a.params.remoteTSAP=null,a.params.rack="",a.params.slot=""):a.params[e]=t,o.props.changeNative(a)},o.loadSymbols=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){var s={inputs:[],outputs:[],markers:[]},i=a.result;(i=i.split("126,")).forEach((function(e){var t=e.slice(23,29).replace(/( )/g,""),a={Name:e.slice(0,23).replace(/( ){2,}/g,""),Address:e.slice(29,36).replace(/( )/g,""),Type:e.slice(36,41).replace(/( )/g,""),Description:e.slice(46,126).replace(/( ){2,}/,""),Unit:"",poll:!0,RW:!1,WP:!1};"E"!==t&&"EB"!==t&&"EW"!==t&&"ED"!==t||s.inputs.push(a),"A"!==t&&"AB"!==t&&"AW"!==t&&"AD"!==t||s.outputs.push(a),"M"!==t&&"MB"!==t&&"MW"!==t&&"MD"!==t||s.markers.push(a)})),["inputs","outputs","markers"].forEach((function(e){t[e]=s[e]})),o.props.changeNative(t)},a.readAsText(e[0],"ISO-8859-1")},o.addDb=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){setTimeout((function(){var e=a.result,o={inputs:!1,outputs:!1,markers:!1,dbs:!1},s={inputs:t.inputs||[],outputs:t.outputs||[],markers:t.markers||[],dbs:t.dbs||[]};if(-1!==e.indexOf("Leseanforderung")){for(var i=e.replace(/\r\n/g,"\n").split("\n"),n={Name:{attr:"Name"},Typ:{attr:""},Operand:{attr:"Address",process:function(e){var t=(e=e.trim()).match(/^DB (\d+)/);if(!t){var a=e.match(/^MB? (\d+)\.?(\d+)?$/);return a?"M "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^AB? (\d+)\.?(\d+)?$/))?"OUT "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^EB? (\d+)\.?(\d+)?$/))?"IN "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):e}var o=e.match(/(\d+).?(\d+)?$/);return t&&o?"DB".concat(t[1]," ").concat(o[1]).concat(void 0!==o[2]?"."+o[2]:""):e}},"SPS-Format":{attr:"Type",process:function(e){return e}},Byteanzahl:{attr:"Length",process:function(e){return parseInt(e,10)}},Zugriff:{attr:"RW",process:function(e){return"read"!==e}},Leseanforderung:{attr:"poll",process:function(e){return"zyklisch"===e}},"AktZeit (ms)":{attr:""},Kommentar:{attr:"Description"},"Clients (Anzahl)":{attr:""}},l=i[0].split(","),r=[],d=0;d<l.length;d++)l[d]=l[d].replace(/"/g,""),r.push(n[l[d]]);for(var c=1;c<i.length;c++)if(i[c]=i[c].trim(),i[c]){l=i[c].trim().split(",");for(var p={Type:"ARRAY",Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},u=0;u<r.length;u++)if(r[u].attr){if(!l[u]){console.log("error");break}if(l[u]=l[u].replace(/"/g,""),p[r[u].attr]=r[u].process?r[u].process(l[u]):l[u],p.Name.match(/^@/)){p=null;break}}if(p){"BYTE"===p.Type&&1!==p.Length&&(p.Type="ARRAY"),"CHAR"===p.Type&&(p.Type="STRING"),"BYTE"!==p.Type&&"BOOL"!==p.Type&&"INT"!==p.Type||(p.Length="");var m=void 0;if(p.Address.match(/^DB/))m="dbs";else if(p.Address.match(/^IN/))p.Address=p.Address.replace(/^IN\s?/,""),m="inputs";else if(p.Address.match(/^OUT/))m="outputs",p.Address=p.Address.replace(/^OUT\s?/,"");else{if(!p.Address.match(/^M/)){console.error("Unknown TYPE: "+p.Address);continue}m="markers",p.Address=p.Address.replace(/^M\s?/,"")}for(var h=0;h<s[m].length;h++)if(s[m][h].Address===p.Address){s[m][h]=p,o[m]=!0,p=null;break}p&&(o[m]=!0,s[m].push(p))}}}else{var g=e.match(/(DB)[0-9]+\s-\s/g),b=g?g[0].replace(" - ",""):"",f=e.split("STRUCT");(f[1]?f[1].split("=")[0].split("\n"):[]).forEach((function(e){if(e.length>10){var t=e.split(/\s+/g);t.shift();for(var a={Address:b+" "+t.shift(),Name:t.shift(),Type:t.shift(),dec:t.shift(),Description:t.join(" "),Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},i=0;i<s.dbs.length;i++)if(s.dbs[i].Address===a.Address){s.dbs[i]=a,o.dbs=!0,a=null;break}a&&(o.dbs=!0,s.dbs.push(a))}}))}for(var S in s)s.hasOwnProperty(S)&&s[S].sort((function(e,t){var a=e.Address.match(/^D?B?\s?(\d+)/),o=t.Address.match(/^D?B?\s?(\d+)/);if(!a)return-1;if(!o)return 1;if(parseInt(a[1],10)>parseInt(o[1],10))return 1;if(parseInt(a[1],10)<parseInt(o[1],10))return-1;var s=e.Address.match(/\s(\d+).?(\d+)?$/),i=t.Address.match(/\s(\d+).?(\d+)?$/);return s?i?parseInt(s[1],10)>parseInt(i[1],10)?1:parseInt(s[1],10)<parseInt(i[1],10)?-1:void 0===s[2]&&void 0!==i[2]?1:void 0===i[2]&&void 0!==s[2]?-1:void 0===s[2]&&void 0===i[2]?0:parseInt(s[2],10)>parseInt(i[2],10)?1:parseInt(s[2],10)<parseInt(i[1],10)?-1:0:1:-1}));o.dbs&&(t.dbs=s.dbs),o.inputs&&(t.inputs=s.inputs),o.outputs&&(t.outputs=s.outputs),o.markers&&(t.markers=s.markers),console.log(t)}),200)},a.readAsText(e[0],"ISO-8859-1")},o.state={},o}return Object(d.a)(a,[{key:"getValue",value:function(e){return"s7logo"===e?null===this.props.native.params.slot:this.props.native.params[e]}},{key:"getInputsBlock",value:function(e,t){var a=this;return Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t(t)}),Object(M.jsx)(V.a,{container:!0,spacing:2,direction:"column",children:e.map((function(e){if(!a.inputDisplay(e))return null;if("checkbox"===e.type)return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(w.a,{label:O.a.t(e.title),control:Object(M.jsx)(k.a,{label:O.a.t(e.title),className:a.props.classes.optionsCheckbox,disabled:a.inputDisabled(e),checked:a.getValue(e.name),onChange:function(t){return a.changeParam(e.name,t.target.checked)}})})," ",e.dimension?O.a.t(e.dimension):null]},e.name);if("select"===e.type)return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsxs)(L.a,{children:[Object(M.jsx)(E.a,{shrink:!0,children:O.a.t(e.title)}),Object(M.jsx)(R.a,{className:a.props.classes.optionsSelect,displayEmpty:!0,disabled:a.inputDisabled(e),value:a.getValue(e.name),onChange:function(t){return a.changeParam(e.name,t.target.value)},children:e.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title},e.value)}))})]})," ",e.dimension?O.a.t(e.dimension):null]},e.name);if("hex"===e.type){var t=parseInt(a.getValue(e.name))?parseInt(a.getValue(e.name)):0,o=t>>8&255,s=255&t;return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(E.a,{className:a.props.classes.optionsLabel,children:O.a.t(e.title)}),Object(M.jsx)(I.a,{title:O.a.t("Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic"),style:{width:"6ch"},value:o.toString(16)?o.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,parseInt(t.target.value,16)<<8|s)}}),Object(M.jsx)(I.a,{title:O.a.t("Rack and slot: [Rack * 0x20 + Slot]"),style:{marginLeft:5,width:"6ch"},value:s.toString(16)?s.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,o<<8|parseInt(t.target.value,16))}})]},e.name)}return Object(M.jsx)(V.a,{item:!0,className:a.props.classes.optionContainer,children:Object(M.jsx)(A.a,{type:e.type,label:O.a.t(e.title),className:a.props.classes.optionsTextField,disabled:a.inputDisabled(e),value:a.getValue(e.name),InputProps:{endAdornment:e.dimension?Object(M.jsx)(W.a,{position:"end",children:O.a.t(e.dimension)}):null},onChange:function(t){return a.changeParam(e.name,t.target.value)}})},e.name)}))})]})}},{key:"getImportsBlock",value:function(){return Object(M.jsx)(M.Fragment,{children:Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t("Import")}),Object(M.jsxs)(N.a,{className:this.props.classes.optionContainer,children:[Object(M.jsx)(U,{classes:this.props.classes,onChange:this.loadSymbols,label:"Load symbols",accept:".asc"}),Object(M.jsx)(U,{classes:this.props.classes,onChange:this.addDb,label:"Add DB",accept:".csv,.prn"})]})]})})}},{key:"render",value:function(){return Object(M.jsx)("form",{className:this.props.classes.tab,children:Object(M.jsxs)(V.a,{container:!0,spacing:2,children:[Object(M.jsxs)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:[this.getInputsBlock(z,"PLC Connection"),this.getImportsBlock()]}),Object(M.jsx)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:this.getInputsBlock(G,"General")})]})})}}]),a}(o.Component),q=Object(h.a)((function(e){return{optionsSelect:{width:280},optionsTextField:{width:280},optionContainer:{},optionsContainer:{width:"calc(100% - ".concat(e.spacing(4),"px)"),padding:e.spacing(2),marginBottom:20,display:"inline-block",textAlign:"left"},optionsGrid:{textAlign:"center",padding:e.spacing(2)},optionsLabel:{fontSize:12},header:{fontSize:24},fileInput:{textAlign:"center",display:"inline-block",height:80,width:200,border:"2px dashed #777",borderRadius:10,marginTop:12,padding:4}}}))(F),J=a(4),Y=a.n(J),$=a(315),Z=a(316),H=a(56),K=a(456),_=a(459),Q=a(457),X=a(460),ee=a(458),te=a(215),ae=a(465),oe=a(462),se=a(78),ie=a.n(se),ne=a(325),le=a.n(ne),re=a(326),de=a.n(re),ce=a(60),pe=a.n(ce),ue=a(317),me=a.n(ue),he=a(318),ge=a.n(he),be=a(320),fe=a.n(be),Se=a(222),ve=a(322),xe=a.n(ve),je=a(323),Te=a.n(je),ye=a(289),Oe=a(290),Pe=a(291),Ce=a(292),Ae=a(293),ke=a(288),Re=a(103),De=a.n(Re),we=a(219),Le=a.n(we),Ie=a(324),Ee=a.n(Ie),We=Object(h.a)((function(e){return{tsvEditor:{width:"100%",height:400},tsvEditorTextarea:{fontFamily:"monospace"}}}))((function(e){var t=Object(o.useState)(""),a=Object(H.a)(t,2),s=a[0],i=a[1];Object(o.useEffect)((function(){var t=[];t.push(e.fields.map((function(e){return e.name}))),e.data.forEach((function(a){return t.push(e.fields.map((function(e){return void 0!==a[e.name]&&null!==a[e.name]?a[e.name].toString():""})))})),i(Object(Se.json2tsv)(t))}),[e.open]);var n=Object(g.b)().enqueueSnackbar;if(!e.open)return null;return Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,maxWidth:"lg",fullWidth:!0,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Edit data as TSV")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("You can copy, paste and edit data as TSV.")}),Object(M.jsx)("div",{children:Object(M.jsx)(xe.a,{onChange:function(e){return i(e)},height:"400px",showPrintMargin:!1,value:s,className:e.classes.tsvEditor,width:"100%",setOptions:{firstLineNumber:0},mode:null})})]}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"outlined",color:"primary",onClick:function(){Te()(s),n(O.a.t("TSV was copied to clipboard"))},startIcon:Object(M.jsx)(Ee.a,{}),children:O.a.t("Copy to clipboard")}),Object(M.jsx)(ke.a,{variant:"contained",color:"primary",onClick:function(){var t=Object(Se.tsv2json)(s),a=t.shift(),o=!0,i=[];for(var l in e.fields)e.fields[l].name!==a[l]&&(i.push(Object(M.jsxs)(M.Fragment,{children:["No field ",Object(M.jsx)("i",{children:e.fields[l].name})," in position ",Object(M.jsx)("i",{children:parseInt(l)+1}),"!"]})),o=!1);t=t.map((function(t,a){var s={};for(var n in e.fields)"select"!==e.fields[n].type||e.fields[n].options.map((function(e){return e.value})).includes(t[n])||(i.push(Object(M.jsxs)(M.Fragment,{children:["Value ",Object(M.jsx)("i",{children:t[n]})," is wrong for field ",Object(M.jsx)("i",{children:e.fields[n].name})," in position ",Object(M.jsx)("i",{children:parseInt(a)+1}),"!"]})),o=!1),"checkbox"===e.fields[n].type&&(t[n]="true"===t[n]),s[e.fields[n].name]=t[n];return s})),o?(e.save(t),e.onClose()):n(Object(M.jsx)("div",{children:i.map((function(e,t){return Object(M.jsx)("div",{children:e},t)}))}),{variant:"error"})},startIcon:Object(M.jsx)(Le.a,{}),children:O.a.t("Import")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Close")})]})]})})),Ve=function(e){return e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete all items")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("Are you sure to delete all items?")}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(),e.onClose()},children:O.a.t("Delete all items")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Be=function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1];return Object(o.useEffect)((function(){i(!1)}),[e.open]),e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete item")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t('Are you sure to delete item with address "%s"?',e.item._address)}),Object(M.jsx)(Ce.a,{children:Object(M.jsx)(w.a,{label:O.a.t("Don't show this message in 5 minutes"),control:Object(M.jsx)(k.a,{checked:s,onChange:function(e){return i(e.target.checked)}})})}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(s),e.onClose()},children:O.a.t("Delete")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Ne=function(e){var t,a=e.sortedItem,s=e.field,i=e.editMode,n=e.setEditMode,l=Object(o.useRef)(),r=a.item;if("checkbox"===s.type)t=Object(M.jsx)(oe.a,{title:O.a.t(s.title),children:Object(M.jsx)(k.a,{inputRef:l,className:e.classes.tableCheckbox,checked:!!r[s.name],disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.checked)}})});else if("rooms"===s.type)t=i?Object(M.jsx)(fe.a,{list:e.rooms,allowNone:!0,value:r[s.name],dense:!0,themeType:e.themeType,inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t)},className:e.classes.tableSelectContainer}):Object(M.jsx)(ge.a,{list:e.rooms,value:r[s.name],themeType:e.themeType});else if("select"===s.type)if(i)t=Object(M.jsx)(R.a,{value:r[s.name],inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},className:e.classes.tableSelectContainer,children:s.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title?e.title:Object(M.jsx)("i",{children:O.a.t("Nothing")})},e.value)}))});else{var d=s.options.find((function(e){return e.value===r[s.name]}));t=d?d.title:""}else t=i?Object(M.jsx)(A.a,{value:r[s.name],className:e.classes.tableTextFieldContainer,inputProps:{ref:l,className:e.classes.tableTextField},type:s.type,onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},disabled:e.getDisable(a.$index,s.name)}):r[s.name]?r[s.name]:null;return Object(M.jsx)(ee.a,{className:pe.a.clsx(e.classes.tableCell,!i&&e.classes.nonEditMode),onClick:function(e){n(!0),window.localStorage.setItem("Modbus.editMode","true"),window.setTimeout((function(){return l.current&&l.current.focus()}),100)},children:t})},ze=Object(h.a)((function(e){return{tableHeader:{whiteSpace:"nowrap",fontWeight:"bold",fontSize:"80%",padding:"0px 8px"},tableHeaderExtended:{color:"dark"===e.palette.type?e.palette.primary.light:e.palette.primary.dark},tableCell:{whiteSpace:"nowrap",fontSize:"80%",padding:"0px 8px"},tableContainer:{overflow:"auto",maxHeight:"calc(100vh - 180px)"},tableTextField:{fontSize:"80%"},tableSelect:{fontSize:"80%"},tableTextFieldContainer:{width:"100%"},tableSelectContainer:{width:"100%"},nonEditMode:{cursor:"pointer"}}}))((function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1],n=Object(o.useState)(parseInt(window.localStorage.getItem("Modbus.editMode"),10)||0),r=Object(H.a)(n,2),d=r[0],c=r[1],p=Object(o.useState)("true"===window.localStorage.getItem("Modbus.extendedMode")),u=Object(H.a)(p,2),m=u[0],h=u[1],g=Object(o.useState)({open:!1,action:null}),b=Object(H.a)(g,2),f=b[0],S=b[1],v=Object(o.useState)({open:!1,item:null,action:null}),x=Object(H.a)(v,2),j=x[0],T=x[1],y=e.getSortedData(e.data,e.orderBy,e.order);return Object(M.jsxs)("div",{children:[Object(M.jsxs)("div",{children:[Object(M.jsx)(oe.a,{title:O.a.t("Add line"),children:Object(M.jsx)(te.a,{onClick:function(t){return e.addItem()},children:Object(M.jsx)(le.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Edit as TSV (Tab separated values)"),children:Object(M.jsx)(te.a,{onClick:function(){return i(!0)},children:Object(M.jsx)(de.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Toggle extended mode"),children:Object(M.jsx)(te.a,{color:m?"primary":"inherit",onClick:function(){window.localStorage.setItem("Modbus.extendedMode",m?"false":"true"),h(!m)},children:Object(M.jsx)(me.a,{})})})]}),Object(M.jsx)("div",{className:e.classes.tableContainer,children:Object(M.jsxs)(K.a,{size:"small",stickyHeader:!0,padding:"none",children:[Object(M.jsx)(_.a,{children:Object(M.jsxs)(X.a,{children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(t){var a=!1,o=!1,s=!1,i=!1;for(var n in e.data)if(e.data[n][t.name]?(a=!0,s=!0):(a=!1,i=!0),s&&i){o=!0,a=!1;break}return Object(M.jsxs)(ee.a,{style:{width:"checkbox"===t.type?20:t.width},className:pe.a.clsx(e.classes.tableHeader,t.expert&&e.classes.tableHeaderExtended),title:t.tooltip?O.a.t(t.tooltip):null,children:["checkbox"===t.type?Object(M.jsx)(oe.a,{title:O.a.t("Change all"),children:Object(M.jsx)(k.a,{indeterminate:o,checked:a,onChange:function(a){var o=JSON.parse(JSON.stringify(e.data));o.forEach((function(e){return e[t.name]=a.target.checked})),e.changeData(o)}})}):null,t.sorted?Object(M.jsx)(ae.a,{active:t.name===e.orderBy,direction:e.order,onClick:function(a){var o=e.orderBy===t.name&&"asc"===e.order;e.onChangeOrder(t.name,o?"desc":"asc")},children:O.a.t(t.title)}):O.a.t(t.title)]},t.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete all"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(t){return S({open:!0,action:function(){return e.changeData([])}})},disabled:!e.data.length,children:Object(M.jsx)(ie.a,{})})})})})]})}),Object(M.jsx)(Q.a,{children:y.map((function(t){return Object(M.jsxs)(X.a,{hover:!0,children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(a){return Object(M.jsx)(Ne,Object(l.a)({themeType:e.themeType,sortedItem:t,field:a,editMode:d===t.$index,rooms:e.rooms,setEditMode:function(){return c(t.$index)}},e),a.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(a){var o=window.sessionStorage.getItem("disableDeleteDialogs");o&&new Date-new Date(o)<3e5?e.deleteItem(t.$index):T({open:!0,action:function(a){a&&window.sessionStorage.setItem("disableDeleteDialogs",(new Date).toISOString()),e.deleteItem(t.$index)},item:t.item})},children:Object(M.jsx)(ie.a,{})})})})})]},t.$index)}))})]})}),s?Object(M.jsx)(We,{open:!0,save:function(t){e.prefix&&t.forEach((function(t){t.Address=(t.Address||"").toUpperCase(),t.Address&&!t.Address.startsWith(e.prefix)&&(t.Address=e.prefix+t.Address)})),e.changeData(t)},onClose:function(){return i(!1)},data:e.data,fields:e.fields}):null,Object(M.jsx)(Ve,{open:f.open,action:f.action,onClose:function(){return S({open:!1,action:null})}}),Object(M.jsx)(Be,{open:j.open,action:j.action,onClose:function(){return T({open:!1,action:null,item:null})},item:j.item})]})})),Ge=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).changeParam=function(e,t,a){var s=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));if(s[e][t]=a,"Type"===t)if(["BOOL"].includes(a)?s[e].Length=.1:["","BYTE"].includes(a)?s[e].Length=1:["WORD","INT","STRING","S5TIME"].includes(a)?s[e].Length=2:["DWORD","DINT","REAL"].includes(a)?s[e].Length=4:["S7TIME"].includes(a)?s[e].Length=8:["S7STRING","ARRAY"].includes(a)&&(s[e].Length=32),"BOOL"===a){var i=o.address2struct(s[e].Address);void 0===i.bit&&(i.bit=0,s[e].Address=o.struct2address(i))}else{var n=o.address2struct(s[e].Address);void 0!==n.bit&&(n.bit>0&&n.byte++,delete n.bit,s[e].Address=o.struct2address(n))}o.props.onChange(o.nativeField,s)},o.addItem=function(){var e=JSON.parse(JSON.stringify(o.props.native[o.nativeField])),t={};if(o.getFields().forEach((function(e){return t[e.name]=""})),e.length){var a=JSON.parse(JSON.stringify(e));a.sort((function(e,t){return e.Address>t.Address?1:-1}));var s=a[a.length-1],i=o.address2struct(s.Address);"BOOL"===s.Type?(i.bit=i.bit||0,i.bit++,i.bit>=8&&(i.bit=i.bit%8,i.byte++)):(delete i.bit,i.byte+=s.Length),void 0!==i.db&&i.byte+s.Length>65535&&(i.db++,i.byte=0,"BOOL"===s.Type&&(i.bit=0)),t.Address=o.struct2address(i),t.Type=s.Type,t.Length=s.Length,t.Unit=s.Unit,t.Role=s.Role,t.Room=s.Room,t.poll=s.poll,t.RW=s.RW,t.WP=s.WP}else t.role="level",t.Type="BOOL",t.Length="0.1",t.poll=!0,"dbs"===o.nativeField?t.Address="DB1 0.0":t.Address="0.0";e.push(t),o.props.onChange(o.nativeField,e)},o.deleteItem=function(e){var t=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));t.splice(e,1),o.props.onChange(o.nativeField,t)},o.changeData=function(e){o.props.onChange(o.nativeField,e)},o.getDisable=function(e,t){return"Length"===t&&!["STRING","S7STRING","ARRAY"].includes(o.props.native[o.nativeField][e].type)},o.getSortedData=function(e,t,a){o.fields=o.fields||o.getFields(),e=e||o.props.native[o.nativeField],t=t||o.state.orderBy,a=a||o.state.order;var s=[];e.forEach((function(e,t){s[t]={item:e,$index:t}}));var i=o.fields.find((function(e){return e.name===t}));return s.sort((function(e,s){var n,l;if("Address"===t){var r=o.address2struct(e.item.Address),d=o.address2struct(s.item.Address);n=0,void 0!==r.db&&(n=r.db<<24),void 0!==d.db&&(l=d.db<<24),n|=r.byte<<8,l|=d.byte<<8,n|=r.bit||0,l|=d.bit||0}else"$index"===t?(n=e[t],l=s[t]):i&&"number"===i.type?(n=parseInt(e.item[t],10),l=parseInt(s.item[t],10)):(n=e.item[t],l=s.item[t]);return("asc"===a?n>l:n<l)?1:-1})),s},o.nativeField="",o.state={order:window.localStorage.getItem("Modbus.order")||"asc",orderBy:window.localStorage.getItem("Modbus.orderBy")||"Address"},o}return Object(d.a)(a,[{key:"getRooms",value:function(){var e=O.a.getLanguage();return this.props.rooms?Object.values(this.props.rooms).map((function(t){return{value:t._id,title:"object"===typeof t.common.name?t.common.name[e]:t.common.name}})):[]}},{key:"getFields",value:function(){var e=this.getRooms();e.unshift({value:"",title:""});var t=[{name:"Address",title:"Address",type:"text",sorted:!0,width:20},{name:"Name",title:"Name",type:"text",sorted:!0},{name:"Description",title:"Description",type:"text",sorted:!0},{name:"Type",title:"Type",type:"select",options:Z,sorted:!0},{name:"Length",title:"Length",type:"text",width:20},{name:"Unit",title:"Unit",type:"text",width:30},{name:"Role",title:"Role",type:"select",options:$,sorted:!0},{name:"Room",title:"Room",type:"rooms",options:e,sorted:!0},{name:"poll",title:"Poll",type:"checkbox"},{name:"RW",title:"RW",type:"checkbox",expert:!0},{name:"WP",title:"WP",type:"checkbox",expert:!0}];return this.props.native.params.multiDeviceId&&t.splice(1,0,{name:"deviceId",title:"Slave ID",type:"number",sorted:!0,width:20}),t}},{key:"address2struct",value:function(e){if("dbs"===this.nativeField){var t=e.split(" "),a=parseInt(t[0].replace("DB","").replace("db","").trim(),10);if(t[1]&&t[1].includes(".")){var o=parseFloat(t[1]);return{db:a,byte:Math.floor(o),bit:10*o%10}}return{db:a,byte:parseInt(t[1],10)}}if(e.includes(".")){var s=parseFloat(e);return{byte:Math.floor(s),bit:10*s%10}}return{byte:parseInt(e,10)}}},{key:"struct2address",value:function(e){return void 0!==e.db?void 0!==e.bit?"DB"+e.db+" "+e.byte+"."+e.bit:"DB"+e.db+" "+e.byte:void 0!==e.bit?e.byte+"."+e.bit:e.byte}},{key:"render",value:function(){var e=this;return this.fields=this.fields||this.getFields(),Object(M.jsx)(B.a,{children:Object(M.jsx)(ze,{prefix:"dbs"===this.nativeField?"DB":"",fields:this.fields,getSortedData:this.getSortedData,data:this.props.native[this.nativeField],changeParam:this.changeParam,addItem:this.addItem,deleteItem:this.deleteItem,changeData:this.changeData,getDisable:this.getDisable,themeType:this.props.themeType,rooms:this.props.rooms,order:this.state.order,orderBy:this.state.orderBy,onChangeOrder:function(t,a){e.setState({orderBy:t,order:a}),window.localStorage.setItem("Modbus.orderBy",t),window.localStorage.setItem("Modbus.order",a)}})})}}]),a}(o.Component),Me=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="inputs",e}return a}(Ge);Me.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var Ue=Me,Fe=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="outputs",e}return a}(Ge);Fe.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var qe=Fe,Je=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="markers",e}return a}(Ge);Je.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var Ye=Je,$e=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="dbs",e}return a}(Ge);$e.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var Ze=[{name:"general",title:"General",component:q},{name:"inputs",title:"Inputs",component:Ue},{name:"outputs",title:"Outputs",component:qe},{name:"marker",title:"Marker",component:Ye},{name:"dbs",title:"DBs",component:$e}],He=function(e){Object(u.a)(o,e);var t=Object(m.a)(o);function o(e){var s;Object(r.a)(this,o);var i=Object(l.a)({},e);return i.encryptedFields=["pass"],i.translations={en:a(407),de:a(408),ru:a(409),pt:a(410),nl:a(411),fr:a(412),it:a(413),es:a(414),pl:a(415),"zh-cn":a(416)},(s=t.call(this,e,i)).state.moreLoaded=!1,s.state.rooms=null,s}return Object(d.a)(o,[{key:"onConnectionReady",value:function(){var e=this;Object(c.a)(Object(p.a)(o.prototype),"onConnectionReady",this).call(this),this.socket.getForeignObjects("enum.rooms.*","enum").then((function(t){return e.setState({moreLoaded:!0,rooms:t})}))}},{key:"getSelectedTab",value:function(){var e=this.state.selectedTab;return e?Ze.findIndex((function(t){return t.name===e})):0}},{key:"render",value:function(){var e=this;return this.state.loaded&&this.state.moreLoaded?Object(M.jsx)(n.a,{theme:this.state.theme,children:Object(M.jsx)(g.a,{children:Object(M.jsxs)("div",{className:"App",style:{background:this.state.theme.palette.background.default,color:this.state.theme.palette.text.primary},children:[Object(M.jsx)(b.a,{position:"static",children:Object(M.jsx)(f.a,{value:this.getSelectedTab(),onChange:function(t,a){return e.selectTab(Ze[a].name,a)},variant:"scrollable",scrollButtons:"auto",children:Ze.map((function(e){return Object(M.jsx)(S.a,{label:e.icon?Object(M.jsxs)(M.Fragment,{children:[e.icon,O.a.t(e.title)]}):O.a.t(e.title),"data-name":e.name,title:e.tooltip?O.a.t(e.tooltip):void 0},e.name)}))})}),Object(M.jsx)("div",{className:this.isIFrame?this.props.classes.tabContentIFrame:this.props.classes.tabContent,children:Ze.map((function(t,a){var o=t.component;if(e.state.selectedTab){if(e.state.selectedTab!==t.name)return null}else if(0!==a)return null;return Object(M.jsx)(o,{themeType:e.state.themeType,common:e.common,socket:e.socket,native:e.state.native,onError:function(t){return e.setState({errorText:!t&&0!==t||"string"===typeof t?t:t.toString()})},onLoad:function(t){return e.onLoadConfig(t)},instance:e.instance,adapterName:e.adapterName,changed:e.state.changed,onChange:function(t,a,o){return e.updateNativeValue(t,a,o)},changeNative:function(t){return e.setState({native:t,changed:e.getIsChanged(t)})},rooms:e.state.rooms},t.name)}))}),this.renderError(),this.renderSaveCloseButtons()]})})}):Object(M.jsx)(n.a,{theme:this.state.theme,children:Object(M.jsx)(T.a,{theme:this.state.themeType})})}}]),o}(x.a),Ke=Object(h.a)((function(e){return{root:{},tabContent:{padding:10,height:"calc(100% - 64px - 48px - 20px)",overflow:"auto"},tabContentIFrame:{padding:10,height:"calc(100% - 64px - 48px - 20px - 38px)",overflow:"auto"},tab:{width:"100%",minHeight:"100%"}}}))(He);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var _e=a(327),Qe=a(217),Xe=a.n(Qe);window.adapterName="s7";var et=pe.a.getThemeName();console.log("iobroker.".concat(window.adapterName,"@").concat(_e.a,' using theme "').concat(et,'"')),function e(){return i.a.render(Object(M.jsx)(n.a,{theme:Xe()(et),children:Object(M.jsx)(Ke,{onThemeChange:function(t){et=t,e()}})}),document.getElementById("root"))}(),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[418,1,2]]]);
+//# sourceMappingURL=main.84c400bc.chunk.js.map
\ No newline at end of file
diff --git a/src/build/static/js/main.84c400bc.chunk.js.map b/src/build/static/js/main.84c400bc.chunk.js.map
new file mode 100644
index 0000000..a7d9cc2
--- /dev/null
+++ b/src/build/static/js/main.84c400bc.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["Tabs/Options.js","Components/TsvDialog.js","Components/DeleteAllDialog.js","Components/DeleteDialog.js","Components/RegisterTable.js","Tabs/BaseRegisters.js","Tabs/Inputs.js","Tabs/Outputs.js","Tabs/Marker.js","Tabs/DBs.js","App.js","serviceWorker.js","index.js"],"names":["FileInput","props","enqueueSnackbar","useSnackbar","onDrop","useCallback","acceptedFiles","onChange","I18n","t","useDropzone","accept","getRootProps","getInputProps","isDragActive","FormControl","style","padding","paddingRight","Typography","variant","gutterBottom","label","className","classes","fileInput","backgroundColor","cursor","Options","inputDisabled","input","inputDisplay","native","params","slot","includes","name","timeFormat","changeParam","value","JSON","parse","stringify","localTSAP","remoteTSAP","rack","changeNative","loadSymbols","e","reader","FileReader","onload","localData","inputs","outputs","markers","text","result","split","forEach","line","typ","slice","replace","d","Name","Address","Type","Description","Unit","poll","RW","WP","push","table","readAsText","addDb","setTimeout","changes","dbs","newParts","indexOf","lines","mapping","attr","process","f","db","trim","match","m","parseInt","undefined","offset","sFields","fields","length","l","obj","Role","Room","console","log","Length","_attr","error","aaa","mm","vv","item","x","shift","dec","join","hasOwnProperty","sort","a","b","aDB","bDB","aOffset","bOffset","state","this","title","Paper","optionsContainer","header","Grid","container","spacing","direction","map","type","optionContainer","FormControlLabel","control","Checkbox","optionsCheckbox","disabled","checked","getValue","target","dimension","InputLabel","shrink","Select","optionsSelect","displayEmpty","options","option","MenuItem","top","bottom","optionsLabel","Input","width","toString","toUpperCase","marginLeft","TextField","optionsTextField","InputProps","endAdornment","InputAdornment","position","Box","tab","xs","md","optionsGrid","getInputsBlock","connectionInputs","getImportsBlock","generalInputs","Component","withStyles","theme","marginBottom","display","textAlign","fontSize","height","border","borderRadius","marginTop","tsvEditor","tsvEditorTextarea","fontFamily","useState","tsv","setTsv","useEffect","tsvResult","field","data","json2tsv","open","Dialog","onClose","maxWidth","fullWidth","DialogTitle","DialogContent","DialogContentText","showPrintMargin","setOptions","firstLineNumber","mode","DialogActions","Button","color","onClick","copy","startIcon","tsv2json","success","errors","index","itemValues","itemIndex","save","DeleteAllDialog","action","DeleteDialog","disableWarnings","setDisableWarnings","_address","DataCell","sortedItem","editMode","setEditMode","ref","useRef","Tooltip","inputRef","tableCheckbox","getDisable","$index","list","rooms","allowNone","dense","themeType","inputProps","tableSelect","tableSelectContainer","find","tableTextFieldContainer","tableTextField","TableCell","Utils","clsx","tableCell","nonEditMode","window","localStorage","setItem","current","focus","tableHeader","whiteSpace","fontWeight","tableHeaderExtended","palette","primary","light","dark","tableContainer","overflow","maxHeight","tsvDialogOpen","setTsvDialogOpen","getItem","extendedMode","setExtendedMode","deleteAllDialog","setDeleteAllDialog","deleteDialog","setDeleteDialog","sortedData","getSortedData","orderBy","order","IconButton","addItem","Table","size","stickyHeader","TableHead","TableRow","filter","expert","formulaDisabled","isChecked","indeterminate","trueFound","falseFound","k","tooltip","newData","changeData","sorted","TableSortLabel","active","isAsc","onChangeOrder","TableBody","hover","lastTime","sessionStorage","Date","deleteItem","disableDialogs","toISOString","prefix","startsWith","BaseRegisters","nativeField","struct","address2struct","bit","struct2address","byte","newItem","getFields","item1","item2","lastItem","role","splice","sortedItem1","sortedItem2","sort1","sort2","a1","a2","lang","getLanguage","Object","values","room","_id","common","getRooms","unshift","types","roles","multiDeviceId","address","parts","parseFloat","Math","floor","setState","Inputs","propTypes","PropTypes","object","isRequired","instance","number","adapterName","string","onError","func","onLoad","changed","bool","socket","Outputs","Marker","Dbs","tabs","component","TabOptions","TabInputs","TabOutputs","TabMarker","App","extendedProps","encryptedFields","translations","require","moreLoaded","getForeignObjects","then","selectedTab","findIndex","loaded","background","default","AppBar","Tabs","getSelectedTab","selectTab","scrollButtons","Tab","icon","data-name","isIFrame","tabContentIFrame","tabContent","TabComponent","errorText","onLoadConfig","cb","updateNativeValue","getIsChanged","renderError","renderSaveCloseButtons","GenericApp","root","minHeight","Boolean","location","hostname","themeName","getThemeName","version","build","ReactDOM","render","onThemeChange","_theme","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"i0wCA+DIA,EAAY,SAAUC,GACtB,IAAQC,EAAoBC,cAApBD,gBACFE,EAASC,uBAAY,SAAAC,GACvBL,EAAMM,SAASD,GACfJ,EAAgBM,IAAKC,EAAE,mBACxB,IAED,EAAoDC,YAAY,CAACN,SAAQO,OAAQV,EAAMU,SAAhFC,EAAP,EAAOA,aAAcC,EAArB,EAAqBA,cAAeC,EAApC,EAAoCA,aAEpC,OAAO,eAACC,EAAA,EAAD,CAAaC,MAAO,CAACC,QAAS,EAAGC,aAAc,IAA/C,UACL,cAACC,EAAA,EAAD,CAAYC,QAAQ,KAAKC,cAAY,EAArC,SAAwCb,IAAKC,EAAER,EAAMqB,SACrD,gDAASV,KAAT,IAAyBW,UAAWtB,EAAMuB,QAAQC,UAAWT,MAAOF,EAAe,CAACY,gBAAiB,wBAA0B,CAACC,OAAQ,WAAxI,UACI,qCAAWd,MAEPC,EACA,4BAAIN,IAAKC,EAAE,4BACX,4BAAID,IAAKC,EAAL,8DAMdmB,E,kDACF,WAAY3B,GAAQ,IAAD,8BACf,cAAMA,IAaV4B,cAAgB,SAAAC,GACZ,OAAO,GAfQ,EAkBnBC,aAAe,SAAAD,GACX,GAAsC,OAAlC,EAAK7B,MAAM+B,OAAOC,OAAOC,MACzB,GAAI,CAAC,OAAQ,QAAQC,SAASL,EAAMM,MAChC,OAAO,OAGX,GAAI,C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C,GAAD,CACIM,cAAe,SAAAC,GACXP,GAAYO,EACZJ,SAIZK,SAASC,eAAe,SAchCN,GDwFM,kBAAmBO,WACrBA,UAAUC,cAAcC,MAAM3C,MAAK,SAAA4C,GACjCA,EAAaC,kB","file":"static/js/main.84c400bc.chunk.js","sourcesContent":["import {Component, useCallback} from 'react';\r\nimport {useDropzone} from 'react-dropzone';\r\nimport { useSnackbar } from 'notistack';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Typography from '@material-ui/core/Typography';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport Input from '@material-ui/core/Input';\r\nimport InputLabel from '@material-ui/core/InputLabel';\r\nimport InputAdornment from '@material-ui/core/InputAdornment';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport Box from '@material-ui/core/Box';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport connectionInputs from '../data/optionsConnection';\r\nimport generalInputs from '../data/optionsGeneral';\r\n\r\nconst styles = theme => ({\r\n    optionsSelect: {\r\n        width: 280\r\n    },\r\n    optionsTextField: {\r\n        width: 280\r\n    },\r\n    optionContainer: {\r\n    },\r\n    optionsContainer: {\r\n        width: `calc(100% - ${theme.spacing(4)}px)`,\r\n        padding: theme.spacing(2),\r\n        marginBottom: 20,\r\n        display: 'inline-block',\r\n        textAlign: 'left'\r\n    },\r\n    optionsGrid: {\r\n        textAlign: 'center',\r\n        padding: theme.spacing(2),\r\n    },\r\n    optionsLabel: {\r\n        fontSize: 12,\r\n    },\r\n    header: {\r\n        fontSize: 24,\r\n    },\r\n    fileInput: {\r\n        textAlign: 'center',\r\n        display: 'inline-block',\r\n        height: 80,\r\n        width: 200,\r\n        border: '2px dashed #777',\r\n        borderRadius: 10,\r\n        marginTop: 12,\r\n        padding: 4\r\n    }\r\n});\r\n\r\nlet FileInput = function (props) {\r\n    const { enqueueSnackbar } = useSnackbar();\r\n    const onDrop = useCallback(acceptedFiles => {\r\n        props.onChange(acceptedFiles);\r\n        enqueueSnackbar(I18n.t('Data updated'));\r\n    }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n      const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop, accept: props.accept});\r\n\r\n      return <FormControl style={{padding: 3, paddingRight: 40}}>\r\n        <Typography variant=\"h6\" gutterBottom>{ I18n.t(props.label)}</Typography>\r\n        <div {...getRootProps()} className={props.classes.fileInput} style={isDragActive ? {backgroundColor: 'rgba(0, 255, 0, 0.1)'} : {cursor: 'pointer'}}>\r\n            <input {...getInputProps()} />\r\n            {\r\n                isDragActive ?\r\n                <p>{I18n.t('Drop the file here ...')}</p> :\r\n                <p>{I18n.t(`Drag 'n' drop file here, or click to select file`)}</p>\r\n            }\r\n        </div>\r\n    </FormControl>;\r\n};\r\n\r\nclass Options extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n\r\n        this.state = {\r\n        };\r\n    }\r\n\r\n    getValue(name) {\r\n        if (name === 's7logo') {\r\n            return this.props.native.params.slot === null;\r\n        }\r\n        return this.props.native.params[name];\r\n    }\r\n\r\n    inputDisabled = input => {\r\n        return false;\r\n    }\r\n\r\n    inputDisplay = input => {\r\n        if (this.props.native.params.slot === null) {\r\n            if (['rack', 'slot'].includes(input.name)) {\r\n                return false;\r\n            }\r\n        } else {\r\n            if (['localTSAP', 'remoteTSAP'].includes(input.name)) {\r\n                return false;\r\n            }\r\n        }\r\n        if (input.name === 'timeOffset') {\r\n            return ['summer', 'offset'].includes(this.props.native.params.timeFormat);\r\n        }\r\n        return true;\r\n    }\r\n\r\n    getInputsBlock(inputs, title) {\r\n        return <Paper className={this.props.classes.optionsContainer}>\r\n            <Typography variant=\"h4\" gutterBottom className={this.props.classes.header}>{I18n.t(title)}</Typography>\r\n            <Grid container spacing={2} direction=\"column\">\r\n                {inputs.map(input => {\r\n                    if (!this.inputDisplay(input)) {\r\n                        return null;\r\n                    }\r\n                    if (input.type === 'checkbox') {\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}>\r\n                            <FormControlLabel\r\n                                label={I18n.t(input.title)}\r\n                                control={<Checkbox\r\n                                    label={I18n.t(input.title)}\r\n                                    className={this.props.classes.optionsCheckbox}\r\n                                    disabled={this.inputDisabled(input)}\r\n                                    checked={this.getValue(input.name)}\r\n                                    onChange={e => this.changeParam(input.name, e.target.checked)}\r\n                                />}/> {input.dimension ? I18n.t(input.dimension) : null}</Grid>;\r\n                    } else if (input.type === 'select') {\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}>\r\n                            <FormControl>\r\n                                <InputLabel shrink>{I18n.t(input.title)}</InputLabel>\r\n                                <Select\r\n                                    className={this.props.classes.optionsSelect}\r\n                                    displayEmpty\r\n                                    disabled={this.inputDisabled(input)}\r\n                                    value={this.getValue(input.name)}\r\n                                    onChange={e => this.changeParam(input.name, e.target.value)}\r\n                                >\r\n                                    {input.options.map(option =>\r\n                                        <MenuItem key={option.value} value={option.value}>{option.title}</MenuItem>\r\n                                    )}\r\n                                </Select>\r\n                            </FormControl> {input.dimension ? I18n.t(input.dimension) : null}\r\n                        </Grid>;\r\n                    } else if (input.type === 'hex') {\r\n                        let value = parseInt(this.getValue(input.name)) ? parseInt(this.getValue(input.name)) : 0;\r\n                        let top = (value >> 8) & 0xFF;\r\n                        let bottom = value & 0xFF;\r\n\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}>\r\n                            <InputLabel className={this.props.classes.optionsLabel}>{I18n.t(input.title)}</InputLabel>\r\n                            <Input\r\n                                title={I18n.t('Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic')}\r\n                                style={{width: '6ch'}}\r\n                                value={top.toString(16) ? top.toString(16).toUpperCase() : 0}\r\n                               onChange={e => {\r\n                                   if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n                                       return;\r\n                                   }\r\n                                   this.changeParam(input.name, (parseInt(e.target.value, 16) << 8) | bottom);\r\n                               }}\r\n                            />\r\n                            <Input\r\n                                title={I18n.t('Rack and slot: [Rack * 0x20 + Slot]')}\r\n                                style={{marginLeft: 5, width: '6ch'}}\r\n                                value={bottom.toString(16) ? bottom.toString(16).toUpperCase() : 0}\r\n                                onChange={e => {\r\n                                    if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n                                        return;\r\n                                    }\r\n                                    this.changeParam(input.name, (top << 8) | parseInt(e.target.value, 16));\r\n                                }}\r\n                            />\r\n                        </Grid>;\r\n                    } else {\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}><TextField\r\n                            type={input.type}\r\n                            label={I18n.t(input.title)}\r\n                            className={this.props.classes.optionsTextField}\r\n                            disabled={this.inputDisabled(input)}\r\n                            value={this.getValue(input.name)}\r\n                            InputProps={{\r\n                                endAdornment: input.dimension ?\r\n                                    <InputAdornment position=\"end\">{I18n.t(input.dimension)}</InputAdornment> : null\r\n                            }}\r\n                            onChange={e => this.changeParam(input.name, e.target.value)}\r\n                        /></Grid>;\r\n                    }\r\n                })}\r\n            </Grid>\r\n        </Paper>;\r\n    }\r\n\r\n    getImportsBlock() {\r\n        return <><Paper className={this.props.classes.optionsContainer}>\r\n            <Typography variant=\"h4\" gutterBottom className={this.props.classes.header}>{I18n.t('Import')}</Typography>\r\n                <Box className={this.props.classes.optionContainer}>\r\n                <FileInput classes={this.props.classes} onChange={this.loadSymbols} label=\"Load symbols\" accept=\".asc\"/>\r\n                <FileInput classes={this.props.classes} onChange={this.addDb} label=\"Add DB\" accept=\".csv,.prn\"/>\r\n                </Box>\r\n        </Paper></>;\r\n    }\r\n\r\n    render() {\r\n        return <form className={ this.props.classes.tab }>\r\n            <Grid container spacing={2} >\r\n                <Grid item xs={12} md={6} className={ this.props.classes.optionsGrid }>\r\n                    {this.getInputsBlock(connectionInputs, 'PLC Connection')}\r\n                    {this.getImportsBlock()}\r\n                </Grid>\r\n                <Grid item xs={12} md={6} className={ this.props.classes.optionsGrid }>{this.getInputsBlock(generalInputs, 'General')}</Grid>\r\n            </Grid>\r\n        </form>;\r\n    }\r\n\r\n    changeParam = (name, value) => {\r\n        let native = JSON.parse(JSON.stringify(this.props.native));\r\n        if (name === 's7logo') {\r\n            if (value) {\r\n                native.params.localTSAP = '';\r\n                native.params.remoteTSAP = '';\r\n                native.params.rack = null;\r\n                native.params.slot = null;\r\n            } else {\r\n                native.params.localTSAP = null;\r\n                native.params.remoteTSAP = null;\r\n                native.params.rack = '';\r\n                native.params.slot = '';\r\n            }\r\n        } else {\r\n            native.params[name] = value;\r\n        }\r\n        this.props.changeNative(native);\r\n    }\r\n\r\n    loadSymbols = e => {\r\n        let native = JSON.parse(JSON.stringify(this.props.native));\r\n        const reader = new FileReader();\r\n\r\n        reader.onload = e => {\r\n            const localData = {\r\n                inputs:  [],\r\n                outputs: [],\r\n                markers: []\r\n//                counter: [],\r\n//                timer: [],\r\n//                dbs: []\r\n            };\r\n            let text = reader.result;\r\n\r\n            text = text.split('126,');\r\n            text.forEach(line => {\r\n                const typ = line.slice(23, 29).replace(/( )/g, '');\r\n\r\n                const d = {\r\n                    Name:         line.slice(0, 23).replace(/( ){2,}/g, ''),\r\n                    Address:      line.slice(29, 36).replace(/( )/g, ''),\r\n                    Type:         line.slice(36, 41).replace(/( )/g, ''),\r\n                    Description:  line.slice(46, 126).replace(/( ){2,}/, ''),\r\n                    Unit:         '',\r\n//                    Role:         '',\r\n//                    Room:         '',\r\n                    poll:         true,\r\n                    RW:           false,\r\n                    WP:           false\r\n                };\r\n\r\n//                    if (typ == 'E' || typ == 'EB' ||typ == 'EW' ||typ == 'ED'||typ == 'PEB'||typ == 'PEW'||typ == 'PED')data.inputs.push(d);\r\n//                    if (typ == 'A' || typ == 'AB' ||typ == 'AW' ||typ == 'AD'||typ == 'PAB'||typ == 'PAW'||typ == 'PAD')data.outputs.push(d);\r\n                if (typ === 'E' || typ === 'EB' || typ === 'EW' || typ === 'ED') localData.inputs.push(d);\r\n                if (typ === 'A' || typ === 'AB' || typ === 'AW' || typ === 'AD') localData.outputs.push(d);\r\n                if (typ === 'M' || typ === 'MB' || typ === 'MW' || typ === 'MD') localData.markers.push(d);\r\n//                if (typ == 'C')data.counter.push(d);\r\n//                if (typ == 'T')data.timer.push(d);\r\n//                if (typ == 'DB')data.dbs.push(d);\r\n            });\r\n\r\n            ['inputs', 'outputs', 'markers'].forEach(table => {\r\n                native[table] = localData[table];\r\n            });\r\n            this.props.changeNative(native);\r\n        };\r\n\r\n        reader.readAsText(e[0], 'ISO-8859-1');\r\n    }\r\n\r\n    addDb = e => {\r\n        let native = JSON.parse(JSON.stringify(this.props.native));\r\n        const reader = new FileReader();\r\n\r\n        reader.onload = e => {\r\n            setTimeout(function () {\r\n                const text       = reader.result;\r\n                const changes  = {\r\n                    inputs: false,\r\n                    outputs: false,\r\n                    markers: false,\r\n                    dbs: false\r\n                };\r\n                const newParts = {\r\n                    inputs:     native.inputs || [],\r\n                    outputs:    native.outputs || [],\r\n                    markers:    native.markers || [],\r\n                    dbs:        native.dbs || []\r\n                };\r\n\r\n                if (text.indexOf('Leseanforderung') !== -1) {\r\n                    // Graphpic format\r\n                    const lines = text.replace(/\\r\\n/g, '\\n').split('\\n');\r\n                    const mapping = {\r\n                        'Name':             {attr: 'Name'},\r\n                        'Typ':              {attr: ''},\r\n                        'Operand':          {attr: 'Address',       process: f => {\r\n                            // DB 504.DBW 1462 => DB504 1462\r\n                            f = f.trim();\r\n                            const db     = f.match(/^DB (\\d+)/);\r\n                            if (!db) {\r\n                                // M\r\n                                // MB\r\n                                let m = f.match(/^MB? (\\d+)\\.?(\\d+)?$/);\r\n                                if (m) {\r\n                                    return 'M ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n                                } else {\r\n                                    m = f.match(/^AB? (\\d+)\\.?(\\d+)?$/);\r\n                                    if (m) {\r\n                                        return 'OUT ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n                                    } else {\r\n                                        m = f.match(/^EB? (\\d+)\\.?(\\d+)?$/);\r\n                                        if (m) {\r\n                                            return 'IN ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n                                        } else {\r\n                                            return f;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            const offset = f.match(/(\\d+).?(\\d+)?$/);\r\n                            if (db && offset) {\r\n                                return `DB${db[1]} ${offset[1]}${offset[2] !== undefined ? '.' + offset[2] : ''}`;\r\n                            } else {\r\n                                return f;\r\n                            }\r\n                        }},\r\n                        'SPS-Format':       {attr: 'Type',          process: function (f) {return f;} },\r\n                        'Byteanzahl':       {attr: 'Length',        process: function (f) {return parseInt(f, 10);} },\r\n                        'Zugriff':          {attr: 'RW',            process: function (f) {return f !== 'read';} },\r\n                        'Leseanforderung':  {attr: 'poll',          process: function (f) {return f === 'zyklisch';} },\r\n                        'AktZeit (ms)':     {attr: ''},\r\n                        'Kommentar':        {attr: 'Description'},\r\n                        'Clients (Anzahl)': {attr: ''}\r\n                    };\r\n                    // First line\r\n                    // \"Name\",\"Typ\",\"Operand\",\"SPS-Format\",\"Byteanzahl\",\"Zugriff\",\"Leseanforderung\",\"AktZeit (ms)\",\"Kommentar\",\"Clients (Anzahl)\"\r\n                    let sFields = lines[0].split(',');\r\n                    // create mapping\r\n                    const fields = [];\r\n                    for (let m = 0; m < sFields.length; m++) {\r\n                        sFields[m] = sFields[m].replace(/\"/g, '');\r\n                        fields.push(mapping[sFields[m]]);\r\n                    }\r\n                    for (let l = 1; l < lines.length; l++) {\r\n                        lines[l] = lines[l].trim();\r\n                        if (!lines[l]) continue;\r\n                        sFields = lines[l].trim().split(',');\r\n                        let obj = {\r\n                            Type:           'ARRAY',\r\n                            Unit:           '',\r\n                            Role:           '',\r\n                            Room:           '',\r\n                            poll:           true,\r\n                            RW:             false,\r\n                            WP:             false\r\n                        };\r\n                        for (let f = 0; f < fields.length; f++) {\r\n                            if (!fields[f].attr) {\r\n                                continue;\r\n                            }\r\n                            if (!sFields[f]) {\r\n                                console.log('error');\r\n                                break;\r\n                            }\r\n                            sFields[f] = sFields[f].replace(/\"/g, '');\r\n                            obj[fields[f].attr] = fields[f].process ? fields[f].process(sFields[f]) : sFields[f];\r\n\r\n                            if (obj.Name.match(/^@/)) {\r\n                                obj = null;\r\n                                break;\r\n                            }\r\n                        }\r\n                        if (obj) {\r\n                            if (obj.Type === 'BYTE' && obj.Length !== 1) {\r\n                                obj.Type = 'ARRAY';\r\n                            }\r\n                            if (obj.Type === 'CHAR') {\r\n                                obj.Type = 'STRING';\r\n                            }\r\n                            if (obj.Type === 'BYTE' || obj.Type === 'BOOL' || obj.Type === 'INT') {\r\n                                obj.Length = '';\r\n                            }\r\n                            let _attr;\r\n                            if (obj.Address.match(/^DB/)) {\r\n                                _attr = 'dbs';\r\n                            } else if (obj.Address.match(/^IN/)) {\r\n                                obj.Address = obj.Address.replace(/^IN\\s?/, '');\r\n                                _attr = 'inputs';\r\n                            } else if (obj.Address.match(/^OUT/)) {\r\n                                _attr = 'outputs';\r\n                                obj.Address = obj.Address.replace(/^OUT\\s?/, '');\r\n                            } else if (obj.Address.match(/^M/)) {\r\n                                _attr = 'markers';\r\n                                obj.Address = obj.Address.replace(/^M\\s?/, '');\r\n                            } else {\r\n                                console.error('Unknown TYPE: ' + obj.Address);\r\n                                continue;\r\n                            }\r\n                            // try to find same address\r\n                            for (let aaa = 0; aaa < newParts[_attr].length; aaa++) {\r\n                                if (newParts[_attr][aaa].Address === obj.Address) {\r\n                                    newParts[_attr][aaa] = obj;\r\n                                    changes[_attr] = true;\r\n                                    obj = null;\r\n                                    break;\r\n                                }\r\n                            }\r\n                            if (obj) {\r\n                                changes[_attr] = true;\r\n                                newParts[_attr].push(obj);\r\n                            }\r\n                        }\r\n                    }\r\n                } else {\r\n                    const mm = text.match(/(DB)[0-9]+\\s-\\s/g);\r\n                    const db = mm ? mm[0].replace(' - ', '') : '';\r\n                    const vv = text.split('STRUCT');\r\n\r\n                    const struck = vv[1] ? vv[1].split('=')[0].split('\\n') : [];\r\n\r\n                    struck.forEach((item) => {\r\n                        if (item.length > 10) {\r\n                            const x = item.split(/\\s+/g);\r\n                            x.shift();\r\n\r\n                            let obj = {\r\n                                Address:        db + ' ' + x.shift(),\r\n                                Name:           x.shift(),\r\n                                Type:           x.shift(),\r\n                                dec:            x.shift(),\r\n                                Description:    x.join(' '),\r\n                                Unit:           '',\r\n                                Role:           '',\r\n                                Room:           '',\r\n                                poll:           true,\r\n                                RW:             false,\r\n                                WP:             false\r\n                            };\r\n\r\n                            // try to find same address\r\n                            for (let aaa = 0; aaa < newParts.dbs.length; aaa++) {\r\n                                if (newParts.dbs[aaa].Address === obj.Address) {\r\n                                    newParts.dbs[aaa] = obj;\r\n                                    changes.dbs = true;\r\n                                    obj = null;\r\n                                    break;\r\n                                }\r\n                            }\r\n                            if (obj) {\r\n                                changes.dbs = true;\r\n                                newParts.dbs.push(obj);\r\n                            }\r\n                        }\r\n                    });\r\n                }\r\n                for (const attr in newParts) {\r\n                    if (!newParts.hasOwnProperty(attr)) {\r\n                        continue;\r\n                    }\r\n                    newParts[attr].sort((a, b) => {\r\n                        const aDB = a.Address.match(/^D?B?\\s?(\\d+)/);\r\n                        const bDB = b.Address.match(/^D?B?\\s?(\\d+)/);\r\n                        if (!aDB) return -1;\r\n                        if (!bDB) return 1;\r\n                        if (parseInt(aDB[1], 10) > parseInt(bDB[1], 10)) return 1;\r\n                        if (parseInt(aDB[1], 10) < parseInt(bDB[1], 10)) return -1;\r\n                        const aOffset = a.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n                        const bOffset = b.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n                        if (!aOffset) return -1;\r\n                        if (!bOffset) return 1;\r\n                        if (parseInt(aOffset[1], 10) > parseInt(bOffset[1], 10)) return 1;\r\n                        if (parseInt(aOffset[1], 10) < parseInt(bOffset[1], 10)) return -1;\r\n                        if (aOffset[2] === undefined && bOffset[2] !== undefined) return 1;\r\n                        if (bOffset[2] === undefined && aOffset[2] !== undefined) return -1;\r\n                        if (aOffset[2] === undefined && bOffset[2] === undefined) return 0;\r\n                        if (parseInt(aOffset[2], 10) > parseInt(bOffset[2], 10)) return 1;\r\n                        if (parseInt(aOffset[2], 10) < parseInt(bOffset[1], 10)) return -1;\r\n                        return 0;\r\n                    });\r\n                }\r\n                if (changes.dbs) {\r\n                    native.dbs = newParts.dbs;\r\n                }\r\n                if (changes.inputs) {\r\n                    native.inputs = newParts.inputs;\r\n                }\r\n                if (changes.outputs) {\r\n                    native.outputs = newParts.outputs;\r\n                }\r\n                if (changes.markers) {\r\n                    native.markers = newParts.markers;\r\n                }\r\n                console.log(native);\r\n                //this.props.changeNative(native);\r\n            }, 200);\r\n        };\r\n\r\n        reader.readAsText(e[0], 'ISO-8859-1');\r\n    }\r\n}\r\n\r\nOptions.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default withStyles(styles)(Options);\r\n","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport { tsv2json, json2tsv } from 'tsv-json';\r\nimport { useSnackbar } from 'notistack';\r\nimport AceEditor from \"react-ace\";\r\nimport copy from 'copy-to-clipboard';\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport SaveIcon from '@material-ui/icons/Save';\r\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\r\n\r\nconst styles = theme => ({\r\n    tsvEditor: {\r\n        width: '100%',\r\n        height: 400\r\n    },\r\n    tsvEditorTextarea: {\r\n        fontFamily: 'monospace'\r\n    }\r\n});\r\n\r\nconst TsvDialog = props => {\r\n    const [tsv, setTsv] = useState('');\r\n    useEffect(() => {\r\n        let tsvResult = [];\r\n        tsvResult.push(props.fields.map(field => field.name));\r\n        props.data.forEach(item =>\r\n            tsvResult.push(props.fields.map(field => item[field.name] !== undefined && item[field.name] !== null ? item[field.name].toString() : ''))\r\n        );\r\n        setTsv(json2tsv(tsvResult));\r\n    }, [props.open]); // eslint-disable-line react-hooks/exhaustive-deps\r\n    const { enqueueSnackbar } = useSnackbar();\r\n\r\n    if (!props.open) {\r\n        return null;\r\n    }\r\n\r\n    const saveTsv = () => {\r\n        let data = tsv2json(tsv);\r\n        let fields = data.shift();\r\n        let success = true;\r\n        let errors = [];\r\n        for (let index in props.fields) {\r\n            if (props.fields[index].name !== fields[index]) {\r\n                errors.push(<>No field <i>{props.fields[index].name}</i> in position <i>{parseInt(index) + 1}</i>!</>);\r\n                success = false;\r\n            }\r\n        }\r\n\r\n        data = data.map((itemValues, itemIndex) => {\r\n            let item = {};\r\n            for (let index in props.fields) {\r\n                if (props.fields[index].type === 'select' && !props.fields[index].options.map(option => option.value).includes(itemValues[index])) {\r\n                    errors.push(<>Value <i>{itemValues[index]}</i> is wrong for field <i>{props.fields[index].name}</i> in position <i>{parseInt(itemIndex) + 1}</i>!</>);\r\n                    success = false;\r\n                }\r\n                if (props.fields[index].type === 'checkbox') {\r\n                    itemValues[index] = itemValues[index] === 'true';\r\n                }\r\n                item[props.fields[index].name] = itemValues[index];\r\n            }\r\n            return item;\r\n        });\r\n\r\n        if (!success) {\r\n            enqueueSnackbar(<div>{errors.map((error, index) => <div key={index}>{error}</div>)}</div>, { variant: 'error' });\r\n            return;\r\n        }\r\n        props.save(data);\r\n        props.onClose();\r\n    };\r\n\r\n    return <Dialog\r\n        open={props.open}\r\n        onClose={props.onClose}\r\n        maxWidth=\"lg\"\r\n        fullWidth\r\n    >\r\n        <DialogTitle>{I18n.t('Edit data as TSV')}</DialogTitle>\r\n        <DialogContent>\r\n            <DialogContentText>{I18n.t('You can copy, paste and edit data as TSV.')}</DialogContentText>\r\n            <div>\r\n                <AceEditor\r\n                    onChange={e => setTsv(e)}\r\n                    height=\"400px\"\r\n                    showPrintMargin={false}\r\n                    value={tsv}\r\n                    className={props.classes.tsvEditor}\r\n                    width=\"100%\"\r\n                    setOptions={{firstLineNumber: 0}}\r\n                    mode={null}\r\n                />\r\n            </div>\r\n        </DialogContent>\r\n        <DialogActions>\r\n            <Button variant=\"outlined\" color=\"primary\" onClick={() => {\r\n                //Utils.copyToClipboard(tsv);\r\n                copy(tsv);\r\n                enqueueSnackbar(I18n.t('TSV was copied to clipboard'));\r\n            }} startIcon={<FileCopyIcon />}>{I18n.t('Copy to clipboard')}</Button>\r\n            <Button variant=\"contained\" color=\"primary\" onClick={saveTsv} startIcon={<SaveIcon />}>{I18n.t('Import')}</Button>\r\n            <Button variant=\"contained\" onClick={props.onClose} startIcon={<ClearIcon />}>{I18n.t('Close')}</Button>\r\n        </DialogActions>\r\n    </Dialog>\r\n};\r\n\r\nTsvDialog.propTypes = {\r\n    open: PropTypes.bool,\r\n    onClose: PropTypes.func,\r\n    classes: PropTypes.object,\r\n    save: PropTypes.func,\r\n    fields: PropTypes.array,\r\n    data: PropTypes.array\r\n};\r\n\r\nexport default withStyles(styles)(TsvDialog);","import PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteAllDialog = (props) => {\r\n    return props.open ? <Dialog open={props.open} onClose={props.onClose}>\r\n        <DialogTitle>{I18n.t('Delete all items')}</DialogTitle>\r\n        <DialogContent>\r\n            <DialogContentText>{I18n.t('Are you sure to delete all items?')}</DialogContentText>\r\n            <DialogActions>\r\n                <Button variant=\"contained\" color=\"secondary\" startIcon={<DeleteIcon />} onClick={() => {\r\n                    props.action();\r\n                    props.onClose();\r\n                }}>{I18n.t('Delete all items')}</Button>\r\n                <Button variant=\"contained\" onClick={props.onClose} startIcon={<ClearIcon />}>{I18n.t('Cancel')}</Button>\r\n            </DialogActions>\r\n        </DialogContent>\r\n    </Dialog> : null;\r\n}\r\n\r\nDeleteAllDialog.propTypes = {\r\n    open: PropTypes.bool,\r\n    action: PropTypes.func,\r\n    onClose: PropTypes.func,\r\n    classes: PropTypes.object,\r\n}\r\n\r\nexport default DeleteAllDialog;","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteDialog = (props) => {\r\n    const [disableWarnings, setDisableWarnings] = useState(false);\r\n    useEffect(() => {\r\n        setDisableWarnings(false);\r\n    }, [props.open]);\r\n\r\n    return props.open ? <Dialog open={props.open} onClose={props.onClose}>\r\n        <DialogTitle>{I18n.t('Delete item')}</DialogTitle>\r\n        <DialogContent>\r\n            <DialogContentText>{I18n.t('Are you sure to delete item with address \"%s\"?', props.item._address)}</DialogContentText>\r\n            <DialogContentText><FormControlLabel\r\n                label={I18n.t('Don\\'t show this message in 5 minutes')}\r\n                control={<Checkbox\r\n                    checked={disableWarnings}\r\n                    onChange={e => setDisableWarnings(e.target.checked)}\r\n            />}/></DialogContentText>\r\n            <DialogActions>\r\n                <Button variant=\"contained\" color=\"secondary\" startIcon={<DeleteIcon />} onClick={() => {\r\n                    props.action(disableWarnings);\r\n                    props.onClose();\r\n                }}>{I18n.t('Delete')}</Button>\r\n                <Button variant=\"contained\" onClick={props.onClose} startIcon={<ClearIcon />}>{I18n.t('Cancel')}</Button>\r\n            </DialogActions>\r\n        </DialogContent>\r\n    </Dialog> : null;\r\n}\r\n\r\nDeleteDialog.propTypes = {\r\n    open: PropTypes.bool,\r\n    onClose: PropTypes.func,\r\n    classes: PropTypes.object,\r\n    action: PropTypes.func,\r\n    item: PropTypes.object,\r\n}\r\n\r\nexport default DeleteDialog;","import { useState, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Table from '@material-ui/core/Table';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport TableSortLabel from '@material-ui/core/TableSortLabel';\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport AddIcon from '@material-ui/icons/Add';\r\nimport ImportExport from '@material-ui/icons/ImportExport';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nimport ExpertIcon from '@iobroker/adapter-react/icons/IconExpert';\r\nimport TextWithIcon from '@iobroker/adapter-react/Components/TextWithIcon';\r\nimport SelectWithIcon from '@iobroker/adapter-react/Components/SelectWithIcon';\r\n\r\nimport TsvDialog from './TsvDialog';\r\nimport DeleteAllDialog from './DeleteAllDialog';\r\nimport DeleteDialog from './DeleteDialog';\r\n\r\nconst styles = theme => ({\r\n    tableHeader: {\r\n        whiteSpace: 'nowrap',\r\n        fontWeight: 'bold',\r\n        fontSize: '80%',\r\n        padding: '0px 8px'\r\n    },\r\n    tableHeaderExtended: {\r\n        color: theme.palette.type === 'dark' ? theme.palette.primary.light : theme.palette.primary.dark\r\n    },\r\n    tableCell: {\r\n        whiteSpace: 'nowrap',\r\n        fontSize: '80%',\r\n        padding: '0px 8px'\r\n    },\r\n    tableContainer: {\r\n        overflow: 'auto',\r\n        maxHeight: 'calc(100vh - 180px)'\r\n    },\r\n    tableTextField: {\r\n        fontSize: '80%'\r\n    },\r\n    tableSelect: {\r\n        fontSize: '80%'\r\n    },\r\n    tableTextFieldContainer: {\r\n        width: '100%'\r\n    },\r\n    tableSelectContainer: {\r\n        width: '100%'\r\n    },\r\n    nonEditMode: {\r\n        cursor: 'pointer'\r\n    }\r\n});\r\n\r\nconst DataCell = props => {\r\n    const sortedItem = props.sortedItem;\r\n    const field = props.field;\r\n    const editMode = props.editMode;\r\n    const setEditMode = props.setEditMode;\r\n\r\n    const ref = useRef();\r\n    /*useEffect(() => {\r\n         if (props.editMode) {\r\n             // ref.current && ref.current.focus()\r\n             //window.setTimeout(() => ref.current && ref.current.focus(), 1000);\r\n         }\r\n    }, [props.editMode])*/\r\n\r\n    let item = sortedItem.item;\r\n    let result;\r\n    if (field.type === 'checkbox') {\r\n        result = <Tooltip title={I18n.t(field.title)}>\r\n            <Checkbox\r\n                inputRef={ref}\r\n                className={props.classes.tableCheckbox}\r\n                checked={!!item[field.name]}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n                onChange={e => props.changeParam(sortedItem.$index, field.name, e.target.checked)}\r\n            />\r\n        </Tooltip>;\r\n    } else if (field.type === 'rooms') {\r\n        if (!editMode) {\r\n            result = <TextWithIcon list={props.rooms} value={item[field.name]} themeType={props.themeType}/>;\r\n        } else {\r\n            result = <SelectWithIcon\r\n                list={props.rooms}\r\n                allowNone={true}\r\n                value={item[field.name]}\r\n                dense={true}\r\n                themeType={props.themeType}\r\n                inputProps={{ref, className: props.classes.tableSelect}}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n                onChange={value => props.changeParam(sortedItem.$index, field.name, value)}\r\n                className={props.classes.tableSelectContainer}\r\n            />;\r\n        }\r\n    } else if (field.type === 'select') {\r\n        if (!editMode) {\r\n            let option = field.options.find(option => option.value === item[field.name]);\r\n            result = option ? option.title : '';\r\n        } else {\r\n            result = <Select\r\n                value={item[field.name]}\r\n                inputProps={{ref, className: props.classes.tableSelect}}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n                onChange={e => props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n                className={props.classes.tableSelectContainer}\r\n            >\r\n                {field.options.map(option =>\r\n                    <MenuItem key={option.value} value={option.value}>{option.title ? option.title : <i>{I18n.t('Nothing')}</i>}</MenuItem>\r\n                )}\r\n            </Select>;\r\n        }\r\n    } else {\r\n        if (!editMode) {\r\n            result = item[field.name] ? item[field.name] : null;\r\n        } else {\r\n            result = <TextField value={item[field.name]} className={props.classes.tableTextFieldContainer}\r\n                inputProps={{ref: ref, className: props.classes.tableTextField}}\r\n                type={field.type}\r\n                onChange={e => props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n            />;\r\n        }\r\n    }\r\n\r\n    return <TableCell\r\n        className={Utils.clsx(props.classes.tableCell, !editMode && props.classes.nonEditMode)}\r\n        onClick={e => {\r\n            setEditMode(true);\r\n            window.localStorage.setItem('Modbus.editMode', 'true');\r\n            window.setTimeout(() => ref.current && ref.current.focus(), 100);\r\n        }}\r\n    >\r\n        {result}\r\n    </TableCell>;\r\n}\r\n\r\nconst RegisterTable = props => {\r\n    const [tsvDialogOpen, setTsvDialogOpen] = useState(false);\r\n    const [editMode, setEditMode] = useState(parseInt(window.localStorage.getItem('Modbus.editMode'), 10) || 0);\r\n    const [extendedMode, setExtendedMode] = useState(window.localStorage.getItem('Modbus.extendedMode') === 'true');\r\n    const [deleteAllDialog, setDeleteAllDialog] = useState({\r\n        open: false,\r\n        action: null,\r\n    });\r\n    const [deleteDialog, setDeleteDialog] = useState({\r\n        open: false,\r\n        item: null,\r\n        action: null,\r\n    });\r\n\r\n    let sortedData = props.getSortedData(props.data, props.orderBy, props.order);\r\n\r\n    return <div>\r\n        <div>\r\n            <Tooltip title={I18n.t('Add line')}>\r\n                <IconButton onClick={e => props.addItem()}>\r\n                    <AddIcon/>\r\n                </IconButton>\r\n            </Tooltip>\r\n            <Tooltip title={I18n.t('Edit as TSV (Tab separated values)')}>\r\n                <IconButton onClick={() => setTsvDialogOpen(true)}>\r\n                    <ImportExport/>\r\n                </IconButton>\r\n            </Tooltip>\r\n            <Tooltip title={I18n.t('Toggle extended mode')}>\r\n                <IconButton\r\n                    color={extendedMode ? 'primary' : 'inherit'}\r\n                    onClick={() => {\r\n                        window.localStorage.setItem('Modbus.extendedMode', extendedMode ? 'false' : 'true');\r\n                        setExtendedMode(!extendedMode);\r\n                    }}>\r\n                    <ExpertIcon/>\r\n                </IconButton>\r\n            </Tooltip>\r\n        </div>\r\n        <div className={props.classes.tableContainer}>\r\n            <Table size=\"small\"\r\n                   stickyHeader\r\n                   padding=\"none\"\r\n            >\r\n                <TableHead>\r\n                    <TableRow>\r\n                        {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field => {\r\n                            let isChecked = false;\r\n                            let indeterminate = false;\r\n                            let trueFound = false;\r\n                            let falseFound = false;\r\n                            for (let k in props.data) {\r\n                                if (props.data[k][field.name]) {\r\n                                    isChecked = true;\r\n                                    trueFound = true;\r\n                                } else {\r\n                                    isChecked = false;\r\n                                    falseFound = true;\r\n                                }\r\n\r\n                                if (trueFound && falseFound) {\r\n                                    indeterminate = true;\r\n                                    isChecked = false;\r\n                                    break;\r\n                                }\r\n                            }\r\n\r\n                            return <TableCell\r\n                                key={field.name}\r\n                                style={{width: field.type === 'checkbox' ? 20 : field.width}}\r\n                                className={Utils.clsx(props.classes.tableHeader, field.expert && props.classes.tableHeaderExtended)}\r\n                                title={field.tooltip ? I18n.t(field.tooltip) : null}\r\n                            >\r\n                                {field.type === 'checkbox' ?\r\n                                    <Tooltip title={I18n.t('Change all')}>\r\n                                        <Checkbox\r\n                                            indeterminate={indeterminate}\r\n                                            checked={isChecked}\r\n                                            onChange={e => {\r\n                                                let newData = JSON.parse(JSON.stringify(props.data));\r\n                                                newData.forEach(item =>\r\n                                                    item[field.name] = e.target.checked);\r\n                                                props.changeData(newData);\r\n                                            }}\r\n                                        />\r\n                                    </Tooltip>\r\n                                    : null}\r\n                                {field.sorted ? <TableSortLabel\r\n                                    active={field.name === props.orderBy}\r\n                                    direction={props.order}\r\n                                    onClick={e => {\r\n                                        const isAsc = props.orderBy === field.name && props.order === 'asc';\r\n                                        props.onChangeOrder(field.name, isAsc ? 'desc' : 'asc');\r\n                                    }}\r\n                                >{I18n.t(field.title)}</TableSortLabel> : I18n.t(field.title)}\r\n                            </TableCell>\r\n                        })}\r\n                        <TableCell>\r\n                            <Tooltip title={I18n.t('Delete all')}>\r\n                                <div>\r\n                                    <IconButton\r\n                                        size=\"small\"\r\n                                        onClick={e => setDeleteAllDialog({\r\n                                            open: true,\r\n                                            action: () => props.changeData([]),\r\n                                        })}\r\n                                        disabled={!props.data.length}\r\n                                    >\r\n                                        <DeleteIcon/>\r\n                                    </IconButton>\r\n                                </div>\r\n                            </Tooltip>\r\n                        </TableCell>\r\n                    </TableRow>\r\n                </TableHead>\r\n                <TableBody>\r\n                    {\r\n                        sortedData.map(sortedItem =>\r\n                            <TableRow hover key={sortedItem.$index}>\r\n                                {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field =>\r\n                                    <DataCell\r\n                                        key={field.name}\r\n                                        themeType={props.themeType}\r\n                                        sortedItem={sortedItem}\r\n                                        field={field}\r\n                                        editMode={editMode === sortedItem.$index}\r\n                                        rooms={props.rooms}\r\n                                        setEditMode={() => setEditMode(sortedItem.$index)}\r\n                                        {...props}\r\n                                    />\r\n                                )}\r\n                                <TableCell>\r\n                                    <Tooltip title={I18n.t('Delete')}>\r\n                                        <div>\r\n                                            <IconButton size=\"small\" onClick={e => {\r\n                                                let lastTime = window.sessionStorage.getItem('disableDeleteDialogs');\r\n                                                if (lastTime && (new Date() - new Date(lastTime)) < 1000 * 60 * 5) {\r\n                                                    props.deleteItem(sortedItem.$index);\r\n                                                    return;\r\n                                                }\r\n                                                setDeleteDialog({\r\n                                                    open: true,\r\n                                                    action: disableDialogs => {\r\n                                                        if (disableDialogs) {\r\n                                                            window.sessionStorage.setItem('disableDeleteDialogs', (new Date()).toISOString());\r\n                                                        }\r\n                                                        props.deleteItem(sortedItem.$index);\r\n                                                    },\r\n                                                    item: sortedItem.item\r\n                                                })\r\n                                            }}>\r\n                                                <DeleteIcon/>\r\n                                            </IconButton>\r\n                                        </div>\r\n                                    </Tooltip>\r\n                                </TableCell>\r\n                            </TableRow>\r\n                        )\r\n                    }\r\n                </TableBody>\r\n            </Table>\r\n        </div>\r\n        {tsvDialogOpen ?\r\n            <TsvDialog\r\n                open={true}\r\n                save={data => {\r\n                    if (props.prefix) {\r\n                        data.forEach(line => {\r\n                            line.Address = (line.Address || '').toUpperCase();\r\n                            if (line.Address && !line.Address.startsWith(props.prefix)) {\r\n                                line.Address = props.prefix + line.Address;\r\n                            }\r\n                        });\r\n                    }\r\n                    props.changeData(data);\r\n                }}\r\n                onClose={() => setTsvDialogOpen(false)}\r\n                data={props.data}\r\n                fields={props.fields}\r\n            /> : null\r\n        }\r\n        <DeleteAllDialog\r\n            open={deleteAllDialog.open}\r\n            action={deleteAllDialog.action}\r\n            onClose={() => setDeleteAllDialog({\r\n                open: false,\r\n                action: null,\r\n            })}\r\n        />\r\n        <DeleteDialog\r\n            open={deleteDialog.open}\r\n            action={deleteDialog.action}\r\n            onClose={() => setDeleteDialog({\r\n                open: false,\r\n                action: null,\r\n                item: null\r\n            })}\r\n            item={deleteDialog.item}\r\n        />\r\n    </div>;\r\n}\r\n\r\nRegisterTable.propTypes = {\r\n    data: PropTypes.array,\r\n    fields: PropTypes.array,\r\n    classes: PropTypes.object,\r\n    addItem: PropTypes.func,\r\n    changeData: PropTypes.func,\r\n    deleteItem: PropTypes.func,\r\n    rooms: PropTypes.object,\r\n    formulaDisabled: PropTypes.bool,\r\n    getSortedData: PropTypes.func,\r\n    themeType: PropTypes.string,\r\n    prefix: PropTypes.string,\r\n};\r\n\r\nexport default withStyles(styles)(RegisterTable);","import {Component} from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Paper from '@material-ui/core/Paper';\r\n\r\nimport roles from '../data/roles';\r\nimport types from '../data/types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport RegisterTable from '../Components/RegisterTable';\r\n\r\nclass BaseRegisters extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.nativeField = '';\r\n        this.state = {\r\n            order: window.localStorage.getItem('Modbus.order') || 'asc',\r\n            orderBy: window.localStorage.getItem('Modbus.orderBy') || 'Address',\r\n        };\r\n    }\r\n\r\n    getRooms() {\r\n        const lang = I18n.getLanguage();\r\n        return this.props.rooms ? Object.values(this.props.rooms).map(room => ({\r\n            value: room._id,\r\n            title: typeof room.common.name === 'object' ? room.common.name[lang] : room.common.name\r\n        })) : [];\r\n    }\r\n\r\n    getFields() {\r\n        let rooms = this.getRooms();\r\n        rooms.unshift({value: '', title: ''});\r\n\r\n        let result = [\r\n            {name: 'Address', title: 'Address', type: 'text', sorted: true, width: 20},\r\n            {name: 'Name', title: 'Name', type: 'text', sorted: true},\r\n            {name: 'Description', title: 'Description', type: 'text', sorted: true},\r\n            {name: 'Type', title: 'Type', type: 'select', options: types, sorted: true},\r\n            {name: 'Length', title: 'Length', type: 'text', width: 20},\r\n            {name: 'Unit', title: 'Unit', type: 'text', width: 30},\r\n            {name: 'Role', title: 'Role', type: 'select', options: roles, sorted: true},\r\n            {name: 'Room', title: 'Room', type: 'rooms', options: rooms, sorted: true},\r\n            {name: 'poll', title: 'Poll', type: 'checkbox'},\r\n            {name: 'RW', title: 'RW', type: 'checkbox', expert: true},\r\n            {name: 'WP', title: 'WP', type: 'checkbox', expert: true},\r\n        ]\r\n\r\n        if (this.props.native.params.multiDeviceId) {\r\n            result.splice(1, 0,\r\n                {name: 'deviceId', title: 'Slave ID', type: 'number', sorted: true, width: 20},\r\n            );\r\n        }\r\n\r\n        return result;\r\n    }\r\n\r\n    address2struct(address) {\r\n        if (this.nativeField === 'dbs') {\r\n            const parts = address.split(' ');\r\n            const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);\r\n            if (parts[1] && parts[1].includes('.')) {\r\n                const a = parseFloat(parts[1]);\r\n                return {db, byte: Math.floor(a), bit: (a * 10) % 10};\r\n            } else {\r\n                return {db, byte: parseInt(parts[1], 10)};\r\n            }\r\n        } else {\r\n            if (address.includes('.')) {\r\n                const a = parseFloat(address);\r\n                return {byte: Math.floor(a), bit: (a * 10) % 10};\r\n            } else {\r\n                return {byte: parseInt(address, 10)};\r\n            }\r\n        }\r\n    }\r\n\r\n    struct2address(struct) {\r\n        if (struct.db !== undefined) {\r\n            if (struct.bit !== undefined) {\r\n                return 'DB' + struct.db + ' ' + struct.byte + '.' + struct.bit;\r\n            } else  {\r\n                return 'DB' + struct.db + ' ' + struct.byte;\r\n            }\r\n        } else if (struct.bit !== undefined) {\r\n            return struct.byte + '.' + struct.bit;\r\n        } else  {\r\n            return struct.byte;\r\n        }\r\n    }\r\n\r\n    changeParam = (index, name, value) => {\r\n        let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n        data[index][name] = value;\r\n        if (name === 'Type') {\r\n            if (['BOOL'].includes(value)) {\r\n                data[index].Length = 0.1;\r\n            } else\r\n            if (['', 'BYTE'].includes(value)) {\r\n                data[index].Length = 1;\r\n            } else\r\n            if (['WORD', 'INT', 'STRING', 'S5TIME'].includes(value)) {\r\n                data[index].Length = 2;\r\n            } else\r\n            if (['DWORD', 'DINT', 'REAL'].includes(value)) {\r\n                data[index].Length = 4;\r\n            } else\r\n            if (['S7TIME'].includes(value)) {\r\n                data[index].Length = 8;\r\n            } else\r\n            if (['S7STRING', 'ARRAY'].includes(value)) {\r\n                data[index].Length = 32;\r\n            }\r\n\r\n            if (value === 'BOOL') {\r\n                const struct = this.address2struct(data[index].Address);\r\n                if (struct.bit === undefined) {\r\n                    struct.bit = 0;\r\n                    data[index].Address = this.struct2address(struct);\r\n                }\r\n            } else {\r\n                const struct = this.address2struct(data[index].Address);\r\n                if (struct.bit !== undefined) {\r\n                    if (struct.bit > 0) {\r\n                        struct.byte++;\r\n                    }\r\n                    delete struct.bit;\r\n\r\n                    data[index].Address = this.struct2address(struct);\r\n                }\r\n            }\r\n        }\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    addItem = () => {\r\n        let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n        let newItem = {}\r\n        this.getFields().forEach(field => newItem[field.name] = '')\r\n        if (data.length) {\r\n            let sortedData = JSON.parse(JSON.stringify(data));\r\n            sortedData.sort((item1, item2) => item1.Address > item2.Address ? 1 : -1);\r\n            let lastItem = sortedData[sortedData.length - 1];\r\n            const struct = this.address2struct(lastItem.Address);\r\n            if (lastItem.Type === 'BOOL') {\r\n                struct.bit = struct.bit || 0;\r\n                struct.bit++;\r\n                if (struct.bit >= 8) {\r\n                    struct.bit = struct.bit % 8;\r\n                    struct.byte++;\r\n                }\r\n            } else {\r\n                delete struct.bit;\r\n                struct.byte += lastItem.Length;\r\n            }\r\n\r\n            if (struct.db !== undefined && struct.byte + lastItem.Length > 0xFFFF) {\r\n                struct.db++;\r\n                struct.byte = 0;\r\n                if (lastItem.Type === 'BOOL') {\r\n                    struct.bit = 0;\r\n                }\r\n            }\r\n\r\n            newItem.Address = this.struct2address(struct);\r\n            newItem.Type = lastItem.Type;\r\n            newItem.Length = lastItem.Length;\r\n            newItem.Unit = lastItem.Unit;\r\n            newItem.Role = lastItem.Role;\r\n            newItem.Room = lastItem.Room;\r\n            newItem.poll = lastItem.poll;\r\n            newItem.RW = lastItem.RW;\r\n            newItem.WP = lastItem.WP;\r\n        } else {\r\n            newItem.role = 'level';\r\n            newItem.Type = 'BOOL';\r\n            newItem.Length = '0.1';\r\n            newItem.poll = true;\r\n            if (this.nativeField === 'dbs') {\r\n                newItem.Address = 'DB1 0.0';\r\n            } else {\r\n                newItem.Address = '0.0';\r\n            }\r\n        }\r\n        data.push(newItem);\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    deleteItem = (index) => {\r\n        let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n        data.splice(index, 1);\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    changeData = (data) => {\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    getDisable = (index, name) => {\r\n        return name === 'Length' &&\r\n            !['STRING', 'S7STRING', 'ARRAY'].includes(this.props.native[this.nativeField][index].type);\r\n    }\r\n\r\n    getSortedData = (data, orderBy, order) => {\r\n        this.fields = this.fields || this.getFields();\r\n\r\n        data = data || this.props.native[this.nativeField];\r\n        orderBy = orderBy || this.state.orderBy;\r\n        order = order || this.state.order;\r\n        let sortedData = [];\r\n        data.forEach((item, index) => {sortedData[index] = {item, $index: index}});\r\n        const field = this.fields.find(item => item.name === orderBy);\r\n\r\n        sortedData.sort((sortedItem1, sortedItem2) => {\r\n            let sort1;\r\n            let sort2;\r\n            if (orderBy === 'Address') {\r\n                const a1 = this.address2struct(sortedItem1.item.Address);\r\n                const a2 = this.address2struct(sortedItem2.item.Address);\r\n\r\n                sort1 = 0;\r\n                if (a1.db !== undefined) {\r\n                    sort1 = a1.db << 24;\r\n                }\r\n                if (a2.db !== undefined) {\r\n                    sort2 = a2.db << 24;\r\n                }\r\n                sort1 |= a1.byte << 8;\r\n                sort2 |= a2.byte << 8;\r\n                sort1 |= a1.bit || 0;\r\n                sort2 |= a2.bit || 0;\r\n            } else if (orderBy === '$index') {\r\n                sort1 = sortedItem1[orderBy];\r\n                sort2 = sortedItem2[orderBy];\r\n            } else if (field && field.type === 'number') {\r\n                sort1 = parseInt(sortedItem1.item[orderBy], 10);\r\n                sort2 = parseInt(sortedItem2.item[orderBy], 10);\r\n            } else {\r\n                sort1 = sortedItem1.item[orderBy];\r\n                sort2 = sortedItem2.item[orderBy];\r\n            }\r\n            return (order === 'asc' ? sort1 > sort2 : sort1 < sort2) ? 1 : -1;\r\n        });\r\n\r\n        return sortedData;\r\n    }\r\n\r\n    render() {\r\n        this.fields = this.fields || this.getFields();\r\n\r\n        return <Paper>\r\n            <RegisterTable\r\n                prefix={this.nativeField === 'dbs' ? 'DB' : ''}\r\n                fields={this.fields}\r\n                getSortedData={this.getSortedData}\r\n                data={this.props.native[this.nativeField]}\r\n                changeParam={this.changeParam}\r\n                addItem={this.addItem}\r\n                deleteItem={this.deleteItem}\r\n                changeData={this.changeData}\r\n                getDisable={this.getDisable}\r\n                themeType={this.props.themeType}\r\n                rooms={this.props.rooms}\r\n                order={this.state.order}\r\n                orderBy={this.state.orderBy}\r\n                onChangeOrder={(orderBy, order) => {\r\n                    this.setState({orderBy, order});\r\n                    window.localStorage.setItem('Modbus.orderBy', orderBy);\r\n                    window.localStorage.setItem('Modbus.order', order);\r\n                }}\r\n            />\r\n        </Paper>\r\n    }\r\n}\r\n\r\nBaseRegisters.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n    themeType: PropTypes.string,\r\n};\r\n\r\nexport default BaseRegisters;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Inputs extends BaseRegisters {\r\n    nativeField = 'inputs'\r\n}\r\n\r\nInputs.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Inputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Outputs extends BaseRegisters {\r\n    nativeField = 'outputs'\r\n}\r\n\r\nOutputs.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Outputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Marker extends BaseRegisters {\r\n    nativeField = 'markers'\r\n}\r\n\r\nMarker.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Marker;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Dbs extends BaseRegisters {\r\n    nativeField = 'dbs';\r\n}\r\n\r\nDbs.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Dbs;\r\n","import React from 'react';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport { MuiThemeProvider } from '@material-ui/core/styles';\r\nimport { SnackbarProvider } from 'notistack';\r\n\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Tabs from '@material-ui/core/Tabs';\r\nimport Tab from '@material-ui/core/Tab';\r\n\r\nimport GenericApp from '@iobroker/adapter-react/GenericApp';\r\nimport Loader from '@iobroker/adapter-react/Components/Loader'\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport TabOptions from './Tabs/Options';\r\nimport TabInputs from './Tabs/Inputs';\r\nimport TabOutputs from './Tabs/Outputs';\r\nimport TabMarker from './Tabs/Marker';\r\nimport TabDbs from './Tabs/DBs';\r\n\r\nconst styles = theme => ({\r\n    root: {},\r\n    tabContent: {\r\n        padding: 10,\r\n        height: 'calc(100% - 64px - 48px - 20px)',\r\n        overflow: 'auto',\r\n    },\r\n    tabContentIFrame: {\r\n        padding: 10,\r\n        height: 'calc(100% - 64px - 48px - 20px - 38px)',\r\n        overflow: 'auto'\r\n    },\r\n    tab: {\r\n        width: '100%',\r\n        minHeight: '100%'\r\n    }\r\n});\r\n\r\nconst tabs = [\r\n    {\r\n        name: 'general',\r\n        title: 'General',\r\n        component: TabOptions,\r\n    },\r\n    {\r\n        name: 'inputs',\r\n        title: 'Inputs',\r\n        component: TabInputs,\r\n    },\r\n    {\r\n        name: 'outputs',\r\n        title: 'Outputs',\r\n        component: TabOutputs,\r\n    },\r\n    {\r\n        name: 'marker',\r\n        title: 'Marker',\r\n        component: TabMarker,\r\n    },\r\n    {\r\n        name: 'dbs',\r\n        title: 'DBs',\r\n        component: TabDbs,\r\n    },\r\n]\r\n\r\nclass App extends GenericApp {\r\n    constructor(props) {\r\n        const extendedProps = {...props};\r\n        extendedProps.encryptedFields = ['pass'];\r\n\r\n        extendedProps.translations = {\r\n            'en': require('./i18n/en'),\r\n            'de': require('./i18n/de'),\r\n            'ru': require('./i18n/ru'),\r\n            'pt': require('./i18n/pt'),\r\n            'nl': require('./i18n/nl'),\r\n            'fr': require('./i18n/fr'),\r\n            'it': require('./i18n/it'),\r\n            'es': require('./i18n/es'),\r\n            'pl': require('./i18n/pl'),\r\n            'zh-cn': require('./i18n/zh-cn'),\r\n        };\r\n\r\n        super(props, extendedProps);\r\n        this.state.moreLoaded = false;\r\n        this.state.rooms = null;\r\n    }\r\n\r\n    onConnectionReady() {\r\n        super.onConnectionReady()\r\n        this.socket.getForeignObjects('enum.rooms.*', 'enum')\r\n            .then(rooms =>\r\n                this.setState({moreLoaded: true, rooms}));\r\n    }\r\n\r\n    getSelectedTab() {\r\n        const selectedTab = this.state.selectedTab;\r\n        if (!selectedTab) {\r\n            return 0;\r\n        } else {\r\n            return tabs.findIndex(tab => tab.name === selectedTab);\r\n        }\r\n    }\r\n\r\n    render() {\r\n        if (!this.state.loaded || !this.state.moreLoaded) {\r\n            return <MuiThemeProvider theme={this.state.theme}>\r\n                <Loader theme={this.state.themeType} />\r\n            </MuiThemeProvider>;\r\n        }\r\n\r\n        return <MuiThemeProvider theme={this.state.theme}>\r\n            <SnackbarProvider>\r\n                <div className=\"App\" style={{background: this.state.theme.palette.background.default, color: this.state.theme.palette.text.primary}}>\r\n                    <AppBar position=\"static\">\r\n                        <Tabs\r\n                            value={this.getSelectedTab()}\r\n                            onChange={(e, index) => this.selectTab(tabs[index].name, index)}\r\n                            variant=\"scrollable\" scrollButtons=\"auto\">\r\n                            {tabs.map(tab => <Tab\r\n                                label={tab.icon ? <>{tab.icon}{I18n.t(tab.title)}</> : I18n.t(tab.title)}\r\n                                data-name={tab.name}\r\n                                key={tab.name}\r\n                                title={tab.tooltip ? I18n.t(tab.tooltip) : undefined}\r\n                            />)}\r\n                        </Tabs>\r\n                    </AppBar>\r\n                    <div className={this.isIFrame ? this.props.classes.tabContentIFrame : this.props.classes.tabContent}>\r\n                        {tabs.map((tab, index) => {\r\n                            const TabComponent = tab.component;\r\n                            if (this.state.selectedTab) {\r\n                                if (this.state.selectedTab !== tab.name) {\r\n                                    return null;\r\n                                }\r\n                            } else {\r\n                                if (index !== 0) {\r\n                                    return null;\r\n                                }\r\n                            }\r\n                            return <TabComponent\r\n                                key={tab.name}\r\n                                themeType={this.state.themeType}\r\n                                common={this.common}\r\n                                socket={this.socket}\r\n                                native={this.state.native}\r\n                                onError={text => this.setState({errorText: (text || text === 0) && typeof text !== 'string' ? text.toString() : text})}\r\n                                onLoad={native => this.onLoadConfig(native)}\r\n                                instance={this.instance}\r\n                                adapterName={this.adapterName}\r\n                                changed={this.state.changed}\r\n                                onChange={(attr, value, cb) => this.updateNativeValue(attr, value, cb)}\r\n                                changeNative={value => this.setState({native: value, changed: this.getIsChanged(value)})}\r\n                                rooms={this.state.rooms}\r\n                            />\r\n                        })}\r\n                        {/*<pre>{JSON.stringify(this.state.native, null, 2)}</pre>*/}\r\n                    </div>\r\n                    {this.renderError()}\r\n                    {this.renderSaveCloseButtons()}\r\n                </div>\r\n            </SnackbarProvider>\r\n        </MuiThemeProvider>;\r\n    }\r\n}\r\n\r\nexport default withStyles(styles)(App);\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read http://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n  window.location.hostname === 'localhost' ||\r\n    // [::1] is the IPv6 localhost address.\r\n    window.location.hostname === '[::1]' ||\r\n    // 127.0.0.1/8 is considered localhost for IPv4.\r\n    window.location.hostname.match(\r\n      /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n    )\r\n);\r\n\r\nexport function register(config) {\r\n  if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n    // The URL constructor is available in all browsers that support SW.\r\n    const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n    if (publicUrl.origin !== window.location.origin) {\r\n      // Our service worker won't work if PUBLIC_URL is on a different origin\r\n      // from what our page is served on. This might happen if a CDN is used to\r\n      // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n      return;\r\n    }\r\n\r\n    window.addEventListener('load', () => {\r\n      const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n      if (isLocalhost) {\r\n        // This is running on localhost. Let's check if a service worker still exists or not.\r\n        checkValidServiceWorker(swUrl, config);\r\n\r\n        // Add some additional logging to localhost, pointing developers to the\r\n        // service worker/PWA documentation.\r\n        navigator.serviceWorker.ready.then(() => {\r\n          console.log(\r\n            'This web app is being served cache-first by a service ' +\r\n              'worker. To learn more, visit http://bit.ly/CRA-PWA'\r\n          );\r\n        });\r\n      } else {\r\n        // Is not localhost. Just register service worker\r\n        registerValidSW(swUrl, config);\r\n      }\r\n    });\r\n  }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n  navigator.serviceWorker\r\n    .register(swUrl)\r\n    .then(registration => {\r\n      registration.onupdatefound = () => {\r\n        const installingWorker = registration.installing;\r\n        if (installingWorker == null) {\r\n          return;\r\n        }\r\n        installingWorker.onstatechange = () => {\r\n          if (installingWorker.state === 'installed') {\r\n            if (navigator.serviceWorker.controller) {\r\n              // At this point, the updated precached content has been fetched,\r\n              // but the previous service worker will still serve the older\r\n              // content until all client tabs are closed.\r\n              console.log(\r\n                'New content is available and will be used when all ' +\r\n                  'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\r\n              );\r\n\r\n              // Execute callback\r\n              if (config && config.onUpdate) {\r\n                config.onUpdate(registration);\r\n              }\r\n            } else {\r\n              // At this point, everything has been precached.\r\n              // It's the perfect time to display a\r\n              // \"Content is cached for offline use.\" message.\r\n              console.log('Content is cached for offline use.');\r\n\r\n              // Execute callback\r\n              if (config && config.onSuccess) {\r\n                config.onSuccess(registration);\r\n              }\r\n            }\r\n          }\r\n        };\r\n      };\r\n    })\r\n    .catch(error => {\r\n      console.error('Error during service worker registration:', error);\r\n    });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n  // Check if the service worker can be found. If it can't reload the page.\r\n  fetch(swUrl)\r\n    .then(response => {\r\n      // Ensure service worker exists, and that we really are getting a JS file.\r\n      const contentType = response.headers.get('content-type');\r\n      if (\r\n        response.status === 404 ||\r\n        (contentType != null && contentType.indexOf('javascript') === -1)\r\n      ) {\r\n        // No service worker found. Probably a different app. Reload the page.\r\n        navigator.serviceWorker.ready.then(registration => {\r\n          registration.unregister().then(() => {\r\n            window.location.reload();\r\n          });\r\n        });\r\n      } else {\r\n        // Service worker found. Proceed as normal.\r\n        registerValidSW(swUrl, config);\r\n      }\r\n    })\r\n    .catch(() => {\r\n      console.log(\r\n        'No internet connection found. App is running in offline mode.'\r\n      );\r\n    });\r\n}\r\n\r\nexport function unregister() {\r\n  if ('serviceWorker' in navigator) {\r\n    navigator.serviceWorker.ready.then(registration => {\r\n      registration.unregister();\r\n    });\r\n  }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport * as Sentry from '@sentry/browser';\r\nimport * as SentryIntegrations from '@sentry/integrations';\r\nimport { MuiThemeProvider} from '@material-ui/core/styles';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport {version} from '../package.json';\r\nimport theme from '@iobroker/adapter-react/Theme';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nwindow.adapterName = 's7';\r\nlet themeName = Utils.getThemeName();\r\n\r\nconsole.log(`iobroker.${window.adapterName}@${version} using theme \"${themeName}\"`);\r\n\r\nfunction build() {\r\n    return ReactDOM.render(\r\n        <MuiThemeProvider theme={theme(themeName)}>\r\n            <App\r\n                onThemeChange={_theme => {\r\n                    themeName = _theme;\r\n                    build();\r\n                }}\r\n            />\r\n        </MuiThemeProvider>,\r\n        document.getElementById('root')\r\n    );\r\n}\r\n\r\nif (false && window.location.host !== 'localhost:3000') {\r\n    Sentry.init({\r\n        dsn: 'https://5ad729dbed504d15aa8bde423cae9a8e@sentry.iobroker.net/57',\r\n        release: `iobroker.${window.adapterName}@${version}`,\r\n        integrations: [\r\n            new SentryIntegrations.Dedupe()\r\n        ]\r\n    });\r\n}\r\n\r\nbuild();\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/src/build/static/js/main.ce479555.chunk.js b/src/build/static/js/main.ce479555.chunk.js
deleted file mode 100644
index 2d13eef..0000000
--- a/src/build/static/js/main.ce479555.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[0],{311:function(e){e.exports=JSON.parse('[{"name":"ip","type":"text","title":"PLC IP Address"},{"name":"s7logo","type":"checkbox","title":"S7 LOGO!"},{"name":"rack","type":"text","title":"PLC Rack"},{"name":"slot","type":"text","title":"PLC Slot"},{"name":"localTSAP","type":"hex","title":"Local TSAP"},{"name":"remoteTSAP","type":"hex","title":"Remote TSAP"}]')},312:function(e){e.exports=JSON.parse('[{"name":"round","type":"number","title":"Round Real to"},{"name":"poll","type":"number","title":"Poll delay","dimension":"ms"},{"name":"recon","type":"number","title":"Reconnect time","dimension":"ms"},{"name":"pulsetime","type":"number","title":"Pulse time","dimension":"ms"},{"name":"timeFormat","type":"select","title":"S7 Time mode","options":[{"value":"","title":"Local time"},{"value":"utc","title":"UTC"},{"value":"summer","title":"Time offset (with day saving time)"},{"value":"offset","title":"Time offset (no day saving time)"}]},{"name":"timeOffset","type":"number","title":"Time offset","dimension":"minutes"}]')},315:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"value","title":"value"},{"value":"level","title":"level"},{"value":"state","title":"state"},{"value":"switch","title":"switch"},{"value":"value.temperature","title":"value.temperature"},{"value":"value.humidity","title":"value.humidity"},{"value":"value.brightness","title":"value.brightness"},{"value":"value.uv","title":"value.uv"},{"value":"value.pressure","title":"value.pressure"},{"value":"value.battery","title":"value.battery"},{"value":"value.valve","title":"value.valve"},{"value":"value.time","title":"value.time"},{"value":"value.interval","title":"value.interval"},{"value":"value.window","title":"value.window"},{"value":"button","title":"button"},{"value":"indicator","title":"indicator"},{"value":"level.dimmer","title":"level.dimmer"},{"value":"level.valve","title":"level.valve"},{"value":"level.blind","title":"level.blind"},{"value":"level.temperature","title":"level.temperature"},{"value":"level.interval","title":"level.interval"}]')},316:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"BOOL","title":"BOOL"},{"value":"BYTE","title":"BYTE"},{"value":"WORD","title":"WORD"},{"value":"DWORD","title":"DWORD"},{"value":"INT","title":"INT"},{"value":"DINT","title":"DINT"},{"value":"REAL","title":"REAL"},{"value":"S7STRING","title":"S7STRING"},{"value":"STRING","title":"STRING"},{"value":"ARRAY","title":"ARRAY"},{"value":"S5TIME","title":"S5TIME"},{"value":"S7TIME","title":"S7TIME"}]')},327:function(e){e.exports=JSON.parse('{"a":"1.3.4"}')},342:function(e,t,a){},407:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Local time","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Time offset (no day saving time)","Offset (with day saving time)":"Time offset (with day saving time)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Polling","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 Time mode","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Time offset","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Write access","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutes","poll":"poll","sec":"sec.","write as Pulse":"write as Pulse","Drag \'n\' drop file here, or click to select file":"Drag \'n\' drop file here, or click to select file","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Change all","Delete all":"Delete all","Edit as TSV (Tab separated values)":"Edit as TSV (Tab separated values)","Add line":"Add line","Delete":"Delete","Are you sure to delete item with address \\"%s\\"?":"Are you sure to delete item with address \\"%s\\"?","Don\'t show this message in 5 minutes":"Don\'t show this message in 5 minutes","Cancel":"Cancel","Delete all items":"Delete all items","Are you sure to delete all items?":"Are you sure to delete all items?","Edit mode":"Edit mode","Toggle extended mode":"Toggle extended mode","Edit data as TSV":"Edit data as TSV","You can copy, paste and edit data as TSV.":"You can copy, paste and edit data as TSV.","Copy to clipboard":"Copy to clipboard","Nothing":"Nothing","Delete item":"Delete item","Load symbols":"Load symbols","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack and slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV was copied to clipboard"}')},408:function(e){e.exports=JSON.parse('{"Add DB":"DB einf\xfcgen","Address":"Adresse","All entries will be deleted. Are you sure?":"Alle Eintr\xe4ge werden gel\xf6scht. Sind sie sicher?","Close":"Zumachen","Delete all entries":"Alle Eintr\xe4ge l\xf6schen","Description":"Beschreibung","Enable polling of data point":"Zyklische Abfrage vom Datenpunkt","Export":"Export","Export to CSV":"Export in CSV","General":"Allgemein","Import":"Importieren","Import DB file":"DB-Datei importieren","Import from CSV":"Import aus CSV","Import symbols file":"Symboldatei Importieren","Inputs":"Eing\xe4nge","Length":"L\xe4nge","Load Symbols":"Lade Symbole","Local TSAP":"Local TSAP","Local time":"Ortszeit","Marker":"Merker","Name":"Name","Offset (no day saving time)":"Zeit-Offset (kein Sommerzeit)","Offset (with day saving time)":"Zeit-Offset (mit Sommerzeit)","Outputs":"Ausg\xe4nge","PLC Connection":"SPS Verbindung","PLC IP Address":"SPS IP Adresse","PLC Rack":"SPS Rack","PLC Slot":"SPS Slot","Poll delay":"Poll delay","Polling":"Abfrage","Pulse time":"Pulsetime","RW":"RW","Reconnect time":"Reconnectzeit","Remote TSAP":"Remote TSAP","Role":"Rolle","Room":"Raum","Round Real to":"Aufrunden Real auf","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7-Zeitmodus","Text copied to clipboard. Click to close the window":"Text wurde in der Zwischenablage kopiert. Klick um Fenster zu zumachen.","Time offset":"Zeitverschiebung","Toggle RW":"RW umschalten","Toggle WP":"WP umschalten","Toggle poll":"Poll umschalten","Type":"Typ","UTC":"UTC","Unit":"Einheit","WP":"WP","Write access":"Schreibzugriff","Write access allowed":"Schreiben erlaubt","Write pulses (true=>false edge)":"Schreibe Pulse (Ja=>Nein Kante)","minutes":"Minuten","poll":"poll","sec":"Sek.","write as Pulse":"schreibe als Impuls","Drag \'n\' drop file here, or click to select file":"Die Datei hierher ziehen , oder klicken, um die Datei auszuw\xe4hlen","DBs":"DBs","ms":"ms","Poll":"Abfrage","Change all":"\xc4ndere Alles","Delete all":"Alles l\xf6schen","Edit as TSV (Tab separated values)":"Als TSV bearbeiten (Tabulatorgetrennte Werte)","Add line":"Zeile hinzuf\xfcgen","Delete":"L\xf6schen","Are you sure to delete item with address \\"%s\\"?":"M\xf6chten Sie den Artikel mit der Adresse \\"%s\\" wirklich l\xf6schen?","Don\'t show this message in 5 minutes":"Diese Nachricht nicht in 5\xa0Minuten anzeigen","Cancel":"Abbrechen","Delete all items":"Alle Elemente l\xf6schen","Are you sure to delete all items?":"M\xf6chten Sie wirklich alle Elemente l\xf6schen?","Edit mode":"Bearbeitungsmodus","Toggle extended mode":"Erweiterten Modus umschalten","Edit data as TSV":"Daten als TSV bearbeiten","You can copy, paste and edit data as TSV.":"Sie k\xf6nnen Daten als TSV kopieren, einf\xfcgen und bearbeiten.","Copy to clipboard":"In die Zwischenablage kopieren","Nothing":"Keins","Delete item":"Item l\xf6schen","Load symbols":"Symbole laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Verbindungstyp: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack und Steckplatz: [Rack * 0x20 + Steckplatz]","TSV was copied to clipboard":"TSV wurde in die Zwischenablage kopiert"}')},409:function(e){e.exports=JSON.parse('{"Add DB":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DB","Address":"\u0410\u0434\u0440\u0435\u0441","All entries will be deleted. Are you sure?":"\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b?","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Delete all entries":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Enable polling of data point":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435","Export":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","Export to CSV":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","General":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435","Import":"\u0418\u043f\u043c\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c","Import DB file":"\u0418\u043f\u043c\u043e\u0440\u0442 DB \u0444\u0430\u0439\u043b\u043e\u0432","Import from CSV":"\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 CSV","Import symbols file":"\u0418\u043f\u043c\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432","Inputs":"\u0412\u0445\u043e\u0434\u044b","Length":"Length","Load Symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Local TSAP":"Local TSAP","Local time":"\u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f","Marker":"\u041c\u0430\u0440\u043a\u0435\u0440\u044b","Name":"\u0418\u043c\u044f","Offset (no day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0431\u0435\u0437 \u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)","Offset (with day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u043b\u0435\u0442\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c)","Outputs":"\u0412\u044b\u0445\u043e\u0434\u044b","PLC Connection":"PLC \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","PLC IP Address":"PLC IP \u0430\u0434\u0440\u0435\u0441","PLC Rack":"PLC Rack","PLC Slot":"PLC \u0441\u043b\u043e\u0442","Poll delay":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u043f\u0440\u043e\u0441\u0430","Polling":"\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"\u0420\u043e\u043b\u044c","Room":"\u041a\u043e\u043c\u043d\u0430\u0442\u0430","Round Real to":"\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c real \u0434\u043e","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 \u0420\u0435\u0436\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Text copied to clipboard. Click to close the window":"\u0422\u0435\u043a\u0441\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u043a\u043e\u0439 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e","Time offset":"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Toggle RW":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c RW","Toggle WP":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c WP","Toggle poll":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c poll","Type":"\u0422\u0438\u043f","UTC":"UTC","Unit":"\u0415\u0434\u0438\u043d\u0438\u0446\u044b","WP":"WP","Write access":"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438","Write access allowed":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e","Write pulses (true=>false edge)":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b (1 => 0)","minutes":"\u043c\u0438\u043d\u0443\u0442\u044b","poll":"poll","sec":"\u0441\u0435\u043a.","write as Pulse":"\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a Pulse","Drag \'n\' drop file here, or click to select file":"\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b","DBs":"DBs","ms":"ms","Poll":"\u041e\u043f\u0440\u043e\u0441","Change all":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435","Delete all":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435","Edit as TSV (Tab separated values)":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a TSV (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0435\u0439)","Add line":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","Delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","Are you sure to delete item with address \\"%s\\"?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \\"%s\\"?","Don\'t show this message in 5 minutes":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 5 \u043c\u0438\u043d\u0443\u0442","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","Delete all items":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Are you sure to delete all items?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b?","Edit mode":"\u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Toggle extended mode":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c","Edit data as TSV":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV","You can copy, paste and edit data as TSV.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV.","Copy to clipboard":"\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430","Nothing":"\u041d\u0438\u0447\u0435\u0433\u043e","Delete item":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442","Load symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u0422\u0438\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u0421\u0442\u043e\u0439\u043a\u0430 \u0438 \u0441\u043b\u043e\u0442: [\u0421\u0442\u043e\u0439\u043a\u0430 * 0x20 + \u0441\u043b\u043e\u0442]","TSV was copied to clipboard":"TSV \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430"}')},410:function(e){e.exports=JSON.parse('{"Add DB":"Adicionar DB","Address":"Endere\xe7o","All entries will be deleted. Are you sure?":"Todas as entradas ser\xe3o exclu\xeddas. Voc\xea tem certeza?","Close":"Fechar","Delete all entries":"Eliminar todas as entradas","Description":"Descri\xe7\xe3o","Enable polling of data point":"Habilitar a vota\xe7\xe3o do ponto de dados","Export":"Exportar","Export to CSV":"Exportar para CSV","General":"Geral","Import":"Importar","Import DB file":"Importar arquivo DB","Import from CSV":"Importa\xe7\xe3o de CSV","Import symbols file":"Arquivo de s\xedmbolos de importa\xe7\xe3o","Inputs":"Entradas","Length":"comprimento","Load Symbols":"Carregar s\xedmbolos","Local TSAP":"TSAP local","Local time":"Hor\xe1rio local","Marker":"Marcador","Name":"Nome","Offset (no day saving time)":"Deslocamento (sem hor\xe1rio)","Offset (with day saving time)":"Offset (com tempo de economia de hora)","Outputs":"Sa\xeddas","PLC Connection":"Conex\xe3o do PLC","PLC IP Address":"Endere\xe7o IP do PLC","PLC Rack":"PLC Rack","PLC Slot":"Slot PLC","Poll delay":"Retardo de enquete","Polling":"Polling","Pulse time":"Tempo de pulso","RW":"RW","Reconnect time":"Reconectar o tempo","Remote TSAP":"TSAP remoto","Role":"Fun\xe7\xe3o","Room":"Quarto","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO !","S7 Time mode":"Modo de tempo S7","Text copied to clipboard. Click to close the window":"Texto copiado para a \xe1rea de transfer\xeancia. Clique para fechar a janela","Time offset":"Deslocamento de tempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Alternar pesquisa","Type":"Tipo","UTC":"UTC","Unit":"Unidade","WP":"WP","Write access":"Acesso de grava\xe7\xe3o","Write access allowed":"Acesso de acesso permitido","Write pulses (true=>false edge)":"Escrever pulsos (true => false edge)","minutes":"minutos","poll":"vota\xe7\xe3o","sec":"seg.","write as Pulse":"escreva como pulso","Drag \'n\' drop file here, or click to select file":"Arraste e solte o arquivo aqui ou clique para selecionar o arquivo","DBs":"DBs","ms":"ms","Poll":"Enquete","Change all":"Mude tudo","Delete all":"Apagar tudo","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabula\xe7\xe3o)","Add line":"Adicionar linha","Delete":"Excluir","Are you sure to delete item with address \\"%s\\"?":"Tem certeza de que deseja excluir o item com o endere\xe7o \\"%s\\"?","Don\'t show this message in 5 minutes":"N\xe3o mostre esta mensagem em 5 minutos","Cancel":"Cancelar","Delete all items":"Apagar todos os itens","Are you sure to delete all items?":"Tem certeza de que deseja excluir todos os itens?","Edit mode":"Modo de edi\xe7\xe3o","Toggle extended mode":"Alternar modo estendido","Edit data as TSV":"Editar dados como TSV","You can copy, paste and edit data as TSV.":"Voc\xea pode copiar, colar e editar dados como TSV.","Copy to clipboard":"Copiar para \xe1rea de transfer\xeancia","Nothing":"Nada","Delete item":"Apagar item","Load symbols":"S\xedmbolos de carga","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conex\xe3o: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 B\xe1sico","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV foi copiado para a \xe1rea de transfer\xeancia"}')},411:function(e){e.exports=JSON.parse('{"Add DB":"Voeg DB toe","Address":"Adres","All entries will be deleted. Are you sure?":"Alle inzendingen worden verwijderd. Weet je het zeker?","Close":"Dichtbij","Delete all entries":"Verwijder alle vermeldingen","Description":"Beschrijving","Enable polling of data point":"Polling van gegevenspunt inschakelen","Export":"Exporteren","Export to CSV":"Exporteren naar CSV","General":"Algemeen","Import":"Importeren","Import DB file":"DB-bestand importeren","Import from CSV":"Importeren vanuit CSV","Import symbols file":"Symboolbestand importeren","Inputs":"ingangen","Length":"Lengte","Load Symbols":"Laad symbolen","Local TSAP":"Lokale TSAP","Local time":"Lokale tijd","Marker":"Markeerstift","Name":"Naam","Offset (no day saving time)":"Offset (geen dagbesparende tijd)","Offset (with day saving time)":"Offset (met dagbesparende tijd)","Outputs":"uitgangen","PLC Connection":"PLC-verbinding","PLC IP Address":"PLC IP-adres","PLC Rack":"PLC Rack","PLC Slot":"PLC-slot","Poll delay":"Poll vertraging","Polling":"stemming","Pulse time":"Pulstijd","RW":"RW","Reconnect time":"Reconnect tijd","Remote TSAP":"TSAP op afstand","Role":"Rol","Room":"Kamer","Round Real to":"Rond echt naar","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tijdmodus","Text copied to clipboard. Click to close the window":"Tekst gekopieerd naar klembord. Klik om het venster te sluiten","Time offset":"Tijd offset","Toggle RW":"RW omschakelen","Toggle WP":"Wissel WP","Toggle poll":"Poll wisselen","Type":"Type","UTC":"UTC","Unit":"Eenheid","WP":"WP","Write access":"Schrijf toegang","Write access allowed":"Schrijftoegang toegestaan","Write pulses (true=>false edge)":"Schrijf pulsen (true => false edge)","minutes":"minuut","poll":"poll","sec":"seconde","write as Pulse":"schrijf als Pulse","Drag \'n\' drop file here, or click to select file":"Sleep het bestand hierheen, of klik om het bestand te selecteren","DBs":"DBs","ms":"ms","Poll":"Opiniepeiling","Change all":"Verander alles","Delete all":"Verwijder alles","Edit as TSV (Tab separated values)":"Bewerken als TSV (door tabs gescheiden waarden)","Add line":"Lijn toevoegen","Delete":"Verwijderen","Are you sure to delete item with address \\"%s\\"?":"Weet u zeker dat u het item met adres \\"%s\\" wilt verwijderen?","Don\'t show this message in 5 minutes":"Dit bericht niet binnen 5 minuten weergeven","Cancel":"annuleren","Delete all items":"Alle items verwijderen","Are you sure to delete all items?":"Weet je zeker dat je alle items wilt verwijderen?","Edit mode":"Bewerkingsmodus","Toggle extended mode":"Schakel uitgebreide modus in","Edit data as TSV":"Gegevens bewerken als TSV","You can copy, paste and edit data as TSV.":"U kunt gegevens kopi\xebren, plakken en bewerken als TSV.","Copy to clipboard":"Kopieer naar klembord","Nothing":"Niets","Delete item":"Verwijder item","Load symbols":"Symbolen laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Aansluittype: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rek en sleuf: [Rack * 0x20 + sleuf]","TSV was copied to clipboard":"TSV is gekopieerd naar het klembord"}')},412:function(e){e.exports=JSON.parse('{"Add DB":"Ajouter une DB","Address":"Adresse","All entries will be deleted. Are you sure?":"Toutes les entr\xe9es seront supprim\xe9es. \xcates-vous s\xfbr?","Close":"Fermer","Delete all entries":"Supprimer toutes les entr\xe9es","Description":"La description","Enable polling of data point":"Activer l\'interrogation du point de donn\xe9es","Export":"Exportation","Export to CSV":"Exporter au format CSV","General":"G\xe9n\xe9ral","Import":"Importer","Import DB file":"Importer un fichier DB","Import from CSV":"Importer \xe0 partir du fichier CSV","Import symbols file":"Importer un fichier de symboles","Inputs":"Contributions","Length":"Longueur","Load Symbols":"Charger des symboles","Local TSAP":"TSAP local","Local time":"Heure locale","Marker":"Marqueur","Name":"pr\xe9nom","Offset (no day saving time)":"D\xe9calage (pas de temps pour gagner du temps)","Offset (with day saving time)":"D\xe9calage (avec un gain de temps de jour)","Outputs":"Les sorties","PLC Connection":"Connexion PLC","PLC IP Address":"Adresse IP de l\'API","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"D\xe9lai d\'interrogation","Polling":"Vote","Pulse time":"Temps d\'impulsion","RW":"RW","Reconnect time":"Reconnectez le temps","Remote TSAP":"TSAP distant","Role":"R\xf4le","Room":"Chambre","Round Real to":"Rond r\xe9el \xe0","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Mode heure","Text copied to clipboard. Click to close the window":"Texte copi\xe9 dans le presse-papier Cliquez pour fermer la fen\xeatre","Time offset":"D\xe9calage temporel","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Basculer le sondage","Type":"Type","UTC":"UTC","Unit":"Unit\xe9","WP":"WP","Write access":"Acc\xe8s en \xe9criture","Write access allowed":"Acc\xe8s en \xe9criture autoris\xe9","Write pulses (true=>false edge)":"\xc9crire des impulsions (true => false edge)","minutes":"minutes","poll":"sondage","sec":"seconde.","write as Pulse":"\xe9crire comme Pulse","Drag \'n\' drop file here, or click to select file":"Glissez-d\xe9posez le fichier ici, ou cliquez pour s\xe9lectionner le fichier","DBs":"DBs","ms":"ms","Poll":"Sondage","Change all":"Change tout","Delete all":"Tout supprimer","Edit as TSV (Tab separated values)":"Modifier en tant que TSV (valeurs s\xe9par\xe9es par des tabulations)","Add line":"Ajouter une ligne","Delete":"Effacer","Are you sure to delete item with address \\"%s\\"?":"\xcates-vous s\xfbr de supprimer l\'\xe9l\xe9ment avec l\'adresse \xab\xa0%s\xa0\xbb\xa0?","Don\'t show this message in 5 minutes":"Ne pas afficher ce message dans 5 minutes","Cancel":"Annuler","Delete all items":"Supprimer tous les \xe9l\xe9ments","Are you sure to delete all items?":"\xcates-vous s\xfbr de supprimer tous les \xe9l\xe9ments\xa0?","Edit mode":"Mode \xe9dition","Toggle extended mode":"Basculer en mode \xe9tendu","Edit data as TSV":"Modifier les donn\xe9es en tant que TSV","You can copy, paste and edit data as TSV.":"Vous pouvez copier, coller et modifier des donn\xe9es au format TSV.","Copy to clipboard":"Copier dans le presse-papier","Nothing":"Rien","Delete item":"Effacer l\'article","Load symbols":"Charger des symboles","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Type de connexion : 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack et slot : [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV a \xe9t\xe9 copi\xe9 dans le presse-papiers"}')},413:function(e){e.exports=JSON.parse('{"Add DB":"Aggiungi DB","Address":"Indirizzo","All entries will be deleted. Are you sure?":"Tutte le voci saranno cancellate. Sei sicuro?","Close":"Vicino","Delete all entries":"Elimina tutte le voci","Description":"Descrizione","Enable polling of data point":"Abilita il polling del punto dati","Export":"Esportare","Export to CSV":"Esporta in CSV","General":"Generale","Import":"Importare","Import DB file":"Importa file DB","Import from CSV":"Importa da CSV","Import symbols file":"Importa file simboli","Inputs":"ingressi","Length":"Lunghezza","Load Symbols":"Carica simboli","Local TSAP":"TSAP locale","Local time":"Ora locale","Marker":"marcatore","Name":"Nome","Offset (no day saving time)":"Offset (nessun giorno risparmiando tempo)","Offset (with day saving time)":"Offset (con ora del giorno)","Outputs":"Uscite","PLC Connection":"Connessione PLC","PLC IP Address":"Indirizzo IP del PLC","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"Ritardo del sondaggio","Polling":"votazione","Pulse time":"Tempo di impulso","RW":"RW","Reconnect time":"Tempo di riconnessione","Remote TSAP":"TSAP remoto","Role":"Ruolo","Room":"Camera","Round Real to":"Round reale a","S7 LOGO!":"LOGO S7 !","S7 Time mode":"Modalit\xe0 ora S7","Text copied to clipboard. Click to close the window":"Testo copiato negli appunti. Clicca per chiudere la finestra","Time offset":"Differenza di fuso orario","Toggle RW":"Attiva / disattiva RW","Toggle WP":"Attiva / disattiva WP","Toggle poll":"Attiva / disattiva sondaggio","Type":"genere","UTC":"UTC","Unit":"Unit\xe0","WP":"WP","Write access":"Accesso in scrittura","Write access allowed":"Accesso in scrittura consentito","Write pulses (true=>false edge)":"Scrivi impulsi (true => falso bordo)","minutes":"minuti","poll":"sondaggio","sec":"sec.","write as Pulse":"scrivi come Pulse","Drag \'n\' drop file here, or click to select file":"Trascina e rilascia il file qui o fai clic per selezionare il file","DBs":"DBs","ms":"ms","Poll":"Sondaggio","Change all":"Cambia tutto","Delete all":"Cancella tutto","Edit as TSV (Tab separated values)":"Modifica come TSV (valori separati da tabulazioni)","Add line":"Aggiungi riga","Delete":"Elimina","Are you sure to delete item with address \\"%s\\"?":"Sei sicuro di eliminare l\'elemento con l\'indirizzo \\"%s\\"?","Don\'t show this message in 5 minutes":"Non mostrare questo messaggio in 5 minuti","Cancel":"Annulla","Delete all items":"Elimina tutti gli elementi","Are you sure to delete all items?":"Sei sicuro di eliminare tutti gli elementi?","Edit mode":"Modalit\xe0 Modifica","Toggle extended mode":"Attiva/disattiva modalit\xe0 estesa","Edit data as TSV":"Modifica dati come TSV","You can copy, paste and edit data as TSV.":"Puoi copiare, incollare e modificare i dati come TSV.","Copy to clipboard":"Copia negli appunti","Nothing":"Niente","Delete item":"Cancellare l\'oggetto","Load symbols":"Simboli di carico","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo di collegamento: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV \xe8 stato copiato negli appunti"}')},414:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Hora local","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Desplazamiento (sin horario de guardado)","Offset (with day saving time)":"Desplazamiento (con horario de ahorro de d\xeda)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Votaci\xf3n","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"Modo de tiempo S7","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Desplazamiento de tiempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Acceso de escritura","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutos","poll":"poll","sec":"sec.","write as Pulse":"escribe como Pulso","Drag \'n\' drop file here, or click to select file":"Arrastre y suelte el archivo aqu\xed o haga clic para seleccionar el archivo","DBs":"DBs","ms":"ms","Poll":"Encuesta","Change all":"Cambia todo","Delete all":"Eliminar todos","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabulaciones)","Add line":"A\xf1adir l\xednea","Delete":"Borrar","Are you sure to delete item with address \\"%s\\"?":"\xbfEst\xe1 seguro de eliminar el elemento con la direcci\xf3n \\"%s\\"?","Don\'t show this message in 5 minutes":"No muestre este mensaje en 5 minutos","Cancel":"Cancelar","Delete all items":"Eliminar todos los elementos","Are you sure to delete all items?":"\xbfEst\xe1 seguro de eliminar todos los elementos?","Edit mode":"Modo de edici\xf3n","Toggle extended mode":"Alternar modo extendido","Edit data as TSV":"Editar datos como TSV","You can copy, paste and edit data as TSV.":"Puede copiar, pegar y editar datos como TSV.","Copy to clipboard":"Copiar al portapapeles","Nothing":"Nada","Delete item":"Eliminar elemento","Load symbols":"Cargar s\xedmbolos","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conexi\xf3n: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack y ranura: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV se copi\xf3 al portapapeles"}')},415:function(e){e.exports=JSON.parse('{"Add DB":"Dodaj DB","Address":"Adres","All entries will be deleted. Are you sure?":"Wszystkie wpisy zostan\u0105 usuni\u0119te. Jeste\u015b pewny?","Close":"Blisko","Delete all entries":"Usu\u0144 wszystkie wpisy","Description":"Opis","Enable polling of data point":"W\u0142\u0105cz odpytywanie punktu danych","Export":"Eksport","Export to CSV":"Eksportuj do pliku CSV","General":"Genera\u0142","Import":"Import","Import DB file":"Importuj plik DB","Import from CSV":"Importuj z CSV","Import symbols file":"Importuj plik symboli","Inputs":"Wej\u015bcia","Length":"D\u0142ugo\u015b\u0107","Load Symbols":"Za\u0142aduj symbole","Local TSAP":"Lokalny TSAP","Local time":"Czas lokalny","Marker":"Znacznik","Name":"Nazwa","Offset (no day saving time)":"Przesuni\u0119cie (brak czasu na dzie\u0144)","Offset (with day saving time)":"Przesuni\u0119cie (z czasem oszcz\u0119dzania dziennego)","Outputs":"Wyj\u015bcia","PLC Connection":"Po\u0142\u0105czenie PLC","PLC IP Address":"Adres IP sterownika PLC","PLC Rack":"Rack PLC","PLC Slot":"Gniazdo PLC","Poll delay":"Op\xf3\u017anienie ankiety","Polling":"Ankieta","Pulse time":"Czas impulsu","RW":"RW","Reconnect time":"Czas ponownego po\u0142\u0105czenia","Remote TSAP":"Zdalny TSAP","Role":"Rola","Room":"Pok\xf3j","Round Real to":"Runda prawdziwa do","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tryb czasu","Text copied to clipboard. Click to close the window":"Tekst skopiowany do schowka. Kliknij, aby zamkn\u0105\u0107 okno","Time offset":"Przesuni\u0119cie czasu","Toggle RW":"Prze\u0142\u0105cz RW","Toggle WP":"Prze\u0142\u0105cz WP","Toggle poll":"Prze\u0142\u0105cz ankiet\u0119","Type":"Rodzaj","UTC":"UTC","Unit":"Jednostka","WP":"WP","Write access":"Dost\u0119p do zapisu","Write access allowed":"Dost\u0119p do zapisu dozwolony","Write pulses (true=>false edge)":"Pisz impulsy (true => false edge)","minutes":"minuty","poll":"g\u0142osowanie","sec":"sec.","write as Pulse":"napisz jako Pulse","Drag \'n\' drop file here, or click to select file":"Przeci\u0105gnij i upu\u015b\u0107 plik tutaj lub kliknij, aby wybra\u0107 plik","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Zmieni\u0107 wszystko","Delete all":"Usu\u0144 wszystko","Edit as TSV (Tab separated values)":"Edytuj jako TSV (warto\u015bci rozdzielone tabulatorami)","Add line":"Dodaj lini\u0119","Delete":"Kasowa\u0107","Are you sure to delete item with address \\"%s\\"?":"Czy na pewno chcesz usun\u0105\u0107 element o adresie \u201e%s\u201d?","Don\'t show this message in 5 minutes":"Nie pokazuj tej wiadomo\u015bci za 5 minut","Cancel":"Anuluj","Delete all items":"Usu\u0144 wszystkie elementy","Are you sure to delete all items?":"Czy na pewno chcesz usun\u0105\u0107 wszystkie elementy?","Edit mode":"Tryb edycji","Toggle extended mode":"Prze\u0142\u0105cz tryb rozszerzony","Edit data as TSV":"Edytuj dane jako TSV","You can copy, paste and edit data as TSV.":"Mo\u017cesz kopiowa\u0107, wkleja\u0107 i edytowa\u0107 dane jako TSV.","Copy to clipboard":"Skopiuj do schowka","Nothing":"Nic","Delete item":"Usu\u0144 przedmiot","Load symbols":"Za\u0142aduj symbole","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Typ po\u0142\u0105czenia: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Szafa i gniazdo: [Stela\u017c * 0x20 + Slot]","TSV was copied to clipboard":"TSV zosta\u0142 skopiowany do schowka"}')},416:function(e){e.exports=JSON.parse('{"Add DB":"\u6dfb\u52a0\u6570\u636e\u5e93","Address":"\u5730\u5740","All entries will be deleted. Are you sure?":"\u6240\u6709\u6761\u76ee\u5c06\u88ab\u5220\u9664\u3002","Close":"\u5173\u95ed","Delete all entries":"\u5220\u9664\u6240\u6709\u6761\u76ee","Description":"\u63cf\u8ff0","Enable polling of data point":"\u542f\u7528\u6570\u636e\u70b9\u8f6e\u8be2","Export":"\u51fa\u53e3","Export to CSV":"\u5bfc\u51fa\u4e3aCSV","General":"\u4e00\u822c\u7684","Import":"\u8fdb\u53e3","Import DB file":"\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff1a","Import from CSV":"\u4eceCSV\u5bfc\u5165","Import symbols file":"\u5bfc\u5165\u7b26\u53f7\u6587\u4ef6\uff1a","Inputs":"\u8f93\u5165\u9879","Length":"\u957f\u5ea6","Load Symbols":"\u52a0\u8f7d\u7b26\u53f7","Local TSAP":"\u672c\u5730TSAP\uff1a","Local time":"\u5f53\u5730\u65f6\u95f4","Marker":"\u8bb0\u53f7\u7b14","Name":"\u540d\u79f0","Offset (no day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u65e0\u590f\u4ee4\u65f6\uff09","Offset (with day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u5e26\u590f\u65f6\u5236\uff09","Outputs":"\u4ea7\u51fa","PLC Connection":"PLC\u8fde\u63a5\uff1a","PLC IP Address":"PLC IP\u5730\u5740\uff1a","PLC Rack":"PLC\u673a\u67b6\uff1a","PLC Slot":"PLC\u63d2\u69fd\uff1a","Poll delay":"\u8f6e\u8be2\u5ef6\u8fdf\uff1a","Polling":"\u8f6e\u8be2","Pulse time":"\u8109\u51b2\u65f6\u95f4\uff1a","RW":"\u8bfb\u5199\u5668","Reconnect time":"\u91cd\u65b0\u8fde\u63a5\u65f6\u95f4\uff1a","Remote TSAP":"\u8fdc\u7a0bTSAP\uff1a","Role":"\u89d2\u8272","Room":"\u623f\u95f4","Round Real to":"\u820d\u5165\u4e3a\uff1a","S7 LOGO!":"S7 LOGO !\uff1a","S7 Time mode":"S7\u65f6\u95f4\u6a21\u5f0f","Text copied to clipboard. Click to close the window":"\u6587\u672c\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f\u3002","Time offset":"\u65f6\u95f4\u504f\u79fb\uff1a","Toggle RW":"\u5207\u6362RW","Toggle WP":"\u5207\u6362WP","Toggle poll":"\u5207\u6362\u6c11\u610f\u8c03\u67e5","Type":"\u7c7b\u578b","UTC":"\u4e16\u754c\u6807\u51c6\u65f6\u95f4","Unit":"\u5355\u5143","WP":"\u53ef\u6e7f\u6027\u7c89\u5242","Write access":"\u5199\u8bbf\u95ee","Write access allowed":"\u5141\u8bb8\u5199\u8bbf\u95ee","Write pulses (true=>false edge)":"\u5199\u8109\u51b2\uff08\u771f=>\u5047\u8fb9\uff09","minutes":"\u5206\u949f","poll":"\u8f6e\u8be2","sec":"\u79d2","write as Pulse":"\u5199\u4e3a\u8109\u51b2","Drag \'n\' drop file here, or click to select file":"\u5c06\u201cn\u201d\u6587\u4ef6\u62d6\u5230\u6b64\u5904\uff0c\u6216\u5355\u51fb\u4ee5\u9009\u62e9\u6587\u4ef6","DBs":"DBs","ms":"ms","Poll":"\u8f6e\u8be2","Change all":"\u5168\u90e8\u66f4\u6539","Delete all":"\u5220\u9664\u6240\u6709","Edit as TSV (Tab separated values)":"\u7f16\u8f91\u4e3a TSV\uff08\u5236\u8868\u7b26\u5206\u9694\u503c\uff09","Add line":"\u6dfb\u52a0\u884c","Delete":"\u5220\u9664","Are you sure to delete item with address \\"%s\\"?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u5730\u5740\u4e3a\u201c%s\u201d\u7684\u9879\u76ee\u5417\uff1f","Don\'t show this message in 5 minutes":"5 \u5206\u949f\u5185\u4e0d\u8981\u663e\u793a\u6b64\u6d88\u606f","Cancel":"\u53d6\u6d88","Delete all items":"\u5220\u9664\u6240\u6709\u9879\u76ee","Are you sure to delete all items?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u6240\u6709\u9879\u76ee\u5417\uff1f","Edit mode":"\u7f16\u8f91\u6a21\u5f0f","Toggle extended mode":"\u5207\u6362\u6269\u5c55\u6a21\u5f0f","Edit data as TSV":"\u5c06\u6570\u636e\u7f16\u8f91\u4e3a TSV","You can copy, paste and edit data as TSV.":"\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u590d\u5236\u3001\u7c98\u8d34\u548c\u7f16\u8f91\u4e3a TSV\u3002","Copy to clipboard":"\u590d\u5236\u5230\u526a\u8d34\u677f","Nothing":"\u6ca1\u6709\u4ec0\u4e48","Delete item":"\u5220\u9664\u9879\u76ee","Load symbols":"\u52a0\u8f7d\u7b26\u53f7","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u8fde\u63a5\u7c7b\u578b\uff1a0x1 - PG\u30010x2 - OP\u30010x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u673a\u67b6\u548c\u63d2\u69fd\uff1a[\u673a\u67b6 * 0x20 + \u63d2\u69fd]","TSV was copied to clipboard":"TSV \u88ab\u590d\u5236\u5230\u526a\u8d34\u677f"}')},418:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a(15),i=a.n(s),n=a(447),l=(a(342),a(67)),r=a(41),d=a(91),c=a(329),p=a(73),u=a(43),m=a(42),h=a(5),g=a(92),b=a(454),f=a(463),S=a(455),v=a(308),x=a.n(v),j=a(218),T=a.n(j),y=a(13),O=a.n(y),P=a(328),C=a(171),A=a(452),k=a(464),R=a(439),D=a(451),w=a(450),L=a(220),I=a(333),E=a(429),W=a(453),V=a(449),B=a(170),N=a(209),z=a(311),G=a(312),M=a(6),U=function(e){var t=Object(g.b)().enqueueSnackbar,a=Object(o.useCallback)((function(a){e.onChange(a),t(O.a.t("Data updated"))}),[]),s=Object(P.a)({onDrop:a,accept:e.accept}),i=s.getRootProps,n=s.getInputProps,r=s.isDragActive;return Object(M.jsxs)(L.a,{style:{padding:3,paddingRight:40},children:[Object(M.jsx)(C.a,{variant:"h6",gutterBottom:!0,children:O.a.t(e.label)}),Object(M.jsxs)("div",Object(l.a)(Object(l.a)({},i()),{},{className:e.classes.fileInput,style:r?{backgroundColor:"rgba(0, 255, 0, 0.1)"}:{cursor:"pointer"},children:[Object(M.jsx)("input",Object(l.a)({},n())),r?Object(M.jsx)("p",{children:O.a.t("Drop the file here ...")}):Object(M.jsx)("p",{children:O.a.t("Drag 'n' drop file here, or click to select file")})]}))]})},F=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).inputDisabled=function(e){return!1},o.inputDisplay=function(e){if(null===o.props.native.params.slot){if(["rack","slot"].includes(e.name))return!1}else if(["localTSAP","remoteTSAP"].includes(e.name))return!1;return"timeOffset"!==e.name||["summer","offset"].includes(o.props.native.params.timeFormat)},o.changeParam=function(e,t){var a=JSON.parse(JSON.stringify(o.props.native));"s7logo"===e?t?(a.params.localTSAP="",a.params.remoteTSAP="",a.params.rack=null,a.params.slot=null):(a.params.localTSAP=null,a.params.remoteTSAP=null,a.params.rack="",a.params.slot=""):a.params[e]=t,o.props.changeNative(a)},o.loadSymbols=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){var s={inputs:[],outputs:[],markers:[]},i=a.result;(i=i.split("126,")).forEach((function(e){var t=e.slice(23,29).replace(/( )/g,""),a={Name:e.slice(0,23).replace(/( ){2,}/g,""),Address:e.slice(29,36).replace(/( )/g,""),Type:e.slice(36,41).replace(/( )/g,""),Description:e.slice(46,126).replace(/( ){2,}/,""),Unit:"",poll:!0,RW:!1,WP:!1};"E"!==t&&"EB"!==t&&"EW"!==t&&"ED"!==t||s.inputs.push(a),"A"!==t&&"AB"!==t&&"AW"!==t&&"AD"!==t||s.outputs.push(a),"M"!==t&&"MB"!==t&&"MW"!==t&&"MD"!==t||s.markers.push(a)})),["inputs","outputs","markers"].forEach((function(e){t[e]=s[e]})),o.props.changeNative(t)},a.readAsText(e[0],"ISO-8859-1")},o.addDb=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){setTimeout((function(){var e=a.result,o={inputs:!1,outputs:!1,markers:!1,dbs:!1},s={inputs:t.inputs||[],outputs:t.outputs||[],markers:t.markers||[],dbs:t.dbs||[]};if(-1!==e.indexOf("Leseanforderung")){for(var i=e.replace(/\r\n/g,"\n").split("\n"),n={Name:{attr:"Name"},Typ:{attr:""},Operand:{attr:"Address",process:function(e){var t=(e=e.trim()).match(/^DB (\d+)/);if(!t){var a=e.match(/^MB? (\d+)\.?(\d+)?$/);return a?"M "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^AB? (\d+)\.?(\d+)?$/))?"OUT "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^EB? (\d+)\.?(\d+)?$/))?"IN "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):e}var o=e.match(/(\d+).?(\d+)?$/);return t&&o?"DB".concat(t[1]," ").concat(o[1]).concat(void 0!==o[2]?"."+o[2]:""):e}},"SPS-Format":{attr:"Type",process:function(e){return e}},Byteanzahl:{attr:"Length",process:function(e){return parseInt(e,10)}},Zugriff:{attr:"RW",process:function(e){return"read"!==e}},Leseanforderung:{attr:"poll",process:function(e){return"zyklisch"===e}},"AktZeit (ms)":{attr:""},Kommentar:{attr:"Description"},"Clients (Anzahl)":{attr:""}},l=i[0].split(","),r=[],d=0;d<l.length;d++)l[d]=l[d].replace(/"/g,""),r.push(n[l[d]]);for(var c=1;c<i.length;c++)if(i[c]=i[c].trim(),i[c]){l=i[c].trim().split(",");for(var p={Type:"ARRAY",Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},u=0;u<r.length;u++)if(r[u].attr){if(!l[u]){console.log("error");break}if(l[u]=l[u].replace(/"/g,""),p[r[u].attr]=r[u].process?r[u].process(l[u]):l[u],p.Name.match(/^@/)){p=null;break}}if(p){"BYTE"===p.Type&&1!==p.Length&&(p.Type="ARRAY"),"CHAR"===p.Type&&(p.Type="STRING"),"BYTE"!==p.Type&&"BOOL"!==p.Type&&"INT"!==p.Type||(p.Length="");var m=void 0;if(p.Address.match(/^DB/))m="dbs";else if(p.Address.match(/^IN/))p.Address=p.Address.replace(/^IN\s?/,""),m="inputs";else if(p.Address.match(/^OUT/))m="outputs",p.Address=p.Address.replace(/^OUT\s?/,"");else{if(!p.Address.match(/^M/)){console.error("Unknown TYPE: "+p.Address);continue}m="markers",p.Address=p.Address.replace(/^M\s?/,"")}for(var h=0;h<s[m].length;h++)if(s[m][h].Address===p.Address){s[m][h]=p,o[m]=!0,p=null;break}p&&(o[m]=!0,s[m].push(p))}}}else{var g=e.match(/(DB)[0-9]+\s-\s/g),b=g?g[0].replace(" - ",""):"",f=e.split("STRUCT");(f[1]?f[1].split("=")[0].split("\n"):[]).forEach((function(e){if(e.length>10){var t=e.split(/\s+/g);t.shift();for(var a={Address:b+" "+t.shift(),Name:t.shift(),Type:t.shift(),dec:t.shift(),Description:t.join(" "),Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},i=0;i<s.dbs.length;i++)if(s.dbs[i].Address===a.Address){s.dbs[i]=a,o.dbs=!0,a=null;break}a&&(o.dbs=!0,s.dbs.push(a))}}))}for(var S in s)s.hasOwnProperty(S)&&s[S].sort((function(e,t){var a=e.Address.match(/^D?B?\s?(\d+)/),o=t.Address.match(/^D?B?\s?(\d+)/);if(!a)return-1;if(!o)return 1;if(parseInt(a[1],10)>parseInt(o[1],10))return 1;if(parseInt(a[1],10)<parseInt(o[1],10))return-1;var s=e.Address.match(/\s(\d+).?(\d+)?$/),i=t.Address.match(/\s(\d+).?(\d+)?$/);return s?i?parseInt(s[1],10)>parseInt(i[1],10)?1:parseInt(s[1],10)<parseInt(i[1],10)?-1:void 0===s[2]&&void 0!==i[2]?1:void 0===i[2]&&void 0!==s[2]?-1:void 0===s[2]&&void 0===i[2]?0:parseInt(s[2],10)>parseInt(i[2],10)?1:parseInt(s[2],10)<parseInt(i[1],10)?-1:0:1:-1}));o.dbs&&(t.dbs=s.dbs),o.inputs&&(t.inputs=s.inputs),o.outputs&&(t.outputs=s.outputs),o.markers&&(t.markers=s.markers),console.log(t)}),200)},a.readAsText(e[0],"ISO-8859-1")},o.state={},o}return Object(d.a)(a,[{key:"getValue",value:function(e){return"s7logo"===e?null===this.props.native.params.slot:this.props.native.params[e]}},{key:"getInputsBlock",value:function(e,t){var a=this;return Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t(t)}),Object(M.jsx)(V.a,{container:!0,spacing:2,direction:"column",children:e.map((function(e){if(!a.inputDisplay(e))return null;if("checkbox"===e.type)return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(w.a,{label:O.a.t(e.title),control:Object(M.jsx)(k.a,{label:O.a.t(e.title),className:a.props.classes.optionsCheckbox,disabled:a.inputDisabled(e),checked:a.getValue(e.name),onChange:function(t){return a.changeParam(e.name,t.target.checked)}})})," ",e.dimension?O.a.t(e.dimension):null]},e.name);if("select"===e.type)return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsxs)(L.a,{children:[Object(M.jsx)(E.a,{shrink:!0,children:O.a.t(e.title)}),Object(M.jsx)(R.a,{className:a.props.classes.optionsSelect,displayEmpty:!0,disabled:a.inputDisabled(e),value:a.getValue(e.name),onChange:function(t){return a.changeParam(e.name,t.target.value)},children:e.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title},e.value)}))})]})," ",e.dimension?O.a.t(e.dimension):null]},e.name);if("hex"===e.type){var t=parseInt(a.getValue(e.name))?parseInt(a.getValue(e.name)):0,o=t>>8&255,s=255&t;return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(E.a,{className:a.props.classes.optionsLabel,children:O.a.t(e.title)}),Object(M.jsx)(I.a,{title:O.a.t("Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic"),style:{width:"6ch"},value:o.toString(16)?o.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,parseInt(t.target.value,16)<<8|s)}}),Object(M.jsx)(I.a,{title:O.a.t("Rack and slot: [Rack * 0x20 + Slot]"),style:{marginLeft:5,width:"6ch"},value:s.toString(16)?s.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,o<<8|parseInt(t.target.value,16))}})]},e.name)}return Object(M.jsx)(V.a,{item:!0,className:a.props.classes.optionContainer,children:Object(M.jsx)(A.a,{type:e.type,label:O.a.t(e.title),className:a.props.classes.optionsTextField,disabled:a.inputDisabled(e),value:a.getValue(e.name),InputProps:{endAdornment:e.dimension?Object(M.jsx)(W.a,{position:"end",children:O.a.t(e.dimension)}):null},onChange:function(t){return a.changeParam(e.name,t.target.value)}})},e.name)}))})]})}},{key:"getImportsBlock",value:function(){return Object(M.jsx)(M.Fragment,{children:Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t("Import")}),Object(M.jsxs)(N.a,{className:this.props.classes.optionContainer,children:[Object(M.jsx)(U,{classes:this.props.classes,onChange:this.loadSymbols,label:"Load symbols",accept:".asc"}),Object(M.jsx)(U,{classes:this.props.classes,onChange:this.addDb,label:"Add DB",accept:".csv,.prn"})]})]})})}},{key:"render",value:function(){return Object(M.jsx)("form",{className:this.props.classes.tab,children:Object(M.jsxs)(V.a,{container:!0,spacing:2,children:[Object(M.jsxs)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:[this.getInputsBlock(z,"PLC Connection"),this.getImportsBlock()]}),Object(M.jsx)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:this.getInputsBlock(G,"General")})]})})}}]),a}(o.Component),q=Object(h.a)((function(e){return{optionsSelect:{width:280},optionsTextField:{width:280},optionContainer:{},optionsContainer:{width:"calc(100% - ".concat(e.spacing(4),"px)"),padding:e.spacing(2),marginBottom:20,display:"inline-block",textAlign:"left"},optionsGrid:{textAlign:"center",padding:e.spacing(2)},optionsLabel:{fontSize:12},header:{fontSize:24},fileInput:{textAlign:"center",display:"inline-block",height:80,width:200,border:"2px dashed #777",borderRadius:10,marginTop:12,padding:4}}}))(F),J=a(4),Y=a.n(J),$=a(315),Z=a(316),H=a(56),K=a(456),_=a(459),Q=a(457),X=a(460),ee=a(458),te=a(215),ae=a(465),oe=a(462),se=a(78),ie=a.n(se),ne=a(325),le=a.n(ne),re=a(326),de=a.n(re),ce=a(60),pe=a.n(ce),ue=a(317),me=a.n(ue),he=a(318),ge=a.n(he),be=a(320),fe=a.n(be),Se=a(222),ve=a(322),xe=a.n(ve),je=a(323),Te=a.n(je),ye=a(289),Oe=a(290),Pe=a(291),Ce=a(292),Ae=a(293),ke=a(288),Re=a(103),De=a.n(Re),we=a(219),Le=a.n(we),Ie=a(324),Ee=a.n(Ie),We=Object(h.a)((function(e){return{tsvEditor:{width:"100%",height:400},tsvEditorTextarea:{fontFamily:"monospace"}}}))((function(e){var t=Object(o.useState)(""),a=Object(H.a)(t,2),s=a[0],i=a[1];Object(o.useEffect)((function(){var t=[];t.push(e.fields.map((function(e){return e.name}))),e.data.forEach((function(a){return t.push(e.fields.map((function(e){return void 0!==a[e.name]&&null!==a[e.name]?a[e.name].toString():""})))})),i(Object(Se.json2tsv)(t))}),[e.open]);var n=Object(g.b)().enqueueSnackbar;if(!e.open)return null;return Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,maxWidth:"lg",fullWidth:!0,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Edit data as TSV")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("You can copy, paste and edit data as TSV.")}),Object(M.jsx)("div",{children:Object(M.jsx)(xe.a,{onChange:function(e){return i(e)},height:"400px",showPrintMargin:!1,value:s,className:e.classes.tsvEditor,width:"100%",setOptions:{firstLineNumber:0},mode:null})})]}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"outlined",color:"primary",onClick:function(){Te()(s),n(O.a.t("TSV was copied to clipboard"))},startIcon:Object(M.jsx)(Ee.a,{}),children:O.a.t("Copy to clipboard")}),Object(M.jsx)(ke.a,{variant:"contained",color:"primary",onClick:function(){var t=Object(Se.tsv2json)(s),a=t.shift(),o=!0,i=[];for(var l in e.fields)e.fields[l].name!==a[l]&&(i.push(Object(M.jsxs)(M.Fragment,{children:["No field ",Object(M.jsx)("i",{children:e.fields[l].name})," in position ",Object(M.jsx)("i",{children:parseInt(l)+1}),"!"]})),o=!1);t=t.map((function(t,a){var s={};for(var n in e.fields)"select"!==e.fields[n].type||e.fields[n].options.map((function(e){return e.value})).includes(t[n])||(i.push(Object(M.jsxs)(M.Fragment,{children:["Value ",Object(M.jsx)("i",{children:t[n]})," is wrong for field ",Object(M.jsx)("i",{children:e.fields[n].name})," in position ",Object(M.jsx)("i",{children:parseInt(a)+1}),"!"]})),o=!1),"checkbox"===e.fields[n].type&&(t[n]="true"===t[n]),s[e.fields[n].name]=t[n];return s})),o?(e.save(t),e.onClose()):n(Object(M.jsx)("div",{children:i.map((function(e,t){return Object(M.jsx)("div",{children:e},t)}))}),{variant:"error"})},startIcon:Object(M.jsx)(Le.a,{}),children:O.a.t("Import")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Close")})]})]})})),Ve=function(e){return e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete all items")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("Are you sure to delete all items?")}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(),e.onClose()},children:O.a.t("Delete all items")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Be=function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1];return Object(o.useEffect)((function(){i(!1)}),[e.open]),e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete item")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t('Are you sure to delete item with address "%s"?',e.item._address)}),Object(M.jsx)(Ce.a,{children:Object(M.jsx)(w.a,{label:O.a.t("Don't show this message in 5 minutes"),control:Object(M.jsx)(k.a,{checked:s,onChange:function(e){return i(e.target.checked)}})})}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(s),e.onClose()},children:O.a.t("Delete")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Ne=function(e){var t,a=e.sortedItem,s=e.field,i=e.editMode,n=e.setEditMode,l=Object(o.useRef)(),r=a.item;if("checkbox"===s.type)t=Object(M.jsx)(oe.a,{title:O.a.t(s.title),children:Object(M.jsx)(k.a,{inputRef:l,className:e.classes.tableCheckbox,checked:!!r[s.name],disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.checked)}})});else if("rooms"===s.type)t=i?Object(M.jsx)(fe.a,{list:e.rooms,allowNone:!0,value:r[s.name],dense:!0,themeType:e.themeType,inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t)},className:e.classes.tableSelectContainer}):Object(M.jsx)(ge.a,{list:e.rooms,value:r[s.name],themeType:e.themeType});else if("select"===s.type)if(i)t=Object(M.jsx)(R.a,{value:r[s.name],inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},className:e.classes.tableSelectContainer,children:s.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title?e.title:Object(M.jsx)("i",{children:O.a.t("Nothing")})},e.value)}))});else{var d=s.options.find((function(e){return e.value===r[s.name]}));t=d?d.title:""}else t=i?Object(M.jsx)(A.a,{value:r[s.name],className:e.classes.tableTextFieldContainer,inputProps:{ref:l,className:e.classes.tableTextField},type:s.type,onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},disabled:e.getDisable(a.$index,s.name)}):r[s.name]?r[s.name]:null;return Object(M.jsx)(ee.a,{className:pe.a.clsx(e.classes.tableCell,!i&&e.classes.nonEditMode),onClick:function(e){n(!0),window.localStorage.setItem("Modbus.editMode","true"),window.setTimeout((function(){return l.current&&l.current.focus()}),100)},children:t})},ze=Object(h.a)((function(e){return{tableHeader:{whiteSpace:"nowrap",fontWeight:"bold",fontSize:"80%",padding:"0px 8px"},tableHeaderExtended:{color:"dark"===e.palette.type?e.palette.primary.light:e.palette.primary.dark},tableCell:{whiteSpace:"nowrap",fontSize:"80%",padding:"0px 8px"},tableContainer:{overflow:"auto",maxHeight:"calc(100vh - 180px)"},tableTextField:{fontSize:"80%"},tableSelect:{fontSize:"80%"},tableTextFieldContainer:{width:"100%"},tableSelectContainer:{width:"100%"},nonEditMode:{cursor:"pointer"}}}))((function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1],n=Object(o.useState)(parseInt(window.localStorage.getItem("Modbus.editMode"),10)||0),r=Object(H.a)(n,2),d=r[0],c=r[1],p=Object(o.useState)("true"===window.localStorage.getItem("Modbus.extendedMode")),u=Object(H.a)(p,2),m=u[0],h=u[1],g=Object(o.useState)({open:!1,action:null}),b=Object(H.a)(g,2),f=b[0],S=b[1],v=Object(o.useState)({open:!1,item:null,action:null}),x=Object(H.a)(v,2),j=x[0],T=x[1],y=e.getSortedData(e.data,e.orderBy,e.order);return Object(M.jsxs)("div",{children:[Object(M.jsxs)("div",{children:[Object(M.jsx)(oe.a,{title:O.a.t("Add line"),children:Object(M.jsx)(te.a,{onClick:function(t){return e.addItem()},children:Object(M.jsx)(le.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Edit as TSV (Tab separated values)"),children:Object(M.jsx)(te.a,{onClick:function(){return i(!0)},children:Object(M.jsx)(de.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Toggle extended mode"),children:Object(M.jsx)(te.a,{color:m?"primary":"inherit",onClick:function(){window.localStorage.setItem("Modbus.extendedMode",m?"false":"true"),h(!m)},children:Object(M.jsx)(me.a,{})})})]}),Object(M.jsx)("div",{className:e.classes.tableContainer,children:Object(M.jsxs)(K.a,{size:"small",stickyHeader:!0,padding:"none",children:[Object(M.jsx)(_.a,{children:Object(M.jsxs)(X.a,{children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(t){var a=!1,o=!1,s=!1,i=!1;for(var n in e.data)if(e.data[n][t.name]?(a=!0,s=!0):(a=!1,i=!0),s&&i){o=!0,a=!1;break}return Object(M.jsxs)(ee.a,{style:{width:"checkbox"===t.type?20:t.width},className:pe.a.clsx(e.classes.tableHeader,t.expert&&e.classes.tableHeaderExtended),title:t.tooltip?O.a.t(t.tooltip):null,children:["checkbox"===t.type?Object(M.jsx)(oe.a,{title:O.a.t("Change all"),children:Object(M.jsx)(k.a,{indeterminate:o,checked:a,onChange:function(a){var o=JSON.parse(JSON.stringify(e.data));o.forEach((function(e){return e[t.name]=a.target.checked})),e.changeData(o)}})}):null,t.sorted?Object(M.jsx)(ae.a,{active:t.name===e.orderBy,direction:e.order,onClick:function(a){var o=e.orderBy===t.name&&"asc"===e.order;e.onChangeOrder(t.name,o?"desc":"asc")},children:O.a.t(t.title)}):O.a.t(t.title)]},t.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete all"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(t){return S({open:!0,action:function(){return e.changeData([])}})},disabled:!e.data.length,children:Object(M.jsx)(ie.a,{})})})})})]})}),Object(M.jsx)(Q.a,{children:y.map((function(t){return Object(M.jsxs)(X.a,{hover:!0,children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(a){return Object(M.jsx)(Ne,Object(l.a)({themeType:e.themeType,sortedItem:t,field:a,editMode:d===t.$index,rooms:e.rooms,setEditMode:function(){return c(t.$index)},ey:a.name},e),a.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(a){var o=window.sessionStorage.getItem("disableDeleteDialogs");o&&new Date-new Date(o)<3e5?e.deleteItem(t.$index):T({open:!0,action:function(a){a&&window.sessionStorage.setItem("disableDeleteDialogs",(new Date).toISOString()),e.deleteItem(t.$index)},item:t.item})},children:Object(M.jsx)(ie.a,{})})})})})]},t.$index)}))})]})}),s?Object(M.jsx)(We,{open:!0,save:function(t){e.prefix&&t.forEach((function(t){t.Address=(t.Address||"").toUpperCase(),t.Address&&!t.Address.startsWith(e.prefix)&&(t.Address=e.prefix+t.Address)})),e.changeData(t)},onClose:function(){return i(!1)},data:e.data,fields:e.fields}):null,Object(M.jsx)(Ve,{open:f.open,action:f.action,onClose:function(){return S({open:!1,action:null})}}),Object(M.jsx)(Be,{open:j.open,action:j.action,onClose:function(){return T({open:!1,action:null,item:null})},item:j.item})]})})),Ge=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).changeParam=function(e,t,a){var s=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));if(s[e][t]=a,"Type"===t)if(["BOOL"].includes(a)?s[e].Length=.1:["","BYTE"].includes(a)?s[e].Length=1:["WORD","INT","STRING","S5TIME"].includes(a)?s[e].Length=2:["DWORD","DINT","REAL"].includes(a)?s[e].Length=4:["S7TIME"].includes(a)?s[e].Length=8:["S7STRING","ARRAY"].includes(a)&&(s[e].Length=32),"BOOL"===a){var i=o.address2struct(s[e].Address);void 0===i.bit&&(i.bit=0,s[e].Address=o.struct2address(i))}else{var n=o.address2struct(s[e].Address);void 0!==n.bit&&(n.bit>0&&n.byte++,delete n.bit,s[e].Address=o.struct2address(n))}o.props.onChange(o.nativeField,s)},o.addItem=function(){var e=JSON.parse(JSON.stringify(o.props.native[o.nativeField])),t={};if(o.getFields().forEach((function(e){return t[e.name]=""})),e.length){var a=JSON.parse(JSON.stringify(e));a.sort((function(e,t){return e.Address>t.Address?1:-1}));var s=a[a.length-1],i=o.address2struct(s.Address);"BOOL"===s.Type?(i.bit=i.bit||0,i.bit++,i.bit>=8&&(i.bit=i.bit%8,i.byte++)):(delete i.bit,i.byte+=s.Length),void 0!==i.db&&i.byte+s.Length>65535&&(i.db++,i.byte=0,"BOOL"===s.Type&&(i.bit=0)),t.Address=o.struct2address(i),t.Type=s.Type,t.Length=s.Length,t.Unit=s.Unit,t.Role=s.Role,t.Room=s.Room,t.poll=s.poll,t.RW=s.RW,t.WP=s.WP}else t.role="level",t.Type="BOOL",t.Length="0.1",t.poll=!0,"dbs"===o.nativeField?t.Address="DB1 0.0":t.Address="0.0";e.push(t),o.props.onChange(o.nativeField,e)},o.deleteItem=function(e){var t=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));t.splice(e,1),o.props.onChange(o.nativeField,t)},o.changeData=function(e){o.props.onChange(o.nativeField,e)},o.getDisable=function(e,t){return"Length"===t&&!["STRING","S7STRING","ARRAY"].includes(o.props.native[o.nativeField][e].type)},o.getSortedData=function(e,t,a){o.fields=o.fields||o.getFields(),e=e||o.props.native[o.nativeField],t=t||o.state.orderBy,a=a||o.state.order;var s=[];e.forEach((function(e,t){s[t]={item:e,$index:t}}));var i=o.fields.find((function(e){return e.name===t}));return s.sort((function(e,s){var n,l;if("Address"===t){var r=o.address2struct(e.item.Address),d=o.address2struct(s.item.Address);n=0,void 0!==r.db&&(n=r.db<<24),void 0!==d.db&&(l=d.db<<24),n|=r.byte<<8,l|=d.byte<<8,n|=r.bit||0,l|=d.bit||0}else"$index"===t?(n=e[t],l=s[t]):i&&"number"===i.type?(n=parseInt(e.item[t],10),l=parseInt(s.item[t],10)):(n=e.item[t],l=s.item[t]);return("asc"===a?n>l:n<l)?1:-1})),s},o.nativeField="",o.state={order:window.localStorage.getItem("Modbus.order")||"asc",orderBy:window.localStorage.getItem("Modbus.orderBy")||"Address"},o}return Object(d.a)(a,[{key:"getRooms",value:function(){var e=O.a.getLanguage();return this.props.rooms?Object.values(this.props.rooms).map((function(t){return{value:t._id,title:"object"===typeof t.common.name?t.common.name[e]:t.common.name}})):[]}},{key:"getFields",value:function(){var e=this.getRooms();e.unshift({value:"",title:""});var t=[{name:"Address",title:"Address",type:"text",sorted:!0,width:20},{name:"Name",title:"Name",type:"text",sorted:!0},{name:"Description",title:"Description",type:"text",sorted:!0},{name:"Type",title:"Type",type:"select",options:Z,sorted:!0},{name:"Length",title:"Length",type:"text",width:20},{name:"Unit",title:"Unit",type:"text",width:30},{name:"Role",title:"Role",type:"select",options:$,sorted:!0},{name:"Room",title:"Room",type:"rooms",options:e,sorted:!0},{name:"poll",title:"Poll",type:"checkbox"},{name:"RW",title:"RW",type:"checkbox",expert:!0},{name:"WP",title:"WP",type:"checkbox",expert:!0}];return this.props.native.params.multiDeviceId&&t.splice(1,0,{name:"deviceId",title:"Slave ID",type:"number",sorted:!0,width:20}),t}},{key:"address2struct",value:function(e){if("dbs"===this.nativeField){var t=e.split(" "),a=parseInt(t[0].replace("DB","").replace("db","").trim(),10);if(t[1].includes(".")){var o=parseFloat(t[1]);return{db:a,byte:Math.floor(o),bit:10*o%10}}return{db:a,byte:parseInt(t[1],10)}}if(e.includes(".")){var s=parseFloat(e);return{byte:Math.floor(s),bit:10*s%10}}return{byte:parseInt(e,10)}}},{key:"struct2address",value:function(e){return void 0!==e.db?void 0!==e.bit?"DB"+e.db+" "+e.byte+"."+e.bit:"DB"+e.db+" "+e.byte:void 0!==e.bit?e.byte+"."+e.bit:e.byte}},{key:"render",value:function(){var e=this;return this.fields=this.fields||this.getFields(),Object(M.jsx)(B.a,{children:Object(M.jsx)(ze,{prefix:"dbs"===this.nativeField?"DB":"",fields:this.fields,getSortedData:this.getSortedData,data:this.props.native[this.nativeField],changeParam:this.changeParam,addItem:this.addItem,deleteItem:this.deleteItem,changeData:this.changeData,getDisable:this.getDisable,themeType:this.props.themeType,rooms:this.props.rooms,order:this.state.order,orderBy:this.state.orderBy,onChangeOrder:function(t,a){e.setState({orderBy:t,order:a}),window.localStorage.setItem("Modbus.orderBy",t),window.localStorage.setItem("Modbus.order",a)}})})}}]),a}(o.Component),Me=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="inputs",e}return a}(Ge);Me.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var Ue=Me,Fe=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="outputs",e}return a}(Ge);Fe.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var qe=Fe,Je=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="markers",e}return a}(Ge);Je.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var Ye=Je,$e=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))).nativeField="dbs",e}return a}(Ge);$e.propTypes={common:Y.a.object.isRequired,native:Y.a.object.isRequired,instance:Y.a.number.isRequired,adapterName:Y.a.string.isRequired,onError:Y.a.func,onLoad:Y.a.func,onChange:Y.a.func,changed:Y.a.bool,socket:Y.a.object.isRequired};var Ze=[{name:"general",title:"General",component:q},{name:"inputs",title:"Inputs",component:Ue},{name:"outputs",title:"Outputs",component:qe},{name:"marker",title:"Marker",component:Ye},{name:"dbs",title:"DBs",component:$e}],He=function(e){Object(u.a)(o,e);var t=Object(m.a)(o);function o(e){var s;Object(r.a)(this,o);var i=Object(l.a)({},e);return i.encryptedFields=["pass"],i.translations={en:a(407),de:a(408),ru:a(409),pt:a(410),nl:a(411),fr:a(412),it:a(413),es:a(414),pl:a(415),"zh-cn":a(416)},(s=t.call(this,e,i)).state.moreLoaded=!1,s.state.rooms=null,s}return Object(d.a)(o,[{key:"onConnectionReady",value:function(){var e=this;Object(c.a)(Object(p.a)(o.prototype),"onConnectionReady",this).call(this),this.socket.getForeignObjects("enum.rooms.*","enum").then((function(t){return e.setState({moreLoaded:!0,rooms:t})}))}},{key:"getSelectedTab",value:function(){var e=this.state.selectedTab;return e?Ze.findIndex((function(t){return t.name===e})):0}},{key:"render",value:function(){var e=this;return this.state.loaded&&this.state.moreLoaded?Object(M.jsx)(n.a,{theme:this.state.theme,children:Object(M.jsx)(g.a,{children:Object(M.jsxs)("div",{className:"App",style:{background:this.state.theme.palette.background.default,color:this.state.theme.palette.text.primary},children:[Object(M.jsx)(b.a,{position:"static",children:Object(M.jsx)(f.a,{value:this.getSelectedTab(),onChange:function(t,a){return e.selectTab(Ze[a].name,a)},variant:"scrollable",scrollButtons:"auto",children:Ze.map((function(e){return Object(M.jsx)(S.a,{label:e.icon?Object(M.jsxs)(M.Fragment,{children:[e.icon,O.a.t(e.title)]}):O.a.t(e.title),"data-name":e.name,title:e.tooltip?O.a.t(e.tooltip):void 0},e.name)}))})}),Object(M.jsx)("div",{className:this.isIFrame?this.props.classes.tabContentIFrame:this.props.classes.tabContent,children:Ze.map((function(t,a){var o=t.component;if(e.state.selectedTab){if(e.state.selectedTab!==t.name)return null}else if(0!==a)return null;return Object(M.jsx)(o,{themeType:e.state.themeType,common:e.common,socket:e.socket,native:e.state.native,onError:function(t){return e.setState({errorText:!t&&0!==t||"string"===typeof t?t:t.toString()})},onLoad:function(t){return e.onLoadConfig(t)},instance:e.instance,adapterName:e.adapterName,changed:e.state.changed,onChange:function(t,a,o){return e.updateNativeValue(t,a,o)},changeNative:function(t){return e.setState({native:t,changed:e.getIsChanged(t)})},rooms:e.state.rooms},t.name)}))}),this.renderError(),this.renderSaveCloseButtons()]})})}):Object(M.jsx)(n.a,{theme:this.state.theme,children:Object(M.jsx)(T.a,{theme:this.state.themeType})})}}]),o}(x.a),Ke=Object(h.a)((function(e){return{root:{},tabContent:{padding:10,height:"calc(100% - 64px - 48px - 20px)",overflow:"auto"},tabContentIFrame:{padding:10,height:"calc(100% - 64px - 48px - 20px - 38px)",overflow:"auto"},tab:{width:"100%",minHeight:"100%"}}}))(He);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var _e=a(327),Qe=a(217),Xe=a.n(Qe);window.adapterName="s7";var et=pe.a.getThemeName();console.log("iobroker.".concat(window.adapterName,"@").concat(_e.a,' using theme "').concat(et,'"')),function e(){return i.a.render(Object(M.jsx)(n.a,{theme:Xe()(et),children:Object(M.jsx)(Ke,{onThemeChange:function(t){et=t,e()}})}),document.getElementById("root"))}(),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[418,1,2]]]);
-//# sourceMappingURL=main.ce479555.chunk.js.map
\ No newline at end of file
diff --git a/src/build/static/js/main.ce479555.chunk.js.map b/src/build/static/js/main.ce479555.chunk.js.map
deleted file mode 100644
index 017cb01..0000000
--- a/src/build/static/js/main.ce479555.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["Tabs/Options.js","Components/TsvDialog.js","Components/DeleteAllDialog.js","Components/DeleteDialog.js","Components/RegisterTable.js","Tabs/BaseRegisters.js","Tabs/Inputs.js","Tabs/Outputs.js","Tabs/Marker.js","Tabs/DBs.js","App.js","serviceWorker.js","index.js"],"names":["FileInput","props","enqueueSnackbar","useSnackbar","onDrop","useCallback","acceptedFiles","onChange","I18n","t","useDropzone","accept","getRootProps","getInputProps","isDragActive","FormControl","style","padding","paddingRight","Typography","variant","gutterBottom","label","className","classes","fileInput","backgroundColor","cursor","Options","inputDisabled","input","inputDisplay","native","params","slot","includes","name","timeFormat","changeParam","value","JSON","parse","stringify","localTSAP","remoteTSAP","rack","changeNative","loadSymbols","e","reader","FileReader","onload","localData","inputs","outputs","markers","text","result","split","forEach","line","typ","slice","replace","d","Name","Address","Type","Description","Unit","poll","RW","WP","push","table","readAsText","addDb","setTimeout","changes","dbs","newParts","indexOf","lines","mapping","attr","process","f","db","trim","match","m","parseInt","undefined","offset","sFields","fields","length","l","obj","Role","Room","console","log","Length","_attr","error","aaa","mm","vv","item","x","shift","dec","join","hasOwnProperty","sort","a","b","aDB","bDB","aOffset","bOffset","state","this","title","Paper","optionsContainer","header","Grid","container","spacing","direction","map","type","optionContainer","FormControlLabel","control","Checkbox","optionsCheckbox","disabled","checked","getValue","target","dimension","InputLabel","shrink","Select","optionsSelect","displayEmpty","options","option","MenuItem","top","bottom","optionsLabel","Input","width","toString","toUpperCase","marginLeft","TextField","optionsTextField","InputProps","endAdornment","InputAdornment","position","Box","tab","xs","md","optionsGrid","getInputsBlock","connectionInputs","getImportsBlock","generalInputs","Component","withStyles","theme","marginBottom","display","textAlign","fontSize","height","border","borderRadius","marginTop","tsvEditor","tsvEditorTextarea","fontFamily","useState","tsv","setTsv","useEffect","tsvResult","field","data","json2tsv","open","Dialog","onClose","maxWidth","fullWidth","DialogTitle","DialogContent","DialogContentText","showPrintMargin","setOptions","firstLineNumber","mode","DialogActions","Button","color","onClick","copy","startIcon","tsv2json","success","errors","index","itemValues","itemIndex","save","DeleteAllDialog","action","DeleteDialog","disableWarnings","setDisableWarnings","_address","DataCell","sortedItem","editMode","setEditMode","ref","useRef","Tooltip","inputRef","tableCheckbox","getDisable","$index","list","rooms","allowNone","dense","themeType","inputProps","tableSelect","tableSelectContainer","find","tableTextFieldContainer","tableTextField","TableCell","Utils","clsx","tableCell","nonEditMode","window","localStorage","setItem","current","focus","tableHeader","whiteSpace","fontWeight","tableHeaderExtended","palette","primary","light","dark","tableContainer","overflow","maxHeight","tsvDialogOpen","setTsvDialogOpen","getItem","extendedMode","setExtendedMode","deleteAllDialog","setDeleteAllDialog","deleteDialog","setDeleteDialog","sortedData","getSortedData","orderBy","order","IconButton","addItem","Table","size","stickyHeader","TableHead","TableRow","filter","expert","formulaDisabled","isChecked","indeterminate","trueFound","falseFound","k","tooltip","newData","changeData","sorted","TableSortLabel","active","isAsc","onChangeOrder","TableBody","hover","ey","lastTime","sessionStorage","Date","deleteItem","disableDialogs","toISOString","prefix","startsWith","BaseRegisters","nativeField","struct","address2struct","bit","struct2address","byte","newItem","getFields","item1","item2","lastItem","role","splice","sortedItem1","sortedItem2","sort1","sort2","a1","a2","lang","getLanguage","Object","values","room","_id","common","getRooms","unshift","types","roles","multiDeviceId","address","parts","parseFloat","Math","floor","setState","Inputs","propTypes","PropTypes","object","isRequired","instance","number","adapterName","string","onError","func","onLoad","changed","bool","socket","Outputs","Marker","Dbs","tabs","component","TabOptions","TabInputs","TabOutputs","TabMarker","App","extendedProps","encryptedFields","translations","require","moreLoaded","getForeignObjects","then","selectedTab","findIndex","loaded","background","default","AppBar","Tabs","getSelectedTab","selectTab","scrollButtons","Tab","icon","data-name","isIFrame","tabContentIFrame","tabContent","TabComponent","errorText","onLoadConfig","cb","updateNativeValue","getIsChanged","renderError","renderSaveCloseButtons","GenericApp","root","minHeight","Boolean","location","hostname","themeName","getThemeName","version","build","ReactDOM","render","onThemeChange","_theme","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"o0wCA+DIA,EAAY,SAAUC,GACtB,IAAQC,EAAoBC,cAApBD,gBACFE,EAASC,uBAAY,SAAAC,GACvBL,EAAMM,SAASD,GACfJ,EAAgBM,IAAKC,EAAE,mBACxB,IAED,EAAoDC,YAAY,CAACN,SAAQO,OAAQV,EAAMU,SAAhFC,EAAP,EAAOA,aAAcC,EAArB,EAAqBA,cAAeC,EAApC,EAAoCA,aAEpC,OAAO,eAACC,EAAA,EAAD,CAAaC,MAAO,CAACC,QAAS,EAAGC,aAAc,IAA/C,UACL,cAACC,EAAA,EAAD,CAAYC,QAAQ,KAAKC,cAAY,EAArC,SAAwCb,IAAKC,EAAER,EAAMqB,SACrD,gDAASV,KAAT,IAAyBW,UAAWtB,EAAMuB,QAAQC,UAAWT,MAAOF,EAAe,CAACY,gBAAiB,wBAA0B,CAACC,OAAQ,WAAxI,UACI,qCAAWd,MAEPC,EACA,4BAAIN,IAAKC,EAAE,4BACX,4BAAID,IAAKC,EAAL,8DAMdmB,E,kDACF,WAAY3B,GAAQ,IAAD,8BACf,cAAMA,IAaV4B,cAAgB,SAAAC,GACZ,OAAO,GAfQ,EAkBnBC,aAAe,SAAAD,GACX,GAAsC,OAAlC,EAAK7B,MAAM+B,OAAOC,OAAOC,MACzB,GAAI,CAAC,OAAQ,QAAQC,SAASL,EAAMM,MAChC,OAAO,OAGX,GAAI,CAAC,YAAa,cAAcD,SAASL,EAAMM,MAC3C,OAAO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AYO,EACZJ,SAIZK,SAASC,eAAe,SAchCN,GDwFM,kBAAmBO,WACrBA,UAAUC,cAAcC,MAAM3C,MAAK,SAAA4C,GACjCA,EAAaC,kB","file":"static/js/main.ce479555.chunk.js","sourcesContent":["import {Component, useCallback} from 'react';\r\nimport {useDropzone} from 'react-dropzone';\r\nimport { useSnackbar } from 'notistack';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Typography from '@material-ui/core/Typography';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport Input from '@material-ui/core/Input';\r\nimport InputLabel from '@material-ui/core/InputLabel';\r\nimport InputAdornment from '@material-ui/core/InputAdornment';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport Box from '@material-ui/core/Box';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport connectionInputs from '../data/optionsConnection';\r\nimport generalInputs from '../data/optionsGeneral';\r\n\r\nconst styles = theme => ({\r\n    optionsSelect: {\r\n        width: 280\r\n    },\r\n    optionsTextField: {\r\n        width: 280\r\n    },\r\n    optionContainer: {\r\n    },\r\n    optionsContainer: {\r\n        width: `calc(100% - ${theme.spacing(4)}px)`,\r\n        padding: theme.spacing(2),\r\n        marginBottom: 20,\r\n        display: 'inline-block',\r\n        textAlign: 'left'\r\n    },\r\n    optionsGrid: {\r\n        textAlign: 'center',\r\n        padding: theme.spacing(2),\r\n    },\r\n    optionsLabel: {\r\n        fontSize: 12,\r\n    },\r\n    header: {\r\n        fontSize: 24,\r\n    },\r\n    fileInput: {\r\n        textAlign: 'center',\r\n        display: 'inline-block',\r\n        height: 80,\r\n        width: 200,\r\n        border: '2px dashed #777',\r\n        borderRadius: 10,\r\n        marginTop: 12,\r\n        padding: 4\r\n    }\r\n});\r\n\r\nlet FileInput = function (props) {\r\n    const { enqueueSnackbar } = useSnackbar();\r\n    const onDrop = useCallback(acceptedFiles => {\r\n        props.onChange(acceptedFiles);\r\n        enqueueSnackbar(I18n.t('Data updated'));\r\n    }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n      const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop, accept: props.accept});\r\n\r\n      return <FormControl style={{padding: 3, paddingRight: 40}}>\r\n        <Typography variant=\"h6\" gutterBottom>{ I18n.t(props.label)}</Typography>\r\n        <div {...getRootProps()} className={props.classes.fileInput} style={isDragActive ? {backgroundColor: 'rgba(0, 255, 0, 0.1)'} : {cursor: 'pointer'}}>\r\n            <input {...getInputProps()} />\r\n            {\r\n                isDragActive ?\r\n                <p>{I18n.t('Drop the file here ...')}</p> :\r\n                <p>{I18n.t(`Drag 'n' drop file here, or click to select file`)}</p>\r\n            }\r\n        </div>\r\n    </FormControl>;\r\n};\r\n\r\nclass Options extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n\r\n        this.state = {\r\n        };\r\n    }\r\n\r\n    getValue(name) {\r\n        if (name === 's7logo') {\r\n            return this.props.native.params.slot === null;\r\n        }\r\n        return this.props.native.params[name];\r\n    }\r\n\r\n    inputDisabled = input => {\r\n        return false;\r\n    }\r\n\r\n    inputDisplay = input => {\r\n        if (this.props.native.params.slot === null) {\r\n            if (['rack', 'slot'].includes(input.name)) {\r\n                return false;\r\n            }\r\n        } else {\r\n            if (['localTSAP', 'remoteTSAP'].includes(input.name)) {\r\n                return false;\r\n            }\r\n        }\r\n        if (input.name === 'timeOffset') {\r\n            return ['summer', 'offset'].includes(this.props.native.params.timeFormat);\r\n        }\r\n        return true;\r\n    }\r\n\r\n    getInputsBlock(inputs, title) {\r\n        return <Paper className={this.props.classes.optionsContainer}>\r\n            <Typography variant=\"h4\" gutterBottom className={this.props.classes.header}>{I18n.t(title)}</Typography>\r\n            <Grid container spacing={2} direction=\"column\">\r\n                {inputs.map(input => {\r\n                    if (!this.inputDisplay(input)) {\r\n                        return null;\r\n                    }\r\n                    if (input.type === 'checkbox') {\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}>\r\n                            <FormControlLabel\r\n                                label={I18n.t(input.title)}\r\n                                control={<Checkbox\r\n                                    label={I18n.t(input.title)}\r\n                                    className={this.props.classes.optionsCheckbox}\r\n                                    disabled={this.inputDisabled(input)}\r\n                                    checked={this.getValue(input.name)}\r\n                                    onChange={e => this.changeParam(input.name, e.target.checked)}\r\n                                />}/> {input.dimension ? I18n.t(input.dimension) : null}</Grid>;\r\n                    } else if (input.type === 'select') {\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}>\r\n                            <FormControl>\r\n                                <InputLabel shrink>{I18n.t(input.title)}</InputLabel>\r\n                                <Select\r\n                                    className={this.props.classes.optionsSelect}\r\n                                    displayEmpty\r\n                                    disabled={this.inputDisabled(input)}\r\n                                    value={this.getValue(input.name)}\r\n                                    onChange={e => this.changeParam(input.name, e.target.value)}\r\n                                >\r\n                                    {input.options.map(option =>\r\n                                        <MenuItem key={option.value} value={option.value}>{option.title}</MenuItem>\r\n                                    )}\r\n                                </Select>\r\n                            </FormControl> {input.dimension ? I18n.t(input.dimension) : null}\r\n                        </Grid>;\r\n                    } else if (input.type === 'hex') {\r\n                        let value = parseInt(this.getValue(input.name)) ? parseInt(this.getValue(input.name)) : 0;\r\n                        let top = (value >> 8) & 0xFF;\r\n                        let bottom = value & 0xFF;\r\n\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}>\r\n                            <InputLabel className={this.props.classes.optionsLabel}>{I18n.t(input.title)}</InputLabel>\r\n                            <Input\r\n                                title={I18n.t('Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic')}\r\n                                style={{width: '6ch'}}\r\n                                value={top.toString(16) ? top.toString(16).toUpperCase() : 0}\r\n                               onChange={e => {\r\n                                   if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n                                       return;\r\n                                   }\r\n                                   this.changeParam(input.name, (parseInt(e.target.value, 16) << 8) | bottom);\r\n                               }}\r\n                            />\r\n                            <Input\r\n                                title={I18n.t('Rack and slot: [Rack * 0x20 + Slot]')}\r\n                                style={{marginLeft: 5, width: '6ch'}}\r\n                                value={bottom.toString(16) ? bottom.toString(16).toUpperCase() : 0}\r\n                                onChange={e => {\r\n                                    if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n                                        return;\r\n                                    }\r\n                                    this.changeParam(input.name, (top << 8) | parseInt(e.target.value, 16));\r\n                                }}\r\n                            />\r\n                        </Grid>;\r\n                    } else {\r\n                        return <Grid item className={this.props.classes.optionContainer} key={input.name}><TextField\r\n                            type={input.type}\r\n                            label={I18n.t(input.title)}\r\n                            className={this.props.classes.optionsTextField}\r\n                            disabled={this.inputDisabled(input)}\r\n                            value={this.getValue(input.name)}\r\n                            InputProps={{\r\n                                endAdornment: input.dimension ?\r\n                                    <InputAdornment position=\"end\">{I18n.t(input.dimension)}</InputAdornment> : null\r\n                            }}\r\n                            onChange={e => this.changeParam(input.name, e.target.value)}\r\n                        /></Grid>;\r\n                    }\r\n                })}\r\n            </Grid>\r\n        </Paper>;\r\n    }\r\n\r\n    getImportsBlock() {\r\n        return <><Paper className={this.props.classes.optionsContainer}>\r\n            <Typography variant=\"h4\" gutterBottom className={this.props.classes.header}>{I18n.t('Import')}</Typography>\r\n                <Box className={this.props.classes.optionContainer}>\r\n                <FileInput classes={this.props.classes} onChange={this.loadSymbols} label=\"Load symbols\" accept=\".asc\"/>\r\n                <FileInput classes={this.props.classes} onChange={this.addDb} label=\"Add DB\" accept=\".csv,.prn\"/>\r\n                </Box>\r\n        </Paper></>;\r\n    }\r\n\r\n    render() {\r\n        return <form className={ this.props.classes.tab }>\r\n            <Grid container spacing={2} >\r\n                <Grid item xs={12} md={6} className={ this.props.classes.optionsGrid }>\r\n                    {this.getInputsBlock(connectionInputs, 'PLC Connection')}\r\n                    {this.getImportsBlock()}\r\n                </Grid>\r\n                <Grid item xs={12} md={6} className={ this.props.classes.optionsGrid }>{this.getInputsBlock(generalInputs, 'General')}</Grid>\r\n            </Grid>\r\n        </form>;\r\n    }\r\n\r\n    changeParam = (name, value) => {\r\n        let native = JSON.parse(JSON.stringify(this.props.native));\r\n        if (name === 's7logo') {\r\n            if (value) {\r\n                native.params.localTSAP = '';\r\n                native.params.remoteTSAP = '';\r\n                native.params.rack = null;\r\n                native.params.slot = null;\r\n            } else {\r\n                native.params.localTSAP = null;\r\n                native.params.remoteTSAP = null;\r\n                native.params.rack = '';\r\n                native.params.slot = '';\r\n            }\r\n        } else {\r\n            native.params[name] = value;\r\n        }\r\n        this.props.changeNative(native);\r\n    }\r\n\r\n    loadSymbols = e => {\r\n        let native = JSON.parse(JSON.stringify(this.props.native));\r\n        const reader = new FileReader();\r\n\r\n        reader.onload = e => {\r\n            const localData = {\r\n                inputs:  [],\r\n                outputs: [],\r\n                markers: []\r\n//                counter: [],\r\n//                timer: [],\r\n//                dbs: []\r\n            };\r\n            let text = reader.result;\r\n\r\n            text = text.split('126,');\r\n            text.forEach(line => {\r\n                const typ = line.slice(23, 29).replace(/( )/g, '');\r\n\r\n                const d = {\r\n                    Name:         line.slice(0, 23).replace(/( ){2,}/g, ''),\r\n                    Address:      line.slice(29, 36).replace(/( )/g, ''),\r\n                    Type:         line.slice(36, 41).replace(/( )/g, ''),\r\n                    Description:  line.slice(46, 126).replace(/( ){2,}/, ''),\r\n                    Unit:         '',\r\n//                    Role:         '',\r\n//                    Room:         '',\r\n                    poll:         true,\r\n                    RW:           false,\r\n                    WP:           false\r\n                };\r\n\r\n//                    if (typ == 'E' || typ == 'EB' ||typ == 'EW' ||typ == 'ED'||typ == 'PEB'||typ == 'PEW'||typ == 'PED')data.inputs.push(d);\r\n//                    if (typ == 'A' || typ == 'AB' ||typ == 'AW' ||typ == 'AD'||typ == 'PAB'||typ == 'PAW'||typ == 'PAD')data.outputs.push(d);\r\n                if (typ === 'E' || typ === 'EB' || typ === 'EW' || typ === 'ED') localData.inputs.push(d);\r\n                if (typ === 'A' || typ === 'AB' || typ === 'AW' || typ === 'AD') localData.outputs.push(d);\r\n                if (typ === 'M' || typ === 'MB' || typ === 'MW' || typ === 'MD') localData.markers.push(d);\r\n//                if (typ == 'C')data.counter.push(d);\r\n//                if (typ == 'T')data.timer.push(d);\r\n//                if (typ == 'DB')data.dbs.push(d);\r\n            });\r\n\r\n            ['inputs', 'outputs', 'markers'].forEach(table => {\r\n                native[table] = localData[table];\r\n            });\r\n            this.props.changeNative(native);\r\n        };\r\n\r\n        reader.readAsText(e[0], 'ISO-8859-1');\r\n    }\r\n\r\n    addDb = e => {\r\n        let native = JSON.parse(JSON.stringify(this.props.native));\r\n        const reader = new FileReader();\r\n\r\n        reader.onload = e => {\r\n            setTimeout(function () {\r\n                const text       = reader.result;\r\n                const changes  = {\r\n                    inputs: false,\r\n                    outputs: false,\r\n                    markers: false,\r\n                    dbs: false\r\n                };\r\n                const newParts = {\r\n                    inputs:     native.inputs || [],\r\n                    outputs:    native.outputs || [],\r\n                    markers:    native.markers || [],\r\n                    dbs:        native.dbs || []\r\n                };\r\n\r\n                if (text.indexOf('Leseanforderung') !== -1) {\r\n                    // Graphpic format\r\n                    const lines = text.replace(/\\r\\n/g, '\\n').split('\\n');\r\n                    const mapping = {\r\n                        'Name':             {attr: 'Name'},\r\n                        'Typ':              {attr: ''},\r\n                        'Operand':          {attr: 'Address',       process: f => {\r\n                            // DB 504.DBW 1462 => DB504 1462\r\n                            f = f.trim();\r\n                            const db     = f.match(/^DB (\\d+)/);\r\n                            if (!db) {\r\n                                // M\r\n                                // MB\r\n                                let m = f.match(/^MB? (\\d+)\\.?(\\d+)?$/);\r\n                                if (m) {\r\n                                    return 'M ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n                                } else {\r\n                                    m = f.match(/^AB? (\\d+)\\.?(\\d+)?$/);\r\n                                    if (m) {\r\n                                        return 'OUT ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n                                    } else {\r\n                                        m = f.match(/^EB? (\\d+)\\.?(\\d+)?$/);\r\n                                        if (m) {\r\n                                            return 'IN ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n                                        } else {\r\n                                            return f;\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            const offset = f.match(/(\\d+).?(\\d+)?$/);\r\n                            if (db && offset) {\r\n                                return `DB${db[1]} ${offset[1]}${offset[2] !== undefined ? '.' + offset[2] : ''}`;\r\n                            } else {\r\n                                return f;\r\n                            }\r\n                        }},\r\n                        'SPS-Format':       {attr: 'Type',          process: function (f) {return f;} },\r\n                        'Byteanzahl':       {attr: 'Length',        process: function (f) {return parseInt(f, 10);} },\r\n                        'Zugriff':          {attr: 'RW',            process: function (f) {return f !== 'read';} },\r\n                        'Leseanforderung':  {attr: 'poll',          process: function (f) {return f === 'zyklisch';} },\r\n                        'AktZeit (ms)':     {attr: ''},\r\n                        'Kommentar':        {attr: 'Description'},\r\n                        'Clients (Anzahl)': {attr: ''}\r\n                    };\r\n                    // First line\r\n                    // \"Name\",\"Typ\",\"Operand\",\"SPS-Format\",\"Byteanzahl\",\"Zugriff\",\"Leseanforderung\",\"AktZeit (ms)\",\"Kommentar\",\"Clients (Anzahl)\"\r\n                    let sFields = lines[0].split(',');\r\n                    // create mapping\r\n                    const fields = [];\r\n                    for (let m = 0; m < sFields.length; m++) {\r\n                        sFields[m] = sFields[m].replace(/\"/g, '');\r\n                        fields.push(mapping[sFields[m]]);\r\n                    }\r\n                    for (let l = 1; l < lines.length; l++) {\r\n                        lines[l] = lines[l].trim();\r\n                        if (!lines[l]) continue;\r\n                        sFields = lines[l].trim().split(',');\r\n                        let obj = {\r\n                            Type:           'ARRAY',\r\n                            Unit:           '',\r\n                            Role:           '',\r\n                            Room:           '',\r\n                            poll:           true,\r\n                            RW:             false,\r\n                            WP:             false\r\n                        };\r\n                        for (let f = 0; f < fields.length; f++) {\r\n                            if (!fields[f].attr) {\r\n                                continue;\r\n                            }\r\n                            if (!sFields[f]) {\r\n                                console.log('error');\r\n                                break;\r\n                            }\r\n                            sFields[f] = sFields[f].replace(/\"/g, '');\r\n                            obj[fields[f].attr] = fields[f].process ? fields[f].process(sFields[f]) : sFields[f];\r\n\r\n                            if (obj.Name.match(/^@/)) {\r\n                                obj = null;\r\n                                break;\r\n                            }\r\n                        }\r\n                        if (obj) {\r\n                            if (obj.Type === 'BYTE' && obj.Length !== 1) {\r\n                                obj.Type = 'ARRAY';\r\n                            }\r\n                            if (obj.Type === 'CHAR') {\r\n                                obj.Type = 'STRING';\r\n                            }\r\n                            if (obj.Type === 'BYTE' || obj.Type === 'BOOL' || obj.Type === 'INT') {\r\n                                obj.Length = '';\r\n                            }\r\n                            let _attr;\r\n                            if (obj.Address.match(/^DB/)) {\r\n                                _attr = 'dbs';\r\n                            } else if (obj.Address.match(/^IN/)) {\r\n                                obj.Address = obj.Address.replace(/^IN\\s?/, '');\r\n                                _attr = 'inputs';\r\n                            } else if (obj.Address.match(/^OUT/)) {\r\n                                _attr = 'outputs';\r\n                                obj.Address = obj.Address.replace(/^OUT\\s?/, '');\r\n                            } else if (obj.Address.match(/^M/)) {\r\n                                _attr = 'markers';\r\n                                obj.Address = obj.Address.replace(/^M\\s?/, '');\r\n                            } else {\r\n                                console.error('Unknown TYPE: ' + obj.Address);\r\n                                continue;\r\n                            }\r\n                            // try to find same address\r\n                            for (let aaa = 0; aaa < newParts[_attr].length; aaa++) {\r\n                                if (newParts[_attr][aaa].Address === obj.Address) {\r\n                                    newParts[_attr][aaa] = obj;\r\n                                    changes[_attr] = true;\r\n                                    obj = null;\r\n                                    break;\r\n                                }\r\n                            }\r\n                            if (obj) {\r\n                                changes[_attr] = true;\r\n                                newParts[_attr].push(obj);\r\n                            }\r\n                        }\r\n                    }\r\n                } else {\r\n                    const mm = text.match(/(DB)[0-9]+\\s-\\s/g);\r\n                    const db = mm ? mm[0].replace(' - ', '') : '';\r\n                    const vv = text.split('STRUCT');\r\n\r\n                    const struck = vv[1] ? vv[1].split('=')[0].split('\\n') : [];\r\n\r\n                    struck.forEach((item) => {\r\n                        if (item.length > 10) {\r\n                            const x = item.split(/\\s+/g);\r\n                            x.shift();\r\n\r\n                            let obj = {\r\n                                Address:        db + ' ' + x.shift(),\r\n                                Name:           x.shift(),\r\n                                Type:           x.shift(),\r\n                                dec:            x.shift(),\r\n                                Description:    x.join(' '),\r\n                                Unit:           '',\r\n                                Role:           '',\r\n                                Room:           '',\r\n                                poll:           true,\r\n                                RW:             false,\r\n                                WP:             false\r\n                            };\r\n\r\n                            // try to find same address\r\n                            for (let aaa = 0; aaa < newParts.dbs.length; aaa++) {\r\n                                if (newParts.dbs[aaa].Address === obj.Address) {\r\n                                    newParts.dbs[aaa] = obj;\r\n                                    changes.dbs = true;\r\n                                    obj = null;\r\n                                    break;\r\n                                }\r\n                            }\r\n                            if (obj) {\r\n                                changes.dbs = true;\r\n                                newParts.dbs.push(obj);\r\n                            }\r\n                        }\r\n                    });\r\n                }\r\n                for (const attr in newParts) {\r\n                    if (!newParts.hasOwnProperty(attr)) {\r\n                        continue;\r\n                    }\r\n                    newParts[attr].sort((a, b) => {\r\n                        const aDB = a.Address.match(/^D?B?\\s?(\\d+)/);\r\n                        const bDB = b.Address.match(/^D?B?\\s?(\\d+)/);\r\n                        if (!aDB) return -1;\r\n                        if (!bDB) return 1;\r\n                        if (parseInt(aDB[1], 10) > parseInt(bDB[1], 10)) return 1;\r\n                        if (parseInt(aDB[1], 10) < parseInt(bDB[1], 10)) return -1;\r\n                        const aOffset = a.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n                        const bOffset = b.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n                        if (!aOffset) return -1;\r\n                        if (!bOffset) return 1;\r\n                        if (parseInt(aOffset[1], 10) > parseInt(bOffset[1], 10)) return 1;\r\n                        if (parseInt(aOffset[1], 10) < parseInt(bOffset[1], 10)) return -1;\r\n                        if (aOffset[2] === undefined && bOffset[2] !== undefined) return 1;\r\n                        if (bOffset[2] === undefined && aOffset[2] !== undefined) return -1;\r\n                        if (aOffset[2] === undefined && bOffset[2] === undefined) return 0;\r\n                        if (parseInt(aOffset[2], 10) > parseInt(bOffset[2], 10)) return 1;\r\n                        if (parseInt(aOffset[2], 10) < parseInt(bOffset[1], 10)) return -1;\r\n                        return 0;\r\n                    });\r\n                }\r\n                if (changes.dbs) {\r\n                    native.dbs = newParts.dbs;\r\n                }\r\n                if (changes.inputs) {\r\n                    native.inputs = newParts.inputs;\r\n                }\r\n                if (changes.outputs) {\r\n                    native.outputs = newParts.outputs;\r\n                }\r\n                if (changes.markers) {\r\n                    native.markers = newParts.markers;\r\n                }\r\n                console.log(native);\r\n                //this.props.changeNative(native);\r\n            }, 200);\r\n        };\r\n\r\n        reader.readAsText(e[0], 'ISO-8859-1');\r\n    }\r\n}\r\n\r\nOptions.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default withStyles(styles)(Options);\r\n","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport { tsv2json, json2tsv } from 'tsv-json';\r\nimport { useSnackbar } from 'notistack';\r\nimport AceEditor from \"react-ace\";\r\nimport copy from 'copy-to-clipboard';\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport SaveIcon from '@material-ui/icons/Save';\r\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\r\n\r\nconst styles = theme => ({\r\n    tsvEditor: {\r\n        width: '100%',\r\n        height: 400\r\n    },\r\n    tsvEditorTextarea: {\r\n        fontFamily: 'monospace'\r\n    }\r\n});\r\n\r\nconst TsvDialog = props => {\r\n    const [tsv, setTsv] = useState('');\r\n    useEffect(() => {\r\n        let tsvResult = [];\r\n        tsvResult.push(props.fields.map(field => field.name));\r\n        props.data.forEach(item =>\r\n            tsvResult.push(props.fields.map(field => item[field.name] !== undefined && item[field.name] !== null ? item[field.name].toString() : ''))\r\n        );\r\n        setTsv(json2tsv(tsvResult));\r\n    }, [props.open]); // eslint-disable-line react-hooks/exhaustive-deps\r\n    const { enqueueSnackbar } = useSnackbar();\r\n\r\n    if (!props.open) {\r\n        return null;\r\n    }\r\n\r\n    const saveTsv = () => {\r\n        let data = tsv2json(tsv);\r\n        let fields = data.shift();\r\n        let success = true;\r\n        let errors = [];\r\n        for (let index in props.fields) {\r\n            if (props.fields[index].name !== fields[index]) {\r\n                errors.push(<>No field <i>{props.fields[index].name}</i> in position <i>{parseInt(index) + 1}</i>!</>);\r\n                success = false;\r\n            }\r\n        }\r\n\r\n        data = data.map((itemValues, itemIndex) => {\r\n            let item = {};\r\n            for (let index in props.fields) {\r\n                if (props.fields[index].type === 'select' && !props.fields[index].options.map(option => option.value).includes(itemValues[index])) {\r\n                    errors.push(<>Value <i>{itemValues[index]}</i> is wrong for field <i>{props.fields[index].name}</i> in position <i>{parseInt(itemIndex) + 1}</i>!</>);\r\n                    success = false;\r\n                }\r\n                if (props.fields[index].type === 'checkbox') {\r\n                    itemValues[index] = itemValues[index] === 'true';\r\n                }\r\n                item[props.fields[index].name] = itemValues[index];\r\n            }\r\n            return item;\r\n        });\r\n\r\n        if (!success) {\r\n            enqueueSnackbar(<div>{errors.map((error, index) => <div key={index}>{error}</div>)}</div>, { variant: 'error' });\r\n            return;\r\n        }\r\n        props.save(data);\r\n        props.onClose();\r\n    };\r\n\r\n    return <Dialog\r\n        open={props.open}\r\n        onClose={props.onClose}\r\n        maxWidth=\"lg\"\r\n        fullWidth\r\n    >\r\n        <DialogTitle>{I18n.t('Edit data as TSV')}</DialogTitle>\r\n        <DialogContent>\r\n            <DialogContentText>{I18n.t('You can copy, paste and edit data as TSV.')}</DialogContentText>\r\n            <div>\r\n                <AceEditor\r\n                    onChange={e => setTsv(e)}\r\n                    height=\"400px\"\r\n                    showPrintMargin={false}\r\n                    value={tsv}\r\n                    className={props.classes.tsvEditor}\r\n                    width=\"100%\"\r\n                    setOptions={{firstLineNumber: 0}}\r\n                    mode={null}\r\n                />\r\n            </div>\r\n        </DialogContent>\r\n        <DialogActions>\r\n            <Button variant=\"outlined\" color=\"primary\" onClick={() => {\r\n                //Utils.copyToClipboard(tsv);\r\n                copy(tsv);\r\n                enqueueSnackbar(I18n.t('TSV was copied to clipboard'));\r\n            }} startIcon={<FileCopyIcon />}>{I18n.t('Copy to clipboard')}</Button>\r\n            <Button variant=\"contained\" color=\"primary\" onClick={saveTsv} startIcon={<SaveIcon />}>{I18n.t('Import')}</Button>\r\n            <Button variant=\"contained\" onClick={props.onClose} startIcon={<ClearIcon />}>{I18n.t('Close')}</Button>\r\n        </DialogActions>\r\n    </Dialog>\r\n};\r\n\r\nTsvDialog.propTypes = {\r\n    open: PropTypes.bool,\r\n    onClose: PropTypes.func,\r\n    classes: PropTypes.object,\r\n    save: PropTypes.func,\r\n    fields: PropTypes.array,\r\n    data: PropTypes.array\r\n};\r\n\r\nexport default withStyles(styles)(TsvDialog);","import PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteAllDialog = (props) => {\r\n    return props.open ? <Dialog open={props.open} onClose={props.onClose}>\r\n        <DialogTitle>{I18n.t('Delete all items')}</DialogTitle>\r\n        <DialogContent>\r\n            <DialogContentText>{I18n.t('Are you sure to delete all items?')}</DialogContentText>\r\n            <DialogActions>\r\n                <Button variant=\"contained\" color=\"secondary\" startIcon={<DeleteIcon />} onClick={() => {\r\n                    props.action();\r\n                    props.onClose();\r\n                }}>{I18n.t('Delete all items')}</Button>\r\n                <Button variant=\"contained\" onClick={props.onClose} startIcon={<ClearIcon />}>{I18n.t('Cancel')}</Button>\r\n            </DialogActions>\r\n        </DialogContent>\r\n    </Dialog> : null;\r\n}\r\n\r\nDeleteAllDialog.propTypes = {\r\n    open: PropTypes.bool,\r\n    action: PropTypes.func,\r\n    onClose: PropTypes.func,\r\n    classes: PropTypes.object,\r\n}\r\n\r\nexport default DeleteAllDialog;","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteDialog = (props) => {\r\n    const [disableWarnings, setDisableWarnings] = useState(false);\r\n    useEffect(() => {\r\n        setDisableWarnings(false);\r\n    }, [props.open]);\r\n\r\n    return props.open ? <Dialog open={props.open} onClose={props.onClose}>\r\n        <DialogTitle>{I18n.t('Delete item')}</DialogTitle>\r\n        <DialogContent>\r\n            <DialogContentText>{I18n.t('Are you sure to delete item with address \"%s\"?', props.item._address)}</DialogContentText>\r\n            <DialogContentText><FormControlLabel\r\n                label={I18n.t('Don\\'t show this message in 5 minutes')}\r\n                control={<Checkbox\r\n                    checked={disableWarnings}\r\n                    onChange={e => setDisableWarnings(e.target.checked)}\r\n            />}/></DialogContentText>\r\n            <DialogActions>\r\n                <Button variant=\"contained\" color=\"secondary\" startIcon={<DeleteIcon />} onClick={() => {\r\n                    props.action(disableWarnings);\r\n                    props.onClose();\r\n                }}>{I18n.t('Delete')}</Button>\r\n                <Button variant=\"contained\" onClick={props.onClose} startIcon={<ClearIcon />}>{I18n.t('Cancel')}</Button>\r\n            </DialogActions>\r\n        </DialogContent>\r\n    </Dialog> : null;\r\n}\r\n\r\nDeleteDialog.propTypes = {\r\n    open: PropTypes.bool,\r\n    onClose: PropTypes.func,\r\n    classes: PropTypes.object,\r\n    action: PropTypes.func,\r\n    item: PropTypes.object,\r\n}\r\n\r\nexport default DeleteDialog;","import { useState, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Table from '@material-ui/core/Table';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport TableSortLabel from '@material-ui/core/TableSortLabel';\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport AddIcon from '@material-ui/icons/Add';\r\nimport ImportExport from '@material-ui/icons/ImportExport';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nimport ExpertIcon from '@iobroker/adapter-react/icons/IconExpert';\r\nimport TextWithIcon from '@iobroker/adapter-react/Components/TextWithIcon';\r\nimport SelectWithIcon from '@iobroker/adapter-react/Components/SelectWithIcon';\r\n\r\nimport TsvDialog from './TsvDialog';\r\nimport DeleteAllDialog from './DeleteAllDialog';\r\nimport DeleteDialog from './DeleteDialog';\r\n\r\nconst styles = theme => ({\r\n    tableHeader: {\r\n        whiteSpace: 'nowrap',\r\n        fontWeight: 'bold',\r\n        fontSize: '80%',\r\n        padding: '0px 8px'\r\n    },\r\n    tableHeaderExtended: {\r\n        color: theme.palette.type === 'dark' ? theme.palette.primary.light : theme.palette.primary.dark\r\n    },\r\n    tableCell: {\r\n        whiteSpace: 'nowrap',\r\n        fontSize: '80%',\r\n        padding: '0px 8px'\r\n    },\r\n    tableContainer: {\r\n        overflow: 'auto',\r\n        maxHeight: 'calc(100vh - 180px)'\r\n    },\r\n    tableTextField: {\r\n        fontSize: '80%'\r\n    },\r\n    tableSelect: {\r\n        fontSize: '80%'\r\n    },\r\n    tableTextFieldContainer: {\r\n        width: '100%'\r\n    },\r\n    tableSelectContainer: {\r\n        width: '100%'\r\n    },\r\n    nonEditMode: {\r\n        cursor: 'pointer'\r\n    }\r\n});\r\n\r\nconst DataCell = props => {\r\n    const sortedItem = props.sortedItem;\r\n    const field = props.field;\r\n    const editMode = props.editMode;\r\n    const setEditMode = props.setEditMode;\r\n\r\n    const ref = useRef();\r\n    /*useEffect(() => {\r\n         if (props.editMode) {\r\n             // ref.current && ref.current.focus()\r\n             //window.setTimeout(() => ref.current && ref.current.focus(), 1000);\r\n         }\r\n    }, [props.editMode])*/\r\n\r\n    let item = sortedItem.item;\r\n    let result;\r\n    if (field.type === 'checkbox') {\r\n        result = <Tooltip title={I18n.t(field.title)}>\r\n            <Checkbox\r\n                inputRef={ref}\r\n                className={props.classes.tableCheckbox}\r\n                checked={!!item[field.name]}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n                onChange={e => props.changeParam(sortedItem.$index, field.name, e.target.checked)}\r\n            />\r\n        </Tooltip>;\r\n    } else if (field.type === 'rooms') {\r\n        if (!editMode) {\r\n            result = <TextWithIcon list={props.rooms} value={item[field.name]} themeType={props.themeType}/>;\r\n        } else {\r\n            result = <SelectWithIcon\r\n                list={props.rooms}\r\n                allowNone={true}\r\n                value={item[field.name]}\r\n                dense={true}\r\n                themeType={props.themeType}\r\n                inputProps={{ref, className: props.classes.tableSelect}}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n                onChange={value => props.changeParam(sortedItem.$index, field.name, value)}\r\n                className={props.classes.tableSelectContainer}\r\n            />;\r\n        }\r\n    } else if (field.type === 'select') {\r\n        if (!editMode) {\r\n            let option = field.options.find(option => option.value === item[field.name]);\r\n            result = option ? option.title : '';\r\n        } else {\r\n            result = <Select\r\n                value={item[field.name]}\r\n                inputProps={{ref, className: props.classes.tableSelect}}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n                onChange={e => props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n                className={props.classes.tableSelectContainer}\r\n            >\r\n                {field.options.map(option =>\r\n                    <MenuItem key={option.value} value={option.value}>{option.title ? option.title : <i>{I18n.t('Nothing')}</i>}</MenuItem>\r\n                )}\r\n            </Select>;\r\n        }\r\n    } else {\r\n        if (!editMode) {\r\n            result = item[field.name] ? item[field.name] : null;\r\n        } else {\r\n            result = <TextField value={item[field.name]} className={props.classes.tableTextFieldContainer}\r\n                inputProps={{ref: ref, className: props.classes.tableTextField}}\r\n                type={field.type}\r\n                onChange={e => props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n                disabled={props.getDisable(sortedItem.$index, field.name)}\r\n            />;\r\n        }\r\n    }\r\n\r\n    return <TableCell\r\n        className={Utils.clsx(props.classes.tableCell, !editMode && props.classes.nonEditMode)}\r\n        onClick={e => {\r\n            setEditMode(true);\r\n            window.localStorage.setItem('Modbus.editMode', 'true');\r\n            window.setTimeout(() => ref.current && ref.current.focus(), 100);\r\n        }}\r\n    >\r\n        {result}\r\n    </TableCell>;\r\n}\r\n\r\nconst RegisterTable = props => {\r\n    const [tsvDialogOpen, setTsvDialogOpen] = useState(false);\r\n    const [editMode, setEditMode] = useState(parseInt(window.localStorage.getItem('Modbus.editMode'), 10) || 0);\r\n    const [extendedMode, setExtendedMode] = useState(window.localStorage.getItem('Modbus.extendedMode') === 'true');\r\n    const [deleteAllDialog, setDeleteAllDialog] = useState({\r\n        open: false,\r\n        action: null,\r\n    });\r\n    const [deleteDialog, setDeleteDialog] = useState({\r\n        open: false,\r\n        item: null,\r\n        action: null,\r\n    });\r\n\r\n    let sortedData = props.getSortedData(props.data, props.orderBy, props.order);\r\n\r\n    return <div>\r\n        <div>\r\n            <Tooltip title={I18n.t('Add line')}>\r\n                <IconButton onClick={e => props.addItem()}>\r\n                    <AddIcon/>\r\n                </IconButton>\r\n            </Tooltip>\r\n            <Tooltip title={I18n.t('Edit as TSV (Tab separated values)')}>\r\n                <IconButton onClick={() => setTsvDialogOpen(true)}>\r\n                    <ImportExport/>\r\n                </IconButton>\r\n            </Tooltip>\r\n            <Tooltip title={I18n.t('Toggle extended mode')}>\r\n                <IconButton\r\n                    color={extendedMode ? 'primary' : 'inherit'}\r\n                    onClick={() => {\r\n                        window.localStorage.setItem('Modbus.extendedMode', extendedMode ? 'false' : 'true');\r\n                        setExtendedMode(!extendedMode);\r\n                    }}>\r\n                    <ExpertIcon/>\r\n                </IconButton>\r\n            </Tooltip>\r\n        </div>\r\n        <div className={props.classes.tableContainer}>\r\n            <Table size=\"small\"\r\n                   stickyHeader\r\n                   padding=\"none\"\r\n            >\r\n                <TableHead>\r\n                    <TableRow>\r\n                        {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field => {\r\n                            let isChecked = false;\r\n                            let indeterminate = false;\r\n                            let trueFound = false;\r\n                            let falseFound = false;\r\n                            for (let k in props.data) {\r\n                                if (props.data[k][field.name]) {\r\n                                    isChecked = true;\r\n                                    trueFound = true;\r\n                                } else {\r\n                                    isChecked = false;\r\n                                    falseFound = true;\r\n                                }\r\n\r\n                                if (trueFound && falseFound) {\r\n                                    indeterminate = true;\r\n                                    isChecked = false;\r\n                                    break;\r\n                                }\r\n                            }\r\n\r\n                            return <TableCell\r\n                                key={field.name}\r\n                                style={{width: field.type === 'checkbox' ? 20 : field.width}}\r\n                                className={Utils.clsx(props.classes.tableHeader, field.expert && props.classes.tableHeaderExtended)}\r\n                                title={field.tooltip ? I18n.t(field.tooltip) : null}\r\n                            >\r\n                                {field.type === 'checkbox' ?\r\n                                    <Tooltip title={I18n.t('Change all')}>\r\n                                        <Checkbox\r\n                                            indeterminate={indeterminate}\r\n                                            checked={isChecked}\r\n                                            onChange={e => {\r\n                                                let newData = JSON.parse(JSON.stringify(props.data));\r\n                                                newData.forEach(item =>\r\n                                                    item[field.name] = e.target.checked);\r\n                                                props.changeData(newData);\r\n                                            }}\r\n                                        />\r\n                                    </Tooltip>\r\n                                    : null}\r\n                                {field.sorted ? <TableSortLabel\r\n                                    active={field.name === props.orderBy}\r\n                                    direction={props.order}\r\n                                    onClick={e => {\r\n                                        const isAsc = props.orderBy === field.name && props.order === 'asc';\r\n                                        props.onChangeOrder(field.name, isAsc ? 'desc' : 'asc');\r\n                                    }}\r\n                                >{I18n.t(field.title)}</TableSortLabel> : I18n.t(field.title)}\r\n                            </TableCell>\r\n                        })}\r\n                        <TableCell>\r\n                            <Tooltip title={I18n.t('Delete all')}>\r\n                                <div>\r\n                                    <IconButton\r\n                                        size=\"small\"\r\n                                        onClick={e => setDeleteAllDialog({\r\n                                            open: true,\r\n                                            action: () => props.changeData([]),\r\n                                        })}\r\n                                        disabled={!props.data.length}\r\n                                    >\r\n                                        <DeleteIcon/>\r\n                                    </IconButton>\r\n                                </div>\r\n                            </Tooltip>\r\n                        </TableCell>\r\n                    </TableRow>\r\n                </TableHead>\r\n                <TableBody>\r\n                    {\r\n                        sortedData.map(sortedItem =>\r\n                            <TableRow hover key={sortedItem.$index}>\r\n                                {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field =>\r\n                                    <DataCell\r\n                                        key={field.name}\r\n                                        themeType={props.themeType}\r\n                                        sortedItem={sortedItem}\r\n                                        field={field}\r\n                                        editMode={editMode === sortedItem.$index}\r\n                                        rooms={props.rooms}\r\n                                        setEditMode={() => setEditMode(sortedItem.$index)}\r\n                                        ey={field.name}\r\n                                        {...props}\r\n                                    />\r\n                                )}\r\n                                <TableCell>\r\n                                    <Tooltip title={I18n.t('Delete')}>\r\n                                        <div>\r\n                                            <IconButton size=\"small\" onClick={e => {\r\n                                                let lastTime = window.sessionStorage.getItem('disableDeleteDialogs');\r\n                                                if (lastTime && (new Date() - new Date(lastTime)) < 1000 * 60 * 5) {\r\n                                                    props.deleteItem(sortedItem.$index);\r\n                                                    return;\r\n                                                }\r\n                                                setDeleteDialog({\r\n                                                    open: true,\r\n                                                    action: disableDialogs => {\r\n                                                        if (disableDialogs) {\r\n                                                            window.sessionStorage.setItem('disableDeleteDialogs', (new Date()).toISOString());\r\n                                                        }\r\n                                                        props.deleteItem(sortedItem.$index);\r\n                                                    },\r\n                                                    item: sortedItem.item\r\n                                                })\r\n                                            }}>\r\n                                                <DeleteIcon/>\r\n                                            </IconButton>\r\n                                        </div>\r\n                                    </Tooltip>\r\n                                </TableCell>\r\n                            </TableRow>\r\n                        )\r\n                    }\r\n                </TableBody>\r\n            </Table>\r\n        </div>\r\n        {tsvDialogOpen ?\r\n            <TsvDialog\r\n                open={true}\r\n                save={data => {\r\n                    if (props.prefix) {\r\n                        data.forEach(line => {\r\n                            line.Address = (line.Address || '').toUpperCase();\r\n                            if (line.Address && !line.Address.startsWith(props.prefix)) {\r\n                                line.Address = props.prefix + line.Address;\r\n                            }\r\n                        });\r\n                    }\r\n                    props.changeData(data);\r\n                }}\r\n                onClose={() => setTsvDialogOpen(false)}\r\n                data={props.data}\r\n                fields={props.fields}\r\n            /> : null\r\n        }\r\n        <DeleteAllDialog\r\n            open={deleteAllDialog.open}\r\n            action={deleteAllDialog.action}\r\n            onClose={() => setDeleteAllDialog({\r\n                open: false,\r\n                action: null,\r\n            })}\r\n        />\r\n        <DeleteDialog\r\n            open={deleteDialog.open}\r\n            action={deleteDialog.action}\r\n            onClose={() => setDeleteDialog({\r\n                open: false,\r\n                action: null,\r\n                item: null\r\n            })}\r\n            item={deleteDialog.item}\r\n        />\r\n    </div>;\r\n}\r\n\r\nRegisterTable.propTypes = {\r\n    data: PropTypes.array,\r\n    fields: PropTypes.array,\r\n    classes: PropTypes.object,\r\n    addItem: PropTypes.func,\r\n    changeData: PropTypes.func,\r\n    deleteItem: PropTypes.func,\r\n    rooms: PropTypes.object,\r\n    formulaDisabled: PropTypes.bool,\r\n    getSortedData: PropTypes.func,\r\n    themeType: PropTypes.string,\r\n    prefix: PropTypes.string,\r\n};\r\n\r\nexport default withStyles(styles)(RegisterTable);","import {Component} from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Paper from '@material-ui/core/Paper';\r\n\r\nimport roles from '../data/roles';\r\nimport types from '../data/types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport RegisterTable from '../Components/RegisterTable';\r\n\r\nclass BaseRegisters extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.nativeField = '';\r\n        this.state = {\r\n            order: window.localStorage.getItem('Modbus.order') || 'asc',\r\n            orderBy: window.localStorage.getItem('Modbus.orderBy') || 'Address',\r\n        };\r\n    }\r\n\r\n    getRooms() {\r\n        const lang = I18n.getLanguage();\r\n        return this.props.rooms ? Object.values(this.props.rooms).map(room => ({\r\n            value: room._id,\r\n            title: typeof room.common.name === 'object' ? room.common.name[lang] : room.common.name\r\n        })) : [];\r\n    }\r\n\r\n    getFields() {\r\n        let rooms = this.getRooms();\r\n        rooms.unshift({value: '', title: ''});\r\n\r\n        let result = [\r\n            {name: 'Address', title: 'Address', type: 'text', sorted: true, width: 20},\r\n            {name: 'Name', title: 'Name', type: 'text', sorted: true},\r\n            {name: 'Description', title: 'Description', type: 'text', sorted: true},\r\n            {name: 'Type', title: 'Type', type: 'select', options: types, sorted: true},\r\n            {name: 'Length', title: 'Length', type: 'text', width: 20},\r\n            {name: 'Unit', title: 'Unit', type: 'text', width: 30},\r\n            {name: 'Role', title: 'Role', type: 'select', options: roles, sorted: true},\r\n            {name: 'Room', title: 'Room', type: 'rooms', options: rooms, sorted: true},\r\n            {name: 'poll', title: 'Poll', type: 'checkbox'},\r\n            {name: 'RW', title: 'RW', type: 'checkbox', expert: true},\r\n            {name: 'WP', title: 'WP', type: 'checkbox', expert: true},\r\n        ]\r\n\r\n        if (this.props.native.params.multiDeviceId) {\r\n            result.splice(1, 0,\r\n                {name: 'deviceId', title: 'Slave ID', type: 'number', sorted: true, width: 20},\r\n            );\r\n        }\r\n\r\n        return result;\r\n    }\r\n\r\n    address2struct(address) {\r\n        if (this.nativeField === 'dbs') {\r\n            const parts = address.split(' ');\r\n            const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);\r\n            if (parts[1].includes('.')) {\r\n                const a = parseFloat(parts[1]);\r\n                return {db, byte: Math.floor(a), bit: (a * 10) % 10};\r\n            } else {\r\n                return {db, byte: parseInt(parts[1], 10)};\r\n            }\r\n        } else {\r\n            if (address.includes('.')) {\r\n                const a = parseFloat(address);\r\n                return {byte: Math.floor(a), bit: (a * 10) % 10};\r\n            } else {\r\n                return {byte: parseInt(address, 10)};\r\n            }\r\n        }\r\n    }\r\n\r\n    struct2address(struct) {\r\n        if (struct.db !== undefined) {\r\n            if (struct.bit !== undefined) {\r\n                return 'DB' + struct.db + ' ' + struct.byte + '.' + struct.bit;\r\n            } else  {\r\n                return 'DB' + struct.db + ' ' + struct.byte;\r\n            }\r\n        } else if (struct.bit !== undefined) {\r\n            return struct.byte + '.' + struct.bit;\r\n        } else  {\r\n            return struct.byte;\r\n        }\r\n    }\r\n\r\n    changeParam = (index, name, value) => {\r\n        let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n        data[index][name] = value;\r\n        if (name === 'Type') {\r\n            if (['BOOL'].includes(value)) {\r\n                data[index].Length = 0.1;\r\n            } else\r\n            if (['', 'BYTE'].includes(value)) {\r\n                data[index].Length = 1;\r\n            } else\r\n            if (['WORD', 'INT', 'STRING', 'S5TIME'].includes(value)) {\r\n                data[index].Length = 2;\r\n            } else\r\n            if (['DWORD', 'DINT', 'REAL'].includes(value)) {\r\n                data[index].Length = 4;\r\n            } else\r\n            if (['S7TIME'].includes(value)) {\r\n                data[index].Length = 8;\r\n            } else\r\n            if (['S7STRING', 'ARRAY'].includes(value)) {\r\n                data[index].Length = 32;\r\n            }\r\n\r\n            if (value === 'BOOL') {\r\n                const struct = this.address2struct(data[index].Address);\r\n                if (struct.bit === undefined) {\r\n                    struct.bit = 0;\r\n                    data[index].Address = this.struct2address(struct);\r\n                }\r\n            } else {\r\n                const struct = this.address2struct(data[index].Address);\r\n                if (struct.bit !== undefined) {\r\n                    if (struct.bit > 0) {\r\n                        struct.byte++;\r\n                    }\r\n                    delete struct.bit;\r\n\r\n                    data[index].Address = this.struct2address(struct);\r\n                }\r\n            }\r\n        }\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    addItem = () => {\r\n        let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n        let newItem = {}\r\n        this.getFields().forEach(field => newItem[field.name] = '')\r\n        if (data.length) {\r\n            let sortedData = JSON.parse(JSON.stringify(data));\r\n            sortedData.sort((item1, item2) => item1.Address > item2.Address ? 1 : -1);\r\n            let lastItem = sortedData[sortedData.length - 1];\r\n            const struct = this.address2struct(lastItem.Address);\r\n            if (lastItem.Type === 'BOOL') {\r\n                struct.bit = struct.bit || 0;\r\n                struct.bit++;\r\n                if (struct.bit >= 8) {\r\n                    struct.bit = struct.bit % 8;\r\n                    struct.byte++;\r\n                }\r\n            } else {\r\n                delete struct.bit;\r\n                struct.byte += lastItem.Length;\r\n            }\r\n\r\n            if (struct.db !== undefined && struct.byte + lastItem.Length > 0xFFFF) {\r\n                struct.db++;\r\n                struct.byte = 0;\r\n                if (lastItem.Type === 'BOOL') {\r\n                    struct.bit = 0;\r\n                }\r\n            }\r\n\r\n            newItem.Address = this.struct2address(struct);\r\n            newItem.Type = lastItem.Type;\r\n            newItem.Length = lastItem.Length;\r\n            newItem.Unit = lastItem.Unit;\r\n            newItem.Role = lastItem.Role;\r\n            newItem.Room = lastItem.Room;\r\n            newItem.poll = lastItem.poll;\r\n            newItem.RW = lastItem.RW;\r\n            newItem.WP = lastItem.WP;\r\n        } else {\r\n            newItem.role = 'level';\r\n            newItem.Type = 'BOOL';\r\n            newItem.Length = '0.1';\r\n            newItem.poll = true;\r\n            if (this.nativeField === 'dbs') {\r\n                newItem.Address = 'DB1 0.0';\r\n            } else {\r\n                newItem.Address = '0.0';\r\n            }\r\n        }\r\n        data.push(newItem);\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    deleteItem = (index) => {\r\n        let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n        data.splice(index, 1);\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    changeData = (data) => {\r\n        this.props.onChange(this.nativeField, data);\r\n    }\r\n\r\n    getDisable = (index, name) => {\r\n        return name === 'Length' &&\r\n            !['STRING', 'S7STRING', 'ARRAY'].includes(this.props.native[this.nativeField][index].type);\r\n    }\r\n\r\n    getSortedData = (data, orderBy, order) => {\r\n        this.fields = this.fields || this.getFields();\r\n\r\n        data = data || this.props.native[this.nativeField];\r\n        orderBy = orderBy || this.state.orderBy;\r\n        order = order || this.state.order;\r\n        let sortedData = [];\r\n        data.forEach((item, index) => {sortedData[index] = {item, $index: index}});\r\n        const field = this.fields.find(item => item.name === orderBy);\r\n\r\n        sortedData.sort((sortedItem1, sortedItem2) => {\r\n            let sort1;\r\n            let sort2;\r\n            if (orderBy === 'Address') {\r\n                const a1 = this.address2struct(sortedItem1.item.Address);\r\n                const a2 = this.address2struct(sortedItem2.item.Address);\r\n\r\n                sort1 = 0;\r\n                if (a1.db !== undefined) {\r\n                    sort1 = a1.db << 24;\r\n                }\r\n                if (a2.db !== undefined) {\r\n                    sort2 = a2.db << 24;\r\n                }\r\n                sort1 |= a1.byte << 8;\r\n                sort2 |= a2.byte << 8;\r\n                sort1 |= a1.bit || 0;\r\n                sort2 |= a2.bit || 0;\r\n            } else if (orderBy === '$index') {\r\n                sort1 = sortedItem1[orderBy];\r\n                sort2 = sortedItem2[orderBy];\r\n            } else if (field && field.type === 'number') {\r\n                sort1 = parseInt(sortedItem1.item[orderBy], 10);\r\n                sort2 = parseInt(sortedItem2.item[orderBy], 10);\r\n            } else {\r\n                sort1 = sortedItem1.item[orderBy];\r\n                sort2 = sortedItem2.item[orderBy];\r\n            }\r\n            return (order === 'asc' ? sort1 > sort2 : sort1 < sort2) ? 1 : -1;\r\n        });\r\n\r\n        return sortedData;\r\n    }\r\n\r\n    render() {\r\n        this.fields = this.fields || this.getFields();\r\n\r\n        return <Paper>\r\n            <RegisterTable\r\n                prefix={this.nativeField === 'dbs' ? 'DB' : ''}\r\n                fields={this.fields}\r\n                getSortedData={this.getSortedData}\r\n                data={this.props.native[this.nativeField]}\r\n                changeParam={this.changeParam}\r\n                addItem={this.addItem}\r\n                deleteItem={this.deleteItem}\r\n                changeData={this.changeData}\r\n                getDisable={this.getDisable}\r\n                themeType={this.props.themeType}\r\n                rooms={this.props.rooms}\r\n                order={this.state.order}\r\n                orderBy={this.state.orderBy}\r\n                onChangeOrder={(orderBy, order) => {\r\n                    this.setState({orderBy, order});\r\n                    window.localStorage.setItem('Modbus.orderBy', orderBy);\r\n                    window.localStorage.setItem('Modbus.order', order);\r\n                }}\r\n            />\r\n        </Paper>\r\n    }\r\n}\r\n\r\nBaseRegisters.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n    themeType: PropTypes.string,\r\n};\r\n\r\nexport default BaseRegisters;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Inputs extends BaseRegisters {\r\n    nativeField = 'inputs'\r\n}\r\n\r\nInputs.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Inputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Outputs extends BaseRegisters {\r\n    nativeField = 'outputs'\r\n}\r\n\r\nOutputs.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Outputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Marker extends BaseRegisters {\r\n    nativeField = 'markers'\r\n}\r\n\r\nMarker.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Marker;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Dbs extends BaseRegisters {\r\n    nativeField = 'dbs';\r\n}\r\n\r\nDbs.propTypes = {\r\n    common: PropTypes.object.isRequired,\r\n    native: PropTypes.object.isRequired,\r\n    instance: PropTypes.number.isRequired,\r\n    adapterName: PropTypes.string.isRequired,\r\n    onError: PropTypes.func,\r\n    onLoad: PropTypes.func,\r\n    onChange: PropTypes.func,\r\n    changed: PropTypes.bool,\r\n    socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Dbs;\r\n","import React from 'react';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport { MuiThemeProvider } from '@material-ui/core/styles';\r\nimport { SnackbarProvider } from 'notistack';\r\n\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Tabs from '@material-ui/core/Tabs';\r\nimport Tab from '@material-ui/core/Tab';\r\n\r\nimport GenericApp from '@iobroker/adapter-react/GenericApp';\r\nimport Loader from '@iobroker/adapter-react/Components/Loader'\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport TabOptions from './Tabs/Options';\r\nimport TabInputs from './Tabs/Inputs';\r\nimport TabOutputs from './Tabs/Outputs';\r\nimport TabMarker from './Tabs/Marker';\r\nimport TabDbs from './Tabs/DBs';\r\n\r\nconst styles = theme => ({\r\n    root: {},\r\n    tabContent: {\r\n        padding: 10,\r\n        height: 'calc(100% - 64px - 48px - 20px)',\r\n        overflow: 'auto',\r\n    },\r\n    tabContentIFrame: {\r\n        padding: 10,\r\n        height: 'calc(100% - 64px - 48px - 20px - 38px)',\r\n        overflow: 'auto'\r\n    },\r\n    tab: {\r\n        width: '100%',\r\n        minHeight: '100%'\r\n    }\r\n});\r\n\r\nconst tabs = [\r\n    {\r\n        name: 'general',\r\n        title: 'General',\r\n        component: TabOptions,\r\n    },\r\n    {\r\n        name: 'inputs',\r\n        title: 'Inputs',\r\n        component: TabInputs,\r\n    },\r\n    {\r\n        name: 'outputs',\r\n        title: 'Outputs',\r\n        component: TabOutputs,\r\n    },\r\n    {\r\n        name: 'marker',\r\n        title: 'Marker',\r\n        component: TabMarker,\r\n    },\r\n    {\r\n        name: 'dbs',\r\n        title: 'DBs',\r\n        component: TabDbs,\r\n    },\r\n]\r\n\r\nclass App extends GenericApp {\r\n    constructor(props) {\r\n        const extendedProps = {...props};\r\n        extendedProps.encryptedFields = ['pass'];\r\n\r\n        extendedProps.translations = {\r\n            'en': require('./i18n/en'),\r\n            'de': require('./i18n/de'),\r\n            'ru': require('./i18n/ru'),\r\n            'pt': require('./i18n/pt'),\r\n            'nl': require('./i18n/nl'),\r\n            'fr': require('./i18n/fr'),\r\n            'it': require('./i18n/it'),\r\n            'es': require('./i18n/es'),\r\n            'pl': require('./i18n/pl'),\r\n            'zh-cn': require('./i18n/zh-cn'),\r\n        };\r\n\r\n        super(props, extendedProps);\r\n        this.state.moreLoaded = false;\r\n        this.state.rooms = null;\r\n    }\r\n\r\n    onConnectionReady() {\r\n        super.onConnectionReady()\r\n        this.socket.getForeignObjects('enum.rooms.*', 'enum')\r\n            .then(rooms =>\r\n                this.setState({moreLoaded: true, rooms}));\r\n    }\r\n\r\n    getSelectedTab() {\r\n        const selectedTab = this.state.selectedTab;\r\n        if (!selectedTab) {\r\n            return 0;\r\n        } else {\r\n            return tabs.findIndex(tab => tab.name === selectedTab);\r\n        }\r\n    }\r\n\r\n    render() {\r\n        if (!this.state.loaded || !this.state.moreLoaded) {\r\n            return <MuiThemeProvider theme={this.state.theme}>\r\n                <Loader theme={this.state.themeType} />\r\n            </MuiThemeProvider>;\r\n        }\r\n\r\n        return <MuiThemeProvider theme={this.state.theme}>\r\n            <SnackbarProvider>\r\n                <div className=\"App\" style={{background: this.state.theme.palette.background.default, color: this.state.theme.palette.text.primary}}>\r\n                    <AppBar position=\"static\">\r\n                        <Tabs\r\n                            value={this.getSelectedTab()}\r\n                            onChange={(e, index) => this.selectTab(tabs[index].name, index)}\r\n                            variant=\"scrollable\" scrollButtons=\"auto\">\r\n                            {tabs.map(tab => <Tab\r\n                                label={tab.icon ? <>{tab.icon}{I18n.t(tab.title)}</> : I18n.t(tab.title)}\r\n                                data-name={tab.name}\r\n                                key={tab.name}\r\n                                title={tab.tooltip ? I18n.t(tab.tooltip) : undefined}\r\n                            />)}\r\n                        </Tabs>\r\n                    </AppBar>\r\n                    <div className={this.isIFrame ? this.props.classes.tabContentIFrame : this.props.classes.tabContent}>\r\n                        {tabs.map((tab, index) => {\r\n                            const TabComponent = tab.component;\r\n                            if (this.state.selectedTab) {\r\n                                if (this.state.selectedTab !== tab.name) {\r\n                                    return null;\r\n                                }\r\n                            } else {\r\n                                if (index !== 0) {\r\n                                    return null;\r\n                                }\r\n                            }\r\n                            return <TabComponent\r\n                                key={tab.name}\r\n                                themeType={this.state.themeType}\r\n                                common={this.common}\r\n                                socket={this.socket}\r\n                                native={this.state.native}\r\n                                onError={text => this.setState({errorText: (text || text === 0) && typeof text !== 'string' ? text.toString() : text})}\r\n                                onLoad={native => this.onLoadConfig(native)}\r\n                                instance={this.instance}\r\n                                adapterName={this.adapterName}\r\n                                changed={this.state.changed}\r\n                                onChange={(attr, value, cb) => this.updateNativeValue(attr, value, cb)}\r\n                                changeNative={value => this.setState({native: value, changed: this.getIsChanged(value)})}\r\n                                rooms={this.state.rooms}\r\n                            />\r\n                        })}\r\n                        {/*<pre>{JSON.stringify(this.state.native, null, 2)}</pre>*/}\r\n                    </div>\r\n                    {this.renderError()}\r\n                    {this.renderSaveCloseButtons()}\r\n                </div>\r\n            </SnackbarProvider>\r\n        </MuiThemeProvider>;\r\n    }\r\n}\r\n\r\nexport default withStyles(styles)(App);\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read http://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n  window.location.hostname === 'localhost' ||\r\n    // [::1] is the IPv6 localhost address.\r\n    window.location.hostname === '[::1]' ||\r\n    // 127.0.0.1/8 is considered localhost for IPv4.\r\n    window.location.hostname.match(\r\n      /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n    )\r\n);\r\n\r\nexport function register(config) {\r\n  if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n    // The URL constructor is available in all browsers that support SW.\r\n    const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n    if (publicUrl.origin !== window.location.origin) {\r\n      // Our service worker won't work if PUBLIC_URL is on a different origin\r\n      // from what our page is served on. This might happen if a CDN is used to\r\n      // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n      return;\r\n    }\r\n\r\n    window.addEventListener('load', () => {\r\n      const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n      if (isLocalhost) {\r\n        // This is running on localhost. Let's check if a service worker still exists or not.\r\n        checkValidServiceWorker(swUrl, config);\r\n\r\n        // Add some additional logging to localhost, pointing developers to the\r\n        // service worker/PWA documentation.\r\n        navigator.serviceWorker.ready.then(() => {\r\n          console.log(\r\n            'This web app is being served cache-first by a service ' +\r\n              'worker. To learn more, visit http://bit.ly/CRA-PWA'\r\n          );\r\n        });\r\n      } else {\r\n        // Is not localhost. Just register service worker\r\n        registerValidSW(swUrl, config);\r\n      }\r\n    });\r\n  }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n  navigator.serviceWorker\r\n    .register(swUrl)\r\n    .then(registration => {\r\n      registration.onupdatefound = () => {\r\n        const installingWorker = registration.installing;\r\n        if (installingWorker == null) {\r\n          return;\r\n        }\r\n        installingWorker.onstatechange = () => {\r\n          if (installingWorker.state === 'installed') {\r\n            if (navigator.serviceWorker.controller) {\r\n              // At this point, the updated precached content has been fetched,\r\n              // but the previous service worker will still serve the older\r\n              // content until all client tabs are closed.\r\n              console.log(\r\n                'New content is available and will be used when all ' +\r\n                  'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\r\n              );\r\n\r\n              // Execute callback\r\n              if (config && config.onUpdate) {\r\n                config.onUpdate(registration);\r\n              }\r\n            } else {\r\n              // At this point, everything has been precached.\r\n              // It's the perfect time to display a\r\n              // \"Content is cached for offline use.\" message.\r\n              console.log('Content is cached for offline use.');\r\n\r\n              // Execute callback\r\n              if (config && config.onSuccess) {\r\n                config.onSuccess(registration);\r\n              }\r\n            }\r\n          }\r\n        };\r\n      };\r\n    })\r\n    .catch(error => {\r\n      console.error('Error during service worker registration:', error);\r\n    });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n  // Check if the service worker can be found. If it can't reload the page.\r\n  fetch(swUrl)\r\n    .then(response => {\r\n      // Ensure service worker exists, and that we really are getting a JS file.\r\n      const contentType = response.headers.get('content-type');\r\n      if (\r\n        response.status === 404 ||\r\n        (contentType != null && contentType.indexOf('javascript') === -1)\r\n      ) {\r\n        // No service worker found. Probably a different app. Reload the page.\r\n        navigator.serviceWorker.ready.then(registration => {\r\n          registration.unregister().then(() => {\r\n            window.location.reload();\r\n          });\r\n        });\r\n      } else {\r\n        // Service worker found. Proceed as normal.\r\n        registerValidSW(swUrl, config);\r\n      }\r\n    })\r\n    .catch(() => {\r\n      console.log(\r\n        'No internet connection found. App is running in offline mode.'\r\n      );\r\n    });\r\n}\r\n\r\nexport function unregister() {\r\n  if ('serviceWorker' in navigator) {\r\n    navigator.serviceWorker.ready.then(registration => {\r\n      registration.unregister();\r\n    });\r\n  }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport * as Sentry from '@sentry/browser';\r\nimport * as SentryIntegrations from '@sentry/integrations';\r\nimport { MuiThemeProvider} from '@material-ui/core/styles';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport {version} from '../package.json';\r\nimport theme from '@iobroker/adapter-react/Theme';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nwindow.adapterName = 's7';\r\nlet themeName = Utils.getThemeName();\r\n\r\nconsole.log(`iobroker.${window.adapterName}@${version} using theme \"${themeName}\"`);\r\n\r\nfunction build() {\r\n    return ReactDOM.render(\r\n        <MuiThemeProvider theme={theme(themeName)}>\r\n            <App\r\n                onThemeChange={_theme => {\r\n                    themeName = _theme;\r\n                    build();\r\n                }}\r\n            />\r\n        </MuiThemeProvider>,\r\n        document.getElementById('root')\r\n    );\r\n}\r\n\r\nif (false && window.location.host !== 'localhost:3000') {\r\n    Sentry.init({\r\n        dsn: 'https://5ad729dbed504d15aa8bde423cae9a8e@sentry.iobroker.net/57',\r\n        release: `iobroker.${window.adapterName}@${version}`,\r\n        integrations: [\r\n            new SentryIntegrations.Dedupe()\r\n        ]\r\n    });\r\n}\r\n\r\nbuild();\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/src/package.json b/src/package.json
index 43392f1..3dedc51 100644
--- a/src/package.json
+++ b/src/package.json
@@ -1,6 +1,6 @@
 {
     "name": "modebus-admin",
-    "version": "1.3.4",
+    "version": "1.3.5",
     "private": true,
     "dependencies": {
         "@iobroker/adapter-react": "^1.6.29",
diff --git a/src/src/Tabs/BaseRegisters.js b/src/src/Tabs/BaseRegisters.js
index 3672288..4429e2f 100644
--- a/src/src/Tabs/BaseRegisters.js
+++ b/src/src/Tabs/BaseRegisters.js
@@ -59,7 +59,7 @@ class BaseRegisters extends Component {
         if (this.nativeField === 'dbs') {
             const parts = address.split(' ');
             const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);
-            if (parts[1].includes('.')) {
+            if (parts[1] && parts[1].includes('.')) {
                 const a = parseFloat(parts[1]);
                 return {db, byte: Math.floor(a), bit: (a * 10) % 10};
             } else {