1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2025-12-08 13:49:37 +00:00
Classworks/assets/filter-Cn1dRJGy.js

2 lines
23 KiB
JavaScript

import{$ as te,c6 as et,g as ce,p as ee,a3 as ye,Z as Ce,b7 as tt,bl as at,X as He,a0 as Q,aH as Re,c7 as Le,a5 as E,aZ as ge,ay as X,c as de,d as I,i as S,y as re,E as $,e as ne,n as Ue,c8 as lt,bh as nt,m as ut,c9 as it,bi as rt,bm as st,aJ as ot,h as Ae,bF as ct,a$ as oe,ca as Me,a7 as be,ba as je,az as dt,ad as We,ae as Xe,a6 as le,F as ue,b4 as xe,aX as ft,bx as Qe,aY as Ve,c2 as Ye,a8 as Ze,bS as vt,u as mt,bw as gt,aj as ht,c4 as yt,aI as he,f as bt,c0 as Be,a1 as pt,a4 as Se,ag as ke,v as De,P as Vt,Q as Oe,cb as kt,K as Pt,aa as wt,L as xt,ab as St,ac as It,t as Ct,bg as Lt,cc as At,af as $e,ah as Ee,cd as Ft,am as se}from"./index-Doo6WjKP.js";import{V as Ie,m as _t}from"./VCheckboxBtn-h3ckYl2R.js";import{a as Tt,b as Ke,f as Rt,u as Mt,g as Bt,V as Ne,m as Dt}from"./VTextField-Ch91IhKb.js";import{V as Ot}from"./VMenu-f7Bgv3Ss.js";import{V as ze}from"./VChip-LepawoxT.js";function $t(){const e=te([]);et(()=>e.value=[]);function n(t,i){e.value[i]=t}return{refs:e,updateRef:n}}const Et=ee({activeColor:String,start:{type:[Number,String],default:1},modelValue:{type:Number,default:e=>e.start},disabled:Boolean,length:{type:[Number,String],default:1,validator:e=>e%1===0},totalVisible:[Number,String],firstIcon:{type:oe,default:"$first"},prevIcon:{type:oe,default:"$prev"},nextIcon:{type:oe,default:"$next"},lastIcon:{type:oe,default:"$last"},ariaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.root"},pageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.page"},currentPageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.currentPage"},firstAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.first"},previousAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.previous"},nextAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.next"},lastAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.last"},ellipsis:{type:String,default:"..."},showFirstLastPage:Boolean,...ct(),...Ae(),...ot(),...st(),...rt(),...it(),...ut({tag:"nav"}),...nt(),...lt({variant:"text"})},"VPagination"),sa=ce()({name:"VPagination",props:Et(),emits:{"update:modelValue":e=>!0,first:e=>!0,prev:e=>!0,next:e=>!0,last:e=>!0},setup(e,n){let{slots:t,emit:i}=n;const a=ye(e,"modelValue"),{t:o,n:f}=Ce(),{isRtl:u}=tt(),{themeClasses:s}=at(e),{width:w}=He(),r=Q(-1);Re(void 0,{scoped:!0});const{resizeRef:B}=Le(c=>{if(!c.length)return;const{target:V,contentRect:P}=c[0],R=V.querySelector(".v-pagination__list > *");if(!R)return;const L=P.width,Z=R.offsetWidth+parseFloat(getComputedStyle(R).marginRight)*2;r.value=k(L,Z)}),g=E(()=>parseInt(e.length,10)),d=E(()=>parseInt(e.start,10)),h=E(()=>e.totalVisible!=null?parseInt(e.totalVisible,10):r.value>=0?r.value:k(w.value,58));function k(c,V){const P=e.showFirstLastPage?5:3;return Math.max(0,Math.floor(Number(((c-V*P)/V).toFixed(2))))}const y=E(()=>{if(g.value<=0||isNaN(g.value)||g.value>Number.MAX_SAFE_INTEGER)return[];if(h.value<=0)return[];if(h.value===1)return[a.value];if(g.value<=h.value)return ge(g.value,d.value);const c=h.value%2===0,V=c?h.value/2:Math.floor(h.value/2),P=c?V:V+1,R=g.value-V;if(P-a.value>=0)return[...ge(Math.max(1,h.value-1),d.value),e.ellipsis,g.value];if(a.value-R>=(c?1:0)){const L=h.value-1,Z=g.value-L+d.value;return[d.value,e.ellipsis,...ge(L,Z)]}else{const L=Math.max(1,h.value-2),Z=L===1?a.value:a.value-Math.ceil(L/2)+d.value;return[d.value,e.ellipsis,...ge(L,Z),e.ellipsis,g.value]}});function b(c,V,P){c.preventDefault(),a.value=V,P&&i(P,V)}const{refs:F,updateRef:_}=$t();Re({VPaginationBtn:{color:X(()=>e.color),border:X(()=>e.border),density:X(()=>e.density),size:X(()=>e.size),variant:X(()=>e.variant),rounded:X(()=>e.rounded),elevation:X(()=>e.elevation)}});const N=E(()=>y.value.map((c,V)=>{const P=R=>_(R,V);if(typeof c=="string")return{isActive:!1,key:`ellipsis-${V}`,page:c,props:{ref:P,ellipsis:!0,icon:!0,disabled:!0}};{const R=c===a.value;return{isActive:R,key:c,page:f(c),props:{ref:P,ellipsis:!1,icon:!0,disabled:!!e.disabled||Number(e.length)<2,color:R?e.activeColor:e.color,"aria-current":R,"aria-label":o(R?e.currentPageAriaLabel:e.pageAriaLabel,c),onClick:L=>b(L,c)}}}})),T=E(()=>{const c=!!e.disabled||a.value<=d.value,V=!!e.disabled||a.value>=d.value+g.value-1;return{first:e.showFirstLastPage?{icon:u.value?e.lastIcon:e.firstIcon,onClick:P=>b(P,d.value,"first"),disabled:c,"aria-label":o(e.firstAriaLabel),"aria-disabled":c}:void 0,prev:{icon:u.value?e.nextIcon:e.prevIcon,onClick:P=>b(P,a.value-1,"prev"),disabled:c,"aria-label":o(e.previousAriaLabel),"aria-disabled":c},next:{icon:u.value?e.prevIcon:e.nextIcon,onClick:P=>b(P,a.value+1,"next"),disabled:V,"aria-label":o(e.nextAriaLabel),"aria-disabled":V},last:e.showFirstLastPage?{icon:u.value?e.firstIcon:e.lastIcon,onClick:P=>b(P,d.value+g.value-1,"last"),disabled:V,"aria-label":o(e.lastAriaLabel),"aria-disabled":V}:void 0}});function C(){var V;const c=a.value-d.value;(V=F.value[c])==null||V.$el.focus()}function H(c){c.key===Me.left&&!e.disabled&&a.value>Number(e.start)?(a.value=a.value-1,be(C)):c.key===Me.right&&!e.disabled&&a.value<d.value+g.value-1&&(a.value=a.value+1,be(C))}return de(()=>I(e.tag,{ref:B,class:ne(["v-pagination",s.value,e.class]),style:Ue(e.style),role:"navigation","aria-label":o(e.ariaLabel),onKeydown:H,"data-test":"v-pagination-root"},{default:()=>[S("ul",{class:"v-pagination__list"},[e.showFirstLastPage&&S("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[t.first?t.first(T.value.first):I(re,$({_as:"VPaginationBtn"},T.value.first),null)]),S("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[t.prev?t.prev(T.value.prev):I(re,$({_as:"VPaginationBtn"},T.value.prev),null)]),N.value.map((c,V)=>S("li",{key:c.key,class:ne(["v-pagination__item",{"v-pagination__item--is-active":c.isActive}]),"data-test":"v-pagination-item"},[t.item?t.item(c):I(re,$({_as:"VPaginationBtn"},c.props),{default:()=>[c.page]})])),S("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[t.next?t.next(T.value.next):I(re,$({_as:"VPaginationBtn"},T.value.next),null)]),e.showFirstLastPage&&S("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[t.last?t.last(T.value.last):I(re,$({_as:"VPaginationBtn"},T.value.last),null)])])]})),{}}}),Kt=ee({...Rt(),...Xe(_t(),["inline"])},"VCheckbox"),oa=ce()({name:"VCheckbox",inheritAttrs:!1,props:Kt(),emits:{"update:modelValue":e=>!0,"update:focused":e=>!0},setup(e,n){let{attrs:t,slots:i}=n;const a=ye(e,"modelValue"),{isFocused:o,focus:f,blur:u}=Tt(e),s=te(),w=je();return de(()=>{const[r,B]=dt(t),g=Ke.filterProps(e),d=Ie.filterProps(e);return I(Ke,$({ref:s,class:["v-checkbox",e.class]},r,g,{modelValue:a.value,"onUpdate:modelValue":h=>a.value=h,id:e.id||`checkbox-${w}`,focused:o.value,style:e.style}),{...i,default:h=>{let{id:k,messagesId:y,isDisabled:b,isReadonly:F,isValid:_}=h;return I(Ie,$(d,{id:k.value,"aria-describedby":y.value,disabled:b.value,readonly:F.value},B,{error:_.value===!1,modelValue:a.value,"onUpdate:modelValue":N=>a.value=N,onFocus:f,onBlur:u}),i)}})}),We({},s)}}),Nt=ee({renderless:Boolean,...Ae()},"VVirtualScrollItem"),zt=ce()({name:"VVirtualScrollItem",inheritAttrs:!1,props:Nt(),emits:{"update:height":e=>!0},setup(e,n){let{attrs:t,emit:i,slots:a}=n;const{resizeRef:o,contentRect:f}=Le(void 0,"border");le(()=>{var u;return(u=f.value)==null?void 0:u.height},u=>{u!=null&&i("update:height",u)}),de(()=>{var u,s;return e.renderless?S(ue,null,[(u=a.default)==null?void 0:u.call(a,{itemRef:o})]):S("div",$({ref:o,class:["v-virtual-scroll__item",e.class],style:e.style},t),[(s=a.default)==null?void 0:s.call(a)])})}}),Ht=-1,Ut=1,Pe=100,jt=ee({itemHeight:{type:[Number,String],default:null},itemKey:{type:[String,Array,Function],default:null},height:[Number,String]},"virtual");function Wt(e,n){const t=He(),i=Q(0);xe(()=>{i.value=parseFloat(e.itemHeight||0)});const a=Q(0),o=Q(Math.ceil((parseInt(e.height)||t.height.value)/(i.value||16))||1),f=Q(0),u=Q(0),s=te(),w=te();let r=0;const{resizeRef:B,contentRect:g}=Le();xe(()=>{B.value=s.value});const d=E(()=>{var v;return s.value===document.documentElement?t.height.value:((v=g.value)==null?void 0:v.height)||parseInt(e.height)||0}),h=E(()=>!!(s.value&&w.value&&d.value&&i.value));let k=Array.from({length:n.value.length}),y=Array.from({length:n.value.length});const b=Q(0);let F=-1;function _(v){return k[v]||i.value}const N=ft(()=>{const v=performance.now();y[0]=0;const x=n.value.length;for(let D=1;D<=x;D++)y[D]=(y[D-1]||0)+_(D-1);b.value=Math.max(b.value,performance.now()-v)},b),T=le(h,v=>{v&&(T(),r=w.value.offsetTop,N.immediate(),G(),~F&&be(()=>{Ze&&window.requestAnimationFrame(()=>{ae(F),F=-1})}))});Qe(()=>{N.clear()});function C(v,x){const D=k[v],z=i.value;i.value=z?Math.min(i.value,x):x,(D!==x||z!==i.value)&&(k[v]=x,N())}function H(v){v=Ve(v,0,n.value.length);const x=Math.floor(v),D=v%1,z=x+1,l=y[x]||0,m=y[z]||l;return l+(m-l)*D}function c(v){return Xt(y,v)}let V=0,P=0,R=0;le(d,(v,x)=>{x&&(G(),v<x&&requestAnimationFrame(()=>{P=0,G()}))});let L=-1;function Z(){if(!s.value||!w.value)return;const v=s.value.scrollTop,x=performance.now();x-R>500?(P=Math.sign(v-V),r=w.value.offsetTop):P=v-V,V=v,R=x,window.clearTimeout(L),L=window.setTimeout(fe,500),G()}function fe(){!s.value||!w.value||(P=0,R=0,window.clearTimeout(L),G())}let ve=-1;function G(){cancelAnimationFrame(ve),ve=requestAnimationFrame(me)}function me(){if(!s.value||!d.value||!i.value)return;const v=V-r,x=Math.sign(P),D=Math.max(0,v-Pe),z=Ve(c(D),0,n.value.length),l=v+d.value+Pe,m=Ve(c(l)+1,z+1,n.value.length);if((x!==Ht||z<a.value)&&(x!==Ut||m>o.value)){const O=H(a.value)-H(z),J=H(m)-H(o.value);Math.max(O,J)>Pe?(a.value=z,o.value=m):(z<=0&&(a.value=z),m>=n.value.length&&(o.value=m))}f.value=H(a.value),u.value=H(n.value.length)-H(o.value)}function ae(v){const x=H(v);!s.value||v&&!x?F=v:s.value.scrollTop=x}const pe=E(()=>n.value.slice(a.value,o.value).map((v,x)=>{const D=x+a.value;return{raw:v,index:D,key:Ye(v,e.itemKey,D)}}));return le(n,()=>{k=Array.from({length:n.value.length}),y=Array.from({length:n.value.length}),N.immediate(),G()},{deep:1}),{calculateVisibleItems:G,containerRef:s,markerRef:w,computedItems:pe,paddingTop:f,paddingBottom:u,scrollToIndex:ae,handleScroll:Z,handleScrollend:fe,handleItemResize:C}}function Xt(e,n){let t=e.length-1,i=0,a=0,o=null,f=-1;if(e[t]<n)return t;for(;i<=t;)if(a=i+t>>1,o=e[a],o>n)t=a-1;else if(o<n)f=a,i=a+1;else return o===n?a:i;return f}const Qt=ee({items:{type:Array,default:()=>[]},renderless:Boolean,...jt(),...Ae(),...bt()},"VVirtualScroll"),Yt=ce()({name:"VVirtualScroll",props:Qt(),setup(e,n){let{slots:t}=n;const i=vt("VVirtualScroll"),{dimensionStyles:a}=mt(e),{calculateVisibleItems:o,containerRef:f,markerRef:u,handleScroll:s,handleScrollend:w,handleItemResize:r,scrollToIndex:B,paddingTop:g,paddingBottom:d,computedItems:h}=Wt(e,X(()=>e.items));return gt(()=>e.renderless,()=>{function k(){var F,_;const b=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";f.value===document.documentElement?(document[b]("scroll",s,{passive:!0}),document[b]("scrollend",w)):((F=f.value)==null||F[b]("scroll",s,{passive:!0}),(_=f.value)==null||_[b]("scrollend",w))}ht(()=>{f.value=yt(i.vnode.el,!0),k(!0)}),Qe(k)}),de(()=>{const k=h.value.map(y=>I(zt,{key:y.key,renderless:e.renderless,"onUpdate:height":b=>r(y.index,b)},{default:b=>{var F;return(F=t.default)==null?void 0:F.call(t,{item:y.raw,index:y.index,...b})}}));return e.renderless?S(ue,null,[S("div",{ref:u,class:"v-virtual-scroll__spacer",style:{paddingTop:he(g.value)}},null),k,S("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:he(d.value)}},null)]):S("div",{ref:f,class:ne(["v-virtual-scroll",e.class]),onScrollPassive:s,onScrollend:w,style:Ue([a.value,e.style])},[S("div",{ref:u,class:"v-virtual-scroll__container",style:{paddingTop:he(g.value),paddingBottom:he(d.value)}},[k])])}),{calculateVisibleItems:o,scrollToIndex:B}}});function Zt(e,n){const t=Q(!1);let i;function a(u){cancelAnimationFrame(i),t.value=!0,i=requestAnimationFrame(()=>{i=requestAnimationFrame(()=>{t.value=!1})})}async function o(){await new Promise(u=>requestAnimationFrame(u)),await new Promise(u=>requestAnimationFrame(u)),await new Promise(u=>requestAnimationFrame(u)),await new Promise(u=>{if(t.value){const s=le(t,()=>{s(),u()})}else u()})}async function f(u){var r,B;if(u.key==="Tab"&&((r=n.value)==null||r.focus()),!["PageDown","PageUp","Home","End"].includes(u.key))return;const s=(B=e.value)==null?void 0:B.$el;if(!s)return;(u.key==="Home"||u.key==="End")&&s.scrollTo({top:u.key==="Home"?0:s.scrollHeight,behavior:"smooth"}),await o();const w=s.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(u.key==="PageDown"||u.key==="Home"){const g=s.getBoundingClientRect().top;for(const d of w)if(d.getBoundingClientRect().top>=g){d.focus();break}}else{const g=s.getBoundingClientRect().bottom;for(const d of[...w].reverse())if(d.getBoundingClientRect().bottom<=g){d.focus();break}}}return{onScrollPassive:a,onKeydown:f}}const Gt=ee({closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"}},"autocomplete");function Jt(e,n){const{t}=Ce(),i=je(),a=E(()=>`menu-${i}`),o=X(()=>Be(n)),f=X(()=>a.value),u=X(()=>t(Be(n)?e.closeText:e.openText));return{menuId:a,ariaExpanded:o,ariaControls:f,ariaLabel:u}}const qt=ee({chips:Boolean,closableChips:Boolean,eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:oe,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,noAutoScroll:Boolean,...Gt(),...Ft({itemChildren:!1})},"Select"),ea=ee({...qt(),...Xe(Dt({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...Lt({transition:{component:At}})},"VSelect"),ca=ce()({name:"VSelect",props:ea(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,n){let{slots:t}=n;const{t:i}=Ce(),a=te(),o=te(),f=te(),{items:u,transformIn:s,transformOut:w}=pt(e),r=ye(e,"modelValue",[],l=>s(l===null?[null]:Se(l)),l=>{const m=w(l);return e.multiple?m:m[0]??null}),B=E(()=>typeof e.counterValue=="function"?e.counterValue(r.value):typeof e.counterValue=="number"?e.counterValue:r.value.length),g=Mt(e),d=Bt(e),h=E(()=>r.value.map(l=>l.value)),k=Q(!1);let y="",b=-1,F;const _=E(()=>e.hideSelected?u.value.filter(l=>!r.value.some(m=>(e.valueComparator||ke)(m,l))):u.value),N=E(()=>e.hideNoData&&!_.value.length||g.isReadonly.value||g.isDisabled.value),T=ye(e,"menu"),C=E({get:()=>T.value,set:l=>{var m;T.value&&!l&&((m=o.value)!=null&&m.ΨopenChildren.size)||l&&N.value||(T.value=l)}}),{menuId:H,ariaExpanded:c,ariaControls:V,ariaLabel:P}=Jt(e,C),R=E(()=>{var l;return{...e.menuProps,activatorProps:{...((l=e.menuProps)==null?void 0:l.activatorProps)||{},"aria-haspopup":"listbox"}}}),L=te(),Z=Zt(L,a);function fe(l){e.openOnClear&&(C.value=!0)}function ve(){N.value||(C.value=!C.value)}function G(l){$e(l)&&me(l)}function me(l){var A,W,K;if(!l.key||g.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(l.key)&&l.preventDefault(),["Enter","ArrowDown"," "].includes(l.key)&&(C.value=!0),["Escape","Tab"].includes(l.key)&&(C.value=!1),l.key==="Home"?(A=L.value)==null||A.focus("first"):l.key==="End"&&((W=L.value)==null||W.focus("last"));const m=1e3;if(!$e(l))return;const O=performance.now();O-F>m&&(y="",b=-1),y+=l.key.toLowerCase(),F=O;const J=_.value;function q(){let M=p();return M||y.at(-1)===y.at(-2)&&(y=y.slice(0,-1),M=p(),M)||(b=-1,M=p(),M)?M:(y=l.key.toLowerCase(),p())}function p(){for(let M=b+1;M<J.length;M++){const ie=J[M];if(ie.title.toLowerCase().startsWith(y))return[ie,M]}}const U=q();if(!U)return;const[j,Y]=U;b=Y,(K=L.value)==null||K.focus(Y),e.multiple||(r.value=[j])}function ae(l){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!l.props.disabled)if(e.multiple){const O=r.value.findIndex(q=>(e.valueComparator||ke)(q.value,l.value)),J=m??!~O;if(~O){const q=J?[...r.value,l]:[...r.value];q.splice(O,1),r.value=q}else J&&(r.value=[...r.value,l])}else{const O=m!==!1;r.value=O?[l]:[],be(()=>{C.value=!1})}}function pe(l){var m;(m=L.value)!=null&&m.$el.contains(l.relatedTarget)||(C.value=!1)}function v(){var l;e.eager&&((l=f.value)==null||l.calculateVisibleItems())}function x(){var l;k.value&&((l=a.value)==null||l.focus())}function D(l){k.value=!0}function z(l){if(l==null)r.value=[];else if(Ee(a.value,":autofill")||Ee(a.value,":-webkit-autofill")){const m=u.value.find(O=>O.title===l);m&&ae(m)}else a.value&&(a.value.value="")}return le(C,()=>{if(!e.hideSelected&&C.value&&r.value.length){const l=_.value.findIndex(m=>r.value.some(O=>(e.valueComparator||ke)(O.value,m.value)));Ze&&!e.noAutoScroll&&window.requestAnimationFrame(()=>{var m;l>=0&&((m=f.value)==null||m.scrollToIndex(l))})}}),le(u,(l,m)=>{C.value||k.value&&e.hideNoData&&!m.length&&l.length&&(C.value=!0)}),de(()=>{const l=!!(e.chips||t.chip),m=!!(!e.hideNoData||_.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),O=r.value.length>0,J=Ne.filterProps(e),q=O||!k.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder;return I(Ne,$({ref:a},J,{modelValue:r.value.map(p=>p.props.title).join(", "),name:void 0,"onUpdate:modelValue":z,focused:k.value,"onUpdate:focused":p=>k.value=p,validationValue:r.externalValue,counterValue:B.value,dirty:O,class:["v-select",{"v-select--active-menu":C.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":r.value.length,"v-select--selection-slot":!!t.selection},e.class],style:e.style,inputmode:"none",placeholder:q,"onClick:clear":fe,"onMousedown:control":ve,onBlur:pe,onKeydown:me,"aria-expanded":c.value,"aria-controls":V.value,"aria-label":P.value,title:P.value}),{...t,default:()=>S(ue,null,[S("select",{hidden:!0,multiple:e.multiple,name:d.fieldName.value},[u.value.map(p=>S("option",{key:p.value,value:p.value,selected:h.value.includes(p.value)},null))]),I(Ot,$({id:H.value,ref:o,modelValue:C.value,"onUpdate:modelValue":p=>C.value=p,activator:"parent",contentClass:"v-select__content",disabled:N.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:v,onAfterLeave:x},R.value),{default:()=>[m&&I(Vt,$({ref:L,selected:h.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:p=>p.preventDefault(),onKeydown:G,onFocusin:D,tabindex:"-1",selectable:!0,"aria-live":"polite","aria-label":`${e.label}-list`,color:e.itemColor??e.color},Z,e.listProps),{default:()=>{var p,U,j;return[(p=t["prepend-item"])==null?void 0:p.call(t),!_.value.length&&!e.hideNoData&&(((U=t["no-data"])==null?void 0:U.call(t))??I(Oe,{key:"no-data",title:i(e.noDataText)},null)),I(Yt,{ref:f,renderless:!0,items:_.value,itemKey:"value"},{default:Y=>{var Fe,_e,Te;let{item:A,index:W,itemRef:K}=Y;const M=kt(A.props),ie=$(A.props,{ref:K,key:A.value,onClick:()=>ae(A,null)});return A.type==="divider"?((Fe=t.divider)==null?void 0:Fe.call(t,{props:A.raw,index:W}))??I(Pt,$(A.props,{key:`divider-${W}`}),null):A.type==="subheader"?((_e=t.subheader)==null?void 0:_e.call(t,{props:A.raw,index:W}))??I(wt,$(A.props,{key:`subheader-${W}`}),null):((Te=t.item)==null?void 0:Te.call(t,{item:A,index:W,props:ie}))??I(Oe,$(ie,{role:"option"}),{prepend:Ge=>{let{isSelected:Je}=Ge;return S(ue,null,[e.multiple&&!e.hideSelected?I(Ie,{key:A.value,modelValue:Je,ripple:!1,tabindex:"-1",onClick:qe=>qe.preventDefault()},null):void 0,M.prependAvatar&&I(xt,{image:M.prependAvatar},null),M.prependIcon&&I(De,{icon:M.prependIcon},null)])}})}}),(j=t["append-item"])==null?void 0:j.call(t)]}})]}),r.value.map((p,U)=>{function j(K){K.stopPropagation(),K.preventDefault(),ae(p,!1)}const Y=$(ze.filterProps(p.props),{"onClick:close":j,onKeydown(K){K.key!=="Enter"&&K.key!==" "||(K.preventDefault(),K.stopPropagation(),j(K))},onMousedown(K){K.preventDefault(),K.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0}),A=l?!!t.chip:!!t.selection,W=A?St(l?t.chip({item:p,index:U,props:Y}):t.selection({item:p,index:U})):void 0;if(!(A&&!W))return S("div",{key:p.value,class:"v-select__selection"},[l?t.chip?I(It,{key:"chip-defaults",defaults:{VChip:{closable:e.closableChips,size:"small",text:p.title}}},{default:()=>[W]}):I(ze,$({key:"chip",closable:e.closableChips,size:"small",text:p.title,disabled:p.props.disabled},Y),null):W??S("span",{class:"v-select__selection-text"},[p.title,e.multiple&&U<r.value.length-1&&S("span",{class:"v-select__selection-comma"},[Ct(",")])])])})]),"append-inner":function(){var Y,A;for(var p=arguments.length,U=new Array(p),j=0;j<p;j++)U[j]=arguments[j];return S(ue,null,[(Y=t["append-inner"])==null?void 0:Y.call(t,...U),e.menuIcon?I(De,{class:"v-select__menu-icon",color:(A=a.value)==null?void 0:A.fieldIconColor,icon:e.menuIcon},null):void 0])}})}),We({isFocused:k,menu:C,select:ae},a)}}),ta=(e,n,t)=>{if(e==null||n==null)return-1;if(!n.length)return 0;e=e.toString().toLocaleLowerCase(),n=n.toString().toLocaleLowerCase();const i=[];let a=e.indexOf(n);for(;~a;)i.push([a,a+n.length]),a=e.indexOf(n,a+n.length);return i.length?i:-1};function we(e,n){if(!(e==null||typeof e=="boolean"||e===-1))return typeof e=="number"?[[e,e+n.length]]:Array.isArray(e[0])?e:[e]}const da=ee({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function aa(e,n,t){var s;const i=[],a=(t==null?void 0:t.default)??ta,o=t!=null&&t.filterKeys?Se(t.filterKeys):!1,f=Object.keys((t==null?void 0:t.customKeyFilter)??{}).length;if(!(e!=null&&e.length))return i;let u=null;e:for(let w=0;w<e.length;w++){const[r,B=r]=Se(e[w]),g={},d={};let h=-1;if((n||f>0)&&!(t!=null&&t.noFilter)){let k=!1;if(typeof r=="object"){if(r.type==="divider"||r.type==="subheader"){(u==null?void 0:u.type)==="divider"&&r.type==="subheader"&&i.push(u),u={index:w,matches:{},type:r.type};continue}const F=o||Object.keys(B);k=F.length===f;for(const _ of F){const N=Ye(B,_),T=(s=t==null?void 0:t.customKeyFilter)==null?void 0:s[_];if(h=T?T(N,n,r):a(N,n,r),h!==-1&&h!==!1)T?g[_]=we(h,n):d[_]=we(h,n);else if((t==null?void 0:t.filterMode)==="every")continue e}}else h=a(r,n,r),h!==-1&&h!==!1&&(d.title=we(h,n));const y=Object.keys(d).length,b=Object.keys(g).length;if(!y&&!b||(t==null?void 0:t.filterMode)==="union"&&b!==f&&!y||(t==null?void 0:t.filterMode)==="intersection"&&(b!==f||!y&&f>0&&!k))continue}u&&(i.push(u),u=null),i.push({index:w,matches:{...d,...g}})}return i}function fa(e,n,t,i){const a=Q([]),o=Q(new Map),f=E(()=>i!=null&&i.transform?se(n).map(s=>[s,i.transform(s)]):se(n));xe(()=>{const s=typeof t=="function"?t():se(t),w=typeof s!="string"&&typeof s!="number"?"":String(s),r=aa(f.value,w,{customKeyFilter:{...e.customKeyFilter,...se(i==null?void 0:i.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),B=se(n),g=[],d=new Map;r.forEach(h=>{let{index:k,matches:y}=h;const b=B[k];g.push(b),d.set(b.value,y)}),a.value=g,o.value=d});function u(s){return o.value.get(s.value)}return{filteredItems:a,filteredMatches:o,getMatches:u}}function va(e,n,t){return t==null||!t.length?n:t.map((i,a)=>{const o=a===0?0:t[a-1][1],f=[S("span",{class:ne(`${e}__unmask`)},[n.slice(o,i[0])]),S("span",{class:ne(`${e}__mask`)},[n.slice(i[0],i[1])])];return a===t.length-1&&f.push(S("span",{class:ne(`${e}__unmask`)},[n.slice(i[1])])),S(ue,null,[f])})}export{sa as V,oa as a,Jt as b,Zt as c,Yt as d,da as e,ca as f,va as h,qt as m,fa as u};