PageSourceSearch

https://storage-academy.aicertified.nl/vite/assets/range-slider-CHccF4Fs.js

js aicertified.nl collected 2026-10-03 20:05:33 UTC 3,526 bytes, 1 lines download raw bytes

1import{n as o}from"./_plugin-vue2_normalizer-hMXAjtbh.js";const c={props:{name:{type:String,default:""},value:{type:Number,default:0},valueType:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0},step:{type:Number,default:1},correctMin:{type:Number,default:null},correctValue:{type:Number,default:null},correctMax:{type:Number,default:null},completed:{type:Boolean,default:!1},locale:{type:String,default:"nl-NL"}},data(){return{selectedValue:this.completed?this.correctValue:this.value,floaterPosition:this.selectedValue,thumbWidth:46}},computed:{isCorrect(){return this.value>=this.correctMin&&this.value<=this.correctMax},calculateIncorrectValue(){const a=Math.ceil((this.value-this.min)*100/(this.max-this.min));return a<10?`calc(${a}%)`:a>90?`calc(${a}% - ${this.thumbWidth}px)`:`calc(${a}% - ${this.thumbWidth/2}px)`},localizedSelectedValue(){return Number(this.selectedValue).toLocaleString(this.locale)},localizedMin(){return this.min.toLocaleString(this.locale)},localizedMax(){return this.max.toLocaleString(this.locale)}},watch:{selectedValue(){this.calculate()}},mounted(){this.calculate()},methods:{calculate(){const a=this.$refs.rangeSlider.clientWidth,t=this.$refs.floater.clientWidth,e=t/2,s=Math.ceil((this.selectedValue-this.min)*100/(this.max-this.min)),l=Math.ceil(a/100*s),i=l<=t*.5,r=l+t/2>=a;i?this.floaterPosition=0:r?this.floaterPosition=a-t:this.floaterPosition=l-e}}};var n=function(){var t=this,e=t._self._c;return e("div",{ref:"rangeSlider",staticClass:"range-slider",class:{"is-correct":t.isCorrect,"is-incorrect":!t.isCorrect}},[e("div",{staticClass:"element"},[e("output",{ref:"floater",staticClass:"floater",style:{transform:`translateX(${t.floaterPosition}px)`},attrs:{"data-test":"floater"}},[e("p",{staticClass:"title"},[t._v(t._s(t.localizedSelectedValue))]),e("p",{staticClass:"subtitle"},[t._v(t._s(t.valueType))]),e("svg",{staticClass:"floater-svg",attrs:{viewBox:"0 0 226 64",fill:"none",preserveAspectRatio:"none"}},[e("path",{attrs:{d:"M224.972 62.331c-18.023-.012-33.057-12.84-43.814-27.301-14.967-20.124-38.929-33.16-65.937-33.16-27.022 0-50.996 13.05-65.962 33.194C38.493 49.555 19.554 62.33 1.5 62.33",stroke:"url(#paint0_linear)","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}}),e("defs",[e("linearGradient",{attrs:{id:"paint0_linear",x1:"-439",y1:"32.141",x2:"339.2",y2:"32.141",gradientUnits:"userSpaceOnUse"}},[e("stop",{attrs:{"stop-color":"var(--floater-svg-gradient-start)"}}),e("stop",{attrs:{"stop-color":"var(--floater-svg-gradient-end)",offset:"1"}})],1)],1)])]),e("div",{staticClass:"position-relative"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedValue,expression:"selectedValue"}],staticClass:"input",attrs:{type:"range",name:t.name,min:t.min,max:t.max,step:t.step,disabled:t.completed},domProps:{value:t.selectedValue},on:{__r:function(s){t.selectedValue=s.target.value}}}),t.completed&&!t.isCorrect?e("div",{staticClass:"incorrect-icon",style:{left:t.calculateIncorrectValue}}):t._e()])]),e("div",{staticClass:"bottom"},[e("div",{staticClass:"bottom-start"},[e("p",{staticClass:"title"},[t._v(t._s(t.localizedMin))]),e("p",{staticClass:"subtitle"},[t._v(t._s(t.valueType))])]),e("div",{staticClass:"bottom-center"},[t._t("bottom-content")],2),e("div",{staticClass:"bottom-end"},[e("p",{staticClass:"title"},[t._v(t._s(t.localizedMax))]),e("p",{staticClass:"subtitle"},[t._v(t._s(t.valueType))])])])])},u=[],d=o(c,n,u,!1,null,"dc8ba096");const h=d.exports;export{h as default};

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.