text: /*
   FlexSearch v0.6.2
   Copyright 2019 Nextapps GmbH
   Author: Thomas Wilkerling
   Released under the Apache 2.0 Licence
   https://github.com/nextapps-de/flexsearch
  */
  'use strict';(function(e,A,w){let n;(n=w.define)&&n.amd?n([],function(){return A}):(n=w.modules)?n[e.toLowerCase()]=A:"object"===typeof exports?module.exports=A:w[e]=A})("FlexSearch",function(){function e(a,b){const c=b?b.id:a&&a.id;this.id=c||0===c?c:M++;this.init(a,b);w(this,"index",function(){return Object.keys(this.c)});w(this,"length",function(){return this.index.length})}function A(a,b){const c=a.length,f=C(b),d=[];for(let k=0,h=0;k<c;k++){const c=a[k];if(f&&b(c)||!f&&!b[c])d[h++]=c}return d}
  function w(a,b,c){Object.defineProperty(a,b,{get:c})}function n(a,b){for(let c=0;c<b.length;c+=2)a=a.replace(b[c],b[c+1]);return a}function D(a,b,c,f,d,k,h,g){if(b[c])return b[c];d=d?(g-(h||g/1.5))*k+(h||g/1.5)*d:k;b[c]=d;d>=h&&(a=a[g-(d+.5>>0)],a=a[c]||(a[c]=[]),a[a.length]=f);return d}function G(a,b){if(a){const c=Object.keys(a);for(let f=0,d=c.length;f<d;f++){const d=c[f],h=a[d];if(h)for(let c=0,f=h.length;c<f;c++)if(h[c]===b){1===f?delete a[d]:h.splice(c,1);break}else"object"===typeof h[c]&&G(h[c],
  b)}}}function N(a,b){a=a.length-b.length;return 0>a?1:a?-1:0}function H(a,b,c){return a?{page:a,next:b?""+b:null,result:c}:c}function E(a){return"string"===typeof a}function C(a){return"function"===typeof a}function F(a){return"undefined"===typeof a}function J(a){const b=Array(a);for(let c=0;c<a;c++)b[c]=x();return b}function x(){return Object.create(null)}const t={encode:"icase",b:"forward",split:/\W+/,cache:!1,async:!1,m:!1,i:!1,l:!1,a:9,threshold:0,depth:0},I=[];let M=0;const K={},L={};e.create=
  function(a,b){return new e(a,b)};e.registerMatcher=function(a){for(const b in a)a.hasOwnProperty(b)&&I.push(new RegExp(b,"g"),a[b]);return this};e.registerEncoder=function(a,b){B[a]=b.bind(B);return this};e.registerLanguage=function(a,b){K[a]=b.filter;L[a]=b.stemmer;return this};e.encode=function(a,b){return B[a](b)};e.prototype.init=function(a,b){this.j=[];if(b){var c=b.preset;a=b}else a||(a=t),c=a.preset;b={};this.b=a.tokenize||b.b||this.b||t.b;this.split=a.split||this.split||t.split;this.i=a.rtl||
  this.i||t.i;this.threshold=F(c=a.threshold)?b.threshold||this.threshold||t.threshold:c;this.a=F(c=a.resolution)?c=b.a||this.a||t.a:c;c<=this.threshold&&(this.a=this.threshold+1);this.depth="strict"!==this.b||F(c=a.depth)?b.depth||this.depth||t.depth:c;this.g=(c=F(c=a.encode)?b.encode||t.encode:c)&&B[c]&&B[c].bind(B)||(C(c)?c:this.g||!1);(c=a.matcher)&&this.addMatcher(c);if(c=(b=a.lang)||a.filter){E(c)&&(c=K[c]);if(c.constructor===Array){{var f=this.g;const a=x();for(let b=0;b<c.length;b++){const d=
  f?f(c[b]):c[b];a[d]=1}c=a}}this.filter=c}if(c=b||a.stemmer){var d;a=E(c)?L[c]:c;b=this.g;c=[];for(d in a)a.hasOwnProperty(d)&&(f=b?b(d):d,c.push(new RegExp(f+"($|\\W)","g"),b?b(a[d]):a[d]));this.stemmer=d=c}this.h=J(this.a-(this.threshold||0));this.f=x();this.c=x();return this};e.prototype.encode=function(a){a&&I.length&&(a=n(a,I));a&&this.j.length&&(a=n(a,this.j));a&&this.g&&(a=this.g(a));a&&this.stemmer&&(a=n(a,this.stemmer));return a};e.prototype.addMatcher=function(a){const b=this.j;for(const c in a)a.hasOwnProperty(c)&&
  b.push(new RegExp(c,"g"),a[c]);return this};e.prototype.add=function(a,b,c,f,d){if(b&&E(b)&&(a||0===a)){const e="@"+a;if(this.c[e]&&!f)return this.update(a,b);if(!d&&c)return this.add(a,b,null,f,!0),c(),this;b=this.encode(b);if(!b.length)return this;c=this.b;b=C(c)?c(b):b.split(this.split);this.filter&&(b=A(b,this.filter));f=x();f._ctx=x();d=b.length;const r=this.threshold,u=this.depth,v=this.a,p=this.h,q=this.i;for(let e=0;e<d;e++){var k=b[e];if(k){var h=k.length,g=(q?e+1:d-e)/d,m="";switch(c){case "reverse":case "both":for(var l=
  h;--l;)m=k[l]+m,D(p,f,m,a,q?1:(h-l)/h,g,r,v-1);m="";case "forward":for(l=0;l<h;l++)m+=k[l],D(p,f,m,a,q?(l+1)/h:1,g,r,v-1);break;case "full":for(l=0;l<h;l++){const b=(q?l+1:h-l)/h;for(let c=h;c>l;c--)m=k.substring(l,c),D(p,f,m,a,b,g,r,v-1)}break;default:if(h=D(p,f,k,a,1,g,r,v-1),u&&1<d&&h>=r)for(h=f._ctx[k]||(f._ctx[k]=x()),k=this.f[k]||(this.f[k]=J(v-(r||0))),g=e-u,m=e+u+1,0>g&&(g=0),m>d&&(m=d);g<m;g++)g!==e&&D(k,h,b[g],a,0,v-(g<e?e-g:g-e),r,v-1)}}}this.c[e]=1}return this};e.prototype.update=function(a,
  b,c){this.c["@"+a]&&E(b)&&(this.remove(a),this.add(a,b,c,!0));return this};e.prototype.remove=function(a,b,c){const f="@"+a;if(this.c[f]){if(!c&&b)return this.remove(a,null,!0),b(),this;for(b=0;b<this.a-(this.threshold||0);b++)G(this.h[b],a);this.depth&&G(this.f,a);delete this.c[f]}return this};e.prototype.search=function(a,b,c,f){b&&C(b)?(c=b,b=1E3):b||0===b||(b=1E3);var d=[],e=a;if("object"===typeof a){var h=!1;b=a.limit;var g=a.threshold;var m=!1;a=a.query}g||(g=this.threshold||0);if(!f&&c)return c(this.search(e,
  b,null,!0)),this;if(!a||!E(a))return d;e=this.encode(a);if(!e.length)return d;a=this.b;a=C(a)?a(e):e.split(this.split);this.filter&&(a=A(a,this.filter));c=a.length;f=!0;e=[];var l=x(),n,r=0;1<c&&(this.depth&&"strict"===this.b?n=!0:a.sort(N));var u;if(!n||(u=this.f))for(var v=this.a;r<c;r++){var p=a[r];if(p){if(n){if(!q)if(u[p]){var q=p;l[p]=1}else if(!m)return d;if(m&&r===c-1&&!e.length)n=!1,p=q||p,l[p]=0;else if(!q)continue}if(!l[p]){var t=[],w=!1;let a=0;if(q=n?u[q]:this.h){let b;for(let c=0;c<
  v-g;c++)if(b=q[c][p])t[a++]=b,w=!0}if(w)q=p,e[e.length]=1<a?t.concat.apply([],t):t[0];else{f=!1;break}l[p]=1}}}else f=!1;if(f)a:{let k;d=[];!0===h?(h="0",g=""):g=h&&h.split(":");m=e.length;if(1<m){n=x();q=0;v=!0;f=0;var z;for(g&&(2===g.length?g=!1:g=z=parseInt(g[0],10));q<m;q++){l=q===m-1;u=e[q];c=u.length;if(!c){d=H(h,k,u);break a}if(v)if(y){r=y.length;for(a=0;a<r;a++)n["@"+y[a]]=1;var y=null;v=!1}else{y=u;continue}p=!1;for(a=0;a<c;a++)if(r=u[a],t="@"+r,(w=n[t]||0)&&w===q){if(l){if(!z||--z<f)if(d[f++]=
  r,b&&f===b){d=H(h,f+(g||0),d);break a}}else n[t]=q+1;p=!0}if(!p)break}y&&(d=y)}else m&&(d=e[0],g&&(g=parseInt(g[0],10)));b&&(y=d.length,g&&g>y&&(g=0),z=g||0,k=z+b,k<y?d=d.slice(z,k):(k=0,z&&(d=d.slice(z))));d=H(h,k,d)}return d};e.prototype.clear=function(){return this.destroy().init()};e.prototype.destroy=function(){this.h=this.f=this.c=null;return this};const B={icase:function(a){return a.toLowerCase()}};return e}(!1),this);
  