PageSourceSearch

https://www.uberhealth.com/_static/client-3581-5bcfa155020229f7.js

js uberhealth.com collected 2026-10-01 12:36:21 UTC 16,648 bytes, 2 lines download raw bytes

1(self.webpackChunkFusion=self.webpackChunkFusion||[]).push([[3581],{87431:t=>{t.exports=function(t,e,i){var o=null,n=null,s=function(){o&&(clearTimeout(o),n=null,o=null)},r=function(){if(!e)return t.apply(this,arguments);var r=this,a=arguments,l=i&&!o;return s(),n=function(){t.apply(r,a)},o=setTimeout((function(){if(o=null,!l){var t=n;return n=null,t()}}),e),l?n():void 0};return r.cancel=s,r.flush=function(){var t=n;s(),t&&t()},r}},93581:(t,e,i)=>{"use strict";i.d(e,{k:()=>R,g:()=>q});var o=i("__fusion__95b4ba69e5"),n=i(97873),s=i(43065),r=i(87431),a=i.n(r),l=i(22370),p=i(71659),c=i(5485),u=i(40014);class d extends o.PureComponent{render(){return(0,u.Y)(c.y,{$color:this.props.color})}}const h=d;var g=i(90417),f=i(18275);class m extends g.Component{render(){return(0,u.Y)(f.A,{viewBox:"0 0 24 24",...this.props,children:(0,u.Y)("path",{d:"M10.5 13.5L.5 11 21 3l-8 20.5-2.5-10z"})})}}function v(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}const{colors:x}=n.P,I=(0,s.I4)("div",(t=>{let{$rtl:e}=t;return{alignItems:"center",cursor:"pointer",display:"flex",fontSize:"16px",height:"100%",justifyContent:"center",position:"absolute",width:"1em",[e?"left":"right"]:"15px"}})),b=t=>{let{$error:e,$isLoadingCurrentLocation:i}=t;return{color:e?x.negative400:x.black,opacity:e||i?1:.2,":focus":{color:e?x.negative400:x.primary600,opacity:1},":hover":{color:x.primary600,opacity:1}}},k=(0,s.I4)(p.A,b),D=(0,s.I4)(m,b);class y extends o.PureComponent{constructor(){super(...arguments),v(this,"clearSelection",(()=>{this.props.clearSelection(this.props.type)})),v(this,"handleLocationKeyPress",(t=>{t&&"Enter"===t.key&&this.props.fetchCurrentLocation()})),v(this,"handleDeleteKeyPress",(t=>{t&&"Enter"===t.key&&this.clearSelection()}))}render(){const{rtl:t,isVisible:e,fetchCurrentLocation:i,localization:o,isLoadingCurrentLocation:n,error:s}=this.props;return n?(0,u.Y)(I,{$rtl:t,children:(0,u.Y)(h,{color:x.primary300})}):(0,u.Y)(I,{$rtl:t,children:e?(0,u.Y)(k,{$error:s,$isLoadingCurrentLocation:n,"aria-label":o.clearPickupAriaLabel,className:"pe-location-clear",height:"12px",role:"button",size:"small",tabIndex:"0",width:"12px",onClick:this.clearSelection,onKeyPress:this.handleDeleteKeyPress}):(0,u.Y)(D,{$error:s,$isLoadingCurrentLocation:n,"aria-label":o.locationLabel,className:"pe-location-fetch",height:"16px",role:"button",size:"small",tabIndex:"0",width:"16px",onClick:i,onKeyPress:this.handleLocationKeyPress})})}}var L=i(23025),P=i.n(L),S=i(79371);function C(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}const{colors:w}=n.P,$=(0,s.I4)("ul",{backgroundColor:w.primary50,border:0,left:0,listStyle:"none",margin:0,overflowY:"auto",padding:"16px 0",position:"absolute",right:0,zIndex:2}),E=(0,s.I4)("div",{backgroundColor:w.black,height:"1px",left:"18px",opacity:.1,position:"absolute",right:"18px",top:0}),F=(0,s.I4)("li",(t=>{let{$focused:e}=t;return{alignItems:"center",backgroundColor:e?w.primary200:w.primary50,boxSizing:"border-box",color:w.primary,cursor:"pointer",display:"flex",fontSize:"16px",lineHeight:"26px",minHeight:"45px",padding:"0 43px"}})),T=(0,s.I4)("span",{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"});class Y extends o.PureComponent{constructor(){super(...arguments),C(this,"handleKeysPressed",(t=>{const{items:e,closeList:i,type:o,focusedIndex:n}=this.props;if(e){let s;if("ArrowDown"===t.key&&(s=null===n||n>=e.length-1?0:n+1,t.preventDefault&&t.preventDefault(),this.props.focusIndex(s)),"ArrowUp"===t.key&&(s=null===n||n<=0?e.length-1:n-1,t.preventDefault&&t.preventDefault(),this.props.focusIndex(s)),"Enter"===t.key){const{id:i,provider:o}=e[n];return t.preventDefault&&t.preventDefault(),this.props.onClickItem(i,o,n)}if("Escape"===t.key&&o)return t.preventDefault&&t.preventDefault(),i(o)}})),C(this,"findFirstStringIndices",((t,e)=>{const i=e.toLowerCase(),o=(t||"").trim().toLowerCase(),n=[];if(o){let t=!0;for(;t;){const e=n.length?n[n.length-1]-1:void 0,s=i.lastIndexOf(o,e);-1!==s&&n.push(s),-1!==s&&s||(t=!1)}}return n})),C(this,"getSuggestionItem",(t=>{const e=(this.props.inputValue||"").trim();if(e){const i=this.findFirstStringIndices(e,t);if(i.length){let o=t;
1return i.forEach((t=>{o=o.slice(0,t)+"<strong>".concat(o.slice(t,t+e.length),"</strong>")+o.slice(t+e.length,o.length)})),o}}return t}))}componentDidMount(){P()&&P().addEventListener("keydown",this.handleKeysPressed)}componentWillUnmount(){P()&&P().removeEventListener("keydown",this.handleKeysPressed)}render(){const{type:t,items:e,listBoxId:i,focusedIndex:o}=this.props;return t&&(0,u.FD)($,{className:"pe-suggestions",id:i,role:"listbox",children:[(0,u.Y)(E,{}),e&&e.map(((i,n)=>{const{addressLine1:s,addressLine2:r,id:a,provider:l}=i,p="".concat(s).concat(r?", ".concat(r):"");return(0,u.Y)(F,{$focused:o===n,$isLast:n===e.length-1,"aria-label":"location suggestion item","aria-selected":o===n,className:"pe-suggestions-item",id:a,role:"option",onClick:()=>this.props.onClickItem(a,l,n),...S.bg,children:(0,u.Y)(T,{dangerouslySetInnerHTML:{__html:this.getSuggestionItem(p)}})},"".concat(t,"-suggestion-").concat(n))}))]})}}function B(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}const{colors:z}=n.P,{values:{fontFamily:A,mediaQueries:K}}=l.Ay,R=1,j={content:'""',height:"6px",left:"-3px",position:"absolute",width:"6px"},N=(0,s.I4)("div",(t=>{let{$rtl:e,$hidden:i,$pickup:o,$destination:n}=t;return{backgroundColor:i?"none":z.black,bottom:"33px",position:"absolute",top:"33px",width:"1px",[e?"right":"left"]:"22px",":after":{...j,backgroundColor:o?z.black:z.primary50,border:"1px solid ".concat(z.black),borderRadius:"50%",top:"-10px"},":before":{...j,backgroundColor:n?z.black:z.primary50,border:"1px solid ".concat(z.black),bottom:"-10px",height:"5px",width:"5px"}}})),V=(0,s.I4)("div",(t=>{let{$removeTopMargin:e}=t;return{flex:"0 0 auto",fontFamily:A.body,marginBottom:"13px",marginTop:e?0:"31px",position:"relative",[K.palm]:{marginBottom:"26px",marginTop:e?0:"20px"}}})),M=(0,s.I4)("div",(t=>{let{$gutter:e}=t;return{display:"flex",flexDirection:"row",marginTop:e?0:"8px",position:"relative",width:"100%"}})),H=(0,s.I4)("div",{display:"flex",flex:"1 1 auto",flexDirection:"row",position:"relative"}),O=(0,s.I4)("input",(t=>{let{$theme:e,$error:i,$rtl:o}=t;const{typography:n}=e;return{backgroundColor:z.primary50,border:"none",boxSizing:"border-box",color:i?z.negative400:z.black,flex:1,margin:0,minHeight:"52px",outline:"none",overflow:"hidden",paddingBottom:"11px",paddingTop:"11px",position:"relative",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",zIndex:0,[o?"paddingLeft":"paddingRight"]:"33px",[o?"paddingRight":"paddingLeft"]:"41px",...n.font300}})),_=(0,s.I4)("div",(t=>{let{$rtl:e}=t;return{alignItems:"center",cursor:"pointer",display:"flex",fontSize:"23px",height:"100%",justifyContent:"center",position:"absolute",width:"16px",[e?"left":"right"]:"15px"}})),U=(0,s.I4)(p.A,{color:z.black,opacity:.2,":focus":{color:z.primary600,opacity:1},":hover":{color:z.primary600,opacity:1}});class q extends o.PureComponent{constructor(t){super(t),B(this,"state",{destinationInput:"",focusedInput:null,isDetectionError:!1,pickupInput:"",prevDestinationDetails:null,prevPickupDetails:null,focusedDestinationIndex:0,focusedPickupIndex:0}),B(this,"destinationListBoxId","destination-suggestions-listbox-".concat(Math.random())),B(this,"pickupListBoxId","pickup-suggestions-listbox-".concat(Math.random())),B(this,"mapToSubmitEstimatePoint",((t,e)=>({id:t.id,latitude:t.lat,locale:e,longitude:t.long,provider:t.provider}))),B(this,"setInputValue",((t,e)=>{this.setState({["".concat(t,"Input")]:this.getInputValueFromPoint(e)})})),B(this,"getInputValueFromPoint",(t=>t.addressLine1&&t.addressLine2?"".concat(t.addressLine1,", ").concat(t.addressLine2):"".concat(t.fullAddress))),B(this,"fetchSuggestions",(t=>{const{locale:e}=this.props,{lat:i,long:o}=this.getTargetLatLng();this.props.getSuggestions({lat:i,locale:e,long:o,q:t.value,type:t.name})})),B(this,"getTargetLatLng",(()=>
1{const{mapCenter:t,pickupDetails:e,destinationDetails:i}=this.props;return e&&e.lat?{lat:e.lat,long:e.long}:i&&i.lat?{lat:i.lat,long:i.long}:{lat:null==t?void 0:t.latitude,long:null==t?void 0:t.longitude}})),B(this,"clickSuggestionItem",((t,e,i)=>{const o=this.state.focusedInput,{locale:n,suggestions:s}=this.props;var r,a;o&&s&&s[o]&&(this.props.loadPlaceDetails({id:(null===(r=s[o])||void 0===r?void 0:r[i].id)||"",locale:n,provider:(null===(a=s[o])||void 0===a?void 0:a[i].provider)||"",type:o}),this.loadNextChangedPlace("pickup"===this.state.focusedInput?"destination":"pickup"))})),B(this,"focusIndex",(t=>{const e=this.state.focusedInput;if(e){const i="pickup"===e?"focusedPickupIndex":"focusedDestinationIndex";this.setState({[i]:t})}})),B(this,"loadNextChangedPlace",(t=>{var e,i,o;this.props.suggestions[t]&&null!==(e=this.props.suggestions[t])&&void 0!==e&&e.length&&(!this.props["".concat(t,"Details")]&&this.state["".concat(t,"Input")]||this.props["".concat(t,"Details")]&&this.state["".concat(t,"Input")]!==this.getInputValueFromPoint(this.props["".concat(t,"Details")]))&&this.props.loadPlaceDetails({id:(null===(i=this.props.suggestions[t])||void 0===i?void 0:i[0].id)||"",locale:this.props.locale,provider:(null===(o=this.props.suggestions[t])||void 0===o?void 0:o[0].provider)||"",type:t});this.setState({focusedInput:null})})),B(this,"focusPickup",(()=>{this.pickupRef.focus()})),B(this,"focusDestination",(()=>{this.destinationRef.focus()})),B(this,"clearInput",(t=>{this.setState({["".concat(t,"Input")]:"",focusedInput:null,["".concat(t,"InputChanged")]:!1}),this.fetchSuggestions({name:t,value:""}),this.props["".concat(t,"Details")]&&(this.props.clearFEPlaceDetails(t),this.props.clearFEDirections())})),B(this,"closeSuggestionsList",(t=>{this.setState({focusedInput:null}),this["".concat(t,"Ref")].blur()})),B(this,"triggerDetactionError",((t,e)=>{this.setState({isDetectionError:t&&e===R},(()=>{this.props.setDetectionError(t,e)}))})),B(this,"fetchCurrentLocation",(()=>{this.triggerDetactionError(!1),window&&navigator.geolocation.getCurrentPosition((t=>{t&&t.coords?(this.props.fetchCurrentLocation({lang:this.props.locale,lat:t.coords.latitude,lng:t.coords.longitude}),this.loadNextChangedPlace("destination")):this.triggerDetactionError(!0)}),(t=>{this.triggerDetactionError(!0,t.code)}))})),B(this,"onInputChanged",(t=>{let{target:e}=t;this.setState({["".concat(e.name,"Input")]:e.value,focusedInput:e.name,["".concat(e.name,"InputChanged")]:!0},(()=>{this.triggerDetactionError(!1),this.fetchSuggestions(e)}))})),B(this,"onInputFocused",(t=>{let{target:e}=t;return this.setState({focusedInput:e.name})})),B(this,"onInputBlured",(t=>{let{target:e}=t;setTimeout((()=>{e.name===this.state.focusedInput&&this.setState({focusedInput:null})}),150),this.props.dataTrackingHandler&&this.props.dataTrackingHandler(e.value,e.name)})),B(this,"clearDestinationSelection",(()=>this.clearInput("destination"))),B(this,"saveDestRef",(t=>this.destinationRef=t)),B(this,"savePickupRef",(t=>this.pickupRef=t)),B(this,"handleDeleteDestinationKeyPress",(t=>{t&&"Enter"===t.key&&this.clearDestinationSelection()})),this.fetchSuggestions=a()(this.fetchSuggestions,300)}static getDerivedStateFromProps(t,e){const{isPickupUsingCurrentLocation:i,destinationDetails:o,pickupDetails:n}=t,{prevDestinationDetails:s,prevPickupDetails:r,destinationInput:a}=e,l=!r||n!==r,p=n&&l&&{pickupInput:n.addressLine1,prevPickupDetails:n};if(i&&p){const t=o&&!a?{destinationInput:o.fullAddress}:{};return{...p,...t}}const c=o&&(!s||o!==s)&&{destinationInput:o.fullAddress,prevDestinationDetails:o},u=n&&l&&{pickupInput:n.fullAddress,prevPickupDetails:n};return c||u?{...c||{},...u||{}}:e}componentDidUpdate(t){let e=!1;this.props.pickupDetails&&t.pickupDetails!==this.props.pickupDetails&&(this.setInputValue("pickup",this.props.pickupDetails),e=!0),this.props.destinationDetails&&t.destinationDetails!==this.props.destinationDetails&&(this.setInputValue("destination",this.props.destinationDetails),e=!0),!e||this.props.placeDetailsLoading.pickup||this.props.placeDetailsLoading.destination||(this.props.destinationDetail
1s&&this.props.pickupDetails&&(this.props.loadFEDirections&&this.props.loadFEDirections({destinationDetails:this.props.destinationDetails,pickupDetails:this.props.pickupDetails}),this.props.loadFareEstimates&&this.props.loadFareEstimates({destination:this.mapToSubmitEstimatePoint(this.props.destinationDetails,this.props.locale),locale:this.props.locale,origin:this.mapToSubmitEstimatePoint(this.props.pickupDetails,this.props.locale)})),this.props.pickupDetails&&!this.props.destinationDetails?this.focusDestination():!this.props.pickupDetails&&this.props.destinationDetails&&this.focusPickup())}render(){var t,e,i;const{localization:o,suggestions:n,errors:s,isLoadingCurrentLocation:r,rtl:a,pickupDetails:l,destinationDetails:p,removeTopMargin:c}=this.props,{pickupInput:d,destinationInput:h,focusedInput:g,isDetectionError:f,focusedPickupIndex:m,focusedDestinationIndex:v}=this.state,x=g&&n&&n[g],I=!(null==x||!x.length)&&"pickup"===g,b=!(null==x||!x.length)&&"destination"===g,k=I&&(null==x||null===(t=x[m])||void 0===t?void 0:t.id),D=b&&(null==x||null===(e=x[v])||void 0===e?void 0:e.id);return(0,u.FD)(V,{$removeTopMargin:c,children:[(0,u.FD)(M,{"aria-expanded":I,"aria-haspopup":"listbox","aria-owns":this.pickupListBoxId,role:"combobox",$gutter:!0,children:[(0,u.Y)(O,{ref:this.savePickupRef,$error:s&&s.pickup||f,$rtl:a,"aria-activedescendant":k,"aria-autocomplete":"list","aria-controls":this.pickupListBoxId,"aria-label":null==o?void 0:o.pickupAriaLabel,autoComplete:"off",name:"pickup",placeholder:null==o?void 0:o.pickupPlaceholder,title:d,type:"text",value:d,onBlur:this.onInputBlured,onChange:this.onInputChanged,onFocus:this.onInputFocused}),(0,u.Y)(y,{clearSelection:this.clearInput,error:f,fetchCurrentLocation:this.fetchCurrentLocation,isLoadingCurrentLocation:r,isVisible:!(null==d||!d.length),localization:o,rtl:a,type:"pickup"})]}),I&&(0,u.Y)(Y,{closeList:this.closeSuggestionsList,focusIndex:this.focusIndex,focusedIndex:m,inputValue:d,items:x,listBoxId:this.pickupListBoxId,type:g,onClickItem:this.clickSuggestionItem}),(0,u.Y)(M,{$gutter:!1,"aria-expanded":b,"aria-haspopup":"listbox","aria-owns":this.destinationListBoxId,role:"combobox",children:(0,u.FD)(H,{children:[(0,u.Y)(O,{ref:this.saveDestRef,$error:s&&s.destination,$rtl:a,"aria-activedescendant":D,"aria-autocomplete":"list","aria-controls":this.destinationListBoxId,"aria-label":null==o?void 0:o.destinationAriaLabel,autoComplete:"off",name:"destination",placeholder:null==o?void 0:o.destinationPlaceholder,title:h,type:"text",value:h,onBlur:this.onInputBlured,onChange:this.onInputChanged,onFocus:this.onInputFocused}),!(!h||!h.length)&&(0,u.Y)(_,{$rtl:a,children:(0,u.Y)(U,{"aria-label":null==o?void 0:o.clearDestinationAriaLabel,className:"pe-location-clear",height:"12px",role:"button",size:"small",tabIndex:"0",width:"12px",onClick:this.clearDestinationSelection,onKeyPress:this.handleDeleteDestinationKeyPress})})]})}),b&&(0,u.Y)(Y,{closeList:this.closeSuggestionsList,focusIndex:this.focusIndex,focusedIndex:v,inputValue:h,items:x,listBoxId:this.destinationListBoxId,type:g,onClickItem:this.clickSuggestionItem}),(0,u.Y)(N,{$destination:!!p,$hidden:"pickup"===g&&n&&n[g]&&!(null===(i=n[g])||void 0===i||!i.length),$pickup:!!l,$rtl:a})]})}}B(q,"defaultProps",{placeDetailsLoading:{},removeTopMargin:!1})}}]);
2//# sourceMappingURL=https://sourcemaps.uberinternal.com/raw/uber-sites/client-3581-5bcfa155020229f7.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.