/* * # Fomantic UI - 2.9.3 * https://github.com/fomantic/Fomantic-UI * https://fomantic-ui.com/ * * Copyright 2023 Contributors * Released under the MIT license * https://opensource.org/licenses/MIT * */ !function(X,t,n){"use strict";t=void 0!==t&&t.Math===Math?t:globalThis,X.fn.slider=function(D){var S,e=X(this),A=X(n),F=X(t),O=Date.now(),j=[],I=D,z="string"==typeof I,N=[].slice.call(arguments,1),B=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],U=0;return e.each(function(){var l,r,s,u,e,d,c,t,m,g,v,f,o,b,i,h,p=X.isPlainObject(D)?X.extend(!0,{},X.fn.slider.settings,D):X.extend({},X.fn.slider.settings),n=p.className,a=p.metadata,V=p.namespace,k=p.error,T=p.keys,w=p.interpretLabel,y=!1,x="."+V,M="module-"+V,R=X(this),C=this,P=R.data(M),L=1,E={initialize:function(){E.debug("Initializing slider",p),h=!0,t=U+=1,E.setup.layout(),E.setup.labels(),E.bind.events(),E.read.metadata(),E.read.settings(),h=!1,E.instantiate()},instantiate:function(){E.verbose("Storing instance of slider",E),P=E,R.data(M,E)},destroy:function(){E.verbose("Destroying previous slider for",R),clearInterval(P.interval),E.unbind.events(),E.unbind.slidingEvents(),R.removeData(M),P=void 0},setup:{layout:function(){void 0===R.attr("tabindex")&&R.attr("tabindex",0),0===R.find(".inner").length&&R.append('
'),o=E.get.precision(),s=R.find(".thumb:not(.second)"),p.showThumbTooltip&&s.attr("data-position",p.tooltipConfig.position).attr("data-variation",p.tooltipConfig.variation),l=s,E.is.range()&&(0===R.find(".thumb.second").length&&R.find(".inner").append('
'),u=R.find(".thumb.second"),p.showThumbTooltip&&u.attr("data-position",p.tooltipConfig.position).attr("data-variation",p.tooltipConfig.variation)),e=R.find(".track"),d=R.find(".track-fill"),f=s.width()/2},labels:function(){E.is.labeled()&&(0<(c=R.find(".labels:not(.auto)")).length?E.setup.customLabel():E.setup.autoLabel(),p.showLabelTicks&&R.addClass(n.ticked))},customLabel:function(){var n,e=c.find(".label"),a=e.length,o=E.get.min(),i=E.get.max();e.each(function(e){var t=X(this).attr("data-value");n=t?((t=i').find(".labels");for(var e=0,t=E.get.numLabels();e<=t;e++){var n=E.get.label(e),a=0===p.restrictedLabels.length||0<=p.restrictedLabels.indexOf(n),a=""===n||!a&&"always"!==p.showLabelTicks?null:e%E.get.gapRatio()?X('
  • '):X('
  • '+(a?n:"")+"
  • ");a&&(E.update.labelPosition(e/t,a),c.append(a))}}},bind:{events:function(){E.bind.globalKeyboardEvents(),E.bind.keyboardEvents(),E.bind.mouseEvents(),p.autoAdjustLabels&&E.bind.windowEvents()},keyboardEvents:function(){E.verbose("Binding keyboard events"),R.on("keydown"+x,E.event.keydown)},globalKeyboardEvents:function(){A.on("keydown"+x+t,E.event.activateFocus)},mouseEvents:function(){E.verbose("Binding mouse and touch events"),R.find(".track, .thumb, .inner").on("mousedown"+x,function(e){e.stopImmediatePropagation(),e.preventDefault(),E.event.down(e)}),R.on("mousedown"+x,E.event.down),R.on("mouseenter"+x,function(e){y=!0}),R.on("mouseleave"+x,function(e){y=!1}),R.find(".thumb").on("touchstart"+x,E.event.touchDown).on("touchmove"+x,E.event.move).on("touchend"+x,E.event.up).on("touchcancel"+x,E.event.touchCancel)},slidingEvents:function(){E.verbose("Binding page wide events while handle is being draged"),A.on("mousemove"+x,E.event.move),A.on("mouseup"+x,E.event.up)},windowEvents:function(){F.on("resize"+x,E.event.resize)}},unbind:{events:function(){R.find(".track, .thumb, .inner").off("mousedown"+x),R.off("mousedown"+x),R.off("mouseenter"+x),R.off("mouseleave"+x),R.find(".thumb").off("touchstart"+x).off("touchmove"+x).off("touchend"+x).off("touchcancel"+x),R.off("keydown"+x),R.off("focusout"+x),A.off("keydown"+x+t,E.event.activateFocus),F.off("resize"+x)},slidingEvents:function(){A.off("mousemove"+x),A.off("mouseup"+x)}},event:{down:function(e){e.preventDefault(),E.is.range()?(e=E.determine.eventPos(e),e=E.determine.pos(e),l=p.preventCrossover&&E.is.range()&&E.thumbVal===E.secondThumbVal?void(i=e):E.determine.closestThumb(e),void 0===b&&(b=E.get.currentThumbValue())):void 0===b&&(b=E.get.value()),E.is.disabled()||E.bind.slidingEvents()},touchDown:function(e){e.preventDefault(),e.stopImmediatePropagation(),void 0===r&&(l=X(e.target),e=e.touches?e:e.originalEvent,r=e.targetTouches[0].identifier,void 0===b&&(b=E.get.currentThumbValue()))},move:function(e){if("mousemove"===e.type&&e.preventDefault(),!E.is.disabled()){var t=E.determine.valueFromEvent(e);if("mousemove"===e.type&&void 0===l&&(n=E.determine.eventPos(e),n=E.determine.pos(n),l=np.maxRange||p.preventCrossover&&!a&&t>E.secondThumbVal||p.preventCrossover&&a&&tp.maxRange&&(e=E.get.edgeValue(e,p.maxRange))),E.set.value(e),E.unbind.slidingEvents(),(r=void 0)!==b&&(b=void 0))},touchCancel:function(e){e.preventDefault(),(r=void 0)!==b&&(E.update.value(b),b=void 0)},keydown:function(e,t){if(!E.is.disabled()&&(p.preventCrossover&&E.is.range()&&E.thumbVal===E.secondThumbVal&&(l=void 0),E.is.focused()&&A.trigger(e),t||E.is.focused())){t=E.determine.keyMovement(e);if(0!==t)switch(e.preventDefault(),t){case 1:E.takeStep();break;case 2:E.takeStep(E.get.multiplier());break;case-1:E.backStep();break;case-2:E.backStep(E.get.multiplier())}}},activateFocus:function(e){E.is.disabled()||E.is.focused()||!E.is.hover()||0===E.determine.keyMovement(e)||(e.preventDefault(),E.event.keydown(e,!0),R.trigger("focus"))},resize:function(e){L!==E.get.gapRatio()&&(E.setup.labels(),L=E.get.gapRatio())}},resync:function(){E.verbose("Resyncing thumb position based on value"),E.is.range()&&E.update.position(E.secondThumbVal,u),E.update.position(E.thumbVal,s),E.setup.labels()},takeStep:function(e){e=e||1;var t=E.get.step(),n=E.get.currentThumbValue();E.verbose("Taking a step"),0e?E.secondThumbVal-e:e-E.secondThumbVal;return e},edgeValue:function(e,t){return e=l.hasClass("second")?E.thumbValE.get.trackOffset()+E.get.trackLength()?E.is.reversed()?E.get.min():E.get.max():E.determine.value(t);return e},smoothValueFromEvent:function(e){var t=E.get.min(),n=E.get.max(),a=E.get.trackLength(),e=E.determine.eventPos(e)-E.get.trackOffset(),e=(e=e<0?0:ap.maxRange||p.minRange&&p.maxRange&&p.minRange>p.maxRange)&&E.error(k.invalidRanges,p.start,p.end,p.minRange,p.maxRange),E.debug("Start position set from settings",p.start,p.end),E.set.rangeValue(p.start,p.end)):(E.debug("Start position set from settings",p.start),E.set.value(p.start)))}},setting:function(e,t){if(E.debug("Changing setting",e,t),X.isPlainObject(e))X.extend(!0,p,e);else{if(void 0===t)return p[e];X.isPlainObject(p[e])?X.extend(!0,p[e],t):p[e]=t}},internal:function(e,t){if(X.isPlainObject(e))X.extend(!0,E,e);else{if(void 0===t)return E[e];E[e]=t}},debug:function(){!p.silent&&p.debug&&(p.performance?E.performance.log(arguments):(E.debug=Function.prototype.bind.call(console.info,console,p.name+":"),E.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?E.performance.log(arguments):(E.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),E.verbose.apply(console,arguments)))},error:function(){p.silent||(E.error=Function.prototype.bind.call(console.error,console,p.name+":"),E.error.apply(console,arguments))},performance:{log:function(e){var t,n;p.performance&&(n=(t=Date.now())-(O||t),O=t,j.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":n})),clearTimeout(E.performance.timer),E.performance.timer=setTimeout(function(){E.performance.display()},500)},display:function(){var e=p.name+":",n=0;O=!1,clearTimeout(E.performance.timer),X.each(j,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",0