From 5a2dfcb3c2ae4935ee74b6f4f2feea1eb1a38c3d Mon Sep 17 00:00:00 2001 From: adityatelange Date: Sat, 4 Sep 2021 10:14:39 +0000 Subject: [PATCH] deploy: d76bc91ed0f1ad7a9dd0490905029297f4efbce3 --- ...6e5a8cf9bada12981aafda23304f70eb49f97e9ba68ddb4de54beece.js} | 2 +- fr/search/index.html | 2 +- search/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename assets/js/{search.min.2a74d1516b684f13a7dfe09ba6e75af40e05736d14d7010f5e4654c7ec1c67e7.js => search.min.559df37e6e5a8cf9bada12981aafda23304f70eb49f97e9ba68ddb4de54beece.js} (94%) diff --git a/assets/js/search.min.2a74d1516b684f13a7dfe09ba6e75af40e05736d14d7010f5e4654c7ec1c67e7.js b/assets/js/search.min.559df37e6e5a8cf9bada12981aafda23304f70eb49f97e9ba68ddb4de54beece.js similarity index 94% rename from assets/js/search.min.2a74d1516b684f13a7dfe09ba6e75af40e05736d14d7010f5e4654c7ec1c67e7.js rename to assets/js/search.min.559df37e6e5a8cf9bada12981aafda23304f70eb49f97e9ba68ddb4de54beece.js index a2f98d94..f9481270 100644 --- a/assets/js/search.min.2a74d1516b684f13a7dfe09ba6e75af40e05736d14d7010f5e4654c7ec1c67e7.js +++ b/assets/js/search.min.559df37e6e5a8cf9bada12981aafda23304f70eb49f97e9ba68ddb4de54beece.js @@ -1 +1 @@ -var e,t;e=this,t=function(){"use strict";var q,n,o,a,x,f,y,m,e;function C(a){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function h(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function z(d,c){for(var b=0,a;bc.length)&&(a=c.length);for(var b=0,d=new Array(a);b0&&void 0!==arguments[0]?arguments[0]:3,a=new Map,b=Math.pow(10,c);return{get:function(e){var c=e.match(x).length,f,d;return a.has(c)?a.get(c):(f=1/Math.sqrt(c),d=parseFloat(Math.round(f*b)/b),a.set(c,d),d)},clear:function(){a.clear()}}}f=function(){function e(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=c.getFn,d=void 0===b?a.getFn:b;h(this,e),this.norm=F(3),this.getFn=d,this.isCreated=!1,this.setIndexRecords()}return g(e,[{key:"setSources",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=a}},{key:"setIndexRecords",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=a}},{key:"setKeys",value:function(){var b=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=a,this._keysMap={},a.forEach(function(a,c){b._keysMap[a.id]=c})}},{key:"create",value:function(){var a=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,c(this.docs[0])?this.docs.forEach(function(b,c){a._addString(b,c)}):this.docs.forEach(function(b,c){a._addObject(b,c)}),this.norm.clear())}},{key:"add",value:function(a){var b=this.size();c(a)?this._addString(a,b):this._addObject(a,b)}},{key:"removeAt",value:function(b){this.records.splice(b,1);for(var a=b,c=this.size();a2&&void 0!==arguments[2]?arguments[2]:{},c=g.getFn,h=void 0===c?a.getFn:c,b=new f({getFn:h});return b.setKeys(d.map(B)),b.setSources(e),b.create(),b}function i(o){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=b.errors,n=void 0===e?0:e,f=b.currentLocation,l=void 0===f?0:f,h=b.expectedLocation,k=void 0===h?0:h,j=b.distance,d=void 0===j?a.distance:j,g=b.ignoreLocation,m=void 0===g?a.ignoreLocation:g,c=n/o.length,i;return m?c:(i=Math.abs(k-l),d?c+i/d:i?1:c)}function D(){for(var d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.minMatchCharLength,e=[],b=-1,g=-1,c=0,i=d.length,h;c=f&&e.push([b,g]),b=-1);return d[c-1]&&c-b>=f&&e.push([b,c-1]),e}function E(c){for(var b={},a=0,d=c.length,e;a1&&void 0!==arguments[1]?arguments[1]:{},j=c.location,y=void 0===j?a.location:j,i=c.threshold,x=void 0===i?a.threshold:i,k=c.distance,w=void 0===k?a.distance:k,m=c.includeMatches,u=void 0===m?a.includeMatches:m,o=c.findAllMatches,B=void 0===o?a.findAllMatches:o,q=c.minMatchCharLength,t=void 0===q?a.minMatchCharLength:q,g=c.isCaseSensitive,r=void 0===g?a.isCaseSensitive:g,n=c.ignoreLocation,v=void 0===n?a.ignoreLocation:n,f,e,d,l,A,s;if(h(this,b),this.options={location:y,threshold:x,distance:w,includeMatches:u,findAllMatches:B,minMatchCharLength:t,isCaseSensitive:r,ignoreLocation:v},this.pattern=r?p:p.toLowerCase(),this.chunks=[],this.pattern.length)if(f=function(a,b){z.chunks.push({pattern:a,alphabet:E(a),startIndex:b})},e=this.pattern.length,e>32){for(d=0,l=e%32,A=e-l;d3&&void 0!==arguments[3]?arguments[3]:{},G=f.location,R=void 0===G?a.location:G,L=f.distance,r=void 0===L?a.distance:L,K=f.threshold,W=void 0===K?a.threshold:K,O=f.findAllMatches,V=void 0===O?a.findAllMatches:O,F=f.minMatchCharLength,H=void 0===F?a.minMatchCharLength:F,I=f.includeMatches,J=void 0===I?a.includeMatches:I,N=f.ignoreLocation,v=void 0===N?a.ignoreLocation:N,u,k,m,b,l,h,o,w,T,A,p,z,n,Q,e,s,d,P,C,x,j,c,t,E,U,B,M;if(g.length>32)throw new Error(q(32));for(u,k=g.length,m=y.length,b=Math.max(0,Math.min(R,m)),l=W,h=b,o=H>1||J,w=o?Array(m):[];(u=y.indexOf(g,h))>-1;)if(T=i(g,{currentLocation:u,expectedLocation:b,distance:r,ignoreLocation:v}),l=Math.min(T,l),h=u+k,o)for(A=0;A=C;c-=1)if(t=c-1,E=S[y.charAt(t)],o&&(w[t]=+!!E),j[c]=(j[c+1]<<1|1)&E,e&&(j[c]|=(p[c+1]|p[c])<<1|1|p[c+1]),j[c]&Q&&(z=i(g,{errors:e,currentLocation:t,expectedLocation:b,distance:r,ignoreLocation:v}))<=l){if(l=z,(h=t)<=b)break;C=Math.max(1,2*b-h)}if(U=i(g,{errors:e+1,currentLocation:b,expectedLocation:b,distance:r,ignoreLocation:v}),U>l)break;p=j}return B={isMatch:h>=0,score:Math.max(.001,z)},o&&(M=D(w,H),M.length?J&&(B.indices=M):B.isMatch=!1),B}(c,w,s,{location:r+u,distance:p,threshold:t,findAllMatches:m,minMatchCharLength:n,includeMatches:f,ignoreLocation:o}),l=g.isMatch,v=g.score,j=g.indices;l&&(d=!0),h+=v,l&&j&&(e=[].concat(k(e),k(j)))}),l={isMatch:d,score:d?h/this.chunks.length:1},d&&f&&(l.indices=e),l)}}]),b}(),m=[];function w(a,b){for(var c=0,e=m.length,d;c-1&&(d.refIndex=c.idx),a.matches.push(d)}})}function J(a,b){b.score=a.score}function K(f,i){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=c.includeMatches,g=void 0===d?a.includeMatches:d,e=c.includeScore,h=void 0===e?a.includeScore:e,b=[];return g&&b.push(I),h&&b.push(J),f.map(function(a){var c=a.idx,d={item:i[c],refIndex:c};return b.length&&b.forEach(function(b){b(a,d)}),d})}return e=function(){function e(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=arguments.length>2?arguments[2]:void 0;if(h(this,e),this.options=r({},a,{},c),this.options.useExtendedSearch)throw new Error("Extended search is not available");this._keyStore=new o(this.options.keys),this.setCollection(b,d)}return g(e,[{key:"setCollection",value:function(b,a){if(this._docs=b,a&&!(a instanceof f))throw new Error("Incorrect 'index' type");this._myIndex=a||A(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(a){b(a)&&(this._docs.push(a),this._myIndex.add(a))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},b=[],a=0,c=this._docs.length,d;a1&&void 0!==arguments[1]?arguments[1]:{},f=g.limit,e=void 0===f?-1:f,a=this.options,h=a.includeMatches,i=a.includeScore,j=a.shouldSort,k=a.sortFn,l=a.ignoreFieldNorm,b=c(d)?c(this._docs[0])?this._searchStringList(d):this._searchObjectList(d):this._searchLogical(d);return H(b,{ignoreFieldNorm:l}),j&&b.sort(k),s(e)&&e>-1&&(b=b.slice(0,e)),K(b,this._docs,{includeMatches:h,includeScore:i})}},{key:"_searchStringList",value:function(c){var d=w(c,this.options),e=this._myIndex.records,a=[];return e.forEach(function(e){var c=e.v,g=e.i,h=e.n,f,i,j,k;b(c)&&(f=d.searchIn(c),i=f.isMatch,j=f.score,k=f.indices,i&&a.push({item:c,idx:g,matches:[{score:j,value:c,norm:h,indices:k}]}))}),a}},{key:"_searchLogical",value:function(a){throw new Error("Logical search is not available")}},{key:"_searchObjectList",value:function(h){var d=this,e=w(h,this.options),c=this._myIndex,f=c.keys,g=c.records,a=[];return g.forEach(function(h){var g=h.$,i=h.i,c;b(g)&&(c=[],f.forEach(function(a,b){c.push.apply(c,k(d._findMatches({key:a,value:g[b],searcher:e})))}),c.length&&a.push({idx:i,item:g,matches:c}))}),a}},{key:"_findMatches",value:function(c){var i=c.key,a=c.value,g=c.searcher,f,h,j,e,k,l,m;return b(a)?(f=[],d(a)?a.forEach(function(a){var c=a.v,e=a.i,h=a.n,d,j,k,l;b(c)&&(d=g.searchIn(c),j=d.isMatch,k=d.score,l=d.indices,j&&f.push({score:k,key:i,value:c,idx:e,norm:h,indices:l}))}):(h=a.v,j=a.n,e=g.searchIn(h),k=e.isMatch,l=e.score,m=e.indices,k&&f.push({score:l,key:i,value:h,norm:j,indices:m})),f):[]}}]),e}(),e.version="6.4.6",e.createIndex=A,e.parseIndex=function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=e.getFn,g=void 0===c?a.getFn:c,h=d.keys,i=d.records,b=new f({getFn:g});return b.setKeys(h),b.setIndexRecords(i),b},e.config=a,e},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t(),(()=>{var i=null,c=document.getElementById("searchResults"),a=document.getElementById("searchInput"),e=null,b=!1,h,f,g;window.onload=function(){var a=new XMLHttpRequest;a.onreadystatechange=function(){var b,c;a.readyState===4&&(a.status===200?(b=JSON.parse(a.responseText),b&&(c={distance:100,threshold:.4,ignoreLocation:!0,keys:["title","permalink","summary","content"]},i&&(c=i),f=new Fuse(b,c))):console.log(a.responseText))},a.open("GET","../index.json"),a.send()};function d(a){document.querySelectorAll(".focus").forEach(function(a){a.classList.remove("focus")}),a?(a.focus(),document.activeElement=e=a,a.parentElement.classList.add("focus")):document.activeElement.parentElement.classList.add("focus")}function j(){b=!1,c.innerHTML=a.value="",a.focus()}a.onkeyup=function(a){if(f){const a=f.search(this.value.trim());if(a.length!==0){let d="";for(let b in a)d+=`
  • ${a[b].item.title} \xBB
  • `;c.innerHTML=d,b=!0,g=c.firstChild,h=c.lastChild}else b=!1,c.innerHTML=""}},a.addEventListener("search",function(a){this.value||j()}),document.onkeydown=function(k){var f,m;let i=k.key;f=document.activeElement;let l=document.getElementById("searchbox").contains(f);if(f===a)for(m=document.getElementsByClassName("focus");m.length>0;)m[0].classList.remove("focus");else e&&(f=e);i==="ArrowDown"&&b&&l?(k.preventDefault(),f==a?d(c.firstChild.lastChild):f.parentElement==h||d(f.parentElement.nextSibling.lastChild)):i==="ArrowUp"&&b&&l?(k.preventDefault(),f==a||(f.parentElement==g?d(a):d(f.parentElement.previousSibling.lastChild))):i==="ArrowRight"&&b&&l?f.click():i==="Escape"&&j()}})() \ No newline at end of file +var e,t;e=this,t=function(){"use strict";var q,n,o,a,x,f,y,m,e;function C(a){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function h(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function z(d,c){for(var b=0,a;bc.length)&&(a=c.length);for(var b=0,d=new Array(a);b0&&void 0!==arguments[0]?arguments[0]:3,a=new Map,b=Math.pow(10,c);return{get:function(e){var c=e.match(x).length,f,d;return a.has(c)?a.get(c):(f=1/Math.sqrt(c),d=parseFloat(Math.round(f*b)/b),a.set(c,d),d)},clear:function(){a.clear()}}}f=function(){function e(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=c.getFn,d=void 0===b?a.getFn:b;h(this,e),this.norm=F(3),this.getFn=d,this.isCreated=!1,this.setIndexRecords()}return g(e,[{key:"setSources",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=a}},{key:"setIndexRecords",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=a}},{key:"setKeys",value:function(){var b=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=a,this._keysMap={},a.forEach(function(a,c){b._keysMap[a.id]=c})}},{key:"create",value:function(){var a=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,c(this.docs[0])?this.docs.forEach(function(b,c){a._addString(b,c)}):this.docs.forEach(function(b,c){a._addObject(b,c)}),this.norm.clear())}},{key:"add",value:function(a){var b=this.size();c(a)?this._addString(a,b):this._addObject(a,b)}},{key:"removeAt",value:function(b){this.records.splice(b,1);for(var a=b,c=this.size();a2&&void 0!==arguments[2]?arguments[2]:{},c=g.getFn,h=void 0===c?a.getFn:c,b=new f({getFn:h});return b.setKeys(d.map(B)),b.setSources(e),b.create(),b}function i(o){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=b.errors,n=void 0===e?0:e,f=b.currentLocation,l=void 0===f?0:f,h=b.expectedLocation,k=void 0===h?0:h,j=b.distance,d=void 0===j?a.distance:j,g=b.ignoreLocation,m=void 0===g?a.ignoreLocation:g,c=n/o.length,i;return m?c:(i=Math.abs(k-l),d?c+i/d:i?1:c)}function D(){for(var d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.minMatchCharLength,e=[],b=-1,g=-1,c=0,i=d.length,h;c=f&&e.push([b,g]),b=-1);return d[c-1]&&c-b>=f&&e.push([b,c-1]),e}function E(c){for(var b={},a=0,d=c.length,e;a1&&void 0!==arguments[1]?arguments[1]:{},j=c.location,y=void 0===j?a.location:j,i=c.threshold,x=void 0===i?a.threshold:i,k=c.distance,w=void 0===k?a.distance:k,m=c.includeMatches,u=void 0===m?a.includeMatches:m,o=c.findAllMatches,B=void 0===o?a.findAllMatches:o,q=c.minMatchCharLength,t=void 0===q?a.minMatchCharLength:q,g=c.isCaseSensitive,r=void 0===g?a.isCaseSensitive:g,n=c.ignoreLocation,v=void 0===n?a.ignoreLocation:n,f,e,d,l,A,s;if(h(this,b),this.options={location:y,threshold:x,distance:w,includeMatches:u,findAllMatches:B,minMatchCharLength:t,isCaseSensitive:r,ignoreLocation:v},this.pattern=r?p:p.toLowerCase(),this.chunks=[],this.pattern.length)if(f=function(a,b){z.chunks.push({pattern:a,alphabet:E(a),startIndex:b})},e=this.pattern.length,e>32){for(d=0,l=e%32,A=e-l;d3&&void 0!==arguments[3]?arguments[3]:{},G=f.location,R=void 0===G?a.location:G,L=f.distance,r=void 0===L?a.distance:L,K=f.threshold,W=void 0===K?a.threshold:K,O=f.findAllMatches,V=void 0===O?a.findAllMatches:O,F=f.minMatchCharLength,H=void 0===F?a.minMatchCharLength:F,I=f.includeMatches,J=void 0===I?a.includeMatches:I,N=f.ignoreLocation,v=void 0===N?a.ignoreLocation:N,u,k,m,b,l,h,o,w,T,A,p,z,n,Q,e,s,d,P,C,x,j,c,t,E,U,B,M;if(g.length>32)throw new Error(q(32));for(u,k=g.length,m=y.length,b=Math.max(0,Math.min(R,m)),l=W,h=b,o=H>1||J,w=o?Array(m):[];(u=y.indexOf(g,h))>-1;)if(T=i(g,{currentLocation:u,expectedLocation:b,distance:r,ignoreLocation:v}),l=Math.min(T,l),h=u+k,o)for(A=0;A=C;c-=1)if(t=c-1,E=S[y.charAt(t)],o&&(w[t]=+!!E),j[c]=(j[c+1]<<1|1)&E,e&&(j[c]|=(p[c+1]|p[c])<<1|1|p[c+1]),j[c]&Q&&(z=i(g,{errors:e,currentLocation:t,expectedLocation:b,distance:r,ignoreLocation:v}))<=l){if(l=z,(h=t)<=b)break;C=Math.max(1,2*b-h)}if(U=i(g,{errors:e+1,currentLocation:b,expectedLocation:b,distance:r,ignoreLocation:v}),U>l)break;p=j}return B={isMatch:h>=0,score:Math.max(.001,z)},o&&(M=D(w,H),M.length?J&&(B.indices=M):B.isMatch=!1),B}(c,w,s,{location:r+u,distance:p,threshold:t,findAllMatches:m,minMatchCharLength:n,includeMatches:f,ignoreLocation:o}),l=g.isMatch,v=g.score,j=g.indices;l&&(d=!0),h+=v,l&&j&&(e=[].concat(k(e),k(j)))}),l={isMatch:d,score:d?h/this.chunks.length:1},d&&f&&(l.indices=e),l)}}]),b}(),m=[];function w(a,b){for(var c=0,e=m.length,d;c-1&&(d.refIndex=c.idx),a.matches.push(d)}})}function J(a,b){b.score=a.score}function K(f,i){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=c.includeMatches,g=void 0===d?a.includeMatches:d,e=c.includeScore,h=void 0===e?a.includeScore:e,b=[];return g&&b.push(I),h&&b.push(J),f.map(function(a){var c=a.idx,d={item:i[c],refIndex:c};return b.length&&b.forEach(function(b){b(a,d)}),d})}return e=function(){function e(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=arguments.length>2?arguments[2]:void 0;if(h(this,e),this.options=r({},a,{},c),this.options.useExtendedSearch)throw new Error("Extended search is not available");this._keyStore=new o(this.options.keys),this.setCollection(b,d)}return g(e,[{key:"setCollection",value:function(b,a){if(this._docs=b,a&&!(a instanceof f))throw new Error("Incorrect 'index' type");this._myIndex=a||A(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(a){b(a)&&(this._docs.push(a),this._myIndex.add(a))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},b=[],a=0,c=this._docs.length,d;a1&&void 0!==arguments[1]?arguments[1]:{},f=g.limit,e=void 0===f?-1:f,a=this.options,h=a.includeMatches,i=a.includeScore,j=a.shouldSort,k=a.sortFn,l=a.ignoreFieldNorm,b=c(d)?c(this._docs[0])?this._searchStringList(d):this._searchObjectList(d):this._searchLogical(d);return H(b,{ignoreFieldNorm:l}),j&&b.sort(k),s(e)&&e>-1&&(b=b.slice(0,e)),K(b,this._docs,{includeMatches:h,includeScore:i})}},{key:"_searchStringList",value:function(c){var d=w(c,this.options),e=this._myIndex.records,a=[];return e.forEach(function(e){var c=e.v,g=e.i,h=e.n,f,i,j,k;b(c)&&(f=d.searchIn(c),i=f.isMatch,j=f.score,k=f.indices,i&&a.push({item:c,idx:g,matches:[{score:j,value:c,norm:h,indices:k}]}))}),a}},{key:"_searchLogical",value:function(a){throw new Error("Logical search is not available")}},{key:"_searchObjectList",value:function(h){var d=this,e=w(h,this.options),c=this._myIndex,f=c.keys,g=c.records,a=[];return g.forEach(function(h){var g=h.$,i=h.i,c;b(g)&&(c=[],f.forEach(function(a,b){c.push.apply(c,k(d._findMatches({key:a,value:g[b],searcher:e})))}),c.length&&a.push({idx:i,item:g,matches:c}))}),a}},{key:"_findMatches",value:function(c){var i=c.key,a=c.value,g=c.searcher,f,h,j,e,k,l,m;return b(a)?(f=[],d(a)?a.forEach(function(a){var c=a.v,e=a.i,h=a.n,d,j,k,l;b(c)&&(d=g.searchIn(c),j=d.isMatch,k=d.score,l=d.indices,j&&f.push({score:k,key:i,value:c,idx:e,norm:h,indices:l}))}):(h=a.v,j=a.n,e=g.searchIn(h),k=e.isMatch,l=e.score,m=e.indices,k&&f.push({score:l,key:i,value:h,norm:j,indices:m})),f):[]}}]),e}(),e.version="6.4.6",e.createIndex=A,e.parseIndex=function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=e.getFn,g=void 0===c?a.getFn:c,h=d.keys,i=d.records,b=new f({getFn:g});return b.setKeys(h),b.setIndexRecords(i),b},e.config=a,e},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t(),(()=>{var i=null,b=document.getElementById("searchResults"),a=document.getElementById("searchInput"),e=null,c=!1,h,f,g;window.onload=function(){var a=new XMLHttpRequest;a.onreadystatechange=function(){var b,c;a.readyState===4&&(a.status===200?(b=JSON.parse(a.responseText),b&&(c={distance:100,threshold:.4,ignoreLocation:!0,keys:["title","permalink","summary","content"]},i&&(c=i),f=new Fuse(b,c))):console.log(a.responseText))},a.open("GET","../index.json"),a.send()};function d(a){document.querySelectorAll(".focus").forEach(function(a){a.classList.remove("focus")}),a?(a.focus(),document.activeElement=e=a,a.parentElement.classList.add("focus")):document.activeElement.parentElement.classList.add("focus")}function j(){c=!1,b.innerHTML=a.value="",a.focus()}a.onkeyup=function(a){if(f){const a=f.search(this.value.trim());if(a.length!==0){let d="";for(let b in a)d+=`
  • ${a[b].item.title} \xBB
  • `;b.innerHTML=d,c=!0,g=b.firstChild,h=b.lastChild}else c=!1,b.innerHTML=""}},a.addEventListener("search",function(a){this.value||j()}),document.onkeydown=function(k){var f,l;let i=k.key;f=document.activeElement;let m=document.getElementById("searchbox").contains(f);if(f===a)for(l=document.getElementsByClassName("focus");l.length>0;)l[0].classList.remove("focus");else e&&(f=e);if(i==="Escape")j();else if(!c||!m)return;else i==="ArrowDown"?(k.preventDefault(),f==a?d(b.firstChild.lastChild):f.parentElement!=h&&d(f.parentElement.nextSibling.lastChild)):i==="ArrowUp"?(k.preventDefault(),f.parentElement==g?d(a):f!=a&&d(f.parentElement.previousSibling.lastChild)):i==="ArrowRight"&&f.click()}})() \ No newline at end of file diff --git a/fr/search/index.html b/fr/search/index.html index 3ad257b7..c13f8b41 100644 --- a/fr/search/index.html +++ b/fr/search/index.html @@ -9,7 +9,7 @@ - + diff --git a/search/index.html b/search/index.html index 3bc55a75..d9c948ce 100644 --- a/search/index.html +++ b/search/index.html @@ -9,7 +9,7 @@ - +