mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-11-15 11:39:13 +03:00
1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
|
!function (e, t) { "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.notie = t() : e.notie = t() }(this, function () { return function (e) { var t = {}; function n(s) { if (t[s]) return t[s].exports; var a = t[s] = { i: s, l: !1, exports: {} }; return e[s].call(a.exports, a, a.exports, n), a.l = !0, a.exports } return n.m = e, n.c = t, n.i = function (e) { return e }, n.d = function (e, t, s) { n.o(e, t) || Object.defineProperty(e, t, { configurable: !1, enumerable: !0, get: s }) }, n.n = function (e) { var t = e && e.__esModule ? function () { return e.default } : function () { return e }; return n.d(t, "a", t), t }, n.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, n.p = "", n(n.s = 0) }([function (e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, a = Object.assign || function (e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (e[s] = n[s]) } return e }; var i = "top", c = { alertTime: 3, dateMonths: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], overlayClickDismiss: !0, overlayOpacity: .75, transitionCurve: "ease", transitionDuration: .3, transitionSelector: "all", classes: { container: "notie-container", textbox: "notie-textbox", textboxInner: "notie-textbox-inner", button: "notie-button", element: "notie-element", elementHalf: "notie-element-half", elementThird: "notie-element-third", overlay: "notie-overlay", backgroundSuccess: "notie-background-success", backgroundWarning: "notie-background-warning", backgroundError: "notie-background-error", backgroundInfo: "notie-background-info", backgroundNeutral: "notie-background-neutral", backgroundOverlay: "notie-background-overlay", alert: "notie-alert", inputField: "notie-input-field", selectChoiceRepeated: "notie-select-choice-repeated", dateSelectorInner: "notie-date-selector-inner", dateSelectorUp: "notie-date-selector-up" }, ids: { overlay: "notie-overlay" }, positions: { alert: i, force: i, confirm: i, input: i, select: "bottom", date: i } }, o = t.setOptions = function (e) { c = a({}, c, e, { classes: a({}, c.classes, e.classes), ids: a({}, c.ids, e.ids), positions: a({}, c.positions, e.positions) }) }, l = function () { return new Promise(function (e) { return setTimeout(e, 0) }) }, r = function (e) { return new Promise(function (t) { return setTimeout(t, 1e3 * e) }) }, d = function () { document.activeElement && document.activeElement.blur() }, u = function () { return "notie-" + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (e) { var t = 16 * Math.random() | 0; return ("x" === e ? t : 3 & t | 8).toString(16) }) }, p = { 1: c.classes.backgroundSuccess, success: c.classes.backgroundSuccess, good: c.classes.backgroundSuccess, 2: c.classes.backgroundWarning, warning: c.classes.backgroundWarning, 3: c.classes.backgroundError, error: c.classes.backgroundError, 4: c.classes.backgroundInfo, info: c.classes.backgroundInfo, 5: c.classes.backgroundNeutral, neutral: c.classes.backgroundNeutral }, m = function () { return c.transitionSelector + " " + c.transitionDuration + "s " + c.transitionCurve }, v = function (e) { return 13 === e.keyCode }, f = function (e) { return 27 === e.keyCode }, b = function (e, t) { e.classList.add(c.classes.container), e.style[t] = "-10000px", document.body.appendChild(e), e.style[t] = "-" + e.offsetHeight + "px", e.listener && window.addEventListener("keydown", e.listener), l().then(function () { e.style.transition = m(), e.style[t] = 0 }) }, x = function (e, t) { var n = document.getElementById(e); n && (n.style[t] = "-" + n.offsetHeight + "p
|