PageSourceSearch

https://sdgtransformationcenter.org/_next/static/chunks/310.a3980d799c5b8a86.js

js sdgtransformationcenter.org collected 2026-10-02 05:09:52 UTC 8,185 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[310],{310:function(e,t,n){n.r(t),n.d(t,{default:function(){return U}});var r=n(2676),l=n(5271),a=n(9794),s=n(8730),o=n(5500),i=n(2176);let c=(e,t)=>{let{decimals:n=1,thousands:r=!0,locale:l="en-US",exponential:a=!1,percentage:s=!1}=t||{},o=e.toFixed(n),i=[...o.replace(/[.-]/g,"")].map(Number).every(e=>0===e);return i&&a?e.toExponential(n):i&&a&&s?100*e:s?Number((100*e).toFixed(n)):r?new Intl.NumberFormat(l,{maximumFractionDigits:n}).format(e):Number(o)},u=e=>{let{from:t=0,to:n,decimals:r=0,formatThousands:a=!1,animations:u={}}=e,m=(0,l.useMemo)(()=>({duration:1,...u}),[u]),d=(0,s.c)(t),h=!isNaN(parseFloat(n))&&isFinite(n),x=(0,o.H)(d,e=>a?c(e,{decimals:r,thousands:!0,exponential:!0}):Number(e.toFixed(r)));return(0,l.useEffect)(()=>{if(h){let e=(0,i.j)(d,Number(n),m);return()=>e.stop()}d.set(t)},[t,n,d,m,h]),x};var m=n(8741),d=n(7506),h=e=>{let{value:t,max:n,progressColor:l=m.O.primary}=e,s=2*Math.PI*45,o=Number((t/n*s).toFixed(0)),i=s-o,c=u({from:s,to:i,animations:{duration:.5}}),h=u({from:0,to:t,decimals:2,formatThousands:!1,animations:{duration:.5}});return(0,r.jsxs)(a.ZP,{className:"desktop-sm:grid relative flex flex-1 grid-cols-2 justify-start gap-x-6 self-center",isTrue:!!t&&!!n,children:[(0,r.jsxs)(a.ZP,{as:"svg",width:"100",height:"100",children:[(0,r.jsx)(a.ZP,{as:"circle",stroke:"#e2e8f0",fill:"none",strokeWidth:"10",r:45,cx:"50",cy:"50"}),(0,r.jsx)(a.ZP,{as:"circle",animate:!0,stroke:l,fill:"none",strokeWidth:"10",strokeDasharray:s,strokeDashoffset:c,r:45,cx:"50",cy:"50",strokeLinecap:"round"})]}),(0,r.jsx)(a.ZP,{className:"desktop-sm:left-[47%] absolute left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] transform ",children:(0,r.jsx)(d.nv,{variant:"number",animate:!0,children:h})})]})},x=n(5861),f=n(5058),p=n(6058),v=n(2485),y=n.n(v),g=n(714),j=n.n(g),b=n(6590),N=e=>{let{info:t,...n}=e,{sdrSc:s,sdrRnk:o,sdrTot:i,miSc:c,miRnk:u,miTot:m}=t||{},h=[{text:"SDG Index Score",value:s,max:100,show:!!s},{text:"SDG Index Rank",countryRank:o,totalCountries:i,show:!!o},{text:"UN-MI Score",value:c,max:100,show:!!c},{text:"UN-MI Rank",countryRank:u,totalCountries:m,show:!!u}];return(0,r.jsxs)(f.Z,{...n,variant:"map",children:[(0,r.jsxs)(a.kC,{variant:"rowStart",className:"sticky top-0 z-10 h-full w-full gap-x-5 border-b bg-white px-10 pt-10",children:[(0,r.jsx)(x.Z,{region:t,size:50,className:"z-20"}),(0,r.jsx)(d.Dx,{as:"h6",className:"z-10",children:null==t?void 0:t.name})]}),(0,r.jsxs)(a.ZP,{"aria-label":"Country data",isTrue:!!h.filter(e=>{let{show:t}=e;return t}).length>0,className:"px-10",children:[(0,r.jsx)(a.rj,{className:"mx-auto grid w-full grid-cols-4 gap-x-5",children:h.map((e,t)=>(0,l.createElement)(w,{...e,key:t}))}),(0,r.jsx)(d.nv,{className:"ml-3 mt-3 text-xs italic text-gray-500",children:"Source: Sustainable Development Report 2026"})]}),(0,r.jsxs)(a.ZP,{className:"w-full px-10",children:[(0,r.jsx)(d.Dx,{as:"h6",children:"Sustainable Development Reports Covering this Country"}),(0,r.jsx)(a.aV,{content:null==t?void 0:t.rep,Component:k,className:{parent:"scrollbar-horizontal flex w-full snap-x gap-x-8 overflow-auto py-5 text-gray-500",child:"hover-border-none h-56 w-[13rem] shrink-0 cursor-pointer snap-center rounded-lg border px-3 py-5 text-base shadow-lg transition duration-300 ease-in-out hover:bg-primary hover:text-white"},as:{parent:"ul",child:"li"}})]})]})};let k=e=>(0,r.jsxs)(j(),{href:e.link,className:"group flex h-full flex-col items-center justify-between gap-y-6",children:[(0,r.jsx)(y(),{src:e.image,alt:"report cover",height:100,width:100,className:"rounded-sm"}),(0,r.jsxs)("div",{className:"relative w-full",children:[(0,r.jsx)("p",{className:"w-full truncate text-center text-sm",children:e.name}),(0,r.jsx)(b.Z,{children:e.name})]})]}),w=e=>{let{value:t,max:n,countryRank:l,totalCountries:s,text:o}=e;return(0,r.jsxs)(a.ZP,{isTrue:!!t||!!l,className:"flex w-40 flex-col items-center gap-y-3 rounded-2xl border bg-white px-3 py-2 shadow",children:[(0,r.jsx)(d.nv,{className:"text-gray-500",children:o}),(0,r.jsx)(h,{value:t,max:n}),(0,r.jsx)(M,{countryRank:l,totalCountries:s})]})},M=e=>{let{countryRank:t,totalCountries:n}=e,l=u({from:0,to:t,decimals:0,formatThousands:!0});return(0,r.jsx)(a.ZP,{isTrue:!!t&&!!n,className:"flex h-full items-center",children:(0,r.jsxs)(a.ZP,{className:"flex items-end justify-end gap-x-1",children:[(0,r.jsx)(d.nv,{...p.tM,className:"text-5xl text-gray-400",children:l}),(0,r.jsx)(d.Dr,{children:"/"}),(0,r.jsx)(d.nv,{className:"text-gray-400",children:n})]})})};var S=function(e,t){let{width:n,height:r,realZoom:l,viewBox:{x:a,y:s,width:o,height:i}}=this.getSizes(),c=Math.min(n,o*l),u=Math.min(r,i*l);return{x:Math.max(c-(a+o)*l,Math.min(n-c-a*l,t.x)),y:Math.max(u-(s+i)*l,Math.min(r-u-s*l,t.y))}},C=n(4221),P=n.n(C),E={haltEventListeners:["touchstart","touchend","touchmove","touchleave","touchcancel"],init:function(e){var t=e.instance,n=1,r=0,l=0;this.hammer=P()(e.svgElement,{inputClass:P().SUPPORT_POINTER_EVENTS?P().PointerEventInput:P().TouchInput}),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("doubletap",function(){t.zoomIn()}),this.hammer.on("panstart panmove",function(e){"panstart"===e.type&&(r=0,l=0),t.panBy({x:e.deltaX-r,y:e.deltaY-l}),r=e.deltaX,l=e.deltaY}),this.hammer.on("pinchstart pinchmove",function(e){"pinchstart"===e.type&&(n=t.getZoom(),t.zoomAtPoint(n*e.scale,{x:e.center.x,y:e.center.y})),t.zoomAtPoint(n*e.scale,{x:e.center.x,y:e.center.y})}),e.svgElement.addEventListener("touchmove",function(e){e.preventDefault()})},destroy:function(){this.hammer.destroy()}},Z=n(3677),z=n.n(Z),R=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,l.useRef)(null),n=(0,l.useRef)(null),r=(0,l.useCallback)(r=>{r&&!n.current&&(n.current=z()(r,e)),t.current=r},[e]);(0,l.useEffect)(()=>(r(t.current),()=>{n.current&&(n.current.destroy(),n.current=null,t.current=null)}),[r]);let a=(0,l.useCallback)(()=>{var e;null===(e=n.current)||void 0===e||e.zoomIn()},[]),s=(0,l.useCallback)(()=>{var e;null===(e=n.current)||void 0===e||e.zoomOut()},[]),o=(0,l.useCallback)(()=>{var e,t;null===(e=n.current)||void 0===e||e.fit(),null===(t=n.current)||void 0===t||t.center()},[]),i=(0,l.useCallback)(()=>{var e;null===(e=n.current)||void 0===e||e.resize(),o()},[o]);return{ref:n,init:r,zoomIn:a,zoomOut:s,resetZoom:o,reset:i}},T=n(4810),D=n(1859),I=n(9619),F=n(4203),L=n(8348),U=e=>{let{children:t,stroke:n,countries:a}=e,s=(0,F.k)(),[o,i]=(0,l.useState)(!1),[c,u]=(0,l.useState)(null),[m,d]=(0,l.useState)(null),h=(0,l.useRef)(null),[x,f]=(0,l.useState)(!1);n||(n="#fff");let{init:p,zoomIn:v,zoomOut:y,resetZoom:g,reset:j}=R((0,l.useMemo)(()=>({zoomScaleSensitivity:1,minZoom:1,beforePan:S,fit:1,center:1,customEventsHandler:E,mouseWheelZoomEnabled:!1}),[S,E])),b=(0,L.y1)(j,100);(0,l.useEffect)(()=>(0,T.U5)(()=>{var e,t;return null===(t=s.tooltip)||void 0===t?void 0:null===(e=t.country)||void 0===e?void 0:e.id},e=>{if(!e)return;let t=document.querySelector("svg #".concat(e));t&&t.parentElement.appendChild(t)}),[s]);let k=e=>{h.current={x:e.clientX,y:e.clientY},f(!1)},w=e=>{if(!h.current)return;let t=Math.abs(e.clientX-h.current.x),n=Math.abs(e.clientY-h.current.y);(t>5||n>5)&&f(!0)},M=(0,l.useCallback)(e=>{x||(u(e),i(!0))}
1,[x]),C=(0,l.useMemo)(()=>(0,r.jsx)(N,{setter:i,open:o,info:c}),[o,c]),P=null==a?void 0:a.find(e=>"CHN"===e.id);return a?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(I.SvgLoader,{path:"/static/map.svg",className:"h-full w-full",onSVGReady:p,children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(I.SvgProxy,{selector:".countries [id], circle[id]",fill:"#979797",clickable:"false",onClick:()=>null,onMouseMove:()=>null,onMouseLeave:()=>null}),null==a?void 0:a.map(e=>(0,r.jsx)(I.SvgProxy,{cursor:"pointer",selector:"#".concat(e.id),clickable:"clickable",fill:m===e.id?"#003e6b58":e.fill,onMouseDown:k,onMouseUp:w,onMouseMove:t=>s.showTooltip({country:e,event:t}),onMouseEnter:()=>d(e.id),onMouseLeave:()=>{d(null),s.hideTooltip()},onClick:()=>M(e)},e.id)),P&&(0,r.jsx)(I.SvgProxy,{selector:"#TWN",fill:P.fill})]})}),(0,l.cloneElement)(t,{zoomIn:v,zoomOut:y,resetZoom:g}),(0,r.jsx)(D.Z,{onResize:b}),C]}):null}}}]);

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.