PageSourceSearch

https://www.cousinssubs.com/_next/static/chunks/7777-8483e16754d1bb91.js

js cousinssubs.com collected 2026-10-02 04:29:12 UTC 46,122 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7777],{67777:(t,e,i)=>{i.d(e,{A:()=>tD});var r=i(34606);class s{static setup(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s.options=t}static get(){return s.options||{}}static clear(){s.options={},s.errorCallback=null}static onError(t){s.errorCallback=t}static sendError(t){s.errorCallback&&t&&s.errorCallback(t)}}s.errorCallback=null,s.defaultOptions={live:!1,logLevel:"error",host:"https://api.radar.io",version:"v1",debug:!1};let a={none:0,error:1,warn:2,info:3,debug:4},n=()=>{if(window&&window.RADAR_TEST_ENV)return a.none;let{logLevel:t,debug:e}=s.get();return e?a.debug:t?a[t]:a.error};class o{static debug(t,e){n()===a.debug&&console.log("Radar SDK (debug): ".concat(t.trim()),e)}static info(t){n()>=a.info&&console.log("Radar SDK: ".concat(t.trim()))}static warn(t){n()>=a.warn&&console.warn("Radar SDK: ".concat(t.trim()))}static error(t){n()>=a.error&&console.error("Radar SDK: ".concat(t.trim()))}}class l{static get USER_ID(){return"radar-userId"}static get DEVICE_ID(){return"radar-deviceId"}static get INSTALL_ID(){return"radar-installId"}static get SESSION_ID(){return"radar-sessionId"}static get DESCRIPTION(){return"radar-description"}static get METADATA(){return"radar-metadata"}static get CACHED_LOCATION(){return"radar-cached-location"}static get TRIP_OPTIONS(){return"radar-trip-options"}static get PRODUCT(){return"radar-product"}static getStorage(){let t=null==window?void 0:window.localStorage;return t||o.warn("localStorage not available."),t}static setItem(t,e){let i=this.getStorage();i&&null!=e&&i.setItem(t,e)}static getItem(t){let e=this.getStorage();if(!e)return null;let i=e.getItem(t);return null!=i?i:null}static getJSON(t){let e=this.getItem(t);if(!e)return null;try{return JSON.parse(e)}catch(e){return o.warn("could not getJSON from storage for key: ".concat(t)),null}}static removeItem(t){let e=this.getStorage();if(!e)return null;e.removeItem(t)}static clear(){let t=this.getStorage();if(!t)return null;t.clear()}}function c(t,e,i,r){return new(i||(i=Promise))(function(s,a){function n(t){try{l(r.next(t))}catch(t){a(t)}}function o(t){try{l(r.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?s(t.value):((e=t.value)instanceof i?e:new i(function(t){t(e)})).then(n,o)}l((r=r.apply(t,e||[])).next())})}class d extends Error{constructor(t){super(t),this.status=""}}class u extends d{constructor(t){super(t),this.name="RadarPublishableKeyError",this.status="ERROR_PUBLISHABLE_KEY"}}class h extends d{constructor(t){super(t),this.name="RadarLocationError",this.status="ERROR_LOCATION"}}class p extends d{constructor(t){super(t),this.name="RadarPermissionsError",this.status="ERROR_PERMISSIONS"}}class g extends d{constructor(){super("Radar Verify app not running."),this.name="RadarVerifyAppError",this.status="ERROR_VERIFY_APP"}}class m extends d{constructor(t){var e;super((null==(e=null==t?void 0:t.meta)?void 0:e.message)||"Bad request."),this.name="RadarBadRequestError",this.code=400,this.response=t,this.status="ERROR_BAD_REQUEST"}}class f extends d{constructor(t){var e;super((null==(e=null==t?void 0:t.meta)?void 0:e.message)||"Unauthorized."),this.name="RadarUnauthorizedError",this.code=401,this.response=t,this.status="ERROR_UNAUTHORIZED"}}class v extends d{constructor(t){var e;super((null==(e=null==t?void 0:t.meta)?void 0:e.message)||"Payment required."),this.name="RadarPaymentRequiredError",this.code=402,this.response=t,this.status="ERROR_PAYMENT_REQUIRED"}}class y extends d{constructor(t){var e;super((null==(e=null==t?void 0:t.meta)?void 0:e.message)||"Forbidden."),this.name="RadarForbiddenError",this.code=403,this.response=t,this.status="ERROR_FORBIDDEN"}}class E extends d{constructor(t){var e;super((null==(e=null==t?void 0:t.meta)?void 0:e.message)||"Not found."),this.name="RadarNotFoundError",this.code=404,this.response=t,this.status="ERROR_NOT_FOUND"}}class b extends d{constructor(t){var e,i;super((null==(e=null==t?void 0:t.meta)?void 0:e.message)||"Rate limit exceeded."),this.name="RadarRateLimitError",this.code=429,this.response=t,this.type=null==(i=null==t?void 0:t.meta)?void 0:i.type,this.status="ERROR_RATE_LIMIT"}}class w extends d{constructor(t){var e;super((null==(e=null==t?void 0:t.meta)?void 0:e.message)||"Internal server error."),this.name="RadarServerError",this.response=t,this.status="ERROR_SERVER"}}class I extends d{constructor(){super("Request timed out."),this.name="RadarNetworkError",this.status="ERROR_NETWORK"}}class R extends d{constructor(t){var e;super((null==(e=null==t?void 0:t.meta)?void 0:e.message)||"Something went wrong."),this.name="RadarUnknownError",this.response=t,this.status="ERROR_UNKNOWN"}}class T extends d{constructor(t){super(t),this.name="RadarAutocompleteContainerNotFound",this.status="CONTAINER_NOT_FOUND"}}let A={maximumAge:0,timeout:1e4,enableHighAccuracy:!0};class S{static getCurrentPosition(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return c(this,void 0,void 0,function*(){return new Promise((e,i)=>{let r=s.get();if(!navigator||!navigator.geolocation)return i(new h("navigator.geolocation is not available."));if(r.cacheLocationMinutes)try{let t=l.getItem(l.CACHED_LOCATION);if(t){let{latitude:i,longitude:r,accuracy:s,expiresAt:a}=JSON.parse(t)||{};if(Date.now()<parseInt(a)&&i&&r&&s)return e({latitude:i,longitude:r,accuracy:s})}}catch(t){o.warn("could not load cached location.")}let a=Object.assign({},A);void 0!==r.locationMaximumAge&&(a.maximumAge=r.locationMaximumAge),void 0!==r.locationTimeout&&(a.timeout=r.locationTimeout),void 0!==r.desiredAccuracy&&(a.enableHighAccuracy="high"===r.desiredAccuracy),void 0!==t.desiredAccuracy&&(a.enableHighAccuracy="high"===t.desiredAccuracy),o.info("Using geolocation options: ".concat(JSON.stringify(a))),navigator.geolocation.getCurrentPosition(t=>{if(!t||!t.coords)return i(new h("device location return empty coordinates."));let{latitude:s,longitude:a,accuracy:n}=t.coords;if(r.cacheLocationMinutes){let t=Number.parseFloat(r.cacheLocationMinutes),e=Date.now();l.setItem(l.CACHED_LOCATION,JSON.stringify({latitude:s,longitude:a,accuracy:n,updatedAt:e,expiresAt:e+60*t*1e3}))}return e({latitude:s,longitude:a,accuracy:n})},t=>t&&1===t.code?i(new p("Location permissions denied.")):i(new h("Could not determine location.")),a)})})}static getPermissionStatus(){return c(this,void 0,void 0,function*(){return new Promise(t=>{let e="NOT_DETERMINED";if(!navigator||!navigator.permissions)return t(e);navigator.permissions.query({name:"geolocation"}).then(i=>{switch(i.state){case"granted":e="GRANTED_FOREGROUND";break;case"denied":e="DENIED";break;case"prompt":e="NOT_DETERMINED"}return t(e)})})})}static online(){return navigator&&navigator.onLine}}var O="4.5.8";let L=new Map;class C{static request(t){let{method:e,path:i,data:r,host:a,version:n,headers:l={},responseType:d,requestId:T}=t;return c(this,void 0,void 0,function*(){return new Promise((t,c)=>{let A=s.get(),C=A.publishableKey;if(!C)return void c(new u("publishableKey not set."));
1let _=a||A.host,k=n||A.version,x="".concat(_,"/").concat(k,"/").concat(i),D={};if(Object.keys(r||{}).forEach(t=>{let e=r[t];void 0!==e&&(D[t]=e)}),"GET"===e){let t=Object.keys(D).map(t=>"".concat(t,"=").concat(encodeURIComponent(D[t])));if(t.length>0){let e=t.join("&");x="".concat(x,"?").concat(e)}D=void 0}if(T){let t=L.get(T);t&&t.abort()}let N=new XMLHttpRequest;N.open(e,x,!0),T&&L.set(T,N);let P={};"function"==typeof A.getRequestHeaders&&(P=A.getRequestHeaders());let M=Object.assign({Authorization:C,"Content-Type":"application/json","X-Radar-Device-Type":"Web","X-Radar-SDK-Version":O},P,l);Object.keys(M).forEach(t=>{N.setRequestHeader(t,M[t])}),d&&(N.responseType=d),N.onload=()=>{var e;let i;T&&L.delete(T);try{i="blob"===N.responseType?{code:N.status,data:N.response}:JSON.parse(N.response)}catch(t){return c(new w(i))}let r=null==(e=null==i?void 0:i.meta)?void 0:e.error;return"ERROR_PERMISSIONS"===r?c(new p("Location permissions not granted.")):"ERROR_LOCATION"===r?c(new h("Could not determine location.")):"ERROR_NETWORK"===r?c(new I):200==N.status?t(i):void(A.debug&&(o.debug("API call failed: ".concat(x)),o.debug(JSON.stringify(i))),400===N.status?c(new m(i)):401===N.status?c(new f(i)):402===N.status?c(new v(i)):403===N.status?c(new y(i)):404===N.status?c(new E(i)):429===N.status?c(new b(i)):500<=N.status&&N.status<600?c(new w(i)):c(new R(i)))},N.onerror=function(){a&&("http://localhost:52516"===a||"https://radar-verify.com:52516"===a)?c(S.online()?new g:new I):c(new I)},N.ontimeout=function(){a&&("http://localhost:52516"===a||"https://radar-verify.com:52516"===a)?c(S.online()?new g:new I):c(new I)},N.send(JSON.stringify(D))})})}}class _{static validateAddress(t){return c(this,void 0,void 0,function*(){let e=s.get(),i=yield C.request({method:"GET",path:"addresses/validate",data:t}),{address:r,result:a}=i,n={address:r,result:a};return e.debug&&(n.response=i),n})}}let k=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)});class x{static getDeviceId(){let t=l.getItem(l.DEVICE_ID);if(t)return t;let e=k();return l.setItem(l.DEVICE_ID,e),e}static getInstallId(){let t=l.getItem(l.INSTALL_ID);if(t)return t;let e=k();return l.setItem(l.INSTALL_ID,e),e}}class D{static getSessionId(){var t;let e=l.getItem(l.SESSION_ID);if(e&&(t=e,300>Math.abs(Math.trunc(Date.now()/1e3)-Number.parseInt(t))))return e;let i=Math.trunc(Date.now()/1e3).toString();return l.setItem(l.SESSION_ID,i),i}}class N{static getConfig(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return c(this,void 0,void 0,function*(){let e;if("v1"!=s.get().version)return void o.info("Skipping /config call.");let i=t.deviceId||x.getDeviceId(),r=t.installId||x.getInstallId(),a=D.getSessionId();try{e=yield S.getPermissionStatus()}catch(t){o.warn("Location authorization error: ".concat(t.message))}let n={deviceId:i,installId:r,sessionId:a,locationAuthorization:e};try{yield C.request({method:"GET",path:"config",data:n})}catch(t){o.warn("Error calling /config: ".concat(t.message))}})}}class P{static getContext(t){return c(this,void 0,void 0,function*(){let e=s.get();t.latitude&&t.longitude||(t=yield S.getCurrentPosition());let{latitude:i,longitude:r,accuracy:a}=t,n=yield C.request({method:"GET",path:"context",data:{coordinates:"".concat(i,",").concat(r),accuracy:a}}),{geofences:o,place:l,country:c,state:d,dma:u,postalCode:h}=n,p={location:t,geofences:o,place:l,country:c,state:d,dma:u,postalCode:h};return e.debug&&(p.response=n),p})}}class M{static logConversion(t){return c(this,void 0,void 0,function*(){let e=s.get(),i=t.name,r=t.userId||l.getItem(l.USER_ID),a=t.deviceId||x.getDeviceId(),n=t.installId||x.getInstallId(),o=t.metadata||{},c=t.createdAt;t.revenue&&(o.revenue=t.revenue);let d={name:i,userId:r,deviceId:a,installId:n,metadata:o};"string"==typeof c?d.createdAt=c:c instanceof Date?d.createdAt=c.toISOString():d.createdAt=new Date().toISOString();let u=yield C.request({method:"POST",path:"events",data:d}),h={event:u.event};return e.debug&&(h.response=u),h})}}class U{static forwardGeocode(t){return c(this,void 0,void 0,function*(){let e=s.get(),{query:i,layers:r,country:a,lang:n}=t,o=yield C.request({method:"GET",path:"geocode/forward",data:{query:i,layers:r,country:a,lang:n}}),l={addresses:o.addresses};return e.debug&&(l.response=o),l})}static reverseGeocode(t){return c(this,void 0,void 0,function*(){let e=s.get(),{latitude:i,longitude:r,layers:a}=t;if(!i||!r){let t=yield S.getCurrentPosition();i=t.latitude,r=t.longitude}let n=yield C.request({method:"GET",path:"geocode/reverse",data:{coordinates:"".concat(i,",").concat(r),layers:a}}),o={addresses:n.addresses};return e.debug&&(o.response=n),o})}static ipGeocode(){return c(this,void 0,void 0,function*(){let t=s.get(),e=yield C.request({method:"GET",path:"geocode/ip"}),i={ip:e.ip,address:e.address,proxy:e.proxy};return t.debug&&(i.response=e),i})}}class F{static distance(t){return c(this,void 0,void 0,function*(){let e=s.get(),{origin:i,destination:r,modes:a,units:n,geometry:o,geometryPoints:l,avoid:c}
1=t;if(i){if("string"!=typeof i){let{latitude:t,longitude:e}=i;i="".concat(t,",").concat(e)}}else{let{latitude:t,longitude:e}=yield S.getCurrentPosition();i="".concat(t,",").concat(e)}if("string"!=typeof r){let{latitude:t,longitude:e}=r;r="".concat(t,",").concat(e)}Array.isArray(a)&&(a=a.join(",")),Array.isArray(c)&&(c=c.join(","));let d=yield C.request({method:"GET",path:"route/distance",data:{origin:i,destination:r,modes:a,units:n,geometry:o,geometryPoints:l,avoid:c}}),u={routes:d.routes};return e.debug&&(u.response=d),u})}static matrix(t){return c(this,void 0,void 0,function*(){let e=s.get(),{origins:i,destinations:r,mode:a,units:n,avoid:o}=t;if(i)Array.isArray(i)&&(i=i.map(t=>"".concat(t.latitude,",").concat(t.longitude)).join("|"));else{let{latitude:t,longitude:e}=yield S.getCurrentPosition(),s=[];for(let i=0;i<r.length;i++)s.push("".concat(t,",").concat(e));i=s.join("|")}Array.isArray(r)&&(r=r.map(t=>"".concat(t.latitude,",").concat(t.longitude)).join("|")),Array.isArray(o)&&(o=o.join(","));let l=yield C.request({method:"GET",path:"route/matrix",data:{origins:i,destinations:r,mode:a,units:n,avoid:o}}),c={origins:l.origins,destinations:l.destinations,matrix:l.matrix};return e.debug&&(c.response=l),c})}}class j{static autocomplete(t,e){return c(this,void 0,void 0,function*(){let i=s.get(),{query:r,near:a,limit:n,layers:o,countryCode:l,expandUnits:c,mailable:d,lang:u,postalCode:h}=t;a&&"string"!=typeof a&&a.latitude&&a.longitude&&(a="".concat(a.latitude,",").concat(a.longitude));let p=yield C.request({method:"GET",path:"search/autocomplete",data:{query:r,near:a,limit:n,layers:o,countryCode:l,expandUnits:c,mailable:d,lang:u,postalCode:h},requestId:e}),g={addresses:p.addresses};return i.debug&&(g.response=p),g})}static searchGeofences(t){return c(this,void 0,void 0,function*(){let e=s.get(),{near:i,radius:r,tags:a,metadata:n,limit:o,includeGeometry:l}=t;if(i){if("string"!=typeof i){let{latitude:t,longitude:e}=i;i="".concat(t,",").concat(e)}}else{let{latitude:t,longitude:e}=yield S.getCurrentPosition();i="".concat(t,",").concat(e)}Array.isArray(a)&&(a=a.join(","));let c=yield C.request({method:"GET",path:"search/geofences",data:{near:i,radius:r,tags:a,metadata:n,limit:o,includeGeometry:l}}),d={geofences:c.geofences};return e.debug&&(d.response=c),d})}static searchPlaces(t){return c(this,void 0,void 0,function*(){let e=s.get(),{near:i,radius:r,chains:a,categories:n,groups:o,limit:l}=t;if(i){if("string"!=typeof i){let{latitude:t,longitude:e}=i;i="".concat(t,",").concat(e)}}else{let{latitude:t,longitude:e}=yield S.getCurrentPosition();i="".concat(t,",").concat(e)}Array.isArray(a)&&(a=a.join(",")),Array.isArray(n)&&(n=n.join(",")),Array.isArray(o)&&(o=o.join(","));let c=yield C.request({method:"GET",path:"search/places",data:{near:i,radius:r,chains:a,categories:n,groups:o,limit:l}}),d={places:c.places};return e.debug&&(d.response=c),d})}}let q=t=>t&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t);class V{static setTripOptions(t){if(!t)return void V.clearTripOptions();let e=JSON.stringify(t);o.debug("Saving trip options: ".concat(e)),l.setItem(l.TRIP_OPTIONS,e)}static getTripOptions(){let t=l.getItem(l.TRIP_OPTIONS);return t&&(t=JSON.parse(t)),t}static clearTripOptions(){l.removeItem(l.TRIP_OPTIONS)}static startTrip(t){return c(this,void 0,void 0,function*(){let e=s.get();(t=t||V.getTripOptions())||o.warn('tripOptions not set when calling "startTrip"');let i=t.userId||l.getItem(l.USER_ID);i&&i!==l.getItem(l.USER_ID)&&l.setItem(l.USER_ID,i);let{externalId:r,destinationGeofenceTag:a,destinationGeofenceExternalId:n,mode:c,metadata:d,approachingThreshold:u,scheduledArrivalAt:h}=t,p={userId:i,externalId:r,destinationGeofenceTag:a,destinationGeofenceExternalId:n,mode:c,metadata:d,approachingThreshold:u};q(h)?p.scheduledArrivalAt=null==h?void 0:h.toJSON():(h&&o.warn("Invalid date format for scheduledArrivalAt"),p.scheduledArrivalAt=void 0);let g=yield C.request({method:"POST",path:"trips",data:p});V.setTripOptions(t);let m={trip:g.trip,events:g.events};return e.debug&&(m.response=g),m})}static updateTrip(t,e){return c(this,void 0,void 0,function*(){let i=s.get();(t=t||V.getTripOptions())||o.warn('tripOptions not set when calling "startTrip"');let{externalId:r,destinationGeofenceTag:a,destinationGeofenceExternalId:n,mode:l,metadata:c,approachingThreshold:d,scheduledArrivalAt:u}=t,h={status:e,externalId:r,destinationGeofenceTag:a,destinationGeofenceExternalId:n,mode:l,metadata:c,approachingThreshold:d};q(u)?h.scheduledArrivalAt=null==u?void 0:u.toJSON():(u&&o.warn("Invalid date format for scheduledArrivalAt"),h.scheduledArrivalAt=void 0);let p=yield C.request({method:"PATCH",path:"trips/".concat(r,"/update"),data:h}),g={trip:p.trip,events:p.events};return i.debug&&(g.response=p),g})}static completeTrip(){return c(this,void 0,void 0,function*(){let t=V.getTripOptions(),e=yield V.updateTrip(t,"completed");return V.clearTripOptions(),e})}static cancelTrip(){return c(this,void 0,void 0,function*(){let t=V.getTripOptions(),e=yield V.updateTrip(t,"canceled");return V.clearTripOptions(),e})}}let H=t=>btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");class G{static trackOnce(t){return c(this,void 0,void 0,function*(){let e,i,r=s.get(),{latitude:a,longitude:n,accuracy:d,desiredAccuracy:u,fraud:h}=t;if(!a||!n){let t=yield S.getCurrentPosition({desiredAccuracy:u});a=t.latitude,n=t.longitude,d=t.accuracy}let p=yield S.getPermissionStatus(),g=t.userId||l.getItem(l.USER_ID),m=t.deviceId||x.getDeviceId(),f=t.installId||x.getInstallId(),v=D.getSessionId(),y=t.deviceType||"Web",E=t.description||l.getItem(l.DESCRIPTION);try{e=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){o.warn("Error getting time zone: ".concat(t.message))}g?l.setItem(l.USER_ID,g):o.warn("userId not provided for trackOnce.");let b=t.metadata||l.getJSON(l.METADATA),w=t.tripOptions||V.getTripOptions();w&&(w.version="2");let I={},R=l.getItem(l.PRODUCT);R&&(I["X-Radar-Product"]=R);let T=Object.assign(Object.assign({},t),{locationAuthorization:p,accuracy:d,description:E,deviceId:m,deviceType:y,foreground:!0,installId:f,sessionId:v,latitude:a,longitude:n,metadata:b,sdkVersion:O,stopped:!0,userId:g,tripOptions:w,timeZone:e});
1if(h){let t="https://api-verified.radar.io",e=navigator.language,s=navigator.languages,{dk:o}=yield C.request({host:t,method:"GET",path:"config",data:{deviceId:m,installId:f,sessionId:v,locationAuthorization:p},headers:{"X-Radar-Desktop-Device-Type":"Web"}}),l={payload:JSON.stringify(Object.assign(Object.assign({},T),{lang:e,langs:s}))},u=yield c(void 0,void 0,void 0,function*(){let t=new TextEncoder,e=H(JSON.stringify({alg:"HS256",typ:"JWT"})),i=H(JSON.stringify(l)),r=t.encode(o),s=t.encode("".concat(e,".").concat(i)),a=yield crypto.subtle.importKey("raw",r,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=H(String.fromCharCode(...Array.from(new Uint8Array((yield crypto.subtle.sign("HMAC",a,s))))));return"".concat(e,".").concat(i,".").concat(n)});I["X-Radar-Body-Is-Token"]="true";let{user:h,events:g,token:y,expiresAt:E,expiresIn:b,passed:w,failureReasons:R,_id:A}=i=yield C.request({host:t,method:"POST",path:"track",data:{token:u},headers:I}),S={latitude:a,longitude:n,accuracy:d};E&&(E=new Date(E));let O={user:h,events:g,location:S,token:y,expiresAt:E,expiresIn:b,passed:w,failureReasons:R,_id:A};return r.debug&&(O.response=i),O}let{user:A,events:L}=i=yield C.request({method:"POST",path:"track",data:T,headers:I}),_={user:A,events:L,location:{latitude:a,longitude:n,accuracy:d}};return r.debug&&(_.response=i),_})}}let B=null,K=null,J=!0,W=null,z=null,X=0,Z=null,Y=null,Q=null;class ${static checkIpChanges(){return c(this,void 0,void 0,function*(){try{let{ip:t}=yield C.request({method:"GET",path:"ping"}),e=Q&&t!==Q;return e&&(o.info("IP changed from ".concat(Q," to ").concat(t)),z=null),Q=t,e}catch(t){o.error("Error checking IP: ".concat(t))}return!1})}static trackVerified(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return c(this,void 0,void 0,function*(){try{let i,r=s.get(),{skipVerifyApp:a,reason:n}=t,c=t.userId||l.getItem(l.USER_ID),d=x.getDeviceId(),u=x.getInstallId(),h=D.getSessionId(),p=t.description||l.getItem(l.DESCRIPTION);c?l.setItem(l.USER_ID,c):o.warn("userId not provided for trackVerified.");let g=t.metadata||l.getJSON(l.METADATA);if(a)i=yield G.trackOnce({userId:null!=c?c:void 0,description:null!=p?p:void 0,metadata:g,fraud:!0,reason:n});else{let s,a=Object.assign(Object.assign({},t),{description:p,deviceId:d,foreground:!0,installId:u,sessionId:h,metadata:g,sdkVersion:O,stopped:!0,userId:c,encrypted:e,expectedCountryCode:Z,expectedStateCode:Y}),n=navigator.userAgent,o=n&&(n.toLowerCase().includes("mac")||n.toLowerCase().includes("iphone")||n.toLowerCase().includes("ipod")||n.toLowerCase().includes("ipad")),l=yield C.request({method:"GET",path:"verify",data:a,host:o?"https://radar-verify.com:52516":"http://localhost:52516"}),{user:m,events:f,token:v,expiresAt:y,expiresIn:E,passed:b,failureReasons:w,_id:I}=l;m&&m.location&&m.location.coordinates&&m.locationAccuracy&&(s={latitude:m.location.coordinates[1],longitude:m.location.coordinates[0],accuracy:m.locationAccuracy}),y&&(y=new Date(y)),i={user:m,events:f,location:s,token:v,expiresAt:y,expiresIn:E,passed:b,failureReasons:w,_id:I},r.debug&&(i.response=l)}return z=i,X=performance.now(),W&&W(i),i}catch(t){throw s.sendError(t),t}})}static startTrackingVerified(t){J=!0;let e=()=>c(this,void 0,void 0,function*(){let{interval:e}=t;e||(e=20);let r=e;if(z){let t=(performance.now()-X)/1e3;r=Math.min((z.expiresIn||0)-t,e)}(r-=10)<10&&(r=10),B&&clearTimeout(B),J&&(B=setTimeout(i,1e3*r))}),i=()=>c(this,void 0,void 0,function*(){try{yield this.trackVerified(t)}catch(t){o.error("trackVerified error: ".concat(t.message))}e()});(null==t?void 0:t.ipChanges)&&(K&&clearInterval(K),K=setInterval(()=>c(this,void 0,void 0,function*(){(yield $.checkIpChanges())&&i()}),1e4)),this.isLastTokenValid()?e():i()}static stopTrackingVerified(){J=!1,B&&clearTimeout(B),K&&clearInterval(K)}static getVerifiedLocationToken(t){return c(this,void 0,void 0,function*(){return this.isLastTokenValid()?z:this.trackVerified(t)})}static clearVerifiedLocationToken(){z=null}static isLastTokenValid(){if(!z)return!1;let t=(performance.now()-X)/1e3;return z.passed&&t<(z.expiresIn||0)}static setExpectedJurisdiction(t,e){Z=t||null,Y=e||null}static onTokenUpdated(t){W=t}}let tt=class{static get VERSION(){return O}static initialize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)throw new u("Publishable key required in initialization.");
1if(t.includes("_sk_"))throw new u("Secret keys are not allowed. Please use your Radar publishable key.");let i=t.includes("_live_"),r=Object.assign(s.defaultOptions,{publishableKey:t,live:i,logLevel:i?"error":"info",debug:!i},e);s.setup(r),o.info("initialized with ".concat(i?"live":"test"," publishableKey.")),e.debug&&o.debug("using options",e),(null==window?void 0:window.RADAR_TEST_ENV)||N.getConfig()}static clear(){s.clear()}static setUserId(t){if(!t)return void l.removeItem(l.USER_ID);l.setItem(l.USER_ID,String(t).trim())}static setDescription(t){if(!t)return void l.removeItem(l.DESCRIPTION);l.setItem(l.DESCRIPTION,String(t).trim())}static setMetadata(t){if(!t)return void l.removeItem(l.METADATA);l.setItem(l.METADATA,JSON.stringify(t))}static getLocation(){return S.getCurrentPosition()}static trackOnce(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return G.trackOnce(t)}finally{N.getConfig(t)}}static trackVerified(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return $.trackVerified(t)}static startTrackingVerified(t){$.startTrackingVerified(t)}static stopTrackingVerified(){$.stopTrackingVerified()}static getVerifiedLocationToken(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return $.getVerifiedLocationToken(t)}static clearVerifiedLocationToken(){$.clearVerifiedLocationToken()}static setExpectedJurisdiction(t,e){$.setExpectedJurisdiction(t,e)}static getContext(t){return P.getContext(t)}static setTripOptions(t){V.setTripOptions(t)}static clearTripOptions(){V.clearTripOptions()}static getTripOptions(){return V.getTripOptions()}static startTrip(t){return V.startTrip(t)}static updateTrip(t){return V.updateTrip(t)}static completeTrip(){return V.completeTrip()}static cancelTrip(){return V.cancelTrip()}static logConversion(t){return M.logConversion(t)}static setProduct(t){if(!t)return void l.removeItem(l.PRODUCT);l.setItem(l.PRODUCT,String(t).trim())}static onTokenUpdated(t){$.onTokenUpdated(t)}static onError(t){s.onError(t)}static forwardGeocode(t){return U.forwardGeocode(t)}static reverseGeocode(t){return U.reverseGeocode(t)}static ipGeocode(){return U.ipGeocode()}static autocomplete(t){return j.autocomplete(t)}static searchGeofences(t){return j.searchGeofences(t)}static searchPlaces(t){return j.searchPlaces(t)}static validateAddress(t){return _.validateAddress(t)}static distance(t){return F.distance(t)}static matrix(t){return F.matrix(t)}};class te{constructor(t,e,i){this.type=t,this.feature=e,this.originalEvent=i}}class ti{remove(){this._layerIds.forEach(t=>{this._map.getLayer(t)&&this._map.removeLayer(t)}),this._sourceIds.forEach(t=>{this._map.getSource(t)&&this._map.removeSource(t)}),this._map._features=this._map._features.filter(t=>t.id!==this.id)}on(t,e){this._map.on(t,this.id,i=>{e(new te(t,this,i))}),"click"===t&&(this._map.on("mouseenter",this.id,()=>{this._map.getCanvas().style.cursor="pointer"}),this._map.on("mouseleave",this.id,()=>{this._map.getCanvas().style.cursor=""}))}constructor(t,e){var i;this._sourceIds=[],this._layerIds=[],this.id=(null!=(i=e.id)?i:"feature-".concat(Date.now())).toString(),(t.getFeatures()||[]).forEach(t=>{if(t.id===this.id)throw Error("RadarMapFeature: feature with id ".concat(this.id," already exists."))}),this.geometry=e.geometry,this.properties=e.properties||{},this._feature=e,this._map=t}}let tr=function(t){let e,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,s=0,a=0,n=0,o=[],l=0,c=0,d=null,u=Math.pow(10,r||6);for(;s<t.length;){d=null,l=0,c=0;do c|=(31&(d=t.charCodeAt(s++)-63))<<l,l+=5;while(d>=32);e=1&c?~(c>>1):c>>1,l=c=0;do c|=(31&(d=t.charCodeAt(s++)-63))<<l,l+=5;while(d>=32);i=1&c?~(c>>1):c>>1,a+=e,n+=i,o.push([n/u,a/u])}return o},ts=t=>{let e={};return Object.entries(t).forEach(t=>{let[i,r]=t;void 0!==r&&(e[i]=r)}),e},ta=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Object.assign({},t);for(let r in e)e[r]instanceof Object&&!Array.isArray(e[r])&&r in t?i[r]=ta(t[r],e[r]):Array.isArray(e[r])&&Array.isArray(t[r])?i[r]=t[r].concat(e[r]):i[r]=e[r];return i},tn={paint:{"line-cap":"round","line-color":"#000257","line-width":4,"border-color":"#FFFFFF","border-width":2}};class to extends ti{static fromPolyline(t,e,i){return new to(t,{id:(null==i?void 0:i.id)||"polyline-feature-".concat(Date.now()),type:"Feature",geometry:{type:"LineString",coordinates:tr(e,null==i?void 0:i.precision)},properties:(null==i?void 0:i.properties)||{}},i)}constructor(t,e,i){super(t,e);let r=this.id,s=ta(tn,i),a=()=>
1{if(s.paint=s.paint||{},t.addSource(r,{type:"geojson",data:e}),this._sourceIds.push(r),s.paint["line-width"]&&s.paint["border-width"]){let e="".concat(r,"-border"),i=s.paint["line-width"]+s.paint["border-width"];t.addLayer({id:e,source:r,type:"line",layout:{"line-cap":s.paint["line-cap"]},paint:ts({"line-color":s.paint["border-color"],"line-opacity":s.paint["border-opacity"],"line-width":i})}),this._layerIds.push(e)}t.addLayer({id:r,source:r,type:"line",layout:{"line-cap":s.paint["line-cap"]},paint:ts({"line-color":s.paint["line-color"],"line-width":s.paint["line-width"],"line-opacity":s.paint["line-opacity"],"line-offset":s.paint["line-offset"],"line-blur":s.paint["line-blur"],"line-dasharray":s.paint["line-dasharray"],"line-gap-width":s.paint["line-gap-width"],"line-gradient":s.paint["line-gradient"]})}),this._layerIds.push(r)};return t.loaded()?a():t.once("data",()=>{a()}),this}}let tl={paint:{"fill-color":"#FF6F00","fill-opacity":.3,"border-color":"#FF6F00","border-opacity":1,"border-width":2}};class tc extends ti{constructor(t,e,i){super(t,e);let r=this.id,s=ta(tl,i),a=()=>{if(s.paint=s.paint||{},t.addSource(r,{type:"geojson",data:e}),this._sourceIds.push(r),t.addLayer({id:r,source:r,type:"fill",layout:{},paint:ts({"fill-color":s.paint["fill-color"],"fill-opacity":s.paint["fill-opacity"]})}),this._layerIds.push(r),s.paint["border-color"]&&s.paint["border-width"]&&s.paint["border-opacity"]){let e="".concat(r,"-border");t.addLayer({id:e,source:r,type:"line",layout:{},paint:ts({"line-color":s.paint["border-color"],"line-opacity":s.paint["border-opacity"],"line-width":s.paint["border-width"]})}),this._layerIds.push(e)}};return t.loaded()?a():t.once("data",()=>{a()}),this}}class td{onAdd(){let t=document.createElement("img");return t.src="https://api.radar.io/maps/static/images/logo.svg",t.alt="Radar Maps Platform",this.link=document.createElement("a"),this.link.id="radar-map-logo",this.link.href="https://radar.com?ref=powered_by_radar",this.link.target="_blank",this.link.style.pointerEvents="auto",this.link.appendChild(t),this.link}onRemove(){var t;null==(t=this.link)||t.remove()}}let tu=(t,e)=>{e.forEach(e=>{t.push(e)})},th=["radar-default-v1","radar-light-v1","radar-dark-v1"],tp={showZoomControls:!0},tg={maxZoom:20,attributionControl:!1,dragRotate:!1,touchPitch:!1,maplibreLogo:!1},tm={padding:50},tf=(t,e)=>{let i=e.style||"radar-default-v1",r="".concat(t.host,"/maps/styles/").concat(i);return e.language&&(r+="?language=".concat(e.language)),r},tv=t=>!(!th.includes(t)&&/^(http:|https:)/.test(t));class ty extends r.Map{addMarker(t){this._markers.push(t)}removeMarker(t){this._markers=this._markers.filter(e=>e!==t)}getMarkers(){return this._markers}fitToMarkers(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,i=e||this.getMarkers();if(0===i.length)return;let s=new r.LngLatBounds;i.forEach(t=>{s.extend(t.getLngLat())});let a=Object.assign(tm,t);this.fitBounds(s,a)}clearMarkers(){this._markers.forEach(t=>{t.remove()})}getFeatures(){return this._features}fitToFeatures(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,i=(t=>{let e=[];return(t||[]).forEach(t=>{(t=>{let e=[],i=t.geometry;switch(i.type){case"Point":e.push(i.coordinates);break;case"MultiPoint":case"LineString":tu(e,i.coordinates);break;case"MultiLineString":case"Polygon":i.coordinates.forEach(t=>tu(e,t));break;case"MultiPolygon":i.coordinates.forEach(t=>{t.forEach(t=>tu(e,t))})}return e})(t).forEach(t=>{e.push(t)})}),e})((e||this._features).map(t=>t._feature));if(i.length>0){let e=new r.LngLatBounds;i.forEach(t=>{e.extend(t)}),this.fitBounds(e,t)}}clearFeatures(){this._features.forEach(t=>{t.remove()})}addPolygon(t,e){let i=new tc(this,t,e);return this._features.push(i),i}addLine(t,e){let i=new to(this,t,e);return this._features.push(i),i}addPolyline(t,e){let i=to.fromPolyline(this,t,e);return this._features.push(i),i}constructor(t){let e=s.get();e.publishableKey||o.warn("publishableKey not set. Call Radar.initialize() with key before creating a new map.");let i=((t,e)=>{let i=e.style;return!i||"string"==typeof i&&tv(i)?tf(t,e):e.style})(e,t),a=Object.assign({},tp,tg,t,{style:i},{validateStyle:!e.live});o.debug("map initialized with options",a),a.transformRequest=(t,i)=>{"Style"===i&&tv(t)&&(t=tf(e,Object.assign(Object.assign({},a),{style:t})));let r={Authorization:e.publishableKey,"X-Radar-Device-Type":"Web","X-Radar-SDK-Version":O};return"function"==typeof e.getRequestHeaders&&(r=Object.assign(r,e.getRequestHeaders())),{url:t,headers:r}},super(a),this._markers=[],this._features=[];let n=this.getContainer();n.style.width||n.style.height||o.warn('map container does not have a set "width" or "height"');let l=new td;this.addControl(l,"bottom-left");let c=new r.AttributionControl({compact:!1});this.addControl(c,"bottom-right");let d=new r.NavigationControl({showCompass:!1,showZoom:a.showZoomControls});this.addControl(d,"bottom-right");let u=()=>{let t=document.querySelector(".maplibregl-ctrl-attrib");t&&(this.getContainer().clientWidth<380?t.classList.add("hidden"):t.classList.remove("hidden"))};this.on("resize",u),this.on("load",u)}}class tE{constructor(t,e,i){this.target=e,this.originalEvent=i,this.point=e._pos,this.lngLat=e.getLngLat(),this.type=t}}let tb=new Map,tw=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3;return new Promise((i,r)=>{if(!tb.has(t))return tb.set(t,"pending"),r("miss");let s=Date.now(),a=setInterval(()=>{let n=tb.get(t);
1"pending"===n?Date.now()-s>e&&(clearInterval(a),r("timed out")):"failed"===n?(clearInterval(a),r("failed")):void 0!==n&&(clearInterval(a),i(n))},100)})},tI={color:"#000257"};class tR extends r.Marker{addTo(t){return t.addMarker(this),super.addTo(t)}remove(){return this._map&&this._map.removeMarker(this),super.remove()}constructor(t){let e=Object.assign({},tI);if(t.color&&(e.color=t.color),t.element&&(e.element=t.element),t.scale&&(e.scale=t.scale),super(e),t.marker||t.url){let e=this._element.cloneNode(!0);this._element.childNodes.forEach(t=>{t.remove()});let i=e=>{this._element.replaceChildren((t=>{let e=document.createElement("img");return e.src=t.url,t.width&&("number"==typeof t.width?e.width=t.width:e.style.width=t.width),t.height&&("number"==typeof t.height?e.height=t.height:e.style.height=t.height),t.width||t.height||(e.style.maxWidth="64px",e.style.maxHeight="64px",e.style.width="100%",e.style.height="100%"),e})({width:t.width,height:t.height,url:e}))},r=i=>{o.error("Could not load marker: ".concat(i.message," - falling back to default marker")),tb.set(t.url,"failed"),this._element.replaceChildren(...Array.from(e.childNodes))};t.url&&tw(t.url).then(i).catch(e=>{"miss"!==e&&o.debug("RadarMarker: cache lookup for ".concat(t.url,": ").concat(e)),fetch(t.url).then(e=>{200===e.status?e.blob().then(e=>{let r=URL.createObjectURL(e);tb.set(t.url,r),i(r)}).catch(r):r(Error(e.statusText))}).catch(r)}),t.marker&&tw(t.marker).then(i).catch(e=>{"miss"!==e&&o.debug("RadarMarker: cache lookup for ".concat(t.marker," ").concat(e)),C.request({method:"GET",version:"maps",path:"markers/".concat(t.marker),responseType:"blob"}).then(e=>{let{data:r}=e,s=URL.createObjectURL(r);tb.set(t.marker,s),i(s)}).catch(r)})}if(t.text&&(o.warn('marker option "text" is deprecated, and will be removed in a future version. Use "popup.text".'),t.popup=t.popup||{},t.popup.text=t.text),t.html&&(o.warn('marker option "html" is deprecated, and will be removed in a future version. Use "popup.html".'),t.popup=t.popup||{},t.popup.html=t.html),t.popup){let e=new r.Popup(t.popup);t.popup.text&&e.setText(t.popup.text),t.popup.html&&e.setHTML(t.popup.html),t.popup.element&&e.setDOMContent(t.popup.element),this.setPopup(e)}let i=this.getElement();i&&i.addEventListener("click",t=>{t.stopPropagation(),this.getPopup()&&((this._map.getMarkers()||[]).forEach(t=>{var e;(null==(e=t.getPopup())?void 0:e.isOpen())&&t.togglePopup()}),this.togglePopup()),this.fire("click",new tE("click",this,t))})}}class tT extends r.Popup{constructor(t){super(t),t.text&&this.setText(t.text),t.html&&this.setHTML(t.html),t.element&&this.setDOMContent(t.element)}}class tA{static getMapLibre(){return r}static createMap(t){return new ty(t)}static createMarker(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new tR(t)}static createPopup(t){return new tT(t)}}let tS={WRAPPER:"radar-autocomplete-wrapper",INPUT:"radar-autocomplete-input",SEARCH_ICON:"radar-autocomplete-search-icon",RESULTS_LIST:"radar-autocomplete-results-list",RESULTS_ITEM:"radar-autocomplete-results-item",RESULTS_MARKER:"radar-autocomplete-results-marker",SELECTED_ITEM:"radar-autocomplete-results-item-selected",POWERED_BY_RADAR:"radar-powered",NO_RESULTS:"radar-no-results"},tO={container:"autocomplete",debounceMS:200,minCharacters:3,limit:8,placeholder:"Search address",responsive:!0,disabled:!1,showMarkers:!0,hideResultsOnBlur:!0},tL=t=>"number"==typeof t?"".concat(t,"px"):t,tC=(t,e)=>{if(e.responsive){t.style.width="100%",e.width&&(t.style.maxWidth=tL(e.width));return}t.style.width=tL(e.width||400),t.style.removeProperty("max-width")},t_=(t,e)=>{e.maxHeight&&(t.style.maxHeight=tL(e.maxHeight),t.style.overflowY="auto")},tk=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#ACBDC8",e=t.replace("#","%23"),i='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n    <path d="M12.5704 6.57036C12.5704 4.11632 10.6342 2.11257 8.21016 2C8.14262 2 8.06757 2 8.00003 2C7.93249 2 7.85744 2 7.7899 2C5.35838 2.11257 3.42967 4.11632 3.42967 6.57036C3.42967 6.60037 3.42967 6.6379 3.42967 6.66792C3.42967 6.69794 3.42967 6.73546 3.42967 6.76548C3.42967 9.46717 7.09196 13.3621 7.4672 13.7598C7.61729 13.9174 7.84994 14 8.00003 14C8.15012 14 8.38277 13.9174 8.53286 13.7598C8.9156 13.3621 12.5704 9.46717 12.5704 6.76548C12.5704 6.72795 12.5704 6.69794 12.5704 6.66792C12.5704 6.6379 12.5704 6.60037 12.5704 6.57036ZM7.99252 8.28893C7.04693 8.28893 6.27395 7.52345 6.27395 6.57036C6.27395 5.61726 7.03943 4.85178 7.99252 4.85178C8.94562 4.85178 9.7111 5.61726 9.7111 6.57036C9.7111 7.52345 8.94562 8.28893 7.99252 8.28893Z" fill="'.concat(e,'"/>\n  </svg>').trim();return"data:image/svg+xml;charset=utf-8,".concat(i)};class tx{static createAutocomplete(t){return new tx(t)}handleInput(){let t=this.inputField.value;t.length<this.config.minCharacters||this.debouncedFetchResults(t).then(t=>{let e=this.config.onResults;e&&e(t),this.displayResults(t)}
1).catch(t=>{o.warn("Autocomplete ui error: ".concat(t.message));let e=this.config.onError;e&&e(t)})}debounce(t,e){let i,r,s;var a=this;return function(){for(var n=arguments.length,o=Array(n),l=0;l<n;l++)o[l]=arguments[l];return clearTimeout(i),i=setTimeout(()=>{let e=t.apply(a,o);e instanceof Promise&&e.then(t=>{r&&r(t)}).catch(t=>{s&&s(t)})},e),new Promise((t,e)=>{r=t,s=e})}}fetchResults(t){return c(this,void 0,void 0,function*(){let{limit:e,layers:i,countryCode:r,expandUnits:s,mailable:a,lang:n,postalCode:o,onRequest:l}=this.config,c={query:t,limit:e,layers:i,countryCode:r,expandUnits:s,mailable:a,lang:n,postalCode:o};this.near&&(c.near=this.near),l&&l(c);let{addresses:d}=yield j.autocomplete(c,"autocomplete-ui");return d})}displayResults(t){let e;if(this.clearResultsList(),this.results=t,this.config.showMarkers&&((e=document.createElement("img")).classList.add(tS.RESULTS_MARKER),e.setAttribute("src",tk(this.config.markerColor))),t.forEach((t,i)=>{let r,s=document.createElement("li");if(s.classList.add(tS.RESULTS_ITEM),s.setAttribute("role","option"),s.setAttribute("id","".concat(tS.RESULTS_ITEM,"}-").concat(i)),t.formattedAddress.includes(t.addressLabel)&&"postalCode"!==t.layer){let e=new RegExp("(".concat(t.addressLabel,"),?"));r=t.formattedAddress.replace(e,"<b>$1</b>")}else{let e=t.placeLabel||t.addressLabel;r="<b>".concat(e,"</b> ").concat(t.formattedAddress)}s.innerHTML=r,e&&s.prepend(e.cloneNode()),s.addEventListener("mousedown",()=>{this.select(i)}),this.resultsList.appendChild(s)}),this.open(),t.length>0){let t=document.createElement("a");t.href="https://radar.com?ref=powered_by_radar",t.target="_blank",this.poweredByLink=t;let e=document.createElement("span");e.textContent="Powered by",t.appendChild(e);let i=document.createElement("span");i.id="radar-powered-logo",i.textContent="Radar",t.appendChild(i);let r=document.createElement("div");r.classList.add(tS.POWERED_BY_RADAR),r.appendChild(t),this.resultsList.appendChild(r)}else{let t=document.createElement("div");t.classList.add(tS.NO_RESULTS),t.textContent="No results",this.resultsList.appendChild(t)}}open(){this.isOpen||(this.inputField.setAttribute("aria-expanded","true"),this.resultsList.removeAttribute("hidden"),this.isOpen=!0)}close(t){this.isOpen&&setTimeout(()=>{this.inputField.setAttribute("aria-expanded","false"),this.inputField.setAttribute("aria-activedescendant",""),this.resultsList.setAttribute("hidden",""),this.highlightedIndex=-1,this.isOpen=!1,this.clearResultsList()},100*!!(t&&t.relatedTarget===this.poweredByLink))}goTo(t){if(!this.isOpen||!this.results.length)return;t<0?t=this.results.length-1:t>=this.results.length&&(t=0);let e=this.resultsList.getElementsByTagName("li");this.highlightedIndex>-1&&e[this.highlightedIndex].classList.remove(tS.SELECTED_ITEM),e[t].classList.add(tS.SELECTED_ITEM),this.inputField.setAttribute("aria-activedescendant","".concat(tS.RESULTS_ITEM,"-").concat(t)),this.highlightedIndex=t}handleKeyboardNavigation(t){let e=t.key;if(this.isOpen)switch("Tab"===e&&t.shiftKey&&(e="ArrowUp"),e){case"Tab":case"ArrowDown":t.preventDefault(),this.goTo(this.highlightedIndex+1);break;case"ArrowUp":t.preventDefault(),this.goTo(this.highlightedIndex-1);break;case"Enter":this.select(this.highlightedIndex);break;case"Esc":this.close()}}select(t){let e,i=this.results[t];if(!i)return void o.warn("No autocomplete result found at index: ".concat(t));if(i.formattedAddress.includes(i.addressLabel))e=i.formattedAddress;else{let t=i.placeLabel||i.addressLabel;e="".concat(t,", ").concat(i.formattedAddress)}this.inputField.value=e;let r=this.config.onSelection;r&&r(i),this.close()}clearResultsList(){this.resultsList.innerHTML="",this.results=[]}remove(){o.debug("AutocompleteUI removed."),this.inputField.remove(),this.resultsList.remove(),this.wrapper.remove()}setNear(t){return null==t?this.near=void 0:"string"==typeof t?this.near=t:this.near="".concat(t.latitude,",").concat(t.longitude),this}setPlaceholder(t){return this.config.placeholder=t,this.inputField.placeholder=t,this}setDisabled(t){return this.config.disabled=t,this.inputField.disabled=t,this}setResponsive(t){return this.config.responsive=t,tC(this.wrapper,this.config),this}setWidth(t){return null===t?this.config.width=void 0:("string"==typeof t||"number"==typeof t)&&(this.config.width=t),tC(this.wrapper,this.config),this}setMaxHeight(t){return null===t?this.config.maxHeight=void 0:("string"==typeof t||"number"==typeof t)&&(this.config.maxHeight=t),t_(this.resultsList,this.config),this}setMinCharacters(t){return this.config.minCharacters=t,this.config.threshold=t,this}setLimit(t){return this.config.limit=t,this}setLang(t){return null===t?this.config.lang=void 0:"string"==typeof t&&(this.config.lang=t),this}setPostalCode(t){return null===t?this.config.postalCode=void 0:"string"==typeof t&&(this.config.postalCode=t),this}setShowMarkers(t){if(this.config.showMarkers=t,t){let t=document.createElement("img");t.classList.add(tS.RESULTS_MARKER),t.setAttribute("src",tk(this.config.markerColor));let e=this.resultsList.getElementsByTagName("li");for(let i=0;i<e.length;i++)e[i].getElementsByClassName(tS.RESULTS_MARKER)[0]||e[i].prepend(t.cloneNode())}else{let t=this.resultsList.getElementsByTagName("li");for(let e=0;e<t.length;e++){let i=t[e].getElementsByClassName(tS.RESULTS_MARKER)[0];i&&i.remove()}}return this}setMarkerColor(t){this.config.markerColor=t;let e=this.resultsList.getElementsByClassName(tS.RESULTS_MARKER);for(let i=0;i<e.length;i++)e[i].setAttribute("src",tk(t));return this}setHideResultsOnBlur(t){return this.config.hideResultsOnBlur=t,t?this.inputField.addEventListener("blur",this.close.bind(this),!0):this.inputField.removeEventListener("blur",this.close.bind(this),!0),this}constructor(t={}){let e;if(this.config=Object.assign({},tO,t),this.isOpen=!1,this.debouncedFetchResults=this.debounce(this.fetchResults,this.config.debounceMS),this.results=[],this.highlightedIndex=-1,void 0!==this.config.threshold&&(this.config.minCharacters=this.config.threshold,o.warn('AutocompleteU
1I option "threshold" is deprecated, use "minCharacters" instead.')),t.near&&("string"==typeof t.near?this.near=t.near:this.near="".concat(t.near.latitude,",").concat(t.near.longitude)),!(e="string"==typeof this.config.container?document.getElementById(this.config.container):this.config.container))throw new T("Could not find container element: ".concat(this.config.container));if(this.container=e,this.wrapper=document.createElement("div"),this.wrapper.classList.add(tS.WRAPPER),this.wrapper.style.display=this.config.responsive?"block":"inline-block",tC(this.wrapper,this.config),this.resultsList=document.createElement("ul"),this.resultsList.classList.add(tS.RESULTS_LIST),this.resultsList.setAttribute("id",tS.RESULTS_LIST),this.resultsList.setAttribute("role","listbox"),this.resultsList.setAttribute("aria-live","polite"),this.resultsList.setAttribute("aria-label","Search results"),t_(this.resultsList,this.config),"INPUT"===e.nodeName)this.inputField=e,this.wrapper.appendChild(this.resultsList),e.parentNode.appendChild(this.wrapper);else{this.inputField=document.createElement("input"),this.inputField.classList.add(tS.INPUT),this.inputField.placeholder=this.config.placeholder,this.inputField.type="text",this.inputField.disabled=this.config.disabled;let t=document.createElement("div");t.classList.add(tS.SEARCH_ICON),this.wrapper.appendChild(this.inputField),this.wrapper.appendChild(this.resultsList),this.wrapper.appendChild(t),this.container.appendChild(this.wrapper)}this.inputField.setAttribute("autocomplete","off"),this.inputField.setAttribute("role","combobox"),this.inputField.setAttribute("aria-controls",tS.RESULTS_LIST),this.inputField.setAttribute("aria-expanded","false"),this.inputField.setAttribute("aria-haspopup","listbox"),this.inputField.setAttribute("aria-autocomplete","list"),this.inputField.setAttribute("aria-activedescendant",""),this.inputField.addEventListener("input",this.handleInput.bind(this)),this.inputField.addEventListener("keydown",this.handleKeyboardNavigation.bind(this)),this.config.hideResultsOnBlur&&this.inputField.addEventListener("blur",this.close.bind(this),!0),o.debug("AutocompleteUI initialized with options",this.config)}}class tD extends tt{static get ui(){return{maplibregl:tA.getMapLibre(),map:tA.createMap,marker:tA.createMarker,popup:tA.createPopup,autocomplete:tx.createAutocomplete}}}}}]);

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.