1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5877],{1998:(t,e,n)=>{"use strict";n.d(e,{r:()=>l});var a=n(30926);let l=(0,a.createServerReference)("60eb818941052300a25eeeb99f3393ae96d9781cb6",a.callServer,void 0,a.findSourceMapURL,"resolveAddressAction")},9078:(t,e,n)=>{"use strict";n.d(e,{Fz:()=>u,Lz:()=>M,Nl:()=>o,Ov:()=>r,TJ:()=>i,hF:()=>l,nL:()=>d,n_:()=>h,ol:()=>f,sd:()=>c,tj:()=>p,yy:()=>s});var a=n(68954);let l={site:30,tip:80,depot:80,servo:40},r=300;function i(t){return Math.round(Math.min(500,Math.max(20,t)))}function o(t,e){return"number"==typeof e&&Number.isFinite(e)&&e>0?i(e):l[t]}function s(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"metric";return"imperial"===e?"".concat(5*Math.round(3.28084*t/5)," ft"):"".concat(Math.round(t)," m")}function u(t,e){return 1e3*(0,a.k)(t,e)}function c(t,e,n){let a=e/6371e3,l=n*Math.PI/180,r=t.lat*Math.PI/180,i=t.lng*Math.PI/180,o=Math.asin(Math.sin(r)*Math.cos(a)+Math.cos(r)*Math.sin(a)*Math.cos(l)),s=i+Math.atan2(Math.sin(l)*Math.sin(a)*Math.cos(r),Math.cos(a)-Math.sin(r)*Math.sin(o));return{lat:180*o/Math.PI,lng:180*s/Math.PI}}function d(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:48;return Array.from({length:n+1},(a,l)=>{let r=c(t,e,360*l/n);return[r.lat,r.lng]})}function h(t,e,n){var a,l;if(!e)return null;let r=null;for(let l of t){if(n<("servo"===l.kind?120:null!=(a=l.stoppedS)?a:10))continue;let t=u(e,l);t<=l.zoneM&&(!r||t<r.m)&&(r={place:l,m:t})}return null!=(l=null==r?void 0:r.place)?l:null}let f={siteM:150,stoppedS:20,nearM:40,nearS:4};function p(t){let{siteM:e,stoppedS:n,nearM:a,nearS:l}=f,r={id:"stop:".concat(t.id),kind:"site",lat:t.lat,lng:t.lng};return[{...r,zoneM:a,stoppedS:l},{...r,zoneM:e,stoppedS:n},...t.bin?[{id:"stop:".concat(t.id,":bin"),kind:"site",lat:t.bin.lat,lng:t.bin.lng,zoneM:a,stoppedS:l}]:[]]}let M=150},12033:(t,e,n)=>{"use strict";n.d(e,{t:()=>l});var a=n(30926);let l=(0,a.createServerReference)("70dcc26d5b8a15ec7bd018d622f48e75eabc54727a",a.callServer,void 0,a.findSourceMapURL,"suggestAddressAction")},14409:(t,e,n)=>{"use strict";n.d(e,{$Z:()=>D,Bj:()=>p,DM:()=>c,F4:()=>w,Fb:()=>h,Fe:()=>d,Ju:()=>z,OH:()=>m,Sz:()=>I,VV:()=>L,ZZ:()=>Z,Zo:()=>N,_u:()=>S,b:()=>A,fY:()=>u,fp:()=>r,gK:()=>i,hr:()=>k,ix:()=>x,jk:()=>_,mb:()=>j,mv:()=>f,pN:()=>y,qm:()=>b,qt:()=>s,r6:()=>o,vZ:()=>v,w1:()=>g,zQ:()=>P});var a=n(65243),l=n(9078);function r(t){let e=(null!=t?t:"").split(",").map(t=>t.trim().replace(RegExp("\\s+".concat("(?:ACT|NSW|NT|QLD|SA|TAS|VIC|WA)","(?:\\s+\\d{4})?$"),"i"),"").replace(/^\d{4}$/,"").trim()).filter(t=>t&&!/^australia$/i.test(t)),n=t=>t.toLocaleLowerCase("en-AU"),a=[];for(let t of e){if(a.some(e=>n(e)===n(t)))continue;let e=a.findIndex(e=>n(e).endsWith(" ".concat(n(t))));e>=0&&(a[e]=a[e].slice(0,-t.length).trim()),a.push(t)}return a.join(", ")||null}function i(t){var e,n;return null!=(n=null==(e=/(?:^|[,/]\s*)(\d+[A-Za-z]?)\s+[A-Za-z]/.exec(null!=t?t:""))?void 0:e[1])?n:null}function o(t){let e=(null!=t?t:"").replace(/\b(?:customer |legacy )?booking note\s*(?:\([^)]*\))?\s*:/gi," ").replace(/\([^()]*\b(?:legacy|booking|BK-)[^()]*\)/gi," ").replace(/\bBK-\d{8}-[A-Z0-9]+\b/gi," ").replace(/\b\d{1,2}\/\d{1,2}\/\d{2,4}\b/g," "),n=new Set;return e.split(RegExp("(?<=[.!?])\\s+|\\n+")).map(t=>t.replace(/\s+/g," ").replace(/^[\s:;,.-]+/,"").trim()).filter(t=>{let e=t.toLocaleLowerCase("en-AU").replace(/[.!?\s]+$/,"");return!(!e||n.has(e)||/^(?:none|nil|n\/?a|no|nothing|no notes?|-+)$/.test(e))&&(n.add(e),!0)}).join(" ")||null}function s(t){let e=(null!=t?t:"").split(/[.;\n]/).map(t=>t.trim()).find(t=>/\b(?:lane|laneway|car ?park|rear|back (?:entry|entrance|gate|lane)|driveway|right of way)\b/i.test(t));if(!e)return null;let n=e.split(",").slice(0,2).join(",").trim();return/^[A-Z][\w']*(?: [A-Z][\w']*)* (?:Lane|Ln|Street|St|Road|Rd|Avenue|Ave|Terrace|Tce|Place|Pl|Court|Ct|Drive|Dr)\b/.test(n)?"via ".concat(n):n}function u(t){let{video:e,width:n,pip:a,gap:l}=t,r={left:l,top:0,width:n-2*l};return e?{column:r,video:{left:n-2*l-a.w,top:l,width:a.w,height:a.h},room:Math.max(0,r.width-a.w-l)}:{column:r,video:null,room:r.width}}function c(t,e,n,a){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,r=t.split(/\s+/).filter(
1Boolean),i=t=>r.reduce((e,n)=>e.used&&e.used+1+n.length<=t?{n:e.n,used:e.used+1+n.length}:{n:e.n+ +!!e.used,used:n.length},{n:1,used:0}).n;for(let t=n;t>a;t--){let n=Math.floor(e/(.56*t));if(r.every(t=>t.length<=n)&&i(n)<=l)return t}return a}let d={easeMs:300,reckonMaxMs:1500,jumpM:60,chordM:10,stillMps:1,holdM:12,courseMps:3,matchM:25,puckAccuracyM:50};function h(t,e,n,l){var r;return t<=d.matchM||!(t>=l)&&(!((null!=(r=n.speedKph)?r:0)/3.6>=d.courseMps)||null==n.headingDeg||45>=(0,a.lZ)(n.headingDeg,e))}let f={highway:{kph:80,zoom:16.6},town:{kph:50,zoom:17.6},street:{kph:30,zoom:18.9},turnZoom:19.2,arriveM:300,arriveZoom:19.3,kerbM:100,kerbZoom:19.6};function p(t,e,n){let a=Math.max(0,null!=t?t:0),{highway:l,town:r,street:i}=f,o=a>=l.kph?l.zoom:a>=r.kph?r.zoom+(l.zoom-r.zoom)*(a-r.kph)/(l.kph-r.kph):a>i.kph?i.zoom+(r.zoom-i.zoom)*(a-i.kph)/(r.kph-i.kph):i.zoom;return null!=n&&n<=f.kerbM?f.kerbZoom:null!=n&&n<=f.arriveM?Math.max(o,f.arriveZoom):o+(Math.max(o,f.turnZoom)-o)*m(e,t)}let M={leadS:20,fullS:4,minLeadM:150,maxLeadM:500,minFullM:40};function m(t,e){if(null==t)return 0;let n=Math.max(0,null!=e?e:0)/3.6,a=Math.max(M.minLeadM,Math.min(M.maxLeadM,n*M.leadS)),l=Math.min(a-1,Math.max(M.minFullM,n*M.fullS)),r=Math.max(0,Math.min(1,(a-t)/(a-l)));return r*r*(3-2*r)}function g(t,e){let n=Math.max(.4,Math.min(1,.4+.6*(t-13)/3));return n>=1?e:8*Math.round(e*n/8)}let v={drive:60,turn:25};function x(t,e){return v.drive+(v.turn-v.drive)*m(t,e)}let b={fitM:400,holdM:440,tiltM:150,tiltHoldM:170,binM:50,binHoldM:60,holdHeadingM:30,fitPitch:42,closePitch:v.drive,minZoom:15,maxZoom:19.5};function w(t,e,n,a){return null!=e&&e<=(t?a:n)}function y(t,e,n,r,i,o){let s=Math.max(120,t-r-i),u=(e.lat+n.lat)/2,c=(e.lng+n.lng)/2,d=Math.log2(40075016.686*Math.cos(u*Math.PI/180)/(512*(Math.max(15,(0,l.Fz)(e,n))/(.5*s)))),h=(0,l.Fz)(e,n)<b.holdHeadingM?e.bearing:(0,a.JN)(e,n),f=(0,a.lZ)(e.bearing,h)>100?e.bearing:o?h:D(e.bearing,h,.5);return{lat:u,lng:c,zoom:Math.max(b.minZoom,Math.min(b.maxZoom,d)),bearing:f,pitch:o?b.closePitch:b.fitPitch}}function k(t,e,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,l=t-e,r=Math.max(0,l-n),i=Math.min(72,.2*r);return l-(i+(.5*r-i)*Math.max(0,Math.min(1,a)))}function S(t,e){if(null==t)return null;let[n,a,l]=(null!=e?e:0)>80?[1e3,500,200]:[500,200,70];return t<=l?"now":t<=a?"near":t<=n?"far":null}function N(t,e,n){return!("number"==typeof e&&Number.isFinite(e)&&e/3.6>=d.stillMps)&&t<=Math.max(d.holdM,null!=n?n:0)}function j(t,e,n){var a;let l=null==t?void 0:t.headingDeg;return t&&(null!=(a=t.speedKph)?a:0)/3.6>=d.courseMps&&"number"==typeof l&&Number.isFinite(l)?l:null!=e?e:n}function A(t){return t.pts.length>=2&&t.total>0?z(t,Math.min(t.total/2,d.chordM)).bearing:null}function z(t,e){let n=e=>{var n;let{pts:a,cum:l}=t;if(a.length<2)return null!=(n=a[0])?n:{lat:0,lng:0};let r=Math.max(0,Math.min(t.total,e)),i=0;for(;i<a.length-2&&l[i+1]<r;)i++;let o=l[i+1]-l[i],s=o>0?(r-l[i])/o:0;return{lat:a[i].lat+(a[i+1].lat-a[i].lat)*s,lng:a[i].lng+(a[i+1].lng-a[i].lng)*s}},l=n(e),r=d.chordM,i=Math.max(r,Math.min(t.total-r,e));return{...l,bearing:(0,a.JN)(n(i-r),n(i+r))}}let F={beforeM:18,afterM:22,headM:7,headDeg:35};function Z(t,e){let n=Math.max(0,e-F.beforeM),l=Math.min(t.total,e+F.afterM),r=z(t,l),i=t.pts.filter((e,a)=>t.cum[a]>n&&t.cum[a]<l),o=(0,a.JN)(r,z(t,Math.max(n,l-6))),s=t=>{let e=(o+t)*Math.PI/180,n=F.headM;return{lat:r.lat+n*Math.cos(e)/111320,lng:r.lng+n*Math.sin(e)/(111320*Math.cos(r.lat*Math.PI/180))}},u=z(t,n);return{shaft:[{lat:u.lat,lng:u.lng},...i,{lat:r.lat,lng:r.lng}],head:[s(F.headDeg),{lat:r.lat,lng:r.lng},s(-F.headDeg)]}}function L(t,e,n,a){let l="number"==typeof a&&Number.isFinite(a)?a/3.6:t&&n>t.atMs?(e-t.along)/((n-t.atMs)/1e3):0;return l>=d.stillMps?l:0}function P(t,e,n){let a=t.mps*(Math.max(0,Math.min(d.reckonMaxMs,e-t.atMs))/1e3),l=Math.max(0,Math.min(1,(e-t.sinceMs)/d.easeMs));return Math.max(0,Math.min(n,t.along+a+t.gap*(1-l)**3))}function I(t,e,n,a){let l={...e,gap:0,sinceMs:n};if(null==t)return l;let r=t-P(l,n,a);return Math.abs(r)>d.jumpM?l:{...l,gap:r}}function _(t,e,n){if(!t||(0,l.Fz)(t,e)>d.jumpM)return e;let a=1-(1-Math.max(0,Math.min(1,n)))**3;return{lat:t.lat+(e.lat-t.lat)*a,lng:t.lng+(e.lng-t.lng)*a}}function D(t,e,n){return(t+((e-t+540)%360-180)*Math.max(0,Math.min(1,n))+360)%360}},22734:(t,e,n)=>{},24676:(t,e,n)=>{"use strict";n.d(e,{At:()=>i,Ib:()=>h,Ry:()=>d,WVehicleMarker:()=>f,k9:()=>u});var a=n(95155),l=n(85901),r=n(22013);function i(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16;return Math.round(Math.max(36,Math.min(64,36+((Number.isFinite(t)?t:16)-12)*3)))}function o(t){return t<=40?"city":t<60?"street":"drive"}function s(t,e,n){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=Number.isFinite(e)?e:0,i=a?l.U$:l.L5,o="top"===t?{index:0,residual:r}:(0,l.c0)(r,i.headings),s=(0,l.Bq)(o.index,i),u=n?o.residual:o.index*(360/i.headings)+o.residual;return"--tint-position:".concat(s.x,"% ").concat(s.y,"%;--vehicle-turn:").concat(u,"deg")}function u(t){let{vehicle:e,heading:n,view:a="pitch",size:i=48,stoppedAtJob:u=!1,braking:d=!1,chip:h=null,
1selected:f=!1,work:p=null,model:M=null}=t,m=(0,l.IU)(null!=e?e:{}),g=m.colour,v=null!=M?M:m.id,x=Math.max(24,Math.min(256,Number.isFinite(i)?i:48)),b="width:".concat(x,"px;height:").concat(x,"px;--vehicle-colour:").concat(g,";").concat(s(a,n,v,!1)),w=h?'<span class="w-vehicle-marker__chip w-float" data-glass="map">'.concat(c(h),"</span>"):"",y='<span class="w-vehicle-marker" data-model="'.concat(v,'" data-view="').concat(a,'" data-zoom="').concat(o(x),'" data-shape="truck" data-selected="').concat(f,'" data-stopped="').concat(u,'" data-braking="').concat(d,'" style="').concat(b,'">'),k=(0,r.Yh)(g),S='<svg class="w-vehicle-marker__shape" viewBox="0 0 64 36" aria-hidden="true" style="display:block;width:100%;height:100%;transform:rotate(var(--vehicle-turn))"><path fill="'.concat(g,'"').concat(k?' stroke="'.concat(k,'" stroke-width="2.5" stroke-linejoin="round"'):"",' d="M6 26 V16 h16 l8-8 h24 a4 4 0 0 1 4 4 v14 H6z"/><path fill="#1c1917" d="M32 12 h12 v7 H32z"/><circle cx="18" cy="26" r="3.5" fill="#1c1917"/><circle cx="48" cy="26" r="3.5" fill="#1c1917"/></svg>');return"".concat(y,'<i class="w-vehicle-marker__shadow" aria-hidden="true"></i>').concat(S).concat(w,"</span>")}function c(t){return t.replace(/[&<>"]/g,t=>{var e;return null!=(e=({"&":"&","<":"<",">":">",'"':"""})[t])?e:t})}function d(t,e){var n;let a=t.matches(".w-vehicle-marker")?t:t.querySelector(".w-vehicle-marker");if(!a)return;let r="unknown"===a.dataset.model?null:null!=(n=a.dataset.model)?n:null,i="top"===a.dataset.view?"top":"pitch";if(void 0!==e.heading){for(let t of s(i,e.heading,r,"true"===a.dataset.pose).split(";")){let[e,n]=t.split(":");e&&n&&a.style.setProperty(e,n)}"true"!==a.dataset.turned&&"pending"!==a.dataset.turned&&(a.dataset.turned="pending",("function"==typeof requestAnimationFrame?requestAnimationFrame:t=>(t(0),0))(()=>{"pending"===a.dataset.turned&&(a.dataset.turned="true")})),function(t,e){let n=2*(0,l.c0)(parseFloat(t.style.getPropertyValue("--vehicle-turn"))||0).index*Math.PI/l.L5.headings,a=("pitch"===e?48:89.99)*Math.PI/180;t.querySelectorAll("[data-x]").forEach(t=>{let e=Number(t.dataset.x),l=Number(t.dataset.y),r=Number(t.dataset.z),i=e*Math.cos(n)+l*Math.sin(n),o=(-e*Math.sin(n)+l*Math.cos(n))*Math.sin(a)+(r-1)*Math.cos(a);t.style.left="".concat(50+i/12.8*100,"%"),t.style.top="".concat(50-o/12.8*100,"%")})}(a,i)}if(void 0!==e.size){let t=Math.max(24,Math.min(256,e.size));a.style.width="".concat(t,"px"),a.style.height="".concat(t,"px"),a.dataset.zoom=o(t)}if(void 0!==e.selected&&(a.dataset.selected=String(e.selected)),void 0!==e.chip){let t=a.querySelector(".w-vehicle-marker__chip");e.chip?t?t.textContent=e.chip:a.insertAdjacentHTML("beforeend",'<span class="w-vehicle-marker__chip w-float" data-glass="map">'.concat(c(e.chip),"</span>")):null==t||t.remove()}}function h(t,e){d(t,{heading:e})}function f(t){let{label:e="Vehicle",heading:n,...l}=t,r=u(l);return(0,a.jsx)("span",{ref:t=>{t&&d(t,{heading:null!=n?n:0})},role:"img","aria-label":e,className:"w-vehicle-marker-host",dangerouslySetInnerHTML:{__html:r}})}n(82171),l.L5.columns,l.L5.headings,l.L5.columns},33984:(t,e,n)=>{"use strict";n.d(e,{MK:()=>c,cf:()=>d,ns:()=>s,yI:()=>u});var a=n(95155),l=n(12115),r=n(90888),i=n(30199),o=n(89607);function s(t){let{object:e,size:n=160,view:l="pitch",className:o,bodyColour:s,lidColour:u,fill:c=!1}=t,d="/media/objects/".concat(e,"-").concat(l);return r.T[e].layers?(0,a.jsx)(i.je,{fill:c,path:d,body:null!=s?s:e.startsWith("bin-")?"#454b50":"#f1f2f0",lid:null!=u?u:"#16a34a",size:n,className:"drop-shadow-sm ".concat(null!=o?o:""),maxDensity:4}):(0,a.jsx)("img",{src:"".concat(d,"@1x.webp"),srcSet:"".concat(d,"@1x.webp 1x, ").concat(d,"@2x.webp 2x, ").concat(d,"@3x.webp 3x, ").concat(d,"@4x.webp 4x"),width:n,height:n,alt:"",loading:"lazy",decoding:"async",className:"drop-shadow-sm ".concat(null!=o?o:"shrink-0 object-contain")})}function u(t){let{kind:e,litres:n,className:l}=t;return(0,a.jsx)(d,{glyph:(0,o.Gg)(e,n),className:l})}function c(t){let{kind:e,load:n,size:r=24}=t,i=(0,l.useId)(),s="garbage"===e||"reloader"===e||"front_loader"===e||"tanker"===e,u=Number.isFinite(null==n?void 0:n.share)?Math.min(1,Math.max(0,n.share)):0,c=Number.isFinite(null==n?void 0:n.emptyCount)?Math.min(10,Math.max(0,Math.floor(n.emptyCount))):0;return(0,a.jsxs)("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true","data-slot":"load.glyph",children:[s&&u>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:i,children:(0,a.jsx)("path",{d:"tanker"===e?"M14 6h4a4 4 0 0 1 0 8h-4a4 4 0 0 1 0-8Z":"reloader"===e?"M10 6h11v12H10Z":"front_loader"===e?"M10 7h12v11H10Z":"M10 6h9l3 4-1 8H10Z"})})}),(0,a.jsx)("path",{d:"M10 ".concat(("tanker"===e?14:18)-("tanker"===e?8:12)*u,"h12V18H10Z"),fill:"var(--app-accent-pink)",stroke:"none",clipPath:"url(#".concat(i,")")})]}):null,!s&&c>0?Array.from({length:c},(t,e)=>(0,a.jsx)("path",{d:"M12 ".concat(13-.65*e,"h9l-2 3h-5Z"),stroke:"var(--app-accent-pink)",strokeWidth:".75"},e)):null,(0,a.jsx)("path",{d:o.lT[(0,o.yN)(e)]})]})}function d(t){let{glyph:e,className:n}=t;return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",className:null!=n?n:"h-5 w-5 shrink-0",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true","data-slot":"waste.glyph","data-glyph":e,children:[(0,a.jsx)("path",{d:o.lT[e]}),o.U7[e]?(0,a.jsx)("path",{d:o.U7[e],stroke:"var(--app-accent-pink)"}):null]})}},42345:(t,e,n)=>{"use strict";n.d(e,{InAppNavigate:()=>k,NavigationHost:()=>N,QL:()=>x,RF:()=>v,TM:()=>S,mk:()=>m,vc:()=>y,vi:()=>f,zH:()=>p});var a=n(95155),l=n(12115),r=n(47650),i=n(90920),o=n(63578);let s=null,u=0,c=new Set,d=()=>{for(let t of c)t()},h=t=>(c.add(t),()=>{c.delete(t)});function f(t){u+=1,M(t)}function p(){M(null)}function M(t){var e,n;s=t,window.__waisteThemeDrive=!!t,t||null==(e=(n=window).__waisteTheme)||e.call(n),d()}function m(){return(0,l.useSyncExternalStore)(h,()=>s,()=>null)}let g=null;function v(t){g!==t&&(g=t,d())}function x(){return(0,l.useSyncExternalStore)(h,()=>g,()=>null)}let b=(0,l.lazy)(()=>Promise.all([n.e(6212),n.e(122),n.e(6128),n.e(5043),n.e(468),n.e(3188),n.e(8301),n.e(7553),n.e(3691),n.e(8023),n.e(7174),n.e(2932),n.e(5444),n.e(3496),n.e(2
1152),n.e(1497),n.e(3897),n.e(7849)]).then(n.bind(n,21497)).then(t=>({default:t.WaisteNavigation}))),w=0;function y(){return w+=1,d(),()=>{w-=1,d()}}function k(t){let{lat:e,lng:n,jobId:l,label:r,address:s}=t;return(0,a.jsxs)(o.WButton,{variant:"row",className:"ad-row min-h-14 w-full justify-start","data-slot":"driver.stop.card",onClick:()=>f({preview:!0,lat:e,lng:n,jobId:l,label:r,stop:{address:null!=s?s:r}}),children:[(0,a.jsx)("span",{className:"ad-ic","aria-hidden":"true",children:(0,a.jsx)(i.jq,{name:"navigation",size:24})}),(0,a.jsx)("span",{className:"ad-lab ad-link leading-[56px]",children:"Tap to navigate"})]})}function S(t){return(0,a.jsx)(l.Suspense,{fallback:null,children:(0,a.jsx)(b,{onClose:p,...t},u)})}function N(){let t=m(),e=(0,l.useSyncExternalStore)(h,()=>w>0,()=>!1);return!t||e||"undefined"==typeof document?null:(0,r.createPortal)((0,a.jsx)(S,{target:t}),document.body)}},65243:(t,e,n)=>{"use strict";n.d(e,{$0:()=>M,$X:()=>B,A:()=>i,EE:()=>b,EV:()=>L,Ee:()=>H,F$:()=>w,F6:()=>s,GN:()=>R,HL:()=>j,Iz:()=>S,JN:()=>c,No:()=>z,Qy:()=>d,RB:()=>f,Rw:()=>p,Sm:()=>W,Tq:()=>G,Wh:()=>I,XG:()=>A,Yk:()=>U,ZY:()=>T,_k:()=>h,h2:()=>_,hG:()=>m,lZ:()=>x,oc:()=>o,pg:()=>k,sW:()=>q,tH:()=>g,uS:()=>C,wL:()=>v,yF:()=>Z,zd:()=>y});var a=n(68954),l=n(9078),r=n(77346);let i={offRouteM:40,goodGpsM:10,maxGpsM:100,junctionM:50,junctionSlackM:20,offFixes:2,offMs:3e3,turnOffDeg:60,wrongWayDeg:120,wrongWayKph:10,crawlKph:10,missedM:20,aheadM:15,settleFixes:2,rerouteGapMs:3e3,driftM:35,stillKph:3,prefetchM:150,missedAheadM:40,lostMs:1e4,pausedMs:3e4,weakGpsM:30};function o(t,e){return e||t<0?{leftS:5,go:!1}:{leftS:Math.ceil(Math.max(0,5e3-t)/1e3),go:t>=5e3}}function s(t,e){return e>=i.lostMs?"GPS paused":null!=t&&t>i.weakGpsM?"GPS weak":null}let u=t=>t*Math.PI/180;function c(t,e){return(180*Math.atan2(Math.sin(u(e.lng-t.lng))*Math.cos(u(e.lat)),Math.cos(u(t.lat))*Math.sin(u(e.lat))-Math.sin(u(t.lat))*Math.cos(u(e.lat))*Math.cos(u(e.lng-t.lng)))/Math.PI+360)%360}function d(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,{pts:l,cum:r}=t;if(l.length<2)return{seg:0,along:0,offsetM:l[0]?(0,a.U)(e,l[0]):1/0,...e,bearing:0};let i={seg:0,t:0,off:1/0};for(let t=Math.max(0,Math.min(n,l.length-2));t<l.length-1;t++){let n=function(t,e,n){let a=6371008.8*Math.cos(u(t.lat)),l=u(e.lng-t.lng)*a,r=6371008.8*u(e.lat-t.lat),i=u(n.lng-t.lng)*a-l,o=6371008.8*u(n.lat-t.lat)-r,s=i*i+o*o,c=s>0?Math.max(0,Math.min(1,-(l*i+r*o)/s)):0;return{t:c,offsetM:Math.hypot(l+c*i,r+c*o)}}(e,l[t],l[t+1]);n.offsetM<i.off&&(i={seg:t,t:n.t,off:n.offsetM})}let o=l[i.seg],s=l[i.seg+1];return{seg:i.seg,along:r[i.seg]+i.t*(r[i.seg+1]-r[i.seg]),offsetM:i.off,lat:o.lat+(s.lat-o.lat)*i.t,lng:o.lng+(s.lng-o.lng)*i.t,bearing:c(o,s)}}function h(t){var e,n;let l=(0,r.l$)(t.polyline,5).map(t=>{let[e,n]=t;return{lat:e,lng:n}}),i=[0];for(let t=1;t<l.length;t++)i.push(i[t-1]+(0,a.U)(l[t-1],l[t]));let o={pts:l,cum:i,total:null!=(e=i[i.length-1])?e:0},s=[],u=0;for(let e of t.steps){let t=d(o,e.at,u);u=t.seg,s.push(Math.max(null!=(n=s[s.length-1])?n:0,t.along))}return{...o,stepAlong:s}}function f(t,e){let n=Math.max(1,Math.floor(t.pts.length/40)),a=null,l=-1;for(let r=0;r<t.pts.length;r+=n){let n=d(e,t.pts[r]).offsetM;n>l&&(l=n,a=t.pts[r])}return l>=30?a:null}function p(t,e){let n=Math.round((t-e)/60);return 0===n?"Same time":"".concat(Math.abs(n)," min ").concat(n>0?"slower":"faster")}function M(t,e){let n=t.map(t=>{var e;let n=new Map;for(let a of t.steps)a.name&&"arrive"!==a.type&&n.set(a.name,(null!=(e=n.get(a.name))?e:0)+a.metres);return n}),a=new Set;return n.map((t,l)=>{var r,i;let o=l===e?n.filter((t,e)=>
1e!==l):n.filter((t,n)=>n===e),s=[...t].filter(t=>{let[e]=t;return!a.has(e)&&o.every(t=>!t.has(e))}),u=null!=(r=s.find(t=>{let[,e]=t;return e>=400}))?r:[...s].sort((t,e)=>e[1]-t[1])[0];return u&&a.add(u[0]),null!=(i=null==u?void 0:u[0])?i:null})}function m(t,e,n){var a,l,r,i,o;let s=t.steps.length-1,u=s;for(let t=1;t<=s;t++)if(e.stepAlong[t]>n+3){u=t;break}let c=Math.max(0,(null!=(l=e.stepAlong[u])?l:e.total)-n),d=Math.max(0,u-1),h=(null!=(r=e.stepAlong[u])?r:e.total)-(null!=(i=e.stepAlong[d])?i:0),f=t.steps.slice(u).reduce((t,e)=>t+e.seconds,0),p=(h>0?c/h*(null!=(o=null==(a=t.steps[d])?void 0:a.seconds)?o:0):0)+f;return{next:u,toNextM:c,remainingM:Math.max(0,e.total-n),remainingS:Math.max(0,p)}}let g={off:0,offSince:null,turn:0,uturn:0,ahead:0,settle:0,lastMs:null},v=t=>({...g,settle:i.settleFixes,lastMs:t.lastMs});function x(t,e){let n=Math.abs((t-e)%360+360)%360;return n>180?360-n:n}function b(t,e){return i.offRouteM+Math.max(0,Math.min(null!=t?t:0,i.maxGpsM)-i.goodGpsM)+(e?i.junctionSlackM:0)}function w(t,e){return t.some(t=>(0,a.U)(e,t.at)<=i.junctionM)}function y(t,e,n){var a,l,r;let o={...g,settle:Math.max(0,t.settle-1),lastMs:t.lastMs};if(t.settle>0)return{state:o,offRoute:null};let s=null!=(a=e.speedKph)?a:null;if(null!=s&&s<i.crawlKph)return{state:o,offRoute:null};let u=null!=(l=e.accuracyM)?l:0;if(u>i.maxGpsM)return{state:t,offRoute:null};let c=e.offsetM>=i.missedM+Math.max(0,u-i.goodGpsM),d=null!=e.headingDeg&&(null!=s?s:0)>i.wrongWayKph?x(e.headingDeg,n.bearing):0,h=c&&null!=n.aheadOffsetM&&n.aheadOffsetM<=i.aheadM&&n.aheadOffsetM<e.offsetM,f=e.offsetM>b(u,n.nearJunction),p={off:f?t.off+1:0,offSince:f?null!=(r=t.offSince)?r:e.atMs:null,turn:c&&d>i.turnOffDeg?t.turn+1:0,uturn:d>i.wrongWayDeg?t.uturn+1:0,ahead:h?t.ahead+1:0,settle:0,lastMs:t.lastMs},M=i.offFixes,m=p.uturn>=M?"u-turn":p.ahead>=M?"missed":p.turn>=M?"wrong-turn":p.off>=M||null!=p.offSince&&e.atMs-p.offSince>=i.offMs?"off":null;return!m||null!=t.lastMs&&e.atMs-t.lastMs<i.rerouteGapMs?{state:p,offRoute:null}:{state:{...g,settle:i.settleFixes,lastMs:e.atMs},offRoute:m}}function k(t,e){let n=t.stepAlong[e];if(null==n||n<=0)return null;let a=N(t,Math.max(0,n-i.missedAheadM)),r=N(t,n),o=c(a,r);return{at:(0,l.sd)(r,i.missedAheadM,o),bearing:o,corner:r}}function S(t,e){let n=h(e),l=n.pts[0]?(0,a.U)(t,n.pts[0]):0;return{pts:[t,...n.pts],cum:[0,...n.cum.map(t=>t+l)]}}function N(t,e){var n;let{pts:a,cum:l}=t;if(a.length<2)return null!=(n=a[0])?n:{lat:0,lng:0};let r=Math.max(0,Math.min(t.total,e)),i=0;for(;i<a.length-2&&l[i+1]<r;)i++;let o=l[i+1]-l[i],s=o>0?(r-l[i])/o:0;return{lat:a[i].lat+(a[i+1].lat-a[i].lat)*s,lng:a[i].lng+(a[i+1].lng-a[i].lng)*s}}let j={nearM:50,minAheadM:2e3,aheadS:180,passedM:100,staleMs:9e4,amberM:300};function A(t,e,n){return t.map(t=>{let a=d(e,t);return{id:t.id,aheadM:a.along-n,offM:a.offsetM}}).filter(t=>t.offM<=j.nearM&&t.aheadM>=-j.passedM).sort((t,e)=>t.aheadM-e.aheadM).map(t=>{let{id:e,aheadM:n}=t;return{id:e,aheadM:n}})}function z(t,e){return t>=-j.passedM&&t<=Math.max(j.minAheadM,Math.max(0,null!=e?e:0)/3.6*j.aheadS)}let F={windowMs:6e4,closedM:200,zoneM:30};function Z(t,e,n,l){var r;let i=t[t.length-1];if(!i||0===n.length)return null;let o=n.find(t=>(0,a.U)(i,t)<=F.zoneM);if(o)return o;let s=t.find(t=>l-t.atMs<=F.windowMs);if(!s||i.atMs-s.atMs<.8*F.windowMs||(0,a.U)(i,e)<=(0,a.U)(s,e))return null;let u=null;for(let t of n){let e=(0,a.U)(s,t)-(0,a.U)(i,t);e>=F.closedM&&(!u||e>u.closed)&&(u={stop:t,closed:e})}return null!=(r=null==u?void 0:u.stop)?r:null}function L(t){var e;if("arrive"===t.type)return"arrive";if("roundabout"===t.type||"rotary"===t.type)return"roundabout";if("merge"===t.type)return"merge";let n=null!=(e=t.modifier)?e:"straight";return"fork"===t.type&&"straight"!==n&&"uturn"!==n?n.includes("left")?"keep-left":"keep-right":"uturn"===n||"straight"===n?n:"none"===n?"straight":n.replace(" ","-")}let P=["","1st","2nd","3rd","4th","5th","6th","7th"];function I(t){var e,n;let a=t.name?" onto ".concat(t.name):"",l=null!=(e=t.modifier)?e:"straight";switch(t.type){case"arrive":return"Arrive at the stop";case"depart":return t.name?"Head off on ".concat(t.name):"Head off";case"roundabout":case"rotary":return t.exit?"Take the ".concat(null!=(n=P[t.exit])?n:"".concat(t.exit,"th")," exit").
1concat(a):"Go through the roundabout".concat(a);case"merge":return"Merge".concat(a);case"on ramp":return"Take the ramp".concat(a);case"off ramp":return"Take the exit".concat(a);case"fork":return"Keep ".concat(l.includes("left")?"left":"right").concat(a)}if("uturn"===l)return"Make a U-turn";if("straight"===l)return"Continue".concat(a);let[r,i]=l.includes(" ")?l.split(" "):["",l];return"".concat("slight"===r?"Bear":"sharp"===r?"Sharp":"Turn"," ").concat(i).concat(a)}function _(t){let e=t>200?50:10,n=Math.max(e,Math.round(t/e)*e);return n>=1e3?"".concat((t/1e3).toFixed(t>=1e4?0:1)," km"):"".concat(n," m")}let D={thenWithinM:400,voiceFarM:400,voiceNearM:60,refollowMs:8e3};function C(t,e,n){var a,l;let r=n.next+1;return r>t.steps.length-1?null:(null!=(a=e.stepAlong[r])?a:e.total)-(null!=(l=e.stepAlong[n.next])?l:0)<=D.thenWithinM?r:null}function T(t,e,n){var a,l;let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600,i=(null!=(a=e.stepAlong[n.next])?a:e.total)-n.toNextM;for(let a=n.next+1;a<t.steps.length&&!((null!=(l=e.stepAlong[a])?l:e.total)-i>r);a++)if("uturn"===t.steps[a].modifier)return a;return null}function W(t,e,n){let a=t&&t.step===e?t:{step:e,far:n<=D.voiceFarM,near:!1};return!a.near&&n<=D.voiceNearM?{say:"near",state:a={...a,far:!0,near:!0}}:!a.far&&n<=D.voiceFarM?{say:"far",state:a={...a,far:!0}}:{say:null,state:a}}function R(t,e){let n=I(t);return"near"===e||"arrive"===t.type?n:"In ".concat(D.voiceFarM," metres, ").concat(n.charAt(0).toLowerCase()).concat(n.slice(1))}function U(t,e){return"gesture"===e.kind?{following:!1,movedAtMs:e.atMs}:"recentre"===e.kind||!t.following&&null!=t.movedAtMs&&e.atMs-t.movedAtMs>=D.refollowMs?{following:!0,movedAtMs:null}:t}function H(t,e){if(!e)return null;let n=/^(\d{1,2}):(\d{2})$/.exec(e);if(!n)return null;let a=Math.round(t-(60*Number(n[1])+Number(n[2])));return a<=0?{words:"window closes "+e,late:!1}:{words:a+" min late",late:!0}}function G(t,e,n){let a=t=>{let e=/^(\d{1,2}):(\d{2})$/.exec(null!=t?t:"");return e?60*Number(e[1])+Number(e[2]):null},l=a(e),r=a(n);return null!=l&&t<=l-5?{kind:"early",at:l}:null!=r&&t>r?{kind:"late",at:r}:null}function q(t,e,n){let a=t=>{let e=/^(\d{1,2}):(\d{2})$/.exec(null!=t?t:"");return e?60*Number(e[1])+Number(e[2]):null},l=a(e),r=a(n);return(null!=l||null!=r)&&(null==l||t>=l)&&(null==r||t<=r)}function B(t){return"number"!=typeof t||!Number.isFinite(t)||t<3?null:String(Math.round(t))}},68954:(t,e,n)=>{"use strict";function a(t,e){let n=(e.lat-t.lat)*Math.PI/180,a=(e.lng-t.lng)*Math.PI/180;return Math.min(1,Math.sqrt(Math.sin(n/2)**2+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*Math.sin(a/2)**2))}function l(t,e){return 12742*Math.asin(a(t,e))}function r(t,e){return 12742e3*Math.asin(a(t,e))}n.d(e,{U:()=>r,k:()=>l})},70759:(t,e,n)=>{"use strict";n.r(e),n.d(e,{DriveScreen:()=>p});var a=n(95155),l=n(12115),r=n(24101),i=n(78023),o=n(70479),s=n(69619),u=n(21497),c=n(63578),d=n(5750),h=n(58903),f=n(8421);function p(t){let{state:e,data:n,staticCamera:p}=t,M=(0,h.Xh)(n),m="error"===n||"offline"===n,g="loading"===n,v="suggestion"===e&&null!=M,[x,b]=(0,l.useState)(v?2:1);if((0,f.d4)("".concat(e,":").concat(n),()=>g?null!=document.querySelector("[data-slot='map.skeleton'][data-shown='true']"):m?null!=document.querySelector("[data-slot='studio.fault']"):v&&null!=document.querySelector("[data-slot='navigation.callout']")||null!=document.querySelector("[data-slot='navigation.speed']")),g)return(0,a.jsx)(f.z5,{label:"Loading the drive"});if(m||!M)return(0,a.jsx)(f.PH,{profile:"empty"===n?"error":n});let w=v?[{key:"callout",lat:M.lat,lng:M.lng,html:'<div class="nav-callout" data-slot="navigation.callout"><span><b>'.concat((0,d.ZD)(M.name),"</b><small>").concat((0,d.ZD)("".concat(M.task," \xb7 ").concat(M.detour)),'</small></span><span class="nav-callout__add">Add</span></div>'),anchor:[90,64],zIndex:6}]:[];return(0,a.jsx)(s.cD,{children:(0,a.jsx)("div",{className:f.t6.stage,"data-studio-screen":"drive","data-studio-state":e,children:(0,a.jsx)(r.fM,{id:"studio-drive",mode:"sheet",slot:"studio.drive",capsule:(0,a.jsx)(o.WAppBar,{navTitle:"Drive",seat:!1}),map:(0,a.jsx)(i.WMap,{fit:{center:{lat:M.lat,lng:M.lng},zoom:15},muted:!0,wideRoads:!0,interactive:!p,scrollZoom:!p,markers:w,ariaLabel:"Drive map"}),sheet:{stage:x,onStage:b,label:"Driving",slot:"navigation.sheet",head:(0,a.jsx)(u.NavigationStreetBar,{speed:M.speed,road:M.road,numbers:null}),body:(0,a.jsx)(c.WListRow,{title:M.name,subtitle:"".concat(M.task," \xb7 ").concat(M.detour),slot:"studio.drive.stop"})}})})})}},77346:(t,e,n)=>{"use strict";function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"!=typeof t||0===t.length)return[];let n=Math.pow(10,e),a=[],l=0,r=0,i=0;for(;l<t.length;){let e,o=1,s=0;do{if(Number.isNaN(e=t.charCodeAt(l++)-63-1))return a;o+=e<<s,s+=5}while(e>=31);r+=1&o?~(o>>1):o>>1,o=1,s=0;do{if(Number.isNaN(e=t.charCodeAt(l++)-63-1))return a;o+=e<<s,s+=5}while(e>=31);i+=1&o?~(o>>1):o>>1,a.push([r/n,i/n])}return a}function l(t,e){let n=t<0?~(t<<1):t<<1;for(;n>=32;)e.push(String.fromCharCode((32|31&n)+63)),n>>=5;e.push(String.fromCharCode(n+63))}function r(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=Math.pow(10,e),a=[],r=0,i=0;for(let[e,o]of t){let t=Math.round(e*n),s=Math.round(o*n);l(t-r,a),l(s-i,a),r=t,i=s}return a.join("")}function i(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e-5;if(t.length<=2)return t;let n=Array(t.length).fill(!1);n[0]=!0,n[t.length-1]=!0;let a=[[0,t.length-1]];for(;a.length;){let[l,r]=a.pop(),i=0,o=-1,[s,u]=t[l],[c,d]=t[r];for(let e=l+1;e<r;e++){let n,[a,l]=t[e],r=c-s,h=d-u,f=r*r+h*h;if(0===f)n=Math.hypot(a-s,l-u);else{let t=Math.max(0,Math.min(1,((a-s)*r+(l-u)*h)/f));n=Math.hypot(a-(s+t*r),l-(u+t*h))}n>i&&(i=n,o=e)}-1!==o&&i>e&&(n[o]=!0,a.push([l,o],[o,r]))}return t.filter((t,e)=>n[e])}n.d(e,{Bt:()=>r,l$:()=>a,zl:()=>i})},78160:(t,e,n)=>{"use strict";n.d(e,{s:()=>s});var a=n(95155),l=n(46059),r=n(63578),i=n(70030),o=n.n(i);function s(t){let{variant:e="primary",size:n="md",tone:i,appearance:s="chunky",className:u="",onClick:c,...d}=t,h=null!=i?i:"secondary"===e?"white":"green",f="green"===h||"black"===h?"primary":"secondary",p=c&&"secondary"===f?t=>{(0,l.g)("confirm"),c(t)}:c;return(0,a.jsx)(r.WButton,{...d,onClick:p,variant:f,size:n,"data-moment-button":e,"data-moment-tone":h,"data-moment-appearance":s,className:"".concat(o().button," ").concat("sm"===n?o().small:""," ").concat(u)})}},82171:()=>{},87722:(t,e,n)=>{"use strict";n.d(e,{AZ:()=>a.AZ,Ub:()=>a.Ub,iK:()=>a.iK});var a=n(36652)},90888:t=>{"use strict";
1t.exports=JSON.parse('{"T":{"bin-80":{"views":["pitch","side"],"layers":true,"lid":true},"bin-120":{"views":["pitch","side"],"layers":true,"lid":true},"bin-140":{"views":["pitch","side"],"layers":true,"lid":true},"bin-240":{"views":["pitch","side"],"layers":true,"lid":true},"bin-360":{"views":["pitch","side"],"layers":true,"lid":true},"bin-660":{"views":["pitch","side"],"layers":true,"lid":true},"bin-1100":{"views":["pitch","side"],"layers":true,"lid":true},"crate-bin":{"views":["pitch","side"],"layers":true,"lid":true},"depot":{"views":["pitch","side"],"layers":false,"lid":false},"front-lift-bin":{"views":["pitch","side"],"layers":true,"lid":true},"hook-bin":{"views":["pitch","side"],"layers":true,"lid":true},"skip-bin":{"views":["pitch","side"],"layers":true,"lid":true},"tip":{"views":["pitch","side"],"layers":false,"lid":false},"trailer-bin":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-2m3-single":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-2m3-single-tipper":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-2m3-tandem":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-2m3-tandem-tipper":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-3m3-single":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-3m3-single-tipper":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-3m3-tandem":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-3m3-tandem-tipper":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-4m3-single":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-4m3-single-tipper":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-4m3-tandem":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-4m3-tandem-tipper":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-6m3-single":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-6m3-single-tipper":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-6m3-tandem":{"views":["pitch","side"],"layers":true,"lid":true},"trailer-bin-6m3-tandem-tipper":{"views":["pitch","side"],"layers":true,"lid":true}}}')}}]);
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.