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