1import{R as t,r as h}from"./vendor-a6c4fc13.js";import{R as te,u as ae,g as re,f as le,h as ne,a as se,S as ie,b as oe,c as ce,P as ue,C as de,F as ge,d as pe,e as he}from"./structuredData-878b5f53.js";import{P as me}from"./PeopleResultCard-5b1197cc.js";import{I as fe}from"./InsightsResultCard-2b49c65a.js";import{d as Ee}from"./utils-3a9d2551.js";const B=({result:N,title:_,description:C,contentType:d,displayContentType:R,url:F,date:w})=>{const M=["cases","publishing","practices"];return d==="undefined"||d===void 0?null:t.createElement(te,{result:N,href:F,className:"search-result-card"},t.createElement("div",{className:"search-result-card__content"},R&&t.createElement("div",{className:"search-result-card__type"},R.toUpperCase()),t.createElement("h3",{className:"search-result-card__title"},_),C&&t.createElement("p",{className:"search-result-card__description"},C),w&&!M.includes(d==null?void 0:d.toLowerCase())&&t.createElement("p",{className:"search-result-card__date"},w)))},q="MMM d, yyyy",_e=()=>{const N="Search Listing",[_,C]=h.useState(q),[d,R]=h.useState("en"),[F,w]=h.useState(999),[M,G]=h.useState(!1);h.useEffect(()=>{var l;const e=document.querySelector(`[aria-label="${N}"]`);if(e){const a=e.getAttribute("data-date-format"),r=e.getAttribute("data-language"),o=((l=e.getAttribute("data-hide-clear-button"))==null?void 0:l.toLowerCase())==="true",i=e.getAttribute("data-facet-options-number");C(a||q),R(r?r.split("-")[0]:"en"),w(i?Number(i):999),G(o)}},[]);const D=h.useCallback((e,l,a="en",r)=>{try{if(!e)return"";const o=c=>typeof c=="number"||typeof c=="string"&&!isNaN(Number(c))?new Date(Number(c)):typeof c=="string"?new Date(c):null,i=o(e);if(!i||isNaN(i.getTime()))return"";const u=r?o(r):null,E=(c,g)=>{const T=c.getDate(),S=c.getMonth(),m=c.getFullYear();let p;g.includes("MMMM")?p=new Intl.DateTimeFormat(a,{month:"long"}).format(c):g.includes("MMM")?p=new Intl.DateTimeFormat(a,{month:"short"}).format(c):g.includes("MM")?p=String(S+1).padStart(2,"0"):p=String(S+1);let v;return g.includes("yyyy")?v=String(m):g.includes("yy")?v=String(m).slice(-2):v=String(m),`${T} ${p} ${v}`};if(u&&!isNaN(u.getTime())&&u.getTime()>i.getTime()){const c=i.getFullYear(),g=u.getFullYear(),T=i.getMonth(),S=u.getMonth(),m=i.getDate(),p=u.getDate();if(c===g&&T===S&&m===p)return E(i,l);const O=l.includes("MMMM")?"long":"short",U=new Intl.DateTimeFormat(a,{month:O}).format(i),ee=new Intl.DateTimeFormat(a,{month:O}).format(u);return c===g&&T===S?`${m}â${p} ${U} ${c}`:c===g?`${m} ${U}â${p} ${ee} ${c}`:`${E(i,l)}â${E(u,l)}`}return E(i,l)}catch(o){return console.warn("Error formatting date:",e,o),""}},[]),V=h.useCallback(e=>{const l=e,a=l.raw||{},r=a.pageauthordate||a.date,o=a.eventenddate||a.enddate,i=D(r,_,d,o);return{id:l.uniqueId||l.id||String(Math.random()),title:a.pagename||l.title||"Untitled",description:Ee(a.pagesummary||""),contentType:a.displaycontenttype||a.contenttype||l.contenttype||"CONTENT",url:l.clickUri||l.uri||"#",date:i,author:a.author||"",practices:Array.isArray(a.pagerelatedpractices)?a.pagerelatedpractices:a.pagerelatedpractices?[a.pagerelatedpractices]:[],language:a.language||"",source:a.source||"",phone:a.phone||"",email:a.email||"",image:a.image||"",originalResult:e}},[D,_,d]),Y={organizationId:"analysisgroupnonproduction13h6gxjnn",searchHub:"site-search",pipeline:"site-search",apiKey:"xxd5bf05bf-c83c-4529-bc3b-7f45f5a8c2e6",fieldsToInclude:["title","description","contenttype","displaycontenttype","author","pagerelatedpractices","clickuri","clickuri","date","eventenddate"],facetFields:["contenttype","pagerelatedpractices","language","source"],numberOfResults:10},{listingSectionRef:j,isMobile:P,isFilterDialogOpen:H,setIsFilterDialogOpen:A,labels:n,searchLabels:b,coveoState:s,sortFields:W,displayedFacets:f,selectedFilterValues:x,transformedResults:y,numberOfResults:z,handleSearchSubmit:I,handleSortChange:K,handlePageChange:Q,handleFacetChange:$,handleRemoveSelectedFilter:J,handleClearAllFilters:k}=ae({listingAriaLabel:N,transformCoveoResult:V,fallbackConfig:Y,language:d}),L=h.useMemo(()=>({listName:"Search Results",description:"Search results from Analysis Group including people, insights, news, and other content.",url:typeof window<"u"?window.location.href:void 0}),[]),X=h.useMemo(()=>
1{if(!y.length||s.loading)return null;const e=[],l=[],a=[];return y.forEach(r=>{var i,u;const o=((i=r.contentType)==null?void 0:i.toUpperCase())||"";o==="PEOPLE"?e.push({id:r.id,name:r.title,jobTitle:r.description||void 0,affiliation:(u=r.practices)!=null&&u.length?r.practices[0]:void 0,email:r.email||void 0,telephone:r.phone||void 0,url:r.url||void 0}):o==="NEWS"||o==="EVENT"?a.push({id:r.id,title:r.title,datePublished:r.date||void 0,url:r.url||void 0,author:r.author||void 0,description:r.description||void 0}):l.push({id:r.id,title:r.title,description:r.description||void 0,datePublished:r.date||void 0,author:r.author||void 0,url:r.url||void 0})}),e.length>0?re({...L,listName:"People Search Results",description:"People search results from Analysis Group."},e):a.length>0?le({...L,listName:"News & Events Search Results",description:"News and events search results from Analysis Group."},a):l.length>0?ne({...L,listName:"Content Search Results",description:"Content search results from Analysis Group."},l):null},[y,s.loading,L]);se(X,!s.loading&&!s.error);const Z=()=>t.createElement(t.Fragment,null,t.createElement("div",{className:"listing__search-wrapper"},t.createElement(pe,{onSearch:I,initialValue:s.query,labels:{searchLabel:b.searchLabel,searchPlaceholder:b.searchPlaceholder,clearLabel:b.clearLabel,submitLabel:b.submitLabel},hideClearButton:M})),t.createElement("div",{className:"listing__facets-wrapper"},t.createElement("h2",{className:"listing__filter-title"},n.filterResultsTitle||"FILTER RESULTS"),f.length>0?f.map(e=>e.values.length===0?null:t.createElement(he,{key:e.field,facetData:e,onFilterChange:$,showMoreLabel:n.showMoreLabel,showLessLabel:n.showLessLabel,initialItemsToShow:F})):t.createElement("div",{className:"listing__no-facets"},t.createElement("p",null,n.noFacets||"No filters available for this search."))));return t.createElement("section",{className:"listing container","aria-label":"Search Listing",ref:j},t.createElement("div",{className:"listing__container"},t.createElement("div",{className:"listing__content"},!P&&t.createElement("div",{className:"listing__left-wrapper col-12 col-md-4"},t.createElement(Z,null)),t.createElement("div",{className:"listing__right-wrapper col-12 col-md-8"},t.createElement("div",{className:"listing__actions"},t.createElement("div",{className:"listing__actions-top"},t.createElement(ie,{totalResults:s.totalResults,labels:{showingResults:n.showingResults,ofResults:n.ofResults,results:n.results,forTerm:n.forTerm,noResults:n.noResults,loading:n.loading},currentPage:s.currentPage,resultsPerPage:z,searchQuery:s.query,firstSearchExecuted:s.firstSearchExecuted,isLoading:s.loading,hasResults:s.hasResults}),t.createElement("div",{className:"listing__sort"},t.createElement(oe,{sortBy:s.currentSort||"relevance",sortFields:W,labels:{sortLabel:n.sortLabel,relevanceSort:n.relevanceSort},onSortChange:K}))),x.length>0&&t.createElement("div",{className:"listing__actions-bottom"},t.createElement(ce,{filters:x,onRemoveFilter:J,onClearAll:k,labels:{clearAll:n.clearAll,removeFilter:n.removeFilter}}))),t.createElement("div",{className:"listing__results"},s.loading&&t.createElement("div",{className:"listing__loading"},t.createElement("p",null,n.loading||"Loading...")),!s.loading&&y.length>0?y.map(e=>{var a,r;let l=((r=(a=e==null?void 0:e.originalResult)==null?void 0:a.raw)==null?void 0:r.contenttype)||"CONTENT";if(l=l.toUpperCase(),l==="PEOPLE")return t.createElement(me,{key:e.id,result:e.originalResult||{raw:{}},contentType:e.contentType,id:e.id,name:e.title,title:e.description,phone:e.phone||"",email:e.email||"",image:e.image||"",url:e.url});if(l==="INSIGHTS"){const i=(e.practices||[]).map((u,E)=>({text:u,href:"#",theme:["red","teal","green","gold"][E%4]}));return t.createElement(fe,{key:e.id,result:e.originalResult||{raw:{}},type:e.contentType||"",title:e.title,subheading:e.description,practices:i,url:e.url})}else return l==="NEWS"?t.createElement(B,{key:e.id,result:e.originalResult||{raw:{}},title:e.title,description:e.description,contentType:e.contentType,displayContentType:e.contentType,url:e.url,date:e.date}
1):t.createElement(B,{key:e.id,title:e.title,description:e.description,contentType:l,displayContentType:e.contentType,url:e.url,date:e.date,practices:e.practices,result:e.originalResult||{raw:{}}})}):!s.loading&&s.firstSearchExecuted&&t.createElement("div",{className:"listing__no-results"},t.createElement("p",null,n.noResults||"No content found. Please try a different search."))),t.createElement("div",{className:"listing__pagination-container"},s.totalPages>1&&t.createElement(ue,{currentPage:s.currentPage,totalPages:s.totalPages,onPageChange:Q,labels:{next:n.paginationNext||"Next",previous:n.paginationPrevious||"Previous",page:n.paginationPage||"Page",ellipsis:n.paginationEllipsis||"..."}}))))),P&&f.length>0&&t.createElement("button",{className:"listing__filter-search-button",onClick:()=>A(!0)},n.filterAndSearchButton||"Filter & Search",t.createElement(de,null)),P&&f.length>0&&t.createElement(ge,{isOpen:H,onClose:()=>A(!1),onSearch:I,initialSearchTerm:s.query,facets:f.filter(e=>e.values.length>0).map(e=>({label:e.title,field:e.field,expanded:e.expanded})),generateFacetData:(e,l,a)=>{const r=f.find(o=>o.field===e.field);return r?{...r,title:e.label,expanded:!0,values:r.values.map(o=>({...o,selected:(a[e.field]??[]).includes(o.label)}))}:{title:e.label,field:e.field,expanded:!0,values:[]}},results:s.results,selectedFacets:Object.fromEntries(Object.entries(s.facets).map(([e,l])=>[e,l.filter(a=>a.state==="selected").map(a=>a.value)]).filter(([,e])=>e.length>0)),onFilterChange:$,onClearAllFilters:k,labels:n,searchLabels:b,facetOptionsNumber:F}))};export{_e as default}; 2//# sourceMappingURL=index-23c0a97a.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.