vendor/assets/js/plugins/foundation.slider.min.js in foundation-rails-6.6.2.0 vs vendor/assets/js/plugins/foundation.slider.min.js in foundation-rails-6.9.0.0
- old
+ new
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./foundation.core"),require("./foundation.util.keyboard"),require("./foundation.util.motion"),require("./foundation.util.touch"),require("jquery")):"function"==typeof define&&define.amd?define(["./foundation.core","./foundation.util.keyboard","./foundation.util.motion","./foundation.util.touch","jquery"],e):"object"==typeof exports?exports["foundation.slider"]=e(require("./foundation.core"),require("./foundation.util.keyboard"),require("./foundation.util.motion"),require("./foundation.util.touch"),require("jquery")):(t.__FOUNDATION_EXTERNAL__=t.__FOUNDATION_EXTERNAL__||{},t.__FOUNDATION_EXTERNAL__["foundation.slider"]=e(t.__FOUNDATION_EXTERNAL__["foundation.core"],t.__FOUNDATION_EXTERNAL__["foundation.util.keyboard"],t.__FOUNDATION_EXTERNAL__["foundation.util.motion"],t.__FOUNDATION_EXTERNAL__["foundation.util.touch"],t.jQuery))}(window,function(i,n,s,o,r){return u={},a.m=l={"./foundation.core":function(t,e){t.exports=i},"./foundation.util.keyboard":function(t,e){t.exports=n},"./foundation.util.motion":function(t,e){t.exports=s},"./foundation.util.touch":function(t,e){t.exports=o},"./js/entries/plugins/foundation.slider.js":function(t,e,i){"use strict";i.r(e);var n=i("./foundation.core");i.d(e,"Foundation",function(){return n.Foundation});var s=i("./js/foundation.slider.js");i.d(e,"Slider",function(){return s.Slider}),n.Foundation.plugin(s.Slider,"Slider")},"./js/foundation.slider.js":function(t,e,i){"use strict";i.r(e),i.d(e,"Slider",function(){return f});var n=i("jquery"),p=i.n(n),r=i("./foundation.util.keyboard"),y=i("./foundation.util.motion"),g=i("./foundation.core"),s=i("./foundation.util.touch"),o=i("./js/foundation.util.triggers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var f=function(){function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),u(this,d(i).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(i,g["Plugin"]),function(t,e,i){e&&l(t.prototype,e),i&&l(t,i)}(i,[{key:"_setup",value:function(t,e){this.$element=t,this.options=p.a.extend({},i.defaults,this.$element.data(),e),this.className="Slider",s.Touch.init(p.a),o.Triggers.init(p.a),this._init(),r.Keyboard.register("Slider",{ltr:{ARROW_RIGHT:"increase",ARROW_UP:"increase",ARROW_DOWN:"decrease",ARROW_LEFT:"decrease",SHIFT_ARROW_RIGHT:"increase_fast",SHIFT_ARROW_UP:"increase_fast",SHIFT_ARROW_DOWN:"decrease_fast",SHIFT_ARROW_LEFT:"decrease_fast",HOME:"min",END:"max"},rtl:{ARROW_LEFT:"increase",ARROW_RIGHT:"decrease",SHIFT_ARROW_LEFT:"increase_fast",SHIFT_ARROW_RIGHT:"decrease_fast"}})}},{key:"_init",value:function(){this.inputs=this.$element.find("input"),this.handles=this.$element.find("[data-slider-handle]"),this.$handle=this.handles.eq(0),this.$input=this.inputs.length?this.inputs.eq(0):p()("#".concat(this.$handle.attr("aria-controls"))),this.$fill=this.$element.find("[data-slider-fill]").css(this.options.vertical?"height":"width",0);(this.options.disabled||this.$element.hasClass(this.options.disabledClass))&&(this.options.disabled=!0,this.$element.addClass(this.options.disabledClass)),this.inputs.length||(this.inputs=p()().add(this.$input),this.options.binding=!0),this._setInitAttr(0),this.handles[1]&&(this.options.doubleSided=!0,this.$handle2=this.handles.eq(1),this.$input2=1<this.inputs.length?this.inputs.eq(1):p()("#".concat(this.$handle2.attr("aria-controls"))),this.inputs[1]||(this.inputs=this.inputs.add(this.$input2)),this._setInitAttr(1)),this.setHandles(),this._events()}},{key:"setHandles",value:function(){var t=this;this.handles[1]?this._setHandlePos(this.$handle,this.inputs.eq(0).val(),function(){t._setHandlePos(t.$handle2,t.inputs.eq(1).val())}):this._setHandlePos(this.$handle,this.inputs.eq(0).val())}},{key:"_reflow",value:function(){this.setHandles()}},{key:"_pctOfBar",value:function(t){var e=z(t-this.options.start,this.options.end-this.options.start);switch(this.options.positionValueFunction){case"pow":e=this._logTransform(e);break;case"log":e=this._powTransform(e)}return e.toFixed(2)}},{key:"_value",value:function(t){switch(this.options.positionValueFunction){case"pow":t=this._powTransform(t);break;case"log":t=this._logTransform(t)}return this.options.vertical?parseFloat(this.options.end)+t*(this.options.start-this.options.end):(this.options.end-this.options.start)*t+parseFloat(this.options.start)}},{key:"_logTransform",value:function(t){return function(t,e){return Math.log(e)/Math.log(t)}(this.options.nonLinearBase,t*(this.options.nonLinearBase-1)+1)}},{key:"_powTransform",value:function(t){return(Math.pow(this.options.nonLinearBase,t)-1)/(this.options.nonLinearBase-1)}},{key:"_setHandlePos",value:function(t,e,i){if(!this.$element.hasClass(this.options.disabledClass)){(e=parseFloat(e))<this.options.start?e=this.options.start:e>this.options.end&&(e=this.options.end);var n=this.options.doubleSided;if(n)if(0===this.handles.index(t)){var s=parseFloat(this.$handle2.attr("aria-valuenow"));e=s<=e?s-this.options.step:e}else{var o=parseFloat(this.$handle.attr("aria-valuenow"));e=e<=o?o+this.options.step:e}var r=this,a=this.options.vertical,l=a?"height":"width",u=a?"top":"left",d=t[0].getBoundingClientRect()[l],c=this.$element[0].getBoundingClientRect()[l],f=this._pctOfBar(e),h=(100*z((c-d)*f,c)).toFixed(this.options.decimal);e=parseFloat(e.toFixed(this.options.decimal));var p={};if(this._setValues(t,e),n){var g,v=0===this.handles.index(t),m=~~(100*z(d,c));if(v)p[u]="".concat(h,"%"),g=parseFloat(this.$handle2[0].style[u])-h+m,i&&"function"==typeof i&&i();else{var b=parseFloat(this.$handle[0].style[u]);g=h-(isNaN(b)?(this.options.initialStart-this.options.start)/((this.options.end-this.options.start)/100):b)+m}p["min-".concat(l)]="".concat(g,"%")}this.$element.one("finished.zf.animate",function(){r.$element.trigger("moved.zf.slider",[t])});var _=this.$element.data("dragging")?1e3/60:this.options.moveTime;Object(y.Move)(_,t,function(){isNaN(h)?t.css(u,"".concat(100*f,"%")):t.css(u,"".concat(h,"%")),r.options.doubleSided?r.$fill.css(p):r.$fill.css(l,"".concat(100*f,"%"))}),clearTimeout(r.timeout),r.timeout=setTimeout(function(){r.$element.trigger("changed.zf.slider",[t])},r.options.changedDelay)}}},{key:"_setInitAttr",value:function(t){var e=0===t?this.options.initialStart:this.options.initialEnd,i=this.inputs.eq(t).attr("id")||Object(g.GetYoDigits)(6,"slider");this.inputs.eq(t).attr({id:i,max:this.options.end,min:this.options.start,step:this.options.step}),this.inputs.eq(t).val(e),this.handles.eq(t).attr({role:"slider","aria-controls":i,"aria-valuemax":this.options.end,"aria-valuemin":this.options.start,"aria-valuenow":e,"aria-orientation":this.options.vertical?"vertical":"horizontal",tabindex:0})}},{key:"_setValues",value:function(t,e){var i=this.options.doubleSided?this.handles.index(t):0;this.inputs.eq(i).val(e),t.attr("aria-valuenow",e)}},{key:"_handleEvent",value:function(t,e,i){var n;if(i)n=this._adjustValue(null,i),!0;else{t.preventDefault();var s=this.options.vertical,o=s?"height":"width",r=s?"top":"left",a=s?t.pageY:t.pageX,l=this.$element[0].getBoundingClientRect()[o],u=s?p()(window).scrollTop():p()(window).scrollLeft(),d=this.$element.offset()[r];t.clientY===t.pageY&&(a+=u);var c,f=a-d,h=z(c=f<0?0:l<f?l:f,l);if(n=this._value(h),Object(g.rtl)()&&!this.options.vertical&&(n=this.options.end-n),n=this._adjustValue(null,n),!1,!e)e=v(this.$handle,r,c,o)<=v(this.$handle2,r,c,o)?this.$handle:this.$handle2}this._setHandlePos(e,n)}},{key:"_adjustValue",value:function(t,e){var i,n,s,o=this.options.step,r=parseFloat(o/2);return 0===(n=0<=(i=t?parseFloat(t.attr("aria-valuenow")):e)?i%o:o+i%o)?i:i=(s=i-n)+r<=i?s+o:s}},{key:"_events",value:function(){this._eventsForHandle(this.$handle),this.handles[1]&&this._eventsForHandle(this.$handle2)}},{key:"_eventsForHandle",value:function(e){function i(t){var e=o.inputs.index(p()(this));o._handleEvent(t,o.handles.eq(e),p()(this).val())}var n,o=this;if(this.inputs.off("keyup.zf.slider").on("keyup.zf.slider",function(t){13==t.keyCode&&i.call(this,t)}),this.inputs.off("change.zf.slider").on("change.zf.slider",i),this.options.clickSelect&&this.$element.off("click.zf.slider").on("click.zf.slider",function(t){if(o.$element.data("dragging"))return!1;p()(t.target).is("[data-slider-handle]")||(o.options.doubleSided?o._handleEvent(t):o._handleEvent(t,o.$handle))}),this.options.draggable){this.handles.addTouch();var s=p()("body");e.off("mousedown.zf.slider").on("mousedown.zf.slider",function(t){e.addClass("is-dragging"),o.$fill.addClass("is-dragging"),o.$element.data("dragging",!0),n=p()(t.currentTarget),s.on("mousemove.zf.slider",function(t){t.preventDefault(),o._handleEvent(t,n)}).on("mouseup.zf.slider",function(t){o._handleEvent(t,n),e.removeClass("is-dragging"),o.$fill.removeClass("is-dragging"),o.$element.data("dragging",!1),s.off("mousemove.zf.slider mouseup.zf.slider")})}).on("selectstart.zf.slider touchmove.zf.slider",function(t){t.preventDefault()})}e.off("keydown.zf.slider").on("keydown.zf.slider",function(t){var e,i=p()(this),n=o.options.doubleSided?o.handles.index(i):0,s=parseFloat(o.inputs.eq(n).val());r.Keyboard.handleKey(t,"Slider",{decrease:function(){e=s-o.options.step},increase:function(){e=s+o.options.step},decrease_fast:function(){e=s-10*o.options.step},increase_fast:function(){e=s+10*o.options.step},min:function(){e=o.options.start},max:function(){e=o.options.end},handled:function(){t.preventDefault(),o._setHandlePos(i,e)}})})}},{key:"_destroy",value:function(){this.handles.off(".zf.slider"),this.inputs.off(".zf.slider"),this.$element.off(".zf.slider"),clearTimeout(this.timeout)}}]),i}();function z(t,e){return t/e}function v(t,e,i,n){return Math.abs(t.position()[e]+t[n]()/2-i)}f.defaults={start:0,end:100,step:1,initialStart:0,initialEnd:100,binding:!1,clickSelect:!0,vertical:!1,draggable:!0,disabled:!1,doubleSided:!1,decimal:2,moveTime:200,disabledClass:"disabled",invertVertical:!1,changedDelay:500,nonLinearBase:5,positionValueFunction:"linear"}},"./js/foundation.util.triggers.js":function(t,e,i){"use strict";i.r(e),i.d(e,"Triggers",function(){return d});var n=i("jquery"),o=i.n(n),s=i("./foundation.core"),r=i("./foundation.util.motion");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(e,i){e.data(i).split(" ").forEach(function(t){o()("#".concat(t))["close"===i?"trigger":"triggerHandler"]("".concat(i,".zf.trigger"),[e])})}var u=function(){for(var t=["WebKit","Moz","O","Ms",""],e=0;e<t.length;e++)if("".concat(t[e],"MutationObserver")in window)return window["".concat(t[e],"MutationObserver")];return!1}(),d={Listeners:{Basic:{},Global:{}},Initializers:{}};function c(e,t,i){var n,s=Array.prototype.slice.call(arguments,3);o()(window).off(t).on(t,function(t){n&&clearTimeout(n),n=setTimeout(function(){i.apply(null,s)},e||10)})}d.Listeners.Basic={openListener:function(){l(o()(this),"open")},closeListener:function(){o()(this).data("close")?l(o()(this),"close"):o()(this).trigger("close.zf.trigger")},toggleListener:function(){o()(this).data("toggle")?l(o()(this),"toggle"):o()(this).trigger("toggle.zf.trigger")},closeableListener:function(t){var e=o()(this).data("closable");t.stopPropagation(),""!==e?r.Motion.animateOut(o()(this),e,function(){o()(this).trigger("closed.zf")}):o()(this).fadeOut().trigger("closed.zf")},toggleFocusListener:function(){var t=o()(this).data("toggle-focus");o()("#".concat(t)).triggerHandler("toggle.zf.trigger",[o()(this)])}},d.Initializers.addOpenListener=function(t){t.off("click.zf.trigger",d.Listeners.Basic.openListener),t.on("click.zf.trigger","[data-open]",d.Listeners.Basic.openListener)},d.Initializers.addCloseListener=function(t){t.off("click.zf.trigger",d.Listeners.Basic.closeListener),t.on("click.zf.trigger","[data-close]",d.Listeners.Basic.closeListener)},d.Initializers.addToggleListener=function(t){t.off("click.zf.trigger",d.Listeners.Basic.toggleListener),t.on("click.zf.trigger","[data-toggle]",d.Listeners.Basic.toggleListener)},d.Initializers.addCloseableListener=function(t){t.off("close.zf.trigger",d.Listeners.Basic.closeableListener),t.on("close.zf.trigger","[data-closeable], [data-closable]",d.Listeners.Basic.closeableListener)},d.Initializers.addToggleFocusListener=function(t){t.off("focus.zf.trigger blur.zf.trigger",d.Listeners.Basic.toggleFocusListener),t.on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",d.Listeners.Basic.toggleFocusListener)},d.Listeners.Global={resizeListener:function(t){u||t.each(function(){o()(this).triggerHandler("resizeme.zf.trigger")}),t.attr("data-events","resize")},scrollListener:function(t){u||t.each(function(){o()(this).triggerHandler("scrollme.zf.trigger")}),t.attr("data-events","scroll")},closeMeListener:function(t,e){var i=t.namespace.split(".")[0];o()("[data-".concat(i,"]")).not('[data-yeti-box="'.concat(e,'"]')).each(function(){var t=o()(this);t.triggerHandler("close.zf.trigger",[t])})}},d.Initializers.addClosemeListener=function(t){var e=o()("[data-yeti-box]"),i=["dropdown","tooltip","reveal"];if(t&&("string"==typeof t?i.push(t):"object"===a(t)&&"string"==typeof t[0]?i=i.concat(t):console.error("Plugin names must be strings")),e.length){var n=i.map(function(t){return"closeme.zf.".concat(t)}).join(" ");o()(window).off(n).on(n,d.Listeners.Global.closeMeListener)}},d.Initializers.addResizeListener=function(t){var e=o()("[data-resize]");e.length&&c(t,"resize.zf.trigger",d.Listeners.Global.resizeListener,e)},d.Initializers.addScrollListener=function(t){var e=o()("[data-scroll]");e.length&&c(t,"scroll.zf.trigger",d.Listeners.Global.scrollListener,e)},d.Initializers.addMutationEventsListener=function(t){if(!u)return!1;function e(t){var e=o()(t[0].target);switch(t[0].type){case"attributes":"scroll"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("scrollme.zf.trigger",[e,window.pageYOffset]),"resize"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("resizeme.zf.trigger",[e]),"style"===t[0].attributeName&&(e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]));break;case"childList":e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]);break;default:return!1}}var i=t.find("[data-resize], [data-scroll], [data-mutate]");if(i.length)for(var n=0;n<=i.length-1;n++){new u(e).observe(i[n],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})}},d.Initializers.addSimpleListeners=function(){var t=o()(document);d.Initializers.addOpenListener(t),d.Initializers.addCloseListener(t),d.Initializers.addToggleListener(t),d.Initializers.addCloseableListener(t),d.Initializers.addToggleFocusListener(t)},d.Initializers.addGlobalListeners=function(){var t=o()(document);d.Initializers.addMutationEventsListener(t),d.Initializers.addResizeListener(),d.Initializers.addScrollListener(),d.Initializers.addClosemeListener()},d.init=function(t,e){Object(s.onLoad)(t(window),function(){!0!==t.triggersInitialized&&(d.Initializers.addSimpleListeners(),d.Initializers.addGlobalListeners(),t.triggersInitialized=!0)}),e&&(e.Triggers=d,e.IHearYou=d.Initializers.addGlobalListeners)}},15:function(t,e,i){t.exports=i("./js/entries/plugins/foundation.slider.js")},jquery:function(t,e){t.exports=r}},a.c=u,a.d=function(t,e,i){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(i,n,function(t){return e[t]}.bind(null,n));return i},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=15);function a(t){if(u[t])return u[t].exports;var e=u[t]={i:t,l:!1,exports:{}};return l[t].call(e.exports,e,e.exports,a),e.l=!0,e.exports}var l,u});
+((t,e)=>{"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./foundation.core"),require("jquery"),require("./foundation.util.keyboard"),require("./foundation.util.motion"),require("./foundation.util.touch")):"function"==typeof define&&define.amd?define(["./foundation.core","jquery","./foundation.util.keyboard","./foundation.util.motion","./foundation.util.touch"],e):"object"==typeof exports?exports.__FOUNDATION_EXTERNAL__=e(require("./foundation.core"),require("jquery"),require("./foundation.util.keyboard"),require("./foundation.util.motion"),require("./foundation.util.touch")):(t.__FOUNDATION_EXTERNAL__=t.__FOUNDATION_EXTERNAL__||{},t.__FOUNDATION_EXTERNAL__["foundation.slider"]=e(t.__FOUNDATION_EXTERNAL__["foundation.core"],t.jQuery,t.__FOUNDATION_EXTERNAL__["foundation.util.keyboard"],t.__FOUNDATION_EXTERNAL__["foundation.util.motion"],t.__FOUNDATION_EXTERNAL__["foundation.util.touch"]))})(self,function(e,i,n,o,s){return a={"./js/foundation.slider.js":function(t,e,i){i.r(e),i.d(e,{Slider:function(){return n}});var e=i("jquery"),u=i.n(e),r=i("./foundation.util.keyboard"),h=i("./foundation.util.motion"),d=i("./foundation.core"),o=i("./foundation.util.touch"),s=i("./js/foundation.util.triggers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=a(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0===i)return("string"===e?String:Number)(t);if("object"!=a(i=i.call(t,e||"default")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==a(t)?t:t+""))(n.key),n)}}function c(t,e,i){e=p(e);var n=t,e=f()?Reflect.construct(e,i||[],p(t).constructor):e.apply(t,i);if(!e||"object"!=a(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t,e){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var n=(t=>{function i(){var t=this,e=i;if(t instanceof e)return c(this,i,arguments);throw new TypeError("Cannot call a class as a function")}var e,n=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&g(n,t),n=i,(t=[{key:"_setup",value:function(t,e){this.$element=t,this.options=u().extend({},i.defaults,this.$element.data(),e),this.className="Slider",this.initialized=!1,o.Touch.init(u()),s.Triggers.init(u()),this._init(),r.Keyboard.register("Slider",{ltr:{ARROW_RIGHT:"increase",ARROW_UP:"increase",ARROW_DOWN:"decrease",ARROW_LEFT:"decrease",SHIFT_ARROW_RIGHT:"increaseFast",SHIFT_ARROW_UP:"increaseFast",SHIFT_ARROW_DOWN:"decreaseFast",SHIFT_ARROW_LEFT:"decreaseFast",HOME:"min",END:"max"},rtl:{ARROW_LEFT:"increase",ARROW_RIGHT:"decrease",SHIFT_ARROW_LEFT:"increaseFast",SHIFT_ARROW_RIGHT:"decreaseFast"}})}},{key:"_init",value:function(){this.inputs=this.$element.find("input"),this.handles=this.$element.find("[data-slider-handle]"),this.$handle=this.handles.eq(0),this.$input=this.inputs.length?this.inputs.eq(0):u()("#".concat(this.$handle.attr("aria-controls"))),this.$fill=this.$element.find("[data-slider-fill]").css(this.options.vertical?"height":"width",0),(this.options.disabled||this.$element.hasClass(this.options.disabledClass))&&(this.options.disabled=!0,this.$element.addClass(this.options.disabledClass)),this.inputs.length||(this.inputs=u()().add(this.$input),this.options.binding=!0),this._setInitAttr(0),this.handles[1]&&(this.options.doubleSided=!0,this.$handle2=this.handles.eq(1),this.$input2=1<this.inputs.length?this.inputs.eq(1):u()("#".concat(this.$handle2.attr("aria-controls"))),this.inputs[1]||(this.inputs=this.inputs.add(this.$input2)),this._setInitAttr(1)),this.setHandles(),this._events(),this.initialized=!0}},{key:"setHandles",value:function(){var t=this;this.handles[1]?this._setHandlePos(this.$handle,this.inputs.eq(0).val(),function(){t._setHandlePos(t.$handle2,t.inputs.eq(1).val())}):this._setHandlePos(this.$handle,this.inputs.eq(0).val())}},{key:"_reflow",value:function(){this.setHandles()}},{key:"_pctOfBar",value:function(t){var e=m(t-this.options.start,this.options.end-this.options.start);switch(this.options.positionValueFunction){case"pow":e=this._logTransform(e);break;case"log":e=this._powTransform(e)}return e.toFixed(2)}},{key:"_value",value:function(t){switch(this.options.positionValueFunction){case"pow":t=this._powTransform(t);break;case"log":t=this._logTransform(t)}var e=this.options.vertical?parseFloat(this.options.end)+t*(this.options.start-this.options.end):(this.options.end-this.options.start)*t+parseFloat(this.options.start);return e}},{key:"_logTransform",value:function(t){return e=this.options.nonLinearBase,t=t*(this.options.nonLinearBase-1)+1,Math.log(t)/Math.log(e);var e}},{key:"_powTransform",value:function(t){return(Math.pow(this.options.nonLinearBase,t)-1)/(this.options.nonLinearBase-1)}},{key:"_setHandlePos",value:function(t,e,i){var n,o,s,r,a,l,u,d,c,f;this.$element.hasClass(this.options.disabledClass)||((e=parseFloat(e))<this.options.start?e=this.options.start:e>this.options.end&&(e=this.options.end),(u=this.options.doubleSided)&&(e=0===this.handles.index(t)?(d=parseFloat(this.$handle2.attr("aria-valuenow")))<=e?d-this.options.step:e:e<=(d=parseFloat(this.$handle.attr("aria-valuenow")))?d+this.options.step:e),d=(n=this).options.vertical,o=d?"height":"width",s=d?"top":"left",d=t[0].getBoundingClientRect()[o],f=this.$element[0].getBoundingClientRect()[o],r=this._pctOfBar(e),a=((f-d)*r/f*100).toFixed(this.options.decimal),e=parseFloat(e.toFixed(this.options.decimal)),l={},this._setValues(t,e),u&&(e=0===this.handles.index(t),u=Math.floor(d/f*100),e?(l[s]="".concat(a,"%"),c=parseFloat(this.$handle2[0].style[s])-a+u,i&&"function"==typeof i&&i()):(d=parseFloat(this.$handle[0].style[s]),c=a-(isNaN(d)?(this.options.initialStart-this.options.start)/((this.options.end-this.options.start)/100):d)+u),l["min-".concat(o)]="".concat(c,"%")),f=this.$element.data("dragging")?1e3/60:this.options.moveTime,(0,h.Move)(f,t,function(){isNaN(a)?t.css(s,"".concat(100*r,"%")):t.css(s,"".concat(a,"%")),n.options.doubleSided?n.$fill.css(l):n.$fill.css(o,"".concat(100*r,"%"))}),this.initialized&&(this.$element.one("finished.zf.animate",function(){n.$element.trigger("moved.zf.slider",[t])}),clearTimeout(n.timeout),n.timeout=setTimeout(function(){n.$element.trigger("changed.zf.slider",[t])},n.options.changedDelay)))}},{key:"_setInitAttr",value:function(t){var e=0===t?this.options.initialStart:this.options.initialEnd,i=this.inputs.eq(t).attr("id")||(0,d.GetYoDigits)(6,"slider");this.inputs.eq(t).attr({id:i,max:this.options.end,min:this.options.start,step:this.options.step}),this.inputs.eq(t).val(e),this.handles.eq(t).attr({role:"slider","aria-controls":i,"aria-valuemax":this.options.end,"aria-valuemin":this.options.start,"aria-valuenow":e,"aria-orientation":this.options.vertical?"vertical":"horizontal",tabindex:0})}},{key:"_setValues",value:function(t,e){var i=this.options.doubleSided?this.handles.index(t):0;this.inputs.eq(i).val(e),t.attr("aria-valuenow",e)}},{key:"_handleEvent",value:function(t,e,i){var n,o,s,r,a,l;i?l=this._adjustValue(null,i):(t.preventDefault(),n=(i=this.options.vertical)?"height":"width",o=i?"top":"left",s=i?t.pageY:t.pageX,r=this.$element[0].getBoundingClientRect()[n],i=i?u()(window).scrollTop():u()(window).scrollLeft(),a=this.$element.offset()[o],t.clientY===t.pageY&&(s+=i),l=this._value((i=(t=s-a)<0?0:r<t?r:t)/r),(0,d.rtl)()&&!this.options.vertical&&(l=this.options.end-l),l=this._adjustValue(null,l),e=e||(v(this.$handle,o,i,n)<=v(this.$handle2,o,i,n)?this.$handle:this.$handle2)),this._setHandlePos(e,l)}},{key:"_adjustValue",value:function(t,e){var i=this.options.step,n=parseFloat(i/2),t=t?parseFloat(t.attr("aria-valuenow")):e,e=0<=t?t%i:i+t%i,o=t-e;return t=0!==e?o+n<=t?o+i:o:t}},{key:"_events",value:function(){this._eventsForHandle(this.$handle),this.handles[1]&&this._eventsForHandle(this.$handle2)}},{key:"_eventsForHandle",value:function(o){function e(t){var e=s.inputs.index(u()(this));s._handleEvent(t,s.handles.eq(e),u()(this).val())}var i,n,s=this;this.inputs.off("keyup.zf.slider").on("keyup.zf.slider",function(t){13===t.keyCode&&e.call(this,t)}),this.inputs.off("change.zf.slider").on("change.zf.slider",e),this.options.clickSelect&&this.$element.off("click.zf.slider").on("click.zf.slider",function(t){if(s.$element.data("dragging"))return!1;u()(t.target).is("[data-slider-handle]")||(s.options.doubleSided?s._handleEvent(t):s._handleEvent(t,s.$handle))}),this.options.draggable&&(this.handles.addTouch(),n=u()("body"),o.off("mousedown.zf.slider").on("mousedown.zf.slider",function(t){o.addClass("is-dragging"),s.$fill.addClass("is-dragging"),s.$element.data("dragging",!0),i=u()(t.currentTarget),n.on("mousemove.zf.slider",function(t){t.preventDefault(),s._handleEvent(t,i)}).on("mouseup.zf.slider",function(t){s._handleEvent(t,i),o.removeClass("is-dragging"),s.$fill.removeClass("is-dragging"),s.$element.data("dragging",!1),n.off("mousemove.zf.slider mouseup.zf.slider")})}).on("selectstart.zf.slider touchmove.zf.slider",function(t){t.preventDefault()})),o.off("keydown.zf.slider").on("keydown.zf.slider",function(t){var e,i=u()(this),n=(s.options.doubleSided&&s.handles.index(i),parseFloat(o.attr("aria-valuenow")));r.Keyboard.handleKey(t,"Slider",{decrease:function(){e=n-s.options.step},increase:function(){e=n+s.options.step},decreaseFast:function(){e=n-10*s.options.step},increaseFast:function(){e=n+10*s.options.step},min:function(){e=s.options.start},max:function(){e=s.options.end},handled:function(){t.preventDefault(),s._setHandlePos(i,e)}})})}},{key:"_destroy",value:function(){this.handles.off(".zf.slider"),this.inputs.off(".zf.slider"),this.$element.off(".zf.slider"),clearTimeout(this.timeout)}}])&&l(n.prototype,t),e&&l(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n})(d.Plugin);function m(t,e){return t/e}function v(t,e,i,n){return Math.abs(t.position()[e]+t[n]()/2-i)}n.defaults={start:0,end:100,step:1,initialStart:0,initialEnd:100,binding:!1,clickSelect:!0,vertical:!1,draggable:!0,disabled:!1,doubleSided:!1,decimal:2,moveTime:200,disabledClass:"disabled",invertVertical:!1,changedDelay:500,nonLinearBase:5,positionValueFunction:"linear"}},"./js/foundation.util.triggers.js":function(t,e,i){i.r(e),i.d(e,{Triggers:function(){return u}});var e=i("jquery"),s=i.n(e),n=i("./foundation.core"),o=i("./foundation.util.motion");function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(e,i){e.data(i).split(" ").forEach(function(t){s()("#".concat(t))["close"===i?"trigger":"triggerHandler"]("".concat(i,".zf.trigger"),[e])})}var l=(()=>{for(var t=["WebKit","Moz","O","Ms",""],e=0;e<t.length;e++)if("".concat(t[e],"MutationObserver")in window)return window["".concat(t[e],"MutationObserver")];return!1})(),u={Listeners:{Basic:{},Global:{}},Initializers:{}};function d(t,e,i){var n,o=Array.prototype.slice.call(arguments,3);s()(window).on(e,function(){n&&clearTimeout(n),n=setTimeout(function(){i.apply(null,o)},t||10)})}u.Listeners.Basic={openListener:function(){a(s()(this),"open")},closeListener:function(){s()(this).data("close")?a(s()(this),"close"):s()(this).trigger("close.zf.trigger")},toggleListener:function(){s()(this).data("toggle")?a(s()(this),"toggle"):s()(this).trigger("toggle.zf.trigger")},closeableListener:function(t){var e=s()(this).data("closable");t.stopPropagation(),""!==e?o.Motion.animateOut(s()(this),e,function(){s()(this).trigger("closed.zf")}):s()(this).fadeOut().trigger("closed.zf")},toggleFocusListener:function(){var t=s()(this).data("toggle-focus");s()("#".concat(t)).triggerHandler("toggle.zf.trigger",[s()(this)])}},u.Initializers.addOpenListener=function(t){t.off("click.zf.trigger",u.Listeners.Basic.openListener),t.on("click.zf.trigger","[data-open]",u.Listeners.Basic.openListener)},u.Initializers.addCloseListener=function(t){t.off("click.zf.trigger",u.Listeners.Basic.closeListener),t.on("click.zf.trigger","[data-close]",u.Listeners.Basic.closeListener)},u.Initializers.addToggleListener=function(t){t.off("click.zf.trigger",u.Listeners.Basic.toggleListener),t.on("click.zf.trigger","[data-toggle]",u.Listeners.Basic.toggleListener)},u.Initializers.addCloseableListener=function(t){t.off("close.zf.trigger",u.Listeners.Basic.closeableListener),t.on("close.zf.trigger","[data-closeable], [data-closable]",u.Listeners.Basic.closeableListener)},u.Initializers.addToggleFocusListener=function(t){t.off("focus.zf.trigger blur.zf.trigger",u.Listeners.Basic.toggleFocusListener),t.on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",u.Listeners.Basic.toggleFocusListener)},u.Listeners.Global={resizeListener:function(t){l||t.each(function(){s()(this).triggerHandler("resizeme.zf.trigger")}),t.attr("data-events","resize")},scrollListener:function(t){l||t.each(function(){s()(this).triggerHandler("scrollme.zf.trigger")}),t.attr("data-events","scroll")},closeMeListener:function(t,e){t=t.namespace.split(".")[0];s()("[data-".concat(t,"]")).not('[data-yeti-box="'.concat(e,'"]')).each(function(){var t=s()(this);t.triggerHandler("close.zf.trigger",[t])})}},u.Initializers.addClosemeListener=function(t){var e=s()("[data-yeti-box]"),i=["dropdown","tooltip","reveal"];t&&("string"==typeof t?i.push(t):"object"===r(t)&&"string"==typeof t[0]?i=i.concat(t):console.error("Plugin names must be strings")),e.length&&(t=i.map(function(t){return"closeme.zf.".concat(t)}).join(" "),s()(window).off(t).on(t,u.Listeners.Global.closeMeListener))},u.Initializers.addResizeListener=function(t){var e=s()("[data-resize]");e.length&&d(t,"resize.zf.trigger",u.Listeners.Global.resizeListener,e)},u.Initializers.addScrollListener=function(t){var e=s()("[data-scroll]");e.length&&d(t,"scroll.zf.trigger",u.Listeners.Global.scrollListener,e)},u.Initializers.addMutationEventsListener=function(t){if(!l)return!1;function e(t){var e=s()(t[0].target);switch(t[0].type){case"attributes":"scroll"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("scrollme.zf.trigger",[e,window.pageYOffset]),"resize"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("resizeme.zf.trigger",[e]),"style"===t[0].attributeName&&(e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]));break;case"childList":e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]);break;default:return!1}}var i=t.find("[data-resize], [data-scroll], [data-mutate]");if(i.length)for(var n=0;n<=i.length-1;n++)new l(e).observe(i[n],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})},u.Initializers.addSimpleListeners=function(){var t=s()(document);u.Initializers.addOpenListener(t),u.Initializers.addCloseListener(t),u.Initializers.addToggleListener(t),u.Initializers.addCloseableListener(t),u.Initializers.addToggleFocusListener(t)},u.Initializers.addGlobalListeners=function(){var t=s()(document);u.Initializers.addMutationEventsListener(t),u.Initializers.addResizeListener(250),u.Initializers.addScrollListener(),u.Initializers.addClosemeListener()},u.init=function(t,e){(0,n.onLoad)(s()(window),function(){!0!==s().triggersInitialized&&(u.Initializers.addSimpleListeners(),u.Initializers.addGlobalListeners(),s().triggersInitialized=!0)}),e&&(e.Triggers=u,e.IHearYou=u.Initializers.addGlobalListeners)}},"./foundation.core":function(t){t.exports=e},"./foundation.util.keyboard":function(t){t.exports=n},"./foundation.util.motion":function(t){t.exports=o},"./foundation.util.touch":function(t){t.exports=s},jquery:function(t){t.exports=i}},l={},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},d={},(r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(d),r.d(d,{Foundation:function(){return t.Foundation},Slider:function(){return u.Slider}}),t=r("./foundation.core"),u=r("./js/foundation.slider.js"),t.Foundation.plugin(u.Slider,"Slider"),d;function r(t){var e=l[t];return void 0!==e||(e=l[t]={exports:{}},a[t](e,e.exports,r)),e.exports}var a,l,t,u,d});