Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@orchidjs/sifter

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orchidjs/sifter - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

3

.config/tsconfig.json

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

"checkJs": true,
"strict": false,
"strict": true,
"target": "esnext",
"module": "esnext",
"noUnusedLocals": true,
"noImplicitAny":false,

@@ -13,0 +12,0 @@ "declaration": true,

@@ -23,2 +23,4 @@ /*! sifter.js | https://github.com/orchidjs/sifter.js | Apache License (v2) */

class Sifter {
// []|{};
/**

@@ -29,5 +31,2 @@ * Textually searches arrays and hashes of objects

*
* @constructor
* @param {array|object} items
* @param {object} items
*/

@@ -76,3 +75,2 @@ constructor(items, settings) {

if (respect_word_boundaries) regex = "\\b" + regex;
regex = new RegExp(regex, 'i');
}

@@ -82,3 +80,3 @@

string: word,
regex: regex,
regex: regex ? new RegExp(regex, 'i') : null,
field: field

@@ -206,6 +204,6 @@ });

_getSortFunction(search) {
var i, n, sort_fld, sort_flds_count, multiplier, implicit_score;
var i, n, implicit_score;
const self = this,
options = search.options,
sort = !search.query && options.sort_empty || options.sort,
sort = !search.query && options.sort_empty ? options.sort_empty : options.sort,
sort_flds = [],

@@ -217,5 +215,2 @@ multipliers = [];

*
* @param {string} name
* @param {object} result
* @return {string}
*/

@@ -269,3 +264,3 @@

sort_flds_count = sort_flds.length;
const sort_flds_count = sort_flds.length;

@@ -275,4 +270,4 @@ if (!sort_flds_count) {

} else if (sort_flds_count === 1) {
sort_fld = sort_flds[0].field;
multiplier = multipliers[0];
const sort_fld = sort_flds[0].field;
const multiplier = multipliers[0];
return function (a, b) {

@@ -310,16 +305,15 @@ return multiplier * utils.cmp(get_field(sort_fld, a), get_field(sort_fld, b));

utils.propToArray(options, 'fields');
const fields = [];
options.fields.forEach(field => {
if (typeof field == 'string') {
field = {
field: field,
weight: 1
};
}
if (Array.isArray(options.fields) && typeof options.fields[0] !== 'object') {
var fields = [];
options.fields.forEach(fld_name => {
fields.push({
field: fld_name
});
});
options.fields = fields;
}
options.fields.forEach(field_params => {
weights[field_params.field] = 'weight' in field_params ? field_params.weight : 1;
fields.push(field);
weights[field.field] = 'weight' in field ? field.weight : 1;
});
options.fields = fields;
}

@@ -347,4 +341,2 @@

search;
var fn_sort;
var fn_score;
search = this.prepareSearch(query, options);

@@ -354,4 +346,5 @@ options = search.options;

fn_score = options.score || self._getScoreFunction(search); // perform search and sort
const fn_score = options.score || self._getScoreFunction(search); // perform search and sort
if (query.length) {

@@ -377,3 +370,4 @@ utils.iterate(self.items, (item, id) => {

fn_sort = self._getSortFunction(search);
const fn_sort = self._getSortFunction(search);
if (fn_sort) search.items.sort(fn_sort); // apply limits

@@ -380,0 +374,0 @@

@@ -8,3 +8,4 @@ /*! sifter.js | https://github.com/orchidjs/sifter.js | Apache License (v2) */

// @ts-ignore
// @ts-ignore TS2691 "An import path cannot end with a '.ts' extension"
/**

@@ -16,3 +17,2 @@ * A property getter resolving dot-notation

*/
function getAttr(obj, name) {

@@ -31,5 +31,6 @@ if (!obj) return;

if (!obj) return;
var names = name.split(".");
var part,
names = name.split(".");
while (names.length && (obj = obj[names.shift()]));
while ((part = names.shift()) && (obj = obj[part]));

@@ -42,4 +43,2 @@ return obj;

*
* @param {object} token
* @return {number}
*/

@@ -81,3 +80,2 @@

*
* @param {array|object} object
*/

@@ -84,0 +82,0 @@

@@ -21,2 +21,4 @@ /*! sifter.js | https://github.com/orchidjs/sifter.js | Apache License (v2) */

class Sifter {
// []|{};
/**

@@ -27,5 +29,2 @@ * Textually searches arrays and hashes of objects

*
* @constructor
* @param {array|object} items
* @param {object} items
*/

@@ -74,3 +73,2 @@ constructor(items, settings) {

if (respect_word_boundaries) regex = "\\b" + regex;
regex = new RegExp(regex, 'i');
}

@@ -80,3 +78,3 @@

string: word,
regex: regex,
regex: regex ? new RegExp(regex, 'i') : null,
field: field

@@ -204,6 +202,6 @@ });

_getSortFunction(search) {
var i, n, sort_fld, sort_flds_count, multiplier, implicit_score;
var i, n, implicit_score;
const self = this,
options = search.options,
sort = !search.query && options.sort_empty || options.sort,
sort = !search.query && options.sort_empty ? options.sort_empty : options.sort,
sort_flds = [],

@@ -215,5 +213,2 @@ multipliers = [];

*
* @param {string} name
* @param {object} result
* @return {string}
*/

@@ -267,3 +262,3 @@

sort_flds_count = sort_flds.length;
const sort_flds_count = sort_flds.length;

@@ -273,4 +268,4 @@ if (!sort_flds_count) {

} else if (sort_flds_count === 1) {
sort_fld = sort_flds[0].field;
multiplier = multipliers[0];
const sort_fld = sort_flds[0].field;
const multiplier = multipliers[0];
return function (a, b) {

@@ -308,16 +303,15 @@ return multiplier * cmp(get_field(sort_fld, a), get_field(sort_fld, b));

propToArray(options, 'fields');
const fields = [];
options.fields.forEach(field => {
if (typeof field == 'string') {
field = {
field: field,
weight: 1
};
}
if (Array.isArray(options.fields) && typeof options.fields[0] !== 'object') {
var fields = [];
options.fields.forEach(fld_name => {
fields.push({
field: fld_name
});
});
options.fields = fields;
}
options.fields.forEach(field_params => {
weights[field_params.field] = 'weight' in field_params ? field_params.weight : 1;
fields.push(field);
weights[field.field] = 'weight' in field ? field.weight : 1;
});
options.fields = fields;
}

@@ -345,4 +339,2 @@

search;
var fn_sort;
var fn_score;
search = this.prepareSearch(query, options);

@@ -352,4 +344,5 @@ options = search.options;

fn_score = options.score || self._getScoreFunction(search); // perform search and sort
const fn_score = options.score || self._getScoreFunction(search); // perform search and sort
if (query.length) {

@@ -375,3 +368,4 @@ iterate(self.items, (item, id) => {

fn_sort = self._getSortFunction(search);
const fn_sort = self._getSortFunction(search);
if (fn_sort) search.items.sort(fn_sort); // apply limits

@@ -378,0 +372,0 @@

/*! sifter.js | https://github.com/orchidjs/sifter.js | Apache License (v2) */
import { asciifold } from './diacritics.js';
// @ts-ignore
// @ts-ignore TS2691 "An import path cannot end with a '.ts' extension"
/**

@@ -11,3 +12,2 @@ * A property getter resolving dot-notation

*/
function getAttr(obj, name) {

@@ -26,5 +26,6 @@ if (!obj) return;

if (!obj) return;
var names = name.split(".");
var part,
names = name.split(".");
while (names.length && (obj = obj[names.shift()]));
while ((part = names.shift()) && (obj = obj[part]));

@@ -37,4 +38,2 @@ return obj;

*
* @param {object} token
* @return {number}
*/

@@ -76,3 +75,2 @@

*
* @param {array|object} object
*/

@@ -79,0 +77,0 @@

@@ -122,3 +122,4 @@ /*! sifter.js | https://github.com/orchidjs/sifter.js | Apache License (v2) */

// @ts-ignore
// @ts-ignore TS2691 "An import path cannot end with a '.ts' extension"
/**

@@ -130,3 +131,2 @@ * A property getter resolving dot-notation

*/
function getAttr(obj, name) {

@@ -145,5 +145,6 @@ if (!obj) return;

if (!obj) return;
var names = name.split(".");
var part,
names = name.split(".");
while (names.length && (obj = obj[names.shift()]));
while ((part = names.shift()) && (obj = obj[part]));

@@ -156,4 +157,2 @@ return obj;

*
* @param {object} token
* @return {number}
*/

@@ -195,3 +194,2 @@

*
* @param {array|object} object
*/

@@ -238,2 +236,4 @@

class Sifter {
// []|{};
/**

@@ -244,5 +244,2 @@ * Textually searches arrays and hashes of objects

*
* @constructor
* @param {array|object} items
* @param {object} items
*/

@@ -291,3 +288,2 @@ constructor(items, settings) {

if (respect_word_boundaries) regex = "\\b" + regex;
regex = new RegExp(regex, 'i');
}

@@ -297,3 +293,3 @@

string: word,
regex: regex,
regex: regex ? new RegExp(regex, 'i') : null,
field: field

@@ -421,6 +417,6 @@ });

_getSortFunction(search) {
var i, n, sort_fld, sort_flds_count, multiplier, implicit_score;
var i, n, implicit_score;
const self = this,
options = search.options,
sort = !search.query && options.sort_empty || options.sort,
sort = !search.query && options.sort_empty ? options.sort_empty : options.sort,
sort_flds = [],

@@ -432,5 +428,2 @@ multipliers = [];

*
* @param {string} name
* @param {object} result
* @return {string}
*/

@@ -484,3 +477,3 @@

sort_flds_count = sort_flds.length;
const sort_flds_count = sort_flds.length;

@@ -490,4 +483,4 @@ if (!sort_flds_count) {

} else if (sort_flds_count === 1) {
sort_fld = sort_flds[0].field;
multiplier = multipliers[0];
const sort_fld = sort_flds[0].field;
const multiplier = multipliers[0];
return function (a, b) {

@@ -525,16 +518,15 @@ return multiplier * cmp(get_field(sort_fld, a), get_field(sort_fld, b));

propToArray(options, 'fields');
const fields = [];
options.fields.forEach(field => {
if (typeof field == 'string') {
field = {
field: field,
weight: 1
};
}
if (Array.isArray(options.fields) && typeof options.fields[0] !== 'object') {
var fields = [];
options.fields.forEach(fld_name => {
fields.push({
field: fld_name
});
});
options.fields = fields;
}
options.fields.forEach(field_params => {
weights[field_params.field] = 'weight' in field_params ? field_params.weight : 1;
fields.push(field);
weights[field.field] = 'weight' in field ? field.weight : 1;
});
options.fields = fields;
}

@@ -562,4 +554,2 @@

search;
var fn_sort;
var fn_score;
search = this.prepareSearch(query, options);

@@ -569,4 +559,5 @@ options = search.options;

fn_score = options.score || self._getScoreFunction(search); // perform search and sort
const fn_score = options.score || self._getScoreFunction(search); // perform search and sort
if (query.length) {

@@ -592,3 +583,4 @@ iterate(self.items, (item, id) => {

fn_sort = self._getSortFunction(search);
const fn_sort = self._getSortFunction(search);
if (fn_sort) search.items.sort(fn_sort); // apply limits

@@ -595,0 +587,0 @@

@@ -8,5 +8,5 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).sifter=t()}(this,(function(){"use strict"

for(let e in r)r.hasOwnProperty(e)&&(t=t.replace(new RegExp(e,"g"),"["+r[e]+"]"))
return t}function i(e,t){if(e)return e[t]}function o(e,t){if(e){for(var r=t.split(".");r.length&&(e=e[r.shift()]););return e}}function s(e,t,r){var n,i
return e?-1===(i=(e+="").search(t.regex))?0:(n=t.string.length/e.length,0===i&&(n+=.5),n*r):0}function u(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function f(e,t){var r=e[t]
r&&!Array.isArray(r)&&(e[t]=[r])}function c(e,t){if(Array.isArray(e))e.forEach(t)
return t}function i(e,t){if(e)return e[t]}function o(e,t){if(e){for(var r,n=t.split(".");(r=n.shift())&&(e=e[r]););return e}}function s(e,t,r){var n,i
return e?-1===(i=(e+="").search(t.regex))?0:(n=t.string.length/e.length,0===i&&(n+=.5),n*r):0}function u(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function c(e,t){var r=e[t]
r&&!Array.isArray(r)&&(e[t]=[r])}function f(e,t){if(Array.isArray(e))e.forEach(t)
else for(var r in e)e.hasOwnProperty(r)&&t(e[r],r)}function l(e,r){return"number"==typeof e&&"number"==typeof r?e>r?1:e<r?-1:0:(e=t(e+"").toLowerCase())>(r=t(r+"").toLowerCase())?1:r>e?-1:0}

@@ -30,4 +30,4 @@ /**

var s
return r&&(s=new RegExp("^("+Object.keys(r).map(u).join("|")+"):(.*)$")),o.forEach((e=>{let r,o=null,f=null
s&&(r=e.match(s))&&(o=r[1],e=r[2]),e.length>0&&(f=u(e),this.settings.diacritics&&(f=n(f)),t&&(f="\\b"+f),f=new RegExp(f,"i")),i.push({string:e,regex:f,field:o})})),i}getScoreFunction(e,t){var r=this.prepareSearch(e,t)
return r&&(s=new RegExp("^("+Object.keys(r).map(u).join("|")+"):(.*)$")),o.forEach((e=>{let r,o=null,c=null
s&&(r=e.match(s))&&(o=r[1],e=r[2]),e.length>0&&(c=u(e),this.settings.diacritics&&(c=n(c)),t&&(c="\\b"+c)),i.push({string:e,regex:c?new RegExp(c,"i"):null,field:o})})),i}getScoreFunction(e,t){var r=this.prepareSearch(e,t)
return this._getScoreFunction(r)}_getScoreFunction(e){const t=e.tokens,r=t.length

@@ -37,23 +37,30 @@ if(!r)return function(){return 0}

if(!o)return function(){return 1}
const f=1===o?function(e,t){const r=n[0].field
const c=1===o?function(e,t){const r=n[0].field
return s(u(t,r),e,i[r])}:function(e,t){var r=0
if(e.field){const n=u(t,e.field)
!e.regex&&n?r+=1/o:r+=s(n,e,1)}else c(i,((n,i)=>{r+=s(u(t,i),e,n)}))
!e.regex&&n?r+=1/o:r+=s(n,e,1)}else f(i,((n,i)=>{r+=s(u(t,i),e,n)}))
return r/o}
return 1===r?function(e){return f(t[0],e)}:"and"===e.options.conjunction?function(e){for(var n,i=0,o=0;i<r;i++){if((n=f(t[i],e))<=0)return 0
return 1===r?function(e){return c(t[0],e)}:"and"===e.options.conjunction?function(e){for(var n,i=0,o=0;i<r;i++){if((n=c(t[i],e))<=0)return 0
o+=n}return o/r}:function(e){var n=0
return c(t,(t=>{n+=f(t,e)})),n/r}}getSortFunction(e,t){var r=this.prepareSearch(e,t)
return this._getSortFunction(r)}_getSortFunction(e){var t,r,n,i,o,s
const u=this,f=e.options,c=!e.query&&f.sort_empty||f.sort,a=[],h=[],g=function(t,r){return"$score"===t?r.score:e.getAttrFn(u.items[r.id],t)}
if(c)for(t=0,r=c.length;t<r;t++)(e.query||"$score"!==c[t].field)&&a.push(c[t])
if(e.query){for(s=!0,t=0,r=a.length;t<r;t++)if("$score"===a[t].field){s=!1
break}s&&a.unshift({field:"$score",direction:"desc"})}else for(t=0,r=a.length;t<r;t++)if("$score"===a[t].field){a.splice(t,1)
break}for(t=0,r=a.length;t<r;t++)h.push("desc"===a[t].direction?-1:1)
return(i=a.length)?1===i?(n=a[0].field,o=h[0],function(e,t){return o*l(g(n,e),g(n,t))}):function(e,t){var r,n,o
for(r=0;r<i;r++)if(o=a[r].field,n=h[r]*l(g(o,e),g(o,t)))return n
return 0}:null}prepareSearch(e,r){const n={}
return f(t,(t=>{n+=c(t,e)})),n/r}}getSortFunction(e,t){var r=this.prepareSearch(e,t)
return this._getSortFunction(r)}_getSortFunction(e){var t,r,n
const i=this,o=e.options,s=!e.query&&o.sort_empty?o.sort_empty:o.sort,u=[],c=[],f=function(t,r){return"$score"===t?r.score:e.getAttrFn(i.items[r.id],t)}
if(s)for(t=0,r=s.length;t<r;t++)(e.query||"$score"!==s[t].field)&&u.push(s[t])
if(e.query){for(n=!0,t=0,r=u.length;t<r;t++)if("$score"===u[t].field){n=!1
break}n&&u.unshift({field:"$score",direction:"desc"})}else for(t=0,r=u.length;t<r;t++)if("$score"===u[t].field){u.splice(t,1)
break}for(t=0,r=u.length;t<r;t++)c.push("desc"===u[t].direction?-1:1)
const a=u.length
if(a){if(1===a){const e=u[0].field,t=c[0]
return function(r,n){return t*l(f(e,r),f(e,n))}}return function(e,t){var r,n,i
for(r=0;r<a;r++)if(i=u[r].field,n=c[r]*l(f(i,e),f(i,t)))return n
return 0}}return null}prepareSearch(e,r){const n={}
var s=Object.assign({},r)
if(f(s,"sort"),f(s,"sort_empty"),s.fields){if(f(s,"fields"),Array.isArray(s.fields)&&"object"!=typeof s.fields[0]){var u=[]
s.fields.forEach((e=>{u.push({field:e})})),s.fields=u}s.fields.forEach((e=>{n[e.field]="weight"in e?e.weight:1}))}return{options:s,query:e=t(e+"").toLowerCase().trim(),tokens:this.tokenize(e,s.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:s.nesting?o:i}}search(e,t){var r,n,i,o,s=this
return n=this.prepareSearch(e,t),t=n.options,e=n.query,o=t.score||s._getScoreFunction(n),e.length?c(s.items,((e,i)=>{r=o(e),(!1===t.filter||r>0)&&n.items.push({score:r,id:i})})):c(s.items,((e,t)=>{n.items.push({score:1,id:t})})),(i=s._getSortFunction(n))&&n.items.sort(i),n.total=n.items.length,"number"==typeof t.limit&&(n.items=n.items.slice(0,t.limit)),n}}}))
if(c(s,"sort"),c(s,"sort_empty"),s.fields){c(s,"fields")
const e=[]
s.fields.forEach((t=>{"string"==typeof t&&(t={field:t,weight:1}),e.push(t),n[t.field]="weight"in t?t.weight:1})),s.fields=e}return{options:s,query:e=t(e+"").toLowerCase().trim(),tokens:this.tokenize(e,s.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:s.nesting?o:i}}search(e,t){var r,n,i=this
n=this.prepareSearch(e,t),t=n.options,e=n.query
const o=t.score||i._getScoreFunction(n)
e.length?f(i.items,((e,i)=>{r=o(e),(!1===t.filter||r>0)&&n.items.push({score:r,id:i})})):f(i.items,((e,t)=>{n.items.push({score:1,id:t})}))
const s=i._getSortFunction(n)
return s&&n.items.sort(s),n.total=n.items.length,"number"==typeof t.limit&&(n.items=n.items.slice(0,t.limit)),n}}}))
//# sourceMappingURL=sifter.min.js.map
{"/var/www/html/github/sifter.js/lib/diacritics.ts": {"path":"/var/www/html/github/sifter.js/lib/diacritics.ts","statementMap":{"0":{"start":{"line":110,"column":18},"end":{"line":110,"column":null}},"1":{"start":{"line":142,"column":1},"end":{"line":142,"column":8}},"2":{"start":{"line":189,"column":21},"end":{"line":189,"column":null}},"3":{"start":{"line":198,"column":18},"end":{"line":198,"column":null}},"4":{"start":{"line":200,"column":1},"end":{"line":200,"column":12}},"5":{"start":{"line":202,"column":2},"end":{"line":221,"column":null}},"6":{"start":{"line":202,"column":14},"end":{"line":202,"column":25}},"7":{"start":{"line":203,"column":19},"end":{"line":203,"column":25}},"8":{"start":{"line":204,"column":16},"end":{"line":204,"column":25}},"9":{"start":{"line":206,"column":3},"end":{"line":209,"column":null}},"10":{"start":{"line":208,"column":4},"end":{"line":208,"column":null}},"11":{"start":{"line":211,"column":3},"end":{"line":211,"column":8}},"12":{"start":{"line":213,"column":3},"end":{"line":215,"column":null}},"13":{"start":{"line":214,"column":4},"end":{"line":214,"column":9}},"14":{"start":{"line":217,"column":3},"end":{"line":219,"column":null}},"15":{"start":{"line":218,"column":4},"end":{"line":218,"column":14}},"16":{"start":{"line":220,"column":3},"end":{"line":220,"column":13}},"17":{"start":{"line":226,"column":1},"end":{"line":226,"column":8}},"18":{"start":{"line":234,"column":32},"end":{"line":234,"column":null}},"19":{"start":{"line":237,"column":1},"end":{"line":239,"column":null}},"20":{"start":{"line":238,"column":2},"end":{"line":238,"column":12}},"21":{"start":{"line":241,"column":1},"end":{"line":245,"column":null}},"22":{"start":{"line":242,"column":2},"end":{"line":244,"column":null}},"23":{"start":{"line":243,"column":3},"end":{"line":243,"column":8}},"24":{"start":{"line":246,"column":1},"end":{"line":246,"column":8}}},"fnMap":{"0":{"name":"asciifold","decl":{"start":{"line":141,"column":16},"end":{"line":141,"column":26}},"loc":{"start":{"line":141,"column":44},"end":{"line":143,"column":null}}},"1":{"name":"generateDiacritics","decl":{"start":{"line":187,"column":16},"end":{"line":187,"column":51}},"loc":{"start":{"line":187,"column":51},"end":{"line":227,"column":null}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":200,"column":22},"end":{"line":200,"column":35}},"loc":{"start":{"line":200,"column":35},"end":{"line":222,"column":null}}},"3":{"name":"diacriticRegexPoints","decl":{"start":{"line":235,"column":16},"end":{"line":235,"column":37}},"loc":{"start":{"line":235,"column":57},"end":{"line":247,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":206,"column":3},"end":{"line":209,"column":null}},"type":"if","locations":[{"start":{"line":206,"column":3},"end":{"line":209,"column":null}},{"start":{"line":206,"column":3},"end":{"line":209,"column":null}}]},"1":{"loc":{"start":{"line":213,"column":3},"end":{"line":215,"column":null}},"type":"if","locations":[{"start":{"line":213,"column":3},"end":{"line":215,"column":null}},{"start":{"line":213,"column":3},"end":{"line":215,"column":null}}]},"2":{"loc":{"start":{"line":217,"column":3},"end":{"line":219,"column":null}},"type":"if","locations":[{"start":{"line":217,"column":3},"end":{"line":219,"column":null}},{"start":{"line":217,"column":3},"end":{"line":219,"column":null}}]},"3":{"loc":{"start":{"line":237,"column":1},"end":{"line":239,"column":null}},"type":"if","locations":[{"start":{"line":237,"column":1},"end":{"line":239,"column":null}},{"start":{"line":237,"column":1},"end":{"line":239,"column":null}}]},"4":{"loc":{"start":{"line":242,"column":2},"end":{"line":244,"column":null}},"type":"if","locations":[{"start":{"line":242,"column":2},"end":{"line":244,"column":null}},{"start":{"line":242,"column":2},"end":{"line":244,"column":null}}]}},"s":{"0":6,"1":146,"2":5,"3":5,"4":5,"5":115,"6":115,"7":4840,"8":4840,"9":4840,"10":1700,"11":3140,"12":3140,"13":65,"14":3140,"15":190,"16":3140,"17":5,"18":6,"19":41,"20":5,"21":41,"22":1558,"23":1558,"24":41},"f":{"0":146,"1":5,"2":115,"3":41},"b":{"0":[1700,3140],"1":[65,3075],"2":[190,2950],"3":[5,36],"4":[1558,0]}}
,"/var/www/html/github/sifter.js/lib/sifter.ts": {"path":"/var/www/html/github/sifter.js/lib/sifter.ts","statementMap":{"0":{"start":{"line":74,"column":30},"end":{"line":74,"column":null}},"1":{"start":{"line":75,"column":2},"end":{"line":75,"column":7}},"2":{"start":{"line":76,"column":2},"end":{"line":76,"column":7}},"3":{"start":{"line":85,"column":2},"end":{"line":85,"column":38}},"4":{"start":{"line":85,"column":31},"end":{"line":85,"column":38}},"5":{"start":{"line":87,"column":17},"end":{"line":87,"column":null}},"6":{"start":{"line":88,"column":16},"end":{"line":88,"column":21}},"7":{"start":{"line":91,"column":2},"end":{"line":93,"column":null}},"8":{"start":{"line":92,"column":3},"end":{"line":92,"column":14}},"9":{"start":{"line":95,"column":2},"end":{"line":95,"column":7}},"10":{"start":{"line":97,"column":15},"end":{"line":97,"column":null}},"11":{"start":{"line":98,"column":15},"end":{"line":98,"column":null}},"12":{"start":{"line":101,"column":3},"end":{"line":104,"column":null}},"13":{"start":{"line":102,"column":4},"end":{"line":102,"column":9}},"14":{"start":{"line":103,"column":4},"end":{"line":103,"column":8}},"15":{"start":{"line":106,"column":3},"end":{"line":113,"column":null}},"16":{"start":{"line":107,"column":4},"end":{"line":107,"column":9}},"17":{"start":{"line":108,"column":4},"end":{"line":110,"column":null}},"18":{"start":{"line":109,"column":5},"end":{"line":109,"column":10}},"19":{"start":{"line":111,"column":4},"end":{"line":111,"column":39}},"20":{"start":{"line":111,"column":34},"end":{"line":111,"column":39}},"21":{"start":{"line":112,"column":4},"end":{"line":112,"column":9}},"22":{"start":{"line":115,"column":3},"end":{"line":115,"column":9}},"23":{"start":{"line":122,"column":2},"end":{"line":122,"column":9}},"24":{"start":{"line":135,"column":15},"end":{"line":135,"column":20}},"25":{"start":{"line":136,"column":2},"end":{"line":136,"column":9}},"26":{"start":{"line":140,"column":18},"end":{"line":140,"column":null}},"27":{"start":{"line":141,"column":18},"end":{"line":141,"column":null}},"28":{"start":{"line":143,"column":2},"end":{"line":145,"column":null}},"29":{"start":{"line":144,"column":3},"end":{"line":144,"column":10}},"30":{"start":{"line":144,"column":23},"end":{"line":144,"column":30}},"31":{"start":{"line":147,"column":17},"end":{"line":147,"column":null}},"32":{"start":{"line":148,"column":14},"end":{"line":148,"column":null}},"33":{"start":{"line":149,"column":17},"end":{"line":149,"column":null}},"34":{"start":{"line":150,"column":15},"end":{"line":150,"column":null}},"35":{"start":{"line":152,"column":2},"end":{"line":154,"column":null}},"36":{"start":{"line":153,"column":3},"end":{"line":153,"column":10}},"37":{"start":{"line":153,"column":23},"end":{"line":153,"column":30}},"38":{"start":{"line":165,"column":23},"end":{"line":165,"column":1}},"39":{"start":{"line":168,"column":3},"end":{"line":173,"column":null}},"40":{"start":{"line":169,"column":4},"end":{"line":169,"column":11}},"41":{"start":{"line":170,"column":19},"end":{"line":170,"column":null}},"42":{"start":{"line":171,"column":5},"end":{"line":171,"column":12}},"43":{"start":{"line":175,"column":3},"end":{"line":175,"column":10}},"44":{"start":{"line":176,"column":14},"end":{"line":176,"column":null}},"45":{"start":{"line":179,"column":4},"end":{"line":195,"column":null}},"46":{"start":{"line":181,"column":19},"end":{"line":181,"column":29}},"47":{"start":{"line":183,"column":5},"end":{"line":187,"column":null}},"48":{"start":{"line":184,"column":6},"end":{"line":184,"column":9}},"49":{"start":{"line":186,"column":6},"end":{"line":186,"column":9}},"50":{"start":{"line":192,"column":5},"end":{"line":192,"column":12}},"51":{"start":{"line":193,"column":6},"end":{"line":193,"column":9}},"52":{"start":{"line":197,"column":4},"end":{"line":197,"column":11}},"53":{"start":{"line":201,"column":2},"end":{"line":205,"column":null}},"54":{"start":{"line":202,"column":3},"end":{"line":202,"column":10}},"55":{"start":{"line":203,"column":4},"end":{"line":203,"column":11}},"56":{"start":{"line":207,"column":2},"end":{"line":225,"column":null}},"57":{"start":{"line":208,"column":3},"end":{"line":208,"column":10}},"58":{"start":{"line":209,"column":12},"end":{"line":209,"column":15}},"59":{"start":{"line":209,"column":28},"end":{"line":209,"column":null}},"60":{"start":{"line":210,"column":4},"end":{"line":214,"column":null}},"61":{"start":{"line":211,"column":5},"end":{"line":211,"column":10}},"62":{"start":{"line":212,"column":5},"end":{"line":212,"column":28}},"63":{"start":{"line":212,"column":21},"end":{"line":212,"column":28}},"64":{"start":{"line":213,"column":5},"end":{"line":213,"column":8}},"65":{"start":{"line":215,"column":4},"end":{"line":215,"column":11}},"66":{"start":{"line":218,"column":3},"end":{"line":218,"column":10}},"67":{"start":{"line":219,"column":14},"end":{"line":219,"column":null}},"68":{"start":{"line":220,"column":4},"end":{"line":220,"column":11}},"69":{"start":{"line":221,"column":5},"end":{"line":221,"column":8}},"70":{"start":{"line":223,"column":4},"end":{"line":223,"column":11}},"71":{"start":{"line":236,"column":16},"end":{"line":236,"column":21}},"72":{"start":{"line":237,"column":2},"end":{"line":237,"column":9}},"73":{"start":{"line":243,"column":15},"end":{"line":243,"column":null}},"74":{"start":{"line":244,"column":13},"end":{"line":244,"column":null}},"75":{"start":{"line":245,"column":11},"end":{"line":245,"column":null}},"76":{"start":{"line":246,"column":14},"end":{"line":246,"column":null}},"77":{"start":{"line":247,"column":16},"end":{"line":247,"column":null}},"78":{"start":{"line":258,"column":20},"end":{"line":261,"column":null}},"79":{"start":{"line":259,"column":3},"end":{"line":259,"column":33}},"80":{"start":{"line":259,"column":26},"end":{"line":259,"column":33}},"81":{"start":{"line":260,"column":3},"end":{"line":260,"column":10}},"82":{"start":{"line":264,"column":2},"end":{"line":270,"column":null}},"83":{"start":{"line":265,"column":3},"end":{"line":269,"column":null}},"84":{"start":{"line":266,"column":4},"end":{"line":268,"column":null}},"85":{"start":{"line":267,"column":5},"end":{"line":267,"column":14}},"86":{"start":{"line":274,"column":2},"end":{"line":292,"column":null}},"87":{"start":{"line":275,"column":3},"end":{"line":275,"column":17}},"88":{"start":{"line":276,"column":3},"end":{"line":281,"column":null}},"89":{"start":{"line":277,"column":4},"end":{"line":280,"column":null}},"90":{"start":{"line":278,"column":5},"end":{"line":278,"column":19}},"91":{"start":{"line":279,"column":5},"end":{"line":279,"column":null}},"92":{"start":{"line":282,"column":3},"end":{"line":284,"column":null}},"93":{"start":{"line":283,"column":4},"end":{"line":283,"column":13}},"94":{"start":{"line":286,"column":3},"end":{"line":291,"column":null}},"95":{"start":{"line":287,"column":4},"end":{"line":290,"column":null}},"96":{"start":{"line":288,"column":5},"end":{"line":288,"column":14}},"97":{"start":{"line":289,"column":5},"end":{"line":289,"column":null}},"98":{"start":{"line":294,"column":2},"end":{"line":296,"column":null}},"99":{"start":{"line":295,"column":3},"end":{"line":295,"column":14}},"100":{"start":{"line":299,"column":2},"end":{"line":299,"column":17}},"101":{"start":{"line":300,"column":2},"end":{"line":324,"column":null}},"102":{"start":{"line":301,"column":3},"end":{"line":301,"column":10}},"103":{"start":{"line":302,"column":9},"end":{"line":324,"column":null}},"104":{"start":{"line":303,"column":3},"end":{"line":303,"column":11}},"105":{"start":{"line":304,"column":3},"end":{"line":304,"column":13}},"106":{"start":{"line":305,"column":3},"end":{"line":305,"column":10}},"107":{"start":{"line":306,"column":4},"end":{"line":306,"column":11}},"108":{"start":{"line":312,"column":3},"end":{"line":312,"column":10}},"109":{"start":{"line":314,"column":4},"end":{"line":321,"column":null}},"110":{"start":{"line":315,"column":5},"end":{"line":315,"column":10}},"111":{"start":{"line":316,"column":5},"end":{"line":316,"column":11}},"112":{"start":{"line":320,"column":5},"end":{"line":320,"column":24}},"113":{"start":{"line":320,"column":17},"end":{"line":320,"column":24}},"114":{"start":{"line":322,"column":4},"end":{"line":322,"column":11}},"115":{"start":{"line":334,"column":18},"end":{"line":334,"column":null}},"116":{"start":{"line":335,"column":17},"end":{"line":335,"column":23}},"117":{"start":{"line":337,"column":2},"end":{"line":337,"column":13}},"118":{"start":{"line":338,"column":2},"end":{"line":338,"column":13}},"119":{"start":{"line":341,"column":2},"end":{"line":355,"column":null}},"120":{"start":{"line":342,"column":3},"end":{"line":342,"column":14}},"121":{"start":{"line":343,"column":3},"end":{"line":349,"column":null}},"122":{"start":{"line":344,"column":17},"end":{"line":344,"column":null}},"123":{"start":{"line":345,"column":4},"end":{"line":345,"column":11}},"124":{"start":{"line":346,"column":5},"end":{"line":346,"column":11}},"125":{"start":{"line":348,"column":4},"end":{"line":348,"column":11}},"126":{"start":{"line":352,"column":3},"end":{"line":352,"column":10}},"127":{"start":{"line":353,"column":4},"end":{"line":353,"column":11}},"128":{"start":{"line":357,"column":2},"end":{"line":357,"column":7}},"129":{"start":{"line":359,"column":2},"end":{"line":359,"column":9}},"130":{"start":{"line":375,"column":13},"end":{"line":375,"column":19}},"131":{"start":{"line":379,"column":2},"end":{"line":379,"column":8}},"132":{"start":{"line":380,"column":2},"end":{"line":380,"column":9}},"133":{"start":{"line":381,"column":2},"end":{"line":381,"column":7}},"134":{"start":{"line":384,"column":2},"end":{"line":384,"column":10}},"135":{"start":{"line":387,"column":2},"end":{"line":398,"column":null}},"136":{"start":{"line":388,"column":3},"end":{"line":388,"column":10}},"137":{"start":{"line":389,"column":4},"end":{"line":389,"column":9}},"138":{"start":{"line":390,"column":4},"end":{"line":392,"column":null}},"139":{"start":{"line":391,"column":5},"end":{"line":391,"column":11}},"140":{"start":{"line":395,"column":3},"end":{"line":395,"column":10}},"141":{"start":{"line":396,"column":4},"end":{"line":396,"column":10}},"142":{"start":{"line":400,"column":2},"end":{"line":400,"column":9}},"143":{"start":{"line":401,"column":2},"end":{"line":401,"column":21}},"144":{"start":{"line":401,"column":15},"end":{"line":401,"column":21}},"145":{"start":{"line":404,"column":2},"end":{"line":404,"column":8}},"146":{"start":{"line":405,"column":2},"end":{"line":407,"column":null}},"147":{"start":{"line":406,"column":3},"end":{"line":406,"column":9}},"148":{"start":{"line":409,"column":2},"end":{"line":409,"column":9}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":74,"column":1},"end":{"line":74,"column":12}},"loc":{"start":{"line":74,"column":30},"end":{"line":77,"column":null}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":84,"column":1},"end":{"line":84,"column":9}},"loc":{"start":{"line":84,"column":87},"end":{"line":123,"column":null}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":95,"column":17},"end":{"line":95,"column":33}},"loc":{"start":{"line":95,"column":33},"end":{"line":120,"column":null}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":134,"column":1},"end":{"line":134,"column":17}},"loc":{"start":{"line":134,"column":41},"end":{"line":137,"column":null}}},"4":{"name":"(anonymous_4)","decl":{"start":{"line":139,"column":1},"end":{"line":139,"column":18}},"loc":{"start":{"line":139,"column":39},"end":{"line":226,"column":null}}},"5":{"name":"(anonymous_5)","decl":{"start":{"line":144,"column":10},"end":{"line":144,"column":21}},"loc":{"start":{"line":144,"column":21},"end":{"line":144,"column":null}}},"6":{"name":"(anonymous_6)","decl":{"start":{"line":153,"column":10},"end":{"line":153,"column":21}},"loc":{"start":{"line":153,"column":21},"end":{"line":153,"column":null}}},"7":{"name":"(anonymous_7)","decl":{"start":{"line":165,"column":23},"end":{"line":165,"column":34}},"loc":{"start":{"line":165,"column":34},"end":{"line":199,"column":null}}},"8":{"name":"(anonymous_8)","decl":{"start":{"line":169,"column":11},"end":{"line":169,"column":20}},"loc":{"start":{"line":169,"column":40},"end":{"line":172,"column":null}}},"9":{"name":"(anonymous_9)","decl":{"start":{"line":175,"column":10},"end":{"line":175,"column":19}},"loc":{"start":{"line":175,"column":39},"end":{"line":198,"column":null}}},"10":{"name":"(anonymous_10)","decl":{"start":{"line":192,"column":22},"end":{"line":192,"column":23}},"loc":{"start":{"line":192,"column":41},"end":{"line":194,"column":null}}},"11":{"name":"(anonymous_11)","decl":{"start":{"line":202,"column":10},"end":{"line":202,"column":19}},"loc":{"start":{"line":202,"column":25},"end":{"line":204,"column":null}}},"12":{"name":"(anonymous_12)","decl":{"start":{"line":208,"column":10},"end":{"line":208,"column":19}},"loc":{"start":{"line":208,"column":25},"end":{"line":216,"column":null}}},"13":{"name":"(anonymous_13)","decl":{"start":{"line":218,"column":10},"end":{"line":218,"column":19}},"loc":{"start":{"line":218,"column":25},"end":{"line":224,"column":null}}},"14":{"name":"(anonymous_14)","decl":{"start":{"line":220,"column":20},"end":{"line":220,"column":35}},"loc":{"start":{"line":220,"column":35},"end":{"line":222,"column":null}}},"15":{"name":"(anonymous_15)","decl":{"start":{"line":235,"column":1},"end":{"line":235,"column":16}},"loc":{"start":{"line":235,"column":40},"end":{"line":238,"column":null}}},"16":{"name":"(anonymous_16)","decl":{"start":{"line":240,"column":1},"end":{"line":240,"column":17}},"loc":{"start":{"line":240,"column":37},"end":{"line":325,"column":null}}},"17":{"name":"get_field","decl":{"start":{"line":258,"column":8},"end":{"line":258,"column":17}},"loc":{"start":{"line":258,"column":43},"end":{"line":261,"column":null}}},"18":{"name":"(anonymous_18)","decl":{"start":{"line":305,"column":10},"end":{"line":305,"column":19}},"loc":{"start":{"line":305,"column":25},"end":{"line":310,"column":null}}},"19":{"name":"(anonymous_19)","decl":{"start":{"line":312,"column":10},"end":{"line":312,"column":19}},"loc":{"start":{"line":312,"column":25},"end":{"line":323,"column":null}}},"20":{"name":"(anonymous_20)","decl":{"start":{"line":333,"column":1},"end":{"line":333,"column":14}},"loc":{"start":{"line":333,"column":51},"end":{"line":368,"column":null}}},"21":{"name":"(anonymous_21)","decl":{"start":{"line":345,"column":28},"end":{"line":345,"column":41}},"loc":{"start":{"line":345,"column":41},"end":{"line":347,"column":null}}},"22":{"name":"(anonymous_22)","decl":{"start":{"line":352,"column":27},"end":{"line":352,"column":42}},"loc":{"start":{"line":352,"column":42},"end":{"line":354,"column":null}}},"23":{"name":"(anonymous_23)","decl":{"start":{"line":374,"column":1},"end":{"line":374,"column":7}},"loc":{"start":{"line":374,"column":54},"end":{"line":410,"column":null}}},"24":{"name":"(anonymous_24)","decl":{"start":{"line":388,"column":23},"end":{"line":388,"column":24}},"loc":{"start":{"line":388,"column":37},"end":{"line":393,"column":null}}},"25":{"name":"(anonymous_25)","decl":{"start":{"line":395,"column":23},"end":{"line":395,"column":24}},"loc":{"start":{"line":395,"column":37},"end":{"line":397,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":76,"column":18},"end":{"line":76,"column":26}},"type":"binary-expr","locations":[{"start":{"line":76,"column":18},"end":{"line":76,"column":26}},{"start":{"line":76,"column":30},"end":{"line":76,"column":31}}]},"1":{"loc":{"start":{"line":85,"column":2},"end":{"line":85,"column":38}},"type":"if","locations":[{"start":{"line":85,"column":2},"end":{"line":85,"column":38}},{"start":{"line":85,"column":2},"end":{"line":85,"column":38}}]},"2":{"loc":{"start":{"line":85,"column":6},"end":{"line":85,"column":16}},"type":"binary-expr","locations":[{"start":{"line":85,"column":6},"end":{"line":85,"column":16}},{"start":{"line":85,"column":16},"end":{"line":85,"column":31}}]},"3":{"loc":{"start":{"line":91,"column":2},"end":{"line":93,"column":null}},"type":"if","locations":[{"start":{"line":91,"column":2},"end":{"line":93,"column":null}},{"start":{"line":91,"column":2},"end":{"line":93,"column":null}}]},"4":{"loc":{"start":{"line":101,"column":3},"end":{"line":104,"column":null}},"type":"if","locations":[{"start":{"line":101,"column":3},"end":{"line":104,"column":null}},{"start":{"line":101,"column":3},"end":{"line":104,"column":null}}]},"5":{"loc":{"start":{"line":101,"column":7},"end":{"line":101,"column":18}},"type":"binary-expr","locations":[{"start":{"line":101,"column":7},"end":{"line":101,"column":18}},{"start":{"line":101,"column":23},"end":{"line":101,"column":41}}]},"6":{"loc":{"start":{"line":106,"column":3},"end":{"line":113,"column":null}},"type":"if","locations":[{"start":{"line":106,"column":3},"end":{"line":113,"column":null}},{"start":{"line":106,"column":3},"end":{"line":113,"column":null}}]},"7":{"loc":{"start":{"line":108,"column":4},"end":{"line":110,"column":null}},"type":"if","locations":[{"start":{"line":108,"column":4},"end":{"line":110,"column":null}},{"start":{"line":108,"column":4},"end":{"line":110,"column":null}}]},"8":{"loc":{"start":{"line":111,"column":4},"end":{"line":111,"column":39}},"type":"if","locations":[{"start":{"line":111,"column":4},"end":{"line":111,"column":39}},{"start":{"line":111,"column":4},"end":{"line":111,"column":39}}]},"9":{"loc":{"start":{"line":143,"column":2},"end":{"line":145,"column":null}},"type":"if","locations":[{"start":{"line":143,"column":2},"end":{"line":145,"column":null}},{"start":{"line":143,"column":2},"end":{"line":145,"column":null}}]},"10":{"loc":{"start":{"line":152,"column":2},"end":{"line":154,"column":null}},"type":"if","locations":[{"start":{"line":152,"column":2},"end":{"line":154,"column":null}},{"start":{"line":152,"column":2},"end":{"line":154,"column":null}}]},"11":{"loc":{"start":{"line":168,"column":3},"end":{"line":173,"column":null}},"type":"if","locations":[{"start":{"line":168,"column":3},"end":{"line":173,"column":null}},{"start":{"line":168,"column":3},"end":{"line":173,"column":null}}]},"12":{"loc":{"start":{"line":179,"column":4},"end":{"line":195,"column":null}},"type":"if","locations":[{"start":{"line":179,"column":4},"end":{"line":195,"column":null}},{"start":{"line":179,"column":4},"end":{"line":195,"column":null}}]},"13":{"loc":{"start":{"line":183,"column":5},"end":{"line":187,"column":null}},"type":"if","locations":[{"start":{"line":183,"column":5},"end":{"line":187,"column":null}},{"start":{"line":183,"column":5},"end":{"line":187,"column":null}}]},"14":{"loc":{"start":{"line":183,"column":9},"end":{"line":183,"column":25}},"type":"binary-expr","locations":[{"start":{"line":183,"column":9},"end":{"line":183,"column":25}},{"start":{"line":183,"column":25},"end":{"line":183,"column":32}}]},"15":{"loc":{"start":{"line":201,"column":2},"end":{"line":205,"column":null}},"type":"if","locations":[{"start":{"line":201,"column":2},"end":{"line":205,"column":null}},{"start":{"line":201,"column":2},"end":{"line":205,"column":null}}]},"16":{"loc":{"start":{"line":207,"column":2},"end":{"line":225,"column":null}},"type":"if","locations":[{"start":{"line":207,"column":2},"end":{"line":225,"column":null}},{"start":{"line":207,"column":2},"end":{"line":225,"column":null}}]},"17":{"loc":{"start":{"line":212,"column":5},"end":{"line":212,"column":28}},"type":"if","locations":[{"start":{"line":212,"column":5},"end":{"line":212,"column":28}},{"start":{"line":212,"column":5},"end":{"line":212,"column":28}}]},"18":{"loc":{"start":{"line":245,"column":11},"end":{"line":245,"column":28}},"type":"binary-expr","locations":[{"start":{"line":245,"column":11},"end":{"line":245,"column":28}},{"start":{"line":245,"column":28},"end":{"line":245,"column":51}},{"start":{"line":245,"column":51},"end":{"line":245,"column":null}}]},"19":{"loc":{"start":{"line":259,"column":3},"end":{"line":259,"column":33}},"type":"if","locations":[{"start":{"line":259,"column":3},"end":{"line":259,"column":33}},{"start":{"line":259,"column":3},"end":{"line":259,"column":33}}]},"20":{"loc":{"start":{"line":264,"column":2},"end":{"line":270,"column":null}},"type":"if","locations":[{"start":{"line":264,"column":2},"end":{"line":270,"column":null}},{"start":{"line":264,"column":2},"end":{"line":270,"column":null}}]},"21":{"loc":{"start":{"line":266,"column":4},"end":{"line":268,"column":null}},"type":"if","locations":[{"start":{"line":266,"column":4},"end":{"line":268,"column":null}},{"start":{"line":266,"column":4},"end":{"line":268,"column":null}}]},"22":{"loc":{"start":{"line":266,"column":8},"end":{"line":266,"column":24}},"type":"binary-expr","locations":[{"start":{"line":266,"column":8},"end":{"line":266,"column":24}},{"start":{"line":266,"column":24},"end":{"line":266,"column":52}}]},"23":{"loc":{"start":{"line":274,"column":2},"end":{"line":292,"column":null}},"type":"if","locations":[{"start":{"line":274,"column":2},"end":{"line":292,"column":null}},{"start":{"line":274,"column":2},"end":{"line":292,"column":null}}]},"24":{"loc":{"start":{"line":277,"column":4},"end":{"line":280,"column":null}},"type":"if","locations":[{"start":{"line":277,"column":4},"end":{"line":280,"column":null}},{"start":{"line":277,"column":4},"end":{"line":280,"column":null}}]},"25":{"loc":{"start":{"line":282,"column":3},"end":{"line":284,"column":null}},"type":"if","locations":[{"start":{"line":282,"column":3},"end":{"line":284,"column":null}},{"start":{"line":282,"column":3},"end":{"line":284,"column":null}}]},"26":{"loc":{"start":{"line":287,"column":4},"end":{"line":290,"column":null}},"type":"if","locations":[{"start":{"line":287,"column":4},"end":{"line":290,"column":null}},{"start":{"line":287,"column":4},"end":{"line":290,"column":null}}]},"27":{"loc":{"start":{"line":295,"column":56},"end":{"line":295,"column":61}},"type":"cond-expr","locations":[{"start":{"line":295,"column":56},"end":{"line":295,"column":61}},{"start":{"line":295,"column":61},"end":{"line":295,"column":null}}]},"28":{"loc":{"start":{"line":300,"column":2},"end":{"line":324,"column":null}},"type":"if","locations":[{"start":{"line":300,"column":2},"end":{"line":324,"column":null}},{"start":{"line":300,"column":2},"end":{"line":324,"column":null}}]},"29":{"loc":{"start":{"line":302,"column":9},"end":{"line":324,"column":null}},"type":"if","locations":[{"start":{"line":302,"column":9},"end":{"line":324,"column":null}},{"start":{"line":302,"column":9},"end":{"line":324,"column":null}}]},"30":{"loc":{"start":{"line":320,"column":5},"end":{"line":320,"column":24}},"type":"if","locations":[{"start":{"line":320,"column":5},"end":{"line":320,"column":24}},{"start":{"line":320,"column":5},"end":{"line":320,"column":24}}]},"31":{"loc":{"start":{"line":341,"column":2},"end":{"line":355,"column":null}},"type":"if","locations":[{"start":{"line":341,"column":2},"end":{"line":355,"column":null}},{"start":{"line":341,"column":2},"end":{"line":355,"column":null}}]},"32":{"loc":{"start":{"line":343,"column":3},"end":{"line":349,"column":null}},"type":"if","locations":[{"start":{"line":343,"column":3},"end":{"line":349,"column":null}},{"start":{"line":343,"column":3},"end":{"line":349,"column":null}}]},"33":{"loc":{"start":{"line":343,"column":7},"end":{"line":343,"column":12}},"type":"binary-expr","locations":[{"start":{"line":343,"column":7},"end":{"line":343,"column":12}},{"start":{"line":343,"column":40},"end":{"line":343,"column":79}}]},"34":{"loc":{"start":{"line":353,"column":63},"end":{"line":353,"column":85}},"type":"cond-expr","locations":[{"start":{"line":353,"column":63},"end":{"line":353,"column":85}},{"start":{"line":353,"column":85},"end":{"line":353,"column":null}}]},"35":{"loc":{"start":{"line":366,"column":35},"end":{"line":366,"column":52}},"type":"cond-expr","locations":[{"start":{"line":366,"column":35},"end":{"line":366,"column":52}},{"start":{"line":366,"column":52},"end":{"line":366,"column":null}}]},"36":{"loc":{"start":{"line":384,"column":13},"end":{"line":384,"column":30}},"type":"binary-expr","locations":[{"start":{"line":384,"column":13},"end":{"line":384,"column":30}},{"start":{"line":384,"column":30},"end":{"line":384,"column":34}}]},"37":{"loc":{"start":{"line":387,"column":2},"end":{"line":398,"column":null}},"type":"if","locations":[{"start":{"line":387,"column":2},"end":{"line":398,"column":null}},{"start":{"line":387,"column":2},"end":{"line":398,"column":null}}]},"38":{"loc":{"start":{"line":390,"column":4},"end":{"line":392,"column":null}},"type":"if","locations":[{"start":{"line":390,"column":4},"end":{"line":392,"column":null}},{"start":{"line":390,"column":4},"end":{"line":392,"column":null}}]},"39":{"loc":{"start":{"line":390,"column":8},"end":{"line":390,"column":36}},"type":"binary-expr","locations":[{"start":{"line":390,"column":8},"end":{"line":390,"column":36}},{"start":{"line":390,"column":36},"end":{"line":390,"column":47}}]},"40":{"loc":{"start":{"line":401,"column":2},"end":{"line":401,"column":21}},"type":"if","locations":[{"start":{"line":401,"column":2},"end":{"line":401,"column":21}},{"start":{"line":401,"column":2},"end":{"line":401,"column":21}}]},"41":{"loc":{"start":{"line":405,"column":2},"end":{"line":407,"column":null}},"type":"if","locations":[{"start":{"line":405,"column":2},"end":{"line":407,"column":null}},{"start":{"line":405,"column":2},"end":{"line":407,"column":null}}]}},"s":{"0":64,"1":32,"2":32,"3":42,"4":10,"5":32,"6":32,"7":32,"8":29,"9":32,"10":42,"11":42,"12":42,"13":3,"14":3,"15":42,"16":41,"17":41,"18":41,"19":41,"20":6,"21":41,"22":42,"23":32,"24":3,"25":3,"26":36,"27":36,"28":36,"29":9,"30":0,"31":27,"32":27,"33":27,"34":27,"35":27,"36":1,"37":2,"38":26,"39":26,"40":13,"41":38,"42":38,"43":13,"44":62,"45":62,"46":6,"47":6,"48":1,"49":5,"50":56,"51":137,"52":62,"53":26,"54":20,"55":55,"56":6,"57":2,"58":7,"59":7,"60":7,"61":11,"62":11,"63":6,"64":5,"65":1,"66":4,"67":17,"68":17,"69":34,"70":17,"71":0,"72":0,"73":32,"74":32,"75":32,"76":32,"77":32,"78":32,"79":152,"80":24,"81":128,"82":32,"83":13,"84":17,"85":17,"86":32,"87":23,"88":23,"89":6,"90":2,"91":2,"92":23,"93":21,"94":9,"95":11,"96":0,"97":0,"98":32,"99":38,"100":32,"101":32,"102":0,"103":32,"104":26,"105":26,"106":26,"107":38,"108":6,"109":27,"110":38,"111":38,"112":38,"113":22,"114":5,"115":38,"116":38,"117":38,"118":38,"119":38,"120":37,"121":37,"122":32,"123":32,"124":49,"125":32,"126":37,"127":57,"128":38,"129":38,"130":32,"131":32,"132":32,"133":32,"134":32,"135":32,"136":23,"137":65,"138":65,"139":38,"140":9,"141":31,"142":32,"143":32,"144":32,"145":32,"146":32,"147":3,"148":32},"f":{"0":32,"1":42,"2":42,"3":3,"4":36,"5":0,"6":2,"7":26,"8":38,"9":62,"10":137,"11":55,"12":7,"13":17,"14":34,"15":0,"16":32,"17":152,"18":38,"19":27,"20":38,"21":49,"22":57,"23":32,"24":65,"25":31},"b":{"0":[32,32],"1":[10,32],"2":[42,32],"3":[29,3],"4":[3,39],"5":[42,36],"6":[41,1],"7":[41,0],"8":[6,35],"9":[9,27],"10":[1,26],"11":[13,13],"12":[6,56],"13":[1,5],"14":[6,2],"15":[20,6],"16":[2,4],"17":[6,5],"18":[32,9,31],"19":[24,128],"20":[13,19],"21":[17,0],"22":[17,11],"23":[23,9],"24":[2,4],"25":[21,2],"26":[0,11],"27":[23,15],"28":[0,32],"29":[26,6],"30":[22,16],"31":[37,1],"32":[32,5],"33":[37,37],"34":[6,51],"35":[2,36],"36":[32,32],"37":[23,9],"38":[38,27],"39":[65,62],"40":[32,0],"41":[3,29]}}
,"/var/www/html/github/sifter.js/lib/utils.ts": {"path":"/var/www/html/github/sifter.js/lib/utils.ts","statementMap":{"0":{"start":{"line":12,"column":4},"end":{"line":12,"column":null}},"1":{"start":{"line":12,"column":15},"end":{"line":12,"column":null}},"2":{"start":{"line":13,"column":4},"end":{"line":13,"column":11}},"3":{"start":{"line":23,"column":4},"end":{"line":23,"column":null}},"4":{"start":{"line":23,"column":15},"end":{"line":23,"column":null}},"5":{"start":{"line":24,"column":16},"end":{"line":24,"column":20}},"6":{"start":{"line":25,"column":4},"end":{"line":25,"column":null}},"7":{"start":{"line":26,"column":4},"end":{"line":26,"column":11}},"8":{"start":{"line":39,"column":1},"end":{"line":39,"column":20}},"9":{"start":{"line":39,"column":13},"end":{"line":39,"column":20}},"10":{"start":{"line":41,"column":1},"end":{"line":41,"column":6}},"11":{"start":{"line":42,"column":1},"end":{"line":42,"column":4}},"12":{"start":{"line":43,"column":1},"end":{"line":43,"column":24}},"13":{"start":{"line":43,"column":17},"end":{"line":43,"column":24}},"14":{"start":{"line":45,"column":1},"end":{"line":45,"column":6}},"15":{"start":{"line":46,"column":1},"end":{"line":46,"column":21}},"16":{"start":{"line":46,"column":16},"end":{"line":46,"column":21}},"17":{"start":{"line":48,"column":1},"end":{"line":48,"column":8}},"18":{"start":{"line":52,"column":1},"end":{"line":52,"column":8}},"19":{"start":{"line":61,"column":13},"end":{"line":61,"column":17}},"20":{"start":{"line":62,"column":1},"end":{"line":64,"column":null}},"21":{"start":{"line":63,"column":2},"end":{"line":63,"column":5}},"22":{"start":{"line":81,"column":1},"end":{"line":91,"column":null}},"23":{"start":{"line":82,"column":2},"end":{"line":82,"column":8}},"24":{"start":{"line":86,"column":2},"end":{"line":90,"column":null}},"25":{"start":{"line":87,"column":3},"end":{"line":89,"column":null}},"26":{"start":{"line":88,"column":4},"end":{"line":88,"column":12}},"27":{"start":{"line":97,"column":1},"end":{"line":99,"column":null}},"28":{"start":{"line":98,"column":2},"end":{"line":98,"column":9}},"29":{"start":{"line":100,"column":1},"end":{"line":100,"column":2}},"30":{"start":{"line":101,"column":1},"end":{"line":101,"column":2}},"31":{"start":{"line":102,"column":1},"end":{"line":102,"column":19}},"32":{"start":{"line":102,"column":12},"end":{"line":102,"column":19}},"33":{"start":{"line":103,"column":1},"end":{"line":103,"column":19}},"34":{"start":{"line":103,"column":12},"end":{"line":103,"column":19}},"35":{"start":{"line":104,"column":1},"end":{"line":104,"column":8}}},"fnMap":{"0":{"name":"getAttr","decl":{"start":{"line":11,"column":16},"end":{"line":11,"column":24}},"loc":{"start":{"line":11,"column":62},"end":{"line":14,"column":null}}},"1":{"name":"getAttrNesting","decl":{"start":{"line":22,"column":16},"end":{"line":22,"column":31}},"loc":{"start":{"line":22,"column":69},"end":{"line":27,"column":null}}},"2":{"name":"scoreValue","decl":{"start":{"line":36,"column":16},"end":{"line":36,"column":27}},"loc":{"start":{"line":36,"column":64},"end":{"line":49,"column":null}}},"3":{"name":"escape_regex","decl":{"start":{"line":51,"column":16},"end":{"line":51,"column":29}},"loc":{"start":{"line":51,"column":34},"end":{"line":53,"column":null}}},"4":{"name":"propToArray","decl":{"start":{"line":60,"column":16},"end":{"line":60,"column":28}},"loc":{"start":{"line":60,"column":37},"end":{"line":65,"column":null}}},"5":{"name":"iterate","decl":{"start":{"line":79,"column":16},"end":{"line":79,"column":24}},"loc":{"start":{"line":79,"column":42},"end":{"line":92,"column":null}}},"6":{"name":"cmp","decl":{"start":{"line":96,"column":16},"end":{"line":96,"column":20}},"loc":{"start":{"line":96,"column":26},"end":{"line":105,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":12,"column":4},"end":{"line":12,"column":null}},"type":"if","locations":[{"start":{"line":12,"column":4},"end":{"line":12,"column":null}},{"start":{"line":12,"column":4},"end":{"line":12,"column":null}}]},"1":{"loc":{"start":{"line":23,"column":4},"end":{"line":23,"column":null}},"type":"if","locations":[{"start":{"line":23,"column":4},"end":{"line":23,"column":null}},{"start":{"line":23,"column":4},"end":{"line":23,"column":null}}]},"2":{"loc":{"start":{"line":25,"column":10},"end":{"line":25,"column":27}},"type":"binary-expr","locations":[{"start":{"line":25,"column":10},"end":{"line":25,"column":27}},{"start":{"line":25,"column":27},"end":{"line":25,"column":37}}]},"3":{"loc":{"start":{"line":39,"column":1},"end":{"line":39,"column":20}},"type":"if","locations":[{"start":{"line":39,"column":1},"end":{"line":39,"column":20}},{"start":{"line":39,"column":1},"end":{"line":39,"column":20}}]},"4":{"loc":{"start":{"line":43,"column":1},"end":{"line":43,"column":24}},"type":"if","locations":[{"start":{"line":43,"column":1},"end":{"line":43,"column":24}},{"start":{"line":43,"column":1},"end":{"line":43,"column":24}}]},"5":{"loc":{"start":{"line":46,"column":1},"end":{"line":46,"column":21}},"type":"if","locations":[{"start":{"line":46,"column":1},"end":{"line":46,"column":21}},{"start":{"line":46,"column":1},"end":{"line":46,"column":21}}]},"6":{"loc":{"start":{"line":62,"column":1},"end":{"line":64,"column":null}},"type":"if","locations":[{"start":{"line":62,"column":1},"end":{"line":64,"column":null}},{"start":{"line":62,"column":1},"end":{"line":64,"column":null}}]},"7":{"loc":{"start":{"line":62,"column":5},"end":{"line":62,"column":10}},"type":"binary-expr","locations":[{"start":{"line":62,"column":5},"end":{"line":62,"column":10}},{"start":{"line":62,"column":14},"end":{"line":62,"column":20}}]},"8":{"loc":{"start":{"line":81,"column":1},"end":{"line":91,"column":null}},"type":"if","locations":[{"start":{"line":81,"column":1},"end":{"line":91,"column":null}},{"start":{"line":81,"column":1},"end":{"line":91,"column":null}}]},"9":{"loc":{"start":{"line":87,"column":3},"end":{"line":89,"column":null}},"type":"if","locations":[{"start":{"line":87,"column":3},"end":{"line":89,"column":null}},{"start":{"line":87,"column":3},"end":{"line":89,"column":null}}]},"10":{"loc":{"start":{"line":97,"column":1},"end":{"line":99,"column":null}},"type":"if","locations":[{"start":{"line":97,"column":1},"end":{"line":99,"column":null}},{"start":{"line":97,"column":1},"end":{"line":99,"column":null}}]},"11":{"loc":{"start":{"line":97,"column":5},"end":{"line":97,"column":30}},"type":"binary-expr","locations":[{"start":{"line":97,"column":5},"end":{"line":97,"column":30}},{"start":{"line":97,"column":30},"end":{"line":97,"column":53}}]},"12":{"loc":{"start":{"line":98,"column":17},"end":{"line":98,"column":22}},"type":"cond-expr","locations":[{"start":{"line":98,"column":17},"end":{"line":98,"column":22}},{"start":{"line":98,"column":22},"end":{"line":98,"column":null}}]},"13":{"loc":{"start":{"line":98,"column":30},"end":{"line":98,"column":35}},"type":"cond-expr","locations":[{"start":{"line":98,"column":30},"end":{"line":98,"column":35}},{"start":{"line":98,"column":35},"end":{"line":98,"column":null}}]},"14":{"loc":{"start":{"line":102,"column":1},"end":{"line":102,"column":19}},"type":"if","locations":[{"start":{"line":102,"column":1},"end":{"line":102,"column":19}},{"start":{"line":102,"column":1},"end":{"line":102,"column":19}}]},"15":{"loc":{"start":{"line":103,"column":1},"end":{"line":103,"column":19}},"type":"if","locations":[{"start":{"line":103,"column":1},"end":{"line":103,"column":19}},{"start":{"line":103,"column":1},"end":{"line":103,"column":19}}]}},"s":{"0":299,"1":1,"2":298,"3":12,"4":1,"5":11,"6":11,"7":11,"8":181,"9":16,"10":165,"11":165,"12":165,"13":109,"14":56,"15":56,"16":42,"17":56,"18":87,"19":113,"20":113,"21":23,"22":105,"23":48,"24":57,"25":139,"26":139,"27":77,"28":23,"29":54,"30":54,"31":54,"32":16,"33":38,"34":27,"35":11},"f":{"0":299,"1":12,"2":181,"3":87,"4":113,"5":105,"6":77},"b":{"0":[1,298],"1":[1,11],"2":[33,22],"3":[16,165],"4":[109,56],"5":[42,14],"6":[23,90],"7":[113,53],"8":[48,57],"9":[139,0],"10":[23,54],"11":[77,23],"12":[8,15],"13":[6,9],"14":[16,38],"15":[27,11]}}
,"/var/www/html/github/sifter.js/lib/sifter.ts": {"path":"/var/www/html/github/sifter.js/lib/sifter.ts","statementMap":{"0":{"start":{"line":86,"column":44},"end":{"line":86,"column":null}},"1":{"start":{"line":87,"column":2},"end":{"line":87,"column":7}},"2":{"start":{"line":88,"column":2},"end":{"line":88,"column":7}},"3":{"start":{"line":97,"column":2},"end":{"line":97,"column":38}},"4":{"start":{"line":97,"column":31},"end":{"line":97,"column":38}},"5":{"start":{"line":99,"column":26},"end":{"line":99,"column":null}},"6":{"start":{"line":100,"column":19},"end":{"line":100,"column":24}},"7":{"start":{"line":103,"column":2},"end":{"line":105,"column":null}},"8":{"start":{"line":104,"column":3},"end":{"line":104,"column":14}},"9":{"start":{"line":107,"column":2},"end":{"line":107,"column":7}},"10":{"start":{"line":109,"column":27},"end":{"line":109,"column":null}},"11":{"start":{"line":110,"column":27},"end":{"line":110,"column":null}},"12":{"start":{"line":113,"column":3},"end":{"line":116,"column":null}},"13":{"start":{"line":114,"column":4},"end":{"line":114,"column":9}},"14":{"start":{"line":115,"column":4},"end":{"line":115,"column":8}},"15":{"start":{"line":118,"column":3},"end":{"line":124,"column":null}},"16":{"start":{"line":119,"column":4},"end":{"line":119,"column":9}},"17":{"start":{"line":120,"column":4},"end":{"line":122,"column":null}},"18":{"start":{"line":121,"column":5},"end":{"line":121,"column":10}},"19":{"start":{"line":123,"column":4},"end":{"line":123,"column":39}},"20":{"start":{"line":123,"column":34},"end":{"line":123,"column":39}},"21":{"start":{"line":126,"column":3},"end":{"line":126,"column":9}},"22":{"start":{"line":133,"column":2},"end":{"line":133,"column":9}},"23":{"start":{"line":146,"column":15},"end":{"line":146,"column":20}},"24":{"start":{"line":147,"column":2},"end":{"line":147,"column":9}},"25":{"start":{"line":151,"column":18},"end":{"line":151,"column":null}},"26":{"start":{"line":152,"column":18},"end":{"line":152,"column":null}},"27":{"start":{"line":154,"column":2},"end":{"line":156,"column":null}},"28":{"start":{"line":155,"column":3},"end":{"line":155,"column":10}},"29":{"start":{"line":155,"column":23},"end":{"line":155,"column":30}},"30":{"start":{"line":158,"column":17},"end":{"line":158,"column":null}},"31":{"start":{"line":159,"column":14},"end":{"line":159,"column":null}},"32":{"start":{"line":160,"column":17},"end":{"line":160,"column":null}},"33":{"start":{"line":161,"column":15},"end":{"line":161,"column":null}},"34":{"start":{"line":163,"column":2},"end":{"line":165,"column":null}},"35":{"start":{"line":164,"column":3},"end":{"line":164,"column":10}},"36":{"start":{"line":164,"column":23},"end":{"line":164,"column":30}},"37":{"start":{"line":176,"column":23},"end":{"line":176,"column":1}},"38":{"start":{"line":179,"column":3},"end":{"line":184,"column":null}},"39":{"start":{"line":180,"column":4},"end":{"line":180,"column":11}},"40":{"start":{"line":181,"column":19},"end":{"line":181,"column":null}},"41":{"start":{"line":182,"column":5},"end":{"line":182,"column":12}},"42":{"start":{"line":186,"column":3},"end":{"line":186,"column":10}},"43":{"start":{"line":187,"column":14},"end":{"line":187,"column":null}},"44":{"start":{"line":190,"column":4},"end":{"line":206,"column":null}},"45":{"start":{"line":192,"column":19},"end":{"line":192,"column":29}},"46":{"start":{"line":194,"column":5},"end":{"line":198,"column":null}},"47":{"start":{"line":195,"column":6},"end":{"line":195,"column":9}},"48":{"start":{"line":197,"column":6},"end":{"line":197,"column":9}},"49":{"start":{"line":203,"column":5},"end":{"line":203,"column":12}},"50":{"start":{"line":204,"column":6},"end":{"line":204,"column":9}},"51":{"start":{"line":208,"column":4},"end":{"line":208,"column":11}},"52":{"start":{"line":212,"column":2},"end":{"line":216,"column":null}},"53":{"start":{"line":213,"column":3},"end":{"line":213,"column":10}},"54":{"start":{"line":214,"column":4},"end":{"line":214,"column":11}},"55":{"start":{"line":218,"column":2},"end":{"line":236,"column":null}},"56":{"start":{"line":219,"column":3},"end":{"line":219,"column":10}},"57":{"start":{"line":220,"column":12},"end":{"line":220,"column":15}},"58":{"start":{"line":220,"column":28},"end":{"line":220,"column":null}},"59":{"start":{"line":221,"column":4},"end":{"line":225,"column":null}},"60":{"start":{"line":222,"column":5},"end":{"line":222,"column":10}},"61":{"start":{"line":223,"column":5},"end":{"line":223,"column":28}},"62":{"start":{"line":223,"column":21},"end":{"line":223,"column":28}},"63":{"start":{"line":224,"column":5},"end":{"line":224,"column":8}},"64":{"start":{"line":226,"column":4},"end":{"line":226,"column":11}},"65":{"start":{"line":229,"column":3},"end":{"line":229,"column":10}},"66":{"start":{"line":230,"column":14},"end":{"line":230,"column":null}},"67":{"start":{"line":231,"column":4},"end":{"line":231,"column":11}},"68":{"start":{"line":232,"column":5},"end":{"line":232,"column":8}},"69":{"start":{"line":234,"column":4},"end":{"line":234,"column":11}},"70":{"start":{"line":247,"column":16},"end":{"line":247,"column":21}},"71":{"start":{"line":248,"column":2},"end":{"line":248,"column":9}},"72":{"start":{"line":254,"column":15},"end":{"line":254,"column":null}},"73":{"start":{"line":255,"column":13},"end":{"line":255,"column":null}},"74":{"start":{"line":256,"column":11},"end":{"line":256,"column":null}},"75":{"start":{"line":257,"column":23},"end":{"line":257,"column":null}},"76":{"start":{"line":258,"column":25},"end":{"line":258,"column":null}},"77":{"start":{"line":266,"column":20},"end":{"line":269,"column":null}},"78":{"start":{"line":267,"column":3},"end":{"line":267,"column":33}},"79":{"start":{"line":267,"column":26},"end":{"line":267,"column":33}},"80":{"start":{"line":268,"column":3},"end":{"line":268,"column":10}},"81":{"start":{"line":272,"column":2},"end":{"line":278,"column":null}},"82":{"start":{"line":273,"column":3},"end":{"line":277,"column":null}},"83":{"start":{"line":274,"column":4},"end":{"line":276,"column":null}},"84":{"start":{"line":275,"column":5},"end":{"line":275,"column":14}},"85":{"start":{"line":282,"column":2},"end":{"line":300,"column":null}},"86":{"start":{"line":283,"column":3},"end":{"line":283,"column":17}},"87":{"start":{"line":284,"column":3},"end":{"line":289,"column":null}},"88":{"start":{"line":285,"column":4},"end":{"line":288,"column":null}},"89":{"start":{"line":286,"column":5},"end":{"line":286,"column":19}},"90":{"start":{"line":287,"column":5},"end":{"line":287,"column":null}},"91":{"start":{"line":290,"column":3},"end":{"line":292,"column":null}},"92":{"start":{"line":291,"column":4},"end":{"line":291,"column":13}},"93":{"start":{"line":294,"column":3},"end":{"line":299,"column":null}},"94":{"start":{"line":295,"column":4},"end":{"line":298,"column":null}},"95":{"start":{"line":296,"column":5},"end":{"line":296,"column":14}},"96":{"start":{"line":297,"column":5},"end":{"line":297,"column":null}},"97":{"start":{"line":302,"column":2},"end":{"line":304,"column":null}},"98":{"start":{"line":303,"column":3},"end":{"line":303,"column":14}},"99":{"start":{"line":307,"column":26},"end":{"line":307,"column":null}},"100":{"start":{"line":308,"column":2},"end":{"line":332,"column":null}},"101":{"start":{"line":309,"column":3},"end":{"line":309,"column":10}},"102":{"start":{"line":310,"column":9},"end":{"line":332,"column":null}},"103":{"start":{"line":311,"column":20},"end":{"line":311,"column":null}},"104":{"start":{"line":312,"column":22},"end":{"line":312,"column":34}},"105":{"start":{"line":313,"column":3},"end":{"line":313,"column":10}},"106":{"start":{"line":314,"column":4},"end":{"line":314,"column":11}},"107":{"start":{"line":320,"column":3},"end":{"line":320,"column":10}},"108":{"start":{"line":322,"column":4},"end":{"line":329,"column":null}},"109":{"start":{"line":323,"column":5},"end":{"line":323,"column":10}},"110":{"start":{"line":324,"column":5},"end":{"line":324,"column":11}},"111":{"start":{"line":328,"column":5},"end":{"line":328,"column":24}},"112":{"start":{"line":328,"column":17},"end":{"line":328,"column":24}},"113":{"start":{"line":330,"column":4},"end":{"line":330,"column":11}},"114":{"start":{"line":342,"column":27},"end":{"line":342,"column":null}},"115":{"start":{"line":343,"column":17},"end":{"line":343,"column":23}},"116":{"start":{"line":345,"column":2},"end":{"line":345,"column":13}},"117":{"start":{"line":346,"column":2},"end":{"line":346,"column":13}},"118":{"start":{"line":349,"column":2},"end":{"line":360,"column":null}},"119":{"start":{"line":350,"column":3},"end":{"line":350,"column":14}},"120":{"start":{"line":351,"column":27},"end":{"line":351,"column":null}},"121":{"start":{"line":352,"column":3},"end":{"line":352,"column":10}},"122":{"start":{"line":353,"column":4},"end":{"line":355,"column":null}},"123":{"start":{"line":354,"column":5},"end":{"line":354,"column":10}},"124":{"start":{"line":356,"column":4},"end":{"line":356,"column":10}},"125":{"start":{"line":357,"column":4},"end":{"line":357,"column":11}},"126":{"start":{"line":359,"column":3},"end":{"line":359,"column":10}},"127":{"start":{"line":362,"column":2},"end":{"line":362,"column":7}},"128":{"start":{"line":364,"column":2},"end":{"line":364,"column":9}},"129":{"start":{"line":380,"column":13},"end":{"line":380,"column":19}},"130":{"start":{"line":382,"column":2},"end":{"line":382,"column":8}},"131":{"start":{"line":383,"column":2},"end":{"line":383,"column":9}},"132":{"start":{"line":384,"column":2},"end":{"line":384,"column":7}},"133":{"start":{"line":387,"column":19},"end":{"line":387,"column":40}},"134":{"start":{"line":390,"column":2},"end":{"line":401,"column":null}},"135":{"start":{"line":391,"column":3},"end":{"line":391,"column":10}},"136":{"start":{"line":392,"column":4},"end":{"line":392,"column":9}},"137":{"start":{"line":393,"column":4},"end":{"line":395,"column":null}},"138":{"start":{"line":394,"column":5},"end":{"line":394,"column":11}},"139":{"start":{"line":398,"column":3},"end":{"line":398,"column":10}},"140":{"start":{"line":399,"column":4},"end":{"line":399,"column":10}},"141":{"start":{"line":403,"column":18},"end":{"line":403,"column":22}},"142":{"start":{"line":404,"column":2},"end":{"line":404,"column":21}},"143":{"start":{"line":404,"column":15},"end":{"line":404,"column":21}},"144":{"start":{"line":407,"column":2},"end":{"line":407,"column":8}},"145":{"start":{"line":408,"column":2},"end":{"line":410,"column":null}},"146":{"start":{"line":409,"column":3},"end":{"line":409,"column":9}},"147":{"start":{"line":412,"column":2},"end":{"line":412,"column":9}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":86,"column":1},"end":{"line":86,"column":12}},"loc":{"start":{"line":86,"column":44},"end":{"line":89,"column":null}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":96,"column":1},"end":{"line":96,"column":9}},"loc":{"start":{"line":96,"column":87},"end":{"line":134,"column":null}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":107,"column":17},"end":{"line":107,"column":33}},"loc":{"start":{"line":107,"column":33},"end":{"line":131,"column":null}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":145,"column":1},"end":{"line":145,"column":17}},"loc":{"start":{"line":145,"column":50},"end":{"line":148,"column":null}}},"4":{"name":"(anonymous_4)","decl":{"start":{"line":150,"column":1},"end":{"line":150,"column":18}},"loc":{"start":{"line":150,"column":39},"end":{"line":237,"column":null}}},"5":{"name":"(anonymous_5)","decl":{"start":{"line":155,"column":10},"end":{"line":155,"column":21}},"loc":{"start":{"line":155,"column":21},"end":{"line":155,"column":null}}},"6":{"name":"(anonymous_6)","decl":{"start":{"line":164,"column":10},"end":{"line":164,"column":21}},"loc":{"start":{"line":164,"column":21},"end":{"line":164,"column":null}}},"7":{"name":"(anonymous_7)","decl":{"start":{"line":176,"column":23},"end":{"line":176,"column":34}},"loc":{"start":{"line":176,"column":34},"end":{"line":210,"column":null}}},"8":{"name":"(anonymous_8)","decl":{"start":{"line":180,"column":11},"end":{"line":180,"column":20}},"loc":{"start":{"line":180,"column":43},"end":{"line":183,"column":null}}},"9":{"name":"(anonymous_9)","decl":{"start":{"line":186,"column":10},"end":{"line":186,"column":19}},"loc":{"start":{"line":186,"column":42},"end":{"line":209,"column":null}}},"10":{"name":"(anonymous_10)","decl":{"start":{"line":203,"column":22},"end":{"line":203,"column":23}},"loc":{"start":{"line":203,"column":55},"end":{"line":205,"column":null}}},"11":{"name":"(anonymous_11)","decl":{"start":{"line":213,"column":10},"end":{"line":213,"column":19}},"loc":{"start":{"line":213,"column":28},"end":{"line":215,"column":null}}},"12":{"name":"(anonymous_12)","decl":{"start":{"line":219,"column":10},"end":{"line":219,"column":19}},"loc":{"start":{"line":219,"column":28},"end":{"line":227,"column":null}}},"13":{"name":"(anonymous_13)","decl":{"start":{"line":229,"column":10},"end":{"line":229,"column":19}},"loc":{"start":{"line":229,"column":28},"end":{"line":235,"column":null}}},"14":{"name":"(anonymous_14)","decl":{"start":{"line":231,"column":20},"end":{"line":231,"column":35}},"loc":{"start":{"line":231,"column":35},"end":{"line":233,"column":null}}},"15":{"name":"(anonymous_15)","decl":{"start":{"line":246,"column":1},"end":{"line":246,"column":16}},"loc":{"start":{"line":246,"column":49},"end":{"line":249,"column":null}}},"16":{"name":"(anonymous_16)","decl":{"start":{"line":251,"column":1},"end":{"line":251,"column":17}},"loc":{"start":{"line":251,"column":37},"end":{"line":333,"column":null}}},"17":{"name":"get_field","decl":{"start":{"line":266,"column":8},"end":{"line":266,"column":17}},"loc":{"start":{"line":266,"column":76},"end":{"line":269,"column":null}}},"18":{"name":"(anonymous_18)","decl":{"start":{"line":313,"column":10},"end":{"line":313,"column":19}},"loc":{"start":{"line":313,"column":49},"end":{"line":318,"column":null}}},"19":{"name":"(anonymous_19)","decl":{"start":{"line":320,"column":10},"end":{"line":320,"column":19}},"loc":{"start":{"line":320,"column":49},"end":{"line":331,"column":null}}},"20":{"name":"(anonymous_20)","decl":{"start":{"line":341,"column":1},"end":{"line":341,"column":14}},"loc":{"start":{"line":341,"column":60},"end":{"line":373,"column":null}}},"21":{"name":"(anonymous_21)","decl":{"start":{"line":352,"column":27},"end":{"line":352,"column":51}},"loc":{"start":{"line":352,"column":51},"end":{"line":358,"column":null}}},"22":{"name":"(anonymous_22)","decl":{"start":{"line":379,"column":1},"end":{"line":379,"column":7}},"loc":{"start":{"line":379,"column":54},"end":{"line":413,"column":null}}},"23":{"name":"(anonymous_23)","decl":{"start":{"line":391,"column":23},"end":{"line":391,"column":24}},"loc":{"start":{"line":391,"column":63},"end":{"line":396,"column":null}}},"24":{"name":"(anonymous_24)","decl":{"start":{"line":398,"column":23},"end":{"line":398,"column":24}},"loc":{"start":{"line":398,"column":63},"end":{"line":400,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":88,"column":18},"end":{"line":88,"column":26}},"type":"binary-expr","locations":[{"start":{"line":88,"column":18},"end":{"line":88,"column":26}},{"start":{"line":88,"column":30},"end":{"line":88,"column":31}}]},"1":{"loc":{"start":{"line":97,"column":2},"end":{"line":97,"column":38}},"type":"if","locations":[{"start":{"line":97,"column":2},"end":{"line":97,"column":38}},{"start":{"line":97,"column":2},"end":{"line":97,"column":38}}]},"2":{"loc":{"start":{"line":97,"column":6},"end":{"line":97,"column":16}},"type":"binary-expr","locations":[{"start":{"line":97,"column":6},"end":{"line":97,"column":16}},{"start":{"line":97,"column":16},"end":{"line":97,"column":31}}]},"3":{"loc":{"start":{"line":103,"column":2},"end":{"line":105,"column":null}},"type":"if","locations":[{"start":{"line":103,"column":2},"end":{"line":105,"column":null}},{"start":{"line":103,"column":2},"end":{"line":105,"column":null}}]},"4":{"loc":{"start":{"line":113,"column":3},"end":{"line":116,"column":null}},"type":"if","locations":[{"start":{"line":113,"column":3},"end":{"line":116,"column":null}},{"start":{"line":113,"column":3},"end":{"line":116,"column":null}}]},"5":{"loc":{"start":{"line":113,"column":7},"end":{"line":113,"column":18}},"type":"binary-expr","locations":[{"start":{"line":113,"column":7},"end":{"line":113,"column":18}},{"start":{"line":113,"column":23},"end":{"line":113,"column":41}}]},"6":{"loc":{"start":{"line":118,"column":3},"end":{"line":124,"column":null}},"type":"if","locations":[{"start":{"line":118,"column":3},"end":{"line":124,"column":null}},{"start":{"line":118,"column":3},"end":{"line":124,"column":null}}]},"7":{"loc":{"start":{"line":120,"column":4},"end":{"line":122,"column":null}},"type":"if","locations":[{"start":{"line":120,"column":4},"end":{"line":122,"column":null}},{"start":{"line":120,"column":4},"end":{"line":122,"column":null}}]},"8":{"loc":{"start":{"line":123,"column":4},"end":{"line":123,"column":39}},"type":"if","locations":[{"start":{"line":123,"column":4},"end":{"line":123,"column":39}},{"start":{"line":123,"column":4},"end":{"line":123,"column":39}}]},"9":{"loc":{"start":{"line":128,"column":21},"end":{"line":128,"column":25}},"type":"cond-expr","locations":[{"start":{"line":128,"column":21},"end":{"line":128,"column":25}},{"start":{"line":128,"column":45},"end":{"line":128,"column":null}}]},"10":{"loc":{"start":{"line":154,"column":2},"end":{"line":156,"column":null}},"type":"if","locations":[{"start":{"line":154,"column":2},"end":{"line":156,"column":null}},{"start":{"line":154,"column":2},"end":{"line":156,"column":null}}]},"11":{"loc":{"start":{"line":163,"column":2},"end":{"line":165,"column":null}},"type":"if","locations":[{"start":{"line":163,"column":2},"end":{"line":165,"column":null}},{"start":{"line":163,"column":2},"end":{"line":165,"column":null}}]},"12":{"loc":{"start":{"line":179,"column":3},"end":{"line":184,"column":null}},"type":"if","locations":[{"start":{"line":179,"column":3},"end":{"line":184,"column":null}},{"start":{"line":179,"column":3},"end":{"line":184,"column":null}}]},"13":{"loc":{"start":{"line":190,"column":4},"end":{"line":206,"column":null}},"type":"if","locations":[{"start":{"line":190,"column":4},"end":{"line":206,"column":null}},{"start":{"line":190,"column":4},"end":{"line":206,"column":null}}]},"14":{"loc":{"start":{"line":194,"column":5},"end":{"line":198,"column":null}},"type":"if","locations":[{"start":{"line":194,"column":5},"end":{"line":198,"column":null}},{"start":{"line":194,"column":5},"end":{"line":198,"column":null}}]},"15":{"loc":{"start":{"line":194,"column":9},"end":{"line":194,"column":25}},"type":"binary-expr","locations":[{"start":{"line":194,"column":9},"end":{"line":194,"column":25}},{"start":{"line":194,"column":25},"end":{"line":194,"column":32}}]},"16":{"loc":{"start":{"line":212,"column":2},"end":{"line":216,"column":null}},"type":"if","locations":[{"start":{"line":212,"column":2},"end":{"line":216,"column":null}},{"start":{"line":212,"column":2},"end":{"line":216,"column":null}}]},"17":{"loc":{"start":{"line":218,"column":2},"end":{"line":236,"column":null}},"type":"if","locations":[{"start":{"line":218,"column":2},"end":{"line":236,"column":null}},{"start":{"line":218,"column":2},"end":{"line":236,"column":null}}]},"18":{"loc":{"start":{"line":223,"column":5},"end":{"line":223,"column":28}},"type":"if","locations":[{"start":{"line":223,"column":5},"end":{"line":223,"column":28}},{"start":{"line":223,"column":5},"end":{"line":223,"column":28}}]},"19":{"loc":{"start":{"line":256,"column":50},"end":{"line":256,"column":71}},"type":"cond-expr","locations":[{"start":{"line":256,"column":50},"end":{"line":256,"column":71}},{"start":{"line":256,"column":71},"end":{"line":256,"column":null}}]},"20":{"loc":{"start":{"line":256,"column":11},"end":{"line":256,"column":28}},"type":"binary-expr","locations":[{"start":{"line":256,"column":11},"end":{"line":256,"column":28}},{"start":{"line":256,"column":28},"end":{"line":256,"column":50}}]},"21":{"loc":{"start":{"line":267,"column":3},"end":{"line":267,"column":33}},"type":"if","locations":[{"start":{"line":267,"column":3},"end":{"line":267,"column":33}},{"start":{"line":267,"column":3},"end":{"line":267,"column":33}}]},"22":{"loc":{"start":{"line":272,"column":2},"end":{"line":278,"column":null}},"type":"if","locations":[{"start":{"line":272,"column":2},"end":{"line":278,"column":null}},{"start":{"line":272,"column":2},"end":{"line":278,"column":null}}]},"23":{"loc":{"start":{"line":274,"column":4},"end":{"line":276,"column":null}},"type":"if","locations":[{"start":{"line":274,"column":4},"end":{"line":276,"column":null}},{"start":{"line":274,"column":4},"end":{"line":276,"column":null}}]},"24":{"loc":{"start":{"line":274,"column":8},"end":{"line":274,"column":24}},"type":"binary-expr","locations":[{"start":{"line":274,"column":8},"end":{"line":274,"column":24}},{"start":{"line":274,"column":24},"end":{"line":274,"column":52}}]},"25":{"loc":{"start":{"line":282,"column":2},"end":{"line":300,"column":null}},"type":"if","locations":[{"start":{"line":282,"column":2},"end":{"line":300,"column":null}},{"start":{"line":282,"column":2},"end":{"line":300,"column":null}}]},"26":{"loc":{"start":{"line":285,"column":4},"end":{"line":288,"column":null}},"type":"if","locations":[{"start":{"line":285,"column":4},"end":{"line":288,"column":null}},{"start":{"line":285,"column":4},"end":{"line":288,"column":null}}]},"27":{"loc":{"start":{"line":290,"column":3},"end":{"line":292,"column":null}},"type":"if","locations":[{"start":{"line":290,"column":3},"end":{"line":292,"column":null}},{"start":{"line":290,"column":3},"end":{"line":292,"column":null}}]},"28":{"loc":{"start":{"line":295,"column":4},"end":{"line":298,"column":null}},"type":"if","locations":[{"start":{"line":295,"column":4},"end":{"line":298,"column":null}},{"start":{"line":295,"column":4},"end":{"line":298,"column":null}}]},"29":{"loc":{"start":{"line":303,"column":56},"end":{"line":303,"column":61}},"type":"cond-expr","locations":[{"start":{"line":303,"column":56},"end":{"line":303,"column":61}},{"start":{"line":303,"column":61},"end":{"line":303,"column":null}}]},"30":{"loc":{"start":{"line":308,"column":2},"end":{"line":332,"column":null}},"type":"if","locations":[{"start":{"line":308,"column":2},"end":{"line":332,"column":null}},{"start":{"line":308,"column":2},"end":{"line":332,"column":null}}]},"31":{"loc":{"start":{"line":310,"column":9},"end":{"line":332,"column":null}},"type":"if","locations":[{"start":{"line":310,"column":9},"end":{"line":332,"column":null}},{"start":{"line":310,"column":9},"end":{"line":332,"column":null}}]},"32":{"loc":{"start":{"line":328,"column":5},"end":{"line":328,"column":24}},"type":"if","locations":[{"start":{"line":328,"column":5},"end":{"line":328,"column":24}},{"start":{"line":328,"column":5},"end":{"line":328,"column":24}}]},"33":{"loc":{"start":{"line":349,"column":2},"end":{"line":360,"column":null}},"type":"if","locations":[{"start":{"line":349,"column":2},"end":{"line":360,"column":null}},{"start":{"line":349,"column":2},"end":{"line":360,"column":null}}]},"34":{"loc":{"start":{"line":353,"column":4},"end":{"line":355,"column":null}},"type":"if","locations":[{"start":{"line":353,"column":4},"end":{"line":355,"column":null}},{"start":{"line":353,"column":4},"end":{"line":355,"column":null}}]},"35":{"loc":{"start":{"line":357,"column":49},"end":{"line":357,"column":64}},"type":"cond-expr","locations":[{"start":{"line":357,"column":49},"end":{"line":357,"column":64}},{"start":{"line":357,"column":64},"end":{"line":357,"column":null}}]},"36":{"loc":{"start":{"line":371,"column":35},"end":{"line":371,"column":52}},"type":"cond-expr","locations":[{"start":{"line":371,"column":35},"end":{"line":371,"column":52}},{"start":{"line":371,"column":52},"end":{"line":371,"column":null}}]},"37":{"loc":{"start":{"line":387,"column":19},"end":{"line":387,"column":36}},"type":"binary-expr","locations":[{"start":{"line":387,"column":19},"end":{"line":387,"column":36}},{"start":{"line":387,"column":36},"end":{"line":387,"column":40}}]},"38":{"loc":{"start":{"line":390,"column":2},"end":{"line":401,"column":null}},"type":"if","locations":[{"start":{"line":390,"column":2},"end":{"line":401,"column":null}},{"start":{"line":390,"column":2},"end":{"line":401,"column":null}}]},"39":{"loc":{"start":{"line":393,"column":4},"end":{"line":395,"column":null}},"type":"if","locations":[{"start":{"line":393,"column":4},"end":{"line":395,"column":null}},{"start":{"line":393,"column":4},"end":{"line":395,"column":null}}]},"40":{"loc":{"start":{"line":393,"column":8},"end":{"line":393,"column":36}},"type":"binary-expr","locations":[{"start":{"line":393,"column":8},"end":{"line":393,"column":36}},{"start":{"line":393,"column":36},"end":{"line":393,"column":47}}]},"41":{"loc":{"start":{"line":404,"column":2},"end":{"line":404,"column":21}},"type":"if","locations":[{"start":{"line":404,"column":2},"end":{"line":404,"column":21}},{"start":{"line":404,"column":2},"end":{"line":404,"column":21}}]},"42":{"loc":{"start":{"line":408,"column":2},"end":{"line":410,"column":null}},"type":"if","locations":[{"start":{"line":408,"column":2},"end":{"line":410,"column":null}},{"start":{"line":408,"column":2},"end":{"line":410,"column":null}}]}},"s":{"0":64,"1":32,"2":32,"3":42,"4":10,"5":32,"6":32,"7":32,"8":29,"9":32,"10":42,"11":42,"12":42,"13":3,"14":3,"15":42,"16":41,"17":41,"18":41,"19":41,"20":6,"21":42,"22":32,"23":3,"24":3,"25":36,"26":36,"27":36,"28":9,"29":0,"30":27,"31":27,"32":27,"33":27,"34":27,"35":1,"36":2,"37":26,"38":26,"39":13,"40":38,"41":38,"42":13,"43":62,"44":62,"45":6,"46":6,"47":1,"48":5,"49":56,"50":137,"51":62,"52":26,"53":20,"54":55,"55":6,"56":2,"57":7,"58":7,"59":7,"60":11,"61":11,"62":6,"63":5,"64":1,"65":4,"66":17,"67":17,"68":34,"69":17,"70":0,"71":0,"72":32,"73":32,"74":32,"75":32,"76":32,"77":32,"78":152,"79":24,"80":128,"81":32,"82":13,"83":17,"84":17,"85":32,"86":23,"87":23,"88":6,"89":2,"90":2,"91":23,"92":21,"93":9,"94":11,"95":0,"96":0,"97":32,"98":38,"99":32,"100":32,"101":0,"102":32,"103":26,"104":26,"105":26,"106":38,"107":6,"108":27,"109":38,"110":38,"111":38,"112":22,"113":5,"114":38,"115":38,"116":38,"117":38,"118":38,"119":37,"120":37,"121":37,"122":57,"123":49,"124":57,"125":57,"126":37,"127":38,"128":38,"129":32,"130":32,"131":32,"132":32,"133":32,"134":32,"135":23,"136":65,"137":65,"138":38,"139":9,"140":31,"141":32,"142":32,"143":32,"144":32,"145":32,"146":3,"147":32},"f":{"0":32,"1":42,"2":42,"3":3,"4":36,"5":0,"6":2,"7":26,"8":38,"9":62,"10":137,"11":55,"12":7,"13":17,"14":34,"15":0,"16":32,"17":152,"18":38,"19":27,"20":38,"21":57,"22":32,"23":65,"24":31},"b":{"0":[32,32],"1":[10,32],"2":[42,32],"3":[29,3],"4":[3,39],"5":[42,36],"6":[41,1],"7":[41,0],"8":[6,35],"9":[41,1],"10":[9,27],"11":[1,26],"12":[13,13],"13":[6,56],"14":[1,5],"15":[6,2],"16":[20,6],"17":[2,4],"18":[6,5],"19":[1,31],"20":[32,9],"21":[24,128],"22":[13,19],"23":[17,0],"24":[17,11],"25":[23,9],"26":[2,4],"27":[21,2],"28":[0,11],"29":[23,15],"30":[0,32],"31":[26,6],"32":[22,16],"33":[37,1],"34":[49,8],"35":[55,2],"36":[2,36],"37":[32,32],"38":[23,9],"39":[38,27],"40":[65,62],"41":[32,0],"42":[3,29]}}
,"/var/www/html/github/sifter.js/lib/utils.ts": {"path":"/var/www/html/github/sifter.js/lib/utils.ts","statementMap":{"0":{"start":{"line":16,"column":4},"end":{"line":16,"column":null}},"1":{"start":{"line":16,"column":15},"end":{"line":16,"column":null}},"2":{"start":{"line":17,"column":4},"end":{"line":17,"column":11}},"3":{"start":{"line":27,"column":4},"end":{"line":27,"column":null}},"4":{"start":{"line":27,"column":15},"end":{"line":27,"column":null}},"5":{"start":{"line":28,"column":22},"end":{"line":28,"column":26}},"6":{"start":{"line":29,"column":1},"end":{"line":29,"column":null}},"7":{"start":{"line":30,"column":4},"end":{"line":30,"column":11}},"8":{"start":{"line":41,"column":1},"end":{"line":41,"column":20}},"9":{"start":{"line":41,"column":13},"end":{"line":41,"column":20}},"10":{"start":{"line":43,"column":1},"end":{"line":43,"column":6}},"11":{"start":{"line":44,"column":1},"end":{"line":44,"column":4}},"12":{"start":{"line":45,"column":1},"end":{"line":45,"column":24}},"13":{"start":{"line":45,"column":17},"end":{"line":45,"column":24}},"14":{"start":{"line":47,"column":1},"end":{"line":47,"column":6}},"15":{"start":{"line":48,"column":1},"end":{"line":48,"column":21}},"16":{"start":{"line":48,"column":16},"end":{"line":48,"column":21}},"17":{"start":{"line":50,"column":1},"end":{"line":50,"column":8}},"18":{"start":{"line":54,"column":1},"end":{"line":54,"column":8}},"19":{"start":{"line":63,"column":13},"end":{"line":63,"column":17}},"20":{"start":{"line":64,"column":1},"end":{"line":66,"column":null}},"21":{"start":{"line":65,"column":2},"end":{"line":65,"column":5}},"22":{"start":{"line":82,"column":1},"end":{"line":92,"column":null}},"23":{"start":{"line":83,"column":2},"end":{"line":83,"column":8}},"24":{"start":{"line":87,"column":2},"end":{"line":91,"column":null}},"25":{"start":{"line":88,"column":3},"end":{"line":90,"column":null}},"26":{"start":{"line":89,"column":4},"end":{"line":89,"column":12}},"27":{"start":{"line":98,"column":1},"end":{"line":100,"column":null}},"28":{"start":{"line":99,"column":2},"end":{"line":99,"column":9}},"29":{"start":{"line":101,"column":1},"end":{"line":101,"column":2}},"30":{"start":{"line":102,"column":1},"end":{"line":102,"column":2}},"31":{"start":{"line":103,"column":1},"end":{"line":103,"column":19}},"32":{"start":{"line":103,"column":12},"end":{"line":103,"column":19}},"33":{"start":{"line":104,"column":1},"end":{"line":104,"column":19}},"34":{"start":{"line":104,"column":12},"end":{"line":104,"column":19}},"35":{"start":{"line":105,"column":1},"end":{"line":105,"column":8}}},"fnMap":{"0":{"name":"getAttr","decl":{"start":{"line":15,"column":16},"end":{"line":15,"column":24}},"loc":{"start":{"line":15,"column":62},"end":{"line":18,"column":null}}},"1":{"name":"getAttrNesting","decl":{"start":{"line":26,"column":16},"end":{"line":26,"column":31}},"loc":{"start":{"line":26,"column":69},"end":{"line":31,"column":null}}},"2":{"name":"scoreValue","decl":{"start":{"line":38,"column":16},"end":{"line":38,"column":27}},"loc":{"start":{"line":38,"column":78},"end":{"line":51,"column":null}}},"3":{"name":"escape_regex","decl":{"start":{"line":53,"column":16},"end":{"line":53,"column":29}},"loc":{"start":{"line":53,"column":48},"end":{"line":55,"column":null}}},"4":{"name":"propToArray","decl":{"start":{"line":62,"column":16},"end":{"line":62,"column":28}},"loc":{"start":{"line":62,"column":63},"end":{"line":67,"column":null}}},"5":{"name":"iterate","decl":{"start":{"line":80,"column":16},"end":{"line":80,"column":24}},"loc":{"start":{"line":80,"column":99},"end":{"line":93,"column":null}}},"6":{"name":"cmp","decl":{"start":{"line":97,"column":16},"end":{"line":97,"column":20}},"loc":{"start":{"line":97,"column":54},"end":{"line":106,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":16,"column":4},"end":{"line":16,"column":null}},"type":"if","locations":[{"start":{"line":16,"column":4},"end":{"line":16,"column":null}},{"start":{"line":16,"column":4},"end":{"line":16,"column":null}}]},"1":{"loc":{"start":{"line":27,"column":4},"end":{"line":27,"column":null}},"type":"if","locations":[{"start":{"line":27,"column":4},"end":{"line":27,"column":null}},{"start":{"line":27,"column":4},"end":{"line":27,"column":null}}]},"2":{"loc":{"start":{"line":29,"column":9},"end":{"line":29,"column":21}},"type":"binary-expr","locations":[{"start":{"line":29,"column":9},"end":{"line":29,"column":21}},{"start":{"line":29,"column":35},"end":{"line":29,"column":45}}]},"3":{"loc":{"start":{"line":41,"column":1},"end":{"line":41,"column":20}},"type":"if","locations":[{"start":{"line":41,"column":1},"end":{"line":41,"column":20}},{"start":{"line":41,"column":1},"end":{"line":41,"column":20}}]},"4":{"loc":{"start":{"line":45,"column":1},"end":{"line":45,"column":24}},"type":"if","locations":[{"start":{"line":45,"column":1},"end":{"line":45,"column":24}},{"start":{"line":45,"column":1},"end":{"line":45,"column":24}}]},"5":{"loc":{"start":{"line":48,"column":1},"end":{"line":48,"column":21}},"type":"if","locations":[{"start":{"line":48,"column":1},"end":{"line":48,"column":21}},{"start":{"line":48,"column":1},"end":{"line":48,"column":21}}]},"6":{"loc":{"start":{"line":64,"column":1},"end":{"line":66,"column":null}},"type":"if","locations":[{"start":{"line":64,"column":1},"end":{"line":66,"column":null}},{"start":{"line":64,"column":1},"end":{"line":66,"column":null}}]},"7":{"loc":{"start":{"line":64,"column":5},"end":{"line":64,"column":10}},"type":"binary-expr","locations":[{"start":{"line":64,"column":5},"end":{"line":64,"column":10}},{"start":{"line":64,"column":14},"end":{"line":64,"column":20}}]},"8":{"loc":{"start":{"line":82,"column":1},"end":{"line":92,"column":null}},"type":"if","locations":[{"start":{"line":82,"column":1},"end":{"line":92,"column":null}},{"start":{"line":82,"column":1},"end":{"line":92,"column":null}}]},"9":{"loc":{"start":{"line":88,"column":3},"end":{"line":90,"column":null}},"type":"if","locations":[{"start":{"line":88,"column":3},"end":{"line":90,"column":null}},{"start":{"line":88,"column":3},"end":{"line":90,"column":null}}]},"10":{"loc":{"start":{"line":98,"column":1},"end":{"line":100,"column":null}},"type":"if","locations":[{"start":{"line":98,"column":1},"end":{"line":100,"column":null}},{"start":{"line":98,"column":1},"end":{"line":100,"column":null}}]},"11":{"loc":{"start":{"line":98,"column":5},"end":{"line":98,"column":30}},"type":"binary-expr","locations":[{"start":{"line":98,"column":5},"end":{"line":98,"column":30}},{"start":{"line":98,"column":30},"end":{"line":98,"column":53}}]},"12":{"loc":{"start":{"line":99,"column":17},"end":{"line":99,"column":22}},"type":"cond-expr","locations":[{"start":{"line":99,"column":17},"end":{"line":99,"column":22}},{"start":{"line":99,"column":22},"end":{"line":99,"column":null}}]},"13":{"loc":{"start":{"line":99,"column":30},"end":{"line":99,"column":35}},"type":"cond-expr","locations":[{"start":{"line":99,"column":30},"end":{"line":99,"column":35}},{"start":{"line":99,"column":35},"end":{"line":99,"column":null}}]},"14":{"loc":{"start":{"line":103,"column":1},"end":{"line":103,"column":19}},"type":"if","locations":[{"start":{"line":103,"column":1},"end":{"line":103,"column":19}},{"start":{"line":103,"column":1},"end":{"line":103,"column":19}}]},"15":{"loc":{"start":{"line":104,"column":1},"end":{"line":104,"column":19}},"type":"if","locations":[{"start":{"line":104,"column":1},"end":{"line":104,"column":19}},{"start":{"line":104,"column":1},"end":{"line":104,"column":19}}]}},"s":{"0":299,"1":1,"2":298,"3":12,"4":1,"5":11,"6":11,"7":11,"8":181,"9":16,"10":165,"11":165,"12":165,"13":109,"14":56,"15":56,"16":42,"17":56,"18":87,"19":113,"20":113,"21":23,"22":105,"23":48,"24":57,"25":139,"26":139,"27":77,"28":23,"29":54,"30":54,"31":54,"32":16,"33":38,"34":27,"35":11},"f":{"0":299,"1":12,"2":181,"3":87,"4":113,"5":105,"6":77},"b":{"0":[1,298],"1":[1,11],"2":[33,22],"3":[16,165],"4":[109,56],"5":[42,14],"6":[23,90],"7":[113,53],"8":[48,57],"9":[139,0],"10":[23,54],"11":[77,23],"12":[8,15],"13":[6,9],"14":[16,38],"15":[27,11]}}
}

@@ -23,2 +23,4 @@ /*! sifter.js | https://github.com/orchidjs/sifter.js | Apache License (v2) */

class Sifter {
// []|{};
/**

@@ -29,5 +31,2 @@ * Textually searches arrays and hashes of objects

*
* @constructor
* @param {array|object} items
* @param {object} items
*/

@@ -76,3 +75,2 @@ constructor(items, settings) {

if (respect_word_boundaries) regex = "\\b" + regex;
regex = new RegExp(regex, 'i');
}

@@ -82,3 +80,3 @@

string: word,
regex: regex,
regex: regex ? new RegExp(regex, 'i') : null,
field: field

@@ -206,6 +204,6 @@ });

_getSortFunction(search) {
var i, n, sort_fld, sort_flds_count, multiplier, implicit_score;
var i, n, implicit_score;
const self = this,
options = search.options,
sort = !search.query && options.sort_empty || options.sort,
sort = !search.query && options.sort_empty ? options.sort_empty : options.sort,
sort_flds = [],

@@ -217,5 +215,2 @@ multipliers = [];

*
* @param {string} name
* @param {object} result
* @return {string}
*/

@@ -269,3 +264,3 @@

sort_flds_count = sort_flds.length;
const sort_flds_count = sort_flds.length;

@@ -275,4 +270,4 @@ if (!sort_flds_count) {

} else if (sort_flds_count === 1) {
sort_fld = sort_flds[0].field;
multiplier = multipliers[0];
const sort_fld = sort_flds[0].field;
const multiplier = multipliers[0];
return function (a, b) {

@@ -310,16 +305,15 @@ return multiplier * utils.cmp(get_field(sort_fld, a), get_field(sort_fld, b));

utils.propToArray(options, 'fields');
const fields = [];
options.fields.forEach(field => {
if (typeof field == 'string') {
field = {
field: field,
weight: 1
};
}
if (Array.isArray(options.fields) && typeof options.fields[0] !== 'object') {
var fields = [];
options.fields.forEach(fld_name => {
fields.push({
field: fld_name
});
});
options.fields = fields;
}
options.fields.forEach(field_params => {
weights[field_params.field] = 'weight' in field_params ? field_params.weight : 1;
fields.push(field);
weights[field.field] = 'weight' in field ? field.weight : 1;
});
options.fields = fields;
}

@@ -347,4 +341,2 @@

search;
var fn_sort;
var fn_score;
search = this.prepareSearch(query, options);

@@ -354,4 +346,5 @@ options = search.options;

fn_score = options.score || self._getScoreFunction(search); // perform search and sort
const fn_score = options.score || self._getScoreFunction(search); // perform search and sort
if (query.length) {

@@ -377,3 +370,4 @@ utils.iterate(self.items, (item, id) => {

fn_sort = self._getSortFunction(search);
const fn_sort = self._getSortFunction(search);
if (fn_sort) search.items.sort(fn_sort); // apply limits

@@ -380,0 +374,0 @@

@@ -8,3 +8,4 @@ /*! sifter.js | https://github.com/orchidjs/sifter.js | Apache License (v2) */

// @ts-ignore
// @ts-ignore TS2691 "An import path cannot end with a '.ts' extension"
/**

@@ -16,3 +17,2 @@ * A property getter resolving dot-notation

*/
function getAttr(obj, name) {

@@ -31,5 +31,6 @@ if (!obj) return;

if (!obj) return;
var names = name.split(".");
var part,
names = name.split(".");
while (names.length && (obj = obj[names.shift()]));
while ((part = names.shift()) && (obj = obj[part]));

@@ -42,4 +43,2 @@ return obj;

*
* @param {object} token
* @return {number}
*/

@@ -81,3 +80,2 @@

*
* @param {array|object} object
*/

@@ -84,0 +82,0 @@

@@ -21,2 +21,4 @@ /*! sifter.js | https://github.com/orchidjs/sifter.js | Apache License (v2) */

class Sifter {
// []|{};
/**

@@ -27,5 +29,2 @@ * Textually searches arrays and hashes of objects

*
* @constructor
* @param {array|object} items
* @param {object} items
*/

@@ -74,3 +73,2 @@ constructor(items, settings) {

if (respect_word_boundaries) regex = "\\b" + regex;
regex = new RegExp(regex, 'i');
}

@@ -80,3 +78,3 @@

string: word,
regex: regex,
regex: regex ? new RegExp(regex, 'i') : null,
field: field

@@ -204,6 +202,6 @@ });

_getSortFunction(search) {
var i, n, sort_fld, sort_flds_count, multiplier, implicit_score;
var i, n, implicit_score;
const self = this,
options = search.options,
sort = !search.query && options.sort_empty || options.sort,
sort = !search.query && options.sort_empty ? options.sort_empty : options.sort,
sort_flds = [],

@@ -215,5 +213,2 @@ multipliers = [];

*
* @param {string} name
* @param {object} result
* @return {string}
*/

@@ -267,3 +262,3 @@

sort_flds_count = sort_flds.length;
const sort_flds_count = sort_flds.length;

@@ -273,4 +268,4 @@ if (!sort_flds_count) {

} else if (sort_flds_count === 1) {
sort_fld = sort_flds[0].field;
multiplier = multipliers[0];
const sort_fld = sort_flds[0].field;
const multiplier = multipliers[0];
return function (a, b) {

@@ -308,16 +303,15 @@ return multiplier * cmp(get_field(sort_fld, a), get_field(sort_fld, b));

propToArray(options, 'fields');
const fields = [];
options.fields.forEach(field => {
if (typeof field == 'string') {
field = {
field: field,
weight: 1
};
}
if (Array.isArray(options.fields) && typeof options.fields[0] !== 'object') {
var fields = [];
options.fields.forEach(fld_name => {
fields.push({
field: fld_name
});
});
options.fields = fields;
}
options.fields.forEach(field_params => {
weights[field_params.field] = 'weight' in field_params ? field_params.weight : 1;
fields.push(field);
weights[field.field] = 'weight' in field ? field.weight : 1;
});
options.fields = fields;
}

@@ -345,4 +339,2 @@

search;
var fn_sort;
var fn_score;
search = this.prepareSearch(query, options);

@@ -352,4 +344,5 @@ options = search.options;

fn_score = options.score || self._getScoreFunction(search); // perform search and sort
const fn_score = options.score || self._getScoreFunction(search); // perform search and sort
if (query.length) {

@@ -375,3 +368,4 @@ iterate(self.items, (item, id) => {

fn_sort = self._getSortFunction(search);
const fn_sort = self._getSortFunction(search);
if (fn_sort) search.items.sort(fn_sort); // apply limits

@@ -378,0 +372,0 @@

/*! sifter.js | https://github.com/orchidjs/sifter.js | Apache License (v2) */
import { asciifold } from './diacritics.js';
// @ts-ignore
// @ts-ignore TS2691 "An import path cannot end with a '.ts' extension"
/**

@@ -11,3 +12,2 @@ * A property getter resolving dot-notation

*/
function getAttr(obj, name) {

@@ -26,5 +26,6 @@ if (!obj) return;

if (!obj) return;
var names = name.split(".");
var part,
names = name.split(".");
while (names.length && (obj = obj[names.shift()]));
while ((part = names.shift()) && (obj = obj[part]));

@@ -37,4 +38,2 @@ return obj;

*
* @param {object} token
* @return {number}
*/

@@ -76,3 +75,2 @@

*
* @param {array|object} object
*/

@@ -79,0 +77,0 @@

@@ -122,3 +122,4 @@ /*! sifter.js | https://github.com/orchidjs/sifter.js | Apache License (v2) */

// @ts-ignore
// @ts-ignore TS2691 "An import path cannot end with a '.ts' extension"
/**

@@ -130,3 +131,2 @@ * A property getter resolving dot-notation

*/
function getAttr(obj, name) {

@@ -145,5 +145,6 @@ if (!obj) return;

if (!obj) return;
var names = name.split(".");
var part,
names = name.split(".");
while (names.length && (obj = obj[names.shift()]));
while ((part = names.shift()) && (obj = obj[part]));

@@ -156,4 +157,2 @@ return obj;

*
* @param {object} token
* @return {number}
*/

@@ -195,3 +194,2 @@

*
* @param {array|object} object
*/

@@ -238,2 +236,4 @@

class Sifter {
// []|{};
/**

@@ -244,5 +244,2 @@ * Textually searches arrays and hashes of objects

*
* @constructor
* @param {array|object} items
* @param {object} items
*/

@@ -291,3 +288,2 @@ constructor(items, settings) {

if (respect_word_boundaries) regex = "\\b" + regex;
regex = new RegExp(regex, 'i');
}

@@ -297,3 +293,3 @@

string: word,
regex: regex,
regex: regex ? new RegExp(regex, 'i') : null,
field: field

@@ -421,6 +417,6 @@ });

_getSortFunction(search) {
var i, n, sort_fld, sort_flds_count, multiplier, implicit_score;
var i, n, implicit_score;
const self = this,
options = search.options,
sort = !search.query && options.sort_empty || options.sort,
sort = !search.query && options.sort_empty ? options.sort_empty : options.sort,
sort_flds = [],

@@ -432,5 +428,2 @@ multipliers = [];

*
* @param {string} name
* @param {object} result
* @return {string}
*/

@@ -484,3 +477,3 @@

sort_flds_count = sort_flds.length;
const sort_flds_count = sort_flds.length;

@@ -490,4 +483,4 @@ if (!sort_flds_count) {

} else if (sort_flds_count === 1) {
sort_fld = sort_flds[0].field;
multiplier = multipliers[0];
const sort_fld = sort_flds[0].field;
const multiplier = multipliers[0];
return function (a, b) {

@@ -525,16 +518,15 @@ return multiplier * cmp(get_field(sort_fld, a), get_field(sort_fld, b));

propToArray(options, 'fields');
const fields = [];
options.fields.forEach(field => {
if (typeof field == 'string') {
field = {
field: field,
weight: 1
};
}
if (Array.isArray(options.fields) && typeof options.fields[0] !== 'object') {
var fields = [];
options.fields.forEach(fld_name => {
fields.push({
field: fld_name
});
});
options.fields = fields;
}
options.fields.forEach(field_params => {
weights[field_params.field] = 'weight' in field_params ? field_params.weight : 1;
fields.push(field);
weights[field.field] = 'weight' in field ? field.weight : 1;
});
options.fields = fields;
}

@@ -562,4 +554,2 @@

search;
var fn_sort;
var fn_score;
search = this.prepareSearch(query, options);

@@ -569,4 +559,5 @@ options = search.options;

fn_score = options.score || self._getScoreFunction(search); // perform search and sort
const fn_score = options.score || self._getScoreFunction(search); // perform search and sort
if (query.length) {

@@ -592,3 +583,4 @@ iterate(self.items, (item, id) => {

fn_sort = self._getSortFunction(search);
const fn_sort = self._getSortFunction(search);
if (fn_sort) search.items.sort(fn_sort); // apply limits

@@ -595,0 +587,0 @@

@@ -8,5 +8,5 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).sifter=t()}(this,(function(){"use strict"

for(let e in r)r.hasOwnProperty(e)&&(t=t.replace(new RegExp(e,"g"),"["+r[e]+"]"))
return t}function i(e,t){if(e)return e[t]}function o(e,t){if(e){for(var r=t.split(".");r.length&&(e=e[r.shift()]););return e}}function s(e,t,r){var n,i
return e?-1===(i=(e+="").search(t.regex))?0:(n=t.string.length/e.length,0===i&&(n+=.5),n*r):0}function u(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function f(e,t){var r=e[t]
r&&!Array.isArray(r)&&(e[t]=[r])}function c(e,t){if(Array.isArray(e))e.forEach(t)
return t}function i(e,t){if(e)return e[t]}function o(e,t){if(e){for(var r,n=t.split(".");(r=n.shift())&&(e=e[r]););return e}}function s(e,t,r){var n,i
return e?-1===(i=(e+="").search(t.regex))?0:(n=t.string.length/e.length,0===i&&(n+=.5),n*r):0}function u(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function c(e,t){var r=e[t]
r&&!Array.isArray(r)&&(e[t]=[r])}function f(e,t){if(Array.isArray(e))e.forEach(t)
else for(var r in e)e.hasOwnProperty(r)&&t(e[r],r)}function l(e,r){return"number"==typeof e&&"number"==typeof r?e>r?1:e<r?-1:0:(e=t(e+"").toLowerCase())>(r=t(r+"").toLowerCase())?1:r>e?-1:0}

@@ -30,4 +30,4 @@ /**

var s
return r&&(s=new RegExp("^("+Object.keys(r).map(u).join("|")+"):(.*)$")),o.forEach((e=>{let r,o=null,f=null
s&&(r=e.match(s))&&(o=r[1],e=r[2]),e.length>0&&(f=u(e),this.settings.diacritics&&(f=n(f)),t&&(f="\\b"+f),f=new RegExp(f,"i")),i.push({string:e,regex:f,field:o})})),i}getScoreFunction(e,t){var r=this.prepareSearch(e,t)
return r&&(s=new RegExp("^("+Object.keys(r).map(u).join("|")+"):(.*)$")),o.forEach((e=>{let r,o=null,c=null
s&&(r=e.match(s))&&(o=r[1],e=r[2]),e.length>0&&(c=u(e),this.settings.diacritics&&(c=n(c)),t&&(c="\\b"+c)),i.push({string:e,regex:c?new RegExp(c,"i"):null,field:o})})),i}getScoreFunction(e,t){var r=this.prepareSearch(e,t)
return this._getScoreFunction(r)}_getScoreFunction(e){const t=e.tokens,r=t.length

@@ -37,23 +37,30 @@ if(!r)return function(){return 0}

if(!o)return function(){return 1}
const f=1===o?function(e,t){const r=n[0].field
const c=1===o?function(e,t){const r=n[0].field
return s(u(t,r),e,i[r])}:function(e,t){var r=0
if(e.field){const n=u(t,e.field)
!e.regex&&n?r+=1/o:r+=s(n,e,1)}else c(i,((n,i)=>{r+=s(u(t,i),e,n)}))
!e.regex&&n?r+=1/o:r+=s(n,e,1)}else f(i,((n,i)=>{r+=s(u(t,i),e,n)}))
return r/o}
return 1===r?function(e){return f(t[0],e)}:"and"===e.options.conjunction?function(e){for(var n,i=0,o=0;i<r;i++){if((n=f(t[i],e))<=0)return 0
return 1===r?function(e){return c(t[0],e)}:"and"===e.options.conjunction?function(e){for(var n,i=0,o=0;i<r;i++){if((n=c(t[i],e))<=0)return 0
o+=n}return o/r}:function(e){var n=0
return c(t,(t=>{n+=f(t,e)})),n/r}}getSortFunction(e,t){var r=this.prepareSearch(e,t)
return this._getSortFunction(r)}_getSortFunction(e){var t,r,n,i,o,s
const u=this,f=e.options,c=!e.query&&f.sort_empty||f.sort,a=[],h=[],g=function(t,r){return"$score"===t?r.score:e.getAttrFn(u.items[r.id],t)}
if(c)for(t=0,r=c.length;t<r;t++)(e.query||"$score"!==c[t].field)&&a.push(c[t])
if(e.query){for(s=!0,t=0,r=a.length;t<r;t++)if("$score"===a[t].field){s=!1
break}s&&a.unshift({field:"$score",direction:"desc"})}else for(t=0,r=a.length;t<r;t++)if("$score"===a[t].field){a.splice(t,1)
break}for(t=0,r=a.length;t<r;t++)h.push("desc"===a[t].direction?-1:1)
return(i=a.length)?1===i?(n=a[0].field,o=h[0],function(e,t){return o*l(g(n,e),g(n,t))}):function(e,t){var r,n,o
for(r=0;r<i;r++)if(o=a[r].field,n=h[r]*l(g(o,e),g(o,t)))return n
return 0}:null}prepareSearch(e,r){const n={}
return f(t,(t=>{n+=c(t,e)})),n/r}}getSortFunction(e,t){var r=this.prepareSearch(e,t)
return this._getSortFunction(r)}_getSortFunction(e){var t,r,n
const i=this,o=e.options,s=!e.query&&o.sort_empty?o.sort_empty:o.sort,u=[],c=[],f=function(t,r){return"$score"===t?r.score:e.getAttrFn(i.items[r.id],t)}
if(s)for(t=0,r=s.length;t<r;t++)(e.query||"$score"!==s[t].field)&&u.push(s[t])
if(e.query){for(n=!0,t=0,r=u.length;t<r;t++)if("$score"===u[t].field){n=!1
break}n&&u.unshift({field:"$score",direction:"desc"})}else for(t=0,r=u.length;t<r;t++)if("$score"===u[t].field){u.splice(t,1)
break}for(t=0,r=u.length;t<r;t++)c.push("desc"===u[t].direction?-1:1)
const a=u.length
if(a){if(1===a){const e=u[0].field,t=c[0]
return function(r,n){return t*l(f(e,r),f(e,n))}}return function(e,t){var r,n,i
for(r=0;r<a;r++)if(i=u[r].field,n=c[r]*l(f(i,e),f(i,t)))return n
return 0}}return null}prepareSearch(e,r){const n={}
var s=Object.assign({},r)
if(f(s,"sort"),f(s,"sort_empty"),s.fields){if(f(s,"fields"),Array.isArray(s.fields)&&"object"!=typeof s.fields[0]){var u=[]
s.fields.forEach((e=>{u.push({field:e})})),s.fields=u}s.fields.forEach((e=>{n[e.field]="weight"in e?e.weight:1}))}return{options:s,query:e=t(e+"").toLowerCase().trim(),tokens:this.tokenize(e,s.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:s.nesting?o:i}}search(e,t){var r,n,i,o,s=this
return n=this.prepareSearch(e,t),t=n.options,e=n.query,o=t.score||s._getScoreFunction(n),e.length?c(s.items,((e,i)=>{r=o(e),(!1===t.filter||r>0)&&n.items.push({score:r,id:i})})):c(s.items,((e,t)=>{n.items.push({score:1,id:t})})),(i=s._getSortFunction(n))&&n.items.sort(i),n.total=n.items.length,"number"==typeof t.limit&&(n.items=n.items.slice(0,t.limit)),n}}}))
if(c(s,"sort"),c(s,"sort_empty"),s.fields){c(s,"fields")
const e=[]
s.fields.forEach((t=>{"string"==typeof t&&(t={field:t,weight:1}),e.push(t),n[t.field]="weight"in t?t.weight:1})),s.fields=e}return{options:s,query:e=t(e+"").toLowerCase().trim(),tokens:this.tokenize(e,s.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:s.nesting?o:i}}search(e,t){var r,n,i=this
n=this.prepareSearch(e,t),t=n.options,e=n.query
const o=t.score||i._getScoreFunction(n)
e.length?f(i.items,((e,i)=>{r=o(e),(!1===t.filter||r>0)&&n.items.push({score:r,id:i})})):f(i.items,((e,t)=>{n.items.push({score:1,id:t})}))
const s=i._getSortFunction(n)
return s&&n.items.sort(s),n.total=n.items.length,"number"==typeof t.limit&&(n.items=n.items.slice(0,t.limit)),n}}}))
//# sourceMappingURL=sifter.min.js.map

@@ -152,3 +152,3 @@

function toCodePoints(tolerance=8){
var char_codes = [];
var char_codes:number[] = [];

@@ -159,3 +159,3 @@ for( let letter in DIACRITICS ){

var code_point = _diacritics.codePointAt(n);
char_codes.push( code_point );
if( code_point ) char_codes.push( code_point );
}

@@ -166,2 +166,3 @@ }

char_codes.sort((a, b) => a - b);
var accumulator: number[][] = [];
var result = char_codes.reduce(function (accumulator, currentValue, index, source) {

@@ -177,7 +178,10 @@

accumulator.push( [accumulator.pop()[0],currentValue]);
let range = accumulator.pop();
if( range ){
accumulator.push( [range[0],currentValue]);
}
}
return accumulator;
}, []);
}, accumulator);

@@ -193,3 +197,3 @@ console.log(`char_codes (${result.length})`,result);

var latin_convert = {
var latin_convert:{[key:string]:string} = {
'l·': 'l',

@@ -203,3 +207,3 @@ 'ʼn': 'n',

var diacritics = {};
var diacritics:{[key:string]:string} = {};
//var no_latin = [];

@@ -240,3 +244,3 @@ code_points.forEach((code_range)=>{

*/
var diacritics:TDiacraticList = null
var diacritics:null|TDiacraticList = null
export function diacriticRegexPoints(regex:string):string{

@@ -243,0 +247,0 @@

@@ -17,5 +17,5 @@ /**

// @ts-ignore
// @ts-ignore TS2691 "An import path cannot end with a '.ts' extension"
import { scoreValue, getAttr, getAttrNesting, escape_regex, propToArray, iterate, cmp } from './utils.ts';
// @ts-ignore
// @ts-ignore TS2691 "An import path cannot end with a '.ts' extension"
import { diacriticRegexPoints, asciifold } from './diacritics.ts';

@@ -26,12 +26,17 @@

field: string,
weight?: number,
weight: number,
}
type TSort = {
field: string,
direction?: string,
}
type TOptions = {
fields: TField[],
sort: any[],
sort: TSort[],
score?: ()=>any,
filter?: boolean,
limit?: number,
sort_empty?: any,
sort_empty?: TSort[],
nesting?: boolean,

@@ -44,4 +49,4 @@ respect_word_boundaries?: boolean,

string:string,
regex:RegExp,
field:string
regex:RegExp|null,
field:string|null,
}

@@ -56,13 +61,23 @@

total: number,
items: any[],
items: TResultItem[],
weights: TWeights,
getAttrFn: (any,string)=>any,
getAttrFn: (data:any,field:string)=>any,
}
type TSettings = {
diacritics:boolean
}
type TResultItem = {
score: number,
id: number|string,
}
export default class Sifter{
public items: []|{};
public settings: {diacritics:boolean};
public items; // []|{};
public settings: TSettings;

@@ -74,7 +89,4 @@ /**

*
* @constructor
* @param {array|object} items
* @param {object} items
*/
constructor(items, settings) {
constructor(items:any, settings:TSettings) {
this.items = items;

@@ -92,5 +104,5 @@ this.settings = settings || {diacritics: true};

const tokens = [];
const words = query.split(/\s+/);
var field_regex;
const tokens:TToken[] = [];
const words = query.split(/\s+/);
var field_regex:RegExp;

@@ -103,4 +115,4 @@ if( weights ){

let field_match;
let field = null;
let regex = null;
let field:null|string = null;
let regex:null|string = null;

@@ -118,4 +130,3 @@ // look for "field:query" tokens

}
if( respect_word_boundaries ) regex = "\\b"+regex
regex = new RegExp(regex, 'i');
if( respect_word_boundaries ) regex = "\\b"+regex;
}

@@ -125,3 +136,3 @@

string : word,
regex : regex,
regex : regex ? new RegExp(regex,'i') : null,
field : field,

@@ -143,3 +154,3 @@ });

*/
getScoreFunction(query:string, options ){
getScoreFunction(query:string, options:TOptions ){
var search = this.prepareSearch(query, options);

@@ -179,3 +190,3 @@ return this._getScoreFunction(search);

if (field_count === 1) {
return function(token:TToken, data) {
return function(token:TToken, data:{}) {
const field = fields[0].field;

@@ -186,3 +197,3 @@ return scoreValue(getAttrFn(data, field), token, weights[field]);

return function(token:TToken, data) {
return function(token:TToken, data:{}) {
var sum = 0;

@@ -204,3 +215,3 @@

}else{
iterate(weights, (weight, field) => {
iterate(weights, (weight:number, field:string) => {
sum += scoreValue(getAttrFn(data, field), token, weight);

@@ -215,3 +226,3 @@ });

if (token_count === 1) {
return function(data) {
return function(data:{}) {
return scoreObject(tokens[0], data);

@@ -222,3 +233,3 @@ };

if (search.options.conjunction === 'and') {
return function(data) {
return function(data:{}) {
var i = 0, score, sum = 0;

@@ -233,3 +244,3 @@ for (; i < token_count; i++) {

} else {
return function(data) {
return function(data:{}) {
var sum = 0;

@@ -251,3 +262,3 @@ iterate(tokens,(token:TToken)=>{

*/
getSortFunction(query:string, options) {
getSortFunction(query:string, options:TOptions) {
var search = this.prepareSearch(query, options);

@@ -258,9 +269,9 @@ return this._getSortFunction(search);

_getSortFunction(search:TPrepareObj){
var i, n, sort_fld, sort_flds_count, multiplier, implicit_score;
var i, n, implicit_score;
const self = this,
options = search.options,
sort = (!search.query && options.sort_empty) || options.sort,
sort_flds = [],
multipliers = [];
sort = (!search.query && options.sort_empty) ? options.sort_empty : options.sort,
sort_flds:TSort[] = [],
multipliers:number[] = [];

@@ -272,7 +283,4 @@

*
* @param {string} name
* @param {object} result
* @return {string}
*/
const get_field = function(name, result) {
const get_field = function(name:string, result:TResultItem):string|number {
if (name === '$score') return result.score;

@@ -318,9 +326,9 @@ return search.getAttrFn(self.items[result.id], name);

// build function
sort_flds_count = sort_flds.length;
const sort_flds_count = sort_flds.length;
if (!sort_flds_count) {
return null;
} else if (sort_flds_count === 1) {
sort_fld = sort_flds[0].field;
multiplier = multipliers[0];
return function(a, b) {
const sort_fld = sort_flds[0].field;
const multiplier = multipliers[0];
return function(a:TResultItem, b:TResultItem) {
return multiplier * cmp(

@@ -332,3 +340,3 @@ get_field(sort_fld, a),

} else {
return function(a, b) {
return function(a:TResultItem, b:TResultItem) {
var i, result, field;

@@ -354,4 +362,4 @@ for (i = 0; i < sort_flds_count; i++) {

*/
prepareSearch(query:string, optsUser):TPrepareObj {
const weights = {};
prepareSearch(query:string, optsUser:TOptions):TPrepareObj {
const weights:TWeights = {};
var options = Object.assign({},optsUser);

@@ -365,14 +373,11 @@

propToArray(options,'fields');
if( Array.isArray(options.fields) && typeof options.fields[0] !== 'object' ){
var fields = [];
options.fields.forEach((fld_name) => {
fields.push({field:fld_name});
});
options.fields = fields;
}
options.fields.forEach((field_params)=>{
weights[field_params.field] = ('weight' in field_params) ? field_params.weight : 1;
const fields:TField[] = [];
options.fields.forEach((field:string|TField) => {
if( typeof field == 'string' ){
field = {field:field,weight:1};
}
fields.push(field);
weights[field.field] = ('weight' in field) ? field.weight : 1;
});
options.fields = fields;
}

@@ -398,5 +403,3 @@

search(query:string, options:TOptions) : TPrepareObj {
var self = this, score, search;
var fn_sort;
var fn_score;
var self = this, score, search:TPrepareObj;

@@ -408,7 +411,7 @@ search = this.prepareSearch(query, options);

// generate result scoring function
fn_score = options.score || self._getScoreFunction(search);
const fn_score = options.score || self._getScoreFunction(search);
// perform search and sort
if (query.length) {
iterate(self.items, (item, id) => {
iterate(self.items, (item:TResultItem, id:string|number) => {
score = fn_score(item);

@@ -420,3 +423,3 @@ if (options.filter === false || score > 0) {

} else {
iterate(self.items, (item, id) => {
iterate(self.items, (item:TResultItem, id:string|number) => {
search.items.push({'score': 1, 'id': id});

@@ -426,3 +429,3 @@ });

fn_sort = self._getSortFunction(search);
const fn_sort = self._getSortFunction(search);
if (fn_sort) search.items.sort(fn_sort);

@@ -429,0 +432,0 @@

// @ts-ignore
// @ts-ignore TS2691 "An import path cannot end with a '.ts' extension"
import { asciifold } from './diacritics.ts';
// @ts-ignore TS2691 "An import path cannot end with a '.ts' extension"
import { TToken } from './sifter.ts';
/**

@@ -24,4 +28,4 @@ * A property getter resolving dot-notation

if (!obj ) return;
var names = name.split(".");
while(names.length && (obj = obj[names.shift()]));
var part, names = name.split(".");
while( (part = names.shift()) && (obj = obj[part]));
return obj;

@@ -34,6 +38,4 @@ };

*
* @param {object} token
* @return {number}
*/
export function scoreValue(value:string, token, weight:number ) {
export function scoreValue(value:string, token:TToken, weight:number ):number {
var score, pos;

@@ -53,3 +55,3 @@

export function escape_regex(str) {
export function escape_regex(str:string):string {
return (str + '').replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');

@@ -63,3 +65,3 @@ };

*/
export function propToArray(obj, key){
export function propToArray(obj:{[key:string]:any}, key:string){
var value = obj[key];

@@ -81,5 +83,4 @@ if( value && !Array.isArray(value) ){

*
* @param {array|object} object
*/
export function iterate(object, callback) {
export function iterate(object:[]|{[key:string]:any}, callback:(value:any,key:number|string)=>any) {

@@ -101,3 +102,3 @@ if ( Array.isArray(object)) {

export function cmp(a, b) {
export function cmp(a:number|string, b:number|string) {
if (typeof a === 'number' && typeof b === 'number') {

@@ -104,0 +105,0 @@ return a > b ? 1 : (a < b ? -1 : 0);

@@ -14,3 +14,3 @@ {

"description": "A library for textually searching arrays and hashes of objects by property (or multiple properties). Designed specifically for autocomplete.",
"version": "0.7.2",
"version": "0.7.3",
"license": "Apache-2.0",

@@ -21,2 +21,3 @@ "author": "Brian Reavis <brian@thirdroute.com>",

"module": "dist/esm/sifter.js",
"types": "lib/sifter.ts",
"repository": {

@@ -42,3 +43,3 @@ "type": "git",

"humanize": "0.0.9",
"jest": "^26.6.3",
"jest": "^27.0.5",
"rollup": "^2.45.2",

@@ -45,0 +46,0 @@ "rollup-plugin-terser": "^7.0.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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