PageSourceSearch

https://www.leasingoptions.co.uk/_next/static/chunks/pages/events/search-473a372c11c3e1fc.js

js leasingoptions.co.uk collected 2026-10-03 23:42:37 UTC 8,974 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3654],{7908:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/events/search",function(){return s(19777)}])},13528:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var n,l=s(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e}).apply(null,arguments)}let c=function(e){return l.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"spinner_svg__svg-inline--fa spinner_svg__spin-mener spinner_svg__fa-w-16","data-icon":"spinner","data-prefix":"fas",viewBox:"0 0 512 512"},e),n||(n=l.createElement("path",{fill:"currentColor",d:"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48m-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48m208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48M96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48m12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48m294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48M108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48"})))}},19777:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>b,default:()=>p});var n=s(37876),l=s(14232),a=s(98731),c=s(16057),r=s(99287),i=s(62339),o=s(67469),d=s(63919),m=s(56325),h=s(13528),u=s(52484),v=s(55328),x=s(54783),g=s(85147),b=!0;function p({searchParam:e,searchType:t,eventsList:s,pagination:a}){let b=(0,l.useRef)(null),p=(0,l.useRef)(null),f=a.pageSize,[j,w]=(0,l.useState)(1),[N,k]=(0,l.useState)(!1),[y,S]=(0,l.useState)(!1),[_,C]=(0,l.useState)(null),[E,P]=(0,l.useState)(!1),[A,O]=(0,l.useState)(null),[D,z]=(0,l.useState)(null),[I,T]=(0,l.useState)(s?.dataItems),[B,M]=(0,l.useState)(a.pageIndex),[H,$]=(0,l.useState)(s?.totalItemsCount),[L,V]=(0,l.useState)(s?.totalPagesCount),[U,F]=(0,l.useState)(!1),[R,X]=(0,l.useState)(!1),[G,Y]=(0,l.useState)(!0),[q,J]=(0,l.useState)(!1),[K,Q]=(0,l.useState)(null),W=s=>{K&&clearTimeout(K),Q(setTimeout(function(){let n={searchPhrase:e,eventTypeUrlPart:t};A&&(n.fromDate=A),D&&(n.toDate=D),(0,x.tB)(n,{pageSize:f,pageIndex:B},_).then(function(e){s?T(t=>[...t,...e?.data?.dataItems]):T(e?.data?.dataItems||[]),$(e?.data?.totalItemsCount),V(e?.data?.totalPagesCount),F(!1);let t=sessionStorage.getItem("scrollPosition");t&&(window.scrollTo(0,parseInt(t)),sessionStorage.removeItem("scrollPosition"))})}))};return(0,l.useEffect)(()=>{!G&&B>0&&W(R)},[B,e]),(0,l.useEffect)(()=>{G?Y(!1):1!==B?(X(!1),M(1)):(X(!1),W(!1))},[_,A,D]),(0,l.useEffect)(()=>{function e(){J(!0),sessionStorage.setItem("scrollPosition",window.pageYOffset.toString())}return window.addEventListener("scroll",e),e(),()=>{window.removeEventListener("scroll",e)}},[]),(0,g.A)(b,function(){S(!1)}),(0,g.A)(p,function(){P(!1)}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("section",{className:"container-fluid py-5 py-md-4 pt-lg-6 pb-lg-5 bg-ink",children:(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("div",{className:"col-24 d-md-none p-0",children:(0,n.jsx)(r.A,{isSticky:j>250,onClick:()=>k(!N)})}),(0,n.jsx)("div",{className:"col-24 col-md-6 d-none d-md-block",children:(0,n.jsx)(o.A,{searchParam:e,social:!0})}),(0,n.jsxs)("div",{className:"col-24 col-md-18 pt-5 pt-md-0",children:[(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-24 mb-4 mb-md-5",children:(0,n.jsx)("div",{className:"w-100 d-block bg-personal-secondary-grad p-3 p-md-4 text-dark text-center rounded-account h2 mb-0",children:"Event Search"})})}),I.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("div",{className:"col-24 col-md-12 mb-3 mb-md-4",children:(0,n.jsxs)("span",{className:"h2 text-white text-capitalize d-block m-0",children:[e," Events"]})}),(0,n.jsxs)("div",{className:"col-24 col-md-12 mb-md-4 text-end",children:[(0,n.jsxs)("div",{ref:b,className:`dropdown ${y?"is-active":""}`,children:[(0,n.jsxs)("button",{className:`btn btn-lg btn-fluid me-3 ${y?"btn-hot-sky text-dark fill-dark":"btn-outline-hot-sky text-hot-sky fill-hot-sky text-dark-h
1over fill-dark-hover"}`,onClick:()=>S(!y),children:[(0,n.jsx)(d.A,{width:14,height:14,className:"me-2"}),(0,n.jsx)("span",{children:"Sort By"})]}),(0,n.jsxs)("ul",{className:"text-start rounded-1 overflow-hidden",children:[(0,n.jsx)("li",{children:(0,n.jsx)("button",{type:"button",className:"btn btn-block",onClick:()=>{C({sortBy:"title",sortDirection:"ASC"}),S(!1)},children:"Title ASC"})}),(0,n.jsx)("li",{children:(0,n.jsx)("button",{type:"button",className:"btn btn-block",onClick:()=>{C({sortBy:"title",sortDirection:"DESC"}),S(!1)},children:"Title DESC"})}),(0,n.jsx)("li",{children:(0,n.jsx)("button",{type:"button",className:"btn btn-block",onClick:()=>{C({sortBy:"createdon",sortDirection:"ASC"}),S(!1)},children:"Newest"})})]})]}),(0,n.jsxs)("div",{ref:p,className:`dropdown ${E?"is-active":""}`,children:[(0,n.jsxs)("button",{className:`btn btn-lg btn-fluid text-dark ${E?"btn-hot-sky text-dark fill-dark":"btn-outline-hot-sky text-hot-sky fill-hot-sky text-dark-hover fill-dark-hover"}`,onClick:()=>P(!E),children:[(0,n.jsx)(m.A,{width:14,height:14,className:"me-2"}),(0,n.jsx)("span",{children:"Dates"})]}),(0,n.jsxs)("ul",{className:"is-right text-start rounded-1 overflow-hidden p-3",children:[(0,n.jsxs)("li",{className:"mb-3",children:[(0,n.jsx)("small",{className:"w-100 d-block mb-1",children:"Start date"}),(0,n.jsx)("input",{type:"date",className:"form-control",onChange:e=>O(e.target.value)})]}),(0,n.jsxs)("li",{children:[(0,n.jsx)("small",{className:"w-100 d-block mb-1",children:"End date"}),(0,n.jsx)("input",{type:"date",className:"form-control",onChange:e=>z(e.target.value)})]})]})]})]})]}),(0,n.jsx)("div",{className:"row mt-6 mt-md-0",children:I?.map(e=>(0,n.jsx)("div",{className:"col-24 col-md-8 d-flex mb-3 mb-md-4",children:(0,n.jsx)(i.A,{branding:v.G.PersonalPrimary,id:e.id,image:e.imageUrl,category:e.type,link:`/events/${e?.eventTypeUrlPart}/${e.urlPart}`,title:e.title,date:e.date})},e.id))}),q&&I&&I.length>0&&(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-24 col-lg-8 offset-lg-8 text-center",children:B!==L&&(0,n.jsxs)("button",{className:"w-100 btn btn-outline-hot-sky btn-lg",onClick:()=>void(X(!0),M(B+1)),children:["Load more events ",U?(0,n.jsx)(h.A,{width:"16",height:"16",className:"spin-me fill-hot-sky ms-3"}):null]})})})]}):(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-24 mt-3 mt-md-4",children:(0,n.jsx)("span",{className:"h2 text-center text-white d-block m-0",children:"There's currently no events to display."})})})]})]})}),(0,n.jsx)(c.default,{flags:{isOpen:N,isMenu:!0},settings:{handleDrawerClose:()=>k(!1)},theme:u._.Dark,children:(0,n.jsx)(o.A,{social:!0})})]})}p.layout=a.A},52484:(e,t,s)=>{"use strict";s.d(t,{_:()=>l});var n,l=((n={})[n.Normal=0]="Normal",n[n.Light=1]="Light",n[n.Dark=2]="Dark",n)},56325:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var n,l=s(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e}).apply(null,arguments)}let c=function(e){return l.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},e),n||(n=l.createElement("path",{d:"M112 0c8.8 0 16 7.2 16 16v48h192V16c0-8.8 7.2-16 16-16s16 7.2 16 16v48h32c35.3 0 64 28.7 64 64v320c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128c0-35.3 28.7-64 64-64h32V16c0-8.8 7.2-16 16-16m304 192H32v256c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32zm-32-96H64c-17.7 0-32 14.3-32 32v32h384v-32c0-17.7-14.3-32-32-32"})))}},63919:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var n,l=s(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)({}).hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e}).apply(null,arguments)}let c=function(e){return l.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},e),n||(n=l.createElement("path",{d:"M48 112V80h32v32zM16 72v48c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V72c0-13.3-10.7-24-24-24H40c-13.3 0-24 10.7-24 24m160 8c-8.8 0-16 7.2-16 16s7.2 16 16 16h320c8.8 0 16-7.2 16-16s-7.2-16-16-16zm0 160c-8.8 0-16 7.2-16 16s7.2 16 16 16h320c8.8 0 16-7.2 16-16s-7.2-16-16-16zm0 160c-8.8 0-16 7.2-16 16s7.2 16 16 16h320c8.8 0 16-7.2 16-16s-7.2-16-16-16zM48 240h32v32H48zm-8-32c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24v-48c0-13.3-10.7-24-24-24zm8 224v-32h32v32zm-32-40v48c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24v-48c0-13.3-10.7-24-24-24H40c-13.3 0-24 10.7-24 24"})))}}},e=>{e.O(0,[3721,7452,2290,4587,9403,4933,70,3096,5535,7553,6755,636,6593,8792],()=>e(e.s=7908)),_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.