@proton/ccxt
Version:
A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 130+ exchanges
869 lines • 148 kB
JavaScript
!function(e, t) {
"object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).binanceBrokerPortalSdk = {})
}(this, (function(e) {
"use strict";
var t = function() {
return (t = Object.assign || function(e) {
for (var t, i = 1, s = arguments.length; i < s; i++)
for (var n in t = arguments[i])
Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
return e
}).apply(this, arguments)
},
i = {
apiHost: "",
site: "global",
brokerId: "",
overrideStyle: "",
slideTime: 1e100,
},
s = function() {
if ("undefined" != typeof window && "undefined" != typeof document) {
var e = document,
t = window,
i = function(e) {
for (var t = 0; t < e.length; t += 1)
this[t] = e[t];
return this.length = e.length, this
};
k.fn = i.prototype,
k.Class = i,
k.Dom7 = i;
var s = {
addClass: function(e) {
if (void 0 === e)
return this;
for (var t = e.split(" "), i = 0; i < t.length; i += 1)
for (var s = 0; s < this.length; s += 1)
void 0 !== this[s] && void 0 !== this[s].classList && this[s].classList.add(t[i]);
return this
},
removeClass: function(e) {
for (var t = e.split(" "), i = 0; i < t.length; i += 1)
for (var s = 0; s < this.length; s += 1)
void 0 !== this[s] && void 0 !== this[s].classList && this[s].classList.remove(t[i]);
return this
},
hasClass: function(e) {
return !!this[0] && this[0].classList.contains(e)
},
toggleClass: function(e) {
for (var t = e.split(" "), i = 0; i < t.length; i += 1)
for (var s = 0; s < this.length; s += 1)
void 0 !== this[s] && void 0 !== this[s].classList && this[s].classList.toggle(t[i]);
return this
},
attr: function(e, t) {
var i = arguments;
if (1 === arguments.length && "string" == typeof e)
return this[0] ? this[0].getAttribute(e) : void 0;
for (var s = 0; s < this.length; s += 1)
if (2 === i.length)
this[s].setAttribute(e, t);
else
for (var n in e)
this[s][n] = e[n],
this[s].setAttribute(n, e[n]);
return this
},
removeAttr: function(e) {
for (var t = 0; t < this.length; t += 1)
this[t].removeAttribute(e);
return this
},
data: function(e, t) {
var i;
if (void 0 !== t) {
for (var s = 0; s < this.length; s += 1)
(i = this[s]).dom7ElementDataStorage || (i.dom7ElementDataStorage = {}),
i.dom7ElementDataStorage[e] = t;
return this
}
if (i = this[0]) {
if (i.dom7ElementDataStorage && e in i.dom7ElementDataStorage)
return i.dom7ElementDataStorage[e];
var n = i.getAttribute("data-" + e);
return n || void 0
}
},
transform: function(e) {
for (var t = 0; t < this.length; t += 1) {
var i = this[t].style;
i.webkitTransform = e,
i.transform = e
}
return this
},
transition: function(e) {
"string" != typeof e && (e += "ms");
for (var t = 0; t < this.length; t += 1) {
var i = this[t].style;
i.webkitTransitionDuration = e,
i.transitionDuration = e
}
return this
},
on: function() {
for (var e, t = [], i = arguments.length; i--;)
t[i] = arguments[i];
var s = t[0],
n = t[1],
r = t[2],
a = t[3];
function o(e) {
var t = e.target;
if (t) {
var i = e.target.dom7EventData || [];
if (i.indexOf(e) < 0 && i.unshift(e), k(t).is(n))
r.apply(t, i);
else
for (var s = k(t).parents(), a = 0; a < s.length; a += 1)
k(s[a]).is(n) && r.apply(s[a], i)
}
}
function l(e) {
var t = e && e.target && e.target.dom7EventData || [];
t.indexOf(e) < 0 && t.unshift(e),
r.apply(this, t)
}
"function" == typeof t[1] && (s = (e = t)[0], r = e[1], a = e[2], n = void 0),
a || (a = !1);
for (var d, h = s.split(" "), p = 0; p < this.length; p += 1) {
var u = this[p];
if (n)
for (d = 0; d < h.length; d += 1) {
var c = h[d];
u.dom7LiveListeners || (u.dom7LiveListeners = {}),
u.dom7LiveListeners[c] || (u.dom7LiveListeners[c] = []),
u.dom7LiveListeners[c].push({
listener: r,
proxyListener: o
}),
u.addEventListener(c, o, a)
}
else
for (d = 0; d < h.length; d += 1) {
var v = h[d];
u.dom7Listeners || (u.dom7Listeners = {}),
u.dom7Listeners[v] || (u.dom7Listeners[v] = []),
u.dom7Listeners[v].push({
listener: r,
proxyListener: l
}),
u.addEventListener(v, l, a)
}
}
return this
},
off: function() {
for (var e, t = [], i = arguments.length; i--;)
t[i] = arguments[i];
var s = t[0],
n = t[1],
r = t[2],
a = t[3];
"function" == typeof t[1] && (s = (e = t)[0], r = e[1], a = e[2], n = void 0),
a || (a = !1);
for (var o = s.split(" "), l = 0; l < o.length; l += 1)
for (var d = o[l], h = 0; h < this.length; h += 1) {
var p = this[h],
u = void 0;
if (!n && p.dom7Listeners ? u = p.dom7Listeners[d] : n && p.dom7LiveListeners && (u = p.dom7LiveListeners[d]), u && u.length)
for (var c = u.length - 1; c >= 0; c -= 1) {
var v = u[c];
r && v.listener === r ? (p.removeEventListener(d, v.proxyListener, a), u.splice(c, 1)) : r || (p.removeEventListener(d, v.proxyListener, a), u.splice(c, 1))
}
}
return this
},
trigger: function() {
for (var i = [], s = arguments.length; s--;)
i[s] = arguments[s];
for (var n = i[0].split(" "), r = i[1], a = 0; a < n.length; a += 1)
for (var o = n[a], l = 0; l < this.length; l += 1) {
var d = this[l],
h = void 0;
try {
h = new t.CustomEvent(o, {
detail: r,
bubbles: !0,
cancelable: !0
})
} catch (t) {
(h = e.createEvent("Event")).initEvent(o, !0, !0),
h.detail = r
}
d.dom7EventData = i.filter((function(e, t) {
return t > 0
})),
d.dispatchEvent(h),
d.dom7EventData = [],
delete d.dom7EventData
}
return this
},
transitionEnd: function(e) {
var t,
i = ["webkitTransitionEnd", "transitionend"],
s = this;
function n(r) {
if (r.target === this)
for (e.call(this, r), t = 0; t < i.length; t += 1)
s.off(i[t], n)
}
if (e)
for (t = 0; t < i.length; t += 1)
s.on(i[t], n);
return this
},
outerWidth: function(e) {
if (this.length > 0) {
if (e) {
var t = this.styles();
return this[0].offsetWidth + parseFloat(t.getPropertyValue("margin-right")) + parseFloat(t.getPropertyValue("margin-left"))
}
return this[0].offsetWidth
}
return null
},
outerHeight: function(e) {
if (this.length > 0) {
if (e) {
var t = this.styles();
return this[0].offsetHeight + parseFloat(t.getPropertyValue("margin-top")) + parseFloat(t.getPropertyValue("margin-bottom"))
}
return this[0].offsetHeight
}
return null
},
offset: function() {
if (this.length > 0) {
var i = this[0],
s = i.getBoundingClientRect(),
n = e.body,
r = i.clientTop || n.clientTop || 0,
a = i.clientLeft || n.clientLeft || 0,
o = i === t ? t.scrollY : i.scrollTop,
l = i === t ? t.scrollX : i.scrollLeft;
return {
top: s.top + o - r,
left: s.left + l - a
}
}
return null
},
css: function(e, i) {
var s;
if (1 === arguments.length) {
if ("string" != typeof e) {
for (s = 0; s < this.length; s += 1)
for (var n in e)
this[s].style[n] = e[n];
return this
}
if (this[0])
return t.getComputedStyle(this[0], null).getPropertyValue(e)
}
if (2 === arguments.length && "string" == typeof e) {
for (s = 0; s < this.length; s += 1)
this[s].style[e] = i;
return this
}
return this
},
each: function(e) {
if (!e)
return this;
for (var t = 0; t < this.length; t += 1)
if (!1 === e.call(this[t], t, this[t]))
return this;
return this
},
html: function(e) {
if (void 0 === e)
return this[0] ? this[0].innerHTML : void 0;
for (var t = 0; t < this.length; t += 1)
this[t].innerHTML = e;
return this
},
text: function(e) {
if (void 0 === e)
return this[0] ? this[0].textContent.trim() : null;
for (var t = 0; t < this.length; t += 1)
this[t].textContent = e;
return this
},
is: function(s) {
var n,
r,
a = this[0];
if (!a || void 0 === s)
return !1;
if ("string" == typeof s) {
if (a.matches)
return a.matches(s);
if (a.webkitMatchesSelector)
return a.webkitMatchesSelector(s);
if (a.msMatchesSelector)
return a.msMatchesSelector(s);
for (n = k(s), r = 0; r < n.length; r += 1)
if (n[r] === a)
return !0;
return !1
}
if (s === e)
return a === e;
if (s === t)
return a === t;
if (s.nodeType || s instanceof i) {
for (n = s.nodeType ? [s] : s, r = 0; r < n.length; r += 1)
if (n[r] === a)
return !0;
return !1
}
return !1
},
index: function() {
var e,
t = this[0];
if (t) {
for (e = 0; null !== (t = t.previousSibling);)
1 === t.nodeType && (e += 1);
return e
}
},
eq: function(e) {
if (void 0 === e)
return this;
var t,
s = this.length;
return new i(e > s - 1 ? [] : e < 0 ? (t = s + e) < 0 ? [] : [this[t]] : [this[e]])
},
append: function() {
for (var t, s = [], n = arguments.length; n--;)
s[n] = arguments[n];
for (var r = 0; r < s.length; r += 1) {
t = s[r];
for (var a = 0; a < this.length; a += 1)
if ("string" == typeof t) {
var o = e.createElement("div");
for (o.innerHTML = t; o.firstChild;)
this[a].appendChild(o.firstChild)
} else if (t instanceof i)
for (var l = 0; l < t.length; l += 1)
this[a].appendChild(t[l]);
else
this[a].appendChild(t)
}
return this
},
prepend: function(t) {
var s,
n;
for (s = 0; s < this.length; s += 1)
if ("string" == typeof t) {
var r = e.createElement("div");
for (r.innerHTML = t, n = r.childNodes.length - 1; n >= 0; n -= 1)
this[s].insertBefore(r.childNodes[n], this[s].childNodes[0])
} else if (t instanceof i)
for (n = 0; n < t.length; n += 1)
this[s].insertBefore(t[n], this[s].childNodes[0]);
else
this[s].insertBefore(t, this[s].childNodes[0]);
return this
},
next: function(e) {
return this.length > 0 ? e ? this[0].nextElementSibling && k(this[0].nextElementSibling).is(e) ? new i([this[0].nextElementSibling]) : new i([]) : this[0].nextElementSibling ? new i([this[0].nextElementSibling]) : new i([]) : new i([])
},
nextAll: function(e) {
var t = [],
s = this[0];
if (!s)
return new i([]);
for (; s.nextElementSibling;) {
var n = s.nextElementSibling;
e ? k(n).is(e) && t.push(n) : t.push(n),
s = n
}
return new i(t)
},
prev: function(e) {
if (this.length > 0) {
var t = this[0];
return e ? t.previousElementSibling && k(t.previousElementSibling).is(e) ? new i([t.previousElementSibling]) : new i([]) : t.previousElementSibling ? new i([t.previousElementSibling]) : new i([])
}
return new i([])
},
prevAll: function(e) {
var t = [],
s = this[0];
if (!s)
return new i([]);
for (; s.previousElementSibling;) {
var n = s.previousElementSibling;
e ? k(n).is(e) && t.push(n) : t.push(n),
s = n
}
return new i(t)
},
parent: function(e) {
for (var t = [], i = 0; i < this.length; i += 1)
null !== this[i].parentNode && (e ? k(this[i].parentNode).is(e) && t.push(this[i].parentNode) : t.push(this[i].parentNode));
return k(O(t))
},
parents: function(e) {
for (var t = [], i = 0; i < this.length; i += 1)
for (var s = this[i].parentNode; s;)
e ? k(s).is(e) && t.push(s) : t.push(s),
s = s.parentNode;
return k(O(t))
},
closest: function(e) {
var t = this;
return void 0 === e ? new i([]) : (t.is(e) || (t = t.parents(e).eq(0)), t)
},
find: function(e) {
for (var t = [], s = 0; s < this.length; s += 1)
for (var n = this[s].querySelectorAll(e), r = 0; r < n.length; r += 1)
t.push(n[r]);
return new i(t)
},
children: function(e) {
for (var t = [], s = 0; s < this.length; s += 1)
for (var n = this[s].childNodes, r = 0; r < n.length; r += 1)
e ? 1 === n[r].nodeType && k(n[r]).is(e) && t.push(n[r]) : 1 === n[r].nodeType && t.push(n[r]);
return new i(O(t))
},
remove: function() {
for (var e = 0; e < this.length; e += 1)
this[e].parentNode && this[e].parentNode.removeChild(this[e]);
return this
},
add: function() {
for (var e = [], t = arguments.length; t--;)
e[t] = arguments[t];
var i,
s,
n = this;
for (i = 0; i < e.length; i += 1) {
var r = k(e[i]);
for (s = 0; s < r.length; s += 1)
n[n.length] = r[s],
n.length += 1
}
return n
},
styles: function() {
return this[0] ? t.getComputedStyle(this[0], null) : {}
}
};
Object.keys(s).forEach((function(e) {
k.fn[e] = s[e]
}));
var n,
r = {
deleteProps: function(e) {
var t = e;
Object.keys(t).forEach((function(e) {
try {
t[e] = null
} catch (e) {}
try {
delete t[e]
} catch (e) {}
}))
},
nextTick: function(e, t) {
return void 0 === t && (t = 0), setTimeout(e, t)
},
now: function() {
return Date.now()
},
getTranslate: function(e, i) {
var s,
n,
r;
void 0 === i && (i = "x");
var a = t.getComputedStyle(e, null);
return t.WebKitCSSMatrix ? ((n = a.transform || a.webkitTransform).split(",").length > 6 && (n = n.split(", ").map((function(e) {
return e.replace(",", ".")
})).join(", ")), r = new t.WebKitCSSMatrix("none" === n ? "" : n)) : s = (r = a.MozTransform || a.OTransform || a.MsTransform || a.msTransform || a.transform || a.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,")).toString().split(","), "x" === i && (n = t.WebKitCSSMatrix ? r.m41 : 16 === s.length ? parseFloat(s[12]) : parseFloat(s[4])), "y" === i && (n = t.WebKitCSSMatrix ? r.m42 : 16 === s.length ? parseFloat(s[13]) : parseFloat(s[5])), n || 0
},
parseUrlQuery: function(e) {
var i,
s,
n,
r,
a = {},
o = e || t.location.href;
if ("string" == typeof o && o.length)
for (r = (s = (o = o.indexOf("?") > -1 ? o.replace(/\S*\?/, "") : "").split("&").filter((function(e) {
return "" !== e
}))).length, i = 0; i < r; i += 1)
n = s[i].replace(/#\S+/g, "").split("="),
a[decodeURIComponent(n[0])] = void 0 === n[1] ? void 0 : decodeURIComponent(n[1]) || "";
return a
},
isObject: function(e) {
return "object" == typeof e && null !== e && e.constructor && e.constructor === Object
},
extend: function() {
for (var e = [], t = arguments.length; t--;)
e[t] = arguments[t];
for (var i = Object(e[0]), s = 1; s < e.length; s += 1) {
var n = e[s];
if (null != n)
for (var a = Object.keys(Object(n)), o = 0, l = a.length; o < l; o += 1) {
var d = a[o],
h = Object.getOwnPropertyDescriptor(n, d);
void 0 !== h && h.enumerable && (r.isObject(i[d]) && r.isObject(n[d]) ? r.extend(i[d], n[d]) : !r.isObject(i[d]) && r.isObject(n[d]) ? (i[d] = {}, r.extend(i[d], n[d])) : i[d] = n[d])
}
}
return i
}
},
a = (n = e.createElement("div"), {
touch: t.Modernizr && !0 === t.Modernizr.touch || !!("ontouchstart" in t || t.DocumentTouch && e instanceof t.DocumentTouch),
pointerEvents: !!(t.navigator.pointerEnabled || t.PointerEvent || "maxTouchPoints" in t.navigator),
prefixedPointerEvents: !!t.navigator.msPointerEnabled,
transition: function() {
var e = n.style;
return "transition" in e || "webkitTransition" in e || "MozTransition" in e
}(),
transforms3d: t.Modernizr && !0 === t.Modernizr.csstransforms3d || function() {
var e = n.style;
return "webkitPerspective" in e || "MozPerspective" in e || "OPerspective" in e || "MsPerspective" in e || "perspective" in e
}(),
flexbox: function() {
for (var e = n.style, t = "alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "), i = 0; i < t.length; i += 1)
if (t[i] in e)
return !0;
return !1
}(),
observer: "MutationObserver" in t || "WebkitMutationObserver" in t,
passiveListener: function() {
var e = !1;
try {
var i = Object.defineProperty({}, "passive", {
get: function() {
e = !0
}
});
t.addEventListener("testPassiveListener", null, i)
} catch (e) {}
return e
}(),
gestures: "ongesturestart" in t
}),
o = function(e) {
void 0 === e && (e = {});
var t = this;
t.params = e,
t.eventsListeners = {},
t.params && t.params.on && Object.keys(t.params.on).forEach((function(e) {
t.on(e, t.params.on[e])
}))
},
l = {
components: {
configurable: !0
}
};
o.prototype.on = function(e, t, i) {
var s = this;
if ("function" != typeof t)
return s;
var n = i ? "unshift" : "push";
return e.split(" ").forEach((function(e) {
s.eventsListeners[e] || (s.eventsListeners[e] = []),
s.eventsListeners[e][n](t)
})), s
},
o.prototype.once = function(e, t, i) {
var s = this;
return "function" != typeof t ? s : s.on(e, (function i() {
for (var n = [], r = arguments.length; r--;)
n[r] = arguments[r];
t.apply(s, n),
s.off(e, i)
}), i)
},
o.prototype.off = function(e, t) {
var i = this;
return i.eventsListeners ? (e.split(" ").forEach((function(e) {
void 0 === t ? i.eventsListeners[e] = [] : i.eventsListeners[e] && i.eventsListeners[e].length && i.eventsListeners[e].forEach((function(s, n) {
s === t && i.eventsListeners[e].splice(n, 1)
}))
})), i) : i
},
o.prototype.emit = function() {
for (var e = [], t = arguments.length; t--;)
e[t] = arguments[t];
var i,
s,
n,
r = this;
if (!r.eventsListeners)
return r;
"string" == typeof e[0] || Array.isArray(e[0]) ? (i = e[0], s = e.slice(1, e.length), n = r) : (i = e[0].events, s = e[0].data, n = e[0].context || r);
var a = Array.isArray(i) ? i : i.split(" ");
return a.forEach((function(e) {
if (r.eventsListeners && r.eventsListeners[e]) {
var t = [];
r.eventsListeners[e].forEach((function(e) {
t.push(e)
})),
t.forEach((function(e) {
e.apply(n, s)
}))
}
})), r
},
o.prototype.useModulesParams = function(e) {
var t = this;
t.modules && Object.keys(t.modules).forEach((function(i) {
var s = t.modules[i];
s.params && r.extend(e, s.params)
}))
},
o.prototype.useModules = function(e) {
void 0 === e && (e = {});
var t = this;
t.modules && Object.keys(t.modules).forEach((function(i) {
var s = t.modules[i],
n = e[i] || {};
s.instance && Object.keys(s.instance).forEach((function(e) {
var i = s.instance[e];
t[e] = "function" == typeof i ? i.bind(t) : i
})),
s.on && t.on && Object.keys(s.on).forEach((function(e) {
t.on(e, s.on[e])
})),
s.create && s.create.bind(t)(n)
}))
},
l.components.set = function(e) {
this.use && this.use(e)
},
o.installModule = function(e) {
for (var t = [], i = arguments.length - 1; i-- > 0;)
t[i] = arguments[i + 1];
var s = this;
s.prototype.modules || (s.prototype.modules = {});
var n = e.name || Object.keys(s.prototype.modules).length + "_" + r.now();
return s.prototype.modules[n] = e, e.proto && Object.keys(e.proto).forEach((function(t) {
s.prototype[t] = e.proto[t]
})), e.static && Object.keys(e.static).forEach((function(t) {
s[t] = e.static[t]
})), e.install && e.install.apply(s, t), s
},
o.use = function(e) {
for (var t = [], i = arguments.length - 1; i-- > 0;)
t[i] = arguments[i + 1];
var s = this;
return Array.isArray(e) ? (e.forEach((function(e) {
return s.installModule(e)
})), s) : s.installModule.apply(s, [e].concat(t))
},
Object.defineProperties(o, l);
var d,
h = {
updateSize: function() {
var e,
t,
i = this.$el;
e = void 0 !== this.params.width ? this.params.width : i[0].clientWidth,
t = void 0 !== this.params.height ? this.params.height : i[0].clientHeight,
0 === e && this.isHorizontal() || 0 === t && this.isVertical() || (e = e - parseInt(i.css("padding-left"), 10) - parseInt(i.css("padding-right"), 10), t = t - parseInt(i.css("padding-top"), 10) - parseInt(i.css("padding-bottom"), 10), r.extend(this, {
width: e,
height: t,
size: this.isHorizontal() ? e : t
}))
},
updateSlides: function() {
var e = this.params,
i = this.$wrapperEl,
s = this.size,
n = this.rtlTranslate,
o = this.wrongRTL,
l = this.virtual && e.virtual.enabled,
d = l ? this.virtual.slides.length : this.slides.length,
h = i.children("." + this.params.slideClass),
p = l ? this.virtual.slides.length : h.length,
u = [],
c = [],
v = [],
f = e.slidesOffsetBefore;
"function" == typeof f && (f = e.slidesOffsetBefore.call(this));
var m = e.slidesOffsetAfter;
"function" == typeof m && (m = e.slidesOffsetAfter.call(this));
var g = this.snapGrid.length,
w = this.snapGrid.length,
C = e.spaceBetween,
x = -f,
T = 0;
if (void 0 !== s) {
var y,
b;
"string" == typeof C && C.indexOf("%") >= 0 && (C = parseFloat(C.replace("%", "")) / 100 * s),
this.virtualSize = -C,
n ? h.css({
marginLeft: "",
marginTop: ""
}) : h.css({
marginRight: "",
marginBottom: ""
}),
e.slidesPerColumn > 1 && (y = Math.floor(p / e.slidesPerColumn) === p / this.params.slidesPerColumn ? p : Math.ceil(p / e.slidesPerColumn) * e.slidesPerColumn, "auto" !== e.slidesPerView && "row" === e.slidesPerColumnFill && (y = Math.max(y, e.slidesPerView * e.slidesPerColumn)));
for (var S, E = e.slidesPerColumn, M = y / E, L = M - (e.slidesPerColumn * M - p), P = 0; P < p; P += 1) {
b = 0;
var k = h.eq(P);
if (e.slidesPerColumn > 1) {
var O = void 0,
I = void 0,
z = void 0;
"column" === e.slidesPerColumnFill ? (z = P - (I = Math.floor(P / E)) * E, (I > L || I === L && z === E - 1) && (z += 1) >= E && (z = 0, I += 1), O = I + z * y / E, k.css({
"-webkit-box-ordinal-group": O,
"-moz-box-ordinal-group": O,
"-ms-flex-order": O,
"-webkit-order": O,
order: O
})) : I = P - (z = Math.floor(P / M)) * M,
k.css("margin-" + (this.isHorizontal() ? "top" : "left"), 0 !== z && e.spaceBetween && e.spaceBetween + "px").attr("data-swiper-column", I).attr("data-swiper-row", z)
}
if ("none" !== k.css("display")) {
if ("auto" === e.slidesPerView) {
var A = t.getComputedStyle(k[0], null),
D = k[0].style.transform,
B = k[0].style.webkitTransform;
D && (k[0].style.transform = "none"),
B && (k[0].style.webkitTransform = "none"),
b = e.roundLengths ? this.isHorizontal() ? k.outerWidth(!0) : k.outerHeight(!0) : this.isHorizontal() ? parseFloat(A.getPropertyValue("width")) + parseFloat(A.getPropertyValue("margin-left")) + parseFloat(A.getPropertyValue("margin-right")) : parseFloat(A.getPropertyValue("height")) + parseFloat(A.getPropertyValue("margin-top")) + parseFloat(A.getPropertyValue("margin-bottom")),
D && (k[0].style.transform = D),
B && (k[0].style.webkitTransform = B),
e.roundLengths && (b = Math.floor(b))
} else
b = (s - (e.slidesPerView - 1) * C) / e.slidesPerView,
e.roundLengths && (b = Math.floor(b)),
h[P] && (this.isHorizontal() ? h[P].style.width = b + "px" : h[P].style.height = b + "px");
h[P] && (h[P].swiperSlideSize = b),
v.push(b),
e.centeredSlides || (e.roundLengths && (x = Math.floor(x)), T % e.slidesPerGroup == 0 && u.push(x), c.push(x), x = x + b + C),
this.virtualSize += b + C,
T += 1
}
}
if (this.virtualSize = Math.max(this.virtualSize, s) + m, n && o && ("slide" === e.effect || "coverflow" === e.effect) && i.css({
width: this.virtualSize + e.spaceBetween + "px"
}), a.flexbox || (this.isHorizontal() ? i.css({
width: this.virtualSize + e.spaceBetween + "px"
}) : i.css({
height: this.virtualSize + e.spaceBetween + "px"
})), e.slidesPerColumn > 1 && (this.virtualSize = (b + e.spaceBetween) * y, this.virtualSize = Math.ceil(this.virtualSize / e.slidesPerColumn) - e.spaceBetween, this.isHorizontal() ? i.css({
width: this.virtualSize + e.spaceBetween + "px"
}) : i.css({
height: this.virtualSize + e.spaceBetween + "px"
})), !e.centeredSlides) {
S = [];
for (var $ = 0; $ < u.length; $ += 1) {
var N = u[$];
e.roundLengths && (N = Math.floor(N)),
u[$] <= this.virtualSize - s && S.push(N)
}
u = S,
Math.floor(this.virtualSize - s) - Math.floor(u[u.length - 1]) > 1 && u.push(this.virtualSize - s)
}
if (0 === u.length && (u = [0]), 0 !== e.spaceBetween && (this.isHorizontal() ? n ? h.css({
marginLeft: C + "px"
}) : h.css({
marginRight: C + "px"
}) : h.css({
marginBottom: C + "px"
})), e.centerInsufficientSlides) {
var G = 0;
if (v.forEach((function(t) {
G += t + (e.spaceBetween ? e.spaceBetween : 0)
})), (G -= e.spaceBetween) < s) {
var F = (s - G) / 2;
u.forEach((function(e, t) {
u[t] = e - F
})),
c.forEach((function(e, t) {
c[t] = e + F
}))
}
}
r.extend(this, {
slides: h,
snapGrid: u,
slidesGrid: c,
slidesSizesGrid: v
}),
p !== d && this.emit("slidesLengthChange"),
u.length !== g && this.emit("snapGridLengthChange"),
c.length !== w && this.emit("slidesGridLengthChange")
}
},
updateSlidesOffset: function() {
for (var e = this.slides, t = 0; t < e.length; t += 1)
e[t].swiperSlideOffset = this.isHorizontal() ? e[t].offsetLeft : e[t].offsetTop
},
updateSlidesProgress: function(e) {
void 0 === e && (e = this && this.translate || 0);
var t = this.params,
i = this.slides,
s = this.rtlTranslate;
if (0 !== i.length) {
void 0 === i[0].swiperSlideOffset && this.updateSlidesOffset();
var n = -e;
s && (n = e),
i.removeClass(t.slideVisibleClass),
this.visibleSlidesIndexes = [],
this.visibleSlides = [];
for (var r = 0; r < i.length; r += 1) {
var a = i[r],
o = (n + 0 - a.swiperSlideOffset) / (a.swiperSlideSize + t.spaceBetween);
a.progress = s ? -o : o
}
this.visibleSlides = k(this.visibleSlides)
}
},
updateProgress: function(e) {
void 0 === e && (e = this && this.translate || 0),
this.params;
var t = this.maxTranslate() - this.minTranslate(),
i = this.progress,
s = this.isBeginning,
n = this.isEnd,
a = s,
o = n;
0 === t ? (i = 0, s = !0, n = !0) : (s = (i = (e - this.minTranslate()) / t) <= 0, n = i >= 1),
r.extend(this, {
progress: i,
isBeginning: s,
isEnd: n
}),
s && !a && this.emit("reachBeginning toEdge"),
n && !o && this.emit("reachEnd toEdge"),
(a && !s || o && !n) && this.emit("fromEdge"),
this.emit("progress", i)
},
updateSlidesClasses: function() {
var e,
t = this.slides,
i = this.params,
s = this.$wrapperEl,
n = this.activeIndex,
r = this.realIndex,
a = this.virtual && i.virtual.enabled;
t.removeClass(i.slideActiveClass + " " + i.slideNextClass + " " + i.slidePrevClass + " " + i.slideDuplicateActiveClass + " " + i.slideDuplicateNextClass + " " + i.slideDuplicatePrevClass),
(e = a ? this.$wrapperEl.find("." + i.slideClass + '[data-swiper-slide-index="' + n + '"]') : t.eq(n)).addClass(i.slideActiveClass),
i.loop && (e.hasClass(i.slideDuplicateClass) ? s.children("." + i.slideClass + ":not(." + i.slideDuplicateClass + ')[data-swiper-slide-index="' + r + '"]').addClass(i.slideDuplicateActiveClass) : s.children("." + i.slideClass + "." + i.slideDuplicateClass + '[data-swiper-slide-index="' + r + '"]').addClass(i.slideDuplicateActiveClass));
var o = e.nextAll("." + i.slideClass).eq(0).addClass(i.slideNextClass);
i.loop && 0 === o.length && (o = t.eq(0)).addClass(i.slideNextClass);
var l = e.prevAll("." + i.slideClass).eq(0).addClass(i.slidePrevClass);
i.loop && 0 === l.length && (l = t.eq(-1)).addClass(i.slidePrevClass),
i.loop && (o.hasClass(i.slideDuplicateClass) ? s.children("." + i.slideClass + ":not(." + i.slideDuplicateClass + ')[data-swiper-slide-index="' + o.attr("data-swiper-slide-index") + '"]').addClass(i.slideDuplicateNextClass) : s.children("." + i.slideClass + "." + i.slideDuplicateClass + '[data-swiper-slide-index="' + o.attr("data-swiper-slide-index") + '"]').addClass(i.slideDuplicateNextClass), l.hasClass(i.slideDuplicateClass) ? s.children("." + i.slideClass + ":not(." + i.slideDuplicateClass + ')[data-swiper-slide-index="' + l.attr("data-swiper-slide-index") + '"]').addClass(i.slideDuplicatePrevClass) : s.children("." + i.slideClass + "." + i.slideDuplicateClass + '[data-swiper-slide-index="' + l.attr("data-swiper-slide-index") + '"]').addClass(i.slideDuplicatePrevClass))
},
updateActiveIndex: function(e) {
v