1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="0ad3ce45-4e97-4c94-9d9f-073599cf720b",e._sentryDebugIdIdentifier="sentry-dbid-0ad3ce45-4e97-4c94-9d9f-073599cf720b")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9164],{1859:(e,r,t)=>{"use strict";t.d(r,{d:()=>l,l:()=>s});var a=t(27122);let s=(e,r)=>{console.log("%s",e,r),a.wd(e,e=>e.addBreadcrumb({type:"error",category:"error",level:"error",data:r}))},l=(e,r)=>{console.log("%s",e,r),a.Cp(r,t=>t.addBreadcrumb({type:"error",category:"error",level:"error",data:r,message:e}))}},50932:(e,r,t)=>{"use strict";t.d(r,{K:()=>s});var a=t(12115);function s(e){let r=(0,a.useRef)(null);return r.current=e,(0,a.useState)(()=>(...e)=>r.current(...e))[0]}},79164:(e,r,t)=>{"use strict";t.r(r),t.d(r,{SurchauffeUrbaineLCZMap:()=>C,default:()=>L});var a=t(95155),s=t(52701),l=t(12115),o=t(54520),n=t(76480);let i=e=>{let{climadiagInfo:r}=e,{current:t}=(0,n.ko)();return(0,l.useEffect)(()=>{let e=r.adresse_all_infos,a=null==e?void 0:e.geometry.coordinates,s=a&&a[0]&&a[1]?[a[0],a[1]]:[2.333333,48.86471];setTimeout(()=>null==t?void 0:t.flyTo({center:s,zoom:11}),500)},[r,t]),null};t(4209),t(88105);var c=t(34606),u=t.n(c),d=t(1859);let f=async e=>{let r=e.lngLat,t=e.target,{x:a,y:s}=((e,r)=>{let t=Math.log(Math.tan((90+r)*Math.PI/360))/(Math.PI/180);return{x:20037508.34*e/180,y:t=20037508.34*t/180}})(r.lng,r.lat),l=encodeURIComponent(JSON.stringify({spatialReference:{latestWkid:3857,wkid:102100},xmin:a-5,ymin:s-5,xmax:a+5,ymax:s+5}));try{let e=await fetch("https://cartagene.cerema.fr/server/rest/services/l_lcz_spot_000_2022_mil/MapServer/0/query?f=json&geometry=".concat(l,"&maxAllowableOffset=4.777314267945864&outFields=are,bsr,bur,hre,identifier,lcz,ror,ver,vhr,war&spatialRel=esriSpatialRelIntersects&where=1%3D1&geometryType=esriGeometryEnvelope&inSR=102100&outSR=102100")),a=await e.json();if(a.features&&a.features.length>0){let e=a.features[0].attributes,s={are:"Surface moyenne des b\xe2timents (m\xb2)",FID:"FID",lcz:"LCZ",bur:"Taux de surface b\xe2tie (%)",hre:"Hauteur moyenne des b\xe2timents (m)",ror:"Taux de surface imperm\xe9able (%)",ver:"Taux de v\xe9g\xe9tation (%)",vhr:"Part de v\xe9g\xe9tation arbor\xe9e (%)",bsr:"Taux de sol nu perm\xe9able (%)",war:"Taux de surface en eau (%)"},l=e.lcz||"",o="\n <h5 style='font-size:18px; margin:0;'>\n <b>LCZ ".concat(l,"</b>\n </h5>\n ");for(let r of["are","bur","hre","ror","ver","vhr","bsr","war"])void 0!==e[r]&&(o+="<b>".concat(s[r],"</b> : ").concat(e[r],"<br/>"));new(u()).Popup({className:"custom-maplibre-popup"}).setLngLat([r.lng,r.lat]).setHTML(o).addTo(t)}else new(u()).Popup().setLngLat([r.lng,r.lat]).setHTML("Aucune donn\xe9e LCZ pour cette zone.").addTo(t)}catch(e){(0,d.d)("Erreur lors de la r\xe9cup\xe9ration des donn\xe9es LCZ, [".concat(r.lng,",").concat(r.lat,"]"),e),new(u()).Popup().setLngLat([r.lng,r.lat]).setHTML("Erreur lors de la r\xe9cup\xe9ration des donn\xe9es LCZ.").addTo(t)}};var p=t(61514),m=t(24179),g=t(83688),y=t(9983),b=t(50932),h=t(47695),v=t(3803),w=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>r.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);s<a.length;s++)0>r.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(t[a[s]]=e[a[s]]);return t};let x=(0,l.memo)((0,l.forwardRef)((e,r)=>{let{className:t,id:a,severity:s,as:o="h3",classes:n={},style:i,small:c,title:u,description:d,closable:f=!1,isClosed:p,onClose:h,role:x}=e,S=w(e,["className","id","severity","as","classes","style","small","title","description","closable","isClosed","onClose","role"]),z="role"in e?x:"alert";(0,y.v)();let C=(0,v.D)({explicitlyProvidedId:a,defaultIdPrefix:"fr-alert"}),[L,E]=(0,l.useState)(null!=p&&p),[M,T]=(0,l.useState)(null),I=(0,l.useRef)(!1);(0,l.useEffect)(()=>{void 0!==p&&E(e=>(e&&!p&&(I.current=!0),p))},[p]),(0,l.useEffect)(()=>{I.current&&null!==M&&(I.current=!1,M.focus())},[M]);let k=(0,b.K)(()=>{void 0===p&&E(!0),null==h||h()}),{t:O}=_();
1return L?null:l.createElement("div",Object.assign({id:C,className:(0,g.cx)(m.fr.cx("fr-alert","fr-alert--".concat(s),{"fr-alert--sm":c}),n.root,t),style:i},void 0!==z?{role:z}:{},{ref:r},S),void 0!==u&&l.createElement(o,{className:(0,g.cx)(m.fr.cx("fr-alert__title"),n.title)},u),void 0!==d&&l.createElement("string"==typeof d?"p":"div",{className:n.description},d),f&&l.createElement("button",{ref:T,className:(0,g.cx)(m.fr.cx("fr-link--close","fr-link"),n.close),onClick:k},O("hide message")))}));x.displayName=(0,p.I)({Alert:x});let{useTranslation:_,addAlertTranslations:S}=(0,h.iU)({componentName:(0,p.I)({Alert:x}),frMessages:{"hide message":"Masquer le message"}});S({lang:"en",messages:{"hide message":"Hide the message"}}),S({lang:"es",messages:{"hide message":"Occultar el mesage"}});let z=e=>{let{onClose:r}=e;return(0,a.jsx)(x,{severity:"error",title:"Erreur technique",description:"Erreur lors du chargement des donn\xe9es cartographiques.",closable:!0,onClose:r,className:"m-auto w-fit bg-white text-base"})},C=e=>{let{climadiagInfo:r}=e,[t,c]=(0,l.useState)(!1),u=(0,l.useRef)(null),d=(0,l.useCallback)(()=>{if(!u.current)return;let e=u.current.getMap();(0,s.e)(e,s.hJ.administrativeBoundaries),(e=>{e.getLayer("lcz-high-layer")||(e.addSource("lcz-high-source",{type:"raster",tiles:["https://cartagene.cerema.fr/server/rest/services/Hosted/l_lcz_spot_000_2022_tl/MapServer/tile/{z}/{y}/{x}?env=".concat("production")],tileSize:256,attribution:'© <a href="https://www.cerema.fr/fr/actualites/cerema-publie-nouvelles-donnees-surchauffe-urbaine/" target="_blank">Cerema</a>'}),e.addLayer({id:"lcz-high-layer",type:"raster",source:"lcz-high-source",paint:{"raster-opacity":.7},maxzoom:14})),e.getLayer("lcz-low-layer")||(e.addSource("lcz-low-source",{type:"raster",tiles:["https://cartagene.cerema.fr/server/services/l_lcz_spot_000_2022_mil/MapServer/WMSServer?service=WMS&request=GetMap&layers=0&styles=&format=image%2Fpng&transparent=true&version=1.3.0&width=256&height=256&crs=EPSG%3A3857&bbox={bbox-epsg-3857}%20Request%20Method%20GET"],tileSize:256,attribution:'© <a href="https://www.cerema.fr/fr/actualites/cerema-publie-nouvelles-donnees-surchauffe-urbaine/" target="_blank">Cerema</a>'}),e.addLayer({id:"lcz-low-layer",type:"raster",source:"lcz-low-source","source-layer":"0",paint:{"raster-opacity":.5},minzoom:14}))})(e),c(!1)},[]);return(0,a.jsxs)(o.T5,{ref:u,initialViewState:{zoom:2.5,longitude:2.333333,latitude:58.86471},onClick:f,onLoad:d,style:{width:"100%",height:"100%"},mapStyle:s.be.desaturated,onError:e=>{var r,t;return!(null==e||null==(t=e.error)||null==(r=t.message)?void 0:r.startsWith("AJAXError: Failed to fetch"))&&c(!0)},children:[(0,a.jsx)(i,{climadiagInfo:r}),(0,a.jsx)(n.ov,{position:"top-left",showCompass:!1}),t&&(0,a.jsx)(z,{onClose:()=>c(!1)})]})},L=C},88105:()=>{}}]);
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.