blue-chestnut-solar-expert 0.0.34 → 0.0.35
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 -1
- package/dist/cjs/eraser-icon_16.cjs.entry.js +78 -42
- package/dist/cjs/eraser-icon_16.cjs.entry.js.map +1 -1
- package/dist/cjs/loading-widget.cjs.entry.js +1 -1
- package/dist/collection/components/map-draw/tool-box.js +7 -3
- package/dist/collection/components/map-draw/tool-box.js.map +1 -1
- package/dist/collection/components/solar-expert/solar-expert.js +2 -2
- package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
- package/dist/collection/components/solar-system-form/solar-system-form.js +58 -33
- 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 +1 -1
- package/dist/collection/constants.js.map +1 -1
- package/dist/collection/types/lang.js.map +1 -1
- package/dist/collection/utils/lang/english.js +1 -0
- package/dist/collection/utils/lang/english.js.map +1 -1
- package/dist/collection/utils/lang/german.js +1 -0
- package/dist/collection/utils/lang/german.js.map +1 -1
- package/dist/collection/utils/lang/spanish.js +1 -0
- package/dist/collection/utils/lang/spanish.js.map +1 -1
- package/dist/collection/utils/simulation/simulation.js +8 -3
- package/dist/collection/utils/simulation/simulation.js.map +1 -1
- package/dist/collection/utils/simulation/types.js.map +1 -1
- package/dist/components/loading-widget.js +1 -1
- package/dist/components/map-draw.js +1 -1
- package/dist/components/map-selector.js +1 -1
- package/dist/components/{p-DbJfa2yQ.js → p-2Um_yzGy.js} +3 -3
- package/dist/components/{p-DbJfa2yQ.js.map → p-2Um_yzGy.js.map} +1 -1
- package/dist/components/{p-BGxYjXB5.js → p-3JEPWoBM.js} +3 -3
- package/dist/components/{p-BGxYjXB5.js.map → p-3JEPWoBM.js.map} +1 -1
- package/dist/components/{p-BcV6HHN8.js → p-BU8VgrD9.js} +3 -3
- package/dist/components/{p-BcV6HHN8.js.map → p-BU8VgrD9.js.map} +1 -1
- package/dist/components/{p-CrzEBN9H.js → p-C8ujytCa.js} +69 -40
- package/dist/components/p-C8ujytCa.js.map +1 -0
- package/dist/components/{p-B1ywivYa.js → p-CUDvRPwB.js} +3 -3
- package/dist/components/{p-B1ywivYa.js.map → p-CUDvRPwB.js.map} +1 -1
- package/dist/components/{p-DMkbzkL_.js → p-DJT7IBlC.js} +10 -6
- package/dist/components/p-DJT7IBlC.js.map +1 -0
- package/dist/components/{p-BLXc1FjC.js → p-DmmMPG7q.js} +5 -2
- package/dist/components/p-DmmMPG7q.js.map +1 -0
- package/dist/components/{p-ClYOM_0b.js → p-wv9-rUOt.js} +8 -8
- package/dist/components/{p-ClYOM_0b.js.map → p-wv9-rUOt.js.map} +1 -1
- package/dist/components/polygon-buttons.js +1 -1
- package/dist/components/polygon-information.js +1 -1
- package/dist/components/settings-modal.js +1 -1
- package/dist/components/solar-expert.js +10 -10
- 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/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 -1
- package/dist/esm/eraser-icon_16.entry.js +78 -42
- package/dist/esm/eraser-icon_16.entry.js.map +1 -1
- package/dist/esm/loading-widget.entry.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 -1
- package/dist/stencil-library/{p-1e4e5fe9.entry.js → p-b1771344.entry.js} +2 -2
- package/dist/stencil-library/p-e92dbc2a.entry.js +2 -0
- package/dist/stencil-library/p-e92dbc2a.entry.js.map +1 -0
- package/dist/stencil-library/stencil-library.esm.js +1 -1
- package/dist/types/components/solar-system-form/solar-system-form.d.ts +1 -0
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/types/lang.d.ts +1 -0
- package/dist/types/utils/simulation/types.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/p-BLXc1FjC.js.map +0 -1
- package/dist/components/p-CrzEBN9H.js.map +0 -1
- package/dist/components/p-DMkbzkL_.js.map +0 -1
- package/dist/stencil-library/p-958f0a27.entry.js +0 -2
- package/dist/stencil-library/p-958f0a27.entry.js.map +0 -1
- /package/dist/stencil-library/{p-1e4e5fe9.entry.js.map → p-b1771344.entry.js.map} +0 -0
|
@@ -209,7 +209,7 @@ const ROW_SPACING = 1;
|
|
|
209
209
|
const COLUMN_SPACING = 1;
|
|
210
210
|
const BORDER_INSET = 0;
|
|
211
211
|
const DEFAULT_SUNNINESS = 600;
|
|
212
|
-
const HEAT_PUMP_CONSUMPTION = 0.
|
|
212
|
+
const HEAT_PUMP_CONSUMPTION = 0.02; // kWh per m² per day
|
|
213
213
|
const CONSUMPTION_PROFILES = {
|
|
214
214
|
mostly_at_home: [
|
|
215
215
|
0.1,
|
|
@@ -1082,6 +1082,7 @@ const en = {
|
|
|
1082
1082
|
electricityPrice: "Electricity Price (€/kWh)",
|
|
1083
1083
|
compensationRate: "Compensation Rate (€/kWh)",
|
|
1084
1084
|
autonomy: "Autonomy",
|
|
1085
|
+
totalEnergyConsumption: "Total Energy Consumption",
|
|
1085
1086
|
costSavings: "Cost Savings (€/year)",
|
|
1086
1087
|
householdConsumptionTitle: "Household Electricity Consumption",
|
|
1087
1088
|
consumptionProfileTitle: "Consumption Profile",
|
|
@@ -1198,6 +1199,7 @@ const de = {
|
|
|
1198
1199
|
electricityPrice: "Strompreis (€/kWh)",
|
|
1199
1200
|
compensationRate: "Einspeisevergütung (€/kWh)",
|
|
1200
1201
|
autonomy: "Autarkie",
|
|
1202
|
+
totalEnergyConsumption: "Gesamtenergieverbrauch",
|
|
1201
1203
|
costSavings: "Einsparungen (€/Jahr)",
|
|
1202
1204
|
householdConsumptionTitle: "Haushaltsverbrauch",
|
|
1203
1205
|
consumptionProfileTitle: "Verbrauchprofil",
|
|
@@ -1314,6 +1316,7 @@ const es = {
|
|
|
1314
1316
|
electricityPrice: "Precio de la electricidad (€/kWh)",
|
|
1315
1317
|
compensationRate: "Tasa de compensación (€/kWh)",
|
|
1316
1318
|
autonomy: "Autonomía",
|
|
1319
|
+
totalEnergyConsumption: "Consumo Total de Energía",
|
|
1317
1320
|
costSavings: "Ahorro (€/año)",
|
|
1318
1321
|
householdConsumptionTitle: "Consumo de la casa",
|
|
1319
1322
|
consumptionProfileTitle: "Perfil de consumo",
|
|
@@ -2779,7 +2782,7 @@ const SolarExpert = class {
|
|
|
2779
2782
|
state.settings.language = this.language;
|
|
2780
2783
|
const isIPhone = navigator.userAgent.indexOf("iPhone") != -1;
|
|
2781
2784
|
const isMac = navigator.userAgent.indexOf("Mac OS") != -1;
|
|
2782
|
-
state.isIOS = isIPhone || isMac
|
|
2785
|
+
state.isIOS = isIPhone || isMac;
|
|
2783
2786
|
if (!this.colorScheme) {
|
|
2784
2787
|
applyThemeToElement(this.el, DEFAULT_COLOR_SCHEME);
|
|
2785
2788
|
applyThemeGlobally(DEFAULT_COLOR_SCHEME);
|
|
@@ -2843,7 +2846,7 @@ const SolarExpert = class {
|
|
|
2843
2846
|
}
|
|
2844
2847
|
render() {
|
|
2845
2848
|
const t = getLanguageStrings(this.language);
|
|
2846
|
-
return (index.h("div", { key: '
|
|
2849
|
+
return (index.h("div", { key: 'f9bac9f41ec94a5dd11f85477fc8f739faa7f909', class: "flex flex-col w-full h-full p-3 m-auto", id: "solar-calculator" }, this.showMapSelector
|
|
2847
2850
|
? (index.h("map-selector", { "api-key": this.apiKey, language: this.language }))
|
|
2848
2851
|
: (index.h(index.h.Fragment, null, index.h("div", { class: "pb-3 flex flex-row gap-4 items-stretch w-full" }, index.h("div", { class: "relative flex-3" }, index.h("div", { class: "absolute left-3 top-0 h-full flex items-center text-muted-foreground pointer-events-none" }, index.h("search-icon", null)), index.h("input", { ref: (el) => this.inputElement = el, type: "text", placeholder: t.solarExpert
|
|
2849
2852
|
.searchPlaceholder, class: "w-full pl-10 pr-4 py-2 border border-border rounded-4xl focus:ring-secondary bg-muted text-muted-foreground h-full" })), index.h("button", { onClick: () => this.handleChooseOnMap(), class: "flex-1 pl-4 pr-4 py-2 border border-border bg-muted rounded-4xl focus:ring-secondary hover:bg-secondary hover:text-muted" }, t.mapSelector.chooseOnMap)), index.h("map-draw", { apiKey: this.apiKey })))));
|
|
@@ -2913,8 +2916,13 @@ function simulateDay(production, consumption, dailyConsumption, battery) {
|
|
|
2913
2916
|
const energyDifference = production[hour] - consumption[hour];
|
|
2914
2917
|
if (energyDifference > 0) {
|
|
2915
2918
|
energyUsageOfProduction += consumption[hour];
|
|
2916
|
-
if (batteryCharge < battery) {
|
|
2917
|
-
batteryCharge =
|
|
2919
|
+
if (batteryCharge < battery && batteryCharge + energyDifference <= battery) {
|
|
2920
|
+
batteryCharge = batteryCharge + energyDifference;
|
|
2921
|
+
}
|
|
2922
|
+
else if (batteryCharge < battery) {
|
|
2923
|
+
const batteryDifference = battery - batteryCharge;
|
|
2924
|
+
batteryCharge = battery;
|
|
2925
|
+
soldEnergy += energyDifference - batteryDifference;
|
|
2918
2926
|
}
|
|
2919
2927
|
else {
|
|
2920
2928
|
soldEnergy += energyDifference;
|
|
@@ -2928,7 +2936,6 @@ function simulateDay(production, consumption, dailyConsumption, battery) {
|
|
|
2928
2936
|
}
|
|
2929
2937
|
else {
|
|
2930
2938
|
energyUsageOfProduction += production[hour] + batteryCharge;
|
|
2931
|
-
soldEnergy -= energyDifference + batteryCharge;
|
|
2932
2939
|
batteryCharge = 0;
|
|
2933
2940
|
}
|
|
2934
2941
|
}
|
|
@@ -2989,6 +2996,7 @@ function simulate(config) {
|
|
|
2989
2996
|
autonomy: (summerDay.autonomy + winterDay.autonomy) / 2,
|
|
2990
2997
|
compensationPerDay: soldEnergy * config.electricityPrice.sell,
|
|
2991
2998
|
byYearSavedCosts: savedCostsByYear,
|
|
2999
|
+
totalEnergyConsumptionDay: (summerConsumptionWholeDay + winterConsumptionWholeDay) / 2,
|
|
2992
3000
|
};
|
|
2993
3001
|
}
|
|
2994
3002
|
|
|
@@ -3035,6 +3043,16 @@ const SolarSystemForm = class {
|
|
|
3035
3043
|
.kWattPeak;
|
|
3036
3044
|
this.recalculate();
|
|
3037
3045
|
}
|
|
3046
|
+
formatEuropeanNumber(num, decimals = 2) {
|
|
3047
|
+
const fixed = num.toFixed(decimals);
|
|
3048
|
+
const [integerPart, decimalPart] = fixed.split(".");
|
|
3049
|
+
// Add dots as thousands separators
|
|
3050
|
+
const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
|
|
3051
|
+
// Join with comma as decimal separator
|
|
3052
|
+
return decimalPart
|
|
3053
|
+
? `${formattedInteger},${decimalPart}`
|
|
3054
|
+
: formattedInteger;
|
|
3055
|
+
}
|
|
3038
3056
|
recalculate() {
|
|
3039
3057
|
const simulationConfig = {
|
|
3040
3058
|
general: {
|
|
@@ -3131,13 +3149,13 @@ const SolarSystemForm = class {
|
|
|
3131
3149
|
}
|
|
3132
3150
|
render() {
|
|
3133
3151
|
const t = getLanguageStrings(state.settings.language);
|
|
3134
|
-
return (index.h("div", { key: '
|
|
3152
|
+
return (index.h("div", { key: '1ae88d30fbe89d5117b06b72258eb614b5e9371d', class: "flex flex-col justify-center items-center w-full h-full pt-4" // style={{
|
|
3135
3153
|
,
|
|
3136
3154
|
// display: (Object.keys(this.systemConfigs).length === 0)
|
|
3137
3155
|
// ? "none"
|
|
3138
3156
|
// : "flex",
|
|
3139
3157
|
// }}
|
|
3140
|
-
id: "solar-system-form" }, index.h("h1", { key: '
|
|
3158
|
+
id: "solar-system-form" }, index.h("h1", { key: '6be2af903cc9eab0aaade44ba5ced159debb7865', class: "text-2xl font-bold text-secondary mb-4 w-full" }, t.solarSystemForm.title), index.h("div", { key: 'd22714961f748004062408498d98935760fd0ba5', class: "w-full bg-primary rounded-4xl p-6 space-y-6" }, index.h("div", { key: '2379aa7eff17d0e5e702d5d4374fc17a7fb94ffd', class: "space-y-4" }, index.h("h2", { key: 'f73f73ccc7b3152b318d9e2c09cf85920a13b236', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.systemInformation), index.h("div", { key: '8fda12c5d7eec29418ad796112dc64f50e73eead', class: "grid grid-rows-3 gap-0" }, index.h("div", { key: 'd6a4a9b312299b9f9959a5844bf5b9334b998fec', class: "grid grid-cols-2 gap-4" }, index.h("label", { key: 'a2a7db81b5bb8e21763464ff4cff3e30bef74fc3', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.numberOfPanels), index.h("label", { key: 'fc9b18fcd0e8b8f4e878c40e30a22ea397294c5c', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.panelPeakPower)), index.h("div", { key: 'edf38f4430c8a70bd2b1f39a027657ed59ffeb18', class: "grid grid-cols-2 gap-4" }, !this.isIOS()
|
|
3141
3159
|
? (index.h("input", { type: "number", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", value: this.numberOfPanels, readOnly: true }))
|
|
3142
3160
|
: (index.h("input", { type: "number", min: "1", max: this.maxPanels, class: "flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", value: this.numberOfPanels, onInput: (e) => {
|
|
3143
3161
|
const value = parseInt(e.target
|
|
@@ -3148,36 +3166,36 @@ const SolarSystemForm = class {
|
|
|
3148
3166
|
this.numberOfPanels = value;
|
|
3149
3167
|
this.recalculate();
|
|
3150
3168
|
}
|
|
3151
|
-
} })), index.h("input", { key: '
|
|
3152
|
-
(index.h("input", { key: '
|
|
3169
|
+
} })), index.h("input", { key: '312408e6c6bbb9badf4b699606ad017e200c6e26', type: "number", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", value: this.panelPeakPower, readonly: true })), index.h("div", { key: 'b02e4d8355f23b0a703056797ba570aea6623ebf', class: "grid grid-cols-2 gap-4" }, index.h("div", { key: '00ab5e96539ce96f65dc6b612741ca87a89a527c', class: "w-full pt-2" }, !this.isIOS() &&
|
|
3170
|
+
(index.h("input", { key: '5b892d1da7810fb107f17939469329478ff6af32', 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) => {
|
|
3153
3171
|
this.numberOfPanels =
|
|
3154
3172
|
parseInt(e.target
|
|
3155
3173
|
.value);
|
|
3156
3174
|
this.recalculate();
|
|
3157
|
-
} }))))), index.h("div", { key: '
|
|
3158
|
-
this.numberOfPanels).toFixed(1), " kW")))), index.h("div", { key: '
|
|
3175
|
+
} }))))), index.h("div", { key: '38eba0ef58b127f95e6bafcf0604e6b515db9341', class: "bg-muted rounded-4xl p-4" }, index.h("div", { key: '00d5d43ce80bedafe103ef31835fada196761cfa', class: "flex items-center justify-between" }, index.h("span", { key: '9c2500184852f0b7b4de75b1caf0a70d3c86fb7b', class: "text-text-muted" }, t.solarSystemForm.totalSystemPeakPower), index.h("span", { key: 'de96fd48027d7a95bb628b0455a042fee4033dad', class: "text-xl font-bold text-secondary" }, (DEFAULT_SOLAR_PANEL_TYPE.kWattPeak *
|
|
3176
|
+
this.numberOfPanels).toFixed(1), " kW")))), index.h("div", { key: 'e03cc455e8a3f74b33e07b25d6ad03ec02aa573c', class: "space-y-4" }, index.h("h2", { key: 'c76da7ecabe9c84dfb6648aa752241a3400f696c', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.householdConsumptionTitle), index.h("div", { key: '574a3c0b62f1e1972ae79047dc6cc2f298a4479e', class: "grid grid-rows-2 gap-0" }, index.h("div", { key: 'd29dda751ad3ec80253c2247db21f0d831e5ecbd', class: "grid grid-cols-2 gap-4" }, index.h("label", { key: '637a2bf8d0b779a9819742d1083a98f72cbdff92', class: "block text-sm font-medium text-text-muted" }, t.solarSystemForm.annualConsumption), index.h("label", { key: '3756f091f2f85dafe6301d82789a6c69251fd2f8', class: "block text-sm font-medium text-text-muted" }, t.solarSystemForm.consumptionProfileTitle)), index.h("div", { key: '91822e7ef92a9297abcfe4ee0900377a26919542', class: "grid grid-cols-2 gap-4" }, index.h("input", { key: 'd6efc3b9d5482e8d4c4a1e212f11d4e1663781eb', type: "number", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", value: this.householdConsumption, onInput: (e) => {
|
|
3159
3177
|
this.householdConsumption = parseInt(e.target
|
|
3160
3178
|
.value);
|
|
3161
3179
|
this.recalculate();
|
|
3162
|
-
} }), index.h("select", { key: '
|
|
3180
|
+
} }), index.h("select", { key: 'd206161ce9c8b56f6b71ff23d688d76aa87ed10e', class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", onChange: (e) => {
|
|
3163
3181
|
this.consumptionProfile =
|
|
3164
3182
|
e.target
|
|
3165
3183
|
.value;
|
|
3166
3184
|
this.recalculate();
|
|
3167
|
-
} }, index.h("option", { key: '
|
|
3185
|
+
} }, index.h("option", { key: '3277b1fa3f7adb6761f61e120b82c0cc0afdffc2', value: "mostly_at_home", selected: this.consumptionProfile ===
|
|
3168
3186
|
"mostly_at_home" }, t.solarSystemForm.consumptionProfiles
|
|
3169
|
-
.mostlyAtHome), index.h("option", { key: '
|
|
3187
|
+
.mostlyAtHome), index.h("option", { key: 'ba986968b4e63e53bbefba4551cb3d13d2631b86', value: "mostly_away", selected: this.consumptionProfile ===
|
|
3170
3188
|
"mostly_away" }, t.solarSystemForm.consumptionProfiles
|
|
3171
|
-
.mostlyAway))))), index.h("div", { key: '
|
|
3189
|
+
.mostlyAway))))), index.h("div", { key: 'b1df61d9586befe53d46457fd2d0836a5b5bc697', class: "space-y-4" }, index.h("h2", { key: 'd24180e9bbc0d4f625154ad8bff99e23a0cb1a62', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.additionalComponents.title), index.h("div", { key: 'b559b111e2005d63db36e500deae0733a473aa8d', class: "flex flex-col gap-4" }, index.h("div", { key: '139ff7f1d6624ca6fd31a155c36729be21e1f8b0', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, index.h("div", { key: '3db4013aaa29485966b13231e35d34f300abfc1b', class: "flex items-center justify-between" }, index.h("div", { key: '2fbd022c9d21c798308d713392224a7161a18799', class: "flex items-center gap-2" }, index.h("input", { key: '379f28e54b9cb06be1e6581cee9bfe280de5c15b', 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) => {
|
|
3172
3190
|
this.heatPump =
|
|
3173
3191
|
e.target
|
|
3174
3192
|
.checked
|
|
3175
3193
|
? 100
|
|
3176
3194
|
: 0;
|
|
3177
3195
|
this.recalculate();
|
|
3178
|
-
} }), index.h("label", { key: '
|
|
3196
|
+
} }), index.h("label", { key: 'a4ae005639f2703c4c3ba336404fa0e19822f5d3', htmlFor: "heatPump", class: "text-text-muted" }, t.solarSystemForm
|
|
3179
3197
|
.additionalComponents
|
|
3180
|
-
.heatPump)), (this.heatPump > 0 && !this.isIOS()) && (index.h("span", { key: '
|
|
3198
|
+
.heatPump)), (this.heatPump > 0 && !this.isIOS()) && (index.h("span", { key: '54d4a2e5fe6cd0cbccc8d87f0199a6e241ff9b72', class: "text-text-muted" }, this.heatPump, " m\u00B2"))), this.heatPump > 0 && (index.h("div", { key: 'be90b9492b1ae91b49564e646f46b7f80c766ad4', class: "flex flex-col gap-2" }, this.isIOS()
|
|
3181
3199
|
? (index.h("div", { class: "flex items-center gap-2" }, index.h("input", { type: "number", min: "10", max: "300", step: "10", class: "flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: {
|
|
3182
3200
|
border: "1px solid var(--color-border)",
|
|
3183
3201
|
}, value: this.heatPump, onInput: (e) => {
|
|
@@ -3195,41 +3213,41 @@ const SolarSystemForm = class {
|
|
|
3195
3213
|
parseInt(e.target
|
|
3196
3214
|
.value);
|
|
3197
3215
|
this.recalculate();
|
|
3198
|
-
} }))))), index.h("div", { key: '
|
|
3216
|
+
} }))))), index.h("div", { key: '5a15fbb22033d5bf3aa17412318e5caba273409f', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, index.h("div", { key: '14c992b960da894105afe998908091f71d8e9556', class: "flex items-center justify-between" }, index.h("div", { key: 'c620cfc146bfe4dfb963c8f4fe9f7da6b8fb03b7', class: "flex items-center gap-2" }, index.h("input", { key: 'ca46124ad41d16279663a58ec486ccd5869601ef', 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) => {
|
|
3199
3217
|
this.electricCar =
|
|
3200
3218
|
e.target
|
|
3201
3219
|
.checked;
|
|
3202
3220
|
this.recalculate();
|
|
3203
|
-
} }), index.h("label", { key: '
|
|
3221
|
+
} }), index.h("label", { key: 'dd5f3537a4f0b436b4b84e20726ecd95694df4a4', htmlFor: "electricCar", class: "text-text-muted" }, t.solarSystemForm
|
|
3204
3222
|
.additionalComponents
|
|
3205
|
-
.electricCar))), this.electricCar && (index.h("div", { key: '
|
|
3223
|
+
.electricCar))), this.electricCar && (index.h("div", { key: '3d8faac9b29457cabaef3e82fd490d7669c2ed79', class: "flex flex-col gap-2" }, index.h("div", { key: 'fd885be1fd003f9724398f97ea459144738cbc90', class: "grid grid-cols-2 gap-4" }, index.h("label", { key: 'bcfd46f61643c0d5c4a9c93e990ff6be4937efc2', class: "text-sm text-text-muted" }, t.solarSystemForm
|
|
3206
3224
|
.additionalComponents
|
|
3207
|
-
.chargingTime), index.h("label", { key: '
|
|
3225
|
+
.chargingTime), index.h("label", { key: 'acd1b8541b5d814e81949d06d2d1d56cc872fbd3', class: "text-sm text-text-muted" }, t.solarSystemForm
|
|
3208
3226
|
.additionalComponents
|
|
3209
|
-
.kilometersPerYear)), index.h("div", { key: '
|
|
3227
|
+
.kilometersPerYear)), index.h("div", { key: '1a9772ff5b6b4f3285afea70d9d5953bd3501d02', class: "grid grid-cols-2 gap-4" }, index.h("select", { key: 'd45e7979f476bd3afe2ef3a62107240b053f9bbb', class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", onChange: (e) => {
|
|
3210
3228
|
this.electricCarChargingTime =
|
|
3211
3229
|
e.target
|
|
3212
3230
|
.value;
|
|
3213
3231
|
this.recalculate();
|
|
3214
3232
|
}, style: {
|
|
3215
3233
|
border: "1px solid var(--color-border)",
|
|
3216
|
-
} }, index.h("option", { key: '
|
|
3234
|
+
} }, index.h("option", { key: 'c23713921e55368b7f4013503c1aa422dea05fd0', value: "day", selected: this
|
|
3217
3235
|
.electricCarChargingTime ===
|
|
3218
3236
|
"day" }, t.solarSystemForm
|
|
3219
3237
|
.additionalComponents
|
|
3220
|
-
.chargingTimeDay), index.h("option", { key: '
|
|
3238
|
+
.chargingTimeDay), index.h("option", { key: '67f440a8ba935e56098aae561f7f338dab01b219', value: "night", selected: this
|
|
3221
3239
|
.electricCarChargingTime ===
|
|
3222
3240
|
"night" }, t.solarSystemForm
|
|
3223
3241
|
.additionalComponents
|
|
3224
|
-
.chargingTimeNight)), index.h("input", { key: '
|
|
3242
|
+
.chargingTimeNight)), index.h("input", { key: '5d819884df9ba63f940a88bfd0d9d36fc988e56e', type: "number", min: "1000", max: "50000", step: "1000", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.kmDrivenPerYear, onInput: (e) => {
|
|
3225
3243
|
this.kmDrivenPerYear =
|
|
3226
3244
|
parseInt(e.target
|
|
3227
3245
|
.value);
|
|
3228
3246
|
this.recalculate();
|
|
3229
3247
|
}, style: {
|
|
3230
3248
|
border: "1px solid var(--color-border)",
|
|
3231
|
-
} }))))), index.h("div", { key: '
|
|
3232
|
-
.battery), !this.isIOS() && (index.h("span", { key: '
|
|
3249
|
+
} }))))), index.h("div", { key: '0a5d7fbfc2abc407c28d189b60a06df9eff66b1a', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, index.h("div", { key: '6996b502573c22718ebf8668382700e8b1a52e9b', class: "flex items-center justify-between" }, index.h("label", { key: '6b1bc5859ad5dd7c40726f5e04a41b5470afa20e', class: "text-text-muted" }, t.solarSystemForm.additionalComponents
|
|
3250
|
+
.battery), !this.isIOS() && (index.h("span", { key: 'b9a2629a617c204f9064b447b13e978e2df0e71b', class: "text-text-muted" }, this.battery, " kWh"))), index.h("div", { key: '75726ee7956ee611de845ea2349713e3a156c4f2', class: "flex flex-col gap-2" }, this.isIOS()
|
|
3233
3251
|
? (index.h("div", { class: "flex items-center gap-2" }, index.h("input", { type: "number", min: "0", max: "20", step: "1", class: "flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.battery, onInput: (e) => {
|
|
3234
3252
|
const value = parseInt(e.target
|
|
3235
3253
|
.value);
|
|
@@ -3246,41 +3264,55 @@ const SolarSystemForm = class {
|
|
|
3246
3264
|
this.battery = parseInt(e.target
|
|
3247
3265
|
.value);
|
|
3248
3266
|
this.recalculate();
|
|
3249
|
-
} })))))), index.h("div", { key: '
|
|
3267
|
+
} })))))), index.h("div", { key: 'ead8323aa774b23dc250685fb1e790b239070166', class: "space-y-4" }, index.h("h2", { key: '1eba342b1d3b4dfd7bd1173fa7381825d3070bd2', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.electricityCostsTitle), index.h("div", { key: '14baaadcb93e5ee4076a5565156ca48620801dac', class: "grid grid-rows-2 gap-0" }, index.h("div", { key: '6355241c7a8b27e1c0eb39b5b678286c7e039e64', class: "grid grid-cols-3 gap-4" }, index.h("label", { key: '2617defe06150d2e67e9470950ae3073af947a92', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.electricityPrice), index.h("label", { key: '188ce676aa0c1e528a11718068080a68257bf99e', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.compensationRate), index.h("label", { key: '850a4ef204bb9487ec6385e17bb0c06a063dd53c', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.annualPriceIncrease)), index.h("div", { key: '4f6ff1e0a3147984cd000946017619c838016f12', class: "grid grid-cols-3 gap-4 text-primary-foreground" }, index.h("input", { key: 'bb173e355fb17bc3c760342c16b1d28a2293c9d1', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.electricityPrice.toFixed(2), onInput: (e) => {
|
|
3250
3268
|
this.electricityPrice = parseFloat(e.target
|
|
3251
3269
|
.value);
|
|
3252
3270
|
this.recalculate();
|
|
3253
|
-
} }), index.h("input", { key: '
|
|
3271
|
+
} }), index.h("input", { key: 'f75ea4cfad61746c716a985ec3edf8dd93700dea', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.compensationRate.toFixed(2), onInput: (e) => {
|
|
3254
3272
|
this.compensationRate = parseFloat(e.target
|
|
3255
3273
|
.value);
|
|
3256
3274
|
this.recalculate();
|
|
3257
|
-
} }), index.h("input", { key: '
|
|
3275
|
+
} }), index.h("input", { key: '34ad225b5da90c29d595680369a683236b018b4f', type: "number", step: "0.1", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.annualPriceIncrease.toFixed(1), onInput: (e) => {
|
|
3258
3276
|
this.annualPriceIncrease = parseFloat(e.target
|
|
3259
3277
|
.value);
|
|
3260
3278
|
this.recalculate();
|
|
3261
|
-
} })))), index.h("div", { key: '
|
|
3279
|
+
} })))), index.h("div", { key: 'be3c737cf611997409562b6328f0becfce6eee56', class: "space-y-4 p-4 border border-border rounded-4xl", style: {
|
|
3262
3280
|
border: "1px solid var(--color-border)",
|
|
3263
|
-
} }, index.h("h2", { key: '
|
|
3281
|
+
} }, index.h("h2", { key: 'd85e0b1968326cbfa47ba2447cd625b5e801933b', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.resultsTitle), index.h("div", { key: '44e90f2bf38d401df3fba4047bf6015c01c00e73', class: "bg-muted rounded-4xl p-4" }, index.h("div", { key: '10f2c095e5970d55e197d3e2d5121e1b12c82ac8', class: "flex items-center justify-between" }, index.h("span", { key: '6671e18dc641d84640d35395ad9d3ed4ee35fcd4', class: "text-text-muted" }, t.solarSystemForm.autonomy), index.h("span", { key: '89c304d23420e6daa3d046640df30d8a0af1eb46', class: "text-xl font-bold text-secondary" }, this.autonomy > 100
|
|
3264
3282
|
? "100"
|
|
3265
|
-
: this.autonomy
|
|
3266
|
-
|
|
3267
|
-
|
|
3283
|
+
: this.formatEuropeanNumber(this.autonomy, 1), "%")), index.h("div", { key: '3629db34720f0053aaca70a6ee61ffb2a0c1b446', class: "flex items-center justify-between mt-4" }, index.h("span", { key: '91d347389c7e63b0d639d1bbc03f970cef92dc2b', class: "text-text-muted" }, t.solarSystemForm.totalEnergyConsumption), index.h("span", { key: 'd31714768be7b21f3470ee1e90dff8f4c6484b79', class: "text-xl font-bold text-secondary" }, (() => {
|
|
3284
|
+
let total = this.householdConsumption;
|
|
3285
|
+
// Add electric car consumption: km/year * 17kWh/100km
|
|
3286
|
+
if (this.electricCar) {
|
|
3287
|
+
total +=
|
|
3288
|
+
(this.kmDrivenPerYear * 17) /
|
|
3289
|
+
100;
|
|
3290
|
+
}
|
|
3291
|
+
// Add heat pump consumption: m2 * 60kWh/m2/year (typical estimate)
|
|
3292
|
+
if (this.heatPump > 0) {
|
|
3293
|
+
total += this.heatPump *
|
|
3294
|
+
HEAT_PUMP_CONSUMPTION * 365;
|
|
3295
|
+
}
|
|
3296
|
+
return this.formatEuropeanNumber(total, 0);
|
|
3297
|
+
})(), " kWh/", t.solarSystemForm.year)), index.h("div", { key: 'ff25e0aa4e9e0d240da27798344cecd87a50a980', class: "flex items-center justify-between mt-4" }, index.h("div", { key: '1bb0704dcbe48cee6059e9434d70a8bc41942664', class: "flex items-center gap-2" }, index.h("span", { key: 'cdccfd451a6e8658c2a0fe94d7cee4f091883aa8', class: "text-text-muted" }, t.solarSystemForm.costSavings), index.h("div", { key: '0f1126a6e4c08447c8fc58632efdb15a910d14a2', class: "relative group" }, index.h("svg", { key: '001578216fc70a81618354955c8566334ddd8537', xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-gray-400 cursor-help", viewBox: "0 0 20 20", fill: "currentColor" }, index.h("path", { key: '23fa0cf5f2cd0cdfc8de271194e7ca88a0daed0b', "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" })), index.h("div", { key: 'a1aa7e03d52fe658462e32df3e533c502827f7a7', class: "absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-64 p-2 bg-gray-800 text-muted text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none" }, t.solarSystemForm
|
|
3298
|
+
.savingsDisclaimer))), index.h("span", { key: '56375d976935a662e6d2511cad3d5834c120df3f', class: "text-xl font-bold text-success" }, this.formatEuropeanNumber(this.costSavings), "\u20AC/", t
|
|
3299
|
+
.solarSystemForm.year)), index.h("div", { key: 'cd828e6c6926daab2233cedf4305e2fdb97be676', class: "flex items-center justify-between mt-4" }, index.h("div", { key: '0795d59077e5b0c797f057e031831cee8534c3c9', class: "flex items-center gap-2" }, index.h("span", { key: '6f48091f7555b8a325ad09738ac0cdb31e865154', class: "text-text-muted" }, "Einspeiseverg\u00FCtung 25 Jahre")), index.h("span", { key: 'f7791292253c6806157551d30170e4688ed3458a', class: "text-xl font-bold text-success" }, this.formatEuropeanNumber(this.compensation25Years), "\u20AC")), index.h("div", { key: '27c89b500a48af7f669ebaa0b489d94b976686e2', class: "flex items-center justify-between mt-4" }, index.h("div", { key: '21626f89fe1fd478b6ebf8dc28d98e9078e184ce', class: "flex items-center gap-2" }, index.h("span", { key: '157a25f00e437addc545785cb2238a61f23778cd', class: "text-text-muted" }, "Geldwerter Vorteil 25 Jahre")), index.h("span", { key: '450ca4a9726b877821b18efdb0f78993d43783be', class: "text-xl font-bold text-success" }, this.formatEuropeanNumber(this.savedCosts25Years), "\u20AC")))), index.h("div", { key: '27f91849d3fd0fa188dfb3303c5088fbb31477f6', class: "space-y-4 pt-4" }, index.h("h2", { key: '1fb4615d9f7fc7499796ff4bfc1f94de06347230', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.requestOffer), index.h("div", { key: 'b0fc51a1e23c8e6d888f52cb6c348ef87e0c021d', class: "grid gap-4" }, index.h("div", { key: 'dbc8276df0f39e6206cafad9ee78198bba4231a2', class: "grid grid-cols-2 gap-4" }, index.h("label", { key: '17f832a75bf26e206baf332a852e9918287ceddd', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.name), index.h("label", { key: 'c5f51ed3415cee24796980972003cb9d3d67377f', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.email)), index.h("div", { key: 'aca926ba4957bc3f49c078ee26c187b2fa2e09c5', class: "grid grid-cols-2 gap-4" }, index.h("div", { key: 'bf67470f202a91c87794b9f524be7d6f8798a9d6' }, index.h("input", { key: 'e0ef0652f15c0b8131be5c08ab7e676053723403', type: "text", class: `w-full px-4 py-2 rounded-4xl border ${this.nameError
|
|
3268
3300
|
? "border-error"
|
|
3269
3301
|
: "border-border"} focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, value: this.name, onInput: (e) => {
|
|
3270
3302
|
this.name =
|
|
3271
3303
|
e.target
|
|
3272
3304
|
.value;
|
|
3273
3305
|
this.validateForm();
|
|
3274
|
-
}, placeholder: "Your name" }), this.nameError && (index.h("p", { key: '
|
|
3306
|
+
}, placeholder: "Your name" }), this.nameError && (index.h("p", { key: '4f4b48a763a00e0c3b01a7fb0114f34b233c0fd3', class: "text-error text-sm mt-1" }, this.nameError))), index.h("div", { key: 'c8ab7002857c3826009860ab2ebf9d87c1bde1b7' }, index.h("input", { key: 'd8b3df2653a9e8391f3322498757393342f2a86d', type: "email", class: `w-full px-4 py-2 rounded-4xl border ${this.emailError
|
|
3275
3307
|
? "border-error"
|
|
3276
3308
|
: "border-border"} focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, value: this.email, onInput: (e) => {
|
|
3277
3309
|
this.email =
|
|
3278
3310
|
e.target
|
|
3279
3311
|
.value;
|
|
3280
3312
|
this.validateForm();
|
|
3281
|
-
}, placeholder: "your.email@example.com" }), this.emailError && (index.h("p", { key: '
|
|
3313
|
+
}, placeholder: "your.email@example.com" }), this.emailError && (index.h("p", { key: '8f1b0cfb3251e70294e5f67c461013ea935c11dc', class: "text-error text-sm mt-1" }, this.emailError))))), index.h("div", { key: 'eb74ae3147ff1d072050658b17016f6d03a29f35', class: "flex justify-center" }, index.h("button", { key: '448e329bde1237be4e2fbd12dd98ad36a9a558e3', onClick: () => this.handleRequestOffer(), disabled: !this.name.trim() ||
|
|
3282
3314
|
!this.email.trim() || !!this.nameError ||
|
|
3283
|
-
!!this.emailError, class: "px-4 py-2 bg-secondary rounded-4xl hover:bg-tertiary transition-colors duration-200
|
|
3315
|
+
!!this.emailError, class: "px-4 py-2 bg-secondary rounded-4xl hover:bg-tertiary transition-colors duration-200", style: { color: "var(--color-muted)" } }, t.solarSystemForm.requestOfferButton))))));
|
|
3284
3316
|
}
|
|
3285
3317
|
static get watchers() { return {
|
|
3286
3318
|
"systemConfigs": ["updateSystemConfigs"]
|
|
@@ -3303,9 +3335,13 @@ const ToolBox = class {
|
|
|
3303
3335
|
return (index.h("div", { key: '6a249c8eddd0bf541a98f77d09bcc9e297e8ec63', class: "flex lg:gap-4 rounded-4xl bg-primary p-4 flex-wrap justify-center w-full text-xs" }, tools.map((tool) => {
|
|
3304
3336
|
const toolStrings = t.mapDraw.tools[tool.name];
|
|
3305
3337
|
return (index.h("button", { class: `px-4 py-2 rounded-4xl transition-colors duration-200 ${this.currentTool.name === tool.name
|
|
3306
|
-
? "bg-secondary hover:bg-secondary/80
|
|
3307
|
-
: "bg-primary hover:bg-muted
|
|
3308
|
-
|
|
3338
|
+
? "bg-secondary hover:bg-secondary/80"
|
|
3339
|
+
: "bg-primary hover:bg-muted"}`, style: {
|
|
3340
|
+
color: this.currentTool.name === tool.name
|
|
3341
|
+
? "var(--color-secondary-foreground)"
|
|
3342
|
+
: "var(--color-primary-foreground)",
|
|
3343
|
+
}, "aria-label": toolStrings.ariaLabel, title: toolStrings.explanation, onClick: () => this.onToolSelect(tool) }, index.h("div", { class: "flex items-center gap-1 flex-col" }, index.h("icon-selector", { name: tool.icon }), index.h("span", null, toolStrings.name))));
|
|
3344
|
+
}), index.h("button", { key: 'b9eefc37d84ce8cf1fc3ea27fd0135d477a30eb2', class: `px-4 py-2 rounded-4xl transition-colors duration-200 bg-primary hover:bg-muted text-primary-foreground`, "aria-label": undoToolStrings.ariaLabel, title: undoToolStrings.explanation, onClick: () => this.undoCallback() }, index.h("div", { key: '06388aa01a0a70de8ffb202717e4d63df6c9cd1b', class: "flex items-center gap-1 flex-col" }, index.h("undo-icon", { key: 'ba5614562d52b0b06be3a9f557ed3dcb103eeeaa' }), index.h("span", { key: '39aeaf8cd4c4cabd39bec5051ef0eb53459e7846' }, undoToolStrings.name)))));
|
|
3309
3345
|
}
|
|
3310
3346
|
};
|
|
3311
3347
|
ToolBox.style = outputCss$1;
|