1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6222],{23787:function(e,n,t){"use strict";t.d(n,{Z:function(){return r}});/** 2 * @license lucide-react v0.400.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */let r=(0,t(78030).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},47390:function(e,n,t){"use strict";t.d(n,{Z:function(){return r}});/** 7 * @license lucide-react v0.400.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */let r=(0,t(78030).Z)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},56222:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return b}});var r=t(57437),u=t(2265),i=t(20556),c=t(48977),a=t(6228),l=t(34362),o=t(16429),s=t(77691),f=t.n(s);t(60966);var d=t(47390),p=t(23787),m=t(49321);function x(){let e=(0,i.Sx)();return(0,u.useEffect)(()=>{let n=setTimeout(()=>e.invalidateSize(),200),t=setTimeout(()=>e.invalidateSize(),500);return()=>{clearTimeout(n),clearTimeout(t)}},[e]),null}delete f().Icon.Default.prototype._getIconUrl,f().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 h={Approved:"#10b981",Refused:"#ef4444",Withdrawn:"#f59e0b"};function v(e){return h[e||""]||"#6366f1"}function g(e){let{da:n,onAction:t}=e;return(0,r.jsxs)("div",{className:"min-w-[220px] max-w-[280px]",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,r.jsx)("span",{className:"text-xs font-bold text-casa-navy",children:n.application_number}),(0,r.jsx)("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded",style:{backgroundColor:v(n.decision)+"20",color:v(n.decision)},children:n.decision||"Pending"})]}),n.address&&(0,r.jsx)("p",{className:"text-[11px] text-gray-600 mb-1",children:n.address}),n.description&&(0,r.jsx)("p",{className:"text-[10px] text-gray-500 mb-2 line-clamp-2",children:n.description}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-x-3 gap-y-0.5 text-[10px] text-gray-500 mb-2.5",children:[n.zone_code&&(0,r.jsxs)("span",{children:["Zone: ",n.zone_code]}),n.lga&&(0,r.jsxs)("span",{children:["LGA: ",n.lga]}),null!=n.days_to_decision&&(0,r.jsxs)("span",{children:[n.days_to_decision,"d to decision"]}),null!=n.total_charges&&(0,r.jsxs)("span",{children:["Charges: $",n.total_charges.toLocaleString()]})]}),(0,r.jsxs)("div",{className:"flex gap-2 border-t border-gray-100 pt-2",children:[(0,r.jsxs)("button",{onClick:()=>null==t?void 0:t("select_da",{da_id:n.da_id,application_number:n.application_number}),className:"flex items-center gap-1 text-[10px] font-semibold text-casa-navy bg-casa-navy/5 hover:bg-casa-navy/10 px-2 py-1.5 rounded-md transition-colors",children:[(0,r.jsx)(d.Z,{className:"h-3 w-3"}),"Ask Casa"]}),(0,r.jsxs)("button",{onClick:()=>null==t?void 0:t("view_intelligence",{application_number:n.application_number,address:n.address,da_id:n.da_id}),className:"flex items-center gap-1 text-[10px] font-semibold text-emerald-700 bg-emerald-50 hover:bg-emerald-100 px-2 py-1.5 rounded-md transition-colors",children:[(0,r.jsx)(p.Z,{className:"h-3 w-3"}),"View Intelligence"]})]})]})}function b(e){let{output:n,onAction:t}=e,i=null==n?void 0:n.das,s=(0,u.useMemo)(()=>(i||[]).filter(e=>e.lat&&e.lng),[i]);if(!s.length)return null;let f=[s.reduce((e,n)=>e+(n.lat||0),0)/s.length,s.reduce((e,n)=>e+(n.lng||0),0)/s.length],d=s.map(e=>e.lat),p=s.map(e=>e.lng),h=Math.max(Math.max(...d)-Math.min(...d),Math.max(...p)-Math.min(...p));return(0,r.jsxs)("div",{className:"rounded-xl overflow-hidden border border-border/50 shadow-card h-full flex flex-col",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-2 bg-casa-navy text-white text-xs font-medium flex-shrink-0",children:[(0,r.jsx)(m.Z,{className:"h-3.5 w-3.5"}),s.length," DAs on map"]}),(0,r.jsx)("div",{className:"flex-1 min-h-[350px]",children:(0,r.jsxs)(c.h,{center:f,zoom:h>.5?10:h>.1?12:h>.02?14:15,className:"h-full w-full",scrollWheelZoom:!0,style:{minHeight:"350px"},children:[(0,r.jsx)(x,{}),(0,r.jsx)(a.I,{url:"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",attribution:'\xa9 <a href="https://carto.com">CARTO</a>'}),s.map(e=>(0,r.jsx)(l.c,{center:[e.lat,e.lng],radius:7,pathOptions:{color:"#fff",weight:2,fillColor:v(e.decision),fillOpacity:.85},children:(0,r.jsx)(o.G,{closeButton:!0,maxWidth:300,minWidth:220,children:(0,r.jsx)(g,{da:e,onAction:t})})},e.da_id))]})}),(0,r.jsxs)("div",{className:"flex items-center gap-3 px-3 py-1.5 bg-subtle text-[10px] text-text-tertiary",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"h-2 w-2 rounded-full bg-emerald-500"})," Approved"]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"h-2 w-2 rounded-full bg-red-500"})," Refused"]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"h-2 w-2 rounded-full bg-amber-500"})," Withdrawn"]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"h-2 w-2 rounded-full bg-indigo-500"})," Pending"]})]})]})}},60966:function(){},94124:function(e,n,t){"use strict";t.d(n,{d:function(){return u}});var r=t(2265);function u(e,n){let t=(0,r.useRef)(n);(0,r.useEffect)(function(){n!==t.current&&null!=e.attributionControl&&(null!=t.current&&e.attributionControl.removeAttribution(t.current),null!=n&&e.attributionControl.addAttribution(n)),t.current=n},[e,n])}},19626:function(e,n,t){"use strict";function r(e,n,t){n.center!==t.center&&e.setLatLng(n.center),null!=n.radius&&n.radius!==t.radius&&e.setRadius(n.radius)}t.d(n,{T:function(){return r}})},96008:function(e,n,t){"use strict";t.d(n,{G5:function(){return l},LE:function(){return a},RA:function(){return c}});var r=t(2265),u=t(54887),i=t(10670);function c(e){return(0,r.forwardRef)(function(n,t){let{instance:u,context:c}=e(n).current;return(0,r.useImperativeHandle)(t,()=>u),null==n.children?null:r.createElement(i.UO,{value:c},n.children)})}function a(e){return(0,r.forwardRef)(function(n,t){let[i,c]=(0,r.useState)(!1),{instance:a}=e(n,c).current;(0,r.useImperativeHandle)(t,()=>a),(0,r.useEffect)(function(){i&&a.update()},[a,i,n.children]);let l=a._contentNode;return l?(0,u.createPortal)(n.children,l):null})}function l(e){return(0,r.forwardRef)(function(n,t){let{instance:u}=e(n).current;return(0,r.useImperativeHandle)(t,()=>u),null})}},10670:function(e,n,t){"use strict";t.d(n,{Hb:function(){return u},UO:function(){return a},mE:function(){return l},sj:function(){return i}});var r=t(2265);function u(e){return Object.freeze({__version:1,map:e})}function i(e,n){return Object.freeze({...e,...n})}let c=(0,r.createContext)(null),a=c.Provider;function l(){let e=(0,r.useContext)(c);if(null==e)throw Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}},69650:function(e,n,t){"use strict";t.d(n,{y:function(){return i}});var r=t(2265),u=t(10670);function i(e){return function(n){let t=(0,u.mE)(),i=e(n,t),{instance:c}=i.current,a=(0,r.useRef)(n.position),{position:l}=n;return(0,r.useEffect)(function(){return c.addTo(t.map),function(){c.remove()}},[t.map,c]),(0,r.useEffect)(function(){null!=l&&l!==a.current&&(c.setPosition(l),a.current=l)},[c,l]),i}}},52777:function(e,n,t){"use strict";t.d(n,{I:function(){return i},O:function(){return u}});var r=t(2265);function u(e,n,t){return Object.freeze({instance:e,context:n,container:t})}function i(e,n){return null==n?function(n,t){let u=(0,r.useRef)();return u.current||(u.current=e(n,t)),u}:function(t,u){let i=(0,r.useRef)();i.current||(i.current=e(t,u));let c=(0,r.useRef)(t),{instance:a}
11=i.current;return(0,r.useEffect)(function(){c.current!==t&&(n(a,t,c.current),c.current=t)},[a,t,u]),i}}},32968:function(e,n,t){"use strict";t.d(n,{t:function(){return u}});var r=t(2265);function u(e,n){let t=(0,r.useRef)();(0,r.useEffect)(function(){return null!=n&&e.instance.on(n),t.current=n,function(){null!=t.current&&e.instance.off(t.current),t.current=null}},[e,n])}},42414:function(e,n,t){"use strict";t.d(n,{vm:function(){return d},dW:function(){return p},SO:function(){return m},Au:function(){return x},Lf:function(){return h}});var r=t(96008),u=t(69650),i=t(52777),c=t(94607),a=t(94124),l=t(10670),o=t(32968),s=t(37129),f=t(2265);function d(e){let n=(0,i.I)(function(n,t){return(0,i.O)(e(n),t)}),t=(0,u.y)(n);return(0,r.G5)(t)}function p(e,n){let t=(0,i.I)(e,n),u=(0,c.u)(t);return(0,r.RA)(u)}function m(e,n){var t;let u=(t=(0,i.I)(e),function(e,r){let u=(0,l.mE)(),i=t((0,s.q)(e,u),u);return(0,a.d)(u.map,e.attribution),(0,o.t)(i.current,e.eventHandlers),n(i.current,u,e,r),i});return(0,r.LE)(u)}function x(e,n){var t;let u=(t=(0,i.I)(e,n),function(e){let n=(0,l.mE)(),r=t((0,s.q)(e,n),n);return(0,o.t)(r.current,e.eventHandlers),(0,c.g)(r.current,n),function(e,n){let t=(0,f.useRef)();(0,f.useEffect)(function(){if(n.pathOptions!==t.current){let r=n.pathOptions??{};e.instance.setStyle(r),t.current=r}},[e,n])}(r.current,e),r});return(0,r.RA)(u)}function h(e,n){let t=(0,i.I)(e,n),u=(0,c.u)(t);return(0,r.G5)(u)}},99815:function(e,n,t){"use strict";function r(e,n,t){let{opacity:r,zIndex:u}=n;null!=r&&r!==t.opacity&&e.setOpacity(r),null!=u&&u!==t.zIndex&&e.setZIndex(u)}t.d(n,{I:function(){return r}})},94607:function(e,n,t){"use strict";t.d(n,{g:function(){return l},u:function(){return o}});var r=t(2265),u=t(94124),i=t(10670),c=t(32968),a=t(37129);function l(e,n){(0,r.useEffect)(function(){return(n.layerContainer??n.map).addLayer(e.instance),function(){n.layerContainer?.removeLayer(e.instance),n.map.removeLayer(e.instance)}},[n,e])}function o(e){return function(n){let t=(0,i.mE)(),r=e((0,a.q)(n,t),t);return(0,u.d)(t.map,n.attribution),(0,c.t)(r.current,n.eventHandlers),l(r.current,t),r}}},37129:function(e,n,t){"use strict";function r(e,n){let t=e.pane??n.pane;return t?{...e,pane:t}:e}t.d(n,{q:function(){return r}})},34362:function(e,n,t){"use strict";t.d(n,{c:function(){return l}});var r=t(42414),u=t(52777),i=t(10670),c=t(19626),a=t(77691);let l=(0,r.Au)(function({center:e,children:n,...t},r){let c=new a.CircleMarker(e,t);return(0,u.O)(c,(0,i.sj)(r,{overlayContainer:c}))},c.T)},48977:function(e,n,t){"use strict";t.d(n,{h:function(){return a}});var r=t(10670),u=t(77691),i=t(2265);function c(){return(c=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}let a=(0,i.forwardRef)(function({bounds:e,boundsOptions:n,center:t,children:a,className:l,id:o,placeholder:s,style:f,whenReady:d,zoom:p,...m},x){let[h]=(0,i.useState)({className:l,id:o,style:f}),[v,g]=(0,i.useState)(null);(0,i.useImperativeHandle)(x,()=>v?.map??null,[v]);let b=(0,i.useCallback)(i=>{if(null!==i&&null===v){let c=new u.Map(i,m);null!=t&&null!=p?c.setView(t,p):null!=e&&c.fitBounds(e,n),null!=d&&c.whenReady(d),g((0,r.Hb)(c))}},[]);(0,i.useEffect)(()=>()=>{v?.map.remove()},[v]);let y=v?i.createElement(r.UO,{value:v},a):s??null;return i.createElement("div",c({},h,{ref:b}),y)})},16429:function(e,n,t){"use strict";t.d(n,{G:function(){return a}});var r=t(42414),u=t(52777),i=t(77691),c=t(2265);let a=(0,r.SO)(function(e,n){let t=new i.Popup(e,n.overlayContainer);return(0,u.O)(t,n)},function(e,n,{position:t},r){(0,c.useEffect)(function(){let{instance:u}=e;function i(e){e.popup===u&&(u.update(),r(!0))}function c(e){e.popup===u&&r(!1)}return n.map.on({popupopen:i,popupclose:c}),null==n.overlayContainer?(null!=t&&u.setLatLng(t),u.openOn(n.map)):n.overlayContainer.bindPopup(u),function(){n.map.off({popupopen:i,popupclose:c}),n.overlayContainer?.unbindPopup(),n.map.removeLayer(u)}},[e,n,r,t])})},6228:function(e,n,t){"use strict";t.d(n,{I:function(){return l}});var r=t(42414),u=t(37129),i=t(52777),c=t(99815),a=t(77691);let l=(0,r.Lf)(function({url:e,...n},t){let r=new a.TileLayer(e,(0,u.q)(n,t));return(0,i.O)(r,t)},function(e,n,t){(0,c.I)(e,n,t);let{url:r}=n;null!=r&&r!==t.url&&e.setUrl(r)})},20556:function(e,n,t){"use strict";t.d(n,{$_:function(){return c},Sx:function(){return i},zV:function(){return a}});var r=t(10670),u=t(2265);function i(){return(0,r.mE)().map}function c(e,n){let t=i();return(0,u.useEffect)(function(){return t.on(e,n),function(){t.off(e,n)}},[t,e,n]),t}function a(e){let n=i();return(0,u.useEffect)(function(){return n.on(e),function(){n.off(e)}},[n,e]),n}}}]);
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.