PageSourceSearch

https://app.carpaddy.com/static/js/7561.c9aa4ca3.chunk.js

js carpaddy.com collected 2026-10-07 06:12:49 UTC 7,540 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkcarpaddy_2_0=self.webpackChunkcarpaddy_2_0||[]).push([[7561],{66263:(e,n,t)=>{t.d(n,{K:()=>o});t(72791);var r=t(57621),i=t(1582),s=t(20890),a=t(94294),c=t(67791),d=t(80184);const o=e=>{let{title:n,description:t,cta:o,onClick:l,ctaProps:u}=e;return(0,d.jsxs)(r.Z,{elevation:2,sx:e=>({padding:3.5,minHeight:100}),children:[(0,d.jsxs)(i.Z,{spacing:2,sx:{marginBottom:4},children:[(0,d.jsx)(s.Z,{color:"primary",variant:"h4",children:o}),(0,d.jsxs)(i.Z,{children:[(0,d.jsx)(s.Z,{variant:"h6",children:n}),(0,d.jsx)(s.Z,{children:t})]})]}),(0,d.jsx)(a.Z,{variant:"contained",endIcon:(0,d.jsx)(c.Z,{}),onClick:l,...u,children:"Click here"})]})}},63603:(e,n,t)=>{t.d(n,{I:()=>l,J:()=>o});var r=t(72791),i=t(66934),s=t(47047),a=t(1582),c=t(80184);const d=(0,i.ZP)(s.Z)((e=>{let{theme:n}=e;return`\n  background-color: ${n.palette.background.dark} ; \n  \n`})),o=e=>{let{qty:n=1}=e;return(0,c.jsx)(c.Fragment,{children:Array.from({length:n},((e,n)=>n)).map(((e,n)=>(0,c.jsx)(r.Fragment,{children:(0,c.jsxs)(a.Z,{spacing:1,children:[(0,c.jsx)(d,{variant:"rounded",width:"100%",height:100}),(0,c.jsx)(d,{variant:"rounded",width:"100%",height:15,animation:"wave"}),(0,c.jsx)(d,{variant:"rounded",width:"60%",height:15,animation:!1})]})},n)))})},l=()=>(0,c.jsxs)(a.Z,{spacing:1,children:[(0,c.jsx)(d,{variant:"rounded",width:"100%",height:20}),(0,c.jsx)(d,{variant:"rounded",width:"100%",height:20,animation:"wave"}),(0,c.jsx)(d,{variant:"rounded",width:"100%",height:15,animation:!1})]})},99144:(e,n,t)=>{t.d(n,{$x:()=>c,tp:()=>o,s5:()=>d,pH:()=>l});var r=t(23815),i=t(88779);const s="https://api.carpaddy.com/licenses",a=r.h.injectEndpoints({endpoints:e=>({addDriversLicense:e.mutation({queryFn:async e=>{const n=await new Promise((n=>(async e=>i.Z.post(`${s}/add-license`,e).then((function(e){return e.data})).catch((function(e){throw console.log(e),e})))(e).then((e=>n(e))).catch((e=>{e&&n({data:null,error:e.response.data})}))));return{data:n,error:n.error}},invalidatesTags:["DriversLicense"]}),editDriversLicense:e.mutation({queryFn:async e=>{const n=await new Promise((n=>(async e=>i.Z.put(`${s}/edit-license`,e).then((function(e){return e.data})).catch((function(e){throw console.log(e),e})))(e).then((e=>n(e))).catch((e=>{e&&n({data:null,error:e.response.data})}))));return{data:n,error:n.error}},invalidatesTags:["DriversLicense"]}),getDriversLicenses:e.query({queryFn:async e=>{let{uid:n}=e;const t=await new Promise((e=>(async e=>i.Z.get(`${s}/get-licenses`,{params:{uid:e}}).then((function(e){return e.data})).catch((function(e){throw console.log(e),e})))(n).then((n=>e(n))).catch((n=>{n&&e({data:null,error:n.response.data})}))));return{data:t,error:t.error}},providesTags:["DriversLicense"]}),getSingleDriversLicense:e.query({queryFn:async e=>{const n=await new Promise((n=>(async e=>i.Z.get(`${s}/get-license-single`,{params:{licenseid:e}}).then((function(e){return e.data})).catch((function(e){throw console.log(e),e})))(e).then((e=>n(e))).catch((e=>{e&&n({data:null,error:e.response.data})}))));return{data:n,error:n.error}},providesTags:["DriversLicense"]})})}),{useAddDriversLicenseMutation:c,useGetDriversLicensesQuery:d,useEditDriversLicenseMutation:o,useGetSingleDriversLicenseQuery:l}=a},17880:(e,n,t)=>{t.r(n),t.d(n,{default:()=>q});var r=t(72791),i=t(58562),s=t(95048),a=t(88464),c=t(99882),d=t(66263),o=t(63603),l=t(2120),u=t(1582),h=t(72426),g=t.n(h),p=t(75006),x=t(96497),m=t(28037),v=t(1198),j=t(66934),y=t(94294),w=t(57621),Z=t(20890),k=t(64554),D=t(16454),f=t(25156),C=t(33556),F=t(80184);const L=(0,j.ZP)(w.Z)((e=>{let{theme:n}=e;return"\n        padding: 0px 0px;\n        min-height: 200px ;\n        background-color: #FFF;\n        border-radius: 16px; \n        "})),T=(0,j.ZP)(k.Z)((e=>{let{theme:n}=e;return`\n        background-color: ${n.palette.background.dark};\n        `})),b=e=>{let{license:n,onClick:t,...i}=e;const{saveFn:s}=(0,c.mr)(),{show:a}=(0,c.nD)(),[d,o]=(0,r.useState)(!1),l=e=>e.documents.some((e=>!0===e.processing)),h=(0,v.ri)(n),j=n.name?String(n.name).toUpperCase():"",w=[{label:"Edit license",disabled:l(n),onClick:()=>{const[e,t,r]=n.documents[0].expiryDate.split("-");s({driverslicense:{...n,day:r,month:t,year:e,exist:!0}}),a(C.j1)}}
1,{label:"Download documents",disabled:0===h.length,onClick:()=>o(!0)}];return(0,F.jsxs)(L,{elevation:3,...i,children:[(0,F.jsxs)(u.Z,{children:[(0,F.jsx)(T,{children:(0,F.jsxs)(u.Z,{padding:2,children:[(0,F.jsx)(k.Z,{display:"flex",justifyContent:"flex-end",children:(0,F.jsx)(x.L,{items:w})}),(0,F.jsxs)(u.Z,{children:[(0,F.jsx)(Z.Z,{variant:"h6",children:j}),(0,F.jsx)(Z.Z,{children:`Licence No: ${n.licenseNo}`}),(0,F.jsx)(Z.Z,{children:`Type: ${(null===n||void 0===n?void 0:n.type)===f.licenseTypes.INTERNATIONAL?"Int'l":"National"} Driver's Licence`})]}),(0,F.jsx)(u.Z,{paddingTop:1,alignItems:"start",children:(0,F.jsx)(y.Z,{size:"small",variant:"contained",endIcon:(0,F.jsx)(D.Z,{}),onClick:t,sx:{fontSize:"0.8rem",maxWidth:"max-content",padding:"8px 16px"},disabled:(b=n.documents[0].expiryDate,g()(b).diff(g()(),"days")>60||l(n)),children:"Renew this licence"})})]})}),n.documents.map(((e,n)=>(0,F.jsx)(r.Fragment,{children:"nil"===e.expiryDate?null:(0,F.jsx)(r.Fragment,{children:(0,F.jsx)(k.Z,{sx:{padding:2,fontSize:"0.9rem",backgroundColor:"white"},children:(0,F.jsx)(p.Fl,{paper:e})})})},n)))]}),d?(0,F.jsx)(m.m,{open:d,onClose:()=>o(!1),documents:h,title:"Download documents"}):null]});var b};var $=t(19408),I=t(99144),P=t(79059),Y=t(16549);const q=()=>{const e=(0,s.I0)(),{show:n}=(0,c.nD)(),t=(0,s.v9)(a.Qj),{data:r,isFetching:h}=(0,I.s5)({uid:t.user.uid}),{data:g}=(0,P.li)({uid:t.user.uid});return(0,F.jsxs)(F.Fragment,{children:[null!==r&&void 0!==r&&r.length&&!h?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(u.Z,{direction:["row"],justifyContent:["space-between"],spacing:1,gap:1,children:[(0,F.jsx)(l.Y,{onClick:()=>{e((0,a.WI)({driverslicense:{}})),n($.J_)},variant:"outlined",children:"Renew another licence"}),(0,F.jsx)(l.Y,{onClick:()=>n(C.GT),variant:"outlined",children:"Add new licence"})]}),(0,F.jsx)(u.Z,{gap:3,marginTop:5,children:r.map(((t,r)=>(0,F.jsx)(b,{license:g?(0,Y.x9)(t,g):t,onClick:()=>(t=>{const[r,s,c]=t.documents[0].expiryDate.split("-"),d=(0,i.anz)("documents",t);e((0,a.WI)({driverslicense:{...d,day:c,month:s,year:r,exist:!0}})),n(`${$.J_}?no=${t.licenseNo}`)})(t),"data-testid":`license-widget-${r}`},r)))})]}):null,null!==r&&void 0!==r&&r.length||h?null:(0,F.jsxs)(u.Z,{gap:4,children:[(0,F.jsx)(d.K,{title:"You can start now",description:"To renew your driver's licence you can start the process here",cta:"Renew driver's licence?",onClick:()=>n($.J_,{showEmptyRenewalPage:!0})}),(0,F.jsx)(d.K,{title:"You could get expiry reminders",description:"You can add your driver's licence details and get reminders before it expires",cta:"Add a licence only?",onClick:()=>n(C.GT)})]}),null!==r&&void 0!==r&&r.length||!h?null:(0,F.jsx)(o.J,{})]})}},16454:(e,n,t)=>{var r=t(64836);n.Z=void 0;var i=r(t(45649)),s=t(80184),a=(0,i.default)((0,s.jsx)("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"}),"ArrowForwardRounded");n.Z=a},4697:(e,n,t)=>{function r(e){var n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),e.getTime()-n.getTime()}t.d(n,{Z:()=>r})}}]);
2//# sourceMappingURL=7561.c9aa4ca3.chunk.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.