PageSourceSearch

https://assets.fieldlevel.com/6e79aae1c4/assets/CoachSearchPage-CiPkhtV-.js

js fieldlevel.com collected 2026-09-24 10:00:35 UTC 4,535 bytes, 2 lines download raw bytes

1import{r as u,j as n}from"./playbook-BN4J3fpY.js";import{C as L}from"./CoachListComponent-BManRevb.js";import{P as b}from"./PageTitle-FYR7CltF.js";import{g}from"./natsAnalyticsUtils-Bgd5M8wI.js";import{u as I}from"./urlBuilder-B6dOiKLr.js";import{E as P,x as T,C as K}from"./app-public-BA_F7Vjg.js";import{u as q}from"./useCanonical-CRpNl4GZ.js";import{s as v}from"./queryUtils-BMPR3ius.js";import{h as d}from"./AppUpdateMonitor-B2IzIKp2.js";import{u as y}from"./useQuery-DQVsgF3X.js";import{u as A}from"./useParamTools-Bhzy_RwR.js";import"./CoachListItemComponent-lySqPlyU.js";import"./Chip-CNwpr6d_.js";import"./PreventOrphanText-UBVWOkSd.js";import"./UserHeadshot-CWnda1UA.js";import"./imageSrcManager--1PQR1yA.js";import"./ListWithFilters-BDPxOVlf.js";import"./SearchFilters-Bq02KMbs.js";import"./DropdownMenu-Bi-ejoUS.js";import"./dateUtils-DoT-fxLW.js";import"./use_UNSTABLE_horizontalScrollTracking-DU4cDvPC.js";import"./grammar-dP6wXds3.js";import"./masquerading-D9-8TY9S.js";import"./TwitterMajor-CLsdpYfn.js";import"./LinkedinMajor-DuUR9cIi.js";import"./useBaseQuery-cvMOEPrV.js";import"./utils-B3Wd421l.js";import"./useURLParams-CByhGSg-.js";const S="/api/CoachSearchApi",E=({query:a,sportEnum:t,country:i,state:c,athleticAssociation:r,sort:s,page:o,pageSize:e})=>d.get(`${S}/searchv2`,{page:o,pageSize:e||25,state:c,country:i,athleticAssociation:r,query:a,sportEnum:t,sort:s}),k=()=>d.get(`${S}/options`),x=({query:a,sportEnum:t,country:i,state:c,athleticAssociation:r,sort:s,page:o,pageSize:e})=>[`${P.coachSearch}`,v({params:{query:a,sportEnum:t,country:i,state:c,athleticAssociation:r,sort:s,page:o,pageSize:e}})],O=({params:a={query,sportEnum,country,state,athleticAssociation,sort,page,pageSize},options:t}={})=>y(x(a),()=>E({query:a.query,sportEnum:a.sportEnum,country:a.country,state:a.state,athleticAssociation:a.athleticAssociation,sort:a.sort,page:a.page,pageSize:a.pageSize}),t),U=({searchOptions:a})=>{const t=T(),i=a&&{sort:{searchParamKey:"sort",requestParamKey:"sort",defaultValue:"distance",options:[{label:"Distance",value:"distance"},{label:"Newest",value:"newest"}]},primary:{label:"All sports",selectionType:"singleSelect",options:[{label:"All sports",value:""},...a.SportOptions.map(e=>({label:e.Label,value:e.Value}))],searchParamKey:"sportEnum",requestParamKey:"sportEnum"},secondary:[{label:"Level",selectionType:"singleSelect",options:a.AthleticAssociationOptions.map(e=>({label:e.Label,value:`${e.Value}`})),searchParamKey:"athleticAssociation",requestParamKey:"athleticAssociation"},{label:"State",selectionType:"singleSelect",options:a.StateOptions.map(e=>({label:e.Label,value:`${e.Value}`})),searchParamKey:"state",requestParamKey:"state"},{label:"Country",selectionType:"singleSelect",options:a.CountryOptions.map(e=>({label:e.Label,value:`${e.Value}`})),searchParamKey:"country",requestParamKey:"country"}],text:{placeholder:"Search by name",searchParamKey:"query",requestParamKey:"query"}},c=A({filterDef:i});if(!c)return{};const{deriveSearchParamsOnValuesChange:r,values:s,requestParams:o}=c;return{filterProps:{filterDef:i,onChange:({key:e,value:p})=>{t.coachSearch({searchParams:r({values:{[e]:p}})}).go()},onChangeMany:({values:e})=>{t.coachSearch({searchParams:r({values:e})}).go()},values:s},resetLinkProps:()=>t.coachSearch({searchParams:{}}).wiredLinkProps,getPagedLinkProps:({page:e})=>t.coachSearch({searchParams:{...o,page:e}}).wiredLinkProps,requestParams:o}},D=({options:a}={})=>y([`${P.coachSearch}_getSearchOptions`],()=>k(),a),{logImpression:m}=g("CoachSearch","CoachSearchCardImpression"),{logClick:h}=g("CoachSearch","CoachSearchCardClick"),ne=a=>{const[t,i]=u.useState(null);q();const c=I(),{data:r,isLoading:s}=D({options:{useErrorBoundary:!0}}),o=U({searchOptions:!s&&{...r,StateOptions:r.StateOptions.us.concat(r.StateOptions.ca)}}),{data:e,isLoading:p}=O({params:o&&{...o.requestParams},options:{enabled:!s,useErrorBoundary:!0}});u.useEffect(()=>{e?.PageTitle&&i(e.PageTitle)},[e?.PageTitle]);const f=l=>{e.LogId&&h&&h({userId:l.UserId,logId:e.LogId,location:"public-coach-search"})},C=l=>{e.LogId&&m&&m({userId:l.UserId,logId:e.LogId,location:"public-coach-search"})};return n.jsxs(n.Fragment,{children:[n.jsx(b,{title:t}),n.jsx(K,{children:n.jsx(L,{headerLabel:"Coaches",coaches:e?.Results,searchResultsIsLoading:p,filterToolsIsLoading:s,filterTools:o,generateCoachProfileLinkProps:l=>c.coachProfileDetailPage({pathParams:{id:l}}).wiredLinkProps,onItemClicked:f,onItemImpression:C})})]})};export{ne as default};
2//# sourceMappingURL=CoachSearchPage-CiPkhtV-.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.