mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-30 06:16:54 +01:00
1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
|
var e=this,t=function(){"use strict";function v(e,s){var t=Object.keys(e),n;return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),s&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),t.push.apply(t,n)),t}function i(n){for(var e=1,t;e<arguments.length;e++)t=null!=arguments[e]?arguments[e]:{},e%2?v(Object(t),!0).forEach(function(e){N(n,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))});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 y(s,n){for(var t=0,e;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 r(e,t,n){return t&&y(e.prototype,t),n&&y(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 d(e){return function(e){if(Array.isArray(e))return u(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 u(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)?u(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 u(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 s(e){return Array.isArray?Array.isArray(e):"[object Array]"===p(e)}function n(e){return"string"==typeof e}function g(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]"==p(e)}function t(e){return null!=e}function m(e){return!e.trim().length}function p(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var F="Extended search is not available",S=function(e){return"Pattern length exceeds max of ".concat(e,".")},b=Object.prototype.hasOwnProperty,A=function(){function e(s){var n=this,t;l(this,e),this._keys=[],this._keyMap={},t=0,s.forEach(function(s){var e=x(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 r(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}(),f,o,E,O,a;function x(e){var o=null,i=null,a=null,r=1,t;if(n(e)||s(e))a=e,o=_(e),i=w(e);else{if(!b.call(e,"name"))throw new Error(function(e){return"Missing ".concat(e," property in key")}("name"));if(t=e.name,a=t,b.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));o=_(t),i=w(t)}return{path:o,id:i,weight:r,src:a}}function _(e){return s(e)?e:e.split(".")}function w(e){return s(e)?e.join("."):e}var k={useExtendedSearch:!1,getFn:function(a,o){var e=[],i=!1;return function d(c,a,r){if(t(c))if(a[r]){if(o=c[a[r]],!t(o))return;if(r===a.length-1&&(n(o)||g(o)||D(o)))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)}(o));else if(s(o)){i=!0;for(var o,l=0,u=o.length;l<u;l+=1)d(o[l],a,r+1)}else a.length&&d(o,a,r+1)}else e.push(c)}(a,n(o)?o.split("."):o,0),i?e:e[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},e=i(i(i(i({},{isCaseSens
|