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 6.4.6 to 6.5.0

12

CHANGELOG.md

@@ -5,2 +5,14 @@ # Changelog

## [6.5.0](https://github.com/krisk/Fuse/compare/v6.4.6...v6.5.0) (2021-12-22)
### Features
* **scoring:** field length norm weight ([a9e0080](https://github.com/krisk/Fuse/commit/a9e00804497a1bfd7a94040520417825c085c945))
### Bug Fixes
* **typescript:** add config declaration to types ([2f4de0c](https://github.com/krisk/Fuse/commit/2f4de0c5ce061808f460de7f399b56a06539d4d5))
### [6.4.6](https://github.com/krisk/Fuse/compare/v6.4.5...v6.4.6) (2021-01-05)

@@ -7,0 +19,0 @@

166

dist/fuse.basic.common.js
/**
* Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.5.0 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -12,18 +12,38 @@ * Copyright (c) 2021 Kiro Risk (http://kiro.me)

function _typeof(obj) {
"@babel/helpers - typeof";
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
enumerableOnly && (symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
})), keys.push.apply(keys, symbols);
}
return _typeof(obj);
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
_defineProperty(target, key, source[key]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
return target;
}
function _typeof(obj) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
}
function _classCallCheck(instance, Constructor) {

@@ -48,2 +68,5 @@ if (!(instance instanceof Constructor)) {

if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;

@@ -67,36 +90,2 @@ }

function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function _toConsumableArray(arr) {

@@ -111,3 +100,3 @@ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();

function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}

@@ -381,5 +370,7 @@

// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
ignoreFieldNorm: false
ignoreFieldNorm: false,
// The weight to determine how much field length norm effects scoring.
fieldNormWeight: 1
};
var Config = _objectSpread2({}, BasicOptions, {}, MatchOptions, {}, FuzzyOptions, {}, AdvancedOptions);
var Config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, BasicOptions), MatchOptions), FuzzyOptions), AdvancedOptions);

@@ -390,3 +381,4 @@ var SPACE = /[^ ]+/g; // Field-length norm: the shorter the field, the higher the weight.

function norm() {
var mantissa = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3;
var weight = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
var mantissa = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
var cache = new Map();

@@ -400,6 +392,7 @@ var m = Math.pow(10, mantissa);

return cache.get(numTokens);
}
} // Default function is 1/sqrt(x), weight makes that variable
var norm = 1 / Math.sqrt(numTokens); // In place of `toFixed(mantissa)`, for faster computation
var norm = 1 / Math.pow(numTokens, 0.5 * weight); // In place of `toFixed(mantissa)`, for faster computation
var n = parseFloat(Math.round(norm * m) / m);

@@ -419,7 +412,9 @@ cache.set(numTokens, n);

_ref$getFn = _ref.getFn,
getFn = _ref$getFn === void 0 ? Config.getFn : _ref$getFn;
getFn = _ref$getFn === void 0 ? Config.getFn : _ref$getFn,
_ref$fieldNormWeight = _ref.fieldNormWeight,
fieldNormWeight = _ref$fieldNormWeight === void 0 ? Config.fieldNormWeight : _ref$fieldNormWeight;
_classCallCheck(this, FuseIndex);
this.norm = norm(3);
this.norm = norm(fieldNormWeight, 3);
this.getFn = getFn;

@@ -573,3 +568,3 @@ this.isCreated = false;

});
}
} else ;
}

@@ -604,6 +599,9 @@

_ref2$getFn = _ref2.getFn,
getFn = _ref2$getFn === void 0 ? Config.getFn : _ref2$getFn;
getFn = _ref2$getFn === void 0 ? Config.getFn : _ref2$getFn,
_ref2$fieldNormWeight = _ref2.fieldNormWeight,
fieldNormWeight = _ref2$fieldNormWeight === void 0 ? Config.fieldNormWeight : _ref2$fieldNormWeight;
var myIndex = new FuseIndex({
getFn: getFn
getFn: getFn,
fieldNormWeight: fieldNormWeight
});

@@ -618,3 +616,5 @@ myIndex.setKeys(keys.map(createKey));

_ref3$getFn = _ref3.getFn,
getFn = _ref3$getFn === void 0 ? Config.getFn : _ref3$getFn;
getFn = _ref3$getFn === void 0 ? Config.getFn : _ref3$getFn,
_ref3$fieldNormWeight = _ref3.fieldNormWeight,
fieldNormWeight = _ref3$fieldNormWeight === void 0 ? Config.fieldNormWeight : _ref3$fieldNormWeight;

@@ -624,3 +624,4 @@ var keys = data.keys,

var myIndex = new FuseIndex({
getFn: getFn
getFn: getFn,
fieldNormWeight: fieldNormWeight
});

@@ -632,3 +633,3 @@ myIndex.setKeys(keys);

function computeScore(pattern) {
function computeScore$1(pattern) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},

@@ -735,3 +736,3 @@ _ref$errors = _ref.errors,

while ((index = text.indexOf(pattern, bestLocation)) > -1) {
var score = computeScore(pattern, {
var score = computeScore$1(pattern, {
currentLocation: index,

@@ -770,3 +771,3 @@ expectedLocation: expectedLocation,

while (binMin < binMid) {
var _score2 = computeScore(pattern, {
var _score2 = computeScore$1(pattern, {
errors: _i,

@@ -813,3 +814,3 @@ currentLocation: expectedLocation + binMid,

if (bitArr[j] & mask) {
finalScore = computeScore(pattern, {
finalScore = computeScore$1(pattern, {
errors: _i,

@@ -839,3 +840,3 @@ currentLocation: currentLocation,

var _score = computeScore(pattern, {
var _score = computeScore$1(pattern, {
errors: _i + 1,

@@ -878,4 +879,5 @@ currentLocation: expectedLocation,

for (var i = 0, len = pattern.length; i < len; i += 1) {
var char = pattern.charAt(i);
mask[char] = (mask[char] || 0) | 1 << len - i - 1;
var _char = pattern.charAt(i);
mask[_char] = (mask[_char] || 0) | 1 << len - i - 1;
}

@@ -1134,3 +1136,3 @@

function computeScore$1(results, _ref) {
function computeScore(results, _ref) {
var _ref$ignoreFieldNorm = _ref.ignoreFieldNorm,

@@ -1214,3 +1216,3 @@ ignoreFieldNorm = _ref$ignoreFieldNorm === void 0 ? Config.ignoreFieldNorm : _ref$ignoreFieldNorm;

var Fuse = /*#__PURE__*/function () {
var Fuse$1 = /*#__PURE__*/function () {
function Fuse(docs) {

@@ -1222,3 +1224,3 @@ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

this.options = _objectSpread2({}, Config, {}, options);
this.options = _objectSpread2(_objectSpread2({}, Config), options);

@@ -1243,3 +1245,4 @@ if (this.options.useExtendedSearch && !false) {

this._myIndex = index || createIndex(this.options.keys, this._docs, {
getFn: this.options.getFn
getFn: this.options.getFn,
fieldNormWeight: this.options.fieldNormWeight
});

@@ -1261,7 +1264,6 @@ }

value: function remove() {
var predicate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {
return (
/* doc, idx */
false
);
var predicate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function
/* doc, idx */
() {
return false;
};

@@ -1309,3 +1311,3 @@ var results = [];

var results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
computeScore$1(results, {
computeScore(results, {
ignoreFieldNorm: ignoreFieldNorm

@@ -1476,11 +1478,13 @@ });

Fuse.version = '6.4.6';
Fuse.createIndex = createIndex;
Fuse.parseIndex = parseIndex;
Fuse.config = Config;
Fuse$1.version = '6.5.0';
Fuse$1.createIndex = createIndex;
Fuse$1.parseIndex = parseIndex;
Fuse$1.config = Config;
{
Fuse.parseQuery = parse;
Fuse$1.parseQuery = parse;
}
var Fuse = Fuse$1;
module.exports = Fuse;
/**
* Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.5.0 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -269,3 +269,5 @@ * Copyright (c) 2021 Kiro Risk (http://kiro.me)

// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
ignoreFieldNorm: false
ignoreFieldNorm: false,
// The weight to determine how much field length norm effects scoring.
fieldNormWeight: 1
};

@@ -284,3 +286,3 @@

// Set to 3 decimals to reduce index size.
function norm(mantissa = 3) {
function norm(weight = 1, mantissa = 3) {
const cache = new Map();

@@ -297,3 +299,4 @@ const m = Math.pow(10, mantissa);

const norm = 1 / Math.sqrt(numTokens);
// Default function is 1/sqrt(x), weight makes that variable
const norm = 1 / Math.pow(numTokens, 0.5 * weight);

@@ -314,4 +317,4 @@ // In place of `toFixed(mantissa)`, for faster computation

class FuseIndex {
constructor({ getFn = Config.getFn } = {}) {
this.norm = norm(3);
constructor({ getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}) {
this.norm = norm(fieldNormWeight, 3);
this.getFn = getFn;

@@ -432,3 +435,3 @@ this.isCreated = false;

});
}
} else ;
}

@@ -456,4 +459,4 @@ record.$[keyIndex] = subRecords;

function createIndex(keys, docs, { getFn = Config.getFn } = {}) {
const myIndex = new FuseIndex({ getFn });
function createIndex(keys, docs, { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}) {
const myIndex = new FuseIndex({ getFn, fieldNormWeight });
myIndex.setKeys(keys.map(createKey));

@@ -465,5 +468,5 @@ myIndex.setSources(docs);

function parseIndex(data, { getFn = Config.getFn } = {}) {
function parseIndex(data, { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}) {
const { keys, records } = data;
const myIndex = new FuseIndex({ getFn });
const myIndex = new FuseIndex({ getFn, fieldNormWeight });
myIndex.setKeys(keys);

@@ -474,3 +477,3 @@ myIndex.setIndexRecords(records);

function computeScore(
function computeScore$1(
pattern,

@@ -572,3 +575,3 @@ {

while ((index = text.indexOf(pattern, bestLocation)) > -1) {
let score = computeScore(pattern, {
let score = computeScore$1(pattern, {
currentLocation: index,

@@ -609,3 +612,3 @@ expectedLocation,

while (binMin < binMid) {
const score = computeScore(pattern, {
const score = computeScore$1(pattern, {
errors: i,

@@ -659,3 +662,3 @@ currentLocation: expectedLocation + binMid,

if (bitArr[j] & mask) {
finalScore = computeScore(pattern, {
finalScore = computeScore$1(pattern, {
errors: i,

@@ -687,3 +690,3 @@ currentLocation,

// No hope for a (better) match at greater error levels.
const score = computeScore(pattern, {
const score = computeScore$1(pattern, {
errors: i + 1,

@@ -960,3 +963,3 @@ currentLocation: expectedLocation,

// Practical scoring function
function computeScore$1(
function computeScore(
results,

@@ -1074,3 +1077,4 @@ { ignoreFieldNorm = Config.ignoreFieldNorm }

createIndex(this.options.keys, this._docs, {
getFn: this.options.getFn
getFn: this.options.getFn,
fieldNormWeight: this.options.fieldNormWeight
});

@@ -1129,3 +1133,3 @@ }

computeScore$1(results, { ignoreFieldNorm });
computeScore(results, { ignoreFieldNorm });

@@ -1252,3 +1256,3 @@ if (shouldSort) {

Fuse.version = '6.4.6';
Fuse.version = '6.5.0';
Fuse.createIndex = createIndex;

@@ -1262,2 +1266,2 @@ Fuse.parseIndex = parseIndex;

export default Fuse;
export { Fuse as default };
/**
* Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.5.0 - Lightweight fuzzy-search (http://fusejs.io)
*

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

*/
function t(t){return Array.isArray?Array.isArray(t):"[object Array]"===o(t)}function e(t){return"string"==typeof t}function n(t){return"number"==typeof t}function s(t){return!0===t||!1===t||function(t){return function(t){return"object"==typeof t}(t)&&null!==t}(t)&&"[object Boolean]"==o(t)}function i(t){return null!=t}function r(t){return!t.trim().length}function o(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const c=Object.prototype.hasOwnProperty;class h{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(t=>{let n=a(t);e+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight}),this._keys.forEach(t=>{t.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function a(n){let s=null,i=null,r=null,o=1;if(e(n)||t(n))r=n,s=l(n),i=d(n);else{if(!c.call(n,"name"))throw new Error((t=>`Missing ${t} property in key`)("name"));const t=n.name;if(r=t,c.call(n,"weight")&&(o=n.weight,o<=0))throw new Error((t=>`Property 'weight' in key '${t}' must be a positive integer`)(t));s=l(t),i=d(t)}return{path:s,id:i,weight:o,src:r}}function l(e){return t(e)?e:e.split(".")}function d(e){return t(e)?e.join("."):e}var u={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(r,o){let c=[],h=!1;const a=(r,o,l)=>{if(i(r))if(o[l]){const d=r[o[l]];if(!i(d))return;if(l===o.length-1&&(e(d)||n(d)||s(d)))c.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(d));else if(t(d)){h=!0;for(let t=0,e=d.length;t<e;t+=1)a(d[t],o,l+1)}else o.length&&a(d,o,l+1)}else c.push(r)};return a(r,e(o)?o.split("."):o,0),h?c:c[0]},ignoreLocation:!1,ignoreFieldNorm:!1}};const f=/[^ ]+/g;class g{constructor({getFn:t=u.getFn}={}){this.norm=function(t=3){const e=new Map,n=Math.pow(10,t);return{get(t){const s=t.match(f).length;if(e.has(s))return e.get(s);const i=1/Math.sqrt(s),r=parseFloat(Math.round(i*n)/n);return e.set(s,r),r},clear(){e.clear()}}}(3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((t,e)=>{this._keysMap[t.id]=e})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,e(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const n=this.size();e(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let e=t,n=this.size();e<n;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!i(t)||r(t))return;let n={v:t,i:e,n:this.norm.get(t)};this.records.push(n)}_addObject(n,s){let o={i:s,$:{}};this.keys.forEach((s,c)=>{let h=this.getFn(n,s.path);if(i(h))if(t(h)){let n=[];const s=[{nestedArrIndex:-1,value:h}];for(;s.length;){const{nestedArrIndex:o,value:c}=s.pop();if(i(c))if(e(c)&&!r(c)){let t={v:c,i:o,n:this.norm.get(c)};n.push(t)}else t(c)&&c.forEach((t,e)=>{s.push({nestedArrIndex:e,value:t})})}o.$[c]=n}else if(!r(h)){let t={v:h,n:this.norm.get(h)};o.$[c]=t}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function p(t,e,{getFn:n=u.getFn}={}){const s=new g({getFn:n});return s.setKeys(t.map(a)),s.setSources(e),s.create(),s}function m(t,{errors:e=0,currentLocation:n=0,expectedLocation:s=0,distance:i=u.distance,ignoreLocation:r=u.ignoreLocation}={}){const o=e/t.length;if(r)return o;const c=Math.abs(s-n);return i?o+c/i:c?1:o}function y(t,e,n,{location:s=u.location,distance:i=u.distance,threshold:r=u.threshold,findAllMatches:o=u.findAllMatches,minMatchCharLength:c=u.minMatchCharLength,includeMatches:h=u.includeMatches,ignoreLocation:a=u.ignoreLocation}={}){if(e.length>32)throw new Error(`Pattern length exceeds max of ${32}.`);const l=e.length,d=t.length,f=Math.max(0,Math.min(s,d));let g=r,p=f;const y=c>1||h,M=y?Array(d):[];let x;for(;(x=t.indexOf(e,p))>-1;){let t=m(e,{currentLocation:x,expectedLocation:f,distance:i,ignoreLocation:a});if(g=Math.min(t,g),p=x+l,y){let t=0;for(;t<l;)M[x+t]=1,t+=1}}p=-1;let L=[],_=1,k=l+d;const v=1<<l-1;for(let s=0;s<l;s+=1){let r=0,c=k;for(;r<c;){m(e,{errors:s,currentLocation:f+c,expectedLocation:f,distance:i,ignoreLocation:a})<=g?r=c:k=c,c=Math.floor((k-r)/2+r)}k=c;let h=Math.max(1,f-c+1),u=o?d:Math.min(f+c,d)+l,x=Array(u+2);x[u+1]=(1<<s)-1;for(let r=u;r>=h;r-=1){let o=r-1,c=n[t.charAt(o)];if(y&&(M[o]=+!!c),x[r]=(x[r+1]<<1|1)&c,s&&(x[r]|=(L[r+1]|L[r])<<1|1|L[r+1]),x[r]&v&&(_=m(e,{errors:s,currentLocation:o,expectedLocation:f,distance:i,ignoreLocation:a}),_<=g)){if(g=_,p=o,p<=f)break;h=Math.max(1,2*f-p)}}if(m(e,{errors:s+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:a})>g)break;L=x}const w={isMatch:p>=0,score:Math.max(.001,_)};if(y){const t=function(t=[],e=u.minMatchCharLength){let n=[],s=-1,i=-1,r=0;for(let o=t.length;r<o;r+=1){let o=t[r];o&&-1===s?s=r:o||-1===s||(i=r-1,i-s+1>=e&&n.push([s,i]),s=-1)}return t[r-1]&&r-s>=e&&n.push([s,r-1]),n}(M,c);t.length?h&&(w.indices=t):w.isMatch=!1}return w}function M(t){let e={};for(let n=0,s=t.length;n<s;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<s-n-1}return e}class x{constructor(t,{location:e=u.location,threshold:n=u.threshold,distance:s=u.distance,includeMatches:i=u.includeMatches,findAllMatches:r=u.findAllMatches,minMatchCharLength:o=u.minMatchCharLength,isCaseSensitive:c=u.isCaseSensitive,ignoreLocation:h=u.ignoreLocation}={}){if(this.options={location:e,threshold:n,distance:s,includeMatches:i,findAllMatches:r,minMatchCharLength:o,isCaseSensitive:c,ignoreLocation:h},this.pattern=c?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const a=(t,e)=>{this.chunks.push({pattern:t,alphabet:M(t),startIndex:e})},l=this.pattern.length;if(l>32){let t=0;const e=l%32,n=l-e;for(;t<n;)a(this.pattern.substr(t,32),t),t+=32;if(e){const t=l-32;a(this.pattern.substr(t),t)}}else a(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,includeMatches:n}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return n&&(e.indices=[[0,t.length-1]]),e}const{location:s,distance:i,threshold:r,findAllMatches:o,minMatchCharLength:c,ignoreLocation:h}=this.options;let a=[],l=0,d=!1;this.chunks.forEach(({pattern:e,alphabet:u,startIndex:f})=>{const{isMatch:g,score:p,indices:m}=y(t,e,u,{location:s+f,distance:i,threshold:r,findAllMatches:o,minMatchCharLength:c,includeMatches:n,ignoreLocation:h});g&&(d=!0),l+=p,g&&m&&(a=[...a,...m])});let u={isMatch:d,score:d?l/this.chunks.length:1};return d&&n&&(u.indices=a),u}}const L=[];function _(t,e){for(let n=0,s=L.length;n<s;n+=1){let s=L[n];if(s.condition(t,e))return new s(t,e)}return new x(t,e)}function k(t,e){const n=t.matches;e.matches=[],i(n)&&n.forEach(t=>{if(!i(t.indices)||!t.indices.length)return;const{indices:n,value:s}=t;let r={indices:n,value:s};t.key&&(r.key=t.key.src),t.idx>-1&&(r.refIndex=t.idx),e.matches.push(r)})}function v(t,e){e.score=t.score}class w{constructor(t,e={},n){if(this.options={...u,...e},this.options.useExtendedSearch)throw new Error("Extended search is not available");this._keyStore=new h(this.options.keys),this.setCollection(t,n)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof g))throw new Error("Incorrect 'index' type");this._myIndex=e||p(this.options.keys,this._docs,{getFn:this.options.getFn})}add(t){i(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=(()=>!1)){const e=[];for(let n=0,s=this._docs.length;n<s;n+=1){const i=this._docs[n];t(i,n)&&(this.removeAt(n),n-=1,s-=1,e.push(i))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:s=-1}={}){const{includeMatches:i,includeScore:r,shouldSort:o,sortFn:c,ignoreFieldNorm:h}=this.options;let a=e(t)?e(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,{ignoreFieldNorm:e=u.ignoreFieldNorm}){t.forEach(t=>{let n=1;t.matches.forEach(({key:t,norm:s,score:i})=>{const r=t?t.weight:null;n*=Math.pow(0===i&&r?Number.EPSILON:i,(r||1)*(e?1:s))}),t.score=n})}(a,{ignoreFieldNorm:h}),o&&a.sort(c),n(s)&&s>-1&&(a=a.slice(0,s)),function(t,e,{includeMatches:n=u.includeMatches,includeScore:s=u.includeScore}={}){const i=[];return n&&i.push(k),s&&i.push(v),t.map(t=>{const{idx:n}=t,s={item:e[n],refIndex:n};return i.length&&i.forEach(e=>{e(t,s)}),s})}(a,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(t){const e=_(t,this.options),{records:n}=this._myIndex,s=[];return n.forEach(({v:t,i:n,n:r})=>{if(!i(t))return;const{isMatch:o,score:c,indices:h}=e.searchIn(t);o&&s.push({item:t,idx:n,matches:[{score:c,value:t,norm:r,indices:h}]})}),s}_searchLogical(t){throw new Error("Logical search is not available")}_searchObjectList(t){const e=_(t,this.options),{keys:n,records:s}=this._myIndex,r=[];return s.forEach(({$:t,i:s})=>{if(!i(t))return;let o=[];n.forEach((n,s)=>{o.push(...this._findMatches({key:n,value:t[s],searcher:e}))}),o.length&&r.push({idx:s,item:t,matches:o})}),r}_findMatches({key:e,value:n,searcher:s}){if(!i(n))return[];let r=[];if(t(n))n.forEach(({v:t,i:n,n:o})=>{if(!i(t))return;const{isMatch:c,score:h,indices:a}=s.searchIn(t);c&&r.push({score:h,key:e,value:t,idx:n,norm:o,indices:a})});else{const{v:t,n:i}=n,{isMatch:o,score:c,indices:h}=s.searchIn(t);o&&r.push({score:c,key:e,value:t,norm:i,indices:h})}return r}}w.version="6.4.6",w.createIndex=p,w.parseIndex=function(t,{getFn:e=u.getFn}={}){const{keys:n,records:s}=t,i=new g({getFn:e});return i.setKeys(n),i.setIndexRecords(s),i},w.config=u;export default w;
undefined
/**
* Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.5.0 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -13,21 +13,41 @@ * Copyright (c) 2021 Kiro Risk (http://kiro.me)

typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.Fuse = factory());
}(this, (function () { 'use strict';
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Fuse = factory());
})(this, (function () { 'use strict';
function _typeof(obj) {
"@babel/helpers - typeof";
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
enumerableOnly && (symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
})), keys.push.apply(keys, symbols);
}
return _typeof(obj);
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
_defineProperty(target, key, source[key]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
return target;
}
function _typeof(obj) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
}
function _classCallCheck(instance, Constructor) {

@@ -52,2 +72,5 @@ if (!(instance instanceof Constructor)) {

if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;

@@ -71,36 +94,2 @@ }

function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function _toConsumableArray(arr) {

@@ -115,3 +104,3 @@ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();

function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}

@@ -385,5 +374,7 @@

// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
ignoreFieldNorm: false
ignoreFieldNorm: false,
// The weight to determine how much field length norm effects scoring.
fieldNormWeight: 1
};
var Config = _objectSpread2({}, BasicOptions, {}, MatchOptions, {}, FuzzyOptions, {}, AdvancedOptions);
var Config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, BasicOptions), MatchOptions), FuzzyOptions), AdvancedOptions);

@@ -394,3 +385,4 @@ var SPACE = /[^ ]+/g; // Field-length norm: the shorter the field, the higher the weight.

function norm() {
var mantissa = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3;
var weight = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
var mantissa = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
var cache = new Map();

@@ -404,6 +396,7 @@ var m = Math.pow(10, mantissa);

return cache.get(numTokens);
}
} // Default function is 1/sqrt(x), weight makes that variable
var norm = 1 / Math.sqrt(numTokens); // In place of `toFixed(mantissa)`, for faster computation
var norm = 1 / Math.pow(numTokens, 0.5 * weight); // In place of `toFixed(mantissa)`, for faster computation
var n = parseFloat(Math.round(norm * m) / m);

@@ -423,7 +416,9 @@ cache.set(numTokens, n);

_ref$getFn = _ref.getFn,
getFn = _ref$getFn === void 0 ? Config.getFn : _ref$getFn;
getFn = _ref$getFn === void 0 ? Config.getFn : _ref$getFn,
_ref$fieldNormWeight = _ref.fieldNormWeight,
fieldNormWeight = _ref$fieldNormWeight === void 0 ? Config.fieldNormWeight : _ref$fieldNormWeight;
_classCallCheck(this, FuseIndex);
this.norm = norm(3);
this.norm = norm(fieldNormWeight, 3);
this.getFn = getFn;

@@ -577,3 +572,3 @@ this.isCreated = false;

});
}
} else ;
}

@@ -608,6 +603,9 @@

_ref2$getFn = _ref2.getFn,
getFn = _ref2$getFn === void 0 ? Config.getFn : _ref2$getFn;
getFn = _ref2$getFn === void 0 ? Config.getFn : _ref2$getFn,
_ref2$fieldNormWeight = _ref2.fieldNormWeight,
fieldNormWeight = _ref2$fieldNormWeight === void 0 ? Config.fieldNormWeight : _ref2$fieldNormWeight;
var myIndex = new FuseIndex({
getFn: getFn
getFn: getFn,
fieldNormWeight: fieldNormWeight
});

@@ -622,3 +620,5 @@ myIndex.setKeys(keys.map(createKey));

_ref3$getFn = _ref3.getFn,
getFn = _ref3$getFn === void 0 ? Config.getFn : _ref3$getFn;
getFn = _ref3$getFn === void 0 ? Config.getFn : _ref3$getFn,
_ref3$fieldNormWeight = _ref3.fieldNormWeight,
fieldNormWeight = _ref3$fieldNormWeight === void 0 ? Config.fieldNormWeight : _ref3$fieldNormWeight;

@@ -628,3 +628,4 @@ var keys = data.keys,

var myIndex = new FuseIndex({
getFn: getFn
getFn: getFn,
fieldNormWeight: fieldNormWeight
});

@@ -636,3 +637,3 @@ myIndex.setKeys(keys);

function computeScore(pattern) {
function computeScore$1(pattern) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},

@@ -739,3 +740,3 @@ _ref$errors = _ref.errors,

while ((index = text.indexOf(pattern, bestLocation)) > -1) {
var score = computeScore(pattern, {
var score = computeScore$1(pattern, {
currentLocation: index,

@@ -774,3 +775,3 @@ expectedLocation: expectedLocation,

while (binMin < binMid) {
var _score2 = computeScore(pattern, {
var _score2 = computeScore$1(pattern, {
errors: _i,

@@ -817,3 +818,3 @@ currentLocation: expectedLocation + binMid,

if (bitArr[j] & mask) {
finalScore = computeScore(pattern, {
finalScore = computeScore$1(pattern, {
errors: _i,

@@ -843,3 +844,3 @@ currentLocation: currentLocation,

var _score = computeScore(pattern, {
var _score = computeScore$1(pattern, {
errors: _i + 1,

@@ -882,4 +883,5 @@ currentLocation: expectedLocation,

for (var i = 0, len = pattern.length; i < len; i += 1) {
var char = pattern.charAt(i);
mask[char] = (mask[char] || 0) | 1 << len - i - 1;
var _char = pattern.charAt(i);
mask[_char] = (mask[_char] || 0) | 1 << len - i - 1;
}

@@ -1138,3 +1140,3 @@

function computeScore$1(results, _ref) {
function computeScore(results, _ref) {
var _ref$ignoreFieldNorm = _ref.ignoreFieldNorm,

@@ -1218,3 +1220,3 @@ ignoreFieldNorm = _ref$ignoreFieldNorm === void 0 ? Config.ignoreFieldNorm : _ref$ignoreFieldNorm;

var Fuse = /*#__PURE__*/function () {
var Fuse$1 = /*#__PURE__*/function () {
function Fuse(docs) {

@@ -1226,3 +1228,3 @@ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

this.options = _objectSpread2({}, Config, {}, options);
this.options = _objectSpread2(_objectSpread2({}, Config), options);

@@ -1247,3 +1249,4 @@ if (this.options.useExtendedSearch && !false) {

this._myIndex = index || createIndex(this.options.keys, this._docs, {
getFn: this.options.getFn
getFn: this.options.getFn,
fieldNormWeight: this.options.fieldNormWeight
});

@@ -1265,7 +1268,6 @@ }

value: function remove() {
var predicate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {
return (
/* doc, idx */
false
);
var predicate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function
/* doc, idx */
() {
return false;
};

@@ -1313,3 +1315,3 @@ var results = [];

var results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
computeScore$1(results, {
computeScore(results, {
ignoreFieldNorm: ignoreFieldNorm

@@ -1480,13 +1482,15 @@ });

Fuse.version = '6.4.6';
Fuse.createIndex = createIndex;
Fuse.parseIndex = parseIndex;
Fuse.config = Config;
Fuse$1.version = '6.5.0';
Fuse$1.createIndex = createIndex;
Fuse$1.parseIndex = parseIndex;
Fuse$1.config = Config;
{
Fuse.parseQuery = parse;
Fuse$1.parseQuery = parse;
}
var Fuse = Fuse$1;
return Fuse;
})));
}));
/**
* Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.5.0 - Lightweight fuzzy-search (http://fusejs.io)
*

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

*/
var e,t;e=this,t=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e){return Array.isArray?Array.isArray(e):"[object Array]"===y(e)}function u(e){return"string"==typeof e}function l(e){return"number"==typeof e}function d(t){return!0===t||!1===t||function(t){return function(t){return"object"===e(t)}(t)&&null!==t}(t)&&"[object Boolean]"==y(t)}function f(e){return null!=e}function v(e){return!e.trim().length}function y(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var g=function(e){return"Pattern length exceeds max of ".concat(e,".")},p=Object.prototype.hasOwnProperty,m=function(){function e(n){var r=this;t(this,e),this._keys=[],this._keyMap={};var i=0;n.forEach((function(e){var t=b(e);i+=t.weight,r._keys.push(t),r._keyMap[t.id]=t,i+=t.weight})),this._keys.forEach((function(e){e.weight/=i}))}return r(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function b(e){var t=null,n=null,r=null,i=1;if(u(e)||h(e))r=e,t=k(e),n=M(e);else{if(!p.call(e,"name"))throw new Error(function(e){return"Missing ".concat(e," property in key")}("name"));var o=e.name;if(r=o,p.call(e,"weight")&&(i=e.weight)<=0)throw new Error(function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")}(o));t=k(o),n=M(o)}return{path:t,id:n,weight:i,src:r}}function k(e){return h(e)?e:e.split(".")}function M(e){return h(e)?e.join("."):e}var x=a({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,i,o){if(f(t))if(i[o]){var a=t[i[o]];if(!f(a))return;if(o===i.length-1&&(u(a)||l(a)||d(a)))n.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)}(a));else if(h(a)){r=!0;for(var c=0,s=a.length;c<s;c+=1)e(a[c],i,o+1)}else i.length&&e(a,i,o+1)}else n.push(t)}(e,u(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1}),w=/[^ ]+/g;function L(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=new Map,n=Math.pow(10,e);return{get:function(e){var r=e.match(w).length;if(t.has(r))return t.get(r);var i=1/Math.sqrt(r),o=parseFloat(Math.round(i*n)/n);return t.set(r,o),o},clear:function(){t.clear()}}}var _=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,i=void 0===r?x.getFn:r;t(this,e),this.norm=L(3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return r(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,u(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();u(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(f(e)&&!v(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach((function(t,i){var o=n.getFn(e,t.path);if(f(o))if(h(o))!function(){for(var e=[],t=[{nestedArrIndex:-1,value:o}];t.length;){var a=t.pop(),c=a.nestedArrIndex,s=a.value;if(f(s))if(u(s)&&!v(s)){var l={v:s,i:c,n:n.norm.get(s)};e.push(l)}else h(s)&&s.forEach((function(e,n){t.push({nestedArrIndex:n,value:e})}))}r.$[i]=e}();else if(!v(o)){var a={v:o,n:n.norm.get(o)};r.$[i]=a}})),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?x.getFn:r,o=new _({getFn:i});return o.setKeys(e.map(b)),o.setSources(t),o.create(),o}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,a=t.expectedLocation,c=void 0===a?0:a,s=t.distance,h=void 0===s?x.distance:s,u=t.ignoreLocation,l=void 0===u?x.ignoreLocation:u,d=r/e.length;if(l)return d;var f=Math.abs(c-o);return h?d+f/h:f?1:d}function A(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.minMatchCharLength,n=[],r=-1,i=-1,o=0,a=e.length;o<a;o+=1){var c=e[o];c&&-1===r?r=o:c||-1===r||((i=o-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}function j(e){for(var t={},n=0,r=e.length;n<r;n+=1){var i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var E=function(){function e(n){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,a=void 0===o?x.location:o,c=i.threshold,s=void 0===c?x.threshold:c,h=i.distance,u=void 0===h?x.distance:h,l=i.includeMatches,d=void 0===l?x.includeMatches:l,f=i.findAllMatches,v=void 0===f?x.findAllMatches:f,y=i.minMatchCharLength,g=void 0===y?x.minMatchCharLength:y,p=i.isCaseSensitive,m=void 0===p?x.isCaseSensitive:p,b=i.ignoreLocation,k=void 0===b?x.ignoreLocation:b;if(t(this,e),this.options={location:a,threshold:s,distance:u,includeMatches:d,findAllMatches:v,minMatchCharLength:g,isCaseSensitive:m,ignoreLocation:k},this.pattern=m?n:n.toLowerCase(),this.chunks=[],this.pattern.length){var M=function(e,t){r.chunks.push({pattern:e,alphabet:j(e),startIndex:t})},w=this.pattern.length;if(w>32){for(var L=0,_=w%32,S=w-_;L<S;)M(this.pattern.substr(L,32),L),L+=32;if(_){var O=w-32;M(this.pattern.substr(O),O)}}else M(this.pattern,0)}}return r(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return r&&(i.indices=[[0,e.length-1]]),i}var o=this.options,a=o.location,s=o.distance,h=o.threshold,u=o.findAllMatches,l=o.minMatchCharLength,d=o.ignoreLocation,f=[],v=0,y=!1;this.chunks.forEach((function(t){var n=t.pattern,i=t.alphabet,o=t.startIndex,p=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?x.location:i,a=r.distance,c=void 0===a?x.distance:a,s=r.threshold,h=void 0===s?x.threshold:s,u=r.findAllMatches,l=void 0===u?x.findAllMatches:u,d=r.minMatchCharLength,f=void 0===d?x.minMatchCharLength:d,v=r.includeMatches,y=void 0===v?x.includeMatches:v,p=r.ignoreLocation,m=void 0===p?x.ignoreLocation:p;if(t.length>32)throw new Error(g(32));for(var b,k=t.length,M=e.length,w=Math.max(0,Math.min(o,M)),L=h,_=w,S=f>1||y,j=S?Array(M):[];(b=e.indexOf(t,_))>-1;){var E=O(t,{currentLocation:b,expectedLocation:w,distance:c,ignoreLocation:m});if(L=Math.min(E,L),_=b+k,S)for(var I=0;I<k;)j[b+I]=1,I+=1}_=-1;for(var C=[],F=1,P=k+M,N=1<<k-1,$=0;$<k;$+=1){for(var D=0,K=P;D<K;){var z=O(t,{errors:$,currentLocation:w+K,expectedLocation:w,distance:c,ignoreLocation:m});z<=L?D=K:P=K,K=Math.floor((P-D)/2+D)}P=K;var J=Math.max(1,w-K+1),R=l?M:Math.min(w+K,M)+k,T=Array(R+2);T[R+1]=(1<<$)-1;for(var U=R;U>=J;U-=1){var q=U-1,B=n[e.charAt(q)];if(S&&(j[q]=+!!B),T[U]=(T[U+1]<<1|1)&B,$&&(T[U]|=(C[U+1]|C[U])<<1|1|C[U+1]),T[U]&N&&(F=O(t,{errors:$,currentLocation:q,expectedLocation:w,distance:c,ignoreLocation:m}))<=L){if(L=F,(_=q)<=w)break;J=Math.max(1,2*w-_)}}var V=O(t,{errors:$+1,currentLocation:w,expectedLocation:w,distance:c,ignoreLocation:m});if(V>L)break;C=T}var G={isMatch:_>=0,score:Math.max(.001,F)};if(S){var H=A(j,f);H.length?y&&(G.indices=H):G.isMatch=!1}return G}(e,n,i,{location:a+o,distance:s,threshold:h,findAllMatches:u,minMatchCharLength:l,includeMatches:r,ignoreLocation:d}),m=p.isMatch,b=p.score,k=p.indices;m&&(y=!0),v+=b,m&&k&&(f=[].concat(c(f),c(k)))}));var p={isMatch:y,score:y?v/this.chunks.length:1};return y&&r&&(p.indices=f),p}}]),e}(),I=[];function C(e,t){for(var n=0,r=I.length;n<r;n+=1){var i=I[n];if(i.condition(e,t))return new i(e,t)}return new E(e,t)}function F(e,t){var n=t.ignoreFieldNorm,r=void 0===n?x.ignoreFieldNorm:n;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var n=e.key,i=e.norm,o=e.score,a=n?n.weight:null;t*=Math.pow(0===o&&a?Number.EPSILON:o,(a||1)*(r?1:i))})),e.score=t}))}function P(e,t){var n=e.matches;t.matches=[],f(n)&&n.forEach((function(e){if(f(e.indices)&&e.indices.length){var n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.src),e.idx>-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function N(e,t){t.score=e.score}function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?x.includeMatches:r,o=n.includeScore,a=void 0===o?x.includeScore:o,c=[];return i&&c.push(P),a&&c.push(N),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return c.length&&c.forEach((function(t){t(e,r)})),r}))}var D=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(t(this,e),this.options=a({},x,{},r),this.options.useExtendedSearch)throw new Error("Extended search is not available");this._keyStore=new m(this.options.keys),this.setCollection(n,i)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof _))throw new Error("Incorrect 'index' type");this._myIndex=t||S(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){f(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n<r;n+=1){var i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,a=i.includeScore,c=i.shouldSort,s=i.sortFn,h=i.ignoreFieldNorm,d=u(e)?u(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return F(d,{ignoreFieldNorm:h}),c&&d.sort(s),l(r)&&r>-1&&(d=d.slice(0,r)),$(d,this._docs,{includeMatches:o,includeScore:a})}},{key:"_searchStringList",value:function(e){var t=C(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(f(n)){var a=t.searchIn(n),c=a.isMatch,s=a.score,h=a.indices;c&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:h}]})}})),r}},{key:"_searchLogical",value:function(e){throw new Error("Logical search is not available")}},{key:"_searchObjectList",value:function(e){var t=this,n=C(e,this.options),r=this._myIndex,i=r.keys,o=r.records,a=[];return o.forEach((function(e){var r=e.$,o=e.i;if(f(r)){var s=[];i.forEach((function(e,i){s.push.apply(s,c(t._findMatches({key:e,value:r[i],searcher:n})))})),s.length&&a.push({idx:o,item:r,matches:s})}})),a}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!f(n))return[];var i=[];if(h(n))n.forEach((function(e){var n=e.v,o=e.i,a=e.n;if(f(n)){var c=r.searchIn(n),s=c.isMatch,h=c.score,u=c.indices;s&&i.push({score:h,key:t,value:n,idx:o,norm:a,indices:u})}}));else{var o=n.v,a=n.n,c=r.searchIn(o),s=c.isMatch,u=c.score,l=c.indices;s&&i.push({score:u,key:t,value:o,norm:a,indices:l})}return i}}]),e}();return D.version="6.4.6",D.createIndex=S,D.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?x.getFn:n,i=e.keys,o=e.records,a=new _({getFn:r});return a.setKeys(i),a.setIndexRecords(o),a},D.config=x,D},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t();
undefined

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

// Type definitions for Fuse.js v6.4.6
// TypeScript v3.9.5
// Type definitions for Fuse.js v6.5.0
// TypeScript v4.5.4

@@ -293,2 +293,4 @@ export default Fuse

| { $or?: Expression[] }
export const config: Required<IFuseOptions<any>>;
}
/**
* Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.5.0 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -267,3 +267,5 @@ * Copyright (c) 2021 Kiro Risk (http://kiro.me)

// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
ignoreFieldNorm: false
ignoreFieldNorm: false,
// The weight to determine how much field length norm effects scoring.
fieldNormWeight: 1
};

@@ -282,3 +284,3 @@

// Set to 3 decimals to reduce index size.
function norm(mantissa = 3) {
function norm(weight = 1, mantissa = 3) {
const cache = new Map();

@@ -295,3 +297,4 @@ const m = Math.pow(10, mantissa);

const norm = 1 / Math.sqrt(numTokens);
// Default function is 1/sqrt(x), weight makes that variable
const norm = 1 / Math.pow(numTokens, 0.5 * weight);

@@ -312,4 +315,4 @@ // In place of `toFixed(mantissa)`, for faster computation

class FuseIndex {
constructor({ getFn = Config.getFn } = {}) {
this.norm = norm(3);
constructor({ getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}) {
this.norm = norm(fieldNormWeight, 3);
this.getFn = getFn;

@@ -430,3 +433,3 @@ this.isCreated = false;

});
}
} else ;
}

@@ -454,4 +457,4 @@ record.$[keyIndex] = subRecords;

function createIndex(keys, docs, { getFn = Config.getFn } = {}) {
const myIndex = new FuseIndex({ getFn });
function createIndex(keys, docs, { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}) {
const myIndex = new FuseIndex({ getFn, fieldNormWeight });
myIndex.setKeys(keys.map(createKey));

@@ -463,5 +466,5 @@ myIndex.setSources(docs);

function parseIndex(data, { getFn = Config.getFn } = {}) {
function parseIndex(data, { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}) {
const { keys, records } = data;
const myIndex = new FuseIndex({ getFn });
const myIndex = new FuseIndex({ getFn, fieldNormWeight });
myIndex.setKeys(keys);

@@ -472,3 +475,3 @@ myIndex.setIndexRecords(records);

function computeScore(
function computeScore$1(
pattern,

@@ -570,3 +573,3 @@ {

while ((index = text.indexOf(pattern, bestLocation)) > -1) {
let score = computeScore(pattern, {
let score = computeScore$1(pattern, {
currentLocation: index,

@@ -607,3 +610,3 @@ expectedLocation,

while (binMin < binMid) {
const score = computeScore(pattern, {
const score = computeScore$1(pattern, {
errors: i,

@@ -657,3 +660,3 @@ currentLocation: expectedLocation + binMid,

if (bitArr[j] & mask) {
finalScore = computeScore(pattern, {
finalScore = computeScore$1(pattern, {
errors: i,

@@ -685,3 +688,3 @@ currentLocation,

// No hope for a (better) match at greater error levels.
const score = computeScore(pattern, {
const score = computeScore$1(pattern, {
errors: i + 1,

@@ -1417,3 +1420,3 @@ currentLocation: expectedLocation,

// Practical scoring function
function computeScore$1(
function computeScore(
results,

@@ -1531,3 +1534,4 @@ { ignoreFieldNorm = Config.ignoreFieldNorm }

createIndex(this.options.keys, this._docs, {
getFn: this.options.getFn
getFn: this.options.getFn,
fieldNormWeight: this.options.fieldNormWeight
});

@@ -1586,3 +1590,3 @@ }

computeScore$1(results, { ignoreFieldNorm });
computeScore(results, { ignoreFieldNorm });

@@ -1784,3 +1788,3 @@ if (shouldSort) {

Fuse.version = '6.4.6';
Fuse.version = '6.5.0';
Fuse.createIndex = createIndex;

@@ -1798,2 +1802,2 @@ Fuse.parseIndex = parseIndex;

export default Fuse;
export { Fuse as default };
/**
* Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.5.0 - Lightweight fuzzy-search (http://fusejs.io)
*

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

*/
function t(t){return Array.isArray?Array.isArray(t):"[object Array]"===o(t)}function e(t){return"string"==typeof t}function n(t){return"number"==typeof t}function s(t){return!0===t||!1===t||function(t){return r(t)&&null!==t}(t)&&"[object Boolean]"==o(t)}function r(t){return"object"==typeof t}function i(t){return null!=t}function c(t){return!t.trim().length}function o(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const h=Object.prototype.hasOwnProperty;class a{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(t=>{let n=l(t);e+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight}),this._keys.forEach(t=>{t.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function l(n){let s=null,r=null,i=null,c=1;if(e(n)||t(n))i=n,s=u(n),r=d(n);else{if(!h.call(n,"name"))throw new Error((t=>`Missing ${t} property in key`)("name"));const t=n.name;if(i=t,h.call(n,"weight")&&(c=n.weight,c<=0))throw new Error((t=>`Property 'weight' in key '${t}' must be a positive integer`)(t));s=u(t),r=d(t)}return{path:s,id:r,weight:c,src:i}}function u(e){return t(e)?e:e.split(".")}function d(e){return t(e)?e.join("."):e}var g={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(r,c){let o=[],h=!1;const a=(r,c,l)=>{if(i(r))if(c[l]){const u=r[c[l]];if(!i(u))return;if(l===c.length-1&&(e(u)||n(u)||s(u)))o.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(u));else if(t(u)){h=!0;for(let t=0,e=u.length;t<e;t+=1)a(u[t],c,l+1)}else c.length&&a(u,c,l+1)}else o.push(r)};return a(r,e(c)?c.split("."):c,0),h?o:o[0]},ignoreLocation:!1,ignoreFieldNorm:!1}};const f=/[^ ]+/g;class p{constructor({getFn:t=g.getFn}={}){this.norm=function(t=3){const e=new Map,n=Math.pow(10,t);return{get(t){const s=t.match(f).length;if(e.has(s))return e.get(s);const r=1/Math.sqrt(s),i=parseFloat(Math.round(r*n)/n);return e.set(s,i),i},clear(){e.clear()}}}(3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((t,e)=>{this._keysMap[t.id]=e})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,e(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const n=this.size();e(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let e=t,n=this.size();e<n;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!i(t)||c(t))return;let n={v:t,i:e,n:this.norm.get(t)};this.records.push(n)}_addObject(n,s){let r={i:s,$:{}};this.keys.forEach((s,o)=>{let h=this.getFn(n,s.path);if(i(h))if(t(h)){let n=[];const s=[{nestedArrIndex:-1,value:h}];for(;s.length;){const{nestedArrIndex:r,value:o}=s.pop();if(i(o))if(e(o)&&!c(o)){let t={v:o,i:r,n:this.norm.get(o)};n.push(t)}else t(o)&&o.forEach((t,e)=>{s.push({nestedArrIndex:e,value:t})})}r.$[o]=n}else if(!c(h)){let t={v:h,n:this.norm.get(h)};r.$[o]=t}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function M(t,e,{getFn:n=g.getFn}={}){const s=new p({getFn:n});return s.setKeys(t.map(l)),s.setSources(e),s.create(),s}function m(t,{errors:e=0,currentLocation:n=0,expectedLocation:s=0,distance:r=g.distance,ignoreLocation:i=g.ignoreLocation}={}){const c=e/t.length;if(i)return c;const o=Math.abs(s-n);return r?c+o/r:o?1:c}function x(t,e,n,{location:s=g.location,distance:r=g.distance,threshold:i=g.threshold,findAllMatches:c=g.findAllMatches,minMatchCharLength:o=g.minMatchCharLength,includeMatches:h=g.includeMatches,ignoreLocation:a=g.ignoreLocation}={}){if(e.length>32)throw new Error(`Pattern length exceeds max of ${32}.`);const l=e.length,u=t.length,d=Math.max(0,Math.min(s,u));let f=i,p=d;const M=o>1||h,x=M?Array(u):[];let y;for(;(y=t.indexOf(e,p))>-1;){let t=m(e,{currentLocation:y,expectedLocation:d,distance:r,ignoreLocation:a});if(f=Math.min(t,f),p=y+l,M){let t=0;for(;t<l;)x[y+t]=1,t+=1}}p=-1;let L=[],k=1,_=l+u;const v=1<<l-1;for(let s=0;s<l;s+=1){let i=0,o=_;for(;i<o;){m(e,{errors:s,currentLocation:d+o,expectedLocation:d,distance:r,ignoreLocation:a})<=f?i=o:_=o,o=Math.floor((_-i)/2+i)}_=o;let h=Math.max(1,d-o+1),g=c?u:Math.min(d+o,u)+l,y=Array(g+2);y[g+1]=(1<<s)-1;for(let i=g;i>=h;i-=1){let c=i-1,o=n[t.charAt(c)];if(M&&(x[c]=+!!o),y[i]=(y[i+1]<<1|1)&o,s&&(y[i]|=(L[i+1]|L[i])<<1|1|L[i+1]),y[i]&v&&(k=m(e,{errors:s,currentLocation:c,expectedLocation:d,distance:r,ignoreLocation:a}),k<=f)){if(f=k,p=c,p<=d)break;h=Math.max(1,2*d-p)}}if(m(e,{errors:s+1,currentLocation:d,expectedLocation:d,distance:r,ignoreLocation:a})>f)break;L=y}const S={isMatch:p>=0,score:Math.max(.001,k)};if(M){const t=function(t=[],e=g.minMatchCharLength){let n=[],s=-1,r=-1,i=0;for(let c=t.length;i<c;i+=1){let c=t[i];c&&-1===s?s=i:c||-1===s||(r=i-1,r-s+1>=e&&n.push([s,r]),s=-1)}return t[i-1]&&i-s>=e&&n.push([s,i-1]),n}(x,o);t.length?h&&(S.indices=t):S.isMatch=!1}return S}function y(t){let e={};for(let n=0,s=t.length;n<s;n+=1){const r=t.charAt(n);e[r]=(e[r]||0)|1<<s-n-1}return e}class L{constructor(t,{location:e=g.location,threshold:n=g.threshold,distance:s=g.distance,includeMatches:r=g.includeMatches,findAllMatches:i=g.findAllMatches,minMatchCharLength:c=g.minMatchCharLength,isCaseSensitive:o=g.isCaseSensitive,ignoreLocation:h=g.ignoreLocation}={}){if(this.options={location:e,threshold:n,distance:s,includeMatches:r,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:o,ignoreLocation:h},this.pattern=o?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const a=(t,e)=>{this.chunks.push({pattern:t,alphabet:y(t),startIndex:e})},l=this.pattern.length;if(l>32){let t=0;const e=l%32,n=l-e;for(;t<n;)a(this.pattern.substr(t,32),t),t+=32;if(e){const t=l-32;a(this.pattern.substr(t),t)}}else a(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,includeMatches:n}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return n&&(e.indices=[[0,t.length-1]]),e}const{location:s,distance:r,threshold:i,findAllMatches:c,minMatchCharLength:o,ignoreLocation:h}=this.options;let a=[],l=0,u=!1;this.chunks.forEach(({pattern:e,alphabet:d,startIndex:g})=>{const{isMatch:f,score:p,indices:M}=x(t,e,d,{location:s+g,distance:r,threshold:i,findAllMatches:c,minMatchCharLength:o,includeMatches:n,ignoreLocation:h});f&&(u=!0),l+=p,f&&M&&(a=[...a,...M])});let d={isMatch:u,score:u?l/this.chunks.length:1};return u&&n&&(d.indices=a),d}}class k{constructor(t){this.pattern=t}static isMultiMatch(t){return _(t,this.multiRegex)}static isSingleMatch(t){return _(t,this.singleRegex)}search(){}}function _(t,e){const n=t.match(e);return n?n[1]:null}class v extends k{constructor(t,{location:e=g.location,threshold:n=g.threshold,distance:s=g.distance,includeMatches:r=g.includeMatches,findAllMatches:i=g.findAllMatches,minMatchCharLength:c=g.minMatchCharLength,isCaseSensitive:o=g.isCaseSensitive,ignoreLocation:h=g.ignoreLocation}={}){super(t),this._bitapSearch=new L(t,{location:e,threshold:n,distance:s,includeMatches:r,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:o,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class S extends k{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,n=0;const s=[],r=this.pattern.length;for(;(e=t.indexOf(this.pattern,n))>-1;)n=e+r,s.push([e,n-1]);const i=!!s.length;return{isMatch:i,score:i?0:1,indices:s}}}const w=[class extends k{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},S,class extends k{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends k{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends k{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends k{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends k{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},v],C=w.length,I=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;const $=new Set([v.type,S.type]);class A{constructor(t,{isCaseSensitive:e=g.isCaseSensitive,includeMatches:n=g.includeMatches,minMatchCharLength:s=g.minMatchCharLength,ignoreLocation:r=g.ignoreLocation,findAllMatches:i=g.findAllMatches,location:c=g.location,threshold:o=g.threshold,distance:h=g.distance}={}){this.query=null,this.options={isCaseSensitive:e,includeMatches:n,minMatchCharLength:s,findAllMatches:i,ignoreLocation:r,location:c,threshold:o,distance:h},this.pattern=e?t:t.toLowerCase(),this.query=function(t,e={}){return t.split("|").map(t=>{let n=t.trim().split(I).filter(t=>t&&!!t.trim()),s=[];for(let t=0,r=n.length;t<r;t+=1){const r=n[t];let i=!1,c=-1;for(;!i&&++c<C;){const t=w[c];let n=t.isMultiMatch(r);n&&(s.push(new t(n,e)),i=!0)}if(!i)for(c=-1;++c<C;){const t=w[c];let n=t.isSingleMatch(r);if(n){s.push(new t(n,e));break}}}return s})}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:s}=this.options;t=s?t:t.toLowerCase();let r=0,i=[],c=0;for(let s=0,o=e.length;s<o;s+=1){const o=e[s];i.length=0,r=0;for(let e=0,s=o.length;e<s;e+=1){const s=o[e],{isMatch:h,indices:a,score:l}=s.search(t);if(!h){c=0,r=0,i.length=0;break}if(r+=1,c+=l,n){const t=s.constructor.type;$.has(t)?i=[...i,...a]:i.push(a)}}if(r){let t={isMatch:!0,score:c/r};return n&&(t.indices=i),t}}return{isMatch:!1,score:1}}}const b=[];function E(t,e){for(let n=0,s=b.length;n<s;n+=1){let s=b[n];if(s.condition(t,e))return new s(t,e)}return new L(t,e)}const F="$and",R="$or",O="$path",j="$val",N=t=>!(!t[F]&&!t[R]),z=t=>({[F]:Object.keys(t).map(e=>({[e]:t[e]}))});function K(n,s,{auto:i=!0}={}){const c=n=>{let o=Object.keys(n);const h=(t=>!!t[O])(n);if(!h&&o.length>1&&!N(n))return c(z(n));if((e=>!t(e)&&r(e)&&!N(e))(n)){const t=h?n[O]:o[0],r=h?n[j]:n[t];if(!e(r))throw new Error((t=>"Invalid value for key "+t)(t));const c={keyId:d(t),pattern:r};return i&&(c.searcher=E(r,s)),c}let a={children:[],operator:o[0]};return o.forEach(e=>{const s=n[e];t(s)&&s.forEach(t=>{a.children.push(c(t))})}),a};return N(n)||(n=z(n)),c(n)}function q(t,e){const n=t.matches;e.matches=[],i(n)&&n.forEach(t=>{if(!i(t.indices)||!t.indices.length)return;const{indices:n,value:s}=t;let r={indices:n,value:s};t.key&&(r.key=t.key.src),t.idx>-1&&(r.refIndex=t.idx),e.matches.push(r)})}function P(t,e){e.score=t.score}class W{constructor(t,e={},n){this.options={...g,...e},this.options.useExtendedSearch,this._keyStore=new a(this.options.keys),this.setCollection(t,n)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof p))throw new Error("Incorrect 'index' type");this._myIndex=e||M(this.options.keys,this._docs,{getFn:this.options.getFn})}add(t){i(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=(()=>!1)){const e=[];for(let n=0,s=this._docs.length;n<s;n+=1){const r=this._docs[n];t(r,n)&&(this.removeAt(n),n-=1,s-=1,e.push(r))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:s=-1}={}){const{includeMatches:r,includeScore:i,shouldSort:c,sortFn:o,ignoreFieldNorm:h}=this.options;let a=e(t)?e(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,{ignoreFieldNorm:e=g.ignoreFieldNorm}){t.forEach(t=>{let n=1;t.matches.forEach(({key:t,norm:s,score:r})=>{const i=t?t.weight:null;n*=Math.pow(0===r&&i?Number.EPSILON:r,(i||1)*(e?1:s))}),t.score=n})}(a,{ignoreFieldNorm:h}),c&&a.sort(o),n(s)&&s>-1&&(a=a.slice(0,s)),function(t,e,{includeMatches:n=g.includeMatches,includeScore:s=g.includeScore}={}){const r=[];return n&&r.push(q),s&&r.push(P),t.map(t=>{const{idx:n}=t,s={item:e[n],refIndex:n};return r.length&&r.forEach(e=>{e(t,s)}),s})}(a,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(t){const e=E(t,this.options),{records:n}=this._myIndex,s=[];return n.forEach(({v:t,i:n,n:r})=>{if(!i(t))return;const{isMatch:c,score:o,indices:h}=e.searchIn(t);c&&s.push({item:t,idx:n,matches:[{score:o,value:t,norm:r,indices:h}]})}),s}_searchLogical(t){const e=K(t,this.options),n=(t,e,s)=>{if(!t.children){const{keyId:n,searcher:r}=t,i=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(e,n),searcher:r});return i&&i.length?[{idx:s,item:e,matches:i}]:[]}switch(t.operator){case F:{const r=[];for(let i=0,c=t.children.length;i<c;i+=1){const c=t.children[i],o=n(c,e,s);if(!o.length)return[];r.push(...o)}return r}case R:{const r=[];for(let i=0,c=t.children.length;i<c;i+=1){const c=t.children[i],o=n(c,e,s);if(o.length){r.push(...o);break}}return r}}},s=this._myIndex.records,r={},c=[];return s.forEach(({$:t,i:s})=>{if(i(t)){let i=n(e,t,s);i.length&&(r[s]||(r[s]={idx:s,item:t,matches:[]},c.push(r[s])),i.forEach(({matches:t})=>{r[s].matches.push(...t)}))}}),c}_searchObjectList(t){const e=E(t,this.options),{keys:n,records:s}=this._myIndex,r=[];return s.forEach(({$:t,i:s})=>{if(!i(t))return;let c=[];n.forEach((n,s)=>{c.push(...this._findMatches({key:n,value:t[s],searcher:e}))}),c.length&&r.push({idx:s,item:t,matches:c})}),r}_findMatches({key:e,value:n,searcher:s}){if(!i(n))return[];let r=[];if(t(n))n.forEach(({v:t,i:n,n:c})=>{if(!i(t))return;const{isMatch:o,score:h,indices:a}=s.searchIn(t);o&&r.push({score:h,key:e,value:t,idx:n,norm:c,indices:a})});else{const{v:t,n:i}=n,{isMatch:c,score:o,indices:h}=s.searchIn(t);c&&r.push({score:o,key:e,value:t,norm:i,indices:h})}return r}}W.version="6.4.6",W.createIndex=M,W.parseIndex=function(t,{getFn:e=g.getFn}={}){const{keys:n,records:s}=t,r=new p({getFn:e});return r.setKeys(n),r.setIndexRecords(s),r},W.config=g,function(...t){b.push(...t)}(A);export default W;
undefined
/**
* Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.5.0 - Lightweight fuzzy-search (http://fusejs.io)
*

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

*/
var e,t;e=this,t=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){var t=function(){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(e){return!1}}();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function l(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e)||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 d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e){return Array.isArray?Array.isArray(e):"[object Array]"===b(e)}function g(e){return"string"==typeof e}function y(e){return"number"==typeof e}function p(e){return!0===e||!1===e||function(e){return m(e)&&null!==e}(e)&&"[object Boolean]"==b(e)}function m(t){return"object"===e(t)}function k(e){return null!=e}function M(e){return!e.trim().length}function b(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var x=function(e){return"Invalid value for key ".concat(e)},L=function(e){return"Pattern length exceeds max of ".concat(e,".")},S=Object.prototype.hasOwnProperty,w=function(){function e(n){var r=this;t(this,e),this._keys=[],this._keyMap={};var i=0;n.forEach((function(e){var t=_(e);i+=t.weight,r._keys.push(t),r._keyMap[t.id]=t,i+=t.weight})),this._keys.forEach((function(e){e.weight/=i}))}return r(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function _(e){var t=null,n=null,r=null,i=1;if(g(e)||v(e))r=e,t=O(e),n=j(e);else{if(!S.call(e,"name"))throw new Error(function(e){return"Missing ".concat(e," property in key")}("name"));var o=e.name;if(r=o,S.call(e,"weight")&&(i=e.weight)<=0)throw new Error(function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")}(o));t=O(o),n=j(o)}return{path:t,id:n,weight:i,src:r}}function O(e){return v(e)?e:e.split(".")}function j(e){return v(e)?e.join("."):e}var A=c({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,i,o){if(k(t))if(i[o]){var c=t[i[o]];if(!k(c))return;if(o===i.length-1&&(g(c)||y(c)||p(c)))n.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)}(c));else if(v(c)){r=!0;for(var a=0,s=c.length;a<s;a+=1)e(c[a],i,o+1)}else i.length&&e(c,i,o+1)}else n.push(t)}(e,g(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1}),I=/[^ ]+/g;function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=new Map,n=Math.pow(10,e);return{get:function(e){var r=e.match(I).length;if(t.has(r))return t.get(r);var i=1/Math.sqrt(r),o=parseFloat(Math.round(i*n)/n);return t.set(r,o),o},clear:function(){t.clear()}}}var E=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,i=void 0===r?A.getFn:r;t(this,e),this.norm=C(3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return r(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,g(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();g(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(k(e)&&!M(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach((function(t,i){var o=n.getFn(e,t.path);if(k(o))if(v(o))!function(){for(var e=[],t=[{nestedArrIndex:-1,value:o}];t.length;){var c=t.pop(),a=c.nestedArrIndex,s=c.value;if(k(s))if(g(s)&&!M(s)){var u={v:s,i:a,n:n.norm.get(s)};e.push(u)}else v(s)&&s.forEach((function(e,n){t.push({nestedArrIndex:n,value:e})}))}r.$[i]=e}();else if(!M(o)){var c={v:o,n:n.norm.get(o)};r.$[i]=c}})),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?A.getFn:r,o=new E({getFn:i});return o.setKeys(e.map(_)),o.setSources(t),o.create(),o}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,c=t.expectedLocation,a=void 0===c?0:c,s=t.distance,u=void 0===s?A.distance:s,h=t.ignoreLocation,f=void 0===h?A.ignoreLocation:h,l=r/e.length;if(f)return l;var d=Math.abs(a-o);return u?l+d/u:d?1:l}function F(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.minMatchCharLength,n=[],r=-1,i=-1,o=0,c=e.length;o<c;o+=1){var a=e[o];a&&-1===r?r=o:a||-1===r||((i=o-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}function P(e){for(var t={},n=0,r=e.length;n<r;n+=1){var i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var N=function(){function e(n){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,c=void 0===o?A.location:o,a=i.threshold,s=void 0===a?A.threshold:a,u=i.distance,h=void 0===u?A.distance:u,f=i.includeMatches,l=void 0===f?A.includeMatches:f,d=i.findAllMatches,v=void 0===d?A.findAllMatches:d,g=i.minMatchCharLength,y=void 0===g?A.minMatchCharLength:g,p=i.isCaseSensitive,m=void 0===p?A.isCaseSensitive:p,k=i.ignoreLocation,M=void 0===k?A.ignoreLocation:k;if(t(this,e),this.options={location:c,threshold:s,distance:h,includeMatches:l,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:m,ignoreLocation:M},this.pattern=m?n:n.toLowerCase(),this.chunks=[],this.pattern.length){var b=function(e,t){r.chunks.push({pattern:e,alphabet:P(e),startIndex:t})},x=this.pattern.length;if(x>32){for(var L=0,S=x%32,w=x-S;L<w;)b(this.pattern.substr(L,32),L),L+=32;if(S){var _=x-32;b(this.pattern.substr(_),_)}}else b(this.pattern,0)}}return r(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return r&&(i.indices=[[0,e.length-1]]),i}var o=this.options,c=o.location,a=o.distance,s=o.threshold,u=o.findAllMatches,h=o.minMatchCharLength,f=o.ignoreLocation,d=[],v=0,g=!1;this.chunks.forEach((function(t){var n=t.pattern,i=t.alphabet,o=t.startIndex,y=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?A.location:i,c=r.distance,a=void 0===c?A.distance:c,s=r.threshold,u=void 0===s?A.threshold:s,h=r.findAllMatches,f=void 0===h?A.findAllMatches:h,l=r.minMatchCharLength,d=void 0===l?A.minMatchCharLength:l,v=r.includeMatches,g=void 0===v?A.includeMatches:v,y=r.ignoreLocation,p=void 0===y?A.ignoreLocation:y;if(t.length>32)throw new Error(L(32));for(var m,k=t.length,M=e.length,b=Math.max(0,Math.min(o,M)),x=u,S=b,w=d>1||g,_=w?Array(M):[];(m=e.indexOf(t,S))>-1;){var O=R(t,{currentLocation:m,expectedLocation:b,distance:a,ignoreLocation:p});if(x=Math.min(O,x),S=m+k,w)for(var j=0;j<k;)_[m+j]=1,j+=1}S=-1;for(var I=[],C=1,E=k+M,$=1<<k-1,P=0;P<k;P+=1){for(var N=0,D=E;N<D;){var z=R(t,{errors:P,currentLocation:b+D,expectedLocation:b,distance:a,ignoreLocation:p});z<=x?N=D:E=D,D=Math.floor((E-N)/2+N)}E=D;var K=Math.max(1,b-D+1),q=f?M:Math.min(b+D,M)+k,W=Array(q+2);W[q+1]=(1<<P)-1;for(var J=q;J>=K;J-=1){var T=J-1,U=n[e.charAt(T)];if(w&&(_[T]=+!!U),W[J]=(W[J+1]<<1|1)&U,P&&(W[J]|=(I[J+1]|I[J])<<1|1|I[J+1]),W[J]&$&&(C=R(t,{errors:P,currentLocation:T,expectedLocation:b,distance:a,ignoreLocation:p}))<=x){if(x=C,(S=T)<=b)break;K=Math.max(1,2*b-S)}}var V=R(t,{errors:P+1,currentLocation:b,expectedLocation:b,distance:a,ignoreLocation:p});if(V>x)break;I=W}var B={isMatch:S>=0,score:Math.max(.001,C)};if(w){var G=F(_,d);G.length?g&&(B.indices=G):B.isMatch=!1}return B}(e,n,i,{location:c+o,distance:a,threshold:s,findAllMatches:u,minMatchCharLength:h,includeMatches:r,ignoreLocation:f}),p=y.isMatch,m=y.score,k=y.indices;p&&(g=!0),v+=m,p&&k&&(d=[].concat(l(d),l(k)))}));var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=d),y}}]),e}(),D=function(){function e(n){t(this,e),this.pattern=n}return r(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return z(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return z(e,this.singleRegex)}}]),e}();function z(e,t){var n=e.match(t);return n?n[1]:null}var K=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),i}(D),q=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),i}(D),W=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),i}(D),J=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),i}(D),T=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),i}(D),U=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),i}(D),V=function(e){a(i,e);var n=f(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=o.location,a=void 0===c?A.location:c,s=o.threshold,u=void 0===s?A.threshold:s,h=o.distance,f=void 0===h?A.distance:h,l=o.includeMatches,d=void 0===l?A.includeMatches:l,v=o.findAllMatches,g=void 0===v?A.findAllMatches:v,y=o.minMatchCharLength,p=void 0===y?A.minMatchCharLength:y,m=o.isCaseSensitive,k=void 0===m?A.isCaseSensitive:m,M=o.ignoreLocation,b=void 0===M?A.ignoreLocation:M;return t(this,i),(r=n.call(this,e))._bitapSearch=new N(e,{location:a,threshold:u,distance:f,includeMatches:d,findAllMatches:g,minMatchCharLength:p,isCaseSensitive:k,ignoreLocation:b}),r}return r(i,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),i}(D),B=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),i}(D),G=[K,B,W,J,U,T,q,V],H=G.length,Q=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var n=e.trim().split(Q).filter((function(e){return e&&!!e.trim()})),r=[],i=0,o=n.length;i<o;i+=1){for(var c=n[i],a=!1,s=-1;!a&&++s<H;){var u=G[s],h=u.isMultiMatch(c);h&&(r.push(new u(h,t)),a=!0)}if(!a)for(s=-1;++s<H;){var f=G[s],l=f.isSingleMatch(c);if(l){r.push(new f(l,t));break}}}return r}))}var Y=new Set([V.type,B.type]),Z=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.isCaseSensitive,o=void 0===i?A.isCaseSensitive:i,c=r.includeMatches,a=void 0===c?A.includeMatches:c,s=r.minMatchCharLength,u=void 0===s?A.minMatchCharLength:s,h=r.ignoreLocation,f=void 0===h?A.ignoreLocation:h,l=r.findAllMatches,d=void 0===l?A.findAllMatches:l,v=r.location,g=void 0===v?A.location:v,y=r.threshold,p=void 0===y?A.threshold:y,m=r.distance,k=void 0===m?A.distance:m;t(this,e),this.query=null,this.options={isCaseSensitive:o,includeMatches:a,minMatchCharLength:u,findAllMatches:d,ignoreLocation:f,location:g,threshold:p,distance:k},this.pattern=o?n:n.toLowerCase(),this.query=X(this.pattern,this.options)}return r(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,o=[],c=0,a=0,s=t.length;a<s;a+=1){var u=t[a];o.length=0,i=0;for(var h=0,f=u.length;h<f;h+=1){var d=u[h],v=d.search(e),g=v.isMatch,y=v.indices,p=v.score;if(!g){c=0,i=0,o.length=0;break}if(i+=1,c+=p,r){var m=d.constructor.type;Y.has(m)?o=[].concat(l(o),l(y)):o.push(y)}}if(i){var k={isMatch:!0,score:c/i};return r&&(k.indices=o),k}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(e,t){return t.useExtendedSearch}}]),e}(),ee=[];function te(e,t){for(var n=0,r=ee.length;n<r;n+=1){var i=ee[n];if(i.condition(e,t))return new i(e,t)}return new N(e,t)}var ne="$and",re="$or",ie="$path",oe="$val",ce=function(e){return!(!e[ne]&&!e[re])},ae=function(e){return!!e[ie]},se=function(e){return!v(e)&&m(e)&&!ce(e)},ue=function(e){return i({},ne,Object.keys(e).map((function(t){return i({},t,e[t])})))};function he(e,t){var n=t.ignoreFieldNorm,r=void 0===n?A.ignoreFieldNorm:n;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var n=e.key,i=e.norm,o=e.score,c=n?n.weight:null;t*=Math.pow(0===o&&c?Number.EPSILON:o,(c||1)*(r?1:i))})),e.score=t}))}function fe(e,t){var n=e.matches;t.matches=[],k(n)&&n.forEach((function(e){if(k(e.indices)&&e.indices.length){var n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.src),e.idx>-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function le(e,t){t.score=e.score}function de(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?A.includeMatches:r,o=n.includeScore,c=void 0===o?A.includeScore:o,a=[];return i&&a.push(fe),c&&a.push(le),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach((function(t){t(e,r)})),r}))}var ve=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;t(this,e),this.options=c({},A,{},r),this.options.useExtendedSearch,this._keyStore=new w(this.options.keys),this.setCollection(n,i)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof E))throw new Error("Incorrect 'index' type");this._myIndex=t||$(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){k(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n<r;n+=1){var i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,c=i.includeScore,a=i.shouldSort,s=i.sortFn,u=i.ignoreFieldNorm,h=g(e)?g(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return he(h,{ignoreFieldNorm:u}),a&&h.sort(s),y(r)&&r>-1&&(h=h.slice(0,r)),de(h,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(e){var t=te(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(k(n)){var c=t.searchIn(n),a=c.isMatch,s=c.score,u=c.indices;a&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:u}]})}})),r}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.auto,i=void 0===r||r,o=function e(n){var r=Object.keys(n),o=ae(n);if(!o&&r.length>1&&!ce(n))return e(ue(n));if(se(n)){var c=o?n[ie]:r[0],a=o?n[oe]:n[c];if(!g(a))throw new Error(x(c));var s={keyId:j(c),pattern:a};return i&&(s.searcher=te(a,t)),s}var u={children:[],operator:r[0]};return r.forEach((function(t){var r=n[t];v(r)&&r.forEach((function(t){u.children.push(e(t))}))})),u};return ce(e)||(e=ue(e)),o(e)}(e,this.options),r=this._myIndex.records,i={},o=[];return r.forEach((function(e){var r=e.$,c=e.i;if(k(r)){var a=function e(n,r,i){if(!n.children){var o=n.keyId,c=n.searcher,a=t._findMatches({key:t._keyStore.get(o),value:t._myIndex.getValueForItemAtKeyId(r,o),searcher:c});return a&&a.length?[{idx:i,item:r,matches:a}]:[]}switch(n.operator){case ne:for(var s=[],u=0,h=n.children.length;u<h;u+=1){var f=e(n.children[u],r,i);if(!f.length)return[];s.push.apply(s,l(f))}return s;case re:for(var d=[],v=0,g=n.children.length;v<g;v+=1){var y=e(n.children[v],r,i);if(y.length){d.push.apply(d,l(y));break}}return d}}(n,r,c);a.length&&(i[c]||(i[c]={idx:c,item:r,matches:[]},o.push(i[c])),a.forEach((function(e){var t,n=e.matches;(t=i[c].matches).push.apply(t,l(n))})))}})),o}},{key:"_searchObjectList",value:function(e){var t=this,n=te(e,this.options),r=this._myIndex,i=r.keys,o=r.records,c=[];return o.forEach((function(e){var r=e.$,o=e.i;if(k(r)){var a=[];i.forEach((function(e,i){a.push.apply(a,l(t._findMatches({key:e,value:r[i],searcher:n})))})),a.length&&c.push({idx:o,item:r,matches:a})}})),c}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!k(n))return[];var i=[];if(v(n))n.forEach((function(e){var n=e.v,o=e.i,c=e.n;if(k(n)){var a=r.searchIn(n),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:n,idx:o,norm:c,indices:h})}}));else{var o=n.v,c=n.n,a=r.searchIn(o),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:o,norm:c,indices:h})}return i}}]),e}();return ve.version="6.4.6",ve.createIndex=$,ve.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?A.getFn:n,i=e.keys,o=e.records,c=new E({getFn:r});return c.setKeys(i),c.setIndexRecords(o),c},ve.config=A,function(){ee.push.apply(ee,arguments)}(Z),ve},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t();
undefined

@@ -13,6 +13,7 @@ {

"typings": "./dist/fuse.d.ts",
"sideEffects": false,
"files": [
"dist"
],
"version": "6.4.6",
"version": "6.5.0",
"description": "Lightweight fuzzy-search",

@@ -41,3 +42,4 @@ "license": "Apache-2.0",

"docs:build": "vuepress build docs",
"docs:release": "./scripts/deploy-docs.sh"
"docs:release": "./scripts/deploy-docs.sh",
"prepare": "husky install"
},

@@ -63,44 +65,43 @@ "standard-version": {

"@babel/core": "^7.3.4",
"@babel/plugin-proposal-object-rest-spread": "7.9.0",
"@babel/preset-env": "7.3.4",
"@babel/preset-typescript": "7.9.0",
"@commitlint/cli": "^9.0.1",
"@commitlint/config-conventional": "^9.0.1",
"@rollup/plugin-node-resolve": "^7.1.1",
"@rollup/plugin-replace": "^2.3.1",
"@types/jest": "25.1.4",
"@babel/eslint-parser": "^7.16.3",
"@babel/plugin-proposal-object-rest-spread": "7.16.0",
"@babel/preset-env": "7.16.0",
"@babel/preset-typescript": "7.16.0",
"@commitlint/cli": "^14.1.0",
"@commitlint/config-conventional": "^14.1.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-node-resolve": "^13.0.6",
"@rollup/plugin-replace": "^3.0.0",
"@types/jest": "27.0.2",
"@vuepress/plugin-google-analytics": "^1.4.0",
"@vuepress/plugin-register-components": "^1.5.2",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.0.5",
"codemirror": "5.52.2",
"eslint": "6.8.0",
"eslint-config-prettier": "6.10.1",
"eslint-plugin-vue": "7.0.0-alpha.0",
"faker": "4.1.0",
"husky": "^4.3.6",
"jest": "^25.1.0",
"prettier": "2.0.2",
"codemirror": "5.63.3",
"eslint": "8.2.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-vue": "8.0.3",
"faker": "5.5.3",
"husky": "^7.0.0",
"jest": "^27.3.1",
"prettier": "2.4.1",
"replace-in-file": "^6.1.0",
"rimraf": "3.0.2",
"rollup": "2.1.0",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-copy": "3.3.0",
"standard-version": "^8.0.0",
"terser-webpack-plugin": "2.3.5",
"typescript": "^3.8.3",
"rollup": "2.60.0",
"rollup-plugin-copy": "3.4.0",
"standard-version": "^9.3.2",
"terser-webpack-plugin": "5.2.5",
"typescript": "^4.4.4",
"vue-codemirror": "^4.0.6",
"vue-eslint-parser": "^7.0.0",
"vue-eslint-parser": "^8.0.1",
"vuepress": "^1.4.0",
"vuepress-plugin-element-tabs": "^0.2.8",
"vuepress-plugin-google-adsense": "^0.1.1",
"vuepress-plugin-smooth-scroll": "^0.0.9",
"vuepress-plugin-social-share": "^0.2.1",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11"
"vuepress-plugin-google-adsense": "^0.2.1",
"vuepress-plugin-smooth-scroll": "^0.0.10",
"vuepress-plugin-social-share": "^1.1.0",
"webpack": "^5.64.0",
"webpack-cli": "^4.9.1"
},
"engines": {
"node": ">=10"
},
"dependencies": {}
"node": ">=14"
}
}

@@ -20,2 +20,19 @@ # Fuse.js

<h3 align="center">Silver Sponsors</h3>
<!--Silver start-->
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://www.worksome.com" target="_blank">
<img width="222px" src="https://raw.githubusercontent.com/krisk/Fuse/7a0d77d85ac90063575613b6a738f418b624357f/docs/.vuepress/public/assets/img/sponsors/worksome.svg">
</a>
</td>
</tr>
</body>
</table>
<!--Silver end-->
---
## Introduction

@@ -31,3 +48,2 @@

To check out a [live demo](https://fusejs.io/demo.html) and docs, visit [fusejs.io](https://fusejs.io).

@@ -34,0 +50,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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