PageSourceSearch

https://www.transurban.com/etc.clientlibs/digitalcms/clientlibs/di…/MelbourneTollCalculator.fe8f548a.chunk.js

js transurban.com collected 2026-09-24 19:41:23 UTC 112,868 bytes, 2 lines download raw bytes

1/*! For license information please see MelbourneTollCalculator.fe8f548a.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkui_frontend=self.webpackChunkui_frontend||[]).push([[9281],{59440:(e,s,a)=>{a.r(s),a.d(s,{default:()=>F});var n=a(47313),i=a(73063);const t=n.createContext(null),l=t.Provider,c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAABcCAIAAADlFdJmAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQwIDc5LjE2MDQ1MSwgMjAxNy8wNS8wNi0wMTowODoyMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUE1RUU2NjY2QUFFMTFFODkxQTlEQjY0OTU0QTk1RkQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUE1RUU2NjU2QUFF
2MTFFODkxQTlEQjY0OTU0QTk1RkQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MDc0MDU2Rjg0NkYyMTFFNjk1MjZCM0M3OUY5RUNBMzkiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MDc0MDU2Rjk0NkYyMTFFNjk1MjZCM0M3OUY5RUNBMzkiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7N464nAAAGH0lEQVR42uxYe0zVVRw/59yrC7l6uRKDdAl44d7KMqYo5pOCxrCilKZ/uKmV0Jz2B2tjOtlqo3LDR87FcoivNlv2UOec6CJ5KQvMqLWsy2UIORBmcGGgNPD+Tt/z+J374N7uvWFbLc7l8fud+/1+zvf5Ob/fwaOjowghCh+EMaLsH3zgH0IaRgRmKMWYcAm44KJMAol/GqIE8QF3mDIAzJUpFyEgwHCxpstQrsYuxEJUA32jgOA2ULE+fGp+6zzya+0Pg86+sX4jNlqMMfPN1s32FdmJVmGEXJ5ZhbHuCAel2Onq31Jf2TT0HRXOeA3QzJiefmTFm6mxZiEPaAxPQHB5WnOrc/2VDwbcLhR8xBgsp5btfHZOsogHQBF9Cep0uTZcLfPTNxkfgh/vGRDY0Li31TUA+hAjCIfHkayzH14ZahRyBOMtKdnbbLkp0xPgtm2op7y1qrKtWqPSu2UznrmcV4RZDnVHLnd25NYXC//BuxNL38qfs8TPhdO3mjZePahkLqwsy0pMoiqpRx11Kn4Fqdnj9WGsfTRjqy1HzyA96qgV2ZcQ3w86lOh2++pgsdxmz1XXLYNOhkV1iP4xGcWYqdFWU3wwiKToOBXdvrE+UZIETXhIiNgpFpmz0bvtw73BpDvu3hm+/4dUMcaydCiIp2fYlNxHjqpgEOVeX6WZU5BsJT5et2eK9oNR4fwa8jdeHyYPOS+pYn/NnslTo8cCMrx0xhKVsE2NB4uuH4OKEjNwAbcwqUoLhLMTk3lVe/VIq6s/82LJ7+47fgUOf5X/YjxsiKvNed8WG6PxQHgyYrPMPLm8GLrIWxqU/fTNBguI2WZa9IrwNLtgGexw9b9RX3ktSLMvMi08thKaPUY2O2co3REkKo1zF0LVnTePO+taBlqh5AzYONNonm9O2Wxb9Tz4L3iNLUoEXXhBUNn1lJMRp0yk95RaQvAMEfTJOl1VJxUdo0Q5N2rsni0knWImYkmefA7UNRVOzLAFFmYsgJg6EUiMWaQ9zDZprxT30K+yVpaXtE5MEfUNR9ensT5JKX0wbTYJ8d+B0PSW0DRekRpyRwZRUVF5uKKC17/sKkINrHb/hiMYGURradhNfSFCVCe3nxCx5WD5ECH/hgkhwgHGci0WF8wen3AEjrAgsI51Yx0M9P1WJaFCwB/JsOE+pykiqAjhiDICoxIxUhD8RQTpTKC0AsUtVEYYg4IAgXoyUJZRggx+GQllBRYMqhmYBW4qn9F8VjWGEU4qkyrImur0F3ZSNTfX5+5CPoli4nCtOMzTUVhQqCicmwHlZYw4IxAILJyhBPtqhS5wKvcx9gvNKpMSaV2IYiIUe+2O4YeTKj0WSI0zRmR8wXynog5ATeP50GhEsYAOYRkpLPTs/P8E/YaREfk2pelLatSXc8IIp+xu9mCm8WLHEYdTNhZTZySONBRpaf1/9lTj2NjYZCweXDgDzv7saP6s+sI1583ugeGpBhJvjl5gTVqftfrJxxYHqGCvNwE2eu90FpfvOdfSNr5ooVdeSrPu2V4cH5cYFOJG6/VXS9/rHhz5C7NnmaO+KNk1z54eAALWzyl+u6Nv2OfFKiqKvRuN+IAmxZoule1Ttqhw0pJD+5Q+wbjwxZd/rPyk9/R5+IELuCX6JgZiuz7eq3YkacUNR/Py4nfECyA0+IkdJfkrM/1fMhvqNu4upXJfww1l786zZ3isOPVNlXqBLHghb7w+OzlYsWpr3hr9UZKeqr7o48i3re2ek4M1+UFPDl7xfNXkbPeB6HYNyZMD03TrrNlBTw4SEkxR08R1l65CvB4DJlbgsywmeXIwPNR+uzvoyUFPz/DIPXE9W1eREBmpyZ6TgzNfBj05OPuVul6UkuwDsS4rV6W94vw5yF+Ak4OGukPnzqjCgZbxgYD+yU9PVXvHpt2lReUH27q65MlBVxfcwqRK/NqFKU89vjjMAp/GC/xeOAWOYOrTnTuhi3xODkbu+ek/Yo46uWOHd7P6UM4TtoU1+w/kpc3FOODOBs0+t3b/Ae82DcAXIho//dL8+eWqZmf77YG7UwwkwWxaYE1c91wu9x+HoJzJTWAS4t8D8acAAwAHeeaGhhSsAwAAAABJRU5ErkJggg==",o={fireEvent:function(e,s,a){!function(e,s,a){if("undefined"!==typeof window.ga){let n={eventCategory:e,eventAction:s,eventLabel:a};window.ga("send","event",n),console.log("analyticsService debug - GA:"),console.log(n)}}(e,s,a),function(e,s,a){if("undefined"!==typeof window.digitalData){let n={type:"analytics",event:e};n[s]=a,console.log("analyticsService debug - AA:"),console.log(n),window.digitalData&&window.digitalData.events.push(n)}}(e,s,a)}};var r=a(46417);const d=e=>{let{dataTollsJSON:s,citylinkHeading:a,eastlinkHeading:l,travelFromDefaultLabel:d,travelToDefaultLabel:p,resetText:h}=e;const{contextData:m,setContextData:k}=(0,n.useContext)(t);return setTimeout((()=>{window.grunticon&&window.grunticon.embedIcons(window.grunticon.getIcons(window.grunticon.getCSS(window.grunticon.href)))}),10),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"toll-calculator__start-end-wrapper",children:[(0,r.jsx)("div",{className:"label",children:(0,r.jsx)("label",{children:a})}),(0,r.jsx)("div",{className:"toll-calculator__start-end",children:(0,r.jsx)("img",{className:"marker-icons",src:c,alt:"marker icon"})}),(0,r.jsxs)("div",{className:"toll-calculator__start-end-labels",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"vh",htmlFor:"city-start",children:"Travel from"}),(0,r.jsxs)("select",{id:"city-start",className:"js-toll-calc-select js-no-simple-select",value:m.entryPointCityLinkObj.name,onChange:e=>{const a=s.find((s=>s.name===e.target.value));o.fireEvent("tollCalc","selectStart",a.name);const n=a.validExits.map((e=>s.find((s=>{if(e.id===s.id)return s}))));k((0,i.Z)((0,i.Z)({},m),{},{entryPointCityLinkObj:a,exitPointCityLinkObj:(m.exitPointCityLinkObj.name,{name:""}),exitPointsCityLinkList:n}))},disabled:""!==m.entryPointCityLinkObj.name&&""!==m.exitPointCityLinkObj.name&&""!==m.entryPointEastLinkObj.name&&""===m.exitPointEastLinkObj.name,children:[(0,r.jsx)("option",{value:"",className:"",disabled:!0,selected:!0,style:{display:"none"},children:"Select CityLink entry"}),s.map(((e,s)=>e.exitOnly||"EastLink"==e.groupName?"":(0,r.jsxs)("option",{value:e.name,children:[e.id,". ",e.name]},e.id)))]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"vh",htmlFor:"city-en
2d",children:"Travel to"}),(0,r.jsxs)("select",{id:"city-end",className:"js-toll-calc-select js-no-simple-select",value:m.exitPointCityLinkObj.name,onChange:e=>{const a=s.find((s=>s.name===e.target.value));o.fireEvent("tollCalc","selectEnd",a.name),o.fireEvent("tollCalc","trip",m.entryPointCityLinkObj.name+" + "+m.entryPointCityLinkObj.name),o.fireEvent("tollCalc","trip",m.entryPointCityLinkObj.name+" + "+a.name),k((0,i.Z)((0,i.Z)({},m),{},{exitPointCityLinkObj:a}))},disabled:""!==m.entryPointCityLinkObj.name&&""!==m.exitPointCityLinkObj.name&&""!==m.entryPointEastLinkObj.name&&""===m.exitPointEastLinkObj.name||m.exitPointsCityLinkList.length<1,children:[(0,r.jsx)("option",{value:"",className:"",disabled:!0,selected:!0,style:{display:"none"},children:"Select CityLink exit"}),m.exitPointsCityLinkList&&m.exitPointsCityLinkList.map(((e,s)=>(0,r.jsxs)("option",{value:e.name,children:[e.id,". ",e.name]},e.id)))]})]})]})]}),(0,r.jsxs)("div",{className:"toll-calculator__start-end-wrapper",children:[(0,r.jsx)("div",{className:"label",children:(0,r.jsx)("label",{children:l})}),(0,r.jsx)("div",{className:"toll-calculator__start-end",children:(0,r.jsx)("img",{className:"marker-icons",src:c})}),(0,r.jsxs)("div",{className:"toll-calculator__start-end-labels",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"vh",htmlFor:"east-start",children:"Travel from"}),(0,r.jsxs)("select",{id:"east-start",className:"js-toll-calc-select js-no-simple-select",value:m.entryPointEastLinkObj.name,onChange:e=>{const a=s.find((s=>s.name===e.target.value));o.fireEvent("tollCalc","selectStart",a.name);const n=a.validExits.map((e=>s.find((s=>{if(e.id===s.id)return s}))));k((0,i.Z)((0,i.Z)({},m),{},{entryPointEastLinkObj:a,exitPointEastLinkObj:(m.exitPointEastLinkObj.name,{name:""}),exitPointsEastLinkList:n}))},disabled:""!==m.entryPointCityLinkObj.name&&""===m.exitPointCityLinkObj.name,children:[(0,r.jsx)("option",{value:"",className:"",disabled:!0,selected:!0,style:{display:"none"},children:"Select EastLink entry"}),s.map(((e,s)=>e.exitOnly||"EastLink"!=e.groupName?"":(0,r.jsxs)("option",{value:e.name,children:[e.id,". ",e.name]},e.id)))]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"vh",htmlFor:"east-end",children:"Travel to"}),(0,r.jsxs)("select",{id:"east-end",className:"js-toll-calc-select js-no-simple-select",value:m.exitPointEastLinkObj.name,onChange:e=>{const a=s.find((s=>s.name===e.target.value));o.fireEvent("tollCalc","selectEnd",a.name),o.fireEvent("tollCalc","trip",m.entryPointEastLinkObj.name+" + "+m.entryPointEastLinkObj.name),o.fireEvent("tollCalc","trip",m.entryPointEastLinkObj.name+" + "+a.name),k((0,i.Z)((0,i.Z)({},m),{},{exitPointEastLinkObj:a}))},disabled:m.exitPointsEastLinkList.length<1,children:[(0,r.jsx)("option",{value:"",className:"",disabled:!0,selected:!0,style:{display:"none"},children:"Select EastLink exit"}),m.exitPointsEastLinkList&&m.exitPointsEastLinkList.map(((e,s)=>(0,r.jsxs)("option",{value:e.name,children:[e.id,". ",e.name]},e.id)))]})]})]})]}),(0,r.jsx)("div",{className:"toll-calculator__reset-button-wrapper",children:(0,r.jsxs)("div",{className:"toll-calculator__reset-button",onClick:()=>{o.fireEvent("tollCalc","reset","Reset intersections"),k((e=>(0,i.Z)((0,i.Z)({},e),{},{entryPointCityLinkObj:{name:""},exitPointsCityLinkList:[],exitPointCityLinkObj:{name:""},entryPointEastLinkObj:{name:""},exitPointsEastLinkList:[],exitPointEastLinkObj:{name:""},resetForm:!0,onEastlinkDiscount:"off",onPeak:"on"})))},children:[(0,r.jsx)("span",{className:"icon icon--theme icon--xx-small icon--reset","data-grunticon-embed":"true"}),h]})})]})};var p=a(24499),h=a(76216);const m=(e,s)=>{let a={};return e.filter((function(e){e.id===s&&(a=e)})),a},k=(e,s)=>parseFloat(e)+parseFloat(s),x=e=>{let s;return"N/A"===e?e:(e?(s=parseFloat(e),s="$"+s.toFixed(2)):s="$0.00",s)};let v;!function(e){e.CBD="cbd",e.CityLinkNorth="north",e.CityLinkSouth="south",e.EastLink="eastLink"}(v||(v={}));const u=e=>{let{apiKey:s,mapId:a,dataTollsJSON:l,dataMapStyleJSON:c,dataLandmarksJSON:d,dataGantryLocationJSON:m,legendTitle:k,legendTollPointLabel:x,legendMarkerIntersectionLabel:u,legendMarkerStartLabel:j,legendMarkerEndLabel:b,legendNoExitLabel:P,viewMapLabelMobileBar:L,hideMapLabelMobileBar:O,resetTextMobile:N,showTollsLabelMobile:y,dataPolyLinesJSON:f}=e;const{contextData:M,setContextData:w}=(0,n.useContext)(t),[g,C]=n.useState(!0),[A,E]=n.useState(!1);let T=(0,n.useRef)(null),B=(0,n.useRef)([]),S=(0,n.useRef)([]);
2const[_,F]=(0,n.useState)(!0),U=(0,n.useRef)(null),D=(0,n.useRef)(null);let I=(0,n.useRef)([]),H=(0,n.useRef)([]),R=(0,n.useRef)([]),K=l.filter((e=>!e.groupName)),Z=l.filter((e=>e.groupName));const J=e=>{let s=[];for(let a=0;a<e.length;a++){const n={lat:+e[a][0],lng:+e[a][1]};s.push(n)}new google.maps.Polyline({path:s,geodesic:!0,strokeColor:"#0E893C"}).setMap(T.current)},V=(0,n.useRef)(null),G=(0,n.useRef)({}),Y=(e,s,a)=>{e.forEach(((e,n)=>{const t=a(e,n),l=document.createElement("div");l.className=t.className,l.setAttribute("data-content",t.textContent),l.textContent=t.textContent;const c=l.classList.contains("markerStart"),r=l.classList.contains("markerEnd"),d=c?"Start: "+(0,h.fA)(e.content):r?"End: "+(0,h.fA)(e.content):(0,h.fA)(e.content),p=document.createElement("span");let m="";if(!0===c?m="markerStart":!0===r&&(m="markerEnd"),p.classList.add("toll-calculator__info-box"),""!==m&&p.classList.add(m),"right"===e.labelPosition?(p.style.left="30px",p.style.top="0"):"left"===e.labelPosition?(p.style.right="30px",p.style.top="0"):"top"===e.labelPosition?(p.style.bottom="35px",p.style.right="-70px"):"bottom"===e.labelPosition&&(p.style.top="30px",p.style.right="-70px"),p.textContent=d,l.appendChild(p),e.highlighted){const s=document.createElement("div");s.classList.add("toll-calculator__highlight",e.labelPosition),s.textContent=e.highlighted,s.style.position="absolute","right"===e.labelPosition?(s.style.left="30px",s.style.top="0"):"left"===e.labelPosition?(s.style.right="30px",s.style.top="0"):"top"===e.labelPosition?(s.style.bottom="30px",s.style.right="-50px"):"bottom"===e.labelPosition&&(s.style.top="30px",s.style.right="-70px"),l.appendChild(s)}const k=new D.current({map:T.current,position:e.position,content:l,zIndex:""!==m?10:2}),x=l.classList.contains("markerNoExit");"cityLink"===s?(k.addListener("click",(e=>{let{domEvent:s}=e,a=s.currentTarget.querySelector("#melbourne-toll__map .toll-calculator__marker");if(!x)if(0===M.entryPointCityLinkObj.name.length){const e=K.find((e=>e.id==a.dataset.content));o.fireEvent("tollCalc","selectStartMap",e.name);const s=e.validExits.map((e=>K.find((s=>e.id===s.id)))).filter((e=>!!e));w((0,i.Z)((0,i.Z)({},M),{},{entryPointCityLinkObj:e,exitPointsCityLinkList:s}))}else if(a.dataset.content==M.entryPointCityLinkObj.id)w((0,i.Z)((0,i.Z)({},M),{},{entryPointCityLinkObj:{name:""},exitPointsCityLinkList:[],exitPointCityLinkObj:{name:""},resetForm:!0})),W();else if(a.dataset.content==M.exitPointCityLinkObj.id)w((0,i.Z)((0,i.Z)({},M),{},{exitPointCityLinkObj:{name:""}}));else{const e=K.find((e=>e.id==a.dataset.content));o.fireEvent("tollCalc","selectEndMap",e.name),w((0,i.Z)((0,i.Z)({},M),{},{exitPointCityLinkObj:e}))}})),B.current.push(k)):"eastLink"===s&&(k.addListener("click",(e=>{let{domEvent:s}=e,a=s.currentTarget.querySelector("#melbourne-toll__map .toll-calculator__marker");if(!x)if(0===M.entryPointEastLinkObj.name.length){const e=Z.find((e=>e.id==a.dataset.content));o.fireEvent("tollCalc","selectStartMap",e.name);const s=e.validExits.map((e=>Z.find((s=>e.id===s.id)))).filter((e=>!!e));w((0,i.Z)((0,i.Z)({},M),{},{entryPointEastLinkObj:e,exitPointsEastLinkList:s}))}else if(a.dataset.content==M.entryPointEastLinkObj.id)w((0,i.Z)((0,i.Z)({},M),{},{entryPointEastLinkObj:{name:""},exitPointsEastLinkList:[],exitPointEastLinkObj:{name:""},resetForm:!0})),Q();else if(a.dataset.content===M.exitPointEastLinkObj.id)w((0,i.Z)((0,i.Z)({},M),{},{exitPointEastLinkObj:{name:""}}));else{const e=Z.find((e=>e.id==a.dataset.content));o.fireEvent("tollCalc","selectEndMap",e.name),w((0,i.Z)((0,i.Z)({},M),{},{exitPointEastLinkObj:e}))}})),S.current.push(k))}))},z=e=>{"cityLink"===e&&(B.current.forEach((e=>{e.setMap(null)})),B.current=[]),"eastLink"===e&&(S.current.forEach((e=>{e.setMap(null)})),S.current=[])},W=function(){var e,s;let a=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n="cityLink";null===(e=G.current)||void 0===e||null===(s=e[n+"TollPath"])||void 0===s||s.setMap(null),G.current[n+"TollPath"]=null,z(n),a||q(),Y(I.current[0],n,(e=>({className:"toll-calculator__marker "+(e.exitOnly?"markerNoExit":"markerIntersection"),textContent:e.id.toString()})))},Q=function(){var e,s;let a=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n="eastLink";null===(e=G.current)||void 0===e||null===(s=e[n+"TollPath"])||void 0===s||s.setMap(null),G.current[n+"TollPath"]=null,z(n),a||X(),Y(I.current[1],n,(e=>({className:"toll-calculator__marker "+(e.exitOnly?"markerNoExit":"markerIntersection"),textContent:e.id.toString()})))},q=()=>{const e=f[v.CBD],s=f[v.CityLinkNorth],a=f[v.CityLinkSouth];
2J(e),J(s),J(a)},X=()=>{const e=f[v.EastLink];J(e)},$=(e,s)=>{let a=0===s?"cityLink":"eastLink";I.current[s]=e.map((e=>{const s=Number(e.marker.split(",")[0]),a=Number(e.marker.split(",")[1]);return{id:e.id,content:e.name,position:new U.current.maps.LatLng(s,a),type:e.name+"TYPE",exitOnly:!!e.exitOnly,highlighted:e.highlighted?e.highlighted:"",labelPosition:e.labelPosition}})),Y(I.current[s],a,(e=>({className:"toll-calculator__marker "+(e.exitOnly?"markerNoExit":"markerIntersection"),textContent:e.id.toString()})))},ee=(e,s,a,n)=>{let i=0===n?"cityLink":"eastLink";if(0===a.length)return;const t=[e,...a].map((a=>{const n=Number(a.marker.split(",")[0]),i=Number(a.marker.split(",")[1]);let t=0,l=0;if(s.name.length>0){const n=e.validExits.find((e=>e.id===s.id));"north"===n.direction&&(t=Number(a.geoPointNorthBound.split(",")[0]),l=Number(a.geoPointNorthBound.split(",")[1])),"east"===n.direction&&(t=Number(a.geoPointSouthBound.split(",")[0]),l=Number(a.geoPointSouthBound.split(",")[1])),"south"===n.direction&&(t=Number(a.geoPointSouthBound.split(",")[0]),l=Number(a.geoPointSouthBound.split(",")[1]))}return{id:a.id,content:a.name,position:new U.current.maps.LatLng(n,i),geoPosition:new U.current.maps.LatLng(t,l),type:a.name+"TYPE",exitOnly:!!a.exitOnly,highlighted:a.highlighted?a.highlighted:"",labelPosition:a.labelPosition}}));if(z(i),Y(I.current[n],i,(e=>{const a=t.find((s=>s.id===e.id));let n=!1;"cityLink"===i&&""!==M.entryPointCityLinkObj.name&&""!==M.exitPointCityLinkObj.name&&""!==M.entryPointEastLinkObj.name&&""===M.exitPointEastLinkObj.name&&(n=!0);const l=t.find((s=>s.id===e.id&&s===t[0]));let c=!1;return e.id===(null===s||void 0===s?void 0:s.id)&&(c=!0),{className:"toll-calculator__marker "+(n&&(l||c)?"markerGrey":l?"markerStart":c?"markerEnd":a?"markerIntersection":"markerNoExit"),textContent:e.id.toString()}})),s.name.length>0){const a=t.find((s=>s.content===e.name)),n=t.find((e=>e.content===s.name));((e,s,a)=>{var n,i;G.current[a]||(G.current[a]=new U.current.maps.DirectionsRenderer({suppressMarkers:!0,polylineOptions:{strokeColor:"#0E893C"},preserveViewport:!0}),G.current[a].setMap(T.current)),null===(n=V.current)||void 0===n||n.route({origin:e,destination:s,optimizeWaypoints:!0,travelMode:null===(i=U.current)||void 0===i?void 0:i.maps.TravelMode.DRIVING}).then((e=>{G.current[a].setDirections(e)}))})(null===a||void 0===a?void 0:a.geoPosition,null===n||void 0===n?void 0:n.geoPosition,i+"TollPath"),G.current[i+"TollPath"].setOptions({polylineOptions:{strokeColor:"#feb612",strokeOpacity:1,strokeWeight:8,zIndex:5}})}},se=()=>{A?o.fireEvent("tollCalc","mobileMap","Hide map"):o.fireEvent("tollCalc","mobileMap","Show map"),E(!A)};return(0,n.useEffect)((()=>{M.resetForm&&(W(M.resetForm),Q(M.resetForm),w((0,i.Z)((0,i.Z)({},M),{},{resetForm:!1})))}),[M.resetForm]),(0,n.useEffect)((()=>{(async()=>{new p.aN({apiKey:s,version:"weekly",libraries:["places"]}).load().then((async e=>{U.current=e;const{AdvancedMarkerElement:s}=await U.current.maps.importLibrary("marker");D.current=s,F(!1)}))})()}),[]),(0,n.useEffect)((()=>{if(!1===_){const n={center:{lat:-37.91268411987984,lng:145.05723762499997},zoom:11,zoomControl:!0,streetViewControl:!0,streetViewControlOptions:{position:U.current.maps.ControlPosition.RIGHT_BOTTOM},zoomControlOptions:{position:U.current.maps.ControlPosition.RIGHT_BOTTOM},mapId:a};T.current=new U.current.maps.Map(document.getElementById("melbourne-toll__map"),n),H.current=d.map((e=>{const s=Number(e.marker.split(",")[0]),a=Number(e.marker.split(",")[1]);return{id:e.id,labelText:e.labelText,position:new U.current.maps.LatLng(s,a),type:e.labelText+"TYPE",icon:e.icon,iconPosition:e.iconPosition,iconState:e.iconState,labelPosition:e.labelPosition,labelTheme:e.labelTheme,labelBorder:e.labelBorder,labelSize:e.labelSize,zIndex:e.zIndex}})),R.current=m.map((e=>{const s=Number(e.marker.split(",")[0]),a=Number(e.marker.split(",")[1]);return{id:e.id,content:e.name,labelPosition:e.labelPosition,position:new U.current.maps.LatLng(s,a)}})),google.maps.event.addListenerOnce(T.current,"tilesloaded",(()=>{(()=>{let e,s,a;s=24,e=0,a=setInterval((function(){let s;window.grunticon&&window.grunticon.embedIcons(window.grunticon.getIcons(window.grunticon.getCSS(window.grunticon.href))),e++,s=document.querySelectorAll("#map span.icon:not(:has(svg))").length,(0===s||24===e)&&clearTimeout(a)}),307)})()})),e=H.current,s=e=>({className:"",textContent:e.content}),e.forEach(((e,a)=>{s(e,a);let n=document.createElement("div"),i=[],t=[],l=["icon"],c="",o="",r="";if(void 0===e.labelTheme?(i=["marker--landmark"],t=["marker--landmark-text","is-"+e.labelPosition,e.labelTheme]):(i=["marker--landmark-modular","is-"+e.labelPosition,e.labelTheme],t=["marker--landmark-text-modular","is-"+e.iconPosition,e.labelTheme]),"on"===e.labelBorder&&(i.push("border-on"),t.push("border-on")),void 0!==e.labelSize&&e.labelSize.length>0&&(i.push(e.labelSize),t.push(e.labelSize)),"on"===e.iconState)if(void 0!==e.icon&&e.icon.length>0&&l.push(e.icon),"left"===e.iconPosition){let e=document.createElement("span");e.className=l.join(" "),e.setAttribute("data-grunticon-embed",""),c=e}else if("right"===e.iconPosition){let e=document.createElement("span");e.className=l.join(" "),e.setAttribute("data-grunticon-embed",""),o=e}r=document.createElement(void 0===e.labelTheme?"strong":"span"),r.className=void 0===e.labelTheme?"":"text",r.textContent=e.labelText;let d=document.createElement("div");d.className=t.join(" "),void 0===e.labelTheme?d.appendChild(r):(""!==c&&d.appendChild(c),d.appendChild(r),""!==o&&d.appendChild(o)),n.className=i.join(" "),n.appendChild(d),new D.current({map:T.current,position:e.position,content:n,zIndex:0})})),((e,s)=>{e.forEach(((e,a)=>{const n=s(e,a),i=document.createElement("div");i.className=n.className;const t=document.createElement("span"),l=e.content;t.classList.add("toll-calculator__info-box","toll-point","mehere"),t.textContent=l,"right"===e.labelPosition?(t.style.left="30px",t.style.top="-10px",t.style.zIndex="3"):"left"===e.labelPosition?(t.style.right="30px",t.style.top="-10px",t.style.zIndex="3"):"top"===e.labelPosition&&(t.style.bottom="20px",t.style.right="-57px",t.style.zIndex="3"),i.appendChild(t),new D.current({map:T.current,position:e.position,content:i,zIndex:1}).addListener("click",(e=>{let{domEvent:s}=e}))}))})(R.current,(e=>({className:"toll-calculator__toll-point",textContent:e.content}
2))),$(K,0),$(Z,1),V.current=new U.current.maps.DirectionsService,W(),Q()}var e,s}),[_]),(0,n.useEffect)((()=>{ee(M.entryPointCityLinkObj,M.exitPointCityLinkObj,M.exitPointsCityLinkList,0)}),[M.exitPointsCityLinkList,M.exitPointCityLinkObj]),(0,n.useEffect)((()=>{ee(M.entryPointEastLinkObj,M.exitPointEastLinkObj,M.exitPointsEastLinkList,1)}),[M.exitPointsEastLinkList,M.exitPointEastLinkObj]),setTimeout((()=>{window.grunticon&&window.grunticon.embedIcons(window.grunticon.getIcons(window.grunticon.getCSS(window.grunticon.href)))}),10),(0,r.jsxs)("div",{className:"melbourne-toll__map-container toll-calculator__map-wrapper ".concat(!0===A?"open":""),children:[(0,r.jsxs)("div",{id:"js-mob-map-bar",className:"toll-calculator__map-bar",onClick:se,children:[!A&&(0,r.jsxs)("span",{children:[L,(0,r.jsx)("span",{className:"toll-calculator__view-map-icon icon--small icon--white icon--chevron-up","data-grunticon-embed":"true"})]}),A&&(0,r.jsxs)("span",{children:[O,(0,r.jsx)("span",{className:"toll-calculator__view-map-icon icon--small icon--white icon--chevron-down","data-grunticon-embed":"true"})]})]}),(0,r.jsxs)("div",{className:"toll-calculator__legend",children:[(0,r.jsxs)("div",{className:"legend-toggle clear-fix",onClick:()=>{C(!g)},children:[(0,r.jsx)("div",{className:"legend-title",children:k}),(0,r.jsx)("div",{className:"icon--xx-small legend-icon-desktop ".concat(g?"icon--chevron-up":"icon--chevron-down")}),(0,r.jsx)("div",{className:"icon--xx-small legend-icon-mobile ".concat(g?"icon--chevron-down":"icon--chevron-up")})]}),(0,r.jsxs)("div",{className:"legend-content clear-fix ".concat(g?"toggled":""),children:[(0,r.jsxs)("div",{className:"legend-item",children:[(0,r.jsx)("div",{className:"legend-icon toll-calculator__toll-point"}),x]}),(0,r.jsxs)("div",{className:"legend-item",children:[(0,r.jsx)("div",{className:"legend-icon toll-calculator__marker markerIntersection"}),u]}),(0,r.jsxs)("div",{className:"legend-item",children:[(0,r.jsx)("div",{className:"legend-icon toll-calculator__marker markerStart"}),j]}),(0,r.jsxs)("div",{className:"legend-item",children:[(0,r.jsx)("div",{className:"legend-icon toll-calculator__marker markerEnd"}),b]}),(0,r.jsxs)("div",{className:"legend-item",children:[(0,r.jsx)("div",{className:"legend-icon toll-calculator__marker markerNoExit"}),P]})]})]}),A&&(0,r.jsxs)("div",{className:"toll-calculator__map-buttons",children:[(0,r.jsx)("div",{className:"reset",onClick:()=>{w((0,i.Z)((0,i.Z)({},M),{},{entryPointCityLinkObj:{name:""},exitPointsCityLinkList:[],exitPointCityLinkObj:{name:""},entryPointEastLinkObj:{name:""},exitPointsEastLinkList:[],exitPointEastLinkObj:{name:""},resetForm:!0,onEastlinkDiscount:"off",onPeak:"on"}))},children:(0,r.jsx)("span",{children:N})}),(0,r.jsx)("div",{id:"js-mob-map-buttons",className:"finished",onClick:se,children:(0,r.jsx)("span",{className:"",children:O})})]}),(0,r.jsx)("div",{id:"melbourne-toll__map"})]})},j=e=>{let{dataVehicleJSON:s,typeOfVehicle:a,typeOfVehicleHiddenLabel:l,timeOfTravelLabel:c,timeOfTravelHiddenLabel:d,peakTimeText:p,peakIcon:h,offpeakTimeText:m,offPeakIcon:k,peakChangeoverQuestion:x,peakChangeoverLeft:v,peakChangeoverLeftIcon:u,peakChangeoverRight:j,peakChangeoverRightIcon:b,weekdayLabel:P,weekendLabel:L,tollsDiff:O,unsureVehicleType:N}=e;const{contextData:y,setContextData:f}=(0,n.useContext)(t),[M,w]=n.useState(!1),[g,C]=n.useState(!1),[A,E]=n.useState(!1),T=(e,s)=>{"on"===s?o.fireEvent("tollCalc","setTravelTime","Peak"):"off"===s?o.fireEvent("tollCalc","setTravelTime","Off-peak"):"bothAM"===s?o.fireEvent("tollCalc","setTravelTime","After-6AM"):"bothPM"===s&&o.fireEvent("tollCalc","setTravelTime","After-8PM"),f((0,i.Z)((0,i.Z)({},y),{},{onPeak:s}))};(0,n.useEffect)((()=>{!1===g&&f((0,i.Z)((0,i.Z)({},y),{},{onPeak:"on"}))}),[g]);const B=(e,s)=>{"on"===s?o.fireEvent("tollCalc","setTravelTime","Weekend"):o.fireEvent("tollCalc","setTravelTime","Weekday"),f((0,i.Z)((0,i.Z)({},y),{},{onEastlinkDiscount:s}))};return(0,n.useEffect)((()=>{"hcv"===y.vehicleTypeObj.code&&y.entryPointCityLinkObj.name.length>0&&y.exitPointCityLinkObj.name.length>0?w(!0):(f((0,i.Z)((0,i.Z)({},y),{},{onPeak:"on"})),w(!1)),"car"===y.vehicleTypeObj.code&&y.entryPointEastLinkObj.name.length>0&&y.exitPointEastLinkObj.name.length>0?E(!0):(E(!1),f((0,i.Z)((0,i.Z)({},y),{},{onEastlinkDiscount:"off"})))}),[y.vehicleTypeObj,y.exitPointCityLinkObj,y.exitPointEastLinkObj]),(0,n.useEffect)((()=>{window.grunticon&&window.grunticon.embedIcons(window.grunticon.getIcons(window.grunticon.getCSS(window.grunticon.href)))}),[y.onEastlinkDiscount,y.onPeak,g,y.vehicleTypeObj,y.entryPointCityLinkObj,y.exitPointCityLinkObj,y.entryPointEastLinkObj,y.exitPointEastLinkObj]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"toll-calculator__vehicle-wrapper",children:[(0,r.jsx)("h3",{id:"type",children:a}),(0,r.jsx)("label",{className:"hidden",children:l}),(0,r.jsx)("div",{className:"cf vtype",children:s.map(((e,a)=>{var n;return(0,r.jsxs)("div",{className:"toll-calculator__vehicle-type ".concat(e.name===y.vehicleTypeObj.name?"selected":""),onClick:()=>(e=>{let a=s.find((s=>s.name===e));o.fireEvent("tollCalc","selectVehicle",a.name),f((0,i.Z)((0,i.Z)({},y),{},{vehicleTypeObj:a,onPeak:"on"})),setTimeout((()=>{window.grunticon&&window.grunticon.embedIcons(window.grunticon.getIcons(window.grunticon.getCSS(window.grunticon.href)))}),10)})(e.name),children:[(0,r.jsx)("span",{className:"toll-calculator__vehicle-icon icon--medium icon--".concat(e.icon," ").concat((null===(n=y.vehicleTypeObj)||void 0===n?void 0:n.code)===e.code?"icon--white":"icon--black"),"data-grunticon-embed":"true"}),e.name]},e.code)}))}),(0,r.jsx)("div",{className:"module module--rich-text module--flat-top module--flat-bottom",children:(0,r.jsx)("div",{className:"module__content l-full-width",children:(0,r.jsx)("div",{className:"rich-text ",dangerouslySetInnerHTML:{__html:N}})})})]}),A&&(0,r.jsxs)("div",{className:"toll-calculator__vehicle-wrapper animate-show",children:[(0,r.jsx)("h3",{children:c}),(0,r.jsx)("label",{className:"hidden",children:d}),(0,r.jsxs)("div",{className:"cf flex-container",children:[(0,r.jsxs)("div",{className:"toll-calculator__peak-type ".concat("off"===y.onEastlinkDiscount?"selected":""),onClick:e=>B(0,"off"),children:[(0,r.jsx)("span",{className:"icon--small icon--cal-frequent toll-calculator__peak-icon ".concat("off"!==y.onEastlinkDiscount?"icon--black":"icon--white"),"data-grunticon-embed":"true"}),P]}),(0,r.jsxs)("div",{className:"toll-calculator__peak-type ".concat("on"===y.onEastlinkDiscount?"selected":""),onClick:e=>B(0,"on"),children:[(0,r.jsx)("span",{className:"icon--small icon--cal-weekend toll-calculator__peak-icon ".concat("on"!==y.onEastlinkDiscount?"icon--black":"icon--white"),"data-grunticon-embed":"true"}),L]})]})]}),M&&(0,r.jsxs)("div",{className:"toll-calculator__vehicle-wrapper animate-show",children:[(0,r.jsx)("h3",{children:c}),(0,r.jsx)("label",{className:"hidden",children:d}),(0,r.jsxs)("div",{className:"cf flex-container",children:[(0,r.jsxs)("div",{className:"toll-calculator__peak-type ".concat("on"===y.onPeak?"selected":""),onClick:e=>T(0,"on"),children:[(0,r.jsx)("span",{className:"icon--small ".concat(h," toll-calculator__peak-icon ").concat("on"!==y.onPeak?"icon--black":"icon--white"),"data-grunticon-embed":"true"}),p]}),(0,r.jsxs)("div",{className:"toll-calculator__peak-type ".concat("off"===y.onPeak?"selected":""),onClick:e=>T(0,"off"),children:[(0,r.jsx)("span",{className:"icon--small ".concat(k," toll-calculator__peak-icon ").concat("off"!==y.onPeak?"icon--black":"icon--white"),"data-grunticon-embed":"true"}),m]})]}),(0,r.jsxs)("div",{className:"test-changeover toll-calculator__changeover text-small",onClick:()=>{o.fireEvent("tollCalc","setTravelTime","changeoverQuestion"),C(!g)},children:[x,(0,r.jsx)("span",{className:"icon icon--theme icon--xx-small icon--chevron-down ".concat(g?"hidden":""),"data-grunticon-embed":"true"}),(0,r.jsx)("span",{className:"icon icon--theme icon--xx-small icon--chevron-up ".concat(g?"":"hidden"),"data-grunticon-embed":"true"})]}),g&&(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)("div",{className:"cf flex-container",children:[(0,r.jsxs)("div",{className:"test-bothAM toll-calculator__peak-type ".concat("bothAM"===y.onPeak?"selected":""),onClick:e=>T(0,"bothAM"),children:[(0,r.jsx)("span",{className:"icon--small icon--cross-peak toll-calculator__peak-icon ".concat("bothAM"!==y.onPeak?"icon--black":"icon--white"),"data-grunticon-embed":"true"}),v]}),(0,r.jsxs)("div",{className:"test-bothPM toll-calculator__peak-type ".concat("bothPM"===y.onPeak?"selected":""),onClick:e=>T(0,"bothPM"),children:[(0,r.jsx)("span",{className:"icon--small icon--cross-offpeak toll-calculator__offpeak-icon ".concat("bothPM"!==y.onPeak?"icon--black":"icon--white"),"data-grunticon-embed":"true"}),j]})]}),(0,r.jsx)("div",{className:"rich-text",dangerouslySetInnerHTML:{__html:O}})]})]})]})};let b={},P={},L=[],O="",N={everyday:"",everydayOff:"",access:"",accessOff:"","24HourPass":"",tullaPass:"",weekendPass:"",melbournePass:"",melbournePassOff:"",hcvOpAMLower:"",hcvOpPMLower:"",hcvOpAMUpper:"",hcvOpPMUpper:"",eastlinkWeekendDiscount:""},y={peak:!1,am:!1,pm:!1,eastlink:!1},f={},M="";function w(e){L=e,b=m(L,"TRIPCAP"),P=m(L,"CAPEASTLINK"),f=m(L,"FEEVMF"),M=m(L,"IMAGEPROCESSINGEASTLINK")}function g(e){O=e}function C(e){let s={total:0,eastlinkDiscountedTotal:0},a=0,n=0,i=0,t={peak:0,offPeak:0,bothAM:0,bothPM:0,hcvOpAMLower:0,hcvOpPMLower:0,hcvOpAMUpper:0,hcvOpPMUpper:0};if(e&&e.citylinkCodeArr&&e.citylinkCodeArr.length){let s=0,n=0,i=0,l=0,c=0,o=0,r={},d=parseFloat(b.price[O.code]),p=parseFloat(b.price.hcvOp)||0;for(let a=0;a<e.citylinkCodeArr.length;a++){r=m(L,e.citylinkCodeArr[a]);let t=r.price[O.code],d=r.price.hcvOp||0;
2a==e.citylinkCodeArr.length-1?i+=parseFloat(r.price.hcv)||0:i+=parseFloat(r.price.hcvOp)||0,c+=0==a?parseFloat(r.price.hcvOp)||0:parseFloat(r.price.hcv)||0,l+=0==a?parseFloat(r.price.hcv)||0:parseFloat(r.price.hcvOp)||0,a==e.citylinkCodeArr.length-1?o+=parseFloat(r.price.hcvOp)||0:o+=parseFloat(r.price.hcv)||0,1==e.citylinkCodeArr.length&&(i=parseFloat(r.price.hcvOp)||0,c=parseFloat(r.price.hcv)||0,l=parseFloat(r.price.hcvOp)||0,o=parseFloat(r.price.hcv)||0),t&&(n+=parseFloat(d),s+=parseFloat(t))}t.peak=a,t.offPeak=n,t.bothAM=n,t.bothPM=n;let h=parseFloat(b.price.hcv)||0,k=parseFloat(b.price.hcvOp)||0;t.bothAM>h?(t.bothAM=d,t.hcvOpAMLower=h,t.hcvOpAMUpper=h,y.am=!0):y.am=!1,t.bothPM>k?(t.bothPM=p,t.hcvOpPMLower=k,t.hcvOpPMUpper=k,y.pm=!0):y.pm=!1,s>d?(a=d,t.offPeak=p,y.peak=!0):(a=s,y.peak=!1),i>=h?(i=h,c=h,y.am=!0):c>=h&&i<=h?(c=h,y.am=!0):y.am=!1,l>=k?(l=k,o=k,y.pm=!0):o>=k&&l<=k?(o=k,y.pm=!0):y.pm=!1,t.hcvOpAMLower=i,t.hcvOpPMLower=l,t.hcvOpAMUpper=c,t.hcvOpPMUpper=o}if(e&&e.eastlinkCodeArr&&e.eastlinkCodeArr.length){let s=0,a=0,t={},l=parseFloat(P.price[O.code]),c=parseFloat(P.price.carWeekend);if("car"===O.code&&1==e.eastlinkCodeArr.length){t=m(L,e.eastlinkCodeArr[0]);let n=t.price.carSingle,i=t.price.carWeekend;n&&(s=parseFloat(n)),i&&(a=parseFloat(i)||0)}else for(let n=0;n<e.eastlinkCodeArr.length;n++){t=m(L,e.eastlinkCodeArr[n]);let i=t.price[O.code],l=t.price.carWeekend;i&&(s+=parseFloat(i)),l&&(a+=parseFloat(l)||0)}s>l?(n=l,y.eastlink=!0):(n=s,y.eastlink=!1),a>c?(i=c,y.eastlink=!0):i=a}return s.total=a+n,s.eastlinkDiscountedTotal=a+i,function(e,s,a,n,i){M=m(L,"IMAGEPROCESSINGEASTLINK");let t=parseFloat(m(L,"FEEVMF").price[O.code]);if(void 0!==M.price)var l=parseFloat(m(L,"IMAGEPROCESSINGEASTLINK").price[O.code]);else l=0;let c=m(L,"CAP24").price[O.code],o=m(L,"CAPTULLA").price[O.code];"undefined"==typeof o&&(o=0);let r,d=m(L,"CAPWEEKEND").price[O.code];r=parseFloat(e.total),0===e&&(t=0,l=0),0===a&&(t=0),0===n&&(l=0),N.everyday=parseFloat(e.total).toFixed(2),N.everydayOff=parseFloat(r).toFixed(2),N.everydayBothAM=parseFloat(r).toFixed(2),N.everydayBothPM=parseFloat(r).toFixed(2),N.access=(e.total+t+l).toFixed(2),N.accessOff=(r+t+l).toFixed(2),N["24HourPass"]=parseFloat(c).toFixed(2),N.tullaPass=parseFloat(o).toFixed(2),N.weekendPass=parseFloat(d).toFixed(2),N.melbournePass=(e.total+t+l).toFixed(2),N.melbournePassOff=(r+t+l).toFixed(2),N.eastlinkDiscount=parseFloat(e.eastlinkDiscountedTotal).toFixed(2),N.eastlinkAccessDiscount=parseFloat(e.eastlinkDiscountedTotal+t+l).toFixed(2),N.eastlinkPassDiscount=parseFloat(e.eastlinkDiscountedTotal+t+l).toFixed(2),N.citylinkEverydayBreakdown=parseFloat(a).toFixed(2),N.citylinkAccessBreakdown=parseFloat(a+t).toFixed(2),N.citylinkMelbournePassBreakdown=parseFloat(a+t).toFixed(2),N.eastlinkEverydayBreakdown=parseFloat(n).toFixed(2),N.eastlinkAccessBreakdown=parseFloat(n+l).toFixed(2),N.eastlinkMelbournePassBreakdown=parseFloat(n+l).toFixed(2),N.eastlinkEveryDayDiscBreak=parseFloat(i).toFixed(2),N.eastlinkAccessDiscBreak=parseFloat(i+l).toFixed(2),N.eastlinkMelbournePassDiscBreak=parseFloat(i+l).toFixed(2),N.hcvOpAMLower="",N.hcvOpPMLower="",N.hcvOpAMUpper="",N.hcvOpPMUpper="",N.accesshcvOpAMLower="",N.accesshcvOpPMLower="",N.accesshcvOpAMUpper="",N.accesshcvOpPMUpper="","hcv"===O.code&&(N.everydayOff=(parseFloat(s.offPeak)+parseFloat(n)).toFixed(2),N.everydayBothAM=(parseFloat(s.bothAM)+parseFloat(n)).toFixed(2),N.everydayBothPM=(parseFloat(s.bothPM)+parseFloat(n)).toFixed(2),N.accessOff=(parseFloat(s.offPeak)+parseFloat(n)+t+l).toFixed(2),N.accessBothAM=(parseFloat(s.bothAM)+parseFloat(n)+t+l).toFixed(2),N.accessBothPM=(parseFloat(s.bothPM)+parseFloat(n)+t+l).toFixed(2),N.melbournePassOff=(parseFloat(s.offPeak)+parseFloat(n)+t+l).toFixed(2),N.melbournePassBothAM=(parseFloat(s.bothAM)+parseFloat(n)+t+l).toFixed(2),N.melbournePassBothPM=(parseFloat(s.bothPM)+parseFloat(n)+t+l).toFixed(2),N.citylinkEverydayOffBreakdown=parseFloat(s.offPeak).toFixed(2),N.citylinkAccessAMBreakdown=parseFloat(s.bothAM+t).toFixed(2),N.citylinkAccessPMBreakdown=parseFloat(s.bothPM+t).toFixed(2),N.citylinkAccessOffBreakdown=parseFloat(s.offPeak+t).toFixed(2),N.citylinkMelbournePassOffBreakdown=parseFloat(s.offPeak+t).toFixed(2),N.citylinkMelbournePassAMBreakdown=parseFloat(s.bothAM+t).toFixed(2),N.citylinkMelbournePassPMBreakdown=parseFloat(s.bothPM+t).toFixed(2),N.hcvOpAMLower=parseFloat(s.hcvOpAMLower).toFixed(2),N.hcvOpPMLower=parseFloat(s.hcvOpPMLower).toFixed(2),N.hcvOpAMUpper=parseFloat(s.hcvOpAMUpper).toFixed(2),N.hcvOpPMUpper=parseFloat(s.hcvOpPMUpper).toFixed(2),N.accesshcvOpAMLower=(parseFloat(s.hcvOpAMLower)+t).toFixed(2),N.accesshcvOpPMLower=(parseFloat(s.hcvOpPMLower)+t).toFixed(2),N.accesshcvOpAMUpper=(parseFloat(s.hcvOpAMUpper)+t).toFixed(2),N.accesshcvOpPMU
2pper=(parseFloat(s.hcvOpPMUpper)+t).toFixed(2),N.accesshcvOpAM="0",N.accesshcvOpPM="0",N.tullaPass="0",N.weekendPass="0")}(s,t,a,n,i),N}function A(){return N}function E(){return y}function T(){return f.price[O.code]}function B(){return void 0!==M.price&&M.price[O.code]}const S=e=>{let{dataStructuresJSON:s,dataTollsJSON:a,dataPricesJSON:l,noTollPriceAccountsLabel:c,noTollPriceAccountsDefaultText:o,noTollPricePassesLabel:d,noTollPricePassesDefaultText:p,noTollNeededAccountsLabel:h,noTollNeededAccountsDefaultText:m,noTollNeededPassesLabel:v,noTollNeededPassesDefaultText:u,tollNeededAccountsLabel:j,tollNeededAccountsTitle:b,tollNeededAccountsSubTitle:P,tollNeededAccessAccountsTitle:L,tollNeededAccessAccountsSubTitle:O,vmfLabel:y,tollNeededAccessAccountsDisplayFee:f,openAnAccount:M,tollNeededpassesLabel:S,melbournePassTitle:_,melbournePassSubTitle:F,melbournePassDisplayFee:U,alldayPassSubTitle:D,tullaPassTitle:I,tullaPassSubTitle:H,alldayPassTitle:R,weekendPassTitle:K,weekendPassSubTitle:Z,disableEastlink:J,buyAPass:V}=e;const{contextData:G,setContextData:Y}=(0,n.useContext)(t),[z,W]=n.useState(!0),[Q,q]=n.useState(!1),[X,$]=n.useState(),[ee,se]=n.useState(),[ae,ne]=n.useState(!1),[ie,te]=n.useState(!1),[le,ce]=n.useState(!0),[oe,re]=n.useState({everyday:"",access:"","24HourPass":"",weekendPass:"",melbournePass:""}),[de,pe]=n.useState({peak:!1,am:!1,pm:!1,eastlink:!0}
2),[he,me]=(0,n.useState)({everydayAccount:!1,accessAccount:!1,melbournePass:!1}),ke={display:"block"},xe={display:"none"},ve=()=>""!==G.exitPointEastLinkObj.name?xe:""!==G.entryPointCityLinkObj.name&&""===G.exitPointEastLinkObj.name?ke:void 0,ue=(e,s)=>{e.preventDefault(),me((0,i.Z)((0,i.Z)({},he),{},{[s]:!he[s]}))};(0,n.useEffect)((()=>{G.entryPointCityLinkObj.id<=6&&G.exitPointCityLinkObj.id<=6?ne(!0):ne(!1),""!==G.entryPointEastLinkObj.name&&""!==G.exitPointEastLinkObj.name?te(!0):te(!1),"hcv"===G.vehicleTypeObj.code?(ce(!1),ne(!1)):ce(!0)}),[G.entryPointCityLinkObj,G.exitPointCityLinkObj,G.entryPointEastLinkObj,G.exitPointEastLinkObj,G.vehicleTypeObj]),(0,n.useEffect)((()=>{w(l),g(G.vehicleTypeObj),$(T()),se(B())}),[]),(0,n.useEffect)((()=>{g(G.vehicleTypeObj),$(T()),se(B())}),[G.vehicleTypeObj]),(0,n.useEffect)((()=>{var e,s;if(e=""!==G.entryPointCityLinkObj.name||""!==G.entryPointEastLinkObj.name,s=""!==G.exitPointCityLinkObj.name||""!==G.exitPointEastLinkObj.name,N={everyday:"",everydayOff:"",everydayBothAM:"",everydayBothPM:"",access:"",accessOff:"",accessBothAM:"",accessBothPM:"","24HourPass":"",tullaPass:"",weekendPass:"",melbournePass:"",melbournePassOff:"",melbournePassBothAM:"",melbournePassBothPM:""},re(A()),e&&s){W(!1),je();let e=A();re(e),pe(E()),"0.00"===e.everyday?q(!0):q(!1)}else W(!0),q(!1)}),[G.entryPointCityLinkObj,G.exitPointCityLinkObj,G.entryPointEastLinkObj,G.exitPointEastLinkObj,G.vehicleTypeObj]);const je=()=>{var e;""!==G.exitPointCityLinkObj.name&&""!==G.exitPointEastLinkObj.name?e=G.entryPointEastLinkObj.validExits.concat(G.entryPointCityLinkObj.validExits):""!==G.exitPointEastLinkObj.name?e=G.entryPointEastLinkObj.validExits:""!==G.exitPointCityLinkObj.name&&(e=G.entryPointCityLinkObj.validExits);var s=e.filter((function(e){return e.id===G.exitPointCityLinkObj.id})),a=e.filter((function(e){return e.id===G.exitPointEastLinkObj.id})),n=s,i="";let t={citylinkCodeArr:[],eastlinkCodeArr:[]};n&&n.length&&(i=s[0].code,t.citylinkCodeArr=i.split("+")),i="",(n=a)&&n.length&&(i=a[0].code,t.eastlinkCodeArr=i.split("+")),C(t)};return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"toll-calculator__results-wrapper",id:"prices",children:[z&&(0,r.jsx)("div",{className:"animate-show CHECknoTollPrice",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{children:c}),(0,r.jsx)("div",{className:"toll-calculator__results-box",children:(0,r.jsx)("div",{className:"",children:o})}),(0,r.jsx)("h3",{children:d}),(0,r.jsx)("div",{className:"toll-calculator__results-box",children:(0,r.jsx)("div",{className:"",children:p})}),(0,r.jsx)("div",{})]})}),Q&&!z&&(0,r.jsx)("div",{className:"animate-show CHECknoTollNeeded!noTollPrice",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{children:h}),(0,r.jsx)("div",{className:"toll-calculator__results-box extra-padded",children:(0,r.jsxs)("div",{className:"cf",children:[(0,r.jsxs)("div",{className:"title cf flex-container",children:[(0,r.jsx)("div",{className:"left"}),(0,r.jsx)("div",{className:"right",children:(0,r.jsx)("div",{className:"price-area test-price-zero",children:(0,r.jsx)("span",{className:"",children:x(0)})})})]}),(0,r.jsx)("div",{className:"description-nofee",children:(0,r.jsx)("div",{children:m})})]})}),(0,r.jsx)("h3",{children:v}),(0,r.jsx)("div",{className:"toll-calculator__results-box extra-padded",children:(0,r.jsxs)("div",{className:"cf",children:[(0,r.jsxs)("div",{className:"title cf flex-container",children:[(0,r.jsx)("div",{className:"left"}),(0,r.jsx)("div",{className:"right",children:(0,r.jsx)("div",{className:"price-area test-price-na",children:x(0)})})]}),(0,r.jsx)("div",{className:"description-nofee",children:(0,r.jsx)("div",{children:u})})]})}),(0,r.jsx)("div",{})]})}),!J&&!(Q||z)&&(0,r.jsxs)("div",{className:"animate-show CHECKdisableEastlink!noTollNeeded!noTollPrice",children:[(0,r.jsxs)("div",{className:"cf",children:[(0,r.jsx)("h3",{children:j}),(0,r.jsxs)("div",{className:"toll-calculator__results-box extra-padded",children:[(0,r.jsxs)("div",{className:"cf",children:[(0,r.jsxs)("div",{className:"title cf flex-container",children:[(0,r.jsx)("div",{className:"left",children:(0,r.jsx)("h4",{children:b})}),(0,r.jsxs)("div",{className:"right",children:["on"===G.onEastlinkDiscount&&(0,r.jsx)("div",{className:"total-price",children:x(oe.eastlinkDiscount)}),"on"===G.onPeak&&"on"!==G.onEastlinkDiscount&&(0,r.jsx)("div",{className:"total-price",children:x(oe.everyday)}),"off"===G.onPeak&&(0,r.jsx)("div",{className:"total-price",children:x(oe.everydayOff)}),"bothAM"===G.onPeak&&(0,r.jsxs)("div",{className:"total-price",children:[!1===de.am&&oe.hcvOpAMLower===oe.hcvOpAMUpper&&(0,r.jsx)("span",{children:x(k(oe.hcvOpAMLower,oe.eastlinkEverydayBreakdown))}),!1===de.am&&oe.hcvOpAMLower===oe.hcvOpAMUpper===!1&&(0,r.jsxs)("span",{children:[x(k(oe.hcvOpAMLower,oe.eastlinkEverydayBreakdown)),"\u2013",x(k(oe.hcvOpAMUpper,oe.eastlinkEverydayBreakdown))]}),!0===de.am&&oe.hcvOpAMLower===oe.hcvOpAMUpper&&(0,r.jsx)("span",{children:x(k(oe.hcvOpAMLower,oe.eastlinkEverydayBreakdown))}),!0===de.am&&oe.hcvOpAMLower===oe.hcvOpAMUpper===!1&&(0,r.jsxs)("span",{children:[x(k(oe.hcvOpAMLower,oe.eastlinkEverydayBreakdown)),"\u2013",x(k(oe.hcvOpAMUpper,oe.eastlinkEverydayBreakdown))]})]}),"bothPM"===G.onPeak&&(0,r.jsxs)("div",{className:"total-price",children:[!1===de.pm&&oe.hcvOpPMLower===oe.hcvOpPMUpper&&(0,r.jsx)("span",{children:x(k(oe.hcvOpPMLower,oe.eastlinkEverydayBreakdown))}),!1===de.pm&&oe.hcvOpPMLower===oe.hcvOpPMUpper===!1&&(0,r.jsxs)("span",{children:[x(k(oe.hcvOpPMLower,oe.eastlinkEverydayBreakdown)),"\u2013",x(k(oe.hcvOpPMUpper,oe.eastlinkEverydayBreakdown))]}),!0===de.pm&&oe.hcvOpPMLower===oe.hcvOpPMUpper&&(0,r.jsx)("span",{children:x(k(oe.hcvOpPMLower,oe.eastlinkEverydayBreakdown))}),!0===de.pm&&oe.hcvOpPMLower===oe.hcvOpPMUpper===!1&&(0,r.jsxs)("span",{children:[x(k(oe.hcvOpPMLower,oe.eastlinkEverydayBreakdown)),"\u2013",x(k(oe.hcvOpPMUpper,oe.eastlinkEverydayBreakdown))]})]}),(0,r.jsxs)("a",{href:"#",className:"toggle-button ".concat(he.everydayAccount?"open":""),onClick:e=>ue(e,"everydayAccount"),children:[(0,r.jsx)("span",{className:"icon icon--theme icon--xx-small icon--chevron-down ".concat(he.everydayAccount?"hidden":""),"data-grunticon-embed":"true"}),(0,r.jsx)("span",{className:"icon icon--theme icon--xx-small icon--chevron-up ".concat(he.everydayAccount?"":"hidden"),"data-grunticon-embed":"true"})]})]})]}),(0,r.jsx)("div",{className:"description",children:(0,r.jsx)("div",{children:P})})]}),he.everydayAccount&&(0,r.jsxs)("div",{className:"toll-calculator__breakdown",children:["on"===G.onEastlinkDiscount&&0===oe.eastlinkDiscount&&(0,r.jsx)("div",{children:"No charge to travel on this section of road"}),"on"===G.onEastlinkDiscount&&oe.eastlinkDiscount>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink1",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"total",children:x(oe.citylinkEverydayBreakdown)})]}),"0.00"===oe.citylinkEverydayBreakdown&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee1",children:m}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink1",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:x(oe.eastlinkEveryDayDiscBreak)})]}),"0.00"===oe.eastlinkEveryDayDiscBreak&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee2",children:m})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),(0,r.jsx)("span",{className:"currency",children:x(oe.eastlinkDiscount)})]})})]}),"on"===G.onPeak&&"on"!==G.onEastlinkDiscount&&0===oe.everyday&&(0,r.jsx)("div",{children:"No charge to travel on this section of road"}),"on"===G.onPeak&&"on"!==G.onEastlinkDiscount&&oe.everyday>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink2",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"total",children:x(oe.citylinkEverydayBreakdown)})]}),"0.00"===oe.citylinkEverydayBreakdown&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee3",children:m}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink2",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:x(oe.eastlinkEverydayBreakdown)})]}),"0.00"===oe.eastlinkEverydayBreakdown&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee4",children:m})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),(0,r.jsx)("span",{className:"currency",children:x(oe.everyday)})]})})]}),"off"===G.onPeak&&0===oe.everydayOff&&(0,r.jsx)("div",{className:"",children:"No charge to travel on this section of road"}),"off"===G.onPeak&&oe.everydayOff>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink3",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"total",children:x(oe.citylinkEverydayOffBreakdown)})]}),"0.00"===oe.citylinkEverydayOffBreakdown&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee5",children:m}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink3",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:x(oe.eastlinkEverydayBreakdown)})]}),"0.00"===oe.eastlinkEverydayBreakdown&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee6",children:m})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),(0,r.jsx)("span",{className:"currency",children:x(oe.everydayOff)})]})})]}),"bothAM"===G.onPeak&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink4",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),0==de.am&&oe.hcvOpAMLower==oe.hcvOpAMUpper&&(0,r.jsx)("span",{className:"total",children:x(oe.hcvOpAMLower)}),0==de.am&&oe.hcvOpAMLower==oe.hcvOpAMUpper==0&&(0,r.jsxs)("span",{className:"total",children:[x(oe.hcvOpAMLower),"\u2013",x(oe.hcvOpAMUpper)]}),1==de.am&&oe.hcvOpAMLower==oe.hcvOpAMUpper&&(0,r.jsx)("span",{className:"total",children:x(oe.hcvOpAMLower)}),1==de.am&&oe.hcvOpAMLower==oe.hcvOpAMUpper==0&&(0,r.jsxs)("span",{className:"total",children:[x(oe.hcvOpAMLower),"\u2013",x(oe.hcvOpAMUpper)]})]}),"0.00"===oe.hcvOpAMLower&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee7",children:m}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink4",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:x(oe.eastlinkEverydayBreakdown)})]}),"0.00"===oe.eastlinkEverydayBreakdown&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee8",children:m})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),0==de.am&&oe.hcvOpAMLower==oe.hcvOpAMUpper&&(0,r.jsx)("span",{className:"currency",children:x(k(oe.hcvOpAMLower,oe.eastlinkEverydayBreakdown))}),0==de.am&&oe.hcvOpAMLower==oe.hcvOpAMUpper==0&&(0,r.jsxs)("span",{className:"currency",children:[x(k(oe.hcvOpAMLower,oe.eastlinkEverydayBreakdown)),"\u2013",x(k(oe.hcvOpAMUpper,oe.eastlinkEverydayBreakdown))]}),1==de.am&&oe.hcvOpAMLower==oe.hcvOpAMUpper&&(0,r.jsx)("span",{className:"currency",children:x(k(oe.hcvOpAMLower,oe.eastlinkEverydayBreakdown))}),1==de.am&&oe.hcvOpAMLower==oe.hcvOpAMUpper==0&&(0,r.jsxs)("span",{className:"currency",children:[x(k(oe.hcvOpAMLower,oe.eastlinkEverydayBreakdown)),"\u2013",x(k(oe.hcvOpAMUpper,oe.eastlinkEverydayBreakdown))]})]})})]}),"bothPM"===G.onPeak&&(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink5",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),!1===de.pm&&oe.hcvOpPMLower===oe.hcvOpPMUpper&&(0,r.jsx)("span",{className:"total",children:x(oe.hcvOpPMLower)}),!1===de.pm&&oe.hcvOpPMLower===oe.hcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"total",children:[x(oe.hcvOpPMLower),"\u2013",x(oe.hcvOpPMUpper)]}),!0===de.pm&&oe.hcvOpPMLower===oe.hcvOpPMUpper&&(0,r.jsx)("span",{className:"total",children:x(oe.hcvOpPMLower)}),!0===de.pm&&oe.hcvOpPMLower===oe.hcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"total",children:[x(oe.hcvOpPMLower),"\u2013",x(oe.hcvOpPMUpper)]})]}),"0.00"===oe.hcvOpPMLower&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee9",children:m}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink5",children:"EastLink"})}),(0,r.jsxs)("div",{classNam
2e:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:x(oe.eastlinkEverydayBreakdown)})]}),"0.00"===oe.eastlinkEverydayBreakdown&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee10",children:m})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),!1===de.pm&&oe.hcvOpPMLower===oe.hcvOpPMUpper&&(0,r.jsx)("span",{className:"currency",children:x(k(oe.hcvOpPMLower,oe.eastlinkEverydayBreakdown))}),!1===de.pm&&oe.hcvOpPMLower===oe.hcvOpPMUpper==0&&(0,r.jsxs)("span",{className:"currency",children:[x(k(oe.hcvOpPMLower,oe.eastlinkEverydayBreakdown)),"\u2013",x(k(oe.hcvOpPMUpper,oe.eastlinkEverydayBreakdown))]}),!0===de.pm&&oe.hcvOpPMLower===oe.hcvOpPMUpper&&(0,r.jsx)("span",{className:"currency",children:x(k(oe.hcvOpPMLower,oe.eastlinkEverydayBreakdown))}),!0===de.pm&&oe.hcvOpPMLower===oe.hcvOpPMUpper==0&&(0,r.jsxs)("span",{className:"currency",children:[x(k(oe.hcvOpPMLower,oe.eastlinkEverydayBreakdown)),"\u2013",x(k(oe.hcvOpPMUpper,oe.eastlinkEverydayBreakdown))]})]})})]})]})]})]}),(0,r.jsxs)("div",{className:"toll-calculator__results-box extra-padded",children:[(0,r.jsxs)("div",{className:"cf",children:[(0,r.jsxs)("div",{className:"title cf flex-container",children:[(0,r.jsx)("div",{className:"left",children:(0,r.jsx)("h4",{children:L})}),(0,r.jsxs)("div",{className:"right",children:["on"===G.onEastlinkDiscount&&(0,r.jsx)("div",{className:"total-price",children:x(oe.eastlinkAccessDiscount)}),"on"===G.onPeak&&"on"!==G.onEastlinkDiscount&&(0,r.jsx)("div",{className:"total-price",children:x(oe.access)}),"off"===G.onPeak&&(0,r.jsx)("div",{className:"total-price",children:x(oe.accessOff)}),"bothAM"===G.onPeak&&(0,r.jsxs)("div",{className:"total-price",children:[!1===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper&&(0,r.jsx)("span",{className:"",children:x(k(oe.accesshcvOpAMLower,oe.eastlinkAccessBreakdown))}),!1===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper===!1&&(0,r.jsxs)("span",{className:"",children:[x(k(oe.accesshcvOpAMLower,oe.eastlinkAccessBreakdown)),"\u2013",x(k(oe.accesshcvOpAMUpper,oe.eastlinkAccessBreakdown))]}),!0===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper&&(0,r.jsx)("span",{className:"",children:x(k(oe.accesshcvOpAMLower,oe.eastlinkAccessBreakdown))}),!0===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper===!1&&(0,r.jsxs)("span",{className:"",children:[x(k(oe.accesshcvOpAMLower,oe.eastlinkAccessBreakdown)),"\u2013",x(k(oe.accesshcvOpAMUpper,oe.eastlinkAccessBreakdown))]})]}),"bothPM"===G.onPeak&&(0,r.jsxs)("div",{className:"total-price",children:[!1===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper&&(0,r.jsx)("span",{className:"",children:x(k(oe.accesshcvOpPMLower,oe.eastlinkAccessBreakdown))}),!1===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"",children:[x(k(oe.accesshcvOpPMLower,oe.eastlinkAccessBreakdown)),"\u2013",x(k(oe.accesshcvOpPMUpper,oe.eastlinkAccessBreakdown))]}),!0===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper&&(0,r.jsx)("span",{className:"",children:x(k(oe.accesshcvOpPMLower,oe.eastlinkAccessBreakdown))}),!0===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"",children:[x(k(oe.accesshcvOpPMLower,oe.eastlinkAccessBreakdown)),"\u2013",x(k(oe.accesshcvOpPMUpper,oe.eastlinkAccessBreakdown))]})]}),(0,r.jsxs)("a",{href:"#",className:"toggle-button ".concat(he.accessAccount?"open":""),onClick:e=>ue(e,"accessAccount"),children:[(0,r.jsx)("span",{className:"icon icon--theme icon--xx-small icon--chevron-down ".concat(he.accessAccount?"hidden":""),"data-grunticon-embed":"true"}),(0,r.jsx)("span",{className:"icon icon--theme icon--xx-small icon--chevron-up ".concat(he.accessAccount?"":"hidden"),"data-grunticon-embed":"true"})]})]})]}),(0,r.jsx)("div",{className:"description",children:!(0==X&&0==ee)&&(0,r.jsxs)("div",{children:[O.replaceAll("##!NAT_fee_vm_citylink!##",x(X)).replaceAll("##!NAT_fee_vm_eastlink!##",x(ee)),f&&{vmf:X}]})})]}),he.accessAccount&&(0,r.jsxs)("div",{className:"toll-calculator__breakdown",children:["on"===G.onEastlinkDiscount&&0===oe.eastlinkDiscount&&(0,r.jsx)("div",{className:"",children:"No charge to travel on this section of road"}),"on"===G.onEastlinkDiscount&&oe.eastlinkDiscount>0&&(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink6",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.citylinkAccessBreakdown?x(oe.citylinkAccessBreakdown-X):x(oe.citylinkAccessBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.citylinkAccessBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.citylinkAccessBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(X)})]}),"0.00"===oe.citylinkAccessBreakdown&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee11",children:m}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink6",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.eastlinkAccessDiscBreak?x(oe.eastlinkAccessDiscBreak-ee):x(oe.eastlinkAccessDiscBreak)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.eastlinkAccessDiscBreak>0&&(0,r.jsx)("span",{className:"",children:y}),oe.eastlinkAccessDiscBreak>0&&(0,r.jsx)("span",{className:"total",children:x(ee)})]}),"0.00"===oe.eastlinkAccessDiscBreak&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee12",children:m})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),(0,r.jsx)("span",{className:"currency",children:x(oe.eastlinkAccessDiscount)})]})})]}),"on"===G.onPeak&&"on"!==G.onEastlinkDiscount&&0===oe.everyday&&(0,r.jsx)("div",{className:"",children:"No charge to travel on this section of road"}),"on"===G.onPeak&&"on"!==G.onEastlinkDiscount&&oe.everyday>0&&(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink7",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.citylinkAccessBreakdown?x(oe.citylinkAccessBreakdown-X):x(oe.citylinkAccessBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.citylinkAccessBreakdown>0&&"mot"!==G.vehicleTypeObj.code&&(0,r.jsx)("span",{className:"",children:y}),oe.citylinkAccessBreakdown>0&&"mot"!==G.vehicleTypeObj.code&&(0,r.jsx)("span",{className:"total",children:x(X)})]}),"0.00"===oe.citylinkAccessBreakdown&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee13",children:m}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink7",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.eastlinkAccessBreakdown?x(oe.eastlinkAccessBreakdown-ee):x(oe.eastlinkAccessBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.eastlinkAccessBreakdown>0&&"mot"!==G.vehicleTypeObj.code&&(0,r.jsx)("span",{className:"",children:y}),oe.eastlinkAccessBreakdown>0&&"mot"!==G.vehicleTypeObj.code&&(0,r.jsx)("span",{className:"total",children:x(ee)})]}),"0.00"===oe.eastlinkAccessBreakdown&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee14",children:m})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),(0,r.jsx)("span",{className:"currency",children:x(oe.access)})]})})]}),"off"===G.onPeak&&0===oe.accessOff&&(0,r.jsx)("div",{className:"",children:"No charge to travel on this section of road"}),"off"===G.onPeak&&oe.accessOff>0&&(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink8",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.citylinkAccessOffBreakdown?x(oe.citylinkAccessOffBreakdown-X):x(oe.citylinkAccessOffBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.citylinkAccessOffBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.citylinkAccessOffBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(X)})]}),"0.00"===oe.citylinkAccessOffBreakdown&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee15",children:m}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink8",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.eastlinkAccessBreakdown?x(oe.eastlinkAccessBreakdown-ee):x(oe.eastlinkAccessBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.eastlinkAccessBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.eastlinkAccessBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(ee)})]}),"0.00"===oe.eastlinkAccessBreakdown&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee16",children:m})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),(0,r.jsx)("span",{className:"currency",children:x(oe.accessOff)})]})})]}),"bothAM"===G.onPeak&&(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink9",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),!1===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.accesshcvOpAMLower?x(oe.accesshcvOpAMLower-X):x(oe.accesshcvOpAMLower)}),!1===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper===!1&&(0,r.jsxs)("span",{className:"total",children:["0.00"!==oe.accesshcvOpAMLower?x(oe.accesshcvOpAMLower-X):x(oe.accesshcvOpAMLower),"\u2013","0.00"!==oe.accesshcvOpAMUpper?x(oe.accesshcvOpAMUpper-X):x(oe.accesshcvOpAMUpper)]}),!0===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.accesshcvOpAMLower?x(oe.accesshcvOpAMLower-X):x(oe.accesshcvOpAMLower)}),!0===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper===!1&&(0,r.jsxs)("span",{className:"total",children:["0.00"!==oe.accesshcvOpAMLower?x(oe.accesshcvOpAMLower-X):x(oe.accesshcvOpAMLower),"\u2013","0.00"!==oe.accesshcvOpAMUpper?x(oe.accesshcvOpAMUpper-X):x(oe.accesshcvOpAMUpper)]})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.citylinkAccessAMBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.citylinkAccessAMBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(X)})]}),"0.00"===oe.accesshcvOpAMLower&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee17",children:m}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink9",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.eastlinkAccessBreakdown?x(oe.eastlinkAccessBreakdown-ee):x(oe.eastlinkAccessBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.eastlinkAccessBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.eastlinkAccessBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(ee)})]}),"0.00"===oe.eastlinkAccessBreakdown&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee18",children:m})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),!1===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper&&(0,r.jsx)("span",{className:"currency",children:x(k(oe.accesshcvOpAMLower,oe.eastlinkAccessBreakdown))}),!1===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper===!1&&(0,r.jsxs)("span",{className:"currency",children:[x(k(oe.accesshcvOpAMLower,oe.eastlinkAccessBreakdown)),"\u2013",x(k(oe.accesshcvOpAMUpper,oe.eastlinkAccessBreakdown))]}),!0===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper&&(0,r.jsx)("span",{className:"currency",children:x(k(oe.accesshcvOpAMLower,oe.eastlinkAccessBreakdown))}),!0===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper===!1&&(0,r.jsxs)("span",{className:"currency",children:[x(k(oe.accesshcvOpAMLower,oe.eastlinkAccessBreakdown)),"\u2013",x(k(oe.accesshcvOpAMUpper,oe.eastlinkAccessBreakdown))]})]})})]}),"bothPM"===G.onPeak&&(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink10",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(ca
2pped)"]})]}),!1===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.accesshcvOpPMLower?x(oe.accesshcvOpPMLower-X):x(oe.accesshcvOpPMLower)}),!1===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"total",children:["0.00"!==oe.accesshcvOpPMLower?x(oe.accesshcvOpPMLower-X):x(oe.accesshcvOpPMLower),"\u2013","0.00"!==oe.accesshcvOpPMUpper?x(oe.accesshcvOpPMUpper-X):x(oe.accesshcvOpPMUpper)]}),!0===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.accesshcvOpPMLower?x(oe.accesshcvOpPMLower-X):x(oe.accesshcvOpPMLower)}),!0===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"total",children:["0.00"!==oe.accesshcvOpPMLower?x(oe.accesshcvOpPMLower-X):x(oe.accesshcvOpPMLower),"\u2013","0.00"!==oe.accesshcvOpPMUpper?x(oe.accesshcvOpPMUpper-X):x(oe.accesshcvOpPMUpper)]})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.citylinkAccessPMBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.citylinkAccessPMBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(X)})]}),"0.00"===oe.accesshcvOpPMLower&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee19",children:m}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink10",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.eastlinkAccessBreakdown?x(oe.eastlinkAccessBreakdown-ee):x(oe.eastlinkAccessBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.eastlinkAccessBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.eastlinkAccessBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(ee)})]}),"0.00"===oe.eastlinkAccessBreakdown&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee20",children:m})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),!1===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper&&(0,r.jsx)("span",{className:"currency",children:x(k(oe.accesshcvOpPMLower,oe.eastlinkAccessBreakdown))}),!1===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"currency",children:[x(k(oe.accesshcvOpPMLower,oe.eastlinkAccessBreakdown)),"\u2013",x(k(oe.accesshcvOpPMUpper,oe.eastlinkAccessBreakdown))]}),!0===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper&&(0,r.jsx)("span",{className:"currency",children:x(k(oe.accesshcvOpPMLower,oe.eastlinkAccessBreakdown))}),!0===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"currency",children:[x(k(oe.accesshcvOpPMLower,oe.eastlinkAccessBreakdown)),"\u2013",x(k(oe.accesshcvOpPMUpper,oe.eastlinkAccessBreakdown))]})]})})]})]})]}),(0,r.jsx)("div",{className:"toll-calculator__open-account",children:(0,r.jsx)("div",{className:"module module--rich-text module--flat-top module--flat-bottom",children:(0,r.jsx)("div",{className:"module__content l-full-width",children:(0,r.jsx)("div",{className:"rich-text ",dangerouslySetInnerHTML:{__html:M}})})})}),(0,r.jsxs)("div",{className:"cf",children:[(0,r.jsx)("h3",{children:S}),(0,r.jsxs)("div",{className:"toll-calculator__results-box extra-padded CHECKMelbournePass",children:[(0,r.jsxs)("div",{className:"cf",children:[(0,r.jsxs)("div",{className:"title cf flex-container",children:[(0,r.jsx)("div",{className:"left",children:(0,r.jsx)("h4",{children:_})}),(0,r.jsxs)("div",{className:"right",children:["on"===G.onEastlinkDiscount&&(0,r.jsx)("div",{className:"total-price",children:x(oe.eastlinkPassDiscount)}),"on"===G.onPeak&&"on"!==G.onEastlinkDiscount&&(0,r.jsx)("div",{className:"total-price",children:x(oe.melbournePass)}),"off"===G.onPeak&&(0,r.jsx)("div",{className:"total-price",children:x(oe.melbournePassOff)}),"bothAM"===G.onPeak&&(0,r.jsxs)("div",{className:"total-price",children:[!1===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper&&(0,r.jsx)("span",{className:"",children:x(k(oe.accesshcvOpAMLower,oe.eastlinkMelbournePassBreakdown))}),!1===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper===!1&&(0,r.jsxs)("span",{className:"",children:[x(k(oe.accesshcvOpAMLower,oe.eastlinkMelbournePassBreakdown)),"\u2013",x(k(oe.accesshcvOpAMUpper,oe.eastlinkMelbournePassBreakdown))]}),!0===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper&&(0,r.jsx)("span",{className:"",children:x(k(oe.accesshcvOpAMLower,oe.eastlinkMelbournePassBreakdown))}),!0===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper===!1&&(0,r.jsxs)("span",{className:"",children:[x(k(oe.accesshcvOpAMLower,oe.eastlinkMelbournePassBreakdown)),"\u2013",x(k(oe.accesshcvOpAMUpper,oe.eastlinkMelbournePassBreakdown))]})]}),"bothPM"===G.onPeak&&(0,r.jsxs)("div",{className:"total-price",children:[!1===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMU
2pper&&(0,r.jsx)("span",{className:"",children:x(k(oe.accesshcvOpPMLower,oe.eastlinkMelbournePassBreakdown))}),!1===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"",children:[x(k(oe.accesshcvOpPMLower,oe.eastlinkMelbournePassBreakdown)),"\u2013",x(k(oe.accesshcvOpPMUpper,oe.eastlinkMelbournePassBreakdown))]}),!0===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper&&(0,r.jsx)("span",{className:"",children:x(k(oe.accesshcvOpPMLower,oe.eastlinkMelbournePassBreakdown))}),!0===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"",children:[x(k(oe.accesshcvOpPMLower,oe.eastlinkMelbournePassBreakdown)),"\u2013",x(k(oe.accesshcvOpPMUpper,oe.eastlinkMelbournePassBreakdown))]})]}),(0,r.jsxs)("a",{href:"#",className:"toggle-button ".concat(he.melbournePass?"open":""),onClick:e=>ue(e,"melbournePass"),children:[(0,r.jsx)("span",{className:"icon icon--theme icon--xx-small icon--chevron-down ".concat(he.melbournePass?"hidden":""),"data-grunticon-embed":"true"}),(0,r.jsx)("span",{className:"icon icon--theme icon--xx-small icon--chevron-up ".concat(he.melbournePass?"":"hidden"),"data-grunticon-embed":"true"})]})]})]}),(0,r.jsx)("div",{className:"description",children:!(0==X&&0==ee)&&(0,r.jsxs)("div",{children:[F.replaceAll("##!NAT_fee_vm_citylink!##",x(X)).replaceAll("##!NAT_fee_vm_eastlink!##",x(ee)),U&&{vmf:X}]})})]}),he.melbournePass&&(0,r.jsxs)("div",{className:"toll-calculator__breakdown",children:["on"===G.onEastlinkDiscount&&0===oe.eastlinkPassDiscount&&(0,r.jsx)("div",{className:"",children:"No charge to travel on this section of road"}),"on"===G.onEastlinkDiscount&&oe.eastlinkPassDiscount>0&&(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink11",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.citylinkMelbournePassBreakdown?x(oe.citylinkMelbournePassBreakdown-X):x(oe.citylinkMelbournePassBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.citylinkMelbournePassBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.citylinkMelbournePassBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(X)})]}),"0.00"===oe.citylinkMelbournePassBreakdown&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee21",children:u}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink11",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.eastlinkMelbournePassDiscBreak?x(oe.eastlinkMelbournePassDiscBreak-ee):x(oe.eastlinkMelbournePassDiscBreak)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.eastlinkMelbournePassDiscBreak>0&&(0,r.jsx)("span",{className:"",children:y}),oe.eastlinkMelbournePassBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(ee)})]}),"0.00"===oe.eastlinkMelbournePassDiscBreak&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee22",children:u})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),(0,r.jsx)("span",{className:"currency",children:x(oe.eastlinkPassDiscount)})]})})]}),"on"===G.onPeak&&"on"!==G.onEastlinkDiscount&&0===oe.melbournePass&&(0,r.jsx)("div",{className:"",children:"No charge to travel on this section of road"}),"on"===G.onPeak&&"on"!==G.onEastlinkDiscount&&oe.melbournePass>0&&(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink12",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.citylinkMelbournePassBreakdown?x(oe.citylinkMelbournePassBreakdown-X):x(oe.citylinkMelbournePassBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.citylinkMelbournePassBreakdown>0&&"mot"!==G.vehicleTypeObj.code&&(0,r.jsx)("span",{className:"",children:y}),oe.citylinkMelbournePassBreakdown>0&&"mot"!==G.vehicleTypeObj.code&&(0,r.jsx)("span",{className:"total",children:x(X)})]}),"0.00"===oe.citylinkMelbournePassBreakdown&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee23",children:u}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink12",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.eastlinkMelbournePassBreakdown?x(oe.eastlinkMelbournePassBreakdown-ee):x(oe.eastlinkMelbournePassBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.eastlinkMelbournePassDiscBreak>0&&"mot"!==G.vehicleTypeObj.code&&(0,r.jsx)("span",{className:"",children:y}),oe.eastlinkMelbournePassDiscBreak>0&&"mot"!==G.vehicleTypeObj.code&&(0,r.jsx)("span",{className:"total",children:x(ee)})]}),"0.00"===oe.eastlinkMelbournePassBreakdown&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee24",children:u})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),(0,r.jsx)("span",{className:"currency",children:x(oe.melbournePass)})]})})]}),"off"===G.onPeak&&0===oe.melbournePassOff&&(0,r.jsx)("div",{className:"",children:"No charge to travel on this section of road"}),"off"===G.onPeak&&oe.melbournePassOff>0&&(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink13",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.citylinkMelbournePassOffBreakdown?x(oe.citylinkMelbournePassOffBreakdown-X):x(oe.citylinkMelbournePassOffBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.citylinkMelbournePassOffBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.citylinkMelbournePassOffBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(X)})]}),"0.00"===oe.citylinkMelbournePassOffBreakdown&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee25",children:u}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink13",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.eastlinkMelbournePassBreakdown?x(oe.eastlinkMelbournePassBreakdown-ee):x(oe.eastlinkMelbournePassBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.eastlinkMelbournePassDiscBreak>0&&(0,r.jsx)("span",{className:"",children:y}),oe.eastlinkMelbournePassDiscBreak>0&&(0,r.jsx)("span",{className:"total",children:x(ee)})]}),"0.00"===oe.eastlinkMelbournePassBreakdown&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee26",children:u})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),(0,r.jsx)("span",{className:"currency",children:x(oe.melbournePassOff)})]})})]}),"bothAM"===G.onPeak&&(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink14",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),!1===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.accesshcvOpAMLower?x(oe.accesshcvOpAMLower-X):x(oe.accesshcvOpAMLower)}),!1===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper===!1&&(0,r.jsxs)("span",{className:"total",children:["0.00"!==oe.accesshcvOpAMLower?x(oe.accesshcvOpAMLower-X):x(oe.accesshcvOpAMLower),"\u2013","0.00"!==oe.accesshcvOpAMUpper?x(oe.accesshcvOpAMUpper-X):x(oe.accesshcvOpAMUpper)]}),!0===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.accesshcvOpAMLower?x(oe.accesshcvOpAMLower-X):x(oe.accesshcvOpAMLower)}),!0===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper===!1&&(0,r.jsxs)("span",{className:"total",children:["0.00"!==oe.accesshcvOpAMLower?x(oe.accesshcvOpAMLower-X):x(oe.accesshcvOpAMLower),"\u2013","0.00"!==oe.accesshcvOpAMUpper?x(oe.accesshcvOpAMUpper-X):x(oe.accesshcvOpAMUpper)]})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.citylinkMelbournePassOffBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.citylinkMelbournePassOffBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(X)})]}),"0.00"===oe.accesshcvOpAMLower&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee27",children:u}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink14",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.eastlinkMelbournePassBreakdown?x(oe.eastlinkMelbournePassBreakdown-ee):x(oe.eastlinkMelbournePassBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.eastlinkMelbournePassBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.eastlinkMelbournePassBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(ee)})]}),"0.00"===oe.eastlinkMelbournePassBreakdown&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee28",children:u})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),!1===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper&&(0,r.jsx)("span",{className:"currency",children:x(k(oe.accesshcvOpAMLower,oe.eastlinkMelbournePassBreakdown))}),!1===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper===!1&&(0,r.jsxs)("span",{className:"currency",children:[x(k(oe.accesshcvOpAMLower,oe.eastlinkMelbournePassBreakdown)),"\u2013",x(k(oe.accesshcvOpAMUpper,oe.eastlinkMelbournePassBreakdown))]}),!0===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper&&(0,r.jsx)("span",{className:"currency",children:x(k(oe.accesshcvOpAMLower,oe.eastlinkMelbournePassBreakdown))}),!0===de.am&&oe.accesshcvOpAMLower===oe.accesshcvOpAMUpper===!1&&(0,r.jsxs)("span",{className:"currency",children:[x(k(oe.accesshcvOpAMLower,oe.eastlinkMelbournePassBreakdown)),"\u2013",x(k(oe.accesshcvOpAMUpper,oe.eastlinkMelbournePassBreakdown))]})]})})]}),"bothPM"===G.onPeak&&(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKCityLink15",children:"CityLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointCityLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointCityLinkObj.name," to"," ",G.exitPointCityLinkObj.name,de.peak&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}
2),!1===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.accesshcvOpPMLower?x(oe.accesshcvOpPMLower-X):x(oe.accesshcvOpPMLower)}),!1===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"total",children:["0.00"!==oe.accesshcvOpPMLower?x(oe.accesshcvOpPMLower-X):x(oe.accesshcvOpPMLower),"\u2013","0.00"!==oe.accesshcvOpPMUpper?x(oe.accesshcvOpPMUpper-X):x(oe.accesshcvOpPMUpper)]}),!0===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.accesshcvOpPMLower?x(oe.accesshcvOpPMLower-X):x(oe.accesshcvOpPMLower)}),!0===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"total",children:["0.00"!==oe.accesshcvOpPMLower?x(oe.accesshcvOpPMLower-X):x(oe.accesshcvOpPMLower),"\u2013","0.00"!==oe.accesshcvOpPMUpper?x(oe.accesshcvOpPMUpper-X):x(oe.accesshcvOpPMUpper)]})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.citylinkMelbournePassOffBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.citylinkMelbournePassOffBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(X)})]}),"0.00"===oe.accesshcvOpPMLower&&""!==G.exitPointCityLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee29",children:u}),(0,r.jsx)("div",{className:"roadname",children:""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"retail-label CHECKEastLink15",children:"EastLink"})}),(0,r.jsxs)("div",{className:"line-item",children:[""!==G.exitPointEastLinkObj.name&&(0,r.jsxs)("span",{className:"",children:[G.entryPointEastLinkObj.name," to"," ",G.exitPointEastLinkObj.name,de.eastlink&&(0,r.jsxs)("span",{className:"toll-calculator__cap",children:[" ","(capped)"]})]}),""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("span",{className:"total",children:"0.00"!==oe.eastlinkMelbournePassBreakdown?x(oe.eastlinkMelbournePassBreakdown-ee):x(oe.eastlinkMelbournePassBreakdown)})]}),(0,r.jsxs)("div",{className:"line-item",children:[oe.eastlinkMelbournePassBreakdown>0&&(0,r.jsx)("span",{className:"",children:y}),oe.eastlinkMelbournePassBreakdown>0&&(0,r.jsx)("span",{className:"total",children:x(ee)})]}),"0.00"===oe.eastlinkMelbournePassBreakdown&&""!==G.exitPointEastLinkObj.name&&(0,r.jsx)("div",{className:"single-section-nofee CHECKSingleSectionNofee30",children:u})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"container__total-price",children:[(0,r.jsx)("span",{children:"Total"}),!1===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper&&(0,r.jsx)("span",{className:"currency",children:x(k(oe.accesshcvOpPMLower,oe.eastlinkMelbournePassBreakdown))}),!1===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"currency",children:[x(k(oe.accesshcvOpPMLower,oe.eastlinkMelbournePassBreakdown)),"\u2013",x(k(oe.accesshcvOpPMUpper,oe.eastlinkMelbournePassBreakdown))]}),!0===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper&&(0,r.jsx)("span",{className:"currency",children:x(k(oe.accesshcvOpPMLower,oe.eastlinkMelbournePassBreakdown))}),!0===de.pm&&oe.accesshcvOpPMLower===oe.accesshcvOpPMUpper===!1&&(0,r.jsxs)("span",{className:"currency",children:[x(k(oe.accesshcvOpPMLower,oe.eastlinkMelbournePassBreakdown)),"\u2013",x(k(oe.accesshcvOpPMUpper,oe.eastlinkMelbournePassBreakdown))]})]})})]})]})]}),ae&&(0,r.jsx)("div",{className:"toll-calculator__results-box citylinktulla extra-padded CHECKTullaPass",style:ve(),children:(0,r.jsxs)("div",{className:"cf",children:[(0,r.jsxs)("div",{className:"title cf flex-container",children:[(0,r.jsx)("div",{className:"left",children:(0,r.jsx)("h4",{children:I})}),(0,r.jsxs)("div",{className:"right",children:[!ie&&(0,r.jsx)("div",{className:"price-area test-price-tulla",children:x(oe.tullaPass)}),ie&&(0,r.jsx)("div",{className:"price-area test-price-tulla",children:"-"})]})]}),(0,r.jsx)("div",{className:"description",children:(0,r.jsx)("div",{children:H})})]})}),(0,r.jsx)("div",{className:"toll-calculator__results-box citylinkpass extra-padded CHECK24HourPass",style:ve(),children:(0,r.jsxs)("div",{className:"cf",children:[(0,r.jsxs)("div",{className:"title cf flex-container",children:[(0,r.jsx)("div",{className:"left",children:(0,r.jsx)("h4",{children:R})}),(0,r.jsxs)("div",{className:"right",children:[!ie&&(0,r.jsx)("div",{className:"price-area test-price-24-hour",children:x(oe["24HourPass"])}),ie&&(0,r.jsx)("div",{className:"price-area test-price-24-hour",children:"-"})]})]}),(0,r.jsx)("div",{className:"description",children:(0,r.jsx)("div",{children:D})})]})}),le&&(0,r.jsx)("div",{className:"toll-calculator__results-box citylinkpass extra-padded CHECKWeekendPass",style:ve(),children:(0,r.jsxs)("div",{className:"cf",children:[(0,r.jsxs)("div",{className:"title cf flex-container",children:[(0,r.jsx)("div",{className:"left",children:(0,r.jsx)("h4",{children:K})}),(0,r.jsxs)("div",{className:"right",children:[!ie&&(0,r.jsx)("div",{className:"price-area test-price-weekend",children:x(oe.weekendPass)}),ie&&(0,r.jsx)("div",{className:"price-area test-price-weekend",children:"-"})]})]}),(0,r.jsx)("div",{className:"description",children:(0,r.jsx)("div",{children:Z})})]})}),(0,r.jsx)("div",{className:"toll-calculator__open-account CHECKBuyAPass",children:(0,r.jsx)("div",{className:"module module--rich-text module--flat-top module--flat-bottom",children:(0,r.jsx)("div",{className:"module__content l-full-width",children:(0,r.jsx)("div",{className:"rich-text",dangerouslySetInnerHTML:{__html:V}})})})})]})]})]})})},_=e=>{let{apiKey:s,mapId:a,dataMapStyleJSON:i,dataTollsJSON:t,dataPricesJSON:c,dataGantryLocationJSON:o,dataLandmarksJSON:p,alldayPassToolTip:h,citylinkHeading:m,eastlinkHeading:k,travelFromDefaultLabel:x,travelToDefaultLabel:v,legendTitle:b,legendTollPointLabel:P,legendMarkerIntersectionLabel:L,legendMarkerStartLabel:O,legendMarkerEndLabel:N,legendNoExitLabel:y,timeOfTravelLabel:f,timeOfTravelHiddenLabel:M,peakTimeText:w,peakIcon:g,offpeakTimeText:C,offPeakIcon:A,peakChangeoverQuestion:E,peakChangeoverLeft:T,peakChangeoverLeftIcon:B,peakChangeoverRight:_,peakChangeoverRightIcon:F,weekdayLabel:U,weekendLabel:D,noTollPriceA
2ccountsLabel:I,noTollPriceAccountsDefaultText:H,noTollPricePassesLabel:R,noTollPricePassesDefaultText:K,noTollNeededAccountsLabel:Z,noTollNeededAccountsDefaultText:J,noTollNeededPassesLabel:V,noTollNeededPassesDefaultText:G,tollNeededAccountsLabel:Y,tollNeededAccountsTitle:z,tollNeededAccountsSubTitle:W,tollNeededAccountsToolTip:Q,tollNeededAccessAccountsTitle:q,tollNeededAccessAccountsSubTitle:X,tollNeededAccessAccountsToolTip:$,vmfLabel:ee,tollNeededAccessAccountsDisplayFee:se,tollNeededpassesLabel:ae,melbournePassTitle:ne,melbournePassSubTitle:ie,melbournePassDisplayFee:te,alldayPassSubTitle:le,tullaPassTitle:ce,tullaPassSubTitle:oe,tullaPassToolTip:re,alldayPassTitle:de,weekendPassTitle:pe,weekendPassSubTitle:he,weekendPassToolTip:me,disableEastlink:ke,viewMapLabelMobileBar:xe,hideMapLabelMobileBar:ve,resetTextMobile:ue,resetIconMobile:je,resetText:be,showTollsLabelMobile:Pe,typeOfVehicle:Le,typeOfVehicleHiddenLabel:Oe,unsureVehicleType:Ne,tollsDiff:ye,openAnAccount:fe,buyAPass:Me,dataPolyLinesJSON:we}=e;const ge=[{name:"Car",code:"car",icon:"transport-car",default:!0},{name:"LCV",code:"lcv",icon:"transport-light-vehicle"},{name:"HCV",code:"hcv",icon:"transport-truck"},{name:"Motorcycle",code:"mot",icon:"transport-motorbike"}
2],[Ce,Ae]=(0,n.useState)({entryPointCityLinkObj:{name:""},exitPointsCityLinkList:[],exitPointCityLinkObj:{name:""},entryPointEastLinkObj:{name:""},exitPointsEastLinkList:[],exitPointEastLinkObj:{name:""},resetForm:!1,onEastlinkDiscount:"off",onPeak:"on",vehicleTypeObj:ge.find(((e,s)=>!0===e.default))});return(0,r.jsx)("div",{className:"tu-melbourne-toll-calculator",children:(0,r.jsx)("div",{className:"module module--toll-calculator",children:(0,r.jsx)("div",{className:"module__content l-padding",children:(0,r.jsx)("div",{className:"toll-calculator",children:(0,r.jsx)("div",{className:"toll-calculator__wrapper cf",children:(0,r.jsxs)(l,{value:{contextData:Ce,setContextData:Ae},children:[(0,r.jsx)("div",{className:"toll-calculator__info",children:(0,r.jsxs)("div",{className:"dropdown-selection",children:[(0,r.jsx)(d,{dataTollsJSON:t,citylinkHeading:m,eastlinkHeading:k,travelFromDefaultLabel:x,travelToDefaultLabel:v,resetText:be}),(0,r.jsx)(j,{dataVehicleJSON:ge,typeOfVehicle:Le,typeOfVehicleHiddenLabel:Oe,timeOfTravelLabel:f,timeOfTravelHiddenLabel:M,peakTimeText:w,peakIcon:g,offpeakTimeText:C,offPeakIcon:A,peakChangeoverQuestion:E,peakChangeoverLeft:T,peakChangeoverLeftIcon:B,peakChangeoverRight:_,peakChangeoverRightIcon:F,weekdayLabel:U,weekendLabel:D,tollsDiff:ye,unsureVehicleType:Ne}),(0,r.jsx)(S,{dataPricesJSON:c,noTollPriceAccountsLabel:I,noTollPriceAccountsDefaultText:H,noTollPricePassesLabel:R,noTollPricePassesDefaultText:K,noTollNeededAccountsLabel:Z,noTollNeededAccountsDefaultText:J,noTollNeededPassesLabel:V,noTollNeededPassesDefaultText:G,tollNeededAccountsLabel:Y,tollNeededAccountsTitle:z,tollNeededAccountsSubTitle:W,tollNeededAccessAccountsTitle:q,tollNeededAccessAccountsSubTitle:X,vmfLabel:ee,tollNeededAccessAccountsDisplayFee:se,tollNeededpassesLabel:ae,melbournePassTitle:ne,melbournePassSubTitle:ie,melbournePassDisplayFee:te,alldayPassSubTitle:le,tullaPassTitle:ce,tullaPassSubTitle:oe,alldayPassTitle:de,weekendPassTitle:pe,weekendPassSubTitle:he,disableEastlink:ke,tollsDiff:ye,openAnAccount:fe,buyAPass:Me})]})}),(0,r.jsx)(u,{apiKey:s,mapId:a,dataTollsJSON:t,dataMapStyleJSON:i,dataLandmarksJSON:p,dataGantryLocationJSON:o,legendTitle:b,legendTollPointLabel:P,legendMarkerIntersectionLabel:L,legendMarkerStartLabel:O,legendMarkerEndLabel:N,legendNoExitLabel:y,viewMapLabelMobileBar:xe,hideMapLabelMobileBar:ve,resetTextMobile:ue,showTollsLabelMobile:Pe,dataPolyLinesJSON:we})]})})})})})})},F=e=>{let{apiKey:s,mapId:a,dataMapStyleJSON:n,dataTollsJSON:i,dataPricesJSON:t,dataGantryLocationJSON:l,dataLandmarksJSON:c,alldayPassToolTip:o,citylinkHeading:d,eastlinkHeading:p,travelFromDefaultLabel:h,travelToDefaultLabel:m,legendTitle:k,legendTollPointLabel:x,legendMarkerIntersectionLabel:v,legendMarkerStartLabel:u,legendMarkerEndLabel:j,legendNoExitLabel:b,timeOfTravelLabel:P,timeOfTravelHiddenLabel:L,peakTimeText:O,peakIcon:N,offpeakTimeText:y,offPeakIcon:f,peakChangeoverQuestion:M,peakChangeoverLeft:w,peakChangeoverLeftIcon:g,peakChangeoverRight:C,peakChangeoverRightIcon:A,weekdayLabel:E,weekendLabel:T,noTollPriceAccountsLabel:B,noTollPriceAccountsDefaultText:S,noTollPricePassesLabel:F,noTollPricePassesDefaultText:U,noTollNeededAccountsLabel:D,noTollNeededAccountsDefaultText:I,noTollNeededPassesLabel:H,noTollNeededPassesDefaultText:R,tollNeededAccountsLabel:K,tollNeededAccountsTitle:Z,tollNeededAccountsSubTitle:J,tollNeededAccountsToolTip:V,tollNeededAccessAccountsTitle:G,tollNeededAccessAccountsSubTitle:Y,tollNeededAccessAccountsToolTip:z,vmfLabel:W,tollNeededAccessAccountsDisplayFee:Q,tollNeededpassesLabel:q,melbournePassTitle:X,melbournePassSubTitle:$,melbournePassDisplayFee:ee,alldayPassSubTitle:se,tullaPassTitle:ae,tullaPassSubTitle:ne,tullaPassToolTip:ie,alldayPassTitle:te,weekendPassTitle:le,weekendPassSubTitle:ce,weekendPassToolTip:oe,disableEastlink:re,viewMapLabelMobileBar:de,hideMapLabelMobileBar:pe,resetTextMobile:he,resetIconMobile:me,resetText:ke,resetIcon:xe,showTollsLabelMobile:ve,typeOfVehicle:ue,typeOfVehicleHiddenLabel:je,unsureVehicleType:be,tollsDiff:Pe,openAnAccount:Le,buyAPass:Oe,dataPolyLinesJSON:Ne}=e;return(0,r.jsx)(_,{apiKey:s,mapId:a,dataMapStyleJSON:n,dataTollsJSON:i,dataPricesJSON:t,dataGantryLocationJSON:l,dataLandmarksJSON:c,alldayPassToolTip:o,citylinkHeading:d,eastlinkHeading:p,travelFromDefaultLabel:h,travelToDefaultLabel:m,legendTitle:k,legendTollPointLabel:x,legendMarkerIntersectionLabel:v,legendMarkerStartLabel:u,legendMarkerEndLabel:j,legendNoExitLabel:b,timeOfTravelLabel:P,timeOfTravelHiddenLabel:L,peakTimeText:O,peakIcon:N,offpeakTimeText:y,offPeakIcon:f,peakChangeoverQuestion:M,peakChangeoverLeft:w,peakChangeoverLeftIcon:g,peakChangeoverRight:C,peakChangeoverRightIcon:A,weekdayLabel:E,weekendLabel:T,noTollPriceA
2ccountsLabel:B,noTollPriceAccountsDefaultText:S,noTollPricePassesLabel:F,noTollPricePassesDefaultText:U,noTollNeededAccountsLabel:D,noTollNeededAccountsDefaultText:I,noTollNeededPassesLabel:H,noTollNeededPassesDefaultText:R,tollNeededAccountsLabel:K,tollNeededAccountsTitle:Z,tollNeededAccountsSubTitle:J,tollNeededAccountsToolTip:V,tollNeededAccessAccountsTitle:G,tollNeededAccessAccountsSubTitle:Y,vmfLabel:W,tollNeededAccessAccountsToolTip:z,tollNeededAccessAccountsDisplayFee:Q,tollNeededpassesLabel:q,melbournePassTitle:X,melbournePassSubTitle:$,melbournePassDisplayFee:ee,alldayPassSubTitle:se,tullaPassTitle:ae,tullaPassSubTitle:ne,tullaPassToolTip:ie,alldayPassTitle:te,weekendPassTitle:le,weekendPassSubTitle:ce,weekendPassToolTip:oe,disableEastlink:re,viewMapLabelMobileBar:de,hideMapLabelMobileBar:pe,resetTextMobile:he,resetIconMobile:me,resetText:ke,resetIcon:xe,showTollsLabelMobile:ve,typeOfVehicle:ue,typeOfVehicleHiddenLabel:je,unsureVehicleType:be,tollsDiff:Pe,openAnAccount:Le,buyAPass:Oe,dataPolyLinesJSON:Ne})}},76216:(e,s,a)=>{a.d(s,{Bx:()=>l,fA:()=>i,wV:()=>c});let n={};function i(e){return e.replace(/([A-Z])/g," $1").trim()}let t={getFunctions:function(e){let s=[];for(let a=0;a<e.length;a++){let n={min:e[a].min,max:e[a].max,val:e[a].val};s.push(n)}return s}};function l(e,s,a){let i=[],l=0;n.results=[];for(let c in e){let o,r=[];o="HLP"==s.name?0==e[c].HLPFunctions.length?t.getFunctions(e[c].normalFunctions):t.getFunctions(e[c].HLPFunctions):t.getFunctions(e[c].normalFunctions);let d=o[0].min,p=0,h=0;for(let e=0;e<o.length;e++){let s=Function("x","return "+o[e].val);d=o[e].min,p=s(d);let a={x:d,y:p};r.push(a),d=o[e].max,p=s(d),a={x:d,y:p},r.push(a),h=o[e].max}i.push(h);let m=[];console.log(s);s.fixedLoadFactor,s.dynamicLoadFactor;a[0].spacing=0,n.axleCombinationList=[];for(let e=0;e<a.length;e++){console.log("Axle Groups"),console.log("Id: "+e),console.log("Mass: "+a[e].mass),console.log("Spacing: "+a[e].spacing),console.log("Axle Width:"+a[e].width);let s={},i=0;i=void 0!=a[e]&&a[e].width>2.5?2.5/a[e].width:1;let t=0;if(t=i>0&&void 0!=a[e]?a[e].mass*i:a[e].mass,console.log("Mass With Width Factor :"+t),e+1>a.length)break;if(0==e){s={id:0,mass:t,spacing:0,width:a[e].width,type:"single"},n.axleCombinationList[0]=s;continue}let l=a[e].spacing,c=t;a[e].width;if(s={},l<=1.25){for(;void 0!=a[e+1]&&a[e+1].spacing<=1.25;)l+=a[e+1].spacing,c+=t,e++;s={id:0,mass:c,spacing:l,width:0,type:"combination"}}else s={id:0,mass:c,spacing:l,width:0,type:"single"};n.axleCombinationList[n.axleCombinationList.length]=s}console.log("axleCombinationList"),console.log(n.axleCombinationList);for(let e=1;e<n.axleCombinationList.length;e++){let s=n.axleCombinationList[e].mass,a=n.axleCombinationList[e].spacing;if(1==e){if(s+=n.axleCombinationList[0].mass,a+=n.axleCombinationList[0].spacing,"combination"!=n.axleCombinationList[e].type){let e={x:a,y:s,index:m.length};m.push(e)}}else s+=n.axleCombinationList[e-1].mass;for(let i=e+1;i<n.axleCombinationList.length;i++){s+=n.axleCombinationList[i].mass,a+=n.axleCombinationList[i].spacing,void 0!=n.axleCombinationList[i+1]&&"combination"==n.axleCombinationList[i+1].type&&(i++,s+=n.axleCombinationList[i].mass,a+=n.axleCombinationList[i].spacing),s=Math.round(100*s)/100,a=Math.round(100*a)/100;let e={x:a,y:s,index:m.length};m.push(e)}}for(let e=0;e<n.axleCombinationList.length;e++)if("combination"==n.axleCombinationList[e].type){let s=n.axleCombinationList[e].mass,a=n.axleCombinationList[e].spacing;void 0!=n.axleCombinationList[e-1]&&(s+=n.axleCombinationList[e-1].mass),s=Math.round(100*s)/100,a=Math.round(100*a)/100;let i={x:a,y:s,index:m.length};m.push(i)}for(let e=1;e<n.axleCombinationList.length;e++){if("single"==n.axleCombinationList[e].type&&void 0!=n.axleCombinationList[e+1]&&"combination"!=n.axleCombinationList[e+1].type){let s=n.axleCombinationList[e].mass,a=n.axleCombinationList[e].spacing;void 0!=n.axleCombinationList[e-1]&&(s+=n.axleCombinationList[e-1].mass),s=Math.round(100*s)/100,a=Math.round(100*a)/100;let i={x:a,y:s,index:m.length};m.push(i)}if(e==n.axleCombinationList.length-1&&"single"==n.axleCombinationList[e].type){let s=n.axleCombinationList[e].mass,a=n.axleCombinationList[e].spacing;void 0!=n.axleCombinationList[e-1]&&(s+=n.axleCombinationList[e-1].mass),s=Math.round(100*s)/100,a=Math.round(100*a)/100;let i={x:a,y:s,index:m.length};m.push(i)}}console.log("dataPoints"),console.log(m);let k,x,v="rgb(155, 0, 0)",u="rgb(0, 250, 0)",j=[],b="Pass";for(let e=0;e<m.length;e++){d=m[e].x;for(let e=0;e<o.length;e++)if(d>=o[e].min&&d<o[e].max){p=Function("x","return "+o[e].val)(d)}m[e].y<=p?j[e]=u:(j[e]=v,b="Fail")}"Fail"==b?(k="Excessive load",x="056"):(k="Vehicle passed",x="100");let P={id:e[c].id,name:e[c].name,status:b,reason:x,description:k,dataPoints:m,lineOfFit:r.map((e=>({x:e.x,y:e.y}))),conditionalColoring:j};n.results.push(P),e[c].status=b,l+=1}return console.log("=====validStructures====="),console.log(e),{results:n.results,resultValidStructures:e}}function c(e,s,a){let n,i,t=((e,s)=>{let a={};return e.filter((function(e){e.id===s&&(a=e)})),a})(e.validExits,s.id).direction;"south"===t?(n=e.geoPointSouthBound,i=s.geoPointSouthBound):"east"===t?(n=e.geoPointEastBound,i=s.geoPointSouthBound):(n=e.geoPointNorthBound,i=s.geoPointNorthBound);let l=[],c=Math.min(e.id,s.id),o=Math.max(e.id,s.id);for(let d in e.validExits)if(c<=e.validExits[d].id&&e.validExits[d].id<=o&&null!=e.validExits[d].validStructures)for(let s in e.validExits[d].validStructures)l.push(e.validExits[d].validStructures[s]);let r=[];if(null!=l)for(let d in a)for(let e in l)a[d].id==l[e].code&&(a[d].status=null,r.push(a[d]));return r}},24499:(e,s,a)=>{function n(e,s,a,n){return new(a||(a=Promise))((function(i,t){function l(e){try{o(n.next(e))}catch(s){t(s)}}function c(e){try{o(n.throw(e))}catch(s){t(s)}}function o(e){var s;e.done?i(e.value):(s=e.value,s instanceof a?s:new a((function(e){e(s)}))).then(l,c)}o((n=n.apply(e,s||[])).next())}))}a.d(s,{aN:()=>c});var i=function e(s,a){if(s===a)return!0;
2if(s&&a&&"object"==typeof s&&"object"==typeof a){if(s.constructor!==a.constructor)return!1;var n,i,t;if(Array.isArray(s)){if((n=s.length)!=a.length)return!1;for(i=n;0!==i--;)if(!e(s[i],a[i]))return!1;return!0}if(s.constructor===RegExp)return s.source===a.source&&s.flags===a.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===a.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===a.toString();if((n=(t=Object.keys(s)).length)!==Object.keys(a).length)return!1;for(i=n;0!==i--;)if(!Object.prototype.hasOwnProperty.call(a,t[i]))return!1;for(i=n;0!==i--;){var l=t[i];if(!e(s[l],a[l]))return!1}return!0}return s!==s&&a!==a};const t="__googleMapsScriptId";var l;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(l||(l={}));class c{constructor(e){let{apiKey:s,authReferrerPolicy:a,channel:n,client:l,id:o=t,language:r,libraries:d=[],mapIds:p,nonce:h,region:m,retries:k=3,url:x="https://maps.googleapis.com/maps/api/js",version:v}=e;if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=s,this.authReferrerPolicy=a,this.channel=n,this.client=l,this.id=o||t,this.language=r,this.libraries=d,this.mapIds=p,this.nonce=h,this.region=m,this.retries=k,this.url=x,this.version=v,c.instance){if(!i(this.options,c.instance.options))throw new Error("Loader must not be called again with different options. ".concat(JSON.stringify(this.options)," !== ").concat(JSON.stringify(c.instance.options)));return c.instance}c.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?l.FAILURE:this.done?l.SUCCESS:this.loading?l.LOADING:l.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+="&key=".concat(this.apiKey)),this.channel&&(e+="&channel=".concat(this.channel)),this.client&&(e+="&client=".concat(this.client)),this.libraries.length>0&&(e+="&libraries=".concat(this.libraries.join(","))),this.language&&(e+="&language=".concat(this.language)),this.region&&(e+="&region=".concat(this.region)),this.version&&(e+="&v=".concat(this.version)),this.mapIds&&(e+="&map_ids=".concat(this.mapIds.join(","))),this.authReferrerPolicy&&(e+="&auth_referrer_policy=".concat(this.authReferrerPolicy)),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,s)=>{this.loadCallback((a=>{a?s(a.error):e(window.google)}))}))}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,s;if(document.getElementById(this.id))return void this.callback();const a={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(a).forEach((e=>!a[e]&&delete a[e])),(null===(s=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===s?void 0:s.importLibrary)||(e=>{let s,a,i,t="The Google Maps JavaScript API",l="google",c="importLibrary",o="__ib__",r=document,d=window;d=d[l]||(d[l]={});const p=d.maps||(d.maps={}),h=new Set,m=new URLSearchParams,k=()=>s||(s=new Promise(((c,d)=>n(this,void 0,void 0,(function*(){var n;for(i in yield a=r.createElement("script"),a.id=this.id,m.set("libraries",[...h]+""),e)m.set(i.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),e[i]);m.set("callback",l+".maps."+o),a.src=this.url+"?"+m,p[o]=c,a.onerror=()=>s=d(Error(t+" could not load.")),a.nonce=this.nonce||(null===(n=r.querySelector("script[nonce]"))||void 0===n?void 0:n.nonce)||"",r.head.append(a)})))));p[c]?console.warn(t+" only loads once. Ignoring:",e):p[c]=function(e){for(var s=arguments.length,a=new Array(s>1?s-1:0),n=1;n<s;n++)a[n-1]=arguments[n];return h.add(e)&&k().then((()=>p[c](e,...a)))}})(a);const i=this.libraries.map((e=>this.importLibrary(e)));i.length||i.push(this.importLibrary("core")),Promise.all(i).then((()=>this.callback()),(e=>{const s=new ErrorEvent("error",{error:e});this.loadErrorCallback(s)}))}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.error("Failed to load Google Maps script, retrying in ".concat(e," ms.")),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setScript())}}}}}]);

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.