biofriction-wp-plugin/biofriction-theme/dist/assets/js/app.js

1 line
49 KiB
JavaScript
Raw Normal View History

(()=>{var n={545:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Foundation=void 0;var i,s="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},r=(i=n(609))&&i.__esModule?i:{default:i},o=n(318),a=n(857),u={version:"6.5.1",_plugins:{},_uuids:[],plugin:function(e,t){var n=t||l(e),t=d(n);this._plugins[t]=this[n]=e},registerPlugin:function(e,t){t=t?d(t):l(e.constructor).toLowerCase();e.uuid=(0,o.GetYoDigits)(6,t),e.$element.attr("data-"+t)||e.$element.attr("data-"+t,e.uuid),e.$element.data("zfPlugin")||e.$element.data("zfPlugin",e),e.$element.trigger("init.zf."+t),this._uuids.push(e.uuid)},unregisterPlugin:function(e){var t,n=d(l(e.$element.data("zfPlugin").constructor));for(t in this._uuids.splice(this._uuids.indexOf(e.uuid),1),e.$element.removeAttr("data-"+n).removeData("zfPlugin").trigger("destroyed.zf."+n),e)e[t]=null},reInit:function(e){var t,n,i=e instanceof r.default;try{i?e.each(function(){(0,r.default)(this).data("zfPlugin")._init()}):(t=void 0===e?"undefined":s(e),n=this,{object:function(e){e.forEach(function(e){e=d(e),(0,r.default)("[data-"+e+"]").foundation("_init")})},string:function(){e=d(e),(0,r.default)("[data-"+e+"]").foundation("_init")},undefined:function(){this.object(Object.keys(n._plugins))}}[t](e))}catch(e){console.error(e)}finally{return e}},reflow:function(n,e){void 0===e?e=Object.keys(this._plugins):"string"==typeof e&&(e=[e]);var o=this;r.default.each(e,function(e,t){var i=o._plugins[t];(0,r.default)(n).find("[data-"+t+"]").addBack("[data-"+t+"]").each(function(){var e=(0,r.default)(this),n={};if(e.data("zfPlugin"))console.warn("Tried to initialize "+t+" on an element that already has a Foundation plugin.");else{e.attr("data-options")&&e.attr("data-options").split(";").forEach(function(e,t){var e=e.split(":").map(function(e){return e.trim()});e[0]&&(n[e[0]]="true"===(e=e[1])||"false"!==e&&(isNaN(+e)?e:parseFloat(e)))});try{e.data("zfPlugin",new i((0,r.default)(this),n))}catch(e){console.error(e)}finally{return}}})})},getFnName:l,addToJquery:function(r){return r.fn.foundation=function(n){var e=void 0===n?"undefined":s(n),t=r(".no-js");if(t.length&&t.removeClass("no-js"),"undefined"===e)a.MediaQuery._init(),u.reflow(this);else{if("string"!==e)throw new TypeError("We're sorry, "+e+" is not a valid parameter. You must use a string representing the method you wish to invoke.");var i=Array.prototype.slice.call(arguments,1),o=this.data("zfPlugin");if(void 0===o||void 0===o[n])throw new ReferenceError("We're sorry, '"+n+"' is not an available method for "+(o?l(o):"this element")+".");1===this.length?o[n].apply(o,i):this.each(function(e,t){o[n].apply(r(t).data("zfPlugin"),i)})}return this},r}};function l(e){if(void 0!==Function.prototype.name)return(void 0===e.prototype?e:e.prototype).constructor.name;e=/function\s([^(]{1,})\(/.exec(e.toString());return e&&1<e.length?e[1].trim():""}function d(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}u.util={throttle:function(n,i){var o=null;return function(){var e=this,t=arguments;null===o&&(o=setTimeout(function(){n.apply(e,t),o=null},i))}}},window.Foundation=u,function(){Date.now&&window.Date.now||(window.Date.now=Date.now=function(){return(new Date).getTime()});for(var i,e=["webkit","moz"],t=0;t<e.length&&!window.requestAnimationFrame;++t){var n=e[t];window.requestAnimationFrame=window[n+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n+"CancelAnimationFrame"]||window[n+"CancelRequestAnimationFrame"]}!/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)&&window.requestAnimationFrame&&window.cancelAnimationFrame||(i=0,window.requestAnimationFrame=function(e){var t=Date.now(),n=Math.max(i+16,t);return setTimeout(function(){e(i=n)},n-t)},window.cancelAnimationFrame=clearTimeout),window.performance&&window.performance.now||(window.performance={start:Date.now(),now:function(){return Date.now()-this.start}})}(),Function.prototype.bind||(Function.prototype.bind=function(