PageSourceSearch

https://road.travel/rt/_next/static/chunks/1428-7b4bae94a1b622c8.js

js road.travel collected 2026-10-09 18:15:21 UTC 13,655 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1428],{9516:function(e,t,n){n.d(t,{P:function(){return i},e:function(){return o}});var r=n(99021);let i=n(7653).createContext({}),o=e=>(0,r.tZ)(i.Provider,{value:{snapPoints:e.snapPoints,currentSnapPointIndex:e.currentSnapPointIndex,isMinSnapPoint:!!e.snapPoints.length&&e.snapPoints.length-e.currentSnapPointIndex==1},children:e.children})},6651:function(e,t,n){n.d(t,{R:function(){return y}});var r=n(99021),i=n(7653),o=n(18433),a=n(66744),l=n(72389),s=n(485),u=n(86136),c=n(8998),d=n(71498),p=n(93796),h=n(37861),f=n(57210),g=n(9516);let v=(e,t,n,r)=>{let s=(0,i.useRef)(null),c=(0,u.R)({"aria-label":e},s),d=(0,o.I)({onClose:t,isOpen:!n,isDismissable:!n},s);return(0,a.dd)({isDisabled:n}),(0,l.t)({isDisabled:n||r}),{ref:s,...d.overlayProps,...c.dialogProps}},m=(0,d.Z)(f.z,{target:"e10n2nw20"})("position:absolute;right:20px;top:10px;z-index:2;background:none !important;"),w=e=>{var t,n,i,o;let a=v(e.label,e.onClose,e.alwaysOpen,e.disablePreventScroll),l=null!==(i=null===(n=e.innerRef)||void 0===n?void 0:null===(t=n.current)||void 0===t?void 0:t.y)&&void 0!==i?i:0;return(0,r.tZ)(r.HY,{children:(0,r.BX)(c.y.Container,{...a,children:[!e.suppressCloseIcon&&(0,r.tZ)(m,{kind:"ghost",color:"basic",size:"sm",icon:p.Z,iconProps:{suppressHide:!0,size:"14px"},onClick:e.onCloseIcon?e.onCloseIcon:e.onClose,title:h.ag._({id:"yz7wBu"})}),(0,r.tZ)(c.y.Header,{}),(0,r.tZ)(c.y.Content,{disableDrag:null===(o=e.disableContentDrag)||void 0===o||o,style:{paddingBottom:l},children:(0,r.tZ)(c.y.Scroller,{children:e.children})})]})})},y=e=>{let{label:t,children:n,onClose:o,onCloseIcon:a,alwaysOpen:l,innerRef:u,onSnap:d,snapPoints:p,disablePreventScroll:h,disableContentDrag:f,isOpen:v,showBackdrop:m,initialSnap:y,suppressCloseIcon:b,...C}=e,[S,P]=(0,i.useState)(y||0),L=(0,i.useCallback)(e=>{null==d||d(e),P(e)},[d,P]);return(0,r.tZ)(c.y,{...C,snapPoints:p,initialSnap:y,onSnap:L,isOpen:v,onClose:o,ref:u,style:{zIndex:100},children:(0,r.BX)(s.MT,{contain:!l,autoFocus:!l,restoreFocus:!l,children:[(0,r.tZ)(w,{label:t,onClose:o,onCloseIcon:a,alwaysOpen:l,innerRef:u,snapPoints:p,initialSnap:y,suppressCloseIcon:b,disablePreventScroll:h,disableContentDrag:f,children:(0,r.tZ)(g.e,{snapPoints:p,currentSnapPointIndex:S,children:n})}),m&&(0,r.tZ)(c.y.Backdrop,{onTap:o})]})})}},38684:function(e,t,n){n.d(t,{pA:function(){return d},jQ:function(){return v},Ld:function(){return m},xt:function(){return w},Zc:function(){return b},F2:function(){return C}});var r=n(60767),i=n(73446),o=n(51133),a=n(20323),l=n(68571);function s(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.env;return(null==(e=t.NEXT_PUBLIC_MAP_API_BASE_URL)?void 0:e.trim().replace(/\/+$/,""))||"/rest-api/map"}let u=e=>{let t=new URLSearchParams;return e.lang&&t.set("lang",e.lang),e.query&&t.set("q",e.query),e.placeId&&t.set("placeId",e.placeId),e.bounds&&!e.placeId&&t.set("bounds",a.k.fromRdt(e.bounds).serialize()),e.types.length&&t.set("types",(0,o.mw)(e.types)||""),e.tripCategories.length&&t.set("tripCategories",(0,o.mw)(e.tripCategories)||""),e.spotCategories.length&&t.set("spotCategories",(0,o.mw)(e.spotCategories)||""),e.durations.length&&t.set("durations",(0,o.mw)(e.durations)||""),e.includeMyTrips&&t.set("includeMyTrips","1"),e.limit&&t.set("limit",String(e.limit)),e.cursor&&t.set("cursor",e.cursor),"number"==typeof e.zoom&&t.set("zoom",String(e.zoom)),t.toString()},c=e=>{let{q:t,limit:n=6}=e,r=new URLSearchParams;return r.set("q",t),r.set("limit",String(n)),"/suggestions?".concat(r.toString())};async function d(e){let{q:t,limit:n=6,signal:r}=e,i=await fetch("".concat(s()).concat(c({q:t,limit:n})),{headers:{accept:"application/json"},signal:r});if(!i.ok)throw Error("Map suggestions request failed with ".concat(i.status));let o=await i.json();return Array.isArray(o)?o:[]}let p=(0,r.ni)({baseUrl:s()}),h=new Map,f=new Map,g=async(e,t,n)=>{var r;let i="string"==typeof e?"GET ".concat(e):"GET"!==((null===(r=e.method)||void 0===r?void 0:r.toUpperCase())||"GET")||e.body||e.headers?null:"GET ".concat(e.url);if(!i)return p(e,t,n);let o=f.get(i);if(o&&o.expiresAt>Date.now())return o.result;o&&f.delete(i);let a=h.get(i);if(a)return a;
1let l=Promise.resolve(p(e,t,n));h.set(i,l);try{let e=await l;return"data"in e&&(f.set(i,{expiresAt:Date.now()+1500,result:e}),function(){if(f.size<=100)return;let e=Date.now();for(let[t,n]of f)if((n.expiresAt<=e||f.size>100)&&f.delete(t),f.size<=100)break}()),e}finally{h.get(i)===l&&h.delete(i)}},v=(0,i.LC)({reducerPath:"mapSearchApi",baseQuery:g,endpoints:e=>({surface:e.query({query:e=>"/surface?".concat(u(e))}),search:e.query({query:e=>"/search?".concat(u(e))}),viewport:e.query({query:e=>"/viewport?".concat(u(e))}),suggestions:e.query({query:c}),item:e.query({query:e=>{let{type:t,id:n,lang:r}=e;return"/items/".concat(t,"/").concat(encodeURIComponent(n),"?lang=").concat(r)}}),readPlaneHealth:e.query({query:()=>"/read-plane-health"})})}),{useItemQuery:m,useReadPlaneHealthQuery:w,useSearchQuery:y,useSuggestionsQuery:b,useSurfaceQuery:C,useViewportQuery:S}=v},55489:function(e,t,n){n.d(t,{H:function(){return s}});var r=n(99021),i=n(7653),o=n(28114),a=n(6139),l=n(85380);let s=i.memo(function(e){var t;let n=(0,a.Sx)(),s=e.imageSrc?(0,l.c)(e.imageSrc,{width:160,height:160}):null,[c,d]=(0,i.useState)(null),p=s&&s!==c?s:null,h=!!p,[f,g]=(0,i.useState)(null);(0,i.useEffect)(()=>{d(null)},[s]),(0,i.useEffect)(()=>{if(!p||!function(e){if(/^(?:data|blob):/i.test(e))return!0;try{return new URL(e,window.location.href).origin===window.location.origin}catch(e){return!1}}(p)){g(null);return}let e=!1;return g(null),new Promise((e,t)=>{let n=new Image;n.onload=()=>{try{let r=document.createElement("canvas");r.width=96,r.height=96;let i=r.getContext("2d");if(!i){t(Error("Canvas context is unavailable"));return}i.save(),u(i,4,4,88,88,14),i.clip(),function(e,t,n,r,i,o){let a=t.naturalWidth/t.naturalHeight,l=a>1?1*t.naturalHeight:t.naturalWidth,s=a>1?t.naturalHeight:t.naturalWidth/1,u=(t.naturalWidth-l)/2,c=(t.naturalHeight-s)/2;e.drawImage(t,u,c,l,s,4,4,88,88)}(i,n,0,0,88,88),i.restore(),i.strokeStyle="#fff",i.lineWidth=4,u(i,2,2,92,92,16),i.stroke(),e(r.toDataURL("image/png"))}catch(e){t(e)}},n.onerror=()=>t(Error("Marker image failed to load")),n.src=p}).then(t=>{e||g(t)}).catch(()=>{e||g(null)}),()=>{e=!0}},[p]);let v=(0,o.S)(e=>{var t;return h?(t=e)<=0?10:t<7?20:t<8||t<9?30:t<10.5?40:t<15.5?60:80:e<=0?10:e<7?20:30},40);if(!n||e.hidden)return(0,r.tZ)(r.HY,{});let m=Math.max(18,Math.round(v)),w=h||"string"!=typeof e.badge&&"number"!=typeof e.badge?void 0:String(e.badge).slice(0,3),y=h&&("string"==typeof e.badge||"number"==typeof e.badge)?String(e.badge).slice(0,3):void 0,b=w||y,C=h?f||p:function(e,t){let n='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><circle cx="24" cy="24" r="18" fill="'.concat(e,'" stroke="#fff" stroke-width="').concat(t?5:3,'"/><circle cx="24" cy="24" r="7" fill="#fff" fill-opacity="0.92"/></svg>');return"data:image/svg+xml;charset=UTF-8,".concat(encodeURIComponent(n))}(e.color||"#2563eb",e.highlighted),S=Math.max(10,Math.round(m/3));return(0,r.tZ)(a._Q,{title:e.title,"aria-label":e.title,zIndex:e.highlighted?9999:null!==(t=e.zIndex)&&void 0!==t?t:1,position:e.coordinates,onClick:e.onClick,children:(0,r.BX)("span",{style:{alignItems:"center",display:"inline-flex",height:m,justifyContent:"center",position:"relative",width:m},children:[(0,r.tZ)("img",{alt:"","aria-hidden":"true",onError:h?()=>{var t;p&&(d(p),g(null),null===(t=e.onImageError)||void 0===t||t.call(e))}:void 0,src:C,style:{display:"block",height:m,width:m}}),b?(0,r.tZ)("span",{"aria-hidden":"true",style:{color:"#ffffff",fontSize:S,fontWeight:700,lineHeight:1,position:"absolute"},children:b}):null]})})});function u(e,t,n,r,i,o){e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()}},28114:function(e,t,n){n.d(t,{S:function(){return o}});var r=n(7653),i=n(6139);function o(e,t){let n=(0,i.Sx)(),[o,a]=(0,r.useState)(t);return(0,r.useEffect)(()=>{if(!n){a(t);return}let r=()=>{let t=e(n.getZoom());o!=t&&a(t)};r();let i=n.addListener("zoom_changed",()=>{r()});return()=>i.remove()},[n,o]),o}},95584:function(e,t,n){n.d(t,{Z:function(){return d}});var r,i,o=n(7653),a=n(60069),l=n(84427),s=n(18295);(r=i||(i={})).notSupported="notSupported",r.permissionDenied="permissionDenied",r.positionUnavailable="positionUnavailable",r.timeout="timeout";let u={1:"permissionDenied",2:"positionUnavailable",3:"timeout"},c={notSupported:{id:"YBhp8W"},permissionDenied:{id:"rRBxEC"},positionUnavailable:{id:"ZKd7sA"},timeout:{id:"pwNRoi"}},d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,n]=(0,o.useState)(!1),[r,i]=(0,o.useState)(!1),{_:d}=(0,a.mV)(),p=(0,o.useCallback)(()=>(n(!0),new Promise((t,i)=>{s.c.track("User Location Requested",{where:e.where});let o=e=>{s.c.track("User Location Fulfilled",{status:"error",errorCode:e});let t={code:e,message:d(c[e])};return n(!1),l.Am.error(t.message,{position:"top-center",autoClose:5e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0}),i(t)};if(!r)return o("notSupported");navigator.geolocation.getCurrentPosition(e=>(n(!1),s.c.track("User Location Fulfilled",{status:"received"}),t(e)),e=>{o(u[e.code])})})),[r,d]);return(0,o.useEffect)(()=>{i(!!navigator.geolocation)},[]),[p,t,r]}},55e3:function(e,t,n){n.d(t,{Fl:function(){return o},US:function(){return i}});var r=n(62124);let i={minZoom:2,maxZoom:22,defaultZoom:11,paddings:{bottom:20,left
1:20,right:20,top:20},center:{lat:51.50722,lng:-.1275}};function o(e,t){var n,o,a;let l=(0,r.h)()===r.u.Desktop,s=l?null==e?void 0:e.desktop:null==e?void 0:e.mobile,u=l?null==t?void 0:t.desktop:null==t?void 0:t.mobile;return{keyboardShortcuts:!1,gestureHandling:"cooperative",minZoom:i.minZoom,maxZoom:i.maxZoom,zoom:null!==(n=null==u?void 0:u.zoom)&&void 0!==n?n:i.defaultZoom,fullscreenControl:!0,scaleControl:!0,zoomControl:!1,mapTypeControl:!1,streetViewControl:!1,disableDefaultUI:!0,center:null!==(o=null==u?void 0:u.center)&&void 0!==o?o:i.center,defaultCenter:null!==(a=null==u?void 0:u.center)&&void 0!==a?a:i.center,mapId:s}}},20323:function(e,t,n){n.d(t,{k:function(){return r}});class r{static parse(e){let[t=0,n=0,i=0,o=0]=e.split(",").map(Number);return new r(t,n,i,o)}static fromGMap(e){if(!e)throw Error("InvalidValueError: input expected to be a value, ".concat(e," passed"));return new r(e.getSouthWest().lat(),e.getSouthWest().lng(),e.getNorthEast().lat(),e.getNorthEast().lng())}static fromBbox(e){return new r(e[1],e[0],e[3],e[2])}static fromRdt(e){var t,n,i,o;if(!e)throw Error("InvalidValueError: input expected to be a value, ".concat(e," passed"));return new r(null===(t=e.sw)||void 0===t?void 0:t.lat,null===(n=e.sw)||void 0===n?void 0:n.lng,null===(i=e.ne)||void 0===i?void 0:i.lat,null===(o=e.ne)||void 0===o?void 0:o.lng)}serialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;return[this.swLat,this.swLng,this.neLat,this.neLng].map(t=>t.toFixed(e)).join(",")}asGMap(){return{south:this.swLat,west:this.swLng,north:this.neLat,east:this.neLng}}asRdt(){return{sw:{lat:this.swLat,lng:this.swLng},ne:{lat:this.neLat,lng:this.neLng}}}pretty(){var e,t,n,r;return"\n      <sub>".concat(null===(e=this.swLat)||void 0===e?void 0:e.toFixed(2),", ").concat(null===(t=this.swLng)||void 0===t?void 0:t.toFixed(2),"</sub>\n      <sup>").concat(null===(n=this.neLat)||void 0===n?void 0:n.toFixed(2),", ").concat(null===(r=this.neLng)||void 0===r?void 0:r.toFixed(2),"</sup>\n    ").trim()}equals(e){return this.serialize()===e.serialize()}hasArea(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.MIN_SPAN;return!![this.swLat,this.swLng,this.neLat,this.neLng].every(e=>Number.isFinite(e))&&Math.abs(this.neLat-this.swLat)>=e&&this.longitudeSpan()>=e}longitudeSpan(){let e=this.swLng,t=this.neLng;return e<=t?t-e:360-(e-t)}static fromCenterAndDistance(e,t){let n=Math.PI,i=t/6378*(180/n),o=i/Math.cos(e.lat*n/180),a=e.lat+i,l=e.lng+o;return new r(e.lat-i,e.lng-o,a,l)}constructor(e,t,n,r){this.swLat=e,this.swLng=t,this.neLat=n,this.neLng=r}}r.PRECISION=6,r.MIN_SPAN=1e-6,r.EMPTY={sw:{lat:0,lng:0},ne:{lat:0,lng:0}}},51133:function(e,t,n){n.d(t,{JI:function(){return c},PK:function(){return a},l7:function(){return l},mw:function(){return s},oP:function(){return u},qR:function(){return o},wI:function(){return r},wg:function(){return i}});let r=["spots","guides","myTrips"],i=["spots","guides"];function o(e){return((Array.isArray(e)?e.join(","):e)||"").split(",").map(e=>e.trim()).filter(Boolean)}function a(e){return o(e).map(e=>Number(e)).filter(e=>Number.isFinite(e))}function l(e){return o(e).filter(e=>r.includes(e))}function s(e){if(null==e?void 0:e.length)return e.join(",")}function u(e){let t=Array.isArray(e)?e[0]:e;if(!t)return null;let[n,...i]=t.split(":"),o=i.join(":").trim();return o&&r.includes(n)?{type:n,id:o}:null}function c(e){if(e)return"".concat(e.type,":").concat(e.id)}},11776:function(e,t,n){n.d(t,{E:function(){return r}});function r(){document.querySelector("html").style.overscrollBehavior="none",document.querySelector("body").style.overscrollBehavior="none"}},62124:function(e,t,n){var r,i;function o(){return"undefined"==typeof navigator?0:navigator.userAgent.toLowerCase().includes("android")?1:/iPad|iPhone|iPod/.test(navigator.platform)?2:0}n.d(t,{h:function(){return o},u:function(){return r}}),(i=r||(r={}))[i.Desktop=0]="Desktop",i[i.Android=1]="Android",i[i.IPhone=2]="IPhone"}}]);

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.