Socket
Socket
Sign inDemoInstall

fuse.js

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fuse.js - npm Package Compare versions

Comparing version 5.2.0-alpha.1 to 5.2.0-alpha.2

11

dist/fuse.basic.common.js
/**
* Fuse.js v5.2.0-alpha.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v5.2.0-alpha.2 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -229,3 +229,3 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

var matchmask = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var minMatchCharLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var minMatchCharLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Config.minMatchCharLength;
var matchedIndices = [];

@@ -1060,7 +1060,2 @@ var start = -1;

}
}], [{
key: "register",
value: function register() {
registeredSearchers.push.apply(registeredSearchers, arguments);
}
}]);

@@ -1071,3 +1066,3 @@

Fuse.version = '5.2.0-alpha.1';
Fuse.version = '5.2.0-alpha.2';
Fuse.createIndex = createIndex;

@@ -1074,0 +1069,0 @@ Fuse.config = Config;

/**
* Fuse.js v5.2.0-alpha.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v5.2.0-alpha.2 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -160,3 +160,3 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

matchmask = [],
minMatchCharLength = 1
minMatchCharLength = Config.minMatchCharLength
) {

@@ -705,6 +705,2 @@ let matchedIndices = [];

static register(...args) {
registeredSearchers.push(...args);
}
setCollection(list, index = null) {

@@ -944,3 +940,3 @@ this.list = list;

Fuse.version = '5.2.0-alpha.1';
Fuse.version = '5.2.0-alpha.2';
Fuse.createIndex = createIndex;

@@ -947,0 +943,0 @@ Fuse.config = Config;

/**
* Fuse.js v5.2.0-alpha.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v5.2.0-alpha.2 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -9,2 +9,2 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

*/
const t=t=>Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t),e=t=>"string"==typeof t,s=t=>"number"==typeof t,n=t=>null!=t;function i(i,r){let o=[],h=!1;const c=(i,r)=>{if(r){const l=r.indexOf(".");let a=r,u=null;-1!==l&&(a=r.slice(0,l),u=r.slice(l+1));const d=i[a];if(n(d))if(u||!e(d)&&!s(d))if(t(d)){h=!0;for(let t=0,e=d.length;t<e;t+=1)c(d[t],u)}else u&&c(d,u);else o.push((t=>null==t?"":(t=>{if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e})(t))(d))}else o.push(i)};return c(i,r),h?o:o[0]}var r={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score-e.score,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:i}};function o(t,{errors:e=0,currentLocation:s=0,expectedLocation:n=0,distance:i=r.distance}={}){const o=e/t.length,h=Math.abs(n-s);return i?o+h/i:h?1:o}class h{constructor(t,e=({location:location=r.location,threshold:threshold=r.threshold,distance:distance=r.distance,includeMatches:includeMatches=r.includeMatches,findAllMatches:findAllMatches=r.findAllMatches,minMatchCharLength:minMatchCharLength=r.minMatchCharLength,isCaseSensitive:isCaseSensitive=r.isCaseSensitive}={})){if(this.options=e,t.length>32)throw new Error("Pattern length exceeds max of 32.");this.pattern=this.options.isCaseSensitive?t:t.toLowerCase(),this.patternAlphabet=function(t){let e={},s=t.length;for(let n=0;n<s;n+=1)e[t.charAt(n)]=0;for(let n=0;n<s;n+=1)e[t.charAt(n)]|=1<<s-n-1;return e}(this.pattern)}searchIn(t){let e=t.$;return this.searchInString(e)}searchInString(t){const{isCaseSensitive:e,includeMatches:s}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return s&&(e.matchedIndices=[[0,t.length-1]]),e}const{location:n,distance:i,threshold:h,findAllMatches:c,minMatchCharLength:l}=this.options;return function(t,e,s,{location:n=r.location,distance:i=r.distance,threshold:h=r.threshold,findAllMatches:c=r.findAllMatches,minMatchCharLength:l=r.minMatchCharLength,includeMatches:a=r.includeMatches}={}){const u=e.length,d=t.length,f=Math.max(0,Math.min(n,d));let g=h,p=t.indexOf(e,f);const y=[];for(let t=0;t<d;t+=1)y[t]=0;if(-1!==p){let s=o(e,{errors:0,currentLocation:p,expectedLocation:f,distance:i});if(g=Math.min(s,g),p=t.lastIndexOf(e,f+u),-1!==p){let t=o(e,{errors:0,currentLocation:p,expectedLocation:f,distance:i});g=Math.min(t,g)}}p=-1;let m=[],M=1,x=u+d;const _=1<<(u<=31?u-1:30);for(let n=0;n<u;n+=1){let r=0,h=x;for(;r<h;){o(e,{errors:n,currentLocation:f+h,expectedLocation:f,distance:i})<=g?r=h:x=h,h=Math.floor((x-r)/2+r)}x=h;let l=Math.max(1,f-h+1),a=c?d:Math.min(f+h,d)+u,k=Array(a+2);k[a+1]=(1<<n)-1;for(let r=a;r>=l;r-=1){let h=r-1,c=s[t.charAt(h)];if(c&&(y[h]=1),k[r]=(k[r+1]<<1|1)&c,0!==n&&(k[r]|=(m[r+1]|m[r])<<1|1|m[r+1]),k[r]&_&&(M=o(e,{errors:n,currentLocation:h,expectedLocation:f,distance:i}),M<=g)){if(g=M,p=h,p<=f)break;l=Math.max(1,2*f-p)}}if(o(e,{errors:n+1,currentLocation:f,expectedLocation:f,distance:i})>g)break;m=k}let k={isMatch:p>=0,score:M||.001};return a&&(k.matchedIndices=function(t=[],e=1){let s=[],n=-1,i=-1,r=0;for(let o=t.length;r<o;r+=1){let o=t[r];o&&-1===n?n=r:o||-1===n||(i=r-1,i-n+1>=e&&s.push([n,i]),n=-1)}return t[r-1]&&r-n>=e&&s.push([n,r-1]),s}(y,l)),k}(t,this.pattern,this.patternAlphabet,{location:n,distance:i,threshold:h,findAllMatches:c,minMatchCharLength:l,includeMatches:s})}}function c(t,{n:e=3,pad:s=!0,sort:n=!1}){let i=[];if(null==t)return i;t=t.toLowerCase(),s&&(t=` ${t} `);let r=t.length-e+1;if(r<1)return i;for(;r--;)i[r]=t.substr(r,e);return n&&i.sort((t,e)=>t==e?0:t<e?-1:1),i}function l(s,r,{getFn:o=i,ngrams:h=!1}={}){let l=[];if(e(r[0]))for(let t=0,e=r.length;t<e;t+=1){const e=r[t];if(n(e)){let s={$:e,idx:t};h&&(s.ng=c(e,{sort:!0})),l.push(s)}}else{const i=s.length;for(let a=0,u=r.length;a<u;a+=1){let u=r[a],d={idx:a,$:{}};for(let r=0;r<i;r+=1){let i=s[r],l=o(u,i);if(n(l))if(t(l)){let s=[];const r=[{arrayIndex:-1,value:l}];for(;r.length;){const{arrayIndex:i,value:o}=r.pop();if(n(o))if(e(o)){let t={$:o,idx:i};h&&(t.ng=c(o,{sort:!0})),s.push(t)}else if(t(o))for(let t=0,e=o.length;t<e;t+=1)r.push({arrayIndex:t,value:o[t]})}d.$[i]=s}else{let t={$:l};h&&(t.ng=c(l,{sort:!0})),d.$[i]=t}}l.push(d)}}return l}class a{constructor(t){if(this._keys={},this._keyNames=[],this._length=t.length,t.length&&e(t[0]))for(let e=0;e<this._length;e+=1){const s=t[e];this._keys[s]={weight:1},this._keyNames.push(s)}else{let e=0;for(let s=0;s<this._length;s+=1){const n=t[s];if(!Object.prototype.hasOwnProperty.call(n,"name"))throw new Error('Missing "name" property in key object');const i=n.name;if(this._keyNames.push(i),!Object.prototype.hasOwnProperty.call(n,"weight"))throw new Error('Missing "weight" property in key object');const r=n.weight;if(r<=0||r>=1)throw new Error('"weight" property in key must be in the range of (0, 1)');this._keys[i]={weight:r},e+=r}for(let t=0;t<this._length;t+=1){const s=this._keyNames[t],n=this._keys[s].weight;this._keys[s].weight=n/e}}}get(t,e){return this._keys[t]?this._keys[t][e]:-1}keys(){return this._keyNames}count(){return this._length}toJSON(){return JSON.stringify(this._keys)}}function u(t,e){const s=t.matches;if(e.matches=[],n(s))for(let t=0,i=s.length;t<i;t+=1){let i=s[t];if(!n(i.indices)||0===i.indices.length)continue;let r={indices:i.indices,value:i.value};i.key&&(r.key=i.key),i.idx>-1&&(r.refIndex=i.idx),e.matches.push(r)}}function d(t,e){e.score=t.score}const f=[];class g{constructor(t,e={},s=null){this.options={...r,...e},this._processKeys(this.options.keys),this.setCollection(t,s)}static register(...t){f.push(...t)}setCollection(t,s=null){this.list=t,this.listIsStringArray=e(t[0]),s?this.setIndex(s):this.setIndex(this._createIndex())}setIndex(t){this._indexedList=t}_processKeys(t){this._keyStore=new a(t)}_createIndex(){return l(this._keyStore.keys(),this.list,{getFn:this.options.getFn})}search(t,e={limit:!1}){const{shouldSort:n}=this.options;let i=null;for(let e=0,s=f.length;e<s;e+=1){let s=f[e];if(s.condition(t,this.options)){i=new s(t,this.options);break}}i||(i=new h(t,this.options));let r=this._searchUsing(i);return this._computeScore(r),n&&this._sort(r),e.limit&&s(e.limit)&&(r=r.slice(0,e.limit)),this._format(r)}_searchUsing(e){const s=this._indexedList,i=[],{includeMatches:r}=this.options;if(this.listIsStringArray)for(let t=0,o=s.length;t<o;t+=1){let o=s[t],{$:h,idx:c}=o;if(!n(h))continue;let l=e.searchIn(o);const{isMatch:a,score:u}=l;if(!a)continue;let d={score:u,value:h};r&&(d.indices=l.matchedIndices),i.push({item:h,idx:c,matches:[d]})}else{const o=this._keyStore.keys(),h=this._keyStore.count();for(let c=0,l=s.length;c<l;c+=1){let{$:l,idx:a}=s[c];if(!n(l))continue;let u=[];for(let s=0;s<h;s+=1){let i=o[s],h=l[i];if(n(h))if(t(h))for(let t=0,s=h.length;t<s;t+=1){let s=h[t],o=s.$,c=s.idx;if(!n(o))continue;let l=e.searchIn(s);const{isMatch:a,score:d}=l;if(!a)continue;let f={score:d,key:i,value:o,idx:c};r&&(f.indices=l.matchedIndices),u.push(f)}else{let t=h.$,s=e.searchIn(h);const{isMatch:n,score:o}=s;if(!n)continue;let c={score:o,key:i,value:t};r&&(c.indices=s.matchedIndices),u.push(c)}}u.length&&i.push({idx:a,item:l,matches:u})}}return i}_computeScore(t){for(let e=0,s=t.length;e<s;e+=1){const s=t[e],n=s.matches,i=n.length;let r=1;for(let t=0;t<i;t+=1){const e=n[t],s=e.key,i=this._keyStore.get(s,"weight"),o=i>-1?i:1,h=0===e.score&&i>-1?Number.EPSILON:e.score;r*=Math.pow(h,o)}s.score=r}}_sort(t){t.sort(this.options.sortFn)}_format(t){const e=[],{includeMatches:s,includeScore:n}=this.options;let i=[];s&&i.push(u),n&&i.push(d);for(let s=0,n=t.length;s<n;s+=1){const n=t[s],{idx:r}=n,o={item:this.list[r],refIndex:r};if(i.length)for(let t=0,e=i.length;t<e;t+=1)i[t](n,o);e.push(o)}return e}}g.version="5.2.0-alpha.1",g.createIndex=l,g.config=r;export default g;
const t=t=>Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t),e=t=>"string"==typeof t,s=t=>"number"==typeof t,n=t=>null!=t;function i(i,r){let o=[],h=!1;const c=(i,r)=>{if(r){const l=r.indexOf(".");let a=r,d=null;-1!==l&&(a=r.slice(0,l),d=r.slice(l+1));const u=i[a];if(n(u))if(d||!e(u)&&!s(u))if(t(u)){h=!0;for(let t=0,e=u.length;t<e;t+=1)c(u[t],d)}else d&&c(u,d);else o.push((t=>null==t?"":(t=>{if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e})(t))(u))}else o.push(i)};return c(i,r),h?o:o[0]}var r={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score-e.score,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:i}};function o(t,{errors:e=0,currentLocation:s=0,expectedLocation:n=0,distance:i=r.distance}={}){const o=e/t.length,h=Math.abs(n-s);return i?o+h/i:h?1:o}function h(t,e,s,{location:n=r.location,distance:i=r.distance,threshold:h=r.threshold,findAllMatches:c=r.findAllMatches,minMatchCharLength:l=r.minMatchCharLength,includeMatches:a=r.includeMatches}={}){const d=e.length,u=t.length,f=Math.max(0,Math.min(n,u));let g=h,p=t.indexOf(e,f);const y=[];for(let t=0;t<u;t+=1)y[t]=0;if(-1!==p){let s=o(e,{errors:0,currentLocation:p,expectedLocation:f,distance:i});if(g=Math.min(s,g),p=t.lastIndexOf(e,f+d),-1!==p){let t=o(e,{errors:0,currentLocation:p,expectedLocation:f,distance:i});g=Math.min(t,g)}}p=-1;let m=[],M=1,x=d+u;const _=1<<(d<=31?d-1:30);for(let n=0;n<d;n+=1){let r=0,h=x;for(;r<h;){o(e,{errors:n,currentLocation:f+h,expectedLocation:f,distance:i})<=g?r=h:x=h,h=Math.floor((x-r)/2+r)}x=h;let l=Math.max(1,f-h+1),a=c?u:Math.min(f+h,u)+d,k=Array(a+2);k[a+1]=(1<<n)-1;for(let r=a;r>=l;r-=1){let h=r-1,c=s[t.charAt(h)];if(c&&(y[h]=1),k[r]=(k[r+1]<<1|1)&c,0!==n&&(k[r]|=(m[r+1]|m[r])<<1|1|m[r+1]),k[r]&_&&(M=o(e,{errors:n,currentLocation:h,expectedLocation:f,distance:i}),M<=g)){if(g=M,p=h,p<=f)break;l=Math.max(1,2*f-p)}}if(o(e,{errors:n+1,currentLocation:f,expectedLocation:f,distance:i})>g)break;m=k}let k={isMatch:p>=0,score:M||.001};return a&&(k.matchedIndices=function(t=[],e=r.minMatchCharLength){let s=[],n=-1,i=-1,o=0;for(let r=t.length;o<r;o+=1){let r=t[o];r&&-1===n?n=o:r||-1===n||(i=o-1,i-n+1>=e&&s.push([n,i]),n=-1)}return t[o-1]&&o-n>=e&&s.push([n,o-1]),s}(y,l)),k}class c{constructor(t,e=({location:location=r.location,threshold:threshold=r.threshold,distance:distance=r.distance,includeMatches:includeMatches=r.includeMatches,findAllMatches:findAllMatches=r.findAllMatches,minMatchCharLength:minMatchCharLength=r.minMatchCharLength,isCaseSensitive:isCaseSensitive=r.isCaseSensitive}={})){if(this.options=e,t.length>32)throw new Error("Pattern length exceeds max of 32.");this.pattern=this.options.isCaseSensitive?t:t.toLowerCase(),this.patternAlphabet=function(t){let e={},s=t.length;for(let n=0;n<s;n+=1)e[t.charAt(n)]=0;for(let n=0;n<s;n+=1)e[t.charAt(n)]|=1<<s-n-1;return e}(this.pattern)}searchIn(t){let e=t.$;return this.searchInString(e)}searchInString(t){const{isCaseSensitive:e,includeMatches:s}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return s&&(e.matchedIndices=[[0,t.length-1]]),e}const{location:n,distance:i,threshold:r,findAllMatches:o,minMatchCharLength:c}=this.options;return h(t,this.pattern,this.patternAlphabet,{location:n,distance:i,threshold:r,findAllMatches:o,minMatchCharLength:c,includeMatches:s})}}function l(t,{n:e=3,pad:s=!0,sort:n=!1}){let i=[];if(null==t)return i;t=t.toLowerCase(),s&&(t=` ${t} `);let r=t.length-e+1;if(r<1)return i;for(;r--;)i[r]=t.substr(r,e);return n&&i.sort((t,e)=>t==e?0:t<e?-1:1),i}function a(s,r,{getFn:o=i,ngrams:h=!1}={}){let c=[];if(e(r[0]))for(let t=0,e=r.length;t<e;t+=1){const e=r[t];if(n(e)){let s={$:e,idx:t};h&&(s.ng=l(e,{sort:!0})),c.push(s)}}else{const i=s.length;for(let a=0,d=r.length;a<d;a+=1){let d=r[a],u={idx:a,$:{}};for(let r=0;r<i;r+=1){let i=s[r],c=o(d,i);if(n(c))if(t(c)){let s=[];const r=[{arrayIndex:-1,value:c}];for(;r.length;){const{arrayIndex:i,value:o}=r.pop();if(n(o))if(e(o)){let t={$:o,idx:i};h&&(t.ng=l(o,{sort:!0})),s.push(t)}else if(t(o))for(let t=0,e=o.length;t<e;t+=1)r.push({arrayIndex:t,value:o[t]})}u.$[i]=s}else{let t={$:c};h&&(t.ng=l(c,{sort:!0})),u.$[i]=t}}c.push(u)}}return c}class d{constructor(t){if(this._keys={},this._keyNames=[],this._length=t.length,t.length&&e(t[0]))for(let e=0;e<this._length;e+=1){const s=t[e];this._keys[s]={weight:1},this._keyNames.push(s)}else{let e=0;for(let s=0;s<this._length;s+=1){const n=t[s];if(!Object.prototype.hasOwnProperty.call(n,"name"))throw new Error('Missing "name" property in key object');const i=n.name;if(this._keyNames.push(i),!Object.prototype.hasOwnProperty.call(n,"weight"))throw new Error('Missing "weight" property in key object');const r=n.weight;if(r<=0||r>=1)throw new Error('"weight" property in key must be in the range of (0, 1)');this._keys[i]={weight:r},e+=r}for(let t=0;t<this._length;t+=1){const s=this._keyNames[t],n=this._keys[s].weight;this._keys[s].weight=n/e}}}get(t,e){return this._keys[t]?this._keys[t][e]:-1}keys(){return this._keyNames}count(){return this._length}toJSON(){return JSON.stringify(this._keys)}}function u(t,e){const s=t.matches;if(e.matches=[],n(s))for(let t=0,i=s.length;t<i;t+=1){let i=s[t];if(!n(i.indices)||0===i.indices.length)continue;let r={indices:i.indices,value:i.value};i.key&&(r.key=i.key),i.idx>-1&&(r.refIndex=i.idx),e.matches.push(r)}}function f(t,e){e.score=t.score}const g=[];class p{constructor(t,e={},s=null){this.options={...r,...e},this._processKeys(this.options.keys),this.setCollection(t,s)}setCollection(t,s=null){this.list=t,this.listIsStringArray=e(t[0]),s?this.setIndex(s):this.setIndex(this._createIndex())}setIndex(t){this._indexedList=t}_processKeys(t){this._keyStore=new d(t)}_createIndex(){return a(this._keyStore.keys(),this.list,{getFn:this.options.getFn})}search(t,e={limit:!1}){const{shouldSort:n}=this.options;let i=null;for(let e=0,s=g.length;e<s;e+=1){let s=g[e];if(s.condition(t,this.options)){i=new s(t,this.options);break}}i||(i=new c(t,this.options));let r=this._searchUsing(i);return this._computeScore(r),n&&this._sort(r),e.limit&&s(e.limit)&&(r=r.slice(0,e.limit)),this._format(r)}_searchUsing(e){const s=this._indexedList,i=[],{includeMatches:r}=this.options;if(this.listIsStringArray)for(let t=0,o=s.length;t<o;t+=1){let o=s[t],{$:h,idx:c}=o;if(!n(h))continue;let l=e.searchIn(o);const{isMatch:a,score:d}=l;if(!a)continue;let u={score:d,value:h};r&&(u.indices=l.matchedIndices),i.push({item:h,idx:c,matches:[u]})}else{const o=this._keyStore.keys(),h=this._keyStore.count();for(let c=0,l=s.length;c<l;c+=1){let{$:l,idx:a}=s[c];if(!n(l))continue;let d=[];for(let s=0;s<h;s+=1){let i=o[s],h=l[i];if(n(h))if(t(h))for(let t=0,s=h.length;t<s;t+=1){let s=h[t],o=s.$,c=s.idx;if(!n(o))continue;let l=e.searchIn(s);const{isMatch:a,score:u}=l;if(!a)continue;let f={score:u,key:i,value:o,idx:c};r&&(f.indices=l.matchedIndices),d.push(f)}else{let t=h.$,s=e.searchIn(h);const{isMatch:n,score:o}=s;if(!n)continue;let c={score:o,key:i,value:t};r&&(c.indices=s.matchedIndices),d.push(c)}}d.length&&i.push({idx:a,item:l,matches:d})}}return i}_computeScore(t){for(let e=0,s=t.length;e<s;e+=1){const s=t[e],n=s.matches,i=n.length;let r=1;for(let t=0;t<i;t+=1){const e=n[t],s=e.key,i=this._keyStore.get(s,"weight"),o=i>-1?i:1,h=0===e.score&&i>-1?Number.EPSILON:e.score;r*=Math.pow(h,o)}s.score=r}}_sort(t){t.sort(this.options.sortFn)}_format(t){const e=[],{includeMatches:s,includeScore:n}=this.options;let i=[];s&&i.push(u),n&&i.push(f);for(let s=0,n=t.length;s<n;s+=1){const n=t[s],{idx:r}=n,o={item:this.list[r],refIndex:r};if(i.length)for(let t=0,e=i.length;t<e;t+=1)i[t](n,o);e.push(o)}return e}}p.version="5.2.0-alpha.2",p.createIndex=a,p.config=r;export default p;
/**
* Fuse.js v5.2.0-alpha.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v5.2.0-alpha.2 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -233,3 +233,3 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

var matchmask = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var minMatchCharLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var minMatchCharLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Config.minMatchCharLength;
var matchedIndices = [];

@@ -1064,7 +1064,2 @@ var start = -1;

}
}], [{
key: "register",
value: function register() {
registeredSearchers.push.apply(registeredSearchers, arguments);
}
}]);

@@ -1075,3 +1070,3 @@

Fuse.version = '5.2.0-alpha.1';
Fuse.version = '5.2.0-alpha.2';
Fuse.createIndex = createIndex;

@@ -1078,0 +1073,0 @@ Fuse.config = Config;

/**
* Fuse.js v5.2.0-alpha.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v5.2.0-alpha.2 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -9,2 +9,2 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

*/
var e,t;e=this,t=function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},a=function(e){return"string"==typeof e},c=function(e){return"number"==typeof e},h=function(e){return null!=e};function l(e,t){var r=[],n=!1;return function e(t,i){if(i){var o=i.indexOf("."),l=i,u=null;-1!==o&&(l=i.slice(0,o),u=i.slice(o+1));var f=t[l];if(h(f))if(u||!a(f)&&!c(f))if(s(f)){n=!0;for(var v=0,d=f.length;v<d;v+=1)e(f[v],u)}else u&&e(f,u);else r.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(f))}else r.push(t)}(e,t),n?r:r[0]}var u=o({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score-t.score}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:l});function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.errors,n=void 0===r?0:r,i=t.currentLocation,o=void 0===i?0:i,s=t.expectedLocation,a=void 0===s?0:s,c=t.distance,h=void 0===c?u.distance:c,l=n/e.length,f=Math.abs(a-o);return h?l+f/h:f?1:l}function v(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=[],n=-1,i=-1,o=0,s=e.length;o<s;o+=1){var a=e[o];a&&-1===n?n=o:a||-1===n||((i=o-1)-n+1>=t&&r.push([n,i]),n=-1)}return e[o-1]&&o-n>=t&&r.push([n,o-1]),r}function d(e){for(var t={},r=e.length,n=0;n<r;n+=1)t[e.charAt(n)]=0;for(var i=0;i<r;i+=1)t[e.charAt(i)]|=1<<r-i-1;return t}var p=function(){function t(r){var n,i,o,s,a,c,h,l,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(i=(n={}).location,location=void 0===i?u.location:i,o=n.threshold,threshold=void 0===o?u.threshold:o,s=n.distance,distance=void 0===s?u.distance:s,a=n.includeMatches,includeMatches=void 0===a?u.includeMatches:a,c=n.findAllMatches,findAllMatches=void 0===c?u.findAllMatches:c,h=n.minMatchCharLength,minMatchCharLength=void 0===h?u.minMatchCharLength:h,l=n.isCaseSensitive,isCaseSensitive=void 0===l?u.isCaseSensitive:l,n);if(e(this,t),this.options=f,r.length>32)throw new Error("Pattern length exceeds max of ".concat(32,"."));this.pattern=this.options.isCaseSensitive?r:r.toLowerCase(),this.patternAlphabet=d(this.pattern)}return r(t,[{key:"searchIn",value:function(e){var t=e.$;return this.searchInString(t)}},{key:"searchInString",value:function(e){var t=this.options,r=t.isCaseSensitive,n=t.includeMatches;if(r||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return n&&(i.matchedIndices=[[0,e.length-1]]),i}var o=this.options,s=o.location,a=o.distance,c=o.threshold,h=o.findAllMatches,l=o.minMatchCharLength;return function(e,t,r){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n.location,o=void 0===i?u.location:i,s=n.distance,a=void 0===s?u.distance:s,c=n.threshold,h=void 0===c?u.threshold:c,l=n.findAllMatches,d=void 0===l?u.findAllMatches:l,p=n.minMatchCharLength,g=void 0===p?u.minMatchCharLength:p,y=n.includeMatches,m=void 0===y?u.includeMatches:y,k=t.length,M=e.length,x=Math.max(0,Math.min(o,M)),b=h,_=e.indexOf(t,x),w=[],O=0;O<M;O+=1)w[O]=0;if(-1!==_){var S=f(t,{errors:0,currentLocation:_,expectedLocation:x,distance:a});if(b=Math.min(S,b),-1!==(_=e.lastIndexOf(t,x+k))){var I=f(t,{errors:0,currentLocation:_,expectedLocation:x,distance:a});b=Math.min(I,b)}}_=-1;for(var L=[],A=1,j=k+M,C=1<<(k<=31?k-1:30),P=0;P<k;P+=1){for(var $=0,E=j;$<E;){var N=f(t,{errors:P,currentLocation:x+E,expectedLocation:x,distance:a});N<=b?$=E:j=E,E=Math.floor((j-$)/2+$)}j=E;var F=Math.max(1,x-E+1),D=d?M:Math.min(x+E,M)+k,J=Array(D+2);J[D+1]=(1<<P)-1;for(var K=D;K>=F;K-=1){var U=K-1,T=r[e.charAt(U)];if(T&&(w[U]=1),J[K]=(J[K+1]<<1|1)&T,0!==P&&(J[K]|=(L[K+1]|L[K])<<1|1|L[K+1]),J[K]&C&&(A=f(t,{errors:P,currentLocation:U,expectedLocation:x,distance:a}))<=b){if(b=A,(_=U)<=x)break;F=Math.max(1,2*x-_)}}var q=f(t,{errors:P+1,currentLocation:x,expectedLocation:x,distance:a});if(q>b)break;L=J}var z={isMatch:_>=0,score:A||.001};return m&&(z.matchedIndices=v(w,g)),z}(e,this.pattern,this.patternAlphabet,{location:s,distance:a,threshold:c,findAllMatches:h,minMatchCharLength:l,includeMatches:n})}}]),t}();function g(e,t){var r=t.n,n=void 0===r?3:r,i=t.pad,o=void 0===i||i,s=t.sort,a=void 0!==s&&s,c=[];if(null==e)return c;e=e.toLowerCase(),o&&(e=" ".concat(e," "));var h=e.length-n+1;if(h<1)return c;for(;h--;)c[h]=e.substr(h,n);return a&&c.sort((function(e,t){return e==t?0:e<t?-1:1})),c}function y(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.getFn,i=void 0===n?l:n,o=r.ngrams,c=void 0!==o&&o,u=[];if(a(t[0]))for(var f=0,v=t.length;f<v;f+=1){var d=t[f];if(h(d)){var p={$:d,idx:f};c&&(p.ng=g(d,{sort:!0})),u.push(p)}}else for(var y=e.length,m=0,k=t.length;m<k;m+=1){for(var M=t[m],x={idx:m,$:{}},b=0;b<y;b+=1){var _=e[b],w=i(M,_);if(h(w))if(s(w)){for(var O=[],S=[{arrayIndex:-1,value:w}];S.length;){var I=S.pop(),L=I.arrayIndex,A=I.value;if(h(A))if(a(A)){var j={$:A,idx:L};c&&(j.ng=g(A,{sort:!0})),O.push(j)}else if(s(A))for(var C=0,P=A.length;C<P;C+=1)S.push({arrayIndex:C,value:A[C]})}x.$[_]=O}else{var $={$:w};c&&($.ng=g(w,{sort:!0})),x.$[_]=$}}u.push(x)}return u}var m=function(){function t(r){if(e(this,t),this._keys={},this._keyNames=[],this._length=r.length,r.length&&a(r[0]))for(var n=0;n<this._length;n+=1){var i=r[n];this._keys[i]={weight:1},this._keyNames.push(i)}else{for(var o=0,s=0;s<this._length;s+=1){var c=r[s];if(!Object.prototype.hasOwnProperty.call(c,"name"))throw new Error('Missing "name" property in key object');var h=c.name;if(this._keyNames.push(h),!Object.prototype.hasOwnProperty.call(c,"weight"))throw new Error('Missing "weight" property in key object');var l=c.weight;if(l<=0||l>=1)throw new Error('"weight" property in key must be in the range of (0, 1)');this._keys[h]={weight:l},o+=l}for(var u=0;u<this._length;u+=1){var f=this._keyNames[u],v=this._keys[f].weight;this._keys[f].weight=v/o}}}return r(t,[{key:"get",value:function(e,t){return this._keys[e]?this._keys[e][t]:-1}},{key:"keys",value:function(){return this._keyNames}},{key:"count",value:function(){return this._length}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),t}();function k(e,t){var r=e.matches;if(t.matches=[],h(r))for(var n=0,i=r.length;n<i;n+=1){var o=r[n];if(h(o.indices)&&0!==o.indices.length){var s={indices:o.indices,value:o.value};o.key&&(s.key=o.key),o.idx>-1&&(s.refIndex=o.idx),t.matches.push(s)}}}function M(e,t){t.score=e.score}var x=[],b=function(){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e(this,t),this.options=o({},u,{},n),this._processKeys(this.options.keys),this.setCollection(r,i)}return r(t,[{key:"setCollection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.list=e,this.listIsStringArray=a(e[0]),t?this.setIndex(t):this.setIndex(this._createIndex())}},{key:"setIndex",value:function(e){this._indexedList=e}},{key:"_processKeys",value:function(e){this._keyStore=new m(e)}},{key:"_createIndex",value:function(){return y(this._keyStore.keys(),this.list,{getFn:this.options.getFn})}},{key:"search",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{limit:!1},r=this.options.shouldSort,n=null,i=0,o=x.length;i<o;i+=1){var s=x[i];if(s.condition(e,this.options)){n=new s(e,this.options);break}}n||(n=new p(e,this.options));var a=this._searchUsing(n);return this._computeScore(a),r&&this._sort(a),t.limit&&c(t.limit)&&(a=a.slice(0,t.limit)),this._format(a)}},{key:"_searchUsing",value:function(e){var t=this._indexedList,r=[],n=this.options.includeMatches;if(this.listIsStringArray)for(var i=0,o=t.length;i<o;i+=1){var a=t[i],c=a.$,l=a.idx;if(h(c)){var u=e.searchIn(a),f=u.isMatch,v=u.score;if(f){var d={score:v,value:c};n&&(d.indices=u.matchedIndices),r.push({item:c,idx:l,matches:[d]})}}}else for(var p=this._keyStore.keys(),g=this._keyStore.count(),y=0,m=t.length;y<m;y+=1){var k=t[y],M=k.$,x=k.idx;if(h(M)){for(var b=[],_=0;_<g;_+=1){var w=p[_],O=M[w];if(h(O))if(s(O))for(var S=0,I=O.length;S<I;S+=1){var L=O[S],A=L.$,j=L.idx;if(h(A)){var C=e.searchIn(L),P=C.isMatch,$=C.score;if(P){var E={score:$,key:w,value:A,idx:j};n&&(E.indices=C.matchedIndices),b.push(E)}}}else{var N=O.$,F=e.searchIn(O),D=F.isMatch,J=F.score;if(!D)continue;var K={score:J,key:w,value:N};n&&(K.indices=F.matchedIndices),b.push(K)}}b.length&&r.push({idx:x,item:M,matches:b})}}return r}},{key:"_computeScore",value:function(e){for(var t=0,r=e.length;t<r;t+=1){for(var n=e[t],i=n.matches,o=i.length,s=1,a=0;a<o;a+=1){var c=i[a],h=c.key,l=this._keyStore.get(h,"weight"),u=l>-1?l:1,f=0===c.score&&l>-1?Number.EPSILON:c.score;s*=Math.pow(f,u)}n.score=s}}},{key:"_sort",value:function(e){e.sort(this.options.sortFn)}},{key:"_format",value:function(e){var t=[],r=this.options,n=r.includeMatches,i=r.includeScore,o=[];n&&o.push(k),i&&o.push(M);for(var s=0,a=e.length;s<a;s+=1){var c=e[s],h=c.idx,l={item:this.list[h],refIndex:h};if(o.length)for(var u=0,f=o.length;u<f;u+=1)o[u](c,l);t.push(l)}return t}}],[{key:"register",value:function(){x.push.apply(x,arguments)}}]),t}();return b.version="5.2.0-alpha.1",b.createIndex=y,b.config=u,b},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t();
var e,t;e=this,t=function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},a=function(e){return"string"==typeof e},c=function(e){return"number"==typeof e},h=function(e){return null!=e};function l(e,t){var r=[],n=!1;return function e(t,i){if(i){var o=i.indexOf("."),l=i,u=null;-1!==o&&(l=i.slice(0,o),u=i.slice(o+1));var f=t[l];if(h(f))if(u||!a(f)&&!c(f))if(s(f)){n=!0;for(var v=0,d=f.length;v<d;v+=1)e(f[v],u)}else u&&e(f,u);else r.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(f))}else r.push(t)}(e,t),n?r:r[0]}var u=o({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score-t.score}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:l});function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.errors,n=void 0===r?0:r,i=t.currentLocation,o=void 0===i?0:i,s=t.expectedLocation,a=void 0===s?0:s,c=t.distance,h=void 0===c?u.distance:c,l=n/e.length,f=Math.abs(a-o);return h?l+f/h:f?1:l}function v(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.minMatchCharLength,r=[],n=-1,i=-1,o=0,s=e.length;o<s;o+=1){var a=e[o];a&&-1===n?n=o:a||-1===n||((i=o-1)-n+1>=t&&r.push([n,i]),n=-1)}return e[o-1]&&o-n>=t&&r.push([n,o-1]),r}function d(e){for(var t={},r=e.length,n=0;n<r;n+=1)t[e.charAt(n)]=0;for(var i=0;i<r;i+=1)t[e.charAt(i)]|=1<<r-i-1;return t}var p=function(){function t(r){var n,i,o,s,a,c,h,l,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(i=(n={}).location,location=void 0===i?u.location:i,o=n.threshold,threshold=void 0===o?u.threshold:o,s=n.distance,distance=void 0===s?u.distance:s,a=n.includeMatches,includeMatches=void 0===a?u.includeMatches:a,c=n.findAllMatches,findAllMatches=void 0===c?u.findAllMatches:c,h=n.minMatchCharLength,minMatchCharLength=void 0===h?u.minMatchCharLength:h,l=n.isCaseSensitive,isCaseSensitive=void 0===l?u.isCaseSensitive:l,n);if(e(this,t),this.options=f,r.length>32)throw new Error("Pattern length exceeds max of ".concat(32,"."));this.pattern=this.options.isCaseSensitive?r:r.toLowerCase(),this.patternAlphabet=d(this.pattern)}return r(t,[{key:"searchIn",value:function(e){var t=e.$;return this.searchInString(t)}},{key:"searchInString",value:function(e){var t=this.options,r=t.isCaseSensitive,n=t.includeMatches;if(r||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return n&&(i.matchedIndices=[[0,e.length-1]]),i}var o=this.options,s=o.location,a=o.distance,c=o.threshold,h=o.findAllMatches,l=o.minMatchCharLength;return function(e,t,r){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n.location,o=void 0===i?u.location:i,s=n.distance,a=void 0===s?u.distance:s,c=n.threshold,h=void 0===c?u.threshold:c,l=n.findAllMatches,d=void 0===l?u.findAllMatches:l,p=n.minMatchCharLength,g=void 0===p?u.minMatchCharLength:p,y=n.includeMatches,m=void 0===y?u.includeMatches:y,k=t.length,M=e.length,x=Math.max(0,Math.min(o,M)),b=h,_=e.indexOf(t,x),w=[],O=0;O<M;O+=1)w[O]=0;if(-1!==_){var S=f(t,{errors:0,currentLocation:_,expectedLocation:x,distance:a});if(b=Math.min(S,b),-1!==(_=e.lastIndexOf(t,x+k))){var L=f(t,{errors:0,currentLocation:_,expectedLocation:x,distance:a});b=Math.min(L,b)}}_=-1;for(var I=[],A=1,C=k+M,j=1<<(k<=31?k-1:30),P=0;P<k;P+=1){for(var $=0,E=C;$<E;){var N=f(t,{errors:P,currentLocation:x+E,expectedLocation:x,distance:a});N<=b?$=E:C=E,E=Math.floor((C-$)/2+$)}C=E;var F=Math.max(1,x-E+1),D=d?M:Math.min(x+E,M)+k,J=Array(D+2);J[D+1]=(1<<P)-1;for(var K=D;K>=F;K-=1){var U=K-1,T=r[e.charAt(U)];if(T&&(w[U]=1),J[K]=(J[K+1]<<1|1)&T,0!==P&&(J[K]|=(I[K+1]|I[K])<<1|1|I[K+1]),J[K]&j&&(A=f(t,{errors:P,currentLocation:U,expectedLocation:x,distance:a}))<=b){if(b=A,(_=U)<=x)break;F=Math.max(1,2*x-_)}}var q=f(t,{errors:P+1,currentLocation:x,expectedLocation:x,distance:a});if(q>b)break;I=J}var z={isMatch:_>=0,score:A||.001};return m&&(z.matchedIndices=v(w,g)),z}(e,this.pattern,this.patternAlphabet,{location:s,distance:a,threshold:c,findAllMatches:h,minMatchCharLength:l,includeMatches:n})}}]),t}();function g(e,t){var r=t.n,n=void 0===r?3:r,i=t.pad,o=void 0===i||i,s=t.sort,a=void 0!==s&&s,c=[];if(null==e)return c;e=e.toLowerCase(),o&&(e=" ".concat(e," "));var h=e.length-n+1;if(h<1)return c;for(;h--;)c[h]=e.substr(h,n);return a&&c.sort((function(e,t){return e==t?0:e<t?-1:1})),c}function y(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.getFn,i=void 0===n?l:n,o=r.ngrams,c=void 0!==o&&o,u=[];if(a(t[0]))for(var f=0,v=t.length;f<v;f+=1){var d=t[f];if(h(d)){var p={$:d,idx:f};c&&(p.ng=g(d,{sort:!0})),u.push(p)}}else for(var y=e.length,m=0,k=t.length;m<k;m+=1){for(var M=t[m],x={idx:m,$:{}},b=0;b<y;b+=1){var _=e[b],w=i(M,_);if(h(w))if(s(w)){for(var O=[],S=[{arrayIndex:-1,value:w}];S.length;){var L=S.pop(),I=L.arrayIndex,A=L.value;if(h(A))if(a(A)){var C={$:A,idx:I};c&&(C.ng=g(A,{sort:!0})),O.push(C)}else if(s(A))for(var j=0,P=A.length;j<P;j+=1)S.push({arrayIndex:j,value:A[j]})}x.$[_]=O}else{var $={$:w};c&&($.ng=g(w,{sort:!0})),x.$[_]=$}}u.push(x)}return u}var m=function(){function t(r){if(e(this,t),this._keys={},this._keyNames=[],this._length=r.length,r.length&&a(r[0]))for(var n=0;n<this._length;n+=1){var i=r[n];this._keys[i]={weight:1},this._keyNames.push(i)}else{for(var o=0,s=0;s<this._length;s+=1){var c=r[s];if(!Object.prototype.hasOwnProperty.call(c,"name"))throw new Error('Missing "name" property in key object');var h=c.name;if(this._keyNames.push(h),!Object.prototype.hasOwnProperty.call(c,"weight"))throw new Error('Missing "weight" property in key object');var l=c.weight;if(l<=0||l>=1)throw new Error('"weight" property in key must be in the range of (0, 1)');this._keys[h]={weight:l},o+=l}for(var u=0;u<this._length;u+=1){var f=this._keyNames[u],v=this._keys[f].weight;this._keys[f].weight=v/o}}}return r(t,[{key:"get",value:function(e,t){return this._keys[e]?this._keys[e][t]:-1}},{key:"keys",value:function(){return this._keyNames}},{key:"count",value:function(){return this._length}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),t}();function k(e,t){var r=e.matches;if(t.matches=[],h(r))for(var n=0,i=r.length;n<i;n+=1){var o=r[n];if(h(o.indices)&&0!==o.indices.length){var s={indices:o.indices,value:o.value};o.key&&(s.key=o.key),o.idx>-1&&(s.refIndex=o.idx),t.matches.push(s)}}}function M(e,t){t.score=e.score}var x=[],b=function(){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e(this,t),this.options=o({},u,{},n),this._processKeys(this.options.keys),this.setCollection(r,i)}return r(t,[{key:"setCollection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.list=e,this.listIsStringArray=a(e[0]),t?this.setIndex(t):this.setIndex(this._createIndex())}},{key:"setIndex",value:function(e){this._indexedList=e}},{key:"_processKeys",value:function(e){this._keyStore=new m(e)}},{key:"_createIndex",value:function(){return y(this._keyStore.keys(),this.list,{getFn:this.options.getFn})}},{key:"search",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{limit:!1},r=this.options.shouldSort,n=null,i=0,o=x.length;i<o;i+=1){var s=x[i];if(s.condition(e,this.options)){n=new s(e,this.options);break}}n||(n=new p(e,this.options));var a=this._searchUsing(n);return this._computeScore(a),r&&this._sort(a),t.limit&&c(t.limit)&&(a=a.slice(0,t.limit)),this._format(a)}},{key:"_searchUsing",value:function(e){var t=this._indexedList,r=[],n=this.options.includeMatches;if(this.listIsStringArray)for(var i=0,o=t.length;i<o;i+=1){var a=t[i],c=a.$,l=a.idx;if(h(c)){var u=e.searchIn(a),f=u.isMatch,v=u.score;if(f){var d={score:v,value:c};n&&(d.indices=u.matchedIndices),r.push({item:c,idx:l,matches:[d]})}}}else for(var p=this._keyStore.keys(),g=this._keyStore.count(),y=0,m=t.length;y<m;y+=1){var k=t[y],M=k.$,x=k.idx;if(h(M)){for(var b=[],_=0;_<g;_+=1){var w=p[_],O=M[w];if(h(O))if(s(O))for(var S=0,L=O.length;S<L;S+=1){var I=O[S],A=I.$,C=I.idx;if(h(A)){var j=e.searchIn(I),P=j.isMatch,$=j.score;if(P){var E={score:$,key:w,value:A,idx:C};n&&(E.indices=j.matchedIndices),b.push(E)}}}else{var N=O.$,F=e.searchIn(O),D=F.isMatch,J=F.score;if(!D)continue;var K={score:J,key:w,value:N};n&&(K.indices=F.matchedIndices),b.push(K)}}b.length&&r.push({idx:x,item:M,matches:b})}}return r}},{key:"_computeScore",value:function(e){for(var t=0,r=e.length;t<r;t+=1){for(var n=e[t],i=n.matches,o=i.length,s=1,a=0;a<o;a+=1){var c=i[a],h=c.key,l=this._keyStore.get(h,"weight"),u=l>-1?l:1,f=0===c.score&&l>-1?Number.EPSILON:c.score;s*=Math.pow(f,u)}n.score=s}}},{key:"_sort",value:function(e){e.sort(this.options.sortFn)}},{key:"_format",value:function(e){var t=[],r=this.options,n=r.includeMatches,i=r.includeScore,o=[];n&&o.push(k),i&&o.push(M);for(var s=0,a=e.length;s<a;s+=1){var c=e[s],h=c.idx,l={item:this.list[h],refIndex:h};if(o.length)for(var u=0,f=o.length;u<f;u+=1)o[u](c,l);t.push(l)}return t}}]),t}();return b.version="5.2.0-alpha.2",b.createIndex=y,b.config=u,b},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t();
/**
* Fuse.js v5.2.0-alpha.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v5.2.0-alpha.2 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -339,3 +339,3 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

var matchmask = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var minMatchCharLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var minMatchCharLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Config.minMatchCharLength;
var matchedIndices = [];

@@ -1510,2 +1510,5 @@ var start = -1;

var registeredSearchers = [];
function register() {
registeredSearchers.push.apply(registeredSearchers, arguments);
}

@@ -1786,7 +1789,2 @@ var Fuse = /*#__PURE__*/function () {

}
}], [{
key: "register",
value: function register() {
registeredSearchers.push.apply(registeredSearchers, arguments);
}
}]);

@@ -1797,4 +1795,4 @@

Fuse.register(ExtendedSearch, NGramSearch);
Fuse.version = '5.2.0-alpha.1';
register(ExtendedSearch, NGramSearch);
Fuse.version = '5.2.0-alpha.2';
Fuse.createIndex = createIndex;

@@ -1801,0 +1799,0 @@ Fuse.config = Config;

@@ -1,2 +0,2 @@

// Type definitions for Fuse.js v5.2.0-alpha.1
// Type definitions for Fuse.js v5.2.0-alpha.2
// TypeScript v3.8.3

@@ -3,0 +3,0 @@

/**
* Fuse.js v5.2.0-alpha.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v5.2.0-alpha.2 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -160,3 +160,3 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

matchmask = [],
minMatchCharLength = 1
minMatchCharLength = Config.minMatchCharLength
) {

@@ -1196,2 +1196,6 @@ let matchedIndices = [];

function register(...args) {
registeredSearchers.push(...args);
}
class Fuse {

@@ -1205,6 +1209,2 @@ constructor(list, options = {}, index = null) {

static register(...args) {
registeredSearchers.push(...args);
}
setCollection(list, index = null) {

@@ -1444,5 +1444,5 @@ this.list = list;

Fuse.register(ExtendedSearch, NGramSearch);
register(ExtendedSearch, NGramSearch);
Fuse.version = '5.2.0-alpha.1';
Fuse.version = '5.2.0-alpha.2';
Fuse.createIndex = createIndex;

@@ -1449,0 +1449,0 @@ Fuse.config = Config;

/**
* Fuse.js v5.2.0-alpha.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v5.2.0-alpha.2 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -9,2 +9,2 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

*/
const t=t=>Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t),e=t=>"string"==typeof t,s=t=>"number"==typeof t,n=t=>null!=t;function i(i,r){let c=[],h=!1;const o=(i,r)=>{if(r){const a=r.indexOf(".");let l=r,u=null;-1!==a&&(l=r.slice(0,a),u=r.slice(a+1));const d=i[l];if(n(d))if(u||!e(d)&&!s(d))if(t(d)){h=!0;for(let t=0,e=d.length;t<e;t+=1)o(d[t],u)}else u&&o(d,u);else c.push((t=>null==t?"":(t=>{if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e})(t))(d))}else c.push(i)};return o(i,r),h?c:c[0]}var r={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score-e.score,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:i}};function c(t,{errors:e=0,currentLocation:s=0,expectedLocation:n=0,distance:i=r.distance}={}){const c=e/t.length,h=Math.abs(n-s);return i?c+h/i:h?1:c}class h{constructor(t,e=({location:location=r.location,threshold:threshold=r.threshold,distance:distance=r.distance,includeMatches:includeMatches=r.includeMatches,findAllMatches:findAllMatches=r.findAllMatches,minMatchCharLength:minMatchCharLength=r.minMatchCharLength,isCaseSensitive:isCaseSensitive=r.isCaseSensitive}={})){if(this.options=e,t.length>32)throw new Error("Pattern length exceeds max of 32.");this.pattern=this.options.isCaseSensitive?t:t.toLowerCase(),this.patternAlphabet=function(t){let e={},s=t.length;for(let n=0;n<s;n+=1)e[t.charAt(n)]=0;for(let n=0;n<s;n+=1)e[t.charAt(n)]|=1<<s-n-1;return e}(this.pattern)}searchIn(t){let e=t.$;return this.searchInString(e)}searchInString(t){const{isCaseSensitive:e,includeMatches:s}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return s&&(e.matchedIndices=[[0,t.length-1]]),e}const{location:n,distance:i,threshold:h,findAllMatches:o,minMatchCharLength:a}=this.options;return function(t,e,s,{location:n=r.location,distance:i=r.distance,threshold:h=r.threshold,findAllMatches:o=r.findAllMatches,minMatchCharLength:a=r.minMatchCharLength,includeMatches:l=r.includeMatches}={}){const u=e.length,d=t.length,g=Math.max(0,Math.min(n,d));let f=h,p=t.indexOf(e,g);const M=[];for(let t=0;t<d;t+=1)M[t]=0;if(-1!==p){let s=c(e,{errors:0,currentLocation:p,expectedLocation:g,distance:i});if(f=Math.min(s,f),p=t.lastIndexOf(e,g+u),-1!==p){let t=c(e,{errors:0,currentLocation:p,expectedLocation:g,distance:i});f=Math.min(t,f)}}p=-1;let m=[],y=1,x=u+d;const _=1<<(u<=31?u-1:30);for(let n=0;n<u;n+=1){let r=0,h=x;for(;r<h;){c(e,{errors:n,currentLocation:g+h,expectedLocation:g,distance:i})<=f?r=h:x=h,h=Math.floor((x-r)/2+r)}x=h;let a=Math.max(1,g-h+1),l=o?d:Math.min(g+h,d)+u,S=Array(l+2);S[l+1]=(1<<n)-1;for(let r=l;r>=a;r-=1){let h=r-1,o=s[t.charAt(h)];if(o&&(M[h]=1),S[r]=(S[r+1]<<1|1)&o,0!==n&&(S[r]|=(m[r+1]|m[r])<<1|1|m[r+1]),S[r]&_&&(y=c(e,{errors:n,currentLocation:h,expectedLocation:g,distance:i}),y<=f)){if(f=y,p=h,p<=g)break;a=Math.max(1,2*g-p)}}if(c(e,{errors:n+1,currentLocation:g,expectedLocation:g,distance:i})>f)break;m=S}let S={isMatch:p>=0,score:y||.001};return l&&(S.matchedIndices=function(t=[],e=1){let s=[],n=-1,i=-1,r=0;for(let c=t.length;r<c;r+=1){let c=t[r];c&&-1===n?n=r:c||-1===n||(i=r-1,i-n+1>=e&&s.push([n,i]),n=-1)}return t[r-1]&&r-n>=e&&s.push([n,r-1]),s}(M,a)),S}(t,this.pattern,this.patternAlphabet,{location:n,distance:i,threshold:h,findAllMatches:o,minMatchCharLength:a,includeMatches:s})}}class o{constructor(t){this.pattern=t}static isLiteralMatch(t){return a(t,this.literal)}static isRegMatch(t){return a(t,this.re)}search(){}}function a(t,e){const s=t.match(e);return s?s[1]:null}class l extends o{constructor(t,e=({location:location=r.location,threshold:threshold=r.threshold,distance:distance=r.distance,includeMatches:includeMatches=r.includeMatches,findAllMatches:findAllMatches=r.findAllMatches,minMatchCharLength:minMatchCharLength=r.minMatchCharLength,isCaseSensitive:isCaseSensitive=r.isCaseSensitive}={})){super(t),this._bitapSearch=new h(t,e)}static get type(){return"fuzzy"}static get literal(){return/^"(.*)"$/}static get re(){return/^(.*)$/}search(t){return this._bitapSearch.searchInString(t)}}const u=[class extends o{constructor(t){super(t)}static get type(){return"exact"}static get literal(){return/^'"(.*)"$/}static get re(){return/^'(.*)$/}search(t){const e=t.indexOf(this.pattern),s=e>-1;return{isMatch:s,score:s?1:0,matchedIndices:[e,e+this.pattern.length-1]}}},class extends o{constructor(t){super(t)}static get type(){return"prefix-exact"}static get literal(){return/^\^"(.*)"$/}static get re(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,this.pattern.length-1]}}},class extends o{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get literal(){return/^!\^"(.*)"$/}static get re(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,t.length-1]}}},class extends o{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get literal(){return/^!"(.*)"\$$/}static get re(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,t.length-1]}}},class extends o{constructor(t){super(t)}static get type(){return"suffix-exact"}static get literal(){return/^"(.*)"\$$/}static get re(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[t.length-this.pattern.length,t.length-1]}}},class extends o{constructor(t){super(t)}static get type(){return"inverse-exact"}static get literal(){return/^!"(.*)"$/}static get re(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,t.length-1]}}},l],d=u.length,g=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function f(t,{n:e=3,pad:s=!0,sort:n=!1}){let i=[];if(null==t)return i;t=t.toLowerCase(),s&&(t=` ${t} `);let r=t.length-e+1;if(r<1)return i;for(;r--;)i[r]=t.substr(r,e);return n&&i.sort((t,e)=>t==e?0:t<e?-1:1),i}function p(s,r,{getFn:c=i,ngrams:h=!1}={}){let o=[];if(e(r[0]))for(let t=0,e=r.length;t<e;t+=1){const e=r[t];if(n(e)){let s={$:e,idx:t};h&&(s.ng=f(e,{sort:!0})),o.push(s)}}else{const i=s.length;for(let a=0,l=r.length;a<l;a+=1){let l=r[a],u={idx:a,$:{}};for(let r=0;r<i;r+=1){let i=s[r],o=c(l,i);if(n(o))if(t(o)){let s=[];const r=[{arrayIndex:-1,value:o}];for(;r.length;){const{arrayIndex:i,value:c}=r.pop();if(n(c))if(e(c)){let t={$:c,idx:i};h&&(t.ng=f(c,{sort:!0})),s.push(t)}else if(t(c))for(let t=0,e=c.length;t<e;t+=1)r.push({arrayIndex:t,value:c[t]})}u.$[i]=s}else{let t={$:o};h&&(t.ng=f(o,{sort:!0})),u.$[i]=t}}o.push(u)}}return o}class M{constructor(t){if(this._keys={},this._keyNames=[],this._length=t.length,t.length&&e(t[0]))for(let e=0;e<this._length;e+=1){const s=t[e];this._keys[s]={weight:1},this._keyNames.push(s)}else{let e=0;for(let s=0;s<this._length;s+=1){const n=t[s];if(!Object.prototype.hasOwnProperty.call(n,"name"))throw new Error('Missing "name" property in key object');const i=n.name;if(this._keyNames.push(i),!Object.prototype.hasOwnProperty.call(n,"weight"))throw new Error('Missing "weight" property in key object');const r=n.weight;if(r<=0||r>=1)throw new Error('"weight" property in key must be in the range of (0, 1)');this._keys[i]={weight:r},e+=r}for(let t=0;t<this._length;t+=1){const s=this._keyNames[t],n=this._keys[s].weight;this._keys[s].weight=n/e}}}get(t,e){return this._keys[t]?this._keys[t][e]:-1}keys(){return this._keyNames}count(){return this._length}toJSON(){return JSON.stringify(this._keys)}}function m(t,e){const s=t.matches;if(e.matches=[],n(s))for(let t=0,i=s.length;t<i;t+=1){let i=s[t];if(!n(i.indices)||0===i.indices.length)continue;let r={indices:i.indices,value:i.value};i.key&&(r.key=i.key),i.idx>-1&&(r.refIndex=i.idx),e.matches.push(r)}}function y(t,e){e.score=t.score}const x=[];class _{constructor(t,e={},s=null){this.options={...r,...e},this._processKeys(this.options.keys),this.setCollection(t,s)}static register(...t){x.push(...t)}setCollection(t,s=null){this.list=t,this.listIsStringArray=e(t[0]),s?this.setIndex(s):this.setIndex(this._createIndex())}setIndex(t){this._indexedList=t}_processKeys(t){this._keyStore=new M(t)}_createIndex(){return p(this._keyStore.keys(),this.list,{getFn:this.options.getFn})}search(t,e={limit:!1}){const{shouldSort:n}=this.options;let i=null;for(let e=0,s=x.length;e<s;e+=1){let s=x[e];if(s.condition(t,this.options)){i=new s(t,this.options);break}}i||(i=new h(t,this.options));let r=this._searchUsing(i);return this._computeScore(r),n&&this._sort(r),e.limit&&s(e.limit)&&(r=r.slice(0,e.limit)),this._format(r)}_searchUsing(e){const s=this._indexedList,i=[],{includeMatches:r}=this.options;if(this.listIsStringArray)for(let t=0,c=s.length;t<c;t+=1){let c=s[t],{$:h,idx:o}=c;if(!n(h))continue;let a=e.searchIn(c);const{isMatch:l,score:u}=a;if(!l)continue;let d={score:u,value:h};r&&(d.indices=a.matchedIndices),i.push({item:h,idx:o,matches:[d]})}else{const c=this._keyStore.keys(),h=this._keyStore.count();for(let o=0,a=s.length;o<a;o+=1){let{$:a,idx:l}=s[o];if(!n(a))continue;let u=[];for(let s=0;s<h;s+=1){let i=c[s],h=a[i];if(n(h))if(t(h))for(let t=0,s=h.length;t<s;t+=1){let s=h[t],c=s.$,o=s.idx;if(!n(c))continue;let a=e.searchIn(s);const{isMatch:l,score:d}=a;if(!l)continue;let g={score:d,key:i,value:c,idx:o};r&&(g.indices=a.matchedIndices),u.push(g)}else{let t=h.$,s=e.searchIn(h);const{isMatch:n,score:c}=s;if(!n)continue;let o={score:c,key:i,value:t};r&&(o.indices=s.matchedIndices),u.push(o)}}u.length&&i.push({idx:l,item:a,matches:u})}}return i}_computeScore(t){for(let e=0,s=t.length;e<s;e+=1){const s=t[e],n=s.matches,i=n.length;let r=1;for(let t=0;t<i;t+=1){const e=n[t],s=e.key,i=this._keyStore.get(s,"weight"),c=i>-1?i:1,h=0===e.score&&i>-1?Number.EPSILON:e.score;r*=Math.pow(h,c)}s.score=r}}_sort(t){t.sort(this.options.sortFn)}_format(t){const e=[],{includeMatches:s,includeScore:n}=this.options;let i=[];s&&i.push(m),n&&i.push(y);for(let s=0,n=t.length;s<n;s+=1){const n=t[s],{idx:r}=n,c={item:this.list[r],refIndex:r};if(i.length)for(let t=0,e=i.length;t<e;t+=1)i[t](n,c);e.push(c)}return e}}_.register(class{constructor(t,e=({isCaseSensitive:isCaseSensitive=r.isCaseSensitive,includeMatches:includeMatches=r.includeMatches,minMatchCharLength:minMatchCharLength=r.minMatchCharLength,findAllMatches:findAllMatches=r.findAllMatches,location:location=r.location,threshold:threshold=r.threshold,distance:distance=r.distance,includeMatches:includeMatches=r.includeMatches}={})){this.query=null,this.options=e,this.pattern=e.isCaseSensitive?t:t.toLowerCase(),this.query=function(t,e){return t.split("|").map(t=>{let s=t.trim().split(g).filter(t=>t&&!!t.trim()),n=[];for(let t=0,i=s.length;t<i;t+=1){const i=s[t];let r=!1,c=-1;for(;!r&&++c<d;){const t=u[c];let s=t.isLiteralMatch(i);s&&(n.push(new t(s,e)),r=!0)}if(!r)for(c=-1;++c<d;){const t=u[c];let s=t.isRegMatch(i);if(s){n.push(new t(s,e));break}}}return n})}(this.pattern,e)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};let s=t.$;const{includeMatches:n,isCaseSensitive:i}=this.options;s=i?s:s.toLowerCase();let r=0,c=[];for(let t=0,i=e.length;t<i;t+=1){const i=e[t];c.length=0,r=0;for(let t=0,e=i.length;t<e;t+=1){const e=i[t],{isMatch:h,matchedIndices:o}=e.search(s);if(!h){r=0,c.length=0;break}r+=1,n&&(e.constructor.type===l.type?c=[...c,...o]:c.push(o))}if(r){let t={isMatch:!0,score:0};return n&&(t.matchedIndices=c),t}}return{isMatch:!1,score:1}}},class{constructor(t,e=({threshold:threshold=r.threshold}={})){this.options=e,this.patternNgram=f(t,{sort:!0})}static condition(t){return t.length>32}searchIn(t){let e=t.ng;e||(e=f(t.$,{sort:!0}),t.ng=e);let s=function(t,e){let s=function(t,e){let s=[],n=0,i=0;for(;n<t.length&&i<e.length;){let r=t[n],c=e[i];r<c?(s.push(r),n+=1):c<r?(s.push(c),i+=1):(s.push(c),n+=1,i+=1)}for(;n<t.length;)s.push(t[n]),n+=1;for(;i<e.length;)s.push(e[i]),i+=1;return s}(t,e);return 1-function(t,e){let s=[],n=0,i=0;for(;n<t.length&&i<e.length;){let r=t[n],c=e[i];r==c?(s.push(r),n+=1,i+=1):r<c?n+=1:(r>c||(n+=1),i+=1)}return s}(t,e).length/s.length}(this.patternNgram,e);const n=s<this.options.threshold;return{score:n?s:1,isMatch:n}}}),_.version="5.2.0-alpha.1",_.createIndex=p,_.config=r;export default _;
const t=t=>Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t),e=t=>"string"==typeof t,s=t=>"number"==typeof t,n=t=>null!=t;function i(i,r){let c=[],h=!1;const o=(i,r)=>{if(r){const a=r.indexOf(".");let l=r,u=null;-1!==a&&(l=r.slice(0,a),u=r.slice(a+1));const d=i[l];if(n(d))if(u||!e(d)&&!s(d))if(t(d)){h=!0;for(let t=0,e=d.length;t<e;t+=1)o(d[t],u)}else u&&o(d,u);else c.push((t=>null==t?"":(t=>{if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e})(t))(d))}else c.push(i)};return o(i,r),h?c:c[0]}var r={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score-e.score,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:i}};function c(t,{errors:e=0,currentLocation:s=0,expectedLocation:n=0,distance:i=r.distance}={}){const c=e/t.length,h=Math.abs(n-s);return i?c+h/i:h?1:c}function h(t,e,s,{location:n=r.location,distance:i=r.distance,threshold:h=r.threshold,findAllMatches:o=r.findAllMatches,minMatchCharLength:a=r.minMatchCharLength,includeMatches:l=r.includeMatches}={}){const u=e.length,d=t.length,f=Math.max(0,Math.min(n,d));let g=h,p=t.indexOf(e,f);const M=[];for(let t=0;t<d;t+=1)M[t]=0;if(-1!==p){let s=c(e,{errors:0,currentLocation:p,expectedLocation:f,distance:i});if(g=Math.min(s,g),p=t.lastIndexOf(e,f+u),-1!==p){let t=c(e,{errors:0,currentLocation:p,expectedLocation:f,distance:i});g=Math.min(t,g)}}p=-1;let m=[],y=1,x=u+d;const _=1<<(u<=31?u-1:30);for(let n=0;n<u;n+=1){let r=0,h=x;for(;r<h;){c(e,{errors:n,currentLocation:f+h,expectedLocation:f,distance:i})<=g?r=h:x=h,h=Math.floor((x-r)/2+r)}x=h;let a=Math.max(1,f-h+1),l=o?d:Math.min(f+h,d)+u,S=Array(l+2);S[l+1]=(1<<n)-1;for(let r=l;r>=a;r-=1){let h=r-1,o=s[t.charAt(h)];if(o&&(M[h]=1),S[r]=(S[r+1]<<1|1)&o,0!==n&&(S[r]|=(m[r+1]|m[r])<<1|1|m[r+1]),S[r]&_&&(y=c(e,{errors:n,currentLocation:h,expectedLocation:f,distance:i}),y<=g)){if(g=y,p=h,p<=f)break;a=Math.max(1,2*f-p)}}if(c(e,{errors:n+1,currentLocation:f,expectedLocation:f,distance:i})>g)break;m=S}let S={isMatch:p>=0,score:y||.001};return l&&(S.matchedIndices=function(t=[],e=r.minMatchCharLength){let s=[],n=-1,i=-1,c=0;for(let r=t.length;c<r;c+=1){let r=t[c];r&&-1===n?n=c:r||-1===n||(i=c-1,i-n+1>=e&&s.push([n,i]),n=-1)}return t[c-1]&&c-n>=e&&s.push([n,c-1]),s}(M,a)),S}class o{constructor(t,e=({location:location=r.location,threshold:threshold=r.threshold,distance:distance=r.distance,includeMatches:includeMatches=r.includeMatches,findAllMatches:findAllMatches=r.findAllMatches,minMatchCharLength:minMatchCharLength=r.minMatchCharLength,isCaseSensitive:isCaseSensitive=r.isCaseSensitive}={})){if(this.options=e,t.length>32)throw new Error("Pattern length exceeds max of 32.");this.pattern=this.options.isCaseSensitive?t:t.toLowerCase(),this.patternAlphabet=function(t){let e={},s=t.length;for(let n=0;n<s;n+=1)e[t.charAt(n)]=0;for(let n=0;n<s;n+=1)e[t.charAt(n)]|=1<<s-n-1;return e}(this.pattern)}searchIn(t){let e=t.$;return this.searchInString(e)}searchInString(t){const{isCaseSensitive:e,includeMatches:s}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return s&&(e.matchedIndices=[[0,t.length-1]]),e}const{location:n,distance:i,threshold:r,findAllMatches:c,minMatchCharLength:o}=this.options;return h(t,this.pattern,this.patternAlphabet,{location:n,distance:i,threshold:r,findAllMatches:c,minMatchCharLength:o,includeMatches:s})}}class a{constructor(t){this.pattern=t}static isLiteralMatch(t){return l(t,this.literal)}static isRegMatch(t){return l(t,this.re)}search(){}}function l(t,e){const s=t.match(e);return s?s[1]:null}class u extends a{constructor(t,e=({location:location=r.location,threshold:threshold=r.threshold,distance:distance=r.distance,includeMatches:includeMatches=r.includeMatches,findAllMatches:findAllMatches=r.findAllMatches,minMatchCharLength:minMatchCharLength=r.minMatchCharLength,isCaseSensitive:isCaseSensitive=r.isCaseSensitive}={})){super(t),this._bitapSearch=new o(t,e)}static get type(){return"fuzzy"}static get literal(){return/^"(.*)"$/}static get re(){return/^(.*)$/}search(t){return this._bitapSearch.searchInString(t)}}const d=[class extends a{constructor(t){super(t)}static get type(){return"exact"}static get literal(){return/^'"(.*)"$/}static get re(){return/^'(.*)$/}search(t){const e=t.indexOf(this.pattern),s=e>-1;return{isMatch:s,score:s?1:0,matchedIndices:[e,e+this.pattern.length-1]}}},class extends a{constructor(t){super(t)}static get type(){return"prefix-exact"}static get literal(){return/^\^"(.*)"$/}static get re(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,this.pattern.length-1]}}},class extends a{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get literal(){return/^!\^"(.*)"$/}static get re(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,t.length-1]}}},class extends a{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get literal(){return/^!"(.*)"\$$/}static get re(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,t.length-1]}}},class extends a{constructor(t){super(t)}static get type(){return"suffix-exact"}static get literal(){return/^"(.*)"\$$/}static get re(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[t.length-this.pattern.length,t.length-1]}}},class extends a{constructor(t){super(t)}static get type(){return"inverse-exact"}static get literal(){return/^!"(.*)"$/}static get re(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,t.length-1]}}},u],f=d.length,g=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function p(t,{n:e=3,pad:s=!0,sort:n=!1}){let i=[];if(null==t)return i;t=t.toLowerCase(),s&&(t=` ${t} `);let r=t.length-e+1;if(r<1)return i;for(;r--;)i[r]=t.substr(r,e);return n&&i.sort((t,e)=>t==e?0:t<e?-1:1),i}function M(s,r,{getFn:c=i,ngrams:h=!1}={}){let o=[];if(e(r[0]))for(let t=0,e=r.length;t<e;t+=1){const e=r[t];if(n(e)){let s={$:e,idx:t};h&&(s.ng=p(e,{sort:!0})),o.push(s)}}else{const i=s.length;for(let a=0,l=r.length;a<l;a+=1){let l=r[a],u={idx:a,$:{}};for(let r=0;r<i;r+=1){let i=s[r],o=c(l,i);if(n(o))if(t(o)){let s=[];const r=[{arrayIndex:-1,value:o}];for(;r.length;){const{arrayIndex:i,value:c}=r.pop();if(n(c))if(e(c)){let t={$:c,idx:i};h&&(t.ng=p(c,{sort:!0})),s.push(t)}else if(t(c))for(let t=0,e=c.length;t<e;t+=1)r.push({arrayIndex:t,value:c[t]})}u.$[i]=s}else{let t={$:o};h&&(t.ng=p(o,{sort:!0})),u.$[i]=t}}o.push(u)}}return o}class m{constructor(t){if(this._keys={},this._keyNames=[],this._length=t.length,t.length&&e(t[0]))for(let e=0;e<this._length;e+=1){const s=t[e];this._keys[s]={weight:1},this._keyNames.push(s)}else{let e=0;for(let s=0;s<this._length;s+=1){const n=t[s];if(!Object.prototype.hasOwnProperty.call(n,"name"))throw new Error('Missing "name" property in key object');const i=n.name;if(this._keyNames.push(i),!Object.prototype.hasOwnProperty.call(n,"weight"))throw new Error('Missing "weight" property in key object');const r=n.weight;if(r<=0||r>=1)throw new Error('"weight" property in key must be in the range of (0, 1)');this._keys[i]={weight:r},e+=r}for(let t=0;t<this._length;t+=1){const s=this._keyNames[t],n=this._keys[s].weight;this._keys[s].weight=n/e}}}get(t,e){return this._keys[t]?this._keys[t][e]:-1}keys(){return this._keyNames}count(){return this._length}toJSON(){return JSON.stringify(this._keys)}}function y(t,e){const s=t.matches;if(e.matches=[],n(s))for(let t=0,i=s.length;t<i;t+=1){let i=s[t];if(!n(i.indices)||0===i.indices.length)continue;let r={indices:i.indices,value:i.value};i.key&&(r.key=i.key),i.idx>-1&&(r.refIndex=i.idx),e.matches.push(r)}}function x(t,e){e.score=t.score}const _=[];class S{constructor(t,e={},s=null){this.options={...r,...e},this._processKeys(this.options.keys),this.setCollection(t,s)}setCollection(t,s=null){this.list=t,this.listIsStringArray=e(t[0]),s?this.setIndex(s):this.setIndex(this._createIndex())}setIndex(t){this._indexedList=t}_processKeys(t){this._keyStore=new m(t)}_createIndex(){return M(this._keyStore.keys(),this.list,{getFn:this.options.getFn})}search(t,e={limit:!1}){const{shouldSort:n}=this.options;let i=null;for(let e=0,s=_.length;e<s;e+=1){let s=_[e];if(s.condition(t,this.options)){i=new s(t,this.options);break}}i||(i=new o(t,this.options));let r=this._searchUsing(i);return this._computeScore(r),n&&this._sort(r),e.limit&&s(e.limit)&&(r=r.slice(0,e.limit)),this._format(r)}_searchUsing(e){const s=this._indexedList,i=[],{includeMatches:r}=this.options;if(this.listIsStringArray)for(let t=0,c=s.length;t<c;t+=1){let c=s[t],{$:h,idx:o}=c;if(!n(h))continue;let a=e.searchIn(c);const{isMatch:l,score:u}=a;if(!l)continue;let d={score:u,value:h};r&&(d.indices=a.matchedIndices),i.push({item:h,idx:o,matches:[d]})}else{const c=this._keyStore.keys(),h=this._keyStore.count();for(let o=0,a=s.length;o<a;o+=1){let{$:a,idx:l}=s[o];if(!n(a))continue;let u=[];for(let s=0;s<h;s+=1){let i=c[s],h=a[i];if(n(h))if(t(h))for(let t=0,s=h.length;t<s;t+=1){let s=h[t],c=s.$,o=s.idx;if(!n(c))continue;let a=e.searchIn(s);const{isMatch:l,score:d}=a;if(!l)continue;let f={score:d,key:i,value:c,idx:o};r&&(f.indices=a.matchedIndices),u.push(f)}else{let t=h.$,s=e.searchIn(h);const{isMatch:n,score:c}=s;if(!n)continue;let o={score:c,key:i,value:t};r&&(o.indices=s.matchedIndices),u.push(o)}}u.length&&i.push({idx:l,item:a,matches:u})}}return i}_computeScore(t){for(let e=0,s=t.length;e<s;e+=1){const s=t[e],n=s.matches,i=n.length;let r=1;for(let t=0;t<i;t+=1){const e=n[t],s=e.key,i=this._keyStore.get(s,"weight"),c=i>-1?i:1,h=0===e.score&&i>-1?Number.EPSILON:e.score;r*=Math.pow(h,c)}s.score=r}}_sort(t){t.sort(this.options.sortFn)}_format(t){const e=[],{includeMatches:s,includeScore:n}=this.options;let i=[];s&&i.push(y),n&&i.push(x);for(let s=0,n=t.length;s<n;s+=1){const n=t[s],{idx:r}=n,c={item:this.list[r],refIndex:r};if(i.length)for(let t=0,e=i.length;t<e;t+=1)i[t](n,c);e.push(c)}return e}}!function(...t){_.push(...t)}(class{constructor(t,e=({isCaseSensitive:isCaseSensitive=r.isCaseSensitive,includeMatches:includeMatches=r.includeMatches,minMatchCharLength:minMatchCharLength=r.minMatchCharLength,findAllMatches:findAllMatches=r.findAllMatches,location:location=r.location,threshold:threshold=r.threshold,distance:distance=r.distance,includeMatches:includeMatches=r.includeMatches}={})){this.query=null,this.options=e,this.pattern=e.isCaseSensitive?t:t.toLowerCase(),this.query=function(t,e){return t.split("|").map(t=>{let s=t.trim().split(g).filter(t=>t&&!!t.trim()),n=[];for(let t=0,i=s.length;t<i;t+=1){const i=s[t];let r=!1,c=-1;for(;!r&&++c<f;){const t=d[c];let s=t.isLiteralMatch(i);s&&(n.push(new t(s,e)),r=!0)}if(!r)for(c=-1;++c<f;){const t=d[c];let s=t.isRegMatch(i);if(s){n.push(new t(s,e));break}}}return n})}(this.pattern,e)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};let s=t.$;const{includeMatches:n,isCaseSensitive:i}=this.options;s=i?s:s.toLowerCase();let r=0,c=[];for(let t=0,i=e.length;t<i;t+=1){const i=e[t];c.length=0,r=0;for(let t=0,e=i.length;t<e;t+=1){const e=i[t],{isMatch:h,matchedIndices:o}=e.search(s);if(!h){r=0,c.length=0;break}r+=1,n&&(e.constructor.type===u.type?c=[...c,...o]:c.push(o))}if(r){let t={isMatch:!0,score:0};return n&&(t.matchedIndices=c),t}}return{isMatch:!1,score:1}}},class{constructor(t,e=({threshold:threshold=r.threshold}={})){this.options=e,this.patternNgram=p(t,{sort:!0})}static condition(t){return t.length>32}searchIn(t){let e=t.ng;e||(e=p(t.$,{sort:!0}),t.ng=e);let s=function(t,e){let s=function(t,e){let s=[],n=0,i=0;for(;n<t.length&&i<e.length;){let r=t[n],c=e[i];r<c?(s.push(r),n+=1):c<r?(s.push(c),i+=1):(s.push(c),n+=1,i+=1)}for(;n<t.length;)s.push(t[n]),n+=1;for(;i<e.length;)s.push(e[i]),i+=1;return s}(t,e);return 1-function(t,e){let s=[],n=0,i=0;for(;n<t.length&&i<e.length;){let r=t[n],c=e[i];r==c?(s.push(r),n+=1,i+=1):r<c?n+=1:(r>c||(n+=1),i+=1)}return s}(t,e).length/s.length}(this.patternNgram,e);const n=s<this.options.threshold;return{score:n?s:1,isMatch:n}}}),S.version="5.2.0-alpha.2",S.createIndex=M,S.config=r;export default S;
/**
* Fuse.js v5.2.0-alpha.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v5.2.0-alpha.2 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -343,3 +343,3 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

var matchmask = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var minMatchCharLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var minMatchCharLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Config.minMatchCharLength;
var matchedIndices = [];

@@ -1514,2 +1514,5 @@ var start = -1;

var registeredSearchers = [];
function register() {
registeredSearchers.push.apply(registeredSearchers, arguments);
}

@@ -1790,7 +1793,2 @@ var Fuse = /*#__PURE__*/function () {

}
}], [{
key: "register",
value: function register() {
registeredSearchers.push.apply(registeredSearchers, arguments);
}
}]);

@@ -1801,4 +1799,4 @@

Fuse.register(ExtendedSearch, NGramSearch);
Fuse.version = '5.2.0-alpha.1';
register(ExtendedSearch, NGramSearch);
Fuse.version = '5.2.0-alpha.2';
Fuse.createIndex = createIndex;

@@ -1805,0 +1803,0 @@ Fuse.config = Config;

/**
* Fuse.js v5.2.0-alpha.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v5.2.0-alpha.2 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -9,2 +9,2 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

*/
var t,e;t=this,e=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function u(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(t){return function(){var e,n=s(t);if(h()){var r=s(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return u(this,e)}}function f(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var d=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},p=function(t){return"string"==typeof t},y=function(t){return"number"==typeof t},g=function(t){return null!=t};function m(t,e){var n=[],r=!1;return function t(e,i){if(i){var o=i.indexOf("."),a=i,s=null;-1!==o&&(a=i.slice(0,o),s=i.slice(o+1));var c=e[a];if(g(c))if(s||!p(c)&&!y(c))if(d(c)){r=!0;for(var h=0,u=c.length;h<u;h+=1)t(c[h],s)}else s&&t(c,s);else n.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(c))}else n.push(e)}(t,e),r?n:n[0]}var k=o({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(t,e){return t.score-e.score}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:m});function M(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.errors,r=void 0===n?0:n,i=e.currentLocation,o=void 0===i?0:i,a=e.expectedLocation,s=void 0===a?0:a,c=e.distance,h=void 0===c?k.distance:c,u=r/t.length,l=Math.abs(s-o);return h?u+l/h:l?1:u}function b(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=-1,i=-1,o=0,a=t.length;o<a;o+=1){var s=t[o];s&&-1===r?r=o:s||-1===r||((i=o-1)-r+1>=e&&n.push([r,i]),r=-1)}return t[o-1]&&o-r>=e&&n.push([r,o-1]),n}function x(t){for(var e={},n=t.length,r=0;r<n;r+=1)e[t.charAt(r)]=0;for(var i=0;i<n;i+=1)e[t.charAt(i)]|=1<<n-i-1;return e}var w=function(){function e(n){var r,i,o,a,s,c,h,u,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(i=(r={}).location,location=void 0===i?k.location:i,o=r.threshold,threshold=void 0===o?k.threshold:o,a=r.distance,distance=void 0===a?k.distance:a,s=r.includeMatches,includeMatches=void 0===s?k.includeMatches:s,c=r.findAllMatches,findAllMatches=void 0===c?k.findAllMatches:c,h=r.minMatchCharLength,minMatchCharLength=void 0===h?k.minMatchCharLength:h,u=r.isCaseSensitive,isCaseSensitive=void 0===u?k.isCaseSensitive:u,r);if(t(this,e),this.options=l,n.length>32)throw new Error("Pattern length exceeds max of ".concat(32,"."));this.pattern=this.options.isCaseSensitive?n:n.toLowerCase(),this.patternAlphabet=x(this.pattern)}return n(e,[{key:"searchIn",value:function(t){var e=t.$;return this.searchInString(e)}},{key:"searchInString",value:function(t){var e=this.options,n=e.isCaseSensitive,r=e.includeMatches;if(n||(t=t.toLowerCase()),this.pattern===t){var i={isMatch:!0,score:0};return r&&(i.matchedIndices=[[0,t.length-1]]),i}var o=this.options,a=o.location,s=o.distance,c=o.threshold,h=o.findAllMatches,u=o.minMatchCharLength;return function(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?k.location:i,a=r.distance,s=void 0===a?k.distance:a,c=r.threshold,h=void 0===c?k.threshold:c,u=r.findAllMatches,l=void 0===u?k.findAllMatches:u,f=r.minMatchCharLength,v=void 0===f?k.minMatchCharLength:f,d=r.includeMatches,p=void 0===d?k.includeMatches:d,y=e.length,g=t.length,m=Math.max(0,Math.min(o,g)),x=h,w=t.indexOf(e,m),S=[],_=0;_<g;_+=1)S[_]=0;if(-1!==w){var O=M(e,{errors:0,currentLocation:w,expectedLocation:m,distance:s});if(x=Math.min(O,x),-1!==(w=t.lastIndexOf(e,m+y))){var I=M(e,{errors:0,currentLocation:w,expectedLocation:m,distance:s});x=Math.min(I,x)}}w=-1;for(var C=[],L=1,A=y+g,$=1<<(y<=31?y-1:30),j=0;j<y;j+=1){for(var P=0,E=A;P<E;){var N=M(e,{errors:j,currentLocation:m+E,expectedLocation:m,distance:s});N<=x?P=E:A=E,E=Math.floor((A-P)/2+P)}A=E;var R=Math.max(1,m-E+1),F=l?g:Math.min(m+E,g)+y,D=Array(F+2);D[F+1]=(1<<j)-1;for(var W=F;W>=R;W-=1){var q=W-1,T=n[t.charAt(q)];if(T&&(S[q]=1),D[W]=(D[W+1]<<1|1)&T,0!==j&&(D[W]|=(C[W+1]|C[W])<<1|1|C[W+1]),D[W]&$&&(L=M(e,{errors:j,currentLocation:q,expectedLocation:m,distance:s}))<=x){if(x=L,(w=q)<=m)break;R=Math.max(1,2*m-w)}}var U=M(e,{errors:j+1,currentLocation:m,expectedLocation:m,distance:s});if(U>x)break;C=D}var z={isMatch:w>=0,score:L||.001};return p&&(z.matchedIndices=b(S,v)),z}(t,this.pattern,this.patternAlphabet,{location:a,distance:s,threshold:c,findAllMatches:h,minMatchCharLength:u,includeMatches:r})}}]),e}(),S=function(){function e(n){t(this,e),this.pattern=n}return n(e,[{key:"search",value:function(){}}],[{key:"isLiteralMatch",value:function(t){return _(t,this.literal)}},{key:"isRegMatch",value:function(t){return _(t,this.re)}}]),e}();function _(t,e){var n=t.match(e);return n?n[1]:null}var O=function(e){a(i,e);var r=l(i);function i(e){return t(this,i),r.call(this,e)}return n(i,[{key:"search",value:function(t){var e=t.indexOf(this.pattern),n=e>-1;return{isMatch:n,score:n?1:0,matchedIndices:[e,e+this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"literal",get:function(){return/^'"(.*)"$/}},{key:"re",get:function(){return/^'(.*)$/}}]),i}(S),I=function(e){a(i,e);var r=l(i);function i(e){return t(this,i),r.call(this,e)}return n(i,[{key:"search",value:function(t){var e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,t.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"literal",get:function(){return/^!"(.*)"$/}},{key:"re",get:function(){return/^!(.*)$/}}]),i}(S),C=function(e){a(i,e);var r=l(i);function i(e){return t(this,i),r.call(this,e)}return n(i,[{key:"search",value:function(t){var e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"literal",get:function(){return/^\^"(.*)"$/}},{key:"re",get:function(){return/^\^(.*)$/}}]),i}(S),L=function(e){a(i,e);var r=l(i);function i(e){return t(this,i),r.call(this,e)}return n(i,[{key:"search",value:function(t){var e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,t.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"literal",get:function(){return/^!\^"(.*)"$/}},{key:"re",get:function(){return/^!\^(.*)$/}}]),i}(S),A=function(e){a(i,e);var r=l(i);function i(e){return t(this,i),r.call(this,e)}return n(i,[{key:"search",value:function(t){var e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[t.length-this.pattern.length,t.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"literal",get:function(){return/^"(.*)"\$$/}},{key:"re",get:function(){return/^(.*)\$$/}}]),i}(S),$=function(e){a(i,e);var r=l(i);function i(e){return t(this,i),r.call(this,e)}return n(i,[{key:"search",value:function(t){var e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,t.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"literal",get:function(){return/^!"(.*)"\$$/}},{key:"re",get:function(){return/^!(.*)\$$/}}]),i}(S),j=function(e){a(i,e);var r=l(i);function i(e){var n,o,a,s,c,h,u,l,f,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(o=(n={}).location,location=void 0===o?k.location:o,a=n.threshold,threshold=void 0===a?k.threshold:a,s=n.distance,distance=void 0===s?k.distance:s,c=n.includeMatches,includeMatches=void 0===c?k.includeMatches:c,h=n.findAllMatches,findAllMatches=void 0===h?k.findAllMatches:h,u=n.minMatchCharLength,minMatchCharLength=void 0===u?k.minMatchCharLength:u,l=n.isCaseSensitive,isCaseSensitive=void 0===l?k.isCaseSensitive:l,n);return t(this,i),(f=r.call(this,e))._bitapSearch=new w(e,v),f}return n(i,[{key:"search",value:function(t){return this._bitapSearch.searchInString(t)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"literal",get:function(){return/^"(.*)"$/}},{key:"re",get:function(){return/^(.*)$/}}]),i}(S),P=[O,C,L,$,A,I,j],E=P.length,N=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function R(t,e){return t.split("|").map((function(t){for(var n=t.trim().split(N).filter((function(t){return t&&!!t.trim()})),r=[],i=0,o=n.length;i<o;i+=1){for(var a=n[i],s=!1,c=-1;!s&&++c<E;){var h=P[c],u=h.isLiteralMatch(a);u&&(r.push(new h(u,e)),s=!0)}if(!s)for(c=-1;++c<E;){var l=P[c],f=l.isRegMatch(a);if(f){r.push(new l(f,e));break}}}return r}))}var F=function(){function e(n){var r,i,o,a,s,c,h,u,l,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(i=(r={}).isCaseSensitive,isCaseSensitive=void 0===i?k.isCaseSensitive:i,o=r.includeMatches,includeMatches=void 0===o?k.includeMatches:o,a=r.minMatchCharLength,minMatchCharLength=void 0===a?k.minMatchCharLength:a,s=r.findAllMatches,findAllMatches=void 0===s?k.findAllMatches:s,c=r.location,location=void 0===c?k.location:c,h=r.threshold,threshold=void 0===h?k.threshold:h,u=r.distance,distance=void 0===u?k.distance:u,l=r.includeMatches,includeMatches=void 0===l?k.includeMatches:l,r);t(this,e),this.query=null,this.options=f,this.pattern=f.isCaseSensitive?n:n.toLowerCase(),this.query=R(this.pattern,f)}return n(e,[{key:"searchIn",value:function(t){var e=this.query;if(!e)return{isMatch:!1,score:1};var n=t.$,r=this.options,i=r.includeMatches;n=r.isCaseSensitive?n:n.toLowerCase();for(var o=0,a=[],s=0,c=e.length;s<c;s+=1){var h=e[s];a.length=0,o=0;for(var u=0,l=h.length;u<l;u+=1){var v=h[u],d=v.search(n),p=d.isMatch,y=d.matchedIndices;if(!p){o=0,a.length=0;break}o+=1,i&&(v.constructor.type===j.type?a=[].concat(f(a),f(y)):a.push(y))}if(o){var g={isMatch:!0,score:0};return i&&(g.matchedIndices=a),g}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(t,e){return e.useExtendedSearch}}]),e}();function D(t,e){var n=e.n,r=void 0===n?3:n,i=e.pad,o=void 0===i||i,a=e.sort,s=void 0!==a&&a,c=[];if(null==t)return c;t=t.toLowerCase(),o&&(t=" ".concat(t," "));var h=t.length-r+1;if(h<1)return c;for(;h--;)c[h]=t.substr(h,r);return s&&c.sort((function(t,e){return t==e?0:t<e?-1:1})),c}var W=function(){function e(n){var r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(i=(r={}).threshold,threshold=void 0===i?k.threshold:i,r);t(this,e),this.options=o,this.patternNgram=D(n,{sort:!0})}return n(e,[{key:"searchIn",value:function(t){var e=t.ng;e||(e=D(t.$,{sort:!0}),t.ng=e);var n,r,i,o=(n=this.patternNgram,i=function(t,e){for(var n=[],r=0,i=0;r<t.length&&i<e.length;){var o=t[r],a=e[i];o<a?(n.push(o),r+=1):a<o?(n.push(a),i+=1):(n.push(a),r+=1,i+=1)}for(;r<t.length;)n.push(t[r]),r+=1;for(;i<e.length;)n.push(e[i]),i+=1;return n}(n,r=e),1-function(t,e){for(var n=[],r=0,i=0;r<t.length&&i<e.length;){var o=t[r],a=e[i];o==a?(n.push(o),r+=1,i+=1):o<a?r+=1:(o>a||(r+=1),i+=1)}return n}(n,r).length/i.length),a=o<this.options.threshold;return{score:a?o:1,isMatch:a}}}],[{key:"condition",value:function(t){return t.length>32}}]),e}();function q(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?m:r,o=n.ngrams,a=void 0!==o&&o,s=[];if(p(e[0]))for(var c=0,h=e.length;c<h;c+=1){var u=e[c];if(g(u)){var l={$:u,idx:c};a&&(l.ng=D(u,{sort:!0})),s.push(l)}}else for(var f=t.length,v=0,y=e.length;v<y;v+=1){for(var k=e[v],M={idx:v,$:{}},b=0;b<f;b+=1){var x=t[b],w=i(k,x);if(g(w))if(d(w)){for(var S=[],_=[{arrayIndex:-1,value:w}];_.length;){var O=_.pop(),I=O.arrayIndex,C=O.value;if(g(C))if(p(C)){var L={$:C,idx:I};a&&(L.ng=D(C,{sort:!0})),S.push(L)}else if(d(C))for(var A=0,$=C.length;A<$;A+=1)_.push({arrayIndex:A,value:C[A]})}M.$[x]=S}else{var j={$:w};a&&(j.ng=D(w,{sort:!0})),M.$[x]=j}}s.push(M)}return s}var T=function(){function e(n){if(t(this,e),this._keys={},this._keyNames=[],this._length=n.length,n.length&&p(n[0]))for(var r=0;r<this._length;r+=1){var i=n[r];this._keys[i]={weight:1},this._keyNames.push(i)}else{for(var o=0,a=0;a<this._length;a+=1){var s=n[a];if(!Object.prototype.hasOwnProperty.call(s,"name"))throw new Error('Missing "name" property in key object');var c=s.name;if(this._keyNames.push(c),!Object.prototype.hasOwnProperty.call(s,"weight"))throw new Error('Missing "weight" property in key object');var h=s.weight;if(h<=0||h>=1)throw new Error('"weight" property in key must be in the range of (0, 1)');this._keys[c]={weight:h},o+=h}for(var u=0;u<this._length;u+=1){var l=this._keyNames[u],f=this._keys[l].weight;this._keys[l].weight=f/o}}}return n(e,[{key:"get",value:function(t,e){return this._keys[t]?this._keys[t][e]:-1}},{key:"keys",value:function(){return this._keyNames}},{key:"count",value:function(){return this._length}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function U(t,e){var n=t.matches;if(e.matches=[],g(n))for(var r=0,i=n.length;r<i;r+=1){var o=n[r];if(g(o.indices)&&0!==o.indices.length){var a={indices:o.indices,value:o.value};o.key&&(a.key=o.key),o.idx>-1&&(a.refIndex=o.idx),e.matches.push(a)}}}function z(t,e){e.score=t.score}var J=[],K=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t(this,e),this.options=o({},k,{},r),this._processKeys(this.options.keys),this.setCollection(n,i)}return n(e,[{key:"setCollection",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.list=t,this.listIsStringArray=p(t[0]),e?this.setIndex(e):this.setIndex(this._createIndex())}},{key:"setIndex",value:function(t){this._indexedList=t}},{key:"_processKeys",value:function(t){this._keyStore=new T(t)}},{key:"_createIndex",value:function(){return q(this._keyStore.keys(),this.list,{getFn:this.options.getFn})}},{key:"search",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{limit:!1},n=this.options.shouldSort,r=null,i=0,o=J.length;i<o;i+=1){var a=J[i];if(a.condition(t,this.options)){r=new a(t,this.options);break}}r||(r=new w(t,this.options));var s=this._searchUsing(r);return this._computeScore(s),n&&this._sort(s),e.limit&&y(e.limit)&&(s=s.slice(0,e.limit)),this._format(s)}},{key:"_searchUsing",value:function(t){var e=this._indexedList,n=[],r=this.options.includeMatches;if(this.listIsStringArray)for(var i=0,o=e.length;i<o;i+=1){var a=e[i],s=a.$,c=a.idx;if(g(s)){var h=t.searchIn(a),u=h.isMatch,l=h.score;if(u){var f={score:l,value:s};r&&(f.indices=h.matchedIndices),n.push({item:s,idx:c,matches:[f]})}}}else for(var v=this._keyStore.keys(),p=this._keyStore.count(),y=0,m=e.length;y<m;y+=1){var k=e[y],M=k.$,b=k.idx;if(g(M)){for(var x=[],w=0;w<p;w+=1){var S=v[w],_=M[S];if(g(_))if(d(_))for(var O=0,I=_.length;O<I;O+=1){var C=_[O],L=C.$,A=C.idx;if(g(L)){var $=t.searchIn(C),j=$.isMatch,P=$.score;if(j){var E={score:P,key:S,value:L,idx:A};r&&(E.indices=$.matchedIndices),x.push(E)}}}else{var N=_.$,R=t.searchIn(_),F=R.isMatch,D=R.score;if(!F)continue;var W={score:D,key:S,value:N};r&&(W.indices=R.matchedIndices),x.push(W)}}x.length&&n.push({idx:b,item:M,matches:x})}}return n}},{key:"_computeScore",value:function(t){for(var e=0,n=t.length;e<n;e+=1){for(var r=t[e],i=r.matches,o=i.length,a=1,s=0;s<o;s+=1){var c=i[s],h=c.key,u=this._keyStore.get(h,"weight"),l=u>-1?u:1,f=0===c.score&&u>-1?Number.EPSILON:c.score;a*=Math.pow(f,l)}r.score=a}}},{key:"_sort",value:function(t){t.sort(this.options.sortFn)}},{key:"_format",value:function(t){var e=[],n=this.options,r=n.includeMatches,i=n.includeScore,o=[];r&&o.push(U),i&&o.push(z);for(var a=0,s=t.length;a<s;a+=1){var c=t[a],h=c.idx,u={item:this.list[h],refIndex:h};if(o.length)for(var l=0,f=o.length;l<f;l+=1)o[l](c,u);e.push(u)}return e}}],[{key:"register",value:function(){J.push.apply(J,arguments)}}]),e}();return K.register(F,W),K.version="5.2.0-alpha.1",K.createIndex=q,K.config=k,K},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Fuse=e();
var t,e;t=this,e=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function u(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(t){return function(){var e,n=s(t);if(h()){var r=s(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return u(this,e)}}function f(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var d=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},p=function(t){return"string"==typeof t},y=function(t){return"number"==typeof t},g=function(t){return null!=t};function m(t,e){var n=[],r=!1;return function t(e,i){if(i){var o=i.indexOf("."),a=i,s=null;-1!==o&&(a=i.slice(0,o),s=i.slice(o+1));var c=e[a];if(g(c))if(s||!p(c)&&!y(c))if(d(c)){r=!0;for(var h=0,u=c.length;h<u;h+=1)t(c[h],s)}else s&&t(c,s);else n.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(c))}else n.push(e)}(t,e),r?n:n[0]}var k=o({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(t,e){return t.score-e.score}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:m});function M(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.errors,r=void 0===n?0:n,i=e.currentLocation,o=void 0===i?0:i,a=e.expectedLocation,s=void 0===a?0:a,c=e.distance,h=void 0===c?k.distance:c,u=r/t.length,l=Math.abs(s-o);return h?u+l/h:l?1:u}function b(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k.minMatchCharLength,n=[],r=-1,i=-1,o=0,a=t.length;o<a;o+=1){var s=t[o];s&&-1===r?r=o:s||-1===r||((i=o-1)-r+1>=e&&n.push([r,i]),r=-1)}return t[o-1]&&o-r>=e&&n.push([r,o-1]),n}function x(t){for(var e={},n=t.length,r=0;r<n;r+=1)e[t.charAt(r)]=0;for(var i=0;i<n;i+=1)e[t.charAt(i)]|=1<<n-i-1;return e}var w=function(){function e(n){var r,i,o,a,s,c,h,u,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(i=(r={}).location,location=void 0===i?k.location:i,o=r.threshold,threshold=void 0===o?k.threshold:o,a=r.distance,distance=void 0===a?k.distance:a,s=r.includeMatches,includeMatches=void 0===s?k.includeMatches:s,c=r.findAllMatches,findAllMatches=void 0===c?k.findAllMatches:c,h=r.minMatchCharLength,minMatchCharLength=void 0===h?k.minMatchCharLength:h,u=r.isCaseSensitive,isCaseSensitive=void 0===u?k.isCaseSensitive:u,r);if(t(this,e),this.options=l,n.length>32)throw new Error("Pattern length exceeds max of ".concat(32,"."));this.pattern=this.options.isCaseSensitive?n:n.toLowerCase(),this.patternAlphabet=x(this.pattern)}return n(e,[{key:"searchIn",value:function(t){var e=t.$;return this.searchInString(e)}},{key:"searchInString",value:function(t){var e=this.options,n=e.isCaseSensitive,r=e.includeMatches;if(n||(t=t.toLowerCase()),this.pattern===t){var i={isMatch:!0,score:0};return r&&(i.matchedIndices=[[0,t.length-1]]),i}var o=this.options,a=o.location,s=o.distance,c=o.threshold,h=o.findAllMatches,u=o.minMatchCharLength;return function(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?k.location:i,a=r.distance,s=void 0===a?k.distance:a,c=r.threshold,h=void 0===c?k.threshold:c,u=r.findAllMatches,l=void 0===u?k.findAllMatches:u,f=r.minMatchCharLength,v=void 0===f?k.minMatchCharLength:f,d=r.includeMatches,p=void 0===d?k.includeMatches:d,y=e.length,g=t.length,m=Math.max(0,Math.min(o,g)),x=h,w=t.indexOf(e,m),S=[],_=0;_<g;_+=1)S[_]=0;if(-1!==w){var O=M(e,{errors:0,currentLocation:w,expectedLocation:m,distance:s});if(x=Math.min(O,x),-1!==(w=t.lastIndexOf(e,m+y))){var I=M(e,{errors:0,currentLocation:w,expectedLocation:m,distance:s});x=Math.min(I,x)}}w=-1;for(var C=[],L=1,A=y+g,$=1<<(y<=31?y-1:30),j=0;j<y;j+=1){for(var P=0,E=A;P<E;){var N=M(e,{errors:j,currentLocation:m+E,expectedLocation:m,distance:s});N<=x?P=E:A=E,E=Math.floor((A-P)/2+P)}A=E;var R=Math.max(1,m-E+1),F=l?g:Math.min(m+E,g)+y,D=Array(F+2);D[F+1]=(1<<j)-1;for(var W=F;W>=R;W-=1){var q=W-1,T=n[t.charAt(q)];if(T&&(S[q]=1),D[W]=(D[W+1]<<1|1)&T,0!==j&&(D[W]|=(C[W+1]|C[W])<<1|1|C[W+1]),D[W]&$&&(L=M(e,{errors:j,currentLocation:q,expectedLocation:m,distance:s}))<=x){if(x=L,(w=q)<=m)break;R=Math.max(1,2*m-w)}}var U=M(e,{errors:j+1,currentLocation:m,expectedLocation:m,distance:s});if(U>x)break;C=D}var z={isMatch:w>=0,score:L||.001};return p&&(z.matchedIndices=b(S,v)),z}(t,this.pattern,this.patternAlphabet,{location:a,distance:s,threshold:c,findAllMatches:h,minMatchCharLength:u,includeMatches:r})}}]),e}(),S=function(){function e(n){t(this,e),this.pattern=n}return n(e,[{key:"search",value:function(){}}],[{key:"isLiteralMatch",value:function(t){return _(t,this.literal)}},{key:"isRegMatch",value:function(t){return _(t,this.re)}}]),e}();function _(t,e){var n=t.match(e);return n?n[1]:null}var O=function(e){a(i,e);var r=l(i);function i(e){return t(this,i),r.call(this,e)}return n(i,[{key:"search",value:function(t){var e=t.indexOf(this.pattern),n=e>-1;return{isMatch:n,score:n?1:0,matchedIndices:[e,e+this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"literal",get:function(){return/^'"(.*)"$/}},{key:"re",get:function(){return/^'(.*)$/}}]),i}(S),I=function(e){a(i,e);var r=l(i);function i(e){return t(this,i),r.call(this,e)}return n(i,[{key:"search",value:function(t){var e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,t.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"literal",get:function(){return/^!"(.*)"$/}},{key:"re",get:function(){return/^!(.*)$/}}]),i}(S),C=function(e){a(i,e);var r=l(i);function i(e){return t(this,i),r.call(this,e)}return n(i,[{key:"search",value:function(t){var e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"literal",get:function(){return/^\^"(.*)"$/}},{key:"re",get:function(){return/^\^(.*)$/}}]),i}(S),L=function(e){a(i,e);var r=l(i);function i(e){return t(this,i),r.call(this,e)}return n(i,[{key:"search",value:function(t){var e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,t.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"literal",get:function(){return/^!\^"(.*)"$/}},{key:"re",get:function(){return/^!\^(.*)$/}}]),i}(S),A=function(e){a(i,e);var r=l(i);function i(e){return t(this,i),r.call(this,e)}return n(i,[{key:"search",value:function(t){var e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[t.length-this.pattern.length,t.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"literal",get:function(){return/^"(.*)"\$$/}},{key:"re",get:function(){return/^(.*)\$$/}}]),i}(S),$=function(e){a(i,e);var r=l(i);function i(e){return t(this,i),r.call(this,e)}return n(i,[{key:"search",value:function(t){var e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,matchedIndices:[0,t.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"literal",get:function(){return/^!"(.*)"\$$/}},{key:"re",get:function(){return/^!(.*)\$$/}}]),i}(S),j=function(e){a(i,e);var r=l(i);function i(e){var n,o,a,s,c,h,u,l,f,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(o=(n={}).location,location=void 0===o?k.location:o,a=n.threshold,threshold=void 0===a?k.threshold:a,s=n.distance,distance=void 0===s?k.distance:s,c=n.includeMatches,includeMatches=void 0===c?k.includeMatches:c,h=n.findAllMatches,findAllMatches=void 0===h?k.findAllMatches:h,u=n.minMatchCharLength,minMatchCharLength=void 0===u?k.minMatchCharLength:u,l=n.isCaseSensitive,isCaseSensitive=void 0===l?k.isCaseSensitive:l,n);return t(this,i),(f=r.call(this,e))._bitapSearch=new w(e,v),f}return n(i,[{key:"search",value:function(t){return this._bitapSearch.searchInString(t)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"literal",get:function(){return/^"(.*)"$/}},{key:"re",get:function(){return/^(.*)$/}}]),i}(S),P=[O,C,L,$,A,I,j],E=P.length,N=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function R(t,e){return t.split("|").map((function(t){for(var n=t.trim().split(N).filter((function(t){return t&&!!t.trim()})),r=[],i=0,o=n.length;i<o;i+=1){for(var a=n[i],s=!1,c=-1;!s&&++c<E;){var h=P[c],u=h.isLiteralMatch(a);u&&(r.push(new h(u,e)),s=!0)}if(!s)for(c=-1;++c<E;){var l=P[c],f=l.isRegMatch(a);if(f){r.push(new l(f,e));break}}}return r}))}var F=function(){function e(n){var r,i,o,a,s,c,h,u,l,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(i=(r={}).isCaseSensitive,isCaseSensitive=void 0===i?k.isCaseSensitive:i,o=r.includeMatches,includeMatches=void 0===o?k.includeMatches:o,a=r.minMatchCharLength,minMatchCharLength=void 0===a?k.minMatchCharLength:a,s=r.findAllMatches,findAllMatches=void 0===s?k.findAllMatches:s,c=r.location,location=void 0===c?k.location:c,h=r.threshold,threshold=void 0===h?k.threshold:h,u=r.distance,distance=void 0===u?k.distance:u,l=r.includeMatches,includeMatches=void 0===l?k.includeMatches:l,r);t(this,e),this.query=null,this.options=f,this.pattern=f.isCaseSensitive?n:n.toLowerCase(),this.query=R(this.pattern,f)}return n(e,[{key:"searchIn",value:function(t){var e=this.query;if(!e)return{isMatch:!1,score:1};var n=t.$,r=this.options,i=r.includeMatches;n=r.isCaseSensitive?n:n.toLowerCase();for(var o=0,a=[],s=0,c=e.length;s<c;s+=1){var h=e[s];a.length=0,o=0;for(var u=0,l=h.length;u<l;u+=1){var v=h[u],d=v.search(n),p=d.isMatch,y=d.matchedIndices;if(!p){o=0,a.length=0;break}o+=1,i&&(v.constructor.type===j.type?a=[].concat(f(a),f(y)):a.push(y))}if(o){var g={isMatch:!0,score:0};return i&&(g.matchedIndices=a),g}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(t,e){return e.useExtendedSearch}}]),e}();function D(t,e){var n=e.n,r=void 0===n?3:n,i=e.pad,o=void 0===i||i,a=e.sort,s=void 0!==a&&a,c=[];if(null==t)return c;t=t.toLowerCase(),o&&(t=" ".concat(t," "));var h=t.length-r+1;if(h<1)return c;for(;h--;)c[h]=t.substr(h,r);return s&&c.sort((function(t,e){return t==e?0:t<e?-1:1})),c}var W=function(){function e(n){var r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(i=(r={}).threshold,threshold=void 0===i?k.threshold:i,r);t(this,e),this.options=o,this.patternNgram=D(n,{sort:!0})}return n(e,[{key:"searchIn",value:function(t){var e=t.ng;e||(e=D(t.$,{sort:!0}),t.ng=e);var n,r,i,o=(n=this.patternNgram,i=function(t,e){for(var n=[],r=0,i=0;r<t.length&&i<e.length;){var o=t[r],a=e[i];o<a?(n.push(o),r+=1):a<o?(n.push(a),i+=1):(n.push(a),r+=1,i+=1)}for(;r<t.length;)n.push(t[r]),r+=1;for(;i<e.length;)n.push(e[i]),i+=1;return n}(n,r=e),1-function(t,e){for(var n=[],r=0,i=0;r<t.length&&i<e.length;){var o=t[r],a=e[i];o==a?(n.push(o),r+=1,i+=1):o<a?r+=1:(o>a||(r+=1),i+=1)}return n}(n,r).length/i.length),a=o<this.options.threshold;return{score:a?o:1,isMatch:a}}}],[{key:"condition",value:function(t){return t.length>32}}]),e}();function q(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?m:r,o=n.ngrams,a=void 0!==o&&o,s=[];if(p(e[0]))for(var c=0,h=e.length;c<h;c+=1){var u=e[c];if(g(u)){var l={$:u,idx:c};a&&(l.ng=D(u,{sort:!0})),s.push(l)}}else for(var f=t.length,v=0,y=e.length;v<y;v+=1){for(var k=e[v],M={idx:v,$:{}},b=0;b<f;b+=1){var x=t[b],w=i(k,x);if(g(w))if(d(w)){for(var S=[],_=[{arrayIndex:-1,value:w}];_.length;){var O=_.pop(),I=O.arrayIndex,C=O.value;if(g(C))if(p(C)){var L={$:C,idx:I};a&&(L.ng=D(C,{sort:!0})),S.push(L)}else if(d(C))for(var A=0,$=C.length;A<$;A+=1)_.push({arrayIndex:A,value:C[A]})}M.$[x]=S}else{var j={$:w};a&&(j.ng=D(w,{sort:!0})),M.$[x]=j}}s.push(M)}return s}var T=function(){function e(n){if(t(this,e),this._keys={},this._keyNames=[],this._length=n.length,n.length&&p(n[0]))for(var r=0;r<this._length;r+=1){var i=n[r];this._keys[i]={weight:1},this._keyNames.push(i)}else{for(var o=0,a=0;a<this._length;a+=1){var s=n[a];if(!Object.prototype.hasOwnProperty.call(s,"name"))throw new Error('Missing "name" property in key object');var c=s.name;if(this._keyNames.push(c),!Object.prototype.hasOwnProperty.call(s,"weight"))throw new Error('Missing "weight" property in key object');var h=s.weight;if(h<=0||h>=1)throw new Error('"weight" property in key must be in the range of (0, 1)');this._keys[c]={weight:h},o+=h}for(var u=0;u<this._length;u+=1){var l=this._keyNames[u],f=this._keys[l].weight;this._keys[l].weight=f/o}}}return n(e,[{key:"get",value:function(t,e){return this._keys[t]?this._keys[t][e]:-1}},{key:"keys",value:function(){return this._keyNames}},{key:"count",value:function(){return this._length}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function U(t,e){var n=t.matches;if(e.matches=[],g(n))for(var r=0,i=n.length;r<i;r+=1){var o=n[r];if(g(o.indices)&&0!==o.indices.length){var a={indices:o.indices,value:o.value};o.key&&(a.key=o.key),o.idx>-1&&(a.refIndex=o.idx),e.matches.push(a)}}}function z(t,e){e.score=t.score}var J=[],K=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t(this,e),this.options=o({},k,{},r),this._processKeys(this.options.keys),this.setCollection(n,i)}return n(e,[{key:"setCollection",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.list=t,this.listIsStringArray=p(t[0]),e?this.setIndex(e):this.setIndex(this._createIndex())}},{key:"setIndex",value:function(t){this._indexedList=t}},{key:"_processKeys",value:function(t){this._keyStore=new T(t)}},{key:"_createIndex",value:function(){return q(this._keyStore.keys(),this.list,{getFn:this.options.getFn})}},{key:"search",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{limit:!1},n=this.options.shouldSort,r=null,i=0,o=J.length;i<o;i+=1){var a=J[i];if(a.condition(t,this.options)){r=new a(t,this.options);break}}r||(r=new w(t,this.options));var s=this._searchUsing(r);return this._computeScore(s),n&&this._sort(s),e.limit&&y(e.limit)&&(s=s.slice(0,e.limit)),this._format(s)}},{key:"_searchUsing",value:function(t){var e=this._indexedList,n=[],r=this.options.includeMatches;if(this.listIsStringArray)for(var i=0,o=e.length;i<o;i+=1){var a=e[i],s=a.$,c=a.idx;if(g(s)){var h=t.searchIn(a),u=h.isMatch,l=h.score;if(u){var f={score:l,value:s};r&&(f.indices=h.matchedIndices),n.push({item:s,idx:c,matches:[f]})}}}else for(var v=this._keyStore.keys(),p=this._keyStore.count(),y=0,m=e.length;y<m;y+=1){var k=e[y],M=k.$,b=k.idx;if(g(M)){for(var x=[],w=0;w<p;w+=1){var S=v[w],_=M[S];if(g(_))if(d(_))for(var O=0,I=_.length;O<I;O+=1){var C=_[O],L=C.$,A=C.idx;if(g(L)){var $=t.searchIn(C),j=$.isMatch,P=$.score;if(j){var E={score:P,key:S,value:L,idx:A};r&&(E.indices=$.matchedIndices),x.push(E)}}}else{var N=_.$,R=t.searchIn(_),F=R.isMatch,D=R.score;if(!F)continue;var W={score:D,key:S,value:N};r&&(W.indices=R.matchedIndices),x.push(W)}}x.length&&n.push({idx:b,item:M,matches:x})}}return n}},{key:"_computeScore",value:function(t){for(var e=0,n=t.length;e<n;e+=1){for(var r=t[e],i=r.matches,o=i.length,a=1,s=0;s<o;s+=1){var c=i[s],h=c.key,u=this._keyStore.get(h,"weight"),l=u>-1?u:1,f=0===c.score&&u>-1?Number.EPSILON:c.score;a*=Math.pow(f,l)}r.score=a}}},{key:"_sort",value:function(t){t.sort(this.options.sortFn)}},{key:"_format",value:function(t){var e=[],n=this.options,r=n.includeMatches,i=n.includeScore,o=[];r&&o.push(U),i&&o.push(z);for(var a=0,s=t.length;a<s;a+=1){var c=t[a],h=c.idx,u={item:this.list[h],refIndex:h};if(o.length)for(var l=0,f=o.length;l<f;l+=1)o[l](c,u);e.push(u)}return e}}]),e}();return function(){J.push.apply(J,arguments)}(F,W),K.version="5.2.0-alpha.2",K.createIndex=q,K.config=k,K},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Fuse=e();

@@ -16,3 +16,3 @@ {

],
"version": "5.2.0-alpha.1",
"version": "5.2.0-alpha.2",
"description": "Lightweight fuzzy-search",

@@ -19,0 +19,0 @@ "license": "Apache-2.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc