import{S as pl,n as pt,G as yl,y as Je,H as gl}from"./C9yenZpM.js";import{d as Re,i as he,o as $,c as T,r as Pt,j as _e,m as Q,f as P,b as g,b5 as nt,B as ze,C as se,k as He,l as rt,p as V,e as m,aB as bl,ag as Ie,aN as Mt,v as xe,s as ut,q as Le,aS as ct,$ as ke,F as le,n as Ne,t as ue,G as te,aL as _l,T as Tt,b6 as Et,h as kl,b2 as Oe,x as O,bJ as Sl,aI as De,_ as Ye,aA as yt,z as Ee,aM as et,y as Ue,X as Ke,bp as Vl,bO as Me,Q as ae,bj as Pe,a4 as ve,ap as Qe,a5 as Rt,S as Se,O as me,aZ as be,bn as wl,Y as Ft,b4 as D,Z as ye,by as dt,a6 as qe,bP as Cl,a2 as pe,aa as Lt,b9 as Al,bQ as Bt,bk as ot,al as X,ba as Te,b0 as zt,bR as Ht,R as Xe,bS as xl,bT as Il,aR as Ot,bU as Dt,bV as je,bW as $l,bl as We,bX as gt,bY as ft,ao as Gt,a7 as vt,b7 as Zt,a8 as Nt,ae as Ut,bZ as Pl,b_ as bt,af as Ml,a9 as Tl,aj as El,b$ as Rl,a3 as Fe,a1 as st,an as Kt,c0 as Fl,aq as Ll,ar as qt,c1 as Bl,av as jt,ax as Wt,c2 as _t,ac as zl,ad as Hl,am as Yt,as as Ol,at as Dl,aw as Qt,bA as it,c3 as Gl,c4 as Xt,c5 as tt,c6 as Zl,bv as Nl,ak as Ze,c7 as Ul,b8 as Kl,a$ as ql,c8 as jl,bt as Wl,c9 as Yl,bc as Ql,bd as Xl,be as kt,ca as Jl,bf as ea,bg as ta,bh as la,bi as St}from"./DTuz8pPt.js";import{a as aa}from"./CxqaYDmd.js";import{G as na}from"./ByB6-afF.js";import{G as oa}from"./DMHVZs1t.js";import{b as sa,a as ia,u as ra,m as ua,c as ca,V as Vt}from"./4NNGjxNm.js";const da=["width","height","fill","transform"],fa={key:0},va=g("path",{d:"M232,116h-4.72A100.21,100.21,0,0,0,140,28.72V24a12,12,0,0,0-24,0v4.72A100.21,100.21,0,0,0,28.72,116H24a12,12,0,0,0,0,24h4.72A100.21,100.21,0,0,0,116,227.28V232a12,12,0,0,0,24,0v-4.72A100.21,100.21,0,0,0,227.28,140H232a12,12,0,0,0,0-24Zm-92,87v-3a12,12,0,0,0-24,0v3a76.15,76.15,0,0,1-63-63h3a12,12,0,0,0,0-24H53a76.15,76.15,0,0,1,63-63v3a12,12,0,0,0,24,0V53a76.15,76.15,0,0,1,63,63h-3a12,12,0,0,0,0,24h3A76.15,76.15,0,0,1,140,203ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"},null,-1),ma=[va],ha={key:1},pa=g("path",{d:"M160,128a32,32,0,1,1-32-32A32,32,0,0,1,160,128Z",opacity:"0.2"},null,-1),ya=g("path",{d:"M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-96,87.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16h7.6A80.15,80.15,0,0,1,136,207.6ZM128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Z"},null,-1),ga=[pa,ya],ba={key:2},_a=g("path",{d:"M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-32,16h7.6A80.15,80.15,0,0,1,136,207.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16Zm-32-8a40,40,0,1,1-40-40A40,40,0,0,1,168,128Z"},null,-1),ka=[_a],Sa={key:3},Va=g("path",{d:"M232,122H221.8A94.13,94.13,0,0,0,134,34.2V24a6,6,0,0,0-12,0V34.2A94.13,94.13,0,0,0,34.2,122H24a6,6,0,0,0,0,12H34.2A94.13,94.13,0,0,0,122,221.8V232a6,6,0,0,0,12,0V221.8A94.13,94.13,0,0,0,221.8,134H232a6,6,0,0,0,0-12Zm-98,87.76V200a6,6,0,0,0-12,0v9.76A82.09,82.09,0,0,1,46.24,134H56a6,6,0,0,0,0-12H46.24A82.09,82.09,0,0,1,122,46.24V56a6,6,0,0,0,12,0V46.24A82.09,82.09,0,0,1,209.76,122H200a6,6,0,0,0,0,12h9.76A82.09,82.09,0,0,1,134,209.76ZM128,90a38,38,0,1,0,38,38A38,38,0,0,0,128,90Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,128,154Z"},null,-1),wa=[Va],Ca={key:4},Aa=g("path",{d:"M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-96,87.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16h7.6A80.15,80.15,0,0,1,136,207.6ZM128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Z"},null,-1),xa=[Aa],Ia={key:5},$a=g("path",{d:"M232,124H219.91A92.13,92.13,0,0,0,132,36.09V24a4,4,0,0,0-8,0V36.09A92.13,92.13,0,0,0,36.09,124H24a4,4,0,0,0,0,8H36.09A92.13,92.13,0,0,0,124,219.91V232a4,4,0,0,0,8,0V219.91A92.13,92.13,0,0,0,219.91,132H232a4,4,0,0,0,0-8ZM132,211.9V200a4,4,0,0,0-8,0v11.9A84.11,84.11,0,0,1,44.1,132H56a4,4,0,0,0,0-8H44.1A84.11,84.11,0,0,1,124,44.1V56a4,4,0,0,0,8,0V44.1A84.11,84.11,0,0,1,211.9,124H200a4,4,0,0,0,0,8h11.9A84.11,84.11,0,0,1,132,211.9ZM128,92a36,36,0,1,0,36,36A36,36,0,0,0,128,92Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,128,156Z"},null,-1),Pa=[$a],Ma={name:"PhCrosshair"},wt=Re({...Ma,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(e){const t=e,a=he("weight","regular"),s=he("size","1em"),l=he("color","currentColor"),r=he("mirrored",!1),n=P(()=>t.weight??a),o=P(()=>t.size??s),i=P(()=>t.color??l),u=P(()=>t.mirrored!==void 0?t.mirrored?"scale(-1, 1)":void 0:r?"scale(-1, 1)":void 0);return(c,d)=>($(),T("svg",Q({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:o.value,height:o.value,fill:i.value,transform:u.value},c.$attrs),[Pt(c.$slots,"default"),n.value==="bold"?($(),T("g",fa,ma)):n.value==="duotone"?($(),T("g",ha,ga)):n.value==="fill"?($(),T("g",ba,ka)):n.value==="light"?($(),T("g",Sa,wa)):n.value==="regular"?($(),T("g",Ca,xa)):n.value==="thin"?($(),T("g",Ia,Pa)):_e("",!0)],16,da))}}),Ta=["width","height","fill","transform"],Ea={key:0},Ra=g("path",{d:"M128,180a52.06,52.06,0,0,0,52-52V64A52,52,0,0,0,76,64v64A52.06,52.06,0,0,0,128,180ZM100,64a28,28,0,0,1,56,0v64a28,28,0,0,1-56,0Zm40,155.22V240a12,12,0,0,1-24,0V219.22A92.14,92.14,0,0,1,36,128a12,12,0,0,1,24,0,68,68,0,0,0,136,0,12,12,0,0,1,24,0A92.14,92.14,0,0,1,140,219.22Z"},null,-1),Fa=[Ra],La={key:1},Ba=g("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"},null,-1),za=g("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"},null,-1),Ha=[Ba,za],Oa={key:2},Da=g("path",{d:"M80,128V64a48,48,0,0,1,96,0v64a48,48,0,0,1-96,0Zm128,0a8,8,0,0,0-16,0,64,64,0,0,1-128,0,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.6A80.11,80.11,0,0,0,208,128Z"},null,-1),Ga=[Da],Za={key:3},Na=g("path",{d:"M128,174a46.06,46.06,0,0,0,46-46V64a46,46,0,0,0-92,0v64A46.06,46.06,0,0,0,128,174ZM94,64a34,34,0,0,1,68,0v64a34,34,0,0,1-68,0Zm40,141.75V240a6,6,0,0,1-12,0V205.75A78.09,78.09,0,0,1,50,128a6,6,0,0,1,12,0,66,66,0,0,0,132,0,6,6,0,0,1,12,0A78.09,78.09,0,0,1,134,205.75Z"},null,-1),Ua=[Na],Ka={key:4},qa=g("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"},null,-1),ja=[qa],Wa={key:5},Ya=g("path",{d:"M128,172a44.05,44.05,0,0,0,44-44V64a44,44,0,0,0-88,0v64A44.05,44.05,0,0,0,128,172ZM92,64a36,36,0,0,1,72,0v64a36,36,0,0,1-72,0Zm40,139.89V240a4,4,0,0,1-8,0V203.89A76.09,76.09,0,0,1,52,128a4,4,0,0,1,8,0,68,68,0,0,0,136,0,4,4,0,0,1,8,0A76.09,76.09,0,0,1,132,203.89Z"},null,-1),Qa=[Ya],Xa={name:"PhMicrophone"},Ja=Re({...Xa,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(e){const t=e,a=he("weight","regular"),s=he("size","1em"),l=he("color","currentColor"),r=he("mirrored",!1),n=P(()=>t.weight??a),o=P(()=>t.size??s),i=P(()=>t.color??l),u=P(()=>t.mirrored!==void 0?t.mirrored?"scale(-1, 1)":void 0:r?"scale(-1, 1)":void 0);return(c,d)=>($(),T("svg",Q({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:o.value,height:o.value,fill:i.value,transform:u.value},c.$attrs),[Pt(c.$slots,"default"),n.value==="bold"?($(),T("g",Ea,Fa)):n.value==="duotone"?($(),T("g",La,Ha)):n.value==="fill"?($(),T("g",Oa,Ga)):n.value==="light"?($(),T("g",Za,Ua)):n.value==="regular"?($(),T("g",Ka,ja)):n.value==="thin"?($(),T("g",Wa,Qa)):_e("",!0)],16,Ta))}}),en=["aria-expanded","aria-owns"],tn=["placeholder","aria-label","aria-controls","aria-activedescendant","maxlength"],ln=["aria-label","title"],an=["id","aria-label"],nn={class:"svc-field__subheader",role:"presentation"},on=["id","aria-selected","onMousedown"],sn={class:"svc-field__avatar","aria-hidden":"true"},rn=["src"],un={class:"svc-field__text"},cn={class:"svc-field__title"},dn={class:"svc-field__subtitle"},fn={key:1,class:"svc-field__title"},vn=200,mn=Re({__name:"SearchServiceField",props:Et({placeholder:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=nt(e,"modelValue"),{t:a}=ze(),s=kl(),l=Oe(),r=O(!1),n=O(-1),o=O([]),i=O(null),u=O(null),c=O(!1),d=O({});function h(){const _=i.value?.getBoundingClientRect();_&&(d.value={top:`${_.bottom+10}px`,left:`${_.left}px`,minWidth:`${Math.max(_.width,320)}px`,maxHeight:`${Math.max(160,Math.min(400,window.innerHeight-_.bottom-24))}px`})}se(r,_=>{_&&De(h)}),He(()=>{c.value=!0,window.addEventListener("scroll",h,{passive:!0}),window.addEventListener("resize",h)}),rt(()=>{window.removeEventListener("scroll",h),window.removeEventListener("resize",h)});const v=String(s.public.typesenseHost??"").trim(),p=String(s.public.typesenseSearchKey??"").trim(),f=v&&!/^https?:\/\//.test(v)?`https://${v}`:v,A={searches:[{collection:"query_suggestions",filter_by:"type: discipline",vector_query:"embedding:([], distance_threshold:0.50, alpha: 0.3)"},{collection:"query_suggestions",filter_by:"type: practitioner_service",vector_query:"embedding:([], distance_threshold:0.60, alpha: 0.7)"}]};let C,G=0;async function q(_){if(!f||!p)return;const k=_.trim()||"*",I=++G,H={"X-TYPESENSE-API-KEY":p};try{const[U,ie]=await Promise.all([$fetch(`${f}/multi_search`,{method:"POST",query:{q:k,include_fields:"label,type,id",query_by:"label,embedding",per_page:5,sort_by:"_text_match:desc,q:asc"},headers:H,body:A,timeout:5e3,retry:0}),k!=="*"?$fetch(`${f}/collections/profiles/documents/search`,{query:{q:k,query_by:"practitionerName,disciplines.label",include_fields:"practitionerName,slug,mainDiscipline,addresses,avatar",per_page:3,sort_by:"_text_match:desc",prefix:"true"},headers:H,timeout:5e3,retry:0}):Promise.resolve(null)]);if(I!==G)return;o.value=B(U?.results??[],ie?.hits??[]),r.value=!0,n.value=-1}catch{I===G&&(o.value=[])}}function B(_,k){const I=[];let H=0;const U=[];for(const K of k.slice(0,3)){const j=K.document;if(!j?.practitionerName||!j.mainDiscipline?.slug)continue;const x=pt(j.mainDiscipline.slug),R=yl(j.addresses?.[0]?.city)||"visio",y=pt(j.slug??""),S=Je(x)&&Je(R)&&Je(y);U.push({kind:"practitioner",title:j.practitionerName,subtitle:[j.mainDiscipline.label,j.addresses?.[0]?.city].filter(M=>!!M).join(" - "),avatar:j.avatar||void 0,profilePath:S?`/${x}/${R}/${y}`:void 0,flatIndex:H++})}U.length&&I.push({key:"practitioners",label:a("search.suggest.practitioners"),items:U});const ie=[{key:"disciplines",label:a("search.suggest.disciplines")},{key:"services",label:a("search.suggest.services")}];return _.forEach((K,j)=>{const x=ie[j];if(!x)return;const R=new Set,y=[];for(const S of(K.hits??[]).slice(0,5)){const M=S.document?.label;!M||R.has(M)||(R.add(M),y.push({kind:"label",title:M,flatIndex:H++}))}y.length&&I.push({key:x.key,label:x.label,items:y})}),I}const J=P(()=>o.value.flatMap(_=>_.items));function ee(){clearTimeout(C),C=setTimeout(()=>q(t.value),vn)}function E(){q(t.value)}function F(){setTimeout(()=>{r.value=!1,n.value=-1},150)}function Y(){t.value="",o.value=[],r.value=!1,n.value=-1,u.value?.focus()}function z(_){if(r.value=!1,n.value=-1,_.kind==="practitioner"&&_.profilePath){Sl(_.profilePath);return}t.value=_.title}function w(_){if(_.key==="Escape"){r.value=!1,n.value=-1;return}const k=J.value.length;if((_.key==="ArrowDown"||_.key==="ArrowUp")&&k){if(_.preventDefault(),!r.value){r.value=!0;return}const I=_.key==="ArrowDown"?1:-1;n.value=(n.value+I+k)%k;return}if(_.key==="Enter"&&r.value&&n.value>=0){const I=J.value[n.value];I&&(_.preventDefault(),z(I))}}return(_,k)=>($(),T("div",{ref_key:"rootRef",ref:i,class:"svc-field",role:"combobox","aria-expanded":m(r),"aria-haspopup":"listbox","aria-owns":m(l)},[V(m(bl),{size:18,class:"svc-field__icon","aria-hidden":"true"}),Ie(g("input",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":k[0]||(k[0]=I=>t.value=I),type:"search",name:"q",class:"svc-field__input",placeholder:e.placeholder,"aria-label":e.placeholder,"aria-controls":m(l),"aria-activedescendant":m(n)>=0?`${m(l)}-${m(n)}`:void 0,maxlength:"SEARCH_QUERY_MAX_LENGTH"in _?_.SEARCH_QUERY_MAX_LENGTH:m(pl),autocomplete:"off",onInput:ee,onFocus:E,onBlur:F,onKeydown:w},null,40,tn),[[Mt,t.value]]),t.value?($(),T("button",{key:0,type:"button",class:"svc-field__clear","aria-label":m(a)("search.form.clearQuery"),title:m(a)("search.form.clearQuery"),onMousedown:k[1]||(k[1]=xe(()=>{},["prevent"])),onClick:Y},[V(m(ut),{size:16,"aria-hidden":"true"})],40,ln)):_e("",!0),($(),Le(Tt,{to:"body"},[m(c)?Ie(($(),T("ul",{key:0,id:m(l),class:"svc-field__menu",style:ke(m(d)),role:"listbox","aria-label":e.placeholder},[($(!0),T(le,null,Ne(m(o),I=>($(),T(le,{key:I.key},[g("li",nn,ue(I.label),1),($(!0),T(le,null,Ne(I.items,H=>($(),T("li",{id:`${m(l)}-${H.flatIndex}`,key:`${I.key}:${H.title}`,role:"option","aria-selected":m(n)===H.flatIndex,class:te(["svc-field__item",{"svc-field__item--active":m(n)===H.flatIndex}]),onMousedown:xe(U=>z(H),["prevent"])},[H.kind==="practitioner"?($(),T(le,{key:0},[g("span",sn,[H.avatar?($(),T("img",{key:0,src:H.avatar,alt:"",width:"40",height:"40",loading:"lazy"},null,8,rn)):($(),Le(m(_l),{key:1,size:20}))]),g("span",un,[g("span",cn,ue(H.title),1),g("span",dn,ue(H.subtitle),1)])],64)):($(),T("span",fn,ue(H.title),1))],42,on))),128))],64))),128))],12,an)),[[ct,m(r)&&m(o).length]]):_e("",!0)]))],8,en))}}),hn=Object.assign(Ye(mn,[["__scopeId","data-v-dacdbfe2"]]),{__name:"SearchServiceField"}),mt="hlt:last-location";function Jt(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.label=="string"&&t.label.length>0&&typeof t.city=="string"&&t.city.length>0&&typeof t.lat=="number"&&Number.isFinite(t.lat)&&t.lat>=-90&&t.lat<=90&&typeof t.lng=="number"&&Number.isFinite(t.lng)&&t.lng>=-180&&t.lng<=180}function Po(){try{const e=window.localStorage.getItem(mt);if(!e)return null;const t=JSON.parse(e);return Jt(t)?t:null}catch{return null}}function Ct(e){if(Jt(e))try{window.localStorage.setItem(mt,JSON.stringify(e))}catch{}}function Mo(){try{window.localStorage.removeItem(mt)}catch{}}const pn=["aria-expanded","aria-owns"],yn=["placeholder","aria-label","aria-controls","aria-activedescendant","maxlength"],gn=["aria-label","title"],bn=["aria-label","title","disabled"],_n=["id","aria-label"],kn=["id","aria-selected"],Sn=["id","aria-selected","onMousedown"],Vn={class:"loc-field__item-label"},wn=250,Cn=Re({__name:"SearchLocationField",props:{text:{default:""},textModifiers:{},coords:{default:null},coordsModifiers:{}},emits:Et(["error"],["update:text","update:coords"]),setup(e,{emit:t}){const a=nt(e,"text"),s=nt(e,"coords"),l=t,{t:r}=ze(),n=Oe(),o=O(null),i=O([]),u=O(!1),c=O(-1),d=O(!1),h=O(null),v=O(!1),p=O({});function f(){const w=h.value?.getBoundingClientRect();w&&(p.value={top:`${w.bottom+10}px`,left:`${w.left}px`,minWidth:`${Math.max(w.width,280)}px`,maxHeight:`${Math.max(160,Math.min(320,window.innerHeight-w.bottom-24))}px`})}se(u,w=>{w&&De(f)}),He(()=>{v.value=!0,window.addEventListener("scroll",f,{passive:!0}),window.addEventListener("resize",f)}),rt(()=>{window.removeEventListener("scroll",f),window.removeEventListener("resize",f)});let A,C=0;async function G(w){const _=++C;try{const k=await $fetch("/api/geocode/suggest",{query:{q:w,...s.value?{lat:s.value.lat.toFixed(3),lon:s.value.lng.toFixed(3)}:{}},timeout:5e3,retry:0});if(_!==C)return;i.value=k.suggestions??[],u.value=!0,c.value=-1}catch{_===C&&(i.value=[])}}function q(){s.value=null;const w=a.value.trim();if(clearTimeout(A),w.length<2){i.value=[];return}A=setTimeout(()=>G(w),wn)}function B(){u.value=!0,c.value=-1}function J(){setTimeout(()=>{u.value=!1,c.value=-1},150)}function ee(w){a.value=w.label,s.value={lat:w.latitude,lng:w.longitude},i.value=[],u.value=!1,c.value=-1,Ct({label:w.label,city:w.city||w.label,lat:w.latitude,lng:w.longitude})}function E(){a.value="",s.value=null,i.value=[],c.value=-1,o.value?.focus()}function F(w){if(w.key==="Escape"){u.value=!1,c.value=-1;return}const _=i.value.length+1;if(w.key==="ArrowDown"||w.key==="ArrowUp"){if(w.preventDefault(),!u.value){u.value=!0;return}const k=w.key==="ArrowDown"?1:-1;c.value=(c.value+k+_)%_;return}if(w.key==="Enter"&&u.value){if(c.value===0){w.preventDefault(),z();return}const k=c.value>0?i.value[c.value-1]:i.value[0];k&&(w.preventDefault(),ee(k))}}async function Y(w,_){const k={lat:w.toFixed(2),lon:_.toFixed(2)};try{return await $fetch("/api/geocode/reverse",{query:k,timeout:5e3,retry:1})}catch{try{const H=(await $fetch("https://photon.komoot.io/reverse",{query:{...k,lang:"fr"},timeout:5e3,retry:0})).features?.[0]?.properties,U=H?.city||H?.name;return U?{city:U}:null}catch{return null}}}function z(){if(u.value=!1,c.value=-1,!("geolocation"in navigator)){l("error",r("search.form.geolocUnsupported"));return}d.value=!0,navigator.geolocation.getCurrentPosition(async w=>{const _=w.coords.latitude,k=w.coords.longitude;s.value={lat:_,lng:k};const I=await Y(_,k);a.value=I?.city||r("search.form.aroundMe"),I?.city&&Ct({label:I.label||I.city,city:I.city,lat:_,lng:k}),d.value=!1},()=>{d.value=!1,l("error",r("search.form.geolocError"))},{enableHighAccuracy:!1,timeout:8e3,maximumAge:3e5})}return(w,_)=>($(),T("div",{ref_key:"rootRef",ref:h,class:"loc-field",role:"combobox","aria-expanded":m(u),"aria-haspopup":"listbox","aria-owns":m(n)},[V(m(yt),{size:18,class:"loc-field__icon","aria-hidden":"true"}),Ie(g("input",{ref_key:"inputRef",ref:o,"onUpdate:modelValue":_[0]||(_[0]=k=>a.value=k),type:"text",name:"address",class:"loc-field__input",placeholder:m(r)("search.form.locationPlaceholder"),"aria-label":m(r)("search.form.locationPlaceholder"),"aria-controls":m(n),"aria-activedescendant":m(c)>=0?`${m(n)}-${m(c)}`:void 0,maxlength:"CITY_INPUT_MAX_LENGTH"in w?w.CITY_INPUT_MAX_LENGTH:m(gl),autocomplete:"off",onInput:q,onFocus:B,onBlur:J,onKeydown:F},null,40,yn),[[Mt,a.value]]),a.value?($(),T("button",{key:0,type:"button",class:"loc-field__btn","aria-label":m(r)("search.form.clear"),title:m(r)("search.form.clear"),onMousedown:_[1]||(_[1]=xe(()=>{},["prevent"])),onClick:E},[V(m(ut),{size:16,"aria-hidden":"true"})],40,gn)):_e("",!0),g("button",{type:"button",class:te(["loc-field__btn loc-field__btn--geo",{"loc-field__btn--active":!!s.value}]),"aria-label":m(r)("search.form.useMyLocation"),title:m(r)("search.form.useMyLocation"),disabled:m(d),onMousedown:_[2]||(_[2]=xe(()=>{},["prevent"])),onClick:z},[m(d)?($(),Le(m(aa),{key:0,size:18,class:"loc-field__spin","aria-hidden":"true"})):($(),Le(m(wt),{key:1,size:18,"aria-hidden":"true"}))],42,bn),($(),Le(Tt,{to:"body"},[m(v)?Ie(($(),T("ul",{key:0,id:m(n),class:"loc-field__menu",style:ke(m(p)),role:"listbox","aria-label":m(r)("search.form.locationPlaceholder")},[g("li",{id:`${m(n)}-0`,role:"option","aria-selected":m(c)===0,class:te(["loc-field__item",{"loc-field__item--active":m(c)===0}]),onMousedown:xe(z,["prevent"])},[V(m(wt),{size:16,class:"loc-field__item-icon","aria-hidden":"true"}),Ee(" "+ue(m(r)("search.form.useMyLocation")),1)],42,kn),($(!0),T(le,null,Ne(m(i),(k,I)=>($(),T("li",{id:`${m(n)}-${I+1}`,key:`${k.latitude},${k.longitude},${k.label}`,role:"option","aria-selected":m(c)===I+1,class:te(["loc-field__item",{"loc-field__item--active":m(c)===I+1}]),onMousedown:xe(H=>ee(k),["prevent"])},[V(m(yt),{size:16,class:"loc-field__item-icon","aria-hidden":"true"}),g("span",Vn,ue(k.label),1)],42,Sn))),128))],12,_n)),[[ct,m(u)]]):_e("",!0)]))],8,pn))}}),An=Object.assign(Ye(Cn,[["__scopeId","data-v-1e89ed2b"]]),{__name:"SearchLocationField"}),xn=["aria-label"],In={class:"dual-bar__bar"},$n={key:0,class:"dual-bar__error",role:"status","aria-live":"polite"},Pn=Re({__name:"SearchDualBar",props:{queryPlaceholder:{},ctaColor:{default:"blue"},ctaLabel:{default:""},initialQuery:{default:""},initialAddress:{default:""},initialCoords:{default:null}},emits:["submit"],setup(e,{emit:t}){const a=e,s=t,{t:l}=ze(),r=O(a.initialQuery),n=O(a.initialCoords),o=O(a.initialAddress||(a.initialCoords?l("search.form.aroundMe"):"")),i=O("");se(()=>[a.initialQuery,a.initialAddress,a.initialCoords],([c,d,h])=>{r.value=c,n.value=h,o.value=d||(h?l("search.form.aroundMe"):"")});function u(){const c=o.value===l("search.form.aroundMe");s("submit",{q:r.value,address:c?"":o.value,coords:n.value})}return(c,d)=>{const h=hn,v=An;return $(),T("form",{class:"dual-bar",action:"/search",method:"get",role:"search","aria-label":m(l)("search.form.label"),onSubmit:xe(u,["prevent"])},[g("div",In,[V(h,{modelValue:m(r),"onUpdate:modelValue":d[0]||(d[0]=p=>et(r)?r.value=p:null),placeholder:e.queryPlaceholder,class:"dual-bar__field"},null,8,["modelValue","placeholder"]),d[4]||(d[4]=g("span",{class:"dual-bar__divider","aria-hidden":"true"},null,-1)),V(v,{text:m(o),"onUpdate:text":d[1]||(d[1]=p=>et(o)?o.value=p:null),coords:m(n),"onUpdate:coords":d[2]||(d[2]=p=>et(n)?n.value=p:null),class:"dual-bar__field",onError:d[3]||(d[3]=p=>i.value=p)},null,8,["text","coords"]),V(Ke,{type:"submit",color:e.ctaColor,class:"dual-bar__cta d-none d-sm-flex",height:"48"},{default:Ue(()=>[Ee(ue(e.ctaLabel||m(l)("search.form.submit")),1)]),_:1},8,["color"])]),V(Ke,{type:"submit",color:e.ctaColor,rounded:"pill",size:"large",block:"",class:"dual-bar__cta-mobile d-sm-none"},{default:Ue(()=>[Ee(ue(e.ctaLabel||m(l)("search.form.submit")),1)]),_:1},8,["color"]),m(i)?($(),T("p",$n,ue(m(i)),1)):_e("",!0)],40,xn)}}}),To=Object.assign(Ye(Pn,[["__scopeId","data-v-2ea8ddcd"]]),{__name:"SearchDualBar"});function Mn(){const{tm:e,rt:t}=ze(),a=e;return function(l){const r=a(l);return Array.isArray(r)?r.map(n=>typeof n=="string"?n:t(n)).filter(Boolean):[]}}function Tn(e,t={}){const{typeSpeed:a=60,deleteSpeed:s=30,pauseFull:l=2e3,pauseEmpty:r=400}=t,n=O("");let o=null,i=0,u=0,c=!1;const d=()=>{o&&(clearTimeout(o),o=null)},h=()=>{const p=Me(e);if(!p||p.length===0)return;const f=p[i%p.length];if(c){if(u=Math.max(0,u-1),n.value=f.substring(0,u),u===0){c=!1,i=(i+1)%p.length,o=setTimeout(h,r);return}o=setTimeout(h,s)}else{if(u=Math.min(f.length,u+1),n.value=f.substring(0,u),u===f.length){c=!0,o=setTimeout(h,l);return}o=setTimeout(h,a)}},v=()=>{d();const p=Me(e);if(!p||p.length===0)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){n.value=p[0];return}i=0,u=0,c=!1,n.value="",h()};return He(v),Vl(d),se(()=>Me(e),()=>v(),{deep:!0}),n}const En=globalThis.setInterval;function Rn(e){const t=O(!1),a=O(!1),s=O([10,15,20,15,10]);let l=null,r=null,n="";He(()=>{const h=window;t.value=!!(h.SpeechRecognition||h.webkitSpeechRecognition)});function o(){r=En(()=>{s.value=s.value.map(()=>Math.random()*30+10)},100)}function i(){r&&clearInterval(r),r=null,s.value=[10,15,20,15,10]}function u(){const h=window,v=h.SpeechRecognition||h.webkitSpeechRecognition;v&&(a.value=!0,n="",l=new v,l.lang="fr-FR",l.continuous=!0,l.interimResults=!0,o(),l.onresult=p=>{let f="",A="";for(let C=0;C<p.results.length;C++){const G=p.results[C][0].transcript;p.results[C].isFinal?A+=`${G} `:f+=G}n=(A+f).trim(),e(n)},l.onerror=()=>c(),l.onend=()=>{a.value&&l?.start()},l.start())}function c(){l&&(l.stop(),l=null),i(),a.value=!1}function d(){c(),e("")}return rt(c),{isSupported:t,isRecording:a,oscillationHeights:s,start:u,stop:c,cancel:d}}const Fn={class:"oli-bar"},Ln={class:"oli-bar__bar"},Bn={class:"oli-bar__field"},zn=["value","name","placeholder","aria-label","maxlength","readonly"],Hn={key:0,class:"oli-bar__voice"},On={class:"oli-bar__osc","aria-hidden":"true"},Dn=["aria-label"],Gn=["aria-label"],Zn=["aria-label"],Nn=Re({__name:"OliSearchBar",props:{modelValue:{},name:{default:""},placeholder:{default:void 0},ariaLabel:{default:void 0},ctaLabel:{default:void 0},maxlength:{default:600}},emits:["update:modelValue"],setup(e,{emit:t}){const a=t,{t:s}=ze(),l=Mn(),r=P(()=>l("heroSection.oli.placeholderExamples")),n=Tn(()=>r.value),o=P(()=>r.value.length?n.value:s("heroSection.oli.placeholderExample")),i=Rn(u=>{a("update:modelValue",u)});return(u,c)=>($(),T("div",Fn,[g("div",Ln,[g("div",Bn,[V(m(oa),{size:18,weight:"fill",class:"oli-bar__icon","aria-hidden":"true"}),g("input",{value:e.modelValue,type:"search",name:e.name||void 0,class:"oli-bar__input",placeholder:e.placeholder??m(o),"aria-label":e.ariaLabel??u.$t("heroSection.tabs.oli"),maxlength:e.maxlength,readonly:m(i).isRecording.value,onInput:c[0]||(c[0]=d=>u.$emit("update:modelValue",d.target.value))},null,40,zn),m(i).isRecording.value?($(),T("div",Hn,[g("span",On,[($(!0),T(le,null,Ne(m(i).oscillationHeights.value,(d,h)=>($(),T("span",{key:h,class:"oli-bar__osc-bar",style:ke({height:`${d}px`})},null,4))),128))]),g("button",{type:"button",class:"oli-bar__voice-btn","aria-label":u.$t("heroSection.oli.voiceCancel"),onClick:c[1]||(c[1]=d=>m(i).cancel())},[V(m(ut),{size:18,"aria-hidden":"true"})],8,Dn),g("button",{type:"button",class:"oli-bar__voice-btn oli-bar__voice-btn--validate","aria-label":u.$t("heroSection.oli.voiceValidate"),onClick:c[2]||(c[2]=d=>m(i).stop())},[V(m(na),{size:18,"aria-hidden":"true"})],8,Gn)])):m(i).isSupported.value?($(),T("button",{key:1,type:"button",class:"oli-bar__voice-btn oli-bar__voice-btn--mic","aria-label":u.$t("heroSection.oli.voiceStart"),onClick:c[3]||(c[3]=d=>m(i).start())},[V(m(Ja),{size:18,"aria-hidden":"true"})],8,Zn)):_e("",!0)]),V(Ke,{type:"submit",color:"blue",class:"oli-bar__cta d-none d-sm-flex",height:"48"},{default:Ue(()=>[Ee(ue(e.ctaLabel??u.$t("heroSection.oli.askCta")),1)]),_:1})]),V(Ke,{type:"submit",color:"blue",rounded:"pill",size:"large",block:"",class:"oli-bar__cta-mobile d-sm-none"},{default:Ue(()=>[Ee(ue(e.ctaLabel??u.$t("heroSection.oli.askCta")),1)]),_:1})]))}}),Eo=Object.assign(Ye(Nn,[["__scopeId","data-v-d4059a4f"]]),{__name:"OliSearchBar"}),el=Symbol.for("vuetify:selection-control-group"),tl=ae({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:ve,trueIcon:ve,ripple:{type:[Boolean,Object],default:!0},multiple:{type:Boolean,default:null},name:String,readonly:{type:Boolean,default:null},modelValue:null,type:String,valueComparator:{type:Function,default:Pe},...Se(),...Rt(),...Qe()},"SelectionControlGroup"),Un=ae({...tl({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup");me()({name:"VSelectionControlGroup",props:Un(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:a}=t;const s=be(e,"modelValue"),l=Oe(),r=D(()=>e.id||`v-selection-control-group-${l}`),n=D(()=>e.name||r.value),o=new Set;return wl(el,{modelValue:s,forceUpdate:()=>{o.forEach(i=>i())},onForceUpdate:i=>{o.add(i),dt(()=>{o.delete(i)})}}),Ft({[e.defaultsTarget]:{color:D(()=>e.color),disabled:D(()=>e.disabled),density:D(()=>e.density),error:D(()=>e.error),inline:D(()=>e.inline),modelValue:s,multiple:D(()=>!!e.multiple||e.multiple==null&&Array.isArray(s.value)),name:n,falseIcon:D(()=>e.falseIcon),trueIcon:D(()=>e.trueIcon),readonly:D(()=>e.readonly),ripple:D(()=>e.ripple),type:D(()=>e.type),valueComparator:D(()=>e.valueComparator)}}),ye(()=>g("div",{class:te(["v-selection-control-group",{"v-selection-control-group--inline":e.inline},e.class]),style:ke(e.style),role:e.type==="radio"?"radiogroup":void 0},[a.default?.()])),{}}});const ll=ae({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...Se(),...tl()},"VSelectionControl");function Kn(e){const t=he(el,void 0),{densityClasses:a}=Lt(e),s=be(e,"modelValue"),l=P(()=>e.trueValue!==void 0?e.trueValue:e.value!==void 0?e.value:!0),r=P(()=>e.falseValue!==void 0?e.falseValue:!1),n=P(()=>!!e.multiple||e.multiple==null&&Array.isArray(s.value)),o=P({get(){const v=t?t.modelValue.value:s.value;return n.value?Te(v).some(p=>e.valueComparator(p,l.value)):e.valueComparator(v,l.value)},set(v){if(e.readonly)return;const p=v?l.value:r.value;let f=p;n.value&&(f=v?[...Te(s.value),p]:Te(s.value).filter(A=>!e.valueComparator(A,l.value))),t?t.modelValue.value=f:s.value=f}}),{textColorClasses:i,textColorStyles:u}=Al(()=>{if(!(e.error||e.disabled))return o.value?e.color:e.baseColor}),{backgroundColorClasses:c,backgroundColorStyles:d}=Bt(()=>o.value&&!e.error&&!e.disabled?e.color:e.baseColor),h=P(()=>o.value?e.trueIcon:e.falseIcon);return{group:t,densityClasses:a,trueValue:l,falseValue:r,model:o,textColorClasses:i,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,icon:h}}const At=me()({name:"VSelectionControl",directives:{vRipple:qe},inheritAttrs:!1,props:ll(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:a,slots:s}=t;const{group:l,densityClasses:r,icon:n,model:o,textColorClasses:i,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,trueValue:h}=Kn(e),v=Oe(),p=X(!1),f=X(!1),A=O(),C=D(()=>e.id||`input-${v}`),G=D(()=>!e.disabled&&!e.readonly);l?.onForceUpdate(()=>{A.value&&(A.value.checked=o.value)});function q(E){G.value&&(p.value=!0,ot(E.target,":focus-visible")!==!1&&(f.value=!0))}function B(){p.value=!1,f.value=!1}function J(E){E.stopPropagation()}function ee(E){if(!G.value){A.value&&(A.value.checked=o.value);return}e.readonly&&l&&De(()=>l.forceUpdate()),o.value=E.target.checked}return ye(()=>{const E=s.label?s.label({label:e.label,props:{for:C.value}}):e.label,[F,Y]=Cl(a),z=g("input",Q({ref:A,checked:o.value,disabled:!!e.disabled,id:C.value,onBlur:B,onFocus:q,onInput:ee,"aria-disabled":!!e.disabled,"aria-label":e.label,type:e.type,value:h.value,name:e.name,"aria-checked":e.type==="checkbox"?o.value:void 0},Y),null);return g("div",Q({class:["v-selection-control",{"v-selection-control--dirty":o.value,"v-selection-control--disabled":e.disabled,"v-selection-control--error":e.error,"v-selection-control--focused":p.value,"v-selection-control--focus-visible":f.value,"v-selection-control--inline":e.inline},r.value,e.class]},F,{style:e.style}),[g("div",{class:te(["v-selection-control__wrapper",i.value]),style:ke(u.value)},[s.default?.({backgroundColorClasses:c,backgroundColorStyles:d}),Ie(g("div",{class:te(["v-selection-control__input"])},[s.input?.({model:o,textColorClasses:i,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,inputNode:z,icon:n.value,props:{onFocus:q,onBlur:B,id:C.value}})??g(le,null,[n.value&&V(pe,{key:"icon",icon:n.value},null),z])]),[[qe,!e.disabled&&!e.readonly&&e.ripple,null,{center:!0,circle:!0}]])]),E&&V(sa,{for:C.value,onClick:J},{default:()=>[E]})])}),{isFocused:p,input:A}}}),qn=ae({indeterminate:Boolean,indeterminateIcon:{type:ve,default:"$checkboxIndeterminate"},...ll({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),jn=me()({name:"VCheckboxBtn",props:qn(),emits:{"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{slots:a}=t;const s=be(e,"indeterminate"),l=be(e,"modelValue");function r(i){s.value&&(s.value=!1)}const n=D(()=>s.value?e.indeterminateIcon:e.falseIcon),o=D(()=>s.value?e.indeterminateIcon:e.trueIcon);return ye(()=>{const i=zt(At.filterProps(e),["modelValue"]);return V(At,Q(i,{modelValue:l.value,"onUpdate:modelValue":[u=>l.value=u,r],class:["v-checkbox-btn",e.class],style:e.style,type:"checkbox",falseIcon:n.value,trueIcon:o.value,"aria-checked":s.value?"mixed":void 0}),a)}),{}}});function Wn(e){let{selectedElement:t,containerElement:a,isRtl:s,isHorizontal:l}=e;const r=Be(l,a),n=al(l,s,a),o=Be(l,t),i=nl(l,t),u=o*.4;return n>i?i-u:n+r<i+o?i-r+o+u:n}function Yn(e){let{selectedElement:t,containerElement:a,isHorizontal:s}=e;const l=Be(s,a),r=nl(s,t),n=Be(s,t);return r-l/2+n/2}function xt(e,t){return t?.[e?"scrollWidth":"scrollHeight"]||0}function Qn(e,t){return t?.[e?"clientWidth":"clientHeight"]||0}function al(e,t,a){if(!a)return 0;const{scrollLeft:s,offsetWidth:l,scrollWidth:r}=a;return e?t?r-l+s:s:a.scrollTop}function Be(e,t){return t?.[e?"offsetWidth":"offsetHeight"]||0}function nl(e,t){return t?.[e?"offsetLeft":"offsetTop"]||0}const ol=Symbol.for("vuetify:v-slide-group"),sl=ae({centerActive:Boolean,scrollToActive:{type:Boolean,default:!0},contentClass:null,direction:{type:String,default:"horizontal"},symbol:{type:null,default:ol},nextIcon:{type:ve,default:"$next"},prevIcon:{type:ve,default:"$prev"},showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["always","desktop","mobile","never"].includes(e)},...Se(),...xl({mobile:null}),...Xe(),...Ht({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),It=me()({name:"VSlideGroup",props:sl(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:a}=t;const{isRtl:s}=Il(),{displayClasses:l,mobile:r}=Ot(e),n=Dt(e,e.symbol),o=X(!1),i=X(0),u=X(0),c=X(0),d=P(()=>e.direction==="horizontal"),{resizeRef:h,contentRect:v}=je(),{resizeRef:p,contentRect:f}=je(),A=$l(),C=P(()=>({container:h.el,duration:200,easing:"easeOutQuart"})),G=P(()=>n.selected.value.length?n.items.value.findIndex(y=>y.id===n.selected.value[0]):-1),q=P(()=>n.selected.value.length?n.items.value.findIndex(y=>y.id===n.selected.value[n.selected.value.length-1]):-1);if(We){let y=-1;se(()=>[n.selected.value,v.value,f.value,d.value],()=>{cancelAnimationFrame(y),y=requestAnimationFrame(()=>{if(v.value&&f.value){const S=d.value?"width":"height";u.value=v.value[S],c.value=f.value[S],o.value=u.value+1<c.value}if(e.scrollToActive&&G.value>=0&&p.el){const S=p.el.children[q.value];J(S,e.centerActive)}})})}const B=X(!1);function J(y,S){let M=0;S?M=Yn({containerElement:h.el,isHorizontal:d.value,selectedElement:y}):M=Wn({containerElement:h.el,isHorizontal:d.value,isRtl:s.value,selectedElement:y}),ee(M)}function ee(y){if(!We||!h.el)return;const S=Be(d.value,h.el),M=al(d.value,s.value,h.el);if(!(xt(d.value,h.el)<=S||Math.abs(y-M)<16)){if(d.value&&s.value&&h.el){const{scrollWidth:de,offsetWidth:Ve}=h.el;y=de-Ve-y}d.value?A.horizontal(y,C.value):A(y,C.value)}}function E(y){const{scrollTop:S,scrollLeft:M}=y.target;i.value=d.value?M:S}function F(y){if(B.value=!0,!(!o.value||!p.el)){for(const S of y.composedPath())for(const M of p.el.children)if(M===S){J(M);return}}}function Y(y){B.value=!1}let z=!1;function w(y){!z&&!B.value&&!(y.relatedTarget&&p.el?.contains(y.relatedTarget))&&H(),z=!1}function _(){z=!0}function k(y){if(!p.el)return;function S(M){y.preventDefault(),H(M)}d.value?y.key==="ArrowRight"?S(s.value?"prev":"next"):y.key==="ArrowLeft"&&S(s.value?"next":"prev"):y.key==="ArrowDown"?S("next"):y.key==="ArrowUp"&&S("prev"),y.key==="Home"?S("first"):y.key==="End"&&S("last")}function I(y,S){if(!y)return;let M=y;do M=M?.[S==="next"?"nextElementSibling":"previousElementSibling"];while(M?.hasAttribute("disabled"));return M}function H(y){if(!p.el)return;let S;if(!y)S=ft(p.el)[0];else if(y==="next"){if(S=I(p.el.querySelector(":focus"),y),!S)return H("first")}else if(y==="prev"){if(S=I(p.el.querySelector(":focus"),y),!S)return H("last")}else y==="first"?(S=p.el.firstElementChild,S?.hasAttribute("disabled")&&(S=I(S,"next"))):y==="last"&&(S=p.el.lastElementChild,S?.hasAttribute("disabled")&&(S=I(S,"prev")));S&&S.focus({preventScroll:!0})}function U(y){const S=d.value&&s.value?-1:1,M=(y==="prev"?-S:S)*u.value;let ne=i.value+M;if(d.value&&s.value&&h.el){const{scrollWidth:de,offsetWidth:Ve}=h.el;ne+=de-Ve}ee(ne)}const ie=P(()=>({next:n.next,prev:n.prev,select:n.select,isSelected:n.isSelected})),K=P(()=>o.value||Math.abs(i.value)>0),j=P(()=>{switch(e.showArrows){case"never":return!1;case"always":return!0;case"desktop":return!r.value;case!0:return K.value;case"mobile":return r.value||K.value;default:return!r.value&&K.value}}),x=P(()=>Math.abs(i.value)>1),R=P(()=>{if(!h.value||!K.value)return!1;const y=xt(d.value,h.el),S=Qn(d.value,h.el);return y-S-Math.abs(i.value)>1});return ye(()=>V(e.tag,{class:te(["v-slide-group",{"v-slide-group--vertical":!d.value,"v-slide-group--has-affixes":j.value,"v-slide-group--is-overflowing":o.value},l.value,e.class]),style:ke(e.style),tabindex:B.value||n.selected.value.length?-1:0,onFocus:w},{default:()=>[j.value&&g("div",{key:"prev",class:te(["v-slide-group__prev",{"v-slide-group__prev--disabled":!x.value}]),onMousedown:_,onClick:()=>x.value&&U("prev")},[a.prev?.(ie.value)??V(gt,null,{default:()=>[V(pe,{icon:s.value?e.nextIcon:e.prevIcon},null)]})]),g("div",{key:"container",ref:h,class:te(["v-slide-group__container",e.contentClass]),onScroll:E},[g("div",{ref:p,class:"v-slide-group__content",onFocusin:F,onFocusout:Y,onKeydown:k},[a.default?.(ie.value)])]),j.value&&g("div",{key:"next",class:te(["v-slide-group__next",{"v-slide-group__next--disabled":!R.value}]),onMousedown:_,onClick:()=>R.value&&U("next")},[a.next?.(ie.value)??V(gt,null,{default:()=>[V(pe,{icon:s.value?e.prevIcon:e.nextIcon},null)]})])]})),{selected:n.selected,scrollTo:U,scrollOffset:i,focus:H,hasPrev:x,hasNext:R}}}),il=Symbol.for("vuetify:v-chip-group"),Xn=ae({baseColor:String,column:Boolean,filter:Boolean,valueComparator:{type:Function,default:Pe},...sl({scrollToActive:!1}),...Se(),...Ht({selectedClass:"v-chip--selected"}),...Xe(),...Qe(),...Gt({variant:"tonal"})},"VChipGroup");me()({name:"VChipGroup",props:Xn(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:a}=t;const{themeClasses:s}=vt(e),{isSelected:l,select:r,next:n,prev:o,selected:i}=Dt(e,il);return Ft({VChip:{baseColor:D(()=>e.baseColor),color:D(()=>e.color),disabled:D(()=>e.disabled),filter:D(()=>e.filter),variant:D(()=>e.variant)}}),ye(()=>{const u=It.filterProps(e);return V(It,Q(u,{class:["v-chip-group",{"v-chip-group--column":e.column},s.value,e.class],style:e.style}),{default:()=>[a.default?.({isSelected:l,select:r,next:n,prev:o,selected:i.value})]})}),{}}});const Jn=ae({activeClass:String,appendAvatar:String,appendIcon:ve,baseColor:String,closable:Boolean,closeIcon:{type:ve,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:ve,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:ve,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:!0},onClick:_t(),onClickOnce:_t(),...Wt(),...Se(),...Rt(),...jt(),...Bl(),...qt(),...Ll(),...Fl(),...Xe({tag:"span"}),...Qe(),...Gt({variant:"tonal"})},"VChip"),$t=me()({name:"VChip",directives:{vRipple:qe},props:Jn(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0,"group:selected":e=>!0,click:e=>!0},setup(e,t){let{attrs:a,emit:s,slots:l}=t;const{t:r}=Zt(),{borderClasses:n}=Nt(e),{densityClasses:o}=Lt(e),{elevationClasses:i}=Kt(e),{roundedClasses:u}=Ut(e),{sizeClasses:c}=Pl(e),{themeClasses:d}=vt(e),h=be(e,"modelValue"),v=bt(e,il,!1),p=bt(e,ol,!1),f=Ml(e,a),A=D(()=>e.link!==!1&&f.isLink.value),C=P(()=>!e.disabled&&e.link!==!1&&(!!v||e.link||f.isClickable.value)),G=D(()=>({"aria-label":r(e.closeLabel),disabled:e.disabled,onClick(F){F.preventDefault(),F.stopPropagation(),h.value=!1,s("click:close",F)}}));se(h,F=>{F?(v?.register(),p?.register()):(v?.unregister(),p?.unregister())});const{colorClasses:q,colorStyles:B,variantClasses:J}=Tl(()=>({color:!v||v.isSelected.value?e.color??e.baseColor:e.baseColor,variant:e.variant}));function ee(F){s("click",F),C.value&&(f.navigate.value?.(F),v?.toggle())}function E(F){(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),ee(F))}return()=>{const F=f.isLink.value?"a":e.tag,Y=!!(e.appendIcon||e.appendAvatar),z=!!(Y||l.append),w=!!(l.close||e.closable),_=!!(l.filter||e.filter)&&v,k=!!(e.prependIcon||e.prependAvatar),I=!!(k||l.prepend);return h.value&&Ie(V(F,Q(f.linkProps,{class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":C.value,"v-chip--filter":_,"v-chip--pill":e.pill,[`${e.activeClass}`]:e.activeClass&&f.isActive?.value},d.value,n.value,q.value,o.value,i.value,u.value,c.value,J.value,v?.selectedClass.value,e.class],style:[B.value,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:C.value?0:void 0,onClick:ee,onKeydown:C.value&&!A.value&&E}),{default:()=>[El(C.value,"v-chip"),_&&V(Rl,{key:"filter"},{default:()=>[Ie(g("div",{class:"v-chip__filter"},[l.filter?V(Fe,{key:"filter-defaults",disabled:!e.filterIcon,defaults:{VIcon:{icon:e.filterIcon}}},l.filter):V(pe,{key:"filter-icon",icon:e.filterIcon},null)]),[[ct,v.isSelected.value]])]}),I&&g("div",{key:"prepend",class:"v-chip__prepend"},[l.prepend?V(Fe,{key:"prepend-defaults",disabled:!k,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},l.prepend):g(le,null,[e.prependIcon&&V(pe,{key:"prepend-icon",icon:e.prependIcon,start:!0},null),e.prependAvatar&&V(st,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),g("div",{class:"v-chip__content","data-no-activator":""},[l.default?.({isSelected:v?.isSelected.value,selectedClass:v?.selectedClass.value,select:v?.select,toggle:v?.toggle,value:v?.value.value,disabled:e.disabled})??ue(e.text)]),z&&g("div",{key:"append",class:"v-chip__append"},[l.append?V(Fe,{key:"append-defaults",disabled:!Y,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},l.append):g(le,null,[e.appendIcon&&V(pe,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&V(st,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),w&&g("button",Q({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},G.value),[l.close?V(Fe,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},l.close):V(pe,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}),[[qe,C.value&&e.ripple,null]])}}}),eo=ae({color:String,...Wt(),...Se(),...Qt(),...jt(),...Dl(),...Ol(),...qt(),...Xe(),...Qe()},"VSheet"),to=me()({name:"VSheet",props:eo(),setup(e,t){let{slots:a}=t;const{themeClasses:s}=vt(e),{backgroundColorClasses:l,backgroundColorStyles:r}=Bt(()=>e.color),{borderClasses:n}=Nt(e),{dimensionStyles:o}=Yt(e),{elevationClasses:i}=Kt(e),{locationStyles:u}=zl(e),{positionClasses:c}=Hl(e),{roundedClasses:d}=Ut(e);return ye(()=>V(e.tag,{class:te(["v-sheet",s.value,l.value,n.value,i.value,c.value,d.value,e.class]),style:ke([r.value,o.value,u.value,e.style])},a)),{}}}),lo=ae({renderless:Boolean,...Se()},"VVirtualScrollItem"),ao=me()({name:"VVirtualScrollItem",inheritAttrs:!1,props:lo(),emits:{"update:height":e=>!0},setup(e,t){let{attrs:a,emit:s,slots:l}=t;const{resizeRef:r,contentRect:n}=je(void 0,"border");se(()=>n.value?.height,o=>{o!=null&&s("update:height",o)}),ye(()=>e.renderless?g(le,null,[l.default?.({itemRef:r})]):g("div",Q({ref:r,class:["v-virtual-scroll__item",e.class],style:e.style},a),[l.default?.()]))}}),no=-1,oo=1,lt=100,so=ae({itemHeight:{type:[Number,String],default:null},itemKey:{type:[String,Array,Function],default:null},height:[Number,String]},"virtual");function io(e,t){const a=Ot(),s=X(0);it(()=>{s.value=parseFloat(e.itemHeight||0)});const l=X(0),r=X(Math.ceil((parseInt(e.height)||a.height.value)/(s.value||16))||1),n=X(0),o=X(0),i=O(),u=O();let c=0;const{resizeRef:d,contentRect:h}=je();it(()=>{d.value=i.value});const v=P(()=>i.value===document.documentElement?a.height.value:h.value?.height||parseInt(e.height)||0),p=P(()=>!!(i.value&&u.value&&v.value&&s.value));let f=Array.from({length:t.value.length}),A=Array.from({length:t.value.length});const C=X(0);let G=-1;function q(x){return f[x]||s.value}const B=Gl(()=>{const x=performance.now();A[0]=0;const R=t.value.length;for(let y=1;y<=R;y++)A[y]=(A[y-1]||0)+q(y-1);C.value=Math.max(C.value,performance.now()-x)},C),J=se(p,x=>{x&&(J(),c=u.value.offsetTop,B.immediate(),U(),~G&&De(()=>{We&&window.requestAnimationFrame(()=>{K(G),G=-1})}))});dt(()=>{B.clear()});function ee(x,R){const y=f[x],S=s.value;s.value=S?Math.min(s.value,R):R,(y!==R||S!==s.value)&&(f[x]=R,B())}function E(x){x=tt(x,0,t.value.length);const R=Math.floor(x),y=x%1,S=R+1,M=A[R]||0,ne=A[S]||M;return M+(ne-M)*y}function F(x){return ro(A,x)}let Y=0,z=0,w=0;se(v,(x,R)=>{U(),x<R&&requestAnimationFrame(()=>{z=0,U()})});let _=-1;function k(){if(!i.value||!u.value)return;const x=i.value.scrollTop,R=performance.now();R-w>500?(z=Math.sign(x-Y),c=u.value.offsetTop):z=x-Y,Y=x,w=R,window.clearTimeout(_),_=window.setTimeout(I,500),U()}function I(){!i.value||!u.value||(z=0,w=0,window.clearTimeout(_),U())}let H=-1;function U(){cancelAnimationFrame(H),H=requestAnimationFrame(ie)}function ie(){if(!i.value||!v.value||!s.value)return;const x=Y-c,R=Math.sign(z),y=Math.max(0,x-lt),S=tt(F(y),0,t.value.length),M=x+v.value+lt,ne=tt(F(M)+1,S+1,t.value.length);if((R!==no||S<l.value)&&(R!==oo||ne>r.value)){const de=E(l.value)-E(S),Ve=E(ne)-E(r.value);Math.max(de,Ve)>lt?(l.value=S,r.value=ne):(S<=0&&(l.value=S),ne>=t.value.length&&(r.value=ne))}n.value=E(l.value),o.value=E(t.value.length)-E(r.value)}function K(x){const R=E(x);!i.value||x&&!R?G=x:i.value.scrollTop=R}const j=P(()=>t.value.slice(l.value,r.value).map((x,R)=>{const y=R+l.value;return{raw:x,index:y,key:Xt(x,e.itemKey,y)}}));return se(t,()=>{f=Array.from({length:t.value.length}),A=Array.from({length:t.value.length}),B.immediate(),U()},{deep:1}),{calculateVisibleItems:U,containerRef:i,markerRef:u,computedItems:j,paddingTop:n,paddingBottom:o,scrollToIndex:K,handleScroll:k,handleScrollend:I,handleItemResize:ee}}function ro(e,t){let a=e.length-1,s=0,l=0,r=null,n=-1;if(e[a]<t)return a;for(;s<=a;)if(l=s+a>>1,r=e[l],r>t)a=l-1;else if(r<t)n=l,s=l+1;else return r===t?l:s;return n}const uo=ae({items:{type:Array,default:()=>[]},renderless:Boolean,...so(),...Se(),...Qt()},"VVirtualScroll"),co=me()({name:"VVirtualScroll",props:uo(),setup(e,t){let{slots:a}=t;const s=Zl("VVirtualScroll"),{dimensionStyles:l}=Yt(e),{calculateVisibleItems:r,containerRef:n,markerRef:o,handleScroll:i,handleScrollend:u,handleItemResize:c,scrollToIndex:d,paddingTop:h,paddingBottom:v,computedItems:p}=io(e,D(()=>e.items));return Nl(()=>e.renderless,()=>{function f(){const C=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";n.value===document.documentElement?(document[C]("scroll",i,{passive:!0}),document[C]("scrollend",u)):(n.value?.[C]("scroll",i,{passive:!0}),n.value?.[C]("scrollend",u))}He(()=>{n.value=Ul(s.vnode.el,!0),f(!0)}),dt(f)}),ye(()=>{const f=p.value.map(A=>V(ao,{key:A.key,renderless:e.renderless,"onUpdate:height":C=>c(A.index,C)},{default:C=>a.default?.({item:A.raw,index:A.index,...C})}));return e.renderless?g(le,null,[g("div",{ref:o,class:"v-virtual-scroll__spacer",style:{paddingTop:Ze(h.value)}},null),f,g("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:Ze(v.value)}},null)]):g("div",{ref:n,class:te(["v-virtual-scroll",e.class]),onScrollPassive:i,onScrollend:u,style:ke([l.value,e.style])},[g("div",{ref:o,class:"v-virtual-scroll__container",style:{paddingTop:Ze(h.value),paddingBottom:Ze(v.value)}},[f])])}),{calculateVisibleItems:r,scrollToIndex:d}}});function fo(e,t,a){return function(l){return!l.relatedTarget&&document.activeElement===document.body&&e.value?(requestAnimationFrame(()=>{if(!e.value)return;const r=t();((r&&ft(r)[0])??a())?.focus({preventScroll:!0})}),!0):!1}}function vo(e,t){const a=X(!1);let s;function l(o){cancelAnimationFrame(s),a.value=!0,s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{a.value=!1})})}async function r(){await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>{if(a.value){const i=se(a,()=>{i(),o()})}else o()})}async function n(o){if(o.key==="Tab"&&t.value?.focus(),!["PageDown","PageUp","Home","End"].includes(o.key))return;const i=e.value?.$el;if(!i)return;(o.key==="Home"||o.key==="End")&&i.scrollTo({top:o.key==="Home"?0:i.scrollHeight,behavior:"smooth"}),await r();const u=i.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(o.key==="PageDown"||o.key==="Home"){const c=i.getBoundingClientRect().top;for(const d of u)if(d.getBoundingClientRect().top>=c){d.focus();break}}else{const c=i.getBoundingClientRect().bottom;for(const d of[...u].reverse())if(d.getBoundingClientRect().bottom<=c){d.focus();break}}}return{onScrollPassive:l,onKeydown:n}}function mo(e){let{groups:t,onLeave:a}=e;function s(o){return o.type==="list"?o.contentRef.value?.$el:o.contentRef.value}function l(o){const i=s(o);return i?ft(i):[]}function r(o){const i=o.target,u=o.shiftKey?"backward":"forward",c=t.map(l),d=t.map(v=>v.type==="list"?v.contentRef.value?.$el:v.contentRef.value).findIndex(v=>v?.contains(i)),h=n(c,d,u,i);if(h===null){const v=t[d],p=c[d];(v.type==="list"||(u==="forward"?p.at(-1)===o.target:p.at(0)===o.target))&&a()}else{o.preventDefault(),o.stopImmediatePropagation();const v=t[h];if(v.type==="list"&&Me(v.displayItemsCount)>0)v.contentRef.value?.focus(0);else{const p=u==="forward";c[h].at(p?0:-1).focus()}}}function n(o,i,u,c){const d=t[i],h=o[i];if(d.type!=="list"&&!(u==="forward"?h.at(-1)===c:h.at(0)===c))return null;const v=u==="forward"?1:-1;for(let p=i+v;p>=0&&p<t.length;p+=v){const f=t[p];if(o[p].length>0||f.type==="list"&&Me(f.displayItemsCount)>0)return p}return null}return{onTabKeydown:r}}const ho=(e,t,a)=>{if(e==null||t==null)return-1;if(!t.length)return 0;e=e.toString().toLocaleLowerCase(),t=t.toString().toLocaleLowerCase();const s=[];let l=e.indexOf(t);for(;~l;)s.push([l,l+t.length]),l=e.indexOf(t,l+t.length);return s.length?s:-1};function at(e,t){if(!(e==null||typeof e=="boolean"||e===-1))return typeof e=="number"?[[e,e+t.length]]:Array.isArray(e[0])?e:[e]}const po=ae({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function yo(e,t,a){const s=[],l=a?.default??ho,r=a?.filterKeys?Te(a.filterKeys):!1,n=Object.keys(a?.customKeyFilter??{}).length;if(!e?.length)return s;let o=[];e:for(let i=0;i<e.length;i++){const[u,c=u]=Te(e[i]),d={},h={};let v=-1;if((t||n>0)&&!a?.noFilter){let p=!1;if(typeof u=="object"){if(u.type==="divider"||u.type==="subheader"){(o.at(-1)?.type!=="divider"||u.type!=="subheader")&&(o=[]),o.push({index:i,matches:{},type:u.type});continue}const C=r||Object.keys(c);p=C.length===n;for(const G of C){const q=Xt(c,G),B=a?.customKeyFilter?.[G];if(v=B?B(q,t,u):l(q,t,u),v!==-1&&v!==!1)B?d[G]=at(v,t):h[G]=at(v,t);else if(a?.filterMode==="every")continue e}}else v=l(u,t,u),v!==-1&&v!==!1&&(h.title=at(v,t));const f=Object.keys(h).length,A=Object.keys(d).length;if(!f&&!A||a?.filterMode==="union"&&A!==n&&!f||a?.filterMode==="intersection"&&(A!==n||!f&&n>0&&!p))continue}o.length&&(s.push(...o),o=[]),s.push({index:i,matches:{...h,...d}})}return s}function go(e,t,a,s){const l=X([]),r=X(new Map),n=P(()=>m(t));it(()=>{const i=typeof a=="function"?a():m(a),u=typeof i!="string"&&typeof i!="number"?"":String(i),c=yo(n.value,u,{customKeyFilter:{...e.customKeyFilter,...m(s?.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),d=m(t),h=[],v=new Map;c.forEach(p=>{let{index:f,matches:A}=p;const C=d[f];h.push(C),v.set(C.value,A)}),l.value=h,r.value=v});function o(i){return r.value.get(i.value)}return{filteredItems:l,filteredMatches:r,getMatches:o}}function bo(e,t,a){return a==null||!a.length?t:a.map((s,l)=>{const r=l===0?0:a[l-1][1],n=[g("span",{class:te(`${e}__unmask`)},[t.slice(r,s[0])]),g("span",{class:te(`${e}__mask`)},[t.slice(s[0],s[1])])];return l===a.length-1&&n.push(g("span",{class:te(`${e}__unmask`)},[t.slice(s[1])])),g(le,null,[n])})}const _o=ae({closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"}},"autocomplete");function ko(e,t){const a=Oe(),s=P(()=>`menu-${a}`),l=D(()=>Me(t)),r=D(()=>s.value);return{menuId:s,ariaExpanded:l,ariaControls:r}}const So=ae({chips:Boolean,closableChips:Boolean,eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:ve,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,noAutoScroll:Boolean,..._o(),...Yl({itemChildren:!1})},"Select"),Vo=ae({search:String,...po({filterKeys:["title"]}),...So(),...zt(ua({modelValue:null,role:"combobox"}),["validationValue","dirty"]),...jl({transition:{component:Wl}})},"VSelect"),Ro=me()({name:"VSelect",props:Vo(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0,"update:search":e=>!0},setup(e,t){let{slots:a}=t;const{t:s}=Zt(),l=O(),r=O(),n=O(),o=O(),i=O(),{items:u,transformIn:c,transformOut:d}=Kl(e),h=be(e,"search",""),{filteredItems:v,getMatches:p}=go(e,u,()=>h.value),f=be(e,"modelValue",[],b=>c(b===null?[null]:Te(b)),b=>{const N=d(b);return e.multiple?N:N[0]??null}),A=P(()=>typeof e.counterValue=="function"?e.counterValue(f.value):typeof e.counterValue=="number"?e.counterValue:f.value.length),C=ia(e),G=ca(e),q=P(()=>f.value.map(b=>b.value)),B=X(!1),J=D(()=>e.closableChips&&!C.isReadonly.value&&!C.isDisabled.value),{InputIcon:ee}=ra(e);let E="",F=0,Y;const z=P(()=>{const b=h.value?v.value:u.value;return e.hideSelected?b.filter(N=>!f.value.some(W=>(e.valueComparator||Pe)(W,N))):b}),w=P(()=>e.hideNoData&&!z.value.length||C.isReadonly.value||C.isDisabled.value),_=be(e,"menu"),k=P({get:()=>_.value,set:b=>{_.value&&!b&&r.value?.ΨopenChildren.size||b&&w.value||(_.value=b)}}),{menuId:I,ariaExpanded:H,ariaControls:U}=ko(e,k),ie=P(()=>({...e.menuProps,activatorProps:{...e.menuProps?.activatorProps||{},"aria-haspopup":"listbox"}})),K=O(),j=vo(K,l),x=fo(k,()=>r.value?.contentEl,()=>l.value?.controlRef),{onTabKeydown:R}=mo({groups:[{type:"element",contentRef:n},{type:"list",contentRef:K,displayItemsCount:()=>z.value.length},{type:"element",contentRef:o}],onLeave:()=>{k.value=!1,l.value?.focus()}});function y(b){e.openOnClear&&(k.value=!0)}function S(){w.value||(k.value=!k.value)}function M(b){b.key==="Tab"&&R(b),K.value?.$el.contains(b.target)&&St(b)&&ne(b)}function ne(b){if(!b.key||C.isReadonly.value)return;if(["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(b.key)&&b.preventDefault(),["Enter","ArrowDown"," "].includes(b.key)&&(k.value=!0),["Escape","Tab"].includes(b.key)&&(k.value=!1),e.clearable&&b.key==="Backspace"){b.preventDefault(),f.value=[],y();return}b.key==="Home"?K.value?.focus("first"):b.key==="End"&&K.value?.focus("last");const N=1e3;if(!St(b))return;const W=performance.now();W-Y>N&&(E="",F=0),E+=b.key.toLowerCase(),Y=W;const ge=z.value;function fe(){let L=we();return L||E.at(-1)===E.at(-2)&&(E=E.slice(0,-1),F++,L=we(),L)||(F=0,L=we(),L)?L:(E=b.key.toLowerCase(),we())}function we(){for(let L=F;L<ge.length;L++){const re=ge[L];if(re.title.toLowerCase().startsWith(E))return[re,L]}}const ce=fe();if(!ce)return;const[Ce,Z]=ce;F=Z,K.value?.focus(Z),e.multiple||(f.value=[Ce])}function de(b){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!b.props.disabled)if(e.multiple){const W=f.value.findIndex(fe=>(e.valueComparator||Pe)(fe.value,b.value)),ge=N??!~W;if(~W){const fe=ge?[...f.value,b]:[...f.value];fe.splice(W,1),f.value=fe}else ge&&(f.value=[...f.value,b])}else{const W=N!==!1;f.value=W?[b]:[],De(()=>{k.value=!1})}}function Ve(b){const N=b.target;l.value?.$el.contains(N)||(k.value=!1)}function ht(){return z.value.findIndex(b=>f.value.some(N=>(e.valueComparator||Pe)(N.value,b.value)))}function rl(){if(!f.value.length)return-1;const b=e.valueComparator||Pe;let N=0;for(const W of z.value){if(f.value.some(fe=>b(fe.value,W.value)))return W.props.disabled?-1:N;W.props.disabled||N++}return-1}function ul(){if(e.eager&&i.value?.calculateVisibleItems(),K.value&&B.value){const b=rl();K.value.focus(b>=0?b:"first",{focusVisible:!1,preventScroll:e.noAutoScroll})}}function cl(){h.value="",B.value&&l.value?.focus()}function dl(b){B.value=!0}function fl(b){if(!l.value?.$el.contains(b.relatedTarget)){if(x(b))return;B.value=!1}}function vl(b){if(b==null)f.value=[];else if(ot(l.value,":autofill")||ot(l.value,":-webkit-autofill")){const N=u.value.find(W=>W.title===b);N&&de(N)}else l.value&&(l.value.value="")}return se(k,()=>{if(!e.hideSelected&&k.value&&f.value.length){const b=ht();We&&!e.noAutoScroll&&window.requestAnimationFrame(()=>{b>=0&&i.value?.scrollToIndex(b)})}}),se(u,(b,N)=>{k.value||B.value&&e.hideNoData&&!N.length&&b.length&&(k.value=!0)}),ye(()=>{const b=!!(e.chips||a.chip),N=!!(!e.hideNoData||z.value.length||a["prepend-item"]||a["append-item"]||a["no-data"]),W=f.value.length>0,ge=Vt.filterProps(e),fe=W||!B.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder,we={search:h,filteredItems:v.value};return V(Vt,Q({ref:l},ge,{modelValue:f.value.map(ce=>ce.props.title).join(", "),name:void 0,"onUpdate:modelValue":vl,focused:B.value,"onUpdate:focused":ce=>B.value=ce,validationValue:f.externalValue,counterValue:A.value,dirty:W,class:["v-select",{"v-select--active-menu":k.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":f.value.length,"v-select--selection-slot":!!a.selection},e.class],style:e.style,inputmode:"none",placeholder:fe,"onClick:clear":y,"onMousedown:control":S,onBlur:Ve,onKeydown:ne,"aria-expanded":H.value,"aria-controls":U.value}),{...a,default:ce=>{let{id:Ce}=ce;return g(le,null,[g("select",{hidden:!0,multiple:e.multiple,name:G.fieldName.value},[u.value.map(Z=>g("option",{key:Z.value,value:Z.value,selected:q.value.includes(Z.value)},null))]),V(Ql,Q({id:I.value,ref:r,modelValue:k.value,"onUpdate:modelValue":Z=>k.value=Z,activator:"parent",disabled:w.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:ul,onAfterLeave:cl},ie.value,{contentClass:["v-select__content",ie.value.contentClass]}),{default:()=>[V(to,{onFocusin:dl,onFocusout:fl,onKeydown:M},{default:()=>[a["menu-header"]&&g("header",{ref:n},[a["menu-header"](we)]),N&&V(Xl,Q({key:"select-list",ref:K,selected:q.value,selectStrategy:e.multiple?"independent":"single-independent",tabindex:"-1",selectable:!!z.value.length,"aria-live":"polite","aria-labelledby":`${Ce.value}-label`,"aria-multiselectable":e.multiple,color:e.itemColor??e.color},j,e.listProps),{default:()=>[a["prepend-item"]?.(),!z.value.length&&!e.hideNoData&&(a["no-data"]?.()??V(kt,{key:"no-data",title:s(e.noDataText)},null)),V(co,{ref:i,renderless:!0,items:z.value,itemKey:"value"},{default:Z=>{let{item:L,index:re,itemRef:Ge}=Z;const Ae=Jl(L.props),$e=Q(L.props,{ref:Ge,key:L.value,onClick:()=>de(L,null),"aria-posinset":re+1,"aria-setsize":z.value.length});return L.type==="divider"?a.divider?.({props:L.raw,index:re})??V(ea,Q(L.props,{key:`divider-${re}`}),null):L.type==="subheader"?a.subheader?.({props:L.raw,index:re})??V(ta,Q(L.props,{key:`subheader-${re}`}),null):a.item?.({item:L,index:re,props:$e})??V(kt,Q($e,{role:"option"}),{prepend:oe=>{let{isSelected:ml}=oe;return g(le,null,[e.multiple&&!e.hideSelected?V(jn,{key:L.value,modelValue:ml,ripple:!1,tabindex:"-1","aria-hidden":!0,onClick:hl=>hl.preventDefault()},null):void 0,Ae.prependAvatar&&V(st,{image:Ae.prependAvatar},null),Ae.prependIcon&&V(pe,{icon:Ae.prependIcon},null)])},title:()=>h.value?bo("v-select",L.title,p(L)?.title):L.title})}}),a["append-item"]?.()]}),a["menu-footer"]&&g("footer",{ref:o},[a["menu-footer"](we)])]})]}),f.value.map((Z,L)=>{function re(oe){oe.stopPropagation(),oe.preventDefault(),de(Z,!1)}const Ge=Q($t.filterProps(Z.props),{"onClick:close":re,onKeydown(oe){oe.key!=="Enter"&&oe.key!==" "||(oe.preventDefault(),oe.stopPropagation(),re(oe))},onMousedown(oe){oe.preventDefault(),oe.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0}),Ae=b?!!a.chip:!!a.selection,$e=Ae?la(b?a.chip({item:Z,index:L,props:Ge}):a.selection({item:Z,index:L})):void 0;if(!(Ae&&!$e))return g("div",{key:Z.value,class:"v-select__selection"},[b?a.chip?V(Fe,{key:"chip-defaults",defaults:{VChip:{closable:J.value,size:"small",text:Z.title}}},{default:()=>[$e]}):V($t,Q({key:"chip",closable:J.value,size:"small",text:Z.title,disabled:Z.props.disabled},Ge),null):$e??g("span",{class:"v-select__selection-text"},[Z.title,e.multiple&&L<f.value.length-1&&g("span",{class:"v-select__selection-comma"},[Ee(",")])])])})])},"append-inner":function(){for(var ce=arguments.length,Ce=new Array(ce),Z=0;Z<ce;Z++)Ce[Z]=arguments[Z];return g(le,null,[a["append-inner"]?.(...Ce),e.menuIcon?V(pe,{class:"v-select__menu-icon",color:l.value?.fieldIconColor,icon:e.menuIcon,"aria-hidden":!0},null):void 0,e.appendInnerIcon&&V(ee,{key:"append-icon",name:"appendInner",color:Ce[0].iconColor.value},null)])}})}),ql({isFocused:B,menu:k,search:h,filteredItems:v,select:de},l)}});export{Ja as I,to as V,Eo as _,Rn as a,go as b,po as c,ko as d,mo as e,co as f,jn as g,bo as h,$t as i,vo as j,fo as k,Ro as l,So as m,To as n,Ct as o,Mo as p,Po as r,En as s,Mn as u};