insteon-frontend-home-assistant 0.3.2__py3-none-any.whl → 0.3.4__py3-none-any.whl

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.

Potentially problematic release.


This version of insteon-frontend-home-assistant might be problematic. Click here for more details.

Files changed (87) hide show
  1. insteon_frontend/constants.py +1 -1
  2. insteon_frontend/{entrypoint-34178dea.js → entrypoint-805dad43.js} +2 -2
  3. insteon_frontend/entrypoint-805dad43.js.gz +0 -0
  4. insteon_frontend/entrypoint-fbe0ce27.js +16 -0
  5. insteon_frontend/entrypoint-fbe0ce27.js.gz +0 -0
  6. insteon_frontend/frontend_es5/2ef4f4ba.js +2 -0
  7. insteon_frontend/frontend_es5/2ef4f4ba.js.gz +0 -0
  8. insteon_frontend/frontend_es5/6419e8c2.js +2 -0
  9. insteon_frontend/frontend_es5/6419e8c2.js.gz +0 -0
  10. insteon_frontend/frontend_es5/a02336a2.js +2 -0
  11. insteon_frontend/frontend_es5/a02336a2.js.gz +0 -0
  12. insteon_frontend/frontend_es5/{2ce83def.js → c4d6bf84.js} +1 -1
  13. insteon_frontend/frontend_es5/c4d6bf84.js.gz +0 -0
  14. insteon_frontend/frontend_es5/c52f8a9d.js +2 -0
  15. insteon_frontend/frontend_es5/c52f8a9d.js.gz +0 -0
  16. insteon_frontend/frontend_es5/d20f3e47.js +2 -0
  17. insteon_frontend/frontend_es5/d20f3e47.js.gz +0 -0
  18. insteon_frontend/frontend_es5/{entrypoint-ca6ab8c2.js → entrypoint-877f2520.js} +2 -2
  19. insteon_frontend/frontend_es5/entrypoint-877f2520.js.gz +0 -0
  20. insteon_frontend/frontend_es5/entrypoint-acae4cac.js +2 -0
  21. insteon_frontend/frontend_es5/entrypoint-acae4cac.js.LICENSE.txt +134 -0
  22. insteon_frontend/frontend_es5/entrypoint-acae4cac.js.gz +0 -0
  23. insteon_frontend/frontend_es5/manifest.json +1 -1
  24. insteon_frontend/frontend_latest/{c825c48d.js → 122cc134.js} +2 -2
  25. insteon_frontend/frontend_latest/122cc134.js.gz +0 -0
  26. insteon_frontend/frontend_latest/{c825c48d.js.map → 122cc134.js.map} +1 -1
  27. insteon_frontend/frontend_latest/{f42f213e.js → 152db136.js} +3 -3
  28. insteon_frontend/frontend_latest/152db136.js.gz +0 -0
  29. insteon_frontend/frontend_latest/152db136.js.map +1 -0
  30. insteon_frontend/frontend_latest/1972789a.js +106 -0
  31. insteon_frontend/frontend_latest/1972789a.js.gz +0 -0
  32. insteon_frontend/frontend_latest/{055f55c1.js.map → 1972789a.js.map} +1 -1
  33. insteon_frontend/frontend_latest/{eb18a35e.js → 24065ffe.js} +2 -2
  34. insteon_frontend/frontend_latest/24065ffe.js.gz +0 -0
  35. insteon_frontend/frontend_latest/{eb18a35e.js.map → 24065ffe.js.map} +1 -1
  36. insteon_frontend/frontend_latest/{3720fc56.js → 36f999eb.js} +3 -3
  37. insteon_frontend/frontend_latest/36f999eb.js.gz +0 -0
  38. insteon_frontend/frontend_latest/{3720fc56.js.map → 36f999eb.js.map} +1 -1
  39. insteon_frontend/frontend_latest/{451cad84.js → 6bdb6d31.js} +2 -2
  40. insteon_frontend/frontend_latest/6bdb6d31.js.gz +0 -0
  41. insteon_frontend/frontend_latest/{451cad84.js.map → 6bdb6d31.js.map} +1 -1
  42. insteon_frontend/frontend_latest/{entrypoint-34178dea.js → entrypoint-805dad43.js} +4 -4
  43. insteon_frontend/frontend_latest/entrypoint-805dad43.js.gz +0 -0
  44. insteon_frontend/frontend_latest/{entrypoint-34178dea.js.map → entrypoint-805dad43.js.map} +1 -1
  45. insteon_frontend/frontend_latest/entrypoint-fbe0ce27.js +1260 -0
  46. insteon_frontend/frontend_latest/entrypoint-fbe0ce27.js.LICENSE.txt +152 -0
  47. insteon_frontend/frontend_latest/entrypoint-fbe0ce27.js.gz +0 -0
  48. insteon_frontend/frontend_latest/entrypoint-fbe0ce27.js.map +1 -0
  49. insteon_frontend/frontend_latest/manifest.json +1 -1
  50. insteon_frontend_git/constants.py +2 -0
  51. {insteon_frontend_home_assistant-0.3.2.dist-info → insteon_frontend_home_assistant-0.3.4.dist-info}/METADATA +1 -1
  52. {insteon_frontend_home_assistant-0.3.2.dist-info → insteon_frontend_home_assistant-0.3.4.dist-info}/RECORD +64 -54
  53. insteon_frontend_home_assistant-0.3.4.dist-info/top_level.txt +2 -0
  54. insteon_frontend/entrypoint-34178dea.js.gz +0 -0
  55. insteon_frontend/frontend_es5/08a50ea3.js +0 -2
  56. insteon_frontend/frontend_es5/08a50ea3.js.gz +0 -0
  57. insteon_frontend/frontend_es5/2ce83def.js.gz +0 -0
  58. insteon_frontend/frontend_es5/5684895d.js +0 -2
  59. insteon_frontend/frontend_es5/5684895d.js.gz +0 -0
  60. insteon_frontend/frontend_es5/6bdcda43.js +0 -2
  61. insteon_frontend/frontend_es5/6bdcda43.js.gz +0 -0
  62. insteon_frontend/frontend_es5/a724d8fb.js +0 -2
  63. insteon_frontend/frontend_es5/a724d8fb.js.gz +0 -0
  64. insteon_frontend/frontend_es5/d40d49d3.js +0 -2
  65. insteon_frontend/frontend_es5/d40d49d3.js.gz +0 -0
  66. insteon_frontend/frontend_es5/entrypoint-ca6ab8c2.js.gz +0 -0
  67. insteon_frontend/frontend_latest/055f55c1.js +0 -106
  68. insteon_frontend/frontend_latest/055f55c1.js.gz +0 -0
  69. insteon_frontend/frontend_latest/3720fc56.js.gz +0 -0
  70. insteon_frontend/frontend_latest/451cad84.js.gz +0 -0
  71. insteon_frontend/frontend_latest/c825c48d.js.gz +0 -0
  72. insteon_frontend/frontend_latest/eb18a35e.js.gz +0 -0
  73. insteon_frontend/frontend_latest/entrypoint-34178dea.js.gz +0 -0
  74. insteon_frontend/frontend_latest/f42f213e.js.gz +0 -0
  75. insteon_frontend/frontend_latest/f42f213e.js.map +0 -1
  76. insteon_frontend_home_assistant-0.3.2.dist-info/top_level.txt +0 -1
  77. /insteon_frontend/frontend_es5/{08a50ea3.js.LICENSE.txt → 2ef4f4ba.js.LICENSE.txt} +0 -0
  78. /insteon_frontend/frontend_es5/{5684895d.js.LICENSE.txt → 6419e8c2.js.LICENSE.txt} +0 -0
  79. /insteon_frontend/frontend_es5/{6bdcda43.js.LICENSE.txt → a02336a2.js.LICENSE.txt} +0 -0
  80. /insteon_frontend/frontend_es5/{2ce83def.js.LICENSE.txt → c4d6bf84.js.LICENSE.txt} +0 -0
  81. /insteon_frontend/frontend_es5/{a724d8fb.js.LICENSE.txt → c52f8a9d.js.LICENSE.txt} +0 -0
  82. /insteon_frontend/frontend_es5/{d40d49d3.js.LICENSE.txt → d20f3e47.js.LICENSE.txt} +0 -0
  83. /insteon_frontend/frontend_es5/{entrypoint-ca6ab8c2.js.LICENSE.txt → entrypoint-877f2520.js.LICENSE.txt} +0 -0
  84. /insteon_frontend/frontend_latest/{451cad84.js.LICENSE.txt → 6bdb6d31.js.LICENSE.txt} +0 -0
  85. /insteon_frontend/frontend_latest/{entrypoint-34178dea.js.LICENSE.txt → entrypoint-805dad43.js.LICENSE.txt} +0 -0
  86. {insteon_frontend_home_assistant-0.3.2.dist-info → insteon_frontend_home_assistant-0.3.4.dist-info}/LICENSE +0 -0
  87. {insteon_frontend_home_assistant-0.3.2.dist-info → insteon_frontend_home_assistant-0.3.4.dist-info}/WHEEL +0 -0
@@ -0,0 +1,134 @@
1
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
2
+
3
+ /**
4
+ * @license
5
+ * Copyright 2017 Google LLC
6
+ * SPDX-License-Identifier: BSD-3-Clause
7
+ */
8
+
9
+ /**
10
+ * @fileoverview
11
+ * @suppress {checkPrototypalTypes}
12
+ * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
13
+ * This code may only be used under the BSD style license found at
14
+ * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
15
+ * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
16
+ * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
17
+ * Google as part of the polymer project is also subject to an additional IP
18
+ * rights grant found at http://polymer.github.io/PATENTS.txt
19
+ */
20
+
21
+ /**
22
+ * @license
23
+ * Copyright 2016 Google Inc.
24
+ *
25
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
26
+ * of this software and associated documentation files (the "Software"), to deal
27
+ * in the Software without restriction, including without limitation the rights
28
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29
+ * copies of the Software, and to permit persons to whom the Software is
30
+ * furnished to do so, subject to the following conditions:
31
+ *
32
+ * The above copyright notice and this permission notice shall be included in
33
+ * all copies or substantial portions of the Software.
34
+ *
35
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
38
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
40
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
41
+ * THE SOFTWARE.
42
+ */
43
+
44
+ /**
45
+ * @license
46
+ * Copyright 2017 Google LLC
47
+ * SPDX-License-Identifier: BSD-3-Clause
48
+ */
49
+
50
+ /**
51
+ * @license
52
+ * Copyright 2018 Google Inc.
53
+ *
54
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
55
+ * of this software and associated documentation files (the "Software"), to deal
56
+ * in the Software without restriction, including without limitation the rights
57
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
58
+ * copies of the Software, and to permit persons to whom the Software is
59
+ * furnished to do so, subject to the following conditions:
60
+ *
61
+ * The above copyright notice and this permission notice shall be included in
62
+ * all copies or substantial portions of the Software.
63
+ *
64
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
65
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
66
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
67
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
68
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
69
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
70
+ * THE SOFTWARE.
71
+ */
72
+
73
+ /**
74
+ * @license
75
+ * Copyright 2018 Google LLC
76
+ * SPDX-License-Identifier: Apache-2.0
77
+ */
78
+
79
+ /**
80
+ * @license
81
+ * Copyright 2018 Google LLC
82
+ * SPDX-License-Identifier: BSD-3-Clause
83
+ */
84
+
85
+ /**
86
+ * @license
87
+ * Copyright 2019 Google LLC
88
+ * SPDX-License-Identifier: Apache-2.0
89
+ */
90
+
91
+ /**
92
+ * @license
93
+ * Copyright 2019 Google LLC
94
+ * SPDX-License-Identifier: BSD-3-Clause
95
+ */
96
+
97
+ /**
98
+ * @license
99
+ * Copyright 2020 Google LLC
100
+ * SPDX-License-Identifier: Apache-2.0
101
+ */
102
+
103
+ /**
104
+ * @license
105
+ * Copyright 2021 Google LLC
106
+ * SPDX-LIcense-Identifier: Apache-2.0
107
+ */
108
+
109
+ /**
110
+ * @license
111
+ * Copyright 2021 Google LLC
112
+ * SPDX-License-Identifier: Apache-2.0
113
+ */
114
+
115
+ /**
116
+ @license
117
+ Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
118
+ This code may only be used under the BSD style license found at
119
+ http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
120
+ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
121
+ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
122
+ part of the polymer project is also subject to an additional IP rights grant
123
+ found at http://polymer.github.io/PATENTS.txt
124
+ */
125
+
126
+ /**
127
+ @license
128
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
129
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
130
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
131
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
132
+ Code distributed by Google as part of the polymer project is also
133
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
134
+ */
@@ -1,3 +1,3 @@
1
1
  {
2
- "entrypoint.js": "/insteon_static/frontend_es5/entrypoint-ca6ab8c2.js"
2
+ "entrypoint.js": "/insteon_static/frontend_es5/entrypoint-acae4cac.js"
3
3
  }
@@ -21,5 +21,5 @@
21
21
  ::slotted([disabled]) {
22
22
  color: var(--disabled-text-color);
23
23
  }
24
- `}}]}}),i.oi)},9293:(e,t,r)=>{var i=r(856),n=r(8426);class o extends n.H3{static get template(){return i.d` [[_getDescription(hass, domain, service)]] `}static get properties(){return{hass:Object,domain:String,service:String}}_getDescription(e,t,r){const i=e.services[t];if(!i)return"";const n=i[r];return n?n.description:""}}customElements.define("ha-service-description",o)},1285:(e,t,r)=>{r.d(t,{D9:()=>l,Ys:()=>a,g7:()=>s});var i=r(8394);const n=()=>Promise.all([r.e(5084),r.e(4338)]).then(r.bind(r,4338)),o=(e,t,r)=>new Promise((o=>{const a=t.cancel,s=t.confirm;(0,i.B)(e,"show-dialog",{dialogTag:"dialog-box",dialogImport:n,dialogParams:{...t,...r,cancel:()=>{o(!(null==r||!r.prompt)&&null),a&&a()},confirm:e=>{o(null==r||!r.prompt||e),s&&s(e)}}})})),a=(e,t)=>o(e,t),s=(e,t)=>o(e,t,{confirmation:!0}),l=(e,t)=>o(e,t,{prompt:!0})},8846:(e,t,r)=>{r.d(t,{CL:()=>w,CN:()=>v,Co:()=>a,Cy:()=>l,DT:()=>E,GU:()=>g,Ho:()=>C,Jz:()=>_,Kw:()=>u,N2:()=>f,NC:()=>s,NL:()=>y,Qs:()=>m,SL:()=>d,di:()=>b,i:()=>i,kT:()=>S,o5:()=>n,rW:()=>p,tW:()=>c,tw:()=>h,yq:()=>k,zM:()=>o});const i=e=>e.callWS({type:"insteon/scenes/get"}),n=(e,t)=>e.callWS({type:"insteon/scene/get",scene_id:t}),o=(e,t)=>e.callWS({type:"insteon/device/get",device_id:t}),a=(e,t)=>e.callWS({type:"insteon/aldb/get",device_address:t}),s=(e,t,r)=>e.callWS({type:"insteon/properties/get",device_address:t,show_advanced:r}),l=(e,t,r)=>e.callWS({type:"insteon/aldb/change",device_address:t,record:r}),d=(e,t,r,i)=>e.callWS({type:"insteon/properties/change",device_address:t,name:r,value:i}),c=(e,t,r,i)=>e.callWS({type:"insteon/scene/save",name:i,scene_id:t,links:r}),u=(e,t)=>e.callWS({type:"insteon/scene/delete",scene_id:t}),p=e=>e.callWS({type:"insteon/device/add/cancel"}),f=(e,t,r)=>e.callWS({type:"insteon/aldb/create",device_address:t,record:r}),m=(e,t)=>e.callWS({type:"insteon/aldb/load",device_address:t}),h=(e,t)=>e.callWS({type:"insteon/properties/load",device_address:t}),y=(e,t)=>e.callWS({type:"insteon/aldb/write",device_address:t}),v=(e,t)=>e.callWS({type:"insteon/properties/write",device_address:t}),g=(e,t)=>e.callWS({type:"insteon/aldb/reset",device_address:t}),b=(e,t)=>e.callWS({type:"insteon/properties/reset",device_address:t}),k=(e,t)=>e.callWS({type:"insteon/aldb/add_default_links",device_address:t}),w=e=>[{name:"mode",options:[["c",e.localize("aldb.mode.controller")],["r",e.localize("aldb.mode.responder")]],required:!0,type:"select"},{name:"group",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"target",required:!0,type:"string"},{name:"data1",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data2",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data3",required:!0,type:"integer",valueMin:-1,valueMax:255}],E=e=>[{name:"in_use",required:!0,type:"boolean"},...w(e)],_=e=>[{name:"multiple",required:!0,type:"boolean"},{name:"address",required:!1,type:e?"constant":"string"}],S=[{name:"data1",required:!0,type:"integer"},{name:"data2",required:!0,type:"integer"},{name:"data3",required:!0,type:"integer"}],C={name:"ramp_rate",options:[["31","0.1"],["30","0.2"],["29","0.3"],["28","0.5"],["27","2"],["26","4.5"],["25","6.5"],["24","8.5"],["23","19"],["22","21.5"],["21","23.5"],["20","26"],["19","28"],["18","30"],["17","32"],["16","34"],["15","38.5"],["14","43"],["13","47"],["12","60"],["11","90"],["10","120"],["9","150"],["8","180"],["7","210"],["6","240"],["5","270"],["4","300"],["3","360"],["2","420"],["1","480"]],required:!0,type:"select"}}}]);
25
- //# sourceMappingURL=c825c48d.js.map
24
+ `}}]}}),i.oi)},9293:(e,t,r)=>{var i=r(856),n=r(8426);class o extends n.H3{static get template(){return i.d` [[_getDescription(hass, domain, service)]] `}static get properties(){return{hass:Object,domain:String,service:String}}_getDescription(e,t,r){const i=e.services[t];if(!i)return"";const n=i[r];return n?n.description:""}}customElements.define("ha-service-description",o)},1285:(e,t,r)=>{r.d(t,{D9:()=>l,Ys:()=>a,g7:()=>s});var i=r(8394);const n=()=>Promise.all([r.e(5084),r.e(4338)]).then(r.bind(r,4338)),o=(e,t,r)=>new Promise((o=>{const a=t.cancel,s=t.confirm;(0,i.B)(e,"show-dialog",{dialogTag:"dialog-box",dialogImport:n,dialogParams:{...t,...r,cancel:()=>{o(!(null==r||!r.prompt)&&null),a&&a()},confirm:e=>{o(null==r||!r.prompt||e),s&&s(e)}}})})),a=(e,t)=>o(e,t),s=(e,t)=>o(e,t,{confirmation:!0}),l=(e,t)=>o(e,t,{prompt:!0})},8846:(e,t,r)=>{r.d(t,{CL:()=>w,CN:()=>v,Co:()=>a,Cy:()=>l,DT:()=>E,GU:()=>g,Ho:()=>C,Jz:()=>_,Kw:()=>u,N2:()=>f,NC:()=>s,NL:()=>y,Qs:()=>m,SL:()=>d,di:()=>b,i:()=>i,kT:()=>S,o5:()=>n,rW:()=>p,tW:()=>c,tw:()=>h,yq:()=>k,zM:()=>o});const i=e=>e.callWS({type:"insteon/scenes/get"}),n=(e,t)=>e.callWS({type:"insteon/scene/get",scene_id:t}),o=(e,t)=>e.callWS({type:"insteon/device/get",device_id:t}),a=(e,t)=>e.callWS({type:"insteon/aldb/get",device_address:t}),s=(e,t,r)=>e.callWS({type:"insteon/properties/get",device_address:t,show_advanced:r}),l=(e,t,r)=>e.callWS({type:"insteon/aldb/change",device_address:t,record:r}),d=(e,t,r,i)=>e.callWS({type:"insteon/properties/change",device_address:t,name:r,value:i}),c=(e,t,r,i)=>e.callWS({type:"insteon/scene/save",name:i,scene_id:t,links:r}),u=(e,t)=>e.callWS({type:"insteon/scene/delete",scene_id:t}),p=e=>e.callWS({type:"insteon/device/add/cancel"}),f=(e,t,r)=>e.callWS({type:"insteon/aldb/create",device_address:t,record:r}),m=(e,t)=>e.callWS({type:"insteon/aldb/load",device_address:t}),h=(e,t)=>e.callWS({type:"insteon/properties/load",device_address:t}),y=(e,t)=>e.callWS({type:"insteon/aldb/write",device_address:t}),v=(e,t)=>e.callWS({type:"insteon/properties/write",device_address:t}),g=(e,t)=>e.callWS({type:"insteon/aldb/reset",device_address:t}),b=(e,t)=>e.callWS({type:"insteon/properties/reset",device_address:t}),k=(e,t)=>e.callWS({type:"insteon/aldb/add_default_links",device_address:t}),w=e=>[{name:"mode",options:[["c",e.localize("aldb.mode.controller")],["r",e.localize("aldb.mode.responder")]],required:!0,type:"select"},{name:"group",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"target",required:!0,type:"string"},{name:"data1",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data2",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data3",required:!0,type:"integer",valueMin:-1,valueMax:255}],E=e=>[{name:"in_use",required:!0,type:"boolean"},...w(e)],_=e=>[{name:"multiple",required:!0,type:"boolean"},{name:"device_address",required:!1,type:e?"constant":"string"}],S=[{name:"data1",required:!0,type:"integer"},{name:"data2",required:!0,type:"integer"},{name:"data3",required:!0,type:"integer"}],C={name:"ramp_rate",options:[["31","0.1"],["30","0.2"],["29","0.3"],["28","0.5"],["27","2"],["26","4.5"],["25","6.5"],["24","8.5"],["23","19"],["22","21.5"],["21","23.5"],["20","26"],["19","28"],["18","30"],["17","32"],["16","34"],["15","38.5"],["14","43"],["13","47"],["12","60"],["11","90"],["10","120"],["9","150"],["8","180"],["7","210"],["6","240"],["5","270"],["4","300"],["3","360"],["2","420"],["1","480"]],required:!0,type:"select"}}}]);
25
+ //# sourceMappingURL=122cc134.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"c825c48d.js","mappings":";AAgDA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAKA;;;;;;;;AA+CA","sources":["webpack://insteon-panel-frontend/./homeassistant-frontend/src/components/ha-button-menu.ts"],"sourcesContent":["import type { Button } from \"@material/mwc-button\";\nimport \"@material/mwc-menu\";\nimport type { Corner, Menu, MenuCorner } from \"@material/mwc-menu\";\nimport { css, CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property, query } from \"lit/decorators\";\nimport { FOCUS_TARGET } from \"../dialogs/make-dialog-manager\";\nimport type { HaIconButton } from \"./ha-icon-button\";\n\n@customElement(\"ha-button-menu\")\nexport class HaButtonMenu extends LitElement {\n protected readonly [FOCUS_TARGET];\n\n @property() public corner: Corner = \"TOP_START\";\n\n @property() public menuCorner: MenuCorner = \"START\";\n\n @property({ type: Number }) public x: number | null = null;\n\n @property({ type: Number }) public y: number | null = null;\n\n @property({ type: Boolean }) public multi = false;\n\n @property({ type: Boolean }) public activatable = false;\n\n @property({ type: Boolean }) public disabled = false;\n\n @property({ type: Boolean }) public fixed = false;\n\n @query(\"mwc-menu\", true) private _menu?: Menu;\n\n public get items() {\n return this._menu?.items;\n }\n\n public get selected() {\n return this._menu?.selected;\n }\n\n public override focus() {\n if (this._menu?.open) {\n this._menu.focusItemAtIndex(0);\n } else {\n this._triggerButton?.focus();\n }\n }\n\n protected render(): TemplateResult {\n return html`\n <div @click=${this._handleClick}>\n <slot name=\"trigger\" @slotchange=${this._setTriggerAria}></slot>\n </div>\n <mwc-menu\n .corner=${this.corner}\n .menuCorner=${this.menuCorner}\n .fixed=${this.fixed}\n .multi=${this.multi}\n .activatable=${this.activatable}\n .y=${this.y}\n .x=${this.x}\n >\n <slot></slot>\n </mwc-menu>\n `;\n }\n\n protected firstUpdated(changedProps): void {\n super.firstUpdated(changedProps);\n\n if (document.dir === \"rtl\") {\n this.updateComplete.then(() => {\n this.querySelectorAll(\"mwc-list-item\").forEach((item) => {\n const style = document.createElement(\"style\");\n style.innerHTML =\n \"span.material-icons:first-of-type { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}\";\n item!.shadowRoot!.appendChild(style);\n });\n });\n }\n }\n\n private _handleClick(): void {\n if (this.disabled) {\n return;\n }\n this._menu!.anchor = this;\n this._menu!.show();\n }\n\n private get _triggerButton() {\n return this.querySelector(\n 'ha-icon-button[slot=\"trigger\"], mwc-button[slot=\"trigger\"]'\n ) as HaIconButton | Button | null;\n }\n\n private _setTriggerAria() {\n if (this._triggerButton) {\n this._triggerButton.ariaHasPopup = \"menu\";\n }\n }\n\n static get styles(): CSSResultGroup {\n return css`\n :host {\n display: inline-block;\n position: relative;\n }\n ::slotted([disabled]) {\n color: var(--disabled-text-color);\n }\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-button-menu\": HaButtonMenu;\n }\n}\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"122cc134.js","mappings":";AAgDA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAKA;;;;;;;;AA+CA","sources":["webpack://insteon-panel-frontend/./homeassistant-frontend/src/components/ha-button-menu.ts"],"sourcesContent":["import type { Button } from \"@material/mwc-button\";\nimport \"@material/mwc-menu\";\nimport type { Corner, Menu, MenuCorner } from \"@material/mwc-menu\";\nimport { css, CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property, query } from \"lit/decorators\";\nimport { FOCUS_TARGET } from \"../dialogs/make-dialog-manager\";\nimport type { HaIconButton } from \"./ha-icon-button\";\n\n@customElement(\"ha-button-menu\")\nexport class HaButtonMenu extends LitElement {\n protected readonly [FOCUS_TARGET];\n\n @property() public corner: Corner = \"TOP_START\";\n\n @property() public menuCorner: MenuCorner = \"START\";\n\n @property({ type: Number }) public x: number | null = null;\n\n @property({ type: Number }) public y: number | null = null;\n\n @property({ type: Boolean }) public multi = false;\n\n @property({ type: Boolean }) public activatable = false;\n\n @property({ type: Boolean }) public disabled = false;\n\n @property({ type: Boolean }) public fixed = false;\n\n @query(\"mwc-menu\", true) private _menu?: Menu;\n\n public get items() {\n return this._menu?.items;\n }\n\n public get selected() {\n return this._menu?.selected;\n }\n\n public override focus() {\n if (this._menu?.open) {\n this._menu.focusItemAtIndex(0);\n } else {\n this._triggerButton?.focus();\n }\n }\n\n protected render(): TemplateResult {\n return html`\n <div @click=${this._handleClick}>\n <slot name=\"trigger\" @slotchange=${this._setTriggerAria}></slot>\n </div>\n <mwc-menu\n .corner=${this.corner}\n .menuCorner=${this.menuCorner}\n .fixed=${this.fixed}\n .multi=${this.multi}\n .activatable=${this.activatable}\n .y=${this.y}\n .x=${this.x}\n >\n <slot></slot>\n </mwc-menu>\n `;\n }\n\n protected firstUpdated(changedProps): void {\n super.firstUpdated(changedProps);\n\n if (document.dir === \"rtl\") {\n this.updateComplete.then(() => {\n this.querySelectorAll(\"mwc-list-item\").forEach((item) => {\n const style = document.createElement(\"style\");\n style.innerHTML =\n \"span.material-icons:first-of-type { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}\";\n item!.shadowRoot!.appendChild(style);\n });\n });\n }\n }\n\n private _handleClick(): void {\n if (this.disabled) {\n return;\n }\n this._menu!.anchor = this;\n this._menu!.show();\n }\n\n private get _triggerButton() {\n return this.querySelector(\n 'ha-icon-button[slot=\"trigger\"], mwc-button[slot=\"trigger\"]'\n ) as HaIconButton | Button | null;\n }\n\n private _setTriggerAria() {\n if (this._triggerButton) {\n this._triggerButton.ariaHasPopup = \"menu\";\n }\n }\n\n static get styles(): CSSResultGroup {\n return css`\n :host {\n display: inline-block;\n position: relative;\n }\n ::slotted([disabled]) {\n color: var(--disabled-text-color);\n }\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-button-menu\": HaButtonMenu;\n }\n}\n"],"names":[],"sourceRoot":""}
@@ -83,7 +83,7 @@
83
83
  inset-inline-end: 0px !important;
84
84
  direction: var(--direction);
85
85
  }
86
- `]}]}}),r.M)},8846:(e,t,i)=>{i.d(t,{CL:()=>w,CN:()=>y,Co:()=>s,Cy:()=>d,DT:()=>_,GU:()=>b,Ho:()=>A,Jz:()=>E,Kw:()=>p,N2:()=>f,NC:()=>a,NL:()=>v,Qs:()=>h,SL:()=>l,di:()=>g,i:()=>r,kT:()=>x,o5:()=>n,rW:()=>u,tW:()=>c,tw:()=>m,yq:()=>k,zM:()=>o});const r=e=>e.callWS({type:"insteon/scenes/get"}),n=(e,t)=>e.callWS({type:"insteon/scene/get",scene_id:t}),o=(e,t)=>e.callWS({type:"insteon/device/get",device_id:t}),s=(e,t)=>e.callWS({type:"insteon/aldb/get",device_address:t}),a=(e,t,i)=>e.callWS({type:"insteon/properties/get",device_address:t,show_advanced:i}),d=(e,t,i)=>e.callWS({type:"insteon/aldb/change",device_address:t,record:i}),l=(e,t,i,r)=>e.callWS({type:"insteon/properties/change",device_address:t,name:i,value:r}),c=(e,t,i,r)=>e.callWS({type:"insteon/scene/save",name:r,scene_id:t,links:i}),p=(e,t)=>e.callWS({type:"insteon/scene/delete",scene_id:t}),u=e=>e.callWS({type:"insteon/device/add/cancel"}),f=(e,t,i)=>e.callWS({type:"insteon/aldb/create",device_address:t,record:i}),h=(e,t)=>e.callWS({type:"insteon/aldb/load",device_address:t}),m=(e,t)=>e.callWS({type:"insteon/properties/load",device_address:t}),v=(e,t)=>e.callWS({type:"insteon/aldb/write",device_address:t}),y=(e,t)=>e.callWS({type:"insteon/properties/write",device_address:t}),b=(e,t)=>e.callWS({type:"insteon/aldb/reset",device_address:t}),g=(e,t)=>e.callWS({type:"insteon/properties/reset",device_address:t}),k=(e,t)=>e.callWS({type:"insteon/aldb/add_default_links",device_address:t}),w=e=>[{name:"mode",options:[["c",e.localize("aldb.mode.controller")],["r",e.localize("aldb.mode.responder")]],required:!0,type:"select"},{name:"group",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"target",required:!0,type:"string"},{name:"data1",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data2",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data3",required:!0,type:"integer",valueMin:-1,valueMax:255}],_=e=>[{name:"in_use",required:!0,type:"boolean"},...w(e)],E=e=>[{name:"multiple",required:!0,type:"boolean"},{name:"address",required:!1,type:e?"constant":"string"}],x=[{name:"data1",required:!0,type:"integer"},{name:"data2",required:!0,type:"integer"},{name:"data3",required:!0,type:"integer"}],A={name:"ramp_rate",options:[["31","0.1"],["30","0.2"],["29","0.3"],["28","0.5"],["27","2"],["26","4.5"],["25","6.5"],["24","8.5"],["23","19"],["22","21.5"],["21","23.5"],["20","26"],["19","28"],["18","30"],["17","32"],["16","34"],["15","38.5"],["14","43"],["13","47"],["12","60"],["11","90"],["10","120"],["9","150"],["8","180"],["7","210"],["6","240"],["5","270"],["4","300"],["3","360"],["2","420"],["1","480"]],required:!0,type:"select"}},5159:(e,t,i)=>{i.r(t);var r=i(7500),n=i(7626),o=(i(8348),i(9828)),s=i(9950),a=i(8846);i(9663);function d(){d=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(i){t.forEach((function(t){t.kind===i&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var i=e.prototype;["method","field"].forEach((function(r){t.forEach((function(t){var n=t.placement;if(t.kind===r&&("static"===n||"prototype"===n)){var o="static"===n?e:i;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var i=t.descriptor;if("field"===t.kind){var r=t.initializer;i={enumerable:i.enumerable,writable:i.writable,configurable:i.configurable,value:void 0===r?void 0:r.call(e)}}Object.defineProperty(e,t.key,i)},decorateClass:function(e,t){var i=[],r=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!p(e))return i.push(e);var t=this.decorateElement(e,n);i.push(t.element),i.push.apply(i,t.extras),r.push.apply(r,t.finishers)}),this),!t)return{elements:i,finishers:r};var o=this.decorateConstructor(i,t);return r.push.apply(r,o.finishers),o.finishers=r,o},addElementPlacement:function(e,t,i){var r=t[e.placement];if(!i&&-1!==r.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");r.push(e.key)},decorateElement:function(e,t){for(var i=[],r=[],n=e.decorators,o=n.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),d=this.toElementFinisherExtras((0,n[o])(a)||a);e=d.element,this.addElementPlacement(e,t),d.finisher&&r.push(d.finisher);var l=d.extras;if(l){for(var c=0;c<l.length;c++)this.addElementPlacement(l[c],t);i.push.apply(i,l)}}return{element:e,finishers:r,extras:i}},decorateConstructor:function(e,t){for(var i=[],r=t.length-1;r>=0;r--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[r])(n)||n);if(void 0!==o.finisher&&i.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;s<e.length-1;s++)for(var a=s+1;a<e.length;a++)if(e[s].key===e[a].key&&e[s].placement===e[a].placement)throw new TypeError("Duplicated element ("+e[s].key+")")}}return{elements:e,finishers:i}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?m(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var i=h(e.key),r=String(e.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+r+'"');var n=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:i,placement:r,descriptor:Object.assign({},n)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(n,"get","The property descriptor of a field descriptor"),this.disallowProperty(n,"set","The property descriptor of a field descriptor"),this.disallowProperty(n,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:f(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var i=f(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:i}},runClassFinishers:function(e,t){for(var i=0;i<t.length;i++){var r=(0,t[i])(e);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");e=r}}return e},disallowProperty:function(e,t,i){if(void 0!==e[t])throw new TypeError(i+" can't have a ."+t+" property.")}};return e}function l(e){var t,i=h(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===e.kind?"field":"method",key:i,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(r.decorators=e.decorators),"field"===e.kind&&(r.initializer=e.value),r}function c(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function p(e){return e.decorators&&e.decorators.length}function u(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function f(e,t){var i=e[t];if(void 0!==i&&"function"!=typeof i)throw new TypeError("Expected '"+t+"' to be a function");return i}function h(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}!function(e,t,i,r){var n=d();if(r)for(var o=0;o<r.length;o++)n=r[o](n);var s=t((function(e){n.initializeInstanceElements(e,a.elements)}),i),a=n.decorateClass(function(e){for(var t=[],i=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},r=0;r<e.length;r++){var n,o=e[r];if("method"===o.kind&&(n=t.find(i)))if(u(o.descriptor)||u(n.descriptor)){if(p(o)||p(n))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");n.descriptor=o.descriptor}else{if(p(o)){if(p(n))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");n.decorators=o.decorators}c(o,n)}else t.push(o)}return t}(s.d.map(l)),e);n.initializeClassElements(s.F,a.elements),n.runClassFinishers(s.F,a.finishers)}([(0,n.Mo)("dialog-insteon-adding-device")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"insteon",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"isWide",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"narrow",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_title",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_opened",value:()=>!1},{kind:"field",decorators:[(0,n.SB)()],key:"_devicesAddedText",value:()=>""},{kind:"field",decorators:[(0,n.SB)()],key:"_subscribed",value:void 0},{kind:"field",key:"_devicesAdded",value:void 0},{kind:"field",key:"_address",value:()=>""},{kind:"field",key:"_multiple",value:()=>!1},{kind:"field",key:"_refreshLinkingTimeoutHandle",value:void 0},{kind:"method",key:"showDialog",value:async function(e){this.hass=e.hass,this.insteon=e.insteon,this._address=e.address,this._multiple=e.multiple,this._title=e.title,this._opened=!0,this._subscribe(),this._devicesAddedText="",this._devicesAdded=void 0}},{kind:"method",key:"render",value:function(){return this._opened?r.dy`
86
+ `]}]}}),r.M)},8846:(e,t,i)=>{i.d(t,{CL:()=>w,CN:()=>y,Co:()=>s,Cy:()=>d,DT:()=>_,GU:()=>b,Ho:()=>A,Jz:()=>E,Kw:()=>p,N2:()=>f,NC:()=>a,NL:()=>v,Qs:()=>h,SL:()=>l,di:()=>g,i:()=>r,kT:()=>x,o5:()=>n,rW:()=>u,tW:()=>c,tw:()=>m,yq:()=>k,zM:()=>o});const r=e=>e.callWS({type:"insteon/scenes/get"}),n=(e,t)=>e.callWS({type:"insteon/scene/get",scene_id:t}),o=(e,t)=>e.callWS({type:"insteon/device/get",device_id:t}),s=(e,t)=>e.callWS({type:"insteon/aldb/get",device_address:t}),a=(e,t,i)=>e.callWS({type:"insteon/properties/get",device_address:t,show_advanced:i}),d=(e,t,i)=>e.callWS({type:"insteon/aldb/change",device_address:t,record:i}),l=(e,t,i,r)=>e.callWS({type:"insteon/properties/change",device_address:t,name:i,value:r}),c=(e,t,i,r)=>e.callWS({type:"insteon/scene/save",name:r,scene_id:t,links:i}),p=(e,t)=>e.callWS({type:"insteon/scene/delete",scene_id:t}),u=e=>e.callWS({type:"insteon/device/add/cancel"}),f=(e,t,i)=>e.callWS({type:"insteon/aldb/create",device_address:t,record:i}),h=(e,t)=>e.callWS({type:"insteon/aldb/load",device_address:t}),m=(e,t)=>e.callWS({type:"insteon/properties/load",device_address:t}),v=(e,t)=>e.callWS({type:"insteon/aldb/write",device_address:t}),y=(e,t)=>e.callWS({type:"insteon/properties/write",device_address:t}),b=(e,t)=>e.callWS({type:"insteon/aldb/reset",device_address:t}),g=(e,t)=>e.callWS({type:"insteon/properties/reset",device_address:t}),k=(e,t)=>e.callWS({type:"insteon/aldb/add_default_links",device_address:t}),w=e=>[{name:"mode",options:[["c",e.localize("aldb.mode.controller")],["r",e.localize("aldb.mode.responder")]],required:!0,type:"select"},{name:"group",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"target",required:!0,type:"string"},{name:"data1",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data2",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data3",required:!0,type:"integer",valueMin:-1,valueMax:255}],_=e=>[{name:"in_use",required:!0,type:"boolean"},...w(e)],E=e=>[{name:"multiple",required:!0,type:"boolean"},{name:"device_address",required:!1,type:e?"constant":"string"}],x=[{name:"data1",required:!0,type:"integer"},{name:"data2",required:!0,type:"integer"},{name:"data3",required:!0,type:"integer"}],A={name:"ramp_rate",options:[["31","0.1"],["30","0.2"],["29","0.3"],["28","0.5"],["27","2"],["26","4.5"],["25","6.5"],["24","8.5"],["23","19"],["22","21.5"],["21","23.5"],["20","26"],["19","28"],["18","30"],["17","32"],["16","34"],["15","38.5"],["14","43"],["13","47"],["12","60"],["11","90"],["10","120"],["9","150"],["8","180"],["7","210"],["6","240"],["5","270"],["4","300"],["3","360"],["2","420"],["1","480"]],required:!0,type:"select"}},5159:(e,t,i)=>{i.r(t);var r=i(7500),n=i(7626),o=(i(8348),i(9828)),s=i(9950),a=i(8846);i(9663);function d(){d=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(i){t.forEach((function(t){t.kind===i&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var i=e.prototype;["method","field"].forEach((function(r){t.forEach((function(t){var n=t.placement;if(t.kind===r&&("static"===n||"prototype"===n)){var o="static"===n?e:i;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var i=t.descriptor;if("field"===t.kind){var r=t.initializer;i={enumerable:i.enumerable,writable:i.writable,configurable:i.configurable,value:void 0===r?void 0:r.call(e)}}Object.defineProperty(e,t.key,i)},decorateClass:function(e,t){var i=[],r=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!p(e))return i.push(e);var t=this.decorateElement(e,n);i.push(t.element),i.push.apply(i,t.extras),r.push.apply(r,t.finishers)}),this),!t)return{elements:i,finishers:r};var o=this.decorateConstructor(i,t);return r.push.apply(r,o.finishers),o.finishers=r,o},addElementPlacement:function(e,t,i){var r=t[e.placement];if(!i&&-1!==r.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");r.push(e.key)},decorateElement:function(e,t){for(var i=[],r=[],n=e.decorators,o=n.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),d=this.toElementFinisherExtras((0,n[o])(a)||a);e=d.element,this.addElementPlacement(e,t),d.finisher&&r.push(d.finisher);var l=d.extras;if(l){for(var c=0;c<l.length;c++)this.addElementPlacement(l[c],t);i.push.apply(i,l)}}return{element:e,finishers:r,extras:i}},decorateConstructor:function(e,t){for(var i=[],r=t.length-1;r>=0;r--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[r])(n)||n);if(void 0!==o.finisher&&i.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;s<e.length-1;s++)for(var a=s+1;a<e.length;a++)if(e[s].key===e[a].key&&e[s].placement===e[a].placement)throw new TypeError("Duplicated element ("+e[s].key+")")}}return{elements:e,finishers:i}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?m(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var i=h(e.key),r=String(e.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+r+'"');var n=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:i,placement:r,descriptor:Object.assign({},n)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(n,"get","The property descriptor of a field descriptor"),this.disallowProperty(n,"set","The property descriptor of a field descriptor"),this.disallowProperty(n,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:f(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var i=f(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:i}},runClassFinishers:function(e,t){for(var i=0;i<t.length;i++){var r=(0,t[i])(e);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");e=r}}return e},disallowProperty:function(e,t,i){if(void 0!==e[t])throw new TypeError(i+" can't have a ."+t+" property.")}};return e}function l(e){var t,i=h(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===e.kind?"field":"method",key:i,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(r.decorators=e.decorators),"field"===e.kind&&(r.initializer=e.value),r}function c(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function p(e){return e.decorators&&e.decorators.length}function u(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function f(e,t){var i=e[t];if(void 0!==i&&"function"!=typeof i)throw new TypeError("Expected '"+t+"' to be a function");return i}function h(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}!function(e,t,i,r){var n=d();if(r)for(var o=0;o<r.length;o++)n=r[o](n);var s=t((function(e){n.initializeInstanceElements(e,a.elements)}),i),a=n.decorateClass(function(e){for(var t=[],i=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},r=0;r<e.length;r++){var n,o=e[r];if("method"===o.kind&&(n=t.find(i)))if(u(o.descriptor)||u(n.descriptor)){if(p(o)||p(n))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");n.descriptor=o.descriptor}else{if(p(o)){if(p(n))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");n.decorators=o.decorators}c(o,n)}else t.push(o)}return t}(s.d.map(l)),e);n.initializeClassElements(s.F,a.elements),n.runClassFinishers(s.F,a.finishers)}([(0,n.Mo)("dialog-insteon-adding-device")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"insteon",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"isWide",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"narrow",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_title",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_opened",value:()=>!1},{kind:"field",decorators:[(0,n.SB)()],key:"_devicesAddedText",value:()=>""},{kind:"field",decorators:[(0,n.SB)()],key:"_subscribed",value:void 0},{kind:"field",key:"_devicesAdded",value:void 0},{kind:"field",key:"_address",value:()=>""},{kind:"field",key:"_multiple",value:()=>!1},{kind:"field",key:"_refreshLinkingTimeoutHandle",value:void 0},{kind:"method",key:"showDialog",value:async function(e){this.hass=e.hass,this.insteon=e.insteon,this._address=e.address,this._multiple=e.multiple,this._title=e.title,this._opened=!0,this._subscribe(),this._devicesAddedText="",this._devicesAdded=void 0}},{kind:"method",key:"render",value:function(){return this._opened?r.dy`
87
87
  <ha-dialog
88
88
  open
89
89
  @closed="${this._close}"
@@ -98,7 +98,7 @@
98
98
  </mwc-button>
99
99
  </div>
100
100
  </ha-dialog>
101
- `:r.dy``}},{kind:"method",key:"_showInstructions",value:function(){return this.insteon&&!this._subscribed?this.insteon.localize("device.add.complete"):this._address?this._addressText(this._address):this._multiple?this.insteon.localize("device.add.multiple"):this.insteon.localize("device.add.single")}},{kind:"method",key:"_buttonText",value:function(e){return e?this.insteon.localize("device.actions.stop"):this.hass.localize("ui.dialogs.generic.ok")}},{kind:"method",key:"_showAddedDevices",value:function(){if(!this._devicesAdded)return"";let e="";return this._devicesAdded.forEach((t=>{var i,n;let o=null===(i=this.insteon)||void 0===i?void 0:i.localize("device.add.added");o=null===(n=o)||void 0===n?void 0:n.replace("--address--",t),e=r.dy`${e}<br />${o}`})),e}},{kind:"method",key:"_addressText",value:function(e){let t=this.insteon.localize("device.add.address");return t=t.replace("--address--",e.toUpperCase()),t}},{kind:"method",key:"_handleMessage",value:function(e){"device_added"===e.type&&(console.info("Added device: "+e.address),this._devicesAdded?this._devicesAdded.push(e.address):this._devicesAdded=[e.address],this._devicesAddedText=this._showAddedDevices()),"linking_stopped"===e.type&&this._unsubscribe()}},{kind:"method",key:"_unsubscribe",value:function(){this._refreshLinkingTimeoutHandle&&clearTimeout(this._refreshLinkingTimeoutHandle),this._subscribed&&(this._subscribed.then((e=>e())),this._subscribed=void 0)}},{kind:"method",key:"_subscribe",value:function(){this.hass&&(this._subscribed=this.hass.connection.subscribeMessage((e=>this._handleMessage(e)),{type:"insteon/device/add",multiple:this._multiple,address:this._address}),this._refreshLinkingTimeoutHandle=window.setTimeout((()=>this._unsubscribe()),195e3))}},{kind:"method",key:"_checkCancel",value:function(){this._subscribed&&((0,a.rW)(this.hass),this._unsubscribe()),this._close()}},{kind:"method",key:"_close",value:function(){this._opened=!1}},{kind:"get",static:!0,key:"styles",value:function(){return[s.yu,r.iv`
101
+ `:r.dy``}},{kind:"method",key:"_showInstructions",value:function(){return this.insteon&&!this._subscribed?this.insteon.localize("device.add.complete"):this._address?this._addressText(this._address):this._multiple?this.insteon.localize("device.add.multiple"):this.insteon.localize("device.add.single")}},{kind:"method",key:"_buttonText",value:function(e){return e?this.insteon.localize("device.actions.stop"):this.hass.localize("ui.dialogs.generic.ok")}},{kind:"method",key:"_showAddedDevices",value:function(){if(!this._devicesAdded)return"";let e="";return this._devicesAdded.forEach((t=>{var i,n;let o=null===(i=this.insteon)||void 0===i?void 0:i.localize("device.add.added");o=null===(n=o)||void 0===n?void 0:n.replace("--address--",t),e=r.dy`${e}<br />${o}`})),e}},{kind:"method",key:"_addressText",value:function(e){let t=this.insteon.localize("device.add.address");return t=t.replace("--address--",e.toUpperCase()),t}},{kind:"method",key:"_handleMessage",value:function(e){"device_added"===e.type&&(console.info("Added device: "+e.address),this._devicesAdded?this._devicesAdded.push(e.address):this._devicesAdded=[e.address],this._devicesAddedText=this._showAddedDevices()),"linking_stopped"===e.type&&this._unsubscribe()}},{kind:"method",key:"_unsubscribe",value:function(){this._refreshLinkingTimeoutHandle&&clearTimeout(this._refreshLinkingTimeoutHandle),this._subscribed&&(this._subscribed.then((e=>e())),this._subscribed=void 0)}},{kind:"method",key:"_subscribe",value:function(){this.hass&&(this._subscribed=this.hass.connection.subscribeMessage((e=>this._handleMessage(e)),{type:"insteon/device/add",multiple:this._multiple,device_address:this._address}),this._refreshLinkingTimeoutHandle=window.setTimeout((()=>this._unsubscribe()),195e3))}},{kind:"method",key:"_checkCancel",value:function(){this._subscribed&&((0,a.rW)(this.hass),this._unsubscribe()),this._close()}},{kind:"method",key:"_close",value:function(){this._opened=!1}},{kind:"get",static:!0,key:"styles",value:function(){return[s.yu,r.iv`
102
102
  table {
103
103
  width: 100%;
104
104
  }
@@ -109,4 +109,4 @@
109
109
  width: 200px;
110
110
  }
111
111
  `]}}]}}),r.oi)}}]);
112
- //# sourceMappingURL=f42f213e.js.map
112
+ //# sourceMappingURL=152db136.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"152db136.js","mappings":";AAeA;;AAEA;AAhBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2HA;;;AC/DA;AACA;;AAEA;;AAEA;;AAEA;AACA;;;;AAbA;;;;;;;;;;AA0HA","sources":["webpack://insteon-panel-frontend/./homeassistant-frontend/src/components/ha-dialog.ts","webpack://insteon-panel-frontend/./src/device/dialog-insteon-adding-device.ts"],"sourcesContent":["import { DialogBase } from \"@material/mwc-dialog/mwc-dialog-base\";\nimport { styles } from \"@material/mwc-dialog/mwc-dialog.css\";\nimport { mdiClose } from \"@mdi/js\";\nimport { css, html, TemplateResult } from \"lit\";\nimport { customElement } from \"lit/decorators\";\nimport { FOCUS_TARGET } from \"../dialogs/make-dialog-manager\";\nimport type { HomeAssistant } from \"../types\";\nimport \"./ha-icon-button\";\n\nconst SUPPRESS_DEFAULT_PRESS_SELECTOR = [\"button\"];\n\nexport const createCloseHeading = (\n hass: HomeAssistant,\n title: string | TemplateResult\n) => html`\n <div class=\"header_title\">${title}</div>\n <ha-icon-button\n .label=${hass.localize(\"ui.dialogs.generic.close\")}\n .path=${mdiClose}\n dialogAction=\"close\"\n class=\"header_button\"\n ></ha-icon-button>\n`;\n\n@customElement(\"ha-dialog\")\nexport class HaDialog extends DialogBase {\n protected readonly [FOCUS_TARGET];\n\n public scrollToPos(x: number, y: number) {\n this.contentElement?.scrollTo(x, y);\n }\n\n protected renderHeading() {\n return html`<slot name=\"heading\"> ${super.renderHeading()} </slot>`;\n }\n\n protected firstUpdated(): void {\n super.firstUpdated();\n this.suppressDefaultPressSelector = [\n this.suppressDefaultPressSelector,\n SUPPRESS_DEFAULT_PRESS_SELECTOR,\n ].join(\", \");\n }\n\n static override styles = [\n styles,\n css`\n .mdc-dialog {\n --mdc-dialog-scroll-divider-color: var(--divider-color);\n z-index: var(--dialog-z-index, 7);\n -webkit-backdrop-filter: var(--dialog-backdrop-filter, none);\n backdrop-filter: var(--dialog-backdrop-filter, none);\n --mdc-dialog-box-shadow: var(--dialog-box-shadow, none);\n --mdc-typography-headline6-font-weight: 400;\n --mdc-typography-headline6-font-size: 1.574rem;\n }\n .mdc-dialog__actions {\n justify-content: var(--justify-action-buttons, flex-end);\n padding-bottom: max(env(safe-area-inset-bottom), 24px);\n }\n .mdc-dialog__actions span:nth-child(1) {\n flex: var(--secondary-action-button-flex, unset);\n }\n .mdc-dialog__actions span:nth-child(2) {\n flex: var(--primary-action-button-flex, unset);\n }\n .mdc-dialog__container {\n align-items: var(--vertical-align-dialog, center);\n }\n .mdc-dialog__title {\n padding: 24px 24px 0 24px;\n }\n .mdc-dialog__actions {\n padding: 0 24px 24px 24px;\n }\n .mdc-dialog__title::before {\n display: block;\n height: 0px;\n }\n .mdc-dialog .mdc-dialog__content {\n position: var(--dialog-content-position, relative);\n padding: var(--dialog-content-padding, 24px);\n }\n :host([hideactions]) .mdc-dialog .mdc-dialog__content {\n padding-bottom: max(\n var(--dialog-content-padding, 24px),\n env(safe-area-inset-bottom)\n );\n }\n .mdc-dialog .mdc-dialog__surface {\n position: var(--dialog-surface-position, relative);\n top: var(--dialog-surface-top);\n margin-top: var(--dialog-surface-margin-top);\n min-height: var(--mdc-dialog-min-height, auto);\n border-radius: var(--ha-dialog-border-radius, 28px);\n }\n :host([flexContent]) .mdc-dialog .mdc-dialog__content {\n display: flex;\n flex-direction: column;\n }\n .header_button {\n position: absolute;\n right: 16px;\n top: 14px;\n text-decoration: none;\n color: inherit;\n }\n .header_title {\n margin-right: 32px;\n margin-inline-end: 32px;\n margin-inline-start: initial;\n direction: var(--direction);\n }\n .header_button {\n inset-inline-start: initial;\n inset-inline-end: 16px;\n direction: var(--direction);\n }\n .dialog-actions {\n inset-inline-start: initial !important;\n inset-inline-end: 0px !important;\n direction: var(--direction);\n }\n `,\n ];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-dialog\": HaDialog;\n }\n}\n","import { css, CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators\";\nimport \"../../homeassistant-frontend/src/components/ha-code-editor\";\nimport { createCloseHeading } from \"../../homeassistant-frontend/src/components/ha-dialog\";\nimport { haStyleDialog } from \"../../homeassistant-frontend/src/resources/styles\";\nimport { HomeAssistant } from \"../../homeassistant-frontend/src/types\";\nimport {\n Insteon,\n cancelAddInsteonDevice,\n deviceAddedMessage,\n} from \"../data/insteon\";\nimport \"../../homeassistant-frontend/src/components/ha-form/ha-form\";\nimport { InsteonAddingDeviceDialogParams } from \"./show-dialog-adding-device\";\n\n@customElement(\"dialog-insteon-adding-device\")\nclass DialogInsteonAddingDevice extends LitElement {\n @property({ attribute: false }) public hass!: HomeAssistant;\n\n @property({ attribute: false }) public insteon!: Insteon;\n\n @property({ type: Boolean }) public isWide?: boolean;\n\n @property({ type: Boolean }) public narrow?: boolean;\n\n @state() private _title?: string;\n\n @state() private _opened = false;\n\n @state() private _devicesAddedText = \"\";\n\n @state() private _subscribed?: Promise<() => Promise<void>>;\n\n private _devicesAdded?: [string];\n\n private _address = \"\";\n\n private _multiple = false;\n\n private _refreshLinkingTimeoutHandle?: number;\n\n public async showDialog(\n params: InsteonAddingDeviceDialogParams\n ): Promise<void> {\n this.hass = params.hass;\n this.insteon = params.insteon;\n this._address = params.address;\n this._multiple = params.multiple;\n this._title = params.title;\n this._opened = true;\n this._subscribe();\n this._devicesAddedText = \"\";\n this._devicesAdded = undefined;\n }\n\n protected render(): TemplateResult {\n if (!this._opened) {\n return html``;\n }\n return html`\n <ha-dialog\n open\n @closed=\"${this._close}\"\n .heading=${createCloseHeading(this.hass!, this._title!)}\n >\n <div class=\"instructions\">${this._showInstructions()}</div>\n <br />\n <div class=\"devices\">${this._devicesAddedText}</div>\n <div class=\"buttons\">\n <mwc-button @click=${this._checkCancel} slot=\"primaryAction\">\n ${this._buttonText(this._subscribed)}\n </mwc-button>\n </div>\n </ha-dialog>\n `;\n }\n\n private _showInstructions() {\n if (this.insteon && !this._subscribed)\n return this.insteon.localize(\"device.add.complete\");\n if (this._address) return this._addressText(this._address);\n if (this._multiple) return this.insteon!.localize(\"device.add.multiple\");\n return this.insteon!.localize(\"device.add.single\");\n }\n\n private _buttonText(active): string {\n if (active) return this.insteon.localize(\"device.actions.stop\");\n return this.hass!.localize(\"ui.dialogs.generic.ok\");\n }\n\n private _showAddedDevices(): string {\n if (!this._devicesAdded) return \"\";\n\n let content = \"\";\n this._devicesAdded.forEach((addr) => {\n let device_text = this.insteon?.localize(\"device.add.added\");\n device_text = device_text?.replace(\"--address--\", addr);\n content = html`${content}<br />${device_text}`;\n });\n return content;\n }\n\n private _addressText(address: string): string {\n let add_text = this.insteon.localize(\"device.add.address\");\n add_text = add_text.replace(\"--address--\", address.toUpperCase());\n return add_text;\n }\n\n private _handleMessage(message: deviceAddedMessage): void {\n if (message.type === \"device_added\") {\n // eslint-disable-next-line no-console\n console.info(\"Added device: \" + message.address);\n if (!this._devicesAdded) {\n this._devicesAdded = [message.address];\n } else {\n this._devicesAdded.push(message.address);\n }\n this._devicesAddedText = this._showAddedDevices();\n }\n if (message.type === \"linking_stopped\") {\n this._unsubscribe();\n }\n }\n\n private _unsubscribe(): void {\n if (this._refreshLinkingTimeoutHandle) {\n clearTimeout(this._refreshLinkingTimeoutHandle);\n }\n if (this._subscribed) {\n this._subscribed.then((unsub) => unsub());\n this._subscribed = undefined;\n }\n }\n\n private _subscribe(): void {\n if (!this.hass) {\n return;\n }\n this._subscribed = this.hass.connection.subscribeMessage(\n (message) => this._handleMessage(message),\n {\n type: \"insteon/device/add\",\n multiple: this._multiple,\n device_address: this._address,\n }\n );\n this._refreshLinkingTimeoutHandle = window.setTimeout(\n () => this._unsubscribe(),\n (3 * 60 + 15) * 1000\n );\n }\n\n private _checkCancel(): void {\n if (this._subscribed) {\n cancelAddInsteonDevice(this.hass);\n this._unsubscribe();\n }\n this._close();\n }\n\n private _close(): void {\n this._opened = false;\n }\n\n static get styles(): CSSResultGroup[] {\n return [\n haStyleDialog,\n css`\n table {\n width: 100%;\n }\n ha-combo-box {\n width: 20px;\n }\n .title {\n width: 200px;\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"dialog-insteon-adding-device\": DialogInsteonAddingDevice;\n }\n}\n"],"names":[],"sourceRoot":""}
@@ -0,0 +1,106 @@
1
+ "use strict";(self.webpackChunkinsteon_panel_frontend=self.webpackChunkinsteon_panel_frontend||[]).push([[578],{8846:(e,t,r)=>{r.d(t,{CL:()=>w,CN:()=>v,Co:()=>o,Cy:()=>l,DT:()=>_,GU:()=>b,Ho:()=>E,Jz:()=>C,Kw:()=>p,N2:()=>f,NC:()=>s,NL:()=>y,Qs:()=>h,SL:()=>c,di:()=>g,i:()=>i,kT:()=>S,o5:()=>n,rW:()=>u,tW:()=>d,tw:()=>m,yq:()=>k,zM:()=>a});const i=e=>e.callWS({type:"insteon/scenes/get"}),n=(e,t)=>e.callWS({type:"insteon/scene/get",scene_id:t}),a=(e,t)=>e.callWS({type:"insteon/device/get",device_id:t}),o=(e,t)=>e.callWS({type:"insteon/aldb/get",device_address:t}),s=(e,t,r)=>e.callWS({type:"insteon/properties/get",device_address:t,show_advanced:r}),l=(e,t,r)=>e.callWS({type:"insteon/aldb/change",device_address:t,record:r}),c=(e,t,r,i)=>e.callWS({type:"insteon/properties/change",device_address:t,name:r,value:i}),d=(e,t,r,i)=>e.callWS({type:"insteon/scene/save",name:i,scene_id:t,links:r}),p=(e,t)=>e.callWS({type:"insteon/scene/delete",scene_id:t}),u=e=>e.callWS({type:"insteon/device/add/cancel"}),f=(e,t,r)=>e.callWS({type:"insteon/aldb/create",device_address:t,record:r}),h=(e,t)=>e.callWS({type:"insteon/aldb/load",device_address:t}),m=(e,t)=>e.callWS({type:"insteon/properties/load",device_address:t}),y=(e,t)=>e.callWS({type:"insteon/aldb/write",device_address:t}),v=(e,t)=>e.callWS({type:"insteon/properties/write",device_address:t}),b=(e,t)=>e.callWS({type:"insteon/aldb/reset",device_address:t}),g=(e,t)=>e.callWS({type:"insteon/properties/reset",device_address:t}),k=(e,t)=>e.callWS({type:"insteon/aldb/add_default_links",device_address:t}),w=e=>[{name:"mode",options:[["c",e.localize("aldb.mode.controller")],["r",e.localize("aldb.mode.responder")]],required:!0,type:"select"},{name:"group",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"target",required:!0,type:"string"},{name:"data1",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data2",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data3",required:!0,type:"integer",valueMin:-1,valueMax:255}],_=e=>[{name:"in_use",required:!0,type:"boolean"},...w(e)],C=e=>[{name:"multiple",required:!0,type:"boolean"},{name:"device_address",required:!1,type:e?"constant":"string"}],S=[{name:"data1",required:!0,type:"integer"},{name:"data2",required:!0,type:"integer"},{name:"data3",required:!0,type:"integer"}],E={name:"ramp_rate",options:[["31","0.1"],["30","0.2"],["29","0.3"],["28","0.5"],["27","2"],["26","4.5"],["25","6.5"],["24","8.5"],["23","19"],["22","21.5"],["21","23.5"],["20","26"],["19","28"],["18","30"],["17","32"],["16","34"],["15","38.5"],["14","43"],["13","47"],["12","60"],["11","90"],["10","120"],["9","150"],["8","180"],["7","210"],["6","240"],["5","270"],["4","300"],["3","360"],["2","420"],["1","480"]],required:!0,type:"select"}},578:(e,t,r)=>{r.r(t),r.d(t,{InsteonScenesPanel:()=>k});r(4911),r(2730);var i=r(7500),n=r(7626),a=r(4516),o=(r(1007),r(8122),r(9950)),s=r(8846),l=r(1155),c=r(8841);r(9040);function d(){d=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(i){t.forEach((function(t){var n=t.placement;if(t.kind===i&&("static"===n||"prototype"===n)){var a="static"===n?e:r;this.defineClassElement(a,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var i=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],i=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!f(e))return r.push(e);var t=this.decorateElement(e,n);r.push(t.element),r.push.apply(r,t.extras),i.push.apply(i,t.finishers)}),this),!t)return{elements:r,finishers:i};var a=this.decorateConstructor(r,t);return i.push.apply(i,a.finishers),a.finishers=i,a},addElementPlacement:function(e,t,r){var i=t[e.placement];if(!r&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,t){for(var r=[],i=[],n=e.decorators,a=n.length-1;a>=0;a--){var o=t[e.placement];o.splice(o.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,n[a])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var d=0;d<c.length;d++)this.addElementPlacement(c[d],t);r.push.apply(r,c)}}return{element:e,finishers:i,extras:r}},decorateConstructor:function(e,t){for(var r=[],i=t.length-1;i>=0;i--){var n=this.fromClassDescriptor(e),a=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==a.finisher&&r.push(a.finisher),void 0!==a.elements){e=a.elements;for(var o=0;o<e.length-1;o++)for(var s=o+1;s<e.length;s++)if(e[o].key===e[s].key&&e[o].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[o].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=y(e.key),i=String(e.placement);if("static"!==i&&"prototype"!==i&&"own"!==i)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+i+'"');var n=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var a={kind:t,key:r,placement:i,descriptor:Object.assign({},n)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(n,"get","The property descriptor of a field descriptor"),this.disallowProperty(n,"set","The property descriptor of a field descriptor"),this.disallowProperty(n,"value","The property descriptor of a field descriptor"),a.initializer=e.initializer),a},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:m(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=m(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var i=(0,t[r])(e);if(void 0!==i){if("function"!=typeof i)throw new TypeError("Finishers must return a constructor.");e=i}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function p(e){var t,r=y(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var i={kind:"field"===e.kind?"field":"method",key:r,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(i.decorators=e.decorators),"field"===e.kind&&(i.initializer=e.value),i}function u(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function f(e){return e.decorators&&e.decorators.length}function h(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function m(e,t){var r=e[t];if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected '"+t+"' to be a function");return r}function y(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function b(){return b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(i){var n=Object.getOwnPropertyDescriptor(i,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},b.apply(this,arguments)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}let k=function(e,t,r,i){var n=d();if(i)for(var a=0;a<i.length;a++)n=i[a](n);var o=t((function(e){n.initializeInstanceElements(e,s.elements)}),r),s=n.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===a.key&&e.placement===a.placement},i=0;i<e.length;i++){var n,a=e[i];if("method"===a.kind&&(n=t.find(r)))if(h(a.descriptor)||h(n.descriptor)){if(f(a)||f(n))throw new ReferenceError("Duplicated methods ("+a.key+") can't be decorated.");n.descriptor=a.descriptor}else{if(f(a)){if(f(n))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+a.key+").");n.decorators=a.decorators}u(a,n)}else t.push(a)}return t}(o.d.map(p)),e);return n.initializeClassElements(o.F,s.elements),n.runClassFinishers(o.F,s.finishers)}([(0,n.Mo)("insteon-scenes-panel")],(function(e,t){class r extends t{constructor(...t){super(...t),e(this)}}return{F:r,d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Object})],key:"insteon",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Object})],key:"route",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Array})],key:"_scenes",value:()=>({})},{kind:"method",key:"firstUpdated",value:function(e){b(g(r.prototype),"firstUpdated",this).call(this,e),this.hass&&this.insteon&&(0,s.i)(this.hass).then((e=>{this._scenes=e}))}},{kind:"field",key:"_columns",value(){return(0,a.Z)((e=>e?{group:{title:"Scene",sortable:!0,filterable:!0,direction:"asc",width:"10%"},name:{title:"Name",sortable:!0,filterable:!0,direction:"asc",grows:!0},num_devices:{title:"Devices",sortable:!0,filterable:!0,direction:"asc",width:"10%"}}:{group:{title:"Scene",sortable:!0,filterable:!0,direction:"asc",width:"10%"},name:{title:"Name",sortable:!0,filterable:!0,direction:"asc",grows:!0},num_devices:{title:"Devices",sortable:!0,filterable:!0,direction:"asc",width:"10%"},actions:{title:"Actions",type:"icon-button",template:(e,t)=>i.dy`
2
+ <ha-icon-button
3
+ .scene=${t}
4
+ .hass=${this.hass}
5
+ .label=${this.hass.localize("ui.panel.config.scene.picker.activate_scene")}
6
+ .path=${"M15 14V16A1 1 0 0 1 14 17H10A1 1 0 0 1 9 16V14A5 5 0 1 1 15 14M14 18H10V19A1 1 0 0 0 11 20H13A1 1 0 0 0 14 19M7 19V18H5V19A1 1 0 0 0 6 20H7.17A2.93 2.93 0 0 1 7 19M5 10A6.79 6.79 0 0 1 5.68 7A4 4 0 0 0 4 14.45V16A1 1 0 0 0 5 17H7V14.88A6.92 6.92 0 0 1 5 10M17 18V19A2.93 2.93 0 0 1 16.83 20H18A1 1 0 0 0 19 19V18M18.32 7A6.79 6.79 0 0 1 19 10A6.92 6.92 0 0 1 17 14.88V17H19A1 1 0 0 0 20 16V14.45A4 4 0 0 0 18.32 7Z"}
7
+ @click=${this._activateScene}
8
+ ></ha-icon-button>
9
+ <ha-icon-button
10
+ .scene=${t}
11
+ .hass=${this.hass}
12
+ .label=${this.hass.localize("ui.panel.config.scene.picker.activate_scene")}
13
+ .path=${"M20.84 22.73L18.09 20C18.06 20 18.03 20 18 20H16.83C16.94 19.68 17 19.34 17 19V18.89L14.75 16.64C14.57 16.86 14.31 17 14 17H10C9.45 17 9 16.55 9 16V14C7.4 12.8 6.74 10.84 7.12 9L5.5 7.4C5.18 8.23 5 9.11 5 10C5 11.83 5.72 13.58 7 14.88V17H5C4.45 17 4 16.55 4 16V14.45C2.86 13.79 2.12 12.62 2 11.31C1.85 9.27 3.25 7.5 5.2 7.09L1.11 3L2.39 1.73L22.11 21.46L20.84 22.73M15 6C13.22 4.67 10.86 4.72 9.13 5.93L16.08 12.88C17.63 10.67 17.17 7.63 15 6M19.79 16.59C19.91 16.42 20 16.22 20 16V14.45C21.91 13.34 22.57 10.9 21.46 9C20.8 7.85 19.63 7.11 18.32 7C18.77 7.94 19 8.96 19 10C19 11.57 18.47 13.09 17.5 14.31L19.79 16.59M10 19C10 19.55 10.45 20 11 20H13C13.55 20 14 19.55 14 19V18H10V19M7 18H5V19C5 19.55 5.45 20 6 20H7.17C7.06 19.68 7 19.34 7 19V18Z"}
14
+ @click=${this._deactivateScene}
15
+ ></ha-icon-button>
16
+ `,width:"150px"}}))}},{kind:"method",key:"_activateScene",value:async function(e){e.stopPropagation();const t=e.currentTarget.scene,r=e.currentTarget.hass;console.info("Scene activate clicked received: "+t.group),r.callService("insteon","scene_on",{group:t.group})}},{kind:"method",key:"_deactivateScene",value:async function(e){e.stopPropagation();const t=e.currentTarget.hass,r=e.currentTarget.scene;console.info("Scene activate clicked received: "+r.group),t.callService("insteon","scene_off",{group:r.group})}},{kind:"field",key:"_records",value:()=>(0,a.Z)((e=>{if(0==Object.keys(e).length)return[];const t=[];for(const[r,i]of Object.entries(e)){const e={...i,num_devices:Object.keys(i.devices).length,ha_scene:!0,ha_script:!1,actions:""};t.push(e)}return t}))},{kind:"method",key:"render",value:function(){return i.dy`
17
+ <hass-tabs-subpage-data-table
18
+ .hass=${this.hass}
19
+ .narrow=${this.narrow}
20
+ .tabs=${c.h}
21
+ .route=${this.route}
22
+ id="group"
23
+ .data=${this._records(this._scenes)}
24
+ .columns=${this._columns(this.narrow)}
25
+ @row-click=${this._handleRowClicked}
26
+ clickable
27
+ .localizeFunc=${this.insteon.localize}
28
+ .mainPage=${!0}
29
+ .hasFab=${!0}
30
+ >
31
+ <ha-fab
32
+ slot="fab"
33
+ .label=${this.insteon.localize("scenes.add_scene")}
34
+ extended
35
+ @click=${this._addScene}
36
+ >
37
+ <ha-svg-icon slot="icon" .path=${"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}></ha-svg-icon>
38
+ </ha-fab>
39
+ </hass-tabs-subpage-data-table>
40
+ `}},{kind:"method",key:"_addScene",value:async function(){(0,l.c)("/insteon/scene/")}},{kind:"method",key:"_handleRowClicked",value:async function(e){const t=e.detail.id;console.info("Row clicked received: "+t),(0,l.c)("/insteon/scene/"+t)}},{kind:"get",static:!0,key:"styles",value:function(){return[i.iv`
41
+ ha-data-table {
42
+ width: 100%;
43
+ height: 100%;
44
+ --data-table-border-width: 0;
45
+ }
46
+ :host(:not([narrow])) ha-data-table {
47
+ height: calc(100vh - 1px - var(--header-height));
48
+ display: block;
49
+ }
50
+ :host([narrow]) hass-tabs-subpage {
51
+ --main-title-margin: 0;
52
+ }
53
+ .table-header {
54
+ display: flex;
55
+ align-items: center;
56
+ --mdc-shape-small: 0;
57
+ height: 56px;
58
+ }
59
+ .search-toolbar {
60
+ display: flex;
61
+ align-items: center;
62
+ color: var(--secondary-text-color);
63
+ }
64
+ search-input {
65
+ --mdc-text-field-fill-color: var(--sidebar-background-color);
66
+ --mdc-text-field-idle-line-color: var(--divider-color);
67
+ --text-field-overflow: visible;
68
+ z-index: 5;
69
+ }
70
+ .table-header search-input {
71
+ display: block;
72
+ position: absolute;
73
+ top: 0;
74
+ right: 0;
75
+ left: 0;
76
+ }
77
+ .search-toolbar search-input {
78
+ display: block;
79
+ width: 100%;
80
+ color: var(--secondary-text-color);
81
+ --mdc-ripple-color: transparant;
82
+ }
83
+ #fab {
84
+ position: fixed;
85
+ right: calc(16px + env(safe-area-inset-right));
86
+ bottom: calc(16px + env(safe-area-inset-bottom));
87
+ z-index: 1;
88
+ }
89
+ :host([narrow]) #fab.tabs {
90
+ bottom: calc(84px + env(safe-area-inset-bottom));
91
+ }
92
+ #fab[is-wide] {
93
+ bottom: 24px;
94
+ right: 24px;
95
+ }
96
+ :host([rtl]) #fab {
97
+ right: auto;
98
+ left: calc(16px + env(safe-area-inset-left));
99
+ }
100
+ :host([rtl][is-wide]) #fab {
101
+ bottom: 24px;
102
+ left: 24px;
103
+ right: auto;
104
+ }
105
+ `,o.Qx]}}]}}),i.oi)}}]);
106
+ //# sourceMappingURL=1972789a.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"055f55c1.js","mappings":";;AAmIA;AACA;AACA;AApIA;AAwIA;;;AAGA;AACA;AACA;AA7IA;AAiJA;;AAGA;;AA4CA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;;AAEA;;AAjNA;;;AAuNA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA","sources":["webpack://insteon-panel-frontend/./src/insteon-scenes-panel.ts"],"sourcesContent":["import \"@polymer/app-layout/app-header/app-header\";\nimport \"@polymer/app-layout/app-toolbar/app-toolbar\";\nimport {\n mdiCheck,\n mdiPlus,\n mdiLightbulbGroup,\n mdiLightbulbGroupOff,\n} from \"@mdi/js\";\nimport { css, CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property } from \"lit/decorators\";\nimport memoizeOne from \"memoize-one\";\nimport \"../homeassistant-frontend/src/components/data-table/ha-data-table\";\nimport {\n RowClickedEvent,\n SelectionChangedEvent,\n SortingChangedEvent,\n} from \"../homeassistant-frontend/src/components/data-table/ha-data-table\";\nimport \"../homeassistant-frontend/src/layouts/hass-tabs-subpage-data-table\";\nimport { haStyle } from \"../homeassistant-frontend/src/resources/styles\";\nimport { HomeAssistant, Route } from \"../homeassistant-frontend/src/types\";\nimport {\n Insteon,\n InsteonScene,\n InsteonScenes,\n fetchInsteonScenes,\n} from \"./data/insteon\";\nimport { navigate } from \"../homeassistant-frontend/src/common/navigate\";\nimport { HASSDomEvent } from \"../homeassistant-frontend/src/common/dom/fire_event\";\nimport { insteonMainTabs } from \"./insteon-router\";\nimport \"../homeassistant-frontend/src/components/ha-fab\";\n\ndeclare global {\n // for fire event\n interface HASSDomEvents {\n \"selection-changed\": SelectionChangedEvent;\n \"row-click\": RowClickedEvent;\n \"sorting-changed\": SortingChangedEvent;\n \"scene-trigger\": InsteonSceneTriggeredEvent;\n }\n}\n\ninterface SceneRowData extends InsteonScene {\n record?: InsteonScene;\n num_devices?: number;\n ha_scene?: boolean;\n ha_script?: boolean;\n actions?: string;\n}\n\nexport interface InsteonSceneTriggeredEvent {\n scene: {\n group: number;\n };\n}\n\n@customElement(\"insteon-scenes-panel\")\nexport class InsteonScenesPanel extends LitElement {\n @property({ attribute: false }) public hass!: HomeAssistant;\n\n @property({ type: Object }) public insteon!: Insteon;\n\n @property({ type: Object }) public route!: Route;\n\n @property({ type: Boolean }) public narrow = false;\n\n @property({ type: Array }) private _scenes: InsteonScenes = {};\n\n public firstUpdated(changedProperties) {\n super.firstUpdated(changedProperties);\n\n if (!this.hass || !this.insteon) {\n return;\n }\n fetchInsteonScenes(this.hass).then((scenes) => {\n this._scenes = scenes;\n });\n }\n\n private _columns = memoizeOne((narrow: boolean) =>\n narrow\n ? {\n group: {\n title: \"Scene\",\n sortable: true,\n filterable: true,\n direction: \"asc\",\n width: \"10%\",\n },\n name: {\n title: \"Name\",\n sortable: true,\n filterable: true,\n direction: \"asc\",\n grows: true,\n },\n num_devices: {\n title: \"Devices\",\n sortable: true,\n filterable: true,\n direction: \"asc\",\n width: \"10%\",\n },\n }\n : {\n group: {\n title: \"Scene\",\n sortable: true,\n filterable: true,\n direction: \"asc\",\n width: \"10%\",\n },\n name: {\n title: \"Name\",\n sortable: true,\n filterable: true,\n direction: \"asc\",\n grows: true,\n },\n num_devices: {\n title: \"Devices\",\n sortable: true,\n filterable: true,\n direction: \"asc\",\n width: \"10%\",\n },\n actions: {\n title: \"Actions\",\n type: \"icon-button\",\n template: (_toggle, scene) =>\n html`\n <ha-icon-button\n .scene=${scene}\n .hass=${this.hass}\n .label=${this.hass.localize(\n \"ui.panel.config.scene.picker.activate_scene\"\n )}\n .path=${mdiLightbulbGroup}\n @click=${this._activateScene}\n ></ha-icon-button>\n <ha-icon-button\n .scene=${scene}\n .hass=${this.hass}\n .label=${this.hass.localize(\n \"ui.panel.config.scene.picker.activate_scene\"\n )}\n .path=${mdiLightbulbGroupOff}\n @click=${this._deactivateScene}\n ></ha-icon-button>\n `,\n width: \"150px\",\n },\n }\n );\n\n private async _activateScene(ev): Promise<void> {\n ev.stopPropagation();\n const scene = ev.currentTarget.scene as InsteonScene;\n const hass = ev.currentTarget.hass as HomeAssistant;\n // eslint-disable-next-line no-console\n console.info(\"Scene activate clicked received: \" + scene.group);\n hass.callService(\"insteon\", \"scene_on\", { group: scene.group });\n }\n\n private async _deactivateScene(ev): Promise<void> {\n ev.stopPropagation();\n const hass = ev.currentTarget.hass as HomeAssistant;\n const scene = ev.currentTarget.scene as InsteonScene;\n // eslint-disable-next-line no-console\n console.info(\"Scene activate clicked received: \" + scene.group);\n hass.callService(\"insteon\", \"scene_off\", { group: scene.group });\n }\n\n private _records = memoizeOne((scenes: InsteonScenes) => {\n if (Object.keys(scenes).length == 0) {\n return [];\n }\n const outputScenes: SceneRowData[] = [];\n for (const [scene_num, scene] of Object.entries(scenes)) {\n const scene_data = {\n ...scene,\n num_devices: Object.keys(scene.devices).length,\n ha_scene: true, // to be replace later\n ha_script: false, // to be replace later\n actions: \"\",\n };\n outputScenes.push(scene_data);\n }\n return outputScenes;\n });\n\n protected render(): TemplateResult | void {\n return html`\n <hass-tabs-subpage-data-table\n .hass=${this.hass}\n .narrow=${this.narrow}\n .tabs=${insteonMainTabs}\n .route=${this.route}\n id=\"group\"\n .data=${this._records(this._scenes)}\n .columns=${this._columns(this.narrow)}\n @row-click=${this._handleRowClicked}\n clickable\n .localizeFunc=${this.insteon.localize}\n .mainPage=${true}\n .hasFab=${true}\n >\n <ha-fab\n slot=\"fab\"\n .label=${this.insteon.localize(\"scenes.add_scene\")}\n extended\n @click=${this._addScene}\n >\n <ha-svg-icon slot=\"icon\" .path=${mdiPlus}></ha-svg-icon>\n </ha-fab>\n </hass-tabs-subpage-data-table>\n `;\n }\n\n private async _addScene(): Promise<void> {\n navigate(\"/insteon/scene/\");\n }\n\n private async _handleRowClicked(\n ev: HASSDomEvent<RowClickedEvent>\n ): Promise<void> {\n const id = ev.detail.id;\n // eslint-disable-next-line no-console\n console.info(\"Row clicked received: \" + id);\n navigate(\"/insteon/scene/\" + id);\n }\n\n static get styles(): CSSResultGroup {\n return [\n css`\n ha-data-table {\n width: 100%;\n height: 100%;\n --data-table-border-width: 0;\n }\n :host(:not([narrow])) ha-data-table {\n height: calc(100vh - 1px - var(--header-height));\n display: block;\n }\n :host([narrow]) hass-tabs-subpage {\n --main-title-margin: 0;\n }\n .table-header {\n display: flex;\n align-items: center;\n --mdc-shape-small: 0;\n height: 56px;\n }\n .search-toolbar {\n display: flex;\n align-items: center;\n color: var(--secondary-text-color);\n }\n search-input {\n --mdc-text-field-fill-color: var(--sidebar-background-color);\n --mdc-text-field-idle-line-color: var(--divider-color);\n --text-field-overflow: visible;\n z-index: 5;\n }\n .table-header search-input {\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n }\n .search-toolbar search-input {\n display: block;\n width: 100%;\n color: var(--secondary-text-color);\n --mdc-ripple-color: transparant;\n }\n #fab {\n position: fixed;\n right: calc(16px + env(safe-area-inset-right));\n bottom: calc(16px + env(safe-area-inset-bottom));\n z-index: 1;\n }\n :host([narrow]) #fab.tabs {\n bottom: calc(84px + env(safe-area-inset-bottom));\n }\n #fab[is-wide] {\n bottom: 24px;\n right: 24px;\n }\n :host([rtl]) #fab {\n right: auto;\n left: calc(16px + env(safe-area-inset-left));\n }\n :host([rtl][is-wide]) #fab {\n bottom: 24px;\n left: 24px;\n right: auto;\n }\n `,\n haStyle,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"insteon-scenes-panel\": InsteonScenesPanel;\n }\n}\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"1972789a.js","mappings":";;AAmIA;AACA;AACA;AApIA;AAwIA;;;AAGA;AACA;AACA;AA7IA;AAiJA;;AAGA;;AA4CA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;;AAEA;;AAjNA;;;AAuNA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA","sources":["webpack://insteon-panel-frontend/./src/insteon-scenes-panel.ts"],"sourcesContent":["import \"@polymer/app-layout/app-header/app-header\";\nimport \"@polymer/app-layout/app-toolbar/app-toolbar\";\nimport {\n mdiCheck,\n mdiPlus,\n mdiLightbulbGroup,\n mdiLightbulbGroupOff,\n} from \"@mdi/js\";\nimport { css, CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property } from \"lit/decorators\";\nimport memoizeOne from \"memoize-one\";\nimport \"../homeassistant-frontend/src/components/data-table/ha-data-table\";\nimport {\n RowClickedEvent,\n SelectionChangedEvent,\n SortingChangedEvent,\n} from \"../homeassistant-frontend/src/components/data-table/ha-data-table\";\nimport \"../homeassistant-frontend/src/layouts/hass-tabs-subpage-data-table\";\nimport { haStyle } from \"../homeassistant-frontend/src/resources/styles\";\nimport { HomeAssistant, Route } from \"../homeassistant-frontend/src/types\";\nimport {\n Insteon,\n InsteonScene,\n InsteonScenes,\n fetchInsteonScenes,\n} from \"./data/insteon\";\nimport { navigate } from \"../homeassistant-frontend/src/common/navigate\";\nimport { HASSDomEvent } from \"../homeassistant-frontend/src/common/dom/fire_event\";\nimport { insteonMainTabs } from \"./insteon-router\";\nimport \"../homeassistant-frontend/src/components/ha-fab\";\n\ndeclare global {\n // for fire event\n interface HASSDomEvents {\n \"selection-changed\": SelectionChangedEvent;\n \"row-click\": RowClickedEvent;\n \"sorting-changed\": SortingChangedEvent;\n \"scene-trigger\": InsteonSceneTriggeredEvent;\n }\n}\n\ninterface SceneRowData extends InsteonScene {\n record?: InsteonScene;\n num_devices?: number;\n ha_scene?: boolean;\n ha_script?: boolean;\n actions?: string;\n}\n\nexport interface InsteonSceneTriggeredEvent {\n scene: {\n group: number;\n };\n}\n\n@customElement(\"insteon-scenes-panel\")\nexport class InsteonScenesPanel extends LitElement {\n @property({ attribute: false }) public hass!: HomeAssistant;\n\n @property({ type: Object }) public insteon!: Insteon;\n\n @property({ type: Object }) public route!: Route;\n\n @property({ type: Boolean }) public narrow = false;\n\n @property({ type: Array }) private _scenes: InsteonScenes = {};\n\n public firstUpdated(changedProperties) {\n super.firstUpdated(changedProperties);\n\n if (!this.hass || !this.insteon) {\n return;\n }\n fetchInsteonScenes(this.hass).then((scenes) => {\n this._scenes = scenes;\n });\n }\n\n private _columns = memoizeOne((narrow: boolean) =>\n narrow\n ? {\n group: {\n title: \"Scene\",\n sortable: true,\n filterable: true,\n direction: \"asc\",\n width: \"10%\",\n },\n name: {\n title: \"Name\",\n sortable: true,\n filterable: true,\n direction: \"asc\",\n grows: true,\n },\n num_devices: {\n title: \"Devices\",\n sortable: true,\n filterable: true,\n direction: \"asc\",\n width: \"10%\",\n },\n }\n : {\n group: {\n title: \"Scene\",\n sortable: true,\n filterable: true,\n direction: \"asc\",\n width: \"10%\",\n },\n name: {\n title: \"Name\",\n sortable: true,\n filterable: true,\n direction: \"asc\",\n grows: true,\n },\n num_devices: {\n title: \"Devices\",\n sortable: true,\n filterable: true,\n direction: \"asc\",\n width: \"10%\",\n },\n actions: {\n title: \"Actions\",\n type: \"icon-button\",\n template: (_toggle, scene) =>\n html`\n <ha-icon-button\n .scene=${scene}\n .hass=${this.hass}\n .label=${this.hass.localize(\n \"ui.panel.config.scene.picker.activate_scene\"\n )}\n .path=${mdiLightbulbGroup}\n @click=${this._activateScene}\n ></ha-icon-button>\n <ha-icon-button\n .scene=${scene}\n .hass=${this.hass}\n .label=${this.hass.localize(\n \"ui.panel.config.scene.picker.activate_scene\"\n )}\n .path=${mdiLightbulbGroupOff}\n @click=${this._deactivateScene}\n ></ha-icon-button>\n `,\n width: \"150px\",\n },\n }\n );\n\n private async _activateScene(ev): Promise<void> {\n ev.stopPropagation();\n const scene = ev.currentTarget.scene as InsteonScene;\n const hass = ev.currentTarget.hass as HomeAssistant;\n // eslint-disable-next-line no-console\n console.info(\"Scene activate clicked received: \" + scene.group);\n hass.callService(\"insteon\", \"scene_on\", { group: scene.group });\n }\n\n private async _deactivateScene(ev): Promise<void> {\n ev.stopPropagation();\n const hass = ev.currentTarget.hass as HomeAssistant;\n const scene = ev.currentTarget.scene as InsteonScene;\n // eslint-disable-next-line no-console\n console.info(\"Scene activate clicked received: \" + scene.group);\n hass.callService(\"insteon\", \"scene_off\", { group: scene.group });\n }\n\n private _records = memoizeOne((scenes: InsteonScenes) => {\n if (Object.keys(scenes).length == 0) {\n return [];\n }\n const outputScenes: SceneRowData[] = [];\n for (const [scene_num, scene] of Object.entries(scenes)) {\n const scene_data = {\n ...scene,\n num_devices: Object.keys(scene.devices).length,\n ha_scene: true, // to be replace later\n ha_script: false, // to be replace later\n actions: \"\",\n };\n outputScenes.push(scene_data);\n }\n return outputScenes;\n });\n\n protected render(): TemplateResult | void {\n return html`\n <hass-tabs-subpage-data-table\n .hass=${this.hass}\n .narrow=${this.narrow}\n .tabs=${insteonMainTabs}\n .route=${this.route}\n id=\"group\"\n .data=${this._records(this._scenes)}\n .columns=${this._columns(this.narrow)}\n @row-click=${this._handleRowClicked}\n clickable\n .localizeFunc=${this.insteon.localize}\n .mainPage=${true}\n .hasFab=${true}\n >\n <ha-fab\n slot=\"fab\"\n .label=${this.insteon.localize(\"scenes.add_scene\")}\n extended\n @click=${this._addScene}\n >\n <ha-svg-icon slot=\"icon\" .path=${mdiPlus}></ha-svg-icon>\n </ha-fab>\n </hass-tabs-subpage-data-table>\n `;\n }\n\n private async _addScene(): Promise<void> {\n navigate(\"/insteon/scene/\");\n }\n\n private async _handleRowClicked(\n ev: HASSDomEvent<RowClickedEvent>\n ): Promise<void> {\n const id = ev.detail.id;\n // eslint-disable-next-line no-console\n console.info(\"Row clicked received: \" + id);\n navigate(\"/insteon/scene/\" + id);\n }\n\n static get styles(): CSSResultGroup {\n return [\n css`\n ha-data-table {\n width: 100%;\n height: 100%;\n --data-table-border-width: 0;\n }\n :host(:not([narrow])) ha-data-table {\n height: calc(100vh - 1px - var(--header-height));\n display: block;\n }\n :host([narrow]) hass-tabs-subpage {\n --main-title-margin: 0;\n }\n .table-header {\n display: flex;\n align-items: center;\n --mdc-shape-small: 0;\n height: 56px;\n }\n .search-toolbar {\n display: flex;\n align-items: center;\n color: var(--secondary-text-color);\n }\n search-input {\n --mdc-text-field-fill-color: var(--sidebar-background-color);\n --mdc-text-field-idle-line-color: var(--divider-color);\n --text-field-overflow: visible;\n z-index: 5;\n }\n .table-header search-input {\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n }\n .search-toolbar search-input {\n display: block;\n width: 100%;\n color: var(--secondary-text-color);\n --mdc-ripple-color: transparant;\n }\n #fab {\n position: fixed;\n right: calc(16px + env(safe-area-inset-right));\n bottom: calc(16px + env(safe-area-inset-bottom));\n z-index: 1;\n }\n :host([narrow]) #fab.tabs {\n bottom: calc(84px + env(safe-area-inset-bottom));\n }\n #fab[is-wide] {\n bottom: 24px;\n right: 24px;\n }\n :host([rtl]) #fab {\n right: auto;\n left: calc(16px + env(safe-area-inset-left));\n }\n :host([rtl][is-wide]) #fab {\n bottom: 24px;\n left: 24px;\n right: auto;\n }\n `,\n haStyle,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"insteon-scenes-panel\": InsteonScenesPanel;\n }\n}\n"],"names":[],"sourceRoot":""}
@@ -90,7 +90,7 @@
90
90
  background-color: var(--switch-unchecked-track-color);
91
91
  border-color: var(--switch-unchecked-track-color);
92
92
  }
93
- `]}]}}),i.H)},8846:(e,t,r)=>{r.d(t,{CL:()=>w,CN:()=>y,Co:()=>s,Cy:()=>c,DT:()=>E,GU:()=>b,Ho:()=>P,Jz:()=>_,Kw:()=>p,N2:()=>u,NC:()=>a,NL:()=>v,Qs:()=>f,SL:()=>l,di:()=>k,i:()=>i,kT:()=>x,o5:()=>n,rW:()=>h,tW:()=>d,tw:()=>m,yq:()=>g,zM:()=>o});const i=e=>e.callWS({type:"insteon/scenes/get"}),n=(e,t)=>e.callWS({type:"insteon/scene/get",scene_id:t}),o=(e,t)=>e.callWS({type:"insteon/device/get",device_id:t}),s=(e,t)=>e.callWS({type:"insteon/aldb/get",device_address:t}),a=(e,t,r)=>e.callWS({type:"insteon/properties/get",device_address:t,show_advanced:r}),c=(e,t,r)=>e.callWS({type:"insteon/aldb/change",device_address:t,record:r}),l=(e,t,r,i)=>e.callWS({type:"insteon/properties/change",device_address:t,name:r,value:i}),d=(e,t,r,i)=>e.callWS({type:"insteon/scene/save",name:i,scene_id:t,links:r}),p=(e,t)=>e.callWS({type:"insteon/scene/delete",scene_id:t}),h=e=>e.callWS({type:"insteon/device/add/cancel"}),u=(e,t,r)=>e.callWS({type:"insteon/aldb/create",device_address:t,record:r}),f=(e,t)=>e.callWS({type:"insteon/aldb/load",device_address:t}),m=(e,t)=>e.callWS({type:"insteon/properties/load",device_address:t}),v=(e,t)=>e.callWS({type:"insteon/aldb/write",device_address:t}),y=(e,t)=>e.callWS({type:"insteon/properties/write",device_address:t}),b=(e,t)=>e.callWS({type:"insteon/aldb/reset",device_address:t}),k=(e,t)=>e.callWS({type:"insteon/properties/reset",device_address:t}),g=(e,t)=>e.callWS({type:"insteon/aldb/add_default_links",device_address:t}),w=e=>[{name:"mode",options:[["c",e.localize("aldb.mode.controller")],["r",e.localize("aldb.mode.responder")]],required:!0,type:"select"},{name:"group",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"target",required:!0,type:"string"},{name:"data1",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data2",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data3",required:!0,type:"integer",valueMin:-1,valueMax:255}],E=e=>[{name:"in_use",required:!0,type:"boolean"},...w(e)],_=e=>[{name:"multiple",required:!0,type:"boolean"},{name:"address",required:!1,type:e?"constant":"string"}],x=[{name:"data1",required:!0,type:"integer"},{name:"data2",required:!0,type:"integer"},{name:"data3",required:!0,type:"integer"}],P={name:"ramp_rate",options:[["31","0.1"],["30","0.2"],["29","0.3"],["28","0.5"],["27","2"],["26","4.5"],["25","6.5"],["24","8.5"],["23","19"],["22","21.5"],["21","23.5"],["20","26"],["19","28"],["18","30"],["17","32"],["16","34"],["15","38.5"],["14","43"],["13","47"],["12","60"],["11","90"],["10","120"],["9","150"],["8","180"],["7","210"],["6","240"],["5","270"],["4","300"],["3","360"],["2","420"],["1","480"]],required:!0,type:"select"}},5932:(e,t,r)=>{r.r(t),r.d(t,{InsteonSceneEditor:()=>pe});r(4577),r(5782),r(3973),r(9194);var i=r(7500),n=r(7626),o=r(8636),s=r(2537),a=r(6655),c=r(2733),l=r(1750),d=r(4516),p=r(8394),h=r(8858),u=r(7545),f=r(1134),m=r(6038),v=r(9389);r(6591);function y(){y=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(i){t.forEach((function(t){var n=t.placement;if(t.kind===i&&("static"===n||"prototype"===n)){var o="static"===n?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var i=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],i=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!g(e))return r.push(e);var t=this.decorateElement(e,n);r.push(t.element),r.push.apply(r,t.extras),i.push.apply(i,t.finishers)}),this),!t)return{elements:r,finishers:i};var o=this.decorateConstructor(r,t);return i.push.apply(i,o.finishers),o.finishers=i,o},addElementPlacement:function(e,t,r){var i=t[e.placement];if(!r&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,t){for(var r=[],i=[],n=e.decorators,o=n.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,n[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&i.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],t);r.push.apply(r,l)}}return{element:e,finishers:i,extras:r}},decorateConstructor:function(e,t){for(var r=[],i=t.length-1;i>=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;s<e.length-1;s++)for(var a=s+1;a<e.length;a++)if(e[s].key===e[a].key&&e[s].placement===e[a].placement)throw new TypeError("Duplicated element ("+e[s].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=_(e.key),i=String(e.placement);if("static"!==i&&"prototype"!==i&&"own"!==i)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+i+'"');var n=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:i,descriptor:Object.assign({},n)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(n,"get","The property descriptor of a field descriptor"),this.disallowProperty(n,"set","The property descriptor of a field descriptor"),this.disallowProperty(n,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:E(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=E(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var i=(0,t[r])(e);if(void 0!==i){if("function"!=typeof i)throw new TypeError("Finishers must return a constructor.");e=i}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function b(e){var t,r=_(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var i={kind:"field"===e.kind?"field":"method",key:r,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(i.decorators=e.decorators),"field"===e.kind&&(i.initializer=e.value),i}function k(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function g(e){return e.decorators&&e.decorators.length}function w(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function E(e,t){var r=e[t];if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected '"+t+"' to be a function");return r}function _(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}const P=e=>i.dy`<mwc-list-item
93
+ `]}]}}),i.H)},8846:(e,t,r)=>{r.d(t,{CL:()=>w,CN:()=>y,Co:()=>s,Cy:()=>c,DT:()=>E,GU:()=>b,Ho:()=>P,Jz:()=>_,Kw:()=>p,N2:()=>u,NC:()=>a,NL:()=>v,Qs:()=>f,SL:()=>l,di:()=>k,i:()=>i,kT:()=>x,o5:()=>n,rW:()=>h,tW:()=>d,tw:()=>m,yq:()=>g,zM:()=>o});const i=e=>e.callWS({type:"insteon/scenes/get"}),n=(e,t)=>e.callWS({type:"insteon/scene/get",scene_id:t}),o=(e,t)=>e.callWS({type:"insteon/device/get",device_id:t}),s=(e,t)=>e.callWS({type:"insteon/aldb/get",device_address:t}),a=(e,t,r)=>e.callWS({type:"insteon/properties/get",device_address:t,show_advanced:r}),c=(e,t,r)=>e.callWS({type:"insteon/aldb/change",device_address:t,record:r}),l=(e,t,r,i)=>e.callWS({type:"insteon/properties/change",device_address:t,name:r,value:i}),d=(e,t,r,i)=>e.callWS({type:"insteon/scene/save",name:i,scene_id:t,links:r}),p=(e,t)=>e.callWS({type:"insteon/scene/delete",scene_id:t}),h=e=>e.callWS({type:"insteon/device/add/cancel"}),u=(e,t,r)=>e.callWS({type:"insteon/aldb/create",device_address:t,record:r}),f=(e,t)=>e.callWS({type:"insteon/aldb/load",device_address:t}),m=(e,t)=>e.callWS({type:"insteon/properties/load",device_address:t}),v=(e,t)=>e.callWS({type:"insteon/aldb/write",device_address:t}),y=(e,t)=>e.callWS({type:"insteon/properties/write",device_address:t}),b=(e,t)=>e.callWS({type:"insteon/aldb/reset",device_address:t}),k=(e,t)=>e.callWS({type:"insteon/properties/reset",device_address:t}),g=(e,t)=>e.callWS({type:"insteon/aldb/add_default_links",device_address:t}),w=e=>[{name:"mode",options:[["c",e.localize("aldb.mode.controller")],["r",e.localize("aldb.mode.responder")]],required:!0,type:"select"},{name:"group",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"target",required:!0,type:"string"},{name:"data1",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data2",required:!0,type:"integer",valueMin:-1,valueMax:255},{name:"data3",required:!0,type:"integer",valueMin:-1,valueMax:255}],E=e=>[{name:"in_use",required:!0,type:"boolean"},...w(e)],_=e=>[{name:"multiple",required:!0,type:"boolean"},{name:"device_address",required:!1,type:e?"constant":"string"}],x=[{name:"data1",required:!0,type:"integer"},{name:"data2",required:!0,type:"integer"},{name:"data3",required:!0,type:"integer"}],P={name:"ramp_rate",options:[["31","0.1"],["30","0.2"],["29","0.3"],["28","0.5"],["27","2"],["26","4.5"],["25","6.5"],["24","8.5"],["23","19"],["22","21.5"],["21","23.5"],["20","26"],["19","28"],["18","30"],["17","32"],["16","34"],["15","38.5"],["14","43"],["13","47"],["12","60"],["11","90"],["10","120"],["9","150"],["8","180"],["7","210"],["6","240"],["5","270"],["4","300"],["3","360"],["2","420"],["1","480"]],required:!0,type:"select"}},5932:(e,t,r)=>{r.r(t),r.d(t,{InsteonSceneEditor:()=>pe});r(4577),r(5782),r(3973),r(9194);var i=r(7500),n=r(7626),o=r(8636),s=r(2537),a=r(6655),c=r(2733),l=r(1750),d=r(4516),p=r(8394),h=r(8858),u=r(7545),f=r(1134),m=r(6038),v=r(9389);r(6591);function y(){y=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(i){t.forEach((function(t){var n=t.placement;if(t.kind===i&&("static"===n||"prototype"===n)){var o="static"===n?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var i=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],i=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!g(e))return r.push(e);var t=this.decorateElement(e,n);r.push(t.element),r.push.apply(r,t.extras),i.push.apply(i,t.finishers)}),this),!t)return{elements:r,finishers:i};var o=this.decorateConstructor(r,t);return i.push.apply(i,o.finishers),o.finishers=i,o},addElementPlacement:function(e,t,r){var i=t[e.placement];if(!r&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,t){for(var r=[],i=[],n=e.decorators,o=n.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,n[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&i.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],t);r.push.apply(r,l)}}return{element:e,finishers:i,extras:r}},decorateConstructor:function(e,t){for(var r=[],i=t.length-1;i>=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;s<e.length-1;s++)for(var a=s+1;a<e.length;a++)if(e[s].key===e[a].key&&e[s].placement===e[a].placement)throw new TypeError("Duplicated element ("+e[s].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=_(e.key),i=String(e.placement);if("static"!==i&&"prototype"!==i&&"own"!==i)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+i+'"');var n=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:i,descriptor:Object.assign({},n)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(n,"get","The property descriptor of a field descriptor"),this.disallowProperty(n,"set","The property descriptor of a field descriptor"),this.disallowProperty(n,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:E(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=E(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var i=(0,t[r])(e);if(void 0!==i){if("function"!=typeof i)throw new TypeError("Finishers must return a constructor.");e=i}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function b(e){var t,r=_(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var i={kind:"field"===e.kind?"field":"method",key:r,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(i.decorators=e.decorators),"field"===e.kind&&(i.initializer=e.value),i}function k(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function g(e){return e.decorators&&e.decorators.length}function w(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function E(e,t){var r=e[t];if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected '"+t+"' to be a function");return r}function _(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}const P=e=>i.dy`<mwc-list-item
94
94
  .twoline=${!!e.area}
95
95
  >
96
96
  <span>${e.name}</span>
@@ -521,4 +521,4 @@
521
521
  display: block;
522
522
  }
523
523
  `]}}]}}),(0,v.f)((he=i.oi,class extends he{constructor(...e){super(...e),L(this,"_keydownEvent",(e=>{(e.ctrlKey||e.metaKey)&&"s"===e.key&&(e.preventDefault(),this.handleKeyboardSave())}))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._keydownEvent)}disconnectedCallback(){this.removeEventListener("keydown",this._keydownEvent),super.disconnectedCallback()}handleKeyboardSave(){}})));var he}}]);
524
- //# sourceMappingURL=eb18a35e.js.map
524
+ //# sourceMappingURL=24065ffe.js.map