PageSourceSearch

https://www.wiim.immo/_nuxt/0kNlg4FL.js

js wiim.immo collected 2026-10-09 23:00:54 UTC 3,146 bytes, 1 lines download raw bytes

1import{n as j,i as I,v as L}from"./hRFt3Tuk.js";import{B as n}from"./Cwm7gl9R.js";import{e as $,f as h,o as l,c as p,a as o,z as A,w as E,b as w,L as b,l as k,d as u,q as d,p as _}from"./D8644rYh.js";const N={class:"relative w-full"},V={key:0,class:"flex h-[440px] flex-col items-center justify-center rounded-xl bg-gray-100 text-center dark:bg-gray-800"},T={key:1,class:"h-[440px] rounded-xl bg-gray-100 dark:bg-gray-800 animate-pulse","aria-hidden":"true"},Z={class:"flex items-center gap-4 mt-3 text-xs text-grey-text flex-wrap"},q={class:"inline-flex items-center gap-1.5"},D={class:"inline-flex items-center gap-1.5"},F=$({__name:"CommuneZoneMap",props:{department:{},selectedInsee:{},recommendedInsee:{}},emits:["toggle"],setup(f,{emit:C}){const a=f,S=C,z={"06":{center:[43.92,7.17],zoom:9},83:{center:[43.42,6.29],zoom:9}},g=d(()=>z[a.department]),r=_(null),y=d(()=>new Set(a.selectedInsee)),x=d(()=>new Set(a.recommendedInsee));let i=new Map;function c(t){return y.value.has(t)?{color:n.primaryDark,weight:1.5,fillColor:n.primary,fillOpacity:.72}:x.value.has(t)?{color:n.primary,weight:1,fillColor:n.primaryBright,fillOpacity:.4}:{color:"#8b8ba3",weight:.7,fillColor:"#e2e2ee",fillOpacity:.25}}const B={style:t=>c(t.properties.code),onEachFeature(t,e){const s=t.properties.code;i.set(s,e),e.bindTooltip(t.properties.nom,{sticky:!0}),e.on("click",()=>S("toggle",s)),e.on("mouseover",()=>e.setStyle({weight:2.5})),e.on("mouseout",()=>e.setStyle(c(s)))}};h([y,x],()=>{for(const[t,e]of i)e.setStyle(c(t))});const m=_(!1);async function v(t){r.value=null,m.value=!1,i=new Map;try{r.value=await $fetch(`/geo/communes-${t}.json`)}catch{m.value=!0}}return h(()=>a.department,v,{immediate:!0}),(t,e)=>{const s=L,M=j,O=I;return l(),p("div",N,[m.value?(l(),p("div",V,[e[1]||(e[1]=o("p",{class:"text-sm font-medium text-dark dark:text-white"},"La carte des communes n'a pas pu être chargée",-1)),o("button",{type:"button",class:"mt-3 inline-flex min-h-9 items-center rounded-full bg-primary-600 px-4 text-xs font-semibold text-white hover:bg-primary-700",onClick:e[0]||(e[0]=G=>v(f.department))}," Réessayer ")])):r.value?(l(),A(O,{key:2,zoom:g.value.zoom,center:g.value.center,class:"w-full !h-[440px] z-10 rounded-xl overflow-hidden","use-global-leaflet":!1},{default:E(()=>[w(s,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png","layer-type":"base",name:"OpenStreetMap",attribution:"© OpenStreetMap"}),w(M,{geojson:r.value,options:B},null,8,["geojson"])]),_:1},8,["zoom","center"])):(l(),p("div",T)),o("div",Z,[o("span",q,[o("span",{class:"h-3 w-3 rounded-sm",style:b(`background:${k(n).primary}`)},null,4),e[2]||(e[2]=u(" Sélectionnée",-1))]),o("span",D,[o("span",{class:"h-3 w-3 rounded-sm",style:b(`background:${k(n).primaryBright}; opacity:.55`)},null,4),e[3]||(e[3]=u(" Conseillée",-1))]),e[4]||(e[4]=o("span",{class:"inline-flex items-center gap-1.5"},[o("span",{class:"h-3 w-3 rounded-sm",style:{background:"#e2e2ee"}}),u(" Autre commune")],-1)),e[5]||(e[5]=o("span",{class:"ml-auto"},"Cliquer une commune pour l'ajouter au scan",-1))])])}}}),W=Object.assign(F,{__name:"AdminProspectionCommuneZoneMap"});export{W 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.