PageSourceSearch

https://swhl.vercel.app/_nuxt/DcySTUEF.js

js swhl.vercel.app collected 2026-10-03 07:50:48 UTC 5,142 bytes, 1 lines download raw bytes

1import{_ as H}from"./Dav75v-a.js";import{_ as Z}from"./DObhSqm3.js";import{_ as W}from"./CSdlPmB1.js";import{_ as A}from"./9j-MhypY.js";import{d as N,s as h,c as g,V as v,U as J,i as k,e as M,j as _,g as s,h as b,t as f,X as n,a2 as O,a3 as $,z as l,F as R,B as U,$ as G,f as u,W as K}from"./DxogxW0M.js";const X=["id","data-uid"],Y={key:0,class:"Subline"},q={class:"Form"},Q=["data-is-gek"],x={key:0,class:"Input Persons"},ee={class:"PersonsFieldset"},ae=["value","checked","onChange"],se={class:"sr-only"},le=["data-is-gek"],oe={class:"kWhFieldset"},re=["aria-invalid","aria-describedby"],pe=N({__name:"PowerCalculator",props:{blok:{},is_gek_calculator:{type:Boolean,default:!1},is_magazine_calculator:{type:Boolean},use_as_headline:{type:Boolean,default:!1}},setup(C){const d=h({postalCodeNotFiveDigits:{default:"Ihre PLZ muss aus 5 Zahlen bestehen.",applies:!1,isValid:()=>i.value.toString().length==5},kwhTooSmall:{default:"Der Jahresverbrauch muss zwischen 1 und 100.000 kWh liegen.",applies:!1,isValid:()=>o.value.kwh>=1},kwhTooBig:{default:'Bei diesem Verbrauch wenden Sie sich bitte an unseren Geschäftskundenvertrieb (Telefon: 0451/888-1166, E-Mail: [email protected], <a href="https://www.swhl.de/geschaeftskunden/service/ansprechpartner/" target="_blank">Ansprechpartner</a>).',applies:!1,isValid:()=>o.value.kwh<1e5}}),D=g(()=>Object.entries(d.value).filter(([e,a])=>a.applies).map(([e,a])=>a.default)),m=h(!1),c=h(!1);function w(){m.value=!0,c.value=!1,Object.values(d.value).forEach(e=>{e.applies=!e.isValid()})}const y=g(()=>m.value&&Object.values(d.value).find(e=>e.applies==!0)==null),P=g(()=>m.value&&!c.value&&(d.value.kwhTooSmall.applies||d.value.kwhTooBig.applies)),p=C,S=[void 0,p.blok.kwh_1_person,p.blok.kwh_2_person,p.blok.kwh_3_person,p.blok.kwh_4_person];let o=h({persons:1,kwh:p.blok.kwh_1_person}),i=h("");function z(e){o.value.persons=e,e!=0&&(o.value.kwh=+S[e])}function V(){if(!y)return;G({event:"form_submit",form_name:"Stromrechner",data:{postalCode:i.value,kwh:o.value.kwh}});const e=`https://kundenportal.swhl.de/portal/order/product?division=ELECTRICITY&zipcode=${i.value}&consumptionHT=${o.value.kwh}&customerGroup=PRIVATE`;window.open(e,"_blank").focus()}return(e,a)=>{var I,B;const L=H,E=Z,T=W,F=A,j=J("editable");return v((u(),k("section",{class:"PowerCalculator Calculator",id:("useID"in e?e.useID:l(K))(e.blok),"data-uid":e.blok._uid},[(I=e.blok)!=null&&I.headline&&!e.is_gek_calculator?(u(),M(L,{key:0,blok:{headline:e.blok.headline,appearance:"h2",weight:900,headline_semantic:e.use_as_headline?"h1":"p",gradient:"gradient_1"}},null,8,["blok"])):_("",!0),s("div",null,[(B=e.blok.subline)!=null&&B.length?(u(),k("div",Y,f(e.blok.subline),1)):_("",!0),s("div",q,[s("div",{class:"Input PLZ","data-is-gek":e.is_gek_calculator||void 0},[s("label",{class:n(["b-small",{"!text-grey-100":e.is_magazine_calculator}]),for:"PLZ"},"PLZ",2),v(s("input",{type:"number",id:"PLZ","onUpdate:modelValue":a[0]||(a[0]=r=>O(i)?i.value=r:i=r),placeholder:"PLZ",class:n(["b-large",{"IsDark bg-grey-700 text-grey-300 hover:!bg-grey-700":e.is_magazine_calculator}]),pattern:"\\d*",name:"PLZ",autocomplete:"postal-code",onFocus:a[1]||(a[1]=r=>c.value=!0),onBlur:a[2]||(a[2]=r=>w())},null,34),[[$,l(i)]])],8,Q),e.is_gek_calculator?_("",!0):(u(),k("div",x,[s("fieldset",ee,[s("legend",{class:n(["b-small",{"!text-grey-100":e.is_magazine_calculator}])}," Personen im Haushalt ",2),s("div",{class:n(["PersonsSelector",{IsDark:e.is_magazine_calculator}])},[(u(!0),k(R,null,U(new Array(4),(r,t)=>(u(),k("label",{class:n(["Amount",{IsDark:e.is_magazine_calculator,"Selected [&_.SWHLIcon]:-mt-2":l(o).persons===t+1}]),key:t},[s("input",{type:"radio",name:"household-size",value:t+1,checked:l(o).persons===t+1,onChange:te=>z(t+1)},null,40,ae),s("span",se,f(t+1)+" "+f(t===0?"Person":"Personen"),1),b(E,{"icon-path":`${t+1}_Person${t>0?"s":""}.svg`,background:e.is_magazine_calculator?l(o).persons==t+1?"var(--gradient-01)":"var(--grey-300)":l(o).persons==t+1?"var(--gradient-01)":"var(--grey-500)"},null,8,["icon-path","background"])],2))),128))],2)])])),s("div",{class:"Input kWh","data-is-gek":e.is_gek_calculator||void 0},[s("fieldset",oe,[s("legend",{class:n(["b-small",{"!text-grey-100":e.is_magazine_calculator}]),id:"kwh-jahr-label"}," kWh/Jahr ",2),v(s("input",{type:"number",id:"kwh-jahr",name:"kwh-jahr","onUpdate:modelValue":a[3]||(a[3]=r=>l(o).kwh=r),min:"1",max:"99999",inputmode:"numeric","aria-labelledby":"kwh-jahr-label","aria-invalid":l(P)||void 0,"aria-describedby":l(P)?"power-calculator-errors":void 0,onKeydown:a[4]||(a[4]=r=>z(0)),class:n(["b-large",{"IsDark bg-grey-700 text-grey-300 hover:!bg-grey-700":e.is_magazine_calculator}]),pattern:"\\d*",onFocus:a[5]||(a[5]=r=>c.value=!0),onBlur:a[6]||(a[6]=r=>w())},null,42,re),[[$,l(o).kwh]])])],8,le),b(T,{label:"Jetzt berechnen",uppercase:!1,disabled:!l(y),onClick:a[7]||(a[7]=r=>V()),"data-is-gek":e.is_gek_calculator||void 0},null,8,["disabled","data-is-gek"])])]),b(F,{id:"power-calculator-errors",errors:l(D),hide:l(c),class:n({"text-grey-100":e.is_magazine_calculator})},null,8,["errors","hide","class"])],8,X)),[[j,e.blok]])}}});
1export{pe as _};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.