node-red-contrib-knx-ultimate 7.1.4 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -10
- package/MIGRATION.md +40 -0
- package/README.md +32 -6
- package/docs/README.md +34 -0
- package/docs/assets/brand/made-in-italy.svg +12 -0
- package/examples/Alerter - Device Alert Aggregation.json +5 -2
- package/examples/Auto Responder - Read Request Defaults.json +5 -2
- package/examples/Garage - Door Controller.json +5 -2
- package/examples/Global Context - Expose KNX Values.json +5 -2
- package/examples/KNX DateTime - Set Date and Time to Bus.json +111 -89
- package/examples/Load Control - Manual Shedding Mode.json +5 -2
- package/examples/Logger ETS File and Telegram Count.json +10 -2
- package/examples/Scene Controller Recall and Save.json +33 -6
- package/examples/Staircase - Timer, Override and Block.json +5 -2
- package/examples/WatchDog Connect Disconnect.json +98 -70
- package/nodes/commonFunctions.js +0 -587
- package/nodes/knxUltimate-config.html +0 -14
- package/nodes/knxUltimate-config.js +1 -18
- package/nodes/knxUltimate.html +1 -6
- package/nodes/knxUltimateIoTBridge.html +0 -14
- package/nodes/knxUltimateLegacyMigration.js +75 -0
- package/nodes/knxUltimateMultiRouting.html +1 -7
- package/nodes/knxUltimateRouterFilter.html +1 -7
- package/nodes/knxUltimateUtility.html +0 -6
- package/nodes/knxUltimateViewer.html +0 -6
- package/nodes/locales/de/knxUltimate-config.html +0 -8
- package/nodes/locales/de/knxUltimate.html +0 -8
- package/nodes/locales/de/knxUltimateIoTBridge.html +0 -8
- package/nodes/locales/de/knxUltimateMultiRouting.html +0 -8
- package/nodes/locales/de/knxUltimateRouterFilter.html +0 -8
- package/nodes/locales/de/knxUltimateUtility.html +0 -8
- package/nodes/locales/de/knxUltimateUtility.json +16 -1
- package/nodes/locales/de/knxUltimateViewer.html +0 -8
- package/nodes/locales/en/knxUltimate-config.html +0 -8
- package/nodes/locales/en/knxUltimate.html +0 -8
- package/nodes/locales/en/knxUltimateIoTBridge.html +0 -8
- package/nodes/locales/en/knxUltimateMultiRouting.html +0 -8
- package/nodes/locales/en/knxUltimateRouterFilter.html +0 -8
- package/nodes/locales/en/knxUltimateUtility.html +0 -8
- package/nodes/locales/en/knxUltimateUtility.json +16 -1
- package/nodes/locales/en/knxUltimateViewer.html +0 -8
- package/nodes/locales/es/knxUltimate-config.html +0 -8
- package/nodes/locales/es/knxUltimate.html +0 -8
- package/nodes/locales/es/knxUltimateIoTBridge.html +0 -8
- package/nodes/locales/es/knxUltimateMultiRouting.html +0 -8
- package/nodes/locales/es/knxUltimateRouterFilter.html +0 -8
- package/nodes/locales/es/knxUltimateUtility.html +0 -8
- package/nodes/locales/es/knxUltimateUtility.json +17 -2
- package/nodes/locales/es/knxUltimateViewer.html +0 -8
- package/nodes/locales/fr/knxUltimate-config.html +0 -8
- package/nodes/locales/fr/knxUltimate.html +0 -8
- package/nodes/locales/fr/knxUltimateIoTBridge.html +0 -8
- package/nodes/locales/fr/knxUltimateMultiRouting.html +0 -8
- package/nodes/locales/fr/knxUltimateRouterFilter.html +0 -8
- package/nodes/locales/fr/knxUltimateUtility.html +0 -8
- package/nodes/locales/fr/knxUltimateUtility.json +16 -1
- package/nodes/locales/fr/knxUltimateViewer.html +0 -8
- package/nodes/locales/it/knxUltimate-config.html +0 -8
- package/nodes/locales/it/knxUltimate.html +0 -8
- package/nodes/locales/it/knxUltimateIoTBridge.html +0 -8
- package/nodes/locales/it/knxUltimateMultiRouting.html +0 -8
- package/nodes/locales/it/knxUltimateRouterFilter.html +0 -8
- package/nodes/locales/it/knxUltimateUtility.html +0 -8
- package/nodes/locales/it/knxUltimateUtility.json +16 -1
- package/nodes/locales/it/knxUltimateViewer.html +0 -8
- package/nodes/locales/zh-CN/knxUltimate-config.html +0 -8
- package/nodes/locales/zh-CN/knxUltimate.html +0 -8
- package/nodes/locales/zh-CN/knxUltimateIoTBridge.html +0 -8
- package/nodes/locales/zh-CN/knxUltimateMultiRouting.html +0 -8
- package/nodes/locales/zh-CN/knxUltimateRouterFilter.html +0 -8
- package/nodes/locales/zh-CN/knxUltimateUtility.html +0 -8
- package/nodes/locales/zh-CN/knxUltimateUtility.json +16 -1
- package/nodes/locales/zh-CN/knxUltimateViewer.html +0 -8
- package/nodes/plugins/knxUltimate-v8-migration-recovery-plugin.html +140 -0
- package/package.json +22 -69
- package/resources/11f26b4500.js +2 -2
- package/resources/KNXAIChatAdapterMappings.js +2 -416
- package/resources/configNodeEditorSelection.js +2 -32
- package/resources/hueControllerEditorSelection.js +2 -32
- package/resources/hueControllerMigrationDialog.js +2 -254
- package/resources/hueControllerProfiles.js +2 -9319
- package/resources/knxUtilityProfiles.js +2041 -2082
- package/resources/legacyMigrationNotice.js +23 -111
- package/resources/matterQrScanner.js +2 -98
- package/resources/upgradeToV8.js +94 -26
- package/scripts/check-legacy-flows.js +142 -0
- package/examples/Hue Area Motion - Zone Presence.json +0 -77
- package/examples/Hue Battery - Level Status.json +0 -77
- package/examples/Hue Button - Short and Dim Commands.json +0 -83
- package/examples/Hue Camera Motion - Presence.json +0 -77
- package/examples/Hue Config - Bridge Template.json +0 -27
- package/examples/Hue Contact Sensor - Open Closed.json +0 -75
- package/examples/Hue Device Software Update - Availability.json +0 -77
- package/examples/Hue Humidity Sensor - Relative Humidity.json +0 -77
- package/examples/Hue Light - Switch and Brightness.json +0 -67
- package/examples/Hue Light Sensor - Lux to KNX.json +0 -77
- package/examples/Hue Motion - Presence Sensor.json +0 -76
- package/examples/Hue Plug - Switch and State.json +0 -63
- package/examples/Hue Scene - Recall from KNX.json +0 -63
- package/examples/Hue Tap Dial - Relative Dimming.json +0 -76
- package/examples/Hue Temperature Sensor - Celsius to KNX.json +0 -77
- package/examples/Hue Zigbee Connectivity - Online Status.json +0 -77
- package/examples/Matter Controller - Semantic Flow Input.json +0 -248
- package/nodes/hue-config.html +0 -378
- package/nodes/hue-config.js +0 -846
- package/nodes/icons/node-alerter-icon.png +0 -0
- package/nodes/icons/node-homekit-icon.png +0 -0
- package/nodes/icons/node-homekit-icon.svg +0 -10
- package/nodes/icons/node-hue-icon.svg +0 -10
- package/nodes/icons/node-knx-icon.png +0 -0
- package/nodes/icons/node-logger-icon.png +0 -0
- package/nodes/icons/node-logger2-icon.png +0 -0
- package/nodes/icons/node-logger2-icon.svg +0 -32
- package/nodes/icons/node-matter-bridge-icon.svg +0 -6
- package/nodes/icons/node-matter-controller-icon.svg +0 -6
- package/nodes/icons/node-matter-icon.svg +0 -12
- package/nodes/icons/node-scene-icon.png +0 -0
- package/nodes/icons/node-watchdog-icon.png +0 -0
- package/nodes/knxUltimateAI.html +0 -1826
- package/nodes/knxUltimateAI.js +0 -16797
- package/nodes/knxUltimateAIHomeAssistant.html +0 -54
- package/nodes/knxUltimateAIHomeAssistant.js +0 -152
- package/nodes/knxUltimateAlerter.html +0 -267
- package/nodes/knxUltimateAlerter.js +0 -300
- package/nodes/knxUltimateAutoResponder.html +0 -128
- package/nodes/knxUltimateAutoResponder.js +0 -264
- package/nodes/knxUltimateDateTime.html +0 -579
- package/nodes/knxUltimateDateTime.js +0 -282
- package/nodes/knxUltimateGarage.html +0 -337
- package/nodes/knxUltimateGarage.js +0 -504
- package/nodes/knxUltimateGlobalContext.html +0 -145
- package/nodes/knxUltimateGlobalContext.js +0 -208
- package/nodes/knxUltimateHATranslator.html +0 -85
- package/nodes/knxUltimateHATranslator.js +0 -83
- package/nodes/knxUltimateHueAreaMotion.html +0 -670
- package/nodes/knxUltimateHueAreaMotion.js +0 -218
- package/nodes/knxUltimateHueBattery.html +0 -646
- package/nodes/knxUltimateHueBattery.js +0 -182
- package/nodes/knxUltimateHueButton.html +0 -804
- package/nodes/knxUltimateHueButton.js +0 -292
- package/nodes/knxUltimateHueCameraMotion.html +0 -671
- package/nodes/knxUltimateHueCameraMotion.js +0 -218
- package/nodes/knxUltimateHueContactSensor.html +0 -609
- package/nodes/knxUltimateHueContactSensor.js +0 -188
- package/nodes/knxUltimateHueController.html +0 -1765
- package/nodes/knxUltimateHueController.js +0 -28
- package/nodes/knxUltimateHueHumiditySensor.html +0 -641
- package/nodes/knxUltimateHueHumiditySensor.js +0 -201
- package/nodes/knxUltimateHueLight.html +0 -2516
- package/nodes/knxUltimateHueLight.js +0 -1582
- package/nodes/knxUltimateHueLightSensor.html +0 -636
- package/nodes/knxUltimateHueLightSensor.js +0 -177
- package/nodes/knxUltimateHueMotion.html +0 -634
- package/nodes/knxUltimateHueMotion.js +0 -182
- package/nodes/knxUltimateHuePlug.html +0 -576
- package/nodes/knxUltimateHuePlug.js +0 -341
- package/nodes/knxUltimateHueScene.html +0 -967
- package/nodes/knxUltimateHueScene.js +0 -349
- package/nodes/knxUltimateHueTapDial.html +0 -640
- package/nodes/knxUltimateHueTapDial.js +0 -268
- package/nodes/knxUltimateHueTemperatureSensor.html +0 -639
- package/nodes/knxUltimateHueTemperatureSensor.js +0 -184
- package/nodes/knxUltimateHueZigbeeConnectivity.html +0 -648
- package/nodes/knxUltimateHueZigbeeConnectivity.js +0 -182
- package/nodes/knxUltimateHuedevice_software_update.html +0 -650
- package/nodes/knxUltimateHuedevice_software_update.js +0 -182
- package/nodes/knxUltimateLoadControl.html +0 -425
- package/nodes/knxUltimateLoadControl.js +0 -443
- package/nodes/knxUltimateLogger.html +0 -197
- package/nodes/knxUltimateLogger.js +0 -224
- package/nodes/knxUltimateMatterBridge.html +0 -689
- package/nodes/knxUltimateMatterBridge.js +0 -464
- package/nodes/knxUltimateMatterControllerDevice.html +0 -2851
- package/nodes/knxUltimateMatterControllerDevice.js +0 -1747
- package/nodes/knxUltimateSceneController.html +0 -529
- package/nodes/knxUltimateSceneController.js +0 -437
- package/nodes/knxUltimateStaircase.html +0 -346
- package/nodes/knxUltimateStaircase.js +0 -463
- package/nodes/knxUltimateWatchDog.html +0 -241
- package/nodes/knxUltimateWatchDog.js +0 -230
- package/nodes/locales/de/hue-config.html +0 -33
- package/nodes/locales/de/hue-config.json +0 -21
- package/nodes/locales/de/knxUltimateAI.html +0 -13
- package/nodes/locales/de/knxUltimateAI.json +0 -231
- package/nodes/locales/de/knxUltimateAIHomeAssistant.html +0 -11
- package/nodes/locales/de/knxUltimateAlerter.html +0 -159
- package/nodes/locales/de/knxUltimateAlerter.json +0 -27
- package/nodes/locales/de/knxUltimateAutoResponder.html +0 -96
- package/nodes/locales/de/knxUltimateAutoResponder.json +0 -8
- package/nodes/locales/de/knxUltimateDateTime.html +0 -45
- package/nodes/locales/de/knxUltimateDateTime.json +0 -32
- package/nodes/locales/de/knxUltimateGarage.html +0 -79
- package/nodes/locales/de/knxUltimateGarage.json +0 -51
- package/nodes/locales/de/knxUltimateGlobalContext.html +0 -76
- package/nodes/locales/de/knxUltimateGlobalContext.json +0 -24
- package/nodes/locales/de/knxUltimateHATranslator.html +0 -25
- package/nodes/locales/de/knxUltimateHATranslator.json +0 -8
- package/nodes/locales/de/knxUltimateHueAreaMotion.html +0 -44
- package/nodes/locales/de/knxUltimateHueAreaMotion.json +0 -31
- package/nodes/locales/de/knxUltimateHueBattery.html +0 -37
- package/nodes/locales/de/knxUltimateHueBattery.json +0 -30
- package/nodes/locales/de/knxUltimateHueButton.html +0 -52
- package/nodes/locales/de/knxUltimateHueButton.json +0 -34
- package/nodes/locales/de/knxUltimateHueCameraMotion.html +0 -38
- package/nodes/locales/de/knxUltimateHueCameraMotion.json +0 -30
- package/nodes/locales/de/knxUltimateHueContactSensor.html +0 -35
- package/nodes/locales/de/knxUltimateHueContactSensor.json +0 -26
- package/nodes/locales/de/knxUltimateHueController.html +0 -690
- package/nodes/locales/de/knxUltimateHueController.json +0 -64
- package/nodes/locales/de/knxUltimateHueHumiditySensor.html +0 -38
- package/nodes/locales/de/knxUltimateHueHumiditySensor.json +0 -30
- package/nodes/locales/de/knxUltimateHueLight.html +0 -121
- package/nodes/locales/de/knxUltimateHueLight.json +0 -94
- package/nodes/locales/de/knxUltimateHueLightSensor.html +0 -38
- package/nodes/locales/de/knxUltimateHueLightSensor.json +0 -19
- package/nodes/locales/de/knxUltimateHueMotion.html +0 -41
- package/nodes/locales/de/knxUltimateHueMotion.json +0 -27
- package/nodes/locales/de/knxUltimateHuePlug.html +0 -50
- package/nodes/locales/de/knxUltimateHuePlug.json +0 -33
- package/nodes/locales/de/knxUltimateHueScene.html +0 -45
- package/nodes/locales/de/knxUltimateHueScene.json +0 -41
- package/nodes/locales/de/knxUltimateHueTapDial.html +0 -40
- package/nodes/locales/de/knxUltimateHueTapDial.json +0 -28
- package/nodes/locales/de/knxUltimateHueTemperatureSensor.html +0 -38
- package/nodes/locales/de/knxUltimateHueTemperatureSensor.json +0 -30
- package/nodes/locales/de/knxUltimateHueZigbeeConnectivity.html +0 -39
- package/nodes/locales/de/knxUltimateHueZigbeeConnectivity.json +0 -30
- package/nodes/locales/de/knxUltimateHuedevice_software_update.html +0 -36
- package/nodes/locales/de/knxUltimateHuedevice_software_update.json +0 -30
- package/nodes/locales/de/knxUltimateLoadControl.html +0 -69
- package/nodes/locales/de/knxUltimateLoadControl.json +0 -28
- package/nodes/locales/de/knxUltimateLogger.html +0 -126
- package/nodes/locales/de/knxUltimateLogger.json +0 -31
- package/nodes/locales/de/knxUltimateMatterBridge.html +0 -65
- package/nodes/locales/de/knxUltimateMatterBridge.json +0 -123
- package/nodes/locales/de/knxUltimateMatterControllerDevice.html +0 -57
- package/nodes/locales/de/knxUltimateMatterControllerDevice.json +0 -146
- package/nodes/locales/de/knxUltimateSceneController.html +0 -98
- package/nodes/locales/de/knxUltimateSceneController.json +0 -32
- package/nodes/locales/de/knxUltimateStaircase.html +0 -77
- package/nodes/locales/de/knxUltimateStaircase.json +0 -62
- package/nodes/locales/de/knxUltimateWatchDog.html +0 -178
- package/nodes/locales/de/knxUltimateWatchDog.json +0 -27
- package/nodes/locales/de/matter-config.html +0 -47
- package/nodes/locales/de/matter-config.json +0 -47
- package/nodes/locales/de/matterbridge-config.html +0 -45
- package/nodes/locales/de/matterbridge-config.json +0 -25
- package/nodes/locales/en/hue-config.html +0 -31
- package/nodes/locales/en/hue-config.json +0 -21
- package/nodes/locales/en/knxUltimateAI.html +0 -13
- package/nodes/locales/en/knxUltimateAI.json +0 -234
- package/nodes/locales/en/knxUltimateAIHomeAssistant.html +0 -11
- package/nodes/locales/en/knxUltimateAlerter.html +0 -164
- package/nodes/locales/en/knxUltimateAlerter.json +0 -27
- package/nodes/locales/en/knxUltimateAutoResponder.html +0 -94
- package/nodes/locales/en/knxUltimateAutoResponder.json +0 -8
- package/nodes/locales/en/knxUltimateDateTime.html +0 -67
- package/nodes/locales/en/knxUltimateDateTime.json +0 -32
- package/nodes/locales/en/knxUltimateGarage.html +0 -79
- package/nodes/locales/en/knxUltimateGarage.json +0 -51
- package/nodes/locales/en/knxUltimateGlobalContext.html +0 -124
- package/nodes/locales/en/knxUltimateGlobalContext.json +0 -24
- package/nodes/locales/en/knxUltimateHATranslator.html +0 -25
- package/nodes/locales/en/knxUltimateHATranslator.json +0 -8
- package/nodes/locales/en/knxUltimateHueAreaMotion.html +0 -44
- package/nodes/locales/en/knxUltimateHueAreaMotion.json +0 -31
- package/nodes/locales/en/knxUltimateHueBattery.html +0 -37
- package/nodes/locales/en/knxUltimateHueBattery.json +0 -30
- package/nodes/locales/en/knxUltimateHueButton.html +0 -52
- package/nodes/locales/en/knxUltimateHueButton.json +0 -34
- package/nodes/locales/en/knxUltimateHueCameraMotion.html +0 -38
- package/nodes/locales/en/knxUltimateHueCameraMotion.json +0 -30
- package/nodes/locales/en/knxUltimateHueContactSensor.html +0 -35
- package/nodes/locales/en/knxUltimateHueContactSensor.json +0 -26
- package/nodes/locales/en/knxUltimateHueController.html +0 -691
- package/nodes/locales/en/knxUltimateHueController.json +0 -64
- package/nodes/locales/en/knxUltimateHueHumiditySensor.html +0 -38
- package/nodes/locales/en/knxUltimateHueHumiditySensor.json +0 -30
- package/nodes/locales/en/knxUltimateHueLight.html +0 -124
- package/nodes/locales/en/knxUltimateHueLight.json +0 -94
- package/nodes/locales/en/knxUltimateHueLightSensor.html +0 -38
- package/nodes/locales/en/knxUltimateHueLightSensor.json +0 -19
- package/nodes/locales/en/knxUltimateHueMotion.html +0 -41
- package/nodes/locales/en/knxUltimateHueMotion.json +0 -27
- package/nodes/locales/en/knxUltimateHuePlug.html +0 -50
- package/nodes/locales/en/knxUltimateHuePlug.json +0 -33
- package/nodes/locales/en/knxUltimateHueScene.html +0 -45
- package/nodes/locales/en/knxUltimateHueScene.json +0 -41
- package/nodes/locales/en/knxUltimateHueTapDial.html +0 -40
- package/nodes/locales/en/knxUltimateHueTapDial.json +0 -28
- package/nodes/locales/en/knxUltimateHueTemperatureSensor.html +0 -38
- package/nodes/locales/en/knxUltimateHueTemperatureSensor.json +0 -30
- package/nodes/locales/en/knxUltimateHueZigbeeConnectivity.html +0 -39
- package/nodes/locales/en/knxUltimateHueZigbeeConnectivity.json +0 -30
- package/nodes/locales/en/knxUltimateHuedevice_software_update.html +0 -36
- package/nodes/locales/en/knxUltimateHuedevice_software_update.json +0 -30
- package/nodes/locales/en/knxUltimateLoadControl.html +0 -76
- package/nodes/locales/en/knxUltimateLoadControl.json +0 -28
- package/nodes/locales/en/knxUltimateLogger.html +0 -161
- package/nodes/locales/en/knxUltimateLogger.json +0 -31
- package/nodes/locales/en/knxUltimateMatterBridge.html +0 -65
- package/nodes/locales/en/knxUltimateMatterBridge.json +0 -123
- package/nodes/locales/en/knxUltimateMatterControllerDevice.html +0 -57
- package/nodes/locales/en/knxUltimateMatterControllerDevice.json +0 -146
- package/nodes/locales/en/knxUltimateSceneController.html +0 -117
- package/nodes/locales/en/knxUltimateSceneController.json +0 -32
- package/nodes/locales/en/knxUltimateStaircase.html +0 -77
- package/nodes/locales/en/knxUltimateStaircase.json +0 -62
- package/nodes/locales/en/knxUltimateWatchDog.html +0 -244
- package/nodes/locales/en/knxUltimateWatchDog.json +0 -27
- package/nodes/locales/en/matter-config.html +0 -47
- package/nodes/locales/en/matter-config.json +0 -48
- package/nodes/locales/en/matterbridge-config.html +0 -45
- package/nodes/locales/en/matterbridge-config.json +0 -25
- package/nodes/locales/es/hue-config.html +0 -31
- package/nodes/locales/es/hue-config.json +0 -21
- package/nodes/locales/es/knxUltimateAI.html +0 -13
- package/nodes/locales/es/knxUltimateAI.json +0 -231
- package/nodes/locales/es/knxUltimateAIHomeAssistant.html +0 -11
- package/nodes/locales/es/knxUltimateAlerter.html +0 -164
- package/nodes/locales/es/knxUltimateAlerter.json +0 -27
- package/nodes/locales/es/knxUltimateAutoResponder.html +0 -81
- package/nodes/locales/es/knxUltimateAutoResponder.json +0 -8
- package/nodes/locales/es/knxUltimateDateTime.html +0 -45
- package/nodes/locales/es/knxUltimateDateTime.json +0 -32
- package/nodes/locales/es/knxUltimateGarage.html +0 -79
- package/nodes/locales/es/knxUltimateGarage.json +0 -51
- package/nodes/locales/es/knxUltimateGlobalContext.html +0 -128
- package/nodes/locales/es/knxUltimateGlobalContext.json +0 -24
- package/nodes/locales/es/knxUltimateHATranslator.html +0 -25
- package/nodes/locales/es/knxUltimateHATranslator.json +0 -8
- package/nodes/locales/es/knxUltimateHueAreaMotion.html +0 -44
- package/nodes/locales/es/knxUltimateHueAreaMotion.json +0 -31
- package/nodes/locales/es/knxUltimateHueBattery.html +0 -37
- package/nodes/locales/es/knxUltimateHueBattery.json +0 -30
- package/nodes/locales/es/knxUltimateHueButton.html +0 -52
- package/nodes/locales/es/knxUltimateHueButton.json +0 -34
- package/nodes/locales/es/knxUltimateHueCameraMotion.html +0 -38
- package/nodes/locales/es/knxUltimateHueCameraMotion.json +0 -30
- package/nodes/locales/es/knxUltimateHueContactSensor.html +0 -35
- package/nodes/locales/es/knxUltimateHueContactSensor.json +0 -26
- package/nodes/locales/es/knxUltimateHueController.html +0 -691
- package/nodes/locales/es/knxUltimateHueController.json +0 -64
- package/nodes/locales/es/knxUltimateHueHumiditySensor.html +0 -38
- package/nodes/locales/es/knxUltimateHueHumiditySensor.json +0 -30
- package/nodes/locales/es/knxUltimateHueLight.html +0 -124
- package/nodes/locales/es/knxUltimateHueLight.json +0 -94
- package/nodes/locales/es/knxUltimateHueLightSensor.html +0 -38
- package/nodes/locales/es/knxUltimateHueLightSensor.json +0 -19
- package/nodes/locales/es/knxUltimateHueMotion.html +0 -41
- package/nodes/locales/es/knxUltimateHueMotion.json +0 -27
- package/nodes/locales/es/knxUltimateHuePlug.html +0 -50
- package/nodes/locales/es/knxUltimateHuePlug.json +0 -33
- package/nodes/locales/es/knxUltimateHueScene.html +0 -45
- package/nodes/locales/es/knxUltimateHueScene.json +0 -41
- package/nodes/locales/es/knxUltimateHueTapDial.html +0 -40
- package/nodes/locales/es/knxUltimateHueTapDial.json +0 -28
- package/nodes/locales/es/knxUltimateHueTemperatureSensor.html +0 -38
- package/nodes/locales/es/knxUltimateHueTemperatureSensor.json +0 -30
- package/nodes/locales/es/knxUltimateHueZigbeeConnectivity.html +0 -39
- package/nodes/locales/es/knxUltimateHueZigbeeConnectivity.json +0 -30
- package/nodes/locales/es/knxUltimateHuedevice_software_update.html +0 -36
- package/nodes/locales/es/knxUltimateHuedevice_software_update.json +0 -30
- package/nodes/locales/es/knxUltimateLoadControl.html +0 -76
- package/nodes/locales/es/knxUltimateLoadControl.json +0 -28
- package/nodes/locales/es/knxUltimateLogger.html +0 -162
- package/nodes/locales/es/knxUltimateLogger.json +0 -31
- package/nodes/locales/es/knxUltimateMatterBridge.html +0 -65
- package/nodes/locales/es/knxUltimateMatterBridge.json +0 -123
- package/nodes/locales/es/knxUltimateMatterControllerDevice.html +0 -57
- package/nodes/locales/es/knxUltimateMatterControllerDevice.json +0 -146
- package/nodes/locales/es/knxUltimateSceneController.html +0 -115
- package/nodes/locales/es/knxUltimateSceneController.json +0 -32
- package/nodes/locales/es/knxUltimateStaircase.html +0 -77
- package/nodes/locales/es/knxUltimateStaircase.json +0 -62
- package/nodes/locales/es/knxUltimateWatchDog.html +0 -230
- package/nodes/locales/es/knxUltimateWatchDog.json +0 -27
- package/nodes/locales/es/matter-config.html +0 -47
- package/nodes/locales/es/matter-config.json +0 -47
- package/nodes/locales/es/matterbridge-config.html +0 -45
- package/nodes/locales/es/matterbridge-config.json +0 -25
- package/nodes/locales/fr/hue-config.html +0 -31
- package/nodes/locales/fr/hue-config.json +0 -21
- package/nodes/locales/fr/knxUltimateAI.html +0 -13
- package/nodes/locales/fr/knxUltimateAI.json +0 -231
- package/nodes/locales/fr/knxUltimateAIHomeAssistant.html +0 -11
- package/nodes/locales/fr/knxUltimateAlerter.html +0 -164
- package/nodes/locales/fr/knxUltimateAlerter.json +0 -27
- package/nodes/locales/fr/knxUltimateAutoResponder.html +0 -92
- package/nodes/locales/fr/knxUltimateAutoResponder.json +0 -8
- package/nodes/locales/fr/knxUltimateDateTime.html +0 -45
- package/nodes/locales/fr/knxUltimateDateTime.json +0 -32
- package/nodes/locales/fr/knxUltimateGarage.html +0 -79
- package/nodes/locales/fr/knxUltimateGarage.json +0 -51
- package/nodes/locales/fr/knxUltimateGlobalContext.html +0 -122
- package/nodes/locales/fr/knxUltimateGlobalContext.json +0 -24
- package/nodes/locales/fr/knxUltimateHATranslator.html +0 -25
- package/nodes/locales/fr/knxUltimateHATranslator.json +0 -8
- package/nodes/locales/fr/knxUltimateHueAreaMotion.html +0 -44
- package/nodes/locales/fr/knxUltimateHueAreaMotion.json +0 -31
- package/nodes/locales/fr/knxUltimateHueBattery.html +0 -37
- package/nodes/locales/fr/knxUltimateHueBattery.json +0 -30
- package/nodes/locales/fr/knxUltimateHueButton.html +0 -52
- package/nodes/locales/fr/knxUltimateHueButton.json +0 -34
- package/nodes/locales/fr/knxUltimateHueCameraMotion.html +0 -38
- package/nodes/locales/fr/knxUltimateHueCameraMotion.json +0 -30
- package/nodes/locales/fr/knxUltimateHueContactSensor.html +0 -35
- package/nodes/locales/fr/knxUltimateHueContactSensor.json +0 -26
- package/nodes/locales/fr/knxUltimateHueController.html +0 -691
- package/nodes/locales/fr/knxUltimateHueController.json +0 -64
- package/nodes/locales/fr/knxUltimateHueHumiditySensor.html +0 -38
- package/nodes/locales/fr/knxUltimateHueHumiditySensor.json +0 -30
- package/nodes/locales/fr/knxUltimateHueLight.html +0 -124
- package/nodes/locales/fr/knxUltimateHueLight.json +0 -86
- package/nodes/locales/fr/knxUltimateHueLightSensor.html +0 -38
- package/nodes/locales/fr/knxUltimateHueLightSensor.json +0 -19
- package/nodes/locales/fr/knxUltimateHueMotion.html +0 -41
- package/nodes/locales/fr/knxUltimateHueMotion.json +0 -27
- package/nodes/locales/fr/knxUltimateHuePlug.html +0 -50
- package/nodes/locales/fr/knxUltimateHuePlug.json +0 -33
- package/nodes/locales/fr/knxUltimateHueScene.html +0 -45
- package/nodes/locales/fr/knxUltimateHueScene.json +0 -41
- package/nodes/locales/fr/knxUltimateHueTapDial.html +0 -40
- package/nodes/locales/fr/knxUltimateHueTapDial.json +0 -28
- package/nodes/locales/fr/knxUltimateHueTemperatureSensor.html +0 -38
- package/nodes/locales/fr/knxUltimateHueTemperatureSensor.json +0 -30
- package/nodes/locales/fr/knxUltimateHueZigbeeConnectivity.html +0 -39
- package/nodes/locales/fr/knxUltimateHueZigbeeConnectivity.json +0 -30
- package/nodes/locales/fr/knxUltimateHuedevice_software_update.html +0 -36
- package/nodes/locales/fr/knxUltimateHuedevice_software_update.json +0 -30
- package/nodes/locales/fr/knxUltimateLoadControl.html +0 -76
- package/nodes/locales/fr/knxUltimateLoadControl.json +0 -28
- package/nodes/locales/fr/knxUltimateLogger.html +0 -160
- package/nodes/locales/fr/knxUltimateLogger.json +0 -31
- package/nodes/locales/fr/knxUltimateMatterBridge.html +0 -65
- package/nodes/locales/fr/knxUltimateMatterBridge.json +0 -123
- package/nodes/locales/fr/knxUltimateMatterControllerDevice.html +0 -57
- package/nodes/locales/fr/knxUltimateMatterControllerDevice.json +0 -146
- package/nodes/locales/fr/knxUltimateSceneController.html +0 -117
- package/nodes/locales/fr/knxUltimateSceneController.json +0 -32
- package/nodes/locales/fr/knxUltimateStaircase.html +0 -77
- package/nodes/locales/fr/knxUltimateStaircase.json +0 -62
- package/nodes/locales/fr/knxUltimateWatchDog.html +0 -228
- package/nodes/locales/fr/knxUltimateWatchDog.json +0 -27
- package/nodes/locales/fr/matter-config.html +0 -47
- package/nodes/locales/fr/matter-config.json +0 -47
- package/nodes/locales/fr/matterbridge-config.html +0 -45
- package/nodes/locales/fr/matterbridge-config.json +0 -25
- package/nodes/locales/it/hue-config.html +0 -33
- package/nodes/locales/it/hue-config.json +0 -21
- package/nodes/locales/it/knxUltimateAI.html +0 -13
- package/nodes/locales/it/knxUltimateAI.json +0 -234
- package/nodes/locales/it/knxUltimateAIHomeAssistant.html +0 -11
- package/nodes/locales/it/knxUltimateAlerter.html +0 -159
- package/nodes/locales/it/knxUltimateAlerter.json +0 -27
- package/nodes/locales/it/knxUltimateAutoResponder.html +0 -96
- package/nodes/locales/it/knxUltimateAutoResponder.json +0 -8
- package/nodes/locales/it/knxUltimateDateTime.html +0 -67
- package/nodes/locales/it/knxUltimateDateTime.json +0 -32
- package/nodes/locales/it/knxUltimateGarage.html +0 -79
- package/nodes/locales/it/knxUltimateGarage.json +0 -51
- package/nodes/locales/it/knxUltimateGlobalContext.html +0 -81
- package/nodes/locales/it/knxUltimateGlobalContext.json +0 -24
- package/nodes/locales/it/knxUltimateHATranslator.html +0 -24
- package/nodes/locales/it/knxUltimateHATranslator.json +0 -8
- package/nodes/locales/it/knxUltimateHueAreaMotion.html +0 -44
- package/nodes/locales/it/knxUltimateHueAreaMotion.json +0 -31
- package/nodes/locales/it/knxUltimateHueBattery.html +0 -37
- package/nodes/locales/it/knxUltimateHueBattery.json +0 -30
- package/nodes/locales/it/knxUltimateHueButton.html +0 -52
- package/nodes/locales/it/knxUltimateHueButton.json +0 -34
- package/nodes/locales/it/knxUltimateHueCameraMotion.html +0 -38
- package/nodes/locales/it/knxUltimateHueCameraMotion.json +0 -30
- package/nodes/locales/it/knxUltimateHueContactSensor.html +0 -35
- package/nodes/locales/it/knxUltimateHueContactSensor.json +0 -26
- package/nodes/locales/it/knxUltimateHueController.html +0 -690
- package/nodes/locales/it/knxUltimateHueController.json +0 -64
- package/nodes/locales/it/knxUltimateHueHumiditySensor 2.html +0 -11
- package/nodes/locales/it/knxUltimateHueHumiditySensor.html +0 -38
- package/nodes/locales/it/knxUltimateHueHumiditySensor.json +0 -30
- package/nodes/locales/it/knxUltimateHueLight.html +0 -124
- package/nodes/locales/it/knxUltimateHueLight.json +0 -94
- package/nodes/locales/it/knxUltimateHueLightSensor.html +0 -38
- package/nodes/locales/it/knxUltimateHueLightSensor.json +0 -19
- package/nodes/locales/it/knxUltimateHueMotion.html +0 -41
- package/nodes/locales/it/knxUltimateHueMotion.json +0 -27
- package/nodes/locales/it/knxUltimateHuePlug.html +0 -50
- package/nodes/locales/it/knxUltimateHuePlug.json +0 -33
- package/nodes/locales/it/knxUltimateHueScene.html +0 -45
- package/nodes/locales/it/knxUltimateHueScene.json +0 -41
- package/nodes/locales/it/knxUltimateHueTapDial.html +0 -40
- package/nodes/locales/it/knxUltimateHueTapDial.json +0 -28
- package/nodes/locales/it/knxUltimateHueTemperatureSensor.html +0 -38
- package/nodes/locales/it/knxUltimateHueTemperatureSensor.json +0 -30
- package/nodes/locales/it/knxUltimateHueZigbeeConnectivity.html +0 -39
- package/nodes/locales/it/knxUltimateHueZigbeeConnectivity.json +0 -30
- package/nodes/locales/it/knxUltimateHuedevice_software_update.html +0 -35
- package/nodes/locales/it/knxUltimateHuedevice_software_update.json +0 -30
- package/nodes/locales/it/knxUltimateLoadControl.html +0 -76
- package/nodes/locales/it/knxUltimateLoadControl.json +0 -28
- package/nodes/locales/it/knxUltimateLogger.html +0 -132
- package/nodes/locales/it/knxUltimateLogger.json +0 -31
- package/nodes/locales/it/knxUltimateMatterBridge.html +0 -65
- package/nodes/locales/it/knxUltimateMatterBridge.json +0 -123
- package/nodes/locales/it/knxUltimateMatterControllerDevice.html +0 -57
- package/nodes/locales/it/knxUltimateMatterControllerDevice.json +0 -146
- package/nodes/locales/it/knxUltimateSceneController.html +0 -101
- package/nodes/locales/it/knxUltimateSceneController.json +0 -32
- package/nodes/locales/it/knxUltimateStaircase.html +0 -77
- package/nodes/locales/it/knxUltimateStaircase.json +0 -62
- package/nodes/locales/it/knxUltimateWatchDog.html +0 -194
- package/nodes/locales/it/knxUltimateWatchDog.json +0 -27
- package/nodes/locales/it/matter-config.html +0 -47
- package/nodes/locales/it/matter-config.json +0 -48
- package/nodes/locales/it/matterbridge-config.html +0 -45
- package/nodes/locales/it/matterbridge-config.json +0 -25
- package/nodes/locales/zh-CN/hue-config.html +0 -33
- package/nodes/locales/zh-CN/hue-config.json +0 -21
- package/nodes/locales/zh-CN/knxUltimateAI.html +0 -13
- package/nodes/locales/zh-CN/knxUltimateAI.json +0 -231
- package/nodes/locales/zh-CN/knxUltimateAIHomeAssistant.html +0 -11
- package/nodes/locales/zh-CN/knxUltimateAlerter.html +0 -159
- package/nodes/locales/zh-CN/knxUltimateAlerter.json +0 -27
- package/nodes/locales/zh-CN/knxUltimateAutoResponder.html +0 -94
- package/nodes/locales/zh-CN/knxUltimateAutoResponder.json +0 -8
- package/nodes/locales/zh-CN/knxUltimateDateTime.html +0 -45
- package/nodes/locales/zh-CN/knxUltimateDateTime.json +0 -32
- package/nodes/locales/zh-CN/knxUltimateGarage.html +0 -79
- package/nodes/locales/zh-CN/knxUltimateGarage.json +0 -51
- package/nodes/locales/zh-CN/knxUltimateGlobalContext.html +0 -77
- package/nodes/locales/zh-CN/knxUltimateGlobalContext.json +0 -24
- package/nodes/locales/zh-CN/knxUltimateHATranslator.html +0 -25
- package/nodes/locales/zh-CN/knxUltimateHATranslator.json +0 -8
- package/nodes/locales/zh-CN/knxUltimateHueAreaMotion.html +0 -44
- package/nodes/locales/zh-CN/knxUltimateHueAreaMotion.json +0 -31
- package/nodes/locales/zh-CN/knxUltimateHueBattery.html +0 -37
- package/nodes/locales/zh-CN/knxUltimateHueBattery.json +0 -30
- package/nodes/locales/zh-CN/knxUltimateHueButton.html +0 -52
- package/nodes/locales/zh-CN/knxUltimateHueButton.json +0 -34
- package/nodes/locales/zh-CN/knxUltimateHueCameraMotion.html +0 -38
- package/nodes/locales/zh-CN/knxUltimateHueCameraMotion.json +0 -30
- package/nodes/locales/zh-CN/knxUltimateHueContactSensor.html +0 -35
- package/nodes/locales/zh-CN/knxUltimateHueContactSensor.json +0 -26
- package/nodes/locales/zh-CN/knxUltimateHueController.html +0 -693
- package/nodes/locales/zh-CN/knxUltimateHueController.json +0 -64
- package/nodes/locales/zh-CN/knxUltimateHueHumiditySensor.html +0 -38
- package/nodes/locales/zh-CN/knxUltimateHueHumiditySensor.json +0 -30
- package/nodes/locales/zh-CN/knxUltimateHueLight.html +0 -126
- package/nodes/locales/zh-CN/knxUltimateHueLight.json +0 -86
- package/nodes/locales/zh-CN/knxUltimateHueLightSensor.html +0 -38
- package/nodes/locales/zh-CN/knxUltimateHueLightSensor.json +0 -9
- package/nodes/locales/zh-CN/knxUltimateHueMotion.html +0 -41
- package/nodes/locales/zh-CN/knxUltimateHueMotion.json +0 -27
- package/nodes/locales/zh-CN/knxUltimateHuePlug.html +0 -50
- package/nodes/locales/zh-CN/knxUltimateHuePlug.json +0 -33
- package/nodes/locales/zh-CN/knxUltimateHueScene.html +0 -45
- package/nodes/locales/zh-CN/knxUltimateHueScene.json +0 -41
- package/nodes/locales/zh-CN/knxUltimateHueTapDial.html +0 -40
- package/nodes/locales/zh-CN/knxUltimateHueTapDial.json +0 -28
- package/nodes/locales/zh-CN/knxUltimateHueTemperatureSensor.html +0 -38
- package/nodes/locales/zh-CN/knxUltimateHueTemperatureSensor.json +0 -30
- package/nodes/locales/zh-CN/knxUltimateHueZigbeeConnectivity.html +0 -39
- package/nodes/locales/zh-CN/knxUltimateHueZigbeeConnectivity.json +0 -30
- package/nodes/locales/zh-CN/knxUltimateHuedevice_software_update.html +0 -36
- package/nodes/locales/zh-CN/knxUltimateHuedevice_software_update.json +0 -30
- package/nodes/locales/zh-CN/knxUltimateLoadControl.html +0 -76
- package/nodes/locales/zh-CN/knxUltimateLoadControl.json +0 -28
- package/nodes/locales/zh-CN/knxUltimateLogger.html +0 -126
- package/nodes/locales/zh-CN/knxUltimateLogger.json +0 -31
- package/nodes/locales/zh-CN/knxUltimateMatterBridge.html +0 -65
- package/nodes/locales/zh-CN/knxUltimateMatterBridge.json +0 -123
- package/nodes/locales/zh-CN/knxUltimateMatterControllerDevice.html +0 -57
- package/nodes/locales/zh-CN/knxUltimateMatterControllerDevice.json +0 -146
- package/nodes/locales/zh-CN/knxUltimateSceneController.html +0 -98
- package/nodes/locales/zh-CN/knxUltimateSceneController.json +0 -32
- package/nodes/locales/zh-CN/knxUltimateStaircase.html +0 -77
- package/nodes/locales/zh-CN/knxUltimateStaircase.json +0 -62
- package/nodes/locales/zh-CN/knxUltimateWatchDog.html +0 -178
- package/nodes/locales/zh-CN/knxUltimateWatchDog.json +0 -27
- package/nodes/locales/zh-CN/matter-config.html +0 -47
- package/nodes/locales/zh-CN/matter-config.json +0 -47
- package/nodes/locales/zh-CN/matterbridge-config.html +0 -45
- package/nodes/locales/zh-CN/matterbridge-config.json +0 -25
- package/nodes/matter-config.html +0 -578
- package/nodes/matter-config.js +0 -387
- package/nodes/matterbridge-config.html +0 -198
- package/nodes/matterbridge-config.js +0 -261
- package/nodes/plugins/knxUltimate-cerebrum-runtime-plugin.js +0 -79
- package/nodes/plugins/knxUltimate-migration-notice-plugin.html +0 -44
- package/nodes/plugins/knxUltimateAI-vue/assets/app.css +0 -1
- package/nodes/plugins/knxUltimateAI-vue/assets/app.js +0 -13
- package/nodes/plugins/knxUltimateAI-vue/assets/chunk-html2canvas.esm.js +0 -5
- package/nodes/plugins/knxUltimateAI-vue/assets/chunk-index.es.js +0 -5
- package/nodes/plugins/knxUltimateAI-vue/assets/chunk-jspdf.es.min.js +0 -79
- package/nodes/plugins/knxUltimateAI-vue/assets/chunk-purify.es.js +0 -3
- package/nodes/plugins/knxUltimateAI-vue/index.html +0 -13
- package/nodes/utils/HueEventStream.mjs +0 -176
- package/nodes/utils/colorManipulators/XYFromRGB_Supergiovane.js +0 -113
- package/nodes/utils/colorManipulators/hueColorConverter.js +0 -521
- package/nodes/utils/http.js +0 -291
- package/nodes/utils/hueControllerProfileAdapter.js +0 -104
- package/nodes/utils/hueControllerProfiles/runtime/area_motion.js +0 -221
- package/nodes/utils/hueControllerProfiles/runtime/button.js +0 -295
- package/nodes/utils/hueControllerProfiles/runtime/camera_motion.js +0 -221
- package/nodes/utils/hueControllerProfiles/runtime/contact.js +0 -191
- package/nodes/utils/hueControllerProfiles/runtime/device_power.js +0 -185
- package/nodes/utils/hueControllerProfiles/runtime/device_software_update.js +0 -185
- package/nodes/utils/hueControllerProfiles/runtime/humidity.js +0 -204
- package/nodes/utils/hueControllerProfiles/runtime/light.js +0 -1585
- package/nodes/utils/hueControllerProfiles/runtime/light_level.js +0 -180
- package/nodes/utils/hueControllerProfiles/runtime/motion.js +0 -185
- package/nodes/utils/hueControllerProfiles/runtime/plug.js +0 -344
- package/nodes/utils/hueControllerProfiles/runtime/relative_rotary.js +0 -271
- package/nodes/utils/hueControllerProfiles/runtime/scene.js +0 -352
- package/nodes/utils/hueControllerProfiles/runtime/temperature.js +0 -187
- package/nodes/utils/hueControllerProfiles/runtime/zigbee_connectivity.js +0 -185
- package/nodes/utils/hueControllerResourceCatalog.js +0 -71
- package/nodes/utils/hueEngine.mjs +0 -469
- package/nodes/utils/knxAiCamera.js +0 -302
- package/nodes/utils/knxAiCatalogRetrieval.js +0 -349
- package/nodes/utils/knxAiCerebrum.js +0 -406
- package/nodes/utils/knxAiChatContext.js +0 -496
- package/nodes/utils/knxAiEventHistory.js +0 -521
- package/nodes/utils/knxAiHomeMemory.js +0 -1021
- package/nodes/utils/knxAiScheduler.js +0 -445
- package/nodes/utils/knxAiSemanticContext.js +0 -662
- package/nodes/utils/knxAiTelegramVoice.js +0 -545
- package/nodes/utils/knxAiWebAccess.js +0 -631
- package/nodes/utils/lightEngines/canonicalLight.js +0 -75
- package/nodes/utils/lightEngines/hueLightEngine.js +0 -51
- package/nodes/utils/lightEngines/index.js +0 -25
- package/nodes/utils/lightEngines/knxLightCommand.js +0 -79
- package/nodes/utils/lightEngines/lightEngine.js +0 -46
- package/nodes/utils/lightEngines/matterHueShim.js +0 -59
- package/nodes/utils/lightEngines/matterLightEngine.js +0 -117
- package/nodes/utils/matterBridgeDeviceFactory.mjs +0 -780
- package/nodes/utils/matterBridgeEngine.mjs +0 -297
- package/nodes/utils/matterControllerCommandGate.js +0 -47
- package/nodes/utils/matterControllerProfiles/doorLock.js +0 -258
- package/nodes/utils/matterControllerProfiles/fan.js +0 -19
- package/nodes/utils/matterControllerProfiles/index.js +0 -34
- package/nodes/utils/matterControllerProfiles/mappedEndpoint.js +0 -217
- package/nodes/utils/matterControllerProfiles/switch.js +0 -13
- package/nodes/utils/matterControllerProfiles/thermostat.js +0 -19
- package/nodes/utils/matterControllerProfiles/universal.js +0 -462
- package/nodes/utils/matterControllerProfiles/windowCovering.js +0 -19
- package/nodes/utils/matterControllerSemanticInput.js +0 -212
- package/nodes/utils/matterEngine.mjs +0 -894
- package/nodes/utils/matterEnvironmentLock.mjs +0 -32
- package/nodes/utils/matterKnxConverter.js +0 -204
- package/nodes/utils/matterStorageBackup.js +0 -100
- package/resources/HA-icon.png +0 -0
- package/resources/dim.png +0 -0
- package/resources/rgb.png +0 -0
- package/resources/tunablewhite.png +0 -0
- package/resources/zxing-browser-0.2.0.min.js +0 -1
- package/resources/zxing-browser-LICENSE.txt +0 -21
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
function Ye(r,i){(i==null||i>r.length)&&(i=r.length);for(var s=0,c=Array(i);s<i;s++)c[s]=r[s];return c}function Hn(r){if(Array.isArray(r))return r}function Wn(r,i){var s=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(s!=null){var c,f,d,y,st=[],I=!0,lt=!1;try{if(d=(s=s.call(r)).next,i!==0)for(;!(I=(c=d.call(s)).done)&&(st.push(c.value),st.length!==i);I=!0);}catch(xt){lt=!0,f=xt}finally{try{if(!I&&s.return!=null&&(y=s.return(),Object(y)!==y))return}finally{if(lt)throw f}}return st}}function Gn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bn(r,i){return Hn(r)||Wn(r,i)||Yn(r,i)||Gn()}function Yn(r,i){if(r){if(typeof r=="string")return Ye(r,i);var s={}.toString.call(r).slice(8,-1);return s==="Object"&&r.constructor&&(s=r.constructor.name),s==="Map"||s==="Set"?Array.from(r):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?Ye(r,i):void 0}}const an=Object.entries,je=Object.setPrototypeOf,jn=Object.isFrozen,$n=Object.getPrototypeOf,Xn=Object.getOwnPropertyDescriptor;let S=Object.freeze,b=Object.seal,it=Object.create,sn=typeof Reflect<"u"&&Reflect,se=sn.apply,le=sn.construct;S||(S=function(i){return i});b||(b=function(i){return i});se||(se=function(i,s){for(var c=arguments.length,f=new Array(c>2?c-2:0),d=2;d<c;d++)f[d-2]=arguments[d];return i.apply(s,f)});le||(le=function(i){for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];return new i(...c)});const V=A(Array.prototype.forEach),Vn=A(Array.prototype.lastIndexOf),$e=A(Array.prototype.pop),dt=A(Array.prototype.push),qn=A(Array.prototype.splice),at=Array.isArray,_t=A(String.prototype.toLowerCase),ee=A(String.prototype.toString),Xe=A(String.prototype.match),Tt=A(String.prototype.replace),Ve=A(String.prototype.indexOf),Kn=A(String.prototype.trim),Zn=A(Number.prototype.toString),Jn=A(Boolean.prototype.toString),qe=typeof BigInt>"u"?null:A(BigInt.prototype.toString),Ke=typeof Symbol>"u"?null:A(Symbol.prototype.toString),N=A(Object.prototype.hasOwnProperty),ht=A(Object.prototype.toString),O=A(RegExp.prototype.test),X=Qn(TypeError);function A(r){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];return se(r,i,c)}}function Qn(r){return function(){for(var i=arguments.length,s=new Array(i),c=0;c<i;c++)s[c]=arguments[c];return le(r,s)}}function p(r,i){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_t;if(je&&je(r,null),!at(i))return r;let c=i.length;for(;c--;){let f=i[c];if(typeof f=="string"){const d=s(f);d!==f&&(jn(i)||(i[c]=d),f=d)}r[f]=!0}return r}function to(r){for(let i=0;i<r.length;i++)N(r,i)||(r[i]=null);return r}function C(r){const i=it(null);for(const c of an(r)){var s=Bn(c,2);const f=s[0],d=s[1];N(r,f)&&(at(d)?i[f]=to(d):d&&typeof d=="object"&&d.constructor===Object?i[f]=C(d):i[f]=d)}return i}function eo(r){switch(typeof r){case"string":return r;case"number":return Zn(r);case"boolean":return Jn(r);case"bigint":return qe?qe(r):"0";case"symbol":return Ke?Ke(r):"Symbol()";case"undefined":return ht(r);case"function":case"object":{if(r===null)return ht(r);const i=r,s=P(i,"toString");if(typeof s=="function"){const c=s(i);return typeof c=="string"?c:ht(c)}return ht(r)}default:return ht(r)}}function P(r,i){for(;r!==null;){const c=Xn(r,i);if(c){if(c.get)return A(c.get);if(typeof c.value=="function")return A(c.value)}r=$n(r)}function s(){return null}return s}function no(r){try{return O(r,""),!0}catch{return!1}}const Ze=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ne=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),oe=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),oo=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),re=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ro=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Je=S(["#text"]),Qe=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),ie=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),tn=S(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Pt=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),io=b(/{{[\w\W]*|^[\w\W]*}}/g),ao=b(/<%[\w\W]*|^[\w\W]*%>/g),so=b(/\${[\w\W]*/g),lo=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),co=b(/^aria-[\-\w]+$/),en=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),uo=b(/^(?:\w+script|data):/i),fo=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),po=b(/^html$/i),mo=b(/^[a-z][.\w]*(-[.\w]+)+$/i),nn=b(/<[/\w!]/g),on=b(/<[/\w]/g),To=b(/<\/no(script|embed|frames)/i),ho=b(/\/>/i),M={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ln=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],_o=S(p({},ln)),go=(function(){const r={};return V(ln,i=>{r[i]=b(new RegExp("</"+i+"(?=[\\t\\n\\f\\r />])","i"))}),S(r)})(),Eo=function(){return typeof window>"u"?null:window},Ao=function(i,s){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let c=null;const f="data-tt-policy-suffix";s&&s.hasAttribute(f)&&(c=s.getAttribute(f));const d="dompurify"+(c?"#"+c:"");try{return i.createPolicy(d,{createHTML(y){return y},createScriptURL(y){return y}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},rn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},W=function(i,s,c,f){return N(i,s)&&at(i[s])?p(f.base?C(f.base):{},i[s],f.transform):c},ae=function(i,s,c){const f=N(i,s)?i[s]:void 0;return f&&typeof f=="object"?C(f):c()};function cn(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Eo();const i=o=>cn(o);if(i.version="3.4.15",i.removed=[],!r||!r.document||r.document.nodeType!==M.document||!r.Element)return i.isSupported=!1,i;let s=r.document;const c=s,f=c.currentScript;r.DocumentFragment;const d=r.HTMLTemplateElement,y=r.Node,st=r.Element,I=r.NodeFilter,lt=r.NamedNodeMap;lt===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;const xt=r.DOMParser,gt=r.trustedTypes,U=st.prototype,un=P(U,"cloneNode"),vt=P(U,"remove"),ce=P(U,"removeAttributeNode"),fn=P(U,"nextSibling"),q=P(U,"childNodes"),K=P(U,"parentNode"),ue=P(U,"shadowRoot"),kt=P(U,"attributes"),G=y&&y.prototype?P(y.prototype,"nodeType"):null,Z=y&&y.prototype?P(y.prototype,"nodeName"):null,Et=y&&y.prototype?P(y.prototype,"ownerDocument"):null,ct=function(t){return G?G(t):t.nodeType},Ut=function(t){return Z?Z(t):t.nodeName};if(typeof d=="function"){const o=s.createElement("template");o.content&&o.content.ownerDocument&&(s=o.content.ownerDocument)}let L,B="",Ft,fe=!1,ut=0;const pe=function(){if(ut>0)throw X('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},J=function(t){pe(),ut++;try{return L.createHTML(t)}finally{ut--}},pn=function(t){pe(),ut++;try{return L.createScriptURL(t)}finally{ut--}},mn=function(){return fe||(Ft=Ao(gt,f),fe=!0),Ft},At=s,zt=At.implementation,me=At.createNodeIterator,dn=At.createDocumentFragment,Tn=At.getElementsByTagName,hn=c.importNode;let T=rn();i.isSupported=typeof an=="function"&&typeof K=="function"&&zt&&zt.createHTMLDocument!==void 0;const _n=io,gn=ao,En=so,An=lo,yn=co,Sn=uo,de=fo,bn=mo;let Te=en,h=null;const Ht=p({},[...Ze,...ne,...oe,...re,...Je]);let _=null;const Wt=p({},[...Qe,...ie,...tn,...Pt]);let x=Object.seal(it(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ft=null,he=null;const F=Object.seal(it(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let _e=!0,Gt=!0,ge=!1,Ee=!0,z=!1,Y=!0,j=!1,Bt=!1,yt=null,St=null,Yt=!1,Q=!1,bt=!1,Ot=!1,Ae=!0,ye=!1;const Se="user-content-";let jt=!0,$t=!1,tt={},et=null;const be=p({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Oe=null;const Re=p({},["audio","video","img","source","image","track"]);let Le=null;const De=p({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rt="http://www.w3.org/1998/Math/MathML",Lt="http://www.w3.org/2000/svg",v="http://www.w3.org/1999/xhtml";let nt=v,Xt=!1,Vt=null;const On=p({},[Rt,Lt,v],ee),we=S(["mi","mo","mn","ms","mtext"]);let qt=p({},we);const Ne=S(["annotation-xml"]);let Kt=p({},Ne);const Rn=p({},["title","style","font","a","script"]);let pt=null;const Ln=["application/xhtml+xml","text/html"],Dn="text/html";let E=null,ot=null;const wn=s.createElement("form"),Ie=function(t){return t instanceof RegExp||t instanceof Function},Zt=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ot&&ot===t)return;(!t||typeof t!="object")&&(t={}),t=C(t),pt=Ln.indexOf(t.PARSER_MEDIA_TYPE)===-1?Dn:t.PARSER_MEDIA_TYPE,E=pt==="application/xhtml+xml"?ee:_t,h=W(t,"ALLOWED_TAGS",Ht,{transform:E}),_=W(t,"ALLOWED_ATTR",Wt,{transform:E}),Vt=W(t,"ALLOWED_NAMESPACES",On,{transform:ee}),Le=W(t,"ADD_URI_SAFE_ATTR",De,{transform:E,base:De}),Oe=W(t,"ADD_DATA_URI_TAGS",Re,{transform:E,base:Re}),et=W(t,"FORBID_CONTENTS",be,{transform:E}),ft=W(t,"FORBID_TAGS",C({}),{transform:E}),he=W(t,"FORBID_ATTR",C({}),{transform:E}),tt=N(t,"USE_PROFILES")?t.USE_PROFILES&&typeof t.USE_PROFILES=="object"?C(t.USE_PROFILES):t.USE_PROFILES:!1,_e=t.ALLOW_ARIA_ATTR!==!1,Gt=t.ALLOW_DATA_ATTR!==!1,ge=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ee=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,z=t.SAFE_FOR_TEMPLATES||!1,Y=t.SAFE_FOR_XML!==!1,j=t.WHOLE_DOCUMENT||!1,Q=t.RETURN_DOM||!1,bt=t.RETURN_DOM_FRAGMENT||!1,Ot=t.RETURN_TRUSTED_TYPE||!1,Yt=t.FORCE_BODY||!1,Ae=t.SANITIZE_DOM!==!1,ye=t.SANITIZE_NAMED_PROPS||!1,jt=t.KEEP_CONTENT!==!1,$t=t.IN_PLACE||!1,Te=no(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:en,nt=typeof t.NAMESPACE=="string"?t.NAMESPACE:v,qt=ae(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>p({},we)),Kt=ae(t,"HTML_INTEGRATION_POINTS",()=>p({},Ne));const e=ae(t,"CUSTOM_ELEMENT_HANDLING",()=>it(null));if(x=it(null),N(e,"tagNameCheck")&&Ie(e.tagNameCheck)&&(x.tagNameCheck=e.tagNameCheck),N(e,"attributeNameCheck")&&Ie(e.attributeNameCheck)&&(x.attributeNameCheck=e.attributeNameCheck),N(e,"allowCustomizedBuiltInElements")&&typeof e.allowCustomizedBuiltInElements=="boolean"&&(x.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),b(x),z&&(Gt=!1),bt&&(Q=!0),tt&&(h=p({},Je),_=it(null),tt.html===!0&&(p(h,Ze),p(_,Qe)),tt.svg===!0&&(p(h,ne),p(_,ie),p(_,Pt)),tt.svgFilters===!0&&(p(h,oe),p(_,ie),p(_,Pt)),tt.mathMl===!0&&(p(h,re),p(_,tn),p(_,Pt))),F.tagCheck=null,F.attributeCheck=null,N(t,"ADD_TAGS")&&(typeof t.ADD_TAGS=="function"?F.tagCheck=t.ADD_TAGS:at(t.ADD_TAGS)&&(h===Ht&&(h=C(h)),p(h,t.ADD_TAGS,E))),N(t,"ADD_ATTR")&&(typeof t.ADD_ATTR=="function"?F.attributeCheck=t.ADD_ATTR:at(t.ADD_ATTR)&&(_===Wt&&(_=C(_)),p(_,t.ADD_ATTR,E))),N(t,"ADD_FORBID_CONTENTS")&&at(t.ADD_FORBID_CONTENTS)&&(et===be&&(et=C(et)),p(et,t.ADD_FORBID_CONTENTS,E)),jt&&(h["#text"]=!0),j&&p(h,["html","head","body"]),h.table&&(p(h,["tbody"]),delete ft.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw X('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw X('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const n=L;L=t.TRUSTED_TYPES_POLICY;try{B=J("")}catch(a){throw L=n,a}}else t.TRUSTED_TYPES_POLICY===null?(L=void 0,B=""):(L===void 0&&(L=mn()),L&&typeof B=="string"&&(B=J("")));S&&S(t),ot=t},Me=p({},[...ne,...oe,...oo]),Ce=p({},[...re,...ro]),Nn=function(t,e,n){return e.namespaceURI===v?t==="svg":e.namespaceURI===Rt?t==="svg"&&(n==="annotation-xml"||qt[n]):!!Me[t]},In=function(t,e,n){return e.namespaceURI===v?t==="math":e.namespaceURI===Lt?t==="math"&&Kt[n]:!!Ce[t]},Mn=function(t,e,n){return e.namespaceURI===Lt&&!Kt[n]||e.namespaceURI===Rt&&!qt[n]?!1:!Ce[t]&&(Rn[t]||!Me[t])},Cn=function(t){let e=K(t);(!e||!e.tagName)&&(e={namespaceURI:nt,tagName:"template"});const n=_t(t.tagName),a=_t(e.tagName);return Vt[t.namespaceURI]?t.namespaceURI===Lt?Nn(n,e,a):t.namespaceURI===Rt?In(n,e,a):t.namespaceURI===v?Mn(n,e,a):!!(pt==="application/xhtml+xml"&&Vt[t.namespaceURI]):!1},H=function(t){dt(i.removed,{element:t});try{K(t).removeChild(t)}catch{if(vt(t),!K(t))throw X("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Pe=function(t,e,n){try{ce(t,e)}catch{try{t.removeAttribute(n)}catch{}}},Dt=function(t){wt(t);const e=q(t);if(e){const a=[];V(e,l=>{dt(a,l)}),V(a,l=>{try{vt(l)}catch{}})}const n=kt(t);if(n)for(let a=n.length-1;a>=0;--a){const l=n[a],u=l&&l.name;typeof u=="string"&&Pe(t,l,u)}},$=function(t,e,n){if(!n)try{n=e.getAttributeNode(t)}catch{n=null}dt(i.removed,{attribute:n||null,from:e});try{n?ce(e,n):e.removeAttribute(t)}catch{try{e.removeAttribute(t)}catch{}}if(t==="is")if(Q||bt)try{H(e)}catch{}else try{e.setAttribute(t,"")}catch{}},Pn=function(t){const e=kt(t);if(e)for(let n=e.length-1;n>=0;--n){const a=e[n],l=a&&a.name;typeof l!="string"||_[E(l)]||Pe(t,a,l)}},wt=function(t){const e=[t];for(;e.length>0;){const n=e.pop();ct(n)===M.element&&Pn(n);const l=q(n);if(l)for(let u=l.length-1;u>=0;--u)e.push(l[u])}},xe=function(t,e){return Y?t==="patchsrc"?!0:t==="for"&&e!=="label"&&e!=="output":!1},xn=function(t){if(!Y)return;const e=[t];for(;e.length>0;){const n=e.pop(),a=ct(n);if(a===M.processingInstruction||a===M.comment&&O(on,n.data)){try{vt(n)}catch{}continue}if(a===M.element){const u=n,m=E(Ut(n));try{u.hasAttribute&&u.hasAttribute("patchsrc")&&u.removeAttribute("patchsrc"),u.hasAttribute&&u.hasAttribute("for")&&xe("for",m)&&u.removeAttribute("for")}catch{}}const l=q(n);if(l)for(let u=l.length-1;u>=0;--u)e.push(l[u])}},ve=function(t){let e=null,n=null;if(Yt)t="<remove></remove>"+t;else{const u=Xe(t,/^[\r\n\t ]+/);n=u&&u[0]}pt==="application/xhtml+xml"&&nt===v&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=L?J(t):t;if(nt===v)try{e=new xt().parseFromString(a,pt)}catch{}if(!e||!e.documentElement){e=zt.createDocument(nt,"template",null);try{e.documentElement.innerHTML=Xt?B:a}catch{}}const l=e.body||e.documentElement;return t&&n&&l.insertBefore(s.createTextNode(n),l.childNodes[0]||null),nt===v?Tn.call(e,j?"html":"body")[0]:j?e.documentElement:l},ke=function(t){const e=Et?Et(t):t.ownerDocument;return me.call(e||t,t,I.SHOW_ELEMENT|I.SHOW_COMMENT|I.SHOW_TEXT|I.SHOW_PROCESSING_INSTRUCTION|I.SHOW_CDATA_SECTION,null)},Nt=function(t){return t=Tt(t,_n," "),t=Tt(t,gn," "),t=Tt(t,En," "),t},Jt=function(t){var e;t.normalize();const n=Et?Et(t):t.ownerDocument,a=me.call(n||t,t,I.SHOW_TEXT|I.SHOW_COMMENT|I.SHOW_CDATA_SECTION|I.SHOW_PROCESSING_INSTRUCTION,null);let l=a.nextNode();for(;l;)l.data=Nt(l.data),l=a.nextNode();const u=(e=t.querySelectorAll)===null||e===void 0?void 0:e.call(t,"template");u&&V(u,m=>{rt(m.content)&&Jt(m.content)})},It=function(t){const e=Z?Z(t):null;return typeof e!="string"||E(e)!=="form"?!1:typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||t.attributes!==kt(t)||typeof t.removeAttribute!="function"||typeof t.removeAttributeNode!="function"||typeof t.getAttributeNode!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function"||t.nodeType!==G(t)||t.childNodes!==q(t)},rt=function(t){if(!G||typeof t!="object"||t===null)return!1;try{return G(t)===M.documentFragment}catch{return!1}},mt=function(t){if(!G||typeof t!="object"||t===null)return!1;try{return typeof G(t)=="number"}catch{return!1}};function k(o,t,e){o.length!==0&&V(o,n=>{n.call(i,t,e,ot)})}const vn=function(t,e){return!!(Y&&t.hasChildNodes()&&!mt(t.firstElementChild)&&O(nn,t.textContent)&&O(nn,t.innerHTML)||Y&&t.namespaceURI===v&&_o[e]&&(mt(t.firstElementChild)||typeof t.textContent=="string"&&O(go[e],t.textContent))||t.nodeType===M.processingInstruction||Y&&t.nodeType===M.comment&&O(on,t.data))},Mt=function(t,e){if(t instanceof RegExp)return O(t,e);if(t instanceof Function){for(var n=arguments.length,a=new Array(n>2?n-2:0),l=2;l<n;l++)a[l-2]=arguments[l];return!!t(e,...a)}return!1},kn=function(t,e,n){if(!ft[e]&&We(e)&&Mt(x.tagNameCheck,e))return!1;if(jt&&!et[e]){const a=K(t),l=q(t);if(l&&a){const u=l.length;for(let m=u-1;m>=0;--m){const g=t===n?un(l[m],!0):l[m];a.insertBefore(g,fn(t))}}}return H(t),!0},Ue=function(t,e,n,a){return t.length===0?e:e===n||e===a?C(e):e},Fe=function(t,e){return t===e||K(t)!==null?!1:($t&&wt(t),!0)},ze=function(t,e){if(k(T.beforeSanitizeElements,t,null),Fe(t,e))return!0;if(It(t))return H(t),!0;const n=E(Ut(t));if(h=Ue(T.uponSanitizeElement,h,Ht,yt),k(T.uponSanitizeElement,t,{tagName:n,allowedTags:h}),Fe(t,e))return!0;if(vn(t,n))return H(t),!0;if(ft[n]||!(F.tagCheck instanceof Function&&F.tagCheck(n))&&!h[n]){const l=kn(t,n,e);return l===!1&&k(T.afterSanitizeElements,t,null),l}if(ct(t)===M.element&&!Cn(t)||(n==="noscript"||n==="noembed"||n==="noframes")&&O(To,t.innerHTML))return H(t),!0;if(z&&t.nodeType===M.text){const l=Nt(t.textContent);t.textContent!==l&&(dt(i.removed,{element:t.cloneNode()}),t.textContent=l)}return k(T.afterSanitizeElements,t,null),!1},He=function(t,e,n){if(he[e]||xe(e,t)||Ae&&(e==="id"||e==="name")&&(n in s||n in wn))return!1;const a=_[e]||F.attributeCheck instanceof Function&&F.attributeCheck(e,t);return Gt&&O(An,e)||_e&&O(yn,e)?!0:a?Le[e]||O(Te,Tt(n,de,""))||(e==="src"||e==="xlink:href"||e==="href")&&t!=="script"&&Ve(n,"data:")===0&&Oe[t]||ge&&!O(Sn,Tt(n,de,""))?!0:!n:We(t)&&Mt(x.tagNameCheck,t)&&Mt(x.attributeNameCheck,e,t)||e==="is"&&x.allowCustomizedBuiltInElements&&Mt(x.tagNameCheck,n)},Un=p({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),We=function(t){return!Un[_t(t)]&&O(bn,t)},Fn=function(t,e,n,a){if(L&&typeof gt=="object"&&typeof gt.getAttributeType=="function"&&!n)switch(gt.getAttributeType(t,e)){case"TrustedHTML":return J(a);case"TrustedScriptURL":return pn(a)}return a},zn=function(t,e,n,a){try{return n?t.setAttributeNS(n,e,a):t.setAttribute(e,a),It(t)?(H(t),!1):!0}catch{return $(e,t),!1}},Ge=function(t){k(T.beforeSanitizeAttributes,t,null);const e=t.attributes;if(!e||It(t))return;_=Ue(T.uponSanitizeAttribute,_,Wt,St);const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_,forceKeepAttr:void 0};let a=e.length;const l=E(t.nodeName);for(;a--;){const u=e[a],m=u.name,g=u.namespaceURI,D=u.value,w=E(m),te=D;let R=m==="value"?te:Kn(te),Be=!1;if(n.attrName=w,n.attrValue=R,n.keepAttr=!0,n.forceKeepAttr=void 0,k(T.uponSanitizeAttribute,t,n),R=n.attrValue,ye&&(w==="id"||w==="name")&&Ve(R,Se)!==0&&($(m,t,u),R=Se+R,Be=!0),Y&&O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,R)){$(m,t,u);continue}if(w==="attributename"&&Xe(R,"href")){$(m,t,u);continue}if(!n.forceKeepAttr){if(!n.keepAttr){$(m,t,u);continue}if(!Ee&&O(ho,R)){$(m,t,u);continue}if(z&&(R=Nt(R)),!He(l,w,R)){$(m,t,u);continue}R=Fn(l,w,g,R),R!==te&&zn(t,m,g,R)&&Be&&$e(i.removed)}}k(T.afterSanitizeAttributes,t,null)},Ct=function(t){let e=null;const n=ke(t);for(k(T.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)if(k(T.uponSanitizeShadowNode,e,null),ze(e,t),Ge(e),rt(e.content)&&Ct(e.content),ct(e)===M.element){const a=ue(e);rt(a)&&(Qt(a),Ct(a))}k(T.afterSanitizeShadowDOM,t,null)},Qt=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const n=e.pop();if(n.shadow){Ct(n.shadow);continue}const a=n.node,u=ct(a)===M.element,m=q(a);if(m)for(let g=m.length-1;g>=0;--g)e.push({node:m[g],shadow:null});if(u){const g=Z?Z(a):null;if(typeof g=="string"&&E(g)==="template"){const D=a.content;rt(D)&&e.push({node:D,shadow:null})}}if(u){const g=ue(a);rt(g)&&e.push({node:null,shadow:g},{node:g,shadow:null})}}};return i.sanitize=function(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,n=null,a=null,l=null;if(Xt=!o,Xt&&(o="<!-->"),typeof o!="string"&&!mt(o)&&(o=eo(o),typeof o!="string"))throw X("dirty is not a string, aborting");if(!i.isSupported)return o;Bt?(h=yt,_=St):Zt(t),(T.uponSanitizeElement.length>0||T.uponSanitizeAttribute.length>0)&&(h=C(h)),T.uponSanitizeAttribute.length>0&&(_=C(_)),i.removed=[];const u=$t&&typeof o!="string"&&mt(o);if(u){xn(o);const D=Ut(o);if(typeof D=="string"){const w=E(D);if(!h[w]||ft[w])throw Dt(o),X("root node is forbidden and cannot be sanitized in-place")}if(It(o))throw Dt(o),X("root node is clobbered and cannot be sanitized in-place");try{Qt(o)}catch(w){throw Dt(o),w}}else if(mt(o))e=ve("<!---->"),n=e.ownerDocument.importNode(o,!0),n.nodeType===M.element&&n.nodeName==="BODY"||n.nodeName==="HTML"?e=n:e.appendChild(n),Qt(e);else{if(!Q&&!z&&!j&&o.indexOf("<")===-1)return L&&Ot?J(o):o;if(e=ve(o),!e)return Q?null:Ot?B:""}e&&Yt&&H(e.firstChild);const m=u?o:e;try{const D=ke(m);for(;a=D.nextNode();)ze(a,m),Ge(a),rt(a.content)&&Ct(a.content)}catch(D){throw u&&(Dt(o),V(i.removed,w=>{w.element&&wt(w.element)})),D}if(u)return V(i.removed,D=>{D.element&&wt(D.element)}),z&&Jt(o),o;if(Q){if(z&&Jt(e),bt)for(l=dn.call(e.ownerDocument);e.firstChild;)l.appendChild(e.firstChild);else l=e;return(_.shadowroot||_.shadowrootmode)&&(l=hn.call(c,l,!0)),l}let g=j?e.outerHTML:e.innerHTML;return j&&h["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&O(po,e.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+e.ownerDocument.doctype.name+`>
|
|
3
|
-
`+g),z&&(g=Nt(g)),L&&Ot?J(g):g},i.setConfig=function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zt(o),Bt=!0,yt=h,St=_},i.clearConfig=function(){ot=null,Bt=!1,yt=null,St=null,L=Ft,B=""},i.isValidAttribute=function(o,t,e){ot||Zt({});const n=E(o),a=E(t);return He(n,a,e)},i.addHook=function(o,t){typeof t=="function"&&N(T,o)&&dt(T[o],t)},i.removeHook=function(o,t){if(N(T,o)){if(t!==void 0){const e=Vn(T[o],t);return e===-1?void 0:qn(T[o],e,1)[0]}return $e(T[o])}},i.removeHooks=function(o){N(T,o)&&(T[o]=[])},i.removeAllHooks=function(){T=rn()},i}var So=cn();export{So as default};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>Cerebrum Ultimate Vue Preview</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/app.js"></script>
|
|
8
|
-
<link rel="stylesheet" crossorigin href="./assets/app.css">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<div id="app"></div>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events'
|
|
2
|
-
import { Agent as HTTPSAgent, request as httpsRequest } from 'node:https'
|
|
3
|
-
import { URL } from 'node:url'
|
|
4
|
-
import { TextDecoder } from 'node:util'
|
|
5
|
-
import { setTimeout as delay } from 'timers/promises'
|
|
6
|
-
|
|
7
|
-
const createAbortError = () => {
|
|
8
|
-
const err = new Error('The operation was aborted')
|
|
9
|
-
err.name = 'AbortError'
|
|
10
|
-
return err
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const openEventStream = (url, { headers = {}, agent, signal } = {}) => {
|
|
14
|
-
return new Promise((resolve, reject) => {
|
|
15
|
-
let response = null
|
|
16
|
-
let requestInstance = null
|
|
17
|
-
let settled = false
|
|
18
|
-
|
|
19
|
-
const safeResolve = (value) => {
|
|
20
|
-
if (settled) return
|
|
21
|
-
settled = true
|
|
22
|
-
resolve(value)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const safeReject = (error) => {
|
|
26
|
-
if (settled) return
|
|
27
|
-
settled = true
|
|
28
|
-
reject(error)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const cleanup = () => {
|
|
32
|
-
if (signal) signal.removeEventListener('abort', onAbort)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const onAbort = () => {
|
|
36
|
-
const abortErr = createAbortError()
|
|
37
|
-
if (response && typeof response.destroy === 'function') {
|
|
38
|
-
response.destroy(abortErr)
|
|
39
|
-
} else if (requestInstance && typeof requestInstance.destroy === 'function') {
|
|
40
|
-
requestInstance.destroy(abortErr)
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const target = new URL(url)
|
|
45
|
-
const options = {
|
|
46
|
-
protocol: target.protocol,
|
|
47
|
-
hostname: target.hostname,
|
|
48
|
-
port: target.port || (target.protocol === 'https:' ? 443 : 80),
|
|
49
|
-
path: `${target.pathname}${target.search}`,
|
|
50
|
-
method: 'GET',
|
|
51
|
-
headers,
|
|
52
|
-
agent
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
requestInstance = httpsRequest(options, (res) => {
|
|
56
|
-
response = res
|
|
57
|
-
res.once('close', cleanup)
|
|
58
|
-
res.once('error', cleanup)
|
|
59
|
-
safeResolve(res)
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
requestInstance.on('error', (error) => {
|
|
63
|
-
cleanup()
|
|
64
|
-
safeReject(error)
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
requestInstance.end()
|
|
68
|
-
|
|
69
|
-
if (signal) {
|
|
70
|
-
if (signal.aborted) {
|
|
71
|
-
onAbort()
|
|
72
|
-
cleanup()
|
|
73
|
-
safeReject(createAbortError())
|
|
74
|
-
return
|
|
75
|
-
}
|
|
76
|
-
signal.addEventListener('abort', onAbort)
|
|
77
|
-
}
|
|
78
|
-
})
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
class HueEventStream extends EventEmitter {
|
|
82
|
-
constructor (url, { headers = {}, reconnectInterval = 5000 } = {}) {
|
|
83
|
-
super()
|
|
84
|
-
this.url = url
|
|
85
|
-
this.headers = headers
|
|
86
|
-
this.reconnectInterval = reconnectInterval
|
|
87
|
-
this.abortController = null
|
|
88
|
-
this.agent = new HTTPSAgent({
|
|
89
|
-
rejectUnauthorized: false
|
|
90
|
-
})
|
|
91
|
-
this.connected = false
|
|
92
|
-
this._start()
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
async _start () {
|
|
96
|
-
while (true) {
|
|
97
|
-
try {
|
|
98
|
-
this.abortController = new AbortController()
|
|
99
|
-
const res = await openEventStream(this.url, {
|
|
100
|
-
headers: this.headers,
|
|
101
|
-
agent: this.agent,
|
|
102
|
-
signal: this.abortController.signal
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
if (res.statusCode !== 200) {
|
|
106
|
-
res.resume?.()
|
|
107
|
-
this.emit('error', new Error(`Unexpected status: ${res.statusCode}`))
|
|
108
|
-
await delay(this.reconnectInterval)
|
|
109
|
-
continue
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
this.emit('open')
|
|
113
|
-
this.connected = true
|
|
114
|
-
|
|
115
|
-
let buffer = ''
|
|
116
|
-
const decoder = new TextDecoder()
|
|
117
|
-
for await (const chunk of res) {
|
|
118
|
-
buffer += decoder.decode(chunk, { stream: true })
|
|
119
|
-
|
|
120
|
-
const lines = buffer.split(/\r?\n\r?\n/)
|
|
121
|
-
buffer = lines.pop() // l'ultima parte potrebbe essere incompleta
|
|
122
|
-
|
|
123
|
-
for (const block of lines) {
|
|
124
|
-
const event = this._parseEvent(block)
|
|
125
|
-
if (event) this.emit('message', event)
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
this.emit('close')
|
|
130
|
-
this.connected = false
|
|
131
|
-
await delay(this.reconnectInterval)
|
|
132
|
-
} catch (err) {
|
|
133
|
-
if (err.name !== 'AbortError') {
|
|
134
|
-
this.emit('error', err)
|
|
135
|
-
await delay(this.reconnectInterval)
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
_parseEvent (block) {
|
|
142
|
-
const lines = block.split(/\r?\n/)
|
|
143
|
-
let data = ''
|
|
144
|
-
let event = 'message'
|
|
145
|
-
|
|
146
|
-
for (const line of lines) {
|
|
147
|
-
if (line.startsWith('data:')) {
|
|
148
|
-
data += line.slice(5).trim()
|
|
149
|
-
} else if (line.startsWith('event:')) {
|
|
150
|
-
event = line.slice(6).trim()
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
try {
|
|
155
|
-
return {
|
|
156
|
-
type: event,
|
|
157
|
-
data: data ? JSON.parse(data) : null
|
|
158
|
-
}
|
|
159
|
-
} catch (e) {
|
|
160
|
-
return {
|
|
161
|
-
type: event,
|
|
162
|
-
data: data || null
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
close () {
|
|
168
|
-
if (this.abortController) {
|
|
169
|
-
this.abortController.abort()
|
|
170
|
-
this.abortController = null
|
|
171
|
-
}
|
|
172
|
-
this.connected = false
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export { HueEventStream }
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
/**
|
|
3
|
-
* Calculate XY color points for a given RGB value.
|
|
4
|
-
* @param {number} red RGB red value (0-255)
|
|
5
|
-
* @param {number} green RGB green value (0-255)
|
|
6
|
-
* @param {number} blue RGB blue value (0-255)
|
|
7
|
-
* @param {object} lampGamut Hue bulb gamut range (the lamp provides a gamut object red:{x:1,y:1}, etc)
|
|
8
|
-
* @returns {number[]}
|
|
9
|
-
*/
|
|
10
|
-
calculateXYFromRGB (red, green, blue, lampGamut) {
|
|
11
|
-
red /= 255
|
|
12
|
-
green /= 255
|
|
13
|
-
blue /= 255
|
|
14
|
-
const r = red > 0.04045 ? ((red + 0.055) / 1.055) ** 2.4000000953674316 : red / 12.92
|
|
15
|
-
const g = green > 0.04045 ? ((green + 0.055) / 1.055) ** 2.4000000953674316 : green / 12.92
|
|
16
|
-
const b = blue > 0.04045 ? ((blue + 0.055) / 1.055) ** 2.4000000953674316 : blue / 12.92
|
|
17
|
-
const x = r * 0.664511 + g * 0.154324 + b * 0.162028
|
|
18
|
-
const y = r * 0.283881 + g * 0.668433 + b * 0.047685
|
|
19
|
-
const z = r * 8.8E-5 + g * 0.07231 + b * 0.986039
|
|
20
|
-
const xy = [x / (x + y + z), y / (x + y + z)]
|
|
21
|
-
if (isNaN(xy[0])) {
|
|
22
|
-
xy[0] = 0.0
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (isNaN(xy[1])) {
|
|
26
|
-
xy[1] = 0.0
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (lampGamut !== null && lampGamut !== undefined) {
|
|
30
|
-
const colorPoints = [[lampGamut.red.x, lampGamut.red.y], [lampGamut.green.x, lampGamut.green.y], [lampGamut.blue.x, lampGamut.blue.y]]
|
|
31
|
-
const inReachOfLamps = checkPointInLampsReach(xy, lampGamut)
|
|
32
|
-
if (!inReachOfLamps) {
|
|
33
|
-
const pAB = getClosestPointToPoints(colorPoints[0], colorPoints[1], xy)
|
|
34
|
-
const pAC = getClosestPointToPoints(colorPoints[2], colorPoints[0], xy)
|
|
35
|
-
const pBC = getClosestPointToPoints(colorPoints[1], colorPoints[2], xy)
|
|
36
|
-
const dAB = getDistanceBetweenTwoPoints(xy, pAB)
|
|
37
|
-
const dAC = getDistanceBetweenTwoPoints(xy, pAC)
|
|
38
|
-
const dBC = getDistanceBetweenTwoPoints(xy, pBC)
|
|
39
|
-
let lowest = dAB
|
|
40
|
-
let closestPoint = pAB
|
|
41
|
-
if (dAC < dAB) {
|
|
42
|
-
lowest = dAC
|
|
43
|
-
closestPoint = pAC
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (dBC < lowest) {
|
|
47
|
-
closestPoint = pBC
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
xy[0] = closestPoint[0]
|
|
51
|
-
xy[1] = closestPoint[1]
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
xy[0] = precision(xy[0])
|
|
55
|
-
xy[1] = precision(xy[1])
|
|
56
|
-
|
|
57
|
-
// Check boundary (min 0, max 1)
|
|
58
|
-
xy[0] = xy[0] < 0 ? 0 : xy[0]
|
|
59
|
-
xy[0] = xy[0] > 1 ? 1 : xy[0]
|
|
60
|
-
xy[1] = xy[1] < 0 ? 0 : xy[1]
|
|
61
|
-
xy[1] = xy[1] > 1 ? 1 : xy[1]
|
|
62
|
-
|
|
63
|
-
return { x: xy[0], y: xy[1] }
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function crossProduct (point1, point2) {
|
|
68
|
-
return point1[0] * point2[1] - point1[1] * point2[0]
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function checkPointInLampsReach (point, lampGamutObject) {
|
|
72
|
-
if (point != null && lampGamutObject != null) {
|
|
73
|
-
const { red } = lampGamutObject
|
|
74
|
-
const { green } = lampGamutObject
|
|
75
|
-
const { blue } = lampGamutObject
|
|
76
|
-
const v1 = [green.x - red.x, green.y - red.y]
|
|
77
|
-
const v2 = [blue.x - red.x, blue.y - red.y]
|
|
78
|
-
const q = [point[0] - red.x, point[1] - red.y]
|
|
79
|
-
const s = crossProduct(q, v2) / crossProduct(v1, v2)
|
|
80
|
-
const t = crossProduct(v1, q) / crossProduct(v1, v2)
|
|
81
|
-
return s >= 0.0 && t >= 0.0 && s + t <= 1.0
|
|
82
|
-
}
|
|
83
|
-
return false
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function getClosestPointToPoints (pointA, pointB, pointP) {
|
|
87
|
-
if (pointA != null && pointB != null && pointP != null) {
|
|
88
|
-
const pointAP = [pointP[0] - pointA[0], pointP[1] - pointA[1]]
|
|
89
|
-
const pointAB = [pointB[0] - pointA[0], pointB[1] - pointA[1]]
|
|
90
|
-
const ab2 = pointAB[0] * pointAB[0] + pointAB[1] * pointAB[1]
|
|
91
|
-
const apAb = pointAP[0] * pointAB[0] + pointAP[1] * pointAB[1]
|
|
92
|
-
let t = apAb / ab2
|
|
93
|
-
if (t < 0.0) {
|
|
94
|
-
t = 0.0
|
|
95
|
-
} else if (t > 1.0) {
|
|
96
|
-
t = 1.0
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return [pointA[0] + pointAB[0] * t, pointA[1] + pointAB[1] * t]
|
|
100
|
-
}
|
|
101
|
-
return null
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function getDistanceBetweenTwoPoints (pointA, pointB) {
|
|
105
|
-
const dx = pointA[0] - pointB[0]
|
|
106
|
-
const dy = pointA[1] - pointB[1]
|
|
107
|
-
const dist = Math.sqrt(dx * dx + dy * dy)
|
|
108
|
-
return dist
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function precision (d) {
|
|
112
|
-
return Math.round(10000.0 * d) / 10000.0
|
|
113
|
-
}
|