1import{r as h,o as N,h as B,b as l,d as o,e as s,f as t,t as c,F as w,i as M}from"./site-VyDcMKF4.js";const T={class:"flex flex-col gap-3 max-w-[800px]"},q={key:0,class:"font-bold uppercase text-brand-primary-blue text-2xl"},A=["innerHTML"],C={key:2,class:"text-sm text-brand-primary-blue-60"},D={class:"grid md:grid-cols-2 gap-5"},E={class:"bg-brand-primary-blue rounded-card p-6 md:p-8 text-white flex flex-col gap-2"},I={key:0,class:"text-sm uppercase opacity-80"},L={class:"flex items-baseline gap-2"},j={class:"text-4xl md:text-5xl font-bold"},H={class:"text-lg"},O={class:"bg-brand-primary-green rounded-card p-6 md:p-8 text-white flex flex-col gap-2"},S={key:0,class:"text-sm uppercase opacity-80"},U={class:"flex items-baseline gap-2"},V={class:"text-4xl md:text-5xl font-bold"},R={class:"text-lg"},z={key:1,class:"text-sm opacity-80"},G={key:0,class:"flex flex-col gap-5"},J={key:0,class:"font-bold text-brand-primary-blue"},K={class:"grid md:grid-cols-3 gap-5"},P=["src","alt"],Q={class:"text-xl font-bold text-brand-primary-blue"},W={class:"text-sm"},X={key:1,class:"text-xs text-brand-primary-blue-60"},Y={key:1,class:"bg-brand-primary-blue-light/40 rounded-card p-6 md:p-8 flex flex-wrap gap-8 items-center"},Z={key:0},$={class:"text-2xl font-bold text-brand-primary-blue"},ee={key:1},te={class:"text-2xl font-bold text-brand-primary-blue"},le={key:0,class:"text-sm uppercase"},se={class:"text-3xl font-bold text-brand-primary-green"},ce={key:2,class:"flex flex-col gap-3"},oe={key:0,class:"font-bold text-brand-primary-blue"},ae={class:"grid md:grid-cols-3 gap-5"},ne={class:"text-2xl font-bold text-brand-primary-blue"},ie={class:"text-sm"},de={__name:"RenewableEnergyCounter",props:{block:{type:Object,default:()=>({})}},setup(e){const k=e,x=h(null),m=h(0),y=h(0),f=h(!1);let u=null;const _=(r,n,i=1800)=>{const b=Number(r)||0,a=performance.now(),d=g=>{const p=Math.min((g-a)/i,1),F=1-Math.pow(1-p,3);n(Math.round(b*F)),p<1&&requestAnimationFrame(d)};requestAnimationFrame(d)},v=r=>new Intl.NumberFormat("en-US").format(r||0);return N(()=>{u=new IntersectionObserver(r=>{r.forEach(n=>{n.isIntersecting&&!f.value&&(f.value=!0,_(k.block.electricity_counter_value,i=>m.value=i),_(k.block.ghg_counter_value,i=>y.value=i))})},{threshold:.3}),x.value&&u.observe(x.value)}),B(()=>u==null?void 0:u.disconnect()),(r,n)=>{var i,b;return e.block.heading||e.block.electricity_counter_value?(s(),l("div",{key:0,ref_key:"root",ref:x,class:"container section flex flex-col gap-8"},[t("div",T,[e.block.heading?(s(),l("h2",q,c(e.block.heading),1)):o("",!0),e.block.description?(s(),l("div",{key:1,class:"post-content",innerHTML:e.block.description},null,8,A)):o("",!0),e.block.footnote?(s(),l("p",C,c(e.block.footnote),1)):o("",!0)]),t("div",D,[t("div",E,[e.block.electricity_counter_label?(s(),l("p",I,c(e.block.electricity_counter_label),1)):o("",!0),t("div",L,[t("span",j,c(v(m.value)),1),t("span",H,c(e.block.electricity_counter_unit),1)])]),t("div",O,[e.block.ghg_counter_label?(s(),l("p",S,c(e.block.ghg_counter_label),1)):o("",!0),t("div",U,[t("span",V,c(v(y.value)),1),t("span",R,c(e.block.ghg_counter_unit),1)]),e.block.ghg_counter_subtext?(s(),l("p",z,c(e.block.ghg_counter_subtext),1)):o("",!0)])]),(i=e.block.equivalents)!=null&&i.length?(s(),l("div",G,[e.block.equivalents_heading?(s(),l("h4",J,c(e.block.equivalents_heading),1)):o("",!0),t("div",K,[(s(!0),l(w,null,M(e.block.equivalents,(a,d)=>{var g;return s(),l("div",{key:a.id||d,class:"flex items-center gap-4 bg-gray-100 rounded-card p-5"},[(g=a.icon)!=null&&g.url?(s(),l("img",{key:0,src:a.icon.url,alt:a.icon.alt||"",class:"w-12 h-12 object-contain shrink-0"},null,8,P)):o("",!0),t("div",null,[t("p",Q,c(a.value),1),t("p",W,c(a.label),1)])])}),128))]),e.block.equivalents_source_note?(s(),l("p",X,c(e.block.equivalents_source_note),1)):o("",!0)])):o("",!0),e.block.actual_percentage?(s(),l("div",Y,[e.block.target_2025?(s(),l("div",Z,[n[0]||(n[0]=t("p",{class:"text-sm uppercase"},"2025 Target",-1)),t("p",$,c(e.block.target_2025),1)])):o("",!0),e.block.target_2030?(s(),l("div",ee,[n[1]||(n[1]=t("p",{class:"text-sm uppercase"},"2030 Target",-1)),t("p",te,c(e.block.target_2030),1)])):o("",!0),t("div",null,[e.block.actual_description?(s(),l("p",le,c(e.block.actual_description),1)):o("",!0),t("p",se,c(e.block.actual_percentage),1)])])):o("",!0),(b=e.block.highlights)!=null&&b.length?(s(),l("div",ce,[e.block.highlights_heading?(s(),l("h4",oe,c(e.block.highlights_heading),
11)):o("",!0),t("div",ae,[(s(!0),l(w,null,M(e.block.highlights,(a,d)=>(s(),l("div",{key:a.id||d,class:"text-center bg-gray-100 rounded-card p-5"},[t("p",ne,c(a.value),1),t("p",ie,c(a.label),1)]))),128))])])):o("",!0)],512)):o("",!0)}}};export{de as default};
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.