@switchbot/homebridge-switchbot 4.3.2-beta.2 → 4.3.2-beta.4

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 (111) hide show
  1. package/dist/device/airpurifier.d.ts +54 -0
  2. package/dist/device/airpurifier.d.ts.map +1 -0
  3. package/dist/device/airpurifier.js +527 -0
  4. package/dist/device/airpurifier.js.map +1 -0
  5. package/dist/device/blindtilt.d.ts.map +1 -1
  6. package/dist/device/blindtilt.js +2 -8
  7. package/dist/device/blindtilt.js.map +1 -1
  8. package/dist/device/bot.d.ts.map +1 -1
  9. package/dist/device/bot.js +2 -8
  10. package/dist/device/bot.js.map +1 -1
  11. package/dist/device/ceilinglight.d.ts.map +1 -1
  12. package/dist/device/ceilinglight.js +2 -8
  13. package/dist/device/ceilinglight.js.map +1 -1
  14. package/dist/device/colorbulb.d.ts.map +1 -1
  15. package/dist/device/colorbulb.js +2 -8
  16. package/dist/device/colorbulb.js.map +1 -1
  17. package/dist/device/contact.d.ts.map +1 -1
  18. package/dist/device/contact.js +1 -4
  19. package/dist/device/contact.js.map +1 -1
  20. package/dist/device/curtain.d.ts.map +1 -1
  21. package/dist/device/curtain.js +2 -8
  22. package/dist/device/curtain.js.map +1 -1
  23. package/dist/device/fan.d.ts.map +1 -1
  24. package/dist/device/fan.js +2 -8
  25. package/dist/device/fan.js.map +1 -1
  26. package/dist/device/hub.d.ts.map +1 -1
  27. package/dist/device/hub.js +1 -4
  28. package/dist/device/hub.js.map +1 -1
  29. package/dist/device/humidifier.d.ts.map +1 -1
  30. package/dist/device/humidifier.js +2 -8
  31. package/dist/device/humidifier.js.map +1 -1
  32. package/dist/device/iosensor.d.ts.map +1 -1
  33. package/dist/device/iosensor.js +1 -4
  34. package/dist/device/iosensor.js.map +1 -1
  35. package/dist/device/lightstrip.d.ts.map +1 -1
  36. package/dist/device/lightstrip.js +2 -8
  37. package/dist/device/lightstrip.js.map +1 -1
  38. package/dist/device/lock.d.ts.map +1 -1
  39. package/dist/device/lock.js +2 -8
  40. package/dist/device/lock.js.map +1 -1
  41. package/dist/device/meter.d.ts.map +1 -1
  42. package/dist/device/meter.js +1 -4
  43. package/dist/device/meter.js.map +1 -1
  44. package/dist/device/meterplus.d.ts.map +1 -1
  45. package/dist/device/meterplus.js +1 -4
  46. package/dist/device/meterplus.js.map +1 -1
  47. package/dist/device/meterpro.d.ts.map +1 -1
  48. package/dist/device/meterpro.js +3 -5
  49. package/dist/device/meterpro.js.map +1 -1
  50. package/dist/device/motion.d.ts.map +1 -1
  51. package/dist/device/motion.js +1 -4
  52. package/dist/device/motion.js.map +1 -1
  53. package/dist/device/plug.d.ts.map +1 -1
  54. package/dist/device/plug.js +2 -8
  55. package/dist/device/plug.js.map +1 -1
  56. package/dist/device/relayswitch.d.ts.map +1 -1
  57. package/dist/device/relayswitch.js +2 -8
  58. package/dist/device/relayswitch.js.map +1 -1
  59. package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
  60. package/dist/device/robotvacuumcleaner.js +2 -8
  61. package/dist/device/robotvacuumcleaner.js.map +1 -1
  62. package/dist/device/waterdetector.d.ts.map +1 -1
  63. package/dist/device/waterdetector.js +1 -4
  64. package/dist/device/waterdetector.js.map +1 -1
  65. package/dist/irdevice/airpurifier.d.ts +1 -1
  66. package/dist/irdevice/airpurifier.d.ts.map +1 -1
  67. package/dist/irdevice/airpurifier.js +4 -4
  68. package/dist/irdevice/airpurifier.js.map +1 -1
  69. package/dist/platform.d.ts +2 -1
  70. package/dist/platform.d.ts.map +1 -1
  71. package/dist/platform.js +68 -7
  72. package/dist/platform.js.map +1 -1
  73. package/docs/assets/main.js +5 -5
  74. package/docs/assets/navigation.js +1 -0
  75. package/docs/assets/search.js +1 -0
  76. package/docs/assets/style.css +251 -229
  77. package/docs/hierarchy.html +1 -0
  78. package/docs/index.html +18 -19
  79. package/docs/modules.html +1 -2
  80. package/docs/variables/default.html +1 -0
  81. package/package.json +8 -10
  82. package/src/device/airpurifier.ts +563 -0
  83. package/src/device/blindtilt.ts +2 -6
  84. package/src/device/bot.ts +2 -6
  85. package/src/device/ceilinglight.ts +2 -6
  86. package/src/device/colorbulb.ts +2 -6
  87. package/src/device/contact.ts +1 -3
  88. package/src/device/curtain.ts +2 -6
  89. package/src/device/fan.ts +2 -6
  90. package/src/device/hub.ts +1 -3
  91. package/src/device/humidifier.ts +2 -6
  92. package/src/device/iosensor.ts +1 -3
  93. package/src/device/lightstrip.ts +2 -6
  94. package/src/device/lock.ts +2 -6
  95. package/src/device/meter.ts +2 -4
  96. package/src/device/meterplus.ts +1 -3
  97. package/src/device/meterpro.ts +3 -4
  98. package/src/device/motion.ts +1 -3
  99. package/src/device/plug.ts +2 -6
  100. package/src/device/relayswitch.ts +2 -6
  101. package/src/device/robotvacuumcleaner.ts +2 -6
  102. package/src/device/waterdetector.ts +1 -3
  103. package/src/irdevice/airpurifier.ts +4 -4
  104. package/src/platform.ts +78 -8
  105. package/typedoc.json +0 -4
  106. package/docs/assets/dmt/dmt-component-data.js +0 -1
  107. package/docs/assets/dmt/dmt-components.css +0 -20
  108. package/docs/assets/dmt/dmt-components.js +0 -67
  109. package/docs/assets/dmt/dmt-search.cmp +0 -0
  110. package/docs/assets/dmt/dmt-theme.css +0 -1
  111. package/docs/functions/default.html +0 -2
@@ -468,9 +468,7 @@ export class Curtain extends deviceBase {
468
468
  * Asks the SwitchBot API for the latest device information
469
469
  */
470
470
  async refreshStatus(): Promise<void> {
471
- if (!this.device.enableCloudService && this.OpenAPI) {
472
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
473
- } else if (this.BLE) {
471
+ if (this.BLE) {
474
472
  await this.BLERefreshStatus()
475
473
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
476
474
  await this.openAPIRefreshStatus()
@@ -585,9 +583,7 @@ export class Curtain extends deviceBase {
585
583
  * Pushes the requested changes to the SwitchBot API
586
584
  */
587
585
  async pushChanges(): Promise<void> {
588
- if (!this.device.enableCloudService && this.OpenAPI) {
589
- this.errorLog(`pushChanges enableCloudService: ${this.device.enableCloudService}`)
590
- } else if (this.BLE) {
586
+ if (this.BLE) {
591
587
  await this.BLEpushChanges()
592
588
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
593
589
  await this.openAPIpushChanges()
package/src/device/fan.ts CHANGED
@@ -306,9 +306,7 @@ export class Fan extends deviceBase {
306
306
  * Asks the SwitchBot API for the latest device information
307
307
  */
308
308
  async refreshStatus(): Promise<void> {
309
- if (!this.device.enableCloudService && this.OpenAPI) {
310
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
311
- } else if (this.BLE) {
309
+ if (this.BLE) {
312
310
  await this.BLERefreshStatus()
313
311
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
314
312
  await this.openAPIRefreshStatus()
@@ -429,9 +427,7 @@ export class Fan extends deviceBase {
429
427
  */
430
428
 
431
429
  async pushChanges(): Promise<void> {
432
- if (!this.device.enableCloudService && this.OpenAPI) {
433
- this.errorLog(`pushChanges enableCloudService: ${this.device.enableCloudService}`)
434
- } else if (this.BLE) {
430
+ if (this.BLE) {
435
431
  await this.BLEpushChanges()
436
432
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
437
433
  await this.openAPIpushChanges()
package/src/device/hub.ts CHANGED
@@ -273,9 +273,7 @@ export class Hub extends deviceBase {
273
273
  * Asks the SwitchBot API for the latest device information
274
274
  */
275
275
  async refreshStatus(): Promise<void> {
276
- if (!this.device.enableCloudService && this.OpenAPI) {
277
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
278
- } else if (this.BLE) {
276
+ if (this.BLE) {
279
277
  await this.BLERefreshStatus()
280
278
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
281
279
  await this.openAPIRefreshStatus()
@@ -303,9 +303,7 @@ export class Humidifier extends deviceBase {
303
303
  * Asks the SwitchBot API for the latest device information
304
304
  */
305
305
  async refreshStatus(): Promise<void> {
306
- if (!this.device.enableCloudService && this.OpenAPI) {
307
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
308
- } else if (this.BLE) {
306
+ if (this.BLE) {
309
307
  await this.BLERefreshStatus()
310
308
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
311
309
  await this.openAPIRefreshStatus()
@@ -417,9 +415,7 @@ export class Humidifier extends deviceBase {
417
415
  * Pushes the requested changes to the SwitchBot API
418
416
  */
419
417
  async pushChanges(): Promise<void> {
420
- if (!this.device.enableCloudService && this.OpenAPI) {
421
- this.errorLog(`pushChanges enableCloudService: ${this.device.enableCloudService}`)
422
- } else if (this.BLE) {
418
+ if (this.BLE) {
423
419
  await this.BLEpushChanges()
424
420
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
425
421
  await this.openAPIpushChanges()
@@ -267,9 +267,7 @@ export class IOSensor extends deviceBase {
267
267
  * Asks the SwitchBot API for the latest device information
268
268
  */
269
269
  async refreshStatus(): Promise<void> {
270
- if (!this.device.enableCloudService && this.OpenAPI) {
271
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
272
- } else if (this.BLE) {
270
+ if (this.BLE) {
273
271
  await this.BLERefreshStatus()
274
272
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
275
273
  await this.openAPIRefreshStatus()
@@ -305,9 +305,7 @@ export class StripLight extends deviceBase {
305
305
  * Asks the SwitchBot API for the latest device information
306
306
  */
307
307
  async refreshStatus(): Promise<void> {
308
- if (!this.device.enableCloudService && this.OpenAPI) {
309
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
310
- } else if (this.BLE) {
308
+ if (this.BLE) {
311
309
  await this.BLERefreshStatus()
312
310
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
313
311
  await this.openAPIRefreshStatus()
@@ -428,9 +426,7 @@ export class StripLight extends deviceBase {
428
426
  *
429
427
  */
430
428
  async pushChanges(): Promise<void> {
431
- if (!this.device.enableCloudService && this.OpenAPI) {
432
- this.errorLog(`pushChanges enableCloudService: ${this.device.enableCloudService}`)
433
- } else if (this.BLE) {
429
+ if (this.BLE) {
434
430
  await this.BLEpushChanges()
435
431
  if (this.LightBulb.On) {
436
432
  // Push Brightness Update
@@ -308,9 +308,7 @@ export class Lock extends deviceBase {
308
308
  * Asks the SwitchBot API for the latest device information
309
309
  */
310
310
  async refreshStatus(): Promise<void> {
311
- if (!this.device.enableCloudService && this.OpenAPI) {
312
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
313
- } else if (this.BLE) {
311
+ if (this.BLE) {
314
312
  await this.BLERefreshStatus()
315
313
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
316
314
  await this.openAPIRefreshStatus()
@@ -428,9 +426,7 @@ export class Lock extends deviceBase {
428
426
  * Lock - "command" "unlock" "default" = set to ???? state - LockCurrentState
429
427
  */
430
428
  async pushChanges(): Promise<void> {
431
- if (!this.device.enableCloudService && this.OpenAPI) {
432
- this.errorLog(`pushChanges enableCloudService: ${this.device.enableCloudService}`)
433
- } else if (this.BLE) {
429
+ if (this.BLE) {
434
430
  await this.BLEpushChanges()
435
431
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
436
432
  await this.openAPIpushChanges()
@@ -264,9 +264,7 @@ export class Meter extends deviceBase {
264
264
  * Asks the SwitchBot API for the latest device information
265
265
  */
266
266
  async refreshStatus(): Promise<void> {
267
- if (!this.device.enableCloudService && this.OpenAPI) {
268
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
269
- } else if (this.BLE) {
267
+ if (this.BLE) {
270
268
  await this.BLERefreshStatus()
271
269
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
272
270
  await this.openAPIRefreshStatus()
@@ -285,7 +283,7 @@ export class Meter extends deviceBase {
285
283
  // Start to monitor advertisement packets
286
284
  (async () => {
287
285
  // Start to monitor advertisement packets
288
- const serviceData = await this.monitorAdvertisementPackets(switchBotBLE) as meterServiceData
286
+ const serviceData = await this.monitorAdvertisementPackets(switchBotBLE) as unknown as meterServiceData
289
287
  // Update HomeKit
290
288
  if (serviceData.model === SwitchBotBLEModel.Meter && serviceData.modelName === SwitchBotBLEModelName.Meter) {
291
289
  this.serviceData = serviceData
@@ -268,9 +268,7 @@ export class MeterPlus extends deviceBase {
268
268
  * Asks the SwitchBot API for the latest device information
269
269
  */
270
270
  async refreshStatus(): Promise<void> {
271
- if (!this.device.enableCloudService && this.OpenAPI) {
272
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
273
- } else if (this.BLE) {
271
+ if (this.BLE) {
274
272
  await this.BLERefreshStatus()
275
273
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
276
274
  await this.openAPIRefreshStatus()
@@ -346,9 +346,7 @@ export class MeterPro extends deviceBase {
346
346
  * Asks the SwitchBot API for the latest device information
347
347
  */
348
348
  async refreshStatus(): Promise<void> {
349
- if (!this.device.enableCloudService && this.OpenAPI) {
350
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
351
- } else if (this.BLE) {
349
+ if (this.BLE) {
352
350
  await this.BLERefreshStatus()
353
351
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
354
352
  await this.openAPIRefreshStatus()
@@ -369,7 +367,8 @@ export class MeterPro extends deviceBase {
369
367
  // Start to monitor advertisement packets
370
368
  const serviceData = await this.monitorAdvertisementPackets(switchBotBLE) as meterProServiceData | meterProCO2ServiceData
371
369
  // Update HomeKit
372
- if (serviceData.model === SwitchBotBLEModel.MeterPro && serviceData.modelName === SwitchBotBLEModelName.MeterPro) {
370
+ if ((serviceData.model === SwitchBotBLEModel.MeterPro && serviceData.modelName === SwitchBotBLEModelName.MeterPro)
371
+ ?? (serviceData.model === SwitchBotBLEModel.MeterProCO2 && serviceData.modelName === SwitchBotBLEModelName.MeterProCO2)) {
373
372
  this.serviceData = serviceData
374
373
  if (serviceData !== undefined || serviceData !== null) {
375
374
  await this.BLEparseStatus()
@@ -239,9 +239,7 @@ export class Motion extends deviceBase {
239
239
  * Asks the SwitchBot API for the latest device information
240
240
  */
241
241
  async refreshStatus(): Promise<void> {
242
- if (!this.device.enableCloudService && this.OpenAPI) {
243
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
244
- } else if (this.BLE) {
242
+ if (this.BLE) {
245
243
  await this.BLERefreshStatus()
246
244
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
247
245
  await this.openAPIRefreshStatus()
@@ -163,9 +163,7 @@ export class Plug extends deviceBase {
163
163
  * Asks the SwitchBot API for the latest device information
164
164
  */
165
165
  async refreshStatus(): Promise<void> {
166
- if (!this.device.enableCloudService && this.OpenAPI) {
167
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
168
- } else if (this.BLE) {
166
+ if (this.BLE) {
169
167
  await this.BLERefreshStatus()
170
168
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
171
169
  await this.openAPIRefreshStatus()
@@ -287,9 +285,7 @@ export class Plug extends deviceBase {
287
285
  */
288
286
 
289
287
  async pushChanges(): Promise<void> {
290
- if (!this.device.enableCloudService && this.OpenAPI) {
291
- this.errorLog(`pushChanges enableCloudService: ${this.device.enableCloudService}`)
292
- } else if (this.BLE) {
288
+ if (this.BLE) {
293
289
  await this.BLEpushChanges()
294
290
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
295
291
  await this.openAPIpushChanges()
@@ -292,9 +292,7 @@ export class RelaySwitch extends deviceBase {
292
292
  * Asks the SwitchBot API for the latest device information
293
293
  */
294
294
  async refreshStatus(): Promise<void> {
295
- if (!this.device.enableCloudService && this.OpenAPI) {
296
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
297
- } else if (this.BLE) {
295
+ if (this.BLE) {
298
296
  await this.BLERefreshStatus()
299
297
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
300
298
  await this.openAPIRefreshStatus()
@@ -411,9 +409,7 @@ export class RelaySwitch extends deviceBase {
411
409
  * RelaySwitch "command" "turnOn" "default" = set to ON state
412
410
  */
413
411
  async pushChanges(): Promise<void> {
414
- if (!this.device.enableCloudService && this.OpenAPI) {
415
- this.errorLog(`pushChanges enableCloudService: ${this.device.enableCloudService}`)
416
- } else if (this.BLE) {
412
+ if (this.BLE) {
417
413
  await this.BLEpushChanges()
418
414
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
419
415
  await this.openAPIpushChanges()
@@ -252,9 +252,7 @@ export class RobotVacuumCleaner extends deviceBase {
252
252
  * Asks the SwitchBot API for the latest device information
253
253
  */
254
254
  async refreshStatus(): Promise<void> {
255
- if (!this.device.enableCloudService && this.OpenAPI) {
256
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
257
- } else if (this.BLE) {
255
+ if (this.BLE) {
258
256
  await this.BLERefreshStatus()
259
257
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
260
258
  await this.openAPIRefreshStatus()
@@ -373,9 +371,7 @@ export class RobotVacuumCleaner extends deviceBase {
373
371
  * Robot Vacuum Cleaner S1 "command" "PowLevel" "{0-3}" = set suction power level: 0 (Quiet), 1 (Standard), 2 (Strong), 3 (MAX)
374
372
  */
375
373
  async pushChanges(): Promise<void> {
376
- if (!this.device.enableCloudService && this.OpenAPI) {
377
- this.errorLog(`pushChanges enableCloudService: ${this.device.enableCloudService}`)
378
- } else if (this.BLE) {
374
+ if (this.BLE) {
379
375
  await this.BLEpushChanges()
380
376
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
381
377
  await this.openAPIpushChanges()
@@ -246,9 +246,7 @@ export class WaterDetector extends deviceBase {
246
246
  * Asks the SwitchBot API for the latest device information
247
247
  */
248
248
  async refreshStatus(): Promise<void> {
249
- if (!this.device.enableCloudService && this.OpenAPI) {
250
- this.errorLog(`refreshStatus enableCloudService: ${this.device.enableCloudService}`)
251
- } else if (this.BLE) {
249
+ if (this.BLE) {
252
250
  await this.BLERefreshStatus()
253
251
  } else if (this.OpenAPI && this.platform.config.credentials?.token) {
254
252
  await this.openAPIRefreshStatus()
@@ -15,7 +15,7 @@ import { irdeviceBase } from './irdevice.js'
15
15
  * An instance of this class is created for each accessory your platform registers
16
16
  * Each accessory may expose multiple services of different service types.
17
17
  */
18
- export class AirPurifier extends irdeviceBase {
18
+ export class AirPurifierIR extends irdeviceBase {
19
19
  // Services
20
20
  private AirPurifier: {
21
21
  Name: CharacteristicValue
@@ -111,13 +111,13 @@ export class AirPurifier extends irdeviceBase {
111
111
  async TargetAirPurifierStateSet(value: CharacteristicValue): Promise<void> {
112
112
  switch (value) {
113
113
  case this.hap.Characteristic.CurrentAirPurifierState.PURIFYING_AIR:
114
- this.CurrentMode = AirPurifier.PURIFYING_AIR
114
+ this.CurrentMode = AirPurifierIR.PURIFYING_AIR
115
115
  break
116
116
  case this.hap.Characteristic.CurrentAirPurifierState.IDLE:
117
- this.CurrentMode = AirPurifier.IDLE
117
+ this.CurrentMode = AirPurifierIR.IDLE
118
118
  break
119
119
  case this.hap.Characteristic.CurrentAirPurifierState.INACTIVE:
120
- this.CurrentMode = AirPurifier.INACTIVE
120
+ this.CurrentMode = AirPurifierIR.INACTIVE
121
121
  break
122
122
  default:
123
123
  break
package/src/platform.ts CHANGED
@@ -24,6 +24,7 @@ import { EveHomeKitTypes } from 'homebridge-lib/EveHomeKitTypes'
24
24
  import { LogLevel, SwitchBotBLE, SwitchBotModel, SwitchBotOpenAPI } from 'node-switchbot'
25
25
  import { queueScheduler } from 'rxjs'
26
26
 
27
+ import { AirPurifier } from './device/airpurifier.js'
27
28
  import { BlindTilt } from './device/blindtilt.js'
28
29
  import { Bot } from './device/bot.js'
29
30
  import { CeilingLight } from './device/ceilinglight.js'
@@ -45,7 +46,7 @@ import { RelaySwitch } from './device/relayswitch.js'
45
46
  import { RobotVacuumCleaner } from './device/robotvacuumcleaner.js'
46
47
  import { WaterDetector } from './device/waterdetector.js'
47
48
  import { AirConditioner } from './irdevice/airconditioner.js'
48
- import { AirPurifier } from './irdevice/airpurifier.js'
49
+ import { AirPurifierIR } from './irdevice/airpurifier.js'
49
50
  import { Camera } from './irdevice/camera.js'
50
51
  import { IRFan } from './irdevice/fan.js'
51
52
  import { Light } from './irdevice/light.js'
@@ -616,6 +617,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
616
617
  'Ceiling Light Pro': this.createCeilingLight.bind(this),
617
618
  'Strip Light': this.createStripLight.bind(this),
618
619
  'Battery Circulator Fan': this.createFan.bind(this),
620
+ 'Air Purifier PM2.5': this.createAirPurifier.bind(this),
619
621
  }
620
622
 
621
623
  if (deviceTypeHandlers[device.deviceType!]) {
@@ -649,8 +651,8 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
649
651
  'DIY Air Conditioner': this.createAirConditioner.bind(this),
650
652
  'Light': this.createLight.bind(this),
651
653
  'DIY Light': this.createLight.bind(this),
652
- 'Air Purifier': this.createAirPurifier.bind(this),
653
- 'DIY Air Purifier': this.createAirPurifier.bind(this),
654
+ 'Air Purifier': this.createAirPurifierIR.bind(this),
655
+ 'DIY Air Purifier': this.createAirPurifierIR.bind(this),
654
656
  'Water Heater': this.createWaterHeater.bind(this),
655
657
  'DIY Water Heater': this.createWaterHeater.bind(this),
656
658
  'Vacuum Cleaner': this.createVacuumCleaner.bind(this),
@@ -1891,6 +1893,68 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
1891
1893
  }
1892
1894
  }
1893
1895
 
1896
+ private async createAirPurifier(device: device & devicesConfig) {
1897
+ const uuid = this.api.hap.uuid.generate(`${device.deviceId}-${device.deviceType}`)
1898
+
1899
+ // see if an accessory with the same uuid has already been registered and restored from
1900
+ // the cached devices we stored in the `configureAccessory` method above
1901
+ const existingAccessory = this.accessories.find(accessory => accessory.UUID === uuid)
1902
+
1903
+ if (existingAccessory) {
1904
+ // the accessory already exists
1905
+ if (await this.registerDevice(device)) {
1906
+ // if you need to update the accessory.context then you should run `api.updatePlatformAccessories`. eg.:
1907
+ existingAccessory.context.device = device
1908
+ existingAccessory.context.deviceId = device.deviceId
1909
+ existingAccessory.context.deviceType = device.deviceType
1910
+ existingAccessory.context.model = SwitchBotModel.BatteryCirculatorFan
1911
+ existingAccessory.displayName = device.configDeviceName
1912
+ ? await this.validateAndCleanDisplayName(device.configDeviceName, 'configDeviceName', device.configDeviceName)
1913
+ : await this.validateAndCleanDisplayName(device.deviceName, 'deviceName', device.deviceName)
1914
+ existingAccessory.context.connectionType = await this.connectionType(device)
1915
+ existingAccessory.context.version = device.firmware ?? device.version ?? this.version ?? '0.0.0'
1916
+ this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} deviceId: ${device.deviceId}`)
1917
+ this.api.updatePlatformAccessories([existingAccessory])
1918
+ // create the accessory handler for the restored accessory
1919
+ // this is imported from `platformAccessory.ts`
1920
+ new AirPurifier(this, existingAccessory, device)
1921
+ this.debugLog(`${device.deviceType} uuid: ${device.deviceId}-${device.deviceType}, (${existingAccessory.UUID})`)
1922
+ } else {
1923
+ this.unregisterPlatformAccessories(existingAccessory)
1924
+ }
1925
+ } else if (await this.registerDevice(device)) {
1926
+ // create a new accessory
1927
+ const accessory = new this.api.platformAccessory(device.configDeviceName
1928
+ ? await this.validateAndCleanDisplayName(device.configDeviceName, 'configDeviceName', device.configDeviceName)
1929
+ : await this.validateAndCleanDisplayName(device.deviceName, 'deviceName', device.deviceName), uuid)
1930
+
1931
+ // store a copy of the device object in the `accessory.context`
1932
+ // the `context` property can be used to store any data about the accessory you may need
1933
+ accessory.context.device = device
1934
+ accessory.context.deviceId = device.deviceId
1935
+ accessory.context.deviceType = device.deviceType
1936
+ accessory.context.model = SwitchBotModel.BatteryCirculatorFan
1937
+ accessory.displayName = device.configDeviceName
1938
+ ? await this.validateAndCleanDisplayName(device.configDeviceName, 'configDeviceName', device.configDeviceName)
1939
+ : await this.validateAndCleanDisplayName(device.deviceName, 'deviceName', device.deviceName)
1940
+ accessory.context.connectionType = await this.connectionType(device)
1941
+ accessory.context.connectionType = await this.connectionType(device)
1942
+ accessory.context.version = device.firmware ?? device.version ?? this.version ?? '0.0.0'
1943
+ const newOrExternal = !device.external ? 'Adding new' : 'Loading external'
1944
+ this.infoLog(`${newOrExternal} accessory: ${accessory.displayName} deviceId: ${device.deviceId}`)
1945
+ // create the accessory handler for the newly create accessory
1946
+ // this is imported from `platformAccessory.ts`
1947
+ new AirPurifier(this, accessory, device)
1948
+ this.debugLog(`${device.deviceType} uuid: ${device.deviceId}-${device.deviceType}, (${accessory.UUID})`)
1949
+
1950
+ // publish device externally or link the accessory to your platform
1951
+ this.externalOrPlatform(device, accessory)
1952
+ this.accessories.push(accessory)
1953
+ } else {
1954
+ this.debugLog(`Device not registered: ${device.deviceName} ${device.deviceType} deviceId: ${device.deviceId}`)
1955
+ }
1956
+ }
1957
+
1894
1958
  private async createRobotVacuumCleaner(device: device & devicesConfig) {
1895
1959
  const uuid = this.api.hap.uuid.generate(`${device.deviceId}-${device.deviceType}`)
1896
1960
 
@@ -2207,7 +2271,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
2207
2271
  }
2208
2272
  }
2209
2273
 
2210
- private async createAirPurifier(device: irdevice & irDevicesConfig) {
2274
+ private async createAirPurifierIR(device: irdevice & irDevicesConfig) {
2211
2275
  const uuid = this.api.hap.uuid.generate(`${device.deviceId}-${device.remoteType}`)
2212
2276
 
2213
2277
  // see if an accessory with the same uuid has already been registered and restored from
@@ -2230,7 +2294,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
2230
2294
  this.api.updatePlatformAccessories([existingAccessory])
2231
2295
  // create the accessory handler for the restored accessory
2232
2296
  // this is imported from `platformAccessory.ts`
2233
- new AirPurifier(this, existingAccessory, device)
2297
+ new AirPurifierIR(this, existingAccessory, device)
2234
2298
  this.debugLog(`${device.remoteType} uuid: ${device.deviceId}-${device.remoteType}, (${existingAccessory.UUID})`)
2235
2299
  } else {
2236
2300
  this.unregisterPlatformAccessories(existingAccessory)
@@ -2256,7 +2320,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
2256
2320
  this.infoLog(`${newOrExternal} accessory: ${accessory.displayName} deviceId: ${device.deviceId}`)
2257
2321
  // create the accessory handler for the newly create accessory
2258
2322
  // this is imported from `platformAccessory.ts`
2259
- new AirPurifier(this, accessory, device)
2323
+ new AirPurifierIR(this, accessory, device)
2260
2324
  this.debugLog(`${device.remoteType} uuid: ${device.deviceId}-${device.remoteType}, (${accessory.UUID})`)
2261
2325
 
2262
2326
  // publish device externally or link the accessory to your platform
@@ -2685,7 +2749,6 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
2685
2749
  hubDeviceId: '',
2686
2750
  version: 0,
2687
2751
  deviceName: '',
2688
- enableCloudService: false,
2689
2752
  }, statusCode: 500 }
2690
2753
  }
2691
2754
 
@@ -2695,7 +2758,14 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
2695
2758
  const delayBetweenRetries = deviceDelayBetweenRetries ?? 1000
2696
2759
  while (retryCount < maxRetries) {
2697
2760
  try {
2698
- const { response, statusCode } = await this.switchBotAPI.controlDevice(device.deviceId, bodyChange.command, bodyChange.parameter, bodyChange.commandType, this.config.credentials?.token, this.config.credentials?.secret)
2761
+ const { response, statusCode } = await this.switchBotAPI.controlDevice(
2762
+ device.deviceId,
2763
+ bodyChange.command,
2764
+ bodyChange.parameter,
2765
+ bodyChange.commandType as import('node-switchbot').commandType,
2766
+ this.config.credentials?.token,
2767
+ this.config.credentials?.secret,
2768
+ )
2699
2769
  this.debugLog(`response: ${JSON.stringify(response)}`)
2700
2770
  return { response, statusCode }
2701
2771
  } catch (error: any) {
package/typedoc.json CHANGED
@@ -1,8 +1,4 @@
1
1
  {
2
- "plugin": [
3
- "@typhonjs-typedoc/typedoc-theme-dmt"
4
- ],
5
- "theme": "default-modern",
6
2
  "out": "docs",
7
3
  "exclude": ["src/**/*.spec.ts"],
8
4
  "entryPoints": [
@@ -1 +0,0 @@
1
- globalThis.dmtComponentDataBCMP = 'TZLBbhoxEIYNolKUZ+ghh17TsMtCNjeitJVQmxZVVe/GHlgLr72yvSG58Qj0ERIWdldNya0PQK+FUy+98Cw1sF1ysmc0v+cbz79BxzkjUnxgYqg3qJpqUDeMwCSJ7W2SR3gAHUHhdoMqaShpzEE/FufrwIT8aR90dBeToS1ePgl8wwbYMCkKYTULsRpSORKTuZaxIvBtg14kBm5NSqGPY26SCJvgZz8WZKvTZ0V61yEZMkHbM8Kx1n8QykjAOFUg7H3xGfocdpr3tmiDXt57+Uccgo4wgXs/eSvi8KHhZl+xYrjH4aHlZe+KLlPH9WdX21enbrOVd4QB1beyadNxv19ZCqNiYqRKnLrrZV0lI1DmLnHrnj+/BhNIOmu45y0/72JlW1r13G25judll4SA1lKlbv3i3Gm6+Ze7CC45wzr1nAuvUfdyCw52BgKp3/D9Vt3P3kgShyDMgb+2wz8q4U9K9Pae+/f4QL2qoOfQqyoqkVc1VACvjtCBdjVGJeka1RA6YK7RiQ1LxjVq23//D7hGY4R+aMCKBJ+i3b62O+7HnG/RlzPOQmaOFxqMYWJQllRyLFi4M8avhQ7k6HrvHOu+5aNmFHpYFTZEC21nsG7qKohA0L+vqCT6tK1HzJCgJ81ZIEPoKUYHcFom/wE=';
@@ -1,20 +0,0 @@
1
- label.svelte-1y7unmi{align-items:center;cursor:pointer;display:flex;-webkit-user-select:none;user-select:none;width:fit-content}input.svelte-1y7unmi{cursor:pointer;height:1.5em;opacity:0;position:absolute;width:1.5em}svg.svelte-1y7unmi{border-radius:.33em;cursor:pointer;height:1.5em;margin-right:.5em;opacity:.99;width:1.5em}
2
- section.svelte-20evnz{display:flex;flex-direction:column;gap:.5rem;margin-top:.75rem}
3
- details.svelte-1kxmj7q.svelte-1kxmj7q{margin-left:var(--tjs-folder-details-margin-left,-.4em);padding-left:var(--tjs-folder-details-padding-left,.4em)}summary.svelte-1kxmj7q.svelte-1kxmj7q{align-items:center;background:var(--tjs-folder-summary-background,none);background-blend-mode:var(--tjs-folder-summary-background-blend-mode,initial);border:var(--tjs-folder-summary-border,none);border-radius:var(--tjs-folder-summary-border-radius,0);border-width:var(--tjs-folder-summary-border-width,initial);cursor:var(--tjs-folder-summary-cursor,pointer);display:flex;font-family:var(--tjs-folder-summary-font-family,inherit);font-size:var(--tjs-folder-summary-font-size,inherit);font-weight:var(--tjs-folder-summary-font-weight,bold);gap:var(--tjs-folder-summary-gap,.125em);list-style:none;margin:var(--tjs-folder-summary-margin,0 0 0 -.4em);padding:var(--tjs-folder-summary-padding,.25em) 0;position:relative;transition:var(--tjs-folder-summary-transition,background .1s);-webkit-user-select:none;user-select:none;width:var(--tjs-folder-summary-width,fit-content)}summary.svelte-1kxmj7q.svelte-1kxmj7q::-webkit-details-marker{display:none}.default-cursor.svelte-1kxmj7q.svelte-1kxmj7q{cursor:default}summary.svelte-1kxmj7q svg.svelte-1kxmj7q{border-radius:var(--tjs-folder-summary-chevron-border-radius,0);color:var(--tjs-folder-summary-chevron-color,currentColor);cursor:var(--tjs-folder-summary-cursor,pointer);flex-shrink:0;height:var(--tjs-folder-summary-chevron-size,var(--tjs-folder-summary-font-size,1.25em));margin:var(--tjs-folder-summary-chevron-margin,0);opacity:var(--tjs-folder-summary-chevron-opacity,.2);transform:var(--tjs-folder-summary-chevron-rotate-closed,rotate(-90deg));transition:var(--tjs-folder-summary-chevron-transition,opacity .2s,transform .1s);width:var(--tjs-folder-summary-chevron-size,var(--tjs-folder-summary-font-size,1.25em))}summary.disabled.svelte-1kxmj7q.svelte-1kxmj7q{color:var(--tjs-folder-summary-disabled-color,inherit);cursor:var(--tjs-folder-summary-disabled-cursor,default)}summary.disabled.svelte-1kxmj7q svg.svelte-1kxmj7q{color:var(--tjs-folder-summary-disabled-color,currentColor);cursor:var(--tjs-folder-summary-disabled-cursor,default)}summary.svelte-1kxmj7q.svelte-1kxmj7q:focus-visible{box-shadow:var(--tjs-folder-summary-box-shadow-focus-visible,var(--tjs-default-box-shadow-focus-visible));outline:var(--tjs-folder-summary-outline-focus-visible,var(--tjs-default-outline-focus-visible,revert));transition:var(--tjs-folder-summary-transition-focus-visible,var(--tjs-default-transition-focus-visible))}summary.svelte-1kxmj7q:focus-visible .label.svelte-1kxmj7q{text-shadow:var(--tjs-folder-summary-label-text-shadow-focus-visible,var(--tjs-default-text-shadow-focus-hover,revert))}summary.svelte-1kxmj7q:focus-visible .tjs-folder-focus-indicator.svelte-1kxmj7q{background:var(--tjs-folder-summary-focus-indicator-background,var(--tjs-default-focus-indicator-background,#fff))}summary.svelte-1kxmj7q:focus-visible svg.svelte-1kxmj7q{opacity:var(--tjs-folder-summary-chevron-opacity-focus-visible,1)}summary.svelte-1kxmj7q:focus-visible svg.focus-chevron.svelte-1kxmj7q{outline:var(--tjs-folder-summary-outline-focus-visible,var(--tjs-default-outline-focus-visible,revert))}summary:focus-visible.remove-focus-visible.svelte-1kxmj7q.svelte-1kxmj7q{outline:none}summary.svelte-1kxmj7q:hover:not(.disabled) svg.svelte-1kxmj7q{opacity:var(--tjs-folder-summary-chevron-opacity-hover,1)}.tjs-folder-focus-indicator.svelte-1kxmj7q.svelte-1kxmj7q{align-self:var(--tjs-folder-summary-focus-indicator-align-self,var(--tjs-default-focus-indicator-align-self,stretch));border:var(--tjs-folder-summary-focus-indicator-border,var(--tjs-default-focus-indicator-border));border-radius:var(--tjs-folder-summary-focus-indicator-border-radius,var(--tjs-default-focus-indicator-border-radius,.1em));flex:0 0 var(--tjs-folder-summary-focus-indicator-width,var(--tjs-default-focus-indicator-width,0.25em));height:var(--tjs-folder-summary-focus-indicator-height,var(--tjs-default-focus-indicator-height));pointer-events:none;transition:var(--tjs-folder-summary-focus-indicator-transition,var(--tjs-default-focus-indicator-transition))}details[open].svelte-1kxmj7q>summary.svelte-1kxmj7q{background:var(--tjs-folder-summary-background-open,var(--tjs-folder-summary-background,inherit))}[open].svelte-1kxmj7q:not(details[data-closing=true])>summary svg.svelte-1kxmj7q{transform:rotate(var(--tjs-folder-summary-chevron-rotate-open,0))}.contents.svelte-1kxmj7q.svelte-1kxmj7q{background:var(--tjs-folder-contents-background,none);background-blend-mode:var(--tjs-folder-contents-background-blend-mode,initial);border:var(--tjs-folder-contents-border,none);border-left:var(--tjs-folder-contents-border-left,none);display:var(--tjs-folder-contents-display,flex);flex-direction:var(--tjs-folder-contents-flex-direction,column);gap:var(--tjs-folder-contents-gap);margin:var(--tjs-folder-contents-margin,0 0 0 -.4em);padding:var(--tjs-folder-contents-padding,0 0 0 calc(var(--tjs-folder-summary-font-size, 1em)*.8));position:relative}.contents.svelte-1kxmj7q.svelte-1kxmj7q:before{content:"";height:calc(100% + .65em);left:0;position:absolute;top:-.65em;width:0}.contents.hidden.svelte-1kxmj7q.svelte-1kxmj7q{display:none}.label.svelte-1kxmj7q.svelte-1kxmj7q{overflow:var(--tjs-folder-summary-label-overflow,hidden);text-overflow:var(--tjs-folder-summary-label-text-overflow,ellipsis);white-space:var(--tjs-folder-summary-label-white-space,nowrap);width:var(--tjs-folder-summary-label-width,fit-content)}summary.svelte-1kxmj7q:focus-visible+.contents.svelte-1kxmj7q:before{height:100%;top:0}
4
- details.svelte-ozx17m.svelte-ozx17m{margin-left:var(--tjs-folder-details-margin-left,-.4em);padding-left:var(--tjs-folder-details-padding-left,.4em)}summary.svelte-ozx17m.svelte-ozx17m{align-items:center;background:var(--tjs-folder-summary-background,none);background-blend-mode:var(--tjs-folder-summary-background-blend-mode,initial);border:var(--tjs-folder-summary-border,none);border-radius:var(--tjs-folder-summary-border-radius,0);border-width:var(--tjs-folder-summary-border-width,initial);cursor:var(--tjs-folder-summary-cursor,pointer);display:flex;font-family:var(--tjs-folder-summary-font-family,inherit);font-size:var(--tjs-folder-summary-font-size,inherit);font-weight:var(--tjs-folder-summary-font-weight,bold);gap:var(--tjs-folder-summary-gap,.125em);list-style:none;margin:var(--tjs-folder-summary-margin,0);padding:var(--tjs-folder-summary-padding,.25em) 0;position:relative;transition:var(--tjs-folder-summary-transition,background .1s);-webkit-user-select:none;user-select:none;width:var(--tjs-folder-summary-width,fit-content)}summary.svelte-ozx17m.svelte-ozx17m::-webkit-details-marker{display:none}summary.svelte-ozx17m i.svelte-ozx17m{border-radius:var(--tjs-folder-summary-chevron-border-radius,0);color:var(--tjs-folder-summary-chevron-color,inherit);cursor:var(--tjs-folder-summary-cursor,pointer);flex-shrink:0;margin:var(--tjs-folder-summary-chevron-margin,0 0 0 .25em);opacity:var(--tjs-folder-summary-chevron-opacity,1);transition:var(--tjs-folder-summary-chevron-transition,opacity .2s,transform .1s);width:var(--tjs-folder-summary-chevron-width,1.25em)}summary.disabled.svelte-ozx17m i.svelte-ozx17m,summary.disabled.svelte-ozx17m.svelte-ozx17m{color:var(--tjs-folder-summary-disabled-color,inherit);cursor:var(--tjs-folder-summary-disabled-cursor,default)}summary.svelte-ozx17m.svelte-ozx17m:focus-visible{box-shadow:var(--tjs-folder-summary-box-shadow-focus-visible,var(--tjs-default-box-shadow-focus-visible));outline:var(--tjs-folder-summary-outline-focus-visible,var(--tjs-default-outline-focus-visible,revert));transition:var(--tjs-folder-summary-transition-focus-visible,var(--tjs-default-transition-focus-visible))}summary.svelte-ozx17m:focus-visible .label.svelte-ozx17m{text-shadow:var(--tjs-folder-summary-label-text-shadow-focus-visible,var(--tjs-default-text-shadow-focus-hover,revert))}summary.svelte-ozx17m:focus-visible .tjs-folder-focus-indicator.svelte-ozx17m{background:var(--tjs-folder-summary-focus-indicator-background,var(--tjs-default-focus-indicator-background,#fff))}summary.svelte-ozx17m:focus-visible i.svelte-ozx17m{opacity:var(--tjs-folder-summary-chevron-opacity-focus-visible,1)}summary.svelte-ozx17m:focus-visible i.focus-chevron.svelte-ozx17m:before{outline:var(--tjs-folder-summary-outline-focus-visible,var(--tjs-default-outline-focus-visible,revert))}summary:focus-visible.remove-focus-visible.svelte-ozx17m.svelte-ozx17m{outline:none}summary.svelte-ozx17m:hover i.svelte-ozx17m{opacity:var(--tjs-folder-summary-chevron-opacity-hover,1)}.tjs-folder-focus-indicator.svelte-ozx17m.svelte-ozx17m{align-self:var(--tjs-folder-summary-focus-indicator-align-self,var(--tjs-default-focus-indicator-align-self,stretch));border:var(--tjs-folder-summary-focus-indicator-border,var(--tjs-default-focus-indicator-border));border-radius:var(--tjs-folder-summary-focus-indicator-border-radius,var(--tjs-default-focus-indicator-border-radius,.1em));flex:0 0 var(--tjs-folder-summary-focus-indicator-width,var(--tjs-default-focus-indicator-width,0.25em));height:var(--tjs-folder-summary-focus-indicator-height,var(--tjs-default-focus-indicator-height));pointer-events:none;transition:var(--tjs-folder-summary-focus-indicator-transition,var(--tjs-default-focus-indicator-transition))}.default-cursor.svelte-ozx17m.svelte-ozx17m{cursor:default}details[open].svelte-ozx17m>summary.svelte-ozx17m{background:var(--tjs-folder-summary-background-open,var(--tjs-folder-summary-background,inherit))}.contents.svelte-ozx17m.svelte-ozx17m{background:var(--tjs-folder-contents-background,none);background-blend-mode:var(--tjs-folder-contents-background-blend-mode,initial);border:var(--tjs-folder-contents-border,none);border-left:var(--tjs-folder-contents-border-left,none);display:var(--tjs-folder-contents-display,flex);flex-direction:var(--tjs-folder-contents-flex-direction,column);gap:var(--tjs-folder-contents-gap);margin:var(--tjs-folder-contents-margin,0 0 0 -.4em);padding:var(--tjs-folder-contents-padding,0 0 0 calc(var(--tjs-folder-summary-font-size, 1em)*.8));position:relative}.contents.svelte-ozx17m.svelte-ozx17m:before{content:"";height:calc(100% + .65em);left:0;position:absolute;top:-.65em;width:0}.contents.hidden.svelte-ozx17m.svelte-ozx17m{display:none}.label.svelte-ozx17m.svelte-ozx17m{overflow:var(--tjs-folder-summary-label-overflow,hidden);text-overflow:var(--tjs-folder-summary-label-text-overflow,ellipsis);white-space:var(--tjs-folder-summary-label-white-space,nowrap);width:var(--tjs-folder-summary-label-width,fit-content)}summary.svelte-ozx17m:focus-visible+.contents.svelte-ozx17m:before{height:100%;top:0}
5
- a.svelte-14yttr0{width:fit-content}a.svelte-14yttr0,span.svelte-14yttr0{margin-right:.25rem}span.svelte-14yttr0,svg.svelte-14yttr0{pointer-events:none}.indent-icon.svelte-14yttr0{margin-left:var(--dmt-nav-entry-indent-icon,28px)}.indent-no-icon.svelte-14yttr0{margin-left:var(--dmt-nav-entry-indent-no-icon,18px)}.indent-none.svelte-14yttr0{margin-left:.25rem}
6
- .dmt-navigation-tree.svelte-gftu0p{display:flex;flex-direction:column;--tjs-folder-summary-font-weight:normal;--tjs-folder-summary-font-size:1em;--tjs-folder-summary-margin:0;--tjs-folder-summary-padding:0;--tjs-folder-summary-width:100%;--tjs-folder-contents-margin:var(--dmt-nav-folder-contents-margin,0 0 0 7px);--tjs-folder-contents-border-left:var(--dmt-nav-folder-contents-border-left,2px solid var(--dmt-nav-folder-contents-border-color,#0003));--tjs-folder-contents-padding:var(--dmt-nav-folder-contents-padding,0 0 0 9px);overflow-x:auto;padding-left:var(--dmt-nav-tree-padding-left,3px);padding-top:var(--dmt-nav-tree-padding-top,.25rem);touch-action:pan-x pan-y}.dmt-navigation-tree.svelte-gftu0p:focus-visible{outline:#0000}.dmt-navigation-tree.svelte-gftu0p>:last-child{margin-bottom:var(--dmt-nav-tree-bottom-margin,.25rem)}
7
- hr.svelte-wwxcg7{border:unset;border-bottom:var(--dmt-container-border);margin:.25rem .5rem 0 0}section.svelte-wwxcg7{--tjs-folder-summary-margin:0 0.25rem;--tjs-folder-summary-width:100%;background:var(--dmt-container-background);border:var(--dmt-container-border);border-radius:var(--dmt-container-border-radius);box-shadow:var(--dmt-container-box-shadow);margin:0 1rem 0 0;padding-bottom:.25rem}
8
- a.svelte-gzwnip{display:block;overflow:var(--dmt-sidebarlinks-overflow,unset);text-overflow:var(--dmt-sidebarlinks-text-overflow,ellipsis);white-space:var(--dmt-sidebarlinks-white-space,normal)}section.dmt-sidebar-links.svelte-gzwnip{background:var(--dmt-container-background);border:var(--dmt-container-border);border-radius:var(--dmt-container-border-radius);box-shadow:var(--dmt-container-box-shadow);display:flex;flex-direction:column;gap:.25em;margin:0 1rem 0 0;padding:.25rem}section.dmt-sidebar-links.svelte-gzwnip:focus-visible{outline:#0000}
9
- div.svelte-1uxeem0{background:var(--dmt-overlay-panel-background);border-bottom:1px solid #0003;border-left:1px solid #0003;border-radius:0 0 .25rem .25rem;border-right:1px solid #0003;box-shadow:-.25rem 0 .25rem -.25rem var(--dmt-box-shadow-color),.25rem 0 .25rem -.25rem var(--dmt-box-shadow-color),0 .75rem .75rem -.75rem var(--dmt-box-shadow-color);display:flex;flex-direction:column;gap:.25rem;height:fit-content;padding:.5rem;position:absolute;top:2.6rem;width:calc(100% - 1.5rem)}span.svelte-1uxeem0{align-items:center;display:flex;gap:.5rem}svg.svelte-1uxeem0{margin:0}.key.svelte-1uxeem0{background:#ffffff40;border:1px solid #999;border-radius:.25rem;box-shadow:1px 1px var(--dmt-help-panel-key-box-shadow-color);min-width:52px;padding:0 3px;text-align:center}.reflection-kinds.svelte-1uxeem0{display:grid;grid-template-columns:1fr 1fr;grid-row-gap:.1rem}.title.svelte-1uxeem0{-webkit-text-decoration:underline;text-decoration:underline}:root[data-theme=dark]{--dmt-help-panel-key-box-shadow-color:#aaa}:root[data-theme=light]{--dmt-help-panel-key-box-shadow-color:#444}@media(prefers-color-scheme:dark){:root{--dmt-help-panel-key-box-shadow-color:#aaa}}@media(prefers-color-scheme:light){:root{--dmt-help-panel-key-box-shadow-color:#444}}
10
- button.svelte-1e7n8f7{background:#0000;border-radius:50%;cursor:pointer;height:2rem;line-height:0;width:2rem}section.svelte-1e7n8f7{align-items:center;background:var(--color-background);border-bottom:var(--dmt-container-border);display:flex;gap:.5rem;height:fit-content;padding:.25rem 1rem .25rem 0;position:sticky;top:0;width:inherit;z-index:10}section.svelte-1e7n8f7:focus-visible{outline:#0000}svg.svelte-1e7n8f7{height:1rem;width:1rem;fill:currentColor;stroke:currentColor;overflow:hidden}.flipped-vertical.svelte-1e7n8f7{transform:scaleY(-1)}
11
- section.svelte-13h1skr{--dmt-nav-tree-bottom-margin:1rem}
12
- button.svelte-10arjs8{background:#0000;border-radius:50%;cursor:pointer;height:33px;line-height:0;margin:0 3px 3px;width:33px}
13
- li.svelte-5rxzhp{align-items:center;background-color:var(--color-background);cursor:pointer;display:flex;gap:.25rem;overflow:hidden;padding:0 10px;text-overflow:ellipsis;transition:background .15s ease-in-out}li.selected.svelte-5rxzhp{background:var(--dmt-menu-item-background-selected)}li.svelte-5rxzhp:hover{background:var(--dmt-menu-item-background-hover)}li.svelte-5rxzhp:not(:last-child){border-bottom:var(--dmt-container-separator-border)}li.svelte-5rxzhp:nth-child(2n):not(:hover):not(.selected){background-color:var(--color-background-secondary)}ul.svelte-5rxzhp{border:var(--dmt-container-floating-border);border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem;box-shadow:var(--dmt-container-floating-box-shadow);list-style:none;margin:0 0 0 -4px;overflow:hidden;padding:0;position:absolute;top:calc(var(--dmt-header-height) - 2px);width:calc(100% - 4px)}
14
- #dmt-search-field.svelte-tuln0o,#tsd-search .field input{background:revert;border:1px solid var(--color-accent);border-radius:.5em;box-sizing:border-box;color:var(--color-text);font-size:16px;height:35px;opacity:1;outline:2px solid #0000;padding:revert;position:relative;right:4px;top:0;width:100%;z-index:10}
15
- div.svelte-wmon9h{box-sizing:border-box;line-height:0;padding:4px 0;position:absolute;right:-40px;width:40px}.dmt-widget.svelte-wmon9h{display:inline-block;height:40px;opacity:.8;overflow:hidden;transition:opacity .1s,background-color .2s;vertical-align:bottom}
16
- div.svelte-kjcljd{flex:0;height:0;width:0}div.svelte-kjcljd:focus{outline:none}
17
- section.svelte-1pcybcf.svelte-1pcybcf{background:var(--color-background);border:var(--dmt-container-border);border-radius:var(--dmt-container-border-radius);box-shadow:0 0 6px #000;height:max-content;left:50%;overflow:hidden;padding:.25rem;position:absolute;top:calc(100% + 10px);transform:translateX(-50%);width:max-content;z-index:1}div.svelte-1pcybcf.svelte-1pcybcf{align-items:center;display:flex;flex-direction:column;flex-wrap:nowrap;gap:.5rem}section.svelte-1pcybcf.svelte-1pcybcf:focus-visible{outline:2px solid #0000}a.svelte-1pcybcf.svelte-1pcybcf{align-items:center;display:flex;flex-shrink:0}a.svelte-1pcybcf:focus-visible img.svelte-1pcybcf{filter:brightness(1.5)}img.svelte-1pcybcf.svelte-1pcybcf{max-height:24px;width:auto}img.svelte-1pcybcf.svelte-1pcybcf:hover{filter:brightness(1.5)}
18
- button.svelte-1ebh1s9{background:#0000;border-radius:50%;cursor:pointer;height:33px;line-height:0;margin:1px 3px 0;width:33px}section.svelte-1ebh1s9{display:flex;margin-left:auto;min-width:fit-content;position:relative}svg.svelte-1ebh1s9{fill:var(--color-text)}
19
- a.svelte-1f93d1m.svelte-1f93d1m{align-items:center;display:flex;flex-shrink:0;margin:4px}a.svelte-1f93d1m:focus-visible img.svelte-1f93d1m{filter:brightness(1.5)}img.svelte-1f93d1m.svelte-1f93d1m{height:24px;width:auto}img.svelte-1f93d1m.svelte-1f93d1m:hover{filter:brightness(1.5)}section.svelte-1f93d1m.svelte-1f93d1m{align-items:center;display:flex;flex-wrap:nowrap;gap:.35rem;margin-left:auto;min-width:0;overflow:hidden}
20
- section.svelte-j9157o{align-items:center;display:flex;flex-wrap:nowrap;height:100%;margin-right:.5rem;width:100%}