PageSourceSearch

https://cdn.vodafone.co.uk/web-marketing/consumer-marketing/assets…erCardGrid-5c12d95a.4731d5403271d9658664.js

js vodafone.co.uk collected 2026-10-01 07:42:20 UTC 9,340 bytes, 1 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[9561],{94452:(e,t,r)=>{r.r(t),r.d(t,{SearchAndFilterCardGrid:()=>B,default:()=>B}),r(96010),r(58711);var n=r(48431),a=r(54507),l=r(37344),s=r(12428),o=r(5110),i=r(34355),c=r(17968);const h="alt2",d="SUBMIT_SEARCH",u="CLEAR_SEARCH",p="CLEAR_FILTERS",f="UPDATE_FILTERS",g=["a","about","above","across","actually","after","again","against","all","almost","along","also","although","always","am","among","an","and","any","around","are","as","at","be","became","become","because","behind","been","before","being","below","beneath","beside","between","beyond","both","but","by","can","could","despite","did","do","does","doing","down","during","each","either","else","except","few","for","from","further","had","has","have","having","he","he'd","he'll","hence","he's","her","here","here's","hers","herself","him","himself","his","how","how's","i","i'd","i'll","i'm","i've","if","in","inside","into","is","it","it's","its","itself","just","let's","like","may","maybe","me","might","mine","more","most","must","my","myself","near","neither","nor","not","of","off","oh","on","once","only","onto","ok","opposite","or","other","ought","our","ours","ourselves","out","outside","over","own","past","round","same","she","she'd","she'll","she's","should","since","so","some","such","than","that","that's","the","their","theirs","them","themselves","then","there","there's","these","they","they'd","they'll","they're","they've","this","those","through","to","too","towards","under","underneath","unlike","until","up","upon","very","via","was","we","we'd","we'll","we're","we've","were","what","what's","when","whenever","when's","where","whereas","wherever","where's","whether","which","while","without","who","whoever","who's","whose","whom","why","why's","will","with","within","would","yes","yet","you","you'd","you'll","you're","you've","your","yours","yourself","yourselves"],m=e=>{let t=e.filterOptions,r=e.numberOfCards,a=e.resetFilters,l=e.handleUpdateFilters,o=e.filterTitle,d=e.filterSubText;const u=n.useState(!1),p=(0,i.A)(u,2),f=p[0],g=p[1];return n.createElement(s.eB,{appearance:h},n.createElement(c.CC,{isOpen:f,onTriggerClick:()=>g(!f),onChange:(e,t)=>
1l(e,t),onClose:()=>g(!1),onClear:a,filters:t,numberOfItems:r,appearance:"secondary",title:o,subText:d}))};var w=r(77592),y=r(84089),v=r(85349);const b=()=>n.createElement(n.Fragment,null,n.createElement(y.DZ,{size:3,weight:3,justify:"center"},"Your search did not match any results we have."),n.createElement(v.fz,{size:2,weight:2,noMargin:!0,justify:"center"},"Make sure all words are spelt correctly, try using related words or fewer words."));var C=r(53283),E=r(29296);const S=e=>{let t=e.currentPagePath,r=e.lastPage;if(r<=1)return null;const a=Array.from({length:r},(e,r)=>{const n=r+1;return'<a href="'.concat(t,"?page=").concat(n,'">').concat(n,"</a>")}).join("\n"),l='\n    <nav class="pagination" aria-label="Article pagination">\n      '.concat(a,"\n    </nav>\n  ");return n.createElement("noscript",{dangerouslySetInnerHTML:{__html:l}})},O=e=>{let t=e.initialCardsOnLoad,r=e.currentPagePath,a=e.pageCards,l=e.page,o=e.totalCards;const i=Math.ceil(o/t),c=a>0&&l>0&&i>0;return n.createElement(n.Fragment,null,c&&n.createElement(s.eB,null,n.createElement(E.rS,{spacing:3,justify:"left",verticalAlign:"center",columns:{sm:1,md:6}},n.createElement(v.fz,null,"Page ",l," of ",i),l>1&&n.createElement(C.$n,{href:"".concat(r,"?page=").concat(l-1),text:"Previous page",htmlAttributes:{rel:"prev"}}),l<i&&n.createElement(C.$n,{href:"".concat(r,"?page=").concat(l+1),text:"Next page",htmlAttributes:{rel:"next"}}))),n.createElement(S,{currentPagePath:r,lastPage:i}))},T=e=>{let t=e.customKey,r=e.cards,a=e.initialCardsOnLoad,l=e.page,o=e.currentPagePath,i=e.showMoreCards,c=e.appearance;const h=0!==l,d=(e=>{let t=e.cards,r=e.initialCardsOnLoad;if(!e.hasPagination)return t;const n=(e.page-1)*r,a=n+r;return t.slice(n,a)})({hasPagination:h,cards:r,page:l,initialCardsOnLoad:a});return n.createElement(s.eB,{appearance:c},0===d.length?n.createElement(b,null):n.createElement(w.pV,{key:t,items:d.map((e,t)=>e.render({key:"card-".concat(t)})),cardsOnLoad:a,showMoreCards:h?0:i,showPaginatedButton:!h,gridLayoutSize:a}),n.createElement(O,{currentPagePath:o,totalCards:r.length,pageCards:d.length,initialCardsOnLoad:a,page:l}))};var L=r(26912);const P=e=>{let t=e.searchPlaceholder,r=e.id,a=e.handleSearchSubmit,l=e.clearSearch;const s=n.useState(""),o=(0,i.A)(s,2),c=o[0],h=o[1];return n.createElement(L.DO,{textInput:{id:r,placeholder:t,value:c,onChange:e=>h(e.target.value)},searchIconButton:{onClick:()=>{a(c)}},fieldWrapper:{label:t,showLabel:!1},onClear:()=>{h(""),l()}})};r(94865),r(32878),r(55349);const A=(e,t)=>{const r=e.toLowerCase().split(" ").filter(e=>!g.includes(e));return!r.length||r.some(e=>t.toLowerCase().includes(e))},x=e=>(null!=e?e:[]).reduce((e,t)=>(null!=t&&t.fields&&e.push(t),e),[]),_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=e.searchText,n=e.selectedTopics;let a=t;return r&&(a=((e,t)=>x(t).filter(t=>{let r=t.fields,n=r.heading,a=r.paragraph;return Boolean(n&&A(e,n))||Boolean(a&&A(e,a))}))(r,a)),n&&n.length>0&&(a=((e,t)=>{const r=x(t);return 0===e.length?t:r.filter(t=>e.some(e=>{var r,n,a;return(null===(r=t.fields)||void 0===r||null===(n=r.topics)||void 0===n?void 0:n.length)&&(null===(a=t.fields)||void 0===a?void 0:a.topics.includes(e))}))})(n,a)),a},F=_,M={[d]:(e,t)=>{let r=t.searchText,n=t.filterOptions;return{...e,searchText:null!=r?r:"",selectedTopics:[],filterOptions:null!=n?n:[]}},[u]:(e,t)=>{let r=t.filterOptions;return{...e,searchText:"",selectedTopics:[],filterOptions:null!=r?r:[]}},[f]:(e,t)=>{let r=t.id,n=t.updatedFilter;const a=e.filterOptions.map(e=>r===e.id?{...n}:e);return{...e,filterOptions:a,selectedTopics:(0,c.ug)(a)}},[p]:(e,t)=>{let r=t.filterOptions;return{...e,selectedTopics:[],filterOptions:null!=r?r:[]}}},N=(e,t)=>{if(!t.type)return e;const r=M[t.type];return r?r(e,t):e};r(50568);const I=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[];for(const l of e){var r,n,a;null!=l&&null!==(r=l.fields)&&void 0!==r&&r.category&&null!=l&&null!==(n=l.fields)&&void 0!==n&&null!==(a=n.topics)&&void 0!==a&&a.length&&t.push(l)}if(!t.length)return[];const l=(e=>{const t=e.reduce((e,t)=>
1{const r=t.fields,n=r.category,a=r.topics;if(!n)return e;const l=e.get(n)||new Set;return null!=a&&a.length&&a.forEach(e=>l.add(e)),e.set(n,l),e},new Map);return t.forEach((e,r)=>{const n=[...e].sort((e,t)=>e.localeCompare(t));t.set(r,new Set(n))}),t})(t),s=(e=>new Map([...e.entries()].sort((e,t)=>{let r=(0,i.A)(e,1)[0],n=(0,i.A)(t,1)[0];return r.localeCompare(n)})))(l);return[...s].map(e=>{let t=(0,i.A)(e,2),r=t[0];return{title:r,type:"checkbox",id:r,options:{groupName:r},items:[...t[1]].map(e=>({label:e,checked:!1,value:e}))}})};r(35362);const k=e=>{var t;if("undefined"==typeof window)return{page:0,path:null!=e?e:""};const r=new URLSearchParams(window.location.search),n=Number(null!==(t=r.get("page"))&&void 0!==t?t:"0");return{page:Number.isFinite(n)&&n>0?n:0,path:null!=e?e:window.location.pathname}},B=()=>{const e=(0,a.Yr)(),t=e.anchorId,r=e.cardsOnLoad,c=e.showMoreCards,g=e.searchPlaceholder,w=e.cards,y=e.filterSubText,v=e.filterTitle,b=(0,a.Hl)().localData.sys.id,C=(e=>{const t=[];for(const n of e||[]){var r;null!=n&&n.fields&&null!=n&&null!==(r=n.sys)&&void 0!==r&&r.id&&t.pu
1sh(n)}return t})(w),E=(e=>{const t=(0,n.useState)(k(e)),r=(0,i.A)(t,2),a=r[0],l=r[1];return(0,n.useEffect)(()=>{const t=k(e);l(t)},[e]),a})((0,o.p)().staticPagePath),S=E.page,O=E.path,L=(e=>{var t;const r={searchText:"",selectedTopics:[],filterOptions:null!==(t=I(e))&&void 0!==t?t:[],cards:e},a=(0,n.useReducer)(N,r),l=(0,i.A)(a,2),s=l[0],o=l[1];return{state:s,handleSearchSubmit:t=>{const r=F({searchText:t},e);o({type:d,searchText:t,filterOptions:I(r)})},handleClearSearch:()=>{o({type:u,filterOptions:r.filterOptions})},handleResetFilters:()=>{o({type:p,filterOptions:r.filterOptions})},handleUpdateFilters:(e,t)=>{o({type:f,id:e,updatedFilter:t})}}})(C),A=L.handleSearchSubmit,x=L.handleClearSearch,M=L.handleResetFilters,B=L.handleUpdateFilters,D=L.state,R=D.searchText,U=D.selectedTopics,j=D.filterOptions,z=function(e){let t=arguments.length>2?arguments[2]:void 0;const r=_(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),n=new Set;return r.forEach(e=>{var t;const r=null==e||null===(t=e.sys)||void 0===t?void 0:t.id;r&&n.add(r)}),t.filter(e=>e.contentId&&n.has(e.contentId))}({searchText:R,selectedTopics:U},C,(0,a.fp)("cards")),H=((e,t)=>{const r=Number.parseInt(String(e),10),n=Number.isNaN(r)?3:r,a=Number.parseInt(String(t||e),10);return{initialCardsOnLoad:n,safeShowMoreCards:Number.isNaN(a)?n:a}})(r,c),K=H.initialCardsOnLoad,W=H.safeShowMoreCards,Y=h;return n.createElement(s.eB,{appearance:Y},n.createElement(l.Mz,{anchorId:t}),n.createElement(P,{searchPlaceholder:null!=g?g:"What are you looking for?",id:"id-".concat(b),handleSearchSubmit:A,clearSearch:x}),j.length>=1?n.createElement(m,{filterOptions:j,numberOfCards:z.length,resetFilters:M,handleUpdateFilters:(e,t)=>B(e,t),filterTitle:v,filterSubText:y}):null,n.createElement(T,{appearance:Y,customKey:R+U.join("-"),cards:z,page:S,currentPagePath:O,initialCardsOnLoad:K,showMoreCards:W}))}}}]);

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.