1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5915],{95915:function(e,t,n){"use strict";n.r(t),n.d(t,{DAExplorerMap:function(){return h}});var r=n(57437),u=n(2265);n(60966);var o=n(20556),i=n(48977),l=n(40158),c=n(6228),a=n(88109),s=n(34362),f=n(41219),d=n(77691),p=n.n(d);delete p().Icon.Default.prototype._getIconUrl,p().Icon.Default.mergeOptions({iconRetinaUrl:"https://unpkg.com/[email protected]/dist/images/marker-icon-2x.png",iconUrl:"https://unpkg.com/[email protected]/dist/images/marker-icon.png",shadowUrl:"https://unpkg.com/[email protected]/dist/images/marker-shadow.png"});let m={approved:"#10B981",refused:"#EF4444",withdrawn:"#9CA3AF",pending:"#F59E0B"};function v(e){let{features:t}=e,n=(0,o.Sx)();return(0,u.useEffect)(()=>{if(t.length)try{let e=p().featureGroup(t.filter(e=>{var t,n;return(null===(t=e.properties)||void 0===t?void 0:t.lat)&&(null===(n=e.properties)||void 0===n?void 0:n.lng)}).map(e=>p().marker([e.properties.lat,e.properties.lng]))).getBounds();e.isValid()&&n.fitBounds(e,{padding:[50,50],maxZoom:16})}catch(e){}},[t,n]),null}function h(e){let{features:t,selectedDaId:n,onParcelClick:o,center:d,className:p=""}=e,h=d?[d.lat,d.lng]:[-27.47,153.02],{polygons:y,points:g}=(0,u.useMemo)(()=>{let e=[],n=[];for(let o of t){var r,u;("Polygon"===o.geometry.type||"MultiPolygon"===o.geometry.type)&&e.push(o),(null===(r=o.properties)||void 0===r?void 0:r.lat)&&(null===(u=o.properties)||void 0===u?void 0:u.lng)&&n.push({type:"Feature",geometry:{type:"Point",coordinates:[o.properties.lng,o.properties.lat]},properties:o.properties})}return{polygons:e,points:n}},[t]),x=(0,u.useCallback)(e=>{var t;let r=(null==e?void 0:null===(t=e.properties)||void 0===t?void 0:t.da_id)===n;return{color:"#1B2B5A",weight:r?3:1.5,opacity:r?1:.6,fillColor:"#1B2B5A",fillOpacity:r?.25:.08}},[n]),b=(0,u.useCallback)((e,t)=>{t.on("click",()=>{var t;(null===(t=e.properties)||void 0===t?void 0:t.da_id)&&o(e.properties.da_id,e.properties.property_id)})},[o]),E=(0,u.useMemo)(()=>{let e=t.slice(0,5).map(e=>{var t;return(null===(t=e.properties)||void 0===t?void 0:t.da_id)||""}).join(",");return"parcels-".concat(n,"-").concat(t.length,"-").concat(e)},[n,t]);return(0,r.jsxs)("div",{className:"rounded-xl overflow-hidden border border-border/50 ".concat(p),children:[(0,r.jsxs)(i.h,{center:h,zoom:14,className:"h-full w-full",style:{minHeight:"500px"},scrollWheelZoom:!0,zoomControl:!0,children:[(0,r.jsxs)(l.et,{position:"topright",children:[(0,r.jsx)(l.et.BaseLayer,{checked:!0,name:"Clean",children:(0,r.jsx)(c.I,{attribution:'\xa9 <a href="https://carto.com/">CARTO</a>',url:"https://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}{r}.png"})}),(0,r.jsx)(l.et.BaseLayer,{name:"Labels",children:(0,r.jsx)(c.I,{attribution:'\xa9 <a href="https://carto.com/">CARTO</a>',url:"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png"})}),(0,r.jsx)(l.et.BaseLayer,{name:"Satellite",children:(0,r.jsx)(c.I,{attribution:"Esri",url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"})})]}),(0,r.jsx)(v,{features:t}),y.length>0&&(0,r.jsx)(a.Q,{data:{type:"FeatureCollection",features:y},style:x,onEachFeature:b},E),g.map(e=>{let t=e.properties,u=function(e){if(!e)return"pending";let t=e.toLowerCase();return t.includes("approv")||t.includes("granted")?"approved":t.includes("refus")?"refused":t.includes("withdraw")?"withdrawn":"pending"}(t.decision),i=m[u],l=t.da_id===n;return(0,r.jsx)(s.c,{center:[t.lat,t.lng],radius:l?8:5,pathOptions:{color:l?"#1B2B5A":i,fillColor:i,fillOpacity:l?1:.8,weight:l?3:1.5},eventHandlers:{click:()=>o(t.da_id,t.property_id)},children:(0,r.jsx)(f.u,{direction:"top",offset:[0,-8],opacity:.95,children:(0,r.jsxs)("div",{className:"text-xs",children:[(0,r.jsx)("p",{className:"font-semibold",children:t.address||t.application_number}),(0,r.jsxs)("p",{className:"capitalize",children:[u," ",t.days_to_decision?"(".concat(t.days_to_decision,"d)"):""]}),t.zone_code&&(0,r.jsxs)("p",{children:[t.zone_code," \xb7 ",t.lga]})]})})},t.da_id)})]}),(0,r.jsxs)("div",{className:"bg-surface px-4 py-2 flex items-center gap-4 border-t border-border/30",children:[Object.entries(m).map(e=>{let[t,n]=e;return(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("div",{className:"h-3 w-3 rounded-full",style:{backgroundColor:n}}),(0,r.jsx)("span",{className:"text-[10px] text-text-tertiary capitalize",children:t})]},t)}),(0,r.jsxs)("span",{className:"text-[10px] text-text-tertiary ml-auto",children:[t.length," DA",1!==t.length?"s":""," shown"]})]})]})}},60966:function(){},94124:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var r=n(2265);function u(e,t){let n=(0,r.useRef)(t);(0,r.useEffect)(function(){t!==n.current&&null!=e.attributionControl&&(null!=n.current&&e.attributionControl.removeAttribution(n.current),null!=t&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}},19626:function(e,t,n){"use strict";function r(e,t,n){t.center!==n.center&&e.setLatLng(t.center),null!=t.radius&&t.radiu
1s!==n.radius&&e.setRadius(t.radius)}n.d(t,{T:function(){return r}})},96008:function(e,t,n){"use strict";n.d(t,{G5:function(){return c},LE:function(){return l},RA:function(){return i}});var r=n(2265),u=n(54887),o=n(10670);function i(e){return(0,r.forwardRef)(function(t,n){let{instance:u,context:i}=e(t).current;return(0,r.useImperativeHandle)(n,()=>u),null==t.children?null:r.createElement(o.UO,{value:i},t.children)})}function l(e){return(0,r.forwardRef)(function(t,n){let[o,i]=(0,r.useState)(!1),{instance:l}=e(t,i).current;(0,r.useImperativeHandle)(n,()=>l),(0,r.useEffect)(function(){o&&l.update()},[l,o,t.children]);let c=l._contentNode;return c?(0,u.createPortal)(t.children,c):null})}function c(e){return(0,r.forwardRef)(function(t,n){let{instance:u}=e(t).current;return(0,r.useImperativeHandle)(n,()=>u),null})}},10670:function(e,t,n){"use strict";n.d(t,{Hb:function(){return u},UO:function(){return l},mE:function(){return c},sj:function(){return o}});var r=n(2265);function u(e){return Object.freeze({__version:1,map:e})}function o(e,t){return Object.freeze({...e,...t})}let i=(0,r.createContext)(null),l=i.Provider;function c(){let e=(0,r.useContext)(i);if(null==e)throw Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}},69650:function(e,t,n){"use strict";n.d(t,{y:function(){return o}});var r=n(2265),u=n(10670);function o(e){return function(t){let n=(0,u.mE)(),o=e(t,n),{instance:i}=o.current,l=(0,r.useRef)(t.position),{position:c}=t;return(0,r.useEffect)(function(){return i.addTo(n.map),function(){i.remove()}},[n.map,i]),(0,r.useEffect)(function(){null!=c&&c!==l.current&&(i.setPosition(c),l.current=c)},[i,c]),o}}},52777:function(e,t,n){"use strict";n.d(t,{I:function(){return o},O:function(){return u}});var r=n(2265);function u(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function o(e,t){return null==t?function(t,n){let u=(0,r.useRef)();return u.current||(u.current=e(t,n)),u}:function(n,u){let o=(0,r.useRef)();o.current||(o.current=e(n,u));let i=(0,r.useRef)(n),{instance:l}=o.current;return(0,r.useEffect)(function(){i.current!==n&&(t(l,n,i.current),i.current=n)},[l,n,u]),o}}},32968:function(e,t,n){"use strict";n.d(t,{t:function(){return u}});var r=n(2265);function u(e,t){let n=(0,r.useRef)();(0,r.useEffect)(function(){return null!=t&&e.instance.on(t),n.current=t,function(){null!=n.current&&e.instance.off(n.current),n.current=null}},[e,t])}},42414:function(e,t,n){"use strict";n.d(t,{vm:function(){return d},dW:function(){return p},SO:function(){return m},Au:function(){return v},Lf:function(){return h}});var r=n(96008),u=n(69650),o=n(52777),i=n(94607),l=n(94124),c=n(10670),a=n(32968),s=n(37129),f=n(2265);function d(e){let t=(0,o.I)(function(t,n){return(0,o.O)(e(t),n)}),n=(0,u.y)(t);return(0,r.G5)(n)}function p(e,t){let n=(0,o.I)(e,t),u=(0,i.u)(n);return(0,r.RA)(u)}function m(e,t){var n;let u=(n=(0,o.I)(e),function(e,r){let u=(0,c.mE)(),o=n((0,s.q)(e,u),u);return(0,l.d)(u.map,e.attribution),(0,a.t)(o.current,e.eventHandlers),t(o.current,u,e,r),o});return(0,r.LE)(u)}function v(e,t){var n;let u=(n=(0,o.I)(e,t),function(e){let t=(0,c.mE)(),r=n((0,s.q)(e,t),t);return(0,a.t)(r.current,e.eventHandlers),(0,i.g)(r.current,t),function(e,t){let n=(0,f.useRef)();(0,f.useEffect)(function(){if(t.pathOptions!==n.current){let r=t.pathOptions??{};e.instance.setStyle(r),n.current=r}},[e,t])}(r.current,e),r});return(0,r.RA)(u)}function h(e,t){let n=(0,o.I)(e,t),u=(0,i.u)(n);return(0,r.G5)(u)}},99815:function(e,t,n){"use strict";function r(e,t,n){let{opacity:r,zIndex:u}=t;null!=r&&r!==n.opacity&&e.setOpacity(r),null!=u&&u!==n.zIndex&&e.setZIndex(u)}n.d(t,{I:function(){return r}})},94607:function(e,t,n){"use strict";n.d(t,{g:function(){return c},u:function(){return a}});var r=n(2265),u=n(94124),o=n(10670),i=n(32968),l=n(37129);function c(e,t){(0,r.useEffect)(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function a(e){return function(t){let n=(0,o.mE)(),r=e((0,l.q)(t,n),n);return(0,u.d)(n.map,t.attribution),(0,i.t)(r.current,t.eventHandlers),c(r.current,n),r}}},37129:function(e,t,n){"use strict";function r(e,t){let n=e.pane??t.pane;return n?{...e,pane:n}
1:e}n.d(t,{q:function(){return r}})},34362:function(e,t,n){"use strict";n.d(t,{c:function(){return c}});var r=n(42414),u=n(52777),o=n(10670),i=n(19626),l=n(77691);let c=(0,r.Au)(function({center:e,children:t,...n},r){let i=new l.CircleMarker(e,n);return(0,u.O)(i,(0,o.sj)(r,{overlayContainer:i}))},i.T)},88109:function(e,t,n){"use strict";n.d(t,{Q:function(){return l}});var r=n(42414),u=n(52777),o=n(10670),i=n(77691);let l=(0,r.Au)(function({data:e,...t},n){let r=new i.GeoJSON(e,t);return(0,u.O)(r,(0,o.sj)(n,{overlayContainer:r}))},function(e,t,n){t.style!==n.style&&(null==t.style?e.resetStyle():e.setStyle(t.style))})},40158:function(e,t,n){"use strict";n.d(t,{et:function(){return f}});var r=n(52777),u=n(10670),o=n(69650),i=n(96008),l=n(77691),c=n(2265);let a=(0,r.I)(function({children:e,...t},n){let o=new l.Control.Layers(void 0,void 0,t);return(0,r.O)(o,(0,u.sj)(n,{layersControl:o}))},function(e,t,n){t.collapsed!==n.collapsed&&(!0===t.collapsed?e.collapse():e.expand())}),s=(0,o.y)(a),f=(0,i.RA)(s);function d(e){return function(t){let n=(0,u.mE)(),r=(0,c.useRef)(t),[o,i]=(0,c.useState)(null),{layersControl:l,map:a}=n,s=(0,c.useCallback)(t=>{null!=l&&(r.current.checked&&a.addLayer(t),e(l,t,r.current.name),i(t))},[l,a]),f=(0,c.useCallback)(e=>{l?.removeLayer(e),i(null)},[l]),d=(0,c.useMemo)(()=>(0,u.sj)(n,{layerContainer:{addLayer:s,removeLayer:f}}),[n,s,f]);return(0,c.useEffect)(()=>{null!==o&&r.current!==t&&(!0===t.checked&&(null==r.current.checked||!1===r.current.checked)?a.addLayer(o):!0===r.current.checked&&(null==t.checked||!1===t.checked)&&a.removeLayer(o),r.current=t)}),t.children?c.createElement(u.UO,{value:d},t.children):null}}f.BaseLayer=d(function(e,t,n){e.addBaseLayer(t,n)}),f.Overlay=d(function(e,t,n){e.addOverlay(t,n)})},48977:function(e,t,n){"use strict";n.d(t,{h:function(){return l}});var r=n(10670),u=n(77691),o=n(2265);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let l=(0,o.forwardRef)(function({bounds:e,boundsOptions:t,center:n,children:l,className:c,id:a,placeholder:s,style:f,whenReady:d,zoom:p,...m},v){let[h]=(0,o.useState)({className:c,id:a,style:f}),[y,g]=(0,o.useState)(null);(0,o.useImperativeHandle)(v,()=>y?.map??null,[y]);let x=(0,o.useCallback)(o=>{if(null!==o&&null===y){let i=new u.Map(o,m);
1null!=n&&null!=p?i.setView(n,p):null!=e&&i.fitBounds(e,t),null!=d&&i.whenReady(d),g((0,r.Hb)(i))}},[]);(0,o.useEffect)(()=>()=>{y?.map.remove()},[y]);let b=y?o.createElement(r.UO,{value:y},l):s??null;return o.createElement("div",i({},h,{ref:x}),b)})},6228:function(e,t,n){"use strict";n.d(t,{I:function(){return c}});var r=n(42414),u=n(37129),o=n(52777),i=n(99815),l=n(77691);let c=(0,r.Lf)(function({url:e,...t},n){let r=new l.TileLayer(e,(0,u.q)(t,n));return(0,o.O)(r,n)},function(e,t,n){(0,i.I)(e,t,n);let{url:r}=t;null!=r&&r!==n.url&&e.setUrl(r)})},41219:function(e,t,n){"use strict";n.d(t,{u:function(){return l}});var r=n(42414),u=n(52777),o=n(77691),i=n(2265);let l=(0,r.SO)(function(e,t){let n=new o.Tooltip(e,t.overlayContainer);return(0,u.O)(n,t)},function(e,t,{position:n},r){(0,i.useEffect)(function(){let u=t.overlayContainer;if(null==u)return;let{instance:o}=e,i=e=>{e.tooltip===o&&(null!=n&&o.setLatLng(n),o.update(),r(!0))},l=e=>{e.tooltip===o&&r(!1)};return u.on({tooltipopen:i,tooltipclose:l}),u.bindTooltip(o),function(){u.off({tooltipopen:i,tooltipclose:l}),null!=u._map&&u.unbindTooltip()}},[e,t,r,n])})},20556:function(e,t,n){"use strict";n.d(t,{$_:function(){return i},Sx:function(){return o},zV:function(){return l}});var r=n(10670),u=n(2265);function o(){return(0,r.mE)().map}function i(e,t){let n=o();return(0,u.useEffect)(function(){return n.on(e,t),function(){n.off(e,t)}},[n,e,t]),n}function l(e){let t=o();return(0,u.useEffect)(function(){return t.on(e),function(){t.off(e)}},[t,e]),t}}}]);
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.