PageSourceSearch

https://my.eroad.co.nz/geofenceCentreMapPage.myeroad.fff4cd8ef1cf62da08c5.js

js eroad.co.nz collected 2026-09-26 07:46:20 UTC 29,076 bytes, 2 lines download raw bytes

1!function(){try{("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).__faroGitHash_myeroad="5ce3e63ee526711d9fdee9e150f093852f3a7cc4"}catch(e){}}(),function(){try{("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).__faroBundleId_myeroad="10.1.5092-apac"}catch(e){}}();try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e94ae9ee-e0cf-45ee-a9f0-6271c447851e",e._sentryDebugIdIdentifier="sentry-dbid-e94ae9ee-e0cf-45ee-a9f0-6271c447851e")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"10.1.5092-apac"},(self.webpackChunk_eroad_myeroad=self.webpackChunk_eroad_myeroad||[]).push([[2103,2183,4164],{4525:(e,t,a)=>{a.d(t,{S:()=>p});var r=a(52711),i=a(44448),o=a(14041),n=Object.defineProperty,l=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,c=(e,t,a)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;const p=e=>{var t=e,{accordion:a=!1,bordered:n=!0,"data-testid":p,"data-pendoid":u,destroyInactivePanel:m=!1,expandIconPosition:b="start",ghost:y=!1,size:g=i.o.MIDDLE}=t,h=((e,t)=>{var a={};for(var r in e)s.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&l)for(var r of l(e))t.indexOf(r)<0&&d.call(e,r)&&(a[r]=e[r]);return a})(t,["accordion","bordered","data-testid","data-pendoid","destroyInactivePanel","expandIconPosition","ghost","size"]);return o.createElement(r.A,((e,t)=>{for(var a in t||(t={}))s.call(t,a)&&c(e,a,t[a]);if(l)for(var a of l(t))d.call(t,a)&&c(e,a,t[a]);return e})({accordion:a,bordered:n,"data-pendoid":null!=u?u:"ui-library-collapse-pendo","data-testid":null!=p?p:"ui-library-collapse",destroyInactivePanel:m,expandIconPosition:b,ghost:y,size:g},h))}},11027:(e,t,a)=>{a.d(t,{O:()=>f});var r=a(70541),i=a(80601),o=a(37506),n=a(99204),l=a(34164),s=a(51480),d=a(47079),c=a(14041),p=Object.defineProperty,u=Object.defineProperties,m=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,h=(e,t,a)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;const f=({actions:e})=>{const{t}=(0,i.t)(),a=(0,n.a)(),p=(0,r.d4)(d.T.isGeofenceEditingOrCreating),f=s.e6.map(e=>{return t=((e,t)=>{for(var a in t||(t={}))y.call(t,a)&&h(e,a,t[a]);if(b)for(var a of b(t))g.call(t,a)&&h(e,a,t[a]);return e})({},e),a={disabled:e.path===s.I9.LIST&&p},u(t,m(a));var t,a});return c.createElement(o.zY,{hasBottomNav:!a,key:a?"page-header-mobile":"page-header"},c.createElement(o.sT,{title:t({id:a?"geofence.centre.page.title.mobile":"geofence.centre.page.title"}),actions:e}),!a&&c.createElement(l.I,{activeKey:window.location.pathname,testId:"GeofenceCentrePage-NavTabs",tabs:f}))}},15102:(e,t,a)=>{a.d(t,{N:()=>m});var r=a(14041),i=a(17331),o=a(65065),n=Object.defineProperty,l=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,c=(e,t,a)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;let p,u=!0;const m=r.forwardRef((e,t)=>{var a,n=e,{asyncSearchFunction:m,"data-testid":b,errorLabel:y,externalValue:g,noResultsLabel:h,onChange:f,onSelect:w,status:v,value:E}=n,A=((e,t)=>{var a={};for(var r in e)s.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&l)for(var r of l(e))t.indexOf(r)<0&&d.call(e,r)&&(a[r]=e[r]);return a})(n,["asyncSearchFunction","data-testid","errorLabel","externalValue","noResultsLabel","onChange","onSelect","status","value"]);const[S,C]=(0,r.useState)(null!=(a=null!=g?g:E)?a:""),[T,M]=(0,r.useState)(g),[x,_]=(0,r.useState)(!1),[I,O]=(0,r.useState)([]),N=void 0!==g&&g!==T?g:S;return r.createElement(i.j,((e,t)=>{for(var a in t||(t={}))s.call(t,a)&&c(e,a,t[a]);if(l)for(var a of l(t))d.call(t,a)&&c(e,a,t[a]);return e})({"data-testid":null!=b?b:"ui-library-async-auto-complete",onChange:(e,t)=>
1{u=!0,window.clearTimeout(p),C(e),M(g),_(!1),null==f||f(e,t),""!==e?!Array.isArray(t)&&void 0!==(null==t?void 0:t.value)||(p=window.setTimeout(()=>{return t=function*(){u=!1;try{_(!0);const t=yield m(e);if(u)return;const a=0===t.length?[{label:h,value:h,disabled:!0}]:t;O(a),_(!1)}catch(e){console.error(e),u||(O([{label:y,value:y,disabled:!0}]),_(!1))}},new Promise((e,a)=>{var r=e=>{try{o(t.next(e))}catch(e){a(e)}},i=e=>{try{o(t.throw(e))}catch(e){a(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(r,i);o((t=t.apply(void 0,null)).next())});var t},250)):O([])},onSelect:(e,t)=>{C(t.label),M(g),null==w||w(e,t)},options:I,ref:t,value:N},A),r.createElement(o.N,{allowClear:!0,loading:x,status:v}))})},29117:(e,t,a)=>{a.d(t,{W:()=>n});var r=a(3296);const i={enAU:{},enNZ:JSON.parse('{"map.library.eta.drawer.add.stop":"Add stop","map.library.eta.drawer.close":"Close","map.library.eta.drawer.dnd.tooltip":"Drag n hold to move stop","map.library.eta.drawer.input.destination.placeholder":"Enter destination","map.library.eta.drawer.input.origin.placeholder":"Enter starting point","map.library.eta.drawer.reset":"Reset","map.library.eta.drawer.reverse.button":"Reverse the start and end points","map.library.eta.drawer.routes.no.results.found":"Unable to find a route between these points","map.library.eta.drawer.search.error.result":"No results","map.library.eta.drawer.search.geofences":"Search geofences","map.library.eta.drawer.search.no.results":"No data received","map.library.eta.drawer.search.vehicles":"Search vehicles","map.library.eta.drawer.title":"Plan route","map.library.eta.list.map.select":"Select on map","map.library.eta.list.results":"Route estimates","map.library.eta.list.suggestions":"Suggestions","map.library.eta.list.your.location":"Your location","map.library.eta.options.drawer.congestion.charge.zones":"Avoid congestion charge zones","map.library.eta.options.drawer.controlled.access.highways":"Avoid controlled access highways","map.library.eta.options.drawer.difficult.turns":"Avoid difficult turns","map.library.eta.options.drawer.done":"Done","map.library.eta.options.drawer.ferries":"Avoid ferries","map.library.eta.options.drawer.hazardous.materials":"Hazardous materials","map.library.eta.options.drawer.hazardous.materials.all":"All hazardous materials","map.library.eta.options.drawer.hazardous.materials.placeholder":"Select hazardous material","map.library.eta.options.drawer.height":"Height restrictions","map.library.eta.options.drawer.height.subunit.imperial":"in","map.library.eta.options.drawer.height.subunit.metric":"cm","map.library.eta.options.drawer.height.unit.imperial":"ft","map.library.eta.options.drawer.height.unit.metric":"m","map.library.eta.options.drawer.length":"Length restrictions","map.library.eta.options.drawer.length.subunit.imperial":"in","map.library.eta.options.drawer.length.subunit.metric":"cm","map.library.eta.options.drawer.length.unit.imperial":"ft","map.library.eta.options.drawer.length.unit.metric":"m","map.library.eta.options.drawer.reset":"Reset","map.library.eta.options.drawer.title":"Route options","map.library.eta.options.drawer.tolls":"Avoid tolls","map.library.eta.options.drawer.tunnels":"Avoid tunnels","map.library.eta.options.drawer.vehicle.type.heavy.label":"Heavy","map.library.eta.options.drawer.vehicle.type.light.label":"Light","map.library.eta.options.drawer.weight":"Weight restrictions","map.library.eta.options.drawer.weight.axles":"axles","map.library.eta.options.drawer.weight.axles.tooltip":"Please enter a value greater than or equal to 2.","map.library.eta.options.drawer.weight.gross.tooltip.imperial":"Please enter the gross weight (combined weight of the vehicle including any trailer load) in pounds.","map.library.eta.options.drawer.weight.gross.tooltip.metric":"Please enter the gross weight (combined weight of the vehicle including any trailer load) in kilograms.","map.library.eta.options.drawer.weight.unit.imperial":"lbs","map.library.eta.options.drawer.weight.unit.metric":"kg","map.library.eta.options.drawer.width":"Width restrictions","map.library.eta.options.drawer.width.subunit.imperial":"in","map.library.eta.options.drawer.width.subunit.metric":"cm","map.library.eta.options.drawer.width.unit.imperial":"ft","map.library.eta.options.drawer.width.unit.metric":"m","map.library.eta.route.delay.hours":"incl. {count} hr delay","map.library.eta.route.delay.hours.minutes":"incl. {hours} hr {minutes} min delay","map.library.eta.route.delay.minutes":"incl. {count} min delay","map.library.eta.route.estimate.tooltip.car":"Estimated using light vehicle road speeds","map.library.eta.route.estimate.tooltip.truck":"Estimated using heavy vehicle road speeds","map.library.eta.route.fastest":"Fastest route","map.library.eta.route.info.estimated.arrival":"Estimated Arrival: {time}","map.library.eta.route.info.hours":"{count} h ","map.library.eta.route.info.minutes":"{count} min ","map.library.eta.routes.disclaimer":"Routing options are based on third-party information. EROAD does not guarantee the accuracy or scope of these route suggestions. You are responsible for ensuring any information entered is true and accurate. Arrival times shown are estimates only. Traffic, weather, or other events may cause delays.","map.library.eta.routes.disclaimer.read.less":"Read less","map.library.eta.routes.disclaimer.read.more":"Read more","map.library.eta.routes.disclaimer.title":"Disclaimer: ","map.library.geofence.actions.cancel":"Cancel","map.library.geofence.actions.create":"Add","map.library.geofence.actions.create.tooltip":"Add new geofence with a polygon","map.library.geolocation.location.blocked":"Access denied. Please enable location in your browser settings.","map.library.geolocation.location.unsupported":"Device location not supported. Update your browser and try again.","map.library.label.extension.odometer":"Odometer","map.library.label.extension.registration":"Regist. No","map.library.label.extension.speed":"Speed","map.library.location.select.pin.button.cancel":"Cancel","map.library.location.select.pin.button.confirm":"Confirm","map.library.map.drawer.title":"Map settings","map.library.map.search.error.result":"No results","map.library.map.search.no.results":"No data received","map.library.map.search.placeholder":"Enter address","map.library.map.settings":"Settings","map.library.tile.default":"Default","map.library.tile.satellite":"Satellite","map.library.tile.terrain":"Terrain"}'),enUS:{},frCA:JSON.parse('{"map.library.eta.drawer.add.stop":"Ajouter un arrêt","map.library.eta.drawer.close":"Fermer","map.library.eta.drawer.dnd.tooltip":"Glisser et maintenir pour déplacer l\'arrêt","map.library.eta.drawer.input.destination.placeholder":"Entrer la destination","map.library.eta.drawer.input.origin.placeholder":"Entrer le point de départ","map.library.eta.drawer.reset":"Réinitialiser","map.library.eta.drawer.reverse.button":"Inverser les points de départ et d\'arrivée","map.library.eta.drawer.routes.no.results.found":"Impossible de trouver un itinéraire entre ces points","map.library.eta.drawer.search.error.result":"Aucun résultat","map.library.eta.drawer.search.geofences":"Rechercher des géofences","map.library.eta.drawer.search.no.results":"Aucune donnée reçue","map.library.eta.drawer.search.vehicles":"Rechercher des véhicules","map.library.eta.drawer.title":"Planifier l\'itinéraire","map.library.eta.list.map.select":"Sélectionner sur la carte","map.library.eta.list.results":"Estimations de l\'itinéraire","map.library.eta.list.suggestions":"Suggestions","map.library.eta.list.your.location":"Votre emplacement","map.library.eta.options.drawer.congestion.charge.zones":"Éviter les zones de péage de congestion","map.library.eta.options.drawer.controlled.access.highways":"Éviter les autoroutes à accès contrôlé","map.library.eta.options.drawer.difficult.turns":"Éviter les virages difficiles","map.library.eta.options.drawer.done":"Terminé","map.library.eta.options.drawer.ferries":"Éviter les ferries","map.library.eta.options.drawer.hazardous.materials":"Matériaux dangereux","map.library.eta.options.drawer.hazardous.materials.all":"Tous les matériaux dangereux","map.library.eta.options.drawer.hazardous.materials.placeholder":"Sélectionner une matière dangereuse","map.library.eta.options.drawer.height":"Restrictions de hauteur","map.library.eta.options.drawer.height.subunit.imperial":"po","map.library.eta.options.drawer.height.subunit.metric":"cm","map.library.eta.options.drawer.height.unit.imperial":"pi","map.library.eta.options.drawer.height.unit.metric":"m","map.library.eta.options.drawer.length":"Restrictions de longueur","map.library.eta.options.drawer.length.subunit.imperial":"po","map.library.eta.options.drawer.length.subunit.metric":"cm","map.library.eta.options.drawer.length.unit.imperial":"pi","map.library.eta.options.drawer.length.unit.metric":"m","map.library.eta.options.drawer.reset":"Réinitialiser","map.library.eta.options.drawer.title":"Options d\'itinéraire","map.library.eta.options.drawer.tolls":"Éviter les péages","map.library.eta.options.drawer.tunnels":"Éviter les tunnels","map.library.eta.options.drawer.vehicle.type.heavy.label":"Lourd","map.library.eta.options.drawer.vehicle.type.light.label":"Léger","map.library.eta.options.drawer.weight":"Restrictions de poids","map.library.eta.options.drawer.weight.axles":"essieux","map.library.eta.options.drawer.weight.axles.tooltip":"Veuillez entrer une valeur supérieure ou égale à 2.","map.library.eta.options.drawer.weight.gross.tooltip.imperial":"Veuillez entrer le poids brut (poids combiné du véhicule y compris toute charge de remorque) en livres.","map.library.eta.options.drawer.weight.gross.tooltip.metric":"Veuillez entrer le poids brut (poids combiné du véhicule y compris toute charge de remorque) en kilogrammes.","map.library.eta.options.drawer.weight.unit.imperial":"lb","map.library.eta.options.drawer.weight.unit.metric":"kg","map.library.eta.options.drawer.width":"Restrictions de largeur","map.library.eta.options.drawer.width.subunit.imperial":"po","map.library.eta.options.drawer.width.subunit.metric":"cm","map.library.eta.options.drawer.width.unit.imperial":"pi","map.library.eta.options.drawer.width.unit.metric":"m","map.library.eta.route.delay.hours":"incl. {count} h de retard","map.library.eta.route.delay.hours.minutes":"incl. {hours} h {minutes} min de retard","map.library.eta.route.delay.minutes":"incl. {count} min de retard","map.library.eta.route.estimate.tooltip.car":"Estimé en utilisant les vitesses routières des véhicules légers","map.library.eta.route.estimate.tooltip.truck":"Estimé en utilisant les vitesses routières des véhicules lourds","map.library.eta.route.fastest":"Itinéraire le plus rapide","map.library.eta.route.info.estimated.arrival":"Arrivée estimée : {time}","map.library.eta.route.info.hours":"{count} h ","map.library.eta.route.info.minutes":"{count} min ","map.library.eta.routes.disclaimer":"Les options d\'itinéraire sont basées sur des informations de tiers. EROAD ne garantit pas l\'exactitude ou l\'étendue de ces suggestions d\'itinéraires. Vous êtes responsable de vous assurer que toutes les informations saisies sont vraies et exactes. Les heures d\'arr
1ivée indiquées sont uniquement des estimations. La circulation, la météo ou d\'autres événements peuvent causer des retards.","map.library.eta.routes.disclaimer.read.less":"Lire moins","map.library.eta.routes.disclaimer.read.more":"Lire plus","map.library.eta.routes.disclaimer.title":"Avertissement : ","map.library.geofence.actions.cancel":"Annuler","map.library.geofence.actions.create":"Ajouter","map.library.geofence.actions.create.tooltip":"Ajouter une nouvelle géofence avec un polygone","map.library.geolocation.location.blocked":"Accès refusé. Veuillez activer la localisation dans les paramètres de votre navigateur.","map.library.geolocation.location.unsupported":"Localisation de l\'appareil non prise en charge. Mettez à jour votre navigateur et réessayez.","map.library.label.extension.odometer":"Odomètre","map.library.label.extension.registration":"No d\'enregistrement","map.library.label.extension.speed":"Vitesse","map.library.location.select.pin.button.cancel":"Annuler","map.library.location.select.pin.button.confirm":"Confirmer","map.library.map.drawer.title":"Paramètres de la carte","map.library.map.search.error.result":"Aucun résultat","map.library.map.search.no.results":"aucune donnée recue","map.library.map.search.placeholder":"Entrer l\'adresse","map.library.map.settings":"Paramètres","map.library.tile.default":"Défaut","map.library.tile.satellite":"Satellite","map.library.tile.terrain":"Relief"}')};var o=a(14041);const n=({children:e})=>o.createElement(r.U,{enAU:i.enAU,enNZ:i.enNZ,enUS:i.enUS,frCA:i.frCA},e)},34164:(e,t,a)=>{a.d(t,{I:()=>s});var r=a(43420),i=a(62664),o=a(2175);const n=(0,a(1454).wY)(e=>({root:{overflow:"unset","& .ant-tabs-tab.ant-tabs-tab-active":{color:e.colors.primaryBlueActive,"& .ant-tabs-tab-btn":{color:e.colors.primaryBlueActive,textShadow:"unset",fontWeight:e.typography.weights.medium},"&:hover":{color:e.colors.primaryBlueHover}},"& .ant-tabs-ink-bar":{background:e.colors.primaryBlueActive},"& > .ant-tabs-nav":{marginBottom:0}}}),{name:"NavTabs"});var l=a(14041);const s=({activeKey:e,onTabClick:t,tabs:a,testId:s="NavTabs"})=>{const d=(0,i.Zp)(),c=n();return a&&0!==a.length?l.createElement(o.t,{activeKey:e,animated:!1,className:c.root,"data-testid":s,onTabClick:t||(e=>{d(e)}),items:a.map(({tabTestId:e,path:t,title:a,titleId:i,disabled:o})=>({key:t,"data-testid":e,label:a||i&&l.createElement(r.s,{id:i}),disabled:o}))}):null}},41914:(e,t,a)=>{a.r(t),a.d(t,{default:()=>le});var r=a(14041),i=a(70541),o=a(37506),n=a(99204),l=a(41892),s=a(75411),d=a(9943),c=a(47079),p=a(59491),u=a(49976),m=a(24776),b=a(19615),y=a(4807),g=a(38032),h=a(81561),f=a(97910),w=a(25816),v=a(79911),E=a(11071),A=a(73248),S=a(14041);const C=()=>{const e=(0,i.d4)(c.T.getSelectedAddressCoords);return e.length?S.createElement(A.K,{latitude:Number(e[1]),longitude:Number(e[0])}):null},T=(0,a(1454).wY)(()=>({root:{width:"100%",height:"100%","& > .mapboxgl-map":{width:"100%",height:"100%"}}}),{name:"GeofendeCentreMap"});var M=a(93084),x=a(58967),_=a(18021),I=a(51851),O=a(3239),N=a(13821),k=a(92857),P=a(30602),G=a(14025),z=a(62664),L=a(80601),j=a(14041);const R=({isVisible:e})=>{const t=(0,i.wA)(),a=(0,n.a)(),{pathname:o}=(0,z.zy)(),s=o.includes("/map"),d=(0,i.d4)(c.T.getMapTileType),p=!s&&a,u=P.id[d],m=P.xp.map(e=>P.id[e]),[b,y]=(0,r.useState)(!1),g=e=>{t(l.o.mapPreferencesUpdated({tile:e.id}))},h=(()=>{const e=(0,i.wA)(),{t}=(0,L.t)(),a=(0,i.d4)(c.T.getMapOverlayType);return P.OO.map(r=>{const i=P.Ch[r];return{name:t(`geofence.centre.map.options.show.${i.name}`),onChange:()=>{a===i.id?e(l.o.mapPreferencesUpdated({overlay:void 0})):e(l.o.mapPreferencesUpdated({overlay:i.id}))},isChecked:a===r}})})(),f=[[...h]];if(!e)return null;const w=m.findIndex(e=>e.id===u.id),v=m[w>=m.length-1?0:w+1],E=b?j.createElement(G.tD,{onClose:()=>{y(!1)},isHidden:p},j.createElement(G.UC,{currentTile:u,onSelect:g,tiles:m,options:f})):j.createElement(G.Bv,{action:()=>{y(!0)}}),A=j.createElement(j.Fragment,null,b&&j.createElement(G.GO,{onClose:()=>{y(!1)}},j.createElement(G.UC,{currentTile:u,onSelect:g,tiles:m,options:f})),j.createElement(G.ff,{tile:v,action:()=>{y(!0)}}));return a?E:A};var D=a(75801),F=a(14041);const U=({id:e,mapPadding:t})=>{var a;const o=(0,i.wA)(),{mapSearchBoundary:s}=(0,N.J)(),{cleanDrawing:d,updateMode:p}=(0,I.z)(),u=(0,n.a)(),m=(0,i.d4)(c.T.isDrawingAllowed),b="draw_polygon"===(null==(a=(0,i.d4)(c.T.getMapState))?void 0:a.drawMode),{userHasFullAccessToGeofences:y}=(0,k.e)(),g=y&&!u,h=(0,r.useCallback)(({callbackFn:e})=>{const t="draw_polygon";o(l.o.setMapState({drawMode:t})),p(t),null==e||e()},[o,p]),f=(0,r.useCallback)(({callbackFn:e})=>{o(l.o.setMapState({drawMode:"simple_select"})),d(),null==e||e()},[d,o]);return F.createElement(M.U,{mapPadding:t,bottomLeft:F.createElement(F.Fragment,null,g&&F.createElement(x.z,{canAddGeofence:m,canCancelGeofence:b,onCreateHandler:h,onCancelHandler:f}),F.createElement(O.p,null),F.createElement(R,{isVisible:!u})),topLeft:F.createElement(D.MapFilter,{isVisible:!u}),topRight:F.createElement(F.Fragment,null,F.createElement(_.V,{mapId:e,mapSearchPadding:t,mapSearchBoundary:s,onChange:()=>{o(l.o.setSelectedAddressCoords([]))},onSelect:e=>{o(l.o.setSelectedAddressCoords([e.longitude,e.latitude]))}}
1),F.createElement(R,{isVisible:u}))})};var B=a(86629),V=a(46487),H=a(51480),Y=a(111),Z=a(28547),q=a(45583),K=a(76328),$=a(14041),J=a(14041);const W=()=>{const{current:e}=(0,w.k)(),t=null==e?void 0:e.getCanvas().style,a=(0,i.wA)(),[o,n]=(0,r.useState)(!1),{drawMode:s}=(0,i.d4)(c.T.getMapState);X();const d=(()=>{const e=(0,i.wA)(),[t,a]=(0,r.useState)(),[o,n]=(0,r.useState)(),s=(0,i.d4)(c.T.getActiveGeofenceIndex),d=(0,i.d4)(c.T.getMapState).drawMode,p=(0,i.d4)(c.T.getMapEditingGeofence),u=(0,i.d4)(c.T.isGeofenceEditingOrCreating),m=(0,i.d4)(c.T.getNewGeofenceId),b=(0,i.d4)(c.T.getMapStaticGeofences),g=(0,K.j)({}),h=(0,r.useCallback)(({id:t,geojson:a})=>{e(l.o.setDrawerMode(H.SJ.CREATE)),e(l.o.newGeofenceDrawn({id:t,geojson:a}))},[e]),f=(0,r.useCallback)(({id:t,geojson:a})=>{e(l.o.geofenceShapeUpdated({id:t,geojson:a}))},[e]),w=(0,r.useCallback)(({drawMode:t})=>{e(l.o.setMapState({drawMode:t})),e(l.o.closeDrawer())},[e]),v=(0,r.useCallback)(({activeGeofenceId:t})=>{e(l.o.setActiveGeofenceId(t))},[e]),E=(0,q.yC)({onSelectionChanged:v,drawMode:d,newGeofenceId:m}),A={onGeofenceCreated:(0,q.sC)({onGeofenceCreated:h}),onGeofenceDrawModeChange:(0,q.ZA)({onDrawingModeChanged:w}),onGeofenceUpdated:(0,q.Nt)({onGeofenceUpdated:f}),onGeofenceMaxPointsError:(0,q.d_)(),onGeofenceMinPointsError:(0,q.Br)()},S=(0,r.useCallback)(t=>{e(l.o.setMapState({drawMode:t}))},[e]),C=b.map(({id:e,geojson:t,name:a,centerLocation:r})=>({id:e,geometry:t,properties:{name:a,centerLocation:r},type:"Feature"})),T=g&&$.createElement(Z.l,{drawMode:d,inEditOrCreateMode:u,editingGeofence:p,eventHandlers:A,updateMapState:S});return{layers:[(0,y.lx)({id:"geofences-static-layer",data:{features:C,type:"FeatureCollection"},hoveredFeature:t,selectedFeatureIndexes:s?[s]:[],onClick:e=>{d&&!["simple_select","direct_select"].includes(d)||E(e.object)},onHover:e=>{n(null==e?void 0:e.coordinate),a(null==e?void 0:e.object)}})],label:(()=>{const{centerLocation:e,name:a}=(null==t?void 0:t.properties)||{},{readable:r}=e||{};if(!o||!a)return null;const[i,n]=o;return $.createElement(Y.h,{latitude:n,location:r,longitude:i,name:a})})(),editor:T}})(),p=[...d.layers];return J.createElement(J.Fragment,null,J.createElement(B.p,{layers:p,onLoad:()=>{n(!0)},getCursor:({isHovering:e})=>(t&&(t.cursor=e?"pointer":"inherit"),""),onClick:e=>{e.layer||"direct_select"===s||a(l.o.setActiveGeofenceId(null))}}),o&&J.createElement(J.Fragment,null,d.editor,d.label))},X=()=>{const e=(0,i.wA)(),{fitMapToGeometry:t}=(0,V.V)(),a=(0,i.d4)(c.T.getActiveGeofenceGeoJsonOnMap),o=(0,i.d4)(c.T.getZoomGeofenceTrigger);(0,r.useEffect)(()=>{o&&a&&(t(a,{padding:{top:H.lA,bottom:H.lA,left:H.lA,right:H.Gd+H.lA}}),e(l.o.setZoomIntoActiveGeofence(null)))},[a,o,t,e])};var Q=a(14041);const ee=({id:e="geofence-centre-map"})=>{const t=T(),a=(0,i.wA)(),{center:o,zoom:n}=(0,E.l)(),s=(0,i.d4)(c.T.getMapTileType),d=(0,i.d4)(c.T.getMapOverlayType),p=(0,y.q6)({tileType:s,overlayType:d}),u=(0,y.jM)({tileType:s,overlayType:d}),m=(0,r.useRef)(null),A=(0,w.k)()[e];(0,v.l)(null!=A?A:null,m);const S=(0,y.oY)();return(0,b.y)(()=>()=>{a(l.o.geofenceMapClosed())}),Q.createElement(f.K,null,Q.createElement(h.lT,null,Q.createElement("div",{className:t.root,"data-testid":"Geofence-MapContainer",ref:m},p&&Q.createElement(g.T,{id:e,center:{longitude:o[0],latitude:o[1]},onMoveEnd:({viewState:e})=>{e&&S(e)},onMoveStart:()=>{S.cancel()},onZoomEnd:({viewState:e})=>{e&&S(e)},onZoomStart:()=>{S.cancel()},tileSourceUrl:p,trafficTileSourceUrl:u,zoom:n},Q.createElement(U,{id:e}),Q.createElement(C,null),Q.createElement(W,null)))))};var te=a(23356),ae=a(14041);const re=()=>{const e=(0,i.d4)(c.T.getModalType);return ae.createElement(ae.Fragment,null,ae.createElement(ee,null),ae.createElement(u.e,null),ae.createElement(m.w,null),ae.createElement(te.N,{modalType:e}))};var ie=a(11027),oe=a(56140),ne=a(14041);const le=(0,d.A)(()=>{const e=(0,p.I)(),t=(0,n.a)();(()=>{const e=(0,i.wA)();(0,r.useEffect)(()=>{e(l.o.fetchMapGeofences({}))},[e])})(),(0,s.M)();const{fetchError:a}=(0,i.d4)(c.T.getMapGeofencesResult);return ne.createElement("div",{className:e.root},ne.createElement(ie.O,null),ne.createElement(o.TK,{forAnUnscrollablePage:!0},a?ne.createElement(o.AX,null):ne.createElement(ne.Fragment,null,ne.createElement(re,null),t&&ne.createElement(oe.i,null))))})},56140:(e,t,a)=>{a.d(t,{i:()=>s});
1var r=a(42453),i=a(62664),o=a(51480);const n=(0,a(1454).wY)(e=>({root:{alignItems:"center",bottom:e.spacing(5),boxShadow:"0 0 5px 1px rgb(0, 0, 0, 0.1)",display:"flex",left:"50%",position:"fixed",transform:"translateX(-50%)",zIndex:10},item:{alignItems:"center",backgroundColor:e.colors.surfaceOverlay,border:`1px solid ${e.colors.primaryBlueDefault}`,color:e.colors.primaryBlueDefault,cursor:"pointer",display:"flex",height:40,justifyContent:"center",width:80},itemActive:{backgroundColor:e.colors.primaryBlueDefault,color:e.colors.surfaceOverlay},icon:{height:"auto",marginRight:e.spacing(1),width:16}}),{name:"MobilePageSwitch"});var l=a(14041);const s=()=>{const e=n(),t=(0,i.Zp)(),{pathname:a}=(0,i.zy)(),s=a.includes("/list"),p=a.includes("/map");return l.createElement("div",{className:e.root},l.createElement("button",{className:(0,r.$)(e.item,s&&e.itemActive),onClick:()=>t(o.I9.LIST),type:"button"},l.createElement("img",{className:e.icon,alt:"List",src:d(s)}),"List"),l.createElement("button",{className:(0,r.$)(e.item,p&&e.itemActive),onClick:()=>t(o.I9.MAP),type:"button"},l.createElement("img",{className:e.icon,alt:"Map",src:c(p)}),"Map"))};function d(e){return e?"./images/svg/icon-list-outline-white.svg":"./images/svg/icon-list-outline-blue.svg"}function c(e){return e?"./images/svg/icon-map-outline-white.svg":"./images/svg/icon-map-outline-blue.svg"}},59491:(e,t,a)=>{a.d(t,{I:()=>r});const r=(0,a(1454).wY)(e=>({root:{display:"flex",flexDirection:"column",height:"100vh",maxHeight:"100%",overflow:"hidden"},geofenceCentreTable:{"& .ant-table-content":{overflow:"hidden"},"& .ant-table-container:before":{display:"none"},"& .ant-table-container:after":{display:"none"},"& .geofence-centre__table__cell__name":{width:"22%",[`@media (max-width: ${e.breakpoints.values.md}px)`]:{width:"50%"}},"& .geofence-centre__table__cell__created-by":{width:"22%"},"& .geofence-centre__table__cell__expiry-date":{width:130,[`@media (max-width: ${e.breakpoints.values.md}px)`]:{width:"50%"}},"& .geofence-centre__table__cell__message":{width:"auto"},"& .geofence-centre__table__cell__notifications":{width:145}}}),{name:"GeofenceCentreListPage"})},73248:(e,t,a)=>{a.d(t,{K:()=>n});var r=a(68100),i=a(54479),o=a(14041);const n=({color:e,latitude:t,longitude:a,shape:n})=>o.createElement(r.pH,{latitude:t,longitude:a,style:{position:"absolute",zIndex:8},anchor:"bottom"},o.createElement("img",{alt:`location-marker-${n}`,src:(0,i.fE)({color:e,shape:n})}))},75801:(e,t,a)=>{a.r(t),a.d(t,{MapFilter:()=>u,default:()=>m});var r=a(70541),i=a(80601),o=a(67252),n=a(62009),l=a(41892),s=a(51480),d=a(47079);const c=(0,a(1454).wY)(e=>({root:{"& .ant-radio-group":{display:"flex"},"& .ant-radio-button-wrapper":{borderColor:e.colors.primaryBlueDefault,color:e.colors.primaryBlueDefault,fontSize:e.typography.sizes.sm.fontSize,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block"}}}),{name:"MapFilter"});var p=a(14041);const u=({isVisible:e=!0})=>{const t=c(),{t:a}=(0,i.t)(),u=(0,r.wA)(),m=(0,r.d4)(d.T.getInMapFilterSelectedOption),b=(0,r.d4)(d.T.getMapGeofencesCountForFilter);return(0,n.F)("geofenceCentre.geoalerts")&&e?p.createElement("div",{className:t.root},p.createElement(o.z6,{buttonStyle:"solid",onChange:({target:e})=>{u(l.o.inMapFilterChanged(e.value))},value:m},p.createElement(o.a,{value:s.n4.ALL},a({id:"geofence.centre.map.actions.filter.options.all.label",values:{count:b[s.n4.ALL]||0}})),p.createElement(o.a,{value:s.n4.INCAB_ONLY},a({id:"geofence.centre.map.actions.filter.options.incab.label",values:{count:b[s.n4.INCAB_ONLY]||0}})))):null},m=u},87152:(e,t,a)=>{a.d(t,{j:()=>r});const r=e=>{var t;const a=null==(t=null==e?void 0:e.match(/coords:\S*/))?void 0:t[0],r=null==a?void 0:a.split(":")[1].split(",");if(2!==(null==r?void 0:r.length))return null;const i=Number(r[0]),o=Number(r[1]);return isNaN(i)||isNaN(o)?null:{latitude:i,longitude:o}}}}]);
2//# sourceMappingURL=geofenceCentreMapPage.myeroad.fff4cd8ef1cf62da08c5.js.map

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.