quicky-react-messenger
Version:
Messanger chat application for react project
1,186 lines (1,184 loc) • 113 kB
JavaScript
"use strict";
require("core-js/modules/es.string.trim.js");
require("core-js/modules/es.parse-float.js");
require("core-js/modules/es.regexp.exec.js");
require("core-js/modules/es.string.match.js");
require("core-js/modules/es.regexp.to-string.js");
require("core-js/modules/es.regexp.test.js");
require("core-js/modules/es.regexp.constructor.js");
require("core-js/modules/es.parse-int.js");
require("core-js/modules/es.promise.js");
require("core-js/modules/es.object.assign.js");
require("core-js/modules/es.array.sort.js");
require("core-js/modules/es.string.replace.js");
require("core-js/modules/es.array.reverse.js");
require("core-js/modules/es.string.split.js");
require("core-js/modules/es.string.search.js");
require("core-js/modules/es.array.reduce.js");
/*!
* Bootstrap v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
!function (t, e) {
"object" == typeof exports && "undefined" != typeof module ? e(exports, require("jquery")) : "function" == typeof define && define.amd ? define(["exports", "jquery"], e) : e((t = t || self).bootstrap = {}, t.jQuery);
}(void 0, function (t, e) {
"use strict";
function n(t, e) {
for (var n = 0; n < e.length; n++) {
var i = e[n];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
}
}
function i(t, e, i) {
return e && n(t.prototype, e), i && n(t, i), t;
}
function o(t, e, n) {
return e in t ? Object.defineProperty(t, e, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[e] = n, t;
}
function r(t, e) {
var n = Object.keys(t);
if (Object.getOwnPropertySymbols) {
var i = Object.getOwnPropertySymbols(t);
e && (i = i.filter(function (e) {
return Object.getOwnPropertyDescriptor(t, e).enumerable;
})), n.push.apply(n, i);
}
return n;
}
function s(t) {
for (var e = 1; e < arguments.length; e++) {
var n = null != arguments[e] ? arguments[e] : {};
e % 2 ? r(Object(n), !0).forEach(function (e) {
o(t, e, n[e]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : r(Object(n)).forEach(function (e) {
Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e));
});
}
return t;
}
e = e && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
function a(t) {
var n = this,
i = !1;
return e(this).one(l.TRANSITION_END, function () {
i = !0;
}), setTimeout(function () {
i || l.triggerTransitionEnd(n);
}, t), this;
}
var l = {
TRANSITION_END: "bsTransitionEnd",
getUID: function getUID(t) {
do {
t += ~~(1e6 * Math.random());
} while (document.getElementById(t));
return t;
},
getSelectorFromElement: function getSelectorFromElement(t) {
var e = t.getAttribute("data-target");
if (!e || "#" === e) {
var n = t.getAttribute("href");
e = n && "#" !== n ? n.trim() : "";
}
try {
return document.querySelector(e) ? e : null;
} catch (t) {
return null;
}
},
getTransitionDurationFromElement: function getTransitionDurationFromElement(t) {
if (!t) return 0;
var n = e(t).css("transition-duration"),
i = e(t).css("transition-delay"),
o = parseFloat(n),
r = parseFloat(i);
return o || r ? (n = n.split(",")[0], i = i.split(",")[0], 1e3 * (parseFloat(n) + parseFloat(i))) : 0;
},
reflow: function reflow(t) {
return t.offsetHeight;
},
triggerTransitionEnd: function triggerTransitionEnd(t) {
e(t).trigger("transitionend");
},
supportsTransitionEnd: function supportsTransitionEnd() {
return Boolean("transitionend");
},
isElement: function isElement(t) {
return (t[0] || t).nodeType;
},
typeCheckConfig: function typeCheckConfig(t, e, n) {
for (var i in n) if (Object.prototype.hasOwnProperty.call(n, i)) {
var o = n[i],
r = e[i],
s = r && l.isElement(r) ? "element" : null === (a = r) || "undefined" == typeof a ? "" + a : {}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();
if (!new RegExp(o).test(s)) throw new Error(t.toUpperCase() + ': Option "' + i + '" provided type "' + s + '" but expected type "' + o + '".');
}
var a;
},
findShadowRoot: function findShadowRoot(t) {
if (!document.documentElement.attachShadow) return null;
if ("function" == typeof t.getRootNode) {
var e = t.getRootNode();
return e instanceof ShadowRoot ? e : null;
}
return t instanceof ShadowRoot ? t : t.parentNode ? l.findShadowRoot(t.parentNode) : null;
},
jQueryDetection: function jQueryDetection() {
if ("undefined" == typeof e) throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");
var t = e.fn.jquery.split(" ")[0].split(".");
if (t[0] < 2 && t[1] < 9 || 1 === t[0] && 9 === t[1] && t[2] < 1 || t[0] >= 4) throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0");
}
};
l.jQueryDetection(), e.fn.emulateTransitionEnd = a, e.event.special[l.TRANSITION_END] = {
bindType: "transitionend",
delegateType: "transitionend",
handle: function handle(t) {
if (e(t.target).is(this)) return t.handleObj.handler.apply(this, arguments);
}
};
var c = "alert",
u = e.fn[c],
h = function () {
function t(t) {
this._element = t;
}
var n = t.prototype;
return n.close = function (t) {
var e = this._element;
t && (e = this._getRootElement(t)), this._triggerCloseEvent(e).isDefaultPrevented() || this._removeElement(e);
}, n.dispose = function () {
e.removeData(this._element, "bs.alert"), this._element = null;
}, n._getRootElement = function (t) {
var n = l.getSelectorFromElement(t),
i = !1;
return n && (i = document.querySelector(n)), i || (i = e(t).closest(".alert")[0]), i;
}, n._triggerCloseEvent = function (t) {
var n = e.Event("close.bs.alert");
return e(t).trigger(n), n;
}, n._removeElement = function (t) {
var n = this;
if (e(t).removeClass("show"), e(t).hasClass("fade")) {
var i = l.getTransitionDurationFromElement(t);
e(t).one(l.TRANSITION_END, function (e) {
return n._destroyElement(t, e);
}).emulateTransitionEnd(i);
} else this._destroyElement(t);
}, n._destroyElement = function (t) {
e(t).detach().trigger("closed.bs.alert").remove();
}, t._jQueryInterface = function (n) {
return this.each(function () {
var i = e(this),
o = i.data("bs.alert");
o || (o = new t(this), i.data("bs.alert", o)), "close" === n && o[n](this);
});
}, t._handleDismiss = function (t) {
return function (e) {
e && e.preventDefault(), t.close(this);
};
}, i(t, null, [{
key: "VERSION",
get: function get() {
return "4.5.0";
}
}]), t;
}();
e(document).on("click.bs.alert.data-api", '[data-dismiss="alert"]', h._handleDismiss(new h())), e.fn[c] = h._jQueryInterface, e.fn[c].Constructor = h, e.fn[c].noConflict = function () {
return e.fn[c] = u, h._jQueryInterface;
};
var f = e.fn.button,
d = function () {
function t(t) {
this._element = t;
}
var n = t.prototype;
return n.toggle = function () {
var t = !0,
n = !0,
i = e(this._element).closest('[data-toggle="buttons"]')[0];
if (i) {
var o = this._element.querySelector('input:not([type="hidden"])');
if (o) {
if ("radio" === o.type) if (o.checked && this._element.classList.contains("active")) t = !1;else {
var r = i.querySelector(".active");
r && e(r).removeClass("active");
}
t && ("checkbox" !== o.type && "radio" !== o.type || (o.checked = !this._element.classList.contains("active")), e(o).trigger("change")), o.focus(), n = !1;
}
}
this._element.hasAttribute("disabled") || this._element.classList.contains("disabled") || (n && this._element.setAttribute("aria-pressed", !this._element.classList.contains("active")), t && e(this._element).toggleClass("active"));
}, n.dispose = function () {
e.removeData(this._element, "bs.button"), this._element = null;
}, t._jQueryInterface = function (n) {
return this.each(function () {
var i = e(this).data("bs.button");
i || (i = new t(this), e(this).data("bs.button", i)), "toggle" === n && i[n]();
});
}, i(t, null, [{
key: "VERSION",
get: function get() {
return "4.5.0";
}
}]), t;
}();
e(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function (t) {
var n = t.target,
i = n;
if (e(n).hasClass("btn") || (n = e(n).closest(".btn")[0]), !n || n.hasAttribute("disabled") || n.classList.contains("disabled")) t.preventDefault();else {
var o = n.querySelector('input:not([type="hidden"])');
if (o && (o.hasAttribute("disabled") || o.classList.contains("disabled"))) return void t.preventDefault();
"LABEL" === i.tagName && o && "checkbox" === o.type && t.preventDefault(), d._jQueryInterface.call(e(n), "toggle");
}
}).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function (t) {
var n = e(t.target).closest(".btn")[0];
e(n).toggleClass("focus", /^focus(in)?$/.test(t.type));
}), e(window).on("load.bs.button.data-api", function () {
for (var t = [].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')), e = 0, n = t.length; e < n; e++) {
var i = t[e],
o = i.querySelector('input:not([type="hidden"])');
o.checked || o.hasAttribute("checked") ? i.classList.add("active") : i.classList.remove("active");
}
for (var r = 0, s = (t = [].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length; r < s; r++) {
var a = t[r];
"true" === a.getAttribute("aria-pressed") ? a.classList.add("active") : a.classList.remove("active");
}
}), e.fn.button = d._jQueryInterface, e.fn.button.Constructor = d, e.fn.button.noConflict = function () {
return e.fn.button = f, d._jQueryInterface;
};
var p = "carousel",
m = ".bs.carousel",
g = e.fn[p],
v = {
interval: 5e3,
keyboard: !0,
slide: !1,
pause: "hover",
wrap: !0,
touch: !0
},
_ = {
interval: "(number|boolean)",
keyboard: "boolean",
slide: "(boolean|string)",
pause: "(string|boolean)",
wrap: "boolean",
touch: "boolean"
},
b = {
TOUCH: "touch",
PEN: "pen"
},
y = function () {
function t(t, e) {
this._items = null, this._interval = null, this._activeElement = null, this._isPaused = !1, this._isSliding = !1, this.touchTimeout = null, this.touchStartX = 0, this.touchDeltaX = 0, this._config = this._getConfig(e), this._element = t, this._indicatorsElement = this._element.querySelector(".carousel-indicators"), this._touchSupported = "ontouchstart" in document.documentElement || navigator.maxTouchPoints > 0, this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent), this._addEventListeners();
}
var n = t.prototype;
return n.next = function () {
this._isSliding || this._slide("next");
}, n.nextWhenVisible = function () {
!document.hidden && e(this._element).is(":visible") && "hidden" !== e(this._element).css("visibility") && this.next();
}, n.prev = function () {
this._isSliding || this._slide("prev");
}, n.pause = function (t) {
t || (this._isPaused = !0), this._element.querySelector(".carousel-item-next, .carousel-item-prev") && (l.triggerTransitionEnd(this._element), this.cycle(!0)), clearInterval(this._interval), this._interval = null;
}, n.cycle = function (t) {
t || (this._isPaused = !1), this._interval && (clearInterval(this._interval), this._interval = null), this._config.interval && !this._isPaused && (this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval));
}, n.to = function (t) {
var n = this;
this._activeElement = this._element.querySelector(".active.carousel-item");
var i = this._getItemIndex(this._activeElement);
if (!(t > this._items.length - 1 || t < 0)) if (this._isSliding) e(this._element).one("slid.bs.carousel", function () {
return n.to(t);
});else {
if (i === t) return this.pause(), void this.cycle();
var o = t > i ? "next" : "prev";
this._slide(o, this._items[t]);
}
}, n.dispose = function () {
e(this._element).off(m), e.removeData(this._element, "bs.carousel"), this._items = null, this._config = null, this._element = null, this._interval = null, this._isPaused = null, this._isSliding = null, this._activeElement = null, this._indicatorsElement = null;
}, n._getConfig = function (t) {
return t = s(s({}, v), t), l.typeCheckConfig(p, t, _), t;
}, n._handleSwipe = function () {
var t = Math.abs(this.touchDeltaX);
if (!(t <= 40)) {
var e = t / this.touchDeltaX;
this.touchDeltaX = 0, e > 0 && this.prev(), e < 0 && this.next();
}
}, n._addEventListeners = function () {
var t = this;
this._config.keyboard && e(this._element).on("keydown.bs.carousel", function (e) {
return t._keydown(e);
}), "hover" === this._config.pause && e(this._element).on("mouseenter.bs.carousel", function (e) {
return t.pause(e);
}).on("mouseleave.bs.carousel", function (e) {
return t.cycle(e);
}), this._config.touch && this._addTouchEventListeners();
}, n._addTouchEventListeners = function () {
var t = this;
if (this._touchSupported) {
var n = function n(e) {
t._pointerEvent && b[e.originalEvent.pointerType.toUpperCase()] ? t.touchStartX = e.originalEvent.clientX : t._pointerEvent || (t.touchStartX = e.originalEvent.touches[0].clientX);
},
i = function i(e) {
t._pointerEvent && b[e.originalEvent.pointerType.toUpperCase()] && (t.touchDeltaX = e.originalEvent.clientX - t.touchStartX), t._handleSwipe(), "hover" === t._config.pause && (t.pause(), t.touchTimeout && clearTimeout(t.touchTimeout), t.touchTimeout = setTimeout(function (e) {
return t.cycle(e);
}, 500 + t._config.interval));
};
e(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel", function (t) {
return t.preventDefault();
}), this._pointerEvent ? (e(this._element).on("pointerdown.bs.carousel", function (t) {
return n(t);
}), e(this._element).on("pointerup.bs.carousel", function (t) {
return i(t);
}), this._element.classList.add("pointer-event")) : (e(this._element).on("touchstart.bs.carousel", function (t) {
return n(t);
}), e(this._element).on("touchmove.bs.carousel", function (e) {
return function (e) {
e.originalEvent.touches && e.originalEvent.touches.length > 1 ? t.touchDeltaX = 0 : t.touchDeltaX = e.originalEvent.touches[0].clientX - t.touchStartX;
}(e);
}), e(this._element).on("touchend.bs.carousel", function (t) {
return i(t);
}));
}
}, n._keydown = function (t) {
if (!/input|textarea/i.test(t.target.tagName)) switch (t.which) {
case 37:
t.preventDefault(), this.prev();
break;
case 39:
t.preventDefault(), this.next();
}
}, n._getItemIndex = function (t) {
return this._items = t && t.parentNode ? [].slice.call(t.parentNode.querySelectorAll(".carousel-item")) : [], this._items.indexOf(t);
}, n._getItemByDirection = function (t, e) {
var n = "next" === t,
i = "prev" === t,
o = this._getItemIndex(e),
r = this._items.length - 1;
if ((i && 0 === o || n && o === r) && !this._config.wrap) return e;
var s = (o + ("prev" === t ? -1 : 1)) % this._items.length;
return -1 === s ? this._items[this._items.length - 1] : this._items[s];
}, n._triggerSlideEvent = function (t, n) {
var i = this._getItemIndex(t),
o = this._getItemIndex(this._element.querySelector(".active.carousel-item")),
r = e.Event("slide.bs.carousel", {
relatedTarget: t,
direction: n,
from: o,
to: i
});
return e(this._element).trigger(r), r;
}, n._setActiveIndicatorElement = function (t) {
if (this._indicatorsElement) {
var n = [].slice.call(this._indicatorsElement.querySelectorAll(".active"));
e(n).removeClass("active");
var i = this._indicatorsElement.children[this._getItemIndex(t)];
i && e(i).addClass("active");
}
}, n._slide = function (t, n) {
var i,
o,
r,
s = this,
a = this._element.querySelector(".active.carousel-item"),
c = this._getItemIndex(a),
u = n || a && this._getItemByDirection(t, a),
h = this._getItemIndex(u),
f = Boolean(this._interval);
if ("next" === t ? (i = "carousel-item-left", o = "carousel-item-next", r = "left") : (i = "carousel-item-right", o = "carousel-item-prev", r = "right"), u && e(u).hasClass("active")) this._isSliding = !1;else if (!this._triggerSlideEvent(u, r).isDefaultPrevented() && a && u) {
this._isSliding = !0, f && this.pause(), this._setActiveIndicatorElement(u);
var d = e.Event("slid.bs.carousel", {
relatedTarget: u,
direction: r,
from: c,
to: h
});
if (e(this._element).hasClass("slide")) {
e(u).addClass(o), l.reflow(u), e(a).addClass(i), e(u).addClass(i);
var p = parseInt(u.getAttribute("data-interval"), 10);
p ? (this._config.defaultInterval = this._config.defaultInterval || this._config.interval, this._config.interval = p) : this._config.interval = this._config.defaultInterval || this._config.interval;
var m = l.getTransitionDurationFromElement(a);
e(a).one(l.TRANSITION_END, function () {
e(u).removeClass(i + " " + o).addClass("active"), e(a).removeClass("active " + o + " " + i), s._isSliding = !1, setTimeout(function () {
return e(s._element).trigger(d);
}, 0);
}).emulateTransitionEnd(m);
} else e(a).removeClass("active"), e(u).addClass("active"), this._isSliding = !1, e(this._element).trigger(d);
f && this.cycle();
}
}, t._jQueryInterface = function (n) {
return this.each(function () {
var i = e(this).data("bs.carousel"),
o = s(s({}, v), e(this).data());
"object" == typeof n && (o = s(s({}, o), n));
var r = "string" == typeof n ? n : o.slide;
if (i || (i = new t(this, o), e(this).data("bs.carousel", i)), "number" == typeof n) i.to(n);else if ("string" == typeof r) {
if ("undefined" == typeof i[r]) throw new TypeError('No method named "' + r + '"');
i[r]();
} else o.interval && o.ride && (i.pause(), i.cycle());
});
}, t._dataApiClickHandler = function (n) {
var i = l.getSelectorFromElement(this);
if (i) {
var o = e(i)[0];
if (o && e(o).hasClass("carousel")) {
var r = s(s({}, e(o).data()), e(this).data()),
a = this.getAttribute("data-slide-to");
a && (r.interval = !1), t._jQueryInterface.call(e(o), r), a && e(o).data("bs.carousel").to(a), n.preventDefault();
}
}
}, i(t, null, [{
key: "VERSION",
get: function get() {
return "4.5.0";
}
}, {
key: "Default",
get: function get() {
return v;
}
}]), t;
}();
e(document).on("click.bs.carousel.data-api", "[data-slide], [data-slide-to]", y._dataApiClickHandler), e(window).on("load.bs.carousel.data-api", function () {
for (var t = [].slice.call(document.querySelectorAll('[data-ride="carousel"]')), n = 0, i = t.length; n < i; n++) {
var o = e(t[n]);
y._jQueryInterface.call(o, o.data());
}
}), e.fn[p] = y._jQueryInterface, e.fn[p].Constructor = y, e.fn[p].noConflict = function () {
return e.fn[p] = g, y._jQueryInterface;
};
var w = "collapse",
E = e.fn[w],
T = {
toggle: !0,
parent: ""
},
C = {
toggle: "boolean",
parent: "(string|element)"
},
S = function () {
function t(t, e) {
this._isTransitioning = !1, this._element = t, this._config = this._getConfig(e), this._triggerArray = [].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#' + t.id + '"],[data-toggle="collapse"][data-target="#' + t.id + '"]'));
for (var n = [].slice.call(document.querySelectorAll('[data-toggle="collapse"]')), i = 0, o = n.length; i < o; i++) {
var r = n[i],
s = l.getSelectorFromElement(r),
a = [].slice.call(document.querySelectorAll(s)).filter(function (e) {
return e === t;
});
null !== s && a.length > 0 && (this._selector = s, this._triggerArray.push(r));
}
this._parent = this._config.parent ? this._getParent() : null, this._config.parent || this._addAriaAndCollapsedClass(this._element, this._triggerArray), this._config.toggle && this.toggle();
}
var n = t.prototype;
return n.toggle = function () {
e(this._element).hasClass("show") ? this.hide() : this.show();
}, n.show = function () {
var n,
i,
o = this;
if (!this._isTransitioning && !e(this._element).hasClass("show") && (this._parent && 0 === (n = [].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter(function (t) {
return "string" == typeof o._config.parent ? t.getAttribute("data-parent") === o._config.parent : t.classList.contains("collapse");
})).length && (n = null), !(n && (i = e(n).not(this._selector).data("bs.collapse")) && i._isTransitioning))) {
var r = e.Event("show.bs.collapse");
if (e(this._element).trigger(r), !r.isDefaultPrevented()) {
n && (t._jQueryInterface.call(e(n).not(this._selector), "hide"), i || e(n).data("bs.collapse", null));
var s = this._getDimension();
e(this._element).removeClass("collapse").addClass("collapsing"), this._element.style[s] = 0, this._triggerArray.length && e(this._triggerArray).removeClass("collapsed").attr("aria-expanded", !0), this.setTransitioning(!0);
var a = "scroll" + (s[0].toUpperCase() + s.slice(1)),
c = l.getTransitionDurationFromElement(this._element);
e(this._element).one(l.TRANSITION_END, function () {
e(o._element).removeClass("collapsing").addClass("collapse show"), o._element.style[s] = "", o.setTransitioning(!1), e(o._element).trigger("shown.bs.collapse");
}).emulateTransitionEnd(c), this._element.style[s] = this._element[a] + "px";
}
}
}, n.hide = function () {
var t = this;
if (!this._isTransitioning && e(this._element).hasClass("show")) {
var n = e.Event("hide.bs.collapse");
if (e(this._element).trigger(n), !n.isDefaultPrevented()) {
var i = this._getDimension();
this._element.style[i] = this._element.getBoundingClientRect()[i] + "px", l.reflow(this._element), e(this._element).addClass("collapsing").removeClass("collapse show");
var o = this._triggerArray.length;
if (o > 0) for (var r = 0; r < o; r++) {
var s = this._triggerArray[r],
a = l.getSelectorFromElement(s);
if (null !== a) e([].slice.call(document.querySelectorAll(a))).hasClass("show") || e(s).addClass("collapsed").attr("aria-expanded", !1);
}
this.setTransitioning(!0);
this._element.style[i] = "";
var c = l.getTransitionDurationFromElement(this._element);
e(this._element).one(l.TRANSITION_END, function () {
t.setTransitioning(!1), e(t._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse");
}).emulateTransitionEnd(c);
}
}
}, n.setTransitioning = function (t) {
this._isTransitioning = t;
}, n.dispose = function () {
e.removeData(this._element, "bs.collapse"), this._config = null, this._parent = null, this._element = null, this._triggerArray = null, this._isTransitioning = null;
}, n._getConfig = function (t) {
return (t = s(s({}, T), t)).toggle = Boolean(t.toggle), l.typeCheckConfig(w, t, C), t;
}, n._getDimension = function () {
return e(this._element).hasClass("width") ? "width" : "height";
}, n._getParent = function () {
var n,
i = this;
l.isElement(this._config.parent) ? (n = this._config.parent, "undefined" != typeof this._config.parent.jquery && (n = this._config.parent[0])) : n = document.querySelector(this._config.parent);
var o = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]',
r = [].slice.call(n.querySelectorAll(o));
return e(r).each(function (e, n) {
i._addAriaAndCollapsedClass(t._getTargetFromElement(n), [n]);
}), n;
}, n._addAriaAndCollapsedClass = function (t, n) {
var i = e(t).hasClass("show");
n.length && e(n).toggleClass("collapsed", !i).attr("aria-expanded", i);
}, t._getTargetFromElement = function (t) {
var e = l.getSelectorFromElement(t);
return e ? document.querySelector(e) : null;
}, t._jQueryInterface = function (n) {
return this.each(function () {
var i = e(this),
o = i.data("bs.collapse"),
r = s(s(s({}, T), i.data()), "object" == typeof n && n ? n : {});
if (!o && r.toggle && "string" == typeof n && /show|hide/.test(n) && (r.toggle = !1), o || (o = new t(this, r), i.data("bs.collapse", o)), "string" == typeof n) {
if ("undefined" == typeof o[n]) throw new TypeError('No method named "' + n + '"');
o[n]();
}
});
}, i(t, null, [{
key: "VERSION",
get: function get() {
return "4.5.0";
}
}, {
key: "Default",
get: function get() {
return T;
}
}]), t;
}();
e(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function (t) {
"A" === t.currentTarget.tagName && t.preventDefault();
var n = e(this),
i = l.getSelectorFromElement(this),
o = [].slice.call(document.querySelectorAll(i));
e(o).each(function () {
var t = e(this),
i = t.data("bs.collapse") ? "toggle" : n.data();
S._jQueryInterface.call(t, i);
});
}), e.fn[w] = S._jQueryInterface, e.fn[w].Constructor = S, e.fn[w].noConflict = function () {
return e.fn[w] = E, S._jQueryInterface;
};
var D = "undefined" != typeof window && "undefined" != typeof document && "undefined" != typeof navigator,
k = function () {
for (var t = ["Edge", "Trident", "Firefox"], e = 0; e < t.length; e += 1) if (D && navigator.userAgent.indexOf(t[e]) >= 0) return 1;
return 0;
}();
var N = D && window.Promise ? function (t) {
var e = !1;
return function () {
e || (e = !0, window.Promise.resolve().then(function () {
e = !1, t();
}));
};
} : function (t) {
var e = !1;
return function () {
e || (e = !0, setTimeout(function () {
e = !1, t();
}, k));
};
};
function O(t) {
return t && "[object Function]" === {}.toString.call(t);
}
function A(t, e) {
if (1 !== t.nodeType) return [];
var n = t.ownerDocument.defaultView.getComputedStyle(t, null);
return e ? n[e] : n;
}
function I(t) {
return "HTML" === t.nodeName ? t : t.parentNode || t.host;
}
function x(t) {
if (!t) return document.body;
switch (t.nodeName) {
case "HTML":
case "BODY":
return t.ownerDocument.body;
case "#document":
return t.body;
}
var e = A(t),
n = e.overflow,
i = e.overflowX,
o = e.overflowY;
return /(auto|scroll|overlay)/.test(n + o + i) ? t : x(I(t));
}
function j(t) {
return t && t.referenceNode ? t.referenceNode : t;
}
var L = D && !(!window.MSInputMethodContext || !document.documentMode),
P = D && /MSIE 10/.test(navigator.userAgent);
function F(t) {
return 11 === t ? L : 10 === t ? P : L || P;
}
function R(t) {
if (!t) return document.documentElement;
for (var e = F(10) ? document.body : null, n = t.offsetParent || null; n === e && t.nextElementSibling;) n = (t = t.nextElementSibling).offsetParent;
var i = n && n.nodeName;
return i && "BODY" !== i && "HTML" !== i ? -1 !== ["TH", "TD", "TABLE"].indexOf(n.nodeName) && "static" === A(n, "position") ? R(n) : n : t ? t.ownerDocument.documentElement : document.documentElement;
}
function M(t) {
return null !== t.parentNode ? M(t.parentNode) : t;
}
function B(t, e) {
if (!(t && t.nodeType && e && e.nodeType)) return document.documentElement;
var n = t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING,
i = n ? t : e,
o = n ? e : t,
r = document.createRange();
r.setStart(i, 0), r.setEnd(o, 0);
var s,
a,
l = r.commonAncestorContainer;
if (t !== l && e !== l || i.contains(o)) return "BODY" === (a = (s = l).nodeName) || "HTML" !== a && R(s.firstElementChild) !== s ? R(l) : l;
var c = M(t);
return c.host ? B(c.host, e) : B(t, M(e).host);
}
function q(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "top",
n = "top" === e ? "scrollTop" : "scrollLeft",
i = t.nodeName;
if ("BODY" === i || "HTML" === i) {
var o = t.ownerDocument.documentElement,
r = t.ownerDocument.scrollingElement || o;
return r[n];
}
return t[n];
}
function H(t, e) {
var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2],
i = q(e, "top"),
o = q(e, "left"),
r = n ? -1 : 1;
return t.top += i * r, t.bottom += i * r, t.left += o * r, t.right += o * r, t;
}
function Q(t, e) {
var n = "x" === e ? "Left" : "Top",
i = "Left" === n ? "Right" : "Bottom";
return parseFloat(t["border" + n + "Width"], 10) + parseFloat(t["border" + i + "Width"], 10);
}
function W(t, e, n, i) {
return Math.max(e["offset" + t], e["scroll" + t], n["client" + t], n["offset" + t], n["scroll" + t], F(10) ? parseInt(n["offset" + t]) + parseInt(i["margin" + ("Height" === t ? "Top" : "Left")]) + parseInt(i["margin" + ("Height" === t ? "Bottom" : "Right")]) : 0);
}
function U(t) {
var e = t.body,
n = t.documentElement,
i = F(10) && getComputedStyle(n);
return {
height: W("Height", e, n, i),
width: W("Width", e, n, i)
};
}
var V = function V(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
},
Y = function () {
function t(t, e) {
for (var n = 0; n < e.length; n++) {
var i = e[n];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
}
}
return function (e, n, i) {
return n && t(e.prototype, n), i && t(e, i), e;
};
}(),
z = function z(t, e, n) {
return e in t ? Object.defineProperty(t, e, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[e] = n, t;
},
X = Object.assign || function (t) {
for (var e = 1; e < arguments.length; e++) {
var n = arguments[e];
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
}
return t;
};
function K(t) {
return X({}, t, {
right: t.left + t.width,
bottom: t.top + t.height
});
}
function G(t) {
var e = {};
try {
if (F(10)) {
e = t.getBoundingClientRect();
var n = q(t, "top"),
i = q(t, "left");
e.top += n, e.left += i, e.bottom += n, e.right += i;
} else e = t.getBoundingClientRect();
} catch (t) {}
var o = {
left: e.left,
top: e.top,
width: e.right - e.left,
height: e.bottom - e.top
},
r = "HTML" === t.nodeName ? U(t.ownerDocument) : {},
s = r.width || t.clientWidth || o.width,
a = r.height || t.clientHeight || o.height,
l = t.offsetWidth - s,
c = t.offsetHeight - a;
if (l || c) {
var u = A(t);
l -= Q(u, "x"), c -= Q(u, "y"), o.width -= l, o.height -= c;
}
return K(o);
}
function $(t, e) {
var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2],
i = F(10),
o = "HTML" === e.nodeName,
r = G(t),
s = G(e),
a = x(t),
l = A(e),
c = parseFloat(l.borderTopWidth, 10),
u = parseFloat(l.borderLeftWidth, 10);
n && o && (s.top = Math.max(s.top, 0), s.left = Math.max(s.left, 0));
var h = K({
top: r.top - s.top - c,
left: r.left - s.left - u,
width: r.width,
height: r.height
});
if (h.marginTop = 0, h.marginLeft = 0, !i && o) {
var f = parseFloat(l.marginTop, 10),
d = parseFloat(l.marginLeft, 10);
h.top -= c - f, h.bottom -= c - f, h.left -= u - d, h.right -= u - d, h.marginTop = f, h.marginLeft = d;
}
return (i && !n ? e.contains(a) : e === a && "BODY" !== a.nodeName) && (h = H(h, e)), h;
}
function J(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
n = t.ownerDocument.documentElement,
i = $(t, n),
o = Math.max(n.clientWidth, window.innerWidth || 0),
r = Math.max(n.clientHeight, window.innerHeight || 0),
s = e ? 0 : q(n),
a = e ? 0 : q(n, "left"),
l = {
top: s - i.top + i.marginTop,
left: a - i.left + i.marginLeft,
width: o,
height: r
};
return K(l);
}
function Z(t) {
var e = t.nodeName;
if ("BODY" === e || "HTML" === e) return !1;
if ("fixed" === A(t, "position")) return !0;
var n = I(t);
return !!n && Z(n);
}
function tt(t) {
if (!t || !t.parentElement || F()) return document.documentElement;
for (var e = t.parentElement; e && "none" === A(e, "transform");) e = e.parentElement;
return e || document.documentElement;
}
function et(t, e, n, i) {
var o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4],
r = {
top: 0,
left: 0
},
s = o ? tt(t) : B(t, j(e));
if ("viewport" === i) r = J(s, o);else {
var a = void 0;
"scrollParent" === i ? "BODY" === (a = x(I(e))).nodeName && (a = t.ownerDocument.documentElement) : a = "window" === i ? t.ownerDocument.documentElement : i;
var l = $(a, s, o);
if ("HTML" !== a.nodeName || Z(s)) r = l;else {
var c = U(t.ownerDocument),
u = c.height,
h = c.width;
r.top += l.top - l.marginTop, r.bottom = u + l.top, r.left += l.left - l.marginLeft, r.right = h + l.left;
}
}
var f = "number" == typeof (n = n || 0);
return r.left += f ? n : n.left || 0, r.top += f ? n : n.top || 0, r.right -= f ? n : n.right || 0, r.bottom -= f ? n : n.bottom || 0, r;
}
function nt(t) {
return t.width * t.height;
}
function it(t, e, n, i, o) {
var r = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 0;
if (-1 === t.indexOf("auto")) return t;
var s = et(n, i, r, o),
a = {
top: {
width: s.width,
height: e.top - s.top
},
right: {
width: s.right - e.right,
height: s.height
},
bottom: {
width: s.width,
height: s.bottom - e.bottom
},
left: {
width: e.left - s.left,
height: s.height
}
},
l = Object.keys(a).map(function (t) {
return X({
key: t
}, a[t], {
area: nt(a[t])
});
}).sort(function (t, e) {
return e.area - t.area;
}),
c = l.filter(function (t) {
var e = t.width,
i = t.height;
return e >= n.clientWidth && i >= n.clientHeight;
}),
u = c.length > 0 ? c[0].key : l[0].key,
h = t.split("-")[1];
return u + (h ? "-" + h : "");
}
function ot(t, e, n) {
var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null,
o = i ? tt(e) : B(e, j(n));
return $(n, o, i);
}
function rt(t) {
var e = t.ownerDocument.defaultView.getComputedStyle(t),
n = parseFloat(e.marginTop || 0) + parseFloat(e.marginBottom || 0),
i = parseFloat(e.marginLeft || 0) + parseFloat(e.marginRight || 0);
return {
width: t.offsetWidth + i,
height: t.offsetHeight + n
};
}
function st(t) {
var e = {
left: "right",
right: "left",
bottom: "top",
top: "bottom"
};
return t.replace(/left|right|bottom|top/g, function (t) {
return e[t];
});
}
function at(t, e, n) {
n = n.split("-")[0];
var i = rt(t),
o = {
width: i.width,
height: i.height
},
r = -1 !== ["right", "left"].indexOf(n),
s = r ? "top" : "left",
a = r ? "left" : "top",
l = r ? "height" : "width",
c = r ? "width" : "height";
return o[s] = e[s] + e[l] / 2 - i[l] / 2, o[a] = n === a ? e[a] - i[c] : e[st(a)], o;
}
function lt(t, e) {
return Array.prototype.find ? t.find(e) : t.filter(e)[0];
}
function ct(t, e, n) {
return (void 0 === n ? t : t.slice(0, function (t, e, n) {
if (Array.prototype.findIndex) return t.findIndex(function (t) {
return t[e] === n;
});
var i = lt(t, function (t) {
return t[e] === n;
});
return t.indexOf(i);
}(t, "name", n))).forEach(function (t) {
t.function && console.warn("`modifier.function` is deprecated, use `modifier.fn`!");
var n = t.function || t.fn;
t.enabled && O(n) && (e.offsets.popper = K(e.offsets.popper), e.offsets.reference = K(e.offsets.reference), e = n(e, t));
}), e;
}
function ut() {
if (!this.state.isDestroyed) {
var t = {
instance: this,
styles: {},
arrowStyles: {},
attributes: {},
flipped: !1,
offsets: {}
};
t.offsets.reference = ot(this.state, this.popper, this.reference, this.options.positionFixed), t.placement = it(this.options.placement, t.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding), t.originalPlacement = t.placement, t.positionFixed = this.options.positionFixed, t.offsets.popper = at(this.popper, t.offsets.reference, t.placement), t.offsets.popper.position = this.options.positionFixed ? "fixed" : "absolute", t = ct(this.modifiers, t), this.state.isCreated ? this.options.onUpdate(t) : (this.state.isCreated = !0, this.options.onCreate(t));
}
}
function ht(t, e) {
return t.some(function (t) {
var n = t.name;
return t.enabled && n === e;
});
}
function ft(t) {
for (var e = [!1, "ms", "Webkit", "Moz", "O"], n = t.charAt(0).toUpperCase() + t.slice(1), i = 0; i < e.length; i++) {
var o = e[i],
r = o ? "" + o + n : t;
if ("undefined" != typeof document.body.style[r]) return r;
}
return null;
}
function dt() {
return this.state.isDestroyed = !0, ht(this.modifiers, "applyStyle") && (this.popper.removeAttribute("x-placement"), this.popper.style.position = "", this.popper.style.top = "", this.popper.style.left = "", this.popper.style.right = "", this.popper.style.bottom = "", this.popper.style.willChange = "", this.popper.style[ft("transform")] = ""), this.disableEventListeners(), this.options.removeOnDestroy && this.popper.parentNode.removeChild(this.popper), this;
}
function pt(t) {
var e = t.ownerDocument;
return e ? e.defaultView : window;
}
function mt(t, e, n, i) {
n.updateBound = i, pt(t).addEventListener("resize", n.updateBound, {
passive: !0
});
var o = x(t);
return function t(e, n, i, o) {
var r = "BODY" === e.nodeName,
s = r ? e.ownerDocument.defaultView : e;
s.addEventListener(n, i, {
passive: !0
}), r || t(x(s.parentNode), n, i, o), o.push(s);
}(o, "scroll", n.updateBound, n.scrollParents), n.scrollElement = o, n.eventsEnabled = !0, n;
}
function gt() {
this.state.eventsEnabled || (this.state = mt(this.reference, this.options, this.state, this.scheduleUpdate));
}
function vt() {
var t, e;
this.state.eventsEnabled && (cancelAnimationFrame(this.scheduleUpdate), this.state = (t = this.reference, e = this.state, pt(t).removeEventListener("resize", e.updateBound), e.scrollParents.forEach(function (t) {
t.removeEventListener("scroll", e.updateBound);
}), e.updateBound = null, e.scrollParents = [], e.scrollElement = null, e.eventsEnabled = !1, e));
}
function _t(t) {
return "" !== t && !isNaN(parseFloat(t)) && isFinite(t);
}
function bt(t, e) {
Object.keys(e).forEach(function (n) {
var i = "";
-1 !== ["width", "height", "top", "right", "bottom", "left"].indexOf(n) && _t(e[n]) && (i = "px"), t.style[n] = e[n] + i;
});
}
var yt = D && /Firefox/i.test(navigator.userAgent);
function wt(t, e, n) {
var i = lt(t, function (t) {
return t.name === e;
}),
o = !!i && t.some(function (t) {
return t.name === n && t.enabled && t.order < i.order;
});
if (!o) {
var r = "`" + e + "`",
s = "`" + n + "`";
console.warn(s + " modifier is required by " + r + " modifier in order to work, be sure to include it before " + r + "!");
}
return o;
}
var Et = ["auto-start", "auto", "auto-end", "top-start", "top", "top-end", "right-start", "right", "right-end", "bottom-end", "bottom", "bottom-start", "left-end", "left", "left-start"],
Tt = Et.slice(3);
function Ct(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
n = Tt.indexOf(t),
i = Tt.slice(n + 1).concat(Tt.slice(0, n));
return e ? i.reverse() : i;
}
var St = "flip",
Dt = "clockwise",
kt = "counterclockwise";
function Nt(t, e, n, i) {
var o = [0, 0],
r = -1 !== ["right", "left"].indexOf(i),
s = t.split(/(\+|\-)/).map(function (t) {
return t.trim();
}),
a = s.indexOf(lt(s, function (t) {
return -1 !== t.search(/,|\s/);
}));
s[a] && -1 === s[a].indexOf(",") && console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");
var l = /\s*,\s*|\s+/,
c = -1 !== a ? [s.slice(0, a).concat([s[a].split(l)[0]]), [s[a].split(l)[1]].concat(s.slice(a + 1))] : [s];
return (c = c.map(function (t, i) {
var o = (1 === i ? !r : r) ? "height" : "width",
s = !1;
return t.reduce(function (t, e) {
return "" === t[t.length - 1] && -1 !== ["+", "-"].indexOf(e) ? (t[t.length - 1] = e, s = !0, t) : s ? (t[t.length - 1] += e, s = !1, t) : t.concat(e);
}, []).map(function (t) {
return function (t, e, n, i) {
var o = t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),
r = +o[1],
s = o[2];
if (!r) return t;
if (0 === s.indexOf("%")) {
var a = void 0;
switch (s) {
case "%p":
a = n;
break;
case "%":
case "%r":
default:
a = i;
}
return K(a)[e] / 100 * r;
}
if ("vh" === s || "vw" === s) {
return ("vh" === s ? Math.max(document.documentElement.clientHeight, window.innerHeight || 0) : Math.max(document.documentElement.clientWidth, window.innerWidth || 0)) / 100 * r;
}
return r;
}(t, o, e, n);
});
})).forEach(function (t, e) {
t.forEach(function (n, i) {
_t(n) && (o[e] += n * ("-" === t[i - 1] ? -1 : 1));
});
}), o;
}
var Ot = {
placement: "bottom",
positionFixed: !1,
eventsEnabled: !0,
removeOnDestroy: !1,
onCreate: function onCreate() {},
onUpdate: function onUpdate() {},
modifiers: {
shift: {
order: 100,
enabled: !0,
fn: function fn(t) {
var e = t.placement,
n = e.split("-")[0],
i = e.split("-")[1];
if (i) {
var o = t.offsets,
r = o.reference,
s = o.popper,
a = -1 !== ["bottom", "top"].indexOf(n),
l = a ? "left" : "top",
c = a ? "width" : "height",
u = {
start: z({}, l, r[l]),
end: z({}, l, r[l] + r[c] - s[c])
};
t.offsets.popper = X({}, s, u[i]);
}
return t;
}
},
offset: {
order: 200,
enabled: !0,
fn: function fn(t, e) {
var n = e.offset,
i = t.placement,
o = t.offsets,
r = o.popper,
s = o.reference,
a = i.split("-")[0],
l = void 0;
return l = _t(+n) ? [+n, 0] : Nt(n, r, s, a), "left" === a ? (r.top += l[0], r.left -= l[1]) : "right" === a ? (r.top += l[0], r.left += l[1]) : "top" === a ? (r.left += l[0], r.top -= l[1]) : "bottom" === a && (r.left += l[0], r.top += l[1]), t.popper = r, t;
},
offset: 0
},
preventOverflow: {
order: 300,
enabled: !0,
fn: function fn(t, e) {
var n = e.boundariesElement || R(t.instance.popper);
t.instance.reference === n && (n = R(n));
var i = ft("transform"),
o = t.instance.popper.style,
r = o.top,
s = o.left,
a = o[i];
o.top = "", o.left = "", o[i] = "";
var l = et(t.instance.popper, t.instance.reference, e.padding, n, t.positionFixed);
o.top = r, o.left = s, o[i] = a, e.boundaries = l;
var c = e.priority,
u = t.offsets.popper,
h = {
primary: function primary(t) {
var n = u[t];
return u[t] < l[t] && !e.escapeWithReference && (n = Math.max(u[t], l[t])), z({}, t, n);
},
secondary: function secondary(t) {
var n = "right" === t ? "left" : "top",
i = u[n];
return u[t] > l[t] && !e.escapeWithReference && (i = Math.min(u[n], l[t] - ("right" === t ? u.width : u.height))), z({}, n, i);
}
};
return c.forEach(function (t) {
var e = -1 !== ["left", "top"].indexOf(t) ? "primary" : "secondary";
u = X({}, u, h[e](t));
}), t.offsets.popper = u, t;
},
priority: ["left", "right", "top", "bottom"],
padding: 5,
boundariesElement: "scrollParent"
},
keepTogether: {
order: 400,
enabled: !0,
fn: function fn(t) {
var e = t.offsets,
n = e.popper,
i = e.reference,
o = t.placement.split("-")[0],
r = Math.floor,
s = -1 !== ["top", "bottom"].indexOf(o),
a = s ? "right" : "bottom",
l = s ? "left" : "top",
c = s ? "width" : "height";
return n[a] < r(i[l]) && (t.offsets.popper[l] = r(i[l]) - n[c]), n[l] > r(i[a]) && (t.offsets.popper[l] = r(i[a])), t;
}
},
arrow: {
order: 500,
enabled: !0,
fn: function fn(t, e) {
var n;
if (!wt(t.instance.modifiers, "arrow", "keepTogether")) return t;
var i = e.element;
if ("string" == typeof i) {
if (!(i = t.instance.popper.querySelector(i))) return t;
} else if (!t.instance.popper.contains(i)) return console.warn("WARNING: `arrow.element` must be child of its popper element!"), t;
var o = t.placement.split("-")[0],
r = t.offsets,
s = r.popper,
a = r.reference,
l = -1 !== ["left", "right"].indexOf(o),
c = l ? "height" : "width",
u = l ? "Top" : "Left",
h = u.toLowerCase(),
f = l ? "left" : "top",
d = l ? "bottom" : "right",
p = rt(i)[c];
a[d] - p < s[h