1import{m as k,a as f,F as m,d,o,f as u,q as e,H as s,r as h,e as y,A as C,M as S,N as L,bo as D,V as I,n as P,bp as T,bq as V,u as x,b as z,c as F,br as N,bs as O}from"#entry";import{H as E}from"./BrO7ZMg4.js";import{A as H}from"./CcgfxPf1.js";import R from"./D7Tju7uG.js";import{f as q,a as M}from"./FdcPWEyk.js";import{A as U}from"./BRZuQsCX.js";import{s as Q,u as j}from"./DZOWnlyB.js";import{C as G}from"./uFkuGAPi.js";import{P as Y}from"./DIROu8DH.js";import{u as p}from"./Ce6Nt4_q.js";import"./BWm2QbaW.js";import"./uLTuCxeC.js";import"./BVMLg2kT.js";import"./DS9BSpz8.js";import"./Co190ZoO.js";import"./BS0WhQ0q.js";const J={name:"BidCard",components:{AnimatedArrow:U},props:{data:{type:Object,required:!0}},computed:{store(){return f()},isIOS(){return this.store.isIOS},isDesktop(){return this.store.isDesktop},localizedStrings(){return this.store.localizedStrings},closingDateDisplay(){return M(this.data)},closingTimeDisplay(){return q(this.data)},titleId(){return`bid-card-title-${Q(this.data?.title||"bid")}`}},methods:{triggerAnimation(n){this.$refs.animatedArrow?.animateArrow(n)}}},K=["aria-labelledby","aria-label"],W=["id"],X={class:"value"},Z={class:"value"},$={class:"value"},ee={class:"value owner-value"},te={key:0},ae={class:"value"},ie={class:"value"},se={class:"value"},re={class:"value"},ne={class:"estimator"},le={class:"estimator-details"},oe={class:"value estimator-name"},de={key:1},ce=["href","aria-label"];function ue(n,r,t,l,i,a){const g=m("AnimatedArrow");return o(),d("div",{class:"bid-card tab-focus-card",role:"group","aria-roledescription":"card","aria-labelledby":a.isIOS?a.titleId:null,"aria-label":a.isIOS?null:t.data.title},[a.isIOS?(o(),d("span",{key:0,id:a.titleId,class:"sr-only"},s(t.data.title),9,W)):u("",!0),e("h4",null,s(t.data.title),1),e("ul",null,[e("li",null,[e("p",null,s(a.localizedStrings?.["bid.jobNumber"]??"Job#:"),1),e("p",X,s(t.data.jobNumber),1)]),e("li",null,[e("p",null,s(a.localizedStrings?.location??"Location:"),1),e("p",Z,s(t.data.location),1)]),e("li",null,[e("p",null,s(a.localizedStrings?.["bid.primeConsultant"]??"Prime Consultant:"),1),e("p",$,s(t.data.primeConsultant),1)]),e("li",null,[e("p",null,s(a.localizedStrings?.["bid.owner"]??"Owner:"),1),e("p",ee,s(t.data.owner),1)]),t.data.values?(o(),d("li",te,[e("p",null,s(a.localizedStrings?.["bid.values"]??"Values:"),1),e("p",ae,s(t.data.values),1)])):u("",!0),e("li",null,[e("p",null,s(a.localizedStrings?.["bid.closingDate"]??"Closing Date:"),1),e("p",ie,s(a.closingDateDisplay),1)]),e("li",null,[e("p",null,s(a.localizedStrings?.["bid.time"]??"Time:"),1),e("p",se,s(a.closingTimeDisplay),1)]),e("li",null,[e("p",null,s(a.localizedStrings?.["bid.ammendumNumber"]??"Addendum #:"),1),e("p",re,s(t.data.addendumNumber),1)]),e("li",ne,[e("p",null,s(a.localizedStrings?.["bid.estimator"]??"Estimator:"),1),e("div",le,[e("p",oe,s(t.data.estimator?.name),1),e("p",null,s(t.data.estimator?.email),1)])]),t.data.estimator?.email?(o(),d("li",de,[e("a",{href:`mailto:${t.data.estimator?.email}`,class:"contact-us","aria-label":`Contact estimator ${t.data.estimator?.name||""} by email`,onMouseover:r[0]||(r[0]=b=>a.triggerAnimation("in")),onMouseleave:r[1]||(r[1]=b=>a.triggerAnimation("out"))},[r[2]||(r[2]=e("span",null,"Contact Us",-1)),h(g,{ref:"animatedArrow",colour:"#0032a0"},null,512)],40,ce)])):u("",!0)])],8,K)}const me=k(J,[["render",ue],["__scopeId","data-v-68774390"]]),ge={name:"BidList",components:{HeadingLabel:E,AnimatedHeading:H,Carousel:R,BidCard:me,CategoryFilters:G,PaginationButtons:Y},props:{data:{type:Object,required:!0}},setup(){const{$sanity:n}=x(),r=z().locale.value,t=f(),l=F(()=>t.isDesktop),i=j(),{data:a,error:g}=p(N,{type:"bidCategory",locale:r}),{data:b,error:_}=p(O,{type:"bid",locale:r});return g.value&&console.error("Error fetching categories data:",g.value),_.value&&console.error("Error fetching count data:",_.value),{categories:a,count:b,locale:r,isDesktop:l,sanityClient:n,t:i}},data(){return{activeCategory:"view_all",paginateIncrement:12,currentPage:1,bids:[],isLoading:!1,srMessage:"",srHidden:!0,srTimer:void 0}},computed:{headingLabel(){return this.data?.headingLabel||void 0}
1,isDarkBackground(){return this.data.backgroundColour==="#0032A0"},headingColour(){return this.isDarkBackground?"#FFFFFF":"#0032A0"},carouselBreakpoints(){return{0:{slidesPerView:1,spaceBetween:16},768:{spaceBetween:24,slidesPerView:2},1200:{spaceBetween:24,slidesPerView:3}}}},watch:{activeCategory:"resetAndFetch",currentPage:{async handler(){await this.fetchBids(),this.isDesktop&&this.handlePaginationScroll()}}},mounted(){this.fetchBids()},methods:{async fetchBids(){const n=this.activeCategory==="view_all"?T:V,r={type:"bid",locale:this.locale,region:f().region,...this.activeCategory!=="view_all"?{category:this.activeCategory}:{}};this.activeCategory==="view_all"&&(r.limit=this.paginateIncrement,r.offset=(this.currentPage-1)*this.paginateIncrement);try{this.isLoading=!0,this.announce(this.t("loadingResults","Loading resultsâ¦"));const t=await this.sanityClient.fetch(n,r);this.bids=Array.isArray(t)?t:[];const l=this.activeCategory==="view_all"?this.t("viewAll","View All"):(this.categories||[]).find(i=>i.machineName===this.activeCategory)?.title||this.activeCategory;this.announce(this.t("resultsSummary",'Updated: {COUNT} results for "{CATEGORY}".',{COUNT:String(this.bids.length||0),CATEGORY:l}))}catch(t){console.error("Error fetching bids:",t),this.announce(this.t("errorLoading","Error loading results."))}finally{this.isLoading=!1}},resetAndFetch(){this.currentPage=1,this.fetchBids()},handlePaginationScroll(){const n=this.$refs.rootEl||this.$el;if(!(!n||typeof n.scrollIntoView!="function"))try{n.scrollIntoView({behavior:"smooth",block:"start"}),requestAnimationFrame(()=>{n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0})})}catch{window.scrollTo({top:0,behavior:"smooth"})}},announce(n){this.srHidden=!1,this.srMessage=n,this.srTimer&&clearTimeout(this.srTimer),this.$nextTick(()=>{this.srTimer=window.setTimeout(()=>{this.srHidden=!0},250)})}}},he=["id"],be=["aria-label","aria-busy"],_e={key:0,class:"no-results"},ye=["aria-label","aria-busy"],fe=["aria-label"],ve={key:0,class:"no-results"},Ce={id:"bids-status",class:"sr-only",role:"status"};function pe(n,r,t,l,i,a){const g=m("HeadingLabel"),b=m("AnimatedHeading"),_=m("CategoryFilters"),v=m("BidCard"),w=m("Carousel"),A=m("PaginationButtons"),B=D;return o(),d("section",{id:t.data.anchorId,ref:"rootEl",class:P(["bid-list module",{"section-has-background":t.data.backgroundColour},{"dark-background":a.isDarkBackground}]),style:I({backgroundColor:t.data.backgroundColour})},[a.headingLabel?(o(),y(g,{key:0,"text-align":"center","background-type":a.headingLabel?.backgroundType,icon:a.headingLabel?.iconPicker?.svgCode,copy:a.headingLabel?.labelCopy},null,8,["background-type","icon","copy"])):u("",!0),t.data.heading?(o(),y(b,{key:1,"text-align":"center","class-name":"module-heading",tag:"h2",colour:a.headingColour,"portable-text":t.data.heading,"scroll-trigger-start":"top 60%"},null,8,["colour","portable-text"])):u("",!0),h(B,null,{default:C(()=>[h(_,{modelValue:i.activeCategory,"onUpdate:modelValue":r[0]||(r[0]=c=>i.activeCategory=c),categories:l.categories,"desktop-alignment":"center","item-type":"bids","results-region-id":"bids-results"},null,8,["modelValue","categories"]),l.isDesktop?(o(),d("div",{key:1,id:"bids-results",role:"region","aria-label":l.t("bidsResults","Bids results"),"aria-busy":i.isLoading?"true":"false"},[e("ul",{class:"bids-grid site-content-container",role:"list","aria-label":l.t("bidsList","Results list")},[(o(!0),d(S,null,L(i.bids,c=>(o(),d("li",{key:c.title,role:"listitem"},[h(v,{data:c},null,8,["data"])]))),128)),i.bids&&i.bids.length===0&&!i.isLoading?(o(),d("li",ve,[e("p",null,s(l.t("noResults","No results found.")),1)])):u("",!0)],8,fe)],8,ye)):(o(),d("div",{key:0,id:"bids-results",class:"bids-carousel",role:"region","aria-label":l.t("bidsResults","Bids results"),"aria-busy":i.isLoading?"true":"false"},[h(w,{id:t.data?._key,data:i.bids,breakpoints:a.carouselBreakpoints},{slide:C(({slide:c})=>[h(v,{data:c},null,8,["data"])]),_:1},8,["id","data","breakpoints"]),i.bids&&i.bids.length===0&&!i.isLoading?(o(),d("p",_e,s(l.t("noResults","N
1o results found.")),1)):u("",!0)],8,be)),l.isDesktop&&i.activeCategory==="view_all"&&l.count>i.paginateIncrement?(o(),y(A,{key:2,modelValue:i.currentPage,"onUpdate:modelValue":r[1]||(r[1]=c=>i.currentPage=c),"current-page":i.currentPage,count:l.count,increment:i.paginateIncrement},null,8,["modelValue","current-page","count","increment"])):u("",!0)]),_:1}),e("div",Ce,s(i.srMessage),1)],14,he)}const Ee=k(ge,[["render",pe],["__scopeId","data-v-4d34b160"]]);export{Ee as default};
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.