mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-29 22:06:54 +01:00
1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
|
var e,t;e=this,t=function(){"use strict";var u,s,l,t,x,a,z,i,c,A,m,g;function B(a,d){var b=Object.keys(a),c;return Object.getOwnPropertySymbols&&(c=Object.getOwnPropertySymbols(a),d&&(c=c.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),b.push.apply(b,c)),b}function f(c){for(var a=1,b;a<arguments.length;a++)b=null!=arguments[a]?arguments[a]:{},a%2?B(Object(b),!0).forEach(function(a){J(c,a,b[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(b)):B(Object(b)).forEach(function(a){Object.defineProperty(c,a,Object.getOwnPropertyDescriptor(b,a))});return c}function n(a){return n="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},n(a)}function j(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function y(d,c){for(var b=0,a;b<c.length;b++)a=c[b],a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}function h(a,b,c){return b&&y(a.prototype,b),c&&y(a,c),Object.defineProperty(a,"prototype",{writable:!1}),a}function J(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function q(a){return function(a){if(Array.isArray(a))return p(a)}(a)||function(a){if("undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)}(a)||function(a,c){if(a){if("string"==typeof a)return p(a,c);var b=Object.prototype.toString.call(a).slice(8,-1);return"Object"===b&&a.constructor&&(b=a.constructor.name),"Map"===b||"Set"===b?Array.from(a):"Arguments"===b||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?p(a,c):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(c,a){(null==a||a>c.length)&&(a=c.length);for(var b=0,d=new Array(a);b<a;b++)d[b]=c[b];return d}function e(a){return Array.isArray?Array.isArray(a):"[object Array]"===D(a)}function d(a){return"string"==typeof a}function r(a){return"number"==typeof a}function O(a){return!0===a||!1===a||function(a){return function(a){return"object"===n(a)}(a)&&null!==a}(a)&&"[object Boolean]"==D(a)}function b(a){return null!=a}function o(a){return!a.trim().length}function D(a){return null==a?void 0===a?"[object Undefined]":"[object Null]":Object.prototype.toString.call(a)}u="Extended search is not available",s=function(a){return"Pattern length exceeds max of ".concat(a,".")},l=Object.prototype.hasOwnProperty,t=function(){function a(d){var c=this,b;j(this,a),this._keys=[],this._keyMap={},b=0,d.forEach(function(d){var a=E(d);b+=a.weight,c._keys.push(a),c._keyMap[a.id]=a,b+=a.weight}),this._keys.forEach(function(a){a.weight/=b})}return h(a,[{key:"get",value:function(a){return this._keyMap[a]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),a}();function E(a){var c=null,f=null,g=null,h=1,b;if(d(a)||e(a))g=a,c=v(a),f=w(a);else{if(!l.call(a,"name"))throw new Error(function(a){return"Missing ".concat(a," property in key")}("name"));if(b=a.name,g=b,l.call(a,"weight")&&(h=a.weight)<=0)throw new Error(function(a){return"Property 'weight' in key '".concat(a,"' must be a positive integer")}(b));c=v(b),f=w(b)}return{path:c,id:f,weight:h,src:g}}function v(a){return e(a)?a:a.split(".")}function w(a){return e(a)?a.join("."):a}x={useExtendedSearch:!1,getFn:function(g,c){var a=[],f=!1;return function k(j,g,h){var c,i,l;if(b(j))if(g[h]){if(c=j[g[h]],!b(c))return;if(h===g.length-1&&(d(c)||r(c)||O(c)))a.push(function(a){return null==a?"":function(a){if("string"==typeof a)return a;var b=a+"";return"0"==b&&1/a==-1/0?"-0":b}(a)}(c));else if(e(c)){f=!0;for(i=0,l=c.length;i<l;i+=1)k(c[i],g,h+1)}else g.length&&k(c,g,h+1)}else a.push(j)}(g,d(c)?c.split("."):c,0),f?a:a[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},a=f(f(
|