1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`7f729ee08a403642184b19e770fd17aa73b6434c`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`a08286e5-6000-427c-a23f-dbc810eb05d2`,e._sentryDebugIdIdentifier=`sentry-dbid-a08286e5-6000-427c-a23f-dbc810eb05d2`)}catch{}})();import{Qt as e,X as t,b as n,dn as r,dt as i,hn as a}from"./BsUWTmfX.js";import{n as o,t as s}from"./CfX7ZCOq.js";import{j as c}from"./DN_e6Ny2.js";import{n as l}from"./OivnncvB.js";import{t as u}from"./DukDtsvX.js";import{t as d}from"./CGIfmKx4.js";import{B as f,G as p,H as m,O as h,P as g,R as _,S as v,U as y,V as b,c as x,h as S,l as ee,q as C,u as w,x as T}from"./svtNTEeb.js";import"./BJITWk-w.js";import{n as E}from"./-CNBJ6TI.js";import{t as D}from"./C7KfDzvf.js";import{t as O}from"./oHbw80jU.js";import{t as k}from"./DpYPt9DM.js";import{h as A}from"./BwODqIin2.js";import{r as j}from"./CI7MOajN.js";e(),i();var M=({onSuccess:e,onError:t,onSettled:r})=>{let{$api:i}=n();return O({mutationFn:()=>i(`/vehicles/vehicle-listings/`,{method:`POST`}).catch(e=>{throw j(e)}),onSuccess:e,onError:t,onSettled:r})},N=({onSuccess:e,onError:t,onSettled:r})=>{let{$api:i}=n();return O({mutationFn:e=>i(`/vehicles/vehicle-listings/${e}/remove-draft-status/`,{method:`POST`}).catch(e=>{throw j(e)}),onSuccess:e,onError:t,onSettled:r})},P=({onSuccess:e,onError:t,onSettled:r})=>{let{$api:i}=n();return O({mutationFn:e=>i(`/vehicles/car-locations/`,{method:`POST`,body:e}).catch(e=>{throw j(e)}),onSuccess:e,onError:t,onSettled:r})},F=({onSuccess:e,onError:t,onSettled:r})=>{let{$api:i}=n();return O({mutationFn:e=>i(`/vehicles/car-locations/${e.id}/`,{method:`PATCH`,body:e.payload}).catch(e=>{throw j(e)}),onSuccess:e,onError:t,onSettled:r})},I=()=>{let{$api:e}=n();return D({queryKey:T.all,queryFn:()=>e(`/core/location-capabilities/`).catch(e=>{throw j(e)}),staleTime:3e5})},L=e=>{let{$api:i}=n(),o=r(e);return D({queryKey:t(()=>p.byVehicle(a(o))),queryFn:()=>i(`/v2/hosts/me/vehicles/${a(o)}/locations`).catch(e=>{throw j(e)}),enabled:t(()=>!!a(o)),staleTime:0})},R=({onSuccess:e,onError:t,onSettled:r}={})=>{let{$api:i}=n(),{t:a}=l(),o=k();return O({mutationFn:({vehicleId:e,operation:t,payload:n,idempotencyKey:r})=>{let o=r||(typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`key-${Date.now()}-${Math.random().toString(36).slice(2,9)}`);return i(`/v2/hosts/me/vehicles/${e}/${t}`,{method:`POST`,body:n,headers:{"Idempotency-Key":o}}).catch(e=>{let t=j(e);throw t.code===`AIRPORT_LOCATION_REQUIRED`?Error(a(`To offer pickup or delivery at an airport, use the Airport location card in Location & Delivery.`),{cause:e}):t})},onSuccess:async(t,n)=>{await o.invalidateQueries({queryKey:f.id(n.vehicleId)}),await o.invalidateQueries({queryKey:p.byVehicle(n.vehicleId)}),await o.invalidateQueries({queryKey:[`host-place-hours`,`overview`]}),e?.(t)},onError:t,onSettled:r})},z=({id:e,publicRequest:t=!1})=>{let{$api:r}=n();return D({queryKey:f.id(e),queryFn:async()=>{s(e);let n={public:t};return r(`/vehicles/vehicle-listings/${e}/`,n).catch(e=>{throw j(e)})},enabled:!!e,...o(e)?{}:{retry:!1}})},B=({onSuccess:e,onError:t,onSettled:r})=>{let{$api:i}=n();return O({mutationFn:({id:e,payload:t,isFormData:n})=>i(`/vehicles/vehicle-listings/${e}/`,{method:`PATCH`,body:t,headers:n?{"Content-Type":`multipart/form-data`}:void 0}).catch(e=>{throw j(e)}),onSuccess:e,onError:t,onSettled:r})},V=({onSuccess:e,onError:t,onSettled:r})=>{let{$api:i}=n();return O({mutationFn:e=>i(`/vehicles/safety-inspections/`,{method:`POST`,body:e}).catch(e=>{throw j(e)}),onSuccess:e,onError:t,onSettled:r})},H=({onSuccess:e,onError:t,onSettled:r})=>{let{$api:i}=n();return O({mutationFn:({safetyInspectionId:e})=>i(`/vehicles/safety-inspections/${e}/`,{method:`DELETE`}).catch(e=>{throw j(e)}),onSuccess:e,onError:t,onSettled:r})},U=({id:e})=>{let{$api:t}=n();return D({queryKey:f.features(e),queryFn:async()=>{try{return await t(`/vehicles/features/`).catch(e=>{throw j(e)})}catch(e){u.info(e)}}})},W=({onSuccess:e,onError:t,onSettled:r})=>{let{$api:i}=n();return O({mutationFn:e=>i(`/vehicles/car-images/`,{method:`POST`,body:e}).catch(e=>{throw j(e)}),onSuccess:e,onError:t,onSettled:r})},G=({onSuccess:e,onError:t,onSettled:r})=>{let{$api:i}=n();return O({mutationFn:({imageId:e})=>i(`/vehicles/car-images/${e}/`,{method:`DELETE`}).catch(e=>{throw j(e)}),onSuccess:e,onError:t,onSettled:r})},K=({onSuccess:e,onError:t,onSettled:r})=>{let{$api:i}=n();return O({mutationFn:({vehicleId:e})=>i(`/vehicles/vehicle-listings/${e}/`,{method:`DELETE`}).catch(e=>{throw j(e)}),onSuccess:e,onError:t,onSettled:r})},te=()=>{let{$api:e}=n();return D({queryKey:y.all,queryFn:async()=>{try{return await e(`/vehicles/manufactures/`).catch(e=>{throw j(e)})}catch(e){u.info(e)}}})},q=()=>{let{$api:e}=n(),{access:t}=d();return D({queryKey:b.lastDraft(),queryFn:t.value?async()=>e(`/vehicles/vehicle-listings/my-last-draft-vehicle/`).catch(e=>{throw j(e)}):c})},J=e=>{let{$api:t}=n(),r=e?.query||{};return D({queryKey:b.my(e?.query.is_draft),queryFn:async()=>t(`/vehicles/vehicle-listings/my-listings/`,{query:r}).catch(e=>{throw j(e)})})},Y=e=>{let{$api:t}=n();return D({queryKey:m.status(e),queryFn:async()=>t(`/vehicles/vehicle-smartcar/${e}/get-lock-status/`).catch(e=>{throw j(e)})})},X=({onSuccess:e,onError:t,onSettled:r})=>{let{$api:i}=n();return O({mutationFn:e=>i(`/vehicles/car-date-changes/`,{method:`POST`,body:e}).catch(e=>{throw j(e)}),onSuccess:e,onError:t,onSettled:r})},Z=(e,t)=>{let{$api:r}=n();return D({queryKey:b.byHost(e.value,t),queryFn:e.value?async()=>r(`/vehicles/vehicle-listings/`,{query:{host:e.value,is_draft:!1}}).catch(e=>{throw j(e)}):c})},Q=()=>{let{$api:e}=n();return D({queryKey:w.all,queryFn:async()=>e(`/vehicles/gas-type-grades`).catch(e=>{throw j(e)})})},ne=()=>{let{$api:e}=n();return D({queryKey:ee.all,queryFn:async()=>e(`/vehicles/car-fuel-types/`).catch(e=>{throw j(e)})})},re=()=>{let{$api:e}=n();return D({queryKey:_.all,queryFn:async()=>e(`/vehicles/vehicle-listings/color-choices/`).catch(e=>{throw j(e)})})},ie=e=>{let{$api:t}=n(),{locale:r}=l();return D({queryKey:h.byVehicle(e,r.value),queryFn:async()=>t(`vehicles/vehicle-listings/${e}
1/get-available-vehicle-protection-plans/`).catch(e=>{throw j(e)})})},ae=()=>{let{$api:e}=n();return D({queryKey:C.all,queryFn:async()=>e(`/vehicles/car-tags/`).catch(e=>{throw j(e)})})},oe=()=>{let{$api:e}=n();return D({queryKey:v.suggestions(),queryFn:async()=>e(`/vehicles/search-locations-suggestions/`).catch(e=>{throw j(e)})})},se=({query:e})=>{let{$api:t}=n();return D({queryKey:v.search(e),queryFn:async()=>t(`/vehicles/popular-locations-search/`,{query:{q:e.value}}).catch(e=>{throw j(e)})})},ce=()=>{let{$api:e}=n(),{locale:t}=l();return D({queryKey:v.airports(t),queryFn:async()=>e(`/vehicles/popular-locations/`,{query:{location_type:`airport`}}).catch(e=>{throw j(e)})})},le=e=>{let{$api:t}=n();return D({queryKey:g.carDateChanges(e.vehicle,e.date??`all`),staleTime:E.SETTINGS_STALE_TIME,queryFn:async()=>t(`/vehicles/car-date-changes/`,{query:{vehicle:e.vehicle,date:e.date?.value}}).catch(e=>{throw j(e)})})},ue=(e,t)=>{let{$api:r}=n();return D({queryKey:f.availability(e,t.start_date,t.end_date,t.timezone??``),queryFn:async()=>{let n={start_date:t.start_date?.value,end_date:t.end_date?.value},i=typeof t.timezone==`string`?t.timezone:t.timezone?.value;return i&&(n.timezone=i),r(`vehicles/vehicle-listings/${e}/vehicle-availability/`,{query:{...n}}).catch(e=>{throw j(e)})}})},de=()=>{let{$api:e}=n();return D({queryKey:x.suggestions(),queryFn:async()=>e(`/vehicles/extra-service-suggestions/`).catch(e=>{throw j(e)})})},fe=e=>{let{$api:t}=n();return D({queryKey:x.byVehicle(e),queryFn:async()=>t(`/vehicles/extra-services/`,{query:{vehicle:e}}).catch(e=>{throw j(e)})})},pe=()=>{let{$api:e}=n();return D({queryKey:f.popularTimes(),queryFn:async()=>e(`/vehicles/popular-times/`).catch(e=>{throw j(e)}),staleTime:72e5})},$=e=>{let{$api:r}=n();return D({queryKey:S.list(e),queryFn:()=>r(`/vehicles/host-away-periods/`).catch(e=>{throw j(e)}),enabled:t(()=>!!e.value),staleTime:E.SETTINGS_STALE_TIME})},me=()=>{let{$api:e}=n(),t=k();return O({mutationFn:({hostId:t,payload:n})=>e(`/vehicles/host-away-periods/`,{method:`POST`,body:n}).catch(e=>{throw j(e)}),onSuccess:(e,{hostId:n})=>{t.invalidateQueries({queryKey:S.list(n)})}})},he=()=>{let{$api:e}=n(),t=k();return O({mutationFn:({hostId:t,awayPeriodId:n,payload:r})=>e(`/vehicles/host-away-periods/${n}/`,{method:`PATCH`,body:r}).catch(e=>{throw j(e)}),onSuccess:(e,{hostId:n})=>{t.invalidateQueries({queryKey:S.list(n)})}})},ge=(e,r,i,a)=>{let{$api:o}=n(),s=A(r,250),c=A(i,250);return D({queryKey:S.impact(e,s,c,a),queryFn:()=>o(`/vehicles/host-away-periods/preview/`,{method:`POST`,body:{id:a.value,start_date:s.value,end_date:c.value}}).catch(e=>{throw j(e)}),enabled:t(()=>!!e.value&&!!s.value&&!!c.value&&s.value===r.value&&c.value===i.value)})},_e=()=>{let{$api:e}=n(),t=k();return O({mutationFn:({hostId:t,awayPeriodId:n})=>e(`/vehicles/host-away-periods/${n}/`,{method:`DELETE`}).catch(e=>{throw j(e)}),onSuccess:(e,{hostId:n})=>{t.invalidateQueries({queryKey:S.list(n)})}})};export{fe as A,he as C,le as D,ue as E,L as F,pe as I,ie as L,ne as M,z as N,ae as O,te as P,oe as R,N as S,F as T,Y as _,M as a,J as b,_e as c,H as d,de as f,I as g,$ as h,me as i,U as j,re as k,K as l,ge as m,ce as n,V as o,Q as p,X as r,P as s,W as t,G as u,R as v,B as w,se as x,q as y,Z as z};
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.