2 lines
28 KiB
JavaScript
2 lines
28 KiB
JavaScript
|
|
var I;(function(r){r.Range="range",r.Steps="steps",r.Positions="positions",r.Count="count",r.Values="values"})(I||(I={}));var O;(function(r){r[r.None=-1]="None",r[r.NoValue=0]="NoValue",r[r.LargeValue=1]="LargeValue",r[r.SmallValue=2]="SmallValue"})(O||(O={}));function we(r){return rt(r)&&typeof r.from=="function"}function rt(r){return typeof r=="object"&&typeof r.to=="function"}function zt(r){r.parentElement.removeChild(r)}function St(r){return r!=null}function Ft(r){r.preventDefault()}function Ce(r){return r.filter(function(t){return this[t]?!1:this[t]=!0},{})}function Ee(r,t){return Math.round(r/t)*t}function Ae(r,t){var s=r.getBoundingClientRect(),f=r.ownerDocument,u=f.documentElement,d=Bt(f);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(d.x=0),t?s.top+d.y-u.clientTop:s.left+d.x-u.clientLeft}function R(r){return typeof r=="number"&&!isNaN(r)&&isFinite(r)}function Rt(r,t,s){s>0&&(L(r,t),setTimeout(function(){et(r,t)},s))}function jt(r){return Math.max(Math.min(r,100),0)}function it(r){return Array.isArray(r)?r:[r]}function Pe(r){r=String(r);var t=r.split(".");return t.length>1?t[1].length:0}function L(r,t){r.classList&&!/\s/.test(t)?r.classList.add(t):r.className+=" "+t}function et(r,t){r.classList&&!/\s/.test(t)?r.classList.remove(t):r.className=r.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function Ve(r,t){return r.classList?r.classList.contains(t):new RegExp("\\b"+t+"\\b").test(r.className)}function Bt(r){var t=window.pageXOffset!==void 0,s=(r.compatMode||"")==="CSS1Compat",f=t?window.pageXOffset:s?r.documentElement.scrollLeft:r.body.scrollLeft,u=t?window.pageYOffset:s?r.documentElement.scrollTop:r.body.scrollTop;return{x:f,y:u}}function De(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function ye(){var r=!1;try{var t=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("test",null,t)}catch{}return r}function ke(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function bt(r,t){return 100/(t-r)}function xt(r,t,s){return t*100/(r[s+1]-r[s])}function Ue(r,t){return xt(r,r[0]<0?t+Math.abs(r[0]):t-r[0],0)}function Me(r,t){return t*(r[1]-r[0])/100+r[0]}function G(r,t){for(var s=1;r>=t[s];)s+=1;return s}function _e(r,t,s){if(s>=r.slice(-1)[0])return 100;var f=G(s,r),u=r[f-1],d=r[f],v=t[f-1],w=t[f];return v+Ue([u,d],s)/bt(v,w)}function Le(r,t,s){if(s>=100)return r.slice(-1)[0];var f=G(s,t),u=r[f-1],d=r[f],v=t[f-1],w=t[f];return Me([u,d],(s-v)*bt(v,w))}function Oe(r,t,s,f){if(f===100)return f;var u=G(f,r),d=r[u-1],v=r[u];return s?f-d>(v-d)/2?v:d:t[u-1]?r[u-1]+Ee(f-r[u-1],t[u-1]):f}var Kt=(function(){function r(t,s,f){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[f||!1],this.xNumSteps=[!1],this.snap=s;var u,d=[];for(Object.keys(t).forEach(function(v){d.push([it(t[v]),v])}),d.sort(function(v,w){return v[0][0]-w[0][0]}),u=0;u<d.length;u++)this.handleEntryPoint(d[u][1],d[u][0]);for(this.xNumSteps=this.xSteps.slice(0),u=0;u<this.xNumSteps.length;u++)this.handleStepPoint(u,this.xNumSteps[u])}return r.prototype.getDistance=function(t){for(var s=[],f=0;f<this.xNumSteps.length-1;f++)s[f]=xt(this.xVal,t,f);return s},r.prototype.getAbsoluteDistance=function(t,s,f){var u=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[u+1];)u++;else t===this.xPct[this.xPct.length-1]&&(u=this.xPct.length-2);!f&&t===this.xPct[u+1]&&u++,s===null&&(s=[]);var d,v=1,w=s[u],C=0,p=0,D=0,y=0;for(f?d=(t-this.xPct[u])/(this.xPct[u+1]-this.xPct[u]):d=(this.xPct[u+1]-t)/(this.xPct[u+1]-this.xPct[u]);w>0;)C=this.xPct[u+1+y]-this.xPct[u+y],s[u+y]*v+100-d*100>100?(p=C*d,v=(w-100*d)/s[u+y],d=1):(p=s[u+y]*C/100*v,v=0),f?(D=D-p,this.xPct.length+y>=1&&y--):(D=D+p,this.xPct.length-y>=1&&y++),w=s[u+y]*v;return t+D},r.prototype.toStepping=function(t){return t=_e(this.xVal,this.xPct,t),
|