/*! no static exports found */function(e,t){e.exports=((e=[],t=1)=>{letn=[],i=-1,r=-1,o=0;for(lets=e.length;o<s;o+=1){lets=e[o];s&&-1===i?i=o:s||-1===i||((r=o-1)-i+1>=t&&n.push([i,r]),i=-1)}returne[o-1]&&o-i>=t&&n.push([i,o-1]),n})},"./src/bitap/bitap_pattern_alphabet.js":
/*! no static exports found */function(e,t){e.exports=(e=>{lett={},n=e.length;for(leti=0;i<n;i+=1)t[e.charAt(i)]=0;for(leti=0;i<n;i+=1)t[e.charAt(i)]|=1<<n-i-1;returnt})},"./src/bitap/bitap_regex_search.js":
/*!*****************************************!*\
!***./src/bitap/bitap_regex_search.js***!
\*****************************************/
/*! no static exports found */function(e,t){constn=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;e.exports=((e,t,i=/ +/g)=>{letr=newRegExp(t.replace(n,"\\$&").replace(i,"|")),o=e.match(r),s=!!o,a=[];if(s)for(lett=0,n=o.length;t<n;t+=1){letn=o[t];a.push([e.indexOf(n),n.length-1])}return{score:s?.5:1,isMatch:s,matchedIndices:a}})},"./src/bitap/bitap_score.js":
/*!**********************************!*\
!***./src/bitap/bitap_score.js***!
\**********************************/
/*! no static exports found */function(e,t){e.exports=((e,{errors:t=0,currentLocation:n=0,expectedLocation:i=0,distance:r=100})=>{consto=t/e.length,s=Math.abs(i-n);returnr?o+s/r:s?1:o})},"./src/bitap/bitap_search.js":
/*!***********************************!*\
!***./src/bitap/bitap_search.js***!
\***********************************/
/*! no static exports found */function(e,t,n){consti=n(/*! ./bitap_score */"./src/bitap/bitap_score.js"),r=n(/*! ./bitap_matched_indices */"./src/bitap/bitap_matched_indices.js");e.exports=((e,t,n,{location:o=0,distance:s=100,threshold:a=.6,findAllMatches:l=!1,minMatchCharLength:c=1})=>{constu=o,h=e.length;letd=a,f=e.indexOf(t,u);constp=t.length,v=[];for(lete=0;e<h;e+=1)v[e]=0;if(-1!==f){letn=i(t,{errors:0,currentLocation:f,expectedLocation:u,distance:s});if(d=Math.min(n,d),-1!==(f=e.lastIndexOf(t,u+p))){lete=i(t,{errors:0,currentLocation:f,expectedLocation:u,distance:s});d=Math.min(e,d)}}f=-1;letm=[],g=1,_=p+h;consty=1<<p-1;for(letr=0;r<p;r+=1){leto=0,a=_;for(;o<a;){i(t,{errors:r,currentLocation:u+a,expectedLocation:u,distance:s})<=d?o=a:_=a,a=Math.floor((_-o)/2+o)}_=a;letc=Math.max(1,u-a+1),b=l?h:Math.min(u+a,h)+p,E=Array(b+2);E[b+1]=(1<<r)-1;for(leto=b;o>=c;o-=1){leta=o-1,l=n[e.charAt(a)];if(l&&(v[a]=1),E[o]=(E[o+1]<<1|1)&l,0!==r&&(E[o]|=(m[o+1]|m[o])<<1|1|m[o+1]),E[o]&y&&(g=i(t,{errors:r,currentLocation:a,expectedLocation:u,distance:s}))<=d){if(d=g,(f=a)<=u)break;c=Math.max(1,2*u-f)}}if(i(t,{errors:r+1,currentLocation:u,expectedLocation:u,distance:s})>d)break;m=E}return{isMatch:f>=0,score:0===g?.001:g,matchedIndices:r(v,c)}})},"./src/bitap/index.js":
/*!****************************!*\
!***./src/bitap/index.js***!
\****************************/
/*! no static exports found */function(e,t,n){consti=n(/*! ./bitap_regex_search */"./src/bitap/bitap_regex_search.js"),r=n(/*! ./bitap_search */"./src/bitap/bitap_search.js"),o=n(/*! ./bitap_pattern_alphabet */"./src/bitap/bitap_pattern_alphabet.js");e.exports=class{constructor(e,{location:t=0,distance:n=100,threshold:i=.6,maxPatternLength:r=32,isCaseSensitive:s=!1,tokenSeparator:a=/ +/g,findAllMatches:l=!1,minMatchCharLength:c=1}){this.options={location:t,distance:n,threshold:i,maxPatternLength:r,isCaseSensitive:s,tokenSeparator:a,findAllMatches:l,minMatchCharLength:c},this.pattern=this.options.isCaseSensitive?e:e.toLowerCase(),this.pattern.length<=r&&(this.patternAlphabet=o(this.pattern))}search(e){if(this.options.isCaseSensitive||(e=e.toLowerCase()),this.pattern===e)return{isMatch:!0,score:0,matchedIndices:[[0,e.length-1]]};const{maxPatternLength:t,tokenSeparator:n}=this.options;if(this.pattern.length>t)returni(e,this.pattern,n);const{location:o,distance:s,threshold:a,findAllMatches:l,minMatchCharLength:c}=this.options;returnr(e,this.pattern,this.patternAlphabet,{location:o,distance:s,threshold:a,findAllMatches:l,minMatchCharLength:c})}}},"./src/helpers/deep_value.js":
/*!***********************************!*\
!***./src/helpers/deep_value.js***!
\***********************************/
/*! no static exports found */function(e,t,n){consti=n(/*! ./is_array */"./src/helpers/is_array.js"),r=(e,t,n)=>{if(t){consto=t.indexOf(".");lets=t,a=null;-1!==o&&(s=t.slice(0,o),a=t.slice(o+1));constl=e[s];if(null!=l)if(a||"string"!=typeofl&&"number"!=typeofl)if(i(l))for(lete=0,t=l.length;e<t;e+=1)r(l[e],a,n);elsea&&r(l,a,n);elsen.push(l.toString())}elsen.push(e);returnn};e.exports=((e,t)=>r(e,t,[]))},"./src/helpers/is_array.js":
/*!*********************************!*\
!***./src/helpers/is_array.js***!
\*********************************/
/*! no static exports found */function(e,t){e.exports=(e=>Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e))},"./src/index.js":
/*!**********************!*\
!***./src/index.js***!
\**********************/
/*! no static exports found */function(e,t,n){consti=n(/*! ./bitap */"./src/bitap/index.js"),r=n(/*! ./helpers/deep_value */"./src/helpers/deep_value.js"),o=n(/*! ./helpers/is_array */"./src/helpers/is_array.js");e.exports=class{constructor(e,{location:t=0,distance:n=100,threshold:i=.6,maxPatternLength:o=32,caseSensitive:s=!1,tokenSeparator:a=/ +/g,findAllMatches:l=!1,minMatchCharLength:c=1,id:u=null,keys:h=[],shouldSort:d=!0,getFn:f=r,sortFn:p=((e,t)=>e.score-t.score),tokenize:v=!1,matchAllTokens:m=!1,includeMatches:g=!1,includeScore:_=!1,verbose:y=!1}){this.options={location:t,distance:n,threshold:i,maxPatternLength:o,isCaseSensitive:s,tokenSeparator:a,findAllMatches:l,minMatchCharLength:c,id:u,keys:h,includeMatches:g,includeScore:_,shouldSort:d,getFn:f,sortFn:p,verbose:y,tokenize:v,matchAllTokens:m},this.setCollection(e)}setCollection(e){returnthis.list=e,e}search(e,t={limit:!1}){this._log(`---------\nSearch pattern: "${e}"`);const{tokenSearchers:n,fullSearcher:i}=this._prepareSearchers(e);let{weights:r,results:o}=this._search(n,i);returnthis._computeScore(r,o),this.options.shouldSort&&this._sort(o),t.limit&&"number"==typeoft.limit&&(o=o.slice(0,t.limit)),this._format(o)}_prepareSearchers(e=""){constt=[];if(this.options.tokenize){constn=e.split(this.options.tokenSeparator);for(lete=0,r=n.length;e<r;e+=1)t.push(newi(n[e],this.options))}return{tokenSearchers:t,fullSearcher:newi(e,this.options)}}_search(e=[],t){constn=this.list,i={},r=[];if("string"==typeofn[0]){for(leto=0,s=n.length;o<s;o+=1)this._analyze({key:"",value:n[o],record:o,index:o},{resultMap:i,results:r,tokenSearchers:e,fullSearcher:t});return{weights:null,results:r}}consto={};for(lets=0,a=n.length;s<a;s+=1){leta=n[s];for(letn=0,l=this.options.keys.length;n<l;n+=1){letl=this.options.keys[n];if("string"!=typeofl){if(o[l.name]={weight:1-l.weight||1},l.weight<=0||l.weight>1)thrownewError("Key weight has to be > 0 and <= 1");l=l.name}elseo[l]={weight:1};this._analyze({key:l,value:this.options.getFn(a,l),record:a,index:s},{resultMap:i,results:r,tokenSearchers:e,fullSearcher:t})}}return{weights:o,results:r}}_analyze({key:e,arrayIndex:t=-1,value:n,record:i,index:r},{tokenSearchers:s=[],fullSearcher:a=[],resultMap:l={},results:c=[]}){if(null==n)return;letu=!1,h=-1,d=0;if("string"==typeofn){this._log(`\nKey: ${""===e?"-":e}`);leto=a.search(n);if(this._log(`Full text: "${n}", score: ${o.score}`),this.options.tokenize){lete=n.split(this.options.tokenSeparator),t=[];for(letn=0;n<s.length;n+=1){leti=s[n];this._log(`\nPattern: "${i.pattern}"`);letr=!1;for(letn=0;n<e.length;n+=1){leto=e[n],s=i.search(o),a={};s.isMatch?(a[o]=s.score,u=!0,r=!0,t.push(s.score)):(a[o]=1,this.options.matchAllTokens||t.push(1)),this._log(`Token: "${o}", score: ${a[o]}`)}r&&(d+=1)}h=t[0];leti=t.length;for(lete=1;e<i;e+=1)h+=t[e];h/=i,this._log("Token score average:",h)}letf=o.score;h>-1&&(f=(f+h)/2),this._log("Score average:",f);letp=!this.options.tokenize||!this.options.matchAllTokens||d>=s.length;if(this._log(`\nCheck Matches: ${p}`),(u||o.isMatch)&&p){lets=l[r];s?s.output.push({key:e,arrayIndex:t,value:n,score:f,matchedIndices:o.matchedIndices}):(l[r]={item:i,output:[{key:e,arrayIndex:t,value:n,score:f,matchedIndices:o.matchedIndices}]},c.push(l[r]))}}elseif(o(n))for(lett=0,o=n.length;t<o;t+=1)this._analyze({key:e,arrayIndex:t,value:n[t],record:i,index:r},{resultMap:l,results:c,tokenSearchers:s,fullSearcher:a})}_computeScore(e,t){this._log("\n\nComputing score:\n");for(letn=0,i=t.length;n<i;n+=1){consti=t[n].output,r=i.length;leto=1,s=1;for(lett=0;t<r;t+=1){letn=e?e[i[t].key].weight:1,r=(1===n?i[t].score:i[t].score||.001)*n;1!==n?s=Math.min(s,r):(i[t].nScore=r,o*=r)}t[n].score=1===s?o:s,this._log(t[n])}}_sort(e){this._log("\n\nSorting...."),e.sort(this.options.sortFn)}_format(e){constt=[];if(this.options.verbose){lett=[];this._log("\n\nOutput:\n\n",JSON.stringify(e,function(e,n){if("object"==typeofn&&null!==n){if(-1!==t.indexOf(n))return;t.push(n)}returnn})),t=null}letn=[];this.options.includeMatches&&n.push((e,t)=>{constn=e.output;t.matches=[];f