"use strict";
(self.webpackChunk_N_E = self.webpackChunk_N_E || []).push([
[2339], {
99775: function(e, t, n) {
var r, a = this && this.__extends || (r = function(e, t) {
return (r = Object.setPrototypeOf || ({
__proto__: []
}) instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n])
})(e, t)
}, function(e, t) {
if ("function" != typeof t && null !== t) throw TypeError("Class extends value " + String(t) + " is not a constructor or null");
function __() {
this.constructor = e
}
r(e, t), e.prototype = null === t ? Object.create(t) : (__.prototype = t.prototype, new __)
}),
i = this && this.__createBinding || (Object.create ? function(e, t, n, r) {
void 0 === r && (r = n);
var a = Object.getOwnPropertyDescriptor(t, n);
(!a || ("get" in a ? !t.__esModule : a.writable || a.configurable)) && (a = {
enumerable: !0,
get: function() {
return t[n]
}
}), Object.defineProperty(e, r, a)
} : function(e, t, n, r) {
void 0 === r && (r = n), e[r] = t[n]
}),
o = this && this.__setModuleDefault || (Object.create ? function(e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t
})
} : function(e, t) {
e.default = t
}),
s = this && this.__importStar || function(e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e) "default" !== n && Object.prototype.hasOwnProperty.call(e, n) && i(t, e, n);
return o(t, e), t
},
u = this && this.__spreadArray || function(e, t, n) {
if (n || 2 == arguments.length)
for (var r, a = 0, i = t.length; a < i; a++) !r && a in t || (r || (r = Array.prototype.slice.call(t, 0, a)), r[a] = t[a]);
return e.concat(r || Array.prototype.slice.call(t))
};
Object.defineProperty(t, "__esModule", {
value: !0
});
var c = s(n(52983)),
l = n(2843),
d = n(12461),
h = ["ArrowRight", "ArrowUp", "k", "PageUp"],
f = ["ArrowLeft", "ArrowDown", "j", "PageDown"],
p = function(e) {
function Range(t) {
var n = e.call(this, t) || this;
if (n.trackRef = c.createRef(), n.thumbRefs = [], n.state = {
draggedTrackPos: [-1, -1],
draggedThumbIndex: -1,
thumbZIndexes: Array(n.props.values.length).fill(0).map(function(e, t) {
return t
}),
isChanged: !1,
markOffsets: []
}, n.getOffsets = function() {
var e = n.props,
t = e.direction,
r = e.values,
a = e.min,
i = e.max,
o = n.trackRef.current,
s = o.getBoundingClientRect(),
u = (0, l.getPaddingAndBorder)(o);
return n.getThumbs().map(function(e, n) {
var o = {
x: 0,
y: 0
},
c = e.getBoundingClientRect(),
h = (0, l.getMargin)(e);
switch (t) {
case d.Direction.Right:
return o.x = -((h.left + u.left) * 1), o.y = -(((c.height - s.height) / 2 + u.top) * 1), o.x += s.width * (0, l.relativeValue)(r[n], a, i) - c.width / 2, o;
case d.Direction.Left:
return o.x = -((h.right + u.right) * 1), o.y = -(((c.height - s.height) / 2 + u.top) * 1), o.x += s.width - s.width * (0, l.relativeValue)(r[n], a, i) - c.width / 2, o;
case d.Direction.Up:
return o.x = -(((c.width - s.width) / 2 + h.left + u.left) * 1), o.y = -u.left, o.y += s.height - s.height * (0, l.relativeValue)(r[n], a, i) - c.height / 2, o;
case d.Direction.Down:
return o.x = -(((c.width - s.width) / 2 + h.left + u.left) * 1), o.y = -u.left, o.y += s.height * (0, l.relativeValue)(r[n], a, i) - c.height / 2, o;
default:
return (0, l.assertUnreachable)(t)
}
})
}, n.getThumbs = function() {
return n.trackRef && n.trackRef.current ? Array.from(n.trackRef.current.children).filter(function(e) {
return e.hasAttribute("aria-valuenow")
}) : (console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"), [])
}, n.getTargetIndex = function(e) {
return n.getThumbs().findIndex(function(t) {
return t === e.target || t.contains(e.target)
})
}, n.addTouchEvents = function(e) {
document.addEventListener("touchmove", n.schdOnTouchMove, {
passive: !1
}), document.addEventListener("touchend", n.schdOnEnd, {
passive: !1
}), document.addEventListener("touchcancel", n.schdOnEnd, {
passive: !1
})
}, n.addMouseEvents = function(e) {
document.addEventListener("mousemove", n.schdOnMouseMove), document.addEventListener("mouseup", n.schdOnEnd)
}, n.onMouseDownTrack = function(e) {
var t;
if (0 === e.button) {
if (e.persist(), e.preventDefault(), n.addMouseEvents(e.nativeEvent), n.props.values.length > 1 && n.props.draggableTrack) {
if (n.thumbRefs.some(function(t) {
var n;
return null === (n = t.current) || void 0 === n ? void 0 : n.contains(e.target)
})) return;
n.setState({
draggedTrackPos: [e.clientX, e.clientY]
}, function() {
return n.onMove(e.clientX, e.clientY)
})
} else {
var r = (0, l.getClosestThumbIndex)(n.thumbRefs.map(function(e) {
return e.current
}), e.clientX, e.clientY, n.props.direction);
null === (t = n.thumbRefs[r].current) || void 0 === t || t.focus(), n.setState({
draggedThumbIndex: r
}, function() {
return n.onMove(e.clientX, e.clientY)
})
}
}
}, n.onResize = function() {
(0, l.translateThumbs)(n.getThumbs(), n.getOffsets(), n.props.rtl), n.calculateMarkOffsets()
}, n.onTouchStartTrack = function(e) {
var t;
if (e.persist(), n.addTouchEvents(e.nativeEvent), n.props.values.length > 1 && n.props.draggableTrack) {
if (n.thumbRefs.some(function(t) {
var n;
return null === (n = t.current) || void 0 === n ? void 0 : n.contains(e.target)
})) return;
n.setState({
draggedTrackPos: [e.touches[0].clientX, e.touches[0].clientY]
}, function() {
return n.onMove(e.touches[0].clientX, e.touches[0].clientY)
})
} else {
var r = (0, l.getClosestThumbIndex)(n.thumbRefs.map(function(e) {
return e.current
}), e.touches[0].clientX, e.touches[0].clientY, n.props.direction);
null === (t = n.thumbRefs[r].current) || void 0 === t || t.focus(), n.setState({
draggedThumbIndex: r
}, function() {
return n.onMove(e.touches[0].clientX, e.touches[0].clientY)
})
}
}, n.onMouseOrTouchStart = function(e) {
if (!n.props.disabled) {
var t = (0, l.isTouchEvent)(e);
if (t || 0 === e.button) {
var r = n.getTargetIndex(e); - 1 !== r && (t ? n.addTouchEvents(e) : n.addMouseEvents(e), n.setState({
draggedThumbIndex: r,
thumbZIndexes: n.state.thumbZIndexes.map(function(e, t) {
return t === r ? Math.max.apply(Math, n.state.thumbZIndexes) : e <= n.state.thumbZIndexes[r] ? e : e - 1
})
}))
}
}
}, n.onMouseMove = function(e) {
e.preventDefault(), n.onMove(e.clientX, e.clientY)
}, n.onTouchMove = function(e) {
e.preventDefault(), n.onMove(e.touches[0].clientX, e.touches[0].clientY)
}, n.onKeyDown = function(e) {
var t = n.props,
r = t.values,
a = t.onChange,
i = t.step,
o = t.rtl,
s = t.direction,
u = n.state.isChanged,
c = n.getTargetIndex(e.nativeEvent),
p = o || s === d.Direction.Left || s === d.Direction.Down ? -1 : 1; - 1 !== c && (h.includes(e.key) ? (e.preventDefault(), n.setState({
draggedThumbIndex: c,
isChanged: !0
}), a((0, l.replaceAt)(r, c, n.normalizeValue(r[c] + p * ("PageUp" === e.key ? 10 * i : i), c)))) : f.includes(e.key) ? (e.preventDefault(), n.setState({
draggedThumbIndex: c,
isChanged: !0
}), a((0, l.replaceAt)(r, c, n.normalizeValue(r[c] - p * ("PageDown" === e.key ? 10 * i : i), c)))) : "Tab" === e.key ? n.setState({
draggedThumbIndex: -1
}, function() {
u && n.fireOnFinalChange()
}) : u && n.fireOnFinalChange())
}, n.onKeyUp = function(e) {
var t = n.state.isChanged;
n.setState({
draggedThumbIndex: -1
}, function() {
t && n.fireOnFinalChange()
})
}, n.onMove = function(e, t) {
var r = n.state,
a = r.draggedThumbIndex,
i = r.draggedTrackPos,
o = n.props,
s = o.direction,
u = o.min,
c = o.max,
h = o.onChange,
f = o.values,
p = o.step,
g = o.rtl;
if (-1 === a && -1 === i[0] && -1 === i[1]) return null;
var v = n.trackRef.current;
if (!v) return null;
var m = v.getBoundingClientRect(),
b = (0, l.isVertical)(s) ? m.height : m.width;
if (-1 !== i[0] && -1 !== i[1]) {
var k = e - i[0],
T = t - i[1],
M = 0;
switch (s) {
case d.Direction.Right:
case d.Direction.Left:
M = k / b * (c - u);
break;
case d.Direction.Down:
case d.Direction.Up:
M = T / b * (c - u);
break;
default:
(0, l.assertUnreachable)(s)
}
if (g && (M *= -1), Math.abs(M) >= p / 2) {
for (var O = 0; O < n.thumbRefs.length; O++) {
if (f[O] === c && 1 === Math.sign(M) || f[O] === u && -1 === Math.sign(M)) return;
var w = f[O] + M;
w > c ? M = c - f[O] : w < u && (M = u - f[O])
}
for (var y = f.slice(0), O = 0; O < n.thumbRefs.length; O++) y = (0, l.replaceAt)(y, O, n.normalizeValue(f[O] + M, O));
n.setState({
draggedTrackPos: [e, t]
}), h(y)
}
} else {
var x = 0;
switch (s) {
case d.Direction.Right:
x = (e - m.left) / b * (c - u) + u;
break;
case d.Direction.Left:
x = (b - (e - m.left)) / b * (c - u) + u;
break;
case d.Direction.Down:
x = (t - m.top) / b * (c - u) + u;
break;
case d.Direction.Up:
x = (b - (t - m.top)) / b * (c - u) + u;
break;
default:
(0, l.assertUnreachable)(s)
}
g && (x = c + u - x), Math.abs(f[a] - x) >= p / 2 && h((0, l.replaceAt)(f, a, n.normalizeValue(x, a)))
}
}, n.normalizeValue = function(e, t) {
var r = n.props,
a = r.min,
i = r.max,
o = r.step,
s = r.allowOverlap,
u = r.values;
return (0, l.normalizeValue)(e, t, a, i, o, s, u)
}, n.onEnd = function(e) {
if (e.preventDefault(), document.removeEventListener("mousemove", n.schdOnMouseMove), document.removeEventListener("touchmove", n.schdOnTouchMove), document.removeEventListener("mouseup", n.schdOnEnd), document.removeEventListener("touchend", n.schdOnEnd), document.removeEventListener("touchcancel", n.schdOnEnd), -1 === n.state.draggedThumbIndex && -1 === n.state.draggedTrackPos[0] && -1 === n.state.draggedTrackPos[1]) return null;
n.setState({
draggedThumbIndex: -1,
draggedTrackPos: [-1, -1]
}, function() {
n.fireOnFinalChange()
})
}, n.fireOnFinalChange = function() {
n.setState({
isChanged: !1
});
var e = n.props,
t = e.onFinalChange,
r = e.values;
t && t(r)
}, n.updateMarkRefs = function(e) {
if (!e.renderMark) {
n.numOfMarks = void 0, n.markRefs = void 0;
return
}
n.numOfMarks = (e.max - e.min) / n.props.step, n.markRefs = [];
for (var t = 0; t < n.numOfMarks + 1; t++) n.markRefs[t] = c.createRef()
}, n.calculateMarkOffsets = function() {
if (n.props.renderMark && n.trackRef && n.numOfMarks && n.markRefs && null !== n.trackRef.current) {
for (var e = window.getComputedStyle(n.trackRef.current), t = parseInt(e.width, 10), r = parseInt(e.height, 10), a = parseInt(e.paddingLeft, 10), i = parseInt(e.paddingTop, 10), o = [], s = 0; s < n.numOfMarks + 1; s++) {
var u = 9999,
c = 9999;
if (n.markRefs[s].current) {
var l = n.markRefs[s].current.getBoundingClientRect();
u = l.height, c = l.width
}
n.props.direction === d.Direction.Left || n.props.direction === d.Direction.Right ? o.push([Math.round(t / n.numOfMarks * s + a - c / 2), -Math.round((u - r) / 2)]) : o.push([Math.round(r / n.numOfMarks * s + i - u / 2), -Math.round((c - t) / 2)])
}
n.setState({
markOffsets: o
})
}
}, 0 === t.step) throw Error('"step" property should be a positive number');
return n.schdOnMouseMove = (0, l.schd)(n.onMouseMove), n.schdOnTouchMove = (0, l.schd)(n.onTouchMove), n.schdOnEnd = (0, l.schd)(n.onEnd), n.thumbRefs = t.values.map(function() {
return c.createRef()
}), n.updateMarkRefs(t), n
}
return a(Range, e), Range.prototype.componentDidMount = function() {
var e = this,
t = this.props,
n = t.values,
r = t.min,
a = t.step;
this.resizeObserver = window.ResizeObserver ? new window.ResizeObserver(this.onResize) : {
observe: function() {
return window.addEventListener("resize", e.onResize)
},
unobserve: function() {
return window.removeEventListener("resize", e.onResize)
}
}, document.addEventListener("touchstart", this.onMouseOrTouchStart, {
passive: !1
}), document.addEventListener("mousedown", this.onMouseOrTouchStart, {
passive: !1
}), this.props.allowOverlap || (0, l.checkInitialOverlap)(this.props.values), this.props.values.forEach(function(t) {
return (0, l.checkBoundaries)(t, e.props.min, e.props.max)
}), this.resizeObserver.observe(this.trackRef.current), (0, l.translateThumbs)(this.getThumbs(), this.getOffsets(), this.props.rtl), this.calculateMarkOffsets(), n.forEach(function(e) {
(0, l.isStepDivisible)(r, e, a) || console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")
})
}, Range.prototype.componentDidUpdate = function(e, t) {
var n = this.props,
r = n.max,
a = n.min,
i = n.step,
o = n.values,
s = n.rtl;
(e.max !== r || e.min !== a || e.step !== i) && this.updateMarkRefs(this.props), (0, l.translateThumbs)(this.getThumbs(), this.getOffsets(), s), (e.max !== r || e.min !== a || e.step !== i || t.markOffsets.length !== this.state.markOffsets.length) && (this.calculateMarkOffsets(), o.forEach(function(e) {
(0, l.isStepDivisible)(a, e, i) || console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")
}))
}, Range.prototype.componentWillUnmount = function() {
document.removeEventListener("mousedown", this.onMouseOrTouchStart, {
passive: !1
}), document.removeEventListener("mousemove", this.schdOnMouseMove), document.removeEventListener("touchmove", this.schdOnTouchMove), document.removeEventListener("touchstart", this.onMouseOrTouchStart), document.removeEventListener("mouseup", this.schdOnEnd), document.removeEventListener("touchend", this.schdOnEnd), this.resizeObserver.unobserve(this.trackRef.current)
}, Range.prototype.render = function() {
var e = this,
t = this.props,
n = t.renderTrack,
r = t.renderThumb,
a = t.renderMark,
i = void 0 === a ? function() {
return null
} : a,
o = t.values,
s = t.min,
c = t.max,
h = t.allowOverlap,
f = t.disabled,
p = this.state,
g = p.draggedThumbIndex,
v = p.thumbZIndexes,
m = p.markOffsets;
return n({
props: {
style: {
transform: "scale(1)",
cursor: g > -1 ? "grabbing" : this.props.draggableTrack ? (0, l.isVertical)(this.props.direction) ? "ns-resize" : "ew-resize" : 1 !== o.length || f ? "inherit" : "pointer"
},
onMouseDown: f ? l.voidFn : this.onMouseDownTrack,
onTouchStart: f ? l.voidFn : this.onTouchStartTrack,
ref: this.trackRef
},
isDragged: this.state.draggedThumbIndex > -1,
disabled: f,
children: u(u([], m.map(function(t, n, r) {
return i({
props: {
style: e.props.direction === d.Direction.Left || e.props.direction === d.Direction.Right ? {
position: "absolute",
left: "".concat(t[0], "px"),
marginTop: "".concat(t[1], "px")
} : {
position: "absolute",
top: "".concat(t[0], "px"),
marginLeft: "".concat(t[1], "px")
},
key: "mark".concat(n),
ref: e.markRefs[n]
},
index: n
})
}), !0), o.map(function(t, n) {
var a = e.state.draggedThumbIndex === n;
return r({
index: n,
value: t,
isDragged: a,
props: {
style: {
position: "absolute",
zIndex: v[n],
cursor: f ? "inherit" : a ? "grabbing" : "grab",
userSelect: "none",
touchAction: "none",
WebkitUserSelect: "none",
MozUserSelect: "none",
msUserSelect: "none"
},
key: n,
tabIndex: f ? void 0 : 0,
"aria-valuemax": h ? c : o[n + 1] || c,
"aria-valuemin": h ? s : o[n - 1] || s,
"aria-valuenow": t,
draggable: !1,
ref: e.thumbRefs[n],
role: "slider",
onKeyDown: f ? l.voidFn : e.onKeyDown,
onKeyUp: f ? l.voidFn : e.onKeyUp
}
})
}), !0)
})
}, Range.defaultProps = {
step: 1,
direction: d.Direction.Right,
rtl: !1,
disabled: !1,
allowOverlap: !1,
draggableTrack: !1,
min: 0,
max: 100
}, Range
}(c.Component);
t.default = p
},
92339: function(e, t, n) {
var r = this && this.__importDefault || function(e) {
return e && e.__esModule ? e : {
default: e
}
};
Object.defineProperty(t, "__esModule", {
value: !0
}), t.checkValuesAgainstBoundaries = t.relativeValue = t.useThumbOverlap = t.Direction = t.getTrackBackground = t.Range = void 0;
var a = r(n(99775));
t.Range = a.default;
var i = n(2843);
Object.defineProperty(t, "getTrackBackground", {
enumerable: !0,
get: function() {
return i.getTrackBackground
}
}), Object.defineProperty(t, "useThumbOverlap", {
enumerable: !0,
get: function() {
return i.useThumbOverlap
}
}), Object.defineProperty(t, "relativeValue", {
enumerable: !0,
get: function() {
return i.relativeValue
}
}), Object.defineProperty(t, "checkValuesAgainstBoundaries", {
enumerable: !0,
get: function() {
return i.checkValuesAgainstBoundaries
}
});
var o = n(12461);
Object.defineProperty(t, "Direction", {
enumerable: !0,
get: function() {
return o.Direction
}
})
},
12461: function(e, t) {
var n;
Object.defineProperty(t, "__esModule", {
value: !0
}), t.Direction = void 0, (n = t.Direction || (t.Direction = {})).Right = "to right", n.Left = "to left", n.Down = "to bottom", n.Up = "to top"
},
2843: function(e, t, n) {
var r = this && this.__spreadArray || function(e, t, n) {
if (n || 2 == arguments.length)
for (var r, a = 0, i = t.length; a < i; a++) !r && a in t || (r || (r = Array.prototype.slice.call(t, 0, a)), r[a] = t[a]);
return e.concat(r || Array.prototype.slice.call(t))
};
Object.defineProperty(t, "__esModule", {
value: !0
}), t.useThumbOverlap = t.assertUnreachable = t.voidFn = t.getTrackBackground = t.replaceAt = t.schd = t.translate = t.getClosestThumbIndex = t.translateThumbs = t.getPaddingAndBorder = t.getMargin = t.checkInitialOverlap = t.checkValuesAgainstBoundaries = t.checkBoundaries = t.isVertical = t.relativeValue = t.normalizeValue = t.isStepDivisible = t.isTouchEvent = t.getStepDecimals = void 0;
var a = n(52983),
i = n(12461);
function isVertical(e) {
return e === i.Direction.Up || e === i.Direction.Down
}
function translate(e, t, n) {
e.style.transform = "translate(".concat(t, "px, ").concat(n, "px)")
}
t.getStepDecimals = function(e) {
var t = e.toString().split(".")[1];
return t ? t.length : 0
}, t.isTouchEvent = function(e) {
return e.touches && e.touches.length || e.changedTouches && e.changedTouches.length
}, t.isStepDivisible = function(e, t, n) {
var r = Number(((t - e) / n).toFixed(8));
return parseInt(r.toString(), 10) === r
}, t.normalizeValue = function(e, n, r, a, i, o, s) {
if (e = Math.round(1e11 * e) / 1e11, !o) {
var u = s[n - 1],
c = s[n + 1];
if (u && u > e) return u;
if (c && c < e) return c
}
if (e > a) return a;
if (e < r) return r;
var l = Math.floor(1e11 * e - 1e11 * r) % Math.floor(1e11 * i),
d = Math.floor(1e11 * e - Math.abs(l)),
h = 0 === l ? e : d / 1e11,
f = Math.abs(l / 1e11) < i / 2 ? h : h + i,
p = (0, t.getStepDecimals)(i);
return parseFloat(f.toFixed(p))
}, t.relativeValue = function(e, t, n) {
return (e - t) / (n - t)
}, t.isVertical = isVertical, t.checkBoundaries = function(e, t, n) {
if (t >= n) throw RangeError("min (".concat(t, ") is equal/bigger than max (").concat(n, ")"));
if (e < t) throw RangeError("value (".concat(e, ") is smaller than min (").concat(t, ")"));
if (e > n) throw RangeError("value (".concat(e, ") is bigger than max (").concat(n, ")"))
}, t.checkValuesAgainstBoundaries = function(e, t, n) {
return e < t ? t : e > n ? n : e
}, t.checkInitialOverlap = function(e) {
if (!(e.length < 2) && !e.slice(1).every(function(t, n) {
return e[n] <= t
})) throw RangeError("values={[".concat(e, "]} needs to be sorted when allowOverlap={false}"))
}, t.getMargin = function(e) {
var t = window.getComputedStyle(e);
return {
top: parseInt(t["margin-top"], 10),
bottom: parseInt(t["margin-bottom"], 10),
left: parseInt(t["margin-left"], 10),
right: parseInt(t["margin-right"], 10)
}
}, t.getPaddingAndBorder = function(e) {
var t = window.getComputedStyle(e);
return {
top: parseInt(t["padding-top"], 10) + parseInt(t["border-top-width"], 10),
bottom: parseInt(t["padding-bottom"], 10) + parseInt(t["border-bottom-width"], 10),
left: parseInt(t["padding-left"], 10) + parseInt(t["border-left-width"], 10),
right: parseInt(t["padding-right"], 10) + parseInt(t["border-right-width"], 10)
}
}, t.translateThumbs = function(e, t, n) {
var r = n ? -1 : 1;
e.forEach(function(e, n) {
return translate(e, r * t[n].x, t[n].y)
})
}, t.getClosestThumbIndex = function(e, t, n, r) {
for (var a = 0, i = getThumbDistance(e[0], t, n, r), o = 1; o < e.length; o++) {
var s = getThumbDistance(e[o], t, n, r);
s < i && (i = s, a = o)
}
return a
}, t.translate = translate, t.schd = function(e) {
var t = [],
n = null;
return function() {
for (var r = [], a = 0; a < arguments.length; a++) r[a] = arguments[a];
t = r, n || (n = requestAnimationFrame(function() {
n = null, e.apply(void 0, t)
}))
}
}, t.replaceAt = function(e, t, n) {
var r = e.slice(0);
return r[t] = n, r
}, t.getTrackBackground = function(e) {
var t = e.values,
n = e.colors,
r = e.min,
a = e.max,
o = e.direction,
s = void 0 === o ? i.Direction.Right : o,
u = e.rtl,
c = void 0 !== u && u;
c && s === i.Direction.Right ? s = i.Direction.Left : c && i.Direction.Left && (s = i.Direction.Right);
var l = t.slice(0).sort(function(e, t) {
return e - t
}).map(function(e) {
return (e - r) / (a - r) * 100
}).reduce(function(e, t, r) {
return "".concat(e, ", ").concat(n[r], " ").concat(t, "%, ").concat(n[r + 1], " ").concat(t, "%")
}, "");
return "linear-gradient(".concat(s, ", ").concat(n[0], " 0%").concat(l, ", ").concat(n[n.length - 1], " 100%)")
}, t.voidFn = function() {}, t.assertUnreachable = function(e) {
throw Error("Didn't expect to get here")
};
var getThumbWidth = function(e, t, n, a, i) {
return void 0 === i && (i = function(e) {
return e
}), Math.ceil(r([e], Array.from(e.children), !0).reduce(function(e, r) {
var o = Math.ceil(r.getBoundingClientRect().width);
if (r.innerText && r.innerText.includes(n) && 0 === r.childElementCount) {
var s = r.cloneNode(!0);
s.innerHTML = i(t.toFixed(a)), s.style.visibility = "hidden", document.body.appendChild(s), o = Math.ceil(s.getBoundingClientRect().width), document.body.removeChild(s)
}
return o > e ? o : e
}, e.getBoundingClientRect().width))
},
getOverlaps = function(e, t, n, a, i, o, s) {
void 0 === s && (s = function(e) {
return e
});
var u = [],
buildOverlaps = function(e) {
var c = getThumbWidth(n[e], a[e], i, o, s),
l = t[e].x;
t.forEach(function(t, d) {
var h = t.x,
f = getThumbWidth(n[d], a[d], i, o, s);
e !== d && (l >= h && l <= h + f || l + c >= h && l + c <= h + f) && !u.includes(d) && (u.push(e), u.push(d), u = r(r([], u, !0), [e, d], !1), buildOverlaps(d))
})
};
return buildOverlaps(e), Array.from(new Set(u.sort()))
};
function getThumbDistance(e, t, n, r) {
var a = e.getBoundingClientRect(),
i = a.left,
o = a.top,
s = a.width,
u = a.height;
return isVertical(r) ? Math.abs(n - (o + u / 2)) : Math.abs(t - (i + s / 2))
}
t.useThumbOverlap = function(e, n, i, o, s, u) {
void 0 === o && (o = .1), void 0 === s && (s = " - "), void 0 === u && (u = function(e) {
return e
});
var c = (0, t.getStepDecimals)(o),
l = (0, a.useState)({}),
d = l[0],
h = l[1],
f = (0, a.useState)(u(n[i].toFixed(c))),
p = f[0],
g = f[1];
return (0, a.useEffect)(function() {
if (e) {
var t = e.getThumbs();
if (!(t.length < 1)) {
var a = {},
o = e.getOffsets(),
l = getOverlaps(i, o, t, n, s, c, u),
d = u(n[i].toFixed(c));
if (l.length) {
var f = l.reduce(function(e, t, n, a) {
return e.length ? r(r([], e, !0), [o[a[n]].x], !1) : [o[a[n]].x]
}, []);
if (Math.min.apply(Math, f) === o[i].x) {
var p = [];
l.forEach(function(e) {
p.push(n[e].toFixed(c))
}), d = Array.from(new Set(p.sort(function(e, t) {
return parseFloat(e) - parseFloat(t)
}))).map(u).join(s);
var v = Math.min.apply(Math, f),
m = Math.max.apply(Math, f),
b = t[l[f.indexOf(m)]].getBoundingClientRect().width;
a.left = "".concat(Math.abs(v - (m + b)) / 2, "px"), a.transform = "translate(-50%, 0)"
} else a.visibility = "hidden"
}
g(d), h(a)
}
}
}, [e, n]), [p, d]
}
}
}
]);