blue-chestnut-solar-expert 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.cjs.js.map +1 -0
- package/dist/cjs/eraser-icon_16.cjs.entry.js +3124 -0
- package/dist/cjs/eraser-icon_16.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-widget.cjs.entry.js +2 -2
- package/dist/cjs/loading-widget.cjs.entry.js.map +1 -1
- package/dist/cjs/loading-widget.entry.cjs.js.map +1 -1
- package/dist/cjs/solar-calculator.cjs.entry.js +2 -2
- package/dist/cjs/solar-calculator.cjs.entry.js.map +1 -1
- package/dist/cjs/solar-calculator.entry.cjs.js.map +1 -1
- package/dist/cjs/stencil-library.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/icons/icon.js +3 -0
- package/dist/collection/components/icons/icon.js.map +1 -1
- package/dist/collection/components/icons/undo.js +64 -0
- package/dist/collection/components/icons/undo.js.map +1 -0
- package/dist/collection/components/map-draw/map-draw.js +65 -22
- package/dist/collection/components/map-draw/map-draw.js.map +1 -1
- package/dist/collection/components/map-draw/map-selector.js +2 -2
- package/dist/collection/components/map-draw/map-selector.js.map +1 -1
- package/dist/collection/components/map-draw/polygon-buttons.js +26 -1
- package/dist/collection/components/map-draw/polygon-buttons.js.map +1 -1
- package/dist/collection/components/map-draw/polygon-information.js +3 -3
- package/dist/collection/components/map-draw/polygon-information.js.map +1 -1
- package/dist/collection/components/map-draw/tool-box.js +27 -3
- package/dist/collection/components/map-draw/tool-box.js.map +1 -1
- package/dist/collection/components/settings/settings.js +8 -8
- package/dist/collection/components/solar-calculator/solar-calculator.js +1 -1
- package/dist/collection/components/solar-expert/solar-expert.js +16 -1
- package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
- package/dist/collection/components/solar-system-form/solar-system-form.js +85 -185
- package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
- package/dist/collection/components/widgets/loading-widget.js +1 -1
- package/dist/collection/constants.js +2 -1
- package/dist/collection/constants.js.map +1 -1
- package/dist/collection/output.css +20 -9
- package/dist/collection/store.js +1 -1
- package/dist/collection/store.js.map +1 -1
- package/dist/collection/types/lang.js.map +1 -1
- package/dist/collection/utils/lang/english.js +5 -0
- package/dist/collection/utils/lang/english.js.map +1 -1
- package/dist/collection/utils/lang/german.js +7 -2
- package/dist/collection/utils/lang/german.js.map +1 -1
- package/dist/collection/utils/lang/spanish.js +5 -0
- package/dist/collection/utils/lang/spanish.js.map +1 -1
- package/dist/collection/utils/render/tools.js +7 -0
- package/dist/collection/utils/render/tools.js.map +1 -1
- package/dist/collection/utils/simulation/simulation.js +109 -0
- package/dist/collection/utils/simulation/simulation.js.map +1 -0
- package/dist/collection/utils/simulation/solarCurves.js +31 -0
- package/dist/collection/utils/simulation/solarCurves.js.map +1 -0
- package/dist/collection/utils/simulation/types.js +4 -0
- package/dist/collection/utils/simulation/types.js.map +1 -0
- package/dist/components/eraser-icon.js +1 -1
- package/dist/components/house-icon.js +1 -1
- package/dist/components/icon-selector.js +1 -1
- package/dist/components/loading-widget.js +2 -2
- package/dist/components/loading-widget.js.map +1 -1
- package/dist/components/map-draw.js +1 -1
- package/dist/components/map-selector.js +1 -1
- package/dist/components/move-icon.js +1 -1
- package/dist/components/octagon-minus-icon.js +1 -1
- package/dist/components/p-BDBrVfn4.js +38 -0
- package/dist/components/p-BDBrVfn4.js.map +1 -0
- package/dist/components/p-BDrs1Te9.js +38 -0
- package/dist/components/p-BDrs1Te9.js.map +1 -0
- package/dist/components/p-BbXgEBG5.js +38 -0
- package/dist/components/p-BbXgEBG5.js.map +1 -0
- package/dist/components/p-Bq1PVegq.js +174 -0
- package/dist/components/p-Bq1PVegq.js.map +1 -0
- package/dist/components/p-BrVkygdn.js +38 -0
- package/dist/components/p-BrVkygdn.js.map +1 -0
- package/dist/components/p-BxEeUA4s.js +149 -0
- package/dist/components/p-BxEeUA4s.js.map +1 -0
- package/dist/components/p-C-_6TJs5.js +164 -0
- package/dist/components/p-C-_6TJs5.js.map +1 -0
- package/dist/components/{p-BSx-VRl1.js → p-CPLDlLfb.js} +99 -50
- package/dist/components/p-CPLDlLfb.js.map +1 -0
- package/dist/components/p-CRnyqUKc.js +47 -0
- package/dist/components/p-CRnyqUKc.js.map +1 -0
- package/dist/components/p-CabEU06O.js +103 -0
- package/dist/components/p-CabEU06O.js.map +1 -0
- package/dist/components/p-CmFUQbz_.js +507 -0
- package/dist/components/p-CmFUQbz_.js.map +1 -0
- package/dist/components/p-CumvV0_M.js +38 -0
- package/dist/components/p-CumvV0_M.js.map +1 -0
- package/dist/components/{p-C5Qpifsm.js → p-CwVUc6Hq.js} +20 -5
- package/dist/components/p-CwVUc6Hq.js.map +1 -0
- package/dist/components/p-DI6_jwLe.js +38 -0
- package/dist/components/p-DI6_jwLe.js.map +1 -0
- package/dist/components/p-DPfpDV5e.js +74 -0
- package/dist/components/p-DPfpDV5e.js.map +1 -0
- package/dist/components/p-DYiK8eDp.js +38 -0
- package/dist/components/p-DYiK8eDp.js.map +1 -0
- package/dist/components/polygon-buttons.js +1 -1
- package/dist/components/polygon-information.js +1 -1
- package/dist/components/search-icon.js +1 -1
- package/dist/components/settings-icon.js +1 -1
- package/dist/components/settings-modal.js +1 -1
- package/dist/components/solar-calculator.js +2 -2
- package/dist/components/solar-calculator.js.map +1 -1
- package/dist/components/solar-expert.js +52 -31
- package/dist/components/solar-expert.js.map +1 -1
- package/dist/components/solar-system-form.js +1 -1
- package/dist/components/tool-box.js +1 -1
- package/dist/components/undo-icon.d.ts +11 -0
- package/dist/components/undo-icon.js +9 -0
- package/dist/components/undo-icon.js.map +1 -0
- package/dist/esm/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.js.map +1 -0
- package/dist/esm/eraser-icon_16.entry.js +3107 -0
- package/dist/esm/eraser-icon_16.entry.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-widget.entry.js +2 -2
- package/dist/esm/loading-widget.entry.js.map +1 -1
- package/dist/esm/solar-calculator.entry.js +2 -2
- package/dist/esm/solar-calculator.entry.js.map +1 -1
- package/dist/esm/stencil-library.js +1 -1
- package/dist/stencil-library/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.esm.js.map +1 -0
- package/dist/stencil-library/loading-widget.entry.esm.js.map +1 -1
- package/dist/stencil-library/p-1acfe8c0.entry.js +32 -0
- package/dist/stencil-library/{p-04893dc6.entry.js.map → p-1acfe8c0.entry.js.map} +1 -1
- package/dist/stencil-library/p-1e2ddc82.entry.js +2 -0
- package/dist/stencil-library/p-1e2ddc82.entry.js.map +1 -0
- package/dist/stencil-library/p-56f8bd65.entry.js +2 -0
- package/dist/stencil-library/p-56f8bd65.entry.js.map +1 -0
- package/dist/stencil-library/solar-calculator.entry.esm.js.map +1 -1
- package/dist/stencil-library/stencil-library.esm.js +1 -1
- package/dist/types/components/icons/undo.d.ts +5 -0
- package/dist/types/components/map-draw/map-draw.d.ts +1 -0
- package/dist/types/components/map-draw/polygon-buttons.d.ts +1 -0
- package/dist/types/components/map-draw/tool-box.d.ts +1 -0
- package/dist/types/components/solar-expert/solar-expert.d.ts +1 -0
- package/dist/types/components/solar-system-form/solar-system-form.d.ts +3 -2
- package/dist/types/components.d.ts +21 -0
- package/dist/types/constants.d.ts +2 -1
- package/dist/types/types/lang.d.ts +5 -0
- package/dist/types/utils/render/tools.d.ts +2 -1
- package/dist/types/utils/simulation/simulation.d.ts +8 -0
- package/dist/types/utils/simulation/solarCurves.d.ts +3 -0
- package/dist/types/utils/simulation/types.d.ts +49 -0
- package/package.json +2 -2
- package/dist/cjs/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.entry.cjs.js.map +0 -1
- package/dist/cjs/eraser-icon_15.cjs.entry.js +0 -3007
- package/dist/cjs/eraser-icon_15.cjs.entry.js.map +0 -1
- package/dist/components/p-BJFgUvs3.js +0 -38
- package/dist/components/p-BJFgUvs3.js.map +0 -1
- package/dist/components/p-BP2JkbOB.js +0 -149
- package/dist/components/p-BP2JkbOB.js.map +0 -1
- package/dist/components/p-BSx-VRl1.js.map +0 -1
- package/dist/components/p-BfAeCWO4.js +0 -38
- package/dist/components/p-BfAeCWO4.js.map +0 -1
- package/dist/components/p-BilSpdUG.js +0 -94
- package/dist/components/p-BilSpdUG.js.map +0 -1
- package/dist/components/p-Bn39cXBR.js +0 -38
- package/dist/components/p-Bn39cXBR.js.map +0 -1
- package/dist/components/p-BzuGyPz5.js +0 -493
- package/dist/components/p-BzuGyPz5.js.map +0 -1
- package/dist/components/p-C4UfrfLc.js +0 -40
- package/dist/components/p-C4UfrfLc.js.map +0 -1
- package/dist/components/p-C5Qpifsm.js.map +0 -1
- package/dist/components/p-CesxKYgJ.js +0 -38
- package/dist/components/p-CesxKYgJ.js.map +0 -1
- package/dist/components/p-Cm-6HU5f.js +0 -38
- package/dist/components/p-Cm-6HU5f.js.map +0 -1
- package/dist/components/p-D93MrNOs.js +0 -174
- package/dist/components/p-D93MrNOs.js.map +0 -1
- package/dist/components/p-DSWRVBhO.js +0 -74
- package/dist/components/p-DSWRVBhO.js.map +0 -1
- package/dist/components/p-klKuBKKU.js +0 -149
- package/dist/components/p-klKuBKKU.js.map +0 -1
- package/dist/components/p-metMBa33.js +0 -38
- package/dist/components/p-metMBa33.js.map +0 -1
- package/dist/esm/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.entry.js.map +0 -1
- package/dist/esm/eraser-icon_15.entry.js +0 -2991
- package/dist/esm/eraser-icon_15.entry.js.map +0 -1
- package/dist/stencil-library/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.entry.esm.js.map +0 -1
- package/dist/stencil-library/p-02607fda.entry.js +0 -2
- package/dist/stencil-library/p-02607fda.entry.js.map +0 -1
- package/dist/stencil-library/p-04893dc6.entry.js +0 -32
- package/dist/stencil-library/p-3af1ea82.entry.js +0 -2
- package/dist/stencil-library/p-3af1ea82.entry.js.map +0 -1
|
@@ -1,493 +0,0 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, h } from './index.js';
|
|
2
|
-
import { g as getLanguageStrings, s as state } from './p-C5Qpifsm.js';
|
|
3
|
-
|
|
4
|
-
const DOTTED_LINE_COLOR = "rgba(0, 0, 0, 0.5)";
|
|
5
|
-
const ROW_SPACING = 1;
|
|
6
|
-
const COLUMN_SPACING = 1;
|
|
7
|
-
const BORDER_INSET = 0;
|
|
8
|
-
const DEFAULT_SUNNINESS = 600;
|
|
9
|
-
const SOLAR_RADIATION = [
|
|
10
|
-
0,
|
|
11
|
-
0,
|
|
12
|
-
0,
|
|
13
|
-
0,
|
|
14
|
-
0,
|
|
15
|
-
0, // 00:00 - 05:00 - 6
|
|
16
|
-
0,
|
|
17
|
-
0.1,
|
|
18
|
-
0.2, // 8
|
|
19
|
-
0.4,
|
|
20
|
-
0.8,
|
|
21
|
-
1, // 06:00 - 11:00 - 12
|
|
22
|
-
1,
|
|
23
|
-
1,
|
|
24
|
-
1,
|
|
25
|
-
0.7,
|
|
26
|
-
0.5,
|
|
27
|
-
0.3, // 12:00 - 17:00 - 18
|
|
28
|
-
0.16,
|
|
29
|
-
0.02,
|
|
30
|
-
0,
|
|
31
|
-
0,
|
|
32
|
-
0,
|
|
33
|
-
0, // 18:00 - 23:00 - 24
|
|
34
|
-
];
|
|
35
|
-
const CONSUMPTION_PROFILES = {
|
|
36
|
-
mostly_at_home: [
|
|
37
|
-
0.1,
|
|
38
|
-
0.1,
|
|
39
|
-
0.1,
|
|
40
|
-
0.1,
|
|
41
|
-
0.1,
|
|
42
|
-
0.15, // 00:00 - 05:00 - 6
|
|
43
|
-
0.23,
|
|
44
|
-
0.26,
|
|
45
|
-
0.16,
|
|
46
|
-
0.16,
|
|
47
|
-
0.15,
|
|
48
|
-
0.19, // 06:00 - 11:00 - 12
|
|
49
|
-
0.23,
|
|
50
|
-
0.24,
|
|
51
|
-
0.35,
|
|
52
|
-
0.28,
|
|
53
|
-
0.275,
|
|
54
|
-
0.8, // 12:00 - 17:00 - 18
|
|
55
|
-
0.78,
|
|
56
|
-
0.74,
|
|
57
|
-
0.75,
|
|
58
|
-
0.73,
|
|
59
|
-
0.26,
|
|
60
|
-
0.1, // 18:00 - 23:00 - 24
|
|
61
|
-
],
|
|
62
|
-
mostly_away: [
|
|
63
|
-
0.1,
|
|
64
|
-
0.1,
|
|
65
|
-
0.1,
|
|
66
|
-
0.1,
|
|
67
|
-
0.1,
|
|
68
|
-
0.15, // 00:00 - 05:00 - 6
|
|
69
|
-
0.29,
|
|
70
|
-
0.32,
|
|
71
|
-
0.25,
|
|
72
|
-
0.15,
|
|
73
|
-
0.12,
|
|
74
|
-
0.14, // 06:00 - 11:00 - 12
|
|
75
|
-
0.15,
|
|
76
|
-
0.12,
|
|
77
|
-
0.16,
|
|
78
|
-
0.21,
|
|
79
|
-
0.285,
|
|
80
|
-
1, // 12:00 - 17:00 - 18
|
|
81
|
-
0.81,
|
|
82
|
-
0.77,
|
|
83
|
-
0.79,
|
|
84
|
-
0.73,
|
|
85
|
-
0.26,
|
|
86
|
-
0.1, // 18:00 - 23:00 - 24
|
|
87
|
-
],
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const DEFAULT_SOLAR_EXPERT_CONFIG = {
|
|
91
|
-
openRoofColor: "#d6eeff",
|
|
92
|
-
closedRoofColor: "#ffffff",
|
|
93
|
-
openObstructionColor: "#f57242",
|
|
94
|
-
closedObstructionColor: "rgba(255, 132, 107, 0.8)",
|
|
95
|
-
roofPolygonFillColor: "rgba(92, 187, 255, 0.5)",
|
|
96
|
-
obstructionPolygonFillColor: "rgba(255, 132, 107, 0.5)",
|
|
97
|
-
roofPolygonHoverFillColor: "rgba(92, 187, 255, 0.8)",
|
|
98
|
-
obstructionPolygonHoverFillColor: "rgba(255, 132, 107, 0.8)",
|
|
99
|
-
roofPolygonSelectedFillColor: "rgba(92, 187, 255, 0.7)",
|
|
100
|
-
obstructionPolygonSelectedFillColor: "rgba(255, 132, 107, 0.7)",
|
|
101
|
-
highlightColor: "rgba(0, 89, 255, 1)",
|
|
102
|
-
};
|
|
103
|
-
const DEFAULT_SOLAR_PANEL_TYPE = {
|
|
104
|
-
widthMeters: 1.134,
|
|
105
|
-
heightMeters: 1.762,
|
|
106
|
-
kWattPeak: 0.455,
|
|
107
|
-
efficiency: 0.224,
|
|
108
|
-
price: 77.68,
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
const outputCss = "/*! tailwindcss v4.1.7 | 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-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-md: 28rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-4xl: 2rem;\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .right-4 {\n right: calc(var(--spacing) * 4);\n }\n .bottom-4 {\n bottom: calc(var(--spacing) * 4);\n }\n .bottom-full {\n bottom: 100%;\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 .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-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .inline {\n display: inline;\n }\n .inline-block {\n display: inline-block;\n }\n .inline-flex {\n display: inline-flex;\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-\\[400px\\] {\n height: 400px;\n }\n .h-full {\n height: 100%;\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-md {\n max-width: var(--container-md);\n }\n .flex-1 {\n flex: 1;\n }\n .flex-3 {\n flex: 3;\n }\n .-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-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .grid-cols-3 {\n grid-template-columns: repeat(3, 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-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .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-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-\\[\\#ffffff\\] {\n background-color: #ffffff;\n }\n .bg-black {\n background-color: var(--color-black);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-1 {\n padding: calc(var(--spacing) * 1);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-4 {\n padding-bottom: calc(var(--spacing) * 4);\n }\n .pl-2 {\n padding-left: calc(var(--spacing) * 2);\n }\n .pl-4 {\n padding-left: calc(var(--spacing) * 4);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-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-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\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 .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 .transition-opacity {\n transition-property: opacity;\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 .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#0000003c\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #0000003c;\n }\n }\n }\n .hover\\:bg-\\[\\#3a1b00\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #3a1b00;\n }\n }\n }\n .hover\\:bg-\\[\\#271200\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #271200;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .hover\\:bg-\\[\\#ffffff\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #ffffff;\n }\n }\n }\n .hover\\:bg-gray-200 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-200);\n }\n }\n }\n .hover\\:bg-gray-300 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-300);\n }\n }\n }\n .hover\\:bg-gray-500 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-500);\n }\n }\n }\n .hover\\:text-white {\n &:hover {\n @media (hover: hover) {\n color: var(--color-white);\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#271200\\] {\n &:focus {\n --tw-ring-color: #271200;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\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 .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:rounded-full {\n &::-webkit-slider-runnable-track {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-black\\/25 {\n &::-webkit-slider-runnable-track {\n background-color: color-mix(in srgb, #000 25%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 25%, transparent);\n }\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-\\[10px\\] {\n &::-webkit-slider-thumb {\n height: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-\\[10px\\] {\n &::-webkit-slider-thumb {\n width: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-white {\n &::-webkit-slider-thumb {\n background-color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n }\n }\n}\n";
|
|
112
|
-
|
|
113
|
-
const SolarSystemForm = /*@__PURE__*/ proxyCustomElement(class SolarSystemForm extends H {
|
|
114
|
-
constructor() {
|
|
115
|
-
super();
|
|
116
|
-
this.__registerHost();
|
|
117
|
-
}
|
|
118
|
-
systemConfigs = {};
|
|
119
|
-
roofPolygons = {};
|
|
120
|
-
obstructionPolygons = {};
|
|
121
|
-
householdConsumption = 3500;
|
|
122
|
-
consumptionProfile = "mostly_at_home";
|
|
123
|
-
electricityPrice = 0.3;
|
|
124
|
-
compensationRate = 0.07;
|
|
125
|
-
annualPriceIncrease = 2;
|
|
126
|
-
autonomy = 0;
|
|
127
|
-
costSavings = 0;
|
|
128
|
-
costSavings25Years = 0;
|
|
129
|
-
numberOfPanels = 5;
|
|
130
|
-
panelPeakPower = 0.4; // kW per panel
|
|
131
|
-
name = "";
|
|
132
|
-
email = "";
|
|
133
|
-
nameError = "";
|
|
134
|
-
emailError = "";
|
|
135
|
-
electricCar = false;
|
|
136
|
-
electricCarChargingTime = "day";
|
|
137
|
-
heatPump = 0;
|
|
138
|
-
battery = 0;
|
|
139
|
-
// private chart: Chart | null = null;
|
|
140
|
-
// private chartRef: HTMLCanvasElement | null = null;
|
|
141
|
-
updateSystemConfigs() {
|
|
142
|
-
if (Object.keys(this.systemConfigs).length === 0) {
|
|
143
|
-
this.numberOfPanels = 0;
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
this.numberOfPanels = Object.keys(this.systemConfigs).reduce((acc, curr) => acc + this.systemConfigs[curr].positionedPanels.length, 0);
|
|
147
|
-
this.panelPeakPower =
|
|
148
|
-
Object.entries(this.systemConfigs)[0][1].positionedPanels[0].panel
|
|
149
|
-
.kWattPeak;
|
|
150
|
-
this.recalculate();
|
|
151
|
-
this.updateChart();
|
|
152
|
-
}
|
|
153
|
-
recalculate() {
|
|
154
|
-
const data = CONSUMPTION_PROFILES[this.consumptionProfile];
|
|
155
|
-
const norm = data.reduce((acc, curr) => acc + curr, 0);
|
|
156
|
-
// Calculate heat pump consumption (0.05 kWh per m² per day)
|
|
157
|
-
const heatPumpDailyConsumption = this.heatPump * 0.05;
|
|
158
|
-
const heatPumpYearlyConsumption = heatPumpDailyConsumption * 365;
|
|
159
|
-
// Calculate electric car consumption (20 kWh per day)
|
|
160
|
-
const electricCarDailyConsumption = this.electricCar ? 20 : 0;
|
|
161
|
-
const electricCarYearlyConsumption = electricCarDailyConsumption * 365;
|
|
162
|
-
// Add heat pump and electric car consumption to total household consumption
|
|
163
|
-
const totalHouseholdConsumption = this.householdConsumption +
|
|
164
|
-
heatPumpYearlyConsumption + electricCarYearlyConsumption;
|
|
165
|
-
const peakKwh = this.numberOfPanels * this.panelPeakPower;
|
|
166
|
-
const production = SOLAR_RADIATION.map((radiation) => radiation * peakKwh);
|
|
167
|
-
let energyUsageOfProduction = 0;
|
|
168
|
-
let soldEnergy = 0;
|
|
169
|
-
let batteryCharge = 0; // Current battery charge in kWh
|
|
170
|
-
// Calculate hourly electric car consumption
|
|
171
|
-
const hourlyCarConsumption = this.electricCar ? 20 / 24 : 0; // Distribute 20 kWh evenly across 24 hours
|
|
172
|
-
for (let i = 0; i < data.length; i++) {
|
|
173
|
-
// Add electric car consumption to the base consumption
|
|
174
|
-
let hourlyConsumption = data[i] * totalHouseholdConsumption / norm /
|
|
175
|
-
365;
|
|
176
|
-
// Add electric car consumption based on charging time preference
|
|
177
|
-
if (this.electricCar) {
|
|
178
|
-
if (this.electricCarChargingTime === "day" && i >= 6 && i <= 18) {
|
|
179
|
-
hourlyConsumption += hourlyCarConsumption;
|
|
180
|
-
}
|
|
181
|
-
else if (this.electricCarChargingTime === "night" &&
|
|
182
|
-
(i < 6 || i > 18)) {
|
|
183
|
-
hourlyConsumption += hourlyCarConsumption;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
// Calculate energy difference for this hour
|
|
187
|
-
const energyDifference = production[i] - hourlyConsumption;
|
|
188
|
-
if (energyDifference > 0) {
|
|
189
|
-
// Excess production - try to store in battery first
|
|
190
|
-
const remainingBatteryCapacity = this.battery - batteryCharge;
|
|
191
|
-
const energyToStore = Math.min(energyDifference, remainingBatteryCapacity);
|
|
192
|
-
if (energyToStore > 0) {
|
|
193
|
-
batteryCharge += energyToStore;
|
|
194
|
-
energyUsageOfProduction += hourlyConsumption;
|
|
195
|
-
soldEnergy += energyDifference - energyToStore;
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
// Battery full, sell excess
|
|
199
|
-
energyUsageOfProduction += hourlyConsumption;
|
|
200
|
-
soldEnergy += energyDifference;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
else if (energyDifference < 0) {
|
|
204
|
-
// Production deficit - try to use battery
|
|
205
|
-
const energyNeeded = -energyDifference;
|
|
206
|
-
const energyFromBattery = Math.min(energyNeeded, batteryCharge);
|
|
207
|
-
if (energyFromBattery > 0) {
|
|
208
|
-
batteryCharge -= energyFromBattery;
|
|
209
|
-
energyUsageOfProduction += production[i] +
|
|
210
|
-
energyFromBattery;
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
// No battery power available
|
|
214
|
-
energyUsageOfProduction += production[i];
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
// Production equals consumption
|
|
219
|
-
energyUsageOfProduction += hourlyConsumption;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
// Calculate the cost savings
|
|
223
|
-
this.costSavings = soldEnergy * this.compensationRate * 365 +
|
|
224
|
-
energyUsageOfProduction * 365 * this.electricityPrice;
|
|
225
|
-
// Calculate 25-year savings with price increase
|
|
226
|
-
let totalSavings = 0;
|
|
227
|
-
let currentPrice = this.electricityPrice;
|
|
228
|
-
for (let year = 0; year < 25; year++) {
|
|
229
|
-
const yearlySavings = soldEnergy * this.compensationRate * 365 +
|
|
230
|
-
energyUsageOfProduction * 365 * currentPrice;
|
|
231
|
-
totalSavings += yearlySavings;
|
|
232
|
-
currentPrice *= 1 + this.annualPriceIncrease / 100;
|
|
233
|
-
}
|
|
234
|
-
this.costSavings25Years = totalSavings;
|
|
235
|
-
this.autonomy =
|
|
236
|
-
(energyUsageOfProduction / (totalHouseholdConsumption / 365)) *
|
|
237
|
-
100;
|
|
238
|
-
}
|
|
239
|
-
updateChart() {
|
|
240
|
-
// if (!this.chartRef) return;
|
|
241
|
-
// const ctx = this.chartRef.getContext("2d");
|
|
242
|
-
// if (!ctx) return;
|
|
243
|
-
// if (this.chart) {
|
|
244
|
-
// this.chart.destroy();
|
|
245
|
-
// }
|
|
246
|
-
// const hours = Array.from({ length: 24 }, (_, i) => `${i}:00`);
|
|
247
|
-
// const data = CONSUMPTION_PROFILES[this.consumptionProfile];
|
|
248
|
-
// const norm = data.reduce((acc, curr) => acc + curr, 0);
|
|
249
|
-
// const peakKwh = this.numberOfPanels * this.panelPeakPower;
|
|
250
|
-
// const production = SOLAR_RADIATION.map((radiation) =>
|
|
251
|
-
// radiation * peakKwh
|
|
252
|
-
// );
|
|
253
|
-
// for (let i = 0; i < data.length; i++) {
|
|
254
|
-
// data[i] = data[i] * this.householdConsumption / norm / 365;
|
|
255
|
-
// }
|
|
256
|
-
// let datasets = [{
|
|
257
|
-
// label: "Energy Consumption",
|
|
258
|
-
// data: data,
|
|
259
|
-
// borderColor: "#964500",
|
|
260
|
-
// backgroundColor: "rgba(150, 69, 0, 0.1)",
|
|
261
|
-
// fill: true,
|
|
262
|
-
// tension: 0.4,
|
|
263
|
-
// }, {
|
|
264
|
-
// label: "Energy Production",
|
|
265
|
-
// data: production,
|
|
266
|
-
// borderColor: "#000000",
|
|
267
|
-
// backgroundColor: "rgba(0, 0, 0, 0.1)",
|
|
268
|
-
// fill: true,
|
|
269
|
-
// }];
|
|
270
|
-
// this.chart = new Chart(ctx, {
|
|
271
|
-
// type: "line",
|
|
272
|
-
// data: {
|
|
273
|
-
// labels: hours,
|
|
274
|
-
// datasets: datasets,
|
|
275
|
-
// },
|
|
276
|
-
// options: {
|
|
277
|
-
// responsive: true,
|
|
278
|
-
// plugins: {
|
|
279
|
-
// title: {
|
|
280
|
-
// display: true,
|
|
281
|
-
// text: "Daily Consumption Profile",
|
|
282
|
-
// },
|
|
283
|
-
// },
|
|
284
|
-
// scales: {
|
|
285
|
-
// y: {
|
|
286
|
-
// beginAtZero: true,
|
|
287
|
-
// title: {
|
|
288
|
-
// display: true,
|
|
289
|
-
// text: "Relative Consumption",
|
|
290
|
-
// },
|
|
291
|
-
// },
|
|
292
|
-
// x: {
|
|
293
|
-
// title: {
|
|
294
|
-
// display: true,
|
|
295
|
-
// text: "Hour of Day",
|
|
296
|
-
// },
|
|
297
|
-
// },
|
|
298
|
-
// },
|
|
299
|
-
// },
|
|
300
|
-
// });
|
|
301
|
-
}
|
|
302
|
-
componentWillLoad() {
|
|
303
|
-
this.updateSystemConfigs();
|
|
304
|
-
}
|
|
305
|
-
validateForm() {
|
|
306
|
-
let isValid = true;
|
|
307
|
-
const t = getLanguageStrings(state.settings.language);
|
|
308
|
-
// Validate name
|
|
309
|
-
if (!this.name.trim()) {
|
|
310
|
-
this.nameError = t.solarSystemForm.nameError;
|
|
311
|
-
isValid = false;
|
|
312
|
-
}
|
|
313
|
-
else {
|
|
314
|
-
this.nameError = "";
|
|
315
|
-
}
|
|
316
|
-
// Validate email
|
|
317
|
-
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
318
|
-
if (!this.email.trim()) {
|
|
319
|
-
this.emailError = t.solarSystemForm.emailError;
|
|
320
|
-
isValid = false;
|
|
321
|
-
}
|
|
322
|
-
else if (!emailRegex.test(this.email)) {
|
|
323
|
-
this.emailError = t.solarSystemForm.validEmailError;
|
|
324
|
-
isValid = false;
|
|
325
|
-
}
|
|
326
|
-
else {
|
|
327
|
-
this.emailError = "";
|
|
328
|
-
}
|
|
329
|
-
return isValid;
|
|
330
|
-
}
|
|
331
|
-
handleRequestOffer() {
|
|
332
|
-
if (!this.validateForm()) {
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
// Here you can implement the logic to handle the offer request
|
|
336
|
-
console.log("Requesting offer for: ", {
|
|
337
|
-
name: this.name,
|
|
338
|
-
email: this.email,
|
|
339
|
-
systemConfig: this.systemConfigs,
|
|
340
|
-
consumption: this.householdConsumption,
|
|
341
|
-
autonomy: this.autonomy,
|
|
342
|
-
costSavings: this.costSavings,
|
|
343
|
-
roofPolygons: this.roofPolygons,
|
|
344
|
-
obstructionPolygons: this.obstructionPolygons,
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
render() {
|
|
348
|
-
const t = getLanguageStrings(state.settings.language);
|
|
349
|
-
return (h("div", { key: 'f900386e739e03be601dcbd3b56e9193b9918c9c', class: "flex flex-col justify-center items-center w-full h-full pt-4" // style={{
|
|
350
|
-
,
|
|
351
|
-
// display: (Object.keys(this.systemConfigs).length === 0)
|
|
352
|
-
// ? "none"
|
|
353
|
-
// : "flex",
|
|
354
|
-
// }}
|
|
355
|
-
id: "solar-system-form" }, h("h1", { key: '853e513f3c0e29831dae93889d5d95f50373ad9e', class: "text-2xl font-bold text-[#271200] mb-4 w-full" }, t.solarSystemForm.title), h("div", { key: 'a1b1946b52ad2f91b6c97a4cdab6e4df93640b2f', class: "w-full bg-[#f3ebda] rounded-4xl p-6 space-y-6" }, h("div", { key: '7c19d788c86eae08383cf91e90ba23f986a3ff37', class: "space-y-4" }, h("h2", { key: '1405420d65b334691dd3a08347921e6488f6cad5', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.systemInformation), h("div", { key: 'ce01fe0f6be6029cb18f8a3e3aceff91c3f48499', class: "grid grid-rows-2 gap-0" }, h("div", { key: 'aa35d379e3807c08bc733710848696ce711b794c', class: "grid grid-cols-2 gap-4" }, h("label", { key: 'ea961b4b655b9ba0723f27df3d4b520e69bc3fc3', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.numberOfPanels), h("label", { key: 'cd34f9431f44326985d0d1dc3a92fe24d9789e30', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.panelPeakPower)), h("div", { key: '9fe68f3f8b2f027b75f0fb9eaeb0ac6281813ae6', class: "grid grid-cols-2 gap-4" }, h("input", { key: '781684a8b347faa29c368cda5e6b3880d0db2a4d', type: "number", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.numberOfPanels, readOnly: true }), h("input", { key: 'b6ffb5c01e8d1ce097e2bf31d3b79c44fe65f3ee', type: "number", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.panelPeakPower, readonly: true }))), h("div", { key: 'bcc627f1f2df822a572e354d54b08d08b5ab380a', class: "bg-white rounded-4xl p-4" }, h("div", { key: '0d78f8bba40b066ec52145e0516edc5497cdddd2', class: "flex items-center justify-between" }, h("span", { key: 'b4165549254fb259c8040ba770dc87901659b061', class: "text-gray-600" }, t.solarSystemForm.totalSystemPeakPower), h("span", { key: 'b20034fcb42c069bdefa4f9c47030bae8f4b1e4b', class: "text-xl font-bold text-[#271200]" }, (DEFAULT_SOLAR_PANEL_TYPE.kWattPeak *
|
|
356
|
-
this.numberOfPanels).toFixed(1), " kW")))), h("div", { key: 'c89c679fde1ae597f79686213554c12dd8a22a46', class: "space-y-4" }, h("h2", { key: '23830df1f2ecdba69d02c956183cd362078d2d24', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.householdConsumptionTitle), h("div", { key: '475a4146c7504e52f3bacb283b8af35f47ad5a43', class: "grid grid-rows-2 gap-0" }, h("div", { key: '52fbf01dfdd84e2b5c77870cc1d61164579075aa', class: "grid grid-cols-2 gap-4" }, h("label", { key: '162c72eb189ffcfa6447a5ac5adfed83ceabeec7', class: "block text-sm font-medium text-gray-600" }, t.solarSystemForm.annualConsumption), h("label", { key: 'e283fc023a34c8471aa3177d57ed8c7db3b097b2', class: "block text-sm font-medium text-gray-600" }, t.solarSystemForm.consumptionProfileTitle)), h("div", { key: '61ba7bba4681174974feea2bb367cbc8ccef12e6', class: "grid grid-cols-2 gap-4" }, h("input", { key: 'd9db3dd0fc8358ab66b85396693bc805cd608a32', type: "number", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.householdConsumption, onInput: (e) => {
|
|
357
|
-
this.householdConsumption = parseInt(e.target
|
|
358
|
-
.value);
|
|
359
|
-
this.recalculate();
|
|
360
|
-
this.updateChart();
|
|
361
|
-
} }), h("select", { key: 'bc3f018b0e3610911a313361b4ccfae5fe3b09b9', class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", onChange: (e) => {
|
|
362
|
-
this.consumptionProfile =
|
|
363
|
-
e.target
|
|
364
|
-
.value;
|
|
365
|
-
this.recalculate();
|
|
366
|
-
this.updateChart();
|
|
367
|
-
} }, h("option", { key: 'eed73b9e3f47b5ca6050e29180ea388cd3c915d0', value: "mostly_at_home", selected: this.consumptionProfile ===
|
|
368
|
-
"mostly_at_home" }, t.solarSystemForm.consumptionProfiles
|
|
369
|
-
.mostlyAtHome), h("option", { key: '75c4b6dbb160258533d53ffe5105dc80704ce1b5', value: "mostly_away", selected: this.consumptionProfile ===
|
|
370
|
-
"mostly_away" }, t.solarSystemForm.consumptionProfiles
|
|
371
|
-
.mostlyAway))))), h("div", { key: '02d03da8ecf11bd3b78c21f1b42cb862879f80d2', class: "space-y-4" }, h("h2", { key: 'f136aa12ba42d5f2752f93c2727523053d0e4e07', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.additionalComponents.title), h("div", { key: 'e84c599231f113dc00dc14d679b4f3c7ec03972f', class: "flex flex-col gap-4" }, h("div", { key: '49496d607698485677692f6e651ca3ad557f83d5', class: "flex flex-col bg-white rounded-4xl p-4 gap-4" }, h("div", { key: '4a77af1f155ff1a2831e4c30cf354d765d1c89f6', class: "flex items-center justify-between" }, h("div", { key: '406d4a5cb7daf2dbe3810c5abba54ce9b9fda8b6', class: "flex items-center gap-2" }, h("input", { key: '0d715601b805f86c050cdd9c4cd526a422441d0a', type: "checkbox", id: "heatPump", class: "w-4 h-4 accent-[#964500] border-gray-300 rounded-full focus:ring-[#964500] focus:ring-offset-0 focus:ring-2", checked: this.heatPump > 0, onChange: (e) => {
|
|
372
|
-
this.heatPump =
|
|
373
|
-
e.target
|
|
374
|
-
.checked
|
|
375
|
-
? 100
|
|
376
|
-
: 0;
|
|
377
|
-
this.recalculate();
|
|
378
|
-
} }), h("label", { key: 'ca7f594131c1b38d8354d9b613278fb3b5115421', htmlFor: "heatPump", class: "text-gray-600" }, t.solarSystemForm
|
|
379
|
-
.additionalComponents
|
|
380
|
-
.heatPump)), this.heatPump > 0 && (h("span", { key: 'c084c1de7c4e5ffeaea41a458d37316b0d10882a', class: "text-gray-600" }, this.heatPump, " m\u00B2"))), this.heatPump > 0 && (h("div", { key: 'c06d4124569d2ece44eccaba71aef3b2187efcb1', class: "flex flex-col gap-2" }, h("input", { key: '3bbc9b18beda8e88ecdcb013c52ac18809a2e8ca', type: "range", min: "10", max: "300", step: "10", class: "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-white", value: this.heatPump, onInput: (e) => {
|
|
381
|
-
this.heatPump = parseInt(e.target
|
|
382
|
-
.value);
|
|
383
|
-
this.recalculate();
|
|
384
|
-
} })))), h("div", { key: 'e3c457c9a457d2b8661abcf75a5a518a6a6f507a', class: "flex flex-col bg-white rounded-4xl p-4 gap-4" }, h("div", { key: '4074cb86c2e58229168bd52bc6a71e7af6398ad6', class: "flex items-center justify-between" }, h("div", { key: '16831cc0608c21bd8f8755a3d0934ab665745692', class: "flex items-center gap-2" }, h("input", { key: '91d96004f0dc693578f89d118bcce87093821cf0', type: "checkbox", id: "electricCar", class: "w-4 h-4 accent-[#964500] border-gray-300 rounded focus:ring-[#964500] focus:ring-offset-0 focus:ring-2", checked: this.electricCar, onChange: (e) => {
|
|
385
|
-
this.electricCar =
|
|
386
|
-
e.target
|
|
387
|
-
.checked;
|
|
388
|
-
this.recalculate();
|
|
389
|
-
} }), h("label", { key: '2474e63d5479806ae9c2fc800b49504499c2fa6c', htmlFor: "electricCar", class: "text-gray-600" }, t.solarSystemForm
|
|
390
|
-
.additionalComponents
|
|
391
|
-
.electricCar))), this.electricCar && (h("div", { key: '9465955a1cf5b742c7589c62e71cbc4a56d0cef9', class: "flex flex-col gap-2" }, h("label", { key: '36443b598c3e95159e0dc2343235e361b805bbbe', class: "text-sm text-gray-600" }, t.solarSystemForm
|
|
392
|
-
.additionalComponents
|
|
393
|
-
.chargingTime), h("select", { key: '21a0baf1b1ec4d58517179c37d058c156661645c', class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", onChange: (e) => {
|
|
394
|
-
this.electricCarChargingTime =
|
|
395
|
-
e.target
|
|
396
|
-
.value;
|
|
397
|
-
this.recalculate();
|
|
398
|
-
} }, h("option", { key: '207f35aa95436bfcfb10e4eb97a7edf4a0eafa1f', value: "day", selected: this
|
|
399
|
-
.electricCarChargingTime ===
|
|
400
|
-
"day" }, t.solarSystemForm
|
|
401
|
-
.additionalComponents
|
|
402
|
-
.chargingTimeDay), h("option", { key: '58e5bd73f50127d5e0bce07b9f82d546efe3dea4', value: "night", selected: this
|
|
403
|
-
.electricCarChargingTime ===
|
|
404
|
-
"night" }, t.solarSystemForm
|
|
405
|
-
.additionalComponents
|
|
406
|
-
.chargingTimeNight))))), h("div", { key: 'c10fae6c6f9712d0221711539f1735bda5acf123', class: "flex flex-col bg-white rounded-4xl p-4 gap-4" }, h("div", { key: '2e6da0a061db6ea28a4913677c892bd4f0de62bf', class: "flex items-center justify-between" }, h("label", { key: '86855eba836bfbd7e28aabd61a6bc1d804047cba', class: "text-gray-600" }, t.solarSystemForm.additionalComponents
|
|
407
|
-
.battery), h("span", { key: '1e77f5431721b4de66aacb08caec4d9315ee2987', class: "text-gray-600" }, this.battery, " kWh")), h("div", { key: 'f0a2477758b2d21ce7afd47e064c379bdf9f220e', class: "flex flex-col gap-2" }, h("input", { key: 'cb6ad0d4131896ad131067bca9818818b869bf4e', type: "range", min: "0", max: "20", step: "1", class: "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-white", value: this.battery, onInput: (e) => {
|
|
408
|
-
this.battery = parseInt(e.target
|
|
409
|
-
.value);
|
|
410
|
-
this.recalculate();
|
|
411
|
-
} }))))), h("div", { key: '28db1c220c3748a58a673a634383727a8470ce36', class: "space-y-4" }, h("h2", { key: 'b81b18400b3649aea81b565cbcc9ce1fd01050db', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.electricityCostsTitle), h("div", { key: '5c7b172a9e1fe43c0429be3963d21e45e814b0c6', class: "grid grid-rows-2 gap-0" }, h("div", { key: 'd72f5fc0be4ca75bc25732eb4f51cfbc943de231', class: "grid grid-cols-3 gap-4" }, h("label", { key: '114f86a301efeec32be8422a75fd0678a1b25c51', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.electricityPrice), h("label", { key: '4530512fdae93be4ae8ec4d679a62c5322dc9802', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.compensationRate), h("label", { key: 'a82d5c1391a35e5f1fbed03592ec9f8ecca493b4', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.annualPriceIncrease)), h("div", { key: 'bd31f29e1cd4a9927f850b2c2d8b20a677fae3eb', class: "grid grid-cols-3 gap-4" }, h("input", { key: '56e603dd7ffcde16e6ea30470ee047afe2baedb2', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.electricityPrice.toFixed(2), onInput: (e) => {
|
|
412
|
-
this.electricityPrice = parseFloat(e.target
|
|
413
|
-
.value);
|
|
414
|
-
this.recalculate();
|
|
415
|
-
this.updateChart();
|
|
416
|
-
} }), h("input", { key: 'a9f21bb0ef842975f13528995beb35c7990fbab7', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.compensationRate.toFixed(2), onInput: (e) => {
|
|
417
|
-
this.compensationRate = parseFloat(e.target
|
|
418
|
-
.value);
|
|
419
|
-
this.recalculate();
|
|
420
|
-
this.updateChart();
|
|
421
|
-
} }), h("input", { key: '6fd5d4dfe880ee443891fdf5a21a6cadf1a85c3f', type: "number", step: "0.1", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.annualPriceIncrease.toFixed(1), onInput: (e) => {
|
|
422
|
-
this.annualPriceIncrease = parseFloat(e.target
|
|
423
|
-
.value);
|
|
424
|
-
this.recalculate();
|
|
425
|
-
this.updateChart();
|
|
426
|
-
} })))), h("div", { key: 'fd3a7340b7d52bf8f80d16a6dd841c5e51f73222', class: "space-y-4 pt-4 border-t border-gray-200" }, h("h2", { key: 'c73f74d7b8e6ae17f1ecc12d40d48bbb7d27d4fd', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.resultsTitle), h("div", { key: '2c5638f28adff933740af2ef0fef2f6bcb6428cb', class: "bg-white rounded-4xl p-4" }, h("div", { key: 'ba33ed8f3cff389a325e8a74335b50c056b9973d', class: "flex items-center justify-between" }, h("span", { key: '9a6468ff0e8be96ffe7b81de63b26d9b6bdec9b1', class: "text-gray-600" }, t.solarSystemForm.autonomy), h("span", { key: '0c376539bd769b62b8d0103d5d7c5e7c5654704c', class: "text-xl font-bold text-[#271200]" }, this.autonomy.toFixed(1), "%")), h("div", { key: 'b316b179f78843bcdf47963a9b92997c6f9d3a11', class: "flex items-center justify-between mt-4" }, h("div", { key: 'bff0c9af332674cabdd3566f9e86714940810570', class: "flex items-center gap-2" }, h("span", { key: '0d488cc9c359e963b1bd7aeed4b70a1191bdaf9c', class: "text-gray-600" }, t.solarSystemForm.costSavings), h("div", { key: 'e382818ebf3e80c2a88e93a80142e8671163a116', class: "relative group" }, h("svg", { key: 'd5384665b7135e0cdf869053cde0b420340cbf8b', xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-gray-400 cursor-help", viewBox: "0 0 20 20", fill: "currentColor" }, h("path", { key: 'ced49e7857a8103d87a64f3910d70040cb462212', "fill-rule": "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z", "clip-rule": "evenodd" })), h("div", { key: 'c9be804634970c9ad741141ed2d9117f688c91f4', class: "absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-64 p-2 bg-gray-800 text-white text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none" }, t.solarSystemForm
|
|
427
|
-
.savingsDisclaimer))), h("span", { key: '6b0d784381a52d618f999077f8b1f8c5720f556d', class: "text-xl font-bold text-green-600" }, this.costSavings.toFixed(2), "\u20AC/", t
|
|
428
|
-
.solarSystemForm.year)), h("div", { key: '20d043402e17310210c77d151e690e99599b44eb', class: "flex items-center justify-between mt-4" }, h("div", { key: '81af26d3e1f16d2bf390dfa5b1313bae981325e0', class: "flex items-center gap-2" }, h("span", { key: '6ed1b80be4e775ec4ded53e404ea168d424f27df', class: "text-gray-600" }, t.solarSystemForm.costSavings25Years)), h("span", { key: '8071db153adefed6eeca2614fbfcbc9de2e9bbba', class: "text-xl font-bold text-green-600" }, this.costSavings25Years.toFixed(2), "\u20AC")))), h("div", { key: '9f382434d1dd435a37d4bc1f7a34d3214af79261', class: "space-y-4 pt-4 border-t border-gray-200" }, h("h2", { key: 'b10014b2612f8a9fda77e3d9cfa7180753982c92', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.requestOffer), h("div", { key: 'd19838f836105b225cdd939aef0fe3f50358d80d', class: "grid grid-rows-2 gap-0" }, h("div", { key: '36d2c6bf02c745eb06c8975c5ede37fd6543a436', class: "grid grid-cols-2 gap-4" }, h("label", { key: '58288d0a2ba4392a2c3b9b2252d7d32b27923cfc', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.name), h("label", { key: 'd208c5f92e82480b7fce8e9138413cc2f89d21fc', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.email)), h("div", { key: 'd788fd9f52636dd201616073283c3327e20d78fd', class: "grid grid-cols-2 gap-4" }, h("input", { key: '0db1956f45d25c951046a416c1891cdfe1680860', type: "text", class: `w-full px-4 py-2 rounded-4xl border ${this.nameError
|
|
429
|
-
? "border-red-500"
|
|
430
|
-
: "border-gray-300"} focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white`, value: this.name, onInput: (e) => {
|
|
431
|
-
this.name =
|
|
432
|
-
e.target
|
|
433
|
-
.value;
|
|
434
|
-
this.validateForm();
|
|
435
|
-
}, placeholder: "Your name" }), this.nameError && (h("p", { key: '2c440284521554b07572cf41ee32afbd5098d9d0', class: "text-red-500 text-sm mt-1" }, this.nameError)), h("input", { key: '12f13f01ab6c6df21099754cd3d690a9ca2c91ad', type: "email", class: `w-full px-4 py-2 rounded-4xl border ${this.emailError
|
|
436
|
-
? "border-red-500"
|
|
437
|
-
: "border-gray-300"} focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white`, value: this.email, onInput: (e) => {
|
|
438
|
-
this.email =
|
|
439
|
-
e.target
|
|
440
|
-
.value;
|
|
441
|
-
this.validateForm();
|
|
442
|
-
}, placeholder: "your.email@example.com" }), this.emailError && (h("p", { key: '2007c59ddc380d5cbacefd6abccf43913226a071', class: "text-red-500 text-sm mt-1" }, this.emailError)))), h("div", { key: 'ec7c46b011b1f98e3e3bd3dc896d8cc6eaeb752e', class: "flex justify-center" }, h("button", { key: '832975047a4017261414d9d999ba89ee6db3cc58', onClick: () => this.handleRequestOffer(), disabled: !this.name.trim() ||
|
|
443
|
-
!this.email.trim() || !!this.nameError ||
|
|
444
|
-
!!this.emailError, class: "px-4 py-2 bg-[#271200] rounded-4xl hover:bg-[#964500] transition-colors duration-200", style: { color: "white" } }, t.solarSystemForm.requestOfferButton))))));
|
|
445
|
-
}
|
|
446
|
-
static get watchers() { return {
|
|
447
|
-
"systemConfigs": ["updateSystemConfigs"]
|
|
448
|
-
}; }
|
|
449
|
-
static get style() { return outputCss; }
|
|
450
|
-
}, [0, "solar-system-form", {
|
|
451
|
-
"systemConfigs": [16, "system-configs"],
|
|
452
|
-
"roofPolygons": [16, "roof-polygons"],
|
|
453
|
-
"obstructionPolygons": [16, "obstruction-polygons"],
|
|
454
|
-
"householdConsumption": [32],
|
|
455
|
-
"consumptionProfile": [32],
|
|
456
|
-
"electricityPrice": [32],
|
|
457
|
-
"compensationRate": [32],
|
|
458
|
-
"annualPriceIncrease": [32],
|
|
459
|
-
"autonomy": [32],
|
|
460
|
-
"costSavings": [32],
|
|
461
|
-
"costSavings25Years": [32],
|
|
462
|
-
"numberOfPanels": [32],
|
|
463
|
-
"panelPeakPower": [32],
|
|
464
|
-
"name": [32],
|
|
465
|
-
"email": [32],
|
|
466
|
-
"nameError": [32],
|
|
467
|
-
"emailError": [32],
|
|
468
|
-
"electricCar": [32],
|
|
469
|
-
"electricCarChargingTime": [32],
|
|
470
|
-
"heatPump": [32],
|
|
471
|
-
"battery": [32]
|
|
472
|
-
}, undefined, {
|
|
473
|
-
"systemConfigs": ["updateSystemConfigs"]
|
|
474
|
-
}]);
|
|
475
|
-
function defineCustomElement() {
|
|
476
|
-
if (typeof customElements === "undefined") {
|
|
477
|
-
return;
|
|
478
|
-
}
|
|
479
|
-
const components = ["solar-system-form"];
|
|
480
|
-
components.forEach(tagName => { switch (tagName) {
|
|
481
|
-
case "solar-system-form":
|
|
482
|
-
if (!customElements.get(tagName)) {
|
|
483
|
-
customElements.define(tagName, SolarSystemForm);
|
|
484
|
-
}
|
|
485
|
-
break;
|
|
486
|
-
} });
|
|
487
|
-
}
|
|
488
|
-
defineCustomElement();
|
|
489
|
-
|
|
490
|
-
export { BORDER_INSET as B, COLUMN_SPACING as C, DOTTED_LINE_COLOR as D, ROW_SPACING as R, SolarSystemForm as S, DEFAULT_SOLAR_EXPERT_CONFIG as a, DEFAULT_SOLAR_PANEL_TYPE as b, DEFAULT_SUNNINESS as c, defineCustomElement as d };
|
|
491
|
-
//# sourceMappingURL=p-BzuGyPz5.js.map
|
|
492
|
-
|
|
493
|
-
//# sourceMappingURL=p-BzuGyPz5.js.map
|