import{bt as qt,br as Xt,bu as Kt}from"./BDl4c6dV.js";import{ap as Zt}from"./DGQDO-VU.js";var lt={exports:{}};const Yt=qt(Zt);(function(ut,Qt){(function(J,$){ut.exports=$(Yt)})(typeof self<"u"?self:Kt,function(J){return function(){var $={388:function(f,y){var c,i,g;(function(D,x){i=[],c=x,g=typeof c=="function"?c.apply(y,i):c,g===void 0||(f.exports=g)})(typeof self<"u"&&self,function(){function D(){var x=Object.getOwnPropertyDescriptor(document,"currentScript");if(!x&&"currentScript"in document&&document.currentScript||x&&x.get!==D&&document.currentScript)return document.currentScript;try{throw new Error}catch(V){var z,M,T,U=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,R=/@([^@]*):(\d+):(\d+)\s*$/gi,w=U.exec(V.stack)||R.exec(V.stack),A=w&&w[1]||!1,_=w&&w[2]||!1,H=document.location.href.replace(document.location.hash,""),S=document.getElementsByTagName("script");A===H&&(z=document.documentElement.outerHTML,M=new RegExp("(?:[^\\n]+?\\n){0,"+(_-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),T=z.replace(M,"$1").trim());for(var d=0;d<S.length;d++)if(S[d].readyState==="interactive"||S[d].src===A||A===H&&S[d].innerHTML&&S[d].innerHTML.trim()===T)return S[d];return null}}return D})},831:function(f,y){y.Z=(c,i)=>{const g=c.__vccOpts||c;for(const[D,x]of i)g[D]=x;return g}},927:function(f){f.exports=J}},Q={};function k(f){var y=Q[f];if(y!==void 0)return y.exports;var c=Q[f]={exports:{}};return $[f].call(c.exports,c,c.exports,k),c.exports}(function(){k.d=function(f,y){for(var c in y)k.o(y,c)&&!k.o(f,c)&&Object.defineProperty(f,c,{enumerable:!0,get:y[c]})}})(),function(){k.o=function(f,y){return Object.prototype.hasOwnProperty.call(f,y)}}(),function(){k.p=""}();var N={};return function(){if(k.d(N,{default:function(){return $t}}),typeof window<"u"){var f=window.document.currentScript,y=k(388);f=y(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:y});var c=f&&f.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);c&&(k.p=c[1])}var i=k(927);function g(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var D={key:0,class:"vue-slider-marks"};function x(t,e,r,n,o,a){var s=(0,i.resolveComponent)("vue-slider-mark"),p=(0,i.resolveComponent)("vue-slider-dot");return(0,i.openBlock)(),(0,i.createElementBlock)("div",(0,i.mergeProps)({ref:"container",class:t.containerClasses,style:t.containerStyles,onClick:e[2]||(e[2]=function(){return t.clickHandle&&t.clickHandle.apply(t,arguments)}),onTouchstartPassive:e[3]||(e[3]=function(){return t.dragStartOnProcess&&t.dragStartOnProcess.apply(t,arguments)}),onMousedownPassive:e[4]||(e[4]=function(){return t.dragStartOnProcess&&t.dragStartOnProcess.apply(t,arguments)})},t.$attrs),[(0,i.createElementVNode)("div",{class:"vue-slider-rail",style:(0,i.normalizeStyle)(t.railStyle)},[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(t.processArray,function(l,h){return(0,i.renderSlot)(t.$slots,"process",(0,i.normalizeProps)((0,i.guardReactiveProps)(l)),function(){return[((0,i.openBlock)(),(0,i.createElementBlock)("div",{class:"vue-slider-process",key:"process-".concat(h),style:(0,i.normalizeStyle)(l.style)},null,4))]})}),256)),t.sliderMarks&&t.control?((0,i.openBlock)(),(0,i.createElementBlock)("div",D,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(t.control.markList,function(l,h){return(0,i.renderSlot)(t.$slots,"mark",(0,i.normalizeProps)((0,i.guardReactiveProps)(l)),function(){var v;return[((0,i.openBlock)(),(0,i.createBlock)(s,{key:"mark-".concat(h),mark:l,hideLabel:t.hideLabel,style:(0,i.normalizeStyle)((v={},g(v,t.isHorizontal?"height":"width","100%"),g(v,t.isHorizontal?"width":"height",t.tailSize),g(v,t.mainDirection,"".concat(l.pos,"%")),v)),stepStyle:t.stepStyle,stepActiveStyle:t.stepActiveStyle,labelStyle:t.labelStyle,labelActiveStyle:t.labelActiveStyle,onPressLabel:e[0]||(e[0]=function(B){return t.clickable&&t.setValueByPos(B)})},{step:(0,i.withCtx)(function(){return[(0,i.renderSlot)(t.$slots,"step",(0,i.normalizeProps)((0,i.guardReactiveProps)(l)))]}),label:(0,i.withCtx)(function(){return[(0,i.renderSlot)(t.$slots,"label",(0,i.normalizeProps)((0,i.guardReactiveProps)(l)))]}),_:2},1032,["mark","hideLabel","style","stepStyle","stepActiveStyle","labelStyle","labelActiveStyle"]))]})}),256))])):(0,i.createCommentVNode)("",!0),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(t.dots,function(l,h){var v;return(0,i.openBlock)(),(0,i.createBlock)(p,(0,i.mergeProps)({ref_for:!0,ref:"dot-".concat(h),key:"dot-".concat(h),value:l.value,disabled:l.disabled,focus:l.focus,"dot-style":[l.style,l.disabled?l.disabledStyle:null,l.focus?l.focusStyle:null],tooltip:l.tooltip||t.tooltip,"tooltip-style":[t.tooltipStyle,l.tooltipStyle,l.disabled?l.tooltipDisabledStyle:null,l.focus?l.tooltipFocusStyle:null],"tooltip-formatter":Array.isArray(t.sliderTooltipFormatter)?t.sliderTooltipFormatter[h]:t.sliderTooltipFormatter,"tooltip-placement":t.tooltipDirections[h],style:[t.dotBaseStyle,(v={},g(v,t.mainDirection,"".concat(l.pos,"%")),g(v,"transition","".concat(t.mainDirection," ").concat(t.animateTime,"s")),v)],onDragStart:function(){return t.dragStart(h)},role:"slider","aria-valuenow":l.value,"aria-valuemin":t.min,"aria-valuemax":t.max,"aria-orientation":t.isHorizontal?"horizontal":"vertical",tabindex:"0",onFocus:function(){return t.focus(l,h)},onBlur:e[1]||(e[1]=function(){return t.blur()})},t.dotAttrs),{dot:(0,i.withCtx)(function(){return[(0,i.renderSlot)(t.$slots,"dot",(0,i.normalizeProps)((0,i.guardReactiveProps)(l)))]}),tooltip:(0,i.withCtx)(function(){return[(0,i.renderSlot)(t.$slots,"tooltip",(0,i.normalizeProps)((0,i.guardReactiveProps)(l)))]}),_:2},1040,["value","disabled","focus","dot-style","tooltip","tooltip-style","tooltip-formatter","tooltip-placement","style","onDragStart","aria-valuenow","aria-valuemin","aria-valuemax","aria-orientation","onFocus"])}),128))],4),(0,i.renderSlot)(t.$slots,"default",{value:t.getValue()})],16)}var z=["aria-valuetext"],M={class:"vue-slider-dot-tooltip-text"};function T(t,e,r,n,o,a){var s;return(0,i.openBlock)(),(0,i.createElementBlock)("div",{ref:"dot",class:(0,i.normalizeClass)(t.dotClasses),"aria-valuetext":(s=t.tooltipValue)===null||s===void 0?void 0:s.toString(),onMousedownPassive:e[0]||(e[0]=function(){return t.dragStart&&t.dragStart.apply(t,arguments)}),onTouchstartPassive:e[1]||(e[1]=function(){return t.dragStart&&t.dragStart.apply(t,arguments)})},[(0,i.renderSlot)(t.$slots,"dot",{},function(){return[(0,i.createElementVNode)("div",{class:(0,i.normalizeClass)(t.handleClasses),style:(0,i.normalizeStyle)(t.dotStyle)},null,6)]}),t.tooltip!=="none"?((0,i.openBlock)(),(0,i.createElementBlock)("div",{key:0,class:(0,i.normalizeClass)(t.tooltipClasses)},[(0,i.renderSlot)(t.$slots,"tooltip",{},function(){return[(0,i.createElementVNode)("div",{class:(0,i.normalizeClass)(t.tooltipInnerClasses),style:(0,i.normalizeStyle)(t.tooltipStyle)},[(0,i.createElementVNode)("span",M,(0,i.toDisplayString)(t.tooltipValue),1)],6)]})],2)):(0,i.createCommentVNode)("",!0)],42,z)}var U=(0,i.defineComponent)({name:"VueSliderDot",emits:["drag-start"],props:{value:{type:[String,Number],default:0},tooltip:{type:String,required:!0},tooltipPlacement:{type:String,validator:function(t){return["top","right","bottom","left"].indexOf(t)>-1},required:!0},tooltipFormatter:{type:[String,Function]},focus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dotStyle:{type:Object},tooltipStyle:{type:Object}},computed:{dotClasses:function(){return["vue-slider-dot",{"vue-slider-dot-hover":this.tooltip==="hover"||this.tooltip==="active","vue-slider-dot-disabled":this.disabled,"vue-slider-dot-focus":this.focus}]},handleClasses:function(){return["vue-slider-dot-handle",{"vue-slider-dot-handle-disabled":this.disabled,"vue-slider-dot-handle-focus":this.focus}]},tooltipClasses:function(){return["vue-slider-dot-tooltip",["vue-slider-dot-tooltip-".concat(this.tooltipPlacement)],{"vue-slider-dot-tooltip-show":this.showTooltip}]},tooltipInnerClasses:function(){return["vue-slider-dot-tooltip-inner",["vue-slider-dot-tooltip-inner-".concat(this.tooltipPlacement)],{"vue-slider-dot-tooltip-inner-disabled":this.disabled,"vue-slider-dot-tooltip-inner-focus":this.focus}]},showTooltip:function(){switch(this.tooltip){case"always":return!0;case"none":return!1;case"focus":case"active":return!!this.focus;default:return!1}},tooltipValue:function(){return this.tooltipFormatter?typeof this.tooltipFormatter=="string"?this.tooltipFormatter.replace(/\{value\}/,String(this.value)):this.tooltipFormatter(this.value):this.value}},methods:{dragStart:function(){if(this.disabled)return!1;this.$emit("drag-start")}}}),R=k(831),A=(0,R.Z)(U,[["render",T]]);function _(t,e,r,n,o,a){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{class:(0,i.normalizeClass)(t.marksClasses)},[(0,i.renderSlot)(t.$slots,"step",{},function(){return[(0,i.createElementVNode)("div",{class:(0,i.normalizeClass)(t.stepClasses),style:(0,i.normalizeStyle)([t.stepStyle,t.mark.style||{},t.mark.active&&t.stepActiveStyle?t.stepActiveStyle:{},t.mark.active&&t.mark.activeStyle?t.mark.activeStyle:{}])},null,6)]}),t.hideLabel?(0,i.createCommentVNode)("",!0):(0,i.renderSlot)(t.$slots,"label",{key:0},function(){return[(0,i.createElementVNode)("div",{class:(0,i.normalizeClass)(t.labelClasses),style:(0,i.normalizeStyle)([t.labelStyle,t.mark.labelStyle||{},t.mark.active&&t.labelActiveStyle?t.labelActiveStyle:{},t.mark.active&&t.mark.labelActiveStyle?t.mark.labelActiveStyle:{}]),onClick:e[0]||(e[0]=function(){return t.labelClickHandle&&t.labelClickHandle.apply(t,arguments)})},(0,i.toDisplayString)(t.mark.label),7)]})],2)}var H=(0,i.defineComponent)({name:"VueSliderMark",emits:["press-label"],props:{mark:{type:Object,required:!0},hideLabel:{type:Boolean},stepStyle:{type:Object,default:function(){return{}}},stepActiveStyle:{type:Object,default:function(){return{}}},labelStyle:{type:Object,default:function(){return{}}},labelActiveStyle:{type:Object,default:function(){return{}}}},computed:{marksClasses:function(){return["vue-slider-mark",{"vue-slider-mark-active":this.mark.active}]},stepClasses:function(){return["vue-slider-mark-step",{"vue-slider-mark-step-active":this.mark.active}]},labelClasses:function(){return["vue-slider-mark-label",{"vue-slider-mark-label-active":this.mark.active}]}},methods:{labelClickHandle:function(t){t.stopPropagation(),this.$emit("press-label",this.mark.pos)}}});const S=(0,R.Z)(H,[["render",_]]);var d,V=S,j=function(t){return typeof t=="number"?"".concat(t,"px"):t},ct=function(t){var e=document.documentElement,r=document.body,n=t.getBoundingClientRect(),o={y:n.top+(window.pageYOffset||e.scrollTop)-(e.clientTop||r.clientTop||0),x:n.left+(window.pageXOffset||e.scrollLeft)-(e.clientLeft||r.clientLeft||0)};return o},dt=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o="targetTouches"in t?t.targetTouches[0]:t,a=ct(e),s={x:o.pageX-a.x,y:o.pageY-a.y};return{x:r?e.offsetWidth*n-s.x:s.x,y:r?e.offsetHeight*n-s.y:s.y}};(function(t){t[t.PAGE_UP=33]="PAGE_UP",t[t.PAGE_DOWN=34]="PAGE_DOWN",t[t.END=35]="END",t[t.HOME=36]="HOME",t[t.LEFT=37]="LEFT",t[t.UP=38]="UP",t[t.RIGHT=39]="RIGHT",t[t.DOWN=40]="DOWN"})(d||(d={}));var ht=function(t,e){if(e.hook){var r=e.hook(t);if(typeof r=="function")return r;if(!r)return null}switch(t.keyCode){case d.UP:return function(n){return e.direction==="ttb"?n-1:n+1};case d.RIGHT:return function(n){return e.direction==="rtl"?n-1:n+1};case d.DOWN:return function(n){return e.direction==="ttb"?n+1:n-1};case d.LEFT:return function(n){return e.direction==="rtl"?n+1:n-1};case d.END:return function(){return e.max};case d.HOME:return function(){return e.min};case d.PAGE_UP:return function(n){return n+10};case d.PAGE_DOWN:return function(n){return n-10};default:return null}};function ft(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function pt(t,e,r){return e&&mt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function yt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var E,b,P=function(){function t(e){ft(this,t),yt(this,"num",void 0),this.num=e}return pt(t,[{key:"decimal",value:function(e,r){var n=this.num,o=this.getDecimalLen(n),a=this.getDecimalLen(e),s=0;switch(r){case"+":s=this.getExponent(o,a),this.num=(this.safeRoundUp(n,s)+this.safeRoundUp(e,s))/s;break;case"-":s=this.getExponent(o,a),this.num=(this.safeRoundUp(n,s)-this.safeRoundUp(e,s))/s;break;case"*":this.num=this.safeRoundUp(this.safeRoundUp(n,this.getExponent(o)),this.safeRoundUp(e,this.getExponent(a)))/this.getExponent(o+a);break;case"/":s=this.getExponent(o,a),this.num=this.safeRoundUp(n,s)/this.safeRoundUp(e,s);break;case"%":s=this.getExponent(o,a),this.num=this.safeRoundUp(n,s)%this.safeRoundUp(e,s)/s;break}return this}},{key:"plus",value:function(e){return this.decimal(e,"+")}},{key:"minus",value:function(e){return this.decimal(e,"-")}},{key:"multiply",value:function(e){return this.decimal(e,"*")}},{key:"divide",value:function(e){return this.decimal(e,"/")}},{key:"remainder",value:function(e){return this.decimal(e,"%")}},{key:"toNumber",value:function(){return this.num}},{key:"getDecimalLen",value:function(e){var r="".concat(e).split("e");return("".concat(r[0]).split(".")[1]||"").length-(r[1]?+r[1]:0)}},{key:"getExponent",value:function(e,r){return Math.pow(10,r!==void 0?Math.max(e,r):e)}},{key:"safeRoundUp",value:function(e,r){return Math.round(e*r)}}]),t}();function vt(t,e){return kt(t)||bt(t,e)||et(t,e)||gt()}function gt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bt(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,o,a=[],s=!0,p=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(a.push(n.value),!(e&&a.length===e));s=!0);}catch(l){p=!0,o=l}finally{try{s||r.return==null||r.return()}finally{if(p)throw o}}return a}}function kt(t){if(Array.isArray(t))return t}function tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function St(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?tt(Object(r),!0).forEach(function(n){u(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function C(t){return Ot(t)||Pt(t)||et(t)||xt()}function xt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function et(t,e){if(t){if(typeof t=="string")return W(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(t,e):void 0}}function Pt(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ot(t){if(Array.isArray(t))return W(t)}function W(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Dt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Et(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function At(t,e,r){return e&&Et(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}(function(t){t[t.VALUE=1]="VALUE",t[t.INTERVAL=2]="INTERVAL",t[t.MIN=3]="MIN",t[t.MAX=4]="MAX",t[t.ORDER=5]="ORDER"})(b||(b={}));var Rt=(E={},u(E,b.VALUE,'The type of the "value" is illegal'),u(E,b.INTERVAL,'The prop "interval" is invalid, "(max - min)" must be divisible by "interval"'),u(E,b.MIN,'The "value" must be greater than or equal to the "min".'),u(E,b.MAX,'The "value" must be less than or equal to the "max".'),u(E,b.ORDER,'When "order" is false, the parameters "minRange", "maxRange", "fixed", "enabled" are invalid.'),E),wt=function(){function t(e){Dt(this,t),u(this,"dotsPos",[]),u(this,"dotsValue",[]),u(this,"data",void 0),u(this,"enableCross",void 0),u(this,"fixed",void 0),u(this,"max",void 0),u(this,"min",void 0),u(this,"interval",void 0),u(this,"minRange",void 0),u(this,"maxRange",void 0),u(this,"order",void 0),u(this,"marks",void 0),u(this,"included",void 0),u(this,"process",void 0),u(this,"adsorb",void 0),u(this,"dotOptions",void 0),u(this,"onError",void 0),u(this,"cacheRangeDir",{}),this.data=e.data,this.max=e.max,this.min=e.min,this.interval=e.interval,this.order=e.order,this.marks=e.marks,this.included=e.included,this.process=e.process,this.adsorb=e.adsorb,this.dotOptions=e.dotOptions,this.onError=e.onError,this.order?(this.minRange=e.minRange||0,this.maxRange=e.maxRange||0,this.enableCross=e.enableCross,this.fixed=e.fixed):((e.minRange||e.maxRange||!e.enableCross||e.fixed)&&this.emitError(b.ORDER),this.minRange=0,this.maxRange=0,this.enableCross=!0,this.fixed=!1),this.setValue(e.value)}return At(t,[{key:"setValue",value:function(e){this.setDotsValue(Array.isArray(e)?C(e):[e],!0)}},{key:"setDotsValue",value:function(e,r){this.dotsValue=e,r&&this.syncDotsPos()}},{key:"setDotsPos",value:function(e){var r=this,n=this.order?C(e).sort(function(o,a){return o-a}):e;this.dotsPos=n,this.setDotsValue(n.map(function(o){return r.getValueByPos(o)}),this.adsorb)}},{key:"getValueByPos",value:function(e){var r=this.parsePos(e);if(this.included){var n=100;this.markList.forEach(function(o){var a=Math.abs(o.pos-e);a<n&&(n=a,r=o.value)})}return r}},{key:"syncDotsPos",value:function(){var e=this;this.dotsPos=this.dotsValue.map(function(r){return e.parseValue(r)})}},{key:"markList",get:function(){var e=this;if(!this.marks)return[];var r=function(n,o){var a=e.parseValue(n);return St({pos:a,value:n,label:n,active:e.isActiveByPos(a)},o)};return this.marks===!0?this.getValues().map(function(n){return r(n)}):Object.prototype.toString.call(this.marks)==="[object Object]"?Object.keys(this.marks).sort(function(n,o){return+n-+o}).map(function(n){var o=e.marks[n];return r(n,typeof o!="string"?o:{label:o})}):Array.isArray(this.marks)?this.marks.map(function(n){return r(n)}):typeof this.marks=="function"?this.getValues().map(function(n){return{value:n,result:e.marks(n)}}).filter(function(n){var o=n.result;return!!o}).map(function(n){var o=n.value,a=n.result;return r(o,a)}):[]}},{key:"getRecentDot",value:function(e){var r=this.dotsPos.map(function(n){return Math.abs(n-e)});return r.indexOf(Math.min.apply(Math,C(r)))}},{key:"getIndexByValue",value:function(e){return this.data?this.data.indexOf(e):new P(+e).minus(this.min).divide(this.interval).toNumber()}},{key:"getValueByIndex",value:function(e){return e<0?e=0:e>this.total&&(e=this.total),this.data?this.data[e]:new P(e).multiply(this.interval).plus(this.min).toNumber()}},{key:"setDotPos",value:function(e,r){e=this.getValidPos(e,r).pos;var n=e-this.dotsPos[r];if(n){var o=new Array(this.dotsPos.length);this.fixed?o=this.getFixedChangePosArr(n,r):this.minRange||this.maxRange?o=this.getLimitRangeChangePosArr(e,n,r):o[r]=n,this.setDotsPos(this.dotsPos.map(function(a,s){return a+(o[s]||0)}))}}},{key:"getFixedChangePosArr",value:function(e,r){var n=this;return this.dotsPos.forEach(function(o,a){if(a!==r){var s=n.getValidPos(o+e,a),p=s.pos,l=s.inRange;l||(e=Math.min(Math.abs(p-o),Math.abs(e))*(e<0?-1:1))}}),this.dotsPos.map(function(o){return e})}},{key:"getLimitRangeChangePosArr",value:function(e,r,n){var o=this,a=[{index:n,changePos:r}],s=r;return[this.minRange,this.maxRange].forEach(function(p,l){if(!p)return!1;var h=l===0,v=r>0,B=0;B=h?v?1:-1:v?-1:1;for(var Ut=function(Wt,Gt){var st=Math.abs(Wt-Gt);return h?st<o.minRangeDir:st>o.maxRangeDir},L=n+B,I=o.dotsPos[L],ot=e;o.isPos(I)&&Ut(I,ot);){var _t=o.getValidPos(I+s,L),at=_t.pos;a.push({index:L,changePos:at-I}),L+=B,ot=at,I=o.dotsPos[L]}}),this.dotsPos.map(function(p,l){var h=a.filter(function(v){return v.index===l});return h.length?h[0].changePos:0})}},{key:"isPos",value:function(e){return typeof e=="number"}},{key:"getValidPos",value:function(e,r){var n=this.valuePosRange[r],o=!0;return e<n[0]?(e=n[0],o=!1):e>n[1]&&(e=n[1],o=!1),{pos:e,inRange:o}}},{key:"parseValue",value:function(e){if(this.data)e=this.data.indexOf(e);else if(typeof e=="number"||typeof e=="string"){if(e=+e,e<this.min)return this.emitError(b.MIN),0;if(e>this.max)return this.emitError(b.MAX),0;if(typeof e!="number"||e!==e)return this.emitError(b.VALUE),0;e=new P(e).minus(this.min).divide(this.interval).toNumber()}var r=new P(e).multiply(this.gap).toNumber();return r<0?0:r>100?100:r}},{key:"parsePos",value:function(e){var r=Math.round(e/this.gap);return this.getValueByIndex(r)}},{key:"isActiveByPos",value:function(e){return this.processArray.some(function(r){var n=vt(r,2),o=n[0],a=n[1];return e>=o&&e<=a})}},{key:"getValues",value:function(){if(this.data)return this.data;for(var e=[],r=0;r<=this.total;r++)e.push(new P(r).multiply(this.interval).plus(this.min).toNumber());return e}},{key:"getRangeDir",value:function(e){return e?new P(e).divide(new P(this.data?this.data.length-1:this.max).minus(this.data?0:this.min).toNumber()).multiply(100).toNumber():100}},{key:"emitError",value:function(e){this.onError&&this.onError(e,Rt[e])}},{key:"processArray",get:function(){if(this.process){if(typeof this.process=="function")return this.process(this.dotsPos);if(this.dotsPos.length===1)return[[0,this.dotsPos[0]]];if(this.dotsPos.length>1)return[[Math.min.apply(Math,C(this.dotsPos)),Math.max.apply(Math,C(this.dotsPos))]]}return[]}},{key:"total",get:function(){var e=0;return e=this.data?this.data.length-1:new P(this.max).minus(this.min).divide(this.interval).toNumber(),e-Math.floor(e)!==0?(this.emitError(b.INTERVAL),0):e}},{key:"gap",get:function(){return 100/this.total}},{key:"minRangeDir",get:function(){return this.cacheRangeDir[this.minRange]?this.cacheRangeDir[this.minRange]:this.cacheRangeDir[this.minRange]=this.getRangeDir(this.minRange)}},{key:"maxRangeDir",get:function(){return this.cacheRangeDir[this.maxRange]?this.cacheRangeDir[this.maxRange]:this.cacheRangeDir[this.maxRange]=this.getRangeDir(this.maxRange)}},{key:"getDotRange",value:function(e,r,n){if(!this.dotOptions)return n;var o=Array.isArray(this.dotOptions)?this.dotOptions[e]:this.dotOptions;return o&&o[r]!==void 0?this.parseValue(o[r]):n}},{key:"valuePosRange",get:function(){var e=this,r=this.dotsPos,n=[];return r.forEach(function(o,a){n.push([Math.max(e.minRange?e.minRangeDir*a:0,e.enableCross?0:r[a-1]||0,e.getDotRange(a,"min",0)),Math.min(e.minRange?100-e.minRangeDir*(r.length-1-a):100,e.enableCross?100:r[a+1]||100,e.getDotRange(a,"max",100))])}),n}},{key:"dotsIndex",get:function(){var e=this;return this.dotsValue.map(function(r){return e.getIndexByValue(r)})}}]),t}();function Vt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ct(t,e,r){return e&&jt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function rt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Bt=function(){function t(e){Vt(this,t),rt(this,"map",void 0),rt(this,"states",0),this.map=e}return Ct(t,[{key:"add",value:function(e){this.states|=e}},{key:"delete",value:function(e){this.states&=~e}},{key:"toggle",value:function(e){this.has(e)?this.delete(e):this.add(e)}},{key:"has",value:function(e){return!!(this.states&e)}}]),t}();function G(t){return Nt(t)||It(t)||it(t)||Lt()}function Lt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function It(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Nt(t){if(Array.isArray(t))return K(t)}function q(t){return q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q(t)}function nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function F(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nt(Object(r),!0).forEach(function(n){O(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function X(t,e){return Tt(t)||Mt(t,e)||it(t,e)||zt()}function zt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function it(t,e){if(t){if(typeof t=="string")return K(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(t,e):void 0}}function K(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Mt(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,o,a=[],s=!0,p=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(a.push(n.value),!(e&&a.length===e));s=!0);}catch(l){p=!0,o=l}finally{try{s||r.return==null||r.return()}finally{if(p)throw o}}return a}}function Tt(t){if(Array.isArray(t))return t}var m={None:0,Drag:2,Focus:4},Z=4,Ht=(0,i.defineComponent)({name:"VueSlider",components:{VueSliderDot:A,VueSliderMark:V},emits:["change","drag-start","dragging","drag-end","error","update:modelValue"],data:function(){return{control:null,states:new Bt(m),scale:1,focusDotIndex:0}},props:{modelValue:{type:[Number,String,Array],default:0},silent:{type:Boolean,default:!1},direction:{type:String,default:"ltr",validator:function(t){return["ltr","rtl","ttb","btt"].indexOf(t)>-1}},width:{type:[Number,String]},height:{type:[Number,String]},dotSize:{type:[Number,Array],default:14},contained:{type:Boolean,default:!1},min:{type:Number,default:0},max:{type:Number,default:100},interval:{type:Number,default:1},disabled:{type:Boolean,default:!1},clickable:{type:Boolean,default:!0},dragOnClick:{type:Boolean,default:!1},duration:{type:Number,default:.5},data:{type:[Object,Array]},dataValue:{type:String,default:"value"},dataLabel:{type:String,default:"label"},lazy:{type:Boolean,default:!1},tooltip:{type:String,default:"active",validator:function(t){return["none","always","focus","hover","active"].indexOf(t)>-1}},tooltipPlacement:{type:[String,Array],validator:function(t){return(Array.isArray(t)?t:[t]).every(function(e){return["top","right","bottom","left"].indexOf(e)>-1})}},tooltipFormatter:{type:[String,Array,Function]},useKeyboard:{type:Boolean,default:!0},keydownHook:{type:Function},enableCross:{type:Boolean,default:!0},fixed:{type:Boolean,default:!1},order:{type:Boolean,default:!0},minRange:{type:Number},maxRange:{type:Number},marks:{type:[Boolean,Object,Array,Function],default:!1},process:{type:[Boolean,Function],default:!0},zoom:{type:Number},included:{type:Boolean},adsorb:{type:Boolean},hideLabel:{type:Boolean},dotOptions:{type:[Object,Array]},dotAttrs:{type:Object},railStyle:{type:Object},processStyle:{type:Object},dotStyle:{type:Object},tooltipStyle:{type:Object},stepStyle:{type:Object},stepActiveStyle:{type:Object},labelStyle:{type:Object},labelActiveStyle:{type:Object}},computed:{isHorizontal:function(){return this.direction==="ltr"||this.direction==="rtl"},isReverse:function(){return this.direction==="rtl"||this.direction==="btt"},tailSize:function(){return j((this.isHorizontal?this.height:this.width)||Z)},containerClasses:function(){return["vue-slider",["vue-slider-".concat(this.direction)],{"vue-slider-disabled":this.disabled}]},containerStyles:function(){var t=Array.isArray(this.dotSize)?this.dotSize:[this.dotSize,this.dotSize],e=X(t,2),r=e[0],n=e[1],o=this.width?j(this.width):this.isHorizontal?"auto":j(Z),a=this.height?j(this.height):this.isHorizontal?j(Z):"auto";return{padding:this.contained?"".concat(n/2,"px ").concat(r/2,"px"):this.isHorizontal?"".concat(n/2,"px 0"):"0 ".concat(r/2,"px"),width:o,height:a}},processArray:function(){var t=this;return this.control.processArray.map(function(e,r){var n,o=X(e,3),a=o[0],s=o[1],p=o[2];if(a>s){var l=[s,a];a=l[0],s=l[1]}var h=t.isHorizontal?"width":"height";return{start:a,end:s,index:r,style:F(F((n={},O(n,t.isHorizontal?"height":"width","100%"),O(n,t.isHorizontal?"top":"left",0),O(n,t.mainDirection,"".concat(a,"%")),O(n,h,"".concat(s-a,"%")),O(n,"transitionProperty","".concat(h,",").concat(t.mainDirection)),O(n,"transitionDuration","".concat(t.animateTime,"s")),n),t.processStyle),p)}})},dotBaseStyle:function(){var t,e=Array.isArray(this.dotSize)?this.dotSize:[this.dotSize,this.dotSize],r=X(e,2),n=r[0],o=r[1];return t=this.isHorizontal?O({transform:"translate(".concat(this.isReverse?"50%":"-50%",", -50%)"),WebkitTransform:"translate(".concat(this.isReverse?"50%":"-50%",", -50%)"),top:"50%"},this.direction==="ltr"?"left":"right","0"):O({transform:"translate(-50%, ".concat(this.isReverse?"50%":"-50%",")"),WebkitTransform:"translate(-50%, ".concat(this.isReverse?"50%":"-50%",")"),left:"50%"},this.direction==="btt"?"bottom":"top","0"),F({width:"".concat(n,"px"),height:"".concat(o,"px")},t)},mainDirection:function(){switch(this.direction){case"ltr":return"left";case"rtl":return"right";case"btt":return"bottom";case"ttb":return"top";default:return"left"}},tooltipDirections:function(){var t=this.tooltipPlacement||(this.isHorizontal?"top":"left");return Array.isArray(t)?t:this.dots.map(function(){return t})},dots:function(){var t=this;return this.control.dotsPos.map(function(e,r){return F({pos:e,index:r,value:t.control.dotsValue[r],focus:t.states.has(m.Focus)&&t.focusDotIndex===r,disabled:t.disabled,style:t.dotStyle},(Array.isArray(t.dotOptions)?t.dotOptions[r]:t.dotOptions)||{})})},animateTime:function(){return this.states.has(m.Drag)?0:this.duration},canSort:function(){return this.order&&!this.minRange&&!this.maxRange&&!this.fixed&&this.enableCross},sliderData:function(){var t=this;return this.isObjectArrayData(this.data)?this.data.map(function(e){return e[t.dataValue]}):this.isObjectData(this.data)?Object.keys(this.data):this.data},sliderMarks:function(){var t=this;return this.marks?this.marks:this.isObjectArrayData(this.data)?function(e){var r={label:e};return t.data.some(function(n){return n[t.dataValue]===e&&(r.label=n[t.dataLabel],!0)}),r}:this.isObjectData(this.data)?this.data:void 0},sliderTooltipFormatter:function(){var t=this;if(this.tooltipFormatter)return this.tooltipFormatter;if(this.isObjectArrayData(this.data))return function(r){var n=""+r;return t.data.some(function(o){return o[t.dataValue]===r&&(n=o[t.dataLabel],!0)}),n};if(this.isObjectData(this.data)){var e=this.data;return function(r){return e[r]}}},isNotSync:function(){var t=this.control.dotsValue;return Array.isArray(this.modelValue)?this.modelValue.length!==t.length||this.modelValue.some(function(e,r){return e!==t[r]}):this.modelValue!==t[0]},dragRange:function(){var t=this.dots[this.focusDotIndex-1],e=this.dots[this.focusDotIndex+1];return[t?t.pos:-1/0,e?e.pos:1/0]}},watch:{modelValue:function(){this.control&&!this.states.has(m.Drag)&&this.isNotSync&&this.control.setValue(this.modelValue)}},methods:{isObjectData:function(t){return!!t&&Object.prototype.toString.call(t)==="[object Object]"},isObjectArrayData:function(t){return!!t&&Array.isArray(t)&&t.length>0&&q(t[0])==="object"},bindEvent:function(){document.addEventListener("touchmove",this.dragMove,{passive:!1}),document.addEventListener("touchend",this.dragEnd,{passive:!1}),document.addEventListener("mousedown",this.blurHandle),document.addEventListener("mousemove",this.dragMove),document.addEventListener("mouseup",this.dragEnd),document.addEventListener("mouseleave",this.dragEnd),document.addEventListener("keydown",this.keydownHandle)},unbindEvent:function(){document.removeEventListener("touchmove",this.dragMove),document.removeEventListener("touchend",this.dragEnd),document.removeEventListener("mousedown",this.blurHandle),document.removeEventListener("mousemove",this.dragMove),document.removeEventListener("mouseup",this.dragEnd),document.removeEventListener("mouseleave",this.dragEnd),document.removeEventListener("keydown",this.keydownHandle)},setScale:function(){this.scale=new P(Math.floor(this.isHorizontal?this.$el.offsetWidth:this.$el.offsetHeight)).multiply(this.zoom||1).divide(100).toNumber()},initControl:function(){var t=this;this.control=new wt({value:this.modelValue,data:this.sliderData,enableCross:this.enableCross,fixed:this.fixed,max:this.max,min:this.min,interval:this.interval,minRange:this.minRange,maxRange:this.maxRange,order:this.order,marks:this.sliderMarks,included:this.included,process:this.process,adsorb:this.adsorb,dotOptions:this.dotOptions,onError:this.emitError}),["data","enableCross","fixed","max","min","interval","minRange","maxRange","order","marks","process","adsorb","included","dotOptions"].forEach(function(e){t.$watch(e,function(r){if(e==="data"&&Array.isArray(t.control.data)&&Array.isArray(r)&&t.control.data.length===r.length&&r.every(function(n,o){return n===t.control.data[o]}))return!1;switch(e){case"data":case"dataLabel":case"dataValue":t.control.data=t.sliderData;break;case"mark":t.control.marks=t.sliderMarks;break;default:t.control[e]=r}["data","max","min","interval"].indexOf(e)>-1&&t.control.syncDotsPos()})})},syncValueByPos:function(){var t=this.control.dotsValue;if(this.isDiff(t,Array.isArray(this.modelValue)?this.modelValue:[this.modelValue])){var e=t.length===1?t[0]:G(t);this.$emit("change",e,this.focusDotIndex),this.$emit("update:modelValue",e)}},isDiff:function(t,e){return t.length!==e.length||t.some(function(r,n){return r!==e[n]})},emitError:function(t,e){this.silent||console.error("[VueSlider error]: ".concat(e)),this.$emit("error",t,e)},dragStartOnProcess:function(t){if(this.dragOnClick){this.setScale();var e=this.getPosByEvent(t),r=this.control.getRecentDot(e);if(this.dots[r].disabled)return;this.dragStart(r),this.control.setDotPos(e,this.focusDotIndex),this.lazy||this.syncValueByPos()}},dragStart:function(t){this.focusDotIndex=t,this.setScale(),this.states.add(m.Drag),this.states.add(m.Focus),this.$emit("drag-start",this.focusDotIndex)},dragMove:function(t){if(!this.states.has(m.Drag))return!1;t.preventDefault();var e=this.getPosByEvent(t);this.isCrossDot(e),this.control.setDotPos(e,this.focusDotIndex),this.lazy||this.syncValueByPos();var r=this.control.dotsValue;this.$emit("dragging",r.length===1?r[0]:G(r),this.focusDotIndex)},isCrossDot:function(t){if(this.canSort){var e=this.focusDotIndex,r=t;if(r>this.dragRange[1]?(r=this.dragRange[1],this.focusDotIndex++):r<this.dragRange[0]&&(r=this.dragRange[0],this.focusDotIndex--),e!==this.focusDotIndex){var n=this.$refs["dot-".concat(this.focusDotIndex)];n&&n.$el&&n.$el.focus(),this.control.setDotPos(r,e)}}},dragEnd:function(t){var e=this;if(!this.states.has(m.Drag))return!1;setTimeout(function(){e.lazy&&e.syncValueByPos(),e.included&&e.isNotSync?e.control.setValue(e.modelValue):e.control.syncDotsPos(),e.states.delete(m.Drag),e.useKeyboard&&!("targetTouches"in t)||e.states.delete(m.Focus),e.$emit("drag-end",e.focusDotIndex)})},blurHandle:function(t){if(!this.states.has(m.Focus)||!this.$refs.container||this.$refs.container.contains(t.target))return!1;this.states.delete(m.Focus)},clickHandle:function(t){if(!this.clickable||this.disabled)return!1;if(!this.states.has(m.Drag)){this.setScale();var e=this.getPosByEvent(t);this.setValueByPos(e)}},focus:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;t.disabled||(this.states.add(m.Focus),this.focusDotIndex=e)},blur:function(){this.states.delete(m.Focus)},getValue:function(){var t=this.control.dotsValue;return t.length===1?t[0]:t},getIndex:function(){var t=this.control.dotsIndex;return t.length===1?t[0]:t},setValue:function(t){this.control.setValue(Array.isArray(t)?G(t):[t]),this.syncValueByPos()},setIndex:function(t){var e=this,r=Array.isArray(t)?t.map(function(n){return e.control.getValueByIndex(n)}):this.control.getValueByIndex(t);this.setValue(r)},setValueByPos:function(t){var e=this,r=this.control.getRecentDot(t);if(this.disabled||this.dots[r].disabled)return!1;this.focusDotIndex=r,this.control.setDotPos(t,r),this.syncValueByPos(),this.useKeyboard&&this.states.add(m.Focus),setTimeout(function(){e.included&&e.isNotSync?e.control.setValue(e.modelValue):e.control.syncDotsPos()})},keydownHandle:function(t){var e=this;if(!this.useKeyboard||!this.states.has(m.Focus))return!1;var r=this.included&&this.marks,n=ht(t,{direction:this.direction,max:r?this.control.markList.length-1:this.control.total,min:0,hook:this.keydownHook});if(n){t.preventDefault();var o=-1,a=0;r?(this.control.markList.some(function(s,p){return s.value===e.control.dotsValue[e.focusDotIndex]&&(o=n(p),!0)}),o<0?o=0:o>this.control.markList.length-1&&(o=this.control.markList.length-1),a=this.control.markList[o].pos):(o=n(this.control.getIndexByValue(this.control.dotsValue[this.focusDotIndex])),a=this.control.parseValue(this.control.getValueByIndex(o))),this.isCrossDot(a),this.control.setDotPos(a,this.focusDotIndex),this.syncValueByPos()}},getPosByEvent:function(t){return dt(t,this.$el,this.isReverse,this.zoom)[this.isHorizontal?"x":"y"]/this.scale},renderSlot:function(t,e,r){var n=this.$slots[t];return n?n(e):r}},created:function(){this.initControl()},mounted:function(){this.bindEvent()},beforeUnmount:function(){this.unbindEvent()}}),Y=(0,R.Z)(Ht,[["render",x]]);Y.VueSliderMark=V,Y.VueSliderDot=A;var Ft=Y,$t=Ft}(),N=N.default,N}()})})(lt);var Jt=lt.exports;const ne=Xt(Jt);export{ne as V};