1import{a as R,b as S}from"./Y7Lmour1.js";import{d as T,G as f,c as g,o as c,z as U,k as s,w as n,b as e,a as b,t as C,a0 as $,i as y,j as H,q as r,N as E,B as D,J as M,v,ah as z,Q as q,ai as w,D as B,K as I,a2 as G,r as h,O as P,aD as J,aE as K,a_ as Q,a1 as W,M as Y,$ as X}from"./Dh7ITaNP.js";import{a as Z,u as ee}from"./DoiyPCPA.js";import"./lqzArHOP.js";const te=T({__name:"EventInstanceBrowserHit",props:{instance:{}},setup(x){const i=x,u=f(()=>new Date(i.instance.start_date)),V=f(()=>u.value<new Date),m=f(()=>{var a,l,o;return(o=(l=(a=i.instance.eventConnection)==null?void 0:a.edges)==null?void 0:l[0])==null?void 0:o.node}),_=f(()=>{var a,l,o;return(o=(l=(a=i.instance.locationConnection)==null?void 0:a.edges)==null?void 0:l[0])==null?void 0:o.node}),k=f(()=>(new Date(i.instance.start_date),R(i.instance,!0)));return(a,l)=>(c(),g(U,{"prepend-icon":"fa-regular fa-calendar",href:a.instance.url??void 0,lines:"two",variant:s(V)?"plain":void 0},{default:n(()=>[e($,null,{default:n(()=>[b("strong",null,C([a.instance.cancelled?"CANCELLED":null,s(k)].filter(Boolean).join(" - ")),1)]),_:1}),e(D,{tag:a.instance.cancelled?"strike":"div",class:"font-weight-bold text-primary"},{default:n(()=>{var o,d;return[s(_)?(c(),y(E,{key:0},[r(C([(o=s(_))==null?void 0:o.title,(d=a.instance)==null?void 0:d.location_note].filter(Boolean).join(", ")),1)],64)):H("",!0)]}),_:1},8,["tag"]),e(D,{class:"text-caption mt-1"},{default:n(()=>{var o;return[r(C(a.instance.notes?a.instance.notes:(o=s(m))==null?void 0:o.title),1)]}),_:1})]),_:1},8,["href","variant"]))}}),ne=Object.assign(te,{__name:"FeatureCalendarEventInstanceBrowserHit"}),ae=T({__name:"EventBrowserAlgolia",props:{uids:{},locationUid:{},view:{default:"week"},activeDate:{}},setup(x){const i=x,{tab:u,rangeName:V,range:m,decrement:_,increment:k,setActiveDate:a}=S();M(()=>{u.value=i.view,a(i.activeDate)});const{searchClient:l}=Z(),o=f(()=>{var d;return{hitsPerPage:999,filters:[...((d=i.uids)==null?void 0:d.map(t=>t?`eventConnection.edges.node.system.uid:${t}`:void 0))??[],...i.locationUid?[`locationConnection.edges.node.system.uid:${i.locationUid}`]:[]].filter(Boolean).join(" OR ")}});return(d,t)=>{const L=v("ais-range-input"),N=ne,j=v("ais-hits"),A=v("ais-configure"),F=v("ais-instant-search");return c(),g(I,null,{default:n(()=>[e(z,{modelValue:s(u),"onUpdate:modelValue":t[0]||(t[0]=p=>q(u)?u.value=p:null),"align-tabs":"center","fixed-tabs":"",xstacked:"","center-active":"",color:"primary"},{default:n(()=>[e(w,{value:"week"},{default:n(()=>[e(B,{class:"mb-2"},{default:n(()=>t[1]||(t[1]=[r("fa-solid fa-list")])),_:1,__:[1]}),t[2]||(t[2]=r(" Week "))]),_:1,__:[2]}),e(w,{value:"month"},{default:n(()=>[e(B,{class:"mb-2"},{default:n(()=>t[3]||(t[3]=[r("fa-regular fa-calendar-days")])),_:1,__:[3]}),t[4]||(t[4]=r(" Month "))]),_:1,__:[4]}),e(w,{value:"year"},{default:n(()=>[e(B,{class:"mb-2"},{default:n(()=>t[5]||(t[5]=[r("fa-regular fa-calendar-check")])),_:1,__:[5]}),t[6]||(t[6]=r(" Year "))]),_:1,__:[6]})]),_:1},8,["modelValue"]),e(I,{flat:"",rounded:0,color:"primary",variant:"tonal"},{default:n(()=>[e(G,{class:"text-caption text-center"},{default:n(()=>[e(h,{onClick:s(_),rounded:"",icon:"fa-solid fa-chevron-left"},null,8,["onClick"]),e(P),b("strong",null,C(s(V)),1),e(P),e(h,{onClick:s(k),rounded:"",icon:"fa-solid fa-chevron-right"},null,8,["onClick"])]),_:1})]),_:1}),e(F,{"search-client":s(l),"index-name":("usePrefixedIndex"in d?d.usePrefixedIndex:s(ee))({index_id:"contentstack_event_instances",prefix_environment:!0})},{default:n(()=>[e(A,J(K(s(o))),{default:n(()=>[e(L,{attribute:"_start_date",min:s(m).start.getTime(),max:s(m).end.getTime()},{default:n(()=>t[7]||(t[7]=[b("template",null,null,-1)])),_:1,__:[7]},8,["min","max"]),e(j,null,{default:n(({items:p,sendEvent:se})=>[p.length?(c(),g(W,{key:1,lines:"three",class:"py-0"},{default:n(()=>[(c(!0),y(E,null,Y(p,O=>(c(),y(E,null,[e(X),e(N,{instance:O,role:"option"},null,8,["instance"])],64))),256))]),_:2},1024)):(c(),g(Q,{key:0,class:"text-center text-caption py-10"},{default:n(()=>t[8]||(t[8]=[r(" There are no events during this time period. ")])),_:1,__:[8]}))]),_:1})]),_:1},16)]),_:1}
1,8,["search-client","index-name"])]),_:1})}}}),de=Object.assign(ae,{__name:"FeatureCalendarEventBrowserAlgolia"});export{de 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.