blue-chestnut-solar-expert 0.0.67 → 0.0.68

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 (333) hide show
  1. package/dist/stencil-library/assets/tutorial4.mp4 +0 -0
  2. package/dist/{collection/config.js → stencil-library/config-CWfV1nKn.js} +10 -4
  3. package/dist/stencil-library/config-CWfV1nKn.js.map +1 -0
  4. package/dist/stencil-library/constants-hboFofU4.js +1522 -0
  5. package/dist/stencil-library/constants-hboFofU4.js.map +1 -0
  6. package/dist/stencil-library/decoder-DNOvLSaS.js +39 -0
  7. package/dist/stencil-library/decoder-DNOvLSaS.js.map +1 -0
  8. package/dist/stencil-library/deflate-0Vdd6-55.js +21 -0
  9. package/dist/{esm/deflate-DHgPf9CO.js.map → stencil-library/deflate-0Vdd6-55.js.map} +1 -1
  10. package/dist/stencil-library/eraser-icon.entry.esm.js.map +1 -0
  11. package/dist/{components/p-CL74Q4VR.js → stencil-library/eraser-icon.entry.js} +9 -27
  12. package/dist/stencil-library/eraser-icon.entry.js.map +1 -0
  13. package/dist/stencil-library/house-icon.entry.esm.js.map +1 -0
  14. package/dist/{components/p-D8w3bTPO.js → stencil-library/house-icon.entry.js} +9 -27
  15. package/dist/stencil-library/house-icon.entry.js.map +1 -0
  16. package/dist/{components/loading-widget.js → stencil-library/icon-selector.entry.esm.js.map} +1 -38
  17. package/dist/stencil-library/icon-selector.entry.js +47 -0
  18. package/dist/stencil-library/icon-selector.entry.js.map +1 -0
  19. package/dist/stencil-library/index-CChkgM3J.js +414 -0
  20. package/dist/stencil-library/index-CChkgM3J.js.map +1 -0
  21. package/dist/stencil-library/index-ICfDNUMe.js +4172 -0
  22. package/dist/stencil-library/index-ICfDNUMe.js.map +1 -0
  23. package/dist/stencil-library/index.esm.js +13 -1
  24. package/dist/stencil-library/index.esm.js.map +1 -1
  25. package/dist/{esm/jpeg-CJLm1GkA.js → stencil-library/jpeg-Dd5nnHR5.js} +11 -3
  26. package/dist/stencil-library/jpeg-Dd5nnHR5.js.map +1 -0
  27. package/dist/{components/p-BcVa4_YP.js → stencil-library/lerc-7W4E8EBs.js} +27 -1981
  28. package/dist/stencil-library/lerc-7W4E8EBs.js.map +1 -0
  29. package/dist/{esm → stencil-library}/loading-widget.entry.js +3 -3
  30. package/dist/{components/p-P28NBglk.js.map → stencil-library/loading-widget.entry.js.map} +1 -1
  31. package/dist/{esm/lzw-DaOzWJUD.js → stencil-library/lzw--P4c0ZHH.js} +10 -4
  32. package/dist/stencil-library/lzw--P4c0ZHH.js.map +1 -0
  33. package/dist/stencil-library/map-draw-Cx9WZoKH.js +25567 -0
  34. package/dist/stencil-library/map-draw-Cx9WZoKH.js.map +1 -0
  35. package/dist/stencil-library/map-draw.entry.esm.js.map +1 -0
  36. package/dist/stencil-library/map-draw.entry.js +12 -0
  37. package/dist/stencil-library/map-draw.entry.js.map +1 -0
  38. package/dist/stencil-library/map-selector.entry.esm.js.map +1 -0
  39. package/dist/{components/p-C5QieOat.js → stencil-library/map-selector.entry.js} +164 -96
  40. package/dist/stencil-library/map-selector.entry.js.map +1 -0
  41. package/dist/{components/loading-widget.js.map → stencil-library/marker-icon.entry.esm.js.map} +1 -1
  42. package/dist/{components/p-Umz6nJIv.js → stencil-library/marker-icon.entry.js} +9 -27
  43. package/dist/stencil-library/marker-icon.entry.js.map +1 -0
  44. package/dist/stencil-library/move-icon.entry.esm.js.map +1 -0
  45. package/dist/{components/p-FdEV2qPo.js → stencil-library/move-icon.entry.js} +9 -27
  46. package/dist/stencil-library/move-icon.entry.js.map +1 -0
  47. package/dist/{components/p-DTXeHbuh.js.map → stencil-library/octagon-minus-icon.entry.esm.js.map} +1 -1
  48. package/dist/{components/p-BJLO76Yi.js → stencil-library/octagon-minus-icon.entry.js} +9 -27
  49. package/dist/stencil-library/octagon-minus-icon.entry.js.map +1 -0
  50. package/dist/{components/p-ByX6QP-E.js → stencil-library/packbits-X3R_utTs.js} +9 -3
  51. package/dist/stencil-library/packbits-X3R_utTs.js.map +1 -0
  52. package/dist/stencil-library/pako.esm-CPorU236.js +6881 -0
  53. package/dist/{esm/pako.esm-B5WTRCh8.js.map → stencil-library/pako.esm-CPorU236.js.map} +1 -1
  54. package/dist/{components/p-B4X-RCW0.js.map → stencil-library/polygon-buttons.entry.esm.js.map} +1 -1
  55. package/dist/{cjs/loading-widget.cjs.entry.js → stencil-library/polygon-buttons.entry.js} +16 -10
  56. package/dist/stencil-library/polygon-buttons.entry.js.map +1 -0
  57. package/dist/{cjs/loading-widget.cjs.entry.js.map → stencil-library/polygon-information.entry.esm.js.map} +1 -1
  58. package/dist/{components/p-BFJHTJPM.js → stencil-library/polygon-information.entry.js} +13 -70
  59. package/dist/stencil-library/polygon-information.entry.js.map +1 -0
  60. package/dist/stencil-library/raw-BxukYehy.js +20 -0
  61. package/dist/stencil-library/raw-BxukYehy.js.map +1 -0
  62. package/dist/stencil-library/search-icon.entry.esm.js.map +1 -0
  63. package/dist/{components/p-DBwr8xSB.js → stencil-library/search-icon.entry.js} +9 -27
  64. package/dist/stencil-library/{p-ab0f2031.entry.js → search-icon.entry.js.map} +1 -2
  65. package/dist/stencil-library/settings-icon.entry.esm.js.map +1 -0
  66. package/dist/{components/p-DTXeHbuh.js → stencil-library/settings-icon.entry.js} +9 -27
  67. package/dist/stencil-library/settings-icon.entry.js.map +1 -0
  68. package/dist/stencil-library/settings-modal.entry.esm.js.map +1 -0
  69. package/dist/{components/p-B4X-RCW0.js → stencil-library/settings-modal.entry.js} +20 -38
  70. package/dist/stencil-library/settings-modal.entry.js.map +1 -0
  71. package/dist/stencil-library/solar-expert.entry.esm.js.map +1 -0
  72. package/dist/{components/solar-expert.js → stencil-library/solar-expert.entry.js} +14 -150
  73. package/dist/{components/p-i1uLweD0.js.map → stencil-library/solar-expert.entry.js.map} +1 -1
  74. package/dist/stencil-library/solar-system-form.entry.esm.js.map +1 -0
  75. package/dist/stencil-library/solar-system-form.entry.js +553 -0
  76. package/dist/stencil-library/solar-system-form.entry.js.map +1 -0
  77. package/dist/stencil-library/stencil-library.esm.js +52 -1
  78. package/dist/stencil-library/stencil-library.esm.js.map +1 -1
  79. package/dist/{components/p-eDwaXClX.js → stencil-library/store-CcqrFuBK.js} +24 -3
  80. package/dist/stencil-library/store-CcqrFuBK.js.map +1 -0
  81. package/dist/stencil-library/toast-notification.entry.esm.js.map +1 -0
  82. package/dist/{components/p-P28NBglk.js → stencil-library/toast-notification.entry.js} +9 -30
  83. package/dist/stencil-library/toast-notification.entry.js.map +1 -0
  84. package/dist/stencil-library/tool-box.entry.esm.js.map +1 -0
  85. package/dist/{components/p-i1uLweD0.js → stencil-library/tool-box.entry.js} +27 -35
  86. package/dist/stencil-library/tool-box.entry.js.map +1 -0
  87. package/dist/{collection/utils/render/tools.js → stencil-library/tools-BNYKV5H5.js} +14 -8
  88. package/dist/stencil-library/tools-BNYKV5H5.js.map +1 -0
  89. package/dist/stencil-library/tutorial-component.entry.esm.js.map +1 -0
  90. package/dist/{components/p-Dzl6kfPI.js → stencil-library/tutorial-component.entry.js} +42 -35
  91. package/dist/stencil-library/tutorial-component.entry.js.map +1 -0
  92. package/dist/stencil-library/undo-icon.entry.esm.js.map +1 -0
  93. package/dist/{components/p-waOPoUcA.js → stencil-library/undo-icon.entry.js} +9 -27
  94. package/dist/stencil-library/undo-icon.entry.js.map +1 -0
  95. package/dist/{collection/utils/utils.js → stencil-library/utils-BCUZxI9u.js} +9 -3
  96. package/dist/stencil-library/utils-BCUZxI9u.js.map +1 -0
  97. package/dist/{esm/webimage-BiHardhv.js → stencil-library/webimage-CBrfoxHM.js} +9 -3
  98. package/dist/{esm/webimage-BiHardhv.js.map → stencil-library/webimage-CBrfoxHM.js.map} +1 -1
  99. package/dist/types/components/map-draw/map-draw.d.ts +5 -0
  100. package/dist/types/components/map-draw/tutorial-component.d.ts +7 -0
  101. package/dist/types/components.d.ts +4 -0
  102. package/dist/types/types/lang.d.ts +7 -0
  103. package/package.json +1 -1
  104. package/dist/cjs/app-globals-I24yU8do.js +0 -10
  105. package/dist/cjs/app-globals-I24yU8do.js.map +0 -1
  106. package/dist/cjs/basedecoder-CQuzfSgz.js +0 -116
  107. package/dist/cjs/basedecoder-CQuzfSgz.js.map +0 -1
  108. package/dist/cjs/deflate-AzGzQSW2.js +0 -17
  109. package/dist/cjs/deflate-AzGzQSW2.js.map +0 -1
  110. package/dist/cjs/eraser-icon_19.cjs.entry.js +0 -31
  111. package/dist/cjs/eraser-icon_19.cjs.entry.js.map +0 -1
  112. package/dist/cjs/index-HgRXF6kp.js +0 -1470
  113. package/dist/cjs/index-HgRXF6kp.js.map +0 -1
  114. package/dist/cjs/index.cjs.js +0 -7
  115. package/dist/cjs/index.cjs.js.map +0 -1
  116. package/dist/cjs/jpeg-Bx3bTm32.js +0 -904
  117. package/dist/cjs/jpeg-Bx3bTm32.js.map +0 -1
  118. package/dist/cjs/lerc-v64rYVDy.js +0 -4427
  119. package/dist/cjs/lerc-v64rYVDy.js.map +0 -1
  120. package/dist/cjs/loader.cjs.js +0 -18
  121. package/dist/cjs/loader.cjs.js.map +0 -1
  122. package/dist/cjs/loading-widget.entry.cjs.js.map +0 -1
  123. package/dist/cjs/lzw-BmFug486.js +0 -140
  124. package/dist/cjs/lzw-BmFug486.js.map +0 -1
  125. package/dist/cjs/packbits-CYx9fB0v.js +0 -35
  126. package/dist/cjs/packbits-CYx9fB0v.js.map +0 -1
  127. package/dist/cjs/pako.esm-0mKI6Jik.js +0 -3243
  128. package/dist/cjs/pako.esm-0mKI6Jik.js.map +0 -1
  129. package/dist/cjs/raw-DC82yoyr.js +0 -16
  130. package/dist/cjs/raw-DC82yoyr.js.map +0 -1
  131. package/dist/cjs/stencil-library.cjs.js +0 -30
  132. package/dist/cjs/stencil-library.cjs.js.map +0 -1
  133. package/dist/cjs/webimage-Dc0t2xAB.js +0 -49
  134. package/dist/cjs/webimage-Dc0t2xAB.js.map +0 -1
  135. package/dist/collection/collection-manifest.json +0 -31
  136. package/dist/collection/components/icons/eraser.js +0 -64
  137. package/dist/collection/components/icons/eraser.js.map +0 -1
  138. package/dist/collection/components/icons/house.js +0 -64
  139. package/dist/collection/components/icons/house.js.map +0 -1
  140. package/dist/collection/components/icons/icon.js +0 -108
  141. package/dist/collection/components/icons/icon.js.map +0 -1
  142. package/dist/collection/components/icons/marker.js +0 -64
  143. package/dist/collection/components/icons/marker.js.map +0 -1
  144. package/dist/collection/components/icons/move.js +0 -64
  145. package/dist/collection/components/icons/move.js.map +0 -1
  146. package/dist/collection/components/icons/octagonMinus.js +0 -64
  147. package/dist/collection/components/icons/octagonMinus.js.map +0 -1
  148. package/dist/collection/components/icons/search.js +0 -64
  149. package/dist/collection/components/icons/search.js.map +0 -1
  150. package/dist/collection/components/icons/settings.js +0 -64
  151. package/dist/collection/components/icons/settings.js.map +0 -1
  152. package/dist/collection/components/icons/undo.js +0 -64
  153. package/dist/collection/components/icons/undo.js.map +0 -1
  154. package/dist/collection/components/map-draw/map-draw.js +0 -795
  155. package/dist/collection/components/map-draw/map-draw.js.map +0 -1
  156. package/dist/collection/components/map-draw/map-selector.js +0 -246
  157. package/dist/collection/components/map-draw/map-selector.js.map +0 -1
  158. package/dist/collection/components/map-draw/polygon-buttons.js +0 -86
  159. package/dist/collection/components/map-draw/polygon-buttons.js.map +0 -1
  160. package/dist/collection/components/map-draw/polygon-information.js +0 -211
  161. package/dist/collection/components/map-draw/polygon-information.js.map +0 -1
  162. package/dist/collection/components/map-draw/tool-box.js +0 -108
  163. package/dist/collection/components/map-draw/tool-box.js.map +0 -1
  164. package/dist/collection/components/map-draw/tutorial-component.js +0 -151
  165. package/dist/collection/components/map-draw/tutorial-component.js.map +0 -1
  166. package/dist/collection/components/settings/settings.js +0 -127
  167. package/dist/collection/components/settings/settings.js.map +0 -1
  168. package/dist/collection/components/solar-expert/solar-expert.js +0 -241
  169. package/dist/collection/components/solar-expert/solar-expert.js.map +0 -1
  170. package/dist/collection/components/solar-system-form/solar-system-form.js +0 -596
  171. package/dist/collection/components/solar-system-form/solar-system-form.js.map +0 -1
  172. package/dist/collection/components/widgets/loading-widget.js +0 -18
  173. package/dist/collection/components/widgets/loading-widget.js.map +0 -1
  174. package/dist/collection/components/widgets/toast-notification.js +0 -133
  175. package/dist/collection/components/widgets/toast-notification.js.map +0 -1
  176. package/dist/collection/config.js.map +0 -1
  177. package/dist/collection/constants.js +0 -90
  178. package/dist/collection/constants.js.map +0 -1
  179. package/dist/collection/index.js +0 -2
  180. package/dist/collection/index.js.map +0 -1
  181. package/dist/collection/output.css +0 -1126
  182. package/dist/collection/store.js +0 -43
  183. package/dist/collection/store.js.map +0 -1
  184. package/dist/collection/types/lang.js +0 -2
  185. package/dist/collection/types/lang.js.map +0 -1
  186. package/dist/collection/types/shapes.js +0 -2
  187. package/dist/collection/types/shapes.js.map +0 -1
  188. package/dist/collection/utils/api.js +0 -93
  189. package/dist/collection/utils/api.js.map +0 -1
  190. package/dist/collection/utils/images.js +0 -2
  191. package/dist/collection/utils/images.js.map +0 -1
  192. package/dist/collection/utils/lang/english.js +0 -157
  193. package/dist/collection/utils/lang/english.js.map +0 -1
  194. package/dist/collection/utils/lang/general.js +0 -30
  195. package/dist/collection/utils/lang/general.js.map +0 -1
  196. package/dist/collection/utils/lang/german.js +0 -157
  197. package/dist/collection/utils/lang/german.js.map +0 -1
  198. package/dist/collection/utils/lang/spanish.js +0 -157
  199. package/dist/collection/utils/lang/spanish.js.map +0 -1
  200. package/dist/collection/utils/render/tools.js.map +0 -1
  201. package/dist/collection/utils/solar.js +0 -136
  202. package/dist/collection/utils/solar.js.map +0 -1
  203. package/dist/collection/utils/theme.js +0 -97
  204. package/dist/collection/utils/theme.js.map +0 -1
  205. package/dist/collection/utils/utils.js.map +0 -1
  206. package/dist/components/eraser-icon.js +0 -11
  207. package/dist/components/eraser-icon.js.map +0 -1
  208. package/dist/components/house-icon.js +0 -11
  209. package/dist/components/house-icon.js.map +0 -1
  210. package/dist/components/icon-selector.js +0 -11
  211. package/dist/components/icon-selector.js.map +0 -1
  212. package/dist/components/index.js +0 -1269
  213. package/dist/components/index.js.map +0 -1
  214. package/dist/components/map-draw.js +0 -11
  215. package/dist/components/map-draw.js.map +0 -1
  216. package/dist/components/map-selector.js +0 -11
  217. package/dist/components/map-selector.js.map +0 -1
  218. package/dist/components/marker-icon.js +0 -11
  219. package/dist/components/marker-icon.js.map +0 -1
  220. package/dist/components/move-icon.js +0 -11
  221. package/dist/components/move-icon.js.map +0 -1
  222. package/dist/components/octagon-minus-icon.js +0 -11
  223. package/dist/components/octagon-minus-icon.js.map +0 -1
  224. package/dist/components/p-B54Ul0nf.js +0 -15
  225. package/dist/components/p-B54Ul0nf.js.map +0 -1
  226. package/dist/components/p-B5WTRCh8.js +0 -3241
  227. package/dist/components/p-B5WTRCh8.js.map +0 -1
  228. package/dist/components/p-BFJHTJPM.js.map +0 -1
  229. package/dist/components/p-BGoSj_DR.js +0 -902
  230. package/dist/components/p-BGoSj_DR.js.map +0 -1
  231. package/dist/components/p-BJLO76Yi.js.map +0 -1
  232. package/dist/components/p-BcVa4_YP.js.map +0 -1
  233. package/dist/components/p-Bopprtc7.js +0 -623
  234. package/dist/components/p-Bopprtc7.js.map +0 -1
  235. package/dist/components/p-ByX6QP-E.js.map +0 -1
  236. package/dist/components/p-C5QieOat.js.map +0 -1
  237. package/dist/components/p-CL74Q4VR.js.map +0 -1
  238. package/dist/components/p-Cgchl6bA.js +0 -47
  239. package/dist/components/p-Cgchl6bA.js.map +0 -1
  240. package/dist/components/p-D8w3bTPO.js.map +0 -1
  241. package/dist/components/p-DBwr8xSB.js.map +0 -1
  242. package/dist/components/p-DWirjxpO.js +0 -163
  243. package/dist/components/p-DWirjxpO.js.map +0 -1
  244. package/dist/components/p-DlNHVTGB.js +0 -15949
  245. package/dist/components/p-DlNHVTGB.js.map +0 -1
  246. package/dist/components/p-Dzl6kfPI.js.map +0 -1
  247. package/dist/components/p-FdEV2qPo.js.map +0 -1
  248. package/dist/components/p-PkMjF2if.js +0 -1985
  249. package/dist/components/p-PkMjF2if.js.map +0 -1
  250. package/dist/components/p-Umz6nJIv.js.map +0 -1
  251. package/dist/components/p-WmcSqXD8.js +0 -14
  252. package/dist/components/p-WmcSqXD8.js.map +0 -1
  253. package/dist/components/p-eDwaXClX.js.map +0 -1
  254. package/dist/components/p-j-vOrhhh.js +0 -114
  255. package/dist/components/p-j-vOrhhh.js.map +0 -1
  256. package/dist/components/p-q8auDIJ2.js +0 -138
  257. package/dist/components/p-q8auDIJ2.js.map +0 -1
  258. package/dist/components/p-waOPoUcA.js.map +0 -1
  259. package/dist/components/polygon-buttons.js +0 -11
  260. package/dist/components/polygon-buttons.js.map +0 -1
  261. package/dist/components/polygon-information.js +0 -11
  262. package/dist/components/polygon-information.js.map +0 -1
  263. package/dist/components/search-icon.js +0 -11
  264. package/dist/components/search-icon.js.map +0 -1
  265. package/dist/components/settings-icon.js +0 -11
  266. package/dist/components/settings-icon.js.map +0 -1
  267. package/dist/components/settings-modal.js +0 -11
  268. package/dist/components/settings-modal.js.map +0 -1
  269. package/dist/components/solar-expert.js.map +0 -1
  270. package/dist/components/solar-system-form.js +0 -11
  271. package/dist/components/solar-system-form.js.map +0 -1
  272. package/dist/components/toast-notification.js +0 -11
  273. package/dist/components/toast-notification.js.map +0 -1
  274. package/dist/components/tool-box.js +0 -11
  275. package/dist/components/tool-box.js.map +0 -1
  276. package/dist/components/tutorial-component.js +0 -11
  277. package/dist/components/tutorial-component.js.map +0 -1
  278. package/dist/components/undo-icon.js +0 -11
  279. package/dist/components/undo-icon.js.map +0 -1
  280. package/dist/esm/basedecoder-j-vOrhhh.js +0 -114
  281. package/dist/esm/basedecoder-j-vOrhhh.js.map +0 -1
  282. package/dist/esm/deflate-DHgPf9CO.js +0 -15
  283. package/dist/esm/eraser-icon_19.entry.js +0 -7
  284. package/dist/esm/eraser-icon_19.entry.js.map +0 -1
  285. package/dist/esm/index-C2JRBB5c.js +0 -1458
  286. package/dist/esm/index-C2JRBB5c.js.map +0 -1
  287. package/dist/esm/index.js +0 -5
  288. package/dist/esm/index.js.map +0 -1
  289. package/dist/esm/jpeg-CJLm1GkA.js.map +0 -1
  290. package/dist/esm/lerc-CAiDQjTu.js +0 -4424
  291. package/dist/esm/lerc-CAiDQjTu.js.map +0 -1
  292. package/dist/esm/loader.js +0 -16
  293. package/dist/esm/loader.js.map +0 -1
  294. package/dist/esm/loading-widget.entry.js.map +0 -1
  295. package/dist/esm/lzw-DaOzWJUD.js.map +0 -1
  296. package/dist/esm/packbits-CZPyx9kx.js +0 -33
  297. package/dist/esm/packbits-CZPyx9kx.js.map +0 -1
  298. package/dist/esm/pako.esm-B5WTRCh8.js +0 -3241
  299. package/dist/esm/raw-pqeeWc2_.js +0 -14
  300. package/dist/esm/raw-pqeeWc2_.js.map +0 -1
  301. package/dist/esm/stencil-library.js +0 -26
  302. package/dist/esm/stencil-library.js.map +0 -1
  303. package/dist/index.cjs.js +0 -1
  304. package/dist/index.js +0 -1
  305. package/dist/stencil-library/p-B54Ul0nf.js +0 -2
  306. package/dist/stencil-library/p-B54Ul0nf.js.map +0 -1
  307. package/dist/stencil-library/p-B5WTRCh8.js +0 -2
  308. package/dist/stencil-library/p-B5WTRCh8.js.map +0 -1
  309. package/dist/stencil-library/p-BBtmpSUK.js +0 -2
  310. package/dist/stencil-library/p-BBtmpSUK.js.map +0 -1
  311. package/dist/stencil-library/p-BGoSj_DR.js +0 -2
  312. package/dist/stencil-library/p-BGoSj_DR.js.map +0 -1
  313. package/dist/stencil-library/p-ByX6QP-E.js +0 -2
  314. package/dist/stencil-library/p-ByX6QP-E.js.map +0 -1
  315. package/dist/stencil-library/p-C2JRBB5c.js +0 -3
  316. package/dist/stencil-library/p-C2JRBB5c.js.map +0 -1
  317. package/dist/stencil-library/p-CX8V3eiN.js +0 -2
  318. package/dist/stencil-library/p-CX8V3eiN.js.map +0 -1
  319. package/dist/stencil-library/p-Cgchl6bA.js +0 -2
  320. package/dist/stencil-library/p-Cgchl6bA.js.map +0 -1
  321. package/dist/stencil-library/p-WmcSqXD8.js +0 -2
  322. package/dist/stencil-library/p-WmcSqXD8.js.map +0 -1
  323. package/dist/stencil-library/p-ab0f2031.entry.js.map +0 -1
  324. package/dist/stencil-library/p-cAuhy_jT.js +0 -10
  325. package/dist/stencil-library/p-cAuhy_jT.js.map +0 -1
  326. package/dist/stencil-library/p-e7b94dbb.entry.js +0 -2
  327. package/dist/stencil-library/p-e7b94dbb.entry.js.map +0 -1
  328. package/dist/stencil-library/p-j-vOrhhh.js +0 -2
  329. package/dist/stencil-library/p-j-vOrhhh.js.map +0 -1
  330. package/dist/stencil-library/p-q8auDIJ2.js +0 -2
  331. package/dist/stencil-library/p-q8auDIJ2.js.map +0 -1
  332. /package/dist/{esm → stencil-library}/app-globals-CX8V3eiN.js +0 -0
  333. /package/dist/{esm → stencil-library}/app-globals-CX8V3eiN.js.map +0 -0
@@ -1,1985 +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-eDwaXClX.js';
5
-
6
- var dist$1 = {};
7
-
8
- var geometry = {};
9
-
10
- var gridMatch = {};
11
-
12
- var dist = {};
13
-
14
- var shapes = {};
15
-
16
- var polygon = {};
17
-
18
- var hasRequiredPolygon;
19
-
20
- function requirePolygon () {
21
- if (hasRequiredPolygon) return polygon;
22
- hasRequiredPolygon = 1;
23
- Object.defineProperty(polygon, "__esModule", { value: true });
24
- polygon.PolygonType = polygon.Point = void 0;
25
- class Point {
26
- constructor(x, y) {
27
- this.x = x;
28
- this.y = y;
29
- }
30
- equals(other) {
31
- return this.x === other.x && this.y === other.y;
32
- }
33
- }
34
- polygon.Point = Point;
35
- var PolygonType;
36
- (function (PolygonType) {
37
- PolygonType["ROOF"] = "roof";
38
- PolygonType["OBSTRUCTION"] = "obstruction";
39
- })(PolygonType || (polygon.PolygonType = PolygonType = {}));
40
-
41
- return polygon;
42
- }
43
-
44
- var utils$1 = {};
45
-
46
- var hasRequiredUtils$1;
47
-
48
- function requireUtils$1 () {
49
- if (hasRequiredUtils$1) return utils$1;
50
- hasRequiredUtils$1 = 1;
51
- Object.defineProperty(utils$1, "__esModule", { value: true });
52
- utils$1.isPointInPolygon = isPointInPolygon;
53
- utils$1.isPointOnBorder = isPointOnBorder;
54
- function isPointInPolygon(point, polygon) {
55
- if (!polygon.closed || polygon.points.length < 3)
56
- return false;
57
- const num_vertices = polygon.points.length;
58
- const x = point.x;
59
- const y = point.y;
60
- let inside = false;
61
- let p1 = polygon.points[0];
62
- let p2;
63
- for (let i = 1; i <= num_vertices; i++) {
64
- p2 = polygon.points[i % num_vertices];
65
- if (y > Math.min(p1.y, p2.y)) {
66
- if (y <= Math.max(p1.y, p2.y)) {
67
- if (x <= Math.max(p1.x, p2.x)) {
68
- const x_intersection = ((y - p1.y) * (p2.x - p1.x)) / (p2.y - p1.y) + p1.x;
69
- if (p1.x === p2.x || x <= x_intersection) {
70
- inside = !inside;
71
- }
72
- }
73
- }
74
- }
75
- p1 = p2;
76
- }
77
- return inside;
78
- }
79
- function isPointOnBorder(point, polygon) {
80
- if (!polygon.closed || polygon.points.length < 3)
81
- return false;
82
- const x = point.x;
83
- const y = point.y;
84
- for (let i = 0; i < polygon.points.length; i++) {
85
- const p1 = polygon.points[i];
86
- const p2 = polygon.points[(i + 1) % polygon.points.length];
87
- const distance = Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));
88
- const distanceToPoint = Math.sqrt(Math.pow(p1.x - x, 2) + Math.pow(p1.y - y, 2));
89
- const distanceFromPoint = Math.sqrt(Math.pow(p2.x - x, 2) + Math.pow(p2.y - y, 2));
90
- if (distance === distanceToPoint + distanceFromPoint) {
91
- return true;
92
- }
93
- }
94
- return false;
95
- }
96
-
97
- return utils$1;
98
- }
99
-
100
- var hasRequiredShapes;
101
-
102
- function requireShapes () {
103
- if (hasRequiredShapes) return shapes;
104
- hasRequiredShapes = 1;
105
- (function (exports) {
106
- var __createBinding = (shapes && shapes.__createBinding) || (Object.create ? (function(o, m, k, k2) {
107
- if (k2 === undefined) k2 = k;
108
- var desc = Object.getOwnPropertyDescriptor(m, k);
109
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
110
- desc = { enumerable: true, get: function() { return m[k]; } };
111
- }
112
- Object.defineProperty(o, k2, desc);
113
- }) : (function(o, m, k, k2) {
114
- if (k2 === undefined) k2 = k;
115
- o[k2] = m[k];
116
- }));
117
- var __exportStar = (shapes && shapes.__exportStar) || function(m, exports) {
118
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
119
- };
120
- Object.defineProperty(exports, "__esModule", { value: true });
121
- __exportStar(requirePolygon(), exports);
122
- __exportStar(requireUtils$1(), exports);
123
-
124
- } (shapes));
125
- return shapes;
126
- }
127
-
128
- var solar = {};
129
-
130
- var location = {};
131
-
132
- var hasRequiredLocation;
133
-
134
- function requireLocation () {
135
- if (hasRequiredLocation) return location;
136
- hasRequiredLocation = 1;
137
- Object.defineProperty(location, "__esModule", { value: true });
138
-
139
- return location;
140
- }
141
-
142
- var solarPanel = {};
143
-
144
- var hasRequiredSolarPanel;
145
-
146
- function requireSolarPanel () {
147
- if (hasRequiredSolarPanel) return solarPanel;
148
- hasRequiredSolarPanel = 1;
149
- Object.defineProperty(solarPanel, "__esModule", { value: true });
150
-
151
- return solarPanel;
152
- }
153
-
154
- var googleSolar = {};
155
-
156
- var hasRequiredGoogleSolar;
157
-
158
- function requireGoogleSolar () {
159
- if (hasRequiredGoogleSolar) return googleSolar;
160
- hasRequiredGoogleSolar = 1;
161
- var __awaiter = (googleSolar && googleSolar.__awaiter) || function (thisArg, _arguments, P, generator) {
162
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
163
- return new (P || (P = Promise))(function (resolve, reject) {
164
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
165
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
166
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
167
- step((generator = generator.apply(thisArg, _arguments || [])).next());
168
- });
169
- };
170
- Object.defineProperty(googleSolar, "__esModule", { value: true });
171
- googleSolar.findClosestBuilding = findClosestBuilding;
172
- googleSolar.getDataLayerUrls = getDataLayerUrls;
173
- function findClosestBuilding(location, apiKey) {
174
- return __awaiter(this, void 0, void 0, function* () {
175
- const args = {
176
- "location.latitude": location.lat().toFixed(5),
177
- "location.longitude": location.lng().toFixed(5),
178
- };
179
- const params = new URLSearchParams(Object.assign(Object.assign({}, args), { key: apiKey }));
180
- return fetch(`https://solar.googleapis.com/v1/buildingInsights:findClosest?${params}`).then((response) => __awaiter(this, void 0, void 0, function* () {
181
- const content = yield response.json();
182
- if (response.status != 200) {
183
- console.error("findClosestBuilding\n", content);
184
- throw content;
185
- }
186
- return content;
187
- }));
188
- });
189
- }
190
- function getDataLayerUrls(location, radiusMeters, apiKey) {
191
- return __awaiter(this, void 0, void 0, function* () {
192
- const args = {
193
- "location.latitude": location.latitude.toFixed(5),
194
- "location.longitude": location.longitude.toFixed(5),
195
- radius_meters: radiusMeters.toString(),
196
- required_quality: "LOW",
197
- };
198
- const params = new URLSearchParams(Object.assign(Object.assign({}, args), { key: apiKey }));
199
- return fetch(`https://solar.googleapis.com/v1/dataLayers:get?${params}`)
200
- .then((response) => __awaiter(this, void 0, void 0, function* () {
201
- const content = yield response.json();
202
- if (response.status != 200) {
203
- console.error("getDataLayerUrls\n", content);
204
- throw content;
205
- }
206
- return content;
207
- }));
208
- });
209
- }
210
-
211
- return googleSolar;
212
- }
213
-
214
- var hasRequiredSolar;
215
-
216
- function requireSolar () {
217
- if (hasRequiredSolar) return solar;
218
- hasRequiredSolar = 1;
219
- (function (exports) {
220
- var __createBinding = (solar && solar.__createBinding) || (Object.create ? (function(o, m, k, k2) {
221
- if (k2 === undefined) k2 = k;
222
- var desc = Object.getOwnPropertyDescriptor(m, k);
223
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
224
- desc = { enumerable: true, get: function() { return m[k]; } };
225
- }
226
- Object.defineProperty(o, k2, desc);
227
- }) : (function(o, m, k, k2) {
228
- if (k2 === undefined) k2 = k;
229
- o[k2] = m[k];
230
- }));
231
- var __exportStar = (solar && solar.__exportStar) || function(m, exports) {
232
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
233
- };
234
- Object.defineProperty(exports, "__esModule", { value: true });
235
- __exportStar(requireLocation(), exports);
236
- __exportStar(requireSolarPanel(), exports);
237
- __exportStar(requireGoogleSolar(), exports);
238
-
239
- } (solar));
240
- return solar;
241
- }
242
-
243
- var heating = {};
244
-
245
- var hasRequiredHeating;
246
-
247
- function requireHeating () {
248
- if (hasRequiredHeating) return heating;
249
- hasRequiredHeating = 1;
250
- Object.defineProperty(heating, "__esModule", { value: true });
251
-
252
- return heating;
253
- }
254
-
255
- var hasRequiredDist$1;
256
-
257
- function requireDist$1 () {
258
- if (hasRequiredDist$1) return dist;
259
- hasRequiredDist$1 = 1;
260
- (function (exports) {
261
- var __createBinding = (dist && dist.__createBinding) || (Object.create ? (function(o, m, k, k2) {
262
- if (k2 === undefined) k2 = k;
263
- var desc = Object.getOwnPropertyDescriptor(m, k);
264
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
265
- desc = { enumerable: true, get: function() { return m[k]; } };
266
- }
267
- Object.defineProperty(o, k2, desc);
268
- }) : (function(o, m, k, k2) {
269
- if (k2 === undefined) k2 = k;
270
- o[k2] = m[k];
271
- }));
272
- var __exportStar = (dist && dist.__exportStar) || function(m, exports) {
273
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
274
- };
275
- Object.defineProperty(exports, "__esModule", { value: true });
276
- __exportStar(requireShapes(), exports);
277
- __exportStar(requireSolar(), exports);
278
- __exportStar(requireHeating(), exports);
279
-
280
- } (dist));
281
- return dist;
282
- }
283
-
284
- var fitting = {};
285
-
286
- var utils = {};
287
-
288
- var solarApi = {};
289
-
290
- var hasRequiredSolarApi;
291
-
292
- function requireSolarApi () {
293
- if (hasRequiredSolarApi) return solarApi;
294
- hasRequiredSolarApi = 1;
295
- var __awaiter = (solarApi && solarApi.__awaiter) || function (thisArg, _arguments, P, generator) {
296
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
297
- return new (P || (P = Promise))(function (resolve, reject) {
298
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
299
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
300
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
301
- step((generator = generator.apply(thisArg, _arguments || [])).next());
302
- });
303
- };
304
- Object.defineProperty(solarApi, "__esModule", { value: true });
305
- solarApi.fetchSolarData = fetchSolarData;
306
- solarApi.getPixelInMeters = getPixelInMeters;
307
- function fetchSolarData(latitude, longitude, apiKey) {
308
- return __awaiter(this, void 0, void 0, function* () {
309
- if (latitude === 0 || longitude === 0) {
310
- return null;
311
- }
312
- try {
313
- const args = {
314
- "location.latitude": latitude.toFixed(5),
315
- "location.longitude": longitude.toFixed(5),
316
- };
317
- const params = new URLSearchParams(Object.assign(Object.assign({}, args), { key: apiKey }));
318
- const response = yield fetch(`https://solar.googleapis.com/v1/buildingInsights:findClosest?${params}`);
319
- if (!response.ok) {
320
- const errorText = yield response.text();
321
- throw new Error(`HTTP error! status: ${response.status}, body: ${errorText}`);
322
- }
323
- const contentType = response.headers.get("content-type");
324
- if (!contentType || !contentType.includes("application/json")) {
325
- const text = yield response.text();
326
- console.error("Unexpected content type:", contentType, "Response:", text);
327
- return null;
328
- }
329
- const rawData = yield response.json();
330
- return rawData;
331
- }
332
- catch (error) {
333
- console.error("Error fetching solar data:", error);
334
- if (error instanceof TypeError &&
335
- error.message === "Failed to fetch") {
336
- throw new Error("Unable to connect to the solar data API.");
337
- }
338
- throw error;
339
- }
340
- });
341
- }
342
- function getPixelInMeters(rgbTiff) {
343
- const latDiff = rgbTiff.bounds.north - rgbTiff.bounds.south;
344
- const pixelHeight = rgbTiff.height;
345
- const pixelInMeters = latDiff * 111320 / pixelHeight;
346
- return pixelInMeters;
347
- }
348
-
349
- return solarApi;
350
- }
351
-
352
- var hasRequiredUtils;
353
-
354
- function requireUtils () {
355
- if (hasRequiredUtils) return utils;
356
- hasRequiredUtils = 1;
357
- (function (exports) {
358
- var __createBinding = (utils && utils.__createBinding) || (Object.create ? (function(o, m, k, k2) {
359
- if (k2 === undefined) k2 = k;
360
- var desc = Object.getOwnPropertyDescriptor(m, k);
361
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
362
- desc = { enumerable: true, get: function() { return m[k]; } };
363
- }
364
- Object.defineProperty(o, k2, desc);
365
- }) : (function(o, m, k, k2) {
366
- if (k2 === undefined) k2 = k;
367
- o[k2] = m[k];
368
- }));
369
- var __exportStar = (utils && utils.__exportStar) || function(m, exports) {
370
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
371
- };
372
- Object.defineProperty(exports, "__esModule", { value: true });
373
- exports.latLngToPixel = latLngToPixel;
374
- const harmonia_types_1 = requireDist$1();
375
- __exportStar(/*@__PURE__*/ requireSolarApi(), exports);
376
- function latLngToPixel(bounds, canvas, latLng) {
377
- const ctx = canvas.getContext("2d");
378
- if (!ctx) {
379
- throw new Error("Canvas context not found");
380
- }
381
- const latToPixel = (lat) => {
382
- return canvas.height *
383
- (1 - (lat - bounds.south) / (bounds.north - bounds.south));
384
- };
385
- const lngToPixel = (lng) => {
386
- return canvas.width * (lng - bounds.west) / (bounds.east - bounds.west);
387
- };
388
- return new harmonia_types_1.Point(lngToPixel(latLng.longitude), latToPixel(latLng.latitude));
389
- }
390
-
391
- } (utils));
392
- return utils;
393
- }
394
-
395
- var hasRequiredFitting;
396
-
397
- function requireFitting () {
398
- if (hasRequiredFitting) return fitting;
399
- hasRequiredFitting = 1;
400
- Object.defineProperty(fitting, "__esModule", { value: true });
401
- fitting.projectPoint = projectPoint;
402
- fitting.projectPolygon = projectPolygon;
403
- fitting.intersects = intersects;
404
- fitting.offsetPolygon = offsetPolygon;
405
- fitting.getBestFittingRoofSegment = getBestFittingRoofSegment;
406
- const harmonia_types_1 = requireDist$1();
407
- const utils_1 = /*@__PURE__*/ requireUtils();
408
- function projectPoint(point, azimuth) {
409
- const angle = azimuth * (Math.PI / 180);
410
- const x = point.x * Math.cos(angle) - point.y * Math.sin(angle);
411
- const y = point.x * Math.sin(angle) + point.y * Math.cos(angle);
412
- return new harmonia_types_1.Point(x, y);
413
- }
414
- function projectPolygon(polygon, azimuth) {
415
- return {
416
- points: polygon.points.map((point) => projectPoint(point, azimuth)),
417
- type: polygon.type,
418
- closed: polygon.closed,
419
- id: polygon.id,
420
- };
421
- }
422
- function intersects(line1, line2) {
423
- const p1 = line1.start;
424
- const p2 = line1.end;
425
- const p3 = line2.start;
426
- const p4 = line2.end;
427
- if (p1.equals(p3) ||
428
- p1.equals(p4) ||
429
- p2.equals(p3) ||
430
- p2.equals(p4)) {
431
- return false;
432
- }
433
- const d1 = (p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x);
434
- const d2 = (p4.x - p3.x) * (p2.y - p3.y) - (p4.y - p3.y) * (p2.x - p3.x);
435
- const d3 = (p2.x - p1.x) * (p3.y - p1.y) - (p2.y - p1.y) * (p3.x - p1.x);
436
- const d4 = (p2.x - p1.x) * (p4.y - p1.y) - (p2.y - p1.y) * (p4.x - p1.x);
437
- return (d1 * d2 < 0) && (d3 * d4 < 0);
438
- }
439
- function offsetPolygon(polygon, offset) {
440
- if (polygon.points.length === 0) {
441
- return { polygon: polygon, offset: { x: 0, y: 0 } };
442
- }
443
- let offsetX = 0;
444
- let offsetY = 0;
445
- if (!offset) {
446
- const minX = Math.min(...polygon.points.map((point) => point.x));
447
- const minY = Math.min(...polygon.points.map((point) => point.y));
448
- const maxX = Math.max(...polygon.points.map((point) => point.x));
449
- const maxY = Math.max(...polygon.points.map((point) => point.y));
450
- offsetX = minX + (maxX - minX) / 2;
451
- offsetY = minY + (maxY - minY) / 2;
452
- }
453
- else {
454
- offsetX = offset.x;
455
- offsetY = offset.y;
456
- }
457
- const newPoints = polygon.points.map((point) => new harmonia_types_1.Point(point.x - offsetX, point.y - offsetY));
458
- return {
459
- polygon: Object.assign(Object.assign({}, polygon), { points: newPoints }),
460
- offset: { x: offsetX, y: offsetY },
461
- };
462
- }
463
- function getBestFittingRoofSegment(roof, roofSegmentStats, bounds, canvas) {
464
- const polygonBounds = {
465
- minX: Math.min(...roof.points.map((p) => p.x)),
466
- maxX: Math.max(...roof.points.map((p) => p.x)),
467
- minY: Math.min(...roof.points.map((p) => p.y)),
468
- maxY: Math.max(...roof.points.map((p) => p.y)),
469
- };
470
- let bestSegment = null;
471
- let bestIoU = 0;
472
- for (const segment of roofSegmentStats) {
473
- const sw = (0, utils_1.latLngToPixel)(bounds, canvas, {
474
- latitude: segment.boundingBox.sw.latitude,
475
- longitude: segment.boundingBox.sw.longitude,
476
- });
477
- const ne = (0, utils_1.latLngToPixel)(bounds, canvas, {
478
- latitude: segment.boundingBox.ne.latitude,
479
- longitude: segment.boundingBox.ne.longitude,
480
- });
481
- const segmentBounds = {
482
- minX: sw.x,
483
- maxX: ne.x,
484
- minY: ne.y,
485
- maxY: sw.y,
486
- };
487
- const interLeft = Math.max(polygonBounds.minX, segmentBounds.minX);
488
- const interRight = Math.min(polygonBounds.maxX, segmentBounds.maxX);
489
- const interTop = Math.max(polygonBounds.minY, segmentBounds.minY);
490
- const interBottom = Math.min(polygonBounds.maxY, segmentBounds.maxY);
491
- const interWidth = interRight - interLeft;
492
- const interHeight = interBottom - interTop;
493
- let intersectionArea = 0;
494
- if (interWidth > 0 && interHeight > 0) {
495
- intersectionArea = interWidth * interHeight;
496
- }
497
- const polygonArea = (polygonBounds.maxX - polygonBounds.minX) *
498
- (polygonBounds.maxY - polygonBounds.minY);
499
- const segmentArea = (segmentBounds.maxX - segmentBounds.minX) *
500
- (segmentBounds.maxY - segmentBounds.minY);
501
- const unionArea = polygonArea + segmentArea - intersectionArea;
502
- const iou = unionArea > 0 ? intersectionArea / unionArea : 0;
503
- if (iou > bestIoU) {
504
- bestIoU = iou;
505
- bestSegment = segment;
506
- }
507
- }
508
- return bestSegment;
509
- }
510
-
511
- return fitting;
512
- }
513
-
514
- var hasRequiredGridMatch;
515
-
516
- function requireGridMatch () {
517
- if (hasRequiredGridMatch) return gridMatch;
518
- hasRequiredGridMatch = 1;
519
- Object.defineProperty(gridMatch, "__esModule", { value: true });
520
- gridMatch.generateGrid = generateGrid;
521
- gridMatch.solarPanelInObstacle = solarPanelInObstacle;
522
- gridMatch.solarPanelInPolygon = solarPanelInPolygon;
523
- gridMatch.isPanelObstructed = isPanelObstructed;
524
- gridMatch.getSolarPanelsInPolygon = getSolarPanelsInPolygon;
525
- gridMatch.getOptimalSolarPosition = getOptimalSolarPosition;
526
- gridMatch.insetPolygon = insetPolygon;
527
- gridMatch.getOptimalSolarPositionFully = getOptimalSolarPositionFully;
528
- const harmonia_types_1 = requireDist$1();
529
- const fitting_1 = /*@__PURE__*/ requireFitting();
530
- function generateGrid(minMax, solarPanel, horizontal, anker, rowSpacing, columnSpacing) {
531
- const grid = [];
532
- const width = horizontal ? solarPanel.heightMeters : solarPanel.widthMeters;
533
- const widthCount = Math.ceil((minMax.maxX - minMax.minX) / width);
534
- const height = horizontal
535
- ? solarPanel.widthMeters
536
- : solarPanel.heightMeters;
537
- const heightCount = Math.ceil((minMax.maxY - minMax.minY) / height);
538
- const widthOffset = width / 2;
539
- const heightOffset = height / 2;
540
- const startX = anker.x -
541
- (Math.ceil((anker.x - minMax.minX) / width) * width);
542
- const startY = anker.y -
543
- (Math.ceil((anker.y - minMax.minY) / height) * height);
544
- for (let i = 0; i < heightCount; i++) {
545
- const row = [];
546
- for (let j = 0; j < widthCount; j++) {
547
- const x = startX + j * width + j * columnSpacing + widthOffset;
548
- const y = startY + i * height + i * rowSpacing + heightOffset;
549
- const positionedSolarPanel = {
550
- panel: solarPanel,
551
- pixelPosition: new harmonia_types_1.Point(x, y),
552
- horizontal: horizontal,
553
- };
554
- row.push(positionedSolarPanel);
555
- }
556
- grid.push(row);
557
- }
558
- return grid;
559
- }
560
- function getSolarPanelLines(positionedSolarPanel, horizontal) {
561
- const width = horizontal
562
- ? positionedSolarPanel.panel.heightMeters
563
- : positionedSolarPanel.panel.widthMeters;
564
- const height = horizontal
565
- ? positionedSolarPanel.panel.widthMeters
566
- : positionedSolarPanel.panel.heightMeters;
567
- const p1 = new harmonia_types_1.Point(positionedSolarPanel.pixelPosition.x - width / 2, positionedSolarPanel.pixelPosition.y - height / 2);
568
- const p2 = new harmonia_types_1.Point(positionedSolarPanel.pixelPosition.x - width / 2, positionedSolarPanel.pixelPosition.y + height / 2);
569
- const p3 = new harmonia_types_1.Point(positionedSolarPanel.pixelPosition.x + width / 2, positionedSolarPanel.pixelPosition.y + height / 2);
570
- const p4 = new harmonia_types_1.Point(positionedSolarPanel.pixelPosition.x + width / 2, positionedSolarPanel.pixelPosition.y - height / 2);
571
- const lines = [
572
- {
573
- start: p1,
574
- end: p2,
575
- },
576
- {
577
- start: p2,
578
- end: p3,
579
- },
580
- {
581
- start: p3,
582
- end: p4,
583
- },
584
- {
585
- start: p4,
586
- end: p1,
587
- },
588
- ];
589
- return lines;
590
- }
591
- function solarPanelInObstacle(positionedSolarPanel, obstacle, horizontal) {
592
- const lines = getSolarPanelLines(positionedSolarPanel, horizontal);
593
- if ((0, harmonia_types_1.isPointInPolygon)(positionedSolarPanel.pixelPosition, obstacle)) {
594
- return true;
595
- }
596
- for (let i = 0; i < obstacle.points.length; i++) {
597
- const point = obstacle.points[i];
598
- const nextPoint = obstacle.points[(i + 1) % obstacle.points.length];
599
- const border = {
600
- start: point,
601
- end: nextPoint,
602
- };
603
- for (const line of lines) {
604
- if ((0, fitting_1.intersects)(line, border)) {
605
- return true;
606
- }
607
- }
608
- }
609
- return false;
610
- }
611
- function solarPanelInPolygon(positionedSolarPanel, polygon, horizontal) {
612
- const lines = getSolarPanelLines(positionedSolarPanel, horizontal);
613
- for (let i = 0; i < polygon.points.length; i++) {
614
- const point = polygon.points[i];
615
- const nextPoint = polygon.points[(i + 1) % polygon.points.length];
616
- const border = {
617
- start: point,
618
- end: nextPoint,
619
- };
620
- for (const line of lines) {
621
- if ((0, fitting_1.intersects)(line, border)) {
622
- return false;
623
- }
624
- }
625
- }
626
- return (0, harmonia_types_1.isPointInPolygon)(positionedSolarPanel.pixelPosition, polygon);
627
- }
628
- function isPanelObstructed(positionedSolarPanel, obstacles, horizontal) {
629
- for (const obstacle of obstacles) {
630
- if (solarPanelInObstacle(positionedSolarPanel, obstacle.polygon, horizontal)) {
631
- return true;
632
- }
633
- }
634
- return false;
635
- }
636
- function getSolarPanelsInPolygon(grid, polygon, horizontal, obstacles) {
637
- const solarPanels = [];
638
- for (const row of grid) {
639
- let newRow = [];
640
- for (const positionedSolarPanel of row) {
641
- const isObstructed = isPanelObstructed(positionedSolarPanel, obstacles, horizontal);
642
- if (solarPanelInPolygon(positionedSolarPanel, polygon, horizontal) && !isObstructed) {
643
- newRow.push(positionedSolarPanel);
644
- }
645
- }
646
- solarPanels.push(newRow);
647
- }
648
- return solarPanels;
649
- }
650
- function getOptimalSolarPosition(roof, obstacles, solarPanel, angle, columnSpacing, rowSpacing) {
651
- const minX = Math.min(...roof.points.map((p) => p.x));
652
- const maxX = Math.max(...roof.points.map((p) => p.x));
653
- const minY = Math.min(...roof.points.map((p) => p.y));
654
- const maxY = Math.max(...roof.points.map((p) => p.y));
655
- const minMax = {
656
- minX: minX,
657
- maxX: maxX,
658
- minY: minY,
659
- maxY: maxY,
660
- };
661
- Object.assign(Object.assign({}, solarPanel), { widthMeters: solarPanel.widthMeters * Math.cos(angle * Math.PI / 180), heightMeters: solarPanel.heightMeters });
662
- const verticalSolarPanel = Object.assign(Object.assign({}, solarPanel), { widthMeters: solarPanel.widthMeters, heightMeters: solarPanel.heightMeters * Math.cos(angle * Math.PI / 180) });
663
- let solarPanels = [];
664
- let numberOfPanels = 0;
665
- for (const point of roof.points) {
666
- for (const horizontal of [true]) {
667
- const grid = generateGrid(minMax, verticalSolarPanel, horizontal, point, rowSpacing, columnSpacing);
668
- const solarPanelsInPolygon = getSolarPanelsInPolygon(grid, roof, horizontal, obstacles);
669
- const numberOfPanelsInPolygon = solarPanelsInPolygon.reduce((acc, row) => acc + row.length, 0);
670
- if (numberOfPanelsInPolygon > numberOfPanels) {
671
- numberOfPanels = numberOfPanelsInPolygon;
672
- solarPanels = solarPanelsInPolygon;
673
- }
674
- }
675
- break;
676
- }
677
- return solarPanels;
678
- }
679
- function projectObstacles(obstacles, azimuth, offset, inset) {
680
- const result = [];
681
- for (const obstacle of obstacles) {
682
- const offsetObstacle = (0, fitting_1.offsetPolygon)(obstacle, offset);
683
- const projectedObstacle = (0, fitting_1.projectPolygon)(offsetObstacle.polygon, -azimuth);
684
- const insetObstacle = insetPolygon(projectedObstacle, -inset);
685
- const minX = Math.min(...insetObstacle.points.map((p) => p.x));
686
- const maxX = Math.max(...insetObstacle.points.map((p) => p.x));
687
- const minY = Math.min(...insetObstacle.points.map((p) => p.y));
688
- const maxY = Math.max(...insetObstacle.points.map((p) => p.y));
689
- const boundingBox = {
690
- minX: minX,
691
- maxX: maxX,
692
- minY: minY,
693
- maxY: maxY,
694
- };
695
- result.push({
696
- polygon: projectedObstacle,
697
- boundingBox: boundingBox,
698
- });
699
- }
700
- return result;
701
- }
702
- function isClockwise(points) {
703
- let sum = 0;
704
- for (let i = 0; i < points.length; i++) {
705
- const curr = points[i];
706
- const next = points[(i + 1) % points.length];
707
- sum += (next.x - curr.x) * (next.y + curr.y);
708
- }
709
- return sum > 0;
710
- }
711
- function insetPolygon(polygon, inset) {
712
- const points = polygon.points;
713
- const isClockwisePolygon = isClockwise(points);
714
- inset = inset * Math.sqrt(2) * (isClockwisePolygon ? -1 : 1);
715
- const insetPoints = [];
716
- for (let i = 0; i < points.length; i++) {
717
- const prev = points[(i - 1 + points.length) % points.length];
718
- const curr = points[i];
719
- const next = points[(i + 1) % points.length];
720
- const v1 = {
721
- x: curr.x - prev.x,
722
- y: curr.y - prev.y,
723
- };
724
- const v2 = {
725
- x: next.x - curr.x,
726
- y: next.y - curr.y,
727
- };
728
- const perp1 = {
729
- x: -v1.y,
730
- y: v1.x,
731
- };
732
- const perp2 = {
733
- x: -v2.y,
734
- y: v2.x,
735
- };
736
- const length1 = Math.sqrt(perp1.x * perp1.x + perp1.y * perp1.y);
737
- const length2 = Math.sqrt(perp2.x * perp2.x + perp2.y * perp2.y);
738
- perp1.x /= length1;
739
- perp1.y /= length1;
740
- perp2.x /= length2;
741
- perp2.y /= length2;
742
- const bisector = {
743
- x: perp1.x + perp2.x,
744
- y: perp1.y + perp2.y,
745
- };
746
- const bisectorLength = Math.sqrt(bisector.x * bisector.x + bisector.y * bisector.y);
747
- bisector.x /= bisectorLength;
748
- bisector.y /= bisectorLength;
749
- const insetPoint = new harmonia_types_1.Point(curr.x + bisector.x * inset, curr.y + bisector.y * inset);
750
- insetPoints.push(insetPoint);
751
- }
752
- return {
753
- points: insetPoints,
754
- type: polygon.type,
755
- closed: polygon.closed,
756
- id: polygon.id,
757
- area: polygon.area,
758
- };
759
- }
760
- function getOptimalSolarPositionFully(roof, obstacles, solarPanel, azimuth, inset, angle, columnSpacing, rowSpacing) {
761
- const insetRoof = insetPolygon(roof, inset);
762
- const offset = (0, fitting_1.offsetPolygon)(insetRoof);
763
- const projectedOffset = (0, fitting_1.projectPolygon)(offset.polygon, -azimuth);
764
- const projectedObstacles = projectObstacles(obstacles, azimuth, offset.offset, inset);
765
- const horizontalSolarPanels = getOptimalSolarPosition(projectedOffset, projectedObstacles, solarPanel, angle, columnSpacing, rowSpacing);
766
- const unprojectedPanels = [];
767
- for (const panel of horizontalSolarPanels.flat()) {
768
- const unprojectedPanel = (0, fitting_1.projectPoint)(panel.pixelPosition, azimuth);
769
- const offsetPosition = new harmonia_types_1.Point(unprojectedPanel.x + offset.offset.x, unprojectedPanel.y + offset.offset.y);
770
- unprojectedPanels.push({
771
- panel: panel.panel,
772
- pixelPosition: offsetPosition,
773
- horizontal: panel.horizontal,
774
- });
775
- }
776
- return unprojectedPanels;
777
- }
778
-
779
- return gridMatch;
780
- }
781
-
782
- var hasRequiredGeometry;
783
-
784
- function requireGeometry () {
785
- if (hasRequiredGeometry) return geometry;
786
- hasRequiredGeometry = 1;
787
- (function (exports) {
788
- var __createBinding = (geometry && geometry.__createBinding) || (Object.create ? (function(o, m, k, k2) {
789
- if (k2 === undefined) k2 = k;
790
- var desc = Object.getOwnPropertyDescriptor(m, k);
791
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
792
- desc = { enumerable: true, get: function() { return m[k]; } };
793
- }
794
- Object.defineProperty(o, k2, desc);
795
- }) : (function(o, m, k, k2) {
796
- if (k2 === undefined) k2 = k;
797
- o[k2] = m[k];
798
- }));
799
- var __exportStar = (geometry && geometry.__exportStar) || function(m, exports) {
800
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
801
- };
802
- Object.defineProperty(exports, "__esModule", { value: true });
803
- __exportStar(/*@__PURE__*/ requireGridMatch(), exports);
804
- __exportStar(/*@__PURE__*/ requireFitting(), exports);
805
-
806
- } (geometry));
807
- return geometry;
808
- }
809
-
810
- var simulation$1 = {};
811
-
812
- var simulation = {};
813
-
814
- var solarCurves = {};
815
-
816
- var hasRequiredSolarCurves;
817
-
818
- function requireSolarCurves () {
819
- if (hasRequiredSolarCurves) return solarCurves;
820
- hasRequiredSolarCurves = 1;
821
- Object.defineProperty(solarCurves, "__esModule", { value: true });
822
- solarCurves.SOLAR_RADIATION = solarCurves.CONSUMPTION_PROFILES = void 0;
823
- solarCurves.getSolarRadiation = getSolarRadiation;
824
- const SOLAR_RADIATION = [
825
- 0,
826
- 0,
827
- 0,
828
- 0,
829
- 0,
830
- 0,
831
- 0,
832
- 0.1,
833
- 0.2,
834
- 0.4,
835
- 0.8,
836
- 0.9,
837
- 1,
838
- 0.95,
839
- 0.9,
840
- 0.7,
841
- 0.5,
842
- 0.3,
843
- 0.16,
844
- 0.02,
845
- 0,
846
- 0,
847
- 0,
848
- 0,
849
- ];
850
- solarCurves.SOLAR_RADIATION = SOLAR_RADIATION;
851
- function getSolarRadiation(discountFactor) {
852
- return SOLAR_RADIATION.map((value) => value * discountFactor);
853
- }
854
- const CONSUMPTION_PROFILES = {
855
- mostly_at_home: [
856
- 0.1,
857
- 0.1,
858
- 0.1,
859
- 0.1,
860
- 0.1,
861
- 0.15,
862
- 0.23,
863
- 0.26,
864
- 0.16,
865
- 0.16,
866
- 0.15,
867
- 0.19,
868
- 0.23,
869
- 0.24,
870
- 0.35,
871
- 0.28,
872
- 0.275,
873
- 0.8,
874
- 0.78,
875
- 0.74,
876
- 0.75,
877
- 0.73,
878
- 0.26,
879
- 0.1,
880
- ],
881
- mostly_away: [
882
- 0.1,
883
- 0.1,
884
- 0.1,
885
- 0.1,
886
- 0.1,
887
- 0.15,
888
- 0.29,
889
- 0.32,
890
- 0.25,
891
- 0.15,
892
- 0.12,
893
- 0.14,
894
- 0.15,
895
- 0.12,
896
- 0.16,
897
- 0.21,
898
- 0.285,
899
- 1,
900
- 0.81,
901
- 0.77,
902
- 0.79,
903
- 0.73,
904
- 0.26,
905
- 0.1,
906
- ],
907
- };
908
- solarCurves.CONSUMPTION_PROFILES = CONSUMPTION_PROFILES;
909
-
910
- return solarCurves;
911
- }
912
-
913
- var types = {};
914
-
915
- var hasRequiredTypes;
916
-
917
- function requireTypes () {
918
- if (hasRequiredTypes) return types;
919
- hasRequiredTypes = 1;
920
- Object.defineProperty(types, "__esModule", { value: true });
921
- types.DEFAULT_GENERAL_SIMULATION_CONFIG = void 0;
922
- types.DEFAULT_GENERAL_SIMULATION_CONFIG = {
923
- simulationYears: 25,
924
- };
925
-
926
- return types;
927
- }
928
-
929
- var hasRequiredSimulation$1;
930
-
931
- function requireSimulation$1 () {
932
- if (hasRequiredSimulation$1) return simulation;
933
- hasRequiredSimulation$1 = 1;
934
- Object.defineProperty(simulation, "__esModule", { value: true });
935
- simulation.generateElectricCarChargingHours = generateElectricCarChargingHours;
936
- simulation.simulateDay = simulateDay;
937
- simulation.simulate = simulate;
938
- const solarCurves_1 = /*@__PURE__*/ requireSolarCurves();
939
- const types_1 = /*@__PURE__*/ requireTypes();
940
- function generateElectricCarChargingHours(start, end) {
941
- let hours = new Array(24).fill(false);
942
- if (start < end) {
943
- for (let i = start; i <= end; i++) {
944
- hours[i] = true;
945
- }
946
- }
947
- else {
948
- for (let i = start; i <= 24; i++) {
949
- hours[i] = true;
950
- }
951
- for (let i = 0; i <= end; i++) {
952
- hours[i] = true;
953
- }
954
- }
955
- return hours;
956
- }
957
- function simulateDay(production, consumption, dailyConsumption, battery) {
958
- let batteryCharge = 0;
959
- let soldEnergy = 0;
960
- let energyUsageOfProduction = 0;
961
- for (let hour = 0; hour < production.length; hour++) {
962
- const energyDifference = production[hour] - consumption[hour];
963
- if (energyDifference > 0) {
964
- energyUsageOfProduction += consumption[hour];
965
- if (batteryCharge < battery &&
966
- batteryCharge + energyDifference <= battery) {
967
- batteryCharge = batteryCharge + energyDifference;
968
- }
969
- else if (batteryCharge < battery) {
970
- const batteryDifference = battery - batteryCharge;
971
- batteryCharge = battery;
972
- soldEnergy += energyDifference - batteryDifference;
973
- }
974
- else {
975
- soldEnergy += energyDifference;
976
- }
977
- }
978
- else {
979
- if (batteryCharge > 0) {
980
- if (batteryCharge >= -energyDifference) {
981
- batteryCharge += energyDifference;
982
- energyUsageOfProduction += consumption[hour];
983
- }
984
- else {
985
- energyUsageOfProduction += production[hour] + batteryCharge;
986
- batteryCharge = 0;
987
- }
988
- }
989
- else {
990
- energyUsageOfProduction += production[hour];
991
- }
992
- }
993
- }
994
- if (batteryCharge > 0) {
995
- soldEnergy += batteryCharge;
996
- }
997
- const autonomy = energyUsageOfProduction / dailyConsumption;
998
- return {
999
- autonomy: autonomy > 1 ? 1 : autonomy,
1000
- soldEnergy,
1001
- energyUsageOfProduction,
1002
- };
1003
- }
1004
- function simulate(config) {
1005
- const generalConfig = Object.assign(Object.assign({}, types_1.DEFAULT_GENERAL_SIMULATION_CONFIG), config.general);
1006
- const consumption = solarCurves_1.CONSUMPTION_PROFILES[config.householdConsumption.consumptionProfile];
1007
- const norm = consumption.reduce((acc, curr) => acc + curr, 0);
1008
- let additionalConsumption = 0;
1009
- if (config.heatPump) {
1010
- additionalConsumption =
1011
- (config.heatPump.m2 || 0) * config.heatPump.consumptionPerM2 || 0;
1012
- }
1013
- let electricCarConsumption = 0;
1014
- let electricCarNorm = 1;
1015
- let electricCarChargingHours = consumption.map((_) => false);
1016
- if (config.electricCar) {
1017
- electricCarChargingHours = config.electricCar.chargingHours;
1018
- const dailyCarUsage = config.electricCar.averageKilometersPerDay / 100 *
1019
- config.electricCar.consumptionkWhPer100km;
1020
- electricCarConsumption = Math.min(dailyCarUsage, config.electricCar.batteryKWh);
1021
- electricCarNorm = config.electricCar.chargingHours.reduce((acc, curr) => acc + (curr ? 1 : 0), 0);
1022
- if (electricCarNorm === 0) {
1023
- electricCarNorm = 1;
1024
- }
1025
- }
1026
- let systemSize = 0;
1027
- if (config.solarSystems) {
1028
- systemSize = Object.values(config.solarSystems).reduce((acc, curr) => {
1029
- return acc + curr.numberOfPanels * curr.panelType.kWattPeak;
1030
- }, 0);
1031
- }
1032
- else if (config.solarSystem) {
1033
- console.warn("solarSystem is deprecated, use solarSystems instead");
1034
- systemSize = config.solarSystem.numberOfPanels *
1035
- config.solarSystem.panelType.kWattPeak;
1036
- }
1037
- else {
1038
- throw new Error("No solar system found");
1039
- }
1040
- const summerProduction = (0, solarCurves_1.getSolarRadiation)(config.solarRadiation.summerFactor * systemSize);
1041
- const winterProduction = (0, solarCurves_1.getSolarRadiation)(config.solarRadiation.winterFactor * systemSize);
1042
- const summerConsumptionWholeDay = config.householdConsumption.averageConsumption *
1043
- config.householdConsumption.summerConsumptionFactor +
1044
- additionalConsumption *
1045
- config.householdConsumption.summerConsumptionFactor;
1046
- const summerConsumptionDaily = consumption.map((c, i) => c / norm * summerConsumptionWholeDay +
1047
- electricCarConsumption / electricCarNorm *
1048
- (electricCarChargingHours[i] ? 1 : 0));
1049
- const winterConsumptionWholeDay = config.householdConsumption.averageConsumption *
1050
- config.householdConsumption.winterConsumptionFactor +
1051
- additionalConsumption *
1052
- config.householdConsumption.winterConsumptionFactor;
1053
- const winterConsumptionDaily = consumption.map((c, i) => c / norm * winterConsumptionWholeDay +
1054
- electricCarConsumption / electricCarNorm *
1055
- (electricCarChargingHours[i] ? 1 : 0));
1056
- const summerDay = simulateDay(summerProduction, summerConsumptionDaily, summerConsumptionWholeDay + electricCarConsumption, config.batteryKWh);
1057
- const winterDay = simulateDay(winterProduction, winterConsumptionDaily, winterConsumptionWholeDay + electricCarConsumption, config.batteryKWh);
1058
- let savedCostsByYear = [];
1059
- const soldEnergy = (summerDay.soldEnergy + winterDay.soldEnergy) / 2;
1060
- const ownConsumption = (summerDay.energyUsageOfProduction +
1061
- winterDay.energyUsageOfProduction) / 2;
1062
- let energyPrice = config.electricityPrice.purchase;
1063
- for (let i = 0; i < generalConfig.simulationYears; i++) {
1064
- const savedCostsThisYear = ownConsumption * energyPrice * 365;
1065
- savedCostsByYear.push(savedCostsThisYear);
1066
- energyPrice = (1 + config.electricityPrice.increase) * energyPrice;
1067
- }
1068
- const totalEnergyProduction = (summerProduction.reduce((acc, curr) => acc + curr, 0) +
1069
- winterProduction.reduce((acc, curr) => acc + curr, 0)) / 2;
1070
- return {
1071
- autonomy: (summerDay.autonomy + winterDay.autonomy) / 2,
1072
- compensationPerDay: soldEnergy * config.electricityPrice.sell,
1073
- byYearSavedCosts: savedCostsByYear,
1074
- totalEnergyConsumptionDay: (summerConsumptionWholeDay + winterConsumptionWholeDay) / 2 +
1075
- electricCarConsumption,
1076
- totalEnergyProduction,
1077
- };
1078
- }
1079
-
1080
- return simulation;
1081
- }
1082
-
1083
- var heatingSimulation = {};
1084
-
1085
- var heatingConstants = {};
1086
-
1087
- var hasRequiredHeatingConstants;
1088
-
1089
- function requireHeatingConstants () {
1090
- if (hasRequiredHeatingConstants) return heatingConstants;
1091
- hasRequiredHeatingConstants = 1;
1092
- Object.defineProperty(heatingConstants, "__esModule", { value: true });
1093
- heatingConstants.SYSTEM_EFFICIENCY = heatingConstants.INSULATION_FACTORS = heatingConstants.EQUIPMENT_COSTS = heatingConstants.DISTRIBUTION_EFFICIENCY = heatingConstants.DISTRIBUTION_COSTS = heatingConstants.CO2_EMISSIONS = heatingConstants.CLIMATE_DATA = void 0;
1094
- const CLIMATE_DATA = {
1095
- "Zone 1": { heatingDegreeHours: 1200, coolingDegreeHours: 2800 },
1096
- "Zone 2": { heatingDegreeHours: 1800, coolingDegreeHours: 2200 },
1097
- "Zone 3": { heatingDegreeHours: 2400, coolingDegreeHours: 1800 },
1098
- "Zone 4": { heatingDegreeHours: 3200, coolingDegreeHours: 1400 },
1099
- "Zone 5": { heatingDegreeHours: 4200, coolingDegreeHours: 1000 },
1100
- "Zone 6": { heatingDegreeHours: 5400, coolingDegreeHours: 600 },
1101
- "Zone 7": { heatingDegreeHours: 6800, coolingDegreeHours: 300 },
1102
- "Zone 8": { heatingDegreeHours: 8400, coolingDegreeHours: 100 },
1103
- };
1104
- heatingConstants.CLIMATE_DATA = CLIMATE_DATA;
1105
- const INSULATION_FACTORS = {
1106
- poor: 1.4,
1107
- fair: 1.2,
1108
- good: 1.0,
1109
- excellent: 0.8,
1110
- };
1111
- heatingConstants.INSULATION_FACTORS = INSULATION_FACTORS;
1112
- const CO2_EMISSIONS = {
1113
- electricity: 0.855,
1114
- gas: 11.7,
1115
- oil: 22.4,
1116
- };
1117
- heatingConstants.CO2_EMISSIONS = CO2_EMISSIONS;
1118
- const SYSTEM_EFFICIENCY = {
1119
- "heat-pump": { heating: 3.2, cooling: 16 },
1120
- "electric": { heating: 1.0, cooling: 0 },
1121
- "gas": { heating: 0.85, cooling: 0 },
1122
- "oil": { heating: 0.8, cooling: 0 },
1123
- "split-ac": { heating: 2.8, cooling: 14 },
1124
- "central-ac": { heating: 0, cooling: 13 },
1125
- };
1126
- heatingConstants.SYSTEM_EFFICIENCY = SYSTEM_EFFICIENCY;
1127
- const DISTRIBUTION_EFFICIENCY = {
1128
- "central-air": 0.85,
1129
- "radiators": 0.9,
1130
- "radiant-floor": 0.95,
1131
- "radiant-ceiling": 0.92,
1132
- };
1133
- heatingConstants.DISTRIBUTION_EFFICIENCY = DISTRIBUTION_EFFICIENCY;
1134
- const EQUIPMENT_COSTS = {
1135
- "heat-pump": { base: 8000, perSqFt: 3 },
1136
- "electric": { base: 2000, perSqFt: 1 },
1137
- "gas": { base: 4000, perSqFt: 2 },
1138
- "oil": { base: 5000, perSqFt: 2.5 },
1139
- "split-ac": { base: 6000, perSqFt: 2.5 },
1140
- "central-ac": { base: 7000, perSqFt: 3 },
1141
- };
1142
- heatingConstants.EQUIPMENT_COSTS = EQUIPMENT_COSTS;
1143
- const DISTRIBUTION_COSTS = {
1144
- "central-air": { base: 3000, perSqFt: 2 },
1145
- "radiators": { base: 4000, perSqFt: 3 },
1146
- "radiant-floor": { base: 8000, perSqFt: 6 },
1147
- "radiant-ceiling": { base: 6000, perSqFt: 4 },
1148
- };
1149
- heatingConstants.DISTRIBUTION_COSTS = DISTRIBUTION_COSTS;
1150
-
1151
- return heatingConstants;
1152
- }
1153
-
1154
- var hasRequiredHeatingSimulation;
1155
-
1156
- function requireHeatingSimulation () {
1157
- if (hasRequiredHeatingSimulation) return heatingSimulation;
1158
- hasRequiredHeatingSimulation = 1;
1159
- Object.defineProperty(heatingSimulation, "__esModule", { value: true });
1160
- heatingSimulation.houseSchema = heatingSimulation.locationSchema = void 0;
1161
- heatingSimulation.calculateHeatingSystemComparison = calculateHeatingSystemComparison;
1162
- heatingSimulation.getDefaultUtilityRates = getDefaultUtilityRates;
1163
- const heatingConstants_1 = /*@__PURE__*/ requireHeatingConstants();
1164
- function calculateHeatLoss(house, location) {
1165
- const climateData = heatingConstants_1.CLIMATE_DATA["Zone 1"];
1166
- const baseHeatLoss = house.size * 30;
1167
- const insulationFactor = heatingConstants_1.INSULATION_FACTORS[house.insulationLevel];
1168
- const sharedWallFactor = 1;
1169
- return baseHeatLoss * insulationFactor * sharedWallFactor *
1170
- ((climateData === null || climateData === void 0 ? void 0 : climateData.heatingDegreeHours) || 3000) / 3000;
1171
- }
1172
- function calculateCoolingLoad(house, location) {
1173
- const climateData = heatingConstants_1.CLIMATE_DATA["Zone 1"];
1174
- const baseCoolingLoad = house.size * 25;
1175
- const insulationFactor = heatingConstants_1.INSULATION_FACTORS[house.insulationLevel];
1176
- return baseCoolingLoad * insulationFactor *
1177
- ((climateData === null || climateData === void 0 ? void 0 : climateData.coolingDegreeHours) || 1500) / 1500;
1178
- }
1179
- function calculateEnergyConsumption(heatLoss, coolingLoad, system, hours) {
1180
- const systemEff = heatingConstants_1.SYSTEM_EFFICIENCY[system.type];
1181
- const distEff = heatingConstants_1.DISTRIBUTION_EFFICIENCY[system.distribution];
1182
- const heatingEnergy = (heatLoss * hours) /
1183
- (systemEff.heating * distEff * 3412);
1184
- const coolingEnergy = (coolingLoad * hours) /
1185
- (systemEff.cooling * distEff * 3412);
1186
- return { heating: heatingEnergy, cooling: coolingEnergy };
1187
- }
1188
- function calculateCosts(energy, system, rates) {
1189
- let cost = 0;
1190
- if (system.type === "heat-pump" || system.type === "electric" ||
1191
- system.type === "split-ac" || system.type === "central-ac") {
1192
- cost = (energy.heating + energy.cooling) * rates.electricity;
1193
- }
1194
- else if (system.type === "gas") {
1195
- cost = (energy.heating * 3412 / 100000) * rates.gas +
1196
- energy.cooling * rates.electricity;
1197
- }
1198
- else if (system.type === "oil") {
1199
- cost = (energy.heating * 3412 / 138690) * rates.oil +
1200
- energy.cooling * rates.electricity;
1201
- }
1202
- return cost;
1203
- }
1204
- function calculateCO2Emissions(energy, system) {
1205
- let emissions = 0;
1206
- if (system.type === "heat-pump" || system.type === "electric" ||
1207
- system.type === "split-ac" || system.type === "central-ac") {
1208
- emissions = (energy.heating + energy.cooling) *
1209
- heatingConstants_1.CO2_EMISSIONS.electricity;
1210
- }
1211
- else if (system.type === "gas") {
1212
- emissions = (energy.heating * 3412 / 100000) * heatingConstants_1.CO2_EMISSIONS.gas +
1213
- energy.cooling * heatingConstants_1.CO2_EMISSIONS.electricity;
1214
- }
1215
- else if (system.type === "oil") {
1216
- emissions = (energy.heating * 3412 / 138690) * heatingConstants_1.CO2_EMISSIONS.oil +
1217
- energy.cooling * heatingConstants_1.CO2_EMISSIONS.electricity;
1218
- }
1219
- return emissions;
1220
- }
1221
- function calculateSystemCosts(system, house) {
1222
- const equipmentCost = heatingConstants_1.EQUIPMENT_COSTS[system.type];
1223
- const distributionCost = heatingConstants_1.DISTRIBUTION_COSTS[system.distribution];
1224
- const equipment = equipmentCost.base + (equipmentCost.perSqFt * house.size);
1225
- const distribution = distributionCost.base +
1226
- (distributionCost.perSqFt * house.size);
1227
- const installation = (equipment + distribution) * 0.3;
1228
- return {
1229
- equipment: equipment + distribution,
1230
- installation,
1231
- total: equipment + distribution + installation,
1232
- };
1233
- }
1234
- function calculateHeatingSystemComparison(input) {
1235
- const heatLoss = calculateHeatLoss(input.house);
1236
- const coolingLoad = calculateCoolingLoad(input.house);
1237
- const operatingHours = 2000;
1238
- const currentEnergy = calculateEnergyConsumption(heatLoss, coolingLoad, input.currentSystem, operatingHours);
1239
- const currentCost = calculateCosts(currentEnergy, input.currentSystem, input.utilityRates);
1240
- const currentCO2 = calculateCO2Emissions(currentEnergy, input.currentSystem);
1241
- const proposedEnergy = calculateEnergyConsumption(heatLoss, coolingLoad, input.proposedSystem, operatingHours);
1242
- const proposedCost = calculateCosts(proposedEnergy, input.proposedSystem, input.utilityRates);
1243
- const proposedCO2 = calculateCO2Emissions(proposedEnergy, input.proposedSystem);
1244
- const systemCosts = calculateSystemCosts(input.proposedSystem, input.house);
1245
- const totalCurrentEnergy = currentEnergy.heating + currentEnergy.cooling;
1246
- const totalProposedEnergy = proposedEnergy.heating + proposedEnergy.cooling;
1247
- const energySavings = totalCurrentEnergy - totalProposedEnergy;
1248
- const costSavings = currentCost - proposedCost;
1249
- const co2Savings = currentCO2 - proposedCO2;
1250
- const paybackPeriod = costSavings > 0
1251
- ? systemCosts.total / costSavings
1252
- : Infinity;
1253
- return {
1254
- energySavings: {
1255
- annual: energySavings,
1256
- percentage: (energySavings / totalCurrentEnergy) * 100,
1257
- },
1258
- co2Savings: {
1259
- annual: co2Savings,
1260
- percentage: (co2Savings / currentCO2) * 100,
1261
- },
1262
- costSavings: {
1263
- annual: costSavings,
1264
- monthlyAverage: costSavings / 12,
1265
- percentage: (costSavings / currentCost) * 100,
1266
- },
1267
- newSystemCosts: {
1268
- equipment: systemCosts.equipment,
1269
- installation: systemCosts.installation,
1270
- total: systemCosts.total,
1271
- paybackPeriod,
1272
- },
1273
- efficiency: {
1274
- current: heatingConstants_1.SYSTEM_EFFICIENCY[input.currentSystem.type].heating,
1275
- proposed: heatingConstants_1.SYSTEM_EFFICIENCY[input.proposedSystem.type].heating,
1276
- improvement: ((heatingConstants_1.SYSTEM_EFFICIENCY[input.proposedSystem.type].heating -
1277
- heatingConstants_1.SYSTEM_EFFICIENCY[input.currentSystem.type].heating) /
1278
- heatingConstants_1.SYSTEM_EFFICIENCY[input.currentSystem.type].heating) * 100,
1279
- },
1280
- };
1281
- }
1282
- function getDefaultUtilityRates(location) {
1283
- const stateRates = {
1284
- "CA": { electricity: 0.28, gas: 1.15, oil: 3.20 },
1285
- "NY": { electricity: 0.20, gas: 1.05, oil: 3.10 },
1286
- "TX": { electricity: 0.12, gas: 0.95, oil: 2.90 },
1287
- "FL": { electricity: 0.14, gas: 1.20, oil: 3.00 },
1288
- };
1289
- return stateRates[location.address] ||
1290
- { electricity: 0.16, gas: 1.00, oil: 3.00 };
1291
- }
1292
- heatingSimulation.locationSchema = {
1293
- city: (value) => value.length > 0 ? null : "City is required",
1294
- state: (value) => value.length > 0 ? null : "State is required",
1295
- climateZone: (value) => Object.keys(heatingConstants_1.CLIMATE_DATA).includes(value)
1296
- ? null
1297
- : "Invalid climate zone",
1298
- };
1299
- heatingSimulation.houseSchema = {
1300
- size: (value) => value > 0 && value < 50000
1301
- ? null
1302
- : "House size must be between 1 and 50,000 sq ft",
1303
- sharedWalls: (value) => value >= 0 && value <= 4
1304
- ? null
1305
- : "Shared walls must be between 0 and 4",
1306
- };
1307
-
1308
- return heatingSimulation;
1309
- }
1310
-
1311
- var hasRequiredSimulation;
1312
-
1313
- function requireSimulation () {
1314
- if (hasRequiredSimulation) return simulation$1;
1315
- hasRequiredSimulation = 1;
1316
- (function (exports) {
1317
- var __createBinding = (simulation$1 && simulation$1.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1318
- if (k2 === undefined) k2 = k;
1319
- var desc = Object.getOwnPropertyDescriptor(m, k);
1320
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1321
- desc = { enumerable: true, get: function() { return m[k]; } };
1322
- }
1323
- Object.defineProperty(o, k2, desc);
1324
- }) : (function(o, m, k, k2) {
1325
- if (k2 === undefined) k2 = k;
1326
- o[k2] = m[k];
1327
- }));
1328
- var __exportStar = (simulation$1 && simulation$1.__exportStar) || function(m, exports) {
1329
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1330
- };
1331
- Object.defineProperty(exports, "__esModule", { value: true });
1332
- __exportStar(/*@__PURE__*/ requireSimulation$1(), exports);
1333
- __exportStar(/*@__PURE__*/ requireTypes(), exports);
1334
- __exportStar(/*@__PURE__*/ requireHeatingSimulation(), exports);
1335
-
1336
- } (simulation$1));
1337
- return simulation$1;
1338
- }
1339
-
1340
- var hasRequiredDist;
1341
-
1342
- function requireDist () {
1343
- if (hasRequiredDist) return dist$1;
1344
- hasRequiredDist = 1;
1345
- (function (exports) {
1346
- var __createBinding = (dist$1 && dist$1.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1347
- if (k2 === undefined) k2 = k;
1348
- var desc = Object.getOwnPropertyDescriptor(m, k);
1349
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1350
- desc = { enumerable: true, get: function() { return m[k]; } };
1351
- }
1352
- Object.defineProperty(o, k2, desc);
1353
- }) : (function(o, m, k, k2) {
1354
- if (k2 === undefined) k2 = k;
1355
- o[k2] = m[k];
1356
- }));
1357
- var __exportStar = (dist$1 && dist$1.__exportStar) || function(m, exports) {
1358
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1359
- };
1360
- Object.defineProperty(exports, "__esModule", { value: true });
1361
- __exportStar(/*@__PURE__*/ requireGeometry(), exports);
1362
- __exportStar(/*@__PURE__*/ requireUtils(), exports);
1363
- __exportStar(/*@__PURE__*/ requireSimulation(), exports);
1364
-
1365
- } (dist$1));
1366
- return dist$1;
1367
- }
1368
-
1369
- var distExports = /*@__PURE__*/ requireDist();
1370
-
1371
- const DEFAULT_SOLAR_EXPERT_CONFIG = {
1372
- openRoofColor: "#d6eeff",
1373
- closedRoofColor: "#ffffff",
1374
- openObstructionColor: "#f57242",
1375
- closedObstructionColor: "rgba(255, 132, 107, 0.8)",
1376
- roofPolygonFillColor: "rgba(92, 187, 255, 0.5)",
1377
- obstructionPolygonFillColor: "rgba(255, 132, 107, 0.5)",
1378
- roofPolygonHoverFillColor: "rgba(92, 187, 255, 0.8)",
1379
- obstructionPolygonHoverFillColor: "rgba(255, 132, 107, 0.8)",
1380
- roofPolygonSelectedFillColor: "rgba(92, 187, 255, 0.7)",
1381
- obstructionPolygonSelectedFillColor: "rgba(255, 132, 107, 0.7)",
1382
- highlightColor: "rgba(0, 89, 255, 1)",
1383
- };
1384
- const DEFAULT_SOLAR_PANEL_TYPE = {
1385
- widthMeters: 1.134,
1386
- heightMeters: 1.762,
1387
- kWattPeak: 0.455,
1388
- efficiency: 0.224,
1389
- price: 77.68,
1390
- };
1391
- const DEFAULT_COLOR_SCHEME = {
1392
- primary: "hsl(41 51% 90%)",
1393
- primaryForeground: "hsl(0 0% 0%)",
1394
- secondary: "hsl(28 100% 8%)",
1395
- secondaryForeground: "hsl(0 0% 100%)",
1396
- tertiary: "hsl(28 100% 29%)",
1397
- tertiaryForeground: "hsl(0 0% 100%)",
1398
- muted: "hsl(0 0% 100%)",
1399
- mutedForeground: "hsl(0 0% 0%)",
1400
- error: "hsl(0 100% 50%)",
1401
- errorForeground: "hsl(0 0% 100%)",
1402
- // Surface colors
1403
- surface: "hsl(0 0% 88%)", // gray-200
1404
- surfaceHover: "hsl(0 0% 82%)", // gray-300
1405
- surfaceActive: "hsl(0 0% 64%)", // gray-400
1406
- // Text colors
1407
- textMuted: "hsl(0 0% 45%)", // gray-600
1408
- textSecondary: "hsl(0 0% 55%)", // gray-500
1409
- textPlaceholder: "hsl(0 0% 73%)", // gray-400
1410
- // Border colors
1411
- border: "hsl(0 0% 82%)", // gray-300
1412
- borderLight: "hsl(0 0% 93%)", // gray-200
1413
- // Status colors
1414
- success: "hsl(142 76% 36%)", // green-600
1415
- info: "hsl(221 83% 53%)", // blue-500
1416
- // Interactive colors
1417
- hover: "hsl(0 0% 88%)", // gray-200
1418
- hoverDark: "hsl(28 100% 8%)", // darker secondary for hover
1419
- overlay: "rgba(0, 0, 0, 0.24)", // #0000003c
1420
- tooltip: "hsl(0 0% 13%)", // gray-800
1421
- };
1422
-
1423
- const BORDER_INSET = 0;
1424
- const HEAT_PUMP_CONSUMPTION = 46; // kWh per m² per year
1425
-
1426
- async function sendLeadToNexvoro(leadData) {
1427
- try {
1428
- const extradata = {
1429
- leadtype: "A-lead",
1430
- phase: "10 Anbahnung",
1431
- title: `${leadData.client.name}/solarExpert`,
1432
- extradata: leadData,
1433
- };
1434
- const formData = new FormData();
1435
- formData.append("md", "81.87.84.89.90.");
1436
- formData.append("token", "rdwetayarqzwtdsqystyraa");
1437
- formData.append("type", "new");
1438
- formData.append("data", "lead");
1439
- formData.append("values", JSON.stringify(extradata));
1440
- // Build the URL
1441
- const baseUrl = "https://workspace.nexvoro.cloud/exchange/extevent";
1442
- const url = baseUrl;
1443
- // Send the request with FormData to avoid CORS preflight
1444
- const response = await fetch(url, {
1445
- method: "POST",
1446
- body: formData,
1447
- // No custom headers to avoid preflight request
1448
- });
1449
- if (!response.ok) {
1450
- const errorText = await response.text();
1451
- console.error("Error sending lead to Nexvoro:", response.status, errorText);
1452
- throw new Error(`HTTP error! status: ${response.status}, body: ${errorText}`);
1453
- }
1454
- const result = await response.text();
1455
- console.log("result", result);
1456
- // Check if the response contains a lead ID (successful creation)
1457
- if (result.includes("ERROR")) {
1458
- return {
1459
- success: false,
1460
- message: "Lead not created",
1461
- leadId: result,
1462
- };
1463
- }
1464
- else {
1465
- return {
1466
- success: true,
1467
- message: "Lead submitted successfully",
1468
- leadId: undefined,
1469
- };
1470
- }
1471
- }
1472
- catch (error) {
1473
- console.error("Error sending lead to Nexvoro:", error);
1474
- return {
1475
- success: false,
1476
- message: error instanceof Error
1477
- ? error.message
1478
- : "Unknown error occurred",
1479
- };
1480
- }
1481
- }
1482
-
1483
- 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-red-100: oklch(93.6% 0.032 17.717);\n --color-red-300: oklch(80.8% 0.114 19.571);\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-red-700: oklch(50.5% 0.213 27.518);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-md: 28rem;\n --container-2xl: 42rem;\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-lg: 0.5rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\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 .bottom-4 {\n bottom: calc(var(--spacing) * 4);\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .container {\n width: 100%;\n @media (width >= 40rem) {\n max-width: 40rem;\n }\n @media (width >= 48rem) {\n max-width: 48rem;\n }\n @media (width >= 64rem) {\n max-width: 64rem;\n }\n @media (width >= 80rem) {\n max-width: 80rem;\n }\n @media (width >= 96rem) {\n max-width: 96rem;\n }\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 .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-64 {\n height: calc(var(--spacing) * 64);\n }\n .h-\\[400px\\] {\n height: 400px;\n }\n .h-full {\n height: 100%;\n }\n .max-h-full {\n max-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-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .max-w-md {\n max-width: var(--container-md);\n }\n .flex-1 {\n flex: 1;\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .translate-y-0 {\n --tw-translate-y: calc(var(--spacing) * 0);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .translate-y-2 {\n --tw-translate-y: calc(var(--spacing) * 2);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .scale-95 {\n --tw-scale-x: 95%;\n --tw-scale-y: 95%;\n --tw-scale-z: 95%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n .scale-100 {\n --tw-scale-x: 100%;\n --tw-scale-y: 100%;\n --tw-scale-z: 100%;\n scale: var(--tw-scale-x) var(--tw-scale-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 .cursor-not-allowed {\n cursor: not-allowed;\n }\n .resize {\n resize: both;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\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 .overflow-hidden {\n overflow: hidden;\n }\n .overflow-y-auto {\n overflow-y: auto;\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 .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\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-current {\n border-color: currentcolor;\n }\n .border-error\\/20 {\n border-color: color-mix(in srgb, hsl(0 100% 50%) 20%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--color-error) 20%, transparent);\n }\n }\n .border-info\\/20 {\n border-color: color-mix(in srgb, hsl(221 83% 53%) 20%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--color-info) 20%, transparent);\n }\n }\n .border-red-300 {\n border-color: var(--color-red-300);\n }\n .border-secondary {\n border-color: var(--color-secondary);\n }\n .border-success\\/20 {\n border-color: color-mix(in srgb, hsl(142 76% 36%) 20%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--color-success) 20%, transparent);\n }\n }\n .border-t-transparent {\n border-top-color: transparent;\n }\n .bg-black {\n background-color: var(--color-black);\n }\n .bg-error\\/10 {\n background-color: color-mix(in srgb, hsl(0 100% 50%) 10%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-error) 10%, transparent);\n }\n }\n .bg-error\\/90 {\n background-color: color-mix(in srgb, hsl(0 100% 50%) 90%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-error) 90%, transparent);\n }\n }\n .bg-info\\/90 {\n background-color: color-mix(in srgb, hsl(221 83% 53%) 90%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-info) 90%, transparent);\n }\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-red-100 {\n background-color: var(--color-red-100);\n }\n .bg-secondary {\n background-color: var(--color-secondary);\n }\n .bg-success\\/10 {\n background-color: color-mix(in srgb, hsl(142 76% 36%) 10%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-success) 10%, transparent);\n }\n }\n .bg-success\\/90 {\n background-color: color-mix(in srgb, hsl(142 76% 36%) 90%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-success) 90%, transparent);\n }\n }\n .bg-surface {\n background-color: var(--color-surface);\n }\n .bg-tertiary {\n background-color: var(--color-tertiary);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .object-contain {\n object-fit: contain;\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 .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .pt-3 {\n padding-top: calc(var(--spacing) * 3);\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-3 {\n padding-right: calc(var(--spacing) * 3);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-2 {\n padding-bottom: calc(var(--spacing) * 2);\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-3 {\n padding-left: calc(var(--spacing) * 3);\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-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-error-foreground {\n color: var(--color-error-foreground);\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-red-500 {\n color: var(--color-red-500);\n }\n .text-red-700 {\n color: var(--color-red-700);\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-secondary {\n color: var(--color-text-secondary);\n }\n .text-white {\n color: var(--color-white);\n }\n .accent-tertiary {\n accent-color: var(--color-tertiary);\n }\n .opacity-0 {\n opacity: 0%;\n }\n .opacity-100 {\n opacity: 100%;\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 .shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px 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 .transition {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\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 .duration-300 {\n --tw-duration: 300ms;\n transition-duration: 300ms;\n }\n .ease-in-out {\n --tw-ease: var(--ease-in-out);\n transition-timing-function: var(--ease-in-out);\n }\n .hover\\:bg-hover {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-hover);\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\\/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-tertiary\\/80 {\n &:hover {\n @media (hover: hover) {\n background-color: color-mix(in srgb, hsl(28 100% 29%) 80%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-tertiary) 80%, transparent);\n }\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 .focus\\:border-2 {\n &:focus {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n }\n .focus\\:border-secondary {\n &:focus {\n border-color: var(--color-secondary);\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-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\\:mt-0 {\n @media (width >= 40rem) {\n margin-top: calc(var(--spacing) * 0);\n }\n }\n .sm\\:flex-3 {\n @media (width >= 40rem) {\n flex: 3;\n }\n }\n .sm\\:flex-row {\n @media (width >= 40rem) {\n flex-direction: row;\n }\n }\n .sm\\:items-center {\n @media (width >= 40rem) {\n align-items: center;\n }\n }\n .sm\\:gap-4 {\n @media (width >= 40rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n .md\\:grid-cols-2 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n }\n .md\\:pl-2 {\n @media (width >= 48rem) {\n padding-left: calc(var(--spacing) * 2);\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-scale-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\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-duration {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ease {\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-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\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-duration: initial;\n --tw-ease: initial;\n }\n }\n}\n";
1484
-
1485
- const SolarSystemForm = /*@__PURE__*/ proxyCustomElement(class SolarSystemForm extends H {
1486
- constructor() {
1487
- super();
1488
- this.__registerHost();
1489
- }
1490
- systemConfigs = {};
1491
- polygons = [];
1492
- roofCanvas;
1493
- polygonCanvas;
1494
- householdConsumption = 4500;
1495
- consumptionProfile = "mostly_at_home";
1496
- electricityPrice = 0.3;
1497
- compensationRate = 0.07;
1498
- annualPriceIncrease = 2;
1499
- autonomy = 0;
1500
- costSavings = 0;
1501
- numberOfPanels = 5;
1502
- panelPeakPower = 0.4; // kW per panel
1503
- name = "";
1504
- email = "";
1505
- phone = "";
1506
- nameError = "";
1507
- emailError = "";
1508
- phoneError = "";
1509
- electricCar = false;
1510
- electricCarChargingTime = "day";
1511
- heatPump = 0;
1512
- battery = 0;
1513
- batteryEnabled = false;
1514
- compensation20Years = 0;
1515
- savedCosts20Years = 0;
1516
- maxPanels = 5;
1517
- kmDrivenPerYear = 10000;
1518
- totalEnergyConsumption = 4500;
1519
- totalEnergyProduction = 0;
1520
- isSubmitting = false;
1521
- submitMessage = "";
1522
- submitSuccess = false;
1523
- updateSystemConfigs() {
1524
- if (Object.keys(this.systemConfigs).length === 0) {
1525
- this.numberOfPanels = 0;
1526
- this.maxPanels = 0;
1527
- return;
1528
- }
1529
- this.numberOfPanels = Object.keys(this.systemConfigs).reduce((acc, curr) => acc + this.systemConfigs[curr].numberOfPanels, 0);
1530
- this.maxPanels = Object.keys(this.systemConfigs).reduce((acc, curr) => acc + this.systemConfigs[curr].numberOfPanels, 0);
1531
- this.panelPeakPower = Object.entries(this.systemConfigs)[0][1][0]
1532
- ?.panel.kWattPeak ?? 0.44;
1533
- this.recalculate();
1534
- }
1535
- formatEuropeanNumber(num, decimals = 2) {
1536
- const fixed = num.toFixed(decimals);
1537
- const [integerPart, decimalPart] = fixed.split(".");
1538
- // Add dots as thousands separators
1539
- const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
1540
- // Join with comma as decimal separator
1541
- return decimalPart
1542
- ? `${formattedInteger},${decimalPart}`
1543
- : formattedInteger;
1544
- }
1545
- recalculate() {
1546
- const currentSystemConfigs = {};
1547
- let totalNumberOfPanels = 0;
1548
- for (const [key, value] of Object.entries(this.systemConfigs)) {
1549
- if (totalNumberOfPanels >= this.numberOfPanels) {
1550
- break;
1551
- }
1552
- if (value.numberOfPanels + totalNumberOfPanels > this.numberOfPanels) {
1553
- currentSystemConfigs[key] = {
1554
- ...value,
1555
- numberOfPanels: this.numberOfPanels - totalNumberOfPanels,
1556
- };
1557
- totalNumberOfPanels = this.numberOfPanels;
1558
- }
1559
- else {
1560
- currentSystemConfigs[key] = value;
1561
- totalNumberOfPanels += value.numberOfPanels;
1562
- }
1563
- }
1564
- const simulationConfig = {
1565
- general: {
1566
- simulationYears: 20,
1567
- },
1568
- householdConsumption: {
1569
- consumptionProfile: this.consumptionProfile,
1570
- winterConsumptionFactor: 1.4,
1571
- summerConsumptionFactor: 0.6,
1572
- averageConsumption: this.householdConsumption / 365,
1573
- },
1574
- electricityPrice: {
1575
- purchase: this.electricityPrice,
1576
- sell: this.compensationRate,
1577
- increase: this.annualPriceIncrease / 100,
1578
- },
1579
- solarSystems: currentSystemConfigs,
1580
- batteryKWh: this.battery,
1581
- solarRadiation: {
1582
- winterFactor: 0.2,
1583
- summerFactor: 0.6,
1584
- },
1585
- heatPump: {
1586
- m2: this.heatPump,
1587
- consumptionPerM2: HEAT_PUMP_CONSUMPTION / 365,
1588
- },
1589
- electricCar: this.electricCar
1590
- ? {
1591
- averageKilometersPerDay: this.kmDrivenPerYear / 365,
1592
- consumptionkWhPer100km: 20,
1593
- batteryKWh: 80,
1594
- chargingHours: this.electricCarChargingTime === "day"
1595
- ? distExports.generateElectricCarChargingHours(6, 18)
1596
- : distExports.generateElectricCarChargingHours(18, 6),
1597
- }
1598
- : undefined,
1599
- };
1600
- const result = distExports.simulate(simulationConfig);
1601
- this.compensation20Years = result.compensationPerDay * 365 * 20;
1602
- this.savedCosts20Years = result.byYearSavedCosts.reduce((acc, curr) => acc + curr, 0) + this.compensation20Years;
1603
- this.costSavings = result.byYearSavedCosts[0];
1604
- this.autonomy = result.autonomy * 100;
1605
- this.totalEnergyConsumption = result.totalEnergyConsumptionDay * 365;
1606
- // Calculate total energy production based on compensation and rate
1607
- this.totalEnergyProduction = result.totalEnergyProduction * 365;
1608
- }
1609
- componentWillLoad() {
1610
- this.updateSystemConfigs();
1611
- }
1612
- validateForm() {
1613
- let isValid = true;
1614
- const t = getLanguageStrings(state.settings.language);
1615
- // Validate name
1616
- if (!this.name.trim()) {
1617
- this.nameError = t.solarSystemForm.nameError;
1618
- isValid = false;
1619
- }
1620
- else {
1621
- this.nameError = "";
1622
- }
1623
- // Validate email
1624
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
1625
- if (!this.email.trim()) {
1626
- this.emailError = t.solarSystemForm.emailError;
1627
- isValid = false;
1628
- }
1629
- else if (!emailRegex.test(this.email)) {
1630
- this.emailError = t.solarSystemForm.validEmailError;
1631
- isValid = false;
1632
- }
1633
- else {
1634
- this.emailError = "";
1635
- }
1636
- // Validate phone (optional)
1637
- const phoneRegex = /^[\+]?[1-9][\d]{0,15}$/;
1638
- if (this.phone.trim() &&
1639
- !phoneRegex.test(this.phone.replace(/[\s\-\(\)]/g, ""))) {
1640
- this.phoneError = t.solarSystemForm.phoneError;
1641
- isValid = false;
1642
- }
1643
- else {
1644
- this.phoneError = "";
1645
- }
1646
- return isValid;
1647
- }
1648
- async handleRequestOffer() {
1649
- if (!this.validateForm()) {
1650
- return;
1651
- }
1652
- this.isSubmitting = true;
1653
- this.submitMessage = "";
1654
- this.submitSuccess = false;
1655
- const t = getLanguageStrings(state.settings.language);
1656
- try {
1657
- const leadData = {
1658
- location: {
1659
- name: state.location,
1660
- latitude: state.latitude,
1661
- longitude: state.longitude,
1662
- },
1663
- systemConfig: {
1664
- maxNumberOfPanels: this.maxPanels,
1665
- panelPeakPower: this.panelPeakPower,
1666
- polygons: this.polygons,
1667
- solarSystems: this.systemConfigs,
1668
- electricityPrice: this.electricityPrice,
1669
- compensationRate: this.compensationRate,
1670
- annualPriceIncrease: this.annualPriceIncrease,
1671
- },
1672
- client: {
1673
- name: this.name,
1674
- email: this.email,
1675
- phone: this.phone,
1676
- consumption: this.householdConsumption,
1677
- consumptionProfile: this.consumptionProfile,
1678
- hasBattery: this.batteryEnabled,
1679
- battery: this.battery,
1680
- hasHeatPump: this.heatPump > 0,
1681
- heatPumpM2: this.heatPump,
1682
- hasElectricCar: this.electricCar,
1683
- electricCarChargingTime: this.electricCarChargingTime,
1684
- electricCarKmPerYear: this.kmDrivenPerYear,
1685
- },
1686
- images: {
1687
- roof: this.roofCanvas.toDataURL(),
1688
- polygon: this.polygonCanvas.toDataURL(),
1689
- },
1690
- results: {
1691
- autonomy: this.autonomy,
1692
- costSavings: this.costSavings,
1693
- compensation20Years: this.compensation20Years,
1694
- savedCosts20Years: this.savedCosts20Years,
1695
- totalEnergyConsumption: this.totalEnergyConsumption,
1696
- },
1697
- };
1698
- console.log("leadData", leadData);
1699
- const result = await sendLeadToNexvoro(leadData);
1700
- this.submitSuccess = result.success;
1701
- if (result.success) {
1702
- console.log("Lead successfully sent to Nexvoro", result);
1703
- this.submitMessage = t.solarSystemForm.leadSubmitted;
1704
- // Optionally reset form or show success message
1705
- }
1706
- else {
1707
- console.error("Failed to send lead to Nexvoro:", result.message);
1708
- this.submitMessage = t.solarSystemForm.leadError;
1709
- }
1710
- }
1711
- catch (error) {
1712
- console.error("Error in handleRequestOffer:", error);
1713
- this.submitSuccess = false;
1714
- this.submitMessage = error instanceof Error
1715
- ? error.message
1716
- : "An unexpected error occurred";
1717
- }
1718
- finally {
1719
- this.isSubmitting = false;
1720
- }
1721
- }
1722
- isIOS() {
1723
- return state.isIOS;
1724
- }
1725
- render() {
1726
- const t = getLanguageStrings(state.settings.language);
1727
- // Reusable style objects
1728
- const borderStyle = { border: "1px solid var(--color-border)" };
1729
- const errorBorderStyle = { border: "1px solid var(--color-error)" };
1730
- return (h("div", { key: 'bb41415c5998e8c1d3e98df49bb13f601410c09d', class: "flex flex-col justify-center items-center w-full h-full pt-4" // style={{
1731
- ,
1732
- // display: (Object.keys(this.systemConfigs).length === 0)
1733
- // ? "none"
1734
- // : "flex",
1735
- // }}
1736
- id: "solar-system-form" }, h("h1", { key: '136c0a340cdc4ef1e7de9cc7e8e899017ff111c8', class: "text-2xl font-bold text-secondary mb-4 w-full" }, t.solarSystemForm.title), h("div", { key: '1b7a0195f63cbe3765777573c34c9fbe2b47646a', class: "w-full bg-primary rounded-4xl space-y-6" }, h("div", { key: 'f5b8490c2ba77b7afbf8310c83723c44d5ad66b9', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'aa7de0e6fae0b9b8d3193e2d32fe1e63a23d9f64', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.systemInformation), h("div", { key: '4c745cbf10a6251bdfc0bc926e073073b0ba6408', class: "flex flex-col sm:flex-row gap-4" }, h("div", { key: '292edb872ca1ef3dd82f015ca9d479af89c87ea7', class: "flex-1 bg-muted rounded-4xl p-4 space-y-3" }, h("div", { key: '89a23d55107849485c28023ab6ac344b209ad34d', class: "flex items-center justify-between" }, h("label", { key: 'ee5bd53c202f897a8c212b362265b76044bd5e44', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.numberOfPanels), !this.isIOS()
1737
- ? (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 }))
1738
- : (h("input", { type: "number", min: "1", max: this.maxPanels, class: "w-20 px-3 py-1 rounded-full focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground text-center", style: borderStyle, value: this.numberOfPanels, onInput: (e) => {
1739
- const value = parseInt(e.target
1740
- .value);
1741
- if (value >= 1 &&
1742
- value <=
1743
- this.maxPanels) {
1744
- this.numberOfPanels =
1745
- value;
1746
- this.recalculate();
1747
- }
1748
- } }))), !this.isIOS() && (h("input", { key: '3505aba4610e120ff535a4357e32bfe44092fd28', 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) => {
1749
- this.numberOfPanels = parseInt(e.target
1750
- .value);
1751
- if (isNaN(this.numberOfPanels)) {
1752
- this.numberOfPanels = 0;
1753
- }
1754
- this.recalculate();
1755
- } }))), h("div", { key: '58abbe1ad7b258880138e3d398dabcb2d1efca5b', class: "flex-1 bg-muted rounded-4xl p-4" }, h("div", { key: 'be74d4f0a1e34a55fdc6eafa4dc08e69570e9b04', class: "flex items-center justify-between" }, h("label", { key: '1f8a47d5052731a7da89852099fef84a8946f596', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.panelPeakPower), h("span", { key: 'a3f101b680f251c3e4372bce14b833b9dfa415d3', class: "text-text-muted" }, this.panelPeakPower.toFixed(2), " kW")), h("div", { key: '2ed107c8a0cb43e08b2cbb205f7db8e9de271b22', class: "flex items-center justify-between mt-4" }, h("span", { key: '670c41ca8173f58b1dcbe31699c922ceb9672105', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.totalSystemPeakPower), h("span", { key: 'e41306aec2f7351e5f01c1f221ef23bbe684a366', class: "font-bold text-text-muted" }, (DEFAULT_SOLAR_PANEL_TYPE.kWattPeak *
1756
- this.numberOfPanels).toFixed(1), " kWp"))))), h("div", { key: '38ce148b3679e357768a03d92e2aff79d5192f76', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'bf8031199ddd6ccd90301c29f4bd8e223b14d787', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.householdConsumptionTitle), h("div", { key: 'e06f62af8305aa26be7ea662da32135276218484', class: "grid grid-rows-2 gap-0" }, h("div", { key: 'a04a7c38ab456419674e9e2818bd7519fe795a17', class: "grid grid-cols-2 gap-4" }, h("label", { key: '6d0a74756d1d5a164dbe5783cf3df044bd4d2ced', class: "block text-sm font-medium text-text-muted" }, t.solarSystemForm.annualConsumption), h("label", { key: '49187db1a88afde0b1bebd8fc9f2e88524a4c59d', class: "block text-sm font-medium text-text-muted" }, t.solarSystemForm.consumptionProfileTitle)), h("div", { key: '25690a6ca0000b1eabb589c77109d1087ed1ad76', class: "grid grid-cols-2 gap-4" }, h("input", { key: '506dd439307bacc0d7274a6b2ec0a79f363a9d11', type: "number", step: "100", min: "0", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", style: borderStyle, value: this.householdConsumption, onInput: (e) => {
1757
- this.householdConsumption = parseInt(e.target
1758
- .value);
1759
- this.recalculate();
1760
- } }), h("select", { key: '025fdf9c050c1e00aedd293cfa15da8a411e70af', class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", style: borderStyle, onChange: (e) => {
1761
- this.consumptionProfile =
1762
- e.target
1763
- .value;
1764
- this.recalculate();
1765
- } }, h("option", { key: '26c2fdbcb3646323157dfa6f9f66d6b8ca924c72', value: "mostly_at_home", selected: this.consumptionProfile ===
1766
- "mostly_at_home" }, t.solarSystemForm.consumptionProfiles
1767
- .mostlyAtHome), h("option", { key: 'f3b9527d607657efc4ff75d93576fd765aa97975', value: "mostly_away", selected: this.consumptionProfile ===
1768
- "mostly_away" }, t.solarSystemForm.consumptionProfiles
1769
- .mostlyAway))))), h("div", { key: '5618500ae3aca7633180a6b3607f1c6462c49815', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'fe74e96b7fdcb2e6776a7eccf248d29b0cdd0206', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.additionalComponents.title), h("div", { key: 'a26c1c3461d3021b823f07a05a20ac74108d4ee7', class: "flex flex-col gap-4" }, h("div", { key: 'ef4c60ac505187ca35d213e0f80a6959f1edabd1', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '08e0b956be5958985d8bb247ea94ff0510657d89', class: "flex items-center justify-between" }, h("div", { key: 'ef1917d84a95ace85e140e801736c4dc5c16e378', class: "flex items-center gap-2" }, h("input", { key: '3b19229e72c742accfa553e6b385ab5ad148e6a9', 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) => {
1770
- this.heatPump =
1771
- e.target
1772
- .checked
1773
- ? 100
1774
- : 0;
1775
- this.recalculate();
1776
- } }), h("label", { key: 'f73944ac3cd52ab5ac7358d8dfd520720ad43c1b', htmlFor: "heatPump", class: "text-text-muted" }, t.solarSystemForm
1777
- .additionalComponents
1778
- .heatPump)), (this.heatPump > 0 && !this.isIOS()) && (h("span", { key: '4a2090de47870f9a59b498425b6bbd2bdd177aba', class: "text-text-muted" }, this.heatPump, " m\u00B2"))), this.heatPump > 0 && (h("div", { key: '9a2f2cc91a1efafb06de01ecb78949656cdfcccf', class: "flex flex-col gap-2" }, this.isIOS()
1779
- ? (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 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: borderStyle, value: this.heatPump, onInput: (e) => {
1780
- let value = parseInt(e.target
1781
- .value);
1782
- if (isNaN(value)) {
1783
- value = 0;
1784
- }
1785
- if (value >= 0 &&
1786
- value <= 300) {
1787
- this.heatPump =
1788
- value;
1789
- this.recalculate();
1790
- }
1791
- } }), h("span", { class: "text-sm text-text-muted" }, "m\u00B2")))
1792
- : (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) => {
1793
- this.heatPump =
1794
- parseInt(e.target
1795
- .value);
1796
- this.recalculate();
1797
- } }))))), h("div", { key: '0a7e51f6f8596bed2af8850169ca32c488f43559', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: 'e768501bf22d0d93d4c5ce0d4c142ef7d6096151', class: "flex items-center justify-between" }, h("div", { key: 'e1c54539633730995db596e77be2fd4bba609a81', class: "flex items-center gap-2" }, h("input", { key: 'bface3b5aad019fdcb92ba3229fe7187ec8babb1', 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) => {
1798
- this.electricCar =
1799
- e.target
1800
- .checked;
1801
- this.recalculate();
1802
- } }), h("label", { key: 'a148ffb1488169ef9e383c5483145f3163c38172', htmlFor: "electricCar", class: "text-text-muted" }, t.solarSystemForm
1803
- .additionalComponents
1804
- .electricCar))), this.electricCar && (h("div", { key: '0d6db7e0d23eed4c85aa21f8661038c100049fb7', class: "flex flex-col gap-2" }, h("div", { key: 'c9be028278aa8a582b3d563c98ecabf5a137669b', class: "grid grid-cols-2 gap-4" }, h("label", { key: 'a1d2a3070dd0506be70623ca9b8c524a35132956', class: "text-sm text-text-muted" }, t.solarSystemForm
1805
- .additionalComponents
1806
- .chargingTime), h("label", { key: '7bedc4d1e43fb5e10f04a4ae2b91abf10c56da2c', class: "text-sm text-text-muted" }, t.solarSystemForm
1807
- .additionalComponents
1808
- .kilometersPerYear)), h("div", { key: 'c0f3501cecec8280e323f2403de52e3248b6ce7a', class: "grid grid-cols-2 gap-4" }, h("select", { key: 'e2947d4b13363e341955c429fa37fe2ad5966280', class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", onChange: (e) => {
1809
- this.electricCarChargingTime =
1810
- e.target
1811
- .value;
1812
- this.recalculate();
1813
- }, style: borderStyle }, h("option", { key: '544ae8957ab71cdfd3ad438031d5b3235a321f56', value: "day", selected: this
1814
- .electricCarChargingTime ===
1815
- "day" }, t.solarSystemForm
1816
- .additionalComponents
1817
- .chargingTimeDay), h("option", { key: '04d71d6537186ecda58784b3f70e357a3c36f85f', value: "night", selected: this
1818
- .electricCarChargingTime ===
1819
- "night" }, t.solarSystemForm
1820
- .additionalComponents
1821
- .chargingTimeNight)), h("input", { key: '951f65399cc04d815a585d32206b235710eaefe3', type: "number", min: "1000", max: "100000", step: "1000", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.kmDrivenPerYear, onInput: (e) => {
1822
- this.kmDrivenPerYear =
1823
- parseInt(e.target
1824
- .value);
1825
- if (isNaN(this.kmDrivenPerYear)) {
1826
- this.kmDrivenPerYear =
1827
- 0;
1828
- }
1829
- this.recalculate();
1830
- }, style: borderStyle }))))), h("div", { key: 'b0b64b1afec1a7b05af83d910369141713792a9f', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '16d9ff1d1ed9f11b8cb3f0bf707ae911bd4d3052', class: "flex items-center justify-between" }, h("div", { key: '5ea7224b166ac5d09a0c6954a6583c6ee10bcbf8', class: "flex items-center gap-2" }, h("input", { key: '6bfe5da599c642efe88fdb981983857a812df417', 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.batteryEnabled, onChange: (e) => {
1831
- this.batteryEnabled =
1832
- e.target
1833
- .checked;
1834
- this.battery =
1835
- this.batteryEnabled
1836
- ? 5
1837
- : 0;
1838
- this.recalculate();
1839
- } }), h("label", { key: 'e40e64ca8bd60afddef286b7e4aa5cf369217eb2', htmlFor: "battery", class: "text-text-muted" }, t.solarSystemForm
1840
- .additionalComponents
1841
- .battery)), (this.batteryEnabled && !this.isIOS()) && (h("span", { key: 'b2fc3a8d3e565b6f0de27b8e0cdd9a125787dc97', class: "text-text-muted" }, this.battery, " kWh"))), this.batteryEnabled && (h("div", { key: 'e2148708d2c07f4bb07dfb8c68ea37005f86d4ac', class: "flex flex-col gap-2" }, this.isIOS()
1842
- ? (h("div", { class: "flex items-center gap-2" }, h("input", { type: "number", min: "0", max: "20", step: "1", class: "flex-1 px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.battery, onInput: (e) => {
1843
- let value = parseInt(e.target
1844
- .value);
1845
- if (isNaN(value)) {
1846
- value = 0;
1847
- }
1848
- if (value >= 0 &&
1849
- value <= 20) {
1850
- this.battery =
1851
- value;
1852
- }
1853
- else {
1854
- this.battery =
1855
- 20;
1856
- }
1857
- this.recalculate();
1858
- }, style: borderStyle }), h("span", { class: "text-sm text-text-muted" }, "kWh")))
1859
- : (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) => {
1860
- const value = parseInt(e.target
1861
- .value);
1862
- this.battery = value;
1863
- this.batteryEnabled =
1864
- value > 0;
1865
- this.recalculate();
1866
- } }))))))), h("div", { key: '2403db26cd231ee1e14ee9e54904a6d47a442cde', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'd7792f3cd2f10acbc708f347eb9d875774b4d7cd', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.electricityCostsTitle), h("div", { key: 'a2ace9b4c49c0e778a112ee957a372f32a499117', style: {
1867
- display: "grid",
1868
- gridTemplateColumns: "repeat(auto-fit, minmax(100px, 1fr))",
1869
- gap: "1rem",
1870
- } }, h("div", { key: '1d5fbae3664adf9c19550b482a0ded3a7a7442c0' }, h("label", { key: 'd16ad99fa9c8f87151a5a6a7d7bcde674c4a8e81', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.electricityPrice), h("input", { key: 'f36ae62025eee8bbdb65c9c82d4b605667894d8d', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: borderStyle, value: this.electricityPrice.toFixed(2), onInput: (e) => {
1871
- this.electricityPrice = parseFloat(e.target
1872
- .value);
1873
- this.recalculate();
1874
- } })), h("div", { key: 'bfd9e6153ab03d5ace55ad15de335df6566b5417' }, h("label", { key: 'ee2536275e4fd5649721d4d3940291430075db67', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.compensationRate), h("input", { key: '8dd2be4609fcb850794fa070df50cfa751a87fa1', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: borderStyle, value: this.compensationRate.toFixed(2), onInput: (e) => {
1875
- this.compensationRate = parseFloat(e.target
1876
- .value);
1877
- this.recalculate();
1878
- } })), h("div", { key: '8f29216586bc3f5c92be3aee08f3d92c67dbf061' }, h("label", { key: 'af3fac52689fe289a72003f3acc78d9ea4bc232d', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.annualPriceIncrease), h("input", { key: '7e9587a58424149e25b6cd35b3b0f8e67bad0a10', type: "number", step: "0.1", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: borderStyle, value: this.annualPriceIncrease.toFixed(1), onInput: (e) => {
1879
- this.annualPriceIncrease = parseFloat(e.target
1880
- .value);
1881
- this.recalculate();
1882
- } })))), h("div", { key: 'edee17bd72e40f9a00345fce0c7b0728474ecd5c', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: '8833b742a6df1556486ff3719b8b833adb858163', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.resultsTitle), h("div", { key: '6cb17515165775c5b59c0e2ab9f9602125aac953', class: "bg-muted rounded-4xl p-4" }, h("div", { key: '43ba0b310caa0d3e19d4d991b19f54500609e155', class: "flex flex-col sm:flex-row sm:items-center justify-between" }, h("span", { key: 'fe78bf736efedb7e3ce331d594ebec5ac4260ea3', class: "text-text-muted" }, t.solarSystemForm.autonomy), h("span", { key: '57e3d258a15dcc6ff502b5ac2c5612a3ae7a9332', class: "text-xl font-bold text-secondary mt-1 sm:mt-0" }, this.autonomy > 100
1883
- ? "100"
1884
- : this.formatEuropeanNumber(this.autonomy, 1), "%")), h("div", { key: '84c71945018078f4d1f22d94de5710b57a097b10', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("span", { key: '1ba73ff5a96617626b3a219bb4a3894cc6a82e2a', class: "text-text-muted" }, t.solarSystemForm.totalEnergyConsumption), h("span", { key: '3d328063a9999304de1a2cdc3010787dd08ebdac', class: "text-xl font-bold text-secondary mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.totalEnergyConsumption, 0), " kWh/", t.solarSystemForm.year)), h("div", { key: 'a6e0a99b0532b1c8409e5f8ebfb04d5c0b7fc1d5', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("span", { key: '4e3de7a62055aed15d8214080da79d7c67a3504f', class: "text-text-muted" }, t.solarSystemForm.totalEnergyProduction), h("span", { key: '50919661b3fa82dc99d93aef0bf4e46b85e683e6', class: "text-xl font-bold text-secondary mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.totalEnergyProduction, 0), " kWh/", t.solarSystemForm.year)), h("div", { key: '669ecb3bff03f954c459c5864ebc790f7802d2c3', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("div", { key: '50064fa431dae13dfafd7a827b4265eb5ce66025', class: "flex items-center gap-2" }, h("span", { key: 'add8a4952f5f2992657a8723210697a2889e08ca', class: "text-text-muted" }, t.solarSystemForm.costSavings)), h("span", { key: '1a4cf403f0cdc01e8aa195826165f66e74c2f460', class: "text-xl font-bold text-success mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.costSavings), " \u20AC/", t
1885
- .solarSystemForm.year)), h("div", { key: 'fadf1e4394b0734ae14d4568db8f47b286b00eed', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("div", { key: '69c5b3bfa131e35b1760b854e0adcddc4cd7513e', class: "flex items-center gap-2" }, h("span", { key: '826a2b7a6c1959626ca195b66893e7725582d666', class: "text-text-muted" }, t.solarSystemForm.compensation20Years)), h("span", { key: 'cfbc1063b55c815f6ae89a48c6b8239ecfbcbb5d', class: "text-xl font-bold text-success mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.compensation20Years), " \u20AC")), h("div", { key: 'fa740700dbc3a640c5adce3d28413b839000b840', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("div", { key: '095d543adc7d81fec92ebfcf35efd4122b1b6ef9', class: "flex items-center gap-2" }, h("span", { key: 'eac35fd6b6bb3778afadec2bfa93b7549a7db08a', class: "text-text-muted" }, t.solarSystemForm
1886
- .monetaryBenefit20Years)), h("span", { key: '82d2fdee254b0ff2bb6534dced8a43087f7f4269', class: "text-xl font-bold text-success mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.savedCosts20Years), " \u20AC")))), h("div", { key: '96cc3aa5ed8fa4870a5fe54e1345b1abc6b69862', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: '08f6274c8a655995b0a2061696bbeca324c81924', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.requestOffer), h("div", { key: 'ed644026714f6962469ba290c8931e12d6b3afff', style: {
1887
- display: "grid",
1888
- gridTemplateColumns: "repeat(auto-fit, minmax(1 00px, 1fr))",
1889
- gap: "1rem",
1890
- } }, h("div", { key: '8d22c69472e58ad2fb2dbca427e5dd1bc2f207a8' }, h("label", { key: '3d975692c644c8e26ec1c0a03e12312adf6b0ede', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.name), h("input", { key: 'addb2114b79ddb98d2215b68214116ed2d64ad66', type: "text", class: `w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, style: this.nameError
1891
- ? errorBorderStyle
1892
- : borderStyle, value: this.name, onInput: (e) => {
1893
- this.name =
1894
- e.target
1895
- .value;
1896
- this.validateForm();
1897
- }, placeholder: "Your name" }), this.nameError && (h("p", { key: '32dd68fc53f8694371c56a229fd075839d3e00d8', class: "text-error text-sm mt-1" }, this.nameError))), h("div", { key: 'f58d1775fb32e5b0704cb635bdc563c4a2b2a9f1' }, h("label", { key: '87b853fd645e5dd16bcabfb9836a044441a56198', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.email), h("input", { key: '115b7a027cc5a77a7a70a1a8c8f4cb3c64c09d50', type: "email", class: `w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, style: this.emailError
1898
- ? errorBorderStyle
1899
- : borderStyle, value: this.email, onInput: (e) => {
1900
- this.email =
1901
- e.target
1902
- .value;
1903
- this.validateForm();
1904
- }, placeholder: "your.email@example.com" }), this.emailError && (h("p", { key: '055f714dfa5ccf74d461c048cf14bcc4a4f1d2a0', class: "text-error text-sm mt-1" }, this.emailError))), h("div", { key: '9516dab3e8d312aafbded94676d377c950b5e34d' }, h("label", { key: 'd13fced3339f847cf792738c1469b45d0090c3e5', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.phone), h("input", { key: 'ab7df19168e831442fdb4368bc817f0985d8750a', type: "tel", class: `w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, style: this.phoneError
1905
- ? errorBorderStyle
1906
- : borderStyle, value: this.phone, onInput: (e) => {
1907
- this.phone =
1908
- e.target
1909
- .value;
1910
- this.validateForm();
1911
- }, placeholder: "+34 123 456 789" }), this.phoneError && (h("p", { key: '9eff09242097e92c1d9eec03df499a73b169664c', class: "text-error text-sm mt-1" }, this.phoneError)))), h("div", { key: '55990f0a38c24bd9a0d91df2760f81909a79696c', class: "flex flex-col items-center gap-4" }, h("button", { key: '09dfe384f03928294282cf973d3ccd9baf6d0a56', onClick: () => this.handleRequestOffer(), disabled: !this.name.trim() ||
1912
- !this.email.trim() || !!this.nameError ||
1913
- !!this.emailError || !!this.phoneError ||
1914
- this.isSubmitting, class: `px-6 py-3 rounded-4xl transition-colors duration-200 flex items-center gap-2 ${this.isSubmitting
1915
- ? "bg-muted text-text-muted cursor-not-allowed"
1916
- : "bg-secondary hover:bg-tertiary"}`, style: {
1917
- color: this.isSubmitting
1918
- ? "var(--color-text-muted)"
1919
- : "#ffffff",
1920
- } }, this.isSubmitting && (h("div", { key: 'e5aad83a4c2f4838e303f9447b26db9a3094aa14', class: "w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin" })), this.isSubmitting
1921
- ? t.solarSystemForm.sending
1922
- : t.solarSystemForm.requestOfferButton), this.submitMessage && (h("div", { key: '72a6cfc9becc8f24a4aa2072c8706a5bcec0319e', class: `text-sm px-4 py-2 rounded-4xl ${this.submitSuccess
1923
- ? "bg-success/10 text-success border border-success/20"
1924
- : "bg-error/10 text-error border border-error/20"}` }, this.submitMessage)))))));
1925
- }
1926
- static get watchers() { return {
1927
- "systemConfigs": ["updateSystemConfigs"]
1928
- }; }
1929
- static get style() { return outputCss; }
1930
- }, [0, "solar-system-form", {
1931
- "systemConfigs": [16, "system-configs"],
1932
- "polygons": [16],
1933
- "roofCanvas": [16, "roof-canvas"],
1934
- "polygonCanvas": [16, "polygon-canvas"],
1935
- "householdConsumption": [32],
1936
- "consumptionProfile": [32],
1937
- "electricityPrice": [32],
1938
- "compensationRate": [32],
1939
- "annualPriceIncrease": [32],
1940
- "autonomy": [32],
1941
- "costSavings": [32],
1942
- "numberOfPanels": [32],
1943
- "panelPeakPower": [32],
1944
- "name": [32],
1945
- "email": [32],
1946
- "phone": [32],
1947
- "nameError": [32],
1948
- "emailError": [32],
1949
- "phoneError": [32],
1950
- "electricCar": [32],
1951
- "electricCarChargingTime": [32],
1952
- "heatPump": [32],
1953
- "battery": [32],
1954
- "batteryEnabled": [32],
1955
- "compensation20Years": [32],
1956
- "savedCosts20Years": [32],
1957
- "maxPanels": [32],
1958
- "kmDrivenPerYear": [32],
1959
- "totalEnergyConsumption": [32],
1960
- "totalEnergyProduction": [32],
1961
- "isSubmitting": [32],
1962
- "submitMessage": [32],
1963
- "submitSuccess": [32]
1964
- }, undefined, {
1965
- "systemConfigs": ["updateSystemConfigs"]
1966
- }]);
1967
- function defineCustomElement() {
1968
- if (typeof customElements === "undefined") {
1969
- return;
1970
- }
1971
- const components = ["solar-system-form"];
1972
- components.forEach(tagName => { switch (tagName) {
1973
- case "solar-system-form":
1974
- if (!customElements.get(tagName)) {
1975
- customElements.define(tagName, SolarSystemForm);
1976
- }
1977
- break;
1978
- } });
1979
- }
1980
- defineCustomElement();
1981
-
1982
- 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 };
1983
- //# sourceMappingURL=p-PkMjF2if.js.map
1984
-
1985
- //# sourceMappingURL=p-PkMjF2if.js.map