mango-ui-v2/public/charting_library/bundles/49.9e6e632c9570ad7ecacf.js

1119 lines
35 KiB
JavaScript

(window.webpackJsonp = window.webpackJsonp || []).push([
[49],
{
'/KDZ': function (e, t, o) {
'use strict';
o.d(t, 'a', function () {
return i;
});
var n = o('mrSG'),
r = o('q1tI'),
i = (function (e) {
function t(t) {
var o = e.call(this, t) || this;
return (
(o._handleChange = function () {
o.forceUpdate();
}),
(o.state = { query: window.matchMedia(o.props.rule) }),
o
);
}
return (
Object(n.__extends)(t, e),
(t.prototype.componentDidMount = function () {
this._subscribe(this.state.query);
}),
(t.prototype.componentDidUpdate = function (e, t) {
this.state.query !== t.query &&
(this._unsubscribe(t.query), this._subscribe(this.state.query));
}),
(t.prototype.componentWillUnmount = function () {
this._unsubscribe(this.state.query);
}),
(t.prototype.render = function () {
return this.props.children(this.state.query.matches);
}),
(t.getDerivedStateFromProps = function (e, t) {
return e.rule !== t.query.media
? { query: window.matchMedia(e.rule) }
: null;
}),
(t.prototype._subscribe = function (e) {
e.addListener(this._handleChange);
}),
(t.prototype._unsubscribe = function (e) {
e.removeListener(this._handleChange);
}),
t
);
})(r.PureComponent);
},
'1TxM': function (e, t, o) {
'use strict';
o.d(t, 'c', function () {
return s;
}),
o.d(t, 'a', function () {
return l;
}),
o.d(t, 'b', function () {
return u;
});
var n = o('q1tI'),
r = o.n(n),
i = o('17x9'),
a = o.n(i),
c = r.a.createContext({});
function s(e, t) {
a.a.checkPropTypes(t, e, 'context', 'RegistryContext');
}
function l(e) {
var t = e.validation,
o = e.value;
return s(o, t), r.a.createElement(c.Provider, { value: o }, e.children);
}
function u() {
return c;
}
},
'5YsI': function (e, t, o) {
e.exports = {
button: 'button-13wlLwhJ',
hover: 'hover-3L87f6Kw',
arrow: 'arrow-2pXEy7ej',
arrowWrap: 'arrowWrap-r5l5nQXU',
isOpened: 'isOpened-1939ai3F',
};
},
'6KyJ': function (e, t, o) {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
o('mrSG').__exportStar(o('COH4'), t);
},
'82wv': function (e, t, o) {
'use strict';
o.d(t, 'a', function () {
return v;
});
var n = o('mrSG'),
r = o('q1tI'),
i = o('TSYQ'),
a = o('9dlw'),
c = o('ML8+'),
s = o('QpNh'),
l = o('mkWe'),
u = o('Sn4D'),
d = o('Iksw'),
p = o('5YsI'),
v = (function (e) {
function t(t) {
var o = e.call(this, t) || this;
return (
(o._wrapperRef = null),
(o._controller = r.createRef()),
(o._handleWrapperRef = function (e) {
(o._wrapperRef = e), o.props.reference && o.props.reference(e);
}),
(o._handleClick = function (e) {
e.target instanceof Node &&
e.currentTarget.contains(e.target) &&
(o._handleToggleDropdown(),
o.props.onClick && o.props.onClick(e, !o.state.isOpened));
}),
(o._handleToggleDropdown = function (e) {
var t = o.props,
n = t.onClose,
r = t.onOpen,
i = o.state.isOpened,
a = 'boolean' == typeof e ? e : !i;
o.setState({ isOpened: a }), a && r && r(), !a && n && n();
}),
(o._handleClose = function () {
o.close();
}),
(o.state = { isOpened: !1 }),
o
);
}
return (
Object(n.__extends)(t, e),
(t.prototype.render = function () {
var e,
t = this.props,
o = t.id,
p = t.arrow,
v = t.children,
f = t.content,
m = t.isDisabled,
h = t.isDrawer,
b = t.drawerPosition,
g = void 0 === b ? 'Bottom' : b,
w = t.isShowTooltip,
O = t.minWidth,
y = t.title,
_ = t.className,
E = t.menuClassName,
C = t.hotKey,
D = t.theme,
S = this.state.isOpened,
N = i(
_,
D.button,
(((e = {})['apply-common-tooltip'] = w || !m),
(e[D.isDisabled] = m),
(e[D.isOpened] = S),
e),
),
T = S && h && g,
x = {
horizontalMargin: this.props.horizontalMargin || 0,
verticalMargin: this.props.verticalMargin || 2,
verticalAttachEdge: this.props.verticalAttachEdge,
horizontalAttachEdge: this.props.horizontalAttachEdge,
verticalDropDirection: this.props.verticalDropDirection,
horizontalDropDirection: this.props.horizontalDropDirection,
};
return r.createElement(
'div',
Object(n.__assign)(
{
id: o,
className: N,
onClick: m ? void 0 : this._handleClick,
title: y,
'data-tooltip-hotkey': C,
ref: this._handleWrapperRef,
'data-role': 'button',
},
Object(s.a)(this.props),
),
f,
p &&
r.createElement(
'div',
{ className: D.arrow },
r.createElement(
'div',
{ className: D.arrowWrap },
r.createElement(c.a, { dropped: S }),
),
),
T
? r.createElement(
l.b,
null,
r.createElement(
u.a,
{ onClose: this._handleClose, position: g },
v,
),
)
: r.createElement(
a.a,
{
controller: this._controller,
closeOnClickOutside: this.props.closeOnClickOutside,
doNotCloseOn: this,
isOpened: S,
minWidth: O,
onClose: this._handleClose,
position: Object(d.c)(this._wrapperRef, x),
className: E,
},
v,
),
);
}),
(t.prototype.close = function () {
this._handleToggleDropdown(!1);
}),
(t.prototype.update = function () {
null !== this._controller.current &&
this._controller.current.update();
}),
(t.defaultProps = { arrow: !0, closeOnClickOutside: !0, theme: p }),
t
);
})(r.PureComponent);
},
'9dlw': function (e, t, o) {
'use strict';
o.d(t, 'a', function () {
return p;
});
var n = o('mrSG'),
r = o('q1tI'),
i = o.n(r),
a = o('i8i4'),
c = o.n(a),
s = (o('bf9a'), o('AiMB')),
l = o('DTHj'),
u = o('X0gx'),
d = o('8Rai');
function p(e) {
var t = e.controller,
o = e.children,
a = e.isOpened,
p = e.closeOnClickOutside,
v = void 0 === p || p,
f = e.doNotCloseOn,
m = e.onClickOutside,
h = e.onClose,
b = Object(n.__rest)(e, [
'controller',
'children',
'isOpened',
'closeOnClickOutside',
'doNotCloseOn',
'onClickOutside',
'onClose',
]),
g = Object(r.useContext)(u.a),
w = Object(d.a)({
handler: function (e) {
m && m(e);
if (!v) return;
if (f && e.target instanceof Node) {
var t = c.a.findDOMNode(f);
if (t instanceof Node && t.contains(e.target)) return;
}
h();
},
mouseDown: !0,
touchStart: !0,
});
return a
? i.a.createElement(
s.a,
{
top: '0',
left: '0',
right: '0',
bottom: '0',
pointerEvents: 'none',
},
i.a.createElement(
'span',
{ ref: w, style: { pointerEvents: 'auto' } },
i.a.createElement(
l.a,
Object(n.__assign)({}, b, {
isOpened: a,
onClose: h,
onScroll: function (t) {
var o = e.onScroll;
o && o(t);
t.stopPropagation();
},
customCloseDelegate: g,
ref: t,
}),
o,
),
),
)
: null;
}
},
COH4: function (e, t, o) {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 });
var n,
r = o('mrSG'),
i = o('q1tI'),
a = o('TSYQ'),
c = o('K9GE'),
s = o('YZ9j');
o('O7m7'),
(function (e) {
(e[(e.Initial = 0)] = 'Initial'),
(e[(e.Appear = 1)] = 'Appear'),
(e[(e.Active = 2)] = 'Active');
})(n || (n = {}));
var l = (function (e) {
function t(t) {
var o = e.call(this, t) || this;
return (
(o._stateChangeTimeout = null), (o.state = { state: n.Initial }), o
);
}
return (
r.__extends(t, e),
(t.prototype.render = function () {
var e,
t = this.props,
o = t.className,
n = t.color,
r = void 0 === n ? 'black' : n,
c = a(s.item, (((e = {})[s[r]] = Boolean(r)), e));
return i.createElement(
'span',
{ className: a(s.loader, o, this._getStateClass()) },
i.createElement('span', { className: c }),
i.createElement('span', { className: c }),
i.createElement('span', { className: c }),
);
}),
(t.prototype.componentDidMount = function () {
var e = this;
this.setState({ state: n.Appear }),
(this._stateChangeTimeout = setTimeout(function () {
e.setState({ state: n.Active });
}, 2 * c.dur));
}),
(t.prototype.componentWillUnmount = function () {
this._stateChangeTimeout &&
(clearTimeout(this._stateChangeTimeout),
(this._stateChangeTimeout = null));
}),
(t.prototype._getStateClass = function () {
switch (this.state.state) {
case n.Initial:
return s['loader-initial'];
case n.Appear:
return s['loader-appear'];
default:
return '';
}
}),
t
);
})(i.PureComponent);
t.Loader = l;
},
Iivm: function (e, t, o) {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
o('mrSG').__exportStar(o('swCq'), t);
},
Iksw: function (e, t, o) {
'use strict';
o.d(t, 'a', function () {
return n;
}),
o.d(t, 'b', function () {
return i;
}),
o.d(t, 'c', function () {
return l;
});
var n,
r,
i,
a,
c = o('Eyy1');
!(function (e) {
(e[(e.Top = 0)] = 'Top'), (e[(e.Bottom = 1)] = 'Bottom');
})(n || (n = {})),
(function (e) {
(e[(e.Left = 0)] = 'Left'), (e[(e.Right = 1)] = 'Right');
})(r || (r = {})),
(function (e) {
(e[(e.FromTopToBottom = 0)] = 'FromTopToBottom'),
(e[(e.FromBottomToTop = 1)] = 'FromBottomToTop');
})(i || (i = {})),
(function (e) {
(e[(e.FromLeftToRight = 0)] = 'FromLeftToRight'),
(e[(e.FromRightToLeft = 1)] = 'FromRightToLeft');
})(a || (a = {}));
var s = {
verticalAttachEdge: n.Bottom,
horizontalAttachEdge: r.Left,
verticalDropDirection: i.FromTopToBottom,
horizontalDropDirection: a.FromLeftToRight,
verticalMargin: 0,
horizontalMargin: 0,
};
function l(e, t) {
return function (o, l) {
var u = Object(c.ensureNotNull)(e).getBoundingClientRect(),
d = t.verticalAttachEdge,
p = void 0 === d ? s.verticalAttachEdge : d,
v = t.verticalDropDirection,
f = void 0 === v ? s.verticalDropDirection : v,
m = t.horizontalAttachEdge,
h = void 0 === m ? s.horizontalAttachEdge : m,
b = t.horizontalDropDirection,
g = void 0 === b ? s.horizontalDropDirection : b,
w = t.horizontalMargin,
O = void 0 === w ? s.horizontalMargin : w,
y = t.verticalMargin,
_ = void 0 === y ? s.verticalMargin : y,
E = p === n.Top ? -1 * _ : _,
C = h === r.Right ? u.right : u.left,
D = p === n.Top ? u.top : u.bottom;
return {
x: C - (g === a.FromRightToLeft ? o : 0) + O,
y: D - (f === i.FromBottomToTop ? l : 0) + E,
};
};
}
},
KKsp: function (e, t, o) {
'use strict';
o.d(t, 'a', function () {
return c;
});
var n = o('q1tI'),
r = o('TSYQ'),
i = o.n(r),
a = o('NOPy');
function c(e) {
var t = e.size,
o = void 0 === t ? 'normal' : t,
r = e.className;
return n.createElement('div', {
className: i()(
a.separator,
'small' === o && a.small,
'normal' === o && a.normal,
'large' === o && a.large,
r,
),
});
}
},
'ML8+': function (e, t, o) {
'use strict';
o.d(t, 'a', function () {
return s;
});
var n = o('q1tI'),
r = o('TSYQ'),
i = o('Iivm'),
a = o('cvzQ'),
c = o('R4+T');
function s(e) {
var t,
o = e.dropped,
s = e.className;
return n.createElement(i.Icon, {
className: r(s, a.icon, ((t = {}), (t[a.dropped] = o), t)),
icon: c,
});
}
},
N5tr: function (e, t, o) {
'use strict';
o.d(t, 'a', function () {
return d;
}),
o.d(t, 'b', function () {
return f;
});
var n = o('mrSG'),
r = o('q1tI'),
i = o.n(r),
a = o('TSYQ'),
c = o('tWVy'),
s = o('PC8g'),
l = o('QpNh'),
u = o('v1bN'),
d = u;
function p(e) {
var t = e.reference,
o = Object(n.__rest)(e, ['reference']),
r = Object(n.__assign)(Object(n.__assign)({}, o), { ref: t });
return i.a.createElement(e.href ? 'a' : 'div', r);
}
function v(e) {
e.stopPropagation();
}
function f(e) {
var t,
o,
d,
f = e.className,
m = e.title,
h = e.labelRowClassName,
b = e.shortcut,
g = e.forceShowShortcuts,
w = e.icon,
O = e.isActive,
y = e.isDisabled,
_ = e.isHovered,
E = e.appearAsDisabled,
C = e.label,
D = e.link,
S = e.showToolboxOnHover,
N = e.target,
T = e.toolbox,
x = e.reference,
j = e.onMouseOut,
k = e.onMouseOver,
I = e.theme,
M = void 0 === I ? u : I,
B = Object(l.a)(e),
A = Object(r.useRef)(null);
return i.a.createElement(
p,
Object(n.__assign)({}, B, {
className: a(
f,
M.item,
w && M.withIcon,
((t = {}),
(t[M.isActive] = O),
(t[M.isDisabled] = y || E),
(t[M.hovered] = _),
t),
),
title: m,
href: D,
target: N,
reference: function (e) {
(A.current = e), x && x(e);
},
onClick: function (t) {
var o = e.dontClosePopup,
n = e.onClick,
r = e.onClickArg,
i = e.trackEventObject;
if (y) return;
i && Object(s.trackEvent)(i.category, i.event, i.label);
n && n(r, t);
o || Object(c.b)();
},
onContextMenu: function (t) {
var o = e.trackEventObject,
n = e.trackRightClick;
o &&
n &&
Object(s.trackEvent)(
o.category,
o.event,
o.label + '_rightClick',
);
},
onMouseUp: function (t) {
var o = e.trackEventObject,
n = e.trackMouseWheelClick;
if (1 === t.button && D && o) {
var r = o.label;
n && (r += '_mouseWheelClick'),
Object(s.trackEvent)(o.category, o.event, r);
}
},
onMouseOver: k,
onMouseOut: j,
}),
void 0 !== w &&
i.a.createElement('div', {
className: M.icon,
dangerouslySetInnerHTML: { __html: w },
}),
i.a.createElement(
'div',
{ className: a(M.labelRow, h) },
i.a.createElement('div', { className: M.label }, C),
),
(void 0 !== b || g) &&
i.a.createElement(
'div',
{ className: M.shortcut },
(d = b) && d.split('+').join(' + '),
),
void 0 !== T &&
i.a.createElement(
'div',
{
onClick: v,
className: a(M.toolbox, ((o = {}), (o[M.showOnHover] = S), o)),
},
T,
),
);
}
},
NOPy: function (e, t, o) {
e.exports = {
separator: 'separator-25lkUpN-',
small: 'small-1IE19htj',
normal: 'normal-2jX5NqMI',
large: 'large-3vmbMIE7',
};
},
O7m7: function (e, t, o) {},
'R4+T': function (e, t) {
e.exports =
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 8" width="16" height="8"><path fill="currentColor" d="M0 1.475l7.396 6.04.596.485.593-.49L16 1.39 14.807 0 7.393 6.122 8.58 6.12 1.186.08z"/></svg>';
},
Sn4D: function (e, t, o) {
'use strict';
o.d(t, 'a', function () {
return f;
});
var n = o('q1tI'),
r = o.n(n),
i = o('Eyy1'),
a = o('TSYQ'),
c = o('x0D+'),
s = o('33OQ'),
l = o('AiMB'),
u = o('mkWe'),
d = o('qFKp'),
p = o('tWVy'),
v = o('sHQ4');
function f(e) {
var t = e.position,
o = e.onClose,
f = e.children,
m = e.className,
h = Object(i.ensureNotNull)(Object(n.useContext)(u.a)),
b = Object(n.useState)(0),
g = b[0],
w = b[1],
O = Object(n.useRef)(null);
return (
Object(n.useEffect)(function () {
var e;
return (
null === (e = O.current) ||
void 0 === e ||
e.focus({ preventScroll: !0 }),
p.a.subscribe(h, o),
Object(s.setFixedBodyState)(!0),
d.CheckMobile.iOS() &&
Object(c.disableBodyScroll)(Object(i.ensureNotNull)(O.current)),
w(h.addDrawer()),
function () {
p.a.unsubscribe(h, o);
var e = h.removeDrawer();
d.CheckMobile.iOS() &&
Object(c.enableBodyScroll)(
Object(i.ensureNotNull)(O.current),
),
0 === e && Object(s.setFixedBodyState)(!1);
}
);
}, []),
r.a.createElement(
l.a,
null,
r.a.createElement(
'div',
{ className: a(v.wrap, v['position' + t]) },
g === h.currentDrawer &&
r.a.createElement('div', { className: v.backdrop, onClick: o }),
r.a.createElement(
'div',
{
className: a(v.drawer, v['position' + t], m),
ref: function (e) {
O.current = e;
},
tabIndex: -1,
},
f,
),
),
)
);
}
},
X0gx: function (e, t, o) {
'use strict';
o.d(t, 'a', function () {
return a;
});
var n = o('q1tI'),
r = o.n(n),
i = o('tWVy'),
a = r.a.createContext(i.a);
},
YZ9j: function (e) {
e.exports = JSON.parse(
'{"loader":"loader-8x1ZxRwP","item":"item-2-89r_cd","tv-button-loader":"tv-button-loader-23vqS1uY","black":"black-20Ytsf0V","white":"white-1ucCcc2I","gray":"gray-XDhHSS-T","loader-initial":"loader-initial-1deQDeio","loader-appear":"loader-appear-2krFtMrd"}',
);
},
bQ7Y: function (e, t, o) {
e.exports = {
button: 'button-2ioYhFEY',
hover: 'hover-yHQNmTbI',
isInteractive: 'isInteractive-20uLObIc',
isGrouped: 'isGrouped-2BBXQnbO',
isActive: 'isActive-22S-lGpa',
isOpened: 'isOpened-p-Ume5l9',
isDisabled: 'isDisabled-1_tmrLfP',
text: 'text-1sK7vbvh',
icon: 'icon-beK_KS0k',
};
},
cvzQ: function (e, t, o) {
e.exports = { icon: 'icon-3yfDkFjY', dropped: 'dropped-50rfOQ8V' };
},
mkWe: function (e, t, o) {
'use strict';
o.d(t, 'b', function () {
return a;
}),
o.d(t, 'a', function () {
return c;
});
var n = o('mrSG'),
r = o('q1tI'),
i = o.n(r),
a = (function (e) {
function t(t) {
var o = e.call(this, t) || this;
return (
(o._addDrawer = function () {
var e = o.state.currentDrawer + 1;
return o.setState({ currentDrawer: e }), e;
}),
(o._removeDrawer = function () {
var e = o.state.currentDrawer - 1;
return o.setState({ currentDrawer: e }), e;
}),
(o.state = { currentDrawer: 0 }),
o
);
}
return (
Object(n.__extends)(t, e),
(t.prototype.render = function () {
return i.a.createElement(
c.Provider,
{
value: {
addDrawer: this._addDrawer,
removeDrawer: this._removeDrawer,
currentDrawer: this.state.currentDrawer,
},
},
this.props.children,
);
}),
t
);
})(i.a.PureComponent),
c = i.a.createContext(null);
},
nPPD: function (e, t, o) {
'use strict';
function n(e, t, o) {
void 0 === o && (o = {});
for (
var n = Object.assign({}, t), r = 0, i = Object.keys(t);
r < i.length;
r++
) {
var a = i[r],
c = o[a] || a;
c in e && (n[a] = [e[c], t[a]].join(' '));
}
return n;
}
function r(e, t, o) {
return void 0 === o && (o = {}), Object.assign({}, e, n(e, t, o));
}
o.d(t, 'b', function () {
return n;
}),
o.d(t, 'a', function () {
return r;
});
},
sHQ4: function (e, t, o) {
e.exports = {
wrap: 'wrap-3vvdSnDX',
backdrop: 'backdrop-1knaw_yl',
positionBottom: 'positionBottom-3zJf6Byh',
drawer: 'drawer-1_nJUEiM',
positionLeft: 'positionLeft-2wxVhi9G',
};
},
swCq: function (e, t, o) {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 });
var n = o('mrSG'),
r = o('q1tI');
t.Icon = r.forwardRef(function (e, t) {
var o = e.icon,
i = void 0 === o ? '' : o,
a = n.__rest(e, ['icon']);
return r.createElement(
'span',
n.__assign({}, a, { ref: t, dangerouslySetInnerHTML: { __html: i } }),
);
});
},
tU7i: function (e, t, o) {
'use strict';
o.d(t, 'a', function () {
return s;
}),
o.d(t, 'b', function () {
return l;
});
var n = o('mrSG'),
r = o('q1tI'),
i = o('TSYQ'),
a = o('Iivm'),
c = o('bQ7Y'),
s = c,
l = r.forwardRef(function (e, t) {
var o,
s = e.icon,
l = e.isActive,
u = e.isOpened,
d = e.isDisabled,
p = e.isGrouped,
v = e.isHovered,
f = e.onClick,
m = e.text,
h = e.textBeforeIcon,
b = e.title,
g = e.theme,
w = void 0 === g ? c : g,
O = e.className,
y = e.forceInteractive,
_ = Object(n.__rest)(e, [
'icon',
'isActive',
'isOpened',
'isDisabled',
'isGrouped',
'isHovered',
'onClick',
'text',
'textBeforeIcon',
'title',
'theme',
'className',
'forceInteractive',
]),
E = i(
O,
w.button,
b && 'apply-common-tooltip',
(((o = {})[w.isActive] = l),
(o[w.isOpened] = u),
(o[w.isInteractive] = (y || Boolean(f)) && !d),
(o[w.isDisabled] = d),
(o[w.isGrouped] = p),
(o[w.hover] = v),
o),
),
C =
s &&
('string' == typeof s
? r.createElement(a.Icon, { className: w.icon, icon: s })
: r.cloneElement(s, {
className: i(w.icon, s.props.className),
}));
return r.createElement(
'div',
Object(n.__assign)({}, _, {
ref: t,
'data-role': 'button',
className: E,
onClick: d ? void 0 : f,
title: b,
}),
h &&
m &&
r.createElement(
'div',
{ className: i('js-button-text', w.text) },
m,
),
C,
!h &&
m &&
r.createElement(
'div',
{ className: i('js-button-text', w.text) },
m,
),
);
});
},
v1bN: function (e, t, o) {
e.exports = {
'tablet-small-breakpoint': 'screen and (max-width: 419px)',
item: 'item-2xPVYue0',
hovered: 'hovered-1uf45E05',
isDisabled: 'isDisabled-1wLqKupj',
isActive: 'isActive-2j-GhQs_',
shortcut: 'shortcut-30pveiCO',
toolbox: 'toolbox-3ulPxfe-',
withIcon: 'withIcon-1xBjf-oB',
icon: 'icon-2Qm7YIcz',
labelRow: 'labelRow-3Q0rdE8-',
label: 'label-3Xqxy756',
showOnHover: 'showOnHover-1q6ySzZc',
};
},
'x0D+': function (e, t, o) {
var n, r, i;
(r = [t]),
void 0 ===
(i =
'function' ==
typeof (n = function (e) {
'use strict';
function t(e) {
if (Array.isArray(e)) {
for (var t = 0, o = Array(e.length); t < e.length; t++)
o[t] = e[t];
return o;
}
return Array.from(e);
}
Object.defineProperty(e, '__esModule', { value: !0 });
var o = !1;
if ('undefined' != typeof window) {
var n = {
get passive() {
o = !0;
},
};
window.addEventListener('testPassive', null, n),
window.removeEventListener('testPassive', null, n);
}
var r =
'undefined' != typeof window &&
window.navigator &&
window.navigator.platform &&
/iP(ad|hone|od)/.test(window.navigator.platform),
i = [],
a = !1,
c = -1,
s = void 0,
l = void 0,
u = function (e) {
return i.some(function (t) {
return !(
!t.options.allowTouchMove || !t.options.allowTouchMove(e)
);
});
},
d = function (e) {
var t = e || window.event;
return (
!!u(t.target) ||
1 < t.touches.length ||
(t.preventDefault && t.preventDefault(), !1)
);
},
p = function () {
setTimeout(function () {
void 0 !== l &&
((document.body.style.paddingRight = l), (l = void 0)),
void 0 !== s &&
((document.body.style.overflow = s), (s = void 0));
});
};
(e.disableBodyScroll = function (e, n) {
if (r) {
if (!e)
return void console.error(
'disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.',
);
if (
e &&
!i.some(function (t) {
return t.targetElement === e;
})
) {
var p = { targetElement: e, options: n || {} };
(i = [].concat(t(i), [p])),
(e.ontouchstart = function (e) {
1 === e.targetTouches.length &&
(c = e.targetTouches[0].clientY);
}),
(e.ontouchmove = function (t) {
var o, n, r, i;
1 === t.targetTouches.length &&
((n = e),
(i = (o = t).targetTouches[0].clientY - c),
!u(o.target) &&
((n && 0 === n.scrollTop && 0 < i) ||
((r = n) &&
r.scrollHeight - r.scrollTop <= r.clientHeight &&
i < 0)
? d(o)
: o.stopPropagation()));
}),
a ||
(document.addEventListener(
'touchmove',
d,
o ? { passive: !1 } : void 0,
),
(a = !0));
}
} else {
(f = n),
setTimeout(function () {
if (void 0 === l) {
var e = !!f && !0 === f.reserveScrollBarGap,
t =
window.innerWidth -
document.documentElement.clientWidth;
e &&
0 < t &&
((l = document.body.style.paddingRight),
(document.body.style.paddingRight = t + 'px'));
}
void 0 === s &&
((s = document.body.style.overflow),
(document.body.style.overflow = 'hidden'));
});
var v = { targetElement: e, options: n || {} };
i = [].concat(t(i), [v]);
}
var f;
}),
(e.clearAllBodyScrollLocks = function () {
r
? (i.forEach(function (e) {
(e.targetElement.ontouchstart = null),
(e.targetElement.ontouchmove = null);
}),
a &&
(document.removeEventListener(
'touchmove',
d,
o ? { passive: !1 } : void 0,
),
(a = !1)),
(i = []),
(c = -1))
: (p(), (i = []));
}),
(e.enableBodyScroll = function (e) {
if (r) {
if (!e)
return void console.error(
'enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.',
);
(e.ontouchstart = null),
(e.ontouchmove = null),
(i = i.filter(function (t) {
return t.targetElement !== e;
})),
a &&
0 === i.length &&
(document.removeEventListener(
'touchmove',
d,
o ? { passive: !1 } : void 0,
),
(a = !1));
} else
1 === i.length && i[0].targetElement === e
? (p(), (i = []))
: (i = i.filter(function (t) {
return t.targetElement !== e;
}));
});
})
? n.apply(t, r)
: n) || (e.exports = i);
},
},
]);