-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearch.9f7b013c.js
executable file
·1 lines (1 loc) · 8.39 KB
/
search.9f7b013c.js
1
(self.webpackChunk=self.webpackChunk||[]).push([[464],{1103:(t,e,r)=>{var n=r(9755);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}r(5306),r(4916),r(4765),r(2564),r(3210),r(2526),r(1817),r(1539),r(2165),r(8783),r(6992),r(3948),function(t){"use strict";String.prototype.render=function(t){return this.replace(/({{ (\w+) }})/g,(function(e,r,n){return t[n]}))};var e=function e(r,n){this.$input=t(r),this.$form=this.$input.closest("form"),this.$preview=t('<ul class="search-preview list-group">').appendTo(this.$form),this.options=t.extend({},e.DEFAULTS,this.$input.data(),n),this.$input.keyup(this.debounce())};e.DEFAULTS={minQueryLength:2,limit:10,delay:500,noResultsMessage:"No results found",itemTemplate:' <div class="media shadow border rounded-lg p-3 mb-4"> <div class="media-body"> <h4 class="font-weight-light mb-0"> <a href="{{ url }}"> {{ title }} </a> </h4> <div class="document-text"> {{ summary }} </div> </div> </div>'},e.prototype.debounce=function(){var t=this.options.delay,e=this.search,r=null,n=this;return function(){clearTimeout(r),r=setTimeout((function(){e.apply(n)}),t)}},e.prototype.search=function(){if(t.trim(this.$input.val()).replace(/\s{2,}/g," ").length<this.options.minQueryLength)this.$preview.empty();else{var e=this,r=this.$form.serializeArray();r.l=this.limit,t.getJSON(this.$form.attr("action"),r,(function(t){e.show(t)}))}},e.prototype.show=function(e){var r=this.$preview,n=this.options.itemTemplate;0===e.length?r.html(this.options.noResultsMessage):(r.empty(),t.each(e,(function(t,e){r.append(n.render(e))})))},t.fn.instantSearch=function(r){return this.each((function(){var n=t(this),a=n.data("instantSearch"),o="object"===i(r)&&r;a||n.data("instantSearch",a=new e(this,o)),"search"===r&&a.search()}))},t.fn.instantSearch.Constructor=e}(n)},7666:(t,e,r)=>{"use strict";r(1103);var n=r(9755);n((function(){n(".search-field").instantSearch({delay:100}).keyup()}))},1530:(t,e,r)=>{"use strict";var n=r(8710).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},7007:(t,e,r)=>{"use strict";r(4916);var n=r(1320),i=r(7293),a=r(5112),o=r(2261),s=r(8880),u=a("species"),c=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l="$0"==="a".replace(/./,"$0"),p=a("replace"),f=!!/./[p]&&""===/./[p]("a","$0"),h=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));t.exports=function(t,e,r,p){var v=a(t),d=!i((function(){var e={};return e[v]=function(){return 7},7!=""[t](e)})),g=d&&!i((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[v]=/./[v]),r.exec=function(){return e=!0,null},r[v](""),!e}));if(!d||!g||"replace"===t&&(!c||!l||f)||"split"===t&&!h){var x=/./[v],y=r(v,""[t],(function(t,e,r,n,i){return e.exec===o?d&&!i?{done:!0,value:x.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),m=y[0],E=y[1];n(String.prototype,t,m),n(RegExp.prototype,v,2==e?function(t,e){return E.call(t,this,e)}:function(t){return E.call(t,this)})}p&&s(RegExp.prototype[v],"sham",!0)}},647:(t,e,r)=>{var n=r(7908),i=Math.floor,a="".replace,o=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,u,c,l){var p=r+t.length,f=u.length,h=s;return void 0!==c&&(c=n(c),h=o),a.call(l,h,(function(n,a){var o;switch(a.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(p);case"<":o=c[a.slice(1,-1)];break;default:var s=+a;if(0===s)return n;if(s>f){var l=i(s/10);return 0===l?n:l<=f?void 0===u[l-1]?a.charAt(1):u[l-1]+a.charAt(1):n}o=u[s-1]}return void 0===o?"":o}))}},7651:(t,e,r)=>{var n=r(4326),i=r(2261);t.exports=function(t,e){var r=t.exec;if("function"==typeof r){var a=r.call(t,e);if("object"!=typeof a)throw TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==n(t))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},2261:(t,e,r)=>{"use strict";var n,i,a=r(7066),o=r(2999),s=RegExp.prototype.exec,u=String.prototype.replace,c=s,l=(n=/a/,i=/b*/g,s.call(n,"a"),s.call(i,"a"),0!==n.lastIndex||0!==i.lastIndex),p=o.UNSUPPORTED_Y||o.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(l||f||p)&&(c=function(t){var e,r,n,i,o=this,c=p&&o.sticky,h=a.call(o),v=o.source,d=0,g=t;return c&&(-1===(h=h.replace("y","")).indexOf("g")&&(h+="g"),g=String(t).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==t[o.lastIndex-1])&&(v="(?: "+v+")",g=" "+g,d++),r=new RegExp("^(?:"+v+")",h)),f&&(r=new RegExp("^"+v+"$(?!\\s)",h)),l&&(e=o.lastIndex),n=s.call(c?r:o,g),c?n?(n.input=n.input.slice(d),n[0]=n[0].slice(d),n.index=o.lastIndex,o.lastIndex+=n[0].length):o.lastIndex=0:l&&n&&(o.lastIndex=o.global?n.index+n[0].length:e),f&&n&&n.length>1&&u.call(n[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(n[i]=void 0)})),n}),t.exports=c},7066:(t,e,r)=>{"use strict";var n=r(9670);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},2999:(t,e,r)=>{"use strict";var n=r(7293);function i(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=n((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=n((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},1150:t=>{t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},6091:(t,e,r)=>{var n=r(7293),i=r(1361);t.exports=function(t){return n((function(){return!!i[t]()||"
"!="
"[t]()||i[t].name!==t}))}},3111:(t,e,r)=>{var n=r(4488),i="["+r(1361)+"]",a=RegExp("^"+i+i+"*"),o=RegExp(i+i+"*$"),s=function(t){return function(e){var r=String(n(e));return 1&t&&(r=r.replace(a,"")),2&t&&(r=r.replace(o,"")),r}};t.exports={start:s(1),end:s(2),trim:s(3)}},1361:t=>{t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},4916:(t,e,r)=>{"use strict";var n=r(2109),i=r(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},5306:(t,e,r)=>{"use strict";var n=r(7007),i=r(9670),a=r(7466),o=r(9958),s=r(4488),u=r(1530),c=r(647),l=r(7651),p=Math.max,f=Math.min;n("replace",2,(function(t,e,r,n){var h=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=n.REPLACE_KEEPS_$0,d=h?"$":"$0";return[function(r,n){var i=s(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,i,n):e.call(String(i),r,n)},function(t,n){if(!h&&v||"string"==typeof n&&-1===n.indexOf(d)){var s=r(e,t,this,n);if(s.done)return s.value}var g=i(t),x=String(this),y="function"==typeof n;y||(n=String(n));var m=g.global;if(m){var E=g.unicode;g.lastIndex=0}for(var S=[];;){var b=l(g,x);if(null===b)break;if(S.push(b),!m)break;""===String(b[0])&&(g.lastIndex=u(x,a(g.lastIndex),E))}for(var R,$="",I=0,T=0;T<S.length;T++){b=S[T];for(var w=String(b[0]),A=p(f(o(b.index),x.length),0),_=[],P=1;P<b.length;P++)_.push(void 0===(R=b[P])?R:String(R));var U=b.groups;if(y){var C=[w].concat(_,A,x);void 0!==U&&C.push(U);var k=String(n.apply(void 0,C))}else k=c(w,x,A,_,U,n);A>=I&&($+=x.slice(I,A)+k,I=A+w.length)}return $+x.slice(I)}]}))},4765:(t,e,r)=>{"use strict";var n=r(7007),i=r(9670),a=r(4488),o=r(1150),s=r(7651);n("search",1,(function(t,e,r){return[function(e){var r=a(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](String(r))},function(t){var n=r(e,t,this);if(n.done)return n.value;var a=i(t),u=String(this),c=a.lastIndex;o(c,0)||(a.lastIndex=0);var l=s(a,u);return o(a.lastIndex,c)||(a.lastIndex=c),null===l?-1:l.index}]}))},3210:(t,e,r)=>{"use strict";var n=r(2109),i=r(3111).trim;n({target:"String",proto:!0,forced:r(6091)("trim")},{trim:function(){return i(this)}})},2564:(t,e,r)=>{var n=r(2109),i=r(7854),a=r(8113),o=[].slice,s=function(t){return function(e,r){var n=arguments.length>2,i=n?o.call(arguments,2):void 0;return t(n?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,r)}};n({global:!0,bind:!0,forced:/MSIE .\./.test(a)},{setTimeout:s(i.setTimeout),setInterval:s(i.setInterval)})}},t=>{"use strict";t.O(void 0,[582],(()=>{return e=7666,t(t.s=e);var e}))}]);