"use strict";(self.webpackChunkengine=self.webpackChunkengine||[]).push([[5814,6272],{66272:(e,n,t)=>{t.r(n),t.d(n,{useRanger:()=>l});var o=t(28416);function r(){return r=Object.assign||function(e){for(var n=1;n=0||(r[t]=e[t]);return r}var a=function(e){var n=e.getBoundingClientRect();return{left:Math.ceil(n.left),width:Math.ceil(n.width)}},i=function(e){return[].concat(e).sort((function(e,n){return Number(e)-Number(n)}))},c=function(e){var n=o.useRef(e);return n.current=e,o.useCallback((function(){return n.current}),[])},s={getPercentageForValue:function(e,n,t){return Math.max(0,Math.min(100,(e-n)/(t-n)*100))},getValueForClientX:function(e,n,t,o){return(o-t)*((e-n.left)/n.width)+t}};function l(e){var n=e.interpolator,t=void 0===n?s:n,l=e.tickSize,v=void 0===l?10:l,f=e.values,d=e.min,m=e.max,h=e.ticks,p=e.steps,y=e.onChange,g=e.onDrag,k=e.stepSize,C=o.useState(null),b=C[0],w=C[1],M=o.useState(),D=M[0],x=M[1],E=c({activeHandleIndex:b,onChange:y,onDrag:g,values:f,tempValues:D}),S=o.useRef(),L=o.useCallback((function(e){var n=a(S.current);return t.getValueForClientX(e,n,d,m)}),[t,m,d]),P=o.useCallback((function(e,n){if(p){var t=p.indexOf(e)+n;return t>=0&&t=d&&o<=m?o:e}),[m,d,k,p]),O=o.useCallback((function(e){var n=d,t=m;if(p)p.forEach((function(o){o<=e&&o>n&&(n=o),o>=e&&o