1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[769],{9953:(e,t,r)=>{"use strict";r.d(t,{D7:()=>y,Gc:()=>v,H7:()=>c,JP:()=>p,NN:()=>l,Nn:()=>T,Ug:()=>m,Zv:()=>b,aJ:()=>d,dh:()=>k,hf:()=>x,oR:()=>o,q:()=>f,ql:()=>i,sl:()=>h,xp:()=>g,xt:()=>u});var n=r(70404);let a=(0,r(40694).cw)({baseUrl:"/api/customer"}),s={NOTICE:"notices",CONSENT:"consent",EMAIL:"email",CONTACT:"contact"},o=(0,n.xP)({reducerPath:"ciaApi",baseQuery:a,tagTypes:Object.values(s),endpoints:e=>({getCountries:e.query({query:()=>"/guest/country"}),getNoticeTypes:e.query({query:()=>"/guest/notices/type"}),getNoticeWaterways:e.query({query:()=>"/guest/notices/waterway"}),getNotices:e.query({query:e=>{let{id:t}=e;return"/mytrust/notice-preference/".concat(t)},providesTags:[s.NOTICE]}),postNotices:e.mutation({query:e=>{let{id:t,data:r}=e;return{url:"/mytrust/notice-preference/".concat(t),method:"PUT",body:r}},invalidatesTags:[s.NOTICE]}),getConsent:e.query({query:e=>{let{id:t}=e;return"/mytrust/consent/".concat(t)},providesTags:[s.CONSENT]}),postConsent:e.mutation({query:e=>{let{id:t,data:r}=e;return{url:"/mytrust/consent/".concat(t),method:"PUT",body:r}},invalidatesTags:[s.CONSENT]}),getEmail:e.query({query:e=>{let{id:t}=e;return"/mytrust/email/".concat(t)},providesTags:[s.EMAIL]}),postChangeEmail:e.mutation({query:e=>{let{id:t,data:r}=e;return{url:"/mytrust/email/".concat(t),method:"PUT",body:r}},invalidatesTags:[s.EMAIL]}),getContactDetails:e.query({query:e=>{let{id:t}=e;return"/mytrust/contact/".concat(t)},providesTags:[s.CONTACT]}),postContactDetails:e.mutation({query:e=>{let{id:t,data:r}=e;return{url:"/mytrust/contact/".concat(t),method:"PUT",body:r}},invalidatesTags:[s.CONTACT]}),postcodeSearchFind:e.mutation({query:e=>({url:"/mytrust/search/address/find",method:"POST",body:e})}),postcodeSelectFind:e.mutation({query:e=>({url:"/mytrust/search/address/retrieve",method:"POST",body:e})}),getAuthorizationUrl:e.query({keepUnusedDataFor:0,query:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"".concat("https://mytrust.canalrivertrust.org.uk","/auth/login");return{url:"/oauth/authorise",method:"POST",body:{redirect_url:e}}}}),getLogoutUrl:e.query({keepUnusedDataFor:0,query:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{url:"/oauth/logout",method:"POST",body:{redirect_url:null!=e?e:"".concat("https://mytrust.canalrivertrust.org.uk","/")}}}}),getToken:e.query({query:e=>{let{state:t,code:r,redirectUrl:n="".concat("https://mytrust.canalrivertrust.org.uk","/auth/login")}=e;return{url:"/oauth/token",method:"POST",body:{state:t,code:r,redirect_url:n,client_id:"mytrust",grant_type:"authorization_code"}}}})})}),{useGetCountriesQuery:i,useGetNoticesQuery:l,useGetNoticeTypesQuery:u,useGetNoticeWaterwaysQuery:c,useGetConsentQuery:d,useGetEmailQuery:h,useGetContactDetailsQuery:m,useGetTokenQuery:p,useLazyGetAuthorizationUrlQuery:f,useLazyGetLogoutUrlQuery:g,usePostChangeEmailMutation:y,usePostNoticesMutation:v,usePostConsentMutation:x,usePostContactDetailsMutation:b,usePostcodeSearchFindMutation:k,usePostcodeSelectFindMutation:T}=o},16790:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f});var n=r(95155),a=r(12115),s=r(65525),o=r(35695);function i(){let e=(0,o.usePathname)(),t=(0,a.useMemo)(()=>{let t=e.split("/");return t.filter(e=>e.length>0).map((e,r)=>{let n="my-trust"===e?"MyTrust":(e[0].toUpperCase()+e.slice(1)).split("-").join(" ");return{link:t.slice(0,r+2).join("/"),name:n}})},[e]);return(0,n.jsx)("nav",{"aria-label":"Page path",id:"breadcrumbs",children:(0,n.jsxs)("ol",{children:[(0,n.jsx)("li",{children:(0,n.jsx)(s.h,{"aria-label":"homepage",className:"home",href:"https://canalrivertrust.org.uk"})}),t.slice(0,t.length-1).map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(s.h,{href:e.link,children:e.name})},e.link)),(0,n.jsx)("li",{children:(0,n.jsx)("span",{children:t[t.length-1].name})})]})})}var l=r(34540),u=r(9953),c=r(35551),d=r(40828),h=r(64110);function m(e){let{children:t}=e,r=(0,l.wA)(),s=(0,d.D)(),[i,m]=(0,a.useState)(!1),p=(0,o.useRouter)(),f=(0,o.usePathname)(),[g,{isError:y,isFetching:v}]=(0,u.q)();return(0,a.useEffect)(()=>{m(!0)},[]),(0,a.useEffect)(()=>{s||(r((0,h.zG)(f)),g().then(e=>{let{data:t,error:r}=e;if(r)return void console.error(r);p.replace(t.url)}))},[s,p,g,f,r]),(0,n.jsx)(n.Fragment,{children:s&&i?t:(0,n.jsx)(c.A,{isError:y,message:v?"Redirecting you to login...":""})})}var p=r(81849);function f(e){let{children:t}=e;return(0,n.jsxs)(m,{children:[(0,n.jsx)(p.Ay,{}),(0,n.jsx)(i,{}),(0,n.jsx)("div",{className:"container flex min-h-screen flex-col items-center justify-between pt-4",children:t})]})}},35551:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(95155),a=r(28920);function s(e){let{isError:t=!1,message:r=""}=e;return(0,n.jsx)("div",{className:"container flex flex-col items-center py-standard",children:t?(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{children:"Login Unavailable"}),(0,n.jsxs)("p",{children:["Please try again later. If the problem persists please contact our Supporter Care Team by ",(0,n.jsx)("a",{href:"mailto:[email protected]",children:"email"}
1)," ","or by telephone on 0303 040 4040 (Monday to Friday 9 am to 5 pm exc Bank Holidays)."]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.o,{"data-testid":"spinner"}),(0,n.jsx)("p",{children:r})]})})}},35695:(e,t,r)=>{"use strict";var n=r(18999);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},40828:(e,t,r)=>{"use strict";r.d(t,{D:()=>a,L:()=>s});var n=r(34540);function a(){return(0,n.d4)(e=>e.oauth.tokenExpire)>Math.floor((Date.now()+3e5)/1e3)}function s(){return(0,n.d4)(e=>e.oauth.contactId)}},43963:(e,t,r)=>{"use strict";r.d(t,{i:()=>v});var n=r(52665),a=r(66680),s=r(78257),o=r(81627),i=r(22989),l=r(86176),u=r(16421),c=r(85009),d=r(75894),h=r(56973),m=r(6548),p=r(77151),f=r(81467),g=r(672),y=r(12115);function v(e){var t,r,v,x;let b=(0,d.o)(),[k,T]=(0,h.rE)(e,n.n.variantKeys),{ref:j,as:q,children:P,anchorIcon:C,isExternal:N=!1,showAnchorIcon:E=!1,autoFocus:A=!1,className:w,onPress:I,onPressStart:O,onPressEnd:S,onClick:D,...L}=k,M=(0,m.zD)(j),R=null!=(r=null!=(t=null==e?void 0:e.disableAnimation)?t:null==b?void 0:b.disableAnimation)&&r,{linkProps:U}=function(e,t){let{elementType:r="a",onPress:n,onPressStart:d,onPressEnd:h,onClick:m,isDisabled:p,...f}=e,g={};"a"!==r&&(g={role:"link",tabIndex:p?void 0:0});let y=(0,a.un)()||(0,a.m0)();m&&"function"==typeof m&&(0,l.R)("onClick is deprecated, please use onPress instead. See: https://github.com/nextui-org/nextui/issues/4292","useLink");let{focusableProps:v}=(0,u.W)(e,t),{pressProps:x,isPressed:b}=(0,c.d)({onPress:e=>{y&&(null==m||m(e)),null==n||n(e)},onPressStart:d,onPressEnd:h,isDisabled:p,ref:t}),k=(0,s.$)(f,{labelable:!0,isLink:"a"===r}),T=(0,o.v)(v,x),j=(0,i.rd)(),q=(0,i._h)(e);return{isPressed:b,linkProps:(0,o.v)(k,q,{...T,...g,"aria-disabled":p||void 0,"aria-current":e["aria-current"],onClick:t=>{var r;null==(r=x.onClick)||r.call(x,t),!y&&m&&m(t),!j.isNative&&t.currentTarget instanceof HTMLAnchorElement&&t.currentTarget.href&&!t.isDefaultPrevented()&&(0,i.sU)(t.currentTarget,t)&&e.href&&(t.preventDefault(),j.open(t.currentTarget,t,e.href,e.routerOptions))}})}}({...L,onPress:I,onPressStart:O,onPressEnd:S,onClick:D,isDisabled:e.isDisabled,elementType:"".concat(q)},M),{isFocused:_,isFocusVisible:B,focusProps:F}=(0,p.o)({autoFocus:A});N&&(L.rel=null!=(v=L.rel)?v:"noopener noreferrer",L.target=null!=(x=L.target)?x:"_blank");let z=(0,y.useMemo)(()=>(0,n.n)({...T,disableAnimation:R,className:w}),[(0,f.t6)(T),R,w]);return{Component:q||"a",children:P,anchorIcon:C,showAnchorIcon:E,getLinkProps:(0,y.useCallback)(()=>({ref:M,className:z,"data-focus":(0,g.sE)(_),"data-disabled":(0,g.sE)(e.isDisabled),"data-focus-visible":(0,g.sE)(B),...(0,o.v)(F,U,L)}),[z,_,B,F,U,L])}}},52665:(e,t,r)=>{"use strict";r.d(t,{A:()=>o,n:()=>s});var n=r(69478),a=r(66232),s=(0,n.tv)({base:["relative inline-flex items-center outline-none tap-highlight-transparent",...a.zb],variants:{size:{sm:"text-small",md:"text-medium",lg:"text-large"},color:{foreground:"text-foreground",primary:"text-primary",secondary:"text-secondary",success:"text-success",warning:"text-warning",danger:"text-danger"},underline:{none:"no-underline",hover:"hover:underline",always:"underline",active:"active:underline",focus:"focus:underline"},isBlock:{true:["px-2","py-1","hover:after:opacity-100","after:content-['']","after:inset-0","after:opacity-0","after:w-full","after:h-full","after:rounded-xl","after:transition-background","after:absolute"],false:"hover:opacity-80 active:opacity-disabled transition-opacity"},isDisabled:{true:"opacity-disabled cursor-default pointer-events-none"},disableAnimation:{true:"after:transition-none transition-none"}},compoundVariants:[{isBlock:!0,color:"foreground",class:"hover:after:bg-foreground
1/10"},{isBlock:!0,color:"primary",class:"hover:after:bg-primary/20"},{isBlock:!0,color:"secondary",class:"hover:after:bg-secondary/20"},{isBlock:!0,color:"success",class:"hover:after:bg-success/20"},{isBlock:!0,color:"warning",class:"hover:after:bg-warning/20"},{isBlock:!0,color:"danger",class:"hover:after:bg-danger/20"},{underline:["hover","always","active","focus"],class:"underline-offset-4"}],defaultVariants:{color:"primary",size:"md",isBlock:!1,underline:"none",isDisabled:!1}}),o="flex mx-1 text-current self-center"},64110:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>l,zG:()=>i});var n=r(5710),a=r(9953);let s={lastAuthedPath:null,tokenExpire:0,contactId:"testid"},o=(0,n.Z0)({name:"oauth",initialState:s,reducers:{setLastAuthedPath:(e,t)=>{e.lastAuthedPath=t.payload}},extraReducers:e=>{for(let[t,r]of Object.entries(a.oR.endpoints))e.addMatcher(r.matchRejected,(e,t)=>{var r,n;401===(null!=(n=null==t||null==(r=t.payload)?void 0:r.status)?n:500)&&(e.tokenExpire=s.tokenExpire,e.contactId=s.contactId)});e.addMatcher(a.oR.endpoints.getToken.matchFulfilled,(e,t)=>{let r=t.payload.payload;e.tokenExpire=r.exp,e.contactId=r.contact_id}).addMatcher(a.oR.endpoints.getLogoutUrl.matchFulfilled,(e,t)=>{Object.assign(e,s)})}}),{setLastAuthedPath:i}=o.actions,l=o.reducer},65525:(e,t,r)=>{"use strict";r.d(t,{h:()=>u});var n=r(43963),a=r(56973),s=r(95155),o=e=>
1(0,s.jsxs)("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...e,children:[(0,s.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,s.jsx)("path",{d:"M15 3h6v6"}),(0,s.jsx)("path",{d:"M10 14L21 3"})]}),i=r(52665),l=(0,a.Rf)((e,t)=>{let{Component:r,children:a,showAnchorIcon:l,anchorIcon:u=(0,s.jsx)(o,{className:i.A}),getLinkProps:c}=(0,n.i)({ref:t,...e});return(0,s.jsx)(r,{...c(),children:(0,s.jsxs)(s.Fragment,{children:[a,l&&u]})})});l.displayName="NextUI.Link";var u=l},66537:(e,t,r)=>{Promise.resolve().then(r.bind(r,16790))},81849:(e,t,r)=>{"use strict";r.d(t,{Ax:()=>u,Ay:()=>d,xM:()=>c});var n=r(95155),a=r(12115),s=r(52615);let o={success:"bg-success",error:"bg-error",info:"bg-info",warning:"bg-warning text-black",default:"bg-primary",dark:"bg-primary"},i=e=>{var t;let r=null!=(t=null==e?void 0:e.type)?t:"default";return"".concat(o[r]," relative flex p-4 min-h-10 sm:rounded-md justify-between overflow-hidden cursor-pointer")},l={position:"top-center",autoClose:3e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!1,progress:void 0,theme:"colored",transition:s.q7};function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s.oR.error(e,{toastId:"error",...l,...t})}function c(e){let{successMsg:t,errorMsg:r,postResult:n,optionOverrides:o={}}=e,[i,c]=(0,a.useState)(null);return(0,a.useEffect)(()=>{n.isSuccess&&n.requestId!==i&&(!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s.oR.success(e,{toastId:"success",...l,...t})}(t,o),c(n.requestId))},[t,n.isSuccess,n.requestId,i,o]),(0,a.useEffect)(()=>{n.isError&&n.requestId!==i&&(u(r,o),c(n.requestId))},[r,n.isError,n.requestId,i,o]),null}function d(e){return(0,n.jsx)(s.N9,{limit:1,toastClassName:i,...e})}}},e=>{var t=t=>e(e.s=t);e.O(0,[920,404,836,615,441,684,358],()=>t(66537)),_N_E=e.O()}]);
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.