mango-ui-v3/components/charting_library/bundles/29.3df50903664220ef12f9.js

498 lines
19 KiB
JavaScript
Raw Blame History

(window.webpackJsonp = window.webpackJsonp || []).push([
[29],
{
'56W2': function (e, t, s) {
(function (t) {
var s;
(s = void 0 !== t ? t : this),
(e.exports = (function (e) {
if (e.CSS && e.CSS.escape) return e.CSS.escape;
var t = function (e) {
if (0 == arguments.length)
throw new TypeError('`CSS.escape` requires an argument.');
for (
var t,
s = String(e),
n = s.length,
i = -1,
o = '',
l = s.charCodeAt(0);
++i < n;
)
0 != (t = s.charCodeAt(i))
? (o +=
(t >= 1 && t <= 31) ||
127 == t ||
(0 == i && t >= 48 && t <= 57) ||
(1 == i && t >= 48 && t <= 57 && 45 == l)
? '\\' + t.toString(16) + ' '
: (0 == i && 1 == n && 45 == t) ||
!(
t >= 128 ||
45 == t ||
95 == t ||
(t >= 48 && t <= 57) ||
(t >= 65 && t <= 90) ||
(t >= 97 && t <= 122)
)
? '\\' + s.charAt(i)
: s.charAt(i))
: (o += '<27>');
return o;
};
return e.CSS || (e.CSS = {}), (e.CSS.escape = t), t;
})(s));
}.call(this, s('yLpj')));
},
Gs9W: function (e, t, s) {},
jgM0: function (e, t, s) {
'use strict';
var n = s('56W2');
s('Gs9W'),
(function (e, t) {
function s() {
(this._state = []),
(this._defaults = {
classHolder: 'sbHolder',
classHolderDisabled: 'sbHolderDisabled',
classHolderOpen: 'sbHolderOpen',
classSelector: 'sbSelector',
classOptions: 'sbOptions',
classGroup: 'sbGroup',
classSub: 'sbSub',
classDisabled: 'sbDisabled',
classToggleOpen: 'sbToggleOpen',
classToggle: 'sbToggle',
classSeparator: 'sbSeparator',
useCustomPrependWithSelector: '',
customPrependSelectorClass: '',
speed: 200,
slidesUp: !1,
effect: 'slide',
onChange: null,
beforeOpen: null,
onOpen: null,
onClose: null,
});
}
function i(t, s, n, i) {
function o() {
s.removeClass(t.settings.customPrependSelectorClass),
t._lastSelectorPrepend &&
(t._lastSelectorPrepend.remove(),
delete t._lastSelectorPrepend),
n.data('custom-option-prepend') &&
(t.settings.customPrependSelectorClass &&
s.addClass(t.settings.customPrependSelectorClass),
(t._lastSelectorPrepend = e(
n.data('custom-option-prepend'),
).clone()),
s[t.settings.useCustomPrependWithSelector](
t._lastSelectorPrepend,
));
}
t.settings.useCustomPrependWithSelector &&
(i ? (t._onAttachCallback = o) : o());
}
e.extend(s.prototype, {
_refreshSelectbox: function (e, t) {
if (!e) return !1;
var s = this._getInst(e);
return null != s && (this._fillList(e, s, t), !0);
},
_isOpenSelectbox: function (e) {
return !!e && this._getInst(e).isOpen;
},
_isDisabledSelectbox: function (e) {
return !!e && this._getInst(e).isDisabled;
},
_attachSelectbox: function (t, s) {
if (this._getInst(t)) return !1;
var i,
o,
l,
a,
c = e(t),
r = this,
d = r._newInst(c);
c.find('optgroup'), c.find('option').length;
function p() {
var t,
s = this.attr('id').split('_')[1];
for (t in r._state)
t !== s &&
r._state.hasOwnProperty(t) &&
e(":input[sb='" + t + "']")[0] &&
r._closeSelectbox(e(":input[sb='" + t + "']")[0]);
}
c.attr('sb', d.uid),
e.extend(d.settings, r._defaults, s),
(r._state[d.uid] = !1),
c.hide(),
(i = e('<div>', {
id: 'sbHolder_' + d.uid,
class: d.settings.classHolder,
}));
var u = c.data('selectbox-css');
function b(s) {
c.children().each(function (n) {
var i;
if (e(this).is(':selected')) {
if (38 == s && n > 0)
return (
(i = e(c.children()[n - 1])),
r._changeSelectbox(t, i.val(), i.text()),
!1
);
if (40 == s && n < c.children().length - 1)
return (
(i = e(c.children()[n + 1])),
r._changeSelectbox(t, i.val(), i.text()),
!1
);
}
});
}
u && i.css(u),
(o = e('<a>', {
id: 'sbSelector_' + d.uid,
href: '#',
class: d.settings.classSelector,
click: function (s) {
s.preventDefault(),
s.stopPropagation(),
p.apply(e(this), []);
var n = e(this).attr('id').split('_')[1];
r._state[n]
? r._closeSelectbox(t)
: (r._openSelectbox(t), l.focus());
},
keyup: function (e) {
b(e.keyCode);
},
})),
(l = e('<a>', {
id: 'sbToggle_' + d.uid,
href: '#',
class: d.settings.classToggle,
click: function (s) {
s.preventDefault(),
s.stopPropagation(),
p.apply(e(this), []);
var n = e(this).attr('id').split('_')[1];
r._state[n]
? r._closeSelectbox(t)
: (r._openSelectbox(t), l.focus());
},
keyup: function (e) {
b(e.keyCode);
},
})),
e('<div class="tv-caret"></div>').appendTo(l),
l.appendTo(i),
(a = e('<ul>', {
id: 'sbOptions_' + d.uid,
class: d.settings.classOptions,
css: { display: 'none' },
})),
(d.sbOptions = a),
(d.sbToggle = l),
(d.sbSelector = o),
this._fillList(t, d),
e.data(t, 'selectbox', d),
o.appendTo(i),
a.appendTo(i),
i.insertAfter(c),
d._onAttachCallback &&
(d._onAttachCallback(), delete d._onAttachCallback),
c.is(':disabled') && e.selectbox._disableSelectbox(t),
c.change(function () {
var s = e(this).val(),
i = c.find("option[value='" + n(s) + "']").text();
r._changeSelectbox(t, s, i);
});
},
_detachSelectbox: function (t) {
var s = this._getInst(t);
if (!s) return !1;
e('#sbHolder_' + s.uid).remove(),
delete this._state[s.uid],
e.data(t, 'selectbox', null),
e(t).show();
},
_changeSelectbox: function (t, s, o) {
var l = e(t.ownerDocument),
a = this._getInst(t),
c = this._get(a, 'onChange');
if (
!(
l.find('#sbSelector_' + a.uid).text() === o &&
l
.find('#sbOptions_' + a.uid)
.find('a[rel="' + s + '"]')
.hasClass('active')
)
) {
var r = e(t).find("option[value='" + n(s) + "']"),
d = l.find('#sbSelector_' + a.uid);
d.text(o),
i(a, d, r),
l
.find('#sbOptions_' + a.uid)
.find('.active')
.removeClass('active'),
l
.find('#sbOptions_' + a.uid)
.find('a[rel="' + s + '"]')
.addClass('active'),
e(t).find('option').attr('selected', !1),
r.attr('selected', !0),
c
? c.apply(a.input ? a.input[0] : null, [s, a])
: a.input && a.input.trigger('change');
}
},
_enableSelectbox: function (t) {
var s = this._getInst(t);
if (!s || !s.isDisabled) return !1;
e(t.ownerDocument)
.find('#sbHolder_' + s.uid)
.removeClass(s.settings.classHolderDisabled),
(s.isDisabled = !1),
e.data(t, 'selectbox', s);
},
_disableSelectbox: function (t) {
var s = this._getInst(t);
if (!s || s.isDisabled) return !1;
e(t.ownerDocument)
.find('#sbHolder_' + s.uid)
.addClass(s.settings.classHolderDisabled),
(s.isDisabled = !0),
e.data(t, 'selectbox', s);
},
_optionSelectbox: function (t, s, n) {
var i = this._getInst(t);
return (
!!i &&
(null == n
? i[s]
: ((i[s] = n), void e.data(t, 'selectbox', i)))
);
},
_openSelectbox: function (t) {
var s = this._getInst(t),
n = this;
if (s && !s.isOpen && !s.isDisabled) {
var i = e(t.ownerDocument),
o = e(t.ownerDocument.defaultView),
l = i.find('#sbOptions_' + s.uid),
a = parseInt(o.height(), 10),
c = parseInt(o.width(), 10),
r = i.find('#sbHolder_' + s.uid).offset(),
d = o.scrollTop(),
p = l.prev().height(),
u = a - (r.top - d) - p / 2,
b = this._get(s, 'onOpen'),
f = this._get(s, 'beforeOpen'),
g = null;
f && (g = f()),
'object' == typeof g && null !== g
? l.css(g)
: (u > 50 && !s.settings.slidesUp
? l.css({
bottom: 'auto',
top: p + 2 + 'px',
maxHeight: u - p + 'px',
})
: l.css({
top: 'auto',
bottom: p + 2 + 'px',
maxHeight: r.top - d - p / 2 + 'px',
}),
r.left + l.width() > c
? l.css(
'left',
'-' + (l.width() - l.parent().width() + 3) + 'px',
)
: l.css('left', '-1px')),
'fade' === s.settings.effect
? l.fadeIn(s.settings.speed)
: l.slideDown(s.settings.speed),
i
.find('#sbToggle_' + s.uid)
.addClass(s.settings.classToggleOpen),
i
.find('#sbHolder_' + s.uid)
.addClass(s.settings.classHolderOpen),
(this._state[s.uid] = !0),
(s.isOpen = !0),
b && b.apply(s.input ? s.input[0] : null, [s]),
e.data(t, 'selectbox', s),
i.unbind('click.sbClose').one('click.sbClose', function () {
n._closeSelectbox(t);
});
}
},
_closeSelectbox: function (t) {
var s = this._getInst(t);
if (s && s.isOpen) {
var n = e(t.ownerDocument),
i = this._get(s, 'onClose');
n.find('#sbOptions_' + s.uid).hide(),
n
.find('#sbToggle_' + s.uid)
.removeClass(s.settings.classToggleOpen),
n
.find('#sbHolder_' + s.uid)
.removeClass(s.settings.classHolderOpen),
(this._state[s.uid] = !1),
(s.isOpen = !1),
i && i.apply(s.input ? s.input[0] : null, [s]),
e.data(t, 'selectbox', s),
n.unbind('click.sbClose');
}
},
_newInst: function (e) {
return {
id: e[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'),
input: e,
uid: Math.floor(99999999 * Math.random()),
isOpen: !1,
isDisabled: !1,
isSelected: !1,
settings: {},
};
},
_getInst: function (t) {
try {
return e.data(t, 'selectbox');
} catch (s) {
throw 'Missing instance data for this selectbox';
}
},
_get: function (e, t) {
return void 0 !== e.settings[t]
? e.settings[t]
: this._defaults[t];
},
_getOptions: function (t, s, n, o, l) {
var a = !(!arguments[1] || !arguments[1].sub),
c = !(!arguments[1] || !arguments[1].disabled),
r = this;
arguments[0].each(function (t) {
var s,
d = e(this),
p = e('<li>');
d.is(':selected') &&
(n.sbSelector.text(d.text()),
i(n, n.sbSelector, d, !0),
(n.isSelected = !0)),
t === o - 1 && p.addClass('last'),
(function () {
var t = d.text(),
i = d.data('custom-option-text'),
o = void 0 !== i ? i : t;
'__separator__' === d.val()
? (s = e('<span>').addClass(
n.settings.classSeparator,
)).appendTo(p)
: d.is(':disabled') || c
? ((s = e('<span>', { text: o }).addClass(
n.settings.classDisabled,
)),
a && s.addClass(n.settings.classSub),
s.appendTo(p))
: ((s = e('<a>', {
href: '#' + d.val(),
rel: d.val(),
text: o,
class: 'filter',
click: function (s) {
s.preventDefault();
var i = n.sbToggle;
i.attr('id').split('_')[1];
r._closeSelectbox(l),
r._changeSelectbox(l, e(this).attr('rel'), t),
i.focus();
},
})),
d.is(':selected') && s.addClass('active'),
a && s.addClass(n.settings.classSub),
s.appendTo(p));
var u = d.data('custom-option-prepend');
u && s.prepend(u);
})(),
p.addClass(d.attr('class')),
p.appendTo(n.sbOptions);
});
},
_fillList: function (t, s, n) {
var o = this,
l = e(t),
a = (l.find('optgroup'), l.find('option')),
c = a.length;
n || (n = 0),
l
.children()
.slice(n)
.each(function (n) {
var i,
l = e(this),
a = {};
l.is('option')
? o._getOptions(l, null, s, c, t)
: l.is('optgroup') &&
((i = e('<li>')),
e('<span>', { text: l.attr('label') })
.addClass(s.settings.classGroup)
.appendTo(i),
i.appendTo(s.sbOptions),
l.is(':disabled') && (a.disabled = !0),
(a.sub = !0),
o._getOptions(l.find('option'), a, s, c, t));
}),
s.isSelected ||
(s.sbSelector.text(a.first().text()),
i(s, s.sbSelector, a.first(), !0),
(s.isSelected = !0));
},
}),
(e.fn.selectbox = function (t) {
var s = Array.prototype.slice.call(arguments, 1);
return ('string' == typeof t && 'isDisabled' == t) ||
('option' == t &&
2 == arguments.length &&
'string' == typeof arguments[1])
? e.selectbox['_' + t + 'Selectbox'].apply(
e.selectbox,
[this[0]].concat(s),
)
: this.each(function () {
'string' == typeof t
? e.selectbox['_' + t + 'Selectbox'].apply(
e.selectbox,
[this].concat(s),
)
: e.selectbox._attachSelectbox(this, t);
});
}),
(e.selectbox = new s()),
(e.selectbox.version = '0.1.3');
})(jQuery);
},
wmOI: function (e, t, s) {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 });
(t.LEFT_ARROW = 37),
(t.UP_ARROW = 38),
(t.RIGHT_ARROW = 39),
(t.DOWN_ARROW = 40),
(t.ENTER = 13),
(t.ESC = 27),
(t.SPACE = 32),
(t.SLASH = 47);
},
},
]);