blue-chestnut-solar-expert 0.0.52 → 0.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/stencil-library/api-90JQS7b6.js +104 -0
  2. package/dist/stencil-library/api-90JQS7b6.js.map +1 -0
  3. package/dist/stencil-library/api-B5514wut.js +102 -0
  4. package/dist/stencil-library/api-B5514wut.js.map +1 -0
  5. package/dist/stencil-library/api-CLbMaqt3.js +103 -0
  6. package/dist/stencil-library/api-CLbMaqt3.js.map +1 -0
  7. package/dist/stencil-library/api-Cfi-C6kT.js +104 -0
  8. package/dist/stencil-library/api-Cfi-C6kT.js.map +1 -0
  9. package/dist/stencil-library/api-CiNFC5mG.js +104 -0
  10. package/dist/stencil-library/api-CiNFC5mG.js.map +1 -0
  11. package/dist/stencil-library/api-D_61gY2X.js +102 -0
  12. package/dist/stencil-library/api-D_61gY2X.js.map +1 -0
  13. package/dist/{components/p-CU_Hozfq.js → stencil-library/api-Did5lAE0.js} +4 -7
  14. package/dist/stencil-library/api-Did5lAE0.js.map +1 -0
  15. package/dist/stencil-library/api-S3oJcLL5.js +103 -0
  16. package/dist/stencil-library/api-S3oJcLL5.js.map +1 -0
  17. package/dist/stencil-library/api-iAs1ZQr1.js +104 -0
  18. package/dist/stencil-library/api-iAs1ZQr1.js.map +1 -0
  19. package/dist/stencil-library/{api-CU_Hozfq.js → api-vropRvpT.js} +5 -4
  20. package/dist/stencil-library/api-vropRvpT.js.map +1 -0
  21. package/dist/stencil-library/{decoder-BdybtJ-v.js → decoder-BDfrXE7e.js} +3 -3
  22. package/dist/stencil-library/{decoder-BdybtJ-v.js.map → decoder-BDfrXE7e.js.map} +1 -1
  23. package/dist/stencil-library/{deflate-BSCfm6tE.js → deflate-BrCNE9ec.js} +3 -3
  24. package/dist/stencil-library/{deflate-BSCfm6tE.js.map → deflate-BrCNE9ec.js.map} +1 -1
  25. package/dist/stencil-library/eraser-icon.entry.esm.js.map +1 -1
  26. package/dist/stencil-library/eraser-icon.entry.js +1 -1
  27. package/dist/stencil-library/eraser-icon.entry.js.map +1 -1
  28. package/dist/stencil-library/house-icon.entry.esm.js.map +1 -1
  29. package/dist/stencil-library/house-icon.entry.js +1 -1
  30. package/dist/stencil-library/house-icon.entry.js.map +1 -1
  31. package/dist/stencil-library/icon-selector.entry.esm.js.map +1 -1
  32. package/dist/stencil-library/icon-selector.entry.js +1 -1
  33. package/dist/stencil-library/icon-selector.entry.js.map +1 -1
  34. package/dist/stencil-library/index.esm.js +13 -1
  35. package/dist/stencil-library/index.esm.js.map +1 -1
  36. package/dist/stencil-library/{jpeg-B7s0bMQh.js → jpeg-CjOJHUd1.js} +3 -3
  37. package/dist/stencil-library/{jpeg-B7s0bMQh.js.map → jpeg-CjOJHUd1.js.map} +1 -1
  38. package/dist/stencil-library/{lerc-BRJzMsmm.js → lerc-BQF80JgE.js} +3 -3
  39. package/dist/stencil-library/{lerc-BRJzMsmm.js.map → lerc-BQF80JgE.js.map} +1 -1
  40. package/dist/stencil-library/loading-widget.entry.esm.js.map +1 -1
  41. package/dist/stencil-library/loading-widget.entry.js +2 -2
  42. package/dist/stencil-library/loading-widget.entry.js.map +1 -1
  43. package/dist/stencil-library/{lzw-B1L94-gJ.js → lzw-PA2aOuVK.js} +3 -3
  44. package/dist/stencil-library/{lzw-B1L94-gJ.js.map → lzw-PA2aOuVK.js.map} +1 -1
  45. package/dist/stencil-library/{map-draw-Dbj9dYlX.js → map-draw-CaQc1QTP.js} +11 -11
  46. package/dist/stencil-library/{map-draw-Dbj9dYlX.js.map → map-draw-CaQc1QTP.js.map} +1 -1
  47. package/dist/stencil-library/map-draw.entry.js +1 -1
  48. package/dist/stencil-library/map-selector.entry.esm.js.map +1 -1
  49. package/dist/stencil-library/map-selector.entry.js +19 -3
  50. package/dist/stencil-library/map-selector.entry.js.map +1 -1
  51. package/dist/stencil-library/move-icon.entry.esm.js.map +1 -1
  52. package/dist/stencil-library/move-icon.entry.js +1 -1
  53. package/dist/stencil-library/move-icon.entry.js.map +1 -1
  54. package/dist/stencil-library/octagon-minus-icon.entry.esm.js.map +1 -1
  55. package/dist/stencil-library/octagon-minus-icon.entry.js +1 -1
  56. package/dist/stencil-library/octagon-minus-icon.entry.js.map +1 -1
  57. package/dist/stencil-library/{packbits-Roq2Ecwq.js → packbits-BMYGgS0z.js} +3 -3
  58. package/dist/stencil-library/{packbits-Roq2Ecwq.js.map → packbits-BMYGgS0z.js.map} +1 -1
  59. package/dist/stencil-library/polygon-buttons.entry.esm.js.map +1 -1
  60. package/dist/stencil-library/polygon-buttons.entry.js +3 -3
  61. package/dist/stencil-library/polygon-buttons.entry.js.map +1 -1
  62. package/dist/stencil-library/polygon-information.entry.esm.js.map +1 -1
  63. package/dist/stencil-library/polygon-information.entry.js +2 -2
  64. package/dist/stencil-library/polygon-information.entry.js.map +1 -1
  65. package/dist/stencil-library/{raw-BSypeTBq.js → raw-D-Vfg78n.js} +3 -3
  66. package/dist/stencil-library/{raw-BSypeTBq.js.map → raw-D-Vfg78n.js.map} +1 -1
  67. package/dist/stencil-library/search-icon.entry.esm.js.map +1 -1
  68. package/dist/stencil-library/search-icon.entry.js +1 -1
  69. package/dist/stencil-library/search-icon.entry.js.map +1 -1
  70. package/dist/stencil-library/settings-icon.entry.esm.js.map +1 -1
  71. package/dist/stencil-library/settings-icon.entry.js +1 -1
  72. package/dist/stencil-library/settings-icon.entry.js.map +1 -1
  73. package/dist/stencil-library/settings-modal.entry.esm.js.map +1 -1
  74. package/dist/stencil-library/settings-modal.entry.js +9 -9
  75. package/dist/stencil-library/settings-modal.entry.js.map +1 -1
  76. package/dist/stencil-library/solar-calculator.entry.esm.js.map +1 -1
  77. package/dist/stencil-library/solar-calculator.entry.js +3 -3
  78. package/dist/stencil-library/solar-calculator.entry.js.map +1 -1
  79. package/dist/stencil-library/solar-expert.entry.esm.js.map +1 -1
  80. package/dist/stencil-library/solar-expert.entry.js +3 -3
  81. package/dist/stencil-library/solar-expert.entry.js.map +1 -1
  82. package/dist/stencil-library/solar-system-form.entry.esm.js.map +1 -1
  83. package/dist/stencil-library/solar-system-form.entry.js +39 -39
  84. package/dist/stencil-library/solar-system-form.entry.js.map +1 -1
  85. package/dist/stencil-library/stencil-library.esm.js +52 -1
  86. package/dist/stencil-library/stencil-library.esm.js.map +1 -1
  87. package/dist/stencil-library/tool-box.entry.esm.js.map +1 -1
  88. package/dist/stencil-library/tool-box.entry.js +3 -3
  89. package/dist/stencil-library/tool-box.entry.js.map +1 -1
  90. package/dist/stencil-library/undo-icon.entry.esm.js.map +1 -1
  91. package/dist/stencil-library/undo-icon.entry.js +1 -1
  92. package/dist/stencil-library/undo-icon.entry.js.map +1 -1
  93. package/dist/stencil-library/{webimage-BZX1CuW8.js → webimage-V5ihYILu.js} +3 -3
  94. package/dist/stencil-library/{webimage-BZX1CuW8.js.map → webimage-V5ihYILu.js.map} +1 -1
  95. package/dist/types/components/map-draw/map-selector.d.ts +1 -0
  96. package/package.json +1 -1
  97. package/dist/components/eraser-icon.js +0 -11
  98. package/dist/components/eraser-icon.js.map +0 -1
  99. package/dist/components/house-icon.js +0 -11
  100. package/dist/components/house-icon.js.map +0 -1
  101. package/dist/components/icon-selector.js +0 -11
  102. package/dist/components/icon-selector.js.map +0 -1
  103. package/dist/components/index.js +0 -1269
  104. package/dist/components/index.js.map +0 -1
  105. package/dist/components/loading-widget.js +0 -38
  106. package/dist/components/loading-widget.js.map +0 -1
  107. package/dist/components/map-draw.js +0 -11
  108. package/dist/components/map-draw.js.map +0 -1
  109. package/dist/components/map-selector.js +0 -11
  110. package/dist/components/map-selector.js.map +0 -1
  111. package/dist/components/move-icon.js +0 -11
  112. package/dist/components/move-icon.js.map +0 -1
  113. package/dist/components/octagon-minus-icon.js +0 -11
  114. package/dist/components/octagon-minus-icon.js.map +0 -1
  115. package/dist/components/p-0Ymx0I1T.js +0 -76
  116. package/dist/components/p-0Ymx0I1T.js.map +0 -1
  117. package/dist/components/p-B-Rps0Lf.js +0 -40
  118. package/dist/components/p-B-Rps0Lf.js.map +0 -1
  119. package/dist/components/p-B54Ul0nf.js +0 -15
  120. package/dist/components/p-B54Ul0nf.js.map +0 -1
  121. package/dist/components/p-B5WTRCh8.js +0 -3241
  122. package/dist/components/p-B5WTRCh8.js.map +0 -1
  123. package/dist/components/p-BGoSj_DR.js +0 -902
  124. package/dist/components/p-BGoSj_DR.js.map +0 -1
  125. package/dist/components/p-BYoCVGKQ.js +0 -105
  126. package/dist/components/p-BYoCVGKQ.js.map +0 -1
  127. package/dist/components/p-BhS0AFyx.js +0 -161
  128. package/dist/components/p-BhS0AFyx.js.map +0 -1
  129. package/dist/components/p-BxeHuNQ0.js +0 -653
  130. package/dist/components/p-BxeHuNQ0.js.map +0 -1
  131. package/dist/components/p-ByX6QP-E.js +0 -33
  132. package/dist/components/p-ByX6QP-E.js.map +0 -1
  133. package/dist/components/p-C61RS5xJ.js +0 -40
  134. package/dist/components/p-C61RS5xJ.js.map +0 -1
  135. package/dist/components/p-CLe0s2gK.js +0 -40
  136. package/dist/components/p-CLe0s2gK.js.map +0 -1
  137. package/dist/components/p-CQxP2hZl.js +0 -414
  138. package/dist/components/p-CQxP2hZl.js.map +0 -1
  139. package/dist/components/p-CU_Hozfq.js.map +0 -1
  140. package/dist/components/p-Cfy4oCWb.js +0 -1909
  141. package/dist/components/p-Cfy4oCWb.js.map +0 -1
  142. package/dist/components/p-Cgchl6bA.js +0 -47
  143. package/dist/components/p-Cgchl6bA.js.map +0 -1
  144. package/dist/components/p-Cqkh0K8d.js +0 -50
  145. package/dist/components/p-Cqkh0K8d.js.map +0 -1
  146. package/dist/components/p-D0KrIPIK.js +0 -40
  147. package/dist/components/p-D0KrIPIK.js.map +0 -1
  148. package/dist/components/p-DSHWNE3m.js +0 -102
  149. package/dist/components/p-DSHWNE3m.js.map +0 -1
  150. package/dist/components/p-DZAFvfH1.js +0 -40
  151. package/dist/components/p-DZAFvfH1.js.map +0 -1
  152. package/dist/components/p-DiLO6lb_.js +0 -15822
  153. package/dist/components/p-DiLO6lb_.js.map +0 -1
  154. package/dist/components/p-DwozqyC_.js +0 -40
  155. package/dist/components/p-DwozqyC_.js.map +0 -1
  156. package/dist/components/p-Mv9J4znK.js +0 -40
  157. package/dist/components/p-Mv9J4znK.js.map +0 -1
  158. package/dist/components/p-Sf357vTW.js +0 -188
  159. package/dist/components/p-Sf357vTW.js.map +0 -1
  160. package/dist/components/p-WmcSqXD8.js +0 -14
  161. package/dist/components/p-WmcSqXD8.js.map +0 -1
  162. package/dist/components/p-XKzdTp2a.js +0 -4423
  163. package/dist/components/p-XKzdTp2a.js.map +0 -1
  164. package/dist/components/p-j-vOrhhh.js +0 -114
  165. package/dist/components/p-j-vOrhhh.js.map +0 -1
  166. package/dist/components/p-q8auDIJ2.js +0 -138
  167. package/dist/components/p-q8auDIJ2.js.map +0 -1
  168. package/dist/components/polygon-buttons.js +0 -11
  169. package/dist/components/polygon-buttons.js.map +0 -1
  170. package/dist/components/polygon-information.js +0 -11
  171. package/dist/components/polygon-information.js.map +0 -1
  172. package/dist/components/search-icon.js +0 -11
  173. package/dist/components/search-icon.js.map +0 -1
  174. package/dist/components/settings-icon.js +0 -11
  175. package/dist/components/settings-icon.js.map +0 -1
  176. package/dist/components/settings-modal.js +0 -11
  177. package/dist/components/settings-modal.js.map +0 -1
  178. package/dist/components/solar-calculator.js +0 -246
  179. package/dist/components/solar-calculator.js.map +0 -1
  180. package/dist/components/solar-expert.js +0 -360
  181. package/dist/components/solar-expert.js.map +0 -1
  182. package/dist/components/solar-system-form.js +0 -11
  183. package/dist/components/solar-system-form.js.map +0 -1
  184. package/dist/components/tool-box.js +0 -11
  185. package/dist/components/tool-box.js.map +0 -1
  186. package/dist/components/undo-icon.js +0 -11
  187. package/dist/components/undo-icon.js.map +0 -1
  188. package/dist/index.cjs.js +0 -1
  189. package/dist/index.js +0 -1
  190. package/dist/stencil-library/api-CU_Hozfq.js.map +0 -1
  191. package/dist/stencil-library/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.esm.js.map +0 -1
  192. package/dist/stencil-library/p-6f2848a5.entry.js +0 -2
  193. package/dist/stencil-library/p-6f2848a5.entry.js.map +0 -1
  194. package/dist/stencil-library/p-B54Ul0nf.js +0 -2
  195. package/dist/stencil-library/p-B54Ul0nf.js.map +0 -1
  196. package/dist/stencil-library/p-B5WTRCh8.js +0 -2
  197. package/dist/stencil-library/p-B5WTRCh8.js.map +0 -1
  198. package/dist/stencil-library/p-BGoSj_DR.js +0 -2
  199. package/dist/stencil-library/p-BGoSj_DR.js.map +0 -1
  200. package/dist/stencil-library/p-Brw-XSJB.js +0 -2
  201. package/dist/stencil-library/p-Brw-XSJB.js.map +0 -1
  202. package/dist/stencil-library/p-ByX6QP-E.js +0 -2
  203. package/dist/stencil-library/p-ByX6QP-E.js.map +0 -1
  204. package/dist/stencil-library/p-CX8V3eiN.js +0 -2
  205. package/dist/stencil-library/p-CX8V3eiN.js.map +0 -1
  206. package/dist/stencil-library/p-Cgchl6bA.js +0 -2
  207. package/dist/stencil-library/p-Cgchl6bA.js.map +0 -1
  208. package/dist/stencil-library/p-DXlWibwG.js +0 -10
  209. package/dist/stencil-library/p-DXlWibwG.js.map +0 -1
  210. package/dist/stencil-library/p-LebgAmeq.js +0 -2
  211. package/dist/stencil-library/p-LebgAmeq.js.map +0 -1
  212. package/dist/stencil-library/p-WmcSqXD8.js +0 -2
  213. package/dist/stencil-library/p-WmcSqXD8.js.map +0 -1
  214. package/dist/stencil-library/p-X54eOLJv.js +0 -3
  215. package/dist/stencil-library/p-X54eOLJv.js.map +0 -1
  216. package/dist/stencil-library/p-af021538.entry.js +0 -2
  217. package/dist/stencil-library/p-af021538.entry.js.map +0 -1
  218. package/dist/stencil-library/p-bde0ce8e.entry.js +0 -32
  219. package/dist/stencil-library/p-bde0ce8e.entry.js.map +0 -1
  220. package/dist/stencil-library/p-j-vOrhhh.js +0 -2
  221. package/dist/stencil-library/p-j-vOrhhh.js.map +0 -1
  222. package/dist/stencil-library/p-q8auDIJ2.js +0 -2
  223. package/dist/stencil-library/p-q8auDIJ2.js.map +0 -1
@@ -1,1909 +0,0 @@
1
-
2
- if (typeof global === "undefined") { var global = globalThis || window || self; }
3
- import { p as proxyCustomElement, H, h } from './index.js';
4
- import { g as getLanguageStrings, s as state } from './p-BxeHuNQ0.js';
5
- import { s as sendLeadToNexvoro } from './p-CU_Hozfq.js';
6
-
7
- var dist$1 = {};
8
-
9
- var geometry = {};
10
-
11
- var gridMatch = {};
12
-
13
- var dist = {};
14
-
15
- var shapes = {};
16
-
17
- var polygon = {};
18
-
19
- var hasRequiredPolygon;
20
-
21
- function requirePolygon () {
22
- if (hasRequiredPolygon) return polygon;
23
- hasRequiredPolygon = 1;
24
- Object.defineProperty(polygon, "__esModule", { value: true });
25
- polygon.PolygonType = polygon.Point = void 0;
26
- class Point {
27
- constructor(x, y) {
28
- this.x = x;
29
- this.y = y;
30
- }
31
- equals(other) {
32
- return this.x === other.x && this.y === other.y;
33
- }
34
- }
35
- polygon.Point = Point;
36
- var PolygonType;
37
- (function (PolygonType) {
38
- PolygonType["ROOF"] = "roof";
39
- PolygonType["OBSTRUCTION"] = "obstruction";
40
- })(PolygonType || (polygon.PolygonType = PolygonType = {}));
41
-
42
- return polygon;
43
- }
44
-
45
- var utils$1 = {};
46
-
47
- var hasRequiredUtils$1;
48
-
49
- function requireUtils$1 () {
50
- if (hasRequiredUtils$1) return utils$1;
51
- hasRequiredUtils$1 = 1;
52
- Object.defineProperty(utils$1, "__esModule", { value: true });
53
- utils$1.isPointInPolygon = isPointInPolygon;
54
- utils$1.isPointOnBorder = isPointOnBorder;
55
- function isPointInPolygon(point, polygon) {
56
- if (!polygon.closed || polygon.points.length < 3)
57
- return false;
58
- const num_vertices = polygon.points.length;
59
- const x = point.x;
60
- const y = point.y;
61
- let inside = false;
62
- let p1 = polygon.points[0];
63
- let p2;
64
- for (let i = 1; i <= num_vertices; i++) {
65
- p2 = polygon.points[i % num_vertices];
66
- if (y > Math.min(p1.y, p2.y)) {
67
- if (y <= Math.max(p1.y, p2.y)) {
68
- if (x <= Math.max(p1.x, p2.x)) {
69
- const x_intersection = ((y - p1.y) * (p2.x - p1.x)) / (p2.y - p1.y) + p1.x;
70
- if (p1.x === p2.x || x <= x_intersection) {
71
- inside = !inside;
72
- }
73
- }
74
- }
75
- }
76
- p1 = p2;
77
- }
78
- return inside;
79
- }
80
- function isPointOnBorder(point, polygon) {
81
- if (!polygon.closed || polygon.points.length < 3)
82
- return false;
83
- const x = point.x;
84
- const y = point.y;
85
- for (let i = 0; i < polygon.points.length; i++) {
86
- const p1 = polygon.points[i];
87
- const p2 = polygon.points[(i + 1) % polygon.points.length];
88
- const distance = Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));
89
- const distanceToPoint = Math.sqrt(Math.pow(p1.x - x, 2) + Math.pow(p1.y - y, 2));
90
- const distanceFromPoint = Math.sqrt(Math.pow(p2.x - x, 2) + Math.pow(p2.y - y, 2));
91
- if (distance === distanceToPoint + distanceFromPoint) {
92
- return true;
93
- }
94
- }
95
- return false;
96
- }
97
-
98
- return utils$1;
99
- }
100
-
101
- var hasRequiredShapes;
102
-
103
- function requireShapes () {
104
- if (hasRequiredShapes) return shapes;
105
- hasRequiredShapes = 1;
106
- (function (exports) {
107
- var __createBinding = (shapes && shapes.__createBinding) || (Object.create ? (function(o, m, k, k2) {
108
- if (k2 === undefined) k2 = k;
109
- var desc = Object.getOwnPropertyDescriptor(m, k);
110
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
111
- desc = { enumerable: true, get: function() { return m[k]; } };
112
- }
113
- Object.defineProperty(o, k2, desc);
114
- }) : (function(o, m, k, k2) {
115
- if (k2 === undefined) k2 = k;
116
- o[k2] = m[k];
117
- }));
118
- var __exportStar = (shapes && shapes.__exportStar) || function(m, exports) {
119
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
120
- };
121
- Object.defineProperty(exports, "__esModule", { value: true });
122
- __exportStar(requirePolygon(), exports);
123
- __exportStar(requireUtils$1(), exports);
124
-
125
- } (shapes));
126
- return shapes;
127
- }
128
-
129
- var solar = {};
130
-
131
- var location = {};
132
-
133
- var hasRequiredLocation;
134
-
135
- function requireLocation () {
136
- if (hasRequiredLocation) return location;
137
- hasRequiredLocation = 1;
138
- Object.defineProperty(location, "__esModule", { value: true });
139
-
140
- return location;
141
- }
142
-
143
- var solarPanel = {};
144
-
145
- var hasRequiredSolarPanel;
146
-
147
- function requireSolarPanel () {
148
- if (hasRequiredSolarPanel) return solarPanel;
149
- hasRequiredSolarPanel = 1;
150
- Object.defineProperty(solarPanel, "__esModule", { value: true });
151
-
152
- return solarPanel;
153
- }
154
-
155
- var googleSolar = {};
156
-
157
- var hasRequiredGoogleSolar;
158
-
159
- function requireGoogleSolar () {
160
- if (hasRequiredGoogleSolar) return googleSolar;
161
- hasRequiredGoogleSolar = 1;
162
- var __awaiter = (googleSolar && googleSolar.__awaiter) || function (thisArg, _arguments, P, generator) {
163
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
164
- return new (P || (P = Promise))(function (resolve, reject) {
165
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
166
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
167
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
168
- step((generator = generator.apply(thisArg, _arguments || [])).next());
169
- });
170
- };
171
- Object.defineProperty(googleSolar, "__esModule", { value: true });
172
- googleSolar.findClosestBuilding = findClosestBuilding;
173
- googleSolar.getDataLayerUrls = getDataLayerUrls;
174
- function findClosestBuilding(location, apiKey) {
175
- return __awaiter(this, void 0, void 0, function* () {
176
- const args = {
177
- "location.latitude": location.lat().toFixed(5),
178
- "location.longitude": location.lng().toFixed(5),
179
- };
180
- const params = new URLSearchParams(Object.assign(Object.assign({}, args), { key: apiKey }));
181
- return fetch(`https://solar.googleapis.com/v1/buildingInsights:findClosest?${params}`).then((response) => __awaiter(this, void 0, void 0, function* () {
182
- const content = yield response.json();
183
- if (response.status != 200) {
184
- console.error("findClosestBuilding\n", content);
185
- throw content;
186
- }
187
- return content;
188
- }));
189
- });
190
- }
191
- function getDataLayerUrls(location, radiusMeters, apiKey) {
192
- return __awaiter(this, void 0, void 0, function* () {
193
- const args = {
194
- "location.latitude": location.latitude.toFixed(5),
195
- "location.longitude": location.longitude.toFixed(5),
196
- radius_meters: radiusMeters.toString(),
197
- required_quality: "LOW",
198
- };
199
- const params = new URLSearchParams(Object.assign(Object.assign({}, args), { key: apiKey }));
200
- return fetch(`https://solar.googleapis.com/v1/dataLayers:get?${params}`)
201
- .then((response) => __awaiter(this, void 0, void 0, function* () {
202
- const content = yield response.json();
203
- if (response.status != 200) {
204
- console.error("getDataLayerUrls\n", content);
205
- throw content;
206
- }
207
- return content;
208
- }));
209
- });
210
- }
211
-
212
- return googleSolar;
213
- }
214
-
215
- var hasRequiredSolar;
216
-
217
- function requireSolar () {
218
- if (hasRequiredSolar) return solar;
219
- hasRequiredSolar = 1;
220
- (function (exports) {
221
- var __createBinding = (solar && solar.__createBinding) || (Object.create ? (function(o, m, k, k2) {
222
- if (k2 === undefined) k2 = k;
223
- var desc = Object.getOwnPropertyDescriptor(m, k);
224
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
225
- desc = { enumerable: true, get: function() { return m[k]; } };
226
- }
227
- Object.defineProperty(o, k2, desc);
228
- }) : (function(o, m, k, k2) {
229
- if (k2 === undefined) k2 = k;
230
- o[k2] = m[k];
231
- }));
232
- var __exportStar = (solar && solar.__exportStar) || function(m, exports) {
233
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
234
- };
235
- Object.defineProperty(exports, "__esModule", { value: true });
236
- __exportStar(requireLocation(), exports);
237
- __exportStar(requireSolarPanel(), exports);
238
- __exportStar(requireGoogleSolar(), exports);
239
-
240
- } (solar));
241
- return solar;
242
- }
243
-
244
- var heating = {};
245
-
246
- var hasRequiredHeating;
247
-
248
- function requireHeating () {
249
- if (hasRequiredHeating) return heating;
250
- hasRequiredHeating = 1;
251
- Object.defineProperty(heating, "__esModule", { value: true });
252
-
253
- return heating;
254
- }
255
-
256
- var hasRequiredDist$1;
257
-
258
- function requireDist$1 () {
259
- if (hasRequiredDist$1) return dist;
260
- hasRequiredDist$1 = 1;
261
- (function (exports) {
262
- var __createBinding = (dist && dist.__createBinding) || (Object.create ? (function(o, m, k, k2) {
263
- if (k2 === undefined) k2 = k;
264
- var desc = Object.getOwnPropertyDescriptor(m, k);
265
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
266
- desc = { enumerable: true, get: function() { return m[k]; } };
267
- }
268
- Object.defineProperty(o, k2, desc);
269
- }) : (function(o, m, k, k2) {
270
- if (k2 === undefined) k2 = k;
271
- o[k2] = m[k];
272
- }));
273
- var __exportStar = (dist && dist.__exportStar) || function(m, exports) {
274
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
275
- };
276
- Object.defineProperty(exports, "__esModule", { value: true });
277
- __exportStar(requireShapes(), exports);
278
- __exportStar(requireSolar(), exports);
279
- __exportStar(requireHeating(), exports);
280
-
281
- } (dist));
282
- return dist;
283
- }
284
-
285
- var fitting = {};
286
-
287
- var utils = {};
288
-
289
- var solarApi = {};
290
-
291
- var hasRequiredSolarApi;
292
-
293
- function requireSolarApi () {
294
- if (hasRequiredSolarApi) return solarApi;
295
- hasRequiredSolarApi = 1;
296
- var __awaiter = (solarApi && solarApi.__awaiter) || function (thisArg, _arguments, P, generator) {
297
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
298
- return new (P || (P = Promise))(function (resolve, reject) {
299
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
300
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
301
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
302
- step((generator = generator.apply(thisArg, _arguments || [])).next());
303
- });
304
- };
305
- Object.defineProperty(solarApi, "__esModule", { value: true });
306
- solarApi.fetchSolarData = fetchSolarData;
307
- solarApi.getPixelInMeters = getPixelInMeters;
308
- function fetchSolarData(latitude, longitude, apiKey) {
309
- return __awaiter(this, void 0, void 0, function* () {
310
- if (latitude === 0 || longitude === 0) {
311
- return null;
312
- }
313
- try {
314
- const args = {
315
- "location.latitude": latitude.toFixed(5),
316
- "location.longitude": longitude.toFixed(5),
317
- };
318
- const params = new URLSearchParams(Object.assign(Object.assign({}, args), { key: apiKey }));
319
- const response = yield fetch(`https://solar.googleapis.com/v1/buildingInsights:findClosest?${params}`);
320
- if (!response.ok) {
321
- const errorText = yield response.text();
322
- throw new Error(`HTTP error! status: ${response.status}, body: ${errorText}`);
323
- }
324
- const contentType = response.headers.get("content-type");
325
- if (!contentType || !contentType.includes("application/json")) {
326
- const text = yield response.text();
327
- console.error("Unexpected content type:", contentType, "Response:", text);
328
- return null;
329
- }
330
- const rawData = yield response.json();
331
- return rawData;
332
- }
333
- catch (error) {
334
- console.error("Error fetching solar data:", error);
335
- if (error instanceof TypeError &&
336
- error.message === "Failed to fetch") {
337
- throw new Error("Unable to connect to the solar data API.");
338
- }
339
- throw error;
340
- }
341
- });
342
- }
343
- function getPixelInMeters(rgbTiff) {
344
- const latDiff = rgbTiff.bounds.north - rgbTiff.bounds.south;
345
- const pixelHeight = rgbTiff.height;
346
- const pixelInMeters = latDiff * 111320 / pixelHeight;
347
- return pixelInMeters;
348
- }
349
-
350
- return solarApi;
351
- }
352
-
353
- var hasRequiredUtils;
354
-
355
- function requireUtils () {
356
- if (hasRequiredUtils) return utils;
357
- hasRequiredUtils = 1;
358
- (function (exports) {
359
- var __createBinding = (utils && utils.__createBinding) || (Object.create ? (function(o, m, k, k2) {
360
- if (k2 === undefined) k2 = k;
361
- var desc = Object.getOwnPropertyDescriptor(m, k);
362
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
363
- desc = { enumerable: true, get: function() { return m[k]; } };
364
- }
365
- Object.defineProperty(o, k2, desc);
366
- }) : (function(o, m, k, k2) {
367
- if (k2 === undefined) k2 = k;
368
- o[k2] = m[k];
369
- }));
370
- var __exportStar = (utils && utils.__exportStar) || function(m, exports) {
371
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
372
- };
373
- Object.defineProperty(exports, "__esModule", { value: true });
374
- exports.latLngToPixel = latLngToPixel;
375
- const harmonia_types_1 = requireDist$1();
376
- __exportStar(/*@__PURE__*/ requireSolarApi(), exports);
377
- function latLngToPixel(bounds, canvas, latLng) {
378
- const ctx = canvas.getContext("2d");
379
- if (!ctx) {
380
- throw new Error("Canvas context not found");
381
- }
382
- const latToPixel = (lat) => {
383
- return canvas.height *
384
- (1 - (lat - bounds.south) / (bounds.north - bounds.south));
385
- };
386
- const lngToPixel = (lng) => {
387
- return canvas.width * (lng - bounds.west) / (bounds.east - bounds.west);
388
- };
389
- return new harmonia_types_1.Point(lngToPixel(latLng.longitude), latToPixel(latLng.latitude));
390
- }
391
-
392
- } (utils));
393
- return utils;
394
- }
395
-
396
- var hasRequiredFitting;
397
-
398
- function requireFitting () {
399
- if (hasRequiredFitting) return fitting;
400
- hasRequiredFitting = 1;
401
- Object.defineProperty(fitting, "__esModule", { value: true });
402
- fitting.projectPoint = projectPoint;
403
- fitting.projectPolygon = projectPolygon;
404
- fitting.intersects = intersects;
405
- fitting.offsetPolygon = offsetPolygon;
406
- fitting.getBestFittingRoofSegment = getBestFittingRoofSegment;
407
- const harmonia_types_1 = requireDist$1();
408
- const utils_1 = /*@__PURE__*/ requireUtils();
409
- function projectPoint(point, azimuth) {
410
- const angle = azimuth * (Math.PI / 180);
411
- const x = point.x * Math.cos(angle) - point.y * Math.sin(angle);
412
- const y = point.x * Math.sin(angle) + point.y * Math.cos(angle);
413
- return new harmonia_types_1.Point(x, y);
414
- }
415
- function projectPolygon(polygon, azimuth) {
416
- return {
417
- points: polygon.points.map((point) => projectPoint(point, azimuth)),
418
- type: polygon.type,
419
- closed: polygon.closed,
420
- id: polygon.id,
421
- };
422
- }
423
- function intersects(line1, line2) {
424
- const p1 = line1.start;
425
- const p2 = line1.end;
426
- const p3 = line2.start;
427
- const p4 = line2.end;
428
- if (p1.equals(p3) ||
429
- p1.equals(p4) ||
430
- p2.equals(p3) ||
431
- p2.equals(p4)) {
432
- return false;
433
- }
434
- const d1 = (p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x);
435
- const d2 = (p4.x - p3.x) * (p2.y - p3.y) - (p4.y - p3.y) * (p2.x - p3.x);
436
- const d3 = (p2.x - p1.x) * (p3.y - p1.y) - (p2.y - p1.y) * (p3.x - p1.x);
437
- const d4 = (p2.x - p1.x) * (p4.y - p1.y) - (p2.y - p1.y) * (p4.x - p1.x);
438
- return (d1 * d2 < 0) && (d3 * d4 < 0);
439
- }
440
- function offsetPolygon(polygon, offset) {
441
- if (polygon.points.length === 0) {
442
- return { polygon: polygon, offset: { x: 0, y: 0 } };
443
- }
444
- let offsetX = 0;
445
- let offsetY = 0;
446
- if (!offset) {
447
- const minX = Math.min(...polygon.points.map((point) => point.x));
448
- const minY = Math.min(...polygon.points.map((point) => point.y));
449
- const maxX = Math.max(...polygon.points.map((point) => point.x));
450
- const maxY = Math.max(...polygon.points.map((point) => point.y));
451
- offsetX = minX + (maxX - minX) / 2;
452
- offsetY = minY + (maxY - minY) / 2;
453
- }
454
- else {
455
- offsetX = offset.x;
456
- offsetY = offset.y;
457
- }
458
- const newPoints = polygon.points.map((point) => new harmonia_types_1.Point(point.x - offsetX, point.y - offsetY));
459
- return {
460
- polygon: Object.assign(Object.assign({}, polygon), { points: newPoints }),
461
- offset: { x: offsetX, y: offsetY },
462
- };
463
- }
464
- function getBestFittingRoofSegment(roof, roofSegmentStats, bounds, canvas) {
465
- const polygonBounds = {
466
- minX: Math.min(...roof.points.map((p) => p.x)),
467
- maxX: Math.max(...roof.points.map((p) => p.x)),
468
- minY: Math.min(...roof.points.map((p) => p.y)),
469
- maxY: Math.max(...roof.points.map((p) => p.y)),
470
- };
471
- let bestSegment = null;
472
- let bestIoU = 0;
473
- for (const segment of roofSegmentStats) {
474
- const sw = (0, utils_1.latLngToPixel)(bounds, canvas, {
475
- latitude: segment.boundingBox.sw.latitude,
476
- longitude: segment.boundingBox.sw.longitude,
477
- });
478
- const ne = (0, utils_1.latLngToPixel)(bounds, canvas, {
479
- latitude: segment.boundingBox.ne.latitude,
480
- longitude: segment.boundingBox.ne.longitude,
481
- });
482
- const segmentBounds = {
483
- minX: sw.x,
484
- maxX: ne.x,
485
- minY: ne.y,
486
- maxY: sw.y,
487
- };
488
- const interLeft = Math.max(polygonBounds.minX, segmentBounds.minX);
489
- const interRight = Math.min(polygonBounds.maxX, segmentBounds.maxX);
490
- const interTop = Math.max(polygonBounds.minY, segmentBounds.minY);
491
- const interBottom = Math.min(polygonBounds.maxY, segmentBounds.maxY);
492
- const interWidth = interRight - interLeft;
493
- const interHeight = interBottom - interTop;
494
- let intersectionArea = 0;
495
- if (interWidth > 0 && interHeight > 0) {
496
- intersectionArea = interWidth * interHeight;
497
- }
498
- const polygonArea = (polygonBounds.maxX - polygonBounds.minX) *
499
- (polygonBounds.maxY - polygonBounds.minY);
500
- const segmentArea = (segmentBounds.maxX - segmentBounds.minX) *
501
- (segmentBounds.maxY - segmentBounds.minY);
502
- const unionArea = polygonArea + segmentArea - intersectionArea;
503
- const iou = unionArea > 0 ? intersectionArea / unionArea : 0;
504
- if (iou > bestIoU) {
505
- bestIoU = iou;
506
- bestSegment = segment;
507
- }
508
- }
509
- return bestSegment;
510
- }
511
-
512
- return fitting;
513
- }
514
-
515
- var hasRequiredGridMatch;
516
-
517
- function requireGridMatch () {
518
- if (hasRequiredGridMatch) return gridMatch;
519
- hasRequiredGridMatch = 1;
520
- Object.defineProperty(gridMatch, "__esModule", { value: true });
521
- gridMatch.generateGrid = generateGrid;
522
- gridMatch.solarPanelInObstacle = solarPanelInObstacle;
523
- gridMatch.solarPanelInPolygon = solarPanelInPolygon;
524
- gridMatch.isPanelObstructed = isPanelObstructed;
525
- gridMatch.getSolarPanelsInPolygon = getSolarPanelsInPolygon;
526
- gridMatch.getOptimalSolarPosition = getOptimalSolarPosition;
527
- gridMatch.insetPolygon = insetPolygon;
528
- gridMatch.getOptimalSolarPositionFully = getOptimalSolarPositionFully;
529
- const harmonia_types_1 = requireDist$1();
530
- const fitting_1 = /*@__PURE__*/ requireFitting();
531
- function generateGrid(minMax, solarPanel, horizontal, anker, rowSpacing, columnSpacing) {
532
- const grid = [];
533
- const width = horizontal ? solarPanel.heightMeters : solarPanel.widthMeters;
534
- const widthCount = Math.ceil((minMax.maxX - minMax.minX) / width);
535
- const height = horizontal
536
- ? solarPanel.widthMeters
537
- : solarPanel.heightMeters;
538
- const heightCount = Math.ceil((minMax.maxY - minMax.minY) / height);
539
- const widthOffset = width / 2;
540
- const heightOffset = height / 2;
541
- const startX = anker.x -
542
- (Math.ceil((anker.x - minMax.minX) / width) * width);
543
- const startY = anker.y -
544
- (Math.ceil((anker.y - minMax.minY) / height) * height);
545
- for (let i = 0; i < heightCount; i++) {
546
- const row = [];
547
- for (let j = 0; j < widthCount; j++) {
548
- const x = startX + j * width + j * columnSpacing + widthOffset;
549
- const y = startY + i * height + i * rowSpacing + heightOffset;
550
- const positionedSolarPanel = {
551
- panel: solarPanel,
552
- pixelPosition: new harmonia_types_1.Point(x, y),
553
- horizontal: horizontal,
554
- };
555
- row.push(positionedSolarPanel);
556
- }
557
- grid.push(row);
558
- }
559
- return grid;
560
- }
561
- function getSolarPanelLines(positionedSolarPanel, horizontal) {
562
- const width = horizontal
563
- ? positionedSolarPanel.panel.heightMeters
564
- : positionedSolarPanel.panel.widthMeters;
565
- const height = horizontal
566
- ? positionedSolarPanel.panel.widthMeters
567
- : positionedSolarPanel.panel.heightMeters;
568
- const p1 = new harmonia_types_1.Point(positionedSolarPanel.pixelPosition.x - width / 2, positionedSolarPanel.pixelPosition.y - height / 2);
569
- const p2 = new harmonia_types_1.Point(positionedSolarPanel.pixelPosition.x - width / 2, positionedSolarPanel.pixelPosition.y + height / 2);
570
- const p3 = new harmonia_types_1.Point(positionedSolarPanel.pixelPosition.x + width / 2, positionedSolarPanel.pixelPosition.y + height / 2);
571
- const p4 = new harmonia_types_1.Point(positionedSolarPanel.pixelPosition.x + width / 2, positionedSolarPanel.pixelPosition.y - height / 2);
572
- const lines = [
573
- {
574
- start: p1,
575
- end: p2,
576
- },
577
- {
578
- start: p2,
579
- end: p3,
580
- },
581
- {
582
- start: p3,
583
- end: p4,
584
- },
585
- {
586
- start: p4,
587
- end: p1,
588
- },
589
- ];
590
- return lines;
591
- }
592
- function solarPanelInObstacle(positionedSolarPanel, obstacle, horizontal) {
593
- const lines = getSolarPanelLines(positionedSolarPanel, horizontal);
594
- if ((0, harmonia_types_1.isPointInPolygon)(positionedSolarPanel.pixelPosition, obstacle)) {
595
- return true;
596
- }
597
- for (let i = 0; i < obstacle.points.length; i++) {
598
- const point = obstacle.points[i];
599
- const nextPoint = obstacle.points[(i + 1) % obstacle.points.length];
600
- const border = {
601
- start: point,
602
- end: nextPoint,
603
- };
604
- for (const line of lines) {
605
- if ((0, fitting_1.intersects)(line, border)) {
606
- return true;
607
- }
608
- }
609
- }
610
- return false;
611
- }
612
- function solarPanelInPolygon(positionedSolarPanel, polygon, horizontal) {
613
- const lines = getSolarPanelLines(positionedSolarPanel, horizontal);
614
- for (let i = 0; i < polygon.points.length; i++) {
615
- const point = polygon.points[i];
616
- const nextPoint = polygon.points[(i + 1) % polygon.points.length];
617
- const border = {
618
- start: point,
619
- end: nextPoint,
620
- };
621
- for (const line of lines) {
622
- if ((0, fitting_1.intersects)(line, border)) {
623
- return false;
624
- }
625
- }
626
- }
627
- return (0, harmonia_types_1.isPointInPolygon)(positionedSolarPanel.pixelPosition, polygon);
628
- }
629
- function isPanelObstructed(positionedSolarPanel, obstacles, horizontal) {
630
- for (const obstacle of obstacles) {
631
- if (solarPanelInObstacle(positionedSolarPanel, obstacle.polygon, horizontal)) {
632
- return true;
633
- }
634
- }
635
- return false;
636
- }
637
- function getSolarPanelsInPolygon(grid, polygon, horizontal, obstacles) {
638
- const solarPanels = [];
639
- for (const row of grid) {
640
- let newRow = [];
641
- for (const positionedSolarPanel of row) {
642
- const isObstructed = isPanelObstructed(positionedSolarPanel, obstacles, horizontal);
643
- if (solarPanelInPolygon(positionedSolarPanel, polygon, horizontal) && !isObstructed) {
644
- newRow.push(positionedSolarPanel);
645
- }
646
- }
647
- solarPanels.push(newRow);
648
- }
649
- return solarPanels;
650
- }
651
- function getOptimalSolarPosition(roof, obstacles, solarPanel, angle, columnSpacing, rowSpacing) {
652
- const minX = Math.min(...roof.points.map((p) => p.x));
653
- const maxX = Math.max(...roof.points.map((p) => p.x));
654
- const minY = Math.min(...roof.points.map((p) => p.y));
655
- const maxY = Math.max(...roof.points.map((p) => p.y));
656
- const minMax = {
657
- minX: minX,
658
- maxX: maxX,
659
- minY: minY,
660
- maxY: maxY,
661
- };
662
- Object.assign(Object.assign({}, solarPanel), { widthMeters: solarPanel.widthMeters * Math.cos(angle * Math.PI / 180), heightMeters: solarPanel.heightMeters });
663
- const verticalSolarPanel = Object.assign(Object.assign({}, solarPanel), { widthMeters: solarPanel.widthMeters, heightMeters: solarPanel.heightMeters * Math.cos(angle * Math.PI / 180) });
664
- let solarPanels = [];
665
- let numberOfPanels = 0;
666
- for (const point of roof.points) {
667
- for (const horizontal of [true]) {
668
- const grid = generateGrid(minMax, verticalSolarPanel, horizontal, point, rowSpacing, columnSpacing);
669
- const solarPanelsInPolygon = getSolarPanelsInPolygon(grid, roof, horizontal, obstacles);
670
- const numberOfPanelsInPolygon = solarPanelsInPolygon.reduce((acc, row) => acc + row.length, 0);
671
- if (numberOfPanelsInPolygon > numberOfPanels) {
672
- numberOfPanels = numberOfPanelsInPolygon;
673
- solarPanels = solarPanelsInPolygon;
674
- }
675
- }
676
- break;
677
- }
678
- return solarPanels;
679
- }
680
- function projectObstacles(obstacles, azimuth, offset, inset) {
681
- const result = [];
682
- for (const obstacle of obstacles) {
683
- const offsetObstacle = (0, fitting_1.offsetPolygon)(obstacle, offset);
684
- const projectedObstacle = (0, fitting_1.projectPolygon)(offsetObstacle.polygon, -azimuth);
685
- const insetObstacle = insetPolygon(projectedObstacle, -inset);
686
- const minX = Math.min(...insetObstacle.points.map((p) => p.x));
687
- const maxX = Math.max(...insetObstacle.points.map((p) => p.x));
688
- const minY = Math.min(...insetObstacle.points.map((p) => p.y));
689
- const maxY = Math.max(...insetObstacle.points.map((p) => p.y));
690
- const boundingBox = {
691
- minX: minX,
692
- maxX: maxX,
693
- minY: minY,
694
- maxY: maxY,
695
- };
696
- result.push({
697
- polygon: projectedObstacle,
698
- boundingBox: boundingBox,
699
- });
700
- }
701
- return result;
702
- }
703
- function isClockwise(points) {
704
- let sum = 0;
705
- for (let i = 0; i < points.length; i++) {
706
- const curr = points[i];
707
- const next = points[(i + 1) % points.length];
708
- sum += (next.x - curr.x) * (next.y + curr.y);
709
- }
710
- return sum > 0;
711
- }
712
- function insetPolygon(polygon, inset) {
713
- const points = polygon.points;
714
- const isClockwisePolygon = isClockwise(points);
715
- inset = inset * Math.sqrt(2) * (isClockwisePolygon ? -1 : 1);
716
- const insetPoints = [];
717
- for (let i = 0; i < points.length; i++) {
718
- const prev = points[(i - 1 + points.length) % points.length];
719
- const curr = points[i];
720
- const next = points[(i + 1) % points.length];
721
- const v1 = {
722
- x: curr.x - prev.x,
723
- y: curr.y - prev.y,
724
- };
725
- const v2 = {
726
- x: next.x - curr.x,
727
- y: next.y - curr.y,
728
- };
729
- const perp1 = {
730
- x: -v1.y,
731
- y: v1.x,
732
- };
733
- const perp2 = {
734
- x: -v2.y,
735
- y: v2.x,
736
- };
737
- const length1 = Math.sqrt(perp1.x * perp1.x + perp1.y * perp1.y);
738
- const length2 = Math.sqrt(perp2.x * perp2.x + perp2.y * perp2.y);
739
- perp1.x /= length1;
740
- perp1.y /= length1;
741
- perp2.x /= length2;
742
- perp2.y /= length2;
743
- const bisector = {
744
- x: perp1.x + perp2.x,
745
- y: perp1.y + perp2.y,
746
- };
747
- const bisectorLength = Math.sqrt(bisector.x * bisector.x + bisector.y * bisector.y);
748
- bisector.x /= bisectorLength;
749
- bisector.y /= bisectorLength;
750
- const insetPoint = new harmonia_types_1.Point(curr.x + bisector.x * inset, curr.y + bisector.y * inset);
751
- insetPoints.push(insetPoint);
752
- }
753
- return {
754
- points: insetPoints,
755
- type: polygon.type,
756
- closed: polygon.closed,
757
- id: polygon.id,
758
- area: polygon.area,
759
- };
760
- }
761
- function getOptimalSolarPositionFully(roof, obstacles, solarPanel, azimuth, inset, angle, columnSpacing, rowSpacing) {
762
- const insetRoof = insetPolygon(roof, inset);
763
- const offset = (0, fitting_1.offsetPolygon)(insetRoof);
764
- const projectedOffset = (0, fitting_1.projectPolygon)(offset.polygon, -azimuth);
765
- const projectedObstacles = projectObstacles(obstacles, azimuth, offset.offset, inset);
766
- const horizontalSolarPanels = getOptimalSolarPosition(projectedOffset, projectedObstacles, solarPanel, angle, columnSpacing, rowSpacing);
767
- const unprojectedPanels = [];
768
- for (const panel of horizontalSolarPanels.flat()) {
769
- const unprojectedPanel = (0, fitting_1.projectPoint)(panel.pixelPosition, azimuth);
770
- const offsetPosition = new harmonia_types_1.Point(unprojectedPanel.x + offset.offset.x, unprojectedPanel.y + offset.offset.y);
771
- unprojectedPanels.push({
772
- panel: panel.panel,
773
- pixelPosition: offsetPosition,
774
- horizontal: panel.horizontal,
775
- });
776
- }
777
- return unprojectedPanels;
778
- }
779
-
780
- return gridMatch;
781
- }
782
-
783
- var hasRequiredGeometry;
784
-
785
- function requireGeometry () {
786
- if (hasRequiredGeometry) return geometry;
787
- hasRequiredGeometry = 1;
788
- (function (exports) {
789
- var __createBinding = (geometry && geometry.__createBinding) || (Object.create ? (function(o, m, k, k2) {
790
- if (k2 === undefined) k2 = k;
791
- var desc = Object.getOwnPropertyDescriptor(m, k);
792
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
793
- desc = { enumerable: true, get: function() { return m[k]; } };
794
- }
795
- Object.defineProperty(o, k2, desc);
796
- }) : (function(o, m, k, k2) {
797
- if (k2 === undefined) k2 = k;
798
- o[k2] = m[k];
799
- }));
800
- var __exportStar = (geometry && geometry.__exportStar) || function(m, exports) {
801
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
802
- };
803
- Object.defineProperty(exports, "__esModule", { value: true });
804
- __exportStar(/*@__PURE__*/ requireGridMatch(), exports);
805
- __exportStar(/*@__PURE__*/ requireFitting(), exports);
806
-
807
- } (geometry));
808
- return geometry;
809
- }
810
-
811
- var simulation$1 = {};
812
-
813
- var simulation = {};
814
-
815
- var solarCurves = {};
816
-
817
- var hasRequiredSolarCurves;
818
-
819
- function requireSolarCurves () {
820
- if (hasRequiredSolarCurves) return solarCurves;
821
- hasRequiredSolarCurves = 1;
822
- Object.defineProperty(solarCurves, "__esModule", { value: true });
823
- solarCurves.SOLAR_RADIATION = solarCurves.CONSUMPTION_PROFILES = void 0;
824
- solarCurves.getSolarRadiation = getSolarRadiation;
825
- const SOLAR_RADIATION = [
826
- 0,
827
- 0,
828
- 0,
829
- 0,
830
- 0,
831
- 0,
832
- 0,
833
- 0.1,
834
- 0.2,
835
- 0.4,
836
- 0.8,
837
- 0.9,
838
- 1,
839
- 0.95,
840
- 0.9,
841
- 0.7,
842
- 0.5,
843
- 0.3,
844
- 0.16,
845
- 0.02,
846
- 0,
847
- 0,
848
- 0,
849
- 0,
850
- ];
851
- solarCurves.SOLAR_RADIATION = SOLAR_RADIATION;
852
- function getSolarRadiation(discountFactor) {
853
- return SOLAR_RADIATION.map((value) => value * discountFactor);
854
- }
855
- const CONSUMPTION_PROFILES = {
856
- mostly_at_home: [
857
- 0.1,
858
- 0.1,
859
- 0.1,
860
- 0.1,
861
- 0.1,
862
- 0.15,
863
- 0.23,
864
- 0.26,
865
- 0.16,
866
- 0.16,
867
- 0.15,
868
- 0.19,
869
- 0.23,
870
- 0.24,
871
- 0.35,
872
- 0.28,
873
- 0.275,
874
- 0.8,
875
- 0.78,
876
- 0.74,
877
- 0.75,
878
- 0.73,
879
- 0.26,
880
- 0.1,
881
- ],
882
- mostly_away: [
883
- 0.1,
884
- 0.1,
885
- 0.1,
886
- 0.1,
887
- 0.1,
888
- 0.15,
889
- 0.29,
890
- 0.32,
891
- 0.25,
892
- 0.15,
893
- 0.12,
894
- 0.14,
895
- 0.15,
896
- 0.12,
897
- 0.16,
898
- 0.21,
899
- 0.285,
900
- 1,
901
- 0.81,
902
- 0.77,
903
- 0.79,
904
- 0.73,
905
- 0.26,
906
- 0.1,
907
- ],
908
- };
909
- solarCurves.CONSUMPTION_PROFILES = CONSUMPTION_PROFILES;
910
-
911
- return solarCurves;
912
- }
913
-
914
- var types = {};
915
-
916
- var hasRequiredTypes;
917
-
918
- function requireTypes () {
919
- if (hasRequiredTypes) return types;
920
- hasRequiredTypes = 1;
921
- Object.defineProperty(types, "__esModule", { value: true });
922
- types.DEFAULT_GENERAL_SIMULATION_CONFIG = void 0;
923
- types.DEFAULT_GENERAL_SIMULATION_CONFIG = {
924
- simulationYears: 25,
925
- };
926
-
927
- return types;
928
- }
929
-
930
- var hasRequiredSimulation$1;
931
-
932
- function requireSimulation$1 () {
933
- if (hasRequiredSimulation$1) return simulation;
934
- hasRequiredSimulation$1 = 1;
935
- Object.defineProperty(simulation, "__esModule", { value: true });
936
- simulation.generateElectricCarChargingHours = generateElectricCarChargingHours;
937
- simulation.simulateDay = simulateDay;
938
- simulation.simulate = simulate;
939
- const solarCurves_1 = /*@__PURE__*/ requireSolarCurves();
940
- const types_1 = /*@__PURE__*/ requireTypes();
941
- function generateElectricCarChargingHours(start, end) {
942
- let hours = new Array(24).fill(false);
943
- if (start < end) {
944
- for (let i = start; i <= end; i++) {
945
- hours[i] = true;
946
- }
947
- }
948
- else {
949
- for (let i = start; i <= 24; i++) {
950
- hours[i] = true;
951
- }
952
- for (let i = 0; i <= end; i++) {
953
- hours[i] = true;
954
- }
955
- }
956
- return hours;
957
- }
958
- function simulateDay(production, consumption, dailyConsumption, battery) {
959
- let batteryCharge = 0;
960
- let soldEnergy = 0;
961
- let energyUsageOfProduction = 0;
962
- for (let hour = 0; hour < production.length; hour++) {
963
- const energyDifference = production[hour] - consumption[hour];
964
- if (energyDifference > 0) {
965
- energyUsageOfProduction += consumption[hour];
966
- if (batteryCharge < battery &&
967
- batteryCharge + energyDifference <= battery) {
968
- batteryCharge = batteryCharge + energyDifference;
969
- }
970
- else if (batteryCharge < battery) {
971
- const batteryDifference = battery - batteryCharge;
972
- batteryCharge = battery;
973
- soldEnergy += energyDifference - batteryDifference;
974
- }
975
- else {
976
- soldEnergy += energyDifference;
977
- }
978
- }
979
- else {
980
- if (batteryCharge > 0) {
981
- if (batteryCharge >= -energyDifference) {
982
- batteryCharge += energyDifference;
983
- energyUsageOfProduction += consumption[hour];
984
- }
985
- else {
986
- energyUsageOfProduction += production[hour] + batteryCharge;
987
- batteryCharge = 0;
988
- }
989
- }
990
- else {
991
- energyUsageOfProduction += production[hour];
992
- }
993
- }
994
- }
995
- if (batteryCharge > 0) {
996
- soldEnergy += batteryCharge;
997
- }
998
- const autonomy = energyUsageOfProduction / dailyConsumption;
999
- return {
1000
- autonomy: autonomy > 1 ? 1 : autonomy,
1001
- soldEnergy,
1002
- energyUsageOfProduction,
1003
- };
1004
- }
1005
- function simulate(config) {
1006
- const generalConfig = Object.assign(Object.assign({}, types_1.DEFAULT_GENERAL_SIMULATION_CONFIG), config.general);
1007
- const consumption = solarCurves_1.CONSUMPTION_PROFILES[config.householdConsumption.consumptionProfile];
1008
- const norm = consumption.reduce((acc, curr) => acc + curr, 0);
1009
- let additionalConsumption = 0;
1010
- if (config.heatPump) {
1011
- additionalConsumption =
1012
- (config.heatPump.m2 || 0) * config.heatPump.consumptionPerM2 || 0;
1013
- }
1014
- let electricCarConsumption = 0;
1015
- let electricCarNorm = 1;
1016
- let electricCarChargingHours = consumption.map((_) => false);
1017
- if (config.electricCar) {
1018
- electricCarChargingHours = config.electricCar.chargingHours;
1019
- const dailyCarUsage = config.electricCar.averageKilometersPerDay / 100 *
1020
- config.electricCar.consumptionkWhPer100km;
1021
- electricCarConsumption = Math.min(dailyCarUsage, config.electricCar.batteryKWh);
1022
- electricCarNorm = config.electricCar.chargingHours.reduce((acc, curr) => acc + (curr ? 1 : 0), 0);
1023
- if (electricCarNorm === 0) {
1024
- electricCarNorm = 1;
1025
- }
1026
- }
1027
- let systemSize = 0;
1028
- if (config.solarSystems) {
1029
- systemSize = Object.values(config.solarSystems).reduce((acc, curr) => {
1030
- return acc + curr.numberOfPanels * curr.panelType.kWattPeak;
1031
- }, 0);
1032
- }
1033
- else if (config.solarSystem) {
1034
- console.warn("solarSystem is deprecated, use solarSystems instead");
1035
- systemSize = config.solarSystem.numberOfPanels *
1036
- config.solarSystem.panelType.kWattPeak;
1037
- }
1038
- else {
1039
- throw new Error("No solar system found");
1040
- }
1041
- const summerProduction = (0, solarCurves_1.getSolarRadiation)(config.solarRadiation.summerFactor * systemSize);
1042
- const winterProduction = (0, solarCurves_1.getSolarRadiation)(config.solarRadiation.winterFactor * systemSize);
1043
- const summerConsumptionWholeDay = config.householdConsumption.averageConsumption *
1044
- config.householdConsumption.summerConsumptionFactor +
1045
- additionalConsumption *
1046
- config.householdConsumption.summerConsumptionFactor;
1047
- const summerConsumptionDaily = consumption.map((c, i) => c / norm * summerConsumptionWholeDay +
1048
- electricCarConsumption / electricCarNorm *
1049
- (electricCarChargingHours[i] ? 1 : 0));
1050
- const winterConsumptionWholeDay = config.householdConsumption.averageConsumption *
1051
- config.householdConsumption.winterConsumptionFactor +
1052
- additionalConsumption *
1053
- config.householdConsumption.winterConsumptionFactor;
1054
- const winterConsumptionDaily = consumption.map((c, i) => c / norm * winterConsumptionWholeDay +
1055
- electricCarConsumption / electricCarNorm *
1056
- (electricCarChargingHours[i] ? 1 : 0));
1057
- const summerDay = simulateDay(summerProduction, summerConsumptionDaily, summerConsumptionWholeDay + electricCarConsumption, config.batteryKWh);
1058
- const winterDay = simulateDay(winterProduction, winterConsumptionDaily, winterConsumptionWholeDay + electricCarConsumption, config.batteryKWh);
1059
- let savedCostsByYear = [];
1060
- const soldEnergy = (summerDay.soldEnergy + winterDay.soldEnergy) / 2;
1061
- const ownConsumption = (summerDay.energyUsageOfProduction +
1062
- winterDay.energyUsageOfProduction) / 2;
1063
- let energyPrice = config.electricityPrice.purchase;
1064
- for (let i = 0; i < generalConfig.simulationYears; i++) {
1065
- const savedCostsThisYear = ownConsumption * energyPrice * 365;
1066
- savedCostsByYear.push(savedCostsThisYear);
1067
- energyPrice = (1 + config.electricityPrice.increase) * energyPrice;
1068
- }
1069
- return {
1070
- autonomy: (summerDay.autonomy + winterDay.autonomy) / 2,
1071
- compensationPerDay: soldEnergy * config.electricityPrice.sell,
1072
- byYearSavedCosts: savedCostsByYear,
1073
- totalEnergyConsumptionDay: (summerConsumptionWholeDay + winterConsumptionWholeDay) / 2 +
1074
- electricCarConsumption,
1075
- };
1076
- }
1077
-
1078
- return simulation;
1079
- }
1080
-
1081
- var heatingSimulation = {};
1082
-
1083
- var heatingConstants = {};
1084
-
1085
- var hasRequiredHeatingConstants;
1086
-
1087
- function requireHeatingConstants () {
1088
- if (hasRequiredHeatingConstants) return heatingConstants;
1089
- hasRequiredHeatingConstants = 1;
1090
- Object.defineProperty(heatingConstants, "__esModule", { value: true });
1091
- heatingConstants.SYSTEM_EFFICIENCY = heatingConstants.INSULATION_FACTORS = heatingConstants.EQUIPMENT_COSTS = heatingConstants.DISTRIBUTION_EFFICIENCY = heatingConstants.DISTRIBUTION_COSTS = heatingConstants.CO2_EMISSIONS = heatingConstants.CLIMATE_DATA = void 0;
1092
- const CLIMATE_DATA = {
1093
- "Zone 1": { heatingDegreeHours: 1200, coolingDegreeHours: 2800 },
1094
- "Zone 2": { heatingDegreeHours: 1800, coolingDegreeHours: 2200 },
1095
- "Zone 3": { heatingDegreeHours: 2400, coolingDegreeHours: 1800 },
1096
- "Zone 4": { heatingDegreeHours: 3200, coolingDegreeHours: 1400 },
1097
- "Zone 5": { heatingDegreeHours: 4200, coolingDegreeHours: 1000 },
1098
- "Zone 6": { heatingDegreeHours: 5400, coolingDegreeHours: 600 },
1099
- "Zone 7": { heatingDegreeHours: 6800, coolingDegreeHours: 300 },
1100
- "Zone 8": { heatingDegreeHours: 8400, coolingDegreeHours: 100 },
1101
- };
1102
- heatingConstants.CLIMATE_DATA = CLIMATE_DATA;
1103
- const INSULATION_FACTORS = {
1104
- poor: 1.4,
1105
- fair: 1.2,
1106
- good: 1.0,
1107
- excellent: 0.8,
1108
- };
1109
- heatingConstants.INSULATION_FACTORS = INSULATION_FACTORS;
1110
- const CO2_EMISSIONS = {
1111
- electricity: 0.855,
1112
- gas: 11.7,
1113
- oil: 22.4,
1114
- };
1115
- heatingConstants.CO2_EMISSIONS = CO2_EMISSIONS;
1116
- const SYSTEM_EFFICIENCY = {
1117
- "heat-pump": { heating: 3.2, cooling: 16 },
1118
- "electric": { heating: 1.0, cooling: 0 },
1119
- "gas": { heating: 0.85, cooling: 0 },
1120
- "oil": { heating: 0.8, cooling: 0 },
1121
- "split-ac": { heating: 2.8, cooling: 14 },
1122
- "central-ac": { heating: 0, cooling: 13 },
1123
- };
1124
- heatingConstants.SYSTEM_EFFICIENCY = SYSTEM_EFFICIENCY;
1125
- const DISTRIBUTION_EFFICIENCY = {
1126
- "central-air": 0.85,
1127
- "radiators": 0.9,
1128
- "radiant-floor": 0.95,
1129
- "radiant-ceiling": 0.92,
1130
- };
1131
- heatingConstants.DISTRIBUTION_EFFICIENCY = DISTRIBUTION_EFFICIENCY;
1132
- const EQUIPMENT_COSTS = {
1133
- "heat-pump": { base: 8000, perSqFt: 3 },
1134
- "electric": { base: 2000, perSqFt: 1 },
1135
- "gas": { base: 4000, perSqFt: 2 },
1136
- "oil": { base: 5000, perSqFt: 2.5 },
1137
- "split-ac": { base: 6000, perSqFt: 2.5 },
1138
- "central-ac": { base: 7000, perSqFt: 3 },
1139
- };
1140
- heatingConstants.EQUIPMENT_COSTS = EQUIPMENT_COSTS;
1141
- const DISTRIBUTION_COSTS = {
1142
- "central-air": { base: 3000, perSqFt: 2 },
1143
- "radiators": { base: 4000, perSqFt: 3 },
1144
- "radiant-floor": { base: 8000, perSqFt: 6 },
1145
- "radiant-ceiling": { base: 6000, perSqFt: 4 },
1146
- };
1147
- heatingConstants.DISTRIBUTION_COSTS = DISTRIBUTION_COSTS;
1148
-
1149
- return heatingConstants;
1150
- }
1151
-
1152
- var hasRequiredHeatingSimulation;
1153
-
1154
- function requireHeatingSimulation () {
1155
- if (hasRequiredHeatingSimulation) return heatingSimulation;
1156
- hasRequiredHeatingSimulation = 1;
1157
- Object.defineProperty(heatingSimulation, "__esModule", { value: true });
1158
- heatingSimulation.houseSchema = heatingSimulation.locationSchema = void 0;
1159
- heatingSimulation.calculateHeatingSystemComparison = calculateHeatingSystemComparison;
1160
- heatingSimulation.getDefaultUtilityRates = getDefaultUtilityRates;
1161
- const heatingConstants_1 = /*@__PURE__*/ requireHeatingConstants();
1162
- function calculateHeatLoss(house, location) {
1163
- const climateData = heatingConstants_1.CLIMATE_DATA["Zone 1"];
1164
- const baseHeatLoss = house.size * 30;
1165
- const insulationFactor = heatingConstants_1.INSULATION_FACTORS[house.insulationLevel];
1166
- const sharedWallFactor = 1 - (house.sharedWalls * 0.1);
1167
- return baseHeatLoss * insulationFactor * sharedWallFactor *
1168
- ((climateData === null || climateData === void 0 ? void 0 : climateData.heatingDegreeHours) || 3000) / 3000;
1169
- }
1170
- function calculateCoolingLoad(house, location) {
1171
- const climateData = heatingConstants_1.CLIMATE_DATA["Zone 1"];
1172
- const baseCoolingLoad = house.size * 25;
1173
- const insulationFactor = heatingConstants_1.INSULATION_FACTORS[house.insulationLevel];
1174
- return baseCoolingLoad * insulationFactor *
1175
- ((climateData === null || climateData === void 0 ? void 0 : climateData.coolingDegreeHours) || 1500) / 1500;
1176
- }
1177
- function calculateEnergyConsumption(heatLoss, coolingLoad, system, hours) {
1178
- const systemEff = heatingConstants_1.SYSTEM_EFFICIENCY[system.type];
1179
- const distEff = heatingConstants_1.DISTRIBUTION_EFFICIENCY[system.distribution];
1180
- const heatingEnergy = (heatLoss * hours) /
1181
- (systemEff.heating * distEff * 3412);
1182
- const coolingEnergy = (coolingLoad * hours) /
1183
- (systemEff.cooling * distEff * 3412);
1184
- return { heating: heatingEnergy, cooling: coolingEnergy };
1185
- }
1186
- function calculateCosts(energy, system, rates) {
1187
- let cost = 0;
1188
- if (system.type === "heat-pump" || system.type === "electric" ||
1189
- system.type === "split-ac" || system.type === "central-ac") {
1190
- cost = (energy.heating + energy.cooling) * rates.electricity;
1191
- }
1192
- else if (system.type === "gas") {
1193
- cost = (energy.heating * 3412 / 100000) * rates.gas +
1194
- energy.cooling * rates.electricity;
1195
- }
1196
- else if (system.type === "oil") {
1197
- cost = (energy.heating * 3412 / 138690) * rates.oil +
1198
- energy.cooling * rates.electricity;
1199
- }
1200
- return cost;
1201
- }
1202
- function calculateCO2Emissions(energy, system) {
1203
- let emissions = 0;
1204
- if (system.type === "heat-pump" || system.type === "electric" ||
1205
- system.type === "split-ac" || system.type === "central-ac") {
1206
- emissions = (energy.heating + energy.cooling) *
1207
- heatingConstants_1.CO2_EMISSIONS.electricity;
1208
- }
1209
- else if (system.type === "gas") {
1210
- emissions = (energy.heating * 3412 / 100000) * heatingConstants_1.CO2_EMISSIONS.gas +
1211
- energy.cooling * heatingConstants_1.CO2_EMISSIONS.electricity;
1212
- }
1213
- else if (system.type === "oil") {
1214
- emissions = (energy.heating * 3412 / 138690) * heatingConstants_1.CO2_EMISSIONS.oil +
1215
- energy.cooling * heatingConstants_1.CO2_EMISSIONS.electricity;
1216
- }
1217
- return emissions;
1218
- }
1219
- function calculateSystemCosts(system, house) {
1220
- const equipmentCost = heatingConstants_1.EQUIPMENT_COSTS[system.type];
1221
- const distributionCost = heatingConstants_1.DISTRIBUTION_COSTS[system.distribution];
1222
- const equipment = equipmentCost.base + (equipmentCost.perSqFt * house.size);
1223
- const distribution = distributionCost.base +
1224
- (distributionCost.perSqFt * house.size);
1225
- const installation = (equipment + distribution) * 0.3;
1226
- return {
1227
- equipment: equipment + distribution,
1228
- installation,
1229
- total: equipment + distribution + installation,
1230
- };
1231
- }
1232
- function calculateHeatingSystemComparison(input) {
1233
- const heatLoss = calculateHeatLoss(input.house);
1234
- const coolingLoad = calculateCoolingLoad(input.house);
1235
- const operatingHours = 2000;
1236
- const currentEnergy = calculateEnergyConsumption(heatLoss, coolingLoad, input.currentSystem, operatingHours);
1237
- const currentCost = calculateCosts(currentEnergy, input.currentSystem, input.utilityRates);
1238
- const currentCO2 = calculateCO2Emissions(currentEnergy, input.currentSystem);
1239
- const proposedEnergy = calculateEnergyConsumption(heatLoss, coolingLoad, input.proposedSystem, operatingHours);
1240
- const proposedCost = calculateCosts(proposedEnergy, input.proposedSystem, input.utilityRates);
1241
- const proposedCO2 = calculateCO2Emissions(proposedEnergy, input.proposedSystem);
1242
- const systemCosts = calculateSystemCosts(input.proposedSystem, input.house);
1243
- const totalCurrentEnergy = currentEnergy.heating + currentEnergy.cooling;
1244
- const totalProposedEnergy = proposedEnergy.heating + proposedEnergy.cooling;
1245
- const energySavings = totalCurrentEnergy - totalProposedEnergy;
1246
- const costSavings = currentCost - proposedCost;
1247
- const co2Savings = currentCO2 - proposedCO2;
1248
- const paybackPeriod = costSavings > 0
1249
- ? systemCosts.total / costSavings
1250
- : Infinity;
1251
- return {
1252
- energySavings: {
1253
- annual: energySavings,
1254
- percentage: (energySavings / totalCurrentEnergy) * 100,
1255
- },
1256
- co2Savings: {
1257
- annual: co2Savings,
1258
- percentage: (co2Savings / currentCO2) * 100,
1259
- },
1260
- costSavings: {
1261
- annual: costSavings,
1262
- monthlyAverage: costSavings / 12,
1263
- percentage: (costSavings / currentCost) * 100,
1264
- },
1265
- newSystemCosts: {
1266
- equipment: systemCosts.equipment,
1267
- installation: systemCosts.installation,
1268
- total: systemCosts.total,
1269
- paybackPeriod,
1270
- },
1271
- efficiency: {
1272
- current: heatingConstants_1.SYSTEM_EFFICIENCY[input.currentSystem.type].heating,
1273
- proposed: heatingConstants_1.SYSTEM_EFFICIENCY[input.proposedSystem.type].heating,
1274
- improvement: ((heatingConstants_1.SYSTEM_EFFICIENCY[input.proposedSystem.type].heating -
1275
- heatingConstants_1.SYSTEM_EFFICIENCY[input.currentSystem.type].heating) /
1276
- heatingConstants_1.SYSTEM_EFFICIENCY[input.currentSystem.type].heating) * 100,
1277
- },
1278
- };
1279
- }
1280
- function getDefaultUtilityRates(location) {
1281
- const stateRates = {
1282
- "CA": { electricity: 0.28, gas: 1.15, oil: 3.20 },
1283
- "NY": { electricity: 0.20, gas: 1.05, oil: 3.10 },
1284
- "TX": { electricity: 0.12, gas: 0.95, oil: 2.90 },
1285
- "FL": { electricity: 0.14, gas: 1.20, oil: 3.00 },
1286
- };
1287
- return stateRates[location.address] ||
1288
- { electricity: 0.16, gas: 1.00, oil: 3.00 };
1289
- }
1290
- heatingSimulation.locationSchema = {
1291
- city: (value) => value.length > 0 ? null : "City is required",
1292
- state: (value) => value.length > 0 ? null : "State is required",
1293
- climateZone: (value) => Object.keys(heatingConstants_1.CLIMATE_DATA).includes(value)
1294
- ? null
1295
- : "Invalid climate zone",
1296
- };
1297
- heatingSimulation.houseSchema = {
1298
- size: (value) => value > 0 && value < 50000
1299
- ? null
1300
- : "House size must be between 1 and 50,000 sq ft",
1301
- sharedWalls: (value) => value >= 0 && value <= 4
1302
- ? null
1303
- : "Shared walls must be between 0 and 4",
1304
- };
1305
-
1306
- return heatingSimulation;
1307
- }
1308
-
1309
- var hasRequiredSimulation;
1310
-
1311
- function requireSimulation () {
1312
- if (hasRequiredSimulation) return simulation$1;
1313
- hasRequiredSimulation = 1;
1314
- (function (exports) {
1315
- var __createBinding = (simulation$1 && simulation$1.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1316
- if (k2 === undefined) k2 = k;
1317
- var desc = Object.getOwnPropertyDescriptor(m, k);
1318
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1319
- desc = { enumerable: true, get: function() { return m[k]; } };
1320
- }
1321
- Object.defineProperty(o, k2, desc);
1322
- }) : (function(o, m, k, k2) {
1323
- if (k2 === undefined) k2 = k;
1324
- o[k2] = m[k];
1325
- }));
1326
- var __exportStar = (simulation$1 && simulation$1.__exportStar) || function(m, exports) {
1327
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1328
- };
1329
- Object.defineProperty(exports, "__esModule", { value: true });
1330
- __exportStar(/*@__PURE__*/ requireSimulation$1(), exports);
1331
- __exportStar(/*@__PURE__*/ requireTypes(), exports);
1332
- __exportStar(/*@__PURE__*/ requireHeatingSimulation(), exports);
1333
-
1334
- } (simulation$1));
1335
- return simulation$1;
1336
- }
1337
-
1338
- var hasRequiredDist;
1339
-
1340
- function requireDist () {
1341
- if (hasRequiredDist) return dist$1;
1342
- hasRequiredDist = 1;
1343
- (function (exports) {
1344
- var __createBinding = (dist$1 && dist$1.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1345
- if (k2 === undefined) k2 = k;
1346
- var desc = Object.getOwnPropertyDescriptor(m, k);
1347
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1348
- desc = { enumerable: true, get: function() { return m[k]; } };
1349
- }
1350
- Object.defineProperty(o, k2, desc);
1351
- }) : (function(o, m, k, k2) {
1352
- if (k2 === undefined) k2 = k;
1353
- o[k2] = m[k];
1354
- }));
1355
- var __exportStar = (dist$1 && dist$1.__exportStar) || function(m, exports) {
1356
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1357
- };
1358
- Object.defineProperty(exports, "__esModule", { value: true });
1359
- __exportStar(/*@__PURE__*/ requireGeometry(), exports);
1360
- __exportStar(/*@__PURE__*/ requireUtils(), exports);
1361
- __exportStar(/*@__PURE__*/ requireSimulation(), exports);
1362
-
1363
- } (dist$1));
1364
- return dist$1;
1365
- }
1366
-
1367
- var distExports = /*@__PURE__*/ requireDist();
1368
-
1369
- const DEFAULT_SOLAR_EXPERT_CONFIG = {
1370
- openRoofColor: "#d6eeff",
1371
- closedRoofColor: "#ffffff",
1372
- openObstructionColor: "#f57242",
1373
- closedObstructionColor: "rgba(255, 132, 107, 0.8)",
1374
- roofPolygonFillColor: "rgba(92, 187, 255, 0.5)",
1375
- obstructionPolygonFillColor: "rgba(255, 132, 107, 0.5)",
1376
- roofPolygonHoverFillColor: "rgba(92, 187, 255, 0.8)",
1377
- obstructionPolygonHoverFillColor: "rgba(255, 132, 107, 0.8)",
1378
- roofPolygonSelectedFillColor: "rgba(92, 187, 255, 0.7)",
1379
- obstructionPolygonSelectedFillColor: "rgba(255, 132, 107, 0.7)",
1380
- highlightColor: "rgba(0, 89, 255, 1)",
1381
- };
1382
- const DEFAULT_SOLAR_PANEL_TYPE = {
1383
- widthMeters: 1.134,
1384
- heightMeters: 1.762,
1385
- kWattPeak: 0.455,
1386
- efficiency: 0.224,
1387
- price: 77.68,
1388
- };
1389
- const DEFAULT_COLOR_SCHEME = {
1390
- primary: "hsl(41 51% 90%)",
1391
- primaryForeground: "hsl(0 0% 0%)",
1392
- secondary: "hsl(28 100% 8%)",
1393
- secondaryForeground: "hsl(0 0% 100%)",
1394
- tertiary: "hsl(28 100% 29%)",
1395
- tertiaryForeground: "hsl(0 0% 100%)",
1396
- muted: "hsl(0 0% 100%)",
1397
- mutedForeground: "hsl(0 0% 0%)",
1398
- error: "hsl(0 100% 50%)",
1399
- errorForeground: "hsl(0 0% 100%)",
1400
- // Surface colors
1401
- surface: "hsl(0 0% 88%)", // gray-200
1402
- surfaceHover: "hsl(0 0% 82%)", // gray-300
1403
- surfaceActive: "hsl(0 0% 64%)", // gray-400
1404
- // Text colors
1405
- textMuted: "hsl(0 0% 45%)", // gray-600
1406
- textSecondary: "hsl(0 0% 55%)", // gray-500
1407
- textPlaceholder: "hsl(0 0% 73%)", // gray-400
1408
- // Border colors
1409
- border: "hsl(0 0% 82%)", // gray-300
1410
- borderLight: "hsl(0 0% 93%)", // gray-200
1411
- // Status colors
1412
- success: "hsl(142 76% 36%)", // green-600
1413
- info: "hsl(221 83% 53%)", // blue-500
1414
- // Interactive colors
1415
- hover: "hsl(0 0% 88%)", // gray-200
1416
- hoverDark: "hsl(28 100% 8%)", // darker secondary for hover
1417
- overlay: "rgba(0, 0, 0, 0.24)", // #0000003c
1418
- tooltip: "hsl(0 0% 13%)", // gray-800
1419
- };
1420
-
1421
- const BORDER_INSET = 0;
1422
- const HEAT_PUMP_CONSUMPTION = 46; // kWh per m² per year
1423
-
1424
- const outputCss = "/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\",\n \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;\n --color-black: #000;\n --spacing: 0.25rem;\n --container-md: 28rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-4xl: 2rem;\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n --color-primary: hsl(41 51% 90%);\n --color-primary-foreground: hsl(0 0% 0%);\n --color-secondary: hsl(28 100% 8%);\n --color-secondary-foreground: hsl(0 0% 100%);\n --color-tertiary: hsl(28 100% 29%);\n --color-tertiary-foreground: hsl(0 0% 100%);\n --color-muted: hsl(0 0% 100%);\n --color-muted-foreground: hsl(0 0% 0%);\n --color-error: hsl(0 100% 50%);\n --color-error-foreground: hsl(0 0% 100%);\n --color-surface: hsl(0 0% 88%);\n --color-surface-hover: hsl(0 0% 82%);\n --color-surface-active: hsl(0 0% 64%);\n --color-text-muted: hsl(0 0% 45%);\n --color-text-secondary: hsl(0 0% 55%);\n --color-text-placeholder: hsl(0 0% 73%);\n --color-border: hsl(0 0% 82%);\n --color-border-light: hsl(0 0% 93%);\n --color-success: hsl(142 76% 36%);\n --color-info: hsl(221 83% 53%);\n --color-hover: hsl(0 0% 88%);\n --color-hover-dark: hsl(28 100% 8%);\n --color-overlay: rgba(0, 0, 0, 0.24);\n --color-tooltip: hsl(0 0% 13%);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mt-6 {\n margin-top: calc(var(--spacing) * 6);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .inline {\n display: inline;\n }\n .inline-block {\n display: inline-block;\n }\n .inline-flex {\n display: inline-flex;\n }\n .table {\n display: table;\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-\\[400px\\] {\n height: 400px;\n }\n .h-full {\n height: 100%;\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-20 {\n width: calc(var(--spacing) * 20);\n }\n .w-full {\n width: 100%;\n }\n .max-w-md {\n max-width: var(--container-md);\n }\n .flex-1 {\n flex: 1;\n }\n .flex-3 {\n flex: 3;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .resize {\n resize: both;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .grid-rows-2 {\n grid-template-rows: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .items-stretch {\n align-items: stretch;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-0 {\n gap: calc(var(--spacing) * 0);\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-3 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-border {\n border-color: var(--color-border);\n }\n .border-error {\n border-color: var(--color-error);\n }\n .border-secondary {\n border-color: var(--color-secondary);\n }\n .bg-black {\n background-color: var(--color-black);\n }\n .bg-muted {\n background-color: var(--color-muted);\n }\n .bg-overlay {\n background-color: var(--color-overlay);\n }\n .bg-primary {\n background-color: var(--color-primary);\n }\n .bg-secondary {\n background-color: var(--color-secondary);\n }\n .bg-surface {\n background-color: var(--color-surface);\n }\n .bg-surface-active {\n background-color: var(--color-surface-active);\n }\n .bg-text-secondary {\n background-color: var(--color-text-secondary);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .p-1 {\n padding: calc(var(--spacing) * 1);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-4 {\n padding-bottom: calc(var(--spacing) * 4);\n }\n .pl-2 {\n padding-left: calc(var(--spacing) * 2);\n }\n .pl-4 {\n padding-left: calc(var(--spacing) * 4);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-left {\n text-align: left;\n }\n .text-right {\n text-align: right;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-error {\n color: var(--color-error);\n }\n .text-muted {\n color: var(--color-muted);\n }\n .text-muted-foreground {\n color: var(--color-muted-foreground);\n }\n .text-primary-foreground {\n color: var(--color-primary-foreground);\n }\n .text-secondary {\n color: var(--color-secondary);\n }\n .text-success {\n color: var(--color-success);\n }\n .text-text-muted {\n color: var(--color-text-muted);\n }\n .text-text-placeholder {\n color: var(--color-text-placeholder);\n }\n .text-text-secondary {\n color: var(--color-text-secondary);\n }\n .underline {\n text-decoration-line: underline;\n }\n .accent-tertiary {\n accent-color: var(--color-tertiary);\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .hover\\:bg-hover {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-hover);\n }\n }\n }\n .hover\\:bg-hover-dark {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-hover-dark);\n }\n }\n }\n .hover\\:bg-muted {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-muted);\n }\n }\n }\n .hover\\:bg-overlay {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-overlay);\n }\n }\n }\n .hover\\:bg-secondary {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-secondary);\n }\n }\n }\n .hover\\:bg-secondary\\/80 {\n &:hover {\n @media (hover: hover) {\n background-color: color-mix(in srgb, hsl(28 100% 8%) 80%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-secondary) 80%, transparent);\n }\n }\n }\n }\n .hover\\:bg-surface-hover {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-surface-hover);\n }\n }\n }\n .hover\\:bg-tertiary {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-tertiary);\n }\n }\n }\n .hover\\:bg-text-secondary {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-text-secondary);\n }\n }\n }\n .hover\\:text-muted {\n &:hover {\n @media (hover: hover) {\n color: var(--color-muted);\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-info {\n &:focus {\n --tw-ring-color: var(--color-info);\n }\n }\n .focus\\:ring-secondary {\n &:focus {\n --tw-ring-color: var(--color-secondary);\n }\n }\n .focus\\:ring-tertiary {\n &:focus {\n --tw-ring-color: var(--color-tertiary);\n }\n }\n .focus\\:ring-offset-0 {\n &:focus {\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .sm\\:flex-row {\n @media (width >= 40rem) {\n flex-direction: row;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:rounded-full {\n &::-webkit-slider-runnable-track {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-black\\/25 {\n &::-webkit-slider-runnable-track {\n background-color: color-mix(in srgb, #000 25%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 25%, transparent);\n }\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-\\[10px\\] {\n &::-webkit-slider-thumb {\n height: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-\\[10px\\] {\n &::-webkit-slider-thumb {\n width: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-muted {\n &::-webkit-slider-thumb {\n background-color: var(--color-muted);\n }\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n }\n }\n}\n";
1425
-
1426
- const SolarSystemForm = /*@__PURE__*/ proxyCustomElement(class SolarSystemForm extends H {
1427
- constructor() {
1428
- super();
1429
- this.__registerHost();
1430
- }
1431
- systemConfigs = {};
1432
- polygons = [];
1433
- roofCanvas;
1434
- polygonCanvas;
1435
- householdConsumption = 4500;
1436
- consumptionProfile = "mostly_at_home";
1437
- electricityPrice = 0.3;
1438
- compensationRate = 0.07;
1439
- annualPriceIncrease = 2;
1440
- autonomy = 0;
1441
- costSavings = 0;
1442
- numberOfPanels = 5;
1443
- panelPeakPower = 0.4; // kW per panel
1444
- name = "";
1445
- email = "";
1446
- phone = "";
1447
- nameError = "";
1448
- emailError = "";
1449
- phoneError = "";
1450
- electricCar = false;
1451
- electricCarChargingTime = "day";
1452
- heatPump = 0;
1453
- battery = 0;
1454
- compensation20Years = 0;
1455
- savedCosts20Years = 0;
1456
- maxPanels = 5;
1457
- kmDrivenPerYear = 10000;
1458
- totalEnergyConsumption = 4500;
1459
- totalEnergyProduction = 0;
1460
- isSubmitting = false;
1461
- submitMessage = "";
1462
- submitSuccess = false;
1463
- updateSystemConfigs() {
1464
- if (Object.keys(this.systemConfigs).length === 0) {
1465
- this.numberOfPanels = 0;
1466
- this.maxPanels = 0;
1467
- return;
1468
- }
1469
- this.numberOfPanels = Object.keys(this.systemConfigs).reduce((acc, curr) => acc + this.systemConfigs[curr].numberOfPanels, 0);
1470
- this.maxPanels = Object.keys(this.systemConfigs).reduce((acc, curr) => acc + this.systemConfigs[curr].numberOfPanels, 0);
1471
- this.panelPeakPower = Object.entries(this.systemConfigs)[0][1][0]
1472
- ?.panel.kWattPeak ?? 0.44;
1473
- this.recalculate();
1474
- }
1475
- formatEuropeanNumber(num, decimals = 2) {
1476
- const fixed = num.toFixed(decimals);
1477
- const [integerPart, decimalPart] = fixed.split(".");
1478
- // Add dots as thousands separators
1479
- const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
1480
- // Join with comma as decimal separator
1481
- return decimalPart
1482
- ? `${formattedInteger},${decimalPart}`
1483
- : formattedInteger;
1484
- }
1485
- recalculate() {
1486
- const currentSystemConfigs = {};
1487
- let totalNumberOfPanels = 0;
1488
- for (const [key, value] of Object.entries(this.systemConfigs)) {
1489
- if (totalNumberOfPanels >= this.numberOfPanels) {
1490
- break;
1491
- }
1492
- if (value.numberOfPanels + totalNumberOfPanels > this.numberOfPanels) {
1493
- currentSystemConfigs[key] = {
1494
- ...value,
1495
- numberOfPanels: this.numberOfPanels - totalNumberOfPanels,
1496
- };
1497
- totalNumberOfPanels = this.numberOfPanels;
1498
- }
1499
- else {
1500
- currentSystemConfigs[key] = value;
1501
- totalNumberOfPanels += value.numberOfPanels;
1502
- }
1503
- }
1504
- const simulationConfig = {
1505
- general: {
1506
- simulationYears: 20,
1507
- },
1508
- householdConsumption: {
1509
- consumptionProfile: this.consumptionProfile,
1510
- winterConsumptionFactor: 1.4,
1511
- summerConsumptionFactor: 0.6,
1512
- averageConsumption: this.householdConsumption / 365,
1513
- },
1514
- electricityPrice: {
1515
- purchase: this.electricityPrice,
1516
- sell: this.compensationRate,
1517
- increase: this.annualPriceIncrease / 100,
1518
- },
1519
- solarSystems: currentSystemConfigs,
1520
- batteryKWh: this.battery,
1521
- solarRadiation: {
1522
- winterFactor: 0.2,
1523
- summerFactor: 0.6,
1524
- },
1525
- heatPump: {
1526
- m2: this.heatPump,
1527
- consumptionPerM2: HEAT_PUMP_CONSUMPTION / 365,
1528
- },
1529
- electricCar: this.electricCar
1530
- ? {
1531
- averageKilometersPerDay: this.kmDrivenPerYear / 365,
1532
- consumptionkWhPer100km: 20,
1533
- batteryKWh: 80,
1534
- chargingHours: this.electricCarChargingTime === "day"
1535
- ? distExports.generateElectricCarChargingHours(6, 18)
1536
- : distExports.generateElectricCarChargingHours(18, 6),
1537
- }
1538
- : undefined,
1539
- };
1540
- const result = distExports.simulate(simulationConfig);
1541
- this.compensation20Years = result.compensationPerDay * 365 * 20;
1542
- this.savedCosts20Years = result.byYearSavedCosts.reduce((acc, curr) => acc + curr, 0);
1543
- this.costSavings = result.byYearSavedCosts[0];
1544
- this.autonomy = result.autonomy * 100;
1545
- this.totalEnergyConsumption = result.totalEnergyConsumptionDay * 365;
1546
- // Calculate total energy production based on compensation and rate
1547
- this.totalEnergyProduction =
1548
- (result.compensationPerDay / this.compensationRate) * 365;
1549
- }
1550
- componentWillLoad() {
1551
- this.updateSystemConfigs();
1552
- }
1553
- validateForm() {
1554
- let isValid = true;
1555
- const t = getLanguageStrings(state.settings.language);
1556
- // Validate name
1557
- if (!this.name.trim()) {
1558
- this.nameError = t.solarSystemForm.nameError;
1559
- isValid = false;
1560
- }
1561
- else {
1562
- this.nameError = "";
1563
- }
1564
- // Validate email
1565
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
1566
- if (!this.email.trim()) {
1567
- this.emailError = t.solarSystemForm.emailError;
1568
- isValid = false;
1569
- }
1570
- else if (!emailRegex.test(this.email)) {
1571
- this.emailError = t.solarSystemForm.validEmailError;
1572
- isValid = false;
1573
- }
1574
- else {
1575
- this.emailError = "";
1576
- }
1577
- // Validate phone (optional)
1578
- const phoneRegex = /^[\+]?[1-9][\d]{0,15}$/;
1579
- if (this.phone.trim() &&
1580
- !phoneRegex.test(this.phone.replace(/[\s\-\(\)]/g, ""))) {
1581
- this.phoneError = t.solarSystemForm.phoneError;
1582
- isValid = false;
1583
- }
1584
- else {
1585
- this.phoneError = "";
1586
- }
1587
- return isValid;
1588
- }
1589
- async handleRequestOffer() {
1590
- if (!this.validateForm()) {
1591
- return;
1592
- }
1593
- this.isSubmitting = true;
1594
- this.submitMessage = "";
1595
- this.submitSuccess = false;
1596
- const t = getLanguageStrings(state.settings.language);
1597
- try {
1598
- const leadData = {
1599
- location: {
1600
- name: state.location,
1601
- latitude: state.latitude,
1602
- longitude: state.longitude,
1603
- },
1604
- systemConfig: {
1605
- maxNumberOfPanels: this.maxPanels,
1606
- panelPeakPower: this.panelPeakPower,
1607
- polygons: this.polygons,
1608
- solarSystems: this.systemConfigs,
1609
- electricityPrice: this.electricityPrice,
1610
- compensationRate: this.compensationRate,
1611
- annualPriceIncrease: this.annualPriceIncrease,
1612
- },
1613
- client: {
1614
- name: this.name,
1615
- email: this.email,
1616
- phone: this.phone,
1617
- consumption: this.householdConsumption,
1618
- consumptionProfile: this.consumptionProfile,
1619
- hasBattery: this.battery > 0,
1620
- battery: this.battery,
1621
- hasHeatPump: this.heatPump > 0,
1622
- heatPumpM2: this.heatPump,
1623
- hasElectricCar: this.electricCar,
1624
- electricCarChargingTime: this.electricCarChargingTime,
1625
- electricCarKmPerYear: this.kmDrivenPerYear,
1626
- },
1627
- images: {
1628
- roof: this.roofCanvas.toDataURL(),
1629
- polygon: this.polygonCanvas.toDataURL(),
1630
- },
1631
- results: {
1632
- autonomy: this.autonomy,
1633
- costSavings: this.costSavings,
1634
- compensation20Years: this.compensation20Years,
1635
- savedCosts20Years: this.savedCosts20Years,
1636
- totalEnergyConsumption: this.totalEnergyConsumption,
1637
- },
1638
- };
1639
- const result = await sendLeadToNexvoro(leadData);
1640
- this.submitSuccess = result.success;
1641
- if (result.success) {
1642
- console.log("Lead successfully sent to Nexvoro", result);
1643
- this.submitMessage = t.solarSystemForm.leadSubmitted;
1644
- // Optionally reset form or show success message
1645
- }
1646
- else {
1647
- console.error("Failed to send lead to Nexvoro:", result.message);
1648
- this.submitMessage = t.solarSystemForm.leadError;
1649
- }
1650
- }
1651
- catch (error) {
1652
- console.error("Error in handleRequestOffer:", error);
1653
- this.submitSuccess = false;
1654
- this.submitMessage = error instanceof Error
1655
- ? error.message
1656
- : "An unexpected error occurred";
1657
- }
1658
- finally {
1659
- this.isSubmitting = false;
1660
- }
1661
- }
1662
- isIOS() {
1663
- return state.isIOS;
1664
- }
1665
- render() {
1666
- const t = getLanguageStrings(state.settings.language);
1667
- return (h("div", { key: '9fc4ad043b8a87881f3ef350e32064171cb907c2', class: "flex flex-col justify-center items-center w-full h-full pt-4" // style={{
1668
- ,
1669
- // display: (Object.keys(this.systemConfigs).length === 0)
1670
- // ? "none"
1671
- // : "flex",
1672
- // }}
1673
- id: "solar-system-form" }, h("h1", { key: '42a8f18f9fb546eec491df4d934dbdd9772ec4bf', class: "text-2xl font-bold text-secondary mb-4 w-full" }, t.solarSystemForm.title), h("div", { key: 'c59928127f53d791345f264437b47c348e3492a4', class: "w-full bg-primary rounded-4xl p-6 space-y-6" }, h("div", { key: '6ef7e5941473507886178993c16bda8a45a8c4f9', class: "space-y-4" }, h("h2", { key: '7953f02ab6528c1a05ebb703392b0ee63fa814f6', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.systemInformation), h("div", { key: '7026c0d9a12ced5fbfd27c1919c7ea78e4d8e4ec', class: "flex flex-col sm:flex-row gap-4" }, h("div", { key: '444923e0f1cb39238fb783a5ee4572e840520df7', class: "flex-1 bg-muted rounded-4xl p-4 space-y-3" }, h("div", { key: 'c6e454a350c47ee923cf8793b0cf7c0f6551251f', class: "flex items-center justify-between" }, h("label", { key: 'efb74a28acbd7897893e774f9bd4e1aa2a3d527e', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.numberOfPanels), !this.isIOS()
1674
- ? (h("input", { type: "number", class: "w-20 px-3 py-1 rounded-full bg-muted text-muted-foreground text-right", value: this.numberOfPanels, readOnly: true }))
1675
- : (h("input", { type: "number", min: "1", max: this.maxPanels, class: "w-20 px-3 py-1 rounded-full border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground text-center", value: this.numberOfPanels, onInput: (e) => {
1676
- const value = parseInt(e.target
1677
- .value);
1678
- if (value >= 1 &&
1679
- value <=
1680
- this.maxPanels) {
1681
- this.numberOfPanels =
1682
- value;
1683
- this.recalculate();
1684
- }
1685
- } }))), !this.isIOS() && (h("input", { key: '0e9cefcb4192fa692c0554de8b15b0fb243fe427', type: "range", min: "1", max: this.maxPanels, step: "1", class: "input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-muted", value: this.numberOfPanels, onInput: (e) => {
1686
- this.numberOfPanels = parseInt(e.target
1687
- .value);
1688
- this.recalculate();
1689
- } }))), h("div", { key: '7d1a59a6eea21b50c34cdd5e456221e227587685', class: "flex-1 bg-muted rounded-4xl p-4" }, h("div", { key: '75599a611516fd14f665da2d56ff5be5c6fccc2b', class: "flex items-center justify-between" }, h("label", { key: 'bb51db05769705a393e0232db52d34e5315955c5', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.panelPeakPower), h("span", { key: '996982aebcc0774b956b4948463b46b2edd514d8', class: "text-text-muted" }, this.panelPeakPower.toFixed(2), " kW")), h("div", { key: '32f8042a96adb8d7804d9ec6f260acaefd648f7e', class: "flex items-center justify-between mt-4" }, h("span", { key: '6c7f7151a5dc7e14433721d466bdb45001f1608e', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.totalSystemPeakPower), h("span", { key: 'd22fc7d571ae346966b384d961d6bcf5da576327', class: "font-bold text-text-muted" }, (DEFAULT_SOLAR_PANEL_TYPE.kWattPeak *
1690
- this.numberOfPanels).toFixed(1), " kWp"))))), h("div", { key: '34196e64db9944e839cab88b9bef431c6a68d45c', class: "space-y-4" }, h("h2", { key: '0bcac4404bd642de0bd304620bd9cd6e6bc3cdf3', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.householdConsumptionTitle), h("div", { key: '457928343c2689b4ac70016fb880ffda06e1b316', class: "grid grid-rows-2 gap-0" }, h("div", { key: '45bf9db3a490e1c73073707646372d6dd1659bb2', class: "grid grid-cols-2 gap-4" }, h("label", { key: 'a743f19e43d64c30e991fbcc70ccaad6bb4bdee4', class: "block text-sm font-medium text-text-muted" }, t.solarSystemForm.annualConsumption), h("label", { key: 'ebede650aa6b5ad14684bb82de11171320ea484b', class: "block text-sm font-medium text-text-muted" }, t.solarSystemForm.consumptionProfileTitle)), h("div", { key: '2b5f9f4acacd807b0500ba0d1fdfc54a8d14dd33', class: "grid grid-cols-2 gap-4" }, h("input", { key: 'd6f314475b903057456c057cc1c75e9373969554', type: "number", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", value: this.householdConsumption, onInput: (e) => {
1691
- this.householdConsumption = parseInt(e.target
1692
- .value);
1693
- this.recalculate();
1694
- } }), h("select", { key: 'd47894fbe6e7faf64c67ad2b8a8a53860c85ac20', class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", onChange: (e) => {
1695
- this.consumptionProfile =
1696
- e.target
1697
- .value;
1698
- this.recalculate();
1699
- } }, h("option", { key: 'c3698a4a668e7975a6601bb80eecfe41b3951fb4', value: "mostly_at_home", selected: this.consumptionProfile ===
1700
- "mostly_at_home" }, t.solarSystemForm.consumptionProfiles
1701
- .mostlyAtHome), h("option", { key: '44a1ce7b8f5334aff3a1671ca9f9a48041aab77d', value: "mostly_away", selected: this.consumptionProfile ===
1702
- "mostly_away" }, t.solarSystemForm.consumptionProfiles
1703
- .mostlyAway))))), h("div", { key: '1b6ed9f85ed130b180bd2ab2ee82eb0da83ca928', class: "space-y-4" }, h("h2", { key: 'a1ffecb1c11f8795a8b3bfa11a50ce0273f04b9e', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.additionalComponents.title), h("div", { key: '51ca2a81a15de6d3cd714ac077a2dca13440cd49', class: "flex flex-col gap-4" }, h("div", { key: '9e216b9f45594ceb542058a56b8d6f05c33dbb54', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '72519b55992dc6e715da354c8d89ac199a74b8e1', class: "flex items-center justify-between" }, h("div", { key: '9412d280cd4d8f9be6e7a2745f88ab152cbeb482', class: "flex items-center gap-2" }, h("input", { key: '865a14f54d30bd1497510e4b9c0eee4c0ad8e52a', type: "checkbox", id: "heatPump", class: "w-4 h-4 accent-tertiary border-border rounded-full focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.heatPump > 0, onChange: (e) => {
1704
- this.heatPump =
1705
- e.target
1706
- .checked
1707
- ? 100
1708
- : 0;
1709
- this.recalculate();
1710
- } }), h("label", { key: '76ae5cdc390003255c0d2fdfca7429e13b349247', htmlFor: "heatPump", class: "text-text-muted" }, t.solarSystemForm
1711
- .additionalComponents
1712
- .heatPump)), (this.heatPump > 0 && !this.isIOS()) && (h("span", { key: '2a3dda02e0c16d9bbc37bb0ff0763d4dce819282', class: "text-text-muted" }, this.heatPump, " m\u00B2"))), this.heatPump > 0 && (h("div", { key: '91f1dda8820c37bd75e2c44d127e9489ef02f93e', class: "flex flex-col gap-2" }, this.isIOS()
1713
- ? (h("div", { class: "flex items-center gap-2" }, h("input", { type: "number", min: "10", max: "300", step: "10", class: "flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: {
1714
- border: "1px solid var(--color-border)",
1715
- }, value: this.heatPump, onInput: (e) => {
1716
- const value = parseInt(e.target
1717
- .value);
1718
- if (value >= 10 &&
1719
- value <= 300) {
1720
- this.heatPump =
1721
- value;
1722
- this.recalculate();
1723
- }
1724
- } }), h("span", { class: "text-sm text-text-muted" }, "m\u00B2")))
1725
- : (h("input", { type: "range", min: "10", max: "300", step: "10", class: "input-slider custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-muted", value: this.heatPump, onInput: (e) => {
1726
- this.heatPump =
1727
- parseInt(e.target
1728
- .value);
1729
- this.recalculate();
1730
- } }))))), h("div", { key: 'ae3d614cdce8c196feb01355e2af00722109af60', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: 'cb8326db0f03139e56abea867eb8d238778645cf', class: "flex items-center justify-between" }, h("div", { key: 'bcc12e0817e94b729c729a914d9e759109523f47', class: "flex items-center gap-2" }, h("input", { key: '778c65416ad609ec97719fa6c35a83e9a313cd83', type: "checkbox", id: "electricCar", class: "w-4 h-4 accent-tertiary border-border rounded focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.electricCar, onChange: (e) => {
1731
- this.electricCar =
1732
- e.target
1733
- .checked;
1734
- this.recalculate();
1735
- } }), h("label", { key: '2b5185ca44e19b7a1ee91ef713855ebc9b60da0a', htmlFor: "electricCar", class: "text-text-muted" }, t.solarSystemForm
1736
- .additionalComponents
1737
- .electricCar))), this.electricCar && (h("div", { key: '6e61acdbba91d60947f26dc7971ff8a7769453ca', class: "flex flex-col gap-2" }, h("div", { key: '6078d4b646b07ac9ed1be32877359e92de1351d7', class: "grid grid-cols-2 gap-4" }, h("label", { key: '9aa097ee13482ca43d223e41f9cd76c9548fc6db', class: "text-sm text-text-muted" }, t.solarSystemForm
1738
- .additionalComponents
1739
- .chargingTime), h("label", { key: '6b2e4680ac32223c50d448f0a37f2ef246657e48', class: "text-sm text-text-muted" }, t.solarSystemForm
1740
- .additionalComponents
1741
- .kilometersPerYear)), h("div", { key: '61638259bfd77565c11820a23173cf854d6109a0', class: "grid grid-cols-2 gap-4" }, h("select", { key: '01c4b7d4ee90fa8315da3c1e56b9c3f10457b1d6', class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", onChange: (e) => {
1742
- this.electricCarChargingTime =
1743
- e.target
1744
- .value;
1745
- this.recalculate();
1746
- }, style: {
1747
- border: "1px solid var(--color-border)",
1748
- } }, h("option", { key: 'b86e078b6311ae62c14ddf87610fcadeda1da30f', value: "day", selected: this
1749
- .electricCarChargingTime ===
1750
- "day" }, t.solarSystemForm
1751
- .additionalComponents
1752
- .chargingTimeDay), h("option", { key: 'd842ef5af11f11e317510304f07d41c9f31e9bb5', value: "night", selected: this
1753
- .electricCarChargingTime ===
1754
- "night" }, t.solarSystemForm
1755
- .additionalComponents
1756
- .chargingTimeNight)), h("input", { key: 'cc98dbcf6c0d08ce41f42ddf572ca3c7fd1f7f63', type: "number", min: "1000", max: "50000", step: "1000", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.kmDrivenPerYear, onInput: (e) => {
1757
- this.kmDrivenPerYear =
1758
- parseInt(e.target
1759
- .value);
1760
- this.recalculate();
1761
- }, style: {
1762
- border: "1px solid var(--color-border)",
1763
- } }))))), h("div", { key: '0c5e4d9d54ac075035eda56dd8aa39d5a66f97ea', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: 'bb5322ee87e5e6b9bb9438580753d1dae4eac70d', class: "flex items-center justify-between" }, h("div", { key: '79bbd99b60c4886a4f676dbcd0c9e02be64746e4', class: "flex items-center gap-2" }, h("input", { key: '31cdcdadc6c4bf793cb2dd9bc27c4561d9dbef35', type: "checkbox", id: "battery", class: "w-4 h-4 accent-tertiary border-border rounded-full focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.battery > 0, onChange: (e) => {
1764
- this.battery =
1765
- e.target
1766
- .checked
1767
- ? 5
1768
- : 0;
1769
- this.recalculate();
1770
- } }), h("label", { key: 'e559239d93a8b98e935325384ec26cbc39f7b179', htmlFor: "battery", class: "text-text-muted" }, t.solarSystemForm
1771
- .additionalComponents
1772
- .battery)), (this.battery > 0 && !this.isIOS()) && (h("span", { key: 'ff6453928e80ba9e28bced2a4cf97d93cf1e2f1f', class: "text-text-muted" }, this.battery, " kWh"))), this.battery > 0 && (h("div", { key: 'e599bffe54f09442291712c814b97acfb20c8ecc', class: "flex flex-col gap-2" }, this.isIOS()
1773
- ? (h("div", { class: "flex items-center gap-2" }, h("input", { type: "number", min: "1", max: "20", step: "1", class: "flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.battery, onInput: (e) => {
1774
- const value = parseInt(e.target
1775
- .value);
1776
- if (value >= 1 &&
1777
- value <= 20) {
1778
- this.battery =
1779
- value;
1780
- this.recalculate();
1781
- }
1782
- }, style: {
1783
- border: "1px solid var(--color-border)",
1784
- } }), h("span", { class: "text-sm text-text-muted" }, "kWh")))
1785
- : (h("input", { type: "range", min: "1", max: "20", step: "1", class: "input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-muted", value: this.battery, onInput: (e) => {
1786
- this.battery = parseInt(e.target
1787
- .value);
1788
- this.recalculate();
1789
- } }))))))), h("div", { key: 'fddbaf799353b7275078c3cc5eab4a653a144bd6', class: "space-y-4" }, h("h2", { key: '54190ad36e0593c576ad910dc6bd8f6de39ac2e5', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.electricityCostsTitle), h("div", { key: '4d93d70568429fd64ea377f25a5d3db4fff1c179', style: {
1790
- display: "grid",
1791
- gridTemplateColumns: "repeat(auto-fit, minmax(250px, 1fr))",
1792
- gap: "1rem",
1793
- } }, h("div", { key: 'f7534aadffccb806c9e5a8e68baad514a551e98d' }, h("label", { key: '7fd0455fb63018bd854ebef87f407818ea772782', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.electricityPrice), h("input", { key: '086c94f5070296d6846be081dbad5fa463922054', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.electricityPrice.toFixed(2), onInput: (e) => {
1794
- this.electricityPrice = parseFloat(e.target
1795
- .value);
1796
- this.recalculate();
1797
- } })), h("div", { key: '7946143001c47d56a8407e6ca554935342f94c56' }, h("label", { key: '6d789aa1aebcc75b45de9f0f8b172bf2d3976673', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.compensationRate), h("input", { key: '90eb3cae0ec5ffc7709bf14ca11b76b41c62d598', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.compensationRate.toFixed(2), onInput: (e) => {
1798
- this.compensationRate = parseFloat(e.target
1799
- .value);
1800
- this.recalculate();
1801
- } })), h("div", { key: '2dd2d4c7af7274a329cc638e7eace6b360194403' }, h("label", { key: '8845a51817fd1dd9703aee42a143f8c84cb2850e', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.annualPriceIncrease), h("input", { key: 'adfda4c0aac9e0fd2da2872e3b56a15036b58664', type: "number", step: "0.1", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.annualPriceIncrease.toFixed(1), onInput: (e) => {
1802
- this.annualPriceIncrease = parseFloat(e.target
1803
- .value);
1804
- this.recalculate();
1805
- } })))), h("div", { key: '9183d667975faf3fd27acabab69b9c049b4978e4', class: "space-y-4 p-4 border border-border rounded-4xl", style: {
1806
- border: "1px solid var(--color-border)",
1807
- } }, h("h2", { key: '061a17b4cda7f0e736c68b3ec003da75a40c98de', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.resultsTitle), h("div", { key: '04c6f6e0c1c3b867c6db02c67ff52643ef7948b0', class: "bg-muted rounded-4xl p-4" }, h("div", { key: '768e55191f40af1949533c37542594adb91977c9', class: "flex items-center justify-between" }, h("span", { key: '4151970ed3baca1fc116ee03a148669b728f306f', class: "text-text-muted" }, t.solarSystemForm.autonomy), h("span", { key: '86cb4f53d75812c76ad61bb0f87faf7b882a455f', class: "text-xl font-bold text-secondary" }, this.autonomy > 100
1808
- ? "100"
1809
- : this.formatEuropeanNumber(this.autonomy, 1), "%")), h("div", { key: '0ab4237796cbf0b7ff58342885727a0239ca2b3e', class: "flex items-center justify-between mt-4" }, h("span", { key: '7764984dee7bfe56db335d26245962dcbb22a7d5', class: "text-text-muted" }, t.solarSystemForm.totalEnergyConsumption), h("span", { key: 'efc29d5413dcae0ff9a950c42494d045769b6536', class: "text-xl font-bold text-secondary" }, this.formatEuropeanNumber(this.totalEnergyConsumption, 0), " kWh/", t.solarSystemForm.year)), h("div", { key: 'd92d3e92e9a25f724747480914bd032d1cb42095', class: "flex items-center justify-between mt-4" }, h("span", { key: '798f818876a21c34740285759935dd28e5fc68a6', class: "text-text-muted" }, t.solarSystemForm.totalEnergyProduction), h("span", { key: '99be647897c848ddfd50b8b456dee40369254128', class: "text-xl font-bold text-secondary" }, this.formatEuropeanNumber(this.totalEnergyProduction, 0), " kWh/", t.solarSystemForm.year)), h("div", { key: '163ecdce4e9bf9bf64540a1d90350aa387ef4c06', class: "flex items-center justify-between mt-4" }, h("div", { key: '8e955c05a817e06b6fd227a405a710e78653b3ef', class: "flex items-center gap-2" }, h("span", { key: 'a3dcb57652a6a3ed9ac44027f011c7c5cf5f26d1', class: "text-text-muted" }, t.solarSystemForm.costSavings)), h("span", { key: '116a92fd7f01e6c6a9f6f74a1597251b462d1e0c', class: "text-xl font-bold text-success" }, this.formatEuropeanNumber(this.costSavings), "\u20AC/", t
1810
- .solarSystemForm.year)), h("div", { key: 'c05837135e440d5100a749ac6821bf0fa2884535', class: "flex items-center justify-between mt-4" }, h("div", { key: '732595656c8b2abd0276d2e3d6834af484f0c4dc', class: "flex items-center gap-2" }, h("span", { key: '1ee3de830a4fad63482afb0b5f65a9abf2359ec2', class: "text-text-muted" }, t.solarSystemForm.compensation20Years)), h("span", { key: '598355f2643489ef0bc2ecbea11d9fd2a9e47e50', class: "text-xl font-bold text-success" }, this.formatEuropeanNumber(this.compensation20Years), "\u20AC")), h("div", { key: '607933c95c5ae33094bec8a07c3edaa108e1fa35', class: "flex items-center justify-between mt-4" }, h("div", { key: 'fcffc72868a798793c9757f1c9f1046af01e2790', class: "flex items-center gap-2" }, h("span", { key: '57441d3e484bebbec23067c9cc20794f2cb7974a', class: "text-text-muted" }, t.solarSystemForm
1811
- .monetaryBenefit20Years)), h("span", { key: '102302511890bc059491d42c7d2f78bdca0fd2c6', class: "text-xl font-bold text-success" }, this.formatEuropeanNumber(this.savedCosts20Years), "\u20AC")))), h("div", { key: 'e7ea0fac753edf61c032ab697d2b5ecd4d1b514f', class: "space-y-4 pt-4" }, h("h2", { key: 'cb1bd6e6aa4e2abccd555f5f4e4b2c749dd5a0b9', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.requestOffer), h("div", { key: 'ba14b7a6ec59252b15f775222ac04d7328ab33b4', style: {
1812
- display: "grid",
1813
- gridTemplateColumns: "repeat(auto-fit, minmax(250px, 1fr))",
1814
- gap: "1rem",
1815
- } }, h("div", { key: '1988fa474890f8da2c8ea4570e07ab32241ce086' }, h("label", { key: 'e17f711dbbf18d3998f941fbf893093be5a9bbbf', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.name), h("input", { key: 'd0a597c42d069707e89f2135f8b5aaa09e92eb61', type: "text", class: `w-full px-4 py-2 rounded-4xl border ${this.nameError
1816
- ? "border-error"
1817
- : "border-border"} focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, value: this.name, onInput: (e) => {
1818
- this.name =
1819
- e.target
1820
- .value;
1821
- this.validateForm();
1822
- }, placeholder: "Your name" }), this.nameError && (h("p", { key: '79dc551a31848db30dd9b9c380f23f838539f604', class: "text-error text-sm mt-1" }, this.nameError))), h("div", { key: 'e9460f017e5c2b83111ef410cbf3b7c2689f06ab' }, h("label", { key: '65f272dfd81dfdb157def9ff650b74e729f37ac6', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.email), h("input", { key: '1249293e9a25999784e4e1e1eb6f7e7c727b9fca', type: "email", class: `w-full px-4 py-2 rounded-4xl border ${this.emailError
1823
- ? "border-error"
1824
- : "border-border"} focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, value: this.email, onInput: (e) => {
1825
- this.email =
1826
- e.target
1827
- .value;
1828
- this.validateForm();
1829
- }, placeholder: "your.email@example.com" }), this.emailError && (h("p", { key: 'c472d8248ad7cf77e9c69ccf5f21ad7c6666165e', class: "text-error text-sm mt-1" }, this.emailError))), h("div", { key: '5e1e8649b84a65fa2de5cfbb07fc9040dd806880' }, h("label", { key: '0a67c6688a671d5484eb3c1e7bca11067d5b73e6', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.phone), h("input", { key: '7968ba86b3fce057da3ac93248cfbda3c97974ca', type: "tel", class: `w-full px-4 py-2 rounded-4xl border ${this.phoneError
1830
- ? "border-error"
1831
- : "border-border"} focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, value: this.phone, onInput: (e) => {
1832
- this.phone =
1833
- e.target
1834
- .value;
1835
- this.validateForm();
1836
- }, placeholder: "+34 123 456 789" }), this.phoneError && (h("p", { key: '3f36ed60c53e037686b855f40ac3baa10dac20af', class: "text-error text-sm mt-1" }, this.phoneError)))), h("div", { key: '790b619300e7315c7d65cd18233c4ee9904c9cff', class: "flex flex-col items-center gap-4" }, h("button", { key: '9f7441b0d2c094d3fc5d9242a993bdc3932bf909', onClick: () => this.handleRequestOffer(), disabled: !this.name.trim() ||
1837
- !this.email.trim() || !!this.nameError ||
1838
- !!this.emailError || !!this.phoneError ||
1839
- this.isSubmitting, class: `px-6 py-3 rounded-4xl transition-colors duration-200 flex items-center gap-2 ${this.isSubmitting
1840
- ? "bg-muted text-text-muted cursor-not-allowed"
1841
- : "bg-secondary hover:bg-tertiary"}`, style: {
1842
- color: this.isSubmitting
1843
- ? "var(--color-text-muted)"
1844
- : "#ffffff",
1845
- } }, this.isSubmitting && (h("div", { key: '2734b11e2a21a2c3336a349228649a1b214852f4', class: "w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin" })), this.isSubmitting
1846
- ? t.solarSystemForm.sending
1847
- : t.solarSystemForm.requestOfferButton), this.submitMessage && (h("div", { key: '973330f8da989c0d24071b1ba95eef34c61e5ee7', class: `text-sm px-4 py-2 rounded-4xl ${this.submitSuccess
1848
- ? "bg-success/10 text-success border border-success/20"
1849
- : "bg-error/10 text-error border border-error/20"}` }, this.submitMessage)))))));
1850
- }
1851
- static get watchers() { return {
1852
- "systemConfigs": ["updateSystemConfigs"]
1853
- }; }
1854
- static get style() { return outputCss; }
1855
- }, [0, "solar-system-form", {
1856
- "systemConfigs": [16, "system-configs"],
1857
- "polygons": [16],
1858
- "roofCanvas": [16, "roof-canvas"],
1859
- "polygonCanvas": [16, "polygon-canvas"],
1860
- "householdConsumption": [32],
1861
- "consumptionProfile": [32],
1862
- "electricityPrice": [32],
1863
- "compensationRate": [32],
1864
- "annualPriceIncrease": [32],
1865
- "autonomy": [32],
1866
- "costSavings": [32],
1867
- "numberOfPanels": [32],
1868
- "panelPeakPower": [32],
1869
- "name": [32],
1870
- "email": [32],
1871
- "phone": [32],
1872
- "nameError": [32],
1873
- "emailError": [32],
1874
- "phoneError": [32],
1875
- "electricCar": [32],
1876
- "electricCarChargingTime": [32],
1877
- "heatPump": [32],
1878
- "battery": [32],
1879
- "compensation20Years": [32],
1880
- "savedCosts20Years": [32],
1881
- "maxPanels": [32],
1882
- "kmDrivenPerYear": [32],
1883
- "totalEnergyConsumption": [32],
1884
- "totalEnergyProduction": [32],
1885
- "isSubmitting": [32],
1886
- "submitMessage": [32],
1887
- "submitSuccess": [32]
1888
- }, undefined, {
1889
- "systemConfigs": ["updateSystemConfigs"]
1890
- }]);
1891
- function defineCustomElement() {
1892
- if (typeof customElements === "undefined") {
1893
- return;
1894
- }
1895
- const components = ["solar-system-form"];
1896
- components.forEach(tagName => { switch (tagName) {
1897
- case "solar-system-form":
1898
- if (!customElements.get(tagName)) {
1899
- customElements.define(tagName, SolarSystemForm);
1900
- }
1901
- break;
1902
- } });
1903
- }
1904
- defineCustomElement();
1905
-
1906
- export { BORDER_INSET as B, DEFAULT_COLOR_SCHEME as D, SolarSystemForm as S, DEFAULT_SOLAR_EXPERT_CONFIG as a, DEFAULT_SOLAR_PANEL_TYPE as b, distExports as c, defineCustomElement as d, requireDist$1 as r };
1907
- //# sourceMappingURL=p-Cfy4oCWb.js.map
1908
-
1909
- //# sourceMappingURL=p-Cfy4oCWb.js.map