1import{a as ye,P as be,b as we,_ as Ie}from"./WrFU80En.js";import{_ as Se,a as ke,c as $e,b as Le,d as Re,e as Oe,f as Ne,g as Te,h as Pe}from"./DyWRS09A.js";import{e as je,f as Ke,i as Ve}from"./Bqe_sOFl.js";import{z as ze,V as We,h as j,o as O,w as C,B as Ge,E as Ye,j as B,r as Y,C as q,M as R,c as He,al as ce,am as Ue,at as Qe,aY as Je,g as Xe,d as ae,e as E,k,t as P,l as le,q as X,i as he,F as de,x as Ze}from"./D2bpS3kl.js";import{u as qe}from"./HYC_qCEX.js";import"./DzWtw_42.js";import"./ChQG6jZQ.js";import"./BGla0Q2V.js";import"./B4LlJNtP.js";import"./DGmmsiA_.js";const et=ze({__name:"Badge",props:{asChild:{type:Boolean},as:{},variant:{},class:{}},setup(t){const e=t,s=We(e,"class");return(n,r)=>(O(),j(B(be),Ye({"data-slot":"badge",class:B(ye)(B(tt)({variant:t.variant}),e.class)},B(s)),{default:C(()=>[Ge(n.$slots,"default")]),_:3},16,["class"]))}}),tt=we("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function $(t){return Array.isArray?Array.isArray(t):Ee(t)==="[object Array]"}function st(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function nt(t){return t==null?"":st(t)}function w(t){return typeof t=="string"}function _e(t){return typeof t=="number"}function rt(t){return t===!0||t===!1||it(t)&&Ee(t)=="[object Boolean]"}function Ce(t){return typeof t=="object"}function it(t){return Ce(t)&&t!==null}function F(t){return t!=null}function Z(t){return!t.trim().length}function Ee(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const ut="Incorrect 'index' type",ot=t=>`Invalid value for key ${t}`,ct=t=>`Pattern length exceeds max of ${t}.`,at=t=>`Missing ${t} property in key`,lt=t=>`Property 'weight' in key '${t}' must be a positive integer`,fe=Object.prototype.hasOwnProperty;class ht{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(n=>{let r=Be(n);this._keys.push(r),this._keyMap[r.id]=r,s+=r.weight}),this._keys.forEach(n=>{n.weight/=s})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Be(t){let e=null,s=null,n=null,r=1,i=null;if(w(t)||$(t))n=t,e=ge(t),s=ee(t);else{if(!fe.call(t,"name"))throw new Error(at("name"));const u=t.name;if(n=u,fe.call(t,"weight")&&(r=t.weight,r<=0))throw new Error(lt(u));e=ge(u),s=ee(u),i=t.getFn}return{path:e,id:s,weight:r,src:n,getFn:i}}function ge(t){return $(t)?t:t.split(".")}function ee(t){return $(t)?t.join("."):t}function dt(t,e){let s=[],n=!1;const r=(i,u,o)=>{if(F(i))if(!u[o])s.push(i);else{let c=u[o];const a=i[c];if(!F(a))return;if(o===u.length-1&&(w(a)||_e(a)||rt(a)))s.push(nt(a));else if($(a)){n=!0;for(let l=0,d=a.length;l<d;l+=1)r(a[l],u,o+1)}else u.length&&r(a,u,o+1)}};return r(t,w(e)?e.split("."):e,0),n?s:s[0]}const ft={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},gt={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},pt={location:0,threshold:.6,distance:100},mt={useExtendedSearch:!1,getFn:dt,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var h={...gt,...ft,...pt,...mt};const At=/[^ ]+/g;function _t(t=1,e=3){const s=new Map,n=Math.pow(10,e);return{get(r){const i=r.match(At).length;if(s.has(i))return s.get(i);const u=1/Math.pow(i,.5*t),o=parseFloat(Math.round(u*n)/n);return s.set(i,o),o},clear(){s.clear()}}}class ue{constructor({getFn:e=h.getFn,fieldNormWeight:s=h.fieldNormWeight}={}){this.norm=_t(s,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((s,n)=>{this._keysMap[s.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,w(this.docs[0])?this.docs.forEach((e,s)=>{this._addString(e,s)}):this.docs.forEach((e,s)=>{this._addObject(e,s)}),this.norm.clear())}add(e){const s=this.size();w(e)?this._addString(e,s):this._addObject(e,s)}removeAt(e){this.records.splice(e,1);for(let s=e,n=this.size();s<n;s+=1)this.records[s].i-=1}
vendor: 13,871 bytes, line 1
1getValueForItemAtKeyId(e,s){return e[this._keysMap[s]]}size(){return this.records.length}_addString(e,s){if(!F(e)||Z(e))return;let n={v:e,i:s,n:this.norm.get(e)};this.records.push(n)}_addObject(e,s){let n={i:s,$:{}};this.keys.forEach((r,i)=>{let u=r.getFn?r.getFn(e):this.getFn(e,r.path);if(F(u)){if($(u)){let o=[];const c=[{nestedArrIndex:-1,value:u}];for(;c.length;){const{nestedArrIndex:a,value:l}=c.pop();if(F(l))if(w(l)&&!Z(l)){let d={v:l,i:a,n:this.norm.get(l)};o.push(d)}else $(l)&&l.forEach((d,f)=>{c.push({nestedArrIndex:f,value:d})})}n.$[i]=o}else if(w(u)&&!Z(u)){let o={v:u,n:this.norm.get(u)};n.$[i]=o}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function xe(t,e,{getFn:s=h.getFn,fieldNormWeight:n=h.fieldNormWeight}={}){const r=new ue({getFn:s,fieldNormWeight:n});return r.setKeys(t.map(Be)),r.setSources(e),r.create(),r}function Ct(t,{getFn:e=h.getFn,fieldNormWeight:s=h.fieldNormWeight}={}){const{keys:n,records:r}=t,i=new ue({getFn:e,fieldNormWeight:s});return i.setKeys(n),i.setIndexRecords(r),i}function G(t,{errors:e=0,currentLocation:s=0,expectedLocation:n=0,distance:r=h.distance,ignoreLocation:i=h.ignoreLocation}={}){const u=e/t.length;if(i)return u;const o=Math.abs(n-s);return r?u+o/r:o?1:u}function Et(t=[],e=h.minMatchCharLength){let s=[],n=-1,r=-1,i=0;for(let u=t.length;i<u;i+=1){let o=t[i];o&&n===-1?n=i:!o&&n!==-1&&(r=i-1,r-n+1>=e&&s.push([n,r]),n=-1)}return t[i-1]&&i-n>=e&&s.push([n,i-1]),s}const T=32;function Bt(t,e,s,{location:n=h.location,distance:r=h.distance,threshold:i=h.threshold,findAllMatches:u=h.findAllMatches,minMatchCharLength:o=h.minMatchCharLength,includeMatches:c=h.includeMatches,ignoreLocation:a=h.ignoreLocation}={}){if(e.length>T)throw new Error(ct(T));const l=e.length,d=t.length,f=Math.max(0,Math.min(n,d));let g=i,m=f;const p=o>1||c,A=p?Array(d):[];let M;for(;(M=t.indexOf(e,m))>-1;){let x=G(e,{currentLocation:M,expectedLocation:f,distance:r,ignoreLocation:a});if(g=Math.min(x,g),m=M+l,p){let y=0;for(;y<l;)A[M+y]=1,y+=1}}m=-1;let D=[],I=1,S=l+d;const Q=1<<l-1;for(let x=0;x<l;x+=1){let y=0,b=S;for(;y<b;)G(e,{errors:x,currentLocation:f+b,expectedLocation:f,distance:r,ignoreLocation:a})<=g?y=b:S=b,b=Math.floor((S-y)/2+y);S=b;let W=Math.max(1,f-b+1),z=u?d:Math.min(f+b,d)+l,L=Array(z+2);L[z+1]=(1<<x)-1;for(let v=z;v>=W;v-=1){let _=v-1,J=s[t.charAt(_)];if(p&&(A[_]=+!!J),L[v]=(L[v+1]<<1|1)&J,x&&(L[v]|=(D[v+1]|D[v])<<1|1|D[v+1]),L[v]&Q&&(I=G(e,{errors:x,currentLocation:_,expectedLocation:f,distance:r,ignoreLocation:a}),I<=g)){if(g=I,m=_,m<=f)break;W=Math.max(1,2*f-m)}}if(G(e,{errors:x+1,currentLocation:f,expectedLocation:f,distance:r,ignoreLocation:a})>g)break;D=L}const V={isMatch:m>=0,score:Math.max(.001,I)};if(p){const x=Et(A,o);x.length?c&&(V.indices=x):V.isMatch=!1}return V}function xt(t){let e={};for(let s=0,n=t.length;s<n;s+=1){const r=t.charAt(s);e[r]=(e[r]||0)|1<<n-s-1}return e}const H=String.prototype.normalize?(t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(t=>t);class ve{constructor(e,{location:s=h.location,threshold:n=h.threshold,distance:r=h.distance,includeMatches:i=h.includeMatches,findAllMatches:u=h.findAllMatches,minMatchCharLength:o=h.minMatchCharLength,isCaseSensitive:c=h.isCaseSensitive,ignoreDiacritics:a=h.ignoreDiacritics,ignoreLocation:l=h.ignoreLocation}={}){if(this.options={location:s,threshold:n,distance:r,includeMatches:i,findAllMatches:u,minMatchCharLength:o,isCaseSensitive:c,ignoreDiacritics:a,ignoreLocation:l},e=c?e:e.toLowerCase(),e=a?H(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const d=(g,m)=>{this.chunks.push({pattern:g,alphabet:xt(g),startIndex:m})},f=this.pattern.length;if(f>T){let g=0;const m=f%T,p=f-m;for(;g<p;)d(this.pattern.substr(g,T),g),g+=T;if(m){const A=f-T;d(this.pattern.substr(A),A)}}else d(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=s?e:e.toLowerCase(),e=n?H(e):e,this.pattern===e){let p={isMatch:!0,score:0};return r&&(p.indices=[[0,e.length-1]]),p}const{location:i,distance:u,threshold:o,findAllMatches:c,minMatchCharLength:a,ignoreLocation:l}=this.options;let d=[],f=0,g=!1;this.chunks.forEach(({pattern:p,alphabet:A,startIndex:M})=>{const{isMatch:D,score:I,indices:S}=Bt(e,p,A,{location:i+M,distance:u,threshold:o,findAllMatches:c,minMatchCharLength:a,includeMatches:r,ignoreLocation:l});D&&(g=!0),f+=I,D&&S&&(d=[...d,...S])});let m={isMatch:g,score:g?f/this.chunks.length:1};return g&&r&&(m.indices=d),m}}class N{constructor(e){this.pattern=e}static isMultiMatch(e){return pe(e,this.multiRegex)}static isSingleMatch(e){return pe(e,this.singleRegex)}search(){}}function pe(t,e){const s=t.match(e);return s?s[1]:null}class vt extends N{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const s=e===this.pattern;return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class Ft extends N{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class Dt extends N{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const s=e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class Mt extends N{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const s=!e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class yt extends N{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const s=e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class bt extends N{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const s=!e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class Fe extends N{constructor(e,{location:s=h.location,threshold:n=h.threshold,distance:r=h.distance,includeMatches:i=h.includeMatches,findAllMatches:u=h.findAllMatches,minMatchCharLength:o=h.minMatchCharLength,isCaseSensitive:c=h.isCaseSensitive,ignoreDiacritics:a=h.ignoreDiacritics,ignoreLocation:l=h.ignoreLocation}={}){super(e),this._bitapSearch=new ve(e,{location:s,threshold:n,distance:r,includeMatches:i,findAllMatches:u,minMatchCharLength:o,isCaseSensitive:c,ignoreDiacritics:a,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class De extends N{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let s=0,n;const r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,s))>-1;)s=n+i,r.push([n,s-1]);const u=!!r.length;return{isMatch:u,score:u?0:1,indices:r}}}const te=[vt,De,Dt,Mt,bt,yt,Ft,Fe],me=te.length,wt=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,It="|";function St(t,e={}){return t.split(It).map(s=>{let n=s.trim().split(wt).filter(i=>i&&!!i.trim()),r=[];for(let i=0,u=n.length;i<u;i+=1){const o=n[i];let c=!1,a=-1;for(;!c&&++a<me;){const l=te[a];let d=l.isMultiMatch(o);d&&(r.push(new l(d,e)),c=!0)}if(!c)for(a=-1;++a<me;){const l=te[a];let d=l.isSingleMatch(o);if(d){r.push(new l(d,e));break}}}return r})}const kt=new Set([Fe.type,De.type]);class $t{constructor(e,{isCaseSensitive:s=h.isCaseSensitive,ignoreDiacritics:n=h.ignoreDiacritics,includeMatches:r=h.includeMatches,minMatchCharLength:i=h.minMatchCharLength,ignoreLocation:u=h.ignoreLocation,findAllMatches:o=h.findAllMatches,location:c=h.location,threshold:a=h.threshold,distance:l=h.distance}={}){this.query=null,this.options={isCaseSensitive:s,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:u,location:c,threshold:a,distance:l},e=s?e:e.toLowerCase(),e=n?H(e):e,this.pattern=e,this.query=St(this.pattern,this.options)}static condition(e,s){return s.useExtendedSearch}searchIn(e){const s=this.query;if(!s)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?H(e):e;let u=0,o=[],c=0;for(let a=0,l=s.length;a<l;a+=1){const d=s[a];o.length=0,u=0;for(let f=0,g=d.length;f<g;f+=1){const m=d[f],{isMatch:p,indices:A,score:M}=m.search(e);if(p){if(u+=1,c+=M,n){const D=m.constructor.type;kt.has(D)?o=[...o,...A]:o.push(A)}}else{c=0,u=0,o.length=0;break}}if(u){let f={isMatch:!0,score:c/u};return n&&(f.indices=o),f}}return{isMatch:!1,score:1}}}const se=[];function Lt(...t){se.push(...t)}function ne(t,e){for(let s=0,n=se.length;s<n;s+=1){let r=se[s];if(r.condition(t,e))return new r(t,e)}return new ve(t,e)}const U={AND:"$and",OR:"$or"},re={PATH:"$path",PATTERN:"$val"},ie=t=>!!(t[U.AND]||t[U.OR]),Rt=t=>!!t[re.PATH],Ot=t=>!$(t)&&Ce(t)&&!ie(t),Ae=t=>({[U.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Me(t,e,{auto:s=!0}={}){const n=r=>{let i=Object.keys(r);const u=Rt(r);if(!u&&i.length>1&&!ie(r))return n(Ae(r));if(Ot(r)){const c=u?r[re.PATH]:i[0],a=u?r[re.PATTERN]:r[c];if(!w(a))throw new Error(ot(c));const l={keyId:ee(c),pattern:a};return s&&(l.searcher=ne(a,e)),l}let o={children:[],operator:i[0]};return i.forEach(c=>{const a=r[c];$(a)&&a.forEach(l=>{o.children.push(n(l))})}),o};return ie(t)||(t=Ae(t)),n(t)}function Nt(t,{ignoreFieldNorm:e=h.ignoreFieldNorm}){t.forEach(s=>{let n=1;s.matches.forEach(({key:r,norm:i,score:u})=>{const o=r?r.weight:null;n*=Math.pow(u===0&&o?Number.EPSILON:u,(o||1)*(e?1:i))}),s.score=n})}function Tt(t,e){const s=t.matches;e.matches=[],F(s)&&s.forEach(n=>{if(!F(n.indices)||!n.indices.length)return;const{indices:r,value:i}=n;let u={indices:r,value:i};n.key&&(u.key=n.key.src),n.idx>-1&&(u.refIndex=n.idx),e.matches.push(u)})}function Pt(t,e){e.score=t.score}function jt(t,e,{includeMatches:s=h.includeMatches,includeScore:n=h.includeScore}={}){const r=[];return s&&r.push(Tt),n&&r.push(Pt),t.map(i=>{const{idx:u}=i,o={item:e[u],refIndex:u};return r.length&&r.forEach(c=>{c(i,o)}),o})}class K{constructor(e,s={},n){this.options={...h,...s},this.options.useExtendedSearch,this._keyStore=new ht(this.options.keys),this.setCollection(e,n)}setCollection(e,s){if(this._docs=e,s&&!(s instanceof ue))throw new Error(ut);this._myIndex=s||xe(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){F(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const s=[];for(let n=0,r=this._docs.length;n<r;n+=1){const i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,s.push(i))}return s}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:s=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:i,sortFn:u,ignoreFieldNorm:o}=this.options;let c=w(e)?w(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Nt(c,{ignoreFieldNorm:o}),i&&c.sort(u),_e(s)&&s>-1&&(c=c.slice(0,s)),jt(c,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){const s=ne(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:i,i:u,n:o})=>{if(!F(i))return;const{isMatch:c,score:a,indices:l}=s.searchIn(i);c&&r.push({item:i,idx:u,matches:[{score:a,value:i,norm:o,indices:l}]})}),r}_searchLogical(e){const s=Me(e,this.options),n=(o,c,a)=>
1{if(!o.children){const{keyId:d,searcher:f}=o,g=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(c,d),searcher:f});return g&&g.length?[{idx:a,item:c,matches:g}]:[]}const l=[];for(let d=0,f=o.children.length;d<f;d+=1){const g=o.children[d],m=n(g,c,a);if(m.length)l.push(...m);else if(o.operator===U.AND)return[]}return l},r=this._myIndex.records,i={},u=[];return r.forEach(({$:o,i:c})=>{if(F(o)){let a=n(s,o,c);a.length&&(i[c]||(i[c]={idx:c,item:o,matches:[]},u.push(i[c])),a.forEach(({matches:l})=>{i[c].matches.push(...l)}))}}),u}_searchObjectList(e){const s=ne(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:u,i:o})=>{if(!F(u))return;let c=[];n.forEach((a,l)=>{c.push(...this._findMatches({key:a,value:u[l],searcher:s}))}),c.length&&i.push({idx:o,item:u,matches:c})}),i}_findMatches({key:e,value:s,searcher:n}){if(!F(s))return[];let r=[];if($(s))s.forEach(({v:i,i:u,n:o})=>{if(!F(i))return;const{isMatch:c,score:a,indices:l}=n.searchIn(i);c&&r.push({score:a,key:e,value:i,idx:u,norm:o,indices:l})});else{const{v:i,n:u}=s,{isMatch:o,score:c,indices:a}=n.searchIn(i);o&&r.push({score:c,key:e,value:i,norm:u,indices:a})}return r}}K.version="7.1.0";K.createIndex=xe;K.parseIndex=Ct;K.config=h;K.parseQuery=Me;Lt($t);function Kt(t,e,s){const n=()=>{var i,u;return new K((i=R(e))!==null&&i!==void 0?i:[],(u=R(s))===null||u===void 0?void 0:u.fuseOptions)},r=Y(n());return q(()=>{var i;return(i=R(s))===null||i===void 0?void 0:i.fuseOptions},()=>{r.value=n()},{deep:!0}),q(()=>R(e),i=>{r.value.setCollection(i)},{deep:!0}),{fuse:r,results:He(()=>{const i=R(s);if(i?.matchAllWhenSearchEmpty&&!R(t))return R(e).map((o,c)=>({item:o,refIndex:c}));const u=i?.resultLimit;return r.value.search(R(t),u?{limit:u}:void 0)})}}const Vt={class:"hidden md:inline-flex"},zt={class:"inline-flex md:hidden"},Wt={class:"flex w-full gap-1"},Gt={class:"inline-flex flex-1 items-center gap-1 overflow-hidden"},Yt={class:"text-sm font-medium"},Ht={class:"flex-1 truncate text-xs text-muted-foreground"},Ut={class:"max-w-24 truncate"},is={__name:"DashboardLinksSearch",setup(t){const[e,s]=ce(),[n,r]=ce(),i=Ue("(min-width: 640px)"),u=Qe(),o=Y(!1),c=Y(""),a=Y([]),{results:l}=Kt(c,a,{fuseOptions:{keys:["slug","url","comment"]},resultLimit:20}),{Meta_K:d,Ctrl_K:f}=Je({passive:!1,onEventFired(p){p.key==="k"&&(p.metaKey||p.ctrlKey)&&p.preventDefault()}});q([d,f],p=>{(p[0]||p[1])&&(o.value=!0)});function g(p){o.value=!1,u.push({path:"/dashboard/link",query:{slug:p.slug}})}async function m(){a.value=await qe("/api/link/search")}return Xe(()=>{m()}),(p,A)=>{const M=Ie,D=ke,I=Se,S=Le,Q=et,V=Oe,x=Re,y=$e,b=je,W=Ke,z=Ve,L=Ne,oe=Te,v=Pe;return O(),ae(de,null,[E(B(e),null,{default:C(()=>[E(M,{variant:"outline",size:"sm",class:"relative h-9 w-full justify-start bg-background text-muted-foreground sm:w-32 md:w-48"},{default:C(()=>[k("span",Vt,P(p.$t("links.search_placeholder")),1),k("span",zt,P(p.$t("common.search")),1),A[3]||(A[3]=k("kbd",{class:"pointer-events-none absolute top-2 right-[0.3rem] hidden h-5 items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 select-none sm:flex"},[k("span",{class:"text-xs"},"â"),le("K ")],-1))]),_:1})]),_:1}),E(B(n),null,{default:C(()=>[E(I,{class:"h-12"},{default:C(()=>[E(D,{modelValue:B(c),"onUpdate:modelValue":A[0]||(A[0]=_=>X(c)?c.value=_:null),placeholder:p.$t("links.search_placeholder")},null,8,["modelValue","placeholder"])]),_:1}),E(I,{class:"flex-1"},{default:C(()=>[E(y,{class:"max-h-none sm:max-h-[300px]"},{default:C(()=>[E(S,null,{default:C(()=>[le(P(p.$t("links.no_results")),1)]),_:1}),B(l).length?(O(),j(x,{key:0,heading:p.$t("links.group_title")},{default:C(()=>[(O(!0),ae(de,null,Ze(B(l),_=>(O(),j(V,{key:_.item?.id,class:"cursor-pointer",value:_.item,onSelect:J=>g(_.item)},{default:C(()=>[k("div",Wt,[k("div",Gt,[k("div",Yt,P(_.item?.slug),1),k("div",Ht," ("+P(_.item?.url)+") ",1)]),_.item?.comment?(O(),j(Q,{key:0,variant:"secondary"},{default:C(()=>[k("div",Ut,P(_.item?.comment),1)]),_:2},1024)):he("",!0)])]),_:2},1032,["value","onSelect"]))),128))]),_:1},8,["heading"])):he("",!0)]),_:1})]),_:1})]),_:1}),B(i)?(O(),j(z,{key:0,open:B(o),"onUpdate:open":A[1]||(A[1]=_=>X(o)?o.value=_:null)},{default:C(()=>[E(b,{"as-child":""},{default:C(()=>[E(B(s))]),_:1}),E(W,{class:"gap-0 overflow-hidden p-0 shadow-lg"},{default:C(()=>[E(B(r))]),_:1})]),_:1},8,["open"])):(O(),j(v,{key:1,open:B(o),"onUpdate:open":A[2]||(A[2]=_=>X(o)?o.value=_:null)},{default:C(()=>[E(L,{"as-child":""},{default:C(()=>[E(B(s))]),_:1}),E(oe,{class:"h-[500px] gap-0"},{default:C(()=>[E(B(r))]),_:1})]),_:1},8,["open"]))],64)}}};export{is 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.