<<<<<<<< HEAD:dist/assets/index-6343ec02.js
import{c as j,b as A,n as z,d as q,r as V,u as J,e as B,o as Q,aa as W,a3 as Z,a as S,bG as I,a4 as M,s as p,bT as ee,p as te,aB as ae,a5 as ne,k as re}from"./index-4228b913.js";const[le,g]=j("slider"),ie={min:A(0),max:A(100),step:A(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:z,buttonSize:z,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};var oe=q({name:le,props:ie,emits:["change","dragEnd","dragStart","update:modelValue"],setup(t,{emit:b,slots:N}){let m,o,c;const C=V(),T=[V(),V()],u=V(),v=J(),f=B(()=>Number(t.max)-Number(t.min)),R=B(()=>{const e=t.vertical?"width":"height";return{background:t.inactiveColor,[e]:Q(t.barHeight)}}),s=e=>t.range&&Array.isArray(e),X=()=>{const{modelValue:e,min:a}=t;return s(e)?`${(e[1]-e[0])*100/f.value}%`:`${(e-Number(a))*100/f.value}%`},Y=()=>{const{modelValue:e,min:a}=t;return s(e)?`${(e[0]-Number(a))*100/f.value}%`:"0%"},_=B(()=>{const a={[t.vertical?"height":"width"]:X(),background:t.activeColor};u.value&&(a.transition="none");const n=()=>t.vertical?t.reverse?"bottom":"top":t.reverse?"right":"left";return a[n()]=Y(),a}),h=e=>{const a=+t.min,n=+t.max,l=+t.step;e=ne(e,a,n);const r=Math.round((e-a)/l)*l;return ee(a,r)},k=()=>{const e=t.modelValue;s(e)?c=e.map(h):c=h(e)},$=e=>{var a,n;const l=(a=e[0])!=null?a:Number(t.min),r=(n=e[1])!=null?n:Number(t.max);return l>r?[r,l]:[l,r]},d=(e,a)=>{s(e)?e=$(e).map(h):e=h(e),I(e,t.modelValue)||b("update:modelValue",e),a&&!I(e,c)&&b("change",e)},D=e=>{if(e.stopPropagation(),t.disabled||t.readonly)return;k();const{min:a,reverse:n,vertical:l,modelValue:r}=t,i=M(C),L=()=>l?n?i.bottom-e.clientY:e.clientY-i.top:n?i.right-e.clientX:e.clientX-i.left,O=l?i.height:i.width,y=Number(a)+L()/O*f.value;if(s(r)){const[P,E]=r,U=(P+E)/2;y<=U?d([y,E],!0):d([P,y],!0)}else d(y,!0)},H=e=>{t.disabled||t.readonly||(v.start(e),o=t.modelValue,k(),u.value="start")},F=e=>{if(t.disabled||t.readonly)return;u.value==="start"&&b("dragStart",e),te(e,!0),v.move(e),u.value="dragging";const a=M(C),n=t.vertical?v.deltaY.value:v.deltaX.value,l=t.vertical?a.height:a.width;let r=n/l*f.value;if(t.reverse&&(r=-r),s(c)){const i=t.reverse?1-m:m;o[i]=c[i]+r}else o=c+r;d(o)},x=e=>{t.disabled||t.readonly||(u.value==="dragging"&&(d(o,!0),b("dragEnd",e)),u.value="")},G=e=>typeof e=="number"?g("button-wrapper",["left","right"][e]):g("button-wrapper",t.reverse?"left":"right"),K=(e,a)=>{const n=u.value==="dragging";if(typeof a=="number"){const l=N[a===0?"left-button":"right-button"];let r;if(n&&Array.isArray(o)&&(r=o[0]>o[1]?m^1:m),l)return l({value:e,dragging:n,dragIndex:r})}return N.button?N.button({value:e,dragging:n}):S("div",{class:g("button"),style:ae(t.buttonSize)},null)},w=e=>{const a=typeof e=="number"?t.modelValue[e]:t.modelValue;return S("div",{ref:T[e!=null?e:0],role:"slider",class:G(e),tabindex:t.disabled?void 0:0,"aria-valuemin":t.min,"aria-valuenow":a,"aria-valuemax":t.max,"aria-disabled":t.disabled||void 0,"aria-readonly":t.readonly||void 0,"aria-orientation":t.vertical?"vertical":"horizontal",onTouchstartPassive:n=>{typeof e=="number"&&(m=e),H(n)},onTouchend:x,onTouchcancel:x,onClick:p},[K(a,e)])};return d(t.modelValue),W(()=>t.modelValue),T.forEach(e=>{Z("touchmove",F,{target:e})}),()=>S("div",{ref:C,style:R.value,class:g({vertical:t.vertical,disabled:t.disabled}),onClick:D},[S("div",{class:g("bar"),style:_.value},[t.range?[w(0),w(1)]:w()])])}});const ce=re(oe);export{ce as S};
========
import{c as j,b as A,n as z,d as q,r as V,u as J,e as B,o as Q,aa as W,a3 as Z,a as S,bG as I,a4 as M,s as p,bT as ee,p as te,aB as ae,a5 as ne,k as re}from"./index-c4313132.js";const[le,g]=j("slider"),ie={min:A(0),max:A(100),step:A(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:z,buttonSize:z,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};var oe=q({name:le,props:ie,emits:["change","dragEnd","dragStart","update:modelValue"],setup(t,{emit:b,slots:N}){let m,o,c;const C=V(),T=[V(),V()],u=V(),v=J(),f=B(()=>Number(t.max)-Number(t.min)),R=B(()=>{const e=t.vertical?"width":"height";return{background:t.inactiveColor,[e]:Q(t.barHeight)}}),s=e=>t.range&&Array.isArray(e),X=()=>{const{modelValue:e,min:a}=t;return s(e)?`${(e[1]-e[0])*100/f.value}%`:`${(e-Number(a))*100/f.value}%`},Y=()=>{const{modelValue:e,min:a}=t;return s(e)?`${(e[0]-Number(a))*100/f.value}%`:"0%"},_=B(()=>{const a={[t.vertical?"height":"width"]:X(),background:t.activeColor};u.value&&(a.transition="none");const n=()=>t.vertical?t.reverse?"bottom":"top":t.reverse?"right":"left";return a[n()]=Y(),a}),h=e=>{const a=+t.min,n=+t.max,l=+t.step;e=ne(e,a,n);const r=Math.round((e-a)/l)*l;return ee(a,r)},k=()=>{const e=t.modelValue;s(e)?c=e.map(h):c=h(e)},$=e=>{var a,n;const l=(a=e[0])!=null?a:Number(t.min),r=(n=e[1])!=null?n:Number(t.max);return l>r?[r,l]:[l,r]},d=(e,a)=>{s(e)?e=$(e).map(h):e=h(e),I(e,t.modelValue)||b("update:modelValue",e),a&&!I(e,c)&&b("change",e)},D=e=>{if(e.stopPropagation(),t.disabled||t.readonly)return;k();const{min:a,reverse:n,vertical:l,modelValue:r}=t,i=M(C),L=()=>l?n?i.bottom-e.clientY:e.clientY-i.top:n?i.right-e.clientX:e.clientX-i.left,O=l?i.height:i.width,y=Number(a)+L()/O*f.value;if(s(r)){const[P,E]=r,U=(P+E)/2;y<=U?d([y,E],!0):d([P,y],!0)}else d(y,!0)},H=e=>{t.disabled||t.readonly||(v.start(e),o=t.modelValue,k(),u.value="start")},F=e=>{if(t.disabled||t.readonly)return;u.value==="start"&&b("dragStart",e),te(e,!0),v.move(e),u.value="dragging";const a=M(C),n=t.vertical?v.deltaY.value:v.deltaX.value,l=t.vertical?a.height:a.width;let r=n/l*f.value;if(t.reverse&&(r=-r),s(c)){const i=t.reverse?1-m:m;o[i]=c[i]+r}else o=c+r;d(o)},x=e=>{t.disabled||t.readonly||(u.value==="dragging"&&(d(o,!0),b("dragEnd",e)),u.value="")},G=e=>typeof e=="number"?g("button-wrapper",["left","right"][e]):g("button-wrapper",t.reverse?"left":"right"),K=(e,a)=>{const n=u.value==="dragging";if(typeof a=="number"){const l=N[a===0?"left-button":"right-button"];let r;if(n&&Array.isArray(o)&&(r=o[0]>o[1]?m^1:m),l)return l({value:e,dragging:n,dragIndex:r})}return N.button?N.button({value:e,dragging:n}):S("div",{class:g("button"),style:ae(t.buttonSize)},null)},w=e=>{const a=typeof e=="number"?t.modelValue[e]:t.modelValue;return S("div",{ref:T[e!=null?e:0],role:"slider",class:G(e),tabindex:t.disabled?void 0:0,"aria-valuemin":t.min,"aria-valuenow":a,"aria-valuemax":t.max,"aria-disabled":t.disabled||void 0,"aria-readonly":t.readonly||void 0,"aria-orientation":t.vertical?"vertical":"horizontal",onTouchstartPassive:n=>{typeof e=="number"&&(m=e),H(n)},onTouchend:x,onTouchcancel:x,onClick:p},[K(a,e)])};return d(t.modelValue),W(()=>t.modelValue),T.forEach(e=>{Z("touchmove",F,{target:e})}),()=>S("div",{ref:C,style:R.value,class:g({vertical:t.vertical,disabled:t.disabled}),onClick:D},[S("div",{class:g("bar"),style:_.value},[t.range?[w(0),w(1)]:w()])])}});const ce=re(oe);export{ce as S};
>>>>>>>> 0f2588f61580675e1c866dc0769d4ceb917efcec:dist/assets/index-e4e37691.js
