distribution/docs/themes/hugo-geekdoc/static/js/search-9719be99.bundle.min.js

2 lines
60 KiB
JavaScript
Raw Normal View History

/*! For license information please see search-9719be99.bundle.min.js.LICENSE.txt */
!function(){var t={3129:function(){!function(t){"use strict";var e;function n(t){return void 0===t||t}function r(t){const e=Array(t);for(let n=0;n<t;n++)e[n]=o();return e}function o(){return Object.create(null)}function i(t,e){return e.length-t.length}function a(t){return"string"==typeof t}function s(t){return"object"==typeof t}function c(t,e){var n=u;if(t&&(e&&(t=l(t,e)),this.G&&(t=l(t,this.G)),this.H&&1<t.length&&(t=l(t,this.H)),n||""===n)){if(t=t.split(n),this.filter){e=this.filter,n=t.length;const r=[];for(let o=0,i=0;o<n;o++){const n=t[o];n&&!e[n]&&(r[i++]=n)}t=r}return t}return t}const u=/[\p{Z}\p{S}\p{P}\p{C}]+/u,f=/[\u0300-\u036f]/g;function d(t,e){const n=Object.keys(t),r=n.length,o=[];let i="",a=0;for(let s,c,u=0;u<r;u++)s=n[u],(c=t[s])?(o[a++]=h(e?"(?!\\b)"+s+"(\\b|_)":s),o[a++]=c):i+=(i?"|":"")+s;return i&&(o[a++]=h(e?"(?!\\b)("+i+")(\\b|_)":"("+i+")"),o[a]=""),o}function l(t,e){for(let n=0,r=e.length;n<r&&(t=t.replace(e[n],e[n+1]));n+=2);return t}function h(t){return new RegExp(t,"g")}function p(t){let e="",n="";for(let r,o=0,i=t.length;o<i;o++)(r=t[o])!==n&&(e+=n=r);return e}var v={encode:y,B:!1,C:""};function y(t){return c.call(this,(""+t).toLowerCase(),!1)}const m={},g={};function x(t){$(t,"add"),$(t,"append"),$(t,"search"),$(t,"update"),$(t,"remove")}function $(t,e){t[e+"Async"]=function(){const t=this,n=arguments;var r=n[n.length-1];let o;return"function"==typeof r&&(o=r,delete n[n.length-1]),r=new Promise((function(r){setTimeout((function(){t.async=!0;const o=t[e].apply(t,n);t.async=!1,r(o)}))})),o?(r.then(o),this):r}}function b(t,e,n,r){const i=t.length;let a,s,c=[],u=0;r&&(r=[]);for(let f=i-1;0<=f;f--){const d=t[f],l=d.length,h=o();let p=!a;for(let t=0;t<l;t++){const o=d[t],l=o.length;if(l)for(let t,d,v=0;v<l;v++)if(d=o[v],a){if(a[d]){if(!f)if(n)n--;else if(c[u++]=d,u===e)return c;(f||r)&&(h[d]=1),p=!0}if(r&&(t=(s[d]||0)+1,s[d]=t,t<i)){const e=r[t-2]||(r[t-2]=[]);e[e.length]=d}}else h[d]=1}if(r)a||(s=h);else if(!p)return[];a=h}if(r)for(let t,o,i=r.length-1;0<=i;i--){t=r[i],o=t.length;for(let r,i=0;i<o;i++)if(r=t[i],!a[r]){if(n)n--;else if(c[u++]=r,u===e)return c;a[r]=1}}return c}function _(t,e){const n=o(),r=o(),i=[];for(let e=0;e<t.length;e++)n[t[e]]=1;for(let t,o=0;o<e.length;o++){t=e[o];for(let e,o=0;o<t.length;o++)e=t[o],n[e]&&!r[e]&&(r[e]=1,i[i.length]=e)}return i}const w={memory:{charset:"latin:extra",A:3,m:4,D:!1},performance:{A:3,m:3,s:!1,context:{depth:2,A:1}},match:{charset:"latin:extra",C:"reverse"},score:{charset:"latin:advanced",A:20,m:3,context:{depth:3,A:9}},default:{}};function k(t,e){if(!(this instanceof k))return new k(t);var i;let s;t?(a(t)?t=w[t]:(i=t.preset)&&(t=Object.assign({},i[i],t)),i=t.charset,s=t.lang,a(i)&&(-1===i.indexOf(":")&&(i+=":default"),i=g[i]),a(s)&&(s=m[s])):t={};let c,u,f=t.context||{};if(this.encode=t.encode||i&&i.encode||y,this.register=e||o(),this.A=c=t.resolution||9,this.C=e=i&&i.C||t.tokenize||"strict",this.depth="strict"===e&&f.depth,this.h=n(f.bidirectional),this.s=u=n(t.optimize),this.D=n(t.fastupdate),this.m=t.minlength||1,this.F=t.boost,this.map=u?r(c):o(),this.o=c=f.resolution||1,this.l=u?r(c):o(),this.B=i&&i.B||t.rtl,this.G=(e=t.matcher||s&&s.G)&&d(e,!1),this.H=(e=t.stemmer||s&&s.H)&&d(e,!0),t=e=t.filter||s&&s.filter){t=e,i=o();for(let e=0,n=t.length;e<n;e++)i[t[e]]=1;t=i}this.filter=t}function j(t,e,n,r,o){return n&&1<t?e+(r||0)<=t?n+(o||0):(t-1)/(e+(r||0))*(n+(o||0))+1|0:0}function L(t,e,n,r,i,a,s){let c=s?t.l:t.map;(!e[n]||s&&!e[n][s])&&(t.s&&(c=c[r]),s?((e=e[n]||(e[n]=o()))[s]=1,c=c[s]||(c[s]=o())):e[n]=1,c=c[n]||(c[n]=[]),t.s||(c=c[r]||(c[r]=[])),a&&c.includes(i)||(c[c.length]=i,t.D&&((t=t.register[i]||(t.register[i]=[]))[t.length]=c)))}function O(t,e,n,r,o,i,a,s){let c=[],u=s?t.l:t.map;if(t.s||(u=z(u,a,s,t.h)),u){let n=0;const f=Math.min(u.length,s?t.o:t.A);for(let e,d,l=0,h=0;l<f&&!((e=u[l])&&(t.s&&(e=z(e,a,s,t.h)),o&&e&&i&&(d=e.length,d<=o?(o-=d,e=null):(e=e.slice(o),o=0)),e&&(c[n++]=e,i&&(h+=e.length,h>=r))));l++);if(n)return i?A(c,r,0):void(e[e.length]=c)}return!n&&c}function A(t,e,n){return t=1===t.length?t[0]:[].concat.apply([],t),n||t.l