import{b as p}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{m as N}from"./vendor-vueform-slider-CCH9_7pb.js";import{d as w,e as r,w as v,f as y,i as B,x as s,j as C,B as c}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as F,r as I,u as m}from"./vendor-vue-reactivity-CheHbvBM.js";import"./vendor-vue-shared-DrzsEcag.js";const S={class:"slider-wrapper ccb-input-multi-range-field"},U={class:"slider-input"},j=["min","max"],k={class:"slider-input"},A=["min","max"],q=w({__name:"Input",props:{field:{},modelValue:{}},emits:["update:modelValue"],setup(V,{emit:f}){const i=V,{field:l}=F(i),x=r(()=>l.value.jump?1:Number(l.value.step||1)),u=r(()=>Number(l.value.min)),o=r(()=>Number(l.value.max)),t=I(i.modelValue),d=f,b=e=>{d("update:modelValue",Array.isArray(e)?e:[e])},g=e=>{const a=e.target;Number(a.value)<u.value&&(a.value=u.value.toString(),t.value[0]=u.value)},_=e=>{const a=e.target;Number(a.value)>o.value&&(a.value=o.value.toString(),t.value[1]=o.value)},h=e=>{const a=e.toFixed(2);return parseFloat(a).toString()};return v(()=>i.modelValue,e=>{t.value=e}),v(t,e=>{d("update:modelValue",e)},{deep:!0}),(e,a)=>(B(),y("div",S,[s("div",U,[c(s("input",{type:"number","onUpdate:modelValue":a[0]||(a[0]=n=>t.value[0]=n),min:u.value,max:o.value,onChange:g},null,40,j),[[p,t.value[0]]])]),C(m(N),{style:{margin:"10px 0"},format:h,min:m(l).min,max:m(l).max,step:x.value,disabled:m(l).disabled,modelValue:e.modelValue,"onUpdate:modelValue":b,"show-tooltip":"focus"},null,8,["min","max","step","disabled","modelValue"]),s("div",k,[c(s("input",{type:"number","onUpdate:modelValue":a[1]||(a[1]=n=>t.value[1]=n),min:u.value,max:o.value,onChange:_},null,40,A),[[p,t.value[1]]])])]))}});export{q as default};
//# sourceMappingURL=Input-Ci7CcSjK.js.map
