1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-11-24 13:10:18 +01:00
hugo-theme-bootstrap4-blog/assets/js/haven.umd.min.js

13 lines
28 KiB
JavaScript
Raw Normal View History

/*!
2021-10-18 13:53:45 +02:00
* @chiiya/haven v0.6.2
* (c) Elisha Witte <elishawitte@gmail.com>
* Released under the MIT License.
*/
/*!
2021-10-18 13:53:45 +02:00
* @chiiya/haven v0.6.2
* (c) Elisha Witte <elishawitte@gmail.com>
* Released under the MIT License.
*/
2021-10-18 13:53:45 +02:00
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).haven={})}(this,(function(e){"use strict";function n(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,t)}return o}function o(e){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{};o%2?n(Object(t),!0).forEach((function(n){c(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):n(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function t(e){return(t="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})(e)}function i(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function a(e,n){for(var o=0;o<n.length;o++){var t=n[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function r(e,n,o){return n&&a(e.prototype,n),o&&a(e,o),e}function c(e,n,o){return n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}function s(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)||l(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 l(e,n){if(e){if("string"==typeof e)return u(e,n);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?u(e,n):void 0}}function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var o=0,t=new Array(n);o<n;o++)t[o]=e[o];return t}function f(e,n){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=l(e))||n&&e&&"number"==typeof e.length){o&&(e=o);var t=0,i=function(){};return{s:i,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,c=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return r=e.done,e},e:function(e){c=!0,a=e},f:function(){try{r||null==o.return||o.return()}finally{if(c)throw a}}}}function d(e){return e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)}var p=function(){function e(){i(this,e)}return r(e,null,[{key:"set",value:function(e,n,o){var t=this.resolveOptions(o),i=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),a=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),r=this.encodeAttributes(t);document.cookie="".concat(a,"=").concat(i).concat(r)}},{key:"get",value:function(e){var n,o=f(document.cookie?document.cookie.split("; "):[]);try{for(o.s();!(n=o.n()).done;){var t=n.value.split("=");if(e===d(t[0])){var i=t.slice(1).join("=");return'"'===i.charAt(0)&&(i=i.slice(1,-1)),i=d(i)}}}catch(e){o.e(e)}finally{o.f()}}},{key:"getAll",value:function(){var e,n={},o=f(document.cookie?document.cookie.split("; "):[]);try{for(o.s();!(e=o.n()).done;){var t=e.value.split("="),i=d(t[0]),a=t.slice(1).join("=");'"'===a.charAt(0)&&(a=a.slice(1,-1)),a=d(a),n[i]=a}}catch(e){o.e(e)}finally{o.f()}return n}},{key:"remove",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=this.resolveOptions(Object.assign(n,{expires:-1}));if(e instanceof RegExp)return this.removeByRegex(e,o);var t=th
//# sourceMappingURL=haven.umd.min.js.map