iobroker.smartcontrol 2.1.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/README.md +21 -10
  2. package/admin/custom/assets/Components-CevOCMYi.js +77 -0
  3. package/admin/custom/assets/Components-DIpDvtxi.js +1 -0
  4. package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__SmartcontrolSet__mf_owner__1-C9SdP7_s.js +1 -0
  5. package/admin/custom/assets/_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-Ca-6Y14s.js +1525 -0
  6. package/admin/custom/assets/_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__loadShare__shared-4MdeZwge.js +2 -0
  7. package/admin/custom/assets/_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-QT6he7QZ.js +122 -0
  8. package/admin/custom/assets/_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__-BWTOCVCn.js +1 -0
  9. package/admin/custom/assets/dist-Cnxr-ruU.js +1 -0
  10. package/admin/custom/assets/helpers-CNHzo155.js +1 -0
  11. package/admin/custom/assets/hostInit-BVoHSU7s.js +1 -0
  12. package/admin/custom/assets/iconLibraryData-B5fiyl1C.js +1 -0
  13. package/admin/custom/assets/index-DKuAVH1b.js +1 -0
  14. package/admin/custom/assets/lib-CgOpGT17.js +3 -0
  15. package/admin/custom/assets/mf-entry-bootstrap-0-c2b3685a.js +54 -0
  16. package/admin/custom/assets/pendingShares-CEz9fejL.js +2 -0
  17. package/admin/custom/assets/prod-XWAlCKxB.js +492 -0
  18. package/admin/custom/assets/rolldown-runtime-9C0vUP4u.js +1 -0
  19. package/admin/custom/assets/utils-DmVoYT7i.js +4 -0
  20. package/admin/custom/assets/vite-preload-helper-nldAWQd6.js +1 -0
  21. package/admin/custom/customComponents.js +12 -0
  22. package/admin/custom/i18n/de.json +59 -0
  23. package/admin/custom/i18n/en.json +59 -0
  24. package/admin/custom/i18n/es.json +59 -0
  25. package/admin/custom/i18n/fr.json +59 -0
  26. package/admin/custom/i18n/it.json +59 -0
  27. package/admin/custom/i18n/nl.json +59 -0
  28. package/admin/custom/i18n/pl.json +59 -0
  29. package/admin/custom/i18n/pt.json +59 -0
  30. package/admin/custom/i18n/ru.json +59 -0
  31. package/admin/custom/i18n/uk.json +59 -0
  32. package/admin/custom/i18n/zh-cn.json +59 -0
  33. package/admin/custom/mf-manifest.json +1 -0
  34. package/admin/doc-md/readme.txt +2 -6
  35. package/admin/doc-md/start_de.md +34 -89
  36. package/admin/doc-md/start_en.md +33 -90
  37. package/admin/doc-md/table-conditions_de.md +7 -9
  38. package/admin/doc-md/table-conditions_en.md +7 -9
  39. package/admin/doc-md/table-execution_de.md +11 -10
  40. package/admin/doc-md/table-execution_en.md +12 -11
  41. package/admin/doc-md/table-options_de.md +58 -0
  42. package/admin/doc-md/table-options_en.md +58 -0
  43. package/admin/doc-md/table-target-devices_de.md +20 -16
  44. package/admin/doc-md/table-target-devices_en.md +18 -16
  45. package/admin/doc-md/table-target-enums_de.md +13 -13
  46. package/admin/doc-md/table-target-enums_en.md +12 -14
  47. package/admin/doc-md/table-target-url_de.md +14 -25
  48. package/admin/doc-md/table-target-url_en.md +14 -23
  49. package/admin/doc-md/table-trigger-devices_de.md +10 -11
  50. package/admin/doc-md/table-trigger-devices_en.md +10 -10
  51. package/admin/doc-md/table-trigger-motion_de.md +41 -24
  52. package/admin/doc-md/table-trigger-motion_en.md +35 -19
  53. package/admin/doc-md/table-trigger-times_de.md +11 -12
  54. package/admin/doc-md/table-trigger-times_en.md +11 -11
  55. package/admin/doc-md/table-zones_de.md +19 -14
  56. package/admin/doc-md/table-zones_en.md +19 -14
  57. package/admin/doc-md/table-zones_select-targets_de.md +7 -15
  58. package/admin/doc-md/table-zones_select-targets_en.md +7 -15
  59. package/admin/i18n/{de/translations.json → de.json} +2 -1
  60. package/admin/i18n/{en/translations.json → en.json} +2 -1
  61. package/admin/i18n/{es/translations.json → es.json} +2 -1
  62. package/admin/i18n/{fr/translations.json → fr.json} +2 -1
  63. package/admin/i18n/{it/translations.json → it.json} +2 -1
  64. package/admin/i18n/{nl/translations.json → nl.json} +2 -1
  65. package/admin/i18n/{pl/translations.json → pl.json} +2 -1
  66. package/admin/i18n/{pt/translations.json → pt.json} +2 -1
  67. package/admin/i18n/{ru/translations.json → ru.json} +2 -1
  68. package/admin/i18n/uk.json +110 -0
  69. package/admin/i18n/{zh-cn/translations.json → zh-cn.json} +2 -1
  70. package/admin/img/option-screenshots/tab-conditions.png +0 -0
  71. package/admin/img/option-screenshots/tab-further-options.png +0 -0
  72. package/admin/img/option-screenshots/tab-start.png +0 -0
  73. package/admin/img/option-screenshots/tab-target-devices.png +0 -0
  74. package/admin/img/option-screenshots/tab-triggers-motion.png +0 -0
  75. package/admin/img/option-screenshots/tab-triggers-other.png +0 -0
  76. package/admin/img/option-screenshots/tab-triggers-time.png +0 -0
  77. package/admin/img/option-screenshots/tab-zones-execution.png +0 -0
  78. package/admin/img/option-screenshots/tab-zones.png +0 -0
  79. package/admin/jsonConfig.json5 +569 -0
  80. package/io-package.json +30 -27
  81. package/lib/helper.js +40 -6
  82. package/lib/trigger-class.js +185 -80
  83. package/lib/trigger-match.js +76 -0
  84. package/main.js +132 -62
  85. package/package.json +11 -21
  86. package/admin/admin.d.ts +0 -4
  87. package/admin/css/LICENSE-github-markdown-css.txt +0 -24
  88. package/admin/css/github-markdown-dark.min.css +0 -8
  89. package/admin/css/github-markdown.min.css +0 -8
  90. package/admin/doc-md/img/start_dropdown-ani.gif +0 -0
  91. package/admin/doc-md/img/start_open-dialog.png +0 -0
  92. package/admin/doc-md/img/start_show-explanation.gif +0 -0
  93. package/admin/doc-md/img/table-zones_select-target-devices-overwrite.gif +0 -0
  94. package/admin/fancytree/skin-lion/icons-rtl.gif +0 -0
  95. package/admin/fancytree/skin-lion/icons.gif +0 -0
  96. package/admin/fancytree/skin-lion/loading.gif +0 -0
  97. package/admin/fancytree/skin-lion/ui.fancytree.min.css +0 -6
  98. package/admin/fancytree/skin-lion/vline-rtl.gif +0 -0
  99. package/admin/fancytree/skin-lion/vline.gif +0 -0
  100. package/admin/img/info-big.png +0 -0
  101. package/admin/img/info-big.png_README.txt +0 -6
  102. package/admin/img/sc_always.png +0 -0
  103. package/admin/img/select-target-devices-overwrite.gif +0 -0
  104. package/admin/img/smartControl_options1.gif +0 -0
  105. package/admin/img/smartControl_options_dropdown.gif +0 -0
  106. package/admin/img/smartControl_options_dropdown_2.gif +0 -0
  107. package/admin/index_m.html +0 -812
  108. package/admin/index_m.js +0 -1659
  109. package/admin/style.css +0 -255
  110. package/admin/tsconfig.json +0 -45
  111. package/admin/words.js +0 -113
  112. package/admin/zero-md/readme.txt +0 -1
  113. package/admin/zero-md/webcomponents-loader.min.js +0 -9
  114. package/admin/zero-md/zero-md.min.js.js +0 -9
  115. package/lib/tools.js +0 -99
@@ -0,0 +1,76 @@
1
+ 'use strict';
2
+
3
+ const { isNumComparatorMatching } = require('./num-comparator');
4
+
5
+ /**
6
+ * Prüft, ob der aktuelle Datenpunkt-Wert noch zum Auslöser passt.
7
+ *
8
+ * Warum: Nach „Zone an nach x Sekunden“ muss der Adapter nochmal schauen,
9
+ * z. B. ob das Fenster noch offen ist (#4). Die Regeln sind dieselben wie
10
+ * beim ersten Auslösen in main.js (Vergleichsoperatoren, sonst ==).
11
+ *
12
+ * Zeit-Auslöser haben keinen Live-Datenpunkt → immer true.
13
+ *
14
+ * @param {unknown} currentVal aktueller State-Wert
15
+ * @param {unknown} configuredVal Wert aus der Auslöser-Tabelle
16
+ * @param {string} [tableId] tableTriggerDevices | tableTriggerMotion | tableTriggerTimes
17
+ * @returns {boolean} true wenn der aktuelle Wert noch zum Auslöser passt
18
+ */
19
+ function isTriggerStateMatching(currentVal, configuredVal, tableId) {
20
+ if (tableId === 'tableTriggerTimes') {
21
+ return true;
22
+ }
23
+
24
+ // Andere Auslöser: `> 20`, `<= -5` usw.
25
+ if (tableId === 'tableTriggerDevices' && typeof configuredVal === 'string') {
26
+ const res = isNumComparatorMatching(currentVal, configuredVal);
27
+ if (res.isComparator) {
28
+ return !!res.result;
29
+ }
30
+ }
31
+
32
+ // wie main.js: lockerer Vergleich (!=), damit Zahl 1 und '1' zusammenpassen
33
+ if (configuredVal != undefined && configuredVal != currentVal) {
34
+ return false;
35
+ }
36
+ return true;
37
+ }
38
+
39
+ /**
40
+ * Zone-Option „nach Verzögerung nochmal prüfen“ – nur bei explizit true.
41
+ *
42
+ * Warum: Standard muss wie früher bleiben (Issue-Review #370). Alte Configs
43
+ * haben das Feld nicht → undefined zählt als aus.
44
+ *
45
+ * @param {unknown} zoneOption Wert der Zone-Spalte recheckAfterDelay
46
+ * @returns {boolean}
47
+ */
48
+ function isRecheckAfterDelayEnabled(zoneOption) {
49
+ return zoneOption === true;
50
+ }
51
+
52
+ /**
53
+ * Den aktuellen Auslöser-Datenpunkt nach der Wartezeit nochmal lesen?
54
+ *
55
+ * Warum: BWM und Toggle/Taster sind oft nur kurz true. Nach onAfter wäre
56
+ * der State schon wieder false – dann würde die Zone nie mehr angehen.
57
+ *
58
+ * @param {{ triggerIsMotion?: boolean, triggerIsToggle?: boolean, mimicMotion?: boolean, triggerIsTime?: boolean }} trigger
59
+ * @returns {boolean}
60
+ */
61
+ function shouldRecheckTriggerState(trigger) {
62
+ if (!trigger) {
63
+ return false;
64
+ }
65
+ // Impuls: Bewegung, Taster (isToggle), verknüpfter Schalter, Zeit ohne State
66
+ if (trigger.triggerIsMotion || trigger.triggerIsToggle || trigger.mimicMotion || trigger.triggerIsTime) {
67
+ return false;
68
+ }
69
+ return true;
70
+ }
71
+
72
+ module.exports = {
73
+ isTriggerStateMatching,
74
+ isRecheckAfterDelayEnabled,
75
+ shouldRecheckTriggerState,
76
+ };
package/main.js CHANGED
@@ -15,6 +15,7 @@
15
15
  // ioBroker Adapter core module
16
16
  const utils = require('@iobroker/adapter-core');
17
17
  const { MIDNIGHT_RESCHEDULE_DELAY_MS } = require('./lib/midnight-reschedule');
18
+ const { isTriggerStateMatching } = require('./lib/trigger-match');
18
19
 
19
20
  /**
20
21
  * Main Adapter Class
@@ -307,15 +308,20 @@ class SmartControl extends utils.Adapter {
307
308
  if ('isTargetURL' in lpRow) {
308
309
  continue;
309
310
  } // do not create states for TargetURLs, since we create separately anyway.
310
- if (/_enum-\d{1,3}$/.test(lpRow.name)) {
311
+ // jsonConfig legt neue Tabellenzeilen mit name:null an — .trim() würde crashen
312
+ const deviceName = lpRow.name == null ? '' : String(lpRow.name);
313
+ if (this.x.helper.isLikeEmpty(deviceName.trim())) {
314
+ continue;
315
+ }
316
+ if (/_enum-\d{1,3}$/.test(deviceName)) {
311
317
  continue;
312
318
  } // don't add enums
313
- const lpStatePath = `${this.namespace}.targetDevices.${lpRow.name.trim()}`;
319
+ const lpStatePath = `${this.namespace}.targetDevices.${deviceName.trim()}`;
314
320
  if (!this.x.helper.isStateIdValid(lpStatePath)) {
315
321
  throw `Invalid state name portion provided in table 'Target Devices': '${lpRow.name}'`;
316
322
  }
317
323
  const lpCommon = {
318
- name: lpRow.name,
324
+ name: deviceName,
319
325
  type: 'boolean',
320
326
  read: true,
321
327
  write: true,
@@ -430,11 +436,12 @@ class SmartControl extends utils.Adapter {
430
436
  const lpStateSubSection = lpTableName.substr(5); // 'tableTargetDevices' => 'TargetDevices'
431
437
 
432
438
  // Get the name of the table row and convert to a valid state portion.
433
- const lpRowNameStatePortion = lpRow.name; // like: 'Motion Bathroom' or 'At 04:05 every Sunday'
434
- if (this.x.helper.isLikeEmpty(lpRow.name.trim())) {
439
+ // jsonConfig: leere Zeile hat oft name:null — erst prüfen, dann trim (sonst Adapter-Crash).
440
+ const lpRowNameStatePortion = lpRow.name == null ? '' : String(lpRow.name);
441
+ if (this.x.helper.isLikeEmpty(lpRowNameStatePortion.trim())) {
435
442
  continue;
436
443
  } // We do not add rows with blank name
437
- if (lpTableName == 'tableTargetDevices' && /_enum-\d{1,3}$/.test(lpRow.name)) {
444
+ if (lpTableName == 'tableTargetDevices' && /_enum-\d{1,3}$/.test(lpRowNameStatePortion)) {
438
445
  continue;
439
446
  } // Don't add enums
440
447
 
@@ -618,9 +625,9 @@ class SmartControl extends utils.Adapter {
618
625
  this.x.schedules.midnight = this.x.mSchedule.scheduleJob('0 0 * * *', () => {
619
626
  // Nicht sofort re-schedulen: cancel() in derselben Sekunde verschluckt 00:00-Auslöser (#8).
620
627
  if (this.x.midnightRescheduleTimer) {
621
- clearTimeout(this.x.midnightRescheduleTimer);
628
+ this.clearTimeout(this.x.midnightRescheduleTimer);
622
629
  }
623
- this.x.midnightRescheduleTimer = setTimeout(() => {
630
+ this.x.midnightRescheduleTimer = this.setTimeout(() => {
624
631
  this.x.midnightRescheduleTimer = null;
625
632
  this._asyncOnReady_asyncScheduleTriggerTimes();
626
633
  if (this.x.systemConfig.latitude && this.x.systemConfig.longitude) {
@@ -662,14 +669,14 @@ class SmartControl extends utils.Adapter {
662
669
  }
663
670
 
664
671
  /**********************************
665
- * Verify the configuration from admin/index_m.html, once user hits the save button.
672
+ * Verify the configuration from jsonConfig (VerifyBar sendTo verifyConfig).
666
673
  *********************************/
667
674
  if (obj.command == 'verifyConfig') {
668
675
  this.log.debug(
669
- `[_asyncOnMessage] command 'Verify Adapter Configuration' received from admin/index_m.html. Verifying the configuration and sending the result back to index_m.html...`,
676
+ `[_asyncOnMessage] command 'Verify Adapter Configuration' received from admin. Verifying the configuration and sending the result back...`,
670
677
  );
671
678
 
672
- // Verify and send the result back to admin/index_m.html
679
+ // Verify and send the result back to admin (VerifyBar)
673
680
  const configVerificationResult = await this._asyncVerifyConfig(obj.message);
674
681
  this.sendTo(obj.from, obj.command, configVerificationResult, obj.callback);
675
682
  // Some log
@@ -685,6 +692,19 @@ class SmartControl extends utils.Adapter {
685
692
  }
686
693
  } catch (error) {
687
694
  this.x.helper.dumpError('[_asyncOnMessage()]', error);
695
+ // Ohne Antwort bleibt die Admin-UI stumm (kein Text, Speichern ggf. frei)
696
+ if (obj && obj.callback) {
697
+ this.sendTo(
698
+ obj.from,
699
+ obj.command,
700
+ {
701
+ passed: false,
702
+ obj: obj.message,
703
+ issues: [`Verify failed: ${error}`],
704
+ },
705
+ obj.callback,
706
+ );
707
+ }
688
708
  }
689
709
  }
690
710
 
@@ -1073,7 +1093,7 @@ class SmartControl extends utils.Adapter {
1073
1093
  this.x[lpTimerObjId][lpZoneRow.name],
1074
1094
  );
1075
1095
  if (lpTimeLeft > -1) {
1076
- clearTimeout(this.x[lpTimerObjId][lpZoneRow.name]);
1096
+ this.clearTimeout(this.x[lpTimerObjId][lpZoneRow.name]);
1077
1097
  this.x[lpTimerObjId][lpZoneRow.name] = null;
1078
1098
  timerCounter++;
1079
1099
  }
@@ -1158,7 +1178,7 @@ class SmartControl extends utils.Adapter {
1158
1178
  timersMotionOff: 'zone motion off-timer',
1159
1179
  });
1160
1180
  if (this.x.midnightRescheduleTimer) {
1161
- clearTimeout(this.x.midnightRescheduleTimer);
1181
+ this.clearTimeout(this.x.midnightRescheduleTimer);
1162
1182
  this.x.midnightRescheduleTimer = null;
1163
1183
  timeoutCounter++;
1164
1184
  }
@@ -1202,7 +1222,7 @@ class SmartControl extends utils.Adapter {
1202
1222
  const timeLeft = this.x.helper.getTimeoutTimeLeft(this.x[lpKey][timerName]);
1203
1223
  if (timeLeft > -1) {
1204
1224
  this.x.helper.logExtendedInfo(`Clearing currently running ${lpTimerTypeName}: ${timerName}`);
1205
- clearTimeout(this.x[lpKey][timerName]);
1225
+ this.clearTimeout(this.x[lpKey][timerName]);
1206
1226
  this.x[lpKey][timerName] = null;
1207
1227
  timeoutCounter++;
1208
1228
  }
@@ -1235,7 +1255,7 @@ class SmartControl extends utils.Adapter {
1235
1255
  this.log.debug(
1236
1256
  `Clearing zone motion off-timer '${lpZoneRow.name}' (${(timeLeft / 1000).toFixed(0)}s left) because motion on '${triggerName}'.`,
1237
1257
  );
1238
- clearTimeout(this.x.timersMotionOff[lpZoneRow.name]);
1258
+ this.clearTimeout(this.x.timersMotionOff[lpZoneRow.name]);
1239
1259
  this.x.timersMotionOff[lpZoneRow.name] = null;
1240
1260
  }
1241
1261
  }
@@ -1382,6 +1402,17 @@ class SmartControl extends utils.Adapter {
1382
1402
  }
1383
1403
 
1384
1404
  for (let i = 0; i < lpTable.table.length; i++) {
1405
+ // Leere Namenszeile (jsonConfig „+“) immer beanstanden — auch wenn die Checkbox aus ist.
1406
+ // Sonst gilt die Prüfung als grün, Speichern geht, und der Adapter crasht später an name.trim().
1407
+ if (
1408
+ functionConfigObj.tableId !== 'tableZoneExecution' &&
1409
+ this.x.helper.isLikeEmpty(lpTable.table[i].name)
1410
+ ) {
1411
+ issues.push(`[Config Table '${functionConfigObj.tableName}'] Row ${i + 1}: name is empty.`);
1412
+ errors++;
1413
+ continue;
1414
+ }
1415
+
1385
1416
  if (!lpTable.table[i].active && !configObject.validateDeactivatedRows) {
1386
1417
  continue;
1387
1418
  }
@@ -1405,7 +1436,7 @@ class SmartControl extends utils.Adapter {
1405
1436
 
1406
1437
  // +++++++ VALIDATION TYPE: a state path like "0_userdata.0.teststate" +++++++
1407
1438
  if (lpFcnConfigCheckObj.type == 'statePath') {
1408
- lpConfigString = lpConfigString.trim();
1439
+ lpConfigString = lpConfigString == null ? '' : String(lpConfigString).trim();
1409
1440
 
1410
1441
  if (this.x.helper.isLikeEmpty(lpConfigString) && lpFcnConfigCheckObj.optional) {
1411
1442
  // Skip if empty state and field is optional
@@ -1413,10 +1444,26 @@ class SmartControl extends utils.Adapter {
1413
1444
  }
1414
1445
 
1415
1446
  // Special treatment for tableTriggerDevices, User States
1447
+ // Gespeichert wird der Kurzname; der Adapter legt den State beim Start an.
1416
1448
  if (isUserState) {
1417
- if (!lpConfigString.startsWith(`${this.namespace}.userstates.`)) {
1418
- lpConfigString = `${this.namespace}.userstates.${lpConfigString}`;
1449
+ const userPrefix = `${this.namespace}.userstates.`;
1450
+ let shortName = lpConfigString;
1451
+ if (lpConfigString.startsWith(userPrefix)) {
1452
+ shortName = lpConfigString.slice(userPrefix.length);
1419
1453
  }
1454
+ // Objekt-IDs (mit Punkten) dürfen nicht hinter userstates. gehängt werden.
1455
+ if (this.x.helper.isLikeEmpty(shortName) || shortName.includes('.')) {
1456
+ issues.push(
1457
+ `[Config Table '${functionConfigObj.tableName}'] SC-Userstate: in State only the short name under ${userPrefix} (no object path). You set '${lpConfigString}'.`,
1458
+ );
1459
+ if (lpFcnConfigCheckObj.deactivateIfError) {
1460
+ lpTable.table[i].active = false;
1461
+ rowActiveStatus[i] = false;
1462
+ }
1463
+ errors++;
1464
+ continue;
1465
+ }
1466
+ lpConfigString = `${userPrefix}${shortName}`;
1420
1467
  }
1421
1468
 
1422
1469
  if (!this.x.helper.isStateIdValid(lpConfigString)) {
@@ -1453,6 +1500,25 @@ class SmartControl extends utils.Adapter {
1453
1500
 
1454
1501
  // +++++++ VALIDATION TYPE: stateValue -- a value to be set to a certain state +++++++
1455
1502
  } else if (lpFcnConfigCheckObj.type == 'stateValue') {
1503
+ // User-States existieren erst nach Speichern + Adapter-Start — nicht gegen ioBroker prüfen.
1504
+ if (isUserState) {
1505
+ const parsed = this.x.helper.parseBooleanStateVal(lpConfigString);
1506
+ if (parsed.ok) {
1507
+ configObject[functionConfigObj.tableId][i][lpFcnConfigCheckObj.id] =
1508
+ parsed.value;
1509
+ } else if (this.x.helper.isLikeEmpty(lpConfigString)) {
1510
+ issues.push(
1511
+ `[Config Table '${functionConfigObj.tableName}'] State value is empty.`,
1512
+ );
1513
+ if (lpFcnConfigCheckObj.deactivateIfError) {
1514
+ lpTable.table[i].active = false;
1515
+ rowActiveStatus[i] = false;
1516
+ }
1517
+ errors++;
1518
+ }
1519
+ continue;
1520
+ }
1521
+
1456
1522
  const lpStatePath = lpTable.table[i][lpFcnConfigCheckObj.stateValueStatePath];
1457
1523
  const lpStateVal = lpConfigString;
1458
1524
  const lpIsOptional = lpFcnConfigCheckObj.optional;
@@ -1505,7 +1571,8 @@ class SmartControl extends utils.Adapter {
1505
1571
 
1506
1572
  // +++++++ VALIDATION TYPE: targetURL Name +++++++
1507
1573
  } else if (lpFcnConfigCheckObj.type == 'targetURLname') {
1508
- const finalStateId = `${this.namespace}.targetURLs.${lpConfigString.trim()}`;
1574
+ const urlName = lpConfigString == null ? '' : String(lpConfigString).trim();
1575
+ const finalStateId = `${this.namespace}.targetURLs.${urlName}`;
1509
1576
 
1510
1577
  if (!this.x.helper.isStateIdValid(finalStateId)) {
1511
1578
  issues.push(
@@ -1576,13 +1643,13 @@ class SmartControl extends utils.Adapter {
1576
1643
  } else if (lpFcnConfigCheckObj.type == 'name') {
1577
1644
  let lpToCheck = lpTable.table[i][lpFcnConfigCheckObj.id];
1578
1645
 
1579
- // Trim
1646
+ // jsonConfig: leere Zellen sind null, kein String — .trim() würde crashen
1580
1647
  if (Array.isArray(lpToCheck)) {
1581
- for (let i = 0; i < lpToCheck.length; i++) {
1582
- lpToCheck[i] = lpToCheck[i].trim();
1648
+ for (let n = 0; n < lpToCheck.length; n++) {
1649
+ lpToCheck[n] = lpToCheck[n] == null ? '' : String(lpToCheck[n]).trim();
1583
1650
  }
1584
1651
  } else {
1585
- lpToCheck = lpToCheck.trim();
1652
+ lpToCheck = lpToCheck == null ? '' : String(lpToCheck).trim();
1586
1653
  }
1587
1654
 
1588
1655
  // Handle forbidden state path chars
@@ -1675,6 +1742,11 @@ class SmartControl extends utils.Adapter {
1675
1742
  'val',
1676
1743
  'delay',
1677
1744
  ]);
1745
+ // Leere Felder in jsonConfig = kein Override (wie in der alten UI gelöscht)
1746
+ if (!lpOverwriteObject) {
1747
+ delete configObject[functionConfigObj.tableId][i][lpFcnConfigCheckObj.id][name];
1748
+ continue;
1749
+ }
1678
1750
 
1679
1751
  // final object
1680
1752
  const finalObj = {};
@@ -1722,15 +1794,10 @@ class SmartControl extends utils.Adapter {
1722
1794
 
1723
1795
  // Finalize
1724
1796
  if (this.x.helper.isLikeEmpty(finalObj)) {
1725
- this.log.warn(
1726
- `Verifying Targets Overwrite - failed for '${name}' - no keys found.`,
1727
- );
1728
- errors++;
1797
+ delete configObject[functionConfigObj.tableId][i][lpFcnConfigCheckObj.id][name];
1729
1798
  continue;
1730
- } else {
1731
- configObject[functionConfigObj.tableId][i][lpFcnConfigCheckObj.id][name] =
1732
- finalObj;
1733
1799
  }
1800
+ configObject[functionConfigObj.tableId][i][lpFcnConfigCheckObj.id][name] = finalObj;
1734
1801
  }
1735
1802
  }
1736
1803
  }
@@ -1800,19 +1867,38 @@ class SmartControl extends utils.Adapter {
1800
1867
  // { name:'Trigger Tables Motion/Other: State Paths', column:'stateId', rows:configObject.tableTriggerMotion.concat(configObject.tableTriggerDevices) },
1801
1868
  ];
1802
1869
  for (const lpCheckObj of uniqueCheckObjects) {
1803
- if (!this.x.helper.isLikeEmpty(lpCheckObj.rows)) {
1804
- const allValues = [];
1805
- for (const lpRow of lpCheckObj.rows) {
1806
- if (lpRow.active) {
1807
- allValues.push(lpRow[lpCheckObj.column]);
1808
- }
1870
+ if (this.x.helper.isLikeEmpty(lpCheckObj.rows)) {
1871
+ continue;
1872
+ }
1873
+ const allValues = [];
1874
+ for (const lpRow of lpCheckObj.rows) {
1875
+ if (!lpRow || !lpRow.active) {
1876
+ continue;
1809
1877
  }
1810
- if (!this.x.helper.isArrayUnique(allValues)) {
1811
- issues.push(
1812
- `${lpCheckObj.name} must be unique. You cannot use same string more than once here.`,
1813
- );
1814
- errors++;
1878
+ const raw = lpRow[lpCheckObj.column];
1879
+ // Leere Namen kommen schon in der Zeilenprüfung; Unique nur fuer echte Texte.
1880
+ if (this.x.helper.isLikeEmpty(raw)) {
1881
+ continue;
1882
+ }
1883
+ allValues.push(typeof raw === 'string' ? raw.trim() : raw);
1884
+ }
1885
+ if (!this.x.helper.isArrayUnique(allValues)) {
1886
+ const seen = {};
1887
+ const dupes = [];
1888
+ for (const val of allValues) {
1889
+ if (seen[val] && dupes.indexOf(val) === -1) {
1890
+ dupes.push(val);
1891
+ }
1892
+ seen[val] = true;
1815
1893
  }
1894
+ const extra =
1895
+ lpCheckObj.name.indexOf('Trigger') === 0
1896
+ ? ' Names are shared across motion, other and time triggers.'
1897
+ : '';
1898
+ issues.push(
1899
+ `${lpCheckObj.name} must be unique. Duplicate: ${dupes.map(d => `'${d}'`).join(', ')}.${extra}`,
1900
+ );
1901
+ errors++;
1816
1902
  }
1817
1903
  }
1818
1904
 
@@ -1849,7 +1935,8 @@ class SmartControl extends utils.Adapter {
1849
1935
  }
1850
1936
  }
1851
1937
 
1852
- if (this.x.helper.isLikeEmpty(statePath.trim()) || (this.x.helper.isLikeEmpty(stateVal) && isOptional)) {
1938
+ const pathStr = statePath == null ? '' : String(statePath);
1939
+ if (this.x.helper.isLikeEmpty(pathStr.trim()) || (this.x.helper.isLikeEmpty(stateVal) && isOptional)) {
1853
1940
  // Skip if empty and if is optional.
1854
1941
  // We also check if the state path is empty.
1855
1942
  return { validationFailed: false, newStateVal: '' };
@@ -2227,30 +2314,13 @@ class SmartControl extends utils.Adapter {
2227
2314
 
2228
2315
  /**
2229
2316
  * Verify if state value that was set matches with the config
2317
+ * (gleiche Hilfsfunktion wie Nachprüfung nach Zone-onAfter, Issue #4)
2230
2318
  */
2231
- // Check for >=, <=, >, <, !=/<> and number, so like '>= 3', '<7'
2232
- let comparatorSuccess = false;
2233
- if (trigger.triggerTableId == 'tableTriggerDevices' && typeof trigger.triggerStateVal == 'string') {
2234
- const res = this.x.helper.isNumComparatorMatching(stateObject.val, trigger.triggerStateVal);
2235
- if (res.isComparator && res.result) {
2236
- comparatorSuccess = true;
2237
- } else if (res.isComparator && !res.result) {
2238
- this.log.debug(
2239
- `Trigger '${lpTriggerName}' activated, but not meeting 'comparator' condition (trigger state val: '${trigger.triggerStateVal}'), therefore, we disregard the activation.`,
2240
- );
2241
- continue; // We go out since we have a comparator, but not matching
2242
- }
2243
- }
2244
- // Compare state value with config
2245
- if (
2246
- !comparatorSuccess &&
2247
- trigger.triggerStateVal != undefined &&
2248
- trigger.triggerStateVal != stateObject.val
2249
- ) {
2319
+ if (!isTriggerStateMatching(stateObject.val, trigger.triggerStateVal, trigger.triggerTableId)) {
2250
2320
  this.log.debug(
2251
2321
  `Trigger '${lpTriggerName}' activated, but not meeting conditions (triggerStateVal '${trigger.triggerStateVal}' != stateObject.val '${stateObject.val}' ), therefore, we disregard the activation.`,
2252
2322
  );
2253
- continue; // Go out since no match
2323
+ continue;
2254
2324
  }
2255
2325
 
2256
2326
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.smartcontrol",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
4
4
  "description": "Control devices smarter: by grouping, including triggers like motion, opening window, etc. and set target devices accordingly",
5
5
  "author": "Mic-M <iob.micm@gmail.com>",
6
6
  "contributors": [
@@ -30,9 +30,9 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@iobroker/adapter-core": "^3.4.3",
33
- "axios": "^1.6.8",
34
- "cron-parser": "^4.8.1",
35
- "node-schedule": "^2.1.1",
33
+ "axios": "^1.22.0",
34
+ "cron-parser": "^5.10.7",
35
+ "node-schedule": "^2.1.2",
36
36
  "suncalc2": "^1.8.1"
37
37
  },
38
38
  "devDependencies": {
@@ -40,25 +40,13 @@
40
40
  "@alcalzone/release-script-plugin-iobroker": "^5.2.0",
41
41
  "@alcalzone/release-script-plugin-license": "^5.2.2",
42
42
  "@alcalzone/release-script-plugin-manual-review": "^5.2.0",
43
+ "@iobroker/adapter-dev": "^1.5.0",
43
44
  "@iobroker/eslint-config": "^2.3.4",
44
45
  "@iobroker/testing": "^6.3.4",
45
46
  "@tsconfig/node22": "^22.0.7",
46
- "@types/chai": "^4.3.11",
47
- "@types/chai-as-promised": "^7.1.8",
48
- "@types/gulp": "^4.0.17",
49
- "@types/jquery": "^3.5.32",
50
- "@types/mocha": "^10.0.6",
51
- "@types/node": "^20.14.9",
47
+ "@types/node": "^20.19.43",
52
48
  "@types/proxyquire": "^1.3.31",
53
- "@types/sinon": "^10.0.16",
54
- "@types/sinon-chai": "^3.2.12",
55
- "chai": "^4.5.0",
56
- "chai-as-promised": "^7.1.2",
57
- "gulp": "^4.0.2",
58
- "mocha": "^12.0.3",
59
- "proxyquire": "^2.1.3",
60
- "sinon": "^15.2.0",
61
- "sinon-chai": "^3.7.0"
49
+ "proxyquire": "^2.1.3"
62
50
  },
63
51
  "main": "main.js",
64
52
  "files": [
@@ -69,17 +57,19 @@
69
57
  "LICENSE"
70
58
  ],
71
59
  "scripts": {
72
- "test:js": "mocha --config test/mocharc.custom.json \"{!(node_modules|test)/**/*.test.js,*.test.js,test/**/test!(PackageFiles|Startup).js}\"",
60
+ "test:js": "mocha --config test/mocharc.custom.json \"{!(node_modules|src-admin|test)/**/*.test.js,*.test.js,test/**/test!(PackageFiles|Startup).js}\"",
73
61
  "test:package": "mocha test/package --exit",
74
62
  "test:unit": "npm run test:js",
75
63
  "test:integration": "mocha test/integration --exit",
76
64
  "test": "npm run test:js && npm run test:package",
77
65
  "lint": "eslint -c eslint.config.mjs .",
66
+ "build:admin": "npm --prefix src-admin install && npm --prefix src-admin run build && node scripts/copy-admin-custom.js",
78
67
  "release": "release-script",
79
68
  "release-patch": "release-script patch --yes --no-update-lockfile",
80
69
  "release-minor": "release-script minor --yes --no-update-lockfile",
81
70
  "release-major": "release-script major --yes --no-update-lockfile",
82
- "update-packages": "ncu --upgrade && cd src && ncu --upgrade && cd .."
71
+ "update-packages": "ncu --upgrade && npm --prefix src-admin exec -- ncu --upgrade",
72
+ "translate": "translate-adapter"
83
73
  },
84
74
  "bugs": {
85
75
  "url": "https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/issues"
package/admin/admin.d.ts DELETED
@@ -1,4 +0,0 @@
1
- declare let systemDictionary: Record<string, Record<string, string>>;
2
- declare var $: any; // for jQuerys like $('.collapsible').collapsible()
3
- declare function values2table(any, any, any, any): any; // Quick and dirty
4
- declare function table2values(any): any; // Quick and dirty
@@ -1,24 +0,0 @@
1
- github-markdown-css v5.8.1
2
- https://github.com/sindresorhus/github-markdown-css
3
-
4
- MIT License
5
-
6
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
7
-
8
- Permission is hereby granted, free of charge, to any person obtaining a copy
9
- of this software and associated documentation files (the "Software"), to deal
10
- in the Software without restriction, including without limitation the rights
11
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- copies of the Software, and to permit persons to whom the Software is
13
- furnished to do so, subject to the following conditions:
14
-
15
- The above copyright notice and this permission notice shall be included in all
16
- copies or substantial portions of the Software.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
- SOFTWARE.
@@ -1,8 +0,0 @@
1
- /**
2
- * Minified by jsDelivr using clean-css v5.3.3.
3
- * Original file: /npm/github-markdown-css@5.8.1/github-markdown-dark.css
4
- *
5
- * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6
- */
7
- .markdown-body{color-scheme:dark;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;color:#f0f6fc;background-color:#0d1117;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:' ';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none!important}.markdown-body a{background-color:transparent;color:#4493f8;text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:600}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:600;padding-bottom:.3em;font-size:2em;border-bottom:1px solid #3d444db3}.markdown-body mark{background-color:#bb800926;color:#f0f6fc}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-.25em}.markdown-body sup{top:-.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em 2.5rem}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:0 0;border-bottom:1px solid #3d444db3;height:.25em;padding:0;margin:1.5rem 0;background-color:#3d444d;border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:#9198a1;opacity:1}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body [role=button]:focus,.markdown-body a:focus,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=radio]:focus{outline:2px solid #1f6feb;outline-offset:-2px;box-shadow:none}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body [role=button]:focus-visible,.markdown-body a:focus-visible,.markdown-body input[type=checkbox]:focus-visible,.markdown-body input[type=radio]:focus-visible{outline:2px solid #1f6feb;outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:.25rem;font:11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;line-height:10px;color:#f0f6fc;vertical-align:middle;background-color:#151b23;border:solid 1px #3d444db3;border-bottom-color:#3d444db3;border-radius:6px;box-shadow:inset 0 -1px 0 #3d444db3}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:1.5rem;margin-bottom:1rem;font-weight:600;line-height:1.25}.markdown-body h2{font-weight:600;padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid #3d444db3}.markdown-body h3{font-weight:600;font-size:1.25em}.markdown-body h4{font-weight:600;font-size:1em}.markdown-body h5{font-weight:600;font-size:.875em}.markdown-body h6{font-weight:600;font-size:.85em;color:#9198a1}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:#9198a1;border-left:.25em solid #3d444d}.markdown-body ol,.markdown-body ul{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code,.markdown-body samp,.markdown-body tt{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible!important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-inner-spin-button,.markdown-body input::-webkit-outer-spin-button{margin:0;appearance:none}.markdown-body .mr-2{margin-right:.5rem!important}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:#f85149}.markdown-body .anchor{float:left;padding-right:.25rem;margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:0}.markdown-body blockquote,.markdown-body details,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:1rem}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#f0f6fc;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 code,.markdown-body h1 tt,.markdown-body h2 code,.markdown-body h2 tt,.markdown-body h3 code,.markdown-body h3 tt,.markdown-body h4 code,.markdown-body h4 tt,.markdown-body h5 code,.markdown-body h5 tt,.markdown-body h6 code,.markdown-body h6 tt{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ol.no-list,.markdown-body ul.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:1rem}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:1rem;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 1rem;margin-bottom:1rem}.markdown-body table th{font-weight:600}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #3d444d}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:#0d1117;border-top:1px solid #3d444db3}.markdown-body table tr:nth-child(2n){background-color:#151b23}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid #3d444d}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:#f0f6fc}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:#656c7633;border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:1rem}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:1rem;overflow:auto;font-size:85%;line-height:1.45;color:#f0f6fc;background-color:#151b23;border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px .5rem 9px;text-align:right;background:#0d1117;border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:600;background:#151b23;border-top:0}.markdown-body [data-footnote-ref]::before{content:"["}.markdown-body [data-footnote-ref]::after{content:"]"}.markdown-body .footnotes{font-size:12px;color:#9198a1;border-top:1px solid #3d444d}.markdown-body .footnotes ol{padding-left:1rem}.markdown-body .footnotes ol ul{display:inline-block;padding-left:1rem;margin-top:1rem}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target::before{position:absolute;top:calc(.5rem*-1);right:calc(.5rem*-1);bottom:calc(.5rem*-1);left:calc(1.5rem*-1);pointer-events:none;content:"";border:2px solid #1f6feb;border-radius:6px}.markdown-body .footnotes li:target{color:#f0f6fc}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body body:has(:modal){padding-right:var(--dialog-scrollgutter)!important}.markdown-body .pl-c{color:#9198a1}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:#79c0ff}.markdown-body .pl-e,.markdown-body .pl-en{color:#d2a8ff}.markdown-body .pl-s .pl-s1,.markdown-body .pl-smi{color:#f0f6fc}.markdown-body .pl-ent{color:#7ee787}.markdown-body .pl-k{color:#ff7b72}.markdown-body .pl-pds,.markdown-body .pl-s,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre{color:#a5d6ff}.markdown-body .pl-smw,.markdown-body .pl-v{color:#ffa657}.markdown-body .pl-bu{color:#f85149}.markdown-body .pl-ii{color:#f0f6fc;background-color:#8e1519}.markdown-body .pl-c2{color:#f0f6fc;background-color:#b62324}.markdown-body .pl-sr .pl-cce{font-weight:700;color:#7ee787}.markdown-body .pl-ml{color:#f2cc60}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:700;color:#1f6feb}.markdown-body .pl-mi{font-style:italic;color:#f0f6fc}.markdown-body .pl-mb{font-weight:700;color:#f0f6fc}.markdown-body .pl-md{color:#ffdcd7;background-color:#67060c}.markdown-body .pl-mi1{color:#aff5b4;background-color:#033a16}.markdown-body .pl-mc{color:#ffdfb6;background-color:#5a1e02}.markdown-body .pl-mi2{color:#f0f6fc;background-color:#1158c7}.markdown-body .pl-mdr{font-weight:700;color:#d2a8ff}.markdown-body .pl-ba{color:#9198a1}.markdown-body .pl-sg{color:#3d444d}.markdown-body .pl-corl{text-decoration:underline;color:#a5d6ff}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible){outline:0;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:0}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1em;font-style:normal!important;font-weight:400;line-height:1;vertical-align:-.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:400}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:.25rem}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:focus-within .task-list-item-convert-container,.markdown-body .contains-task-list:hover .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:.5rem 1rem;margin-bottom:1rem;color:inherit;border-left:.25em solid #3d444d}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:500;align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:#1f6feb}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:#4493f8}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:#8957e5}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:#ab7df8}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:#9e6a03}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:#d29922}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:#238636}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:#3fb950}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:#da3633}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:#f85149}.markdown-body>:first-child>.heading-element:first-child{margin-top:0!important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}
8
- /*# sourceMappingURL=/sm/592af565bacbdfcf289ac34923b98a8e2d3270ca11c381725acd712f6fb1d467.map */