PageSourceSearch

https://static-cos.mureka.ai/cos-prod/mureka/static/js/VueSlider-da7hD87R.js

js mureka.ai collected 2026-10-01 11:32:03 UTC 2,677 bytes, 1 lines download raw bytes

1import{t as e}from"./i18n-misc-BDWLtpFz.js";import{au as t,aA as a,r as l,c as r,V as o,w as i,f as d,x as s,y as u,B as n,P as c,I as m}from"./vendor-core-ByUhKfPn.js";const p={class:"vue-slider-track"},g={class:"vue-slider-dot-progress"},h={__name:"VueSlider",props:{direction:{type:String,default:"horizontal"},modelValue:{type:Number,default:0},tooltipFormatter:{type:Function,default:e=>e},min:{type:Number,default:0},max:{type:Number,default:100},renderStyle:{type:Object,default:()=>({})},disableChangeProgress:{type:Boolean,default:!1}},emits:["update:modelValue","change","dragStart","dragEnd","dragging"],setup(h,{emit:v}){t(),a();const S=h,f=v,V={"--slider-height":"16px","--track-height":"2px","--track-radius":"1px","--track-bg-color":"rgba(255, 255, 255, 0.2)","--progress-bg-color":"var(--m-color-accent)","--dot-padding":"4px","--slider-dot-size":"10px","--dot-bg-color":"#fff","--dot-hover-scale":"1.2"},b=l(null),x=l(null),w=r(()=>({...V,...S.renderStyle,"--progress-width":y.touchSwipeState?(y.modelValue-S.min)/(S.max-S.min)*100+"%":(S.modelValue-S.min)/(S.max-S.min)*100+"%"})),y=o({touchSwipeState:!1,modelValue:S.modelValue});function C(e){f("update:value",e),f("change",e)}const k=e=>{if(S.disableChangeProgress||y.touchSwipeState)return;const{width:t,left:a}=b.value.getBoundingClientRect(),l=e.clientX,r=Math.floor((l-a)/t*(S.max-S.min)+S.min);y.modelValue=r,C(r)};return i(()=>S.modelValue,e=>{y.touchSwipeState||(y.modelValue=e)}),d(()=>{b.value&&(()=>{var t;if(y.touchSwipeState=!1,S.disableChangeProgress)return;let a=0,l=null==(t=b.value)?void 0:t.clientWidth;e.registTouchSwipe(x.value,{direction:"horizontal",startCb:(e,t)=>{var r;l=null==(r=b.value)?void 0:r.clientWidth,y.touchSwipeState||(y.touchSwipeState=!0,y.modelValue=S.modelValue,a=(y.modelValue-S.min)/(S.max-S.min)*l,f("dragStart",y.modelValue))},moveCb:(e,t)=>{const{startX:r,endX:o}=t,i=Math.floor(o-r);let d=a+i;d=Math.max(0,Math.min(d,l)),y.modelValue=Math.floor(d/l*(S.max-S.min)+S.min),f("dragging",y.modelValue)},endCb:(e,t)=>{y.touchSwipeState&&(setTimeout(()=>{y.touchSwipeState=!1,f("dragEnd",y.modelValue)},10),C(y.modelValue))}})})()}),(e,t)=>(u(),s("div",{class:m(["vue-slider-container",{"vue-slider-container-disabled":S.disableChangeProgress,"vue-slider-container-active":y.touchSwipeState,"vue-slider-container-vertical":"vertical"===S.direction}]),ref_key:"refVueSliderContainer",ref:b,style:c(w.value),onClick:k},[n("div",p,[t[1]||(t[1]=n("div",{class:"vue-slider-progress"},null,-1)),n("div",g,[n("div",{class:"vue-slider-dot-op-box",ref_key:"refProgressDotBox",ref:x},[...t[0]||(t[0]=[n("div",{class:"vue-slider-dot"},null,-1)])],512)])])],6))}};export{h as _};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.