PageSourceSearch

https://thesync.com/_nuxt/BAoB0sN42.js

js thesync.com collected 2026-10-02 04:40:36 UTC 9,333 bytes, 1 lines download raw bytes

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:`460a101dcc57d3dfb49d36166f4138cff4eb99aa`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`81ee99f5-61fe-4f80-9d72-42a4b611da14`,e._sentryDebugIdIdentifier=`sentry-dbid-81ee99f5-61fe-4f80-9d72-42a4b611da14`)}catch{}})();import{$ as e,$t as t,Bn as n,Et as r,F as i,H as a,Ht as o,Kt as s,Ot as c,Pt as l,Q as u,Rn as d,Tt as f,Un as p,Z as m,_t as h,at as g,b as _,et as v,ft as y,gn as b,n as x,sn as S,st as C,tt as w,wn as T,x as E}from"./Be1tylZc.js";import{h as D,m as O}from"./Cav6au5k.js";import{i as k}from"./BzXYR9UL.js";import{t as A}from"./DTPiZmul.js";import{n as j,t as M}from"./DP5TUmdk.js";import{n as ee}from"./UC6My3j4.js";import{t as te}from"./C-4EPcmm.js";import{t as N}from"./Di3El__s.js";import{t as P}from"./DAJ8IOk3.js";import{t as F}from"./CABq0fdo2.js";import{t as I}from"./BqOhqok62.js";import{t as L}from"./BfZ-UEJw2.js";import{t as R}from"./bQwL9mKT.js";import{t as z}from"./Bg7iudXn.js";import{h as B}from"./DcOUer33.js";import{t as V}from"./B_lBi9ok2.js";import{t as H}from"./C_Kju2ve2.js";import{t as U}from"./myD2opGz2.js";import{n as W,t as G}from"./CuHchKZa.js";import{r as K}from"./DAECCH0N.js";import{t as q}from"./BbD97Y8G.js";import{t as J}from"./B0_MwZZb.js";import{n as ne}from"./Bwy06XP_.js";import{t as Y}from"./DXRiIOek.js";import{t as X}from"./Qfio0HJ22.js";import{t as Z}from"./B-Kg_-LF2.js";y(),t();var re=Object.assign(C({__name:`Sonner`,props:{id:{},invert:{type:Boolean},theme:{},position:{},closeButtonPosition:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(t){let n=B(t,`toastOptions`);return(t,r)=>{let i=A;return c(),e(b(W),h({class:`toaster group !fixed`,"toast-options":{classes:{toast:`group toast group-[.toaster]:bg-white group-[.toaster]:text-black group-[.toaster]:border group-[.toaster]:border-grey-1 group-[.toaster]:shadow-md group-[.toaster]:rounded-[6px] group-[.toaster]:items-start group-[.toaster]:gap-2 group-[.toaster]:p-3 group-[.toaster]:min-w-[320px] group-[.toaster]:max-w-[420px]`,description:`group-[.toast]:text-sm group-[.toast]:text-black group-[.toast]:leading-normal group-[.toast]:mt-0`,title:`group-[.toast]:text-sm group-[.toast]:text-black group-[.toast]:font-normal`,actionButton:`group-[.toast]:bg-accent group-[.toast]:text-white`,cancelButton:`group-[.toast]:bg-grey-1 group-[.toast]:text-neutral2-700-2`}}},b(n)),{"success-icon":s(()=>[g(i,{name:`my:check-circle-green`,class:`block size-[18px] shrink-0`})]),"info-icon":s(()=>[g(i,{name:`my:check-circle-green`,class:`block size-[18px] shrink-0`})]),"warning-icon":s(()=>[g(i,{name:`my:x-red`,class:`block size-[18px] shrink-0`})]),"error-icon":s(()=>[g(i,{name:`my:x-red`,class:`block size-[18px] shrink-0`})]),"loading-icon":s(()=>[u(`div`,null,[g(b(V),{class:`size-[18px] animate-spin`})])]),"close-icon":s(()=>[g(b(H),{class:`size-4`})]),_:1},16)}}}),{__name:`UiSonner`});y();function Q(){let{access:e}=N();return{isAuthenticated:m(()=>!!e.value)}}y();function ie(){let{$api:e}=_(),t=O(),n=G(),{isAuthenticated:r}=Q(),{utmCookie:i}=Y(),{mutate:a}=z({mutationFn:({payload:t})=>e(`/promotions/utm-tracker/track/`,{method:`POST`,body:t}).catch(e=>{throw K(e)}),onError(e){n.add({severity:`error`,detail:e,life:5e3})},onSettled(){i.value=null}}),s=()=>{let e={...t.query},n={},r=!1;for(let t of[`utm_source`,`utm_medium`,`utm_campaign`,`utm_content`,`utm_id`]){let i=e[t];typeof i==`string`&&(n[t]=i,delete e[t],r=!0)}if(r){i.value=n;{Object.entries(e).some(([,e])=>typeof e==`object`&&!!e)&&R.error(`[UTM Tracker] Detected object values in query:`,e);let n=t.path+(Object.keys(e).length?`?`+new URLSearchParams(e).toString():``)+window.location.hash;window.history.replaceState(null,``,n)}}};o(r,e=>{e&&i.value&&a({payload:i.value})},{immediate:!0}),f(()=>{s()})}var ae=()=>{E().public.ENV===`prod`&&x(()=>({script:[{type:`application/ld+json`,innerHTML:JSON.stringify(X),tagPosition:`bodyClose`}]}))};t(),y(),T(),i();var oe={class:`flex w-full items-center justify-center gap-2.5`},se={class:`flex min-w-0 flex-1 flex-col items-start justify-center gap-1.5`},ce={class:`flex w-full items-center gap-2 sm:hidden`},le={class:`shrink-0 text-[18px] leading-[28px] font-bold whitespace-nowrap text-black`},ue={class:`hidden w-full min-w-0 items-center gap-2 sm:flex`},de={class:`shrink-0 text-[18px] leading-7 font-bold whitespace-nowrap text-black`},fe={class:`min-w-0 truncate text-[18px] leading-[28px] font-medium text-black`},pe={class:`w-full truncate text-[16px] leading-[24px] font-medium text-black sm:hidden`},$={class:`hidden w-full truncate text-[14px] leading-[20px] text-neutral2-700 sm:block`},me={key:0,class:`absolute inset-x-0 bottom-0 h-[3px] bg-neutral2-100`},he=C({__name:`TripReminderStickyBar`,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let{t,locale:i}=ee(),{trip:o}=Z(),s=S(new Date),l=null;f(()=>{l=te(()=>{s.value=new Date},3e4)}),r(()=>{l&&clearInterval(l)});let h={booked:`bg-[#3c7cd4]`,checkinOpen:`bg-[#3c7cd4]`,active:`bg-[#309e50]`,finishingUp:`bg-[#309e50]`,paymentPending:`bg-[#b32e43]`}
1,_=(e,n)=>{let r=F(e,s.value);if(r>=1)return t(n===`pickupIn`?`Pickup in {days} days`:`Return in {days} days`,{days:r});let i=I(e,s.value);if(i>=1)return t(n===`pickupIn`?`Pickup in {hours}h`:`Return in {hours}h`,{hours:i});let a=Math.max(0,L(e,s.value));return t(n===`pickupIn`?`Pickup in {minutes}m`:`Return in {minutes}m`,{minutes:a})},y=m(()=>{if(!o.value)return``;switch(o.value.reminderState){case`paymentPending`:return t(`Payment pending`);case`finishingUp`:return t(`Finishing up`);case`active`:return _(new Date(o.value.end_datetime),`returnIn`);default:return _(new Date(o.value.start_datetime),`pickupIn`)}}),x=m(()=>{if(!o.value)return``;switch(o.value.reminderState){case`paymentPending`:return t(`Payment pending`);case`active`:case`finishingUp`:return t(`Trip in progress`);default:return t(`Upcoming trip`)}}),C=m(()=>{if(!o.value)return``;if(o.value.reminderState===`paymentPending`)return t(`Finish payment to confirm your trip`);let e=`${P(o.value.start_datetime,`EEE, d MMM, HH:mm`,{locale:q[i.value]})} → ${P(o.value.end_datetime,`EEE, d MMM, HH:mm`,{locale:q[i.value]})}`,n=o.value.reminderState===`active`||o.value.reminderState===`finishingUp`?o.value.drop_off_representation:o.value.pickup_representation;return n?`${e} · ${n}`:e}),T=m(()=>{if(!o.value||o.value.reminderState===`paymentPending`)return null;if(o.value.reminderState===`active`||o.value.reminderState===`finishingUp`){let e=new Date(o.value.start_datetime).getTime(),t=new Date(o.value.end_datetime).getTime();if(t<=e)return 100;let n=(s.value.getTime()-e)/(t-e)*100;return Math.min(100,Math.max(0,n))}let e=new Date(o.value.created_at??o.value.start_datetime).getTime(),t=new Date(o.value.start_datetime).getTime();if(t<=e)return 100;let n=(s.value.getTime()-e)/(t-e)*100;return Math.min(100,Math.max(0,n))}),E=m(()=>(o.value?.reminderState===`active`||o.value?.reminderState===`finishingUp`)&&T.value!==null&&T.value>=90),O=m(()=>o.value?`/booking/${o.value.id}`:`/`),k=D(),M=j(),N=()=>k.push(M(O.value));return(e,t)=>{let r=A;return b(o)?(c(),w(`div`,{key:0,role:`link`,tabindex:`0`,class:d(b(U)(`relative block w-full cursor-pointer border-b border-neutral2-100 bg-white p-4 shadow-[0px_4px_24px_2px_rgba(0,0,0,0.12)]`,e.$props.class)),"data-testid":`trip-reminder-sticky-bar`,onClick:N,onKeydown:a(N,[`enter`])},[u(`div`,oe,[u(`div`,se,[u(`div`,ce,[u(`p`,le,p(b(x)),1),u(`span`,{class:d([`flex h-[22px] shrink-0 items-center rounded-[6px] px-1.5 py-0.5 text-[12px] leading-[18px] font-medium whitespace-nowrap text-white`,h[b(o).reminderState]])},p(b(y)),3)]),u(`div`,ue,[u(`p`,de,p(b(x))+`: `,1),u(`p`,fe,p(b(o).vehicle.vehicle_full_name),1),u(`span`,{class:d([`flex h-[22px] shrink-0 items-center rounded-[6px] px-1.5 py-0.5 text-[12px] leading-[18px] font-medium whitespace-nowrap text-white`,h[b(o).reminderState]])},p(b(y)),3)]),u(`p`,pe,p(b(o).vehicle.vehicle_full_name),1),u(`p`,$,p(b(C)),1)]),g(r,{name:`my:chevron-right-sm`,class:`shrink-0 text-[16px] text-black`})]),b(T)===null?v(``,!0):(c(),w(`div`,me,[u(`div`,{class:d([`h-full transition-all duration-500`,b(E)?`bg-sync2-400`:h[b(o).reminderState]]),style:n({width:`${b(T)}%`})},null,6)]))],34)):v(``,!0)}}});y(),t();var ge=C({__name:`TripReminderStickyBarSlot`,setup(t){let{isAuthenticated:n}=Q(),{isMobile:r}=J(),i=O(),a=m(()=>i.path.includes(`/booking/`)),o=m(()=>i.path.includes(`/mobile/`)),l=m(()=>i.path.includes(`/verify-identity`)||i.path.includes(`/new-car`)),u=m(()=>i.path.includes(`/account`)),d=m(()=>n.value&&!a.value&&!o.value&&!l.value&&!(u.value&&r.value));return(t,n)=>{let r=k;return c(),e(r,null,{default:s(()=>[b(d)?(c(),e(he,{key:0,class:`sticky top-0 z-40`})):v(``,!0)]),_:1})}}});y(),t();var _e=C({__name:`default`,setup(e){let t=M({addSeoAttributes:!0});return x(()=>({htmlAttrs:t.value.htmlAttrs,link:t.value.link,meta:t.value.meta})),ne(),ie(),ae(),(e,t)=>(c(),w(`main`,null,[g(ge),l(e.$slots,`default`),g(b(re),{position:`top-right`})]))}});export{_e as default};

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.