/*
 * ATTENTION: An "eval-source-map" devtool has been used.
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else {
		var a = factory();
		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
	}
})(self, function() {
return /******/ (function() { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "./libs/sweetalert2/sweetalert2.js":
/*!*****************************************!*\
  !*** ./libs/sweetalert2/sweetalert2.js ***!
  \*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"Swal\": function() { return /* binding */ Swal; }\n/* harmony export */ });\n/* harmony import */ var sweetalert2_dist_sweetalert2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sweetalert2/dist/sweetalert2 */ \"./node_modules/sweetalert2/dist/sweetalert2.js\");\n/* harmony import */ var sweetalert2_dist_sweetalert2__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sweetalert2_dist_sweetalert2__WEBPACK_IMPORTED_MODULE_0__);\n\nvar Swal = sweetalert2_dist_sweetalert2__WEBPACK_IMPORTED_MODULE_0__.mixin({\n  buttonsStyling: false,\n  customClass: {\n    confirmButton: 'btn btn-primary',\n    cancelButton: 'btn btn-label-danger',\n    denyButton: 'btn btn-label-secondary'\n  }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9saWJzL3N3ZWV0YWxlcnQyL3N3ZWV0YWxlcnQyLmpzLmpzIiwibWFwcGluZ3MiOiI7Ozs7OztBQUEyRDtBQUUzRCxJQUFNQyxJQUFJLEdBQUdELCtEQUFnQixDQUFDO0VBQzVCRyxjQUFjLEVBQUUsS0FBSztFQUNyQkMsV0FBVyxFQUFFO0lBQ1hDLGFBQWEsRUFBRSxpQkFBaUI7SUFDaENDLFlBQVksRUFBRSxzQkFBc0I7SUFDcENDLFVBQVUsRUFBRTtFQUNkO0FBQ0YsQ0FBQyxDQUFDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vVnVleHkvLi9saWJzL3N3ZWV0YWxlcnQyL3N3ZWV0YWxlcnQyLmpzPzE3MWMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgU3dhbFBsdWdpbiBmcm9tICdzd2VldGFsZXJ0Mi9kaXN0L3N3ZWV0YWxlcnQyJztcblxuY29uc3QgU3dhbCA9IFN3YWxQbHVnaW4ubWl4aW4oe1xuICBidXR0b25zU3R5bGluZzogZmFsc2UsXG4gIGN1c3RvbUNsYXNzOiB7XG4gICAgY29uZmlybUJ1dHRvbjogJ2J0biBidG4tcHJpbWFyeScsXG4gICAgY2FuY2VsQnV0dG9uOiAnYnRuIGJ0bi1sYWJlbC1kYW5nZXInLFxuICAgIGRlbnlCdXR0b246ICdidG4gYnRuLWxhYmVsLXNlY29uZGFyeSdcbiAgfVxufSk7XG5cbmV4cG9ydCB7IFN3YWwgfTtcbiJdLCJuYW1lcyI6WyJTd2FsUGx1Z2luIiwiU3dhbCIsIm1peGluIiwiYnV0dG9uc1N0eWxpbmciLCJjdXN0b21DbGFzcyIsImNvbmZpcm1CdXR0b24iLCJjYW5jZWxCdXR0b24iLCJkZW55QnV0dG9uIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./libs/sweetalert2/sweetalert2.js\n");

/***/ }),

/***/ "./node_modules/sweetalert2/dist/sweetalert2.js":
/*!******************************************************!*\
  !*** ./node_modules/sweetalert2/dist/sweetalert2.js ***!
  \******************************************************/
/***/ (function(module) {

eval("/*!\n* sweetalert2 v11.4.38\n* Released under the MIT License.\n*/\n(function (global, factory) {\n   true ? module.exports = factory() :\n  0;\n}(this, function () { 'use strict';\n\n  /**\n   * This module contains `WeakMap`s for each effectively-\"private  property\" that a `Swal` has.\n   * For example, to set the private property \"foo\" of `this` to \"bar\", you can `privateProps.foo.set(this, 'bar')`\n   * This is the approach that Babel will probably take to implement private methods/fields\n   *   https://github.com/tc39/proposal-private-methods\n   *   https://github.com/babel/babel/pull/7555\n   * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*\n   *   then we can use that language feature.\n   */\n  var privateProps = {\n    awaitingPromise: new WeakMap(),\n    promise: new WeakMap(),\n    innerParams: new WeakMap(),\n    domCache: new WeakMap()\n  };\n\n  const swalPrefix = 'swal2-';\n  /**\n   * @param {string[]} items\n   * @returns {object}\n   */\n\n  const prefix = items => {\n    const result = {};\n\n    for (const i in items) {\n      result[items[i]] = swalPrefix + items[i];\n    }\n\n    return result;\n  };\n  const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error', 'no-war']);\n  const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);\n\n  const consolePrefix = 'SweetAlert2:';\n  /**\n   * Filter the unique values into a new array\n   *\n   * @param {Array} arr\n   * @returns {Array}\n   */\n\n  const uniqueArray = arr => {\n    const result = [];\n\n    for (let i = 0; i < arr.length; i++) {\n      if (result.indexOf(arr[i]) === -1) {\n        result.push(arr[i]);\n      }\n    }\n\n    return result;\n  };\n  /**\n   * Capitalize the first letter of a string\n   *\n   * @param {string} str\n   * @returns {string}\n   */\n\n  const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1);\n  /**\n   * Standardize console warnings\n   *\n   * @param {string | Array} message\n   */\n\n  const warn = message => {\n    console.warn(\"\".concat(consolePrefix, \" \").concat(typeof message === 'object' ? message.join(' ') : message));\n  };\n  /**\n   * Standardize console errors\n   *\n   * @param {string} message\n   */\n\n  const error = message => {\n    console.error(\"\".concat(consolePrefix, \" \").concat(message));\n  };\n  /**\n   * Private global state for `warnOnce`\n   *\n   * @type {Array}\n   * @private\n   */\n\n  const previousWarnOnceMessages = [];\n  /**\n   * Show a console warning, but only if it hasn't already been shown\n   *\n   * @param {string} message\n   */\n\n  const warnOnce = message => {\n    if (!previousWarnOnceMessages.includes(message)) {\n      previousWarnOnceMessages.push(message);\n      warn(message);\n    }\n  };\n  /**\n   * Show a one-time console warning about deprecated params/methods\n   *\n   * @param {string} deprecatedParam\n   * @param {string} useInstead\n   */\n\n  const warnAboutDeprecation = (deprecatedParam, useInstead) => {\n    warnOnce(\"\\\"\".concat(deprecatedParam, \"\\\" is deprecated and will be removed in the next major release. Please use \\\"\").concat(useInstead, \"\\\" instead.\"));\n  };\n  /**\n   * If `arg` is a function, call it (with no arguments or context) and return the result.\n   * Otherwise, just pass the value through\n   *\n   * @param {Function | any} arg\n   * @returns {any}\n   */\n\n  const callIfFunction = arg => typeof arg === 'function' ? arg() : arg;\n  /**\n   * @param {any} arg\n   * @returns {boolean}\n   */\n\n  const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function';\n  /**\n   * @param {any} arg\n   * @returns {Promise}\n   */\n\n  const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);\n  /**\n   * @param {any} arg\n   * @returns {boolean}\n   */\n\n  const isPromise = arg => arg && Promise.resolve(arg) === arg;\n  /**\n   * @param {Array} arr\n   * @returns {any}\n   */\n\n  const getRandomElement = arr => arr[Math.floor(Math.random() * arr.length)];\n\n  /**\n   * Gets the popup container which contains the backdrop and the popup itself.\n   *\n   * @returns {HTMLElement | null}\n   */\n\n  const getContainer = () => document.body.querySelector(\".\".concat(swalClasses.container));\n  /**\n   * @param {string} selectorString\n   * @returns {HTMLElement | null}\n   */\n\n  const elementBySelector = selectorString => {\n    const container = getContainer();\n    return container ? container.querySelector(selectorString) : null;\n  };\n  /**\n   * @param {string} className\n   * @returns {HTMLElement | null}\n   */\n\n  const elementByClass = className => {\n    return elementBySelector(\".\".concat(className));\n  };\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n\n  const getPopup = () => elementByClass(swalClasses.popup);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getIcon = () => elementByClass(swalClasses.icon);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getTitle = () => elementByClass(swalClasses.title);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getHtmlContainer = () => elementByClass(swalClasses['html-container']);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getImage = () => elementByClass(swalClasses.image);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getProgressSteps = () => elementByClass(swalClasses['progress-steps']);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getValidationMessage = () => elementByClass(swalClasses['validation-message']);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getConfirmButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.confirm));\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getDenyButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.deny));\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getInputLabel = () => elementByClass(swalClasses['input-label']);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getLoader = () => elementBySelector(\".\".concat(swalClasses.loader));\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getCancelButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.cancel));\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getActions = () => elementByClass(swalClasses.actions);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getFooter = () => elementByClass(swalClasses.footer);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js\n\n  const focusable = \"\\n  a[href],\\n  area[href],\\n  input:not([disabled]),\\n  select:not([disabled]),\\n  textarea:not([disabled]),\\n  button:not([disabled]),\\n  iframe,\\n  object,\\n  embed,\\n  [tabindex=\\\"0\\\"],\\n  [contenteditable],\\n  audio[controls],\\n  video[controls],\\n  summary\\n\";\n  /**\n   * @returns {HTMLElement[]}\n   */\n\n  const getFocusableElements = () => {\n    const focusableElementsWithTabindex = Array.from(getPopup().querySelectorAll('[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])')) // sort according to tabindex\n    .sort((a, b) => {\n      const tabindexA = parseInt(a.getAttribute('tabindex'));\n      const tabindexB = parseInt(b.getAttribute('tabindex'));\n\n      if (tabindexA > tabindexB) {\n        return 1;\n      } else if (tabindexA < tabindexB) {\n        return -1;\n      }\n\n      return 0;\n    });\n    const otherFocusableElements = Array.from(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1');\n    return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el));\n  };\n  /**\n   * @returns {boolean}\n   */\n\n  const isModal = () => {\n    return hasClass(document.body, swalClasses.shown) && !hasClass(document.body, swalClasses['toast-shown']) && !hasClass(document.body, swalClasses['no-backdrop']);\n  };\n  /**\n   * @returns {boolean}\n   */\n\n  const isToast = () => {\n    return getPopup() && hasClass(getPopup(), swalClasses.toast);\n  };\n  /**\n   * @returns {boolean}\n   */\n\n  const isLoading = () => {\n    return getPopup().hasAttribute('data-loading');\n  };\n\n  const states = {\n    previousBodyPadding: null\n  };\n  /**\n   * Securely set innerHTML of an element\n   * https://github.com/sweetalert2/sweetalert2/issues/1926\n   *\n   * @param {HTMLElement} elem\n   * @param {string} html\n   */\n\n  const setInnerHtml = (elem, html) => {\n    elem.textContent = '';\n\n    if (html) {\n      const parser = new DOMParser();\n      const parsed = parser.parseFromString(html, \"text/html\");\n      Array.from(parsed.querySelector('head').childNodes).forEach(child => {\n        elem.appendChild(child);\n      });\n      Array.from(parsed.querySelector('body').childNodes).forEach(child => {\n        if (child instanceof HTMLVideoElement || child instanceof HTMLAudioElement) {\n          elem.appendChild(child.cloneNode(true)); // https://github.com/sweetalert2/sweetalert2/issues/2507\n        } else {\n          elem.appendChild(child);\n        }\n      });\n    }\n  };\n  /**\n   * @param {HTMLElement} elem\n   * @param {string} className\n   * @returns {boolean}\n   */\n\n  const hasClass = (elem, className) => {\n    if (!className) {\n      return false;\n    }\n\n    const classList = className.split(/\\s+/);\n\n    for (let i = 0; i < classList.length; i++) {\n      if (!elem.classList.contains(classList[i])) {\n        return false;\n      }\n    }\n\n    return true;\n  };\n  /**\n   * @param {HTMLElement} elem\n   * @param {SweetAlertOptions} params\n   */\n\n  const removeCustomClasses = (elem, params) => {\n    Array.from(elem.classList).forEach(className => {\n      if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) {\n        elem.classList.remove(className);\n      }\n    });\n  };\n  /**\n   * @param {HTMLElement} elem\n   * @param {SweetAlertOptions} params\n   * @param {string} className\n   */\n\n\n  const applyCustomClass = (elem, params, className) => {\n    removeCustomClasses(elem, params);\n\n    if (params.customClass && params.customClass[className]) {\n      if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) {\n        return warn(\"Invalid type of customClass.\".concat(className, \"! Expected string or iterable object, got \\\"\").concat(typeof params.customClass[className], \"\\\"\"));\n      }\n\n      addClass(elem, params.customClass[className]);\n    }\n  };\n  /**\n   * @param {HTMLElement} popup\n   * @param {import('./renderers/renderInput').InputClass} inputClass\n   * @returns {HTMLInputElement | null}\n   */\n\n  const getInput = (popup, inputClass) => {\n    if (!inputClass) {\n      return null;\n    }\n\n    switch (inputClass) {\n      case 'select':\n      case 'textarea':\n      case 'file':\n        return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses[inputClass]));\n\n      case 'checkbox':\n        return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.checkbox, \" input\"));\n\n      case 'radio':\n        return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.radio, \" input:checked\")) || popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.radio, \" input:first-child\"));\n\n      case 'range':\n        return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.range, \" input\"));\n\n      default:\n        return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.input));\n    }\n  };\n  /**\n   * @param {HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement} input\n   */\n\n  const focusInput = input => {\n    input.focus(); // place cursor at end of text in text input\n\n    if (input.type !== 'file') {\n      // http://stackoverflow.com/a/2345915\n      const val = input.value;\n      input.value = '';\n      input.value = val;\n    }\n  };\n  /**\n   * @param {HTMLElement | HTMLElement[] | null} target\n   * @param {string | string[] | readonly string[]} classList\n   * @param {boolean} condition\n   */\n\n  const toggleClass = (target, classList, condition) => {\n    if (!target || !classList) {\n      return;\n    }\n\n    if (typeof classList === 'string') {\n      classList = classList.split(/\\s+/).filter(Boolean);\n    }\n\n    classList.forEach(className => {\n      if (Array.isArray(target)) {\n        target.forEach(elem => {\n          condition ? elem.classList.add(className) : elem.classList.remove(className);\n        });\n      } else {\n        condition ? target.classList.add(className) : target.classList.remove(className);\n      }\n    });\n  };\n  /**\n   * @param {HTMLElement | HTMLElement[] | null} target\n   * @param {string | string[] | readonly string[]} classList\n   */\n\n  const addClass = (target, classList) => {\n    toggleClass(target, classList, true);\n  };\n  /**\n   * @param {HTMLElement | HTMLElement[] | null} target\n   * @param {string | string[] | readonly string[]} classList\n   */\n\n  const removeClass = (target, classList) => {\n    toggleClass(target, classList, false);\n  };\n  /**\n   * Get direct child of an element by class name\n   *\n   * @param {HTMLElement} elem\n   * @param {string} className\n   * @returns {HTMLElement | null}\n   */\n\n  const getDirectChildByClass = (elem, className) => {\n    const children = Array.from(elem.children);\n\n    for (let i = 0; i < children.length; i++) {\n      const child = children[i];\n\n      if (child instanceof HTMLElement && hasClass(child, className)) {\n        return child;\n      }\n    }\n  };\n  /**\n   * @param {HTMLElement} elem\n   * @param {string} property\n   * @param {*} value\n   */\n\n  const applyNumericalStyle = (elem, property, value) => {\n    if (value === \"\".concat(parseInt(value))) {\n      value = parseInt(value);\n    }\n\n    if (value || parseInt(value) === 0) {\n      elem.style[property] = typeof value === 'number' ? \"\".concat(value, \"px\") : value;\n    } else {\n      elem.style.removeProperty(property);\n    }\n  };\n  /**\n   * @param {HTMLElement} elem\n   * @param {string} display\n   */\n\n  const show = function (elem) {\n    let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex';\n    elem.style.display = display;\n  };\n  /**\n   * @param {HTMLElement} elem\n   */\n\n  const hide = elem => {\n    elem.style.display = 'none';\n  };\n  /**\n   * @param {HTMLElement} parent\n   * @param {string} selector\n   * @param {string} property\n   * @param {string} value\n   */\n\n  const setStyle = (parent, selector, property, value) => {\n    /** @type {HTMLElement} */\n    const el = parent.querySelector(selector);\n\n    if (el) {\n      el.style[property] = value;\n    }\n  };\n  /**\n   * @param {HTMLElement} elem\n   * @param {any} condition\n   * @param {string} display\n   */\n\n  const toggle = function (elem, condition) {\n    let display = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'flex';\n    condition ? show(elem, display) : hide(elem);\n  };\n  /**\n   * borrowed from jquery $(elem).is(':visible') implementation\n   *\n   * @param {HTMLElement} elem\n   * @returns {boolean}\n   */\n\n  const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));\n  /**\n   * @returns {boolean}\n   */\n\n  const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton());\n  /**\n   * @returns {boolean}\n   */\n\n  const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight);\n  /**\n   * borrowed from https://stackoverflow.com/a/46352119\n   *\n   * @param {HTMLElement} elem\n   * @returns {boolean}\n   */\n\n  const hasCssAnimation = elem => {\n    const style = window.getComputedStyle(elem);\n    const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');\n    const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');\n    return animDuration > 0 || transDuration > 0;\n  };\n  /**\n   * @param {number} timer\n   * @param {boolean} reset\n   */\n\n  const animateTimerProgressBar = function (timer) {\n    let reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    const timerProgressBar = getTimerProgressBar();\n\n    if (isVisible(timerProgressBar)) {\n      if (reset) {\n        timerProgressBar.style.transition = 'none';\n        timerProgressBar.style.width = '100%';\n      }\n\n      setTimeout(() => {\n        timerProgressBar.style.transition = \"width \".concat(timer / 1000, \"s linear\");\n        timerProgressBar.style.width = '0%';\n      }, 10);\n    }\n  };\n  const stopTimerProgressBar = () => {\n    const timerProgressBar = getTimerProgressBar();\n    const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n    timerProgressBar.style.removeProperty('transition');\n    timerProgressBar.style.width = '100%';\n    const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n    const timerProgressBarPercent = timerProgressBarWidth / timerProgressBarFullWidth * 100;\n    timerProgressBar.style.removeProperty('transition');\n    timerProgressBar.style.width = \"\".concat(timerProgressBarPercent, \"%\");\n  };\n\n  const RESTORE_FOCUS_TIMEOUT = 100;\n\n  /** @type {GlobalState} */\n\n  const globalState = {};\n\n  const focusPreviousActiveElement = () => {\n    if (globalState.previousActiveElement instanceof HTMLElement) {\n      globalState.previousActiveElement.focus();\n      globalState.previousActiveElement = null;\n    } else if (document.body) {\n      document.body.focus();\n    }\n  };\n  /**\n   * Restore previous active (focused) element\n   *\n   * @param {boolean} returnFocus\n   * @returns {Promise}\n   */\n\n\n  const restoreActiveElement = returnFocus => {\n    return new Promise(resolve => {\n      if (!returnFocus) {\n        return resolve();\n      }\n\n      const x = window.scrollX;\n      const y = window.scrollY;\n      globalState.restoreFocusTimeout = setTimeout(() => {\n        focusPreviousActiveElement();\n        resolve();\n      }, RESTORE_FOCUS_TIMEOUT); // issues/900\n\n      window.scrollTo(x, y);\n    });\n  };\n\n  /**\n   * Detect Node env\n   *\n   * @returns {boolean}\n   */\n  const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined';\n\n  const sweetHTML = \"\\n <div aria-labelledby=\\\"\".concat(swalClasses.title, \"\\\" aria-describedby=\\\"\").concat(swalClasses['html-container'], \"\\\" class=\\\"\").concat(swalClasses.popup, \"\\\" tabindex=\\\"-1\\\">\\n   <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.close, \"\\\"></button>\\n   <ul class=\\\"\").concat(swalClasses['progress-steps'], \"\\\"></ul>\\n   <div class=\\\"\").concat(swalClasses.icon, \"\\\"></div>\\n   <img class=\\\"\").concat(swalClasses.image, \"\\\" />\\n   <h2 class=\\\"\").concat(swalClasses.title, \"\\\" id=\\\"\").concat(swalClasses.title, \"\\\"></h2>\\n   <div class=\\\"\").concat(swalClasses['html-container'], \"\\\" id=\\\"\").concat(swalClasses['html-container'], \"\\\"></div>\\n   <input class=\\\"\").concat(swalClasses.input, \"\\\" />\\n   <input type=\\\"file\\\" class=\\\"\").concat(swalClasses.file, \"\\\" />\\n   <div class=\\\"\").concat(swalClasses.range, \"\\\">\\n     <input type=\\\"range\\\" />\\n     <output></output>\\n   </div>\\n   <select class=\\\"\").concat(swalClasses.select, \"\\\"></select>\\n   <div class=\\\"\").concat(swalClasses.radio, \"\\\"></div>\\n   <label for=\\\"\").concat(swalClasses.checkbox, \"\\\" class=\\\"\").concat(swalClasses.checkbox, \"\\\">\\n     <input type=\\\"checkbox\\\" />\\n     <span class=\\\"\").concat(swalClasses.label, \"\\\"></span>\\n   </label>\\n   <textarea class=\\\"\").concat(swalClasses.textarea, \"\\\"></textarea>\\n   <div class=\\\"\").concat(swalClasses['validation-message'], \"\\\" id=\\\"\").concat(swalClasses['validation-message'], \"\\\"></div>\\n   <div class=\\\"\").concat(swalClasses.actions, \"\\\">\\n     <div class=\\\"\").concat(swalClasses.loader, \"\\\"></div>\\n     <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.confirm, \"\\\"></button>\\n     <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.deny, \"\\\"></button>\\n     <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.cancel, \"\\\"></button>\\n   </div>\\n   <div class=\\\"\").concat(swalClasses.footer, \"\\\"></div>\\n   <div class=\\\"\").concat(swalClasses['timer-progress-bar-container'], \"\\\">\\n     <div class=\\\"\").concat(swalClasses['timer-progress-bar'], \"\\\"></div>\\n   </div>\\n </div>\\n\").replace(/(^|\\n)\\s*/g, '');\n  /**\n   * @returns {boolean}\n   */\n\n  const resetOldContainer = () => {\n    const oldContainer = getContainer();\n\n    if (!oldContainer) {\n      return false;\n    }\n\n    oldContainer.remove();\n    removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);\n    return true;\n  };\n\n  const resetValidationMessage = () => {\n    globalState.currentInstance.resetValidationMessage();\n  };\n\n  const addInputChangeListeners = () => {\n    const popup = getPopup();\n    const input = getDirectChildByClass(popup, swalClasses.input);\n    const file = getDirectChildByClass(popup, swalClasses.file);\n    /** @type {HTMLInputElement} */\n\n    const range = popup.querySelector(\".\".concat(swalClasses.range, \" input\"));\n    /** @type {HTMLOutputElement} */\n\n    const rangeOutput = popup.querySelector(\".\".concat(swalClasses.range, \" output\"));\n    const select = getDirectChildByClass(popup, swalClasses.select);\n    /** @type {HTMLInputElement} */\n\n    const checkbox = popup.querySelector(\".\".concat(swalClasses.checkbox, \" input\"));\n    const textarea = getDirectChildByClass(popup, swalClasses.textarea);\n    input.oninput = resetValidationMessage;\n    file.onchange = resetValidationMessage;\n    select.onchange = resetValidationMessage;\n    checkbox.onchange = resetValidationMessage;\n    textarea.oninput = resetValidationMessage;\n\n    range.oninput = () => {\n      resetValidationMessage();\n      rangeOutput.value = range.value;\n    };\n\n    range.onchange = () => {\n      resetValidationMessage();\n      rangeOutput.value = range.value;\n    };\n  };\n  /**\n   * @param {string | HTMLElement} target\n   * @returns {HTMLElement}\n   */\n\n\n  const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target;\n  /**\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const setupAccessibility = params => {\n    const popup = getPopup();\n    popup.setAttribute('role', params.toast ? 'alert' : 'dialog');\n    popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');\n\n    if (!params.toast) {\n      popup.setAttribute('aria-modal', 'true');\n    }\n  };\n  /**\n   * @param {HTMLElement} targetElement\n   */\n\n\n  const setupRTL = targetElement => {\n    if (window.getComputedStyle(targetElement).direction === 'rtl') {\n      addClass(getContainer(), swalClasses.rtl);\n    }\n  };\n  /**\n   * Add modal + backdrop + no-war message for Russians to DOM\n   *\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const init = params => {\n    // Clean up the old popup container if it exists\n    const oldContainerExisted = resetOldContainer();\n    /* istanbul ignore if */\n\n    if (isNodeEnv()) {\n      error('SweetAlert2 requires document to initialize');\n      return;\n    }\n\n    const container = document.createElement('div');\n    container.className = swalClasses.container;\n\n    if (oldContainerExisted) {\n      addClass(container, swalClasses['no-transition']);\n    }\n\n    setInnerHtml(container, sweetHTML);\n    const targetElement = getTarget(params.target);\n    targetElement.appendChild(container);\n    setupAccessibility(params);\n    setupRTL(targetElement);\n    addInputChangeListeners();\n  };\n\n  /**\n   * @param {HTMLElement | object | string} param\n   * @param {HTMLElement} target\n   */\n\n  const parseHtmlToContainer = (param, target) => {\n    // DOM element\n    if (param instanceof HTMLElement) {\n      target.appendChild(param);\n    } // Object\n    else if (typeof param === 'object') {\n      handleObject(param, target);\n    } // Plain string\n    else if (param) {\n      setInnerHtml(target, param);\n    }\n  };\n  /**\n   * @param {object} param\n   * @param {HTMLElement} target\n   */\n\n  const handleObject = (param, target) => {\n    // JQuery element(s)\n    if (param.jquery) {\n      handleJqueryElem(target, param);\n    } // For other objects use their string representation\n    else {\n      setInnerHtml(target, param.toString());\n    }\n  };\n  /**\n   * @param {HTMLElement} target\n   * @param {HTMLElement} elem\n   */\n\n\n  const handleJqueryElem = (target, elem) => {\n    target.textContent = '';\n\n    if (0 in elem) {\n      for (let i = 0; (i in elem); i++) {\n        target.appendChild(elem[i].cloneNode(true));\n      }\n    } else {\n      target.appendChild(elem.cloneNode(true));\n    }\n  };\n\n  /**\n   * @returns {'webkitAnimationEnd' | 'animationend' | false}\n   */\n\n  const animationEndEvent = (() => {\n    // Prevent run in Node env\n\n    /* istanbul ignore if */\n    if (isNodeEnv()) {\n      return false;\n    }\n\n    const testEl = document.createElement('div');\n    const transEndEventNames = {\n      WebkitAnimation: 'webkitAnimationEnd',\n      // Chrome, Safari and Opera\n      animation: 'animationend' // Standard syntax\n\n    };\n\n    for (const i in transEndEventNames) {\n      if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') {\n        return transEndEventNames[i];\n      }\n    }\n\n    return false;\n  })();\n\n  /**\n   * Measure scrollbar width for padding body during modal show/hide\n   * https://github.com/twbs/bootstrap/blob/master/js/src/modal.js\n   *\n   * @returns {number}\n   */\n\n  const measureScrollbar = () => {\n    const scrollDiv = document.createElement('div');\n    scrollDiv.className = swalClasses['scrollbar-measure'];\n    document.body.appendChild(scrollDiv);\n    const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;\n    document.body.removeChild(scrollDiv);\n    return scrollbarWidth;\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderActions = (instance, params) => {\n    const actions = getActions();\n    const loader = getLoader(); // Actions (buttons) wrapper\n\n    if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) {\n      hide(actions);\n    } else {\n      show(actions);\n    } // Custom class\n\n\n    applyCustomClass(actions, params, 'actions'); // Render all the buttons\n\n    renderButtons(actions, loader, params); // Loader\n\n    setInnerHtml(loader, params.loaderHtml);\n    applyCustomClass(loader, params, 'loader');\n  };\n  /**\n   * @param {HTMLElement} actions\n   * @param {HTMLElement} loader\n   * @param {SweetAlertOptions} params\n   */\n\n  function renderButtons(actions, loader, params) {\n    const confirmButton = getConfirmButton();\n    const denyButton = getDenyButton();\n    const cancelButton = getCancelButton(); // Render buttons\n\n    renderButton(confirmButton, 'confirm', params);\n    renderButton(denyButton, 'deny', params);\n    renderButton(cancelButton, 'cancel', params);\n    handleButtonsStyling(confirmButton, denyButton, cancelButton, params);\n\n    if (params.reverseButtons) {\n      if (params.toast) {\n        actions.insertBefore(cancelButton, confirmButton);\n        actions.insertBefore(denyButton, confirmButton);\n      } else {\n        actions.insertBefore(cancelButton, loader);\n        actions.insertBefore(denyButton, loader);\n        actions.insertBefore(confirmButton, loader);\n      }\n    }\n  }\n  /**\n   * @param {HTMLElement} confirmButton\n   * @param {HTMLElement} denyButton\n   * @param {HTMLElement} cancelButton\n   * @param {SweetAlertOptions} params\n   */\n\n\n  function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) {\n    if (!params.buttonsStyling) {\n      removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled);\n      return;\n    }\n\n    addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors\n\n    if (params.confirmButtonColor) {\n      confirmButton.style.backgroundColor = params.confirmButtonColor;\n      addClass(confirmButton, swalClasses['default-outline']);\n    }\n\n    if (params.denyButtonColor) {\n      denyButton.style.backgroundColor = params.denyButtonColor;\n      addClass(denyButton, swalClasses['default-outline']);\n    }\n\n    if (params.cancelButtonColor) {\n      cancelButton.style.backgroundColor = params.cancelButtonColor;\n      addClass(cancelButton, swalClasses['default-outline']);\n    }\n  }\n  /**\n   * @param {HTMLElement} button\n   * @param {'confirm' | 'deny' | 'cancel'} buttonType\n   * @param {SweetAlertOptions} params\n   */\n\n\n  function renderButton(button, buttonType, params) {\n    toggle(button, params[\"show\".concat(capitalizeFirstLetter(buttonType), \"Button\")], 'inline-block');\n    setInnerHtml(button, params[\"\".concat(buttonType, \"ButtonText\")]); // Set caption text\n\n    button.setAttribute('aria-label', params[\"\".concat(buttonType, \"ButtonAriaLabel\")]); // ARIA label\n    // Add buttons custom classes\n\n    button.className = swalClasses[buttonType];\n    applyCustomClass(button, params, \"\".concat(buttonType, \"Button\"));\n    addClass(button, params[\"\".concat(buttonType, \"ButtonClass\")]);\n  }\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderCloseButton = (instance, params) => {\n    const closeButton = getCloseButton();\n    setInnerHtml(closeButton, params.closeButtonHtml); // Custom class\n\n    applyCustomClass(closeButton, params, 'closeButton');\n    toggle(closeButton, params.showCloseButton);\n    closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderContainer = (instance, params) => {\n    const container = getContainer();\n\n    if (!container) {\n      return;\n    }\n\n    handleBackdropParam(container, params.backdrop);\n    handlePositionParam(container, params.position);\n    handleGrowParam(container, params.grow); // Custom class\n\n    applyCustomClass(container, params, 'container');\n  };\n  /**\n   * @param {HTMLElement} container\n   * @param {SweetAlertOptions['backdrop']} backdrop\n   */\n\n  function handleBackdropParam(container, backdrop) {\n    if (typeof backdrop === 'string') {\n      container.style.background = backdrop;\n    } else if (!backdrop) {\n      addClass([document.documentElement, document.body], swalClasses['no-backdrop']);\n    }\n  }\n  /**\n   * @param {HTMLElement} container\n   * @param {SweetAlertOptions['position']} position\n   */\n\n\n  function handlePositionParam(container, position) {\n    if (position in swalClasses) {\n      addClass(container, swalClasses[position]);\n    } else {\n      warn('The \"position\" parameter is not valid, defaulting to \"center\"');\n      addClass(container, swalClasses.center);\n    }\n  }\n  /**\n   * @param {HTMLElement} container\n   * @param {SweetAlertOptions['grow']} grow\n   */\n\n\n  function handleGrowParam(container, grow) {\n    if (grow && typeof grow === 'string') {\n      const growClass = \"grow-\".concat(grow);\n\n      if (growClass in swalClasses) {\n        addClass(container, swalClasses[growClass]);\n      }\n    }\n  }\n\n  /// <reference path=\"../../../../sweetalert2.d.ts\"/>\n  /** @type {InputClass[]} */\n\n  const inputClasses = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderInput = (instance, params) => {\n    const popup = getPopup();\n    const innerParams = privateProps.innerParams.get(instance);\n    const rerender = !innerParams || params.input !== innerParams.input;\n    inputClasses.forEach(inputClass => {\n      const inputContainer = getDirectChildByClass(popup, swalClasses[inputClass]); // set attributes\n\n      setAttributes(inputClass, params.inputAttributes); // set class\n\n      inputContainer.className = swalClasses[inputClass];\n\n      if (rerender) {\n        hide(inputContainer);\n      }\n    });\n\n    if (params.input) {\n      if (rerender) {\n        showInput(params);\n      } // set custom class\n\n\n      setCustomClass(params);\n    }\n  };\n  /**\n   * @param {SweetAlertOptions} params\n   */\n\n  const showInput = params => {\n    if (!renderInputType[params.input]) {\n      error(\"Unexpected type of input! Expected \\\"text\\\", \\\"email\\\", \\\"password\\\", \\\"number\\\", \\\"tel\\\", \\\"select\\\", \\\"radio\\\", \\\"checkbox\\\", \\\"textarea\\\", \\\"file\\\" or \\\"url\\\", got \\\"\".concat(params.input, \"\\\"\"));\n      return;\n    }\n\n    const inputContainer = getInputContainer(params.input);\n    const input = renderInputType[params.input](inputContainer, params);\n    show(inputContainer); // input autofocus\n\n    setTimeout(() => {\n      focusInput(input);\n    });\n  };\n  /**\n   * @param {HTMLInputElement} input\n   */\n\n\n  const removeAttributes = input => {\n    for (let i = 0; i < input.attributes.length; i++) {\n      const attrName = input.attributes[i].name;\n\n      if (!['type', 'value', 'style'].includes(attrName)) {\n        input.removeAttribute(attrName);\n      }\n    }\n  };\n  /**\n   * @param {InputClass} inputClass\n   * @param {SweetAlertOptions['inputAttributes']} inputAttributes\n   */\n\n\n  const setAttributes = (inputClass, inputAttributes) => {\n    const input = getInput(getPopup(), inputClass);\n\n    if (!input) {\n      return;\n    }\n\n    removeAttributes(input);\n\n    for (const attr in inputAttributes) {\n      input.setAttribute(attr, inputAttributes[attr]);\n    }\n  };\n  /**\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const setCustomClass = params => {\n    const inputContainer = getInputContainer(params.input);\n\n    if (typeof params.customClass === 'object') {\n      addClass(inputContainer, params.customClass.input);\n    }\n  };\n  /**\n   * @param {HTMLInputElement | HTMLTextAreaElement} input\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const setInputPlaceholder = (input, params) => {\n    if (!input.placeholder || params.inputPlaceholder) {\n      input.placeholder = params.inputPlaceholder;\n    }\n  };\n  /**\n   * @param {Input} input\n   * @param {Input} prependTo\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const setInputLabel = (input, prependTo, params) => {\n    if (params.inputLabel) {\n      input.id = swalClasses.input;\n      const label = document.createElement('label');\n      const labelClass = swalClasses['input-label'];\n      label.setAttribute('for', input.id);\n      label.className = labelClass;\n\n      if (typeof params.customClass === 'object') {\n        addClass(label, params.customClass.inputLabel);\n      }\n\n      label.innerText = params.inputLabel;\n      prependTo.insertAdjacentElement('beforebegin', label);\n    }\n  };\n  /**\n   * @param {SweetAlertOptions['input']} inputType\n   * @returns {HTMLElement}\n   */\n\n\n  const getInputContainer = inputType => {\n    return getDirectChildByClass(getPopup(), swalClasses[inputType] || swalClasses.input);\n  };\n  /**\n   * @param {HTMLInputElement | HTMLOutputElement | HTMLTextAreaElement} input\n   * @param {SweetAlertOptions['inputValue']} inputValue\n   */\n\n\n  const checkAndSetInputValue = (input, inputValue) => {\n    if (['string', 'number'].includes(typeof inputValue)) {\n      input.value = \"\".concat(inputValue);\n    } else if (!isPromise(inputValue)) {\n      warn(\"Unexpected type of inputValue! Expected \\\"string\\\", \\\"number\\\" or \\\"Promise\\\", got \\\"\".concat(typeof inputValue, \"\\\"\"));\n    }\n  };\n  /** @type {Record<string, (input: Input | HTMLElement, params: SweetAlertOptions) => Input>} */\n\n\n  const renderInputType = {};\n  /**\n   * @param {HTMLInputElement} input\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLInputElement}\n   */\n\n  renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => {\n    checkAndSetInputValue(input, params.inputValue);\n    setInputLabel(input, input, params);\n    setInputPlaceholder(input, params);\n    input.type = params.input;\n    return input;\n  };\n  /**\n   * @param {HTMLInputElement} input\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLInputElement}\n   */\n\n\n  renderInputType.file = (input, params) => {\n    setInputLabel(input, input, params);\n    setInputPlaceholder(input, params);\n    return input;\n  };\n  /**\n   * @param {HTMLInputElement} range\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLInputElement}\n   */\n\n\n  renderInputType.range = (range, params) => {\n    const rangeInput = range.querySelector('input');\n    const rangeOutput = range.querySelector('output');\n    checkAndSetInputValue(rangeInput, params.inputValue);\n    rangeInput.type = params.input;\n    checkAndSetInputValue(rangeOutput, params.inputValue);\n    setInputLabel(rangeInput, range, params);\n    return range;\n  };\n  /**\n   * @param {HTMLSelectElement} select\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLSelectElement}\n   */\n\n\n  renderInputType.select = (select, params) => {\n    select.textContent = '';\n\n    if (params.inputPlaceholder) {\n      const placeholder = document.createElement('option');\n      setInnerHtml(placeholder, params.inputPlaceholder);\n      placeholder.value = '';\n      placeholder.disabled = true;\n      placeholder.selected = true;\n      select.appendChild(placeholder);\n    }\n\n    setInputLabel(select, select, params);\n    return select;\n  };\n  /**\n   * @param {HTMLInputElement} radio\n   * @returns {HTMLInputElement}\n   */\n\n\n  renderInputType.radio = radio => {\n    radio.textContent = '';\n    return radio;\n  };\n  /**\n   * @param {HTMLLabelElement} checkboxContainer\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLInputElement}\n   */\n\n\n  renderInputType.checkbox = (checkboxContainer, params) => {\n    const checkbox = getInput(getPopup(), 'checkbox');\n    checkbox.value = '1';\n    checkbox.id = swalClasses.checkbox;\n    checkbox.checked = Boolean(params.inputValue);\n    const label = checkboxContainer.querySelector('span');\n    setInnerHtml(label, params.inputPlaceholder);\n    return checkbox;\n  };\n  /**\n   * @param {HTMLTextAreaElement} textarea\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLTextAreaElement}\n   */\n\n\n  renderInputType.textarea = (textarea, params) => {\n    checkAndSetInputValue(textarea, params.inputValue);\n    setInputPlaceholder(textarea, params);\n    setInputLabel(textarea, textarea, params);\n    /**\n     * @param {HTMLElement} el\n     * @returns {number}\n     */\n\n    const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); // https://github.com/sweetalert2/sweetalert2/issues/2291\n\n\n    setTimeout(() => {\n      // https://github.com/sweetalert2/sweetalert2/issues/1699\n      if ('MutationObserver' in window) {\n        const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width);\n\n        const textareaResizeHandler = () => {\n          const textareaWidth = textarea.offsetWidth + getMargin(textarea);\n\n          if (textareaWidth > initialPopupWidth) {\n            getPopup().style.width = \"\".concat(textareaWidth, \"px\");\n          } else {\n            getPopup().style.width = null;\n          }\n        };\n\n        new MutationObserver(textareaResizeHandler).observe(textarea, {\n          attributes: true,\n          attributeFilter: ['style']\n        });\n      }\n    });\n    return textarea;\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderContent = (instance, params) => {\n    const htmlContainer = getHtmlContainer();\n    applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML\n\n    if (params.html) {\n      parseHtmlToContainer(params.html, htmlContainer);\n      show(htmlContainer, 'block');\n    } // Content as plain text\n    else if (params.text) {\n      htmlContainer.textContent = params.text;\n      show(htmlContainer, 'block');\n    } // No content\n    else {\n      hide(htmlContainer);\n    }\n\n    renderInput(instance, params);\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderFooter = (instance, params) => {\n    const footer = getFooter();\n    toggle(footer, params.footer);\n\n    if (params.footer) {\n      parseHtmlToContainer(params.footer, footer);\n    } // Custom class\n\n\n    applyCustomClass(footer, params, 'footer');\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderIcon = (instance, params) => {\n    const innerParams = privateProps.innerParams.get(instance);\n    const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon\n\n    if (innerParams && params.icon === innerParams.icon) {\n      // Custom or default content\n      setContent(icon, params);\n      applyStyles(icon, params);\n      return;\n    }\n\n    if (!params.icon && !params.iconHtml) {\n      hide(icon);\n      return;\n    }\n\n    if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) {\n      error(\"Unknown icon! Expected \\\"success\\\", \\\"error\\\", \\\"warning\\\", \\\"info\\\" or \\\"question\\\", got \\\"\".concat(params.icon, \"\\\"\"));\n      hide(icon);\n      return;\n    }\n\n    show(icon); // Custom or default content\n\n    setContent(icon, params);\n    applyStyles(icon, params); // Animate icon\n\n    addClass(icon, params.showClass.icon);\n  };\n  /**\n   * @param {HTMLElement} icon\n   * @param {SweetAlertOptions} params\n   */\n\n  const applyStyles = (icon, params) => {\n    for (const iconType in iconTypes) {\n      if (params.icon !== iconType) {\n        removeClass(icon, iconTypes[iconType]);\n      }\n    }\n\n    addClass(icon, iconTypes[params.icon]); // Icon color\n\n    setColor(icon, params); // Success icon background color\n\n    adjustSuccessIconBackgroundColor(); // Custom class\n\n    applyCustomClass(icon, params, 'icon');\n  }; // Adjust success icon background color to match the popup background color\n\n\n  const adjustSuccessIconBackgroundColor = () => {\n    const popup = getPopup();\n    const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');\n    /** @type {NodeListOf<HTMLElement>} */\n\n    const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');\n\n    for (let i = 0; i < successIconParts.length; i++) {\n      successIconParts[i].style.backgroundColor = popupBackgroundColor;\n    }\n  };\n\n  const successIconHtml = \"\\n  <div class=\\\"swal2-success-circular-line-left\\\"></div>\\n  <span class=\\\"swal2-success-line-tip\\\"></span> <span class=\\\"swal2-success-line-long\\\"></span>\\n  <div class=\\\"swal2-success-ring\\\"></div> <div class=\\\"swal2-success-fix\\\"></div>\\n  <div class=\\\"swal2-success-circular-line-right\\\"></div>\\n\";\n  const errorIconHtml = \"\\n  <span class=\\\"swal2-x-mark\\\">\\n    <span class=\\\"swal2-x-mark-line-left\\\"></span>\\n    <span class=\\\"swal2-x-mark-line-right\\\"></span>\\n  </span>\\n\";\n  /**\n   * @param {HTMLElement} icon\n   * @param {SweetAlertOptions} params\n   */\n\n  const setContent = (icon, params) => {\n    let oldContent = icon.innerHTML;\n    let newContent;\n\n    if (params.iconHtml) {\n      newContent = iconContent(params.iconHtml);\n    } else if (params.icon === 'success') {\n      newContent = successIconHtml;\n      oldContent = oldContent.replace(/ style=\".*?\"/g, ''); // undo adjustSuccessIconBackgroundColor()\n    } else if (params.icon === 'error') {\n      newContent = errorIconHtml;\n    } else {\n      const defaultIconHtml = {\n        question: '?',\n        warning: '!',\n        info: 'i'\n      };\n      newContent = iconContent(defaultIconHtml[params.icon]);\n    }\n\n    if (oldContent.trim() !== newContent.trim()) {\n      setInnerHtml(icon, newContent);\n    }\n  };\n  /**\n   * @param {HTMLElement} icon\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const setColor = (icon, params) => {\n    if (!params.iconColor) {\n      return;\n    }\n\n    icon.style.color = params.iconColor;\n    icon.style.borderColor = params.iconColor;\n\n    for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) {\n      setStyle(icon, sel, 'backgroundColor', params.iconColor);\n    }\n\n    setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor);\n  };\n  /**\n   * @param {string} content\n   * @returns {string}\n   */\n\n\n  const iconContent = content => \"<div class=\\\"\".concat(swalClasses['icon-content'], \"\\\">\").concat(content, \"</div>\");\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderImage = (instance, params) => {\n    const image = getImage();\n\n    if (!params.imageUrl) {\n      hide(image);\n      return;\n    }\n\n    show(image, ''); // Src, alt\n\n    image.setAttribute('src', params.imageUrl);\n    image.setAttribute('alt', params.imageAlt); // Width, height\n\n    applyNumericalStyle(image, 'width', params.imageWidth);\n    applyNumericalStyle(image, 'height', params.imageHeight); // Class\n\n    image.className = swalClasses.image;\n    applyCustomClass(image, params, 'image');\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderPopup = (instance, params) => {\n    const container = getContainer();\n    const popup = getPopup(); // Width\n    // https://github.com/sweetalert2/sweetalert2/issues/2170\n\n    if (params.toast) {\n      applyNumericalStyle(container, 'width', params.width);\n      popup.style.width = '100%';\n      popup.insertBefore(getLoader(), getIcon());\n    } else {\n      applyNumericalStyle(popup, 'width', params.width);\n    } // Padding\n\n\n    applyNumericalStyle(popup, 'padding', params.padding); // Color\n\n    if (params.color) {\n      popup.style.color = params.color;\n    } // Background\n\n\n    if (params.background) {\n      popup.style.background = params.background;\n    }\n\n    hide(getValidationMessage()); // Classes\n\n    addClasses(popup, params);\n  };\n  /**\n   * @param {HTMLElement} popup\n   * @param {SweetAlertOptions} params\n   */\n\n  const addClasses = (popup, params) => {\n    // Default Class + showClass when updating Swal.update({})\n    popup.className = \"\".concat(swalClasses.popup, \" \").concat(isVisible(popup) ? params.showClass.popup : '');\n\n    if (params.toast) {\n      addClass([document.documentElement, document.body], swalClasses['toast-shown']);\n      addClass(popup, swalClasses.toast);\n    } else {\n      addClass(popup, swalClasses.modal);\n    } // Custom class\n\n\n    applyCustomClass(popup, params, 'popup');\n\n    if (typeof params.customClass === 'string') {\n      addClass(popup, params.customClass);\n    } // Icon class (#1842)\n\n\n    if (params.icon) {\n      addClass(popup, swalClasses[\"icon-\".concat(params.icon)]);\n    }\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderProgressSteps = (instance, params) => {\n    const progressStepsContainer = getProgressSteps();\n\n    if (!params.progressSteps || params.progressSteps.length === 0) {\n      hide(progressStepsContainer);\n      return;\n    }\n\n    show(progressStepsContainer);\n    progressStepsContainer.textContent = '';\n\n    if (params.currentProgressStep >= params.progressSteps.length) {\n      warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');\n    }\n\n    params.progressSteps.forEach((step, index) => {\n      const stepEl = createStepElement(step);\n      progressStepsContainer.appendChild(stepEl);\n\n      if (index === params.currentProgressStep) {\n        addClass(stepEl, swalClasses['active-progress-step']);\n      }\n\n      if (index !== params.progressSteps.length - 1) {\n        const lineEl = createLineElement(params);\n        progressStepsContainer.appendChild(lineEl);\n      }\n    });\n  };\n  /**\n   * @param {string} step\n   * @returns {HTMLLIElement}\n   */\n\n  const createStepElement = step => {\n    const stepEl = document.createElement('li');\n    addClass(stepEl, swalClasses['progress-step']);\n    setInnerHtml(stepEl, step);\n    return stepEl;\n  };\n  /**\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLLIElement}\n   */\n\n\n  const createLineElement = params => {\n    const lineEl = document.createElement('li');\n    addClass(lineEl, swalClasses['progress-step-line']);\n\n    if (params.progressStepsDistance) {\n      applyNumericalStyle(lineEl, 'width', params.progressStepsDistance);\n    }\n\n    return lineEl;\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderTitle = (instance, params) => {\n    const title = getTitle();\n    toggle(title, params.title || params.titleText, 'block');\n\n    if (params.title) {\n      parseHtmlToContainer(params.title, title);\n    }\n\n    if (params.titleText) {\n      title.innerText = params.titleText;\n    } // Custom class\n\n\n    applyCustomClass(title, params, 'title');\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const render = (instance, params) => {\n    renderPopup(instance, params);\n    renderContainer(instance, params);\n    renderProgressSteps(instance, params);\n    renderIcon(instance, params);\n    renderImage(instance, params);\n    renderTitle(instance, params);\n    renderCloseButton(instance, params);\n    renderContent(instance, params);\n    renderActions(instance, params);\n    renderFooter(instance, params);\n\n    if (typeof params.didRender === 'function') {\n      params.didRender(getPopup());\n    }\n  };\n\n  /**\n   * Hides loader and shows back the button which was hidden by .showLoading()\n   */\n\n  function hideLoading() {\n    // do nothing if popup is closed\n    const innerParams = privateProps.innerParams.get(this);\n\n    if (!innerParams) {\n      return;\n    }\n\n    const domCache = privateProps.domCache.get(this);\n    hide(domCache.loader);\n\n    if (isToast()) {\n      if (innerParams.icon) {\n        show(getIcon());\n      }\n    } else {\n      showRelatedButton(domCache);\n    }\n\n    removeClass([domCache.popup, domCache.actions], swalClasses.loading);\n    domCache.popup.removeAttribute('aria-busy');\n    domCache.popup.removeAttribute('data-loading');\n    domCache.confirmButton.disabled = false;\n    domCache.denyButton.disabled = false;\n    domCache.cancelButton.disabled = false;\n  }\n\n  const showRelatedButton = domCache => {\n    const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace'));\n\n    if (buttonToReplace.length) {\n      show(buttonToReplace[0], 'inline-block');\n    } else if (allButtonsAreHidden()) {\n      hide(domCache.actions);\n    }\n  };\n\n  /**\n   * Gets the input DOM node, this method works with input parameter.\n   * @returns {HTMLElement | null}\n   */\n\n  function getInput$1(instance) {\n    const innerParams = privateProps.innerParams.get(instance || this);\n    const domCache = privateProps.domCache.get(instance || this);\n\n    if (!domCache) {\n      return null;\n    }\n\n    return getInput(domCache.popup, innerParams.input);\n  }\n\n  /*\n   * Global function to determine if SweetAlert2 popup is shown\n   */\n\n  const isVisible$1 = () => {\n    return isVisible(getPopup());\n  };\n  /*\n   * Global function to click 'Confirm' button\n   */\n\n  const clickConfirm = () => getConfirmButton() && getConfirmButton().click();\n  /*\n   * Global function to click 'Deny' button\n   */\n\n  const clickDeny = () => getDenyButton() && getDenyButton().click();\n  /*\n   * Global function to click 'Cancel' button\n   */\n\n  const clickCancel = () => getCancelButton() && getCancelButton().click();\n\n  const DismissReason = Object.freeze({\n    cancel: 'cancel',\n    backdrop: 'backdrop',\n    close: 'close',\n    esc: 'esc',\n    timer: 'timer'\n  });\n\n  /**\n   * @param {GlobalState} globalState\n   */\n\n  const removeKeydownHandler = globalState => {\n    if (globalState.keydownTarget && globalState.keydownHandlerAdded) {\n      globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {\n        capture: globalState.keydownListenerCapture\n      });\n      globalState.keydownHandlerAdded = false;\n    }\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @param {GlobalState} globalState\n   * @param {SweetAlertOptions} innerParams\n   * @param {*} dismissWith\n   */\n\n  const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => {\n    removeKeydownHandler(globalState);\n\n    if (!innerParams.toast) {\n      globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith);\n\n      globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup();\n      globalState.keydownListenerCapture = innerParams.keydownListenerCapture;\n      globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, {\n        capture: globalState.keydownListenerCapture\n      });\n      globalState.keydownHandlerAdded = true;\n    }\n  };\n  /**\n   * @param {SweetAlertOptions} innerParams\n   * @param {number} index\n   * @param {number} increment\n   */\n\n  const setFocus = (innerParams, index, increment) => {\n    const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match\n\n    if (focusableElements.length) {\n      index = index + increment; // rollover to first item\n\n      if (index === focusableElements.length) {\n        index = 0; // go to last item\n      } else if (index === -1) {\n        index = focusableElements.length - 1;\n      }\n\n      return focusableElements[index].focus();\n    } // no visible focusable elements, focus the popup\n\n\n    getPopup().focus();\n  };\n  const arrowKeysNextButton = ['ArrowRight', 'ArrowDown'];\n  const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp'];\n  /**\n   * @param {SweetAlert2} instance\n   * @param {KeyboardEvent} e\n   * @param {function} dismissWith\n   */\n\n  const keydownHandler = (instance, e, dismissWith) => {\n    const innerParams = privateProps.innerParams.get(instance);\n\n    if (!innerParams) {\n      return; // This instance has already been destroyed\n    } // Ignore keydown during IME composition\n    // https://developer.mozilla.org/en-US/docs/Web/API/Document/keydown_event#ignoring_keydown_during_ime_composition\n    // https://github.com/sweetalert2/sweetalert2/issues/720\n    // https://github.com/sweetalert2/sweetalert2/issues/2406\n\n\n    if (e.isComposing || e.keyCode === 229) {\n      return;\n    }\n\n    if (innerParams.stopKeydownPropagation) {\n      e.stopPropagation();\n    } // ENTER\n\n\n    if (e.key === 'Enter') {\n      handleEnter(instance, e, innerParams);\n    } // TAB\n    else if (e.key === 'Tab') {\n      handleTab(e, innerParams);\n    } // ARROWS - switch focus between buttons\n    else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) {\n      handleArrows(e.key);\n    } // ESC\n    else if (e.key === 'Escape') {\n      handleEsc(e, innerParams, dismissWith);\n    }\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @param {KeyboardEvent} e\n   * @param {SweetAlertOptions} innerParams\n   */\n\n\n  const handleEnter = (instance, e, innerParams) => {\n    // https://github.com/sweetalert2/sweetalert2/issues/2386\n    if (!callIfFunction(innerParams.allowEnterKey)) {\n      return;\n    }\n\n    if (e.target && instance.getInput() && e.target instanceof HTMLElement && e.target.outerHTML === instance.getInput().outerHTML) {\n      if (['textarea', 'file'].includes(innerParams.input)) {\n        return; // do not submit\n      }\n\n      clickConfirm();\n      e.preventDefault();\n    }\n  };\n  /**\n   * @param {KeyboardEvent} e\n   * @param {SweetAlertOptions} innerParams\n   */\n\n\n  const handleTab = (e, innerParams) => {\n    const targetElement = e.target;\n    const focusableElements = getFocusableElements();\n    let btnIndex = -1;\n\n    for (let i = 0; i < focusableElements.length; i++) {\n      if (targetElement === focusableElements[i]) {\n        btnIndex = i;\n        break;\n      }\n    } // Cycle to the next button\n\n\n    if (!e.shiftKey) {\n      setFocus(innerParams, btnIndex, 1);\n    } // Cycle to the prev button\n    else {\n      setFocus(innerParams, btnIndex, -1);\n    }\n\n    e.stopPropagation();\n    e.preventDefault();\n  };\n  /**\n   * @param {string} key\n   */\n\n\n  const handleArrows = key => {\n    const confirmButton = getConfirmButton();\n    const denyButton = getDenyButton();\n    const cancelButton = getCancelButton();\n\n    if (document.activeElement instanceof HTMLElement && ![confirmButton, denyButton, cancelButton].includes(document.activeElement)) {\n      return;\n    }\n\n    const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling';\n    let buttonToFocus = document.activeElement;\n\n    for (let i = 0; i < getActions().children.length; i++) {\n      buttonToFocus = buttonToFocus[sibling];\n\n      if (!buttonToFocus) {\n        return;\n      }\n\n      if (buttonToFocus instanceof HTMLButtonElement && isVisible(buttonToFocus)) {\n        break;\n      }\n    }\n\n    if (buttonToFocus instanceof HTMLButtonElement) {\n      buttonToFocus.focus();\n    }\n  };\n  /**\n   * @param {KeyboardEvent} e\n   * @param {SweetAlertOptions} innerParams\n   * @param {function} dismissWith\n   */\n\n\n  const handleEsc = (e, innerParams, dismissWith) => {\n    if (callIfFunction(innerParams.allowEscapeKey)) {\n      e.preventDefault();\n      dismissWith(DismissReason.esc);\n    }\n  };\n\n  /**\n   * This module contains `WeakMap`s for each effectively-\"private  property\" that a `Swal` has.\n   * For example, to set the private property \"foo\" of `this` to \"bar\", you can `privateProps.foo.set(this, 'bar')`\n   * This is the approach that Babel will probably take to implement private methods/fields\n   *   https://github.com/tc39/proposal-private-methods\n   *   https://github.com/babel/babel/pull/7555\n   * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*\n   *   then we can use that language feature.\n   */\n  var privateMethods = {\n    swalPromiseResolve: new WeakMap(),\n    swalPromiseReject: new WeakMap()\n  };\n\n  // Adding aria-hidden=\"true\" to elements outside of the active modal dialog ensures that\n  // elements not within the active modal dialog will not be surfaced if a user opens a screen\n  // reader’s list of elements (headings, form controls, landmarks, etc.) in the document.\n\n  const setAriaHidden = () => {\n    const bodyChildren = Array.from(document.body.children);\n    bodyChildren.forEach(el => {\n      if (el === getContainer() || el.contains(getContainer())) {\n        return;\n      }\n\n      if (el.hasAttribute('aria-hidden')) {\n        el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'));\n      }\n\n      el.setAttribute('aria-hidden', 'true');\n    });\n  };\n  const unsetAriaHidden = () => {\n    const bodyChildren = Array.from(document.body.children);\n    bodyChildren.forEach(el => {\n      if (el.hasAttribute('data-previous-aria-hidden')) {\n        el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'));\n        el.removeAttribute('data-previous-aria-hidden');\n      } else {\n        el.removeAttribute('aria-hidden');\n      }\n    });\n  };\n\n  /* istanbul ignore file */\n\n  const iOSfix = () => {\n    const iOS = // @ts-ignore\n    /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;\n\n    if (iOS && !hasClass(document.body, swalClasses.iosfix)) {\n      const offset = document.body.scrollTop;\n      document.body.style.top = \"\".concat(offset * -1, \"px\");\n      addClass(document.body, swalClasses.iosfix);\n      lockBodyScroll();\n      addBottomPaddingForTallPopups();\n    }\n  };\n  /**\n   * https://github.com/sweetalert2/sweetalert2/issues/1948\n   */\n\n  const addBottomPaddingForTallPopups = () => {\n    const ua = navigator.userAgent;\n    const iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i);\n    const webkit = !!ua.match(/WebKit/i);\n    const iOSSafari = iOS && webkit && !ua.match(/CriOS/i);\n\n    if (iOSSafari) {\n      const bottomPanelHeight = 44;\n\n      if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) {\n        getContainer().style.paddingBottom = \"\".concat(bottomPanelHeight, \"px\");\n      }\n    }\n  };\n  /**\n   * https://github.com/sweetalert2/sweetalert2/issues/1246\n   */\n\n\n  const lockBodyScroll = () => {\n    const container = getContainer();\n    let preventTouchMove;\n    /**\n     * @param {TouchEvent} e\n     */\n\n    container.ontouchstart = e => {\n      preventTouchMove = shouldPreventTouchMove(e);\n    };\n    /**\n     * @param {TouchEvent} e\n     */\n\n\n    container.ontouchmove = e => {\n      if (preventTouchMove) {\n        e.preventDefault();\n        e.stopPropagation();\n      }\n    };\n  };\n  /**\n   * @param {TouchEvent} event\n   * @returns {boolean}\n   */\n\n\n  const shouldPreventTouchMove = event => {\n    const target = event.target;\n    const container = getContainer();\n\n    if (isStylus(event) || isZoom(event)) {\n      return false;\n    }\n\n    if (target === container) {\n      return true;\n    }\n\n    if (!isScrollable(container) && target instanceof HTMLElement && target.tagName !== 'INPUT' && // #1603\n    target.tagName !== 'TEXTAREA' && // #2266\n    !(isScrollable(getHtmlContainer()) && // #1944\n    getHtmlContainer().contains(target))) {\n      return true;\n    }\n\n    return false;\n  };\n  /**\n   * https://github.com/sweetalert2/sweetalert2/issues/1786\n   *\n   * @param {*} event\n   * @returns {boolean}\n   */\n\n\n  const isStylus = event => {\n    return event.touches && event.touches.length && event.touches[0].touchType === 'stylus';\n  };\n  /**\n   * https://github.com/sweetalert2/sweetalert2/issues/1891\n   *\n   * @param {TouchEvent} event\n   * @returns {boolean}\n   */\n\n\n  const isZoom = event => {\n    return event.touches && event.touches.length > 1;\n  };\n\n  const undoIOSfix = () => {\n    if (hasClass(document.body, swalClasses.iosfix)) {\n      const offset = parseInt(document.body.style.top, 10);\n      removeClass(document.body, swalClasses.iosfix);\n      document.body.style.top = '';\n      document.body.scrollTop = offset * -1;\n    }\n  };\n\n  const fixScrollbar = () => {\n    // for queues, do not do this more than once\n    if (states.previousBodyPadding !== null) {\n      return;\n    } // if the body has overflow\n\n\n    if (document.body.scrollHeight > window.innerHeight) {\n      // add padding so the content doesn't shift after removal of scrollbar\n      states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));\n      document.body.style.paddingRight = \"\".concat(states.previousBodyPadding + measureScrollbar(), \"px\");\n    }\n  };\n  const undoScrollbar = () => {\n    if (states.previousBodyPadding !== null) {\n      document.body.style.paddingRight = \"\".concat(states.previousBodyPadding, \"px\");\n      states.previousBodyPadding = null;\n    }\n  };\n\n  /*\n   * Instance method to close sweetAlert\n   */\n\n  function removePopupAndResetState(instance, container, returnFocus, didClose) {\n    if (isToast()) {\n      triggerDidCloseAndDispose(instance, didClose);\n    } else {\n      restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose));\n      removeKeydownHandler(globalState);\n    }\n\n    const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088\n    // for some reason removing the container in Safari will scroll the document to bottom\n\n    if (isSafari) {\n      container.setAttribute('style', 'display:none !important');\n      container.removeAttribute('class');\n      container.innerHTML = '';\n    } else {\n      container.remove();\n    }\n\n    if (isModal()) {\n      undoScrollbar();\n      undoIOSfix();\n      unsetAriaHidden();\n    }\n\n    removeBodyClasses();\n  }\n\n  function removeBodyClasses() {\n    removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]);\n  }\n\n  function close(resolveValue) {\n    resolveValue = prepareResolveValue(resolveValue);\n    const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);\n    const didClose = triggerClosePopup(this);\n\n    if (this.isAwaitingPromise()) {\n      // A swal awaiting for a promise (after a click on Confirm or Deny) cannot be dismissed anymore #2335\n      if (!resolveValue.isDismissed) {\n        handleAwaitingPromise(this);\n        swalPromiseResolve(resolveValue);\n      }\n    } else if (didClose) {\n      // Resolve Swal promise\n      swalPromiseResolve(resolveValue);\n    }\n  }\n  function isAwaitingPromise() {\n    return !!privateProps.awaitingPromise.get(this);\n  }\n\n  const triggerClosePopup = instance => {\n    const popup = getPopup();\n\n    if (!popup) {\n      return false;\n    }\n\n    const innerParams = privateProps.innerParams.get(instance);\n\n    if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) {\n      return false;\n    }\n\n    removeClass(popup, innerParams.showClass.popup);\n    addClass(popup, innerParams.hideClass.popup);\n    const backdrop = getContainer();\n    removeClass(backdrop, innerParams.showClass.backdrop);\n    addClass(backdrop, innerParams.hideClass.backdrop);\n    handlePopupAnimation(instance, popup, innerParams);\n    return true;\n  };\n\n  function rejectPromise(error) {\n    const rejectPromise = privateMethods.swalPromiseReject.get(this);\n    handleAwaitingPromise(this);\n\n    if (rejectPromise) {\n      // Reject Swal promise\n      rejectPromise(error);\n    }\n  }\n  const handleAwaitingPromise = instance => {\n    if (instance.isAwaitingPromise()) {\n      privateProps.awaitingPromise.delete(instance); // The instance might have been previously partly destroyed, we must resume the destroy process in this case #2335\n\n      if (!privateProps.innerParams.get(instance)) {\n        instance._destroy();\n      }\n    }\n  };\n\n  const prepareResolveValue = resolveValue => {\n    // When user calls Swal.close()\n    if (typeof resolveValue === 'undefined') {\n      return {\n        isConfirmed: false,\n        isDenied: false,\n        isDismissed: true\n      };\n    }\n\n    return Object.assign({\n      isConfirmed: false,\n      isDenied: false,\n      isDismissed: false\n    }, resolveValue);\n  };\n\n  const handlePopupAnimation = (instance, popup, innerParams) => {\n    const container = getContainer(); // If animation is supported, animate\n\n    const animationIsSupported = animationEndEvent && hasCssAnimation(popup);\n\n    if (typeof innerParams.willClose === 'function') {\n      innerParams.willClose(popup);\n    }\n\n    if (animationIsSupported) {\n      animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose);\n    } else {\n      // Otherwise, remove immediately\n      removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose);\n    }\n  };\n\n  const animatePopup = (instance, popup, container, returnFocus, didClose) => {\n    globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose);\n    popup.addEventListener(animationEndEvent, function (e) {\n      if (e.target === popup) {\n        globalState.swalCloseEventFinishedCallback();\n        delete globalState.swalCloseEventFinishedCallback;\n      }\n    });\n  };\n\n  const triggerDidCloseAndDispose = (instance, didClose) => {\n    setTimeout(() => {\n      if (typeof didClose === 'function') {\n        didClose.bind(instance.params)();\n      }\n\n      instance._destroy();\n    });\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {string[]} buttons\n   * @param {boolean} disabled\n   */\n\n  function setButtonsDisabled(instance, buttons, disabled) {\n    const domCache = privateProps.domCache.get(instance);\n    buttons.forEach(button => {\n      domCache[button].disabled = disabled;\n    });\n  }\n  /**\n   * @param {HTMLInputElement} input\n   * @param {boolean} disabled\n   */\n\n\n  function setInputDisabled(input, disabled) {\n    if (!input) {\n      return;\n    }\n\n    if (input.type === 'radio') {\n      const radiosContainer = input.parentNode.parentNode;\n      const radios = radiosContainer.querySelectorAll('input');\n\n      for (let i = 0; i < radios.length; i++) {\n        radios[i].disabled = disabled;\n      }\n    } else {\n      input.disabled = disabled;\n    }\n  }\n\n  function enableButtons() {\n    setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false);\n  }\n  function disableButtons() {\n    setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true);\n  }\n  function enableInput() {\n    setInputDisabled(this.getInput(), false);\n  }\n  function disableInput() {\n    setInputDisabled(this.getInput(), true);\n  }\n\n  function showValidationMessage(error) {\n    const domCache = privateProps.domCache.get(this);\n    const params = privateProps.innerParams.get(this);\n    setInnerHtml(domCache.validationMessage, error);\n    domCache.validationMessage.className = swalClasses['validation-message'];\n\n    if (params.customClass && params.customClass.validationMessage) {\n      addClass(domCache.validationMessage, params.customClass.validationMessage);\n    }\n\n    show(domCache.validationMessage);\n    const input = this.getInput();\n\n    if (input) {\n      input.setAttribute('aria-invalid', true);\n      input.setAttribute('aria-describedby', swalClasses['validation-message']);\n      focusInput(input);\n      addClass(input, swalClasses.inputerror);\n    }\n  } // Hide block with validation message\n\n  function resetValidationMessage$1() {\n    const domCache = privateProps.domCache.get(this);\n\n    if (domCache.validationMessage) {\n      hide(domCache.validationMessage);\n    }\n\n    const input = this.getInput();\n\n    if (input) {\n      input.removeAttribute('aria-invalid');\n      input.removeAttribute('aria-describedby');\n      removeClass(input, swalClasses.inputerror);\n    }\n  }\n\n  function getProgressSteps$1() {\n    const domCache = privateProps.domCache.get(this);\n    return domCache.progressSteps;\n  }\n\n  const defaultParams = {\n    title: '',\n    titleText: '',\n    text: '',\n    html: '',\n    footer: '',\n    icon: undefined,\n    iconColor: undefined,\n    iconHtml: undefined,\n    template: undefined,\n    toast: false,\n    showClass: {\n      popup: 'swal2-show',\n      backdrop: 'swal2-backdrop-show',\n      icon: 'swal2-icon-show'\n    },\n    hideClass: {\n      popup: 'swal2-hide',\n      backdrop: 'swal2-backdrop-hide',\n      icon: 'swal2-icon-hide'\n    },\n    customClass: {},\n    target: 'body',\n    color: undefined,\n    backdrop: true,\n    heightAuto: true,\n    allowOutsideClick: true,\n    allowEscapeKey: true,\n    allowEnterKey: true,\n    stopKeydownPropagation: true,\n    keydownListenerCapture: false,\n    showConfirmButton: true,\n    showDenyButton: false,\n    showCancelButton: false,\n    preConfirm: undefined,\n    preDeny: undefined,\n    confirmButtonText: 'OK',\n    confirmButtonAriaLabel: '',\n    confirmButtonColor: undefined,\n    denyButtonText: 'No',\n    denyButtonAriaLabel: '',\n    denyButtonColor: undefined,\n    cancelButtonText: 'Cancel',\n    cancelButtonAriaLabel: '',\n    cancelButtonColor: undefined,\n    buttonsStyling: true,\n    reverseButtons: false,\n    focusConfirm: true,\n    focusDeny: false,\n    focusCancel: false,\n    returnFocus: true,\n    showCloseButton: false,\n    closeButtonHtml: '&times;',\n    closeButtonAriaLabel: 'Close this dialog',\n    loaderHtml: '',\n    showLoaderOnConfirm: false,\n    showLoaderOnDeny: false,\n    imageUrl: undefined,\n    imageWidth: undefined,\n    imageHeight: undefined,\n    imageAlt: '',\n    timer: undefined,\n    timerProgressBar: false,\n    width: undefined,\n    padding: undefined,\n    background: undefined,\n    input: undefined,\n    inputPlaceholder: '',\n    inputLabel: '',\n    inputValue: '',\n    inputOptions: {},\n    inputAutoTrim: true,\n    inputAttributes: {},\n    inputValidator: undefined,\n    returnInputValueOnDeny: false,\n    validationMessage: undefined,\n    grow: false,\n    position: 'center',\n    progressSteps: [],\n    currentProgressStep: undefined,\n    progressStepsDistance: undefined,\n    willOpen: undefined,\n    didOpen: undefined,\n    didRender: undefined,\n    willClose: undefined,\n    didClose: undefined,\n    didDestroy: undefined,\n    scrollbarPadding: true\n  };\n  const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'color', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose'];\n  const deprecatedParams = {};\n  const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture'];\n  /**\n   * Is valid parameter\n   *\n   * @param {string} paramName\n   * @returns {boolean}\n   */\n\n  const isValidParameter = paramName => {\n    return Object.prototype.hasOwnProperty.call(defaultParams, paramName);\n  };\n  /**\n   * Is valid parameter for Swal.update() method\n   *\n   * @param {string} paramName\n   * @returns {boolean}\n   */\n\n  const isUpdatableParameter = paramName => {\n    return updatableParams.indexOf(paramName) !== -1;\n  };\n  /**\n   * Is deprecated parameter\n   *\n   * @param {string} paramName\n   * @returns {string | undefined}\n   */\n\n  const isDeprecatedParameter = paramName => {\n    return deprecatedParams[paramName];\n  };\n  /**\n   * @param {string} param\n   */\n\n  const checkIfParamIsValid = param => {\n    if (!isValidParameter(param)) {\n      warn(\"Unknown parameter \\\"\".concat(param, \"\\\"\"));\n    }\n  };\n  /**\n   * @param {string} param\n   */\n\n\n  const checkIfToastParamIsValid = param => {\n    if (toastIncompatibleParams.includes(param)) {\n      warn(\"The parameter \\\"\".concat(param, \"\\\" is incompatible with toasts\"));\n    }\n  };\n  /**\n   * @param {string} param\n   */\n\n\n  const checkIfParamIsDeprecated = param => {\n    if (isDeprecatedParameter(param)) {\n      warnAboutDeprecation(param, isDeprecatedParameter(param));\n    }\n  };\n  /**\n   * Show relevant warnings for given params\n   *\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const showWarningsForParams = params => {\n    if (!params.backdrop && params.allowOutsideClick) {\n      warn('\"allowOutsideClick\" parameter requires `backdrop` parameter to be set to `true`');\n    }\n\n    for (const param in params) {\n      checkIfParamIsValid(param);\n\n      if (params.toast) {\n        checkIfToastParamIsValid(param);\n      }\n\n      checkIfParamIsDeprecated(param);\n    }\n  };\n\n  /**\n   * Updates popup parameters.\n   */\n\n  function update(params) {\n    const popup = getPopup();\n    const innerParams = privateProps.innerParams.get(this);\n\n    if (!popup || hasClass(popup, innerParams.hideClass.popup)) {\n      return warn(\"You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.\");\n    }\n\n    const validUpdatableParams = filterValidParams(params);\n    const updatedParams = Object.assign({}, innerParams, validUpdatableParams);\n    render(this, updatedParams);\n    privateProps.innerParams.set(this, updatedParams);\n    Object.defineProperties(this, {\n      params: {\n        value: Object.assign({}, this.params, params),\n        writable: false,\n        enumerable: true\n      }\n    });\n  }\n\n  const filterValidParams = params => {\n    const validUpdatableParams = {};\n    Object.keys(params).forEach(param => {\n      if (isUpdatableParameter(param)) {\n        validUpdatableParams[param] = params[param];\n      } else {\n        warn(\"Invalid parameter to update: \".concat(param));\n      }\n    });\n    return validUpdatableParams;\n  };\n\n  function _destroy() {\n    const domCache = privateProps.domCache.get(this);\n    const innerParams = privateProps.innerParams.get(this);\n\n    if (!innerParams) {\n      disposeWeakMaps(this); // The WeakMaps might have been partly destroyed, we must recall it to dispose any remaining WeakMaps #2335\n\n      return; // This instance has already been destroyed\n    } // Check if there is another Swal closing\n\n\n    if (domCache.popup && globalState.swalCloseEventFinishedCallback) {\n      globalState.swalCloseEventFinishedCallback();\n      delete globalState.swalCloseEventFinishedCallback;\n    }\n\n    if (typeof innerParams.didDestroy === 'function') {\n      innerParams.didDestroy();\n    }\n\n    disposeSwal(this);\n  }\n  /**\n   * @param {SweetAlert2} instance\n   */\n\n  const disposeSwal = instance => {\n    disposeWeakMaps(instance); // Unset this.params so GC will dispose it (#1569)\n    // @ts-ignore\n\n    delete instance.params; // Unset globalState props so GC will dispose globalState (#1569)\n\n    delete globalState.keydownHandler;\n    delete globalState.keydownTarget; // Unset currentInstance\n\n    delete globalState.currentInstance;\n  };\n  /**\n   * @param {SweetAlert2} instance\n   */\n\n\n  const disposeWeakMaps = instance => {\n    // If the current instance is awaiting a promise result, we keep the privateMethods to call them once the promise result is retrieved #2335\n    // @ts-ignore\n    if (instance.isAwaitingPromise()) {\n      unsetWeakMaps(privateProps, instance);\n      privateProps.awaitingPromise.set(instance, true);\n    } else {\n      unsetWeakMaps(privateMethods, instance);\n      unsetWeakMaps(privateProps, instance);\n    }\n  };\n  /**\n   * @param {object} obj\n   * @param {SweetAlert2} instance\n   */\n\n\n  const unsetWeakMaps = (obj, instance) => {\n    for (const i in obj) {\n      obj[i].delete(instance);\n    }\n  };\n\n\n\n  var instanceMethods = /*#__PURE__*/Object.freeze({\n    hideLoading: hideLoading,\n    disableLoading: hideLoading,\n    getInput: getInput$1,\n    close: close,\n    isAwaitingPromise: isAwaitingPromise,\n    rejectPromise: rejectPromise,\n    handleAwaitingPromise: handleAwaitingPromise,\n    closePopup: close,\n    closeModal: close,\n    closeToast: close,\n    enableButtons: enableButtons,\n    disableButtons: disableButtons,\n    enableInput: enableInput,\n    disableInput: disableInput,\n    showValidationMessage: showValidationMessage,\n    resetValidationMessage: resetValidationMessage$1,\n    getProgressSteps: getProgressSteps$1,\n    update: update,\n    _destroy: _destroy\n  });\n\n  /**\n   * Shows loader (spinner), this is useful with AJAX requests.\n   * By default the loader be shown instead of the \"Confirm\" button.\n   */\n\n  const showLoading = buttonToReplace => {\n    let popup = getPopup();\n\n    if (!popup) {\n      new Swal(); // eslint-disable-line no-new\n    }\n\n    popup = getPopup();\n    const loader = getLoader();\n\n    if (isToast()) {\n      hide(getIcon());\n    } else {\n      replaceButton(popup, buttonToReplace);\n    }\n\n    show(loader);\n    popup.setAttribute('data-loading', 'true');\n    popup.setAttribute('aria-busy', 'true');\n    popup.focus();\n  };\n\n  const replaceButton = (popup, buttonToReplace) => {\n    const actions = getActions();\n    const loader = getLoader();\n\n    if (!buttonToReplace && isVisible(getConfirmButton())) {\n      buttonToReplace = getConfirmButton();\n    }\n\n    show(actions);\n\n    if (buttonToReplace) {\n      hide(buttonToReplace);\n      loader.setAttribute('data-button-to-replace', buttonToReplace.className);\n    }\n\n    loader.parentNode.insertBefore(loader, buttonToReplace);\n    addClass([popup, actions], swalClasses.loading);\n  };\n\n  /**\n   * @typedef { string | number | boolean } InputValue\n   */\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const handleInputOptionsAndValue = (instance, params) => {\n    if (params.input === 'select' || params.input === 'radio') {\n      handleInputOptions(instance, params);\n    } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {\n      showLoading(getConfirmButton());\n      handleInputValue(instance, params);\n    }\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} innerParams\n   * @returns {string | number | File | FileList | null}\n   */\n\n  const getInputValue = (instance, innerParams) => {\n    const input = instance.getInput();\n\n    if (!input) {\n      return null;\n    }\n\n    switch (innerParams.input) {\n      case 'checkbox':\n        return getCheckboxValue(input);\n\n      case 'radio':\n        return getRadioValue(input);\n\n      case 'file':\n        return getFileValue(input);\n\n      default:\n        return innerParams.inputAutoTrim ? input.value.trim() : input.value;\n    }\n  };\n  /**\n   * @param {HTMLInputElement} input\n   * @returns {number}\n   */\n\n  const getCheckboxValue = input => input.checked ? 1 : 0;\n  /**\n   * @param {HTMLInputElement} input\n   * @returns {string | null}\n   */\n\n\n  const getRadioValue = input => input.checked ? input.value : null;\n  /**\n   * @param {HTMLInputElement} input\n   * @returns {FileList | File | null}\n   */\n\n\n  const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null;\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const handleInputOptions = (instance, params) => {\n    const popup = getPopup();\n    /**\n     * @param {Record<string, any>} inputOptions\n     */\n\n    const processInputOptions = inputOptions => {\n      populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params);\n    };\n\n    if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {\n      showLoading(getConfirmButton());\n      asPromise(params.inputOptions).then(inputOptions => {\n        instance.hideLoading();\n        processInputOptions(inputOptions);\n      });\n    } else if (typeof params.inputOptions === 'object') {\n      processInputOptions(params.inputOptions);\n    } else {\n      error(\"Unexpected type of inputOptions! Expected object, Map or Promise, got \".concat(typeof params.inputOptions));\n    }\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const handleInputValue = (instance, params) => {\n    const input = instance.getInput();\n    hide(input);\n    asPromise(params.inputValue).then(inputValue => {\n      input.value = params.input === 'number' ? \"\".concat(parseFloat(inputValue) || 0) : \"\".concat(inputValue);\n      show(input);\n      input.focus();\n      instance.hideLoading();\n    }).catch(err => {\n      error(\"Error in inputValue promise: \".concat(err));\n      input.value = '';\n      show(input);\n      input.focus();\n      instance.hideLoading();\n    });\n  };\n\n  const populateInputOptions = {\n    /**\n     * @param {HTMLElement} popup\n     * @param {Record<string, any>} inputOptions\n     * @param {SweetAlertOptions} params\n     */\n    select: (popup, inputOptions, params) => {\n      const select = getDirectChildByClass(popup, swalClasses.select);\n      /**\n       * @param {HTMLElement} parent\n       * @param {string} optionLabel\n       * @param {string} optionValue\n       */\n\n      const renderOption = (parent, optionLabel, optionValue) => {\n        const option = document.createElement('option');\n        option.value = optionValue;\n        setInnerHtml(option, optionLabel);\n        option.selected = isSelected(optionValue, params.inputValue);\n        parent.appendChild(option);\n      };\n\n      inputOptions.forEach(inputOption => {\n        const optionValue = inputOption[0];\n        const optionLabel = inputOption[1]; // <optgroup> spec:\n        // https://www.w3.org/TR/html401/interact/forms.html#h-17.6\n        // \"...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)...\"\n        // check whether this is a <optgroup>\n\n        if (Array.isArray(optionLabel)) {\n          // if it is an array, then it is an <optgroup>\n          const optgroup = document.createElement('optgroup');\n          optgroup.label = optionValue;\n          optgroup.disabled = false; // not configurable for now\n\n          select.appendChild(optgroup);\n          optionLabel.forEach(o => renderOption(optgroup, o[1], o[0]));\n        } else {\n          // case of <option>\n          renderOption(select, optionLabel, optionValue);\n        }\n      });\n      select.focus();\n    },\n\n    /**\n     * @param {HTMLElement} popup\n     * @param {Record<string, any>} inputOptions\n     * @param {SweetAlertOptions} params\n     */\n    radio: (popup, inputOptions, params) => {\n      const radio = getDirectChildByClass(popup, swalClasses.radio);\n      inputOptions.forEach(inputOption => {\n        const radioValue = inputOption[0];\n        const radioLabel = inputOption[1];\n        const radioInput = document.createElement('input');\n        const radioLabelElement = document.createElement('label');\n        radioInput.type = 'radio';\n        radioInput.name = swalClasses.radio;\n        radioInput.value = radioValue;\n\n        if (isSelected(radioValue, params.inputValue)) {\n          radioInput.checked = true;\n        }\n\n        const label = document.createElement('span');\n        setInnerHtml(label, radioLabel);\n        label.className = swalClasses.label;\n        radioLabelElement.appendChild(radioInput);\n        radioLabelElement.appendChild(label);\n        radio.appendChild(radioLabelElement);\n      });\n      const radios = radio.querySelectorAll('input');\n\n      if (radios.length) {\n        radios[0].focus();\n      }\n    }\n  };\n  /**\n   * Converts `inputOptions` into an array of `[value, label]`s\n   *\n   * @param {Record<string, any>} inputOptions\n   * @returns {Array<Array<string>>}\n   */\n\n  const formatInputOptions = inputOptions => {\n    const result = [];\n\n    if (typeof Map !== 'undefined' && inputOptions instanceof Map) {\n      inputOptions.forEach((value, key) => {\n        let valueFormatted = value;\n\n        if (typeof valueFormatted === 'object') {\n          // case of <optgroup>\n          valueFormatted = formatInputOptions(valueFormatted);\n        }\n\n        result.push([key, valueFormatted]);\n      });\n    } else {\n      Object.keys(inputOptions).forEach(key => {\n        let valueFormatted = inputOptions[key];\n\n        if (typeof valueFormatted === 'object') {\n          // case of <optgroup>\n          valueFormatted = formatInputOptions(valueFormatted);\n        }\n\n        result.push([key, valueFormatted]);\n      });\n    }\n\n    return result;\n  };\n  /**\n   * @param {string} optionValue\n   * @param {InputValue | Promise<InputValue> | { toPromise: () => InputValue }} inputValue\n   * @returns {boolean}\n   */\n\n\n  const isSelected = (optionValue, inputValue) => {\n    return inputValue && inputValue.toString() === optionValue.toString();\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   */\n\n  const handleConfirmButtonClick = instance => {\n    const innerParams = privateProps.innerParams.get(instance);\n    instance.disableButtons();\n\n    if (innerParams.input) {\n      handleConfirmOrDenyWithInput(instance, 'confirm');\n    } else {\n      confirm(instance, true);\n    }\n  };\n  /**\n   * @param {SweetAlert2} instance\n   */\n\n  const handleDenyButtonClick = instance => {\n    const innerParams = privateProps.innerParams.get(instance);\n    instance.disableButtons();\n\n    if (innerParams.returnInputValueOnDeny) {\n      handleConfirmOrDenyWithInput(instance, 'deny');\n    } else {\n      deny(instance, false);\n    }\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @param {Function} dismissWith\n   */\n\n  const handleCancelButtonClick = (instance, dismissWith) => {\n    instance.disableButtons();\n    dismissWith(DismissReason.cancel);\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @param {'confirm' | 'deny'} type\n   */\n\n  const handleConfirmOrDenyWithInput = (instance, type) => {\n    const innerParams = privateProps.innerParams.get(instance);\n\n    if (!innerParams.input) {\n      error(\"The \\\"input\\\" parameter is needed to be set when using returnInputValueOn\".concat(capitalizeFirstLetter(type)));\n      return;\n    }\n\n    const inputValue = getInputValue(instance, innerParams);\n\n    if (innerParams.inputValidator) {\n      handleInputValidator(instance, inputValue, type);\n    } else if (!instance.getInput().checkValidity()) {\n      instance.enableButtons();\n      instance.showValidationMessage(innerParams.validationMessage);\n    } else if (type === 'deny') {\n      deny(instance, inputValue);\n    } else {\n      confirm(instance, inputValue);\n    }\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @param {string | number | File | FileList | null} inputValue\n   * @param {'confirm' | 'deny'} type\n   */\n\n\n  const handleInputValidator = (instance, inputValue, type) => {\n    const innerParams = privateProps.innerParams.get(instance);\n    instance.disableInput();\n    const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage)));\n    validationPromise.then(validationMessage => {\n      instance.enableButtons();\n      instance.enableInput();\n\n      if (validationMessage) {\n        instance.showValidationMessage(validationMessage);\n      } else if (type === 'deny') {\n        deny(instance, inputValue);\n      } else {\n        confirm(instance, inputValue);\n      }\n    });\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @param {any} value\n   */\n\n\n  const deny = (instance, value) => {\n    const innerParams = privateProps.innerParams.get(instance || undefined);\n\n    if (innerParams.showLoaderOnDeny) {\n      showLoading(getDenyButton());\n    }\n\n    if (innerParams.preDeny) {\n      privateProps.awaitingPromise.set(instance || undefined, true); // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preDeny's promise is received\n\n      const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage)));\n      preDenyPromise.then(preDenyValue => {\n        if (preDenyValue === false) {\n          instance.hideLoading();\n          handleAwaitingPromise(instance);\n        } else {\n          instance.close({\n            isDenied: true,\n            value: typeof preDenyValue === 'undefined' ? value : preDenyValue\n          });\n        }\n      }).catch(error$$1 => rejectWith(instance || undefined, error$$1));\n    } else {\n      instance.close({\n        isDenied: true,\n        value\n      });\n    }\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @param {any} value\n   */\n\n\n  const succeedWith = (instance, value) => {\n    instance.close({\n      isConfirmed: true,\n      value\n    });\n  };\n  /**\n   *\n   * @param {SweetAlert2} instance\n   * @param {string} error\n   */\n\n\n  const rejectWith = (instance, error$$1) => {\n    // @ts-ignore\n    instance.rejectPromise(error$$1);\n  };\n  /**\n   *\n   * @param {SweetAlert2} instance\n   * @param {any} value\n   */\n\n\n  const confirm = (instance, value) => {\n    const innerParams = privateProps.innerParams.get(instance || undefined);\n\n    if (innerParams.showLoaderOnConfirm) {\n      showLoading();\n    }\n\n    if (innerParams.preConfirm) {\n      instance.resetValidationMessage();\n      privateProps.awaitingPromise.set(instance || undefined, true); // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preConfirm's promise is received\n\n      const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage)));\n      preConfirmPromise.then(preConfirmValue => {\n        if (isVisible(getValidationMessage()) || preConfirmValue === false) {\n          instance.hideLoading();\n          handleAwaitingPromise(instance);\n        } else {\n          succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue);\n        }\n      }).catch(error$$1 => rejectWith(instance || undefined, error$$1));\n    } else {\n      succeedWith(instance, value);\n    }\n  };\n\n  const handlePopupClick = (instance, domCache, dismissWith) => {\n    const innerParams = privateProps.innerParams.get(instance);\n\n    if (innerParams.toast) {\n      handleToastClick(instance, domCache, dismissWith);\n    } else {\n      // Ignore click events that had mousedown on the popup but mouseup on the container\n      // This can happen when the user drags a slider\n      handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup\n\n      handleContainerMousedown(domCache);\n      handleModalClick(instance, domCache, dismissWith);\n    }\n  };\n\n  const handleToastClick = (instance, domCache, dismissWith) => {\n    // Closing toast by internal click\n    domCache.popup.onclick = () => {\n      const innerParams = privateProps.innerParams.get(instance);\n\n      if (innerParams && (isAnyButtonShown(innerParams) || innerParams.timer || innerParams.input)) {\n        return;\n      }\n\n      dismissWith(DismissReason.close);\n    };\n  };\n  /**\n   * @param {*} innerParams\n   * @returns {boolean}\n   */\n\n\n  const isAnyButtonShown = innerParams => {\n    return innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton;\n  };\n\n  let ignoreOutsideClick = false;\n\n  const handleModalMousedown = domCache => {\n    domCache.popup.onmousedown = () => {\n      domCache.container.onmouseup = function (e) {\n        domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't\n        // have any other direct children aside of the popup\n\n        if (e.target === domCache.container) {\n          ignoreOutsideClick = true;\n        }\n      };\n    };\n  };\n\n  const handleContainerMousedown = domCache => {\n    domCache.container.onmousedown = () => {\n      domCache.popup.onmouseup = function (e) {\n        domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup\n\n        if (e.target === domCache.popup || domCache.popup.contains(e.target)) {\n          ignoreOutsideClick = true;\n        }\n      };\n    };\n  };\n\n  const handleModalClick = (instance, domCache, dismissWith) => {\n    domCache.container.onclick = e => {\n      const innerParams = privateProps.innerParams.get(instance);\n\n      if (ignoreOutsideClick) {\n        ignoreOutsideClick = false;\n        return;\n      }\n\n      if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) {\n        dismissWith(DismissReason.backdrop);\n      }\n    };\n  };\n\n  const isJqueryElement = elem => typeof elem === 'object' && elem.jquery;\n\n  const isElement = elem => elem instanceof Element || isJqueryElement(elem);\n\n  const argsToParams = args => {\n    const params = {};\n\n    if (typeof args[0] === 'object' && !isElement(args[0])) {\n      Object.assign(params, args[0]);\n    } else {\n      ['title', 'html', 'icon'].forEach((name, index) => {\n        const arg = args[index];\n\n        if (typeof arg === 'string' || isElement(arg)) {\n          params[name] = arg;\n        } else if (arg !== undefined) {\n          error(\"Unexpected type of \".concat(name, \"! Expected \\\"string\\\" or \\\"Element\\\", got \").concat(typeof arg));\n        }\n      });\n    }\n\n    return params;\n  };\n\n  function fire() {\n    const Swal = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return new Swal(...args);\n  }\n\n  /**\n   * Returns an extended version of `Swal` containing `params` as defaults.\n   * Useful for reusing Swal configuration.\n   *\n   * For example:\n   *\n   * Before:\n   * const textPromptOptions = { input: 'text', showCancelButton: true }\n   * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' })\n   * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' })\n   *\n   * After:\n   * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })\n   * const {value: firstName} = await TextPrompt('What is your first name?')\n   * const {value: lastName} = await TextPrompt('What is your last name?')\n   *\n   * @param mixinParams\n   */\n  function mixin(mixinParams) {\n    class MixinSwal extends this {\n      _main(params, priorityMixinParams) {\n        return super._main(params, Object.assign({}, mixinParams, priorityMixinParams));\n      }\n\n    }\n\n    return MixinSwal;\n  }\n\n  /**\n   * If `timer` parameter is set, returns number of milliseconds of timer remained.\n   * Otherwise, returns undefined.\n   */\n\n  const getTimerLeft = () => {\n    return globalState.timeout && globalState.timeout.getTimerLeft();\n  };\n  /**\n   * Stop timer. Returns number of milliseconds of timer remained.\n   * If `timer` parameter isn't set, returns undefined.\n   */\n\n  const stopTimer = () => {\n    if (globalState.timeout) {\n      stopTimerProgressBar();\n      return globalState.timeout.stop();\n    }\n  };\n  /**\n   * Resume timer. Returns number of milliseconds of timer remained.\n   * If `timer` parameter isn't set, returns undefined.\n   */\n\n  const resumeTimer = () => {\n    if (globalState.timeout) {\n      const remaining = globalState.timeout.start();\n      animateTimerProgressBar(remaining);\n      return remaining;\n    }\n  };\n  /**\n   * Resume timer. Returns number of milliseconds of timer remained.\n   * If `timer` parameter isn't set, returns undefined.\n   */\n\n  const toggleTimer = () => {\n    const timer = globalState.timeout;\n    return timer && (timer.running ? stopTimer() : resumeTimer());\n  };\n  /**\n   * Increase timer. Returns number of milliseconds of an updated timer.\n   * If `timer` parameter isn't set, returns undefined.\n   */\n\n  const increaseTimer = n => {\n    if (globalState.timeout) {\n      const remaining = globalState.timeout.increase(n);\n      animateTimerProgressBar(remaining, true);\n      return remaining;\n    }\n  };\n  /**\n   * Check if timer is running. Returns true if timer is running\n   * or false if timer is paused or stopped.\n   * If `timer` parameter isn't set, returns undefined\n   */\n\n  const isTimerRunning = () => {\n    return globalState.timeout && globalState.timeout.isRunning();\n  };\n\n  let bodyClickListenerAdded = false;\n  const clickHandlers = {};\n  function bindClickHandler() {\n    let attr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'data-swal-template';\n    clickHandlers[attr] = this;\n\n    if (!bodyClickListenerAdded) {\n      document.body.addEventListener('click', bodyClickListener);\n      bodyClickListenerAdded = true;\n    }\n  }\n\n  const bodyClickListener = event => {\n    for (let el = event.target; el && el !== document; el = el.parentNode) {\n      for (const attr in clickHandlers) {\n        const template = el.getAttribute(attr);\n\n        if (template) {\n          clickHandlers[attr].fire({\n            template\n          });\n          return;\n        }\n      }\n    }\n  };\n\n\n\n  var staticMethods = /*#__PURE__*/Object.freeze({\n    isValidParameter: isValidParameter,\n    isUpdatableParameter: isUpdatableParameter,\n    isDeprecatedParameter: isDeprecatedParameter,\n    argsToParams: argsToParams,\n    isVisible: isVisible$1,\n    clickConfirm: clickConfirm,\n    clickDeny: clickDeny,\n    clickCancel: clickCancel,\n    getContainer: getContainer,\n    getPopup: getPopup,\n    getTitle: getTitle,\n    getHtmlContainer: getHtmlContainer,\n    getImage: getImage,\n    getIcon: getIcon,\n    getInputLabel: getInputLabel,\n    getCloseButton: getCloseButton,\n    getActions: getActions,\n    getConfirmButton: getConfirmButton,\n    getDenyButton: getDenyButton,\n    getCancelButton: getCancelButton,\n    getLoader: getLoader,\n    getFooter: getFooter,\n    getTimerProgressBar: getTimerProgressBar,\n    getFocusableElements: getFocusableElements,\n    getValidationMessage: getValidationMessage,\n    isLoading: isLoading,\n    fire: fire,\n    mixin: mixin,\n    showLoading: showLoading,\n    enableLoading: showLoading,\n    getTimerLeft: getTimerLeft,\n    stopTimer: stopTimer,\n    resumeTimer: resumeTimer,\n    toggleTimer: toggleTimer,\n    increaseTimer: increaseTimer,\n    isTimerRunning: isTimerRunning,\n    bindClickHandler: bindClickHandler\n  });\n\n  class Timer {\n    /**\n     * @param {Function} callback\n     * @param {number} delay\n     */\n    constructor(callback, delay) {\n      this.callback = callback;\n      this.remaining = delay;\n      this.running = false;\n      this.start();\n    }\n\n    start() {\n      if (!this.running) {\n        this.running = true;\n        this.started = new Date();\n        this.id = setTimeout(this.callback, this.remaining);\n      }\n\n      return this.remaining;\n    }\n\n    stop() {\n      if (this.running) {\n        this.running = false;\n        clearTimeout(this.id);\n        this.remaining -= new Date().getTime() - this.started.getTime();\n      }\n\n      return this.remaining;\n    }\n\n    increase(n) {\n      const running = this.running;\n\n      if (running) {\n        this.stop();\n      }\n\n      this.remaining += n;\n\n      if (running) {\n        this.start();\n      }\n\n      return this.remaining;\n    }\n\n    getTimerLeft() {\n      if (this.running) {\n        this.stop();\n        this.start();\n      }\n\n      return this.remaining;\n    }\n\n    isRunning() {\n      return this.running;\n    }\n\n  }\n\n  const swalStringParams = ['swal-title', 'swal-html', 'swal-footer'];\n  /**\n   * @param {SweetAlertOptions} params\n   * @returns {SweetAlertOptions}\n   */\n\n  const getTemplateParams = params => {\n    /** @type {HTMLTemplateElement} */\n    const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template;\n\n    if (!template) {\n      return {};\n    }\n    /** @type {DocumentFragment} */\n\n\n    const templateContent = template.content;\n    showWarningsForElements(templateContent);\n    const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams));\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   * @returns {SweetAlertOptions}\n   */\n\n  const getSwalParams = templateContent => {\n    const result = {};\n    /** @type {HTMLElement[]} */\n\n    const swalParams = Array.from(templateContent.querySelectorAll('swal-param'));\n    swalParams.forEach(param => {\n      showWarningsForAttributes(param, ['name', 'value']);\n      const paramName = param.getAttribute('name');\n      const value = param.getAttribute('value');\n\n      if (typeof defaultParams[paramName] === 'boolean') {\n        result[paramName] = value !== 'false';\n      } else if (typeof defaultParams[paramName] === 'object') {\n        result[paramName] = JSON.parse(value);\n      } else {\n        result[paramName] = value;\n      }\n    });\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   * @returns {SweetAlertOptions}\n   */\n\n\n  const getSwalButtons = templateContent => {\n    const result = {};\n    /** @type {HTMLElement[]} */\n\n    const swalButtons = Array.from(templateContent.querySelectorAll('swal-button'));\n    swalButtons.forEach(button => {\n      showWarningsForAttributes(button, ['type', 'color', 'aria-label']);\n      const type = button.getAttribute('type');\n      result[\"\".concat(type, \"ButtonText\")] = button.innerHTML;\n      result[\"show\".concat(capitalizeFirstLetter(type), \"Button\")] = true;\n\n      if (button.hasAttribute('color')) {\n        result[\"\".concat(type, \"ButtonColor\")] = button.getAttribute('color');\n      }\n\n      if (button.hasAttribute('aria-label')) {\n        result[\"\".concat(type, \"ButtonAriaLabel\")] = button.getAttribute('aria-label');\n      }\n    });\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   * @returns {SweetAlertOptions}\n   */\n\n\n  const getSwalImage = templateContent => {\n    const result = {};\n    /** @type {HTMLElement} */\n\n    const image = templateContent.querySelector('swal-image');\n\n    if (image) {\n      showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']);\n\n      if (image.hasAttribute('src')) {\n        result.imageUrl = image.getAttribute('src');\n      }\n\n      if (image.hasAttribute('width')) {\n        result.imageWidth = image.getAttribute('width');\n      }\n\n      if (image.hasAttribute('height')) {\n        result.imageHeight = image.getAttribute('height');\n      }\n\n      if (image.hasAttribute('alt')) {\n        result.imageAlt = image.getAttribute('alt');\n      }\n    }\n\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   * @returns {SweetAlertOptions}\n   */\n\n\n  const getSwalIcon = templateContent => {\n    const result = {};\n    /** @type {HTMLElement} */\n\n    const icon = templateContent.querySelector('swal-icon');\n\n    if (icon) {\n      showWarningsForAttributes(icon, ['type', 'color']);\n\n      if (icon.hasAttribute('type')) {\n        /** @type {SweetAlertIcon} */\n        // @ts-ignore\n        result.icon = icon.getAttribute('type');\n      }\n\n      if (icon.hasAttribute('color')) {\n        result.iconColor = icon.getAttribute('color');\n      }\n\n      result.iconHtml = icon.innerHTML;\n    }\n\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   * @returns {SweetAlertOptions}\n   */\n\n\n  const getSwalInput = templateContent => {\n    const result = {};\n    /** @type {HTMLElement} */\n\n    const input = templateContent.querySelector('swal-input');\n\n    if (input) {\n      showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']);\n      /** @type {SweetAlertInput} */\n      // @ts-ignore\n\n      result.input = input.getAttribute('type') || 'text';\n\n      if (input.hasAttribute('label')) {\n        result.inputLabel = input.getAttribute('label');\n      }\n\n      if (input.hasAttribute('placeholder')) {\n        result.inputPlaceholder = input.getAttribute('placeholder');\n      }\n\n      if (input.hasAttribute('value')) {\n        result.inputValue = input.getAttribute('value');\n      }\n    }\n    /** @type {HTMLElement[]} */\n\n\n    const inputOptions = Array.from(templateContent.querySelectorAll('swal-input-option'));\n\n    if (inputOptions.length) {\n      result.inputOptions = {};\n      inputOptions.forEach(option => {\n        showWarningsForAttributes(option, ['value']);\n        const optionValue = option.getAttribute('value');\n        const optionName = option.innerHTML;\n        result.inputOptions[optionValue] = optionName;\n      });\n    }\n\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   * @param {string[]} paramNames\n   * @returns {SweetAlertOptions}\n   */\n\n\n  const getSwalStringParams = (templateContent, paramNames) => {\n    const result = {};\n\n    for (const i in paramNames) {\n      const paramName = paramNames[i];\n      /** @type {HTMLElement} */\n\n      const tag = templateContent.querySelector(paramName);\n\n      if (tag) {\n        showWarningsForAttributes(tag, []);\n        result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim();\n      }\n    }\n\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   */\n\n\n  const showWarningsForElements = templateContent => {\n    const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']);\n    Array.from(templateContent.children).forEach(el => {\n      const tagName = el.tagName.toLowerCase();\n\n      if (!allowedElements.includes(tagName)) {\n        warn(\"Unrecognized element <\".concat(tagName, \">\"));\n      }\n    });\n  };\n  /**\n   * @param {HTMLElement} el\n   * @param {string[]} allowedAttributes\n   */\n\n\n  const showWarningsForAttributes = (el, allowedAttributes) => {\n    Array.from(el.attributes).forEach(attribute => {\n      if (allowedAttributes.indexOf(attribute.name) === -1) {\n        warn([\"Unrecognized attribute \\\"\".concat(attribute.name, \"\\\" on <\").concat(el.tagName.toLowerCase(), \">.\"), \"\".concat(allowedAttributes.length ? \"Allowed attributes are: \".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]);\n      }\n    });\n  };\n\n  const SHOW_CLASS_TIMEOUT = 10;\n  /**\n   * Open popup, add necessary classes and styles, fix scrollbar\n   *\n   * @param {SweetAlertOptions} params\n   */\n\n  const openPopup = params => {\n    const container = getContainer();\n    const popup = getPopup();\n\n    if (typeof params.willOpen === 'function') {\n      params.willOpen(popup);\n    }\n\n    const bodyStyles = window.getComputedStyle(document.body);\n    const initialBodyOverflow = bodyStyles.overflowY;\n    addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto'\n\n    setTimeout(() => {\n      setScrollingVisibility(container, popup);\n    }, SHOW_CLASS_TIMEOUT);\n\n    if (isModal()) {\n      fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow);\n      setAriaHidden();\n    }\n\n    if (!isToast() && !globalState.previousActiveElement) {\n      globalState.previousActiveElement = document.activeElement;\n    }\n\n    if (typeof params.didOpen === 'function') {\n      setTimeout(() => params.didOpen(popup));\n    }\n\n    removeClass(container, swalClasses['no-transition']);\n  };\n  /**\n   * @param {AnimationEvent} event\n   */\n\n  const swalOpenAnimationFinished = event => {\n    const popup = getPopup();\n\n    if (event.target !== popup) {\n      return;\n    }\n\n    const container = getContainer();\n    popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);\n    container.style.overflowY = 'auto';\n  };\n  /**\n   * @param {HTMLElement} container\n   * @param {HTMLElement} popup\n   */\n\n\n  const setScrollingVisibility = (container, popup) => {\n    if (animationEndEvent && hasCssAnimation(popup)) {\n      container.style.overflowY = 'hidden';\n      popup.addEventListener(animationEndEvent, swalOpenAnimationFinished);\n    } else {\n      container.style.overflowY = 'auto';\n    }\n  };\n  /**\n   * @param {HTMLElement} container\n   * @param {boolean} scrollbarPadding\n   * @param {string} initialBodyOverflow\n   */\n\n\n  const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => {\n    iOSfix();\n\n    if (scrollbarPadding && initialBodyOverflow !== 'hidden') {\n      fixScrollbar();\n    } // sweetalert2/issues/1247\n\n\n    setTimeout(() => {\n      container.scrollTop = 0;\n    });\n  };\n  /**\n   * @param {HTMLElement} container\n   * @param {HTMLElement} popup\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const addClasses$1 = (container, popup, params) => {\n    addClass(container, params.showClass.backdrop); // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059\n\n    popup.style.setProperty('opacity', '0', 'important');\n    show(popup, 'grid');\n    setTimeout(() => {\n      // Animate popup right after showing it\n      addClass(popup, params.showClass.popup); // and remove the opacity workaround\n\n      popup.style.removeProperty('opacity');\n    }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062\n\n    addClass([document.documentElement, document.body], swalClasses.shown);\n\n    if (params.heightAuto && params.backdrop && !params.toast) {\n      addClass([document.documentElement, document.body], swalClasses['height-auto']);\n    }\n  };\n\n  var defaultInputValidators = {\n    /**\n     * @param {string} string\n     * @param {string} validationMessage\n     * @returns {Promise<void | string>}\n     */\n    email: (string, validationMessage) => {\n      return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address');\n    },\n\n    /**\n     * @param {string} string\n     * @param {string} validationMessage\n     * @returns {Promise<void | string>}\n     */\n    url: (string, validationMessage) => {\n      // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013\n      return /^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-z]{2,63}\\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL');\n    }\n  };\n\n  /**\n   * @param {SweetAlertOptions} params\n   */\n\n  function setDefaultInputValidators(params) {\n    // Use default `inputValidator` for supported input types if not provided\n    if (!params.inputValidator) {\n      Object.keys(defaultInputValidators).forEach(key => {\n        if (params.input === key) {\n          params.inputValidator = defaultInputValidators[key];\n        }\n      });\n    }\n  }\n  /**\n   * @param {SweetAlertOptions} params\n   */\n\n\n  function validateCustomTargetElement(params) {\n    // Determine if the custom target element is valid\n    if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {\n      warn('Target parameter is not valid, defaulting to \"body\"');\n      params.target = 'body';\n    }\n  }\n  /**\n   * Set type, text and actions on popup\n   *\n   * @param {SweetAlertOptions} params\n   */\n\n\n  function setParameters(params) {\n    setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm\n\n    if (params.showLoaderOnConfirm && !params.preConfirm) {\n      warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\\n' + 'https://sweetalert2.github.io/#ajax-request');\n    }\n\n    validateCustomTargetElement(params); // Replace newlines with <br> in title\n\n    if (typeof params.title === 'string') {\n      params.title = params.title.split('\\n').join('<br />');\n    }\n\n    init(params);\n  }\n\n  let currentInstance;\n\n  class SweetAlert {\n    constructor() {\n      // Prevent run in Node env\n      if (typeof window === 'undefined') {\n        return;\n      }\n\n      currentInstance = this; // @ts-ignore\n\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      const outerParams = Object.freeze(this.constructor.argsToParams(args));\n      Object.defineProperties(this, {\n        params: {\n          value: outerParams,\n          writable: false,\n          enumerable: true,\n          configurable: true\n        }\n      }); // @ts-ignore\n\n      const promise = currentInstance._main(currentInstance.params);\n\n      privateProps.promise.set(this, promise);\n    }\n\n    _main(userParams) {\n      let mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      showWarningsForParams(Object.assign({}, mixinParams, userParams));\n\n      if (globalState.currentInstance) {\n        // @ts-ignore\n        globalState.currentInstance._destroy();\n\n        if (isModal()) {\n          unsetAriaHidden();\n        }\n      }\n\n      globalState.currentInstance = currentInstance;\n      const innerParams = prepareParams(userParams, mixinParams);\n      setParameters(innerParams);\n      Object.freeze(innerParams); // clear the previous timer\n\n      if (globalState.timeout) {\n        globalState.timeout.stop();\n        delete globalState.timeout;\n      } // clear the restore focus timeout\n\n\n      clearTimeout(globalState.restoreFocusTimeout);\n      const domCache = populateDomCache(currentInstance);\n      render(currentInstance, innerParams);\n      privateProps.innerParams.set(currentInstance, innerParams);\n      return swalPromise(currentInstance, domCache, innerParams);\n    } // `catch` cannot be the name of a module export, so we define our thenable methods here instead\n\n\n    then(onFulfilled) {\n      const promise = privateProps.promise.get(this);\n      return promise.then(onFulfilled);\n    }\n\n    finally(onFinally) {\n      const promise = privateProps.promise.get(this);\n      return promise.finally(onFinally);\n    }\n\n  }\n  /**\n   * @param {SweetAlert2} instance\n   * @param {DomCache} domCache\n   * @param {SweetAlertOptions} innerParams\n   * @returns {Promise}\n   */\n\n\n  const swalPromise = (instance, domCache, innerParams) => {\n    return new Promise((resolve, reject) => {\n      // functions to handle all closings/dismissals\n\n      /**\n       * @param {DismissReason} dismiss\n       */\n      const dismissWith = dismiss => {\n        // @ts-ignore\n        instance.close({\n          isDismissed: true,\n          dismiss\n        });\n      };\n\n      privateMethods.swalPromiseResolve.set(instance, resolve);\n      privateMethods.swalPromiseReject.set(instance, reject);\n\n      domCache.confirmButton.onclick = () => {\n        handleConfirmButtonClick(instance);\n      };\n\n      domCache.denyButton.onclick = () => {\n        handleDenyButtonClick(instance);\n      };\n\n      domCache.cancelButton.onclick = () => {\n        handleCancelButtonClick(instance, dismissWith);\n      };\n\n      domCache.closeButton.onclick = () => {\n        // @ts-ignore\n        dismissWith(DismissReason.close);\n      };\n\n      handlePopupClick(instance, domCache, dismissWith);\n      addKeydownHandler(instance, globalState, innerParams, dismissWith);\n      handleInputOptionsAndValue(instance, innerParams);\n      openPopup(innerParams);\n      setupTimer(globalState, innerParams, dismissWith);\n      initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946)\n\n      setTimeout(() => {\n        domCache.container.scrollTop = 0;\n      });\n    });\n  };\n  /**\n   * @param {SweetAlertOptions} userParams\n   * @param {SweetAlertOptions} mixinParams\n   * @returns {SweetAlertOptions}\n   */\n\n\n  const prepareParams = (userParams, mixinParams) => {\n    const templateParams = getTemplateParams(userParams);\n    const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131\n\n    params.showClass = Object.assign({}, defaultParams.showClass, params.showClass);\n    params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass);\n    return params;\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @returns {DomCache}\n   */\n\n\n  const populateDomCache = instance => {\n    const domCache = {\n      popup: getPopup(),\n      container: getContainer(),\n      actions: getActions(),\n      confirmButton: getConfirmButton(),\n      denyButton: getDenyButton(),\n      cancelButton: getCancelButton(),\n      loader: getLoader(),\n      closeButton: getCloseButton(),\n      validationMessage: getValidationMessage(),\n      progressSteps: getProgressSteps()\n    };\n    privateProps.domCache.set(instance, domCache);\n    return domCache;\n  };\n  /**\n   * @param {GlobalState} globalState\n   * @param {SweetAlertOptions} innerParams\n   * @param {Function} dismissWith\n   */\n\n\n  const setupTimer = (globalState$$1, innerParams, dismissWith) => {\n    const timerProgressBar = getTimerProgressBar();\n    hide(timerProgressBar);\n\n    if (innerParams.timer) {\n      globalState$$1.timeout = new Timer(() => {\n        dismissWith('timer');\n        delete globalState$$1.timeout;\n      }, innerParams.timer);\n\n      if (innerParams.timerProgressBar) {\n        show(timerProgressBar);\n        applyCustomClass(timerProgressBar, innerParams, 'timerProgressBar');\n        setTimeout(() => {\n          if (globalState$$1.timeout && globalState$$1.timeout.running) {\n            // timer can be already stopped or unset at this point\n            animateTimerProgressBar(innerParams.timer);\n          }\n        });\n      }\n    }\n  };\n  /**\n   * @param {DomCache} domCache\n   * @param {SweetAlertOptions} innerParams\n   */\n\n\n  const initFocus = (domCache, innerParams) => {\n    if (innerParams.toast) {\n      return;\n    }\n\n    if (!callIfFunction(innerParams.allowEnterKey)) {\n      blurActiveElement();\n      return;\n    }\n\n    if (!focusButton(domCache, innerParams)) {\n      setFocus(innerParams, -1, 1);\n    }\n  };\n  /**\n   * @param {DomCache} domCache\n   * @param {SweetAlertOptions} innerParams\n   * @returns {boolean}\n   */\n\n\n  const focusButton = (domCache, innerParams) => {\n    if (innerParams.focusDeny && isVisible(domCache.denyButton)) {\n      domCache.denyButton.focus();\n      return true;\n    }\n\n    if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {\n      domCache.cancelButton.focus();\n      return true;\n    }\n\n    if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {\n      domCache.confirmButton.focus();\n      return true;\n    }\n\n    return false;\n  };\n\n  const blurActiveElement = () => {\n    if (document.activeElement instanceof HTMLElement && typeof document.activeElement.blur === 'function') {\n      document.activeElement.blur();\n    }\n  }; // This anti-war message will only be shown to Russian users visiting Russian sites\n\n\n  if (typeof window !== 'undefined' && /^ru\\b/.test(navigator.language) && location.host.match(/\\.(ru|su|xn--p1ai)$/)) {\n    if (Math.random() < 0.3) {\n      const noWar = document.createElement('div');\n      noWar.className = 'save-yourself-from-war';\n      const video = getRandomElement([{\n        text: \"\\u0413\\u043B\\u0430\\u0432\\u043D\\u0430\\u044F \\u0437\\u0430\\u0434\\u0430\\u0447\\u0430 \\u0441\\u0435\\u0439\\u0447\\u0430\\u0441 - \\u043D\\u0435 \\u043F\\u043E\\u043F\\u0430\\u0441\\u0442\\u044C \\u043D\\u0430 \\u0432\\u043E\\u0439\\u043D\\u0443 \\u0438 \\u043F\\u043E\\u043C\\u043E\\u0447\\u044C \\u0441\\u0432\\u043E\\u0438\\u043C \\u0431\\u043B\\u0438\\u0436\\u043D\\u0438\\u043C \\u043D\\u0435 \\u0431\\u044B\\u0442\\u044C \\u043C\\u043E\\u0431\\u0438\\u043B\\u0438\\u0437\\u043E\\u0432\\u0430\\u043D\\u044B\\u043C\\u0438.\",\n        id: 'X39ZkynPjpQ'\n      }]);\n      setInnerHtml(noWar, \"<div>\".concat(video.text, \"</div>\\n      <iframe width=\\\"560\\\" height=\\\"315\\\" src=\\\"https://www.youtube.com/embed/\").concat(video.id, \"\\\" frameborder=\\\"0\\\" allow=\\\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\\\" allowfullscreen></iframe>\\n      <div>\\u0421\\u043E\\u0445\\u0440\\u0430\\u043D\\u0438\\u0442\\u0435 \\u0441\\u0435\\u0431\\u044F \\u0438 \\u0441\\u0432\\u043E\\u0438\\u0445 \\u0431\\u043B\\u0438\\u0437\\u043A\\u0438\\u0445!</div>\\n      \"));\n      const closeButton = document.createElement('button');\n      closeButton.innerHTML = '&times;';\n\n      closeButton.onclick = () => noWar.remove();\n\n      noWar.appendChild(closeButton);\n      window.addEventListener('load', () => {\n        setTimeout(() => {\n          document.body.appendChild(noWar);\n        }, 1000);\n      });\n    }\n  } // Assign instance methods from src/instanceMethods/*.js to prototype\n\n\n  Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor\n\n  Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility\n\n  Object.keys(instanceMethods).forEach(key => {\n    /**\n     * @param {...any} args\n     * @returns {any}\n     */\n    SweetAlert[key] = function () {\n      if (currentInstance) {\n        return currentInstance[key](...arguments);\n      }\n    };\n  });\n  SweetAlert.DismissReason = DismissReason;\n  SweetAlert.version = '11.4.38';\n\n  const Swal = SweetAlert; // @ts-ignore\n\n  Swal.default = Swal;\n\n  return Swal;\n\n}));\nif (typeof this !== 'undefined' && this.Sweetalert2){  this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 204684 characters]\n//# sourceURL=webpack-internal:///./node_modules/sweetalert2/dist/sweetalert2.js\n");

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	!function() {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = function(module) {
/******/ 			var getter = module && module.__esModule ?
/******/ 				function() { return module['default']; } :
/******/ 				function() { return module; };
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = function(exports) {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	}();
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module can't be inlined because the eval-source-map devtool is used.
/******/ 	var __webpack_exports__ = __webpack_require__("./libs/sweetalert2/sweetalert2.js");
/******/ 	
/******/ 	return __webpack_exports__;
/******/ })()
;
});