1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[98992],{98992:function(t,e,r){r.d(e,{C1:function(){return b},C4:function(){return C},Iq:function(){return O},Kg:function(){return h},My:function(){return N},Nc:function(){return g},Nn:function(){return y},Pm:function(){return v},Tp:function(){return I},Tu:function(){return F},Uk:function(){return P},Um:function(){return f},V$:function(){return p},Xd:function(){return T},b2:function(){return E},bf:function(){return j},cO:function(){return B},fE:function(){return l},fk:function(){return S},g0:function(){return k},iR:function(){return s},ns:function(){return w},q3:function(){return d},qH:function(){return u},qm:function(){return c},qn:function(){return A},w$:function(){return _}});var o=r(99607),n=r(8168),a=r(89825);let i="https://apiprod.upcar.ai/v1",c=async(t,e)=>{try{let r=await fetch("".concat(i,"/users/gethost/").concat(t),{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}});if(r.ok)return(await r.json()).data;{let t=await r.json();throw console.error("Failed to fetch host details, error:",t),Error("Failed to fetch host details")}}catch(t){throw console.error("Error occurred while fetching host details:",t),Error("An error occurred while fetching the host details. Please try again.")}},s=async(t,e)=>{try{let r=await fetch("".concat(i,"/users/getuser/").concat(t),{method:"GET",headers:{Authorization:"Bearer ".concat(null!=e?e:localStorage.getItem("authToken"))}});if(!r.ok)throw Error("Failed to fetch user details.");return await r.json()}catch(t){throw console.error("Error fetching user details:",t),t}},l=async(t,e)=>{try{let r=await fetch("".concat(i,"/users/setNotification"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify(e)}),o=await r.json();if(!r.ok)throw Error(o.message||"Failed to update notification settings.");return o}catch(t){throw console.error("Error updating notification settings:",t),t}},u=async(t,e)=>{try{await fetch("".concat("https://apiprod.upcar.ai/v1","/users/update/homeLocation"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({street:t.address.street,city:t.address.city,state:t.address.state,zip:t.address.zip,country:t.address.country,latitude:t.latitude,longitude:t.longitude,placeType:t.placeType})})}catch(t){}},h=async t=>{try{let e=await fetch("".concat(i,"/users/getHostStatus"),{method:"GET",headers:{Authorization:"Bearer ".concat(t)}});if(!e.ok)throw Error("Failed to fetch user details.");return await e.json()}catch(t){throw console.error("Error fetching user details:",t),t}},d=async(t,e,r)=>{try{let o=await fetch("".concat(i,"/users/getPaymentInfo"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(r)},body:JSON.stringify({userId:t,paymentMethodId:e})});if(!o.ok){let t=await o.json();throw Error(t.message||"An error occurred while retrieving payment information")}return(await o.json()).paymentMethod}catch(t){throw console.error("Error retrieving payment method:",t.message),Error(t.message||"An error occurred while retrieving payment information")}},p=async(t,e)=>{try{let r=await fetch("".concat("https://apiprod.upcar.ai/v1","/users/updateTransmissionStatus"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({transmissionExpert:t})});if(!r.ok){let t=await r.json();throw Error(t.message||"An error occurred while updating transmission status")}return await r.json()}catch(t){throw console.error("Error updating transmission status:",t.message),Error(t.message||"An error occurred while updating transmission status")}},f=async(t,e)=>{try{let r=await fetch("".concat(i,"/payment/stripe/getPrimaryPaymentMethod"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({userId:t})});if(!r.ok){let t=await r.json();throw Error(t.message||"Failed to fetch payment method")}return await r.json()}catch(t){throw Error(t.message)}},g=async t=>{try{let e=await fetch("".concat(i,"/users/checkDlAndSelfieKeys"),{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)}});if(!e.ok){let t=await e.json();throw Error(t.message||"Failed to fetch DL and Selfie keys")}return await e.json()}catch(t){throw Error(t.message)}},y="upcar:favorite-toggled",m=(t,e,r)=>{let o=n.p_?e?"gig":null:null!=e?e:null;window.dispatchEvent(new CustomEvent(y,{detail:{carId:String(t),variant:o,isFav:r}}))},w=async function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,o.j)();try{let o=await fetch("".concat(i,"/users/addFav/").concat(e),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({carId:e,variant:r})});if(!o.ok){let t=await o.json();throw Error(t.message||"Failed to add car to favorites")}let n=await o.json();return m(e,r,!0),n}catch(t){throw console.error("Error adding car to favorites:",t.message),Error(t.message)}},v=async(t,e,r)=>{try{let o=await fetch("".concat(i,"/users/removeFav/").concat(e),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify(r?{carId:e,variant:r}:{carId:e})});if(!o.ok){let t=await o.json();throw Error(t.message||"Failed to remove car from favorites")}let n=await o.json();return m(e,r,!1),n}catch(t){throw console.error("Error removing car from favorites:",t.message),Error(t.message)}},k=async t=>{try{let e=await fetch("".concat(i,"/users/getFavCars"),{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)}});if(!e.ok){let t=await e.json();throw Error(t.message||"Failed to get car from favorites")}return await e.json()}catch(t){throw console.error("Error fetching car from favorites:",t.message),Error(t.message)}},b=async(t,e,r)=>{try{let o=await fetch("".concat(i,"/trips/addAdditionalDriver"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({tripId:r,additionalDriverEmails:e})});if(!o.ok){let t=await o.json();return{status:!1,error:t.message||"Failed to invite additional driver"}}return await o.json()}catch(t){console.error("Error inviting additional driver:",t.message)}},T=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:365,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;try{let o="".concat(i,"/hostbusiness/getReviewsForHost?timeRange=").concat(e);r&&(o+="&hostId=".concat(r));let n={"Content-Type":"application/json"};t&&(n.Authorization="Bearer ".concat(t));let a=await fetch(o,{method:"GET",headers:n});if(!a.ok){let t=await a.json();throw Error(t.message||"Failed to fetch reviews")}return await a.json()}catch(t){return console.error("Error fetching reviews:",t.message),null}},E=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{let r="".concat(i,"/hostReviews/host-ratings/").concat(t),o={"Content-Type":"application/json"};e&&(o.Authorization="Bearer ".concat(e));let n=await fetch(r,{method:"GET",headers:o});if(!n.ok){let t=await n.json();throw Error(t.message||"Failed to fetch host ratings")}return await n.json()}catch(t){return console.error("Error fetching host ratings:",t.message),null}},j=async(t,e,r)=>{r||(r=localStorage.getItem("token"));try{let o=await fetch("".concat(i,"/cars/respondToCarReview"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(r)},body:JSON.stringify({ratingId:t,responseMessage:e})});return await o.json()}catch(t){throw console.error("Error posting response:",t.message),t}},S=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"365";try{let r=await fetch("".concat(i,"/hostbusiness/getPerformanceData?timeRange=").concat(e),{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)}}),o=await r.json();if(!r.ok)throw Error(o.message||"Failed to fetch performance data");return o.data}catch(t){return console.error("Error fetching performance data:",t.message),null}},A=async(t,e,r)=>{if("boolean"!=typeof r)throw Error("isAlwaysAvailable must be a boolean.");try{let o=await fetch("".concat("https://apiprod.upcar.ai/v1","/trips/updateWeeklyAvailability"),{method:"POST",headers:{Authorization:"Bearer ".concat(t),"Content-Type":"application/json"},body:JSON.stringify({weeklyAvailability:e,isAlwaysAvailable:r})});if(!o.ok){let t=await o.json();throw Error(t.message||"Failed to update weekly availability.")}return await o.json()}catch(t){throw console.error("Error updating weekly availability:",t.message),t}},B=async t=>{try{let e=await fetch("".concat(i,"/trips/getHostWeeklyAvailability"),{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)}});if(!e.ok){let t=await e.json();throw Error(t.message||"Failed to fetch reviews")}let r=await e.json();if(r.status)return r;return console.error("Error:",r.message),null}catch(t){return console.error("Error fetching host availability:",t.message),null}},C=async(t,e,r)=>{if(!["add","update","delete"].includes(e))throw Error("Invalid action. Valid actions are 'add', 'update', or 'delete'.");if(!Array.isArray(r)||0===r.length)throw Error("customAvailability must be a non-empty array.");try{let o=await fetch("".concat("https://apiprod.upcar.ai/v1","/trips/updateCustomAvailabilityForHost"),{method:"POST",headers:{Authorization:"Bearer ".concat(t),"Content-Type":"application/json"},body:JSON.stringify({action:e,customAvailability:r})});if(!o.ok){let t=await o.json();throw Error(t.message||"Failed to update custom availability.")}return await o.json()}catch(t){throw console.error("Error updating custom availability:",t.message),t}},O=async t=>{try{let e=await fetch("".concat("https://apiprod.upcar.ai/v1","/trips/getCustomAvailabilityForHost"),{method:"GET",headers:{Authorization:"Bearer ".concat(t),"Content-Type":"application/json"}});if(!e.ok){let t=await e.json();throw Error(t.message||"Failed to fetch custom availability.")}return await e.json()}catch(t){throw console.error("Error fetching custom availability:",t.message),t}},N=async t=>{try{let e=await fetch("".concat(i,"/users/my-referrals"),{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)}});return await e.json()}catch(t){throw console.error("Error fetching referrals:",t),Error("Failed to fetch referrals")}},I=async(t,e)=>
1{try{await fetch("".concat(i,"/users/log-referral-share"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({channel:e})})}catch(t){console.error("Error logging referral share:",t)}},P=async t=>{try{let e=await a.ZP.post("/users/changeEmail",{email:t});return{ok:!0,data:e.data}}catch(t){if(t.response)return{ok:!1,data:t.response.data};throw t}},F=async t=>{try{let e=await a.ZP.get("/users/getuser/".concat(t));return{ok:!0,data:e.data}}catch(t){if(t.response)return{ok:!1,data:t.response.data};throw t}},_=async t=>{try{return(await a.ZP.post("/users/sendEmail",{email:t})).data}catch(t){if(t.response)return t.response.data;throw t}}},99607:function(t,e,r){r.d(e,{j:function(){return a}});var o=r(8168),n=r(68902);let a=()=>{if(o.p_)return"gig";try{var t;let e=window.localStorage.getItem("subscriptionViewState");if(!e)return n.jY;return(null===(t=JSON.parse(e))||void 0===t?void 0:t.isSubscriptionView)?"subscription":n.jY}catch(t){return n.jY}}},68902:function(t,e,r){r.d(e,{IM:function(){return h},YF:function(){return u},ZH:function(){return d},dG:function(){return s},jY:function(){return a},mQ:function(){return p}});let o="upcar:recentlyViewed:v1",n=["rental","subscription","gig"],a="rental",i=()=>!0,c=t=>n.includes(t)?t:a,s=()=>{if(!i())return[];try{let t=window.localStorage.getItem(o);if(!t)return[];let e=JSON.parse(t);if(!Array.isArray(e))return[];return e.filter(t=>!!t&&"string"==typeof t.carId&&t.carId.length>0).map(t=>({...t,mode:c(t.mode)}))}catch(t){return[]}},l=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;return s().filter(e=>e.mode===t).slice(0,10)},u=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;return l(t).map(t=>t.carId)},h=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if(i()&&t)try{let r=s(),n=[{carId:t,viewedAt:new Date().toISOString(),mode:e},...r.filter(r=>r.mode===e&&r.carId!==t)].slice(0,10),a=r.filter(t=>t.mode!==e);window.localStorage.setItem(o,JSON.stringify([...n,...a]))}catch(t){}},d=()=>{if(i())try{window.localStorage.removeItem(o)}catch(t){}},p=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;if(i())try{let e=s().filter(e=>e.mode!==t);e.length?window.localStorage.setItem(o,JSON.stringify(e)):window.localStorage.removeItem(o)}catch(t){}}},8168:function(t,e,r){r.d(e,{B1:function(){return f},CT:function(){return h},E_:function(){return y},V8:function(){return E},_U:function(){return w},a6:function(){return s},bU:function(){return T},eI:function(){return k},gu:function(){return l},iB:function(){return i},k2:function(){return g},lw:function(){return S},m8:function(){return p},oQ:function(){return u},p_:function(){return n},rW:function(){return c},uj:function(){return a},v3:function(){return v},wB:function(){return d},wO:function(){return b},wX:function(){return j},xp:function(){return m}});var o=r(68571);let n=!1,a=!1,i="yes"===o.env.NEXT_PUBLIC_HORIZONTAL_FILTER,c=n?30:35,s=3,l=6,u=20,h="https://apiprod.upcar.ai/v1",d="https://www.upcar.ai",p=10,f={Decline:"Decline",Minimum:"Minimum",Standard:"Standard",Premium:"Premium"},g={tickets:{title:"Tickets",description:"You can charge for ticket costs your guests incurred. Clearly show the date, time, location, license plate/VIN noted on the ticket for documentation. Late fee for tickets can be changed for if they meet the requirements for ticket incidentals.",linkText:"Learn more about ticket incidentals",linkHref:"/help-center/post-booking-payments?policy=tickets"},tolls:{title:"Tolls",description:"You can charge for any transponder costs incurred during the trip. Clearly show the date, time, location, license plate/VIN noted on the toll receipt for documentation.",linkText:"Learn more about toll incidentals",linkHref:"/help-center/post-booking-payments?policy=tolls"},additional_distance:{title:"Additional distance",description:"You can charge guests for every additional mile driven beyond the distance included with the trip. The additional distance rate for this trip is",linkText:"Learn more about the additional distance policy",linkHref:"/help-center/post-booking-payments?policy=mileage",inputTitle:"Additional distance (miles)",inputPlaceholder:"Enter distance"},post_trip_recharging:{title:"Post Trip Recharging",description:"You can charge for any transponder costs incurred after the trip. Clearly show the date, time, location, license plate/VIN noted on the toll receipt for documentation.",linkText:"Learn more about post trip recharging",linkHref:"/help-center/post-booking-payments?policy=recharging"},on_trip_recharging:{title:"On Trip Recharging",description:"You can charge for any transponder costs incurred during the trip. Clearly show the date, time, location, license plate/VIN noted on the toll receipt for documentation.",linkText:"Learn more about on trip recharging",linkHref:"/help-center/post-booking-payments?policy=recharging"},post_trip_refueling:{title:"Post Trip Refueling",description:"You can charge for any refueling costs incurred after the trip. Clearly show the pre-trip and post-trip fuel levels and the refueling cost.",linkText:"Learn more about on trip refueling",linkHref:"/help-center/post-booking-payments?policy=refueling"},not_returned:{title:"Vehicle Not Returned",description:"Report a vehicle that has not been returned by the guest after the booking end time.",photoLabel:"Supporting Documentation",photoDescription:"You may attach any relevant documentation, such as communication with the guest, location details, or other evidence that supports your report. This helps us investigate the situation more effectively.",linkText:"Learn more about no return procedures",linkHref:"/help-center/post-booking-payments?policy=no_return"},late_return:{title:"Vehicle Late Return",description:"Submit a Vehicle Late Return report when a vehicle is returned beyond the permitted time.",photoLabel:"Photo evidence",photoDescription:"You may attach relevant photos taken within 24 hours of the booking end time to supp
1ort your report. While not required, providing evidence helps ensure accurate processing.",linkText:"Learn more about late return fees",linkHref:"/help-center/post-booking-payments?policy=late_return"},smoking_violation:{title:"Smoking violation",description:"You can request a smoking violation fee when there is physical evidence of smoking. If the evidence supports an eligible smoking violation, we'll charge the guest, add the violation fee to your host earnings, and remove the guest from Upcar.",photoLabel:"Photo evidence",photoDescription:"You must attach relevant pre- and post-booking photos taken within 24 hours of the booking start and end. If you fail to supply sufficient evidence, we may be unable to charge a violation fee or remove the guest.",linkText:"Learn more about the smoking incidental policy",linkHref:"/help-center/post-booking-payments?policy=smoking"},cleaning_violation:{title:"Cleaning violation",description:"You can request a cleaning violation fee if a guest returns your vehicle in a condition that could only have resulted from irresponsible or abusive behavior.",photoLabel:"Photo evidence",photoDescription:"You must attach relevant pre- and post-booking photos taken within 24 hours of the booking start and end. If you fail to supply sufficient evidence, we may be unable to charge a violation fee or remove the guest.",linkText:"Learn more about the cleaning incidental policy",linkHref:"/help-center/post-booking-payments?policy=cleaning"},additional_charges:{title:"Additional Charges",description:"You can add any additional charges that occurred during or after the trip. This is a flexible incidental that can be used for various types of charges not covered by other specific incidentals.",photoLabel:"Supporting Documentation (Optional)",photoDescription:"You may attach any relevant documentation, receipts, or photos that support this additional charge. While not required, providing evidence helps ensure accurate processing.",linkText:"Learn more about additional charges",linkHref:"/help-center/post-booking-payments?policy=additional_charges"}},y={NewBooking:"New Booking",BookingStart:"Booking Start","Booking3/4thTime":"3/4th of Booking",BookingEndTime:"Booking End"},m={"New Booking":"NewBooking","Booking Start":"BookingStart","3/4th of Booking":"Booking3/4thTime","Booking End":"BookingEndTime"},w={all:"All Trips",anyDeliveryType:"Any Delivery Type",noDelivery:"No Delivery",customDelivery:"Custom Delivery",airportDelivery:"Airport Delivery"},v=[{value:0,label:"At the time"},{value:5,label:"5 minutes"},{value:15,label:"15 minutes"},{value:30,label:"30 minutes"},{value:45,label:"45 minutes"},{value:60,label:"1 hour"},{value:120,label:"2 hours"},{value:180,label:"3 hours"},{value:240,label:"4 hours"},{value:300,label:"5 hours"},{value:720,label:"12 hours"},{value:1440,label:"1 day"},{value:2880,label:"2 days"},{value:4320,label:"3 days"},{value:5760,label:"4 days"},{value:7200,label:"5 days"}],k=2,b=6,T=12,E=3,j=600,S=t=>{if(!n)return t;let e=(d||"").replace(/\/$/,"");return"".concat(e).concat(t)}}}]);
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.