From c5a79eb535e01a7d4ad6cc31d46a60c298f296f0 Mon Sep 17 00:00:00 2001 From: Marco Colia Date: Sat, 8 May 2021 11:25:10 +0200 Subject: [PATCH] 0.1.0 version --- js/dist/admin.js | 172 +- js/dist/admin.js.map | 2 +- js/dist/forum.js | 3869 +---------------------------------------- js/dist/forum.js.map | 2 +- js/src/forum/index.js | 18 +- 5 files changed, 11 insertions(+), 4052 deletions(-) diff --git a/js/dist/admin.js b/js/dist/admin.js index c7e60bc..9fff16a 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,172 +1,2 @@ -module.exports = -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // 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 }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./admin.js"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./admin.js": -/*!******************!*\ - !*** ./admin.js ***! - \******************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _src_admin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/admin */ "./src/admin/index.js"); -/* empty/unused harmony star reexport */ - -/***/ }), - -/***/ "./src/admin/index.js": -/*!****************************!*\ - !*** ./src/admin/index.js ***! - \****************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var flarum_app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flarum/app */ "flarum/app"); -/* harmony import */ var flarum_app__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(flarum_app__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var flarum_admin_components_ExtensionPage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flarum/admin/components/ExtensionPage */ "flarum/admin/components/ExtensionPage"); -/* harmony import */ var flarum_admin_components_ExtensionPage__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(flarum_admin_components_ExtensionPage__WEBPACK_IMPORTED_MODULE_1__); -/* - * This file is part of justoverclock/flarum-ext-guestengagement. - * - * Copyright (c) 2021 Marco Colia. - * https://flarum.it - * - * For the full copyright and license information, please view the LICENSE.md - * file that was distributed with this source code. - */ - - -flarum_app__WEBPACK_IMPORTED_MODULE_0___default.a.initializers.add('justoverclock/flarum-ext-newsletter', function () { - flarum_app__WEBPACK_IMPORTED_MODULE_0___default.a.extensionData["for"]('justoverclock-newsletter').registerSetting({ - setting: 'justoverclock-newsletter.pubaccount', - name: 'PubAccount', - type: 'text', - placeholder: 'Example: aac28688-00gf-7hd7-mdt5-v8s6w555nnq2', - label: flarum_app__WEBPACK_IMPORTED_MODULE_0___default.a.translator.trans('flarum-ext-newsletter.admin.pubacc'), - help: flarum_app__WEBPACK_IMPORTED_MODULE_0___default.a.translator.trans('flarum-ext-newsletter.admin.pubaccdesc') - }); - flarum_app__WEBPACK_IMPORTED_MODULE_0___default.a.extensionData["for"]('justoverclock-newsletter').registerSetting({ - setting: 'justoverclock-newsletter.ListName', - name: 'ListName', - type: 'text', - placeholder: 'Example: listname', - label: flarum_app__WEBPACK_IMPORTED_MODULE_0___default.a.translator.trans('flarum-ext-newsletter.admin.listn'), - help: flarum_app__WEBPACK_IMPORTED_MODULE_0___default.a.translator.trans('flarum-ext-newsletter.admin.listndesc') - }); -}); - -/***/ }), - -/***/ "flarum/admin/components/ExtensionPage": -/*!***********************************************************************!*\ - !*** external "flarum.core.compat['admin/components/ExtensionPage']" ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = flarum.core.compat['admin/components/ExtensionPage']; - -/***/ }), - -/***/ "flarum/app": -/*!********************************************!*\ - !*** external "flarum.core.compat['app']" ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = flarum.core.compat['app']; - -/***/ }) - -/******/ }); +module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=6)}([function(e,t){e.exports=flarum.core.compat.app},,,,function(e,t){e.exports=flarum.core.compat["admin/components/ExtensionPage"]},,function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n);r(4);a.a.initializers.add("justoverclock/flarum-ext-newsletter",(function(){a.a.extensionData.for("justoverclock-newsletter").registerSetting({setting:"justoverclock-newsletter.pubaccount",name:"PubAccount",type:"text",placeholder:"Example: aac28688-00gf-7hd7-mdt5-v8s6w555nnq2",label:a.a.translator.trans("flarum-ext-newsletter.admin.pubacc"),help:a.a.translator.trans("flarum-ext-newsletter.admin.pubaccdesc")}),a.a.extensionData.for("justoverclock-newsletter").registerSetting({setting:"justoverclock-newsletter.ListName",name:"ListName",type:"text",placeholder:"Example: listname",label:a.a.translator.trans("flarum-ext-newsletter.admin.listn"),help:a.a.translator.trans("flarum-ext-newsletter.admin.listndesc")})}))}]); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 8a16af9..280f5ee 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@justoverclock/flarum-ext-newsletter/webpack/bootstrap","webpack://@justoverclock/flarum-ext-newsletter/./admin.js","webpack://@justoverclock/flarum-ext-newsletter/./src/admin/index.js","webpack://@justoverclock/flarum-ext-newsletter/external \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@justoverclock/flarum-ext-newsletter/external \"flarum.core.compat['app']\""],"names":["app","initializers","add","extensionData","registerSetting","setting","name","type","placeholder","label","translator","trans","help"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA;AAAA;AAAA,wC;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEAA,iDAAG,CAACC,YAAJ,CAAiBC,GAAjB,CAAqB,qCAArB,EAA4D,YAAM;AAChEF,mDAAG,CAACG,aAAJ,QAAsB,0BAAtB,EAAkDC,eAAlD,CAAkE;AAChEC,WAAO,EAAE,qCADuD;AAEhEC,QAAI,EAAE,YAF0D;AAGhEC,QAAI,EAAE,MAH0D;AAIhEC,eAAW,EAAE,+CAJmD;AAKhEC,SAAK,EAAET,iDAAG,CAACU,UAAJ,CAAeC,KAAf,CAAqB,oCAArB,CALyD;AAMhEC,QAAI,EAAEZ,iDAAG,CAACU,UAAJ,CAAeC,KAAf,CAAqB,wCAArB;AAN0D,GAAlE;AAQAX,mDAAG,CAACG,aAAJ,QAAsB,0BAAtB,EAAkDC,eAAlD,CAAkE;AAChEC,WAAO,EAAE,mCADuD;AAEhEC,QAAI,EAAE,UAF0D;AAGhEC,QAAI,EAAE,MAH0D;AAIhEC,eAAW,EAAE,mBAJmD;AAKhEC,SAAK,EAAET,iDAAG,CAACU,UAAJ,CAAeC,KAAf,CAAqB,mCAArB,CALyD;AAMhEC,QAAI,EAAEZ,iDAAG,CAACU,UAAJ,CAAeC,KAAf,CAAqB,uCAArB;AAN0D,GAAlE;AAQD,CAjBD,E;;;;;;;;;;;ACbA,sE;;;;;;;;;;;ACAA,2C","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./admin.js\");\n","export * from './src/admin';\n","/*\n * This file is part of justoverclock/flarum-ext-guestengagement.\n *\n * Copyright (c) 2021 Marco Colia.\n * https://flarum.it\n *\n * For the full copyright and license information, please view the LICENSE.md\n * file that was distributed with this source code.\n */\n\nimport app from 'flarum/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\n\napp.initializers.add('justoverclock/flarum-ext-newsletter', () => {\n app.extensionData.for('justoverclock-newsletter').registerSetting({\n setting: 'justoverclock-newsletter.pubaccount',\n name: 'PubAccount',\n type: 'text',\n placeholder: 'Example: aac28688-00gf-7hd7-mdt5-v8s6w555nnq2',\n label: app.translator.trans('flarum-ext-newsletter.admin.pubacc'),\n help: app.translator.trans('flarum-ext-newsletter.admin.pubaccdesc'),\n });\n app.extensionData.for('justoverclock-newsletter').registerSetting({\n setting: 'justoverclock-newsletter.ListName',\n name: 'ListName',\n type: 'text',\n placeholder: 'Example: listname',\n label: app.translator.trans('flarum-ext-newsletter.admin.listn'),\n help: app.translator.trans('flarum-ext-newsletter.admin.listndesc'),\n });\n});\n","module.exports = flarum.core.compat['admin/components/ExtensionPage'];","module.exports = flarum.core.compat['app'];"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@justoverclock/flarum-ext-newsletter/webpack/bootstrap","webpack://@justoverclock/flarum-ext-newsletter/external \"flarum.core.compat['app']\"","webpack://@justoverclock/flarum-ext-newsletter/external \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@justoverclock/flarum-ext-newsletter/./src/admin/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","app","initializers","add","extensionData","registerSetting","setting","type","placeholder","label","translator","trans","help"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,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OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,G,gBClFrDhC,EAAOD,QAAUkC,OAAOC,KAAKC,OAAY,K,iBCAzCnC,EAAOD,QAAUkC,OAAOC,KAAKC,OAAO,mC,8DCapCC,IAAIC,aAAaC,IAAI,uCAAuC,WAC1DF,IAAIG,cAAJ,IAAsB,4BAA4BC,gBAAgB,CAChEC,QAAS,sCACTjC,KAAM,aACNkC,KAAM,OACNC,YAAa,gDACbC,MAAOR,IAAIS,WAAWC,MAAM,sCAC5BC,KAAMX,IAAIS,WAAWC,MAAM,4CAE7BV,IAAIG,cAAJ,IAAsB,4BAA4BC,gBAAgB,CAChEC,QAAS,oCACTjC,KAAM,WACNkC,KAAM,OACNC,YAAa,oBACbC,MAAOR,IAAIS,WAAWC,MAAM,qCAC5BC,KAAMX,IAAIS,WAAWC,MAAM","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['admin/components/ExtensionPage'];","/*\n * This file is part of justoverclock/flarum-ext-guestengagement.\n *\n * Copyright (c) 2021 Marco Colia.\n * https://flarum.it\n *\n * For the full copyright and license information, please view the LICENSE.md\n * file that was distributed with this source code.\n */\n\nimport app from 'flarum/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\n\napp.initializers.add('justoverclock/flarum-ext-newsletter', () => {\n app.extensionData.for('justoverclock-newsletter').registerSetting({\n setting: 'justoverclock-newsletter.pubaccount',\n name: 'PubAccount',\n type: 'text',\n placeholder: 'Example: aac28688-00gf-7hd7-mdt5-v8s6w555nnq2',\n label: app.translator.trans('flarum-ext-newsletter.admin.pubacc'),\n help: app.translator.trans('flarum-ext-newsletter.admin.pubaccdesc'),\n });\n app.extensionData.for('justoverclock-newsletter').registerSetting({\n setting: 'justoverclock-newsletter.ListName',\n name: 'ListName',\n type: 'text',\n placeholder: 'Example: listname',\n label: app.translator.trans('flarum-ext-newsletter.admin.listn'),\n help: app.translator.trans('flarum-ext-newsletter.admin.listndesc'),\n });\n});\n"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js b/js/dist/forum.js index 91821d0..8a10b5d 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,3869 +1,2 @@ -module.exports = -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // 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 }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./forum.js"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./forum.js": -/*!******************!*\ - !*** ./forum.js ***! - \******************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _src_forum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/forum */ "./src/forum/index.js"); -/* empty/unused harmony star reexport */ - -/***/ }), - -/***/ "./node_modules/sweetalert2/dist/sweetalert2.all.js": -/*!**********************************************************!*\ - !*** ./node_modules/sweetalert2/dist/sweetalert2.all.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/*! -* sweetalert2 v10.16.7 -* Released under the MIT License. -*/ -(function (global, factory) { - true ? module.exports = factory() : - undefined; -}(this, function () { 'use strict'; - - function _typeof(obj) { - "@babel/helpers - typeof"; - - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - function _extends() { - _extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; - }; - - return _extends.apply(this, arguments); - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } - - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } - } - - function _construct(Parent, args, Class) { - if (_isNativeReflectConstruct()) { - _construct = Reflect.construct; - } else { - _construct = function _construct(Parent, args, Class) { - var a = [null]; - a.push.apply(a, args); - var Constructor = Function.bind.apply(Parent, a); - var instance = new Constructor(); - if (Class) _setPrototypeOf(instance, Class.prototype); - return instance; - }; - } - - return _construct.apply(null, arguments); - } - - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; - } - - function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } - - return _assertThisInitialized(self); - } - - function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = _getPrototypeOf(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = _getPrototypeOf(this).constructor; - - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return _possibleConstructorReturn(this, result); - }; - } - - function _superPropBase(object, property) { - while (!Object.prototype.hasOwnProperty.call(object, property)) { - object = _getPrototypeOf(object); - if (object === null) break; - } - - return object; - } - - function _get(target, property, receiver) { - if (typeof Reflect !== "undefined" && Reflect.get) { - _get = Reflect.get; - } else { - _get = function _get(target, property, receiver) { - var base = _superPropBase(target, property); - - if (!base) return; - var desc = Object.getOwnPropertyDescriptor(base, property); - - if (desc.get) { - return desc.get.call(receiver); - } - - return desc.value; - }; - } - - return _get(target, property, receiver || target); - } - - var consolePrefix = 'SweetAlert2:'; - /** - * Filter the unique values into a new array - * @param arr - */ - - var uniqueArray = function uniqueArray(arr) { - var result = []; - - for (var i = 0; i < arr.length; i++) { - if (result.indexOf(arr[i]) === -1) { - result.push(arr[i]); - } - } - - return result; - }; - /** - * Capitalize the first letter of a string - * @param str - */ - - var capitalizeFirstLetter = function capitalizeFirstLetter(str) { - return str.charAt(0).toUpperCase() + str.slice(1); - }; - /** - * Returns the array of object values (Object.values isn't supported in IE11) - * @param obj - */ - - var objectValues = function objectValues(obj) { - return Object.keys(obj).map(function (key) { - return obj[key]; - }); - }; - /** - * Convert NodeList to Array - * @param nodeList - */ - - var toArray = function toArray(nodeList) { - return Array.prototype.slice.call(nodeList); - }; - /** - * Standardise console warnings - * @param message - */ - - var warn = function warn(message) { - console.warn("".concat(consolePrefix, " ").concat(_typeof(message) === 'object' ? message.join(' ') : message)); - }; - /** - * Standardise console errors - * @param message - */ - - var error = function error(message) { - console.error("".concat(consolePrefix, " ").concat(message)); - }; - /** - * Private global state for `warnOnce` - * @type {Array} - * @private - */ - - var previousWarnOnceMessages = []; - /** - * Show a console warning, but only if it hasn't already been shown - * @param message - */ - - var warnOnce = function warnOnce(message) { - if (!(previousWarnOnceMessages.indexOf(message) !== -1)) { - previousWarnOnceMessages.push(message); - warn(message); - } - }; - /** - * Show a one-time console warning about deprecated params/methods - */ - - var warnAboutDeprecation = function warnAboutDeprecation(deprecatedParam, useInstead) { - warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); - }; - /** - * If `arg` is a function, call it (with no arguments or context) and return the result. - * Otherwise, just pass the value through - * @param arg - */ - - var callIfFunction = function callIfFunction(arg) { - return typeof arg === 'function' ? arg() : arg; - }; - var hasToPromiseFn = function hasToPromiseFn(arg) { - return arg && typeof arg.toPromise === 'function'; - }; - var asPromise = function asPromise(arg) { - return hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); - }; - var isPromise = function isPromise(arg) { - return arg && Promise.resolve(arg) === arg; - }; - - var DismissReason = Object.freeze({ - cancel: 'cancel', - backdrop: 'backdrop', - close: 'close', - esc: 'esc', - timer: 'timer' - }); - - var isJqueryElement = function isJqueryElement(elem) { - return _typeof(elem) === 'object' && elem.jquery; - }; - - var isElement = function isElement(elem) { - return elem instanceof Element || isJqueryElement(elem); - }; - - var argsToParams = function argsToParams(args) { - var params = {}; - - if (_typeof(args[0]) === 'object' && !isElement(args[0])) { - _extends(params, args[0]); - } else { - ['title', 'html', 'icon'].forEach(function (name, index) { - var arg = args[index]; - - if (typeof arg === 'string' || isElement(arg)) { - params[name] = arg; - } else if (arg !== undefined) { - error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(_typeof(arg))); - } - }); - } - - return params; - }; - - var swalPrefix = 'swal2-'; - var prefix = function prefix(items) { - var result = {}; - - for (var i in items) { - result[items[i]] = swalPrefix + items[i]; - } - - return result; - }; - var swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'header', 'content', 'html-container', 'actions', 'confirm', 'deny', 'cancel', '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']); - var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); - - var getContainer = function getContainer() { - return document.body.querySelector(".".concat(swalClasses.container)); - }; - var elementBySelector = function elementBySelector(selectorString) { - var container = getContainer(); - return container ? container.querySelector(selectorString) : null; - }; - - var elementByClass = function elementByClass(className) { - return elementBySelector(".".concat(className)); - }; - - var getPopup = function getPopup() { - return elementByClass(swalClasses.popup); - }; - var getIcon = function getIcon() { - return elementByClass(swalClasses.icon); - }; - var getTitle = function getTitle() { - return elementByClass(swalClasses.title); - }; - var getContent = function getContent() { - return elementByClass(swalClasses.content); - }; - var getHtmlContainer = function getHtmlContainer() { - return elementByClass(swalClasses['html-container']); - }; - var getImage = function getImage() { - return elementByClass(swalClasses.image); - }; - var getProgressSteps = function getProgressSteps() { - return elementByClass(swalClasses['progress-steps']); - }; - var getValidationMessage = function getValidationMessage() { - return elementByClass(swalClasses['validation-message']); - }; - var getConfirmButton = function getConfirmButton() { - return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); - }; - var getDenyButton = function getDenyButton() { - return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); - }; - var getInputLabel = function getInputLabel() { - return elementByClass(swalClasses['input-label']); - }; - var getLoader = function getLoader() { - return elementBySelector(".".concat(swalClasses.loader)); - }; - var getCancelButton = function getCancelButton() { - return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); - }; - var getActions = function getActions() { - return elementByClass(swalClasses.actions); - }; - var getHeader = function getHeader() { - return elementByClass(swalClasses.header); - }; - var getFooter = function getFooter() { - return elementByClass(swalClasses.footer); - }; - var getTimerProgressBar = function getTimerProgressBar() { - return elementByClass(swalClasses['timer-progress-bar']); - }; - var getCloseButton = function getCloseButton() { - return elementByClass(swalClasses.close); - }; // https://github.com/jkup/focusable/blob/master/index.js - - var 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"; - var getFocusableElements = function getFocusableElements() { - var focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex - .sort(function (a, b) { - a = parseInt(a.getAttribute('tabindex')); - b = parseInt(b.getAttribute('tabindex')); - - if (a > b) { - return 1; - } else if (a < b) { - return -1; - } - - return 0; - }); - var otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(function (el) { - return el.getAttribute('tabindex') !== '-1'; - }); - return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(function (el) { - return isVisible(el); - }); - }; - var isModal = function isModal() { - return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); - }; - var isToast = function isToast() { - return document.body.classList.contains(swalClasses['toast-shown']); - }; - var isLoading = function isLoading() { - return getPopup().hasAttribute('data-loading'); - }; - - var states = { - previousBodyPadding: null - }; - var setInnerHtml = function setInnerHtml(elem, html) { - // #1926 - elem.textContent = ''; - - if (html) { - var parser = new DOMParser(); - var parsed = parser.parseFromString(html, "text/html"); - toArray(parsed.querySelector('head').childNodes).forEach(function (child) { - elem.appendChild(child); - }); - toArray(parsed.querySelector('body').childNodes).forEach(function (child) { - elem.appendChild(child); - }); - } - }; - var hasClass = function hasClass(elem, className) { - if (!className) { - return false; - } - - var classList = className.split(/\s+/); - - for (var i = 0; i < classList.length; i++) { - if (!elem.classList.contains(classList[i])) { - return false; - } - } - - return true; - }; - - var removeCustomClasses = function removeCustomClasses(elem, params) { - toArray(elem.classList).forEach(function (className) { - if (!(objectValues(swalClasses).indexOf(className) !== -1) && !(objectValues(iconTypes).indexOf(className) !== -1) && !(objectValues(params.showClass).indexOf(className) !== -1)) { - elem.classList.remove(className); - } - }); - }; - - var applyCustomClass = function applyCustomClass(elem, params, className) { - removeCustomClasses(elem, params); - - if (params.customClass && params.customClass[className]) { - if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { - return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(_typeof(params.customClass[className]), "\"")); - } - - addClass(elem, params.customClass[className]); - } - }; - function getInput(content, inputType) { - if (!inputType) { - return null; - } - - switch (inputType) { - case 'select': - case 'textarea': - case 'file': - return getChildByClass(content, swalClasses[inputType]); - - case 'checkbox': - return content.querySelector(".".concat(swalClasses.checkbox, " input")); - - case 'radio': - return content.querySelector(".".concat(swalClasses.radio, " input:checked")) || content.querySelector(".".concat(swalClasses.radio, " input:first-child")); - - case 'range': - return content.querySelector(".".concat(swalClasses.range, " input")); - - default: - return getChildByClass(content, swalClasses.input); - } - } - var focusInput = function focusInput(input) { - input.focus(); // place cursor at end of text in text input - - if (input.type !== 'file') { - // http://stackoverflow.com/a/2345915 - var val = input.value; - input.value = ''; - input.value = val; - } - }; - var toggleClass = function toggleClass(target, classList, condition) { - if (!target || !classList) { - return; - } - - if (typeof classList === 'string') { - classList = classList.split(/\s+/).filter(Boolean); - } - - classList.forEach(function (className) { - if (target.forEach) { - target.forEach(function (elem) { - condition ? elem.classList.add(className) : elem.classList.remove(className); - }); - } else { - condition ? target.classList.add(className) : target.classList.remove(className); - } - }); - }; - var addClass = function addClass(target, classList) { - toggleClass(target, classList, true); - }; - var removeClass = function removeClass(target, classList) { - toggleClass(target, classList, false); - }; - var getChildByClass = function getChildByClass(elem, className) { - for (var i = 0; i < elem.childNodes.length; i++) { - if (hasClass(elem.childNodes[i], className)) { - return elem.childNodes[i]; - } - } - }; - var applyNumericalStyle = function applyNumericalStyle(elem, property, value) { - if (value === "".concat(parseInt(value))) { - value = parseInt(value); - } - - if (value || parseInt(value) === 0) { - elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; - } else { - elem.style.removeProperty(property); - } - }; - var show = function show(elem) { - var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex'; - elem.style.display = display; - }; - var hide = function hide(elem) { - elem.style.display = 'none'; - }; - var setStyle = function setStyle(parent, selector, property, value) { - var el = parent.querySelector(selector); - - if (el) { - el.style[property] = value; - } - }; - var toggle = function toggle(elem, condition, display) { - condition ? show(elem, display) : hide(elem); - }; // borrowed from jquery $(elem).is(':visible') implementation - - var isVisible = function isVisible(elem) { - return !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); - }; - var allButtonsAreHidden = function allButtonsAreHidden() { - return !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); - }; - var isScrollable = function isScrollable(elem) { - return !!(elem.scrollHeight > elem.clientHeight); - }; // borrowed from https://stackoverflow.com/a/46352119 - - var hasCssAnimation = function hasCssAnimation(elem) { - var style = window.getComputedStyle(elem); - var animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); - var transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); - return animDuration > 0 || transDuration > 0; - }; - var contains = function contains(haystack, needle) { - if (typeof haystack.contains === 'function') { - return haystack.contains(needle); - } - }; - var animateTimerProgressBar = function animateTimerProgressBar(timer) { - var reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var timerProgressBar = getTimerProgressBar(); - - if (isVisible(timerProgressBar)) { - if (reset) { - timerProgressBar.style.transition = 'none'; - timerProgressBar.style.width = '100%'; - } - - setTimeout(function () { - timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); - timerProgressBar.style.width = '0%'; - }, 10); - } - }; - var stopTimerProgressBar = function stopTimerProgressBar() { - var timerProgressBar = getTimerProgressBar(); - var timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); - timerProgressBar.style.removeProperty('transition'); - timerProgressBar.style.width = '100%'; - var timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); - var timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); - timerProgressBar.style.removeProperty('transition'); - timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); - }; - - // Detect Node env - var isNodeEnv = function isNodeEnv() { - return typeof window === 'undefined' || typeof document === 'undefined'; - }; - - var sweetHTML = "\n
\n
\n
    \n
    \n \n

    \n \n
    \n
    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n").replace(/(^|\n)\s*/g, ''); - - var resetOldContainer = function resetOldContainer() { - var oldContainer = getContainer(); - - if (!oldContainer) { - return false; - } - - oldContainer.parentNode.removeChild(oldContainer); - removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); - return true; - }; - - var oldInputVal; // IE11 workaround, see #1109 for details - - var resetValidationMessage = function resetValidationMessage(e) { - if (Swal.isVisible() && oldInputVal !== e.target.value) { - Swal.resetValidationMessage(); - } - - oldInputVal = e.target.value; - }; - - var addInputChangeListeners = function addInputChangeListeners() { - var content = getContent(); - var input = getChildByClass(content, swalClasses.input); - var file = getChildByClass(content, swalClasses.file); - var range = content.querySelector(".".concat(swalClasses.range, " input")); - var rangeOutput = content.querySelector(".".concat(swalClasses.range, " output")); - var select = getChildByClass(content, swalClasses.select); - var checkbox = content.querySelector(".".concat(swalClasses.checkbox, " input")); - var textarea = getChildByClass(content, swalClasses.textarea); - input.oninput = resetValidationMessage; - file.onchange = resetValidationMessage; - select.onchange = resetValidationMessage; - checkbox.onchange = resetValidationMessage; - textarea.oninput = resetValidationMessage; - - range.oninput = function (e) { - resetValidationMessage(e); - rangeOutput.value = range.value; - }; - - range.onchange = function (e) { - resetValidationMessage(e); - range.nextSibling.value = range.value; - }; - }; - - var getTarget = function getTarget(target) { - return typeof target === 'string' ? document.querySelector(target) : target; - }; - - var setupAccessibility = function setupAccessibility(params) { - var popup = getPopup(); - popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); - popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); - - if (!params.toast) { - popup.setAttribute('aria-modal', 'true'); - } - }; - - var setupRTL = function setupRTL(targetElement) { - if (window.getComputedStyle(targetElement).direction === 'rtl') { - addClass(getContainer(), swalClasses.rtl); - } - }; - /* - * Add modal + backdrop to DOM - */ - - - var init = function init(params) { - // Clean up the old popup container if it exists - var oldContainerExisted = resetOldContainer(); - /* istanbul ignore if */ - - if (isNodeEnv()) { - error('SweetAlert2 requires document to initialize'); - return; - } - - var container = document.createElement('div'); - container.className = swalClasses.container; - - if (oldContainerExisted) { - addClass(container, swalClasses['no-transition']); - } - - setInnerHtml(container, sweetHTML); - var targetElement = getTarget(params.target); - targetElement.appendChild(container); - setupAccessibility(params); - setupRTL(targetElement); - addInputChangeListeners(); - }; - - var parseHtmlToContainer = function parseHtmlToContainer(param, target) { - // DOM element - if (param instanceof HTMLElement) { - target.appendChild(param); // Object - } else if (_typeof(param) === 'object') { - handleObject(param, target); // Plain string - } else if (param) { - setInnerHtml(target, param); - } - }; - - var handleObject = function handleObject(param, target) { - // JQuery element(s) - if (param.jquery) { - handleJqueryElem(target, param); // For other objects use their string representation - } else { - setInnerHtml(target, param.toString()); - } - }; - - var handleJqueryElem = function handleJqueryElem(target, elem) { - target.textContent = ''; - - if (0 in elem) { - for (var i = 0; (i in elem); i++) { - target.appendChild(elem[i].cloneNode(true)); - } - } else { - target.appendChild(elem.cloneNode(true)); - } - }; - - var animationEndEvent = function () { - // Prevent run in Node env - - /* istanbul ignore if */ - if (isNodeEnv()) { - return false; - } - - var testEl = document.createElement('div'); - var transEndEventNames = { - WebkitAnimation: 'webkitAnimationEnd', - OAnimation: 'oAnimationEnd oanimationend', - animation: 'animationend' - }; - - for (var i in transEndEventNames) { - if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { - return transEndEventNames[i]; - } - } - - return false; - }(); - - // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js - - var measureScrollbar = function measureScrollbar() { - var scrollDiv = document.createElement('div'); - scrollDiv.className = swalClasses['scrollbar-measure']; - document.body.appendChild(scrollDiv); - var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; - document.body.removeChild(scrollDiv); - return scrollbarWidth; - }; - - var renderActions = function renderActions(instance, params) { - var actions = getActions(); - var loader = getLoader(); - var confirmButton = getConfirmButton(); - var denyButton = getDenyButton(); - var cancelButton = getCancelButton(); // Actions (buttons) wrapper - - if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { - hide(actions); - } // Custom class - - - applyCustomClass(actions, params, 'actions'); // Render buttons - - renderButton(confirmButton, 'confirm', params); - renderButton(denyButton, 'deny', params); - renderButton(cancelButton, 'cancel', params); - handleButtonsStyling(confirmButton, denyButton, cancelButton, params); - - if (params.reverseButtons) { - actions.insertBefore(cancelButton, loader); - actions.insertBefore(denyButton, loader); - actions.insertBefore(confirmButton, loader); - } // Loader - - - setInnerHtml(loader, params.loaderHtml); - applyCustomClass(loader, params, 'loader'); - }; - - function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { - if (!params.buttonsStyling) { - return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); - } - - addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors - - if (params.confirmButtonColor) { - confirmButton.style.backgroundColor = params.confirmButtonColor; - } - - if (params.denyButtonColor) { - denyButton.style.backgroundColor = params.denyButtonColor; - } - - if (params.cancelButtonColor) { - cancelButton.style.backgroundColor = params.cancelButtonColor; - } - } - - function renderButton(button, buttonType, params) { - toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); - setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text - - button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label - // Add buttons custom classes - - button.className = swalClasses[buttonType]; - applyCustomClass(button, params, "".concat(buttonType, "Button")); - addClass(button, params["".concat(buttonType, "ButtonClass")]); - } - - function handleBackdropParam(container, backdrop) { - if (typeof backdrop === 'string') { - container.style.background = backdrop; - } else if (!backdrop) { - addClass([document.documentElement, document.body], swalClasses['no-backdrop']); - } - } - - function handlePositionParam(container, position) { - if (position in swalClasses) { - addClass(container, swalClasses[position]); - } else { - warn('The "position" parameter is not valid, defaulting to "center"'); - addClass(container, swalClasses.center); - } - } - - function handleGrowParam(container, grow) { - if (grow && typeof grow === 'string') { - var growClass = "grow-".concat(grow); - - if (growClass in swalClasses) { - addClass(container, swalClasses[growClass]); - } - } - } - - var renderContainer = function renderContainer(instance, params) { - var container = getContainer(); - - if (!container) { - return; - } - - handleBackdropParam(container, params.backdrop); - - if (!params.backdrop && params.allowOutsideClick) { - warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); - } - - handlePositionParam(container, params.position); - handleGrowParam(container, params.grow); // Custom class - - applyCustomClass(container, params, 'container'); // Set queue step attribute for getQueueStep() method - - var queueStep = document.body.getAttribute('data-swal2-queue-step'); - - if (queueStep) { - container.setAttribute('data-queue-step', queueStep); - document.body.removeAttribute('data-swal2-queue-step'); - } - }; - - /** - * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. - * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` - * This is the approach that Babel will probably take to implement private methods/fields - * https://github.com/tc39/proposal-private-methods - * https://github.com/babel/babel/pull/7555 - * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* - * then we can use that language feature. - */ - var privateProps = { - promise: new WeakMap(), - innerParams: new WeakMap(), - domCache: new WeakMap() - }; - - var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; - var renderInput = function renderInput(instance, params) { - var content = getContent(); - var innerParams = privateProps.innerParams.get(instance); - var rerender = !innerParams || params.input !== innerParams.input; - inputTypes.forEach(function (inputType) { - var inputClass = swalClasses[inputType]; - var inputContainer = getChildByClass(content, inputClass); // set attributes - - setAttributes(inputType, params.inputAttributes); // set class - - inputContainer.className = inputClass; - - if (rerender) { - hide(inputContainer); - } - }); - - if (params.input) { - if (rerender) { - showInput(params); - } // set custom class - - - setCustomClass(params); - } - }; - - var showInput = function showInput(params) { - if (!renderInputType[params.input]) { - return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); - } - - var inputContainer = getInputContainer(params.input); - var input = renderInputType[params.input](inputContainer, params); - show(input); // input autofocus - - setTimeout(function () { - focusInput(input); - }); - }; - - var removeAttributes = function removeAttributes(input) { - for (var i = 0; i < input.attributes.length; i++) { - var attrName = input.attributes[i].name; - - if (!(['type', 'value', 'style'].indexOf(attrName) !== -1)) { - input.removeAttribute(attrName); - } - } - }; - - var setAttributes = function setAttributes(inputType, inputAttributes) { - var input = getInput(getContent(), inputType); - - if (!input) { - return; - } - - removeAttributes(input); - - for (var attr in inputAttributes) { - // Do not set a placeholder for - // it'll crash Edge, #1298 - if (inputType === 'range' && attr === 'placeholder') { - continue; - } - - input.setAttribute(attr, inputAttributes[attr]); - } - }; - - var setCustomClass = function setCustomClass(params) { - var inputContainer = getInputContainer(params.input); - - if (params.customClass) { - addClass(inputContainer, params.customClass.input); - } - }; - - var setInputPlaceholder = function setInputPlaceholder(input, params) { - if (!input.placeholder || params.inputPlaceholder) { - input.placeholder = params.inputPlaceholder; - } - }; - - var setInputLabel = function setInputLabel(input, prependTo, params) { - if (params.inputLabel) { - input.id = swalClasses.input; - var label = document.createElement('label'); - var labelClass = swalClasses['input-label']; - label.setAttribute('for', input.id); - label.className = labelClass; - addClass(label, params.customClass.inputLabel); - label.innerText = params.inputLabel; - prependTo.insertAdjacentElement('beforebegin', label); - } - }; - - var getInputContainer = function getInputContainer(inputType) { - var inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; - return getChildByClass(getContent(), inputClass); - }; - - var renderInputType = {}; - - renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = function (input, params) { - if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { - input.value = params.inputValue; - } else if (!isPromise(params.inputValue)) { - warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(_typeof(params.inputValue), "\"")); - } - - setInputLabel(input, input, params); - setInputPlaceholder(input, params); - input.type = params.input; - return input; - }; - - renderInputType.file = function (input, params) { - setInputLabel(input, input, params); - setInputPlaceholder(input, params); - return input; - }; - - renderInputType.range = function (range, params) { - var rangeInput = range.querySelector('input'); - var rangeOutput = range.querySelector('output'); - rangeInput.value = params.inputValue; - rangeInput.type = params.input; - rangeOutput.value = params.inputValue; - setInputLabel(rangeInput, range, params); - return range; - }; - - renderInputType.select = function (select, params) { - select.textContent = ''; - - if (params.inputPlaceholder) { - var placeholder = document.createElement('option'); - setInnerHtml(placeholder, params.inputPlaceholder); - placeholder.value = ''; - placeholder.disabled = true; - placeholder.selected = true; - select.appendChild(placeholder); - } - - setInputLabel(select, select, params); - return select; - }; - - renderInputType.radio = function (radio) { - radio.textContent = ''; - return radio; - }; - - renderInputType.checkbox = function (checkboxContainer, params) { - var checkbox = getInput(getContent(), 'checkbox'); - checkbox.value = 1; - checkbox.id = swalClasses.checkbox; - checkbox.checked = Boolean(params.inputValue); - var label = checkboxContainer.querySelector('span'); - setInnerHtml(label, params.inputPlaceholder); - return checkboxContainer; - }; - - renderInputType.textarea = function (textarea, params) { - textarea.value = params.inputValue; - setInputPlaceholder(textarea, params); - setInputLabel(textarea, textarea, params); - - var getPadding = function getPadding(el) { - return parseInt(window.getComputedStyle(el).paddingLeft) + parseInt(window.getComputedStyle(el).paddingRight); - }; - - if ('MutationObserver' in window) { - // #1699 - var initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); - - var outputsize = function outputsize() { - var contentWidth = textarea.offsetWidth + getPadding(getPopup()) + getPadding(getContent()); - - if (contentWidth > initialPopupWidth) { - getPopup().style.width = "".concat(contentWidth, "px"); - } else { - getPopup().style.width = null; - } - }; - - new MutationObserver(outputsize).observe(textarea, { - attributes: true, - attributeFilter: ['style'] - }); - } - - return textarea; - }; - - var renderContent = function renderContent(instance, params) { - var htmlContainer = getHtmlContainer(); - applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML - - if (params.html) { - parseHtmlToContainer(params.html, htmlContainer); - show(htmlContainer, 'block'); // Content as plain text - } else if (params.text) { - htmlContainer.textContent = params.text; - show(htmlContainer, 'block'); // No content - } else { - hide(htmlContainer); - } - - renderInput(instance, params); // Custom class - - applyCustomClass(getContent(), params, 'content'); - }; - - var renderFooter = function renderFooter(instance, params) { - var footer = getFooter(); - toggle(footer, params.footer); - - if (params.footer) { - parseHtmlToContainer(params.footer, footer); - } // Custom class - - - applyCustomClass(footer, params, 'footer'); - }; - - var renderCloseButton = function renderCloseButton(instance, params) { - var closeButton = getCloseButton(); - setInnerHtml(closeButton, params.closeButtonHtml); // Custom class - - applyCustomClass(closeButton, params, 'closeButton'); - toggle(closeButton, params.showCloseButton); - closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); - }; - - var renderIcon = function renderIcon(instance, params) { - var innerParams = privateProps.innerParams.get(instance); - var icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon - - if (innerParams && params.icon === innerParams.icon) { - // Custom or default content - setContent(icon, params); - applyStyles(icon, params); - return; - } - - if (!params.icon && !params.iconHtml) { - return hide(icon); - } - - if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { - error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); - return hide(icon); - } - - show(icon); // Custom or default content - - setContent(icon, params); - applyStyles(icon, params); // Animate icon - - addClass(icon, params.showClass.icon); - }; - - var applyStyles = function applyStyles(icon, params) { - for (var iconType in iconTypes) { - if (params.icon !== iconType) { - removeClass(icon, iconTypes[iconType]); - } - } - - addClass(icon, iconTypes[params.icon]); // Icon color - - setColor(icon, params); // Success icon background color - - adjustSuccessIconBackgoundColor(); // Custom class - - applyCustomClass(icon, params, 'icon'); - }; // Adjust success icon background color to match the popup background color - - - var adjustSuccessIconBackgoundColor = function adjustSuccessIconBackgoundColor() { - var popup = getPopup(); - var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); - var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); - - for (var i = 0; i < successIconParts.length; i++) { - successIconParts[i].style.backgroundColor = popupBackgroundColor; - } - }; - - var setContent = function setContent(icon, params) { - icon.textContent = ''; - - if (params.iconHtml) { - setInnerHtml(icon, iconContent(params.iconHtml)); - } else if (params.icon === 'success') { - setInnerHtml(icon, "\n
    \n \n
    \n
    \n "); - } else if (params.icon === 'error') { - setInnerHtml(icon, "\n \n \n \n \n "); - } else { - var defaultIconHtml = { - question: '?', - warning: '!', - info: 'i' - }; - setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); - } - }; - - var setColor = function setColor(icon, params) { - if (!params.iconColor) { - return; - } - - icon.style.color = params.iconColor; - icon.style.borderColor = params.iconColor; - - for (var _i = 0, _arr = ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']; _i < _arr.length; _i++) { - var sel = _arr[_i]; - setStyle(icon, sel, 'backgroundColor', params.iconColor); - } - - setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); - }; - - var iconContent = function iconContent(content) { - return "
    ").concat(content, "
    "); - }; - - var renderImage = function renderImage(instance, params) { - var image = getImage(); - - if (!params.imageUrl) { - return hide(image); - } - - show(image, ''); // Src, alt - - image.setAttribute('src', params.imageUrl); - image.setAttribute('alt', params.imageAlt); // Width, height - - applyNumericalStyle(image, 'width', params.imageWidth); - applyNumericalStyle(image, 'height', params.imageHeight); // Class - - image.className = swalClasses.image; - applyCustomClass(image, params, 'image'); - }; - - var currentSteps = []; - /* - * Global function for chaining sweetAlert popups - */ - - var queue = function queue(steps) { - warnAboutDeprecation('Swal.queue()', "async/await"); - var Swal = this; - currentSteps = steps; - - var resetAndResolve = function resetAndResolve(resolve, value) { - currentSteps = []; - resolve(value); - }; - - var queueResult = []; - return new Promise(function (resolve) { - (function step(i, callback) { - if (i < currentSteps.length) { - document.body.setAttribute('data-swal2-queue-step', i); - Swal.fire(currentSteps[i]).then(function (result) { - if (typeof result.value !== 'undefined') { - queueResult.push(result.value); - step(i + 1, callback); - } else { - resetAndResolve(resolve, { - dismiss: result.dismiss - }); - } - }); - } else { - resetAndResolve(resolve, { - value: queueResult - }); - } - })(0); - }); - }; - /* - * Global function for getting the index of current popup in queue - */ - - var getQueueStep = function getQueueStep() { - return getContainer() && getContainer().getAttribute('data-queue-step'); - }; - /* - * Global function for inserting a popup to the queue - */ - - var insertQueueStep = function insertQueueStep(step, index) { - if (index && index < currentSteps.length) { - return currentSteps.splice(index, 0, step); - } - - return currentSteps.push(step); - }; - /* - * Global function for deleting a popup from the queue - */ - - var deleteQueueStep = function deleteQueueStep(index) { - if (typeof currentSteps[index] !== 'undefined') { - currentSteps.splice(index, 1); - } - }; - - var createStepElement = function createStepElement(step) { - var stepEl = document.createElement('li'); - addClass(stepEl, swalClasses['progress-step']); - setInnerHtml(stepEl, step); - return stepEl; - }; - - var createLineElement = function createLineElement(params) { - var lineEl = document.createElement('li'); - addClass(lineEl, swalClasses['progress-step-line']); - - if (params.progressStepsDistance) { - lineEl.style.width = params.progressStepsDistance; - } - - return lineEl; - }; - - var renderProgressSteps = function renderProgressSteps(instance, params) { - var progressStepsContainer = getProgressSteps(); - - if (!params.progressSteps || params.progressSteps.length === 0) { - return hide(progressStepsContainer); - } - - show(progressStepsContainer); - progressStepsContainer.textContent = ''; - var currentProgressStep = parseInt(params.currentProgressStep === undefined ? getQueueStep() : params.currentProgressStep); - - if (currentProgressStep >= params.progressSteps.length) { - warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); - } - - params.progressSteps.forEach(function (step, index) { - var stepEl = createStepElement(step); - progressStepsContainer.appendChild(stepEl); - - if (index === currentProgressStep) { - addClass(stepEl, swalClasses['active-progress-step']); - } - - if (index !== params.progressSteps.length - 1) { - var lineEl = createLineElement(params); - progressStepsContainer.appendChild(lineEl); - } - }); - }; - - var renderTitle = function renderTitle(instance, params) { - var title = getTitle(); - toggle(title, params.title || params.titleText, 'block'); - - if (params.title) { - parseHtmlToContainer(params.title, title); - } - - if (params.titleText) { - title.innerText = params.titleText; - } // Custom class - - - applyCustomClass(title, params, 'title'); - }; - - var renderHeader = function renderHeader(instance, params) { - var header = getHeader(); // Custom class - - applyCustomClass(header, params, 'header'); // Progress steps - - renderProgressSteps(instance, params); // Icon - - renderIcon(instance, params); // Image - - renderImage(instance, params); // Title - - renderTitle(instance, params); // Close button - - renderCloseButton(instance, params); - }; - - var renderPopup = function renderPopup(instance, params) { - var container = getContainer(); - var popup = getPopup(); // Width - - if (params.toast) { - // #2170 - applyNumericalStyle(container, 'width', params.width); - popup.style.width = '100%'; - } else { - applyNumericalStyle(popup, 'width', params.width); - } // Padding - - - applyNumericalStyle(popup, 'padding', params.padding); // Background - - if (params.background) { - popup.style.background = params.background; - } - - hide(getValidationMessage()); // Classes - - addClasses(popup, params); - }; - - var addClasses = function addClasses(popup, params) { - // Default Class + showClass when updating Swal.update({}) - popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); - - if (params.toast) { - addClass([document.documentElement, document.body], swalClasses['toast-shown']); - addClass(popup, swalClasses.toast); - } else { - addClass(popup, swalClasses.modal); - } // Custom class - - - applyCustomClass(popup, params, 'popup'); - - if (typeof params.customClass === 'string') { - addClass(popup, params.customClass); - } // Icon class (#1842) - - - if (params.icon) { - addClass(popup, swalClasses["icon-".concat(params.icon)]); - } - }; - - var render = function render(instance, params) { - renderPopup(instance, params); - renderContainer(instance, params); - renderHeader(instance, params); - renderContent(instance, params); - renderActions(instance, params); - renderFooter(instance, params); - - if (typeof params.didRender === 'function') { - params.didRender(getPopup()); - } else if (typeof params.onRender === 'function') { - params.onRender(getPopup()); // @deprecated - } - }; - - /* - * Global function to determine if SweetAlert2 popup is shown - */ - - var isVisible$1 = function isVisible$$1() { - return isVisible(getPopup()); - }; - /* - * Global function to click 'Confirm' button - */ - - var clickConfirm = function clickConfirm() { - return getConfirmButton() && getConfirmButton().click(); - }; - /* - * Global function to click 'Deny' button - */ - - var clickDeny = function clickDeny() { - return getDenyButton() && getDenyButton().click(); - }; - /* - * Global function to click 'Cancel' button - */ - - var clickCancel = function clickCancel() { - return getCancelButton() && getCancelButton().click(); - }; - - function fire() { - var Swal = this; - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _construct(Swal, args); - } - - /** - * Returns an extended version of `Swal` containing `params` as defaults. - * Useful for reusing Swal configuration. - * - * For example: - * - * Before: - * const textPromptOptions = { input: 'text', showCancelButton: true } - * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) - * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) - * - * After: - * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) - * const {value: firstName} = await TextPrompt('What is your first name?') - * const {value: lastName} = await TextPrompt('What is your last name?') - * - * @param mixinParams - */ - function mixin(mixinParams) { - var MixinSwal = /*#__PURE__*/function (_this) { - _inherits(MixinSwal, _this); - - var _super = _createSuper(MixinSwal); - - function MixinSwal() { - _classCallCheck(this, MixinSwal); - - return _super.apply(this, arguments); - } - - _createClass(MixinSwal, [{ - key: "_main", - value: function _main(params, priorityMixinParams) { - return _get(_getPrototypeOf(MixinSwal.prototype), "_main", this).call(this, params, _extends({}, mixinParams, priorityMixinParams)); - } - }]); - - return MixinSwal; - }(this); - - return MixinSwal; - } - - /** - * Shows loader (spinner), this is useful with AJAX requests. - * By default the loader be shown instead of the "Confirm" button. - */ - - var showLoading = function showLoading(buttonToReplace) { - var popup = getPopup(); - - if (!popup) { - Swal.fire(); - } - - popup = getPopup(); - var actions = getActions(); - var loader = getLoader(); - - if (!buttonToReplace && isVisible(getConfirmButton())) { - buttonToReplace = getConfirmButton(); - } - - show(actions); - - if (buttonToReplace) { - hide(buttonToReplace); - loader.setAttribute('data-button-to-replace', buttonToReplace.className); - } - - loader.parentNode.insertBefore(loader, buttonToReplace); - addClass([popup, actions], swalClasses.loading); - show(loader); - popup.setAttribute('data-loading', true); - popup.setAttribute('aria-busy', true); - popup.focus(); - }; - - var RESTORE_FOCUS_TIMEOUT = 100; - - var globalState = {}; - - var focusPreviousActiveElement = function focusPreviousActiveElement() { - if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { - globalState.previousActiveElement.focus(); - globalState.previousActiveElement = null; - } else if (document.body) { - document.body.focus(); - } - }; // Restore previous active (focused) element - - - var restoreActiveElement = function restoreActiveElement(returnFocus) { - return new Promise(function (resolve) { - if (!returnFocus) { - return resolve(); - } - - var x = window.scrollX; - var y = window.scrollY; - globalState.restoreFocusTimeout = setTimeout(function () { - focusPreviousActiveElement(); - resolve(); - }, RESTORE_FOCUS_TIMEOUT); // issues/900 - - if (typeof x !== 'undefined' && typeof y !== 'undefined') { - // IE doesn't have scrollX/scrollY support - window.scrollTo(x, y); - } - }); - }; - - /** - * If `timer` parameter is set, returns number of milliseconds of timer remained. - * Otherwise, returns undefined. - */ - - var getTimerLeft = function getTimerLeft() { - return globalState.timeout && globalState.timeout.getTimerLeft(); - }; - /** - * Stop timer. Returns number of milliseconds of timer remained. - * If `timer` parameter isn't set, returns undefined. - */ - - var stopTimer = function stopTimer() { - if (globalState.timeout) { - stopTimerProgressBar(); - return globalState.timeout.stop(); - } - }; - /** - * Resume timer. Returns number of milliseconds of timer remained. - * If `timer` parameter isn't set, returns undefined. - */ - - var resumeTimer = function resumeTimer() { - if (globalState.timeout) { - var remaining = globalState.timeout.start(); - animateTimerProgressBar(remaining); - return remaining; - } - }; - /** - * Resume timer. Returns number of milliseconds of timer remained. - * If `timer` parameter isn't set, returns undefined. - */ - - var toggleTimer = function toggleTimer() { - var timer = globalState.timeout; - return timer && (timer.running ? stopTimer() : resumeTimer()); - }; - /** - * Increase timer. Returns number of milliseconds of an updated timer. - * If `timer` parameter isn't set, returns undefined. - */ - - var increaseTimer = function increaseTimer(n) { - if (globalState.timeout) { - var remaining = globalState.timeout.increase(n); - animateTimerProgressBar(remaining, true); - return remaining; - } - }; - /** - * Check if timer is running. Returns true if timer is running - * or false if timer is paused or stopped. - * If `timer` parameter isn't set, returns undefined - */ - - var isTimerRunning = function isTimerRunning() { - return globalState.timeout && globalState.timeout.isRunning(); - }; - - var bodyClickListenerAdded = false; - var clickHandlers = {}; - function bindClickHandler() { - var attr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'data-swal-template'; - clickHandlers[attr] = this; - - if (!bodyClickListenerAdded) { - document.body.addEventListener('click', bodyClickListener); - bodyClickListenerAdded = true; - } - } - - var bodyClickListener = function bodyClickListener(event) { - // 1. using .parentNode instead of event.path because of better support by old browsers https://stackoverflow.com/a/39245638 - // 2. using .parentNode instead of .parentElement because of IE11 + SVG https://stackoverflow.com/a/36270354 - for (var el = event.target; el && el !== document; el = el.parentNode) { - for (var attr in clickHandlers) { - var template = el.getAttribute(attr); - - if (template) { - clickHandlers[attr].fire({ - template: template - }); - return; - } - } - } - }; - - var defaultParams = { - title: '', - titleText: '', - text: '', - html: '', - footer: '', - icon: undefined, - iconColor: undefined, - iconHtml: undefined, - template: undefined, - toast: false, - animation: true, - showClass: { - popup: 'swal2-show', - backdrop: 'swal2-backdrop-show', - icon: 'swal2-icon-show' - }, - hideClass: { - popup: 'swal2-hide', - backdrop: 'swal2-backdrop-hide', - icon: 'swal2-icon-hide' - }, - customClass: {}, - target: 'body', - backdrop: true, - heightAuto: true, - allowOutsideClick: true, - allowEscapeKey: true, - allowEnterKey: true, - stopKeydownPropagation: true, - keydownListenerCapture: false, - showConfirmButton: true, - showDenyButton: false, - showCancelButton: false, - preConfirm: undefined, - preDeny: undefined, - confirmButtonText: 'OK', - confirmButtonAriaLabel: '', - confirmButtonColor: undefined, - denyButtonText: 'No', - denyButtonAriaLabel: '', - denyButtonColor: undefined, - cancelButtonText: 'Cancel', - cancelButtonAriaLabel: '', - cancelButtonColor: undefined, - buttonsStyling: true, - reverseButtons: false, - focusConfirm: true, - focusDeny: false, - focusCancel: false, - returnFocus: true, - showCloseButton: false, - closeButtonHtml: '×', - closeButtonAriaLabel: 'Close this dialog', - loaderHtml: '', - showLoaderOnConfirm: false, - showLoaderOnDeny: false, - imageUrl: undefined, - imageWidth: undefined, - imageHeight: undefined, - imageAlt: '', - timer: undefined, - timerProgressBar: false, - width: undefined, - padding: undefined, - background: undefined, - input: undefined, - inputPlaceholder: '', - inputLabel: '', - inputValue: '', - inputOptions: {}, - inputAutoTrim: true, - inputAttributes: {}, - inputValidator: undefined, - returnInputValueOnDeny: false, - validationMessage: undefined, - grow: false, - position: 'center', - progressSteps: [], - currentProgressStep: undefined, - progressStepsDistance: undefined, - onBeforeOpen: undefined, - onOpen: undefined, - willOpen: undefined, - didOpen: undefined, - onRender: undefined, - didRender: undefined, - onClose: undefined, - onAfterClose: undefined, - willClose: undefined, - didClose: undefined, - onDestroy: undefined, - didDestroy: undefined, - scrollbarPadding: true - }; - var updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'onAfterClose', 'onClose', 'onDestroy', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; - var deprecatedParams = { - animation: 'showClass" and "hideClass', - onBeforeOpen: 'willOpen', - onOpen: 'didOpen', - onRender: 'didRender', - onClose: 'willClose', - onAfterClose: 'didClose', - onDestroy: 'didDestroy' - }; - var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; - /** - * Is valid parameter - * @param {String} paramName - */ - - var isValidParameter = function isValidParameter(paramName) { - return Object.prototype.hasOwnProperty.call(defaultParams, paramName); - }; - /** - * Is valid parameter for Swal.update() method - * @param {String} paramName - */ - - var isUpdatableParameter = function isUpdatableParameter(paramName) { - return updatableParams.indexOf(paramName) !== -1; - }; - /** - * Is deprecated parameter - * @param {String} paramName - */ - - var isDeprecatedParameter = function isDeprecatedParameter(paramName) { - return deprecatedParams[paramName]; - }; - - var checkIfParamIsValid = function checkIfParamIsValid(param) { - if (!isValidParameter(param)) { - warn("Unknown parameter \"".concat(param, "\"")); - } - }; - - var checkIfToastParamIsValid = function checkIfToastParamIsValid(param) { - if (toastIncompatibleParams.indexOf(param) !== -1) { - warn("The parameter \"".concat(param, "\" is incompatible with toasts")); - } - }; - - var checkIfParamIsDeprecated = function checkIfParamIsDeprecated(param) { - if (isDeprecatedParameter(param)) { - warnAboutDeprecation(param, isDeprecatedParameter(param)); - } - }; - /** - * Show relevant warnings for given params - * - * @param params - */ - - - var showWarningsForParams = function showWarningsForParams(params) { - for (var param in params) { - checkIfParamIsValid(param); - - if (params.toast) { - checkIfToastParamIsValid(param); - } - - checkIfParamIsDeprecated(param); - } - }; - - - - var staticMethods = /*#__PURE__*/Object.freeze({ - isValidParameter: isValidParameter, - isUpdatableParameter: isUpdatableParameter, - isDeprecatedParameter: isDeprecatedParameter, - argsToParams: argsToParams, - isVisible: isVisible$1, - clickConfirm: clickConfirm, - clickDeny: clickDeny, - clickCancel: clickCancel, - getContainer: getContainer, - getPopup: getPopup, - getTitle: getTitle, - getContent: getContent, - getHtmlContainer: getHtmlContainer, - getImage: getImage, - getIcon: getIcon, - getInputLabel: getInputLabel, - getCloseButton: getCloseButton, - getActions: getActions, - getConfirmButton: getConfirmButton, - getDenyButton: getDenyButton, - getCancelButton: getCancelButton, - getLoader: getLoader, - getHeader: getHeader, - getFooter: getFooter, - getTimerProgressBar: getTimerProgressBar, - getFocusableElements: getFocusableElements, - getValidationMessage: getValidationMessage, - isLoading: isLoading, - fire: fire, - mixin: mixin, - queue: queue, - getQueueStep: getQueueStep, - insertQueueStep: insertQueueStep, - deleteQueueStep: deleteQueueStep, - showLoading: showLoading, - enableLoading: showLoading, - getTimerLeft: getTimerLeft, - stopTimer: stopTimer, - resumeTimer: resumeTimer, - toggleTimer: toggleTimer, - increaseTimer: increaseTimer, - isTimerRunning: isTimerRunning, - bindClickHandler: bindClickHandler - }); - - /** - * Hides loader and shows back the button which was hidden by .showLoading() - */ - - function hideLoading() { - // do nothing if popup is closed - var innerParams = privateProps.innerParams.get(this); - - if (!innerParams) { - return; - } - - var domCache = privateProps.domCache.get(this); - hide(domCache.loader); - var buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); - - if (buttonToReplace.length) { - show(buttonToReplace[0], 'inline-block'); - } else if (allButtonsAreHidden()) { - hide(domCache.actions); - } - - removeClass([domCache.popup, domCache.actions], swalClasses.loading); - domCache.popup.removeAttribute('aria-busy'); - domCache.popup.removeAttribute('data-loading'); - domCache.confirmButton.disabled = false; - domCache.denyButton.disabled = false; - domCache.cancelButton.disabled = false; - } - - function getInput$1(instance) { - var innerParams = privateProps.innerParams.get(instance || this); - var domCache = privateProps.domCache.get(instance || this); - - if (!domCache) { - return null; - } - - return getInput(domCache.content, innerParams.input); - } - - var fixScrollbar = function fixScrollbar() { - // for queues, do not do this more than once - if (states.previousBodyPadding !== null) { - return; - } // if the body has overflow - - - if (document.body.scrollHeight > window.innerHeight) { - // add padding so the content doesn't shift after removal of scrollbar - states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); - document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); - } - }; - var undoScrollbar = function undoScrollbar() { - if (states.previousBodyPadding !== null) { - document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); - states.previousBodyPadding = null; - } - }; - - /* istanbul ignore file */ - - var iOSfix = function iOSfix() { - var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; - - if (iOS && !hasClass(document.body, swalClasses.iosfix)) { - var offset = document.body.scrollTop; - document.body.style.top = "".concat(offset * -1, "px"); - addClass(document.body, swalClasses.iosfix); - lockBodyScroll(); - addBottomPaddingForTallPopups(); // #1948 - } - }; - - var addBottomPaddingForTallPopups = function addBottomPaddingForTallPopups() { - var safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); - - if (safari) { - var bottomPanelHeight = 44; - - if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { - getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); - } - } - }; - - var lockBodyScroll = function lockBodyScroll() { - // #1246 - var container = getContainer(); - var preventTouchMove; - - container.ontouchstart = function (e) { - preventTouchMove = shouldPreventTouchMove(e); - }; - - container.ontouchmove = function (e) { - if (preventTouchMove) { - e.preventDefault(); - e.stopPropagation(); - } - }; - }; - - var shouldPreventTouchMove = function shouldPreventTouchMove(event) { - var target = event.target; - var container = getContainer(); - - if (isStylys(event) || isZoom(event)) { - return false; - } - - if (target === container) { - return true; - } - - if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 - !(isScrollable(getContent()) && // #1944 - getContent().contains(target))) { - return true; - } - - return false; - }; - - var isStylys = function isStylys(event) { - // #1786 - return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; - }; - - var isZoom = function isZoom(event) { - // #1891 - return event.touches && event.touches.length > 1; - }; - - var undoIOSfix = function undoIOSfix() { - if (hasClass(document.body, swalClasses.iosfix)) { - var offset = parseInt(document.body.style.top, 10); - removeClass(document.body, swalClasses.iosfix); - document.body.style.top = ''; - document.body.scrollTop = offset * -1; - } - }; - - /* istanbul ignore file */ - - var isIE11 = function isIE11() { - return !!window.MSInputMethodContext && !!document.documentMode; - }; // Fix IE11 centering sweetalert2/issues/933 - - - var fixVerticalPositionIE = function fixVerticalPositionIE() { - var container = getContainer(); - var popup = getPopup(); - container.style.removeProperty('align-items'); - - if (popup.offsetTop < 0) { - container.style.alignItems = 'flex-start'; - } - }; - - var IEfix = function IEfix() { - if (typeof window !== 'undefined' && isIE11()) { - fixVerticalPositionIE(); - window.addEventListener('resize', fixVerticalPositionIE); - } - }; - var undoIEfix = function undoIEfix() { - if (typeof window !== 'undefined' && isIE11()) { - window.removeEventListener('resize', fixVerticalPositionIE); - } - }; - - // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that - // elements not within the active modal dialog will not be surfaced if a user opens a screen - // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. - - var setAriaHidden = function setAriaHidden() { - var bodyChildren = toArray(document.body.children); - bodyChildren.forEach(function (el) { - if (el === getContainer() || contains(el, getContainer())) { - return; - } - - if (el.hasAttribute('aria-hidden')) { - el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); - } - - el.setAttribute('aria-hidden', 'true'); - }); - }; - var unsetAriaHidden = function unsetAriaHidden() { - var bodyChildren = toArray(document.body.children); - bodyChildren.forEach(function (el) { - if (el.hasAttribute('data-previous-aria-hidden')) { - el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); - el.removeAttribute('data-previous-aria-hidden'); - } else { - el.removeAttribute('aria-hidden'); - } - }); - }; - - /** - * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. - * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` - * This is the approach that Babel will probably take to implement private methods/fields - * https://github.com/tc39/proposal-private-methods - * https://github.com/babel/babel/pull/7555 - * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* - * then we can use that language feature. - */ - var privateMethods = { - swalPromiseResolve: new WeakMap() - }; - - /* - * Instance method to close sweetAlert - */ - - function removePopupAndResetState(instance, container, returnFocus, didClose) { - if (isToast()) { - triggerDidCloseAndDispose(instance, didClose); - } else { - restoreActiveElement(returnFocus).then(function () { - return triggerDidCloseAndDispose(instance, didClose); - }); - globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { - capture: globalState.keydownListenerCapture - }); - globalState.keydownHandlerAdded = false; - } - - if (container.parentNode && !document.body.getAttribute('data-swal2-queue-step')) { - container.parentNode.removeChild(container); - } - - if (isModal()) { - undoScrollbar(); - undoIOSfix(); - undoIEfix(); - unsetAriaHidden(); - } - - removeBodyClasses(); - } - - function removeBodyClasses() { - removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); - } - - function close(resolveValue) { - var popup = getPopup(); - - if (!popup) { - return; - } - - resolveValue = prepareResolveValue(resolveValue); - var innerParams = privateProps.innerParams.get(this); - - if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { - return; - } - - var swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); - removeClass(popup, innerParams.showClass.popup); - addClass(popup, innerParams.hideClass.popup); - var backdrop = getContainer(); - removeClass(backdrop, innerParams.showClass.backdrop); - addClass(backdrop, innerParams.hideClass.backdrop); - handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise - - swalPromiseResolve(resolveValue); - } - - var prepareResolveValue = function prepareResolveValue(resolveValue) { - // When user calls Swal.close() - if (typeof resolveValue === 'undefined') { - return { - isConfirmed: false, - isDenied: false, - isDismissed: true - }; - } - - return _extends({ - isConfirmed: false, - isDenied: false, - isDismissed: false - }, resolveValue); - }; - - var handlePopupAnimation = function handlePopupAnimation(instance, popup, innerParams) { - var container = getContainer(); // If animation is supported, animate - - var animationIsSupported = animationEndEvent && hasCssAnimation(popup); - var onClose = innerParams.onClose, - onAfterClose = innerParams.onAfterClose, - willClose = innerParams.willClose, - didClose = innerParams.didClose; - runDidClose(popup, willClose, onClose); - - if (animationIsSupported) { - animatePopup(instance, popup, container, innerParams.returnFocus, didClose || onAfterClose); - } else { - // Otherwise, remove immediately - removePopupAndResetState(instance, container, innerParams.returnFocus, didClose || onAfterClose); - } - }; - - var runDidClose = function runDidClose(popup, willClose, onClose) { - if (willClose !== null && typeof willClose === 'function') { - willClose(popup); - } else if (onClose !== null && typeof onClose === 'function') { - onClose(popup); // @deprecated - } - }; - - var animatePopup = function animatePopup(instance, popup, container, returnFocus, didClose) { - globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); - popup.addEventListener(animationEndEvent, function (e) { - if (e.target === popup) { - globalState.swalCloseEventFinishedCallback(); - delete globalState.swalCloseEventFinishedCallback; - } - }); - }; - - var triggerDidCloseAndDispose = function triggerDidCloseAndDispose(instance, didClose) { - setTimeout(function () { - if (typeof didClose === 'function') { - didClose(); - } - - instance._destroy(); - }); - }; - - function setButtonsDisabled(instance, buttons, disabled) { - var domCache = privateProps.domCache.get(instance); - buttons.forEach(function (button) { - domCache[button].disabled = disabled; - }); - } - - function setInputDisabled(input, disabled) { - if (!input) { - return false; - } - - if (input.type === 'radio') { - var radiosContainer = input.parentNode.parentNode; - var radios = radiosContainer.querySelectorAll('input'); - - for (var i = 0; i < radios.length; i++) { - radios[i].disabled = disabled; - } - } else { - input.disabled = disabled; - } - } - - function enableButtons() { - setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); - } - function disableButtons() { - setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); - } - function enableInput() { - return setInputDisabled(this.getInput(), false); - } - function disableInput() { - return setInputDisabled(this.getInput(), true); - } - - function showValidationMessage(error) { - var domCache = privateProps.domCache.get(this); - var params = privateProps.innerParams.get(this); - setInnerHtml(domCache.validationMessage, error); - domCache.validationMessage.className = swalClasses['validation-message']; - - if (params.customClass && params.customClass.validationMessage) { - addClass(domCache.validationMessage, params.customClass.validationMessage); - } - - show(domCache.validationMessage); - var input = this.getInput(); - - if (input) { - input.setAttribute('aria-invalid', true); - input.setAttribute('aria-describedBy', swalClasses['validation-message']); - focusInput(input); - addClass(input, swalClasses.inputerror); - } - } // Hide block with validation message - - function resetValidationMessage$1() { - var domCache = privateProps.domCache.get(this); - - if (domCache.validationMessage) { - hide(domCache.validationMessage); - } - - var input = this.getInput(); - - if (input) { - input.removeAttribute('aria-invalid'); - input.removeAttribute('aria-describedBy'); - removeClass(input, swalClasses.inputerror); - } - } - - function getProgressSteps$1() { - var domCache = privateProps.domCache.get(this); - return domCache.progressSteps; - } - - var Timer = /*#__PURE__*/function () { - function Timer(callback, delay) { - _classCallCheck(this, Timer); - - this.callback = callback; - this.remaining = delay; - this.running = false; - this.start(); - } - - _createClass(Timer, [{ - key: "start", - value: function start() { - if (!this.running) { - this.running = true; - this.started = new Date(); - this.id = setTimeout(this.callback, this.remaining); - } - - return this.remaining; - } - }, { - key: "stop", - value: function stop() { - if (this.running) { - this.running = false; - clearTimeout(this.id); - this.remaining -= new Date() - this.started; - } - - return this.remaining; - } - }, { - key: "increase", - value: function increase(n) { - var running = this.running; - - if (running) { - this.stop(); - } - - this.remaining += n; - - if (running) { - this.start(); - } - - return this.remaining; - } - }, { - key: "getTimerLeft", - value: function getTimerLeft() { - if (this.running) { - this.stop(); - this.start(); - } - - return this.remaining; - } - }, { - key: "isRunning", - value: function isRunning() { - return this.running; - } - }]); - - return Timer; - }(); - - var defaultInputValidators = { - email: function email(string, validationMessage) { - 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'); - }, - url: function url(string, validationMessage) { - // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 - 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'); - } - }; - - function setDefaultInputValidators(params) { - // Use default `inputValidator` for supported input types if not provided - if (!params.inputValidator) { - Object.keys(defaultInputValidators).forEach(function (key) { - if (params.input === key) { - params.inputValidator = defaultInputValidators[key]; - } - }); - } - } - - function validateCustomTargetElement(params) { - // Determine if the custom target element is valid - if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { - warn('Target parameter is not valid, defaulting to "body"'); - params.target = 'body'; - } - } - /** - * Set type, text and actions on popup - * - * @param params - * @returns {boolean} - */ - - - function setParameters(params) { - setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm - - if (params.showLoaderOnConfirm && !params.preConfirm) { - 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'); - } // params.animation will be actually used in renderPopup.js - // but in case when params.animation is a function, we need to call that function - // before popup (re)initialization, so it'll be possible to check Swal.isVisible() - // inside the params.animation function - - - params.animation = callIfFunction(params.animation); - validateCustomTargetElement(params); // Replace newlines with
    in title - - if (typeof params.title === 'string') { - params.title = params.title.split('\n').join('
    '); - } - - init(params); - } - - var swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; - var getTemplateParams = function getTemplateParams(params) { - var template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; - - if (!template) { - return {}; - } - - var templateContent = template.content || template; // IE11 - - showWarningsForElements(templateContent); - - var result = _extends(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); - - return result; - }; - - var getSwalParams = function getSwalParams(templateContent) { - var result = {}; - toArray(templateContent.querySelectorAll('swal-param')).forEach(function (param) { - showWarningsForAttributes(param, ['name', 'value']); - var paramName = param.getAttribute('name'); - var value = param.getAttribute('value'); - - if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { - value = false; - } - - if (_typeof(defaultParams[paramName]) === 'object') { - value = JSON.parse(value); - } - - result[paramName] = value; - }); - return result; - }; - - var getSwalButtons = function getSwalButtons(templateContent) { - var result = {}; - toArray(templateContent.querySelectorAll('swal-button')).forEach(function (button) { - showWarningsForAttributes(button, ['type', 'color', 'aria-label']); - var type = button.getAttribute('type'); - result["".concat(type, "ButtonText")] = button.innerHTML; - result["show".concat(capitalizeFirstLetter(type), "Button")] = true; - - if (button.hasAttribute('color')) { - result["".concat(type, "ButtonColor")] = button.getAttribute('color'); - } - - if (button.hasAttribute('aria-label')) { - result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); - } - }); - return result; - }; - - var getSwalImage = function getSwalImage(templateContent) { - var result = {}; - var image = templateContent.querySelector('swal-image'); - - if (image) { - showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); - - if (image.hasAttribute('src')) { - result.imageUrl = image.getAttribute('src'); - } - - if (image.hasAttribute('width')) { - result.imageWidth = image.getAttribute('width'); - } - - if (image.hasAttribute('height')) { - result.imageHeight = image.getAttribute('height'); - } - - if (image.hasAttribute('alt')) { - result.imageAlt = image.getAttribute('alt'); - } - } - - return result; - }; - - var getSwalIcon = function getSwalIcon(templateContent) { - var result = {}; - var icon = templateContent.querySelector('swal-icon'); - - if (icon) { - showWarningsForAttributes(icon, ['type', 'color']); - - if (icon.hasAttribute('type')) { - result.icon = icon.getAttribute('type'); - } - - if (icon.hasAttribute('color')) { - result.iconColor = icon.getAttribute('color'); - } - - result.iconHtml = icon.innerHTML; - } - - return result; - }; - - var getSwalInput = function getSwalInput(templateContent) { - var result = {}; - var input = templateContent.querySelector('swal-input'); - - if (input) { - showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); - result.input = input.getAttribute('type') || 'text'; - - if (input.hasAttribute('label')) { - result.inputLabel = input.getAttribute('label'); - } - - if (input.hasAttribute('placeholder')) { - result.inputPlaceholder = input.getAttribute('placeholder'); - } - - if (input.hasAttribute('value')) { - result.inputValue = input.getAttribute('value'); - } - } - - var inputOptions = templateContent.querySelectorAll('swal-input-option'); - - if (inputOptions.length) { - result.inputOptions = {}; - toArray(inputOptions).forEach(function (option) { - showWarningsForAttributes(option, ['value']); - var optionValue = option.getAttribute('value'); - var optionName = option.innerHTML; - result.inputOptions[optionValue] = optionName; - }); - } - - return result; - }; - - var getSwalStringParams = function getSwalStringParams(templateContent, paramNames) { - var result = {}; - - for (var i in paramNames) { - var paramName = paramNames[i]; - var tag = templateContent.querySelector(paramName); - - if (tag) { - showWarningsForAttributes(tag, []); - result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); - } - } - - return result; - }; - - var showWarningsForElements = function showWarningsForElements(template) { - var allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); - toArray(template.querySelectorAll('*')).forEach(function (el) { - if (el.parentNode !== template) { - // can't use template.children because of IE11 - return; - } - - var tagName = el.tagName.toLowerCase(); - - if (allowedElements.indexOf(tagName) === -1) { - warn("Unrecognized element <".concat(tagName, ">")); - } - }); - }; - - var showWarningsForAttributes = function showWarningsForAttributes(el, allowedAttributes) { - toArray(el.attributes).forEach(function (attribute) { - if (allowedAttributes.indexOf(attribute.name) === -1) { - 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.')]); - } - }); - }; - - var SHOW_CLASS_TIMEOUT = 10; - /** - * Open popup, add necessary classes and styles, fix scrollbar - * - * @param params - */ - - var openPopup = function openPopup(params) { - var container = getContainer(); - var popup = getPopup(); - - if (typeof params.willOpen === 'function') { - params.willOpen(popup); - } else if (typeof params.onBeforeOpen === 'function') { - params.onBeforeOpen(popup); // @deprecated - } - - var bodyStyles = window.getComputedStyle(document.body); - var initialBodyOverflow = bodyStyles.overflowY; - addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' - - setTimeout(function () { - setScrollingVisibility(container, popup); - }, SHOW_CLASS_TIMEOUT); - - if (isModal()) { - fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); - setAriaHidden(); - } - - if (!isToast() && !globalState.previousActiveElement) { - globalState.previousActiveElement = document.activeElement; - } - - runDidOpen(popup, params); - removeClass(container, swalClasses['no-transition']); - }; - - var runDidOpen = function runDidOpen(popup, params) { - if (typeof params.didOpen === 'function') { - setTimeout(function () { - return params.didOpen(popup); - }); - } else if (typeof params.onOpen === 'function') { - setTimeout(function () { - return params.onOpen(popup); - }); // @deprecated - } - }; - - var swalOpenAnimationFinished = function swalOpenAnimationFinished(event) { - var popup = getPopup(); - - if (event.target !== popup) { - return; - } - - var container = getContainer(); - popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); - container.style.overflowY = 'auto'; - }; - - var setScrollingVisibility = function setScrollingVisibility(container, popup) { - if (animationEndEvent && hasCssAnimation(popup)) { - container.style.overflowY = 'hidden'; - popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); - } else { - container.style.overflowY = 'auto'; - } - }; - - var fixScrollContainer = function fixScrollContainer(container, scrollbarPadding, initialBodyOverflow) { - iOSfix(); - IEfix(); - - if (scrollbarPadding && initialBodyOverflow !== 'hidden') { - fixScrollbar(); - } // sweetalert2/issues/1247 - - - setTimeout(function () { - container.scrollTop = 0; - }); - }; - - var addClasses$1 = function addClasses(container, popup, params) { - addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 - - popup.style.setProperty('opacity', '0', 'important'); - show(popup); - setTimeout(function () { - // Animate popup right after showing it - addClass(popup, params.showClass.popup); // and remove the opacity workaround - - popup.style.removeProperty('opacity'); - }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 - - addClass([document.documentElement, document.body], swalClasses.shown); - - if (params.heightAuto && params.backdrop && !params.toast) { - addClass([document.documentElement, document.body], swalClasses['height-auto']); - } - }; - - var handleInputOptionsAndValue = function handleInputOptionsAndValue(instance, params) { - if (params.input === 'select' || params.input === 'radio') { - handleInputOptions(instance, params); - } else if (['text', 'email', 'number', 'tel', 'textarea'].indexOf(params.input) !== -1 && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { - handleInputValue(instance, params); - } - }; - var getInputValue = function getInputValue(instance, innerParams) { - var input = instance.getInput(); - - if (!input) { - return null; - } - - switch (innerParams.input) { - case 'checkbox': - return getCheckboxValue(input); - - case 'radio': - return getRadioValue(input); - - case 'file': - return getFileValue(input); - - default: - return innerParams.inputAutoTrim ? input.value.trim() : input.value; - } - }; - - var getCheckboxValue = function getCheckboxValue(input) { - return input.checked ? 1 : 0; - }; - - var getRadioValue = function getRadioValue(input) { - return input.checked ? input.value : null; - }; - - var getFileValue = function getFileValue(input) { - return input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; - }; - - var handleInputOptions = function handleInputOptions(instance, params) { - var content = getContent(); - - var processInputOptions = function processInputOptions(inputOptions) { - return populateInputOptions[params.input](content, formatInputOptions(inputOptions), params); - }; - - if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { - showLoading(getConfirmButton()); - asPromise(params.inputOptions).then(function (inputOptions) { - instance.hideLoading(); - processInputOptions(inputOptions); - }); - } else if (_typeof(params.inputOptions) === 'object') { - processInputOptions(params.inputOptions); - } else { - error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(_typeof(params.inputOptions))); - } - }; - - var handleInputValue = function handleInputValue(instance, params) { - var input = instance.getInput(); - hide(input); - asPromise(params.inputValue).then(function (inputValue) { - input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); - show(input); - input.focus(); - instance.hideLoading(); - })["catch"](function (err) { - error("Error in inputValue promise: ".concat(err)); - input.value = ''; - show(input); - input.focus(); - instance.hideLoading(); - }); - }; - - var populateInputOptions = { - select: function select(content, inputOptions, params) { - var select = getChildByClass(content, swalClasses.select); - - var renderOption = function renderOption(parent, optionLabel, optionValue) { - var option = document.createElement('option'); - option.value = optionValue; - setInnerHtml(option, optionLabel); - option.selected = isSelected(optionValue, params.inputValue); - parent.appendChild(option); - }; - - inputOptions.forEach(function (inputOption) { - var optionValue = inputOption[0]; - var optionLabel = inputOption[1]; // spec: - // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 - // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." - // check whether this is a - - if (Array.isArray(optionLabel)) { - // if it is an array, then it is an - var optgroup = document.createElement('optgroup'); - optgroup.label = optionValue; - optgroup.disabled = false; // not configurable for now - - select.appendChild(optgroup); - optionLabel.forEach(function (o) { - return renderOption(optgroup, o[1], o[0]); - }); - } else { - // case of - valueFormatted = formatInputOptions(valueFormatted); - } - - result.push([key, valueFormatted]); - }); - } else { - Object.keys(inputOptions).forEach(function (key) { - var valueFormatted = inputOptions[key]; - - if (_typeof(valueFormatted) === 'object') { - // case of - valueFormatted = formatInputOptions(valueFormatted); - } - - result.push([key, valueFormatted]); - }); - } - - return result; - }; - - var isSelected = function isSelected(optionValue, inputValue) { - return inputValue && inputValue.toString() === optionValue.toString(); - }; - - var handleConfirmButtonClick = function handleConfirmButtonClick(instance, innerParams) { - instance.disableButtons(); - - if (innerParams.input) { - handleConfirmOrDenyWithInput(instance, innerParams, 'confirm'); - } else { - confirm(instance, innerParams, true); - } - }; - var handleDenyButtonClick = function handleDenyButtonClick(instance, innerParams) { - instance.disableButtons(); - - if (innerParams.returnInputValueOnDeny) { - handleConfirmOrDenyWithInput(instance, innerParams, 'deny'); - } else { - deny(instance, innerParams, false); - } - }; - var handleCancelButtonClick = function handleCancelButtonClick(instance, dismissWith) { - instance.disableButtons(); - dismissWith(DismissReason.cancel); - }; - - var handleConfirmOrDenyWithInput = function handleConfirmOrDenyWithInput(instance, innerParams, type - /* type is either 'confirm' or 'deny' */ - ) { - var inputValue = getInputValue(instance, innerParams); - - if (innerParams.inputValidator) { - handleInputValidator(instance, innerParams, inputValue); - } else if (!instance.getInput().checkValidity()) { - instance.enableButtons(); - instance.showValidationMessage(innerParams.validationMessage); - } else if (type === 'deny') { - deny(instance, innerParams, inputValue); - } else { - confirm(instance, innerParams, inputValue); - } - }; - - var handleInputValidator = function handleInputValidator(instance, innerParams, inputValue) { - instance.disableInput(); - var validationPromise = Promise.resolve().then(function () { - return asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage)); - }); - validationPromise.then(function (validationMessage) { - instance.enableButtons(); - instance.enableInput(); - - if (validationMessage) { - instance.showValidationMessage(validationMessage); - } else { - confirm(instance, innerParams, inputValue); - } - }); - }; - - var deny = function deny(instance, innerParams, value) { - if (innerParams.showLoaderOnDeny) { - showLoading(getDenyButton()); - } - - if (innerParams.preDeny) { - var preDenyPromise = Promise.resolve().then(function () { - return asPromise(innerParams.preDeny(value, innerParams.validationMessage)); - }); - preDenyPromise.then(function (preDenyValue) { - if (preDenyValue === false) { - instance.hideLoading(); - } else { - instance.closePopup({ - isDenied: true, - value: typeof preDenyValue === 'undefined' ? value : preDenyValue - }); - } - }); - } else { - instance.closePopup({ - isDenied: true, - value: value - }); - } - }; - - var succeedWith = function succeedWith(instance, value) { - instance.closePopup({ - isConfirmed: true, - value: value - }); - }; - - var confirm = function confirm(instance, innerParams, value) { - if (innerParams.showLoaderOnConfirm) { - showLoading(); // TODO: make showLoading an *instance* method - } - - if (innerParams.preConfirm) { - instance.resetValidationMessage(); - var preConfirmPromise = Promise.resolve().then(function () { - return asPromise(innerParams.preConfirm(value, innerParams.validationMessage)); - }); - preConfirmPromise.then(function (preConfirmValue) { - if (isVisible(getValidationMessage()) || preConfirmValue === false) { - instance.hideLoading(); - } else { - succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); - } - }); - } else { - succeedWith(instance, value); - } - }; - - var addKeydownHandler = function addKeydownHandler(instance, globalState, innerParams, dismissWith) { - if (globalState.keydownTarget && globalState.keydownHandlerAdded) { - globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { - capture: globalState.keydownListenerCapture - }); - globalState.keydownHandlerAdded = false; - } - - if (!innerParams.toast) { - globalState.keydownHandler = function (e) { - return keydownHandler(instance, e, dismissWith); - }; - - globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); - globalState.keydownListenerCapture = innerParams.keydownListenerCapture; - globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { - capture: globalState.keydownListenerCapture - }); - globalState.keydownHandlerAdded = true; - } - }; // Focus handling - - var setFocus = function setFocus(innerParams, index, increment) { - var focusableElements = getFocusableElements(); // search for visible elements and select the next possible match - - if (focusableElements.length) { - index = index + increment; // rollover to first item - - if (index === focusableElements.length) { - index = 0; // go to last item - } else if (index === -1) { - index = focusableElements.length - 1; - } - - return focusableElements[index].focus(); - } // no visible focusable elements, focus the popup - - - getPopup().focus(); - }; - var arrowKeysNextButton = ['ArrowRight', 'ArrowDown', 'Right', 'Down' // IE11 - ]; - var arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp', 'Left', 'Up' // IE11 - ]; - var escKeys = ['Escape', 'Esc' // IE11 - ]; - - var keydownHandler = function keydownHandler(instance, e, dismissWith) { - var innerParams = privateProps.innerParams.get(instance); - - if (!innerParams) { - return; // This instance has already been destroyed - } - - if (innerParams.stopKeydownPropagation) { - e.stopPropagation(); - } // ENTER - - - if (e.key === 'Enter') { - handleEnter(instance, e, innerParams); // TAB - } else if (e.key === 'Tab') { - handleTab(e, innerParams); // ARROWS - switch focus between buttons - } else if ([].concat(arrowKeysNextButton, arrowKeysPreviousButton).indexOf(e.key) !== -1) { - handleArrows(e.key); // ESC - } else if (escKeys.indexOf(e.key) !== -1) { - handleEsc(e, innerParams, dismissWith); - } - }; - - var handleEnter = function handleEnter(instance, e, innerParams) { - // #720 #721 - if (e.isComposing) { - return; - } - - if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { - if (['textarea', 'file'].indexOf(innerParams.input) !== -1) { - return; // do not submit - } - - clickConfirm(); - e.preventDefault(); - } - }; - - var handleTab = function handleTab(e, innerParams) { - var targetElement = e.target; - var focusableElements = getFocusableElements(); - var btnIndex = -1; - - for (var i = 0; i < focusableElements.length; i++) { - if (targetElement === focusableElements[i]) { - btnIndex = i; - break; - } - } - - if (!e.shiftKey) { - // Cycle to the next button - setFocus(innerParams, btnIndex, 1); - } else { - // Cycle to the prev button - setFocus(innerParams, btnIndex, -1); - } - - e.stopPropagation(); - e.preventDefault(); - }; - - var handleArrows = function handleArrows(key) { - var confirmButton = getConfirmButton(); - var denyButton = getDenyButton(); - var cancelButton = getCancelButton(); - - if (!([confirmButton, denyButton, cancelButton].indexOf(document.activeElement) !== -1)) { - return; - } - - var sibling = arrowKeysNextButton.indexOf(key) !== -1 ? 'nextElementSibling' : 'previousElementSibling'; - var buttonToFocus = document.activeElement[sibling]; - - if (buttonToFocus) { - buttonToFocus.focus(); - } - }; - - var handleEsc = function handleEsc(e, innerParams, dismissWith) { - if (callIfFunction(innerParams.allowEscapeKey)) { - e.preventDefault(); - dismissWith(DismissReason.esc); - } - }; - - var handlePopupClick = function handlePopupClick(instance, domCache, dismissWith) { - var innerParams = privateProps.innerParams.get(instance); - - if (innerParams.toast) { - handleToastClick(instance, domCache, dismissWith); - } else { - // Ignore click events that had mousedown on the popup but mouseup on the container - // This can happen when the user drags a slider - handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup - - handleContainerMousedown(domCache); - handleModalClick(instance, domCache, dismissWith); - } - }; - - var handleToastClick = function handleToastClick(instance, domCache, dismissWith) { - // Closing toast by internal click - domCache.popup.onclick = function () { - var innerParams = privateProps.innerParams.get(instance); - - if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { - return; - } - - dismissWith(DismissReason.close); - }; - }; - - var ignoreOutsideClick = false; - - var handleModalMousedown = function handleModalMousedown(domCache) { - domCache.popup.onmousedown = function () { - domCache.container.onmouseup = function (e) { - domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't - // have any other direct children aside of the popup - - if (e.target === domCache.container) { - ignoreOutsideClick = true; - } - }; - }; - }; - - var handleContainerMousedown = function handleContainerMousedown(domCache) { - domCache.container.onmousedown = function () { - domCache.popup.onmouseup = function (e) { - domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup - - if (e.target === domCache.popup || domCache.popup.contains(e.target)) { - ignoreOutsideClick = true; - } - }; - }; - }; - - var handleModalClick = function handleModalClick(instance, domCache, dismissWith) { - domCache.container.onclick = function (e) { - var innerParams = privateProps.innerParams.get(instance); - - if (ignoreOutsideClick) { - ignoreOutsideClick = false; - return; - } - - if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { - dismissWith(DismissReason.backdrop); - } - }; - }; - - function _main(userParams) { - var mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - showWarningsForParams(_extends({}, mixinParams, userParams)); - - if (globalState.currentInstance) { - globalState.currentInstance._destroy(); - } - - globalState.currentInstance = this; - var innerParams = prepareParams(userParams, mixinParams); - setParameters(innerParams); - Object.freeze(innerParams); // clear the previous timer - - if (globalState.timeout) { - globalState.timeout.stop(); - delete globalState.timeout; - } // clear the restore focus timeout - - - clearTimeout(globalState.restoreFocusTimeout); - var domCache = populateDomCache(this); - render(this, innerParams); - privateProps.innerParams.set(this, innerParams); - return swalPromise(this, domCache, innerParams); - } - - var prepareParams = function prepareParams(userParams, mixinParams) { - var templateParams = getTemplateParams(userParams); - - var params = _extends({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 - - - params.showClass = _extends({}, defaultParams.showClass, params.showClass); - params.hideClass = _extends({}, defaultParams.hideClass, params.hideClass); // @deprecated - - if (userParams.animation === false) { - params.showClass = { - popup: 'swal2-noanimation', - backdrop: 'swal2-noanimation' - }; - params.hideClass = {}; - } - - return params; - }; - - var swalPromise = function swalPromise(instance, domCache, innerParams) { - return new Promise(function (resolve) { - // functions to handle all closings/dismissals - var dismissWith = function dismissWith(dismiss) { - instance.closePopup({ - isDismissed: true, - dismiss: dismiss - }); - }; - - privateMethods.swalPromiseResolve.set(instance, resolve); - - domCache.confirmButton.onclick = function () { - return handleConfirmButtonClick(instance, innerParams); - }; - - domCache.denyButton.onclick = function () { - return handleDenyButtonClick(instance, innerParams); - }; - - domCache.cancelButton.onclick = function () { - return handleCancelButtonClick(instance, dismissWith); - }; - - domCache.closeButton.onclick = function () { - return dismissWith(DismissReason.close); - }; - - handlePopupClick(instance, domCache, dismissWith); - addKeydownHandler(instance, globalState, innerParams, dismissWith); - handleInputOptionsAndValue(instance, innerParams); - openPopup(innerParams); - setupTimer(globalState, innerParams, dismissWith); - initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) - - setTimeout(function () { - domCache.container.scrollTop = 0; - }); - }); - }; - - var populateDomCache = function populateDomCache(instance) { - var domCache = { - popup: getPopup(), - container: getContainer(), - content: getContent(), - actions: getActions(), - confirmButton: getConfirmButton(), - denyButton: getDenyButton(), - cancelButton: getCancelButton(), - loader: getLoader(), - closeButton: getCloseButton(), - validationMessage: getValidationMessage(), - progressSteps: getProgressSteps() - }; - privateProps.domCache.set(instance, domCache); - return domCache; - }; - - var setupTimer = function setupTimer(globalState$$1, innerParams, dismissWith) { - var timerProgressBar = getTimerProgressBar(); - hide(timerProgressBar); - - if (innerParams.timer) { - globalState$$1.timeout = new Timer(function () { - dismissWith('timer'); - delete globalState$$1.timeout; - }, innerParams.timer); - - if (innerParams.timerProgressBar) { - show(timerProgressBar); - setTimeout(function () { - if (globalState$$1.timeout && globalState$$1.timeout.running) { - // timer can be already stopped or unset at this point - animateTimerProgressBar(innerParams.timer); - } - }); - } - } - }; - - var initFocus = function initFocus(domCache, innerParams) { - if (innerParams.toast) { - return; - } - - if (!callIfFunction(innerParams.allowEnterKey)) { - return blurActiveElement(); - } - - if (!focusButton(domCache, innerParams)) { - setFocus(innerParams, -1, 1); - } - }; - - var focusButton = function focusButton(domCache, innerParams) { - if (innerParams.focusDeny && isVisible(domCache.denyButton)) { - domCache.denyButton.focus(); - return true; - } - - if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { - domCache.cancelButton.focus(); - return true; - } - - if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { - domCache.confirmButton.focus(); - return true; - } - - return false; - }; - - var blurActiveElement = function blurActiveElement() { - if (document.activeElement && typeof document.activeElement.blur === 'function') { - document.activeElement.blur(); - } - }; - - /** - * Updates popup parameters. - */ - - function update(params) { - var popup = getPopup(); - var innerParams = privateProps.innerParams.get(this); - - if (!popup || hasClass(popup, innerParams.hideClass.popup)) { - 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."); - } - - var validUpdatableParams = {}; // assign valid params from `params` to `defaults` - - Object.keys(params).forEach(function (param) { - if (Swal.isUpdatableParameter(param)) { - validUpdatableParams[param] = params[param]; - } else { - warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); - } - }); - - var updatedParams = _extends({}, innerParams, validUpdatableParams); - - render(this, updatedParams); - privateProps.innerParams.set(this, updatedParams); - Object.defineProperties(this, { - params: { - value: _extends({}, this.params, params), - writable: false, - enumerable: true - } - }); - } - - function _destroy() { - var domCache = privateProps.domCache.get(this); - var innerParams = privateProps.innerParams.get(this); - - if (!innerParams) { - return; // This instance has already been destroyed - } // Check if there is another Swal closing - - - if (domCache.popup && globalState.swalCloseEventFinishedCallback) { - globalState.swalCloseEventFinishedCallback(); - delete globalState.swalCloseEventFinishedCallback; - } // Check if there is a swal disposal defer timer - - - if (globalState.deferDisposalTimer) { - clearTimeout(globalState.deferDisposalTimer); - delete globalState.deferDisposalTimer; - } - - runDidDestroy(innerParams); - disposeSwal(this); - } - - var runDidDestroy = function runDidDestroy(innerParams) { - if (typeof innerParams.didDestroy === 'function') { - innerParams.didDestroy(); - } else if (typeof innerParams.onDestroy === 'function') { - innerParams.onDestroy(); // @deprecated - } - }; - - var disposeSwal = function disposeSwal(instance) { - // Unset this.params so GC will dispose it (#1569) - delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) - - delete globalState.keydownHandler; - delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) - - unsetWeakMaps(privateProps); - unsetWeakMaps(privateMethods); - }; - - var unsetWeakMaps = function unsetWeakMaps(obj) { - for (var i in obj) { - obj[i] = new WeakMap(); - } - }; - - - - var instanceMethods = /*#__PURE__*/Object.freeze({ - hideLoading: hideLoading, - disableLoading: hideLoading, - getInput: getInput$1, - close: close, - closePopup: close, - closeModal: close, - closeToast: close, - enableButtons: enableButtons, - disableButtons: disableButtons, - enableInput: enableInput, - disableInput: disableInput, - showValidationMessage: showValidationMessage, - resetValidationMessage: resetValidationMessage$1, - getProgressSteps: getProgressSteps$1, - _main: _main, - update: update, - _destroy: _destroy - }); - - var currentInstance; - - var SweetAlert = /*#__PURE__*/function () { - function SweetAlert() { - _classCallCheck(this, SweetAlert); - - // Prevent run in Node env - if (typeof window === 'undefined') { - return; - } // Check for the existence of Promise - - - if (typeof Promise === 'undefined') { - error('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)'); - } - - currentInstance = this; - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var outerParams = Object.freeze(this.constructor.argsToParams(args)); - Object.defineProperties(this, { - params: { - value: outerParams, - writable: false, - enumerable: true, - configurable: true - } - }); - - var promise = this._main(this.params); - - privateProps.promise.set(this, promise); - } // `catch` cannot be the name of a module export, so we define our thenable methods here instead - - - _createClass(SweetAlert, [{ - key: "then", - value: function then(onFulfilled) { - var promise = privateProps.promise.get(this); - return promise.then(onFulfilled); - } - }, { - key: "finally", - value: function _finally(onFinally) { - var promise = privateProps.promise.get(this); - return promise["finally"](onFinally); - } - }]); - - return SweetAlert; - }(); // Assign instance methods from src/instanceMethods/*.js to prototype - - - _extends(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor - - - _extends(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility - - - Object.keys(instanceMethods).forEach(function (key) { - SweetAlert[key] = function () { - if (currentInstance) { - var _currentInstance; - - return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments); - } - }; - }); - SweetAlert.DismissReason = DismissReason; - SweetAlert.version = '10.16.7'; - - var Swal = SweetAlert; - Swal["default"] = Swal; - - return Swal; - -})); -if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} - -"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{flex-direction:column;align-items:stretch;width:auto;padding:1.25em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9}.swal2-popup.swal2-toast .swal2-header{flex-direction:row;padding:0}.swal2-popup.swal2-toast .swal2-title{flex-grow:1;justify-content:flex-start;margin:0 .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{position:static;width:.8em;height:.8em;line-height:.8}.swal2-popup.swal2-toast .swal2-content{justify-content:flex-start;margin:0 .625em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container{padding:.625em 0 0}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{font-size:.25em}}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{flex:1;flex-basis:auto!important;align-self:stretch;width:auto;height:2.2em;height:auto;margin:0 .3125em;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.125em .3125em;padding:.3125em .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:flex;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;flex-direction:row;align-items:center;justify-content:center;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-top{align-items:flex-start}.swal2-container.swal2-top-left,.swal2-container.swal2-top-start{align-items:flex-start;justify-content:flex-start}.swal2-container.swal2-top-end,.swal2-container.swal2-top-right{align-items:flex-start;justify-content:flex-end}.swal2-container.swal2-center{align-items:center}.swal2-container.swal2-center-left,.swal2-container.swal2-center-start{align-items:center;justify-content:flex-start}.swal2-container.swal2-center-end,.swal2-container.swal2-center-right{align-items:center;justify-content:flex-end}.swal2-container.swal2-bottom{align-items:flex-end}.swal2-container.swal2-bottom-left,.swal2-container.swal2-bottom-start{align-items:flex-end;justify-content:flex-start}.swal2-container.swal2-bottom-end,.swal2-container.swal2-bottom-right{align-items:flex-end;justify-content:flex-end}.swal2-container.swal2-bottom-end>:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-no-transition{transition:none!important}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:5px;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center;padding:0 1.8em}.swal2-title{position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#2778c4;color:#fff;font-size:1em}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#d14529;color:#fff;font-size:1em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#757575;color:#fff;font-size:1em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;align-items:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0 1.6em;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto}.swal2-validation-message{align-items:center;justify-content:center;margin:0 -2.7em;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); - -/***/ }), - -/***/ "./src/forum/index.js": -/*!****************************!*\ - !*** ./src/forum/index.js ***! - \****************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var flarum_extend__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flarum/extend */ "flarum/extend"); -/* harmony import */ var flarum_extend__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(flarum_extend__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var flarum_forum_components_IndexPage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flarum/forum/components/IndexPage */ "flarum/forum/components/IndexPage"); -/* harmony import */ var flarum_forum_components_IndexPage__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(flarum_forum_components_IndexPage__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var flarum_app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! flarum/app */ "flarum/app"); -/* harmony import */ var flarum_app__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(flarum_app__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js"); -/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_3__); -/* - * This file is part of justoverclock/flarum-ext-guestengagement. - * - * Copyright (c) 2021 Marco Colia. - * https://flarum.it - * - * For the full copyright and license information, please view the LICENSE.md - * file that was distributed with this source code. - */ - - - - -flarum_app__WEBPACK_IMPORTED_MODULE_2___default.a.initializers.add('justoverclock/flarum-ext-newsletter', function () { - Object(flarum_extend__WEBPACK_IMPORTED_MODULE_0__["extend"])(flarum_forum_components_IndexPage__WEBPACK_IMPORTED_MODULE_1___default.a.prototype, 'navItems', function (navItems) { - if (flarum_app__WEBPACK_IMPORTED_MODULE_2___default.a.current.matches(flarum_forum_components_IndexPage__WEBPACK_IMPORTED_MODULE_1___default.a)) navItems.add('Newsletter', m('div', { - className: 'alignews' - }, m('h1', { - id: 'titleNl' - }, ['News', m('span', '.letter')]), m('p', { - className: 'descNl' - }, flarum_app__WEBPACK_IMPORTED_MODULE_2___default.a.translator.trans('flarum-ext-newsletter.forum.subscribe')), m('form', { - id: 'subscribeForm' - }, [m('input', { - className: 'fieldinp', - id: 'email-input', - type: 'email', - placeholder: 'Subscribe to Flarum' - }), m('button', { - className: 'subscbutt', - type: 'submit' - }, flarum_app__WEBPACK_IMPORTED_MODULE_2___default.a.translator.trans('flarum-ext-newsletter.forum.submitbutton'))])), -100); - }); -}); -Object(flarum_extend__WEBPACK_IMPORTED_MODULE_0__["extend"])(flarum_forum_components_IndexPage__WEBPACK_IMPORTED_MODULE_1___default.a.prototype, 'oncreate', function () { - function SetupNewsletterSubscribe(publicAccountId, listName, formId, onSuccess) { - var eeUrl = 'https://api.elasticemail.com/contact/add?version=2'; - var email = jQuery('#email-input'); - var form = jQuery('#' + formId).submit(function (event) { - event.preventDefault(); - jQuery.post(eeUrl, { - email: email.val(), - publicAccountId: publicAccountId, - listName: listName - }, function () {}, 'json').done(function (result) { - if (result.success === true) { - onSuccess(); - } - }).fail(function () {// e se fallisce?... - }); - }); - } - - jQuery(function () { - var pubAcc = flarum_app__WEBPACK_IMPORTED_MODULE_2___default.a.forum.attribute('PubAccount'); - var listmail = flarum_app__WEBPACK_IMPORTED_MODULE_2___default.a.forum.attribute('ListName'); - SetupNewsletterSubscribe(pubAcc, listmail, 'subscribeForm', function () { - // Ripuliamo il form dopo essere stato inviato! - sweetalert2__WEBPACK_IMPORTED_MODULE_3___default.a.fire('Thank You!', 'You are now subscribed to our Newsletter!', 'success'); - document.getElementById("subscribeForm").reset(); - }); - }); -}); - -/***/ }), - -/***/ "flarum/app": -/*!********************************************!*\ - !*** external "flarum.core.compat['app']" ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = flarum.core.compat['app']; - -/***/ }), - -/***/ "flarum/extend": -/*!***********************************************!*\ - !*** external "flarum.core.compat['extend']" ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = flarum.core.compat['extend']; - -/***/ }), - -/***/ "flarum/forum/components/IndexPage": -/*!*******************************************************************!*\ - !*** external "flarum.core.compat['forum/components/IndexPage']" ***! - \*******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = flarum.core.compat['forum/components/IndexPage']; - -/***/ }) - -/******/ }); +module.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var a=e[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(o,a,function(e){return t[e]}.bind(null,a));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(t,e){t.exports=flarum.core.compat.app},function(t,e){t.exports=flarum.core.compat["forum/components/IndexPage"]},function(t,e){t.exports=flarum.core.compat.extend},function(t,e,n){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n(e=parseInt(e.getAttribute("tabindex")))?1:t1&&void 0!==arguments[1]?arguments[1]:"flex";t.style.display=e},ct=function(t){t.style.display="none"},ut=function(t,e,n,o){var a=t.querySelector(e);a&&(a.style[n]=o)},dt=function(t,e,n){e?lt(t,n):ct(t)},pt=function(t){return!(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))},mt=function(t){return!!(t.scrollHeight>t.clientHeight)},ft=function(t){var e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},wt=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Y();pt(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout((function(){n.style.transition="width ".concat(t/1e3,"s linear"),n.style.width="0%"}),10))},ht=function(){return"undefined"==typeof window||"undefined"==typeof document},gt='\n
    \n
    \n
      \n
      \n \n

      \n \n
      \n
      \n
      \n \n \n
      \n \n \n
      \n \n
      \n \n \n
      \n
      \n
      \n
      \n \n \n \n
      \n
      \n
      \n
      \n
      \n
      \n').replace(/(^|\n)\s*/g,""),bt=function(t){Nn.isVisible()&&et!==t.target.value&&Nn.resetValidationMessage(),et=t.target.value},yt=function(t){var e,n=!!(e=O())&&(e.parentNode.removeChild(e),rt([document.documentElement,document.body],[B["no-backdrop"],B["toast-shown"],B["has-column"]]),!0);if(ht())w("SweetAlert2 requires document to initialize");else{var o=document.createElement("div");o.className=B.container,n&&at(o,B["no-transition"]),Q(o,gt);var a,r,i,s,l,c,u,d,p,m="string"==typeof(a=t.target)?document.querySelector(a):a;m.appendChild(o),function(t){var e=T();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")}(t),function(t){"rtl"===window.getComputedStyle(t).direction&&at(O(),B.rtl)}(m),r=z(),i=it(r,B.input),s=it(r,B.file),l=r.querySelector(".".concat(B.range," input")),c=r.querySelector(".".concat(B.range," output")),u=it(r,B.select),d=r.querySelector(".".concat(B.checkbox," input")),p=it(r,B.textarea),i.oninput=bt,s.onchange=bt,u.onchange=bt,d.onchange=bt,p.oninput=bt,l.oninput=function(t){bt(t),c.value=l.value},l.onchange=function(t){bt(t),l.nextSibling.value=l.value}}},vt=function(e,n){e instanceof HTMLElement?n.appendChild(e):"object"===t(e)?kt(e,n):e&&Q(n,e)},kt=function(t,e){t.jquery?xt(e,t):Q(e,t.toString())},xt=function(t,e){if(t.textContent="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},Ct=function(){if(ht())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&void 0!==t.style[n])return e[n];return!1}(),At=function(t,e){var n=F(),o=V(),a=N(),r=H(),i=R();e.showConfirmButton||e.showDenyButton||e.showCancelButton||ct(n),G(n,e,"actions"),Bt(a,"confirm",e),Bt(r,"deny",e),Bt(i,"cancel",e),function(t,e,n,o){if(!o.buttonsStyling)return rt([t,e,n],B.styled);at([t,e,n],B.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor)}(a,r,i,e),e.reverseButtons&&(n.insertBefore(i,o),n.insertBefore(r,o),n.insertBefore(a,o)),Q(o,e.loaderHtml),G(o,e,"loader")};function Bt(t,e,n){dt(t,n["show".concat(d(e),"Button")],"inline-block"),Q(t,n["".concat(e,"ButtonText")]),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=B[e],G(t,n,"".concat(e,"Button")),at(t,n["".concat(e,"ButtonClass")])}var Pt=function(t,e){var n=O();if(n){!function(t,e){"string"==typeof e?t.style.background=e:e||at([document.documentElement,document.body],B["no-backdrop"])}(n,e.backdrop),!e.backdrop&&e.allowOutsideClick&&f('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),function(t,e){e in B?at(t,B[e]):(f('The "position" parameter is not valid, defaulting to "center"'),at(t,B.center))}(n,e.position),function(t,e){if(e&&"string"==typeof e){var n="grow-".concat(e);n in B&&at(t,B[n])}}(n,e.grow),G(n,e,"container");var o=document.body.getAttribute("data-swal2-queue-step");o&&(n.setAttribute("data-queue-step",o),document.body.removeAttribute("data-swal2-queue-step"))}},Ot={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},St=["input","file","range","select","radio","checkbox","textarea"],Et=function(t){if(!Dt[t.input])return w('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));var e=qt(t.input),n=Dt[t.input](e,t);lt(n),setTimeout((function(){nt(n)}))},Tt=function(t,e){var n=tt(z(),t);if(n)for(var o in function(t){for(var e=0;eo?"".concat(e,"px"):null})).observe(t,{attributes:!0,attributeFilter:["style"]})}return t};var Mt=function(t,e){var n=q();G(n,e,"htmlContainer"),e.html?(vt(e.html,n),lt(n,"block")):e.text?(n.textContent=e.text,lt(n,"block")):ct(n),function(t,e){var n=z(),o=Ot.innerParams.get(t),a=!o||e.input!==o.input;St.forEach((function(t){var o=B[t],r=it(n,o);Tt(t,e.inputAttributes),r.className=o,a&&ct(r)})),e.input&&(a&&Et(e),jt(e))}(t,e),G(z(),e,"content")},It=function(t,e){for(var n in P)e.icon!==n&&rt(t,P[n]);at(t,P[e.icon]),Vt(t,e),Nt(),G(t,e,"icon")},Nt=function(){for(var t=T(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),o=0;o\n \n
      \n
      \n '):"error"===e.icon?Q(t,'\n \n \n \n \n '):Q(t,Rt({question:"?",warning:"!",info:"i"}[e.icon]))},Vt=function(t,e){if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(var n=0,o=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];n').concat(t,"")},Ft=[],_t=function(){return O()&&O().getAttribute("data-queue-step")},Ut=function(t,e){var n=M();if(!e.progressSteps||0===e.progressSteps.length)return ct(n);lt(n),n.textContent="";var o=parseInt(void 0===e.currentProgressStep?_t():e.currentProgressStep);o>=e.progressSteps.length&&f("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((function(t,a){var r=function(t){var e=document.createElement("li");return at(e,B["progress-step"]),Q(e,t),e}(t);if(n.appendChild(r),a===o&&at(r,B["active-progress-step"]),a!==e.progressSteps.length-1){var i=function(t){var e=document.createElement("li");return at(e,B["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e}(e);n.appendChild(i)}}))},Yt=function(t,e){var n=_();G(n,e,"header"),Ut(0,e),function(t,e){var n=Ot.innerParams.get(t),o=j();n&&e.icon===n.icon?(Ht(o,e),It(o,e)):e.icon||e.iconHtml?e.icon&&-1===Object.keys(P).indexOf(e.icon)?(w('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"')),ct(o)):(lt(o),Ht(o,e),It(o,e),at(o,e.showClass.icon)):ct(o)}(t,e),function(t,e){var n=D();if(!e.imageUrl)return ct(n);lt(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),st(n,"width",e.imageWidth),st(n,"height",e.imageHeight),n.className=B.image,G(n,e,"image")}(0,e),function(t,e){var n=L();dt(n,e.title||e.titleText,"block"),e.title&&vt(e.title,n),e.titleText&&(n.innerText=e.titleText),G(n,e,"title")}(0,e),function(t,e){var n=Z();Q(n,e.closeButtonHtml),G(n,e,"closeButton"),dt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)}(0,e)},Zt=function(t,e){t.className="".concat(B.popup," ").concat(pt(t)?e.showClass.popup:""),e.toast?(at([document.documentElement,document.body],B["toast-shown"]),at(t,B.toast)):at(t,B.modal),G(t,e,"popup"),"string"==typeof e.customClass&&at(t,e.customClass),e.icon&&at(t,B["icon-".concat(e.icon)])},$t=function(t,e){!function(t,e){var n=O(),o=T();e.toast?(st(n,"width",e.width),o.style.width="100%"):st(o,"width",e.width),st(o,"padding",e.padding),e.background&&(o.style.background=e.background),ct(I()),Zt(o,e)}(0,e),Pt(0,e),Yt(t,e),Mt(t,e),At(0,e),function(t,e){var n=U();dt(n,e.footer),e.footer&&vt(e.footer,n),G(n,e,"footer")}(0,e),"function"==typeof e.didRender?e.didRender(T()):"function"==typeof e.onRender&&e.onRender(T())},Wt=function(){return N()&&N().click()},Kt=function(t){var e=T();e||Nn.fire(),e=T();var n=F(),o=V();!t&&pt(N())&&(t=N()),lt(n),t&&(ct(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),at([e,n],B.loading),lt(o),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},Xt={},Qt=function(t){return new Promise((function(e){if(!t)return e();var n=window.scrollX,o=window.scrollY;Xt.restoreFocusTimeout=setTimeout((function(){Xt.previousActiveElement&&Xt.previousActiveElement.focus?(Xt.previousActiveElement.focus(),Xt.previousActiveElement=null):document.body&&document.body.focus(),e()}),100),void 0!==n&&void 0!==o&&window.scrollTo(n,o)}))},Jt=function(){if(Xt.timeout)return function(){var t=Y(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";var n=parseInt(window.getComputedStyle(t).width),o=parseInt(e/n*100);t.style.removeProperty("transition"),t.style.width="".concat(o,"%")}(),Xt.timeout.stop()},Gt=function(){if(Xt.timeout){var t=Xt.timeout.start();return wt(t),t}},te=!1,ee={},ne=function(t){for(var e=t.target;e&&e!==document;e=e.parentNode)for(var n in ee){var o=e.getAttribute(n);if(o)return void ee[n].fire({template:o})}},oe={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,willOpen:void 0,didOpen:void 0,onRender:void 0,didRender:void 0,onClose:void 0,onAfterClose:void 0,willClose:void 0,didClose:void 0,onDestroy:void 0,didDestroy:void 0,scrollbarPadding:!0},ae=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","onAfterClose","onClose","onDestroy","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],re={animation:'showClass" and "hideClass',onBeforeOpen:"willOpen",onOpen:"didOpen",onRender:"didRender",onClose:"willClose",onAfterClose:"didClose",onDestroy:"didDestroy"},ie=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],se=function(t){return Object.prototype.hasOwnProperty.call(oe,t)},le=function(t){return re[t]},ce=function(t){se(t)||f('Unknown parameter "'.concat(t,'"'))},ue=function(t){-1!==ie.indexOf(t)&&f('The parameter "'.concat(t,'" is incompatible with toasts'))},de=function(t){le(t)&&g(t,le(t))},pe=function(t){for(var e in t)ce(e),t.toast&&ue(e),de(e)},me=Object.freeze({isValidParameter:se,isUpdatableParameter:function(t){return-1!==ae.indexOf(t)},isDeprecatedParameter:le,argsToParams:function(e){var n={};return"object"!==t(e[0])||C(e[0])?["title","html","icon"].forEach((function(o,a){var r=e[a];"string"==typeof r||C(r)?n[o]=r:void 0!==r&&w("Unexpected type of ".concat(o,'! Expected "string" or "Element", got ').concat(t(r)))})):a(n,e[0]),n},isVisible:function(){return pt(T())},clickConfirm:Wt,clickDeny:function(){return H()&&H().click()},clickCancel:function(){return R()&&R().click()},getContainer:O,getPopup:T,getTitle:L,getContent:z,getHtmlContainer:q,getImage:D,getIcon:j,getInputLabel:function(){return E(B["input-label"])},getCloseButton:Z,getActions:F,getConfirmButton:N,getDenyButton:H,getCancelButton:R,getLoader:V,getHeader:_,getFooter:U,getTimerProgressBar:Y,getFocusableElements:$,getValidationMessage:I,isLoading:function(){return T().hasAttribute("data-loading")},fire:function(){for(var t=this,e=arguments.length,n=new Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:"data-swal-template";ee[t]=this,te||(document.body.addEventListener("click",ne),te=!0)}});function fe(){if(Ot.innerParams.get(this)){var t=Ot.domCache.get(this);ct(t.loader);var e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?lt(e[0],"inline-block"):pt(N())||pt(H())||pt(R())||ct(t.actions),rt([t.popup,t.actions],B.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}var we=function(){null===X.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(X.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(X.previousBodyPadding+function(){var t=document.createElement("div");t.className=B["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))},he=function(){navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||T().scrollHeight>window.innerHeight-44&&(O().style.paddingBottom="".concat(44,"px"))},ge=function(){var t,e=O();e.ontouchstart=function(e){t=be(e)},e.ontouchmove=function(e){t&&(e.preventDefault(),e.stopPropagation())}},be=function(t){var e=t.target,n=O();return!(ye(t)||ve(t)||e!==n&&(mt(n)||"INPUT"===e.tagName||mt(z())&&z().contains(e)))},ye=function(t){return t.touches&&t.touches.length&&"stylus"===t.touches[0].touchType},ve=function(t){return t.touches&&t.touches.length>1},ke=function(){return!!window.MSInputMethodContext&&!!document.documentMode},xe=function(){var t=O(),e=T();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")},Ce={swalPromiseResolve:new WeakMap};function Ae(t,e,n,o){K()?Te(t,o):(Qt(n).then((function(){return Te(t,o)})),Xt.keydownTarget.removeEventListener("keydown",Xt.keydownHandler,{capture:Xt.keydownListenerCapture}),Xt.keydownHandlerAdded=!1),e.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&e.parentNode.removeChild(e),W()&&(null!==X.previousBodyPadding&&(document.body.style.paddingRight="".concat(X.previousBodyPadding,"px"),X.previousBodyPadding=null),function(){if(J(document.body,B.iosfix)){var t=parseInt(document.body.style.top,10);rt(document.body,B.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}}(),"undefined"!=typeof window&&ke()&&window.removeEventListener("resize",xe),m(document.body.children).forEach((function(t){t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-previous-aria-hidden")),t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")}))),rt([document.documentElement,document.body],[B.shown,B["height-auto"],B["no-backdrop"],B["toast-shown"]])}function Be(t){var e=T();if(e){t=Pe(t);var n=Ot.innerParams.get(this);if(n&&!J(e,n.hideClass.popup)){var o=Ce.swalPromiseResolve.get(this);rt(e,n.showClass.popup),at(e,n.hideClass.popup);var a=O();rt(a,n.showClass.backdrop),at(a,n.hideClass.backdrop),Oe(this,e,n),o(t)}}}var Pe=function(t){return void 0===t?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:a({isConfirmed:!1,isDenied:!1,isDismissed:!1},t)},Oe=function(t,e,n){var o=O(),a=Ct&&ft(e),r=n.onClose,i=n.onAfterClose,s=n.willClose,l=n.didClose;Se(e,s,r),a?Ee(t,e,o,n.returnFocus,l||i):Ae(t,o,n.returnFocus,l||i)},Se=function(t,e,n){null!==e&&"function"==typeof e?e(t):null!==n&&"function"==typeof n&&n(t)},Ee=function(t,e,n,o,a){Xt.swalCloseEventFinishedCallback=Ae.bind(null,t,n,o,a),e.addEventListener(Ct,(function(t){t.target===e&&(Xt.swalCloseEventFinishedCallback(),delete Xt.swalCloseEventFinishedCallback)}))},Te=function(t,e){setTimeout((function(){"function"==typeof e&&e(),t._destroy()}))};function je(t,e,n){var o=Ot.domCache.get(t);e.forEach((function(t){o[t].disabled=n}))}function Le(t,e){if(!t)return!1;if("radio"===t.type)for(var n=t.parentNode.parentNode.querySelectorAll("input"),o=0;o")),yt(t)}var Me,Ie=["swal-title","swal-html","swal-footer"],Ne=function(e){var n={};return m(e.querySelectorAll("swal-param")).forEach((function(e){Ye(e,["name","value"]);var o=e.getAttribute("name"),a=e.getAttribute("value");"boolean"==typeof oe[o]&&"false"===a&&(a=!1),"object"===t(oe[o])&&(a=JSON.parse(a)),n[o]=a})),n},He=function(t){var e={};return m(t.querySelectorAll("swal-button")).forEach((function(t){Ye(t,["type","color","aria-label"]);var n=t.getAttribute("type");e["".concat(n,"ButtonText")]=t.innerHTML,e["show".concat(d(n),"Button")]=!0,t.hasAttribute("color")&&(e["".concat(n,"ButtonColor")]=t.getAttribute("color")),t.hasAttribute("aria-label")&&(e["".concat(n,"ButtonAriaLabel")]=t.getAttribute("aria-label"))})),e},Ve=function(t){var e={},n=t.querySelector("swal-image");return n&&(Ye(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt"))),e},Re=function(t){var e={},n=t.querySelector("swal-icon");return n&&(Ye(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},Fe=function(t){var e={},n=t.querySelector("swal-input");n&&(Ye(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));var o=t.querySelectorAll("swal-input-option");return o.length&&(e.inputOptions={},m(o).forEach((function(t){Ye(t,["value"]);var n=t.getAttribute("value"),o=t.innerHTML;e.inputOptions[n]=o}))),e},_e=function(t,e){var n={};for(var o in e){var a=e[o],r=t.querySelector(a);r&&(Ye(r,[]),n[a.replace(/^swal-/,"")]=r.innerHTML.trim())}return n},Ue=function(t){var e=Ie.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);m(t.querySelectorAll("*")).forEach((function(n){if(n.parentNode===t){var o=n.tagName.toLowerCase();-1===e.indexOf(o)&&f("Unrecognized element <".concat(o,">"))}}))},Ye=function(t,e){m(t.attributes).forEach((function(n){-1===e.indexOf(n.name)&&f(['Unrecognized attribute "'.concat(n.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(e.length?"Allowed attributes are: ".concat(e.join(", ")):"To set the value, use HTML within the element.")])}))},Ze=function(t){var e=O(),n=T();"function"==typeof t.willOpen?t.willOpen(n):"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n);var o=window.getComputedStyle(document.body).overflowY;Qe(e,n,t),setTimeout((function(){Ke(e,n)}),10),W()&&(Xe(e,t.scrollbarPadding,o),m(document.body.children).forEach((function(t){t===O()||function(t,e){if("function"==typeof t.contains)return t.contains(e)}(t,O())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))}))),K()||Xt.previousActiveElement||(Xt.previousActiveElement=document.activeElement),$e(n,t),rt(e,B["no-transition"])},$e=function(t,e){"function"==typeof e.didOpen?setTimeout((function(){return e.didOpen(t)})):"function"==typeof e.onOpen&&setTimeout((function(){return e.onOpen(t)}))},We=function t(e){var n=T();if(e.target===n){var o=O();n.removeEventListener(Ct,t),o.style.overflowY="auto"}},Ke=function(t,e){Ct&&ft(e)?(t.style.overflowY="hidden",e.addEventListener(Ct,We)):t.style.overflowY="auto"},Xe=function(t,e,n){!function(){if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!J(document.body,B.iosfix)){var t=document.body.scrollTop;document.body.style.top="".concat(-1*t,"px"),at(document.body,B.iosfix),ge(),he()}}(),"undefined"!=typeof window&&ke()&&(xe(),window.addEventListener("resize",xe)),e&&"hidden"!==n&&we(),setTimeout((function(){t.scrollTop=0}))},Qe=function(t,e,n){at(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),lt(e),setTimeout((function(){at(e,n.showClass.popup),e.style.removeProperty("opacity")}),10),at([document.documentElement,document.body],B.shown),n.heightAuto&&n.backdrop&&!n.toast&&at([document.documentElement,document.body],B["height-auto"])},Je=function(t){return t.checked?1:0},Ge=function(t){return t.checked?t.value:null},tn=function(t){return t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null},en=function(e,n){var o=z(),a=function(t){return on[n.input](o,an(t),n)};y(n.inputOptions)||k(n.inputOptions)?(Kt(N()),v(n.inputOptions).then((function(t){e.hideLoading(),a(t)}))):"object"===t(n.inputOptions)?a(n.inputOptions):w("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(t(n.inputOptions)))},nn=function(t,e){var n=t.getInput();ct(n),v(e.inputValue).then((function(o){n.value="number"===e.input?parseFloat(o)||0:"".concat(o),lt(n),n.focus(),t.hideLoading()})).catch((function(e){w("Error in inputValue promise: ".concat(e)),n.value="",lt(n),n.focus(),t.hideLoading()}))},on={select:function(t,e,n){var o=it(t,B.select),a=function(t,e,o){var a=document.createElement("option");a.value=o,Q(a,e),a.selected=rn(o,n.inputValue),t.appendChild(a)};e.forEach((function(t){var e=t[0],n=t[1];if(Array.isArray(n)){var r=document.createElement("optgroup");r.label=e,r.disabled=!1,o.appendChild(r),n.forEach((function(t){return a(r,t[1],t[0])}))}else a(o,n,e)})),o.focus()},radio:function(t,e,n){var o=it(t,B.radio);e.forEach((function(t){var e=t[0],a=t[1],r=document.createElement("input"),i=document.createElement("label");r.type="radio",r.name=B.radio,r.value=e,rn(e,n.inputValue)&&(r.checked=!0);var s=document.createElement("span");Q(s,a),s.className=B.label,i.appendChild(r),i.appendChild(s),o.appendChild(i)}));var a=o.querySelectorAll("input");a.length&&a[0].focus()}},an=function e(n){var o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((function(n,a){var r=n;"object"===t(r)&&(r=e(r)),o.push([a,r])})):Object.keys(n).forEach((function(a){var r=n[a];"object"===t(r)&&(r=e(r)),o.push([a,r])})),o},rn=function(t,e){return e&&e.toString()===t.toString()},sn=function(t,e,n){var o=function(t,e){var n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Je(n);case"radio":return Ge(n);case"file":return tn(n);default:return e.inputAutoTrim?n.value.trim():n.value}}(t,e);e.inputValidator?ln(t,e,o):t.getInput().checkValidity()?"deny"===n?cn(t,e,o):dn(t,e,o):(t.enableButtons(),t.showValidationMessage(e.validationMessage))},ln=function(t,e,n){t.disableInput(),Promise.resolve().then((function(){return v(e.inputValidator(n,e.validationMessage))})).then((function(o){t.enableButtons(),t.enableInput(),o?t.showValidationMessage(o):dn(t,e,n)}))},cn=function(t,e,n){e.showLoaderOnDeny&&Kt(H()),e.preDeny?Promise.resolve().then((function(){return v(e.preDeny(n,e.validationMessage))})).then((function(e){!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})):t.closePopup({isDenied:!0,value:n})},un=function(t,e){t.closePopup({isConfirmed:!0,value:e})},dn=function(t,e,n){e.showLoaderOnConfirm&&Kt(),e.preConfirm?(t.resetValidationMessage(),Promise.resolve().then((function(){return v(e.preConfirm(n,e.validationMessage))})).then((function(e){pt(I())||!1===e?t.hideLoading():un(t,void 0===e?n:e)}))):un(t,n)},pn=function(t,e,n){var o=$();if(o.length)return(e+=n)===o.length?e=0:-1===e&&(e=o.length-1),o[e].focus();T().focus()},mn=["ArrowRight","ArrowDown","Right","Down"],fn=["ArrowLeft","ArrowUp","Left","Up"],wn=["Escape","Esc"],hn=function(t,e,n){var o=Ot.innerParams.get(t);o&&(o.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?gn(t,e,o):"Tab"===e.key?bn(e,o):-1!==[].concat(mn,fn).indexOf(e.key)?yn(e.key):-1!==wn.indexOf(e.key)&&vn(e,o,n))},gn=function(t,e,n){if(!e.isComposing&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(n.input))return;Wt(),e.preventDefault()}},bn=function(t,e){for(var n=t.target,o=$(),a=-1,r=0;r1&&void 0!==arguments[1]?arguments[1]:{};pe(a({},e,t)),Xt.currentInstance&&Xt.currentInstance._destroy(),Xt.currentInstance=this;var n=Pn(t,e);De(n),Object.freeze(n),Xt.timeout&&(Xt.timeout.stop(),delete Xt.timeout),clearTimeout(Xt.restoreFocusTimeout);var o=Sn(this);return $t(this,n),Ot.innerParams.set(this,n),On(this,o,n)},update:function(t){var e=T(),n=Ot.innerParams.get(this);if(!e||J(e,n.hideClass.popup))return f("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.");var o={};Object.keys(t).forEach((function(e){Nn.isUpdatableParameter(e)?o[e]=t[e]:f('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}));var r=a({},n,o);$t(this,r),Ot.innerParams.set(this,r),Object.defineProperties(this,{params:{value:a({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var t=Ot.domCache.get(this),e=Ot.innerParams.get(this);e&&(t.popup&&Xt.swalCloseEventFinishedCallback&&(Xt.swalCloseEventFinishedCallback(),delete Xt.swalCloseEventFinishedCallback),Xt.deferDisposalTimer&&(clearTimeout(Xt.deferDisposalTimer),delete Xt.deferDisposalTimer),zn(e),qn(this))}}),In=function(){function t(){if(e(this,t),"undefined"!=typeof window){"undefined"==typeof Promise&&w("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),Me=this;for(var n=arguments.length,o=new Array(n),a=0;a:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-no-transition{transition:none!important}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:5px;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center;padding:0 1.8em}.swal2-title{position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#2778c4;color:#fff;font-size:1em}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#d14529;color:#fff;font-size:1em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#757575;color:#fff;font-size:1em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;align-items:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0 1.6em;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto}.swal2-validation-message{align-items:center;justify-content:center;margin:0 -2.7em;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}')},,function(t,e,n){"use strict";n.r(e);var o=n(2),a=n(1),r=n.n(a),i=n(0),s=n.n(i),l=n(3),c=n.n(l);s.a.initializers.add("justoverclock/flarum-ext-newsletter",(function(){Object(o.extend)(r.a.prototype,"navItems",(function(t){s.a.current.matches(r.a)&&t.add("Newsletter",m("div",{className:"alignews"},m("h1",{id:"titleNl"},["News",m("span",".letter")]),m("p",{className:"descNl"},s.a.translator.trans("flarum-ext-newsletter.forum.subscribe")),m("form",{id:"subscribeForm"},[m("input",{className:"fieldinp",id:"email-input",type:"email",placeholder:"Subscribe to Flarum"}),m("button",{className:"subscbutt",type:"submit"},s.a.translator.trans("flarum-ext-newsletter.forum.submitbutton"))])),-100)}))})),Object(o.extend)(r.a.prototype,"oncreate",(function(){jQuery((function(){var t,e,n,o,a,r=s.a.forum.attribute("PubAccount"),i=s.a.forum.attribute("ListName");t=r,e=i,n="subscribeForm",o=function(){c.a.fire("Thank You!","You are now subscribed to our Newsletter!","success"),document.getElementById("subscribeForm").reset()},a=jQuery("#email-input"),jQuery("#"+n).submit((function(n){n.preventDefault(),jQuery.post("https://api.elasticemail.com/contact/add?version=2",{email:a.val(),publicAccountId:t,listName:e},(function(){}),"json").done((function(t){!0===t.success&&o()})).fail((function(){}))}))}))}))}]); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index 88d7cd6..8946e7b 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@justoverclock/flarum-ext-newsletter/webpack/bootstrap","webpack://@justoverclock/flarum-ext-newsletter/./forum.js","webpack://@justoverclock/flarum-ext-newsletter/./node_modules/sweetalert2/dist/sweetalert2.all.js","webpack://@justoverclock/flarum-ext-newsletter/./src/forum/index.js","webpack://@justoverclock/flarum-ext-newsletter/external \"flarum.core.compat['app']\"","webpack://@justoverclock/flarum-ext-newsletter/external \"flarum.core.compat['extend']\"","webpack://@justoverclock/flarum-ext-newsletter/external \"flarum.core.compat['forum/components/IndexPage']\""],"names":["app","initializers","add","extend","IndexPage","prototype","navItems","current","matches","m","className","id","translator","trans","type","placeholder","SetupNewsletterSubscribe","publicAccountId","listName","formId","onSuccess","eeUrl","email","jQuery","form","submit","event","preventDefault","post","val","done","result","success","fail","pubAcc","forum","attribute","listmail","Swal","fire","document","getElementById","reset"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA;AAAA;AAAA,wC;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA,EAAE,KAA4D;AAC9D,EAAE,SACyD;AAC3D,CAAC,oBAAoB;;AAErB;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kFAAkF;AAClF;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB;;AAElB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC;AAChC,KAAK;AACL,kCAAkC;AAClC,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,sCAAsC;AACtC,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,aAAa;AAClC;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA;AACA,KAAK;;;AAGL,iDAAiD;;AAEjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;;AAGL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4EAA4E;;AAE5E;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,sEAAsE;;AAEtE,wFAAwF;AACxF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,4CAA4C;;AAE5C,qDAAqD;;AAErD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;;AAEhE,uDAAuD;;AAEvD;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,OAAO;;;AAGP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA,KAAK;AACL;;AAEA;AACA,mBAAmB,6BAA6B;AAChD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA,6DAA6D;;AAE7D;AACA;AACA,mCAAmC;AACnC,KAAK;AACL;AACA,mCAAmC;AACnC,KAAK;AACL;AACA;;AAEA,kCAAkC;;AAElC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;;AAGL;AACA;;AAEA;AACA;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAe;;AAEf;AACA,8BAA8B;;AAE9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2CAA2C;;AAE3C,2BAA2B;;AAE3B,sCAAsC;;AAEtC;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA,mBAAmB,6BAA6B;AAChD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,2IAA2I,kBAAkB;AAC7J;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB;;AAEpB;AACA,+CAA+C;;AAE/C;AACA,6DAA6D;;AAE7D;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,eAAe;AACf;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;;AAGL;AACA;;AAEA;AACA,6BAA6B;;AAE7B,+CAA+C;;AAE/C,0CAA0C;;AAE1C,iCAAiC;;AAEjC,kCAAkC;;AAElC,kCAAkC;;AAElC;AACA;;AAEA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;;;AAGL,0DAA0D;;AAE1D;AACA;AACA;;AAEA,iCAAiC;;AAEjC;AACA;;AAEA;AACA,6DAA6D;AAC7D;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;;;AAGL;;AAEA;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL,kCAAkC;AAClC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,uEAAuE,aAAa;AACpF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,YAAY,iBAAiB,oBAAoB,0DAA0D;AAC3G,YAAY,gBAAgB,oBAAoB,yDAAyD;AACzG;AACA;AACA,oCAAoC,wCAAwC;AAC5E,YAAY,iBAAiB;AAC7B,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yGAAyG;AACzG;AACA,OAAO;;AAEP;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,yBAAyB;;AAEhC;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,mBAAmB;AACxC;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,GAAG;;AAEH;AACA;AACA,6DAA6D,KAAK;AAClE,KAAK;AACL;AACA;AACA,wDAAwD,MAAM,QAAQ,KAAK;AAC3E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;;;AAGA;AACA,sCAAsC;;AAEtC;AACA;AACA,KAAK;AACL;AACA;AACA;;;AAGA;AACA,wCAAwC;;AAExC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,uDAAuD;;AAEvD;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL,iCAAiC;AACjC;;AAEA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,OAAO,EAAE;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;;AAGL;AACA;AACA,KAAK;AACL;;AAEA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C;AACA,KAAK,sBAAsB;;AAE3B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,IAAI;;AAEJ;AACA,mDAAmD;;AAEnD;AACA,gCAAgC;;AAEhC;AACA,kBAAkB;AAClB,OAAO;AACP;AACA;;AAEA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,aAAa;AACb;;AAEA;AACA;AACA,KAAK;;;AAGL;AACA,4CAA4C;AAC5C,KAAK;AACL,gCAAgC;AAChC,KAAK;AACL,0BAA0B;AAC1B,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe;AACf;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,8BAA8B;AACjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,qCAAqC;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,4BAA4B,0DAA0D;;;AAGtF,kCAAkC;AAClC,kCAAkC,6CAA6C;;AAE/E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC;;AAElC;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;;AAEL,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA,aAAa;AACb,KAAK;;;AAGL;AACA;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA,2BAA2B;;AAE3B;AACA,qCAAqC;;AAErC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;;AAGP;AACA;AACA;;AAEA;;AAEA,yEAAyE,aAAa;AACtF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;;AAEA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,GAAG,GAAG;;;AAGN,kDAAkD;;;AAGlD,sCAAs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UC,SAAV,CAAoB,UAApB,CAAjB;AACApB,4BAAwB,CAACkB,MAAD,EAASG,QAAT,EAAmB,eAAnB,EAAoC,YAAY;AACtE;AACAC,wDAAI,CAACC,IAAL,CACE,YADF,EAEE,2CAFF,EAGE,SAHF;AAKAC,cAAQ,CAACC,cAAT,CAAwB,eAAxB,EAAyCC,KAAzC;AACD,KARuB,CAAxB;AASD,GAZK,CAAN;AAaD,CAzCK,CAAN,C;;;;;;;;;;;ACjCA,2C;;;;;;;;;;;ACAA,8C;;;;;;;;;;;ACAA,kE","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./forum.js\");\n","export * from './src/forum';\n","/*!\n* sweetalert2 v10.16.7\n* Released under the MIT License.\n*/\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.Sweetalert2 = factory());\n}(this, function () { 'use strict';\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n\n function _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n }\n\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n }\n\n function _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n }\n\n function _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n }\n\n function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n }\n\n function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n }\n\n var consolePrefix = 'SweetAlert2:';\n /**\n * Filter the unique values into a new array\n * @param arr\n */\n\n var uniqueArray = function uniqueArray(arr) {\n var result = [];\n\n for (var 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 * @param str\n */\n\n var capitalizeFirstLetter = function capitalizeFirstLetter(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n };\n /**\n * Returns the array of object values (Object.values isn't supported in IE11)\n * @param obj\n */\n\n var objectValues = function objectValues(obj) {\n return Object.keys(obj).map(function (key) {\n return obj[key];\n });\n };\n /**\n * Convert NodeList to Array\n * @param nodeList\n */\n\n var toArray = function toArray(nodeList) {\n return Array.prototype.slice.call(nodeList);\n };\n /**\n * Standardise console warnings\n * @param message\n */\n\n var warn = function warn(message) {\n console.warn(\"\".concat(consolePrefix, \" \").concat(_typeof(message) === 'object' ? message.join(' ') : message));\n };\n /**\n * Standardise console errors\n * @param message\n */\n\n var error = function error(message) {\n console.error(\"\".concat(consolePrefix, \" \").concat(message));\n };\n /**\n * Private global state for `warnOnce`\n * @type {Array}\n * @private\n */\n\n var previousWarnOnceMessages = [];\n /**\n * Show a console warning, but only if it hasn't already been shown\n * @param message\n */\n\n var warnOnce = function warnOnce(message) {\n if (!(previousWarnOnceMessages.indexOf(message) !== -1)) {\n previousWarnOnceMessages.push(message);\n warn(message);\n }\n };\n /**\n * Show a one-time console warning about deprecated params/methods\n */\n\n var warnAboutDeprecation = function 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 * @param arg\n */\n\n var callIfFunction = function callIfFunction(arg) {\n return typeof arg === 'function' ? arg() : arg;\n };\n var hasToPromiseFn = function hasToPromiseFn(arg) {\n return arg && typeof arg.toPromise === 'function';\n };\n var asPromise = function asPromise(arg) {\n return hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);\n };\n var isPromise = function isPromise(arg) {\n return arg && Promise.resolve(arg) === arg;\n };\n\n var DismissReason = Object.freeze({\n cancel: 'cancel',\n backdrop: 'backdrop',\n close: 'close',\n esc: 'esc',\n timer: 'timer'\n });\n\n var isJqueryElement = function isJqueryElement(elem) {\n return _typeof(elem) === 'object' && elem.jquery;\n };\n\n var isElement = function isElement(elem) {\n return elem instanceof Element || isJqueryElement(elem);\n };\n\n var argsToParams = function argsToParams(args) {\n var params = {};\n\n if (_typeof(args[0]) === 'object' && !isElement(args[0])) {\n _extends(params, args[0]);\n } else {\n ['title', 'html', 'icon'].forEach(function (name, index) {\n var 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 var swalPrefix = 'swal2-';\n var prefix = function prefix(items) {\n var result = {};\n\n for (var i in items) {\n result[items[i]] = swalPrefix + items[i];\n }\n\n return result;\n };\n var swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'header', 'content', 'html-container', 'actions', 'confirm', 'deny', 'cancel', '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']);\n var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);\n\n var getContainer = function getContainer() {\n return document.body.querySelector(\".\".concat(swalClasses.container));\n };\n var elementBySelector = function elementBySelector(selectorString) {\n var container = getContainer();\n return container ? container.querySelector(selectorString) : null;\n };\n\n var elementByClass = function elementByClass(className) {\n return elementBySelector(\".\".concat(className));\n };\n\n var getPopup = function getPopup() {\n return elementByClass(swalClasses.popup);\n };\n var getIcon = function getIcon() {\n return elementByClass(swalClasses.icon);\n };\n var getTitle = function getTitle() {\n return elementByClass(swalClasses.title);\n };\n var getContent = function getContent() {\n return elementByClass(swalClasses.content);\n };\n var getHtmlContainer = function getHtmlContainer() {\n return elementByClass(swalClasses['html-container']);\n };\n var getImage = function getImage() {\n return elementByClass(swalClasses.image);\n };\n var getProgressSteps = function getProgressSteps() {\n return elementByClass(swalClasses['progress-steps']);\n };\n var getValidationMessage = function getValidationMessage() {\n return elementByClass(swalClasses['validation-message']);\n };\n var getConfirmButton = function getConfirmButton() {\n return elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.confirm));\n };\n var getDenyButton = function getDenyButton() {\n return elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.deny));\n };\n var getInputLabel = function getInputLabel() {\n return elementByClass(swalClasses['input-label']);\n };\n var getLoader = function getLoader() {\n return elementBySelector(\".\".concat(swalClasses.loader));\n };\n var getCancelButton = function getCancelButton() {\n return elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.cancel));\n };\n var getActions = function getActions() {\n return elementByClass(swalClasses.actions);\n };\n var getHeader = function getHeader() {\n return elementByClass(swalClasses.header);\n };\n var getFooter = function getFooter() {\n return elementByClass(swalClasses.footer);\n };\n var getTimerProgressBar = function getTimerProgressBar() {\n return elementByClass(swalClasses['timer-progress-bar']);\n };\n var getCloseButton = function getCloseButton() {\n return elementByClass(swalClasses.close);\n }; // https://github.com/jkup/focusable/blob/master/index.js\n\n var 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 var getFocusableElements = function getFocusableElements() {\n var focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])')) // sort according to tabindex\n .sort(function (a, b) {\n a = parseInt(a.getAttribute('tabindex'));\n b = parseInt(b.getAttribute('tabindex'));\n\n if (a > b) {\n return 1;\n } else if (a < b) {\n return -1;\n }\n\n return 0;\n });\n var otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(function (el) {\n return el.getAttribute('tabindex') !== '-1';\n });\n return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(function (el) {\n return isVisible(el);\n });\n };\n var isModal = function isModal() {\n return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']);\n };\n var isToast = function isToast() {\n return document.body.classList.contains(swalClasses['toast-shown']);\n };\n var isLoading = function isLoading() {\n return getPopup().hasAttribute('data-loading');\n };\n\n var states = {\n previousBodyPadding: null\n };\n var setInnerHtml = function setInnerHtml(elem, html) {\n // #1926\n elem.textContent = '';\n\n if (html) {\n var parser = new DOMParser();\n var parsed = parser.parseFromString(html, \"text/html\");\n toArray(parsed.querySelector('head').childNodes).forEach(function (child) {\n elem.appendChild(child);\n });\n toArray(parsed.querySelector('body').childNodes).forEach(function (child) {\n elem.appendChild(child);\n });\n }\n };\n var hasClass = function hasClass(elem, className) {\n if (!className) {\n return false;\n }\n\n var classList = className.split(/\\s+/);\n\n for (var 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 var removeCustomClasses = function removeCustomClasses(elem, params) {\n toArray(elem.classList).forEach(function (className) {\n if (!(objectValues(swalClasses).indexOf(className) !== -1) && !(objectValues(iconTypes).indexOf(className) !== -1) && !(objectValues(params.showClass).indexOf(className) !== -1)) {\n elem.classList.remove(className);\n }\n });\n };\n\n var applyCustomClass = function 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 function getInput(content, inputType) {\n if (!inputType) {\n return null;\n }\n\n switch (inputType) {\n case 'select':\n case 'textarea':\n case 'file':\n return getChildByClass(content, swalClasses[inputType]);\n\n case 'checkbox':\n return content.querySelector(\".\".concat(swalClasses.checkbox, \" input\"));\n\n case 'radio':\n return content.querySelector(\".\".concat(swalClasses.radio, \" input:checked\")) || content.querySelector(\".\".concat(swalClasses.radio, \" input:first-child\"));\n\n case 'range':\n return content.querySelector(\".\".concat(swalClasses.range, \" input\"));\n\n default:\n return getChildByClass(content, swalClasses.input);\n }\n }\n var focusInput = function 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 var val = input.value;\n input.value = '';\n input.value = val;\n }\n };\n var toggleClass = function 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(function (className) {\n if (target.forEach) {\n target.forEach(function (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 var addClass = function addClass(target, classList) {\n toggleClass(target, classList, true);\n };\n var removeClass = function removeClass(target, classList) {\n toggleClass(target, classList, false);\n };\n var getChildByClass = function getChildByClass(elem, className) {\n for (var i = 0; i < elem.childNodes.length; i++) {\n if (hasClass(elem.childNodes[i], className)) {\n return elem.childNodes[i];\n }\n }\n };\n var applyNumericalStyle = function 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 var show = function show(elem) {\n var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex';\n elem.style.display = display;\n };\n var hide = function hide(elem) {\n elem.style.display = 'none';\n };\n var setStyle = function setStyle(parent, selector, property, value) {\n var el = parent.querySelector(selector);\n\n if (el) {\n el.style[property] = value;\n }\n };\n var toggle = function toggle(elem, condition, display) {\n condition ? show(elem, display) : hide(elem);\n }; // borrowed from jquery $(elem).is(':visible') implementation\n\n var isVisible = function isVisible(elem) {\n return !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));\n };\n var allButtonsAreHidden = function allButtonsAreHidden() {\n return !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton());\n };\n var isScrollable = function isScrollable(elem) {\n return !!(elem.scrollHeight > elem.clientHeight);\n }; // borrowed from https://stackoverflow.com/a/46352119\n\n var hasCssAnimation = function hasCssAnimation(elem) {\n var style = window.getComputedStyle(elem);\n var animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');\n var transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');\n return animDuration > 0 || transDuration > 0;\n };\n var contains = function contains(haystack, needle) {\n if (typeof haystack.contains === 'function') {\n return haystack.contains(needle);\n }\n };\n var animateTimerProgressBar = function animateTimerProgressBar(timer) {\n var reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var timerProgressBar = getTimerProgressBar();\n\n if (isVisible(timerProgressBar)) {\n if (reset) {\n timerProgressBar.style.transition = 'none';\n timerProgressBar.style.width = '100%';\n }\n\n setTimeout(function () {\n timerProgressBar.style.transition = \"width \".concat(timer / 1000, \"s linear\");\n timerProgressBar.style.width = '0%';\n }, 10);\n }\n };\n var stopTimerProgressBar = function stopTimerProgressBar() {\n var timerProgressBar = getTimerProgressBar();\n var timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n timerProgressBar.style.removeProperty('transition');\n timerProgressBar.style.width = '100%';\n var timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n var timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100);\n timerProgressBar.style.removeProperty('transition');\n timerProgressBar.style.width = \"\".concat(timerProgressBarPercent, \"%\");\n };\n\n // Detect Node env\n var isNodeEnv = function isNodeEnv() {\n return typeof window === 'undefined' || typeof document === 'undefined';\n };\n\n var sweetHTML = \"\\n
      \\n
      \\n
        \\n
        \\n \\n

        \\n \\n
        \\n
        \\n
        \\n \\n \\n
        \\n \\n \\n
        \\n \\n
        \\n \\n \\n
        \\n
        \\n
        \\n
        \\n \\n \\n \\n
        \\n
        \\n
        \\n
        \\n
        \\n
        \\n\").replace(/(^|\\n)\\s*/g, '');\n\n var resetOldContainer = function resetOldContainer() {\n var oldContainer = getContainer();\n\n if (!oldContainer) {\n return false;\n }\n\n oldContainer.parentNode.removeChild(oldContainer);\n removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);\n return true;\n };\n\n var oldInputVal; // IE11 workaround, see #1109 for details\n\n var resetValidationMessage = function resetValidationMessage(e) {\n if (Swal.isVisible() && oldInputVal !== e.target.value) {\n Swal.resetValidationMessage();\n }\n\n oldInputVal = e.target.value;\n };\n\n var addInputChangeListeners = function addInputChangeListeners() {\n var content = getContent();\n var input = getChildByClass(content, swalClasses.input);\n var file = getChildByClass(content, swalClasses.file);\n var range = content.querySelector(\".\".concat(swalClasses.range, \" input\"));\n var rangeOutput = content.querySelector(\".\".concat(swalClasses.range, \" output\"));\n var select = getChildByClass(content, swalClasses.select);\n var checkbox = content.querySelector(\".\".concat(swalClasses.checkbox, \" input\"));\n var textarea = getChildByClass(content, 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 = function (e) {\n resetValidationMessage(e);\n rangeOutput.value = range.value;\n };\n\n range.onchange = function (e) {\n resetValidationMessage(e);\n range.nextSibling.value = range.value;\n };\n };\n\n var getTarget = function getTarget(target) {\n return typeof target === 'string' ? document.querySelector(target) : target;\n };\n\n var setupAccessibility = function setupAccessibility(params) {\n var 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 var setupRTL = function setupRTL(targetElement) {\n if (window.getComputedStyle(targetElement).direction === 'rtl') {\n addClass(getContainer(), swalClasses.rtl);\n }\n };\n /*\n * Add modal + backdrop to DOM\n */\n\n\n var init = function init(params) {\n // Clean up the old popup container if it exists\n var oldContainerExisted = resetOldContainer();\n /* istanbul ignore if */\n\n if (isNodeEnv()) {\n error('SweetAlert2 requires document to initialize');\n return;\n }\n\n var 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 var targetElement = getTarget(params.target);\n targetElement.appendChild(container);\n setupAccessibility(params);\n setupRTL(targetElement);\n addInputChangeListeners();\n };\n\n var parseHtmlToContainer = function parseHtmlToContainer(param, target) {\n // DOM element\n if (param instanceof HTMLElement) {\n target.appendChild(param); // Object\n } else if (_typeof(param) === 'object') {\n handleObject(param, target); // Plain string\n } else if (param) {\n setInnerHtml(target, param);\n }\n };\n\n var handleObject = function handleObject(param, target) {\n // JQuery element(s)\n if (param.jquery) {\n handleJqueryElem(target, param); // For other objects use their string representation\n } else {\n setInnerHtml(target, param.toString());\n }\n };\n\n var handleJqueryElem = function handleJqueryElem(target, elem) {\n target.textContent = '';\n\n if (0 in elem) {\n for (var 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 var animationEndEvent = function () {\n // Prevent run in Node env\n\n /* istanbul ignore if */\n if (isNodeEnv()) {\n return false;\n }\n\n var testEl = document.createElement('div');\n var transEndEventNames = {\n WebkitAnimation: 'webkitAnimationEnd',\n OAnimation: 'oAnimationEnd oanimationend',\n animation: 'animationend'\n };\n\n for (var 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 // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js\n\n var measureScrollbar = function measureScrollbar() {\n var scrollDiv = document.createElement('div');\n scrollDiv.className = swalClasses['scrollbar-measure'];\n document.body.appendChild(scrollDiv);\n var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n };\n\n var renderActions = function renderActions(instance, params) {\n var actions = getActions();\n var loader = getLoader();\n var confirmButton = getConfirmButton();\n var denyButton = getDenyButton();\n var cancelButton = getCancelButton(); // Actions (buttons) wrapper\n\n if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) {\n hide(actions);\n } // Custom class\n\n\n applyCustomClass(actions, params, 'actions'); // 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 actions.insertBefore(cancelButton, loader);\n actions.insertBefore(denyButton, loader);\n actions.insertBefore(confirmButton, loader);\n } // Loader\n\n\n setInnerHtml(loader, params.loaderHtml);\n applyCustomClass(loader, params, 'loader');\n };\n\n function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) {\n if (!params.buttonsStyling) {\n return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled);\n }\n\n addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors\n\n if (params.confirmButtonColor) {\n confirmButton.style.backgroundColor = params.confirmButtonColor;\n }\n\n if (params.denyButtonColor) {\n denyButton.style.backgroundColor = params.denyButtonColor;\n }\n\n if (params.cancelButtonColor) {\n cancelButton.style.backgroundColor = params.cancelButtonColor;\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 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 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 function handleGrowParam(container, grow) {\n if (grow && typeof grow === 'string') {\n var growClass = \"grow-\".concat(grow);\n\n if (growClass in swalClasses) {\n addClass(container, swalClasses[growClass]);\n }\n }\n }\n\n var renderContainer = function renderContainer(instance, params) {\n var container = getContainer();\n\n if (!container) {\n return;\n }\n\n handleBackdropParam(container, params.backdrop);\n\n if (!params.backdrop && params.allowOutsideClick) {\n warn('\"allowOutsideClick\" parameter requires `backdrop` parameter to be set to `true`');\n }\n\n handlePositionParam(container, params.position);\n handleGrowParam(container, params.grow); // Custom class\n\n applyCustomClass(container, params, 'container'); // Set queue step attribute for getQueueStep() method\n\n var queueStep = document.body.getAttribute('data-swal2-queue-step');\n\n if (queueStep) {\n container.setAttribute('data-queue-step', queueStep);\n document.body.removeAttribute('data-swal2-queue-step');\n }\n };\n\n /**\n * This module containts `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 promise: new WeakMap(),\n innerParams: new WeakMap(),\n domCache: new WeakMap()\n };\n\n var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];\n var renderInput = function renderInput(instance, params) {\n var content = getContent();\n var innerParams = privateProps.innerParams.get(instance);\n var rerender = !innerParams || params.input !== innerParams.input;\n inputTypes.forEach(function (inputType) {\n var inputClass = swalClasses[inputType];\n var inputContainer = getChildByClass(content, inputClass); // set attributes\n\n setAttributes(inputType, params.inputAttributes); // set class\n\n inputContainer.className = 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 var showInput = function showInput(params) {\n if (!renderInputType[params.input]) {\n return error(\"Unexpected type of input! Expected \\\"text\\\", \\\"email\\\", \\\"password\\\", \\\"number\\\", \\\"tel\\\", \\\"select\\\", \\\"radio\\\", \\\"checkbox\\\", \\\"textarea\\\", \\\"file\\\" or \\\"url\\\", got \\\"\".concat(params.input, \"\\\"\"));\n }\n\n var inputContainer = getInputContainer(params.input);\n var input = renderInputType[params.input](inputContainer, params);\n show(input); // input autofocus\n\n setTimeout(function () {\n focusInput(input);\n });\n };\n\n var removeAttributes = function removeAttributes(input) {\n for (var i = 0; i < input.attributes.length; i++) {\n var attrName = input.attributes[i].name;\n\n if (!(['type', 'value', 'style'].indexOf(attrName) !== -1)) {\n input.removeAttribute(attrName);\n }\n }\n };\n\n var setAttributes = function setAttributes(inputType, inputAttributes) {\n var input = getInput(getContent(), inputType);\n\n if (!input) {\n return;\n }\n\n removeAttributes(input);\n\n for (var attr in inputAttributes) {\n // Do not set a placeholder for \n // it'll crash Edge, #1298\n if (inputType === 'range' && attr === 'placeholder') {\n continue;\n }\n\n input.setAttribute(attr, inputAttributes[attr]);\n }\n };\n\n var setCustomClass = function setCustomClass(params) {\n var inputContainer = getInputContainer(params.input);\n\n if (params.customClass) {\n addClass(inputContainer, params.customClass.input);\n }\n };\n\n var setInputPlaceholder = function setInputPlaceholder(input, params) {\n if (!input.placeholder || params.inputPlaceholder) {\n input.placeholder = params.inputPlaceholder;\n }\n };\n\n var setInputLabel = function setInputLabel(input, prependTo, params) {\n if (params.inputLabel) {\n input.id = swalClasses.input;\n var label = document.createElement('label');\n var labelClass = swalClasses['input-label'];\n label.setAttribute('for', input.id);\n label.className = labelClass;\n addClass(label, params.customClass.inputLabel);\n label.innerText = params.inputLabel;\n prependTo.insertAdjacentElement('beforebegin', label);\n }\n };\n\n var getInputContainer = function getInputContainer(inputType) {\n var inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input;\n return getChildByClass(getContent(), inputClass);\n };\n\n var renderInputType = {};\n\n renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = function (input, params) {\n if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') {\n input.value = params.inputValue;\n } else if (!isPromise(params.inputValue)) {\n warn(\"Unexpected type of inputValue! Expected \\\"string\\\", \\\"number\\\" or \\\"Promise\\\", got \\\"\".concat(_typeof(params.inputValue), \"\\\"\"));\n }\n\n setInputLabel(input, input, params);\n setInputPlaceholder(input, params);\n input.type = params.input;\n return input;\n };\n\n renderInputType.file = function (input, params) {\n setInputLabel(input, input, params);\n setInputPlaceholder(input, params);\n return input;\n };\n\n renderInputType.range = function (range, params) {\n var rangeInput = range.querySelector('input');\n var rangeOutput = range.querySelector('output');\n rangeInput.value = params.inputValue;\n rangeInput.type = params.input;\n rangeOutput.value = params.inputValue;\n setInputLabel(rangeInput, range, params);\n return range;\n };\n\n renderInputType.select = function (select, params) {\n select.textContent = '';\n\n if (params.inputPlaceholder) {\n var 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 renderInputType.radio = function (radio) {\n radio.textContent = '';\n return radio;\n };\n\n renderInputType.checkbox = function (checkboxContainer, params) {\n var checkbox = getInput(getContent(), 'checkbox');\n checkbox.value = 1;\n checkbox.id = swalClasses.checkbox;\n checkbox.checked = Boolean(params.inputValue);\n var label = checkboxContainer.querySelector('span');\n setInnerHtml(label, params.inputPlaceholder);\n return checkboxContainer;\n };\n\n renderInputType.textarea = function (textarea, params) {\n textarea.value = params.inputValue;\n setInputPlaceholder(textarea, params);\n setInputLabel(textarea, textarea, params);\n\n var getPadding = function getPadding(el) {\n return parseInt(window.getComputedStyle(el).paddingLeft) + parseInt(window.getComputedStyle(el).paddingRight);\n };\n\n if ('MutationObserver' in window) {\n // #1699\n var initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width);\n\n var outputsize = function outputsize() {\n var contentWidth = textarea.offsetWidth + getPadding(getPopup()) + getPadding(getContent());\n\n if (contentWidth > initialPopupWidth) {\n getPopup().style.width = \"\".concat(contentWidth, \"px\");\n } else {\n getPopup().style.width = null;\n }\n };\n\n new MutationObserver(outputsize).observe(textarea, {\n attributes: true,\n attributeFilter: ['style']\n });\n }\n\n return textarea;\n };\n\n var renderContent = function renderContent(instance, params) {\n var htmlContainer = getHtmlContainer();\n applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML\n\n if (params.html) {\n parseHtmlToContainer(params.html, htmlContainer);\n show(htmlContainer, 'block'); // Content as plain text\n } else if (params.text) {\n htmlContainer.textContent = params.text;\n show(htmlContainer, 'block'); // No content\n } else {\n hide(htmlContainer);\n }\n\n renderInput(instance, params); // Custom class\n\n applyCustomClass(getContent(), params, 'content');\n };\n\n var renderFooter = function renderFooter(instance, params) {\n var 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 var renderCloseButton = function renderCloseButton(instance, params) {\n var 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 var renderIcon = function renderIcon(instance, params) {\n var innerParams = privateProps.innerParams.get(instance);\n var 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 return hide(icon);\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 return hide(icon);\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 var applyStyles = function applyStyles(icon, params) {\n for (var 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 adjustSuccessIconBackgoundColor(); // Custom class\n\n applyCustomClass(icon, params, 'icon');\n }; // Adjust success icon background color to match the popup background color\n\n\n var adjustSuccessIconBackgoundColor = function adjustSuccessIconBackgoundColor() {\n var popup = getPopup();\n var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');\n var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');\n\n for (var i = 0; i < successIconParts.length; i++) {\n successIconParts[i].style.backgroundColor = popupBackgroundColor;\n }\n };\n\n var setContent = function setContent(icon, params) {\n icon.textContent = '';\n\n if (params.iconHtml) {\n setInnerHtml(icon, iconContent(params.iconHtml));\n } else if (params.icon === 'success') {\n setInnerHtml(icon, \"\\n
        \\n \\n
        \\n
        \\n \");\n } else if (params.icon === 'error') {\n setInnerHtml(icon, \"\\n \\n \\n \\n \\n \");\n } else {\n var defaultIconHtml = {\n question: '?',\n warning: '!',\n info: 'i'\n };\n setInnerHtml(icon, iconContent(defaultIconHtml[params.icon]));\n }\n };\n\n var setColor = function 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 (var _i = 0, _arr = ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']; _i < _arr.length; _i++) {\n var sel = _arr[_i];\n setStyle(icon, sel, 'backgroundColor', params.iconColor);\n }\n\n setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor);\n };\n\n var iconContent = function iconContent(content) {\n return \"
        \").concat(content, \"
        \");\n };\n\n var renderImage = function renderImage(instance, params) {\n var image = getImage();\n\n if (!params.imageUrl) {\n return hide(image);\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 var currentSteps = [];\n /*\n * Global function for chaining sweetAlert popups\n */\n\n var queue = function queue(steps) {\n warnAboutDeprecation('Swal.queue()', \"async/await\");\n var Swal = this;\n currentSteps = steps;\n\n var resetAndResolve = function resetAndResolve(resolve, value) {\n currentSteps = [];\n resolve(value);\n };\n\n var queueResult = [];\n return new Promise(function (resolve) {\n (function step(i, callback) {\n if (i < currentSteps.length) {\n document.body.setAttribute('data-swal2-queue-step', i);\n Swal.fire(currentSteps[i]).then(function (result) {\n if (typeof result.value !== 'undefined') {\n queueResult.push(result.value);\n step(i + 1, callback);\n } else {\n resetAndResolve(resolve, {\n dismiss: result.dismiss\n });\n }\n });\n } else {\n resetAndResolve(resolve, {\n value: queueResult\n });\n }\n })(0);\n });\n };\n /*\n * Global function for getting the index of current popup in queue\n */\n\n var getQueueStep = function getQueueStep() {\n return getContainer() && getContainer().getAttribute('data-queue-step');\n };\n /*\n * Global function for inserting a popup to the queue\n */\n\n var insertQueueStep = function insertQueueStep(step, index) {\n if (index && index < currentSteps.length) {\n return currentSteps.splice(index, 0, step);\n }\n\n return currentSteps.push(step);\n };\n /*\n * Global function for deleting a popup from the queue\n */\n\n var deleteQueueStep = function deleteQueueStep(index) {\n if (typeof currentSteps[index] !== 'undefined') {\n currentSteps.splice(index, 1);\n }\n };\n\n var createStepElement = function createStepElement(step) {\n var stepEl = document.createElement('li');\n addClass(stepEl, swalClasses['progress-step']);\n setInnerHtml(stepEl, step);\n return stepEl;\n };\n\n var createLineElement = function createLineElement(params) {\n var lineEl = document.createElement('li');\n addClass(lineEl, swalClasses['progress-step-line']);\n\n if (params.progressStepsDistance) {\n lineEl.style.width = params.progressStepsDistance;\n }\n\n return lineEl;\n };\n\n var renderProgressSteps = function renderProgressSteps(instance, params) {\n var progressStepsContainer = getProgressSteps();\n\n if (!params.progressSteps || params.progressSteps.length === 0) {\n return hide(progressStepsContainer);\n }\n\n show(progressStepsContainer);\n progressStepsContainer.textContent = '';\n var currentProgressStep = parseInt(params.currentProgressStep === undefined ? getQueueStep() : params.currentProgressStep);\n\n if (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(function (step, index) {\n var stepEl = createStepElement(step);\n progressStepsContainer.appendChild(stepEl);\n\n if (index === currentProgressStep) {\n addClass(stepEl, swalClasses['active-progress-step']);\n }\n\n if (index !== params.progressSteps.length - 1) {\n var lineEl = createLineElement(params);\n progressStepsContainer.appendChild(lineEl);\n }\n });\n };\n\n var renderTitle = function renderTitle(instance, params) {\n var 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 var renderHeader = function renderHeader(instance, params) {\n var header = getHeader(); // Custom class\n\n applyCustomClass(header, params, 'header'); // Progress steps\n\n renderProgressSteps(instance, params); // Icon\n\n renderIcon(instance, params); // Image\n\n renderImage(instance, params); // Title\n\n renderTitle(instance, params); // Close button\n\n renderCloseButton(instance, params);\n };\n\n var renderPopup = function renderPopup(instance, params) {\n var container = getContainer();\n var popup = getPopup(); // Width\n\n if (params.toast) {\n // #2170\n applyNumericalStyle(container, 'width', params.width);\n popup.style.width = '100%';\n } else {\n applyNumericalStyle(popup, 'width', params.width);\n } // Padding\n\n\n applyNumericalStyle(popup, 'padding', params.padding); // Background\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 var addClasses = function 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 var render = function render(instance, params) {\n renderPopup(instance, params);\n renderContainer(instance, params);\n renderHeader(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 } else if (typeof params.onRender === 'function') {\n params.onRender(getPopup()); // @deprecated\n }\n };\n\n /*\n * Global function to determine if SweetAlert2 popup is shown\n */\n\n var isVisible$1 = function isVisible$$1() {\n return isVisible(getPopup());\n };\n /*\n * Global function to click 'Confirm' button\n */\n\n var clickConfirm = function clickConfirm() {\n return getConfirmButton() && getConfirmButton().click();\n };\n /*\n * Global function to click 'Deny' button\n */\n\n var clickDeny = function clickDeny() {\n return getDenyButton() && getDenyButton().click();\n };\n /*\n * Global function to click 'Cancel' button\n */\n\n var clickCancel = function clickCancel() {\n return getCancelButton() && getCancelButton().click();\n };\n\n function fire() {\n var Swal = this;\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 _construct(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 var MixinSwal = /*#__PURE__*/function (_this) {\n _inherits(MixinSwal, _this);\n\n var _super = _createSuper(MixinSwal);\n\n function MixinSwal() {\n _classCallCheck(this, MixinSwal);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(MixinSwal, [{\n key: \"_main\",\n value: function _main(params, priorityMixinParams) {\n return _get(_getPrototypeOf(MixinSwal.prototype), \"_main\", this).call(this, params, _extends({}, mixinParams, priorityMixinParams));\n }\n }]);\n\n return MixinSwal;\n }(this);\n\n return MixinSwal;\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 var showLoading = function showLoading(buttonToReplace) {\n var popup = getPopup();\n\n if (!popup) {\n Swal.fire();\n }\n\n popup = getPopup();\n var actions = getActions();\n var 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 show(loader);\n popup.setAttribute('data-loading', true);\n popup.setAttribute('aria-busy', true);\n popup.focus();\n };\n\n var RESTORE_FOCUS_TIMEOUT = 100;\n\n var globalState = {};\n\n var focusPreviousActiveElement = function focusPreviousActiveElement() {\n if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {\n globalState.previousActiveElement.focus();\n globalState.previousActiveElement = null;\n } else if (document.body) {\n document.body.focus();\n }\n }; // Restore previous active (focused) element\n\n\n var restoreActiveElement = function restoreActiveElement(returnFocus) {\n return new Promise(function (resolve) {\n if (!returnFocus) {\n return resolve();\n }\n\n var x = window.scrollX;\n var y = window.scrollY;\n globalState.restoreFocusTimeout = setTimeout(function () {\n focusPreviousActiveElement();\n resolve();\n }, RESTORE_FOCUS_TIMEOUT); // issues/900\n\n if (typeof x !== 'undefined' && typeof y !== 'undefined') {\n // IE doesn't have scrollX/scrollY support\n window.scrollTo(x, y);\n }\n });\n };\n\n /**\n * If `timer` parameter is set, returns number of milliseconds of timer remained.\n * Otherwise, returns undefined.\n */\n\n var getTimerLeft = function 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 var stopTimer = function 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 var resumeTimer = function resumeTimer() {\n if (globalState.timeout) {\n var 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 var toggleTimer = function toggleTimer() {\n var 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 var increaseTimer = function increaseTimer(n) {\n if (globalState.timeout) {\n var 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 var isTimerRunning = function isTimerRunning() {\n return globalState.timeout && globalState.timeout.isRunning();\n };\n\n var bodyClickListenerAdded = false;\n var clickHandlers = {};\n function bindClickHandler() {\n var 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 var bodyClickListener = function bodyClickListener(event) {\n // 1. using .parentNode instead of event.path because of better support by old browsers https://stackoverflow.com/a/39245638\n // 2. using .parentNode instead of .parentElement because of IE11 + SVG https://stackoverflow.com/a/36270354\n for (var el = event.target; el && el !== document; el = el.parentNode) {\n for (var attr in clickHandlers) {\n var template = el.getAttribute(attr);\n\n if (template) {\n clickHandlers[attr].fire({\n template: template\n });\n return;\n }\n }\n }\n };\n\n var 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 animation: true,\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 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: '×',\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 onBeforeOpen: undefined,\n onOpen: undefined,\n willOpen: undefined,\n didOpen: undefined,\n onRender: undefined,\n didRender: undefined,\n onClose: undefined,\n onAfterClose: undefined,\n willClose: undefined,\n didClose: undefined,\n onDestroy: undefined,\n didDestroy: undefined,\n scrollbarPadding: true\n };\n var updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'onAfterClose', 'onClose', 'onDestroy', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose'];\n var deprecatedParams = {\n animation: 'showClass\" and \"hideClass',\n onBeforeOpen: 'willOpen',\n onOpen: 'didOpen',\n onRender: 'didRender',\n onClose: 'willClose',\n onAfterClose: 'didClose',\n onDestroy: 'didDestroy'\n };\n var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture'];\n /**\n * Is valid parameter\n * @param {String} paramName\n */\n\n var isValidParameter = function isValidParameter(paramName) {\n return Object.prototype.hasOwnProperty.call(defaultParams, paramName);\n };\n /**\n * Is valid parameter for Swal.update() method\n * @param {String} paramName\n */\n\n var isUpdatableParameter = function isUpdatableParameter(paramName) {\n return updatableParams.indexOf(paramName) !== -1;\n };\n /**\n * Is deprecated parameter\n * @param {String} paramName\n */\n\n var isDeprecatedParameter = function isDeprecatedParameter(paramName) {\n return deprecatedParams[paramName];\n };\n\n var checkIfParamIsValid = function checkIfParamIsValid(param) {\n if (!isValidParameter(param)) {\n warn(\"Unknown parameter \\\"\".concat(param, \"\\\"\"));\n }\n };\n\n var checkIfToastParamIsValid = function checkIfToastParamIsValid(param) {\n if (toastIncompatibleParams.indexOf(param) !== -1) {\n warn(\"The parameter \\\"\".concat(param, \"\\\" is incompatible with toasts\"));\n }\n };\n\n var checkIfParamIsDeprecated = function checkIfParamIsDeprecated(param) {\n if (isDeprecatedParameter(param)) {\n warnAboutDeprecation(param, isDeprecatedParameter(param));\n }\n };\n /**\n * Show relevant warnings for given params\n *\n * @param params\n */\n\n\n var showWarningsForParams = function showWarningsForParams(params) {\n for (var param in params) {\n checkIfParamIsValid(param);\n\n if (params.toast) {\n checkIfToastParamIsValid(param);\n }\n\n checkIfParamIsDeprecated(param);\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 getContent: getContent,\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 getHeader: getHeader,\n getFooter: getFooter,\n getTimerProgressBar: getTimerProgressBar,\n getFocusableElements: getFocusableElements,\n getValidationMessage: getValidationMessage,\n isLoading: isLoading,\n fire: fire,\n mixin: mixin,\n queue: queue,\n getQueueStep: getQueueStep,\n insertQueueStep: insertQueueStep,\n deleteQueueStep: deleteQueueStep,\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 /**\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 var innerParams = privateProps.innerParams.get(this);\n\n if (!innerParams) {\n return;\n }\n\n var domCache = privateProps.domCache.get(this);\n hide(domCache.loader);\n var 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 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 function getInput$1(instance) {\n var innerParams = privateProps.innerParams.get(instance || this);\n var domCache = privateProps.domCache.get(instance || this);\n\n if (!domCache) {\n return null;\n }\n\n return getInput(domCache.content, innerParams.input);\n }\n\n var fixScrollbar = function 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 var undoScrollbar = function undoScrollbar() {\n if (states.previousBodyPadding !== null) {\n document.body.style.paddingRight = \"\".concat(states.previousBodyPadding, \"px\");\n states.previousBodyPadding = null;\n }\n };\n\n /* istanbul ignore file */\n\n var iOSfix = function iOSfix() {\n var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;\n\n if (iOS && !hasClass(document.body, swalClasses.iosfix)) {\n var offset = document.body.scrollTop;\n document.body.style.top = \"\".concat(offset * -1, \"px\");\n addClass(document.body, swalClasses.iosfix);\n lockBodyScroll();\n addBottomPaddingForTallPopups(); // #1948\n }\n };\n\n var addBottomPaddingForTallPopups = function addBottomPaddingForTallPopups() {\n var safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i);\n\n if (safari) {\n var bottomPanelHeight = 44;\n\n if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) {\n getContainer().style.paddingBottom = \"\".concat(bottomPanelHeight, \"px\");\n }\n }\n };\n\n var lockBodyScroll = function lockBodyScroll() {\n // #1246\n var container = getContainer();\n var preventTouchMove;\n\n container.ontouchstart = function (e) {\n preventTouchMove = shouldPreventTouchMove(e);\n };\n\n container.ontouchmove = function (e) {\n if (preventTouchMove) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n };\n\n var shouldPreventTouchMove = function shouldPreventTouchMove(event) {\n var target = event.target;\n var container = getContainer();\n\n if (isStylys(event) || isZoom(event)) {\n return false;\n }\n\n if (target === container) {\n return true;\n }\n\n if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603\n !(isScrollable(getContent()) && // #1944\n getContent().contains(target))) {\n return true;\n }\n\n return false;\n };\n\n var isStylys = function isStylys(event) {\n // #1786\n return event.touches && event.touches.length && event.touches[0].touchType === 'stylus';\n };\n\n var isZoom = function isZoom(event) {\n // #1891\n return event.touches && event.touches.length > 1;\n };\n\n var undoIOSfix = function undoIOSfix() {\n if (hasClass(document.body, swalClasses.iosfix)) {\n var 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 /* istanbul ignore file */\n\n var isIE11 = function isIE11() {\n return !!window.MSInputMethodContext && !!document.documentMode;\n }; // Fix IE11 centering sweetalert2/issues/933\n\n\n var fixVerticalPositionIE = function fixVerticalPositionIE() {\n var container = getContainer();\n var popup = getPopup();\n container.style.removeProperty('align-items');\n\n if (popup.offsetTop < 0) {\n container.style.alignItems = 'flex-start';\n }\n };\n\n var IEfix = function IEfix() {\n if (typeof window !== 'undefined' && isIE11()) {\n fixVerticalPositionIE();\n window.addEventListener('resize', fixVerticalPositionIE);\n }\n };\n var undoIEfix = function undoIEfix() {\n if (typeof window !== 'undefined' && isIE11()) {\n window.removeEventListener('resize', fixVerticalPositionIE);\n }\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 var setAriaHidden = function setAriaHidden() {\n var bodyChildren = toArray(document.body.children);\n bodyChildren.forEach(function (el) {\n if (el === getContainer() || contains(el, 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 var unsetAriaHidden = function unsetAriaHidden() {\n var bodyChildren = toArray(document.body.children);\n bodyChildren.forEach(function (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 /**\n * This module containts `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 };\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(function () {\n return triggerDidCloseAndDispose(instance, didClose);\n });\n globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {\n capture: globalState.keydownListenerCapture\n });\n globalState.keydownHandlerAdded = false;\n }\n\n if (container.parentNode && !document.body.getAttribute('data-swal2-queue-step')) {\n container.parentNode.removeChild(container);\n }\n\n if (isModal()) {\n undoScrollbar();\n undoIOSfix();\n undoIEfix();\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 var popup = getPopup();\n\n if (!popup) {\n return;\n }\n\n resolveValue = prepareResolveValue(resolveValue);\n var innerParams = privateProps.innerParams.get(this);\n\n if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) {\n return;\n }\n\n var swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);\n removeClass(popup, innerParams.showClass.popup);\n addClass(popup, innerParams.hideClass.popup);\n var backdrop = getContainer();\n removeClass(backdrop, innerParams.showClass.backdrop);\n addClass(backdrop, innerParams.hideClass.backdrop);\n handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise\n\n swalPromiseResolve(resolveValue);\n }\n\n var prepareResolveValue = function 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 _extends({\n isConfirmed: false,\n isDenied: false,\n isDismissed: false\n }, resolveValue);\n };\n\n var handlePopupAnimation = function handlePopupAnimation(instance, popup, innerParams) {\n var container = getContainer(); // If animation is supported, animate\n\n var animationIsSupported = animationEndEvent && hasCssAnimation(popup);\n var onClose = innerParams.onClose,\n onAfterClose = innerParams.onAfterClose,\n willClose = innerParams.willClose,\n didClose = innerParams.didClose;\n runDidClose(popup, willClose, onClose);\n\n if (animationIsSupported) {\n animatePopup(instance, popup, container, innerParams.returnFocus, didClose || onAfterClose);\n } else {\n // Otherwise, remove immediately\n removePopupAndResetState(instance, container, innerParams.returnFocus, didClose || onAfterClose);\n }\n };\n\n var runDidClose = function runDidClose(popup, willClose, onClose) {\n if (willClose !== null && typeof willClose === 'function') {\n willClose(popup);\n } else if (onClose !== null && typeof onClose === 'function') {\n onClose(popup); // @deprecated\n }\n };\n\n var animatePopup = function 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 var triggerDidCloseAndDispose = function triggerDidCloseAndDispose(instance, didClose) {\n setTimeout(function () {\n if (typeof didClose === 'function') {\n didClose();\n }\n\n instance._destroy();\n });\n };\n\n function setButtonsDisabled(instance, buttons, disabled) {\n var domCache = privateProps.domCache.get(instance);\n buttons.forEach(function (button) {\n domCache[button].disabled = disabled;\n });\n }\n\n function setInputDisabled(input, disabled) {\n if (!input) {\n return false;\n }\n\n if (input.type === 'radio') {\n var radiosContainer = input.parentNode.parentNode;\n var radios = radiosContainer.querySelectorAll('input');\n\n for (var 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 return setInputDisabled(this.getInput(), false);\n }\n function disableInput() {\n return setInputDisabled(this.getInput(), true);\n }\n\n function showValidationMessage(error) {\n var domCache = privateProps.domCache.get(this);\n var 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 var 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 var domCache = privateProps.domCache.get(this);\n\n if (domCache.validationMessage) {\n hide(domCache.validationMessage);\n }\n\n var 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 var domCache = privateProps.domCache.get(this);\n return domCache.progressSteps;\n }\n\n var Timer = /*#__PURE__*/function () {\n function Timer(callback, delay) {\n _classCallCheck(this, Timer);\n\n this.callback = callback;\n this.remaining = delay;\n this.running = false;\n this.start();\n }\n\n _createClass(Timer, [{\n key: \"start\",\n value: function 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 key: \"stop\",\n value: function stop() {\n if (this.running) {\n this.running = false;\n clearTimeout(this.id);\n this.remaining -= new Date() - this.started;\n }\n\n return this.remaining;\n }\n }, {\n key: \"increase\",\n value: function increase(n) {\n var 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 key: \"getTimerLeft\",\n value: function getTimerLeft() {\n if (this.running) {\n this.stop();\n this.start();\n }\n\n return this.remaining;\n }\n }, {\n key: \"isRunning\",\n value: function isRunning() {\n return this.running;\n }\n }]);\n\n return Timer;\n }();\n\n var defaultInputValidators = {\n email: function 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 url: function 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 function setDefaultInputValidators(params) {\n // Use default `inputValidator` for supported input types if not provided\n if (!params.inputValidator) {\n Object.keys(defaultInputValidators).forEach(function (key) {\n if (params.input === key) {\n params.inputValidator = defaultInputValidators[key];\n }\n });\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 params\n * @returns {boolean}\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 } // params.animation will be actually used in renderPopup.js\n // but in case when params.animation is a function, we need to call that function\n // before popup (re)initialization, so it'll be possible to check Swal.isVisible()\n // inside the params.animation function\n\n\n params.animation = callIfFunction(params.animation);\n validateCustomTargetElement(params); // Replace newlines with
        in title\n\n if (typeof params.title === 'string') {\n params.title = params.title.split('\\n').join('
        ');\n }\n\n init(params);\n }\n\n var swalStringParams = ['swal-title', 'swal-html', 'swal-footer'];\n var getTemplateParams = function getTemplateParams(params) {\n var template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template;\n\n if (!template) {\n return {};\n }\n\n var templateContent = template.content || template; // IE11\n\n showWarningsForElements(templateContent);\n\n var result = _extends(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams));\n\n return result;\n };\n\n var getSwalParams = function getSwalParams(templateContent) {\n var result = {};\n toArray(templateContent.querySelectorAll('swal-param')).forEach(function (param) {\n showWarningsForAttributes(param, ['name', 'value']);\n var paramName = param.getAttribute('name');\n var value = param.getAttribute('value');\n\n if (typeof defaultParams[paramName] === 'boolean' && value === 'false') {\n value = false;\n }\n\n if (_typeof(defaultParams[paramName]) === 'object') {\n value = JSON.parse(value);\n }\n\n result[paramName] = value;\n });\n return result;\n };\n\n var getSwalButtons = function getSwalButtons(templateContent) {\n var result = {};\n toArray(templateContent.querySelectorAll('swal-button')).forEach(function (button) {\n showWarningsForAttributes(button, ['type', 'color', 'aria-label']);\n var 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 var getSwalImage = function getSwalImage(templateContent) {\n var result = {};\n var 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 var getSwalIcon = function getSwalIcon(templateContent) {\n var result = {};\n var icon = templateContent.querySelector('swal-icon');\n\n if (icon) {\n showWarningsForAttributes(icon, ['type', 'color']);\n\n if (icon.hasAttribute('type')) {\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 var getSwalInput = function getSwalInput(templateContent) {\n var result = {};\n var input = templateContent.querySelector('swal-input');\n\n if (input) {\n showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']);\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\n var inputOptions = templateContent.querySelectorAll('swal-input-option');\n\n if (inputOptions.length) {\n result.inputOptions = {};\n toArray(inputOptions).forEach(function (option) {\n showWarningsForAttributes(option, ['value']);\n var optionValue = option.getAttribute('value');\n var optionName = option.innerHTML;\n result.inputOptions[optionValue] = optionName;\n });\n }\n\n return result;\n };\n\n var getSwalStringParams = function getSwalStringParams(templateContent, paramNames) {\n var result = {};\n\n for (var i in paramNames) {\n var paramName = paramNames[i];\n var 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 var showWarningsForElements = function showWarningsForElements(template) {\n var allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']);\n toArray(template.querySelectorAll('*')).forEach(function (el) {\n if (el.parentNode !== template) {\n // can't use template.children because of IE11\n return;\n }\n\n var tagName = el.tagName.toLowerCase();\n\n if (allowedElements.indexOf(tagName) === -1) {\n warn(\"Unrecognized element <\".concat(tagName, \">\"));\n }\n });\n };\n\n var showWarningsForAttributes = function showWarningsForAttributes(el, allowedAttributes) {\n toArray(el.attributes).forEach(function (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 var SHOW_CLASS_TIMEOUT = 10;\n /**\n * Open popup, add necessary classes and styles, fix scrollbar\n *\n * @param params\n */\n\n var openPopup = function openPopup(params) {\n var container = getContainer();\n var popup = getPopup();\n\n if (typeof params.willOpen === 'function') {\n params.willOpen(popup);\n } else if (typeof params.onBeforeOpen === 'function') {\n params.onBeforeOpen(popup); // @deprecated\n }\n\n var bodyStyles = window.getComputedStyle(document.body);\n var initialBodyOverflow = bodyStyles.overflowY;\n addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto'\n\n setTimeout(function () {\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 runDidOpen(popup, params);\n removeClass(container, swalClasses['no-transition']);\n };\n\n var runDidOpen = function runDidOpen(popup, params) {\n if (typeof params.didOpen === 'function') {\n setTimeout(function () {\n return params.didOpen(popup);\n });\n } else if (typeof params.onOpen === 'function') {\n setTimeout(function () {\n return params.onOpen(popup);\n }); // @deprecated\n }\n };\n\n var swalOpenAnimationFinished = function swalOpenAnimationFinished(event) {\n var popup = getPopup();\n\n if (event.target !== popup) {\n return;\n }\n\n var container = getContainer();\n popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);\n container.style.overflowY = 'auto';\n };\n\n var setScrollingVisibility = function 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 var fixScrollContainer = function fixScrollContainer(container, scrollbarPadding, initialBodyOverflow) {\n iOSfix();\n IEfix();\n\n if (scrollbarPadding && initialBodyOverflow !== 'hidden') {\n fixScrollbar();\n } // sweetalert2/issues/1247\n\n\n setTimeout(function () {\n container.scrollTop = 0;\n });\n };\n\n var addClasses$1 = function addClasses(container, popup, params) {\n addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059\n\n popup.style.setProperty('opacity', '0', 'important');\n show(popup);\n setTimeout(function () {\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 handleInputOptionsAndValue = function handleInputOptionsAndValue(instance, params) {\n if (params.input === 'select' || params.input === 'radio') {\n handleInputOptions(instance, params);\n } else if (['text', 'email', 'number', 'tel', 'textarea'].indexOf(params.input) !== -1 && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {\n handleInputValue(instance, params);\n }\n };\n var getInputValue = function getInputValue(instance, innerParams) {\n var 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 var getCheckboxValue = function getCheckboxValue(input) {\n return input.checked ? 1 : 0;\n };\n\n var getRadioValue = function getRadioValue(input) {\n return input.checked ? input.value : null;\n };\n\n var getFileValue = function getFileValue(input) {\n return input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null;\n };\n\n var handleInputOptions = function handleInputOptions(instance, params) {\n var content = getContent();\n\n var processInputOptions = function processInputOptions(inputOptions) {\n return populateInputOptions[params.input](content, formatInputOptions(inputOptions), params);\n };\n\n if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {\n showLoading(getConfirmButton());\n asPromise(params.inputOptions).then(function (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 var handleInputValue = function handleInputValue(instance, params) {\n var input = instance.getInput();\n hide(input);\n asPromise(params.inputValue).then(function (inputValue) {\n input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : \"\".concat(inputValue);\n show(input);\n input.focus();\n instance.hideLoading();\n })[\"catch\"](function (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 var populateInputOptions = {\n select: function select(content, inputOptions, params) {\n var select = getChildByClass(content, swalClasses.select);\n\n var renderOption = function renderOption(parent, optionLabel, optionValue) {\n var 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(function (inputOption) {\n var optionValue = inputOption[0];\n var optionLabel = inputOption[1]; // 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 \n\n if (Array.isArray(optionLabel)) {\n // if it is an array, then it is an \n var optgroup = document.createElement('optgroup');\n optgroup.label = optionValue;\n optgroup.disabled = false; // not configurable for now\n\n select.appendChild(optgroup);\n optionLabel.forEach(function (o) {\n return renderOption(optgroup, o[1], o[0]);\n });\n } else {\n // case of \n valueFormatted = formatInputOptions(valueFormatted);\n }\n\n result.push([key, valueFormatted]);\n });\n } else {\n Object.keys(inputOptions).forEach(function (key) {\n var valueFormatted = inputOptions[key];\n\n if (_typeof(valueFormatted) === 'object') {\n // case of \n valueFormatted = formatInputOptions(valueFormatted);\n }\n\n result.push([key, valueFormatted]);\n });\n }\n\n return result;\n };\n\n var isSelected = function isSelected(optionValue, inputValue) {\n return inputValue && inputValue.toString() === optionValue.toString();\n };\n\n var handleConfirmButtonClick = function handleConfirmButtonClick(instance, innerParams) {\n instance.disableButtons();\n\n if (innerParams.input) {\n handleConfirmOrDenyWithInput(instance, innerParams, 'confirm');\n } else {\n confirm(instance, innerParams, true);\n }\n };\n var handleDenyButtonClick = function handleDenyButtonClick(instance, innerParams) {\n instance.disableButtons();\n\n if (innerParams.returnInputValueOnDeny) {\n handleConfirmOrDenyWithInput(instance, innerParams, 'deny');\n } else {\n deny(instance, innerParams, false);\n }\n };\n var handleCancelButtonClick = function handleCancelButtonClick(instance, dismissWith) {\n instance.disableButtons();\n dismissWith(DismissReason.cancel);\n };\n\n var handleConfirmOrDenyWithInput = function handleConfirmOrDenyWithInput(instance, innerParams, type\n /* type is either 'confirm' or 'deny' */\n ) {\n var inputValue = getInputValue(instance, innerParams);\n\n if (innerParams.inputValidator) {\n handleInputValidator(instance, innerParams, inputValue);\n } else if (!instance.getInput().checkValidity()) {\n instance.enableButtons();\n instance.showValidationMessage(innerParams.validationMessage);\n } else if (type === 'deny') {\n deny(instance, innerParams, inputValue);\n } else {\n confirm(instance, innerParams, inputValue);\n }\n };\n\n var handleInputValidator = function handleInputValidator(instance, innerParams, inputValue) {\n instance.disableInput();\n var validationPromise = Promise.resolve().then(function () {\n return asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage));\n });\n validationPromise.then(function (validationMessage) {\n instance.enableButtons();\n instance.enableInput();\n\n if (validationMessage) {\n instance.showValidationMessage(validationMessage);\n } else {\n confirm(instance, innerParams, inputValue);\n }\n });\n };\n\n var deny = function deny(instance, innerParams, value) {\n if (innerParams.showLoaderOnDeny) {\n showLoading(getDenyButton());\n }\n\n if (innerParams.preDeny) {\n var preDenyPromise = Promise.resolve().then(function () {\n return asPromise(innerParams.preDeny(value, innerParams.validationMessage));\n });\n preDenyPromise.then(function (preDenyValue) {\n if (preDenyValue === false) {\n instance.hideLoading();\n } else {\n instance.closePopup({\n isDenied: true,\n value: typeof preDenyValue === 'undefined' ? value : preDenyValue\n });\n }\n });\n } else {\n instance.closePopup({\n isDenied: true,\n value: value\n });\n }\n };\n\n var succeedWith = function succeedWith(instance, value) {\n instance.closePopup({\n isConfirmed: true,\n value: value\n });\n };\n\n var confirm = function confirm(instance, innerParams, value) {\n if (innerParams.showLoaderOnConfirm) {\n showLoading(); // TODO: make showLoading an *instance* method\n }\n\n if (innerParams.preConfirm) {\n instance.resetValidationMessage();\n var preConfirmPromise = Promise.resolve().then(function () {\n return asPromise(innerParams.preConfirm(value, innerParams.validationMessage));\n });\n preConfirmPromise.then(function (preConfirmValue) {\n if (isVisible(getValidationMessage()) || preConfirmValue === false) {\n instance.hideLoading();\n } else {\n succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue);\n }\n });\n } else {\n succeedWith(instance, value);\n }\n };\n\n var addKeydownHandler = function addKeydownHandler(instance, globalState, innerParams, dismissWith) {\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 if (!innerParams.toast) {\n globalState.keydownHandler = function (e) {\n return keydownHandler(instance, e, dismissWith);\n };\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 }; // Focus handling\n\n var setFocus = function setFocus(innerParams, index, increment) {\n var 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 var arrowKeysNextButton = ['ArrowRight', 'ArrowDown', 'Right', 'Down' // IE11\n ];\n var arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp', 'Left', 'Up' // IE11\n ];\n var escKeys = ['Escape', 'Esc' // IE11\n ];\n\n var keydownHandler = function keydownHandler(instance, e, dismissWith) {\n var innerParams = privateProps.innerParams.get(instance);\n\n if (!innerParams) {\n return; // This instance has already been destroyed\n }\n\n if (innerParams.stopKeydownPropagation) {\n e.stopPropagation();\n } // ENTER\n\n\n if (e.key === 'Enter') {\n handleEnter(instance, e, innerParams); // TAB\n } else if (e.key === 'Tab') {\n handleTab(e, innerParams); // ARROWS - switch focus between buttons\n } else if ([].concat(arrowKeysNextButton, arrowKeysPreviousButton).indexOf(e.key) !== -1) {\n handleArrows(e.key); // ESC\n } else if (escKeys.indexOf(e.key) !== -1) {\n handleEsc(e, innerParams, dismissWith);\n }\n };\n\n var handleEnter = function handleEnter(instance, e, innerParams) {\n // #720 #721\n if (e.isComposing) {\n return;\n }\n\n if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) {\n if (['textarea', 'file'].indexOf(innerParams.input) !== -1) {\n return; // do not submit\n }\n\n clickConfirm();\n e.preventDefault();\n }\n };\n\n var handleTab = function handleTab(e, innerParams) {\n var targetElement = e.target;\n var focusableElements = getFocusableElements();\n var btnIndex = -1;\n\n for (var i = 0; i < focusableElements.length; i++) {\n if (targetElement === focusableElements[i]) {\n btnIndex = i;\n break;\n }\n }\n\n if (!e.shiftKey) {\n // Cycle to the next button\n setFocus(innerParams, btnIndex, 1);\n } else {\n // Cycle to the prev button\n setFocus(innerParams, btnIndex, -1);\n }\n\n e.stopPropagation();\n e.preventDefault();\n };\n\n var handleArrows = function handleArrows(key) {\n var confirmButton = getConfirmButton();\n var denyButton = getDenyButton();\n var cancelButton = getCancelButton();\n\n if (!([confirmButton, denyButton, cancelButton].indexOf(document.activeElement) !== -1)) {\n return;\n }\n\n var sibling = arrowKeysNextButton.indexOf(key) !== -1 ? 'nextElementSibling' : 'previousElementSibling';\n var buttonToFocus = document.activeElement[sibling];\n\n if (buttonToFocus) {\n buttonToFocus.focus();\n }\n };\n\n var handleEsc = function handleEsc(e, innerParams, dismissWith) {\n if (callIfFunction(innerParams.allowEscapeKey)) {\n e.preventDefault();\n dismissWith(DismissReason.esc);\n }\n };\n\n var handlePopupClick = function handlePopupClick(instance, domCache, dismissWith) {\n var 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 var handleToastClick = function handleToastClick(instance, domCache, dismissWith) {\n // Closing toast by internal click\n domCache.popup.onclick = function () {\n var innerParams = privateProps.innerParams.get(instance);\n\n if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) {\n return;\n }\n\n dismissWith(DismissReason.close);\n };\n };\n\n var ignoreOutsideClick = false;\n\n var handleModalMousedown = function handleModalMousedown(domCache) {\n domCache.popup.onmousedown = function () {\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 var handleContainerMousedown = function handleContainerMousedown(domCache) {\n domCache.container.onmousedown = function () {\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 var handleModalClick = function handleModalClick(instance, domCache, dismissWith) {\n domCache.container.onclick = function (e) {\n var 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 function _main(userParams) {\n var mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n showWarningsForParams(_extends({}, mixinParams, userParams));\n\n if (globalState.currentInstance) {\n globalState.currentInstance._destroy();\n }\n\n globalState.currentInstance = this;\n var 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 var domCache = populateDomCache(this);\n render(this, innerParams);\n privateProps.innerParams.set(this, innerParams);\n return swalPromise(this, domCache, innerParams);\n }\n\n var prepareParams = function prepareParams(userParams, mixinParams) {\n var templateParams = getTemplateParams(userParams);\n\n var params = _extends({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131\n\n\n params.showClass = _extends({}, defaultParams.showClass, params.showClass);\n params.hideClass = _extends({}, defaultParams.hideClass, params.hideClass); // @deprecated\n\n if (userParams.animation === false) {\n params.showClass = {\n popup: 'swal2-noanimation',\n backdrop: 'swal2-noanimation'\n };\n params.hideClass = {};\n }\n\n return params;\n };\n\n var swalPromise = function swalPromise(instance, domCache, innerParams) {\n return new Promise(function (resolve) {\n // functions to handle all closings/dismissals\n var dismissWith = function dismissWith(dismiss) {\n instance.closePopup({\n isDismissed: true,\n dismiss: dismiss\n });\n };\n\n privateMethods.swalPromiseResolve.set(instance, resolve);\n\n domCache.confirmButton.onclick = function () {\n return handleConfirmButtonClick(instance, innerParams);\n };\n\n domCache.denyButton.onclick = function () {\n return handleDenyButtonClick(instance, innerParams);\n };\n\n domCache.cancelButton.onclick = function () {\n return handleCancelButtonClick(instance, dismissWith);\n };\n\n domCache.closeButton.onclick = function () {\n return 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(function () {\n domCache.container.scrollTop = 0;\n });\n });\n };\n\n var populateDomCache = function populateDomCache(instance) {\n var domCache = {\n popup: getPopup(),\n container: getContainer(),\n content: getContent(),\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 var setupTimer = function setupTimer(globalState$$1, innerParams, dismissWith) {\n var timerProgressBar = getTimerProgressBar();\n hide(timerProgressBar);\n\n if (innerParams.timer) {\n globalState$$1.timeout = new Timer(function () {\n dismissWith('timer');\n delete globalState$$1.timeout;\n }, innerParams.timer);\n\n if (innerParams.timerProgressBar) {\n show(timerProgressBar);\n setTimeout(function () {\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 var initFocus = function initFocus(domCache, innerParams) {\n if (innerParams.toast) {\n return;\n }\n\n if (!callIfFunction(innerParams.allowEnterKey)) {\n return blurActiveElement();\n }\n\n if (!focusButton(domCache, innerParams)) {\n setFocus(innerParams, -1, 1);\n }\n };\n\n var focusButton = function 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 var blurActiveElement = function blurActiveElement() {\n if (document.activeElement && typeof document.activeElement.blur === 'function') {\n document.activeElement.blur();\n }\n };\n\n /**\n * Updates popup parameters.\n */\n\n function update(params) {\n var popup = getPopup();\n var 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 var validUpdatableParams = {}; // assign valid params from `params` to `defaults`\n\n Object.keys(params).forEach(function (param) {\n if (Swal.isUpdatableParameter(param)) {\n validUpdatableParams[param] = params[param];\n } else {\n warn(\"Invalid parameter to update: \\\"\".concat(param, \"\\\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\\n\\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md\"));\n }\n });\n\n var updatedParams = _extends({}, innerParams, validUpdatableParams);\n\n render(this, updatedParams);\n privateProps.innerParams.set(this, updatedParams);\n Object.defineProperties(this, {\n params: {\n value: _extends({}, this.params, params),\n writable: false,\n enumerable: true\n }\n });\n }\n\n function _destroy() {\n var domCache = privateProps.domCache.get(this);\n var innerParams = privateProps.innerParams.get(this);\n\n if (!innerParams) {\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 } // Check if there is a swal disposal defer timer\n\n\n if (globalState.deferDisposalTimer) {\n clearTimeout(globalState.deferDisposalTimer);\n delete globalState.deferDisposalTimer;\n }\n\n runDidDestroy(innerParams);\n disposeSwal(this);\n }\n\n var runDidDestroy = function runDidDestroy(innerParams) {\n if (typeof innerParams.didDestroy === 'function') {\n innerParams.didDestroy();\n } else if (typeof innerParams.onDestroy === 'function') {\n innerParams.onDestroy(); // @deprecated\n }\n };\n\n var disposeSwal = function disposeSwal(instance) {\n // Unset this.params so GC will dispose it (#1569)\n delete instance.params; // Unset globalState props so GC will dispose globalState (#1569)\n\n delete globalState.keydownHandler;\n delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569)\n\n unsetWeakMaps(privateProps);\n unsetWeakMaps(privateMethods);\n };\n\n var unsetWeakMaps = function unsetWeakMaps(obj) {\n for (var i in obj) {\n obj[i] = new WeakMap();\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 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 _main: _main,\n update: update,\n _destroy: _destroy\n });\n\n var currentInstance;\n\n var SweetAlert = /*#__PURE__*/function () {\n function SweetAlert() {\n _classCallCheck(this, SweetAlert);\n\n // Prevent run in Node env\n if (typeof window === 'undefined') {\n return;\n } // Check for the existence of Promise\n\n\n if (typeof Promise === 'undefined') {\n error('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)');\n }\n\n currentInstance = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var 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 });\n\n var promise = this._main(this.params);\n\n privateProps.promise.set(this, promise);\n } // `catch` cannot be the name of a module export, so we define our thenable methods here instead\n\n\n _createClass(SweetAlert, [{\n key: \"then\",\n value: function then(onFulfilled) {\n var promise = privateProps.promise.get(this);\n return promise.then(onFulfilled);\n }\n }, {\n key: \"finally\",\n value: function _finally(onFinally) {\n var promise = privateProps.promise.get(this);\n return promise[\"finally\"](onFinally);\n }\n }]);\n\n return SweetAlert;\n }(); // Assign instance methods from src/instanceMethods/*.js to prototype\n\n\n _extends(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor\n\n\n _extends(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility\n\n\n Object.keys(instanceMethods).forEach(function (key) {\n SweetAlert[key] = function () {\n if (currentInstance) {\n var _currentInstance;\n\n return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments);\n }\n };\n });\n SweetAlert.DismissReason = DismissReason;\n SweetAlert.version = '10.16.7';\n\n var Swal = SweetAlert;\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\n\"undefined\"!=typeof document&&function(e,t){var n=e.createElement(\"style\");if(e.getElementsByTagName(\"head\")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,\".swal2-popup.swal2-toast{flex-direction:column;align-items:stretch;width:auto;padding:1.25em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9}.swal2-popup.swal2-toast .swal2-header{flex-direction:row;padding:0}.swal2-popup.swal2-toast .swal2-title{flex-grow:1;justify-content:flex-start;margin:0 .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{position:static;width:.8em;height:.8em;line-height:.8}.swal2-popup.swal2-toast .swal2-content{justify-content:flex-start;margin:0 .625em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container{padding:.625em 0 0}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{font-size:.25em}}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{flex:1;flex-basis:auto!important;align-self:stretch;width:auto;height:2.2em;height:auto;margin:0 .3125em;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.125em .3125em;padding:.3125em .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:flex;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;flex-direction:row;align-items:center;justify-content:center;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-top{align-items:flex-start}.swal2-container.swal2-top-left,.swal2-container.swal2-top-start{align-items:flex-start;justify-content:flex-start}.swal2-container.swal2-top-end,.swal2-container.swal2-top-right{align-items:flex-start;justify-content:flex-end}.swal2-container.swal2-center{align-items:center}.swal2-container.swal2-center-left,.swal2-container.swal2-center-start{align-items:center;justify-content:flex-start}.swal2-container.swal2-center-end,.swal2-container.swal2-center-right{align-items:center;justify-content:flex-end}.swal2-container.swal2-bottom{align-items:flex-end}.swal2-container.swal2-bottom-left,.swal2-container.swal2-bottom-start{align-items:flex-end;justify-content:flex-start}.swal2-container.swal2-bottom-end,.swal2-container.swal2-bottom-right{align-items:flex-end;justify-content:flex-end}.swal2-container.swal2-bottom-end>:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-no-transition{transition:none!important}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:5px;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center;padding:0 1.8em}.swal2-title{position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#2778c4;color:#fff;font-size:1em}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#d14529;color:#fff;font-size:1em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#757575;color:#fff;font-size:1em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;align-items:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0 1.6em;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto}.swal2-validation-message{align-items:center;justify-content:center;margin:0 -2.7em;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\\\"!\\\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}\");","/*\n * This file is part of justoverclock/flarum-ext-guestengagement.\n *\n * Copyright (c) 2021 Marco Colia.\n * https://flarum.it\n *\n * For the full copyright and license information, please view the LICENSE.md\n * file that was distributed with this source code.\n */\n\nimport { extend } from 'flarum/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport app from 'flarum/app';\nimport Swal from 'sweetalert2';\n\napp.initializers.add('justoverclock/flarum-ext-newsletter', () => {\n extend(IndexPage.prototype, 'navItems', (navItems) => {\n if (app.current.matches(IndexPage))\n navItems.add(\n 'Newsletter',\n m('div',\n { className: 'alignews' },\n m('h1', { id: 'titleNl' }, ['News', m('span', '.letter')]),\n m('p', {className: 'descNl'}, app.translator.trans('flarum-ext-newsletter.forum.subscribe')),\n m('form', { id: 'subscribeForm' }, [\n m('input', { className: 'fieldinp', id: 'email-input', type: 'email', placeholder: 'Subscribe to Flarum' }),\n m('button', { className: 'subscbutt', type: 'submit' }, app.translator.trans('flarum-ext-newsletter.forum.submitbutton')),\n ])\n ),\n -100\n );\n });\n});\nextend(IndexPage.prototype, 'oncreate', function () {\n function SetupNewsletterSubscribe(publicAccountId, listName, formId, onSuccess) {\n var eeUrl = 'https://api.elasticemail.com/contact/add?version=2';\n var email = jQuery('#email-input');\n var form = jQuery('#' + formId).submit(function (event) {\n event.preventDefault();\n jQuery\n .post(\n eeUrl,\n {\n email: email.val(),\n publicAccountId: publicAccountId,\n listName: listName,\n },\n function () {\n },\n 'json'\n )\n .done(function (result) {\n if (result.success === true) {\n onSuccess();\n }\n })\n .fail(function () {\n // e se fallisce?...\n });\n });\n }\n jQuery(function () {\n const pubAcc = app.forum.attribute('PubAccount');\n const listmail = app.forum.attribute('ListName');\n SetupNewsletterSubscribe(pubAcc, listmail, 'subscribeForm', function () {\n // Ripuliamo il form dopo essere stato inviato!\n Swal.fire(\n 'Thank You!',\n 'You are now subscribed to our Newsletter!',\n 'success'\n );\n document.getElementById(\"subscribeForm\").reset();\n });\n });\n})\n","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['forum/components/IndexPage'];"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@justoverclock/flarum-ext-newsletter/webpack/bootstrap","webpack://@justoverclock/flarum-ext-newsletter/external \"flarum.core.compat['app']\"","webpack://@justoverclock/flarum-ext-newsletter/external \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@justoverclock/flarum-ext-newsletter/external \"flarum.core.compat['extend']\"","webpack://@justoverclock/flarum-ext-newsletter/./node_modules/sweetalert2/dist/sweetalert2.all.js","webpack://@justoverclock/flarum-ext-newsletter/./src/forum/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","_typeof","obj","iterator","constructor","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","length","descriptor","configurable","writable","_createClass","protoProps","staticProps","_extends","assign","arguments","source","apply","this","_getPrototypeOf","setPrototypeOf","getPrototypeOf","__proto__","_setPrototypeOf","_isNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","e","_construct","Parent","args","Class","a","push","Function","_possibleConstructorReturn","self","ReferenceError","_assertThisInitialized","_get","receiver","base","_superPropBase","desc","getOwnPropertyDescriptor","capitalizeFirstLetter","str","charAt","toUpperCase","slice","objectValues","keys","map","toArray","nodeList","Array","warn","message","console","concat","join","error","previousWarnOnceMessages","warnAboutDeprecation","deprecatedParam","useInstead","indexOf","callIfFunction","arg","hasToPromiseFn","toPromise","asPromise","Promise","resolve","isPromise","DismissReason","freeze","cancel","backdrop","close","esc","timer","isElement","elem","Element","jquery","isJqueryElement","prefix","items","result","swalClasses","iconTypes","getContainer","document","body","querySelector","container","elementBySelector","selectorString","elementByClass","className","getPopup","popup","getIcon","icon","getTitle","title","getContent","content","getHtmlContainer","getImage","image","getProgressSteps","getValidationMessage","getConfirmButton","actions","confirm","getDenyButton","deny","getLoader","loader","getCancelButton","getActions","getHeader","header","getFooter","footer","getTimerProgressBar","getCloseButton","getFocusableElements","focusableElementsWithTabindex","querySelectorAll","sort","b","parseInt","getAttribute","otherFocusableElements","filter","el","arr","uniqueArray","isVisible","isModal","isToast","classList","contains","states","previousBodyPadding","setInnerHtml","html","textContent","parsed","DOMParser","parseFromString","childNodes","forEach","child","appendChild","hasClass","split","applyCustomClass","params","showClass","remove","removeCustomClasses","customClass","addClass","getInput","inputType","getChildByClass","checkbox","radio","range","input","oldInputVal","focusInput","focus","type","val","toggleClass","condition","add","removeClass","applyNumericalStyle","style","removeProperty","show","display","undefined","hide","setStyle","parent","selector","toggle","offsetWidth","offsetHeight","getClientRects","isScrollable","scrollHeight","clientHeight","hasCssAnimation","window","getComputedStyle","animDuration","parseFloat","getPropertyValue","transDuration","animateTimerProgressBar","reset","timerProgressBar","transition","width","setTimeout","isNodeEnv","sweetHTML","file","select","label","textarea","replace","resetValidationMessage","Swal","init","oldContainer","oldContainerExisted","parentNode","removeChild","documentElement","createElement","rangeOutput","targetElement","setAttribute","toast","setupAccessibility","direction","rtl","setupRTL","oninput","onchange","nextSibling","parseHtmlToContainer","param","HTMLElement","handleObject","handleJqueryElem","toString","cloneNode","animationEndEvent","testEl","transEndEventNames","WebkitAnimation","OAnimation","animation","renderActions","confirmButton","denyButton","cancelButton","showConfirmButton","showDenyButton","showCancelButton","renderButton","buttonsStyling","styled","confirmButtonColor","backgroundColor","denyButtonColor","cancelButtonColor","handleButtonsStyling","reverseButtons","insertBefore","loaderHtml","button","buttonType","renderContainer","background","handleBackdropParam","allowOutsideClick","position","center","handlePositionParam","grow","growClass","handleGrowParam","queueStep","removeAttribute","privateProps","promise","WeakMap","innerParams","domCache","inputTypes","showInput","renderInputType","inputContainer","getInputContainer","setAttributes","inputAttributes","attr","attributes","attrName","removeAttributes","setCustomClass","setInputPlaceholder","placeholder","inputPlaceholder","setInputLabel","prependTo","inputLabel","id","labelClass","innerText","insertAdjacentElement","inputClass","text","email","password","number","tel","url","inputValue","rangeInput","disabled","selected","checkboxContainer","checked","getPadding","paddingLeft","paddingRight","initialPopupWidth","MutationObserver","contentWidth","observe","attributeFilter","renderContent","htmlContainer","rerender","renderInput","applyStyles","iconType","setColor","adjustSuccessIconBackgoundColor","popupBackgroundColor","successIconParts","setContent","iconHtml","iconContent","question","warning","info","iconColor","color","borderColor","_i","_arr","currentSteps","getQueueStep","renderProgressSteps","progressStepsContainer","progressSteps","currentProgressStep","step","index","stepEl","createStepElement","lineEl","progressStepsDistance","createLineElement","renderHeader","renderIcon","imageUrl","imageAlt","imageWidth","imageHeight","renderImage","titleText","renderTitle","closeButton","closeButtonHtml","showCloseButton","closeButtonAriaLabel","renderCloseButton","addClasses","modal","render","padding","renderPopup","renderFooter","didRender","onRender","clickConfirm","click","showLoading","buttonToReplace","fire","loading","globalState","restoreActiveElement","returnFocus","x","scrollX","y","scrollY","restoreFocusTimeout","previousActiveElement","scrollTo","stopTimer","timeout","timerProgressBarWidth","timerProgressBarFullWidth","timerProgressBarPercent","stopTimerProgressBar","stop","resumeTimer","remaining","start","bodyClickListenerAdded","clickHandlers","bodyClickListener","event","template","defaultParams","hideClass","heightAuto","allowEscapeKey","allowEnterKey","stopKeydownPropagation","keydownListenerCapture","preConfirm","preDeny","confirmButtonText","confirmButtonAriaLabel","denyButtonText","denyButtonAriaLabel","cancelButtonText","cancelButtonAriaLabel","focusConfirm","focusDeny","focusCancel","showLoaderOnConfirm","showLoaderOnDeny","inputOptions","inputAutoTrim","inputValidator","returnInputValueOnDeny","validationMessage","onBeforeOpen","onOpen","willOpen","didOpen","onClose","onAfterClose","willClose","didClose","onDestroy","didDestroy","scrollbarPadding","updatableParams","deprecatedParams","toastIncompatibleParams","isValidParameter","paramName","isDeprecatedParameter","checkIfParamIsValid","checkIfToastParamIsValid","checkIfParamIsDeprecated","showWarningsForParams","staticMethods","isUpdatableParameter","argsToParams","clickDeny","clickCancel","getInputLabel","isLoading","hasAttribute","_len","_key","mixin","mixinParams","_this","subClass","superClass","_inherits","MixinSwal","Derived","hasNativeReflectConstruct","_super","Super","NewTarget","priorityMixinParams","queue","steps","resetAndResolve","queueResult","callback","then","dismiss","insertQueueStep","splice","deleteQueueStep","enableLoading","getTimerLeft","toggleTimer","running","increaseTimer","increase","isTimerRunning","isRunning","bindClickHandler","addEventListener","hideLoading","getElementsByClassName","fixScrollbar","innerHeight","scrollDiv","scrollbarWidth","getBoundingClientRect","clientWidth","measureScrollbar","addBottomPaddingForTallPopups","navigator","userAgent","match","paddingBottom","lockBodyScroll","preventTouchMove","ontouchstart","shouldPreventTouchMove","ontouchmove","preventDefault","stopPropagation","isStylys","isZoom","tagName","touches","touchType","isIE11","MSInputMethodContext","documentMode","fixVerticalPositionIE","offsetTop","alignItems","privateMethods","swalPromiseResolve","removePopupAndResetState","triggerDidCloseAndDispose","keydownTarget","removeEventListener","keydownHandler","capture","keydownHandlerAdded","iosfix","offset","top","scrollTop","undoIOSfix","children","shown","resolveValue","prepareResolveValue","handlePopupAnimation","isConfirmed","isDenied","isDismissed","animationIsSupported","runDidClose","animatePopup","swalCloseEventFinishedCallback","_destroy","setButtonsDisabled","buttons","setInputDisabled","radios","Timer","delay","started","Date","clearTimeout","defaultInputValidators","string","test","setParameters","setDefaultInputValidators","validateCustomTargetElement","currentInstance","swalStringParams","getSwalParams","templateContent","showWarningsForAttributes","JSON","parse","getSwalButtons","innerHTML","getSwalImage","getSwalIcon","getSwalInput","option","optionValue","optionName","getSwalStringParams","paramNames","tag","trim","showWarningsForElements","allowedElements","toLowerCase","allowedAttributes","attribute","openPopup","initialBodyOverflow","overflowY","addClasses$1","setScrollingVisibility","fixScrollContainer","haystack","needle","activeElement","runDidOpen","swalOpenAnimationFinished","MSStream","platform","maxTouchPoints","iOSfix","setProperty","getCheckboxValue","getRadioValue","getFileValue","files","handleInputOptions","processInputOptions","populateInputOptions","formatInputOptions","handleInputValue","err","renderOption","optionLabel","isSelected","inputOption","isArray","optgroup","radioValue","radioLabel","radioInput","radioLabelElement","Map","valueFormatted","handleConfirmOrDenyWithInput","getInputValue","handleInputValidator","checkValidity","enableButtons","showValidationMessage","disableInput","enableInput","preDenyValue","closePopup","succeedWith","preConfirmValue","setFocus","increment","focusableElements","arrowKeysNextButton","arrowKeysPreviousButton","escKeys","dismissWith","handleEnter","handleTab","handleArrows","handleEsc","isComposing","outerHTML","btnIndex","shiftKey","sibling","buttonToFocus","handleToastClick","onclick","ignoreOutsideClick","handleModalMousedown","onmousedown","onmouseup","handleContainerMousedown","handleModalClick","prepareParams","userParams","templateParams","getTemplateParams","swalPromise","set","disableButtons","handleConfirmButtonClick","handleDenyButtonClick","handleCancelButtonClick","handlePopupClick","addKeydownHandler","handleInputOptionsAndValue","setupTimer","initFocus","populateDomCache","globalState$$1","focusButton","blurActiveElement","blur","runDidDestroy","disposeSwal","unsetWeakMaps","instanceMethods","disableLoading","closeModal","closeToast","inputerror","_main","update","validUpdatableParams","updatedParams","defineProperties","deferDisposalTimer","SweetAlert","outerParams","onFulfilled","onFinally","_currentInstance","version","factory","Sweetalert2","swal","sweetAlert","getElementsByTagName","styleSheet","cssText","app","initializers","extend","IndexPage","navItems","current","matches","translator","trans","jQuery","publicAccountId","listName","formId","onSuccess","pubAcc","forum","listmail","getElementById","submit","post","done","success","fail"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3C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GhF,WAITN,iBAAOC,IAAU5uB,UAAW,YAAY,WA2BtCkvB,QAAO,WACL,IA3BgCC,EAAiBC,EAAUC,EAAQC,EAE/D5a,EAyBE6a,EAASd,IAAIe,MAAM1I,UAAU,cAC7B2I,EAAWhB,IAAIe,MAAM1I,UAAU,YA5BLqI,EA6BPI,EA7BwBH,EA6BhBK,EA7B0BJ,EA6BhB,gBA7BwBC,EA6BP,WAE1DzgB,IAAK4K,KAAK,aAAc,4CAA6C,WACrE5S,SAAS6oB,eAAe,iBAAiB1hB,SA9BvC0G,EAAQwa,OAAO,gBACRA,OAAO,IAAMG,GAAQM,QAAO,SAAUzU,GAC/CA,EAAM8G,iBACNkN,OACGU,KALO,qDAON,CACElb,MAAOA,EAAMxI,MACbijB,gBAAiBA,EACjBC,SAAUA,IAEZ,cACA,QAEDS,MAAK,SAAUppB,IACS,IAAnBA,EAAOqpB,SACTR,OAGHS,MAAK","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['forum/components/IndexPage'];","module.exports = flarum.core.compat['extend'];","/*!\n* sweetalert2 v10.16.7\n* Released under the MIT License.\n*/\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.Sweetalert2 = factory());\n}(this, function () { 'use strict';\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n\n function _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n }\n\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n }\n\n function _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n }\n\n function _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n }\n\n function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n }\n\n function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n }\n\n var consolePrefix = 'SweetAlert2:';\n /**\n * Filter the unique values into a new array\n * @param arr\n */\n\n var uniqueArray = function uniqueArray(arr) {\n var result = [];\n\n for (var 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 * @param str\n */\n\n var capitalizeFirstLetter = function capitalizeFirstLetter(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n };\n /**\n * Returns the array of object values (Object.values isn't supported in IE11)\n * @param obj\n */\n\n var objectValues = function objectValues(obj) {\n return Object.keys(obj).map(function (key) {\n return obj[key];\n });\n };\n /**\n * Convert NodeList to Array\n * @param nodeList\n */\n\n var toArray = function toArray(nodeList) {\n return Array.prototype.slice.call(nodeList);\n };\n /**\n * Standardise console warnings\n * @param message\n */\n\n var warn = function warn(message) {\n console.warn(\"\".concat(consolePrefix, \" \").concat(_typeof(message) === 'object' ? message.join(' ') : message));\n };\n /**\n * Standardise console errors\n * @param message\n */\n\n var error = function error(message) {\n console.error(\"\".concat(consolePrefix, \" \").concat(message));\n };\n /**\n * Private global state for `warnOnce`\n * @type {Array}\n * @private\n */\n\n var previousWarnOnceMessages = [];\n /**\n * Show a console warning, but only if it hasn't already been shown\n * @param message\n */\n\n var warnOnce = function warnOnce(message) {\n if (!(previousWarnOnceMessages.indexOf(message) !== -1)) {\n previousWarnOnceMessages.push(message);\n warn(message);\n }\n };\n /**\n * Show a one-time console warning about deprecated params/methods\n */\n\n var warnAboutDeprecation = function 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 * @param arg\n */\n\n var callIfFunction = function callIfFunction(arg) {\n return typeof arg === 'function' ? arg() : arg;\n };\n var hasToPromiseFn = function hasToPromiseFn(arg) {\n return arg && typeof arg.toPromise === 'function';\n };\n var asPromise = function asPromise(arg) {\n return hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);\n };\n var isPromise = function isPromise(arg) {\n return arg && Promise.resolve(arg) === arg;\n };\n\n var DismissReason = Object.freeze({\n cancel: 'cancel',\n backdrop: 'backdrop',\n close: 'close',\n esc: 'esc',\n timer: 'timer'\n });\n\n var isJqueryElement = function isJqueryElement(elem) {\n return _typeof(elem) === 'object' && elem.jquery;\n };\n\n var isElement = function isElement(elem) {\n return elem instanceof Element || isJqueryElement(elem);\n };\n\n var argsToParams = function argsToParams(args) {\n var params = {};\n\n if (_typeof(args[0]) === 'object' && !isElement(args[0])) {\n _extends(params, args[0]);\n } else {\n ['title', 'html', 'icon'].forEach(function (name, index) {\n var 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 var swalPrefix = 'swal2-';\n var prefix = function prefix(items) {\n var result = {};\n\n for (var i in items) {\n result[items[i]] = swalPrefix + items[i];\n }\n\n return result;\n };\n var swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'header', 'content', 'html-container', 'actions', 'confirm', 'deny', 'cancel', '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']);\n var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);\n\n var getContainer = function getContainer() {\n return document.body.querySelector(\".\".concat(swalClasses.container));\n };\n var elementBySelector = function elementBySelector(selectorString) {\n var container = getContainer();\n return container ? container.querySelector(selectorString) : null;\n };\n\n var elementByClass = function elementByClass(className) {\n return elementBySelector(\".\".concat(className));\n };\n\n var getPopup = function getPopup() {\n return elementByClass(swalClasses.popup);\n };\n var getIcon = function getIcon() {\n return elementByClass(swalClasses.icon);\n };\n var getTitle = function getTitle() {\n return elementByClass(swalClasses.title);\n };\n var getContent = function getContent() {\n return elementByClass(swalClasses.content);\n };\n var getHtmlContainer = function getHtmlContainer() {\n return elementByClass(swalClasses['html-container']);\n };\n var getImage = function getImage() {\n return elementByClass(swalClasses.image);\n };\n var getProgressSteps = function getProgressSteps() {\n return elementByClass(swalClasses['progress-steps']);\n };\n var getValidationMessage = function getValidationMessage() {\n return elementByClass(swalClasses['validation-message']);\n };\n var getConfirmButton = function getConfirmButton() {\n return elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.confirm));\n };\n var getDenyButton = function getDenyButton() {\n return elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.deny));\n };\n var getInputLabel = function getInputLabel() {\n return elementByClass(swalClasses['input-label']);\n };\n var getLoader = function getLoader() {\n return elementBySelector(\".\".concat(swalClasses.loader));\n };\n var getCancelButton = function getCancelButton() {\n return elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.cancel));\n };\n var getActions = function getActions() {\n return elementByClass(swalClasses.actions);\n };\n var getHeader = function getHeader() {\n return elementByClass(swalClasses.header);\n };\n var getFooter = function getFooter() {\n return elementByClass(swalClasses.footer);\n };\n var getTimerProgressBar = function getTimerProgressBar() {\n return elementByClass(swalClasses['timer-progress-bar']);\n };\n var getCloseButton = function getCloseButton() {\n return elementByClass(swalClasses.close);\n }; // https://github.com/jkup/focusable/blob/master/index.js\n\n var 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 var getFocusableElements = function getFocusableElements() {\n var focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])')) // sort according to tabindex\n .sort(function (a, b) {\n a = parseInt(a.getAttribute('tabindex'));\n b = parseInt(b.getAttribute('tabindex'));\n\n if (a > b) {\n return 1;\n } else if (a < b) {\n return -1;\n }\n\n return 0;\n });\n var otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(function (el) {\n return el.getAttribute('tabindex') !== '-1';\n });\n return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(function (el) {\n return isVisible(el);\n });\n };\n var isModal = function isModal() {\n return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']);\n };\n var isToast = function isToast() {\n return document.body.classList.contains(swalClasses['toast-shown']);\n };\n var isLoading = function isLoading() {\n return getPopup().hasAttribute('data-loading');\n };\n\n var states = {\n previousBodyPadding: null\n };\n var setInnerHtml = function setInnerHtml(elem, html) {\n // #1926\n elem.textContent = '';\n\n if (html) {\n var parser = new DOMParser();\n var parsed = parser.parseFromString(html, \"text/html\");\n toArray(parsed.querySelector('head').childNodes).forEach(function (child) {\n elem.appendChild(child);\n });\n toArray(parsed.querySelector('body').childNodes).forEach(function (child) {\n elem.appendChild(child);\n });\n }\n };\n var hasClass = function hasClass(elem, className) {\n if (!className) {\n return false;\n }\n\n var classList = className.split(/\\s+/);\n\n for (var 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 var removeCustomClasses = function removeCustomClasses(elem, params) {\n toArray(elem.classList).forEach(function (className) {\n if (!(objectValues(swalClasses).indexOf(className) !== -1) && !(objectValues(iconTypes).indexOf(className) !== -1) && !(objectValues(params.showClass).indexOf(className) !== -1)) {\n elem.classList.remove(className);\n }\n });\n };\n\n var applyCustomClass = function 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 function getInput(content, inputType) {\n if (!inputType) {\n return null;\n }\n\n switch (inputType) {\n case 'select':\n case 'textarea':\n case 'file':\n return getChildByClass(content, swalClasses[inputType]);\n\n case 'checkbox':\n return content.querySelector(\".\".concat(swalClasses.checkbox, \" input\"));\n\n case 'radio':\n return content.querySelector(\".\".concat(swalClasses.radio, \" input:checked\")) || content.querySelector(\".\".concat(swalClasses.radio, \" input:first-child\"));\n\n case 'range':\n return content.querySelector(\".\".concat(swalClasses.range, \" input\"));\n\n default:\n return getChildByClass(content, swalClasses.input);\n }\n }\n var focusInput = function 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 var val = input.value;\n input.value = '';\n input.value = val;\n }\n };\n var toggleClass = function 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(function (className) {\n if (target.forEach) {\n target.forEach(function (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 var addClass = function addClass(target, classList) {\n toggleClass(target, classList, true);\n };\n var removeClass = function removeClass(target, classList) {\n toggleClass(target, classList, false);\n };\n var getChildByClass = function getChildByClass(elem, className) {\n for (var i = 0; i < elem.childNodes.length; i++) {\n if (hasClass(elem.childNodes[i], className)) {\n return elem.childNodes[i];\n }\n }\n };\n var applyNumericalStyle = function 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 var show = function show(elem) {\n var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex';\n elem.style.display = display;\n };\n var hide = function hide(elem) {\n elem.style.display = 'none';\n };\n var setStyle = function setStyle(parent, selector, property, value) {\n var el = parent.querySelector(selector);\n\n if (el) {\n el.style[property] = value;\n }\n };\n var toggle = function toggle(elem, condition, display) {\n condition ? show(elem, display) : hide(elem);\n }; // borrowed from jquery $(elem).is(':visible') implementation\n\n var isVisible = function isVisible(elem) {\n return !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));\n };\n var allButtonsAreHidden = function allButtonsAreHidden() {\n return !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton());\n };\n var isScrollable = function isScrollable(elem) {\n return !!(elem.scrollHeight > elem.clientHeight);\n }; // borrowed from https://stackoverflow.com/a/46352119\n\n var hasCssAnimation = function hasCssAnimation(elem) {\n var style = window.getComputedStyle(elem);\n var animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');\n var transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');\n return animDuration > 0 || transDuration > 0;\n };\n var contains = function contains(haystack, needle) {\n if (typeof haystack.contains === 'function') {\n return haystack.contains(needle);\n }\n };\n var animateTimerProgressBar = function animateTimerProgressBar(timer) {\n var reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var timerProgressBar = getTimerProgressBar();\n\n if (isVisible(timerProgressBar)) {\n if (reset) {\n timerProgressBar.style.transition = 'none';\n timerProgressBar.style.width = '100%';\n }\n\n setTimeout(function () {\n timerProgressBar.style.transition = \"width \".concat(timer / 1000, \"s linear\");\n timerProgressBar.style.width = '0%';\n }, 10);\n }\n };\n var stopTimerProgressBar = function stopTimerProgressBar() {\n var timerProgressBar = getTimerProgressBar();\n var timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n timerProgressBar.style.removeProperty('transition');\n timerProgressBar.style.width = '100%';\n var timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n var timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100);\n timerProgressBar.style.removeProperty('transition');\n timerProgressBar.style.width = \"\".concat(timerProgressBarPercent, \"%\");\n };\n\n // Detect Node env\n var isNodeEnv = function isNodeEnv() {\n return typeof window === 'undefined' || typeof document === 'undefined';\n };\n\n var sweetHTML = \"\\n
        \\n
        \\n
          \\n
          \\n \\n

          \\n \\n
          \\n
          \\n
          \\n \\n \\n
          \\n \\n \\n
          \\n \\n
          \\n \\n \\n
          \\n
          \\n
          \\n
          \\n \\n \\n \\n
          \\n
          \\n
          \\n
          \\n
          \\n
          \\n\").replace(/(^|\\n)\\s*/g, '');\n\n var resetOldContainer = function resetOldContainer() {\n var oldContainer = getContainer();\n\n if (!oldContainer) {\n return false;\n }\n\n oldContainer.parentNode.removeChild(oldContainer);\n removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);\n return true;\n };\n\n var oldInputVal; // IE11 workaround, see #1109 for details\n\n var resetValidationMessage = function resetValidationMessage(e) {\n if (Swal.isVisible() && oldInputVal !== e.target.value) {\n Swal.resetValidationMessage();\n }\n\n oldInputVal = e.target.value;\n };\n\n var addInputChangeListeners = function addInputChangeListeners() {\n var content = getContent();\n var input = getChildByClass(content, swalClasses.input);\n var file = getChildByClass(content, swalClasses.file);\n var range = content.querySelector(\".\".concat(swalClasses.range, \" input\"));\n var rangeOutput = content.querySelector(\".\".concat(swalClasses.range, \" output\"));\n var select = getChildByClass(content, swalClasses.select);\n var checkbox = content.querySelector(\".\".concat(swalClasses.checkbox, \" input\"));\n var textarea = getChildByClass(content, 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 = function (e) {\n resetValidationMessage(e);\n rangeOutput.value = range.value;\n };\n\n range.onchange = function (e) {\n resetValidationMessage(e);\n range.nextSibling.value = range.value;\n };\n };\n\n var getTarget = function getTarget(target) {\n return typeof target === 'string' ? document.querySelector(target) : target;\n };\n\n var setupAccessibility = function setupAccessibility(params) {\n var 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 var setupRTL = function setupRTL(targetElement) {\n if (window.getComputedStyle(targetElement).direction === 'rtl') {\n addClass(getContainer(), swalClasses.rtl);\n }\n };\n /*\n * Add modal + backdrop to DOM\n */\n\n\n var init = function init(params) {\n // Clean up the old popup container if it exists\n var oldContainerExisted = resetOldContainer();\n /* istanbul ignore if */\n\n if (isNodeEnv()) {\n error('SweetAlert2 requires document to initialize');\n return;\n }\n\n var 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 var targetElement = getTarget(params.target);\n targetElement.appendChild(container);\n setupAccessibility(params);\n setupRTL(targetElement);\n addInputChangeListeners();\n };\n\n var parseHtmlToContainer = function parseHtmlToContainer(param, target) {\n // DOM element\n if (param instanceof HTMLElement) {\n target.appendChild(param); // Object\n } else if (_typeof(param) === 'object') {\n handleObject(param, target); // Plain string\n } else if (param) {\n setInnerHtml(target, param);\n }\n };\n\n var handleObject = function handleObject(param, target) {\n // JQuery element(s)\n if (param.jquery) {\n handleJqueryElem(target, param); // For other objects use their string representation\n } else {\n setInnerHtml(target, param.toString());\n }\n };\n\n var handleJqueryElem = function handleJqueryElem(target, elem) {\n target.textContent = '';\n\n if (0 in elem) {\n for (var 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 var animationEndEvent = function () {\n // Prevent run in Node env\n\n /* istanbul ignore if */\n if (isNodeEnv()) {\n return false;\n }\n\n var testEl = document.createElement('div');\n var transEndEventNames = {\n WebkitAnimation: 'webkitAnimationEnd',\n OAnimation: 'oAnimationEnd oanimationend',\n animation: 'animationend'\n };\n\n for (var 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 // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js\n\n var measureScrollbar = function measureScrollbar() {\n var scrollDiv = document.createElement('div');\n scrollDiv.className = swalClasses['scrollbar-measure'];\n document.body.appendChild(scrollDiv);\n var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n };\n\n var renderActions = function renderActions(instance, params) {\n var actions = getActions();\n var loader = getLoader();\n var confirmButton = getConfirmButton();\n var denyButton = getDenyButton();\n var cancelButton = getCancelButton(); // Actions (buttons) wrapper\n\n if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) {\n hide(actions);\n } // Custom class\n\n\n applyCustomClass(actions, params, 'actions'); // 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 actions.insertBefore(cancelButton, loader);\n actions.insertBefore(denyButton, loader);\n actions.insertBefore(confirmButton, loader);\n } // Loader\n\n\n setInnerHtml(loader, params.loaderHtml);\n applyCustomClass(loader, params, 'loader');\n };\n\n function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) {\n if (!params.buttonsStyling) {\n return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled);\n }\n\n addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors\n\n if (params.confirmButtonColor) {\n confirmButton.style.backgroundColor = params.confirmButtonColor;\n }\n\n if (params.denyButtonColor) {\n denyButton.style.backgroundColor = params.denyButtonColor;\n }\n\n if (params.cancelButtonColor) {\n cancelButton.style.backgroundColor = params.cancelButtonColor;\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 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 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 function handleGrowParam(container, grow) {\n if (grow && typeof grow === 'string') {\n var growClass = \"grow-\".concat(grow);\n\n if (growClass in swalClasses) {\n addClass(container, swalClasses[growClass]);\n }\n }\n }\n\n var renderContainer = function renderContainer(instance, params) {\n var container = getContainer();\n\n if (!container) {\n return;\n }\n\n handleBackdropParam(container, params.backdrop);\n\n if (!params.backdrop && params.allowOutsideClick) {\n warn('\"allowOutsideClick\" parameter requires `backdrop` parameter to be set to `true`');\n }\n\n handlePositionParam(container, params.position);\n handleGrowParam(container, params.grow); // Custom class\n\n applyCustomClass(container, params, 'container'); // Set queue step attribute for getQueueStep() method\n\n var queueStep = document.body.getAttribute('data-swal2-queue-step');\n\n if (queueStep) {\n container.setAttribute('data-queue-step', queueStep);\n document.body.removeAttribute('data-swal2-queue-step');\n }\n };\n\n /**\n * This module containts `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 promise: new WeakMap(),\n innerParams: new WeakMap(),\n domCache: new WeakMap()\n };\n\n var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];\n var renderInput = function renderInput(instance, params) {\n var content = getContent();\n var innerParams = privateProps.innerParams.get(instance);\n var rerender = !innerParams || params.input !== innerParams.input;\n inputTypes.forEach(function (inputType) {\n var inputClass = swalClasses[inputType];\n var inputContainer = getChildByClass(content, inputClass); // set attributes\n\n setAttributes(inputType, params.inputAttributes); // set class\n\n inputContainer.className = 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 var showInput = function showInput(params) {\n if (!renderInputType[params.input]) {\n return error(\"Unexpected type of input! Expected \\\"text\\\", \\\"email\\\", \\\"password\\\", \\\"number\\\", \\\"tel\\\", \\\"select\\\", \\\"radio\\\", \\\"checkbox\\\", \\\"textarea\\\", \\\"file\\\" or \\\"url\\\", got \\\"\".concat(params.input, \"\\\"\"));\n }\n\n var inputContainer = getInputContainer(params.input);\n var input = renderInputType[params.input](inputContainer, params);\n show(input); // input autofocus\n\n setTimeout(function () {\n focusInput(input);\n });\n };\n\n var removeAttributes = function removeAttributes(input) {\n for (var i = 0; i < input.attributes.length; i++) {\n var attrName = input.attributes[i].name;\n\n if (!(['type', 'value', 'style'].indexOf(attrName) !== -1)) {\n input.removeAttribute(attrName);\n }\n }\n };\n\n var setAttributes = function setAttributes(inputType, inputAttributes) {\n var input = getInput(getContent(), inputType);\n\n if (!input) {\n return;\n }\n\n removeAttributes(input);\n\n for (var attr in inputAttributes) {\n // Do not set a placeholder for \n // it'll crash Edge, #1298\n if (inputType === 'range' && attr === 'placeholder') {\n continue;\n }\n\n input.setAttribute(attr, inputAttributes[attr]);\n }\n };\n\n var setCustomClass = function setCustomClass(params) {\n var inputContainer = getInputContainer(params.input);\n\n if (params.customClass) {\n addClass(inputContainer, params.customClass.input);\n }\n };\n\n var setInputPlaceholder = function setInputPlaceholder(input, params) {\n if (!input.placeholder || params.inputPlaceholder) {\n input.placeholder = params.inputPlaceholder;\n }\n };\n\n var setInputLabel = function setInputLabel(input, prependTo, params) {\n if (params.inputLabel) {\n input.id = swalClasses.input;\n var label = document.createElement('label');\n var labelClass = swalClasses['input-label'];\n label.setAttribute('for', input.id);\n label.className = labelClass;\n addClass(label, params.customClass.inputLabel);\n label.innerText = params.inputLabel;\n prependTo.insertAdjacentElement('beforebegin', label);\n }\n };\n\n var getInputContainer = function getInputContainer(inputType) {\n var inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input;\n return getChildByClass(getContent(), inputClass);\n };\n\n var renderInputType = {};\n\n renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = function (input, params) {\n if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') {\n input.value = params.inputValue;\n } else if (!isPromise(params.inputValue)) {\n warn(\"Unexpected type of inputValue! Expected \\\"string\\\", \\\"number\\\" or \\\"Promise\\\", got \\\"\".concat(_typeof(params.inputValue), \"\\\"\"));\n }\n\n setInputLabel(input, input, params);\n setInputPlaceholder(input, params);\n input.type = params.input;\n return input;\n };\n\n renderInputType.file = function (input, params) {\n setInputLabel(input, input, params);\n setInputPlaceholder(input, params);\n return input;\n };\n\n renderInputType.range = function (range, params) {\n var rangeInput = range.querySelector('input');\n var rangeOutput = range.querySelector('output');\n rangeInput.value = params.inputValue;\n rangeInput.type = params.input;\n rangeOutput.value = params.inputValue;\n setInputLabel(rangeInput, range, params);\n return range;\n };\n\n renderInputType.select = function (select, params) {\n select.textContent = '';\n\n if (params.inputPlaceholder) {\n var 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 renderInputType.radio = function (radio) {\n radio.textContent = '';\n return radio;\n };\n\n renderInputType.checkbox = function (checkboxContainer, params) {\n var checkbox = getInput(getContent(), 'checkbox');\n checkbox.value = 1;\n checkbox.id = swalClasses.checkbox;\n checkbox.checked = Boolean(params.inputValue);\n var label = checkboxContainer.querySelector('span');\n setInnerHtml(label, params.inputPlaceholder);\n return checkboxContainer;\n };\n\n renderInputType.textarea = function (textarea, params) {\n textarea.value = params.inputValue;\n setInputPlaceholder(textarea, params);\n setInputLabel(textarea, textarea, params);\n\n var getPadding = function getPadding(el) {\n return parseInt(window.getComputedStyle(el).paddingLeft) + parseInt(window.getComputedStyle(el).paddingRight);\n };\n\n if ('MutationObserver' in window) {\n // #1699\n var initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width);\n\n var outputsize = function outputsize() {\n var contentWidth = textarea.offsetWidth + getPadding(getPopup()) + getPadding(getContent());\n\n if (contentWidth > initialPopupWidth) {\n getPopup().style.width = \"\".concat(contentWidth, \"px\");\n } else {\n getPopup().style.width = null;\n }\n };\n\n new MutationObserver(outputsize).observe(textarea, {\n attributes: true,\n attributeFilter: ['style']\n });\n }\n\n return textarea;\n };\n\n var renderContent = function renderContent(instance, params) {\n var htmlContainer = getHtmlContainer();\n applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML\n\n if (params.html) {\n parseHtmlToContainer(params.html, htmlContainer);\n show(htmlContainer, 'block'); // Content as plain text\n } else if (params.text) {\n htmlContainer.textContent = params.text;\n show(htmlContainer, 'block'); // No content\n } else {\n hide(htmlContainer);\n }\n\n renderInput(instance, params); // Custom class\n\n applyCustomClass(getContent(), params, 'content');\n };\n\n var renderFooter = function renderFooter(instance, params) {\n var 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 var renderCloseButton = function renderCloseButton(instance, params) {\n var 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 var renderIcon = function renderIcon(instance, params) {\n var innerParams = privateProps.innerParams.get(instance);\n var 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 return hide(icon);\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 return hide(icon);\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 var applyStyles = function applyStyles(icon, params) {\n for (var 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 adjustSuccessIconBackgoundColor(); // Custom class\n\n applyCustomClass(icon, params, 'icon');\n }; // Adjust success icon background color to match the popup background color\n\n\n var adjustSuccessIconBackgoundColor = function adjustSuccessIconBackgoundColor() {\n var popup = getPopup();\n var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');\n var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');\n\n for (var i = 0; i < successIconParts.length; i++) {\n successIconParts[i].style.backgroundColor = popupBackgroundColor;\n }\n };\n\n var setContent = function setContent(icon, params) {\n icon.textContent = '';\n\n if (params.iconHtml) {\n setInnerHtml(icon, iconContent(params.iconHtml));\n } else if (params.icon === 'success') {\n setInnerHtml(icon, \"\\n
          \\n \\n
          \\n
          \\n \");\n } else if (params.icon === 'error') {\n setInnerHtml(icon, \"\\n \\n \\n \\n \\n \");\n } else {\n var defaultIconHtml = {\n question: '?',\n warning: '!',\n info: 'i'\n };\n setInnerHtml(icon, iconContent(defaultIconHtml[params.icon]));\n }\n };\n\n var setColor = function 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 (var _i = 0, _arr = ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']; _i < _arr.length; _i++) {\n var sel = _arr[_i];\n setStyle(icon, sel, 'backgroundColor', params.iconColor);\n }\n\n setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor);\n };\n\n var iconContent = function iconContent(content) {\n return \"
          \").concat(content, \"
          \");\n };\n\n var renderImage = function renderImage(instance, params) {\n var image = getImage();\n\n if (!params.imageUrl) {\n return hide(image);\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 var currentSteps = [];\n /*\n * Global function for chaining sweetAlert popups\n */\n\n var queue = function queue(steps) {\n warnAboutDeprecation('Swal.queue()', \"async/await\");\n var Swal = this;\n currentSteps = steps;\n\n var resetAndResolve = function resetAndResolve(resolve, value) {\n currentSteps = [];\n resolve(value);\n };\n\n var queueResult = [];\n return new Promise(function (resolve) {\n (function step(i, callback) {\n if (i < currentSteps.length) {\n document.body.setAttribute('data-swal2-queue-step', i);\n Swal.fire(currentSteps[i]).then(function (result) {\n if (typeof result.value !== 'undefined') {\n queueResult.push(result.value);\n step(i + 1, callback);\n } else {\n resetAndResolve(resolve, {\n dismiss: result.dismiss\n });\n }\n });\n } else {\n resetAndResolve(resolve, {\n value: queueResult\n });\n }\n })(0);\n });\n };\n /*\n * Global function for getting the index of current popup in queue\n */\n\n var getQueueStep = function getQueueStep() {\n return getContainer() && getContainer().getAttribute('data-queue-step');\n };\n /*\n * Global function for inserting a popup to the queue\n */\n\n var insertQueueStep = function insertQueueStep(step, index) {\n if (index && index < currentSteps.length) {\n return currentSteps.splice(index, 0, step);\n }\n\n return currentSteps.push(step);\n };\n /*\n * Global function for deleting a popup from the queue\n */\n\n var deleteQueueStep = function deleteQueueStep(index) {\n if (typeof currentSteps[index] !== 'undefined') {\n currentSteps.splice(index, 1);\n }\n };\n\n var createStepElement = function createStepElement(step) {\n var stepEl = document.createElement('li');\n addClass(stepEl, swalClasses['progress-step']);\n setInnerHtml(stepEl, step);\n return stepEl;\n };\n\n var createLineElement = function createLineElement(params) {\n var lineEl = document.createElement('li');\n addClass(lineEl, swalClasses['progress-step-line']);\n\n if (params.progressStepsDistance) {\n lineEl.style.width = params.progressStepsDistance;\n }\n\n return lineEl;\n };\n\n var renderProgressSteps = function renderProgressSteps(instance, params) {\n var progressStepsContainer = getProgressSteps();\n\n if (!params.progressSteps || params.progressSteps.length === 0) {\n return hide(progressStepsContainer);\n }\n\n show(progressStepsContainer);\n progressStepsContainer.textContent = '';\n var currentProgressStep = parseInt(params.currentProgressStep === undefined ? getQueueStep() : params.currentProgressStep);\n\n if (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(function (step, index) {\n var stepEl = createStepElement(step);\n progressStepsContainer.appendChild(stepEl);\n\n if (index === currentProgressStep) {\n addClass(stepEl, swalClasses['active-progress-step']);\n }\n\n if (index !== params.progressSteps.length - 1) {\n var lineEl = createLineElement(params);\n progressStepsContainer.appendChild(lineEl);\n }\n });\n };\n\n var renderTitle = function renderTitle(instance, params) {\n var 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 var renderHeader = function renderHeader(instance, params) {\n var header = getHeader(); // Custom class\n\n applyCustomClass(header, params, 'header'); // Progress steps\n\n renderProgressSteps(instance, params); // Icon\n\n renderIcon(instance, params); // Image\n\n renderImage(instance, params); // Title\n\n renderTitle(instance, params); // Close button\n\n renderCloseButton(instance, params);\n };\n\n var renderPopup = function renderPopup(instance, params) {\n var container = getContainer();\n var popup = getPopup(); // Width\n\n if (params.toast) {\n // #2170\n applyNumericalStyle(container, 'width', params.width);\n popup.style.width = '100%';\n } else {\n applyNumericalStyle(popup, 'width', params.width);\n } // Padding\n\n\n applyNumericalStyle(popup, 'padding', params.padding); // Background\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 var addClasses = function 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 var render = function render(instance, params) {\n renderPopup(instance, params);\n renderContainer(instance, params);\n renderHeader(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 } else if (typeof params.onRender === 'function') {\n params.onRender(getPopup()); // @deprecated\n }\n };\n\n /*\n * Global function to determine if SweetAlert2 popup is shown\n */\n\n var isVisible$1 = function isVisible$$1() {\n return isVisible(getPopup());\n };\n /*\n * Global function to click 'Confirm' button\n */\n\n var clickConfirm = function clickConfirm() {\n return getConfirmButton() && getConfirmButton().click();\n };\n /*\n * Global function to click 'Deny' button\n */\n\n var clickDeny = function clickDeny() {\n return getDenyButton() && getDenyButton().click();\n };\n /*\n * Global function to click 'Cancel' button\n */\n\n var clickCancel = function clickCancel() {\n return getCancelButton() && getCancelButton().click();\n };\n\n function fire() {\n var Swal = this;\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 _construct(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 var MixinSwal = /*#__PURE__*/function (_this) {\n _inherits(MixinSwal, _this);\n\n var _super = _createSuper(MixinSwal);\n\n function MixinSwal() {\n _classCallCheck(this, MixinSwal);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(MixinSwal, [{\n key: \"_main\",\n value: function _main(params, priorityMixinParams) {\n return _get(_getPrototypeOf(MixinSwal.prototype), \"_main\", this).call(this, params, _extends({}, mixinParams, priorityMixinParams));\n }\n }]);\n\n return MixinSwal;\n }(this);\n\n return MixinSwal;\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 var showLoading = function showLoading(buttonToReplace) {\n var popup = getPopup();\n\n if (!popup) {\n Swal.fire();\n }\n\n popup = getPopup();\n var actions = getActions();\n var 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 show(loader);\n popup.setAttribute('data-loading', true);\n popup.setAttribute('aria-busy', true);\n popup.focus();\n };\n\n var RESTORE_FOCUS_TIMEOUT = 100;\n\n var globalState = {};\n\n var focusPreviousActiveElement = function focusPreviousActiveElement() {\n if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {\n globalState.previousActiveElement.focus();\n globalState.previousActiveElement = null;\n } else if (document.body) {\n document.body.focus();\n }\n }; // Restore previous active (focused) element\n\n\n var restoreActiveElement = function restoreActiveElement(returnFocus) {\n return new Promise(function (resolve) {\n if (!returnFocus) {\n return resolve();\n }\n\n var x = window.scrollX;\n var y = window.scrollY;\n globalState.restoreFocusTimeout = setTimeout(function () {\n focusPreviousActiveElement();\n resolve();\n }, RESTORE_FOCUS_TIMEOUT); // issues/900\n\n if (typeof x !== 'undefined' && typeof y !== 'undefined') {\n // IE doesn't have scrollX/scrollY support\n window.scrollTo(x, y);\n }\n });\n };\n\n /**\n * If `timer` parameter is set, returns number of milliseconds of timer remained.\n * Otherwise, returns undefined.\n */\n\n var getTimerLeft = function 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 var stopTimer = function 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 var resumeTimer = function resumeTimer() {\n if (globalState.timeout) {\n var 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 var toggleTimer = function toggleTimer() {\n var 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 var increaseTimer = function increaseTimer(n) {\n if (globalState.timeout) {\n var 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 var isTimerRunning = function isTimerRunning() {\n return globalState.timeout && globalState.timeout.isRunning();\n };\n\n var bodyClickListenerAdded = false;\n var clickHandlers = {};\n function bindClickHandler() {\n var 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 var bodyClickListener = function bodyClickListener(event) {\n // 1. using .parentNode instead of event.path because of better support by old browsers https://stackoverflow.com/a/39245638\n // 2. using .parentNode instead of .parentElement because of IE11 + SVG https://stackoverflow.com/a/36270354\n for (var el = event.target; el && el !== document; el = el.parentNode) {\n for (var attr in clickHandlers) {\n var template = el.getAttribute(attr);\n\n if (template) {\n clickHandlers[attr].fire({\n template: template\n });\n return;\n }\n }\n }\n };\n\n var 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 animation: true,\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 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: '×',\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 onBeforeOpen: undefined,\n onOpen: undefined,\n willOpen: undefined,\n didOpen: undefined,\n onRender: undefined,\n didRender: undefined,\n onClose: undefined,\n onAfterClose: undefined,\n willClose: undefined,\n didClose: undefined,\n onDestroy: undefined,\n didDestroy: undefined,\n scrollbarPadding: true\n };\n var updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'onAfterClose', 'onClose', 'onDestroy', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose'];\n var deprecatedParams = {\n animation: 'showClass\" and \"hideClass',\n onBeforeOpen: 'willOpen',\n onOpen: 'didOpen',\n onRender: 'didRender',\n onClose: 'willClose',\n onAfterClose: 'didClose',\n onDestroy: 'didDestroy'\n };\n var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture'];\n /**\n * Is valid parameter\n * @param {String} paramName\n */\n\n var isValidParameter = function isValidParameter(paramName) {\n return Object.prototype.hasOwnProperty.call(defaultParams, paramName);\n };\n /**\n * Is valid parameter for Swal.update() method\n * @param {String} paramName\n */\n\n var isUpdatableParameter = function isUpdatableParameter(paramName) {\n return updatableParams.indexOf(paramName) !== -1;\n };\n /**\n * Is deprecated parameter\n * @param {String} paramName\n */\n\n var isDeprecatedParameter = function isDeprecatedParameter(paramName) {\n return deprecatedParams[paramName];\n };\n\n var checkIfParamIsValid = function checkIfParamIsValid(param) {\n if (!isValidParameter(param)) {\n warn(\"Unknown parameter \\\"\".concat(param, \"\\\"\"));\n }\n };\n\n var checkIfToastParamIsValid = function checkIfToastParamIsValid(param) {\n if (toastIncompatibleParams.indexOf(param) !== -1) {\n warn(\"The parameter \\\"\".concat(param, \"\\\" is incompatible with toasts\"));\n }\n };\n\n var checkIfParamIsDeprecated = function checkIfParamIsDeprecated(param) {\n if (isDeprecatedParameter(param)) {\n warnAboutDeprecation(param, isDeprecatedParameter(param));\n }\n };\n /**\n * Show relevant warnings for given params\n *\n * @param params\n */\n\n\n var showWarningsForParams = function showWarningsForParams(params) {\n for (var param in params) {\n checkIfParamIsValid(param);\n\n if (params.toast) {\n checkIfToastParamIsValid(param);\n }\n\n checkIfParamIsDeprecated(param);\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 getContent: getContent,\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 getHeader: getHeader,\n getFooter: getFooter,\n getTimerProgressBar: getTimerProgressBar,\n getFocusableElements: getFocusableElements,\n getValidationMessage: getValidationMessage,\n isLoading: isLoading,\n fire: fire,\n mixin: mixin,\n queue: queue,\n getQueueStep: getQueueStep,\n insertQueueStep: insertQueueStep,\n deleteQueueStep: deleteQueueStep,\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 /**\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 var innerParams = privateProps.innerParams.get(this);\n\n if (!innerParams) {\n return;\n }\n\n var domCache = privateProps.domCache.get(this);\n hide(domCache.loader);\n var 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 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 function getInput$1(instance) {\n var innerParams = privateProps.innerParams.get(instance || this);\n var domCache = privateProps.domCache.get(instance || this);\n\n if (!domCache) {\n return null;\n }\n\n return getInput(domCache.content, innerParams.input);\n }\n\n var fixScrollbar = function 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 var undoScrollbar = function undoScrollbar() {\n if (states.previousBodyPadding !== null) {\n document.body.style.paddingRight = \"\".concat(states.previousBodyPadding, \"px\");\n states.previousBodyPadding = null;\n }\n };\n\n /* istanbul ignore file */\n\n var iOSfix = function iOSfix() {\n var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;\n\n if (iOS && !hasClass(document.body, swalClasses.iosfix)) {\n var offset = document.body.scrollTop;\n document.body.style.top = \"\".concat(offset * -1, \"px\");\n addClass(document.body, swalClasses.iosfix);\n lockBodyScroll();\n addBottomPaddingForTallPopups(); // #1948\n }\n };\n\n var addBottomPaddingForTallPopups = function addBottomPaddingForTallPopups() {\n var safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i);\n\n if (safari) {\n var bottomPanelHeight = 44;\n\n if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) {\n getContainer().style.paddingBottom = \"\".concat(bottomPanelHeight, \"px\");\n }\n }\n };\n\n var lockBodyScroll = function lockBodyScroll() {\n // #1246\n var container = getContainer();\n var preventTouchMove;\n\n container.ontouchstart = function (e) {\n preventTouchMove = shouldPreventTouchMove(e);\n };\n\n container.ontouchmove = function (e) {\n if (preventTouchMove) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n };\n\n var shouldPreventTouchMove = function shouldPreventTouchMove(event) {\n var target = event.target;\n var container = getContainer();\n\n if (isStylys(event) || isZoom(event)) {\n return false;\n }\n\n if (target === container) {\n return true;\n }\n\n if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603\n !(isScrollable(getContent()) && // #1944\n getContent().contains(target))) {\n return true;\n }\n\n return false;\n };\n\n var isStylys = function isStylys(event) {\n // #1786\n return event.touches && event.touches.length && event.touches[0].touchType === 'stylus';\n };\n\n var isZoom = function isZoom(event) {\n // #1891\n return event.touches && event.touches.length > 1;\n };\n\n var undoIOSfix = function undoIOSfix() {\n if (hasClass(document.body, swalClasses.iosfix)) {\n var 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 /* istanbul ignore file */\n\n var isIE11 = function isIE11() {\n return !!window.MSInputMethodContext && !!document.documentMode;\n }; // Fix IE11 centering sweetalert2/issues/933\n\n\n var fixVerticalPositionIE = function fixVerticalPositionIE() {\n var container = getContainer();\n var popup = getPopup();\n container.style.removeProperty('align-items');\n\n if (popup.offsetTop < 0) {\n container.style.alignItems = 'flex-start';\n }\n };\n\n var IEfix = function IEfix() {\n if (typeof window !== 'undefined' && isIE11()) {\n fixVerticalPositionIE();\n window.addEventListener('resize', fixVerticalPositionIE);\n }\n };\n var undoIEfix = function undoIEfix() {\n if (typeof window !== 'undefined' && isIE11()) {\n window.removeEventListener('resize', fixVerticalPositionIE);\n }\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 var setAriaHidden = function setAriaHidden() {\n var bodyChildren = toArray(document.body.children);\n bodyChildren.forEach(function (el) {\n if (el === getContainer() || contains(el, 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 var unsetAriaHidden = function unsetAriaHidden() {\n var bodyChildren = toArray(document.body.children);\n bodyChildren.forEach(function (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 /**\n * This module containts `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 };\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(function () {\n return triggerDidCloseAndDispose(instance, didClose);\n });\n globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {\n capture: globalState.keydownListenerCapture\n });\n globalState.keydownHandlerAdded = false;\n }\n\n if (container.parentNode && !document.body.getAttribute('data-swal2-queue-step')) {\n container.parentNode.removeChild(container);\n }\n\n if (isModal()) {\n undoScrollbar();\n undoIOSfix();\n undoIEfix();\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 var popup = getPopup();\n\n if (!popup) {\n return;\n }\n\n resolveValue = prepareResolveValue(resolveValue);\n var innerParams = privateProps.innerParams.get(this);\n\n if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) {\n return;\n }\n\n var swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);\n removeClass(popup, innerParams.showClass.popup);\n addClass(popup, innerParams.hideClass.popup);\n var backdrop = getContainer();\n removeClass(backdrop, innerParams.showClass.backdrop);\n addClass(backdrop, innerParams.hideClass.backdrop);\n handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise\n\n swalPromiseResolve(resolveValue);\n }\n\n var prepareResolveValue = function 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 _extends({\n isConfirmed: false,\n isDenied: false,\n isDismissed: false\n }, resolveValue);\n };\n\n var handlePopupAnimation = function handlePopupAnimation(instance, popup, innerParams) {\n var container = getContainer(); // If animation is supported, animate\n\n var animationIsSupported = animationEndEvent && hasCssAnimation(popup);\n var onClose = innerParams.onClose,\n onAfterClose = innerParams.onAfterClose,\n willClose = innerParams.willClose,\n didClose = innerParams.didClose;\n runDidClose(popup, willClose, onClose);\n\n if (animationIsSupported) {\n animatePopup(instance, popup, container, innerParams.returnFocus, didClose || onAfterClose);\n } else {\n // Otherwise, remove immediately\n removePopupAndResetState(instance, container, innerParams.returnFocus, didClose || onAfterClose);\n }\n };\n\n var runDidClose = function runDidClose(popup, willClose, onClose) {\n if (willClose !== null && typeof willClose === 'function') {\n willClose(popup);\n } else if (onClose !== null && typeof onClose === 'function') {\n onClose(popup); // @deprecated\n }\n };\n\n var animatePopup = function 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 var triggerDidCloseAndDispose = function triggerDidCloseAndDispose(instance, didClose) {\n setTimeout(function () {\n if (typeof didClose === 'function') {\n didClose();\n }\n\n instance._destroy();\n });\n };\n\n function setButtonsDisabled(instance, buttons, disabled) {\n var domCache = privateProps.domCache.get(instance);\n buttons.forEach(function (button) {\n domCache[button].disabled = disabled;\n });\n }\n\n function setInputDisabled(input, disabled) {\n if (!input) {\n return false;\n }\n\n if (input.type === 'radio') {\n var radiosContainer = input.parentNode.parentNode;\n var radios = radiosContainer.querySelectorAll('input');\n\n for (var 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 return setInputDisabled(this.getInput(), false);\n }\n function disableInput() {\n return setInputDisabled(this.getInput(), true);\n }\n\n function showValidationMessage(error) {\n var domCache = privateProps.domCache.get(this);\n var 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 var 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 var domCache = privateProps.domCache.get(this);\n\n if (domCache.validationMessage) {\n hide(domCache.validationMessage);\n }\n\n var 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 var domCache = privateProps.domCache.get(this);\n return domCache.progressSteps;\n }\n\n var Timer = /*#__PURE__*/function () {\n function Timer(callback, delay) {\n _classCallCheck(this, Timer);\n\n this.callback = callback;\n this.remaining = delay;\n this.running = false;\n this.start();\n }\n\n _createClass(Timer, [{\n key: \"start\",\n value: function 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 key: \"stop\",\n value: function stop() {\n if (this.running) {\n this.running = false;\n clearTimeout(this.id);\n this.remaining -= new Date() - this.started;\n }\n\n return this.remaining;\n }\n }, {\n key: \"increase\",\n value: function increase(n) {\n var 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 key: \"getTimerLeft\",\n value: function getTimerLeft() {\n if (this.running) {\n this.stop();\n this.start();\n }\n\n return this.remaining;\n }\n }, {\n key: \"isRunning\",\n value: function isRunning() {\n return this.running;\n }\n }]);\n\n return Timer;\n }();\n\n var defaultInputValidators = {\n email: function 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 url: function 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 function setDefaultInputValidators(params) {\n // Use default `inputValidator` for supported input types if not provided\n if (!params.inputValidator) {\n Object.keys(defaultInputValidators).forEach(function (key) {\n if (params.input === key) {\n params.inputValidator = defaultInputValidators[key];\n }\n });\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 params\n * @returns {boolean}\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 } // params.animation will be actually used in renderPopup.js\n // but in case when params.animation is a function, we need to call that function\n // before popup (re)initialization, so it'll be possible to check Swal.isVisible()\n // inside the params.animation function\n\n\n params.animation = callIfFunction(params.animation);\n validateCustomTargetElement(params); // Replace newlines with
          in title\n\n if (typeof params.title === 'string') {\n params.title = params.title.split('\\n').join('
          ');\n }\n\n init(params);\n }\n\n var swalStringParams = ['swal-title', 'swal-html', 'swal-footer'];\n var getTemplateParams = function getTemplateParams(params) {\n var template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template;\n\n if (!template) {\n return {};\n }\n\n var templateContent = template.content || template; // IE11\n\n showWarningsForElements(templateContent);\n\n var result = _extends(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams));\n\n return result;\n };\n\n var getSwalParams = function getSwalParams(templateContent) {\n var result = {};\n toArray(templateContent.querySelectorAll('swal-param')).forEach(function (param) {\n showWarningsForAttributes(param, ['name', 'value']);\n var paramName = param.getAttribute('name');\n var value = param.getAttribute('value');\n\n if (typeof defaultParams[paramName] === 'boolean' && value === 'false') {\n value = false;\n }\n\n if (_typeof(defaultParams[paramName]) === 'object') {\n value = JSON.parse(value);\n }\n\n result[paramName] = value;\n });\n return result;\n };\n\n var getSwalButtons = function getSwalButtons(templateContent) {\n var result = {};\n toArray(templateContent.querySelectorAll('swal-button')).forEach(function (button) {\n showWarningsForAttributes(button, ['type', 'color', 'aria-label']);\n var 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 var getSwalImage = function getSwalImage(templateContent) {\n var result = {};\n var 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 var getSwalIcon = function getSwalIcon(templateContent) {\n var result = {};\n var icon = templateContent.querySelector('swal-icon');\n\n if (icon) {\n showWarningsForAttributes(icon, ['type', 'color']);\n\n if (icon.hasAttribute('type')) {\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 var getSwalInput = function getSwalInput(templateContent) {\n var result = {};\n var input = templateContent.querySelector('swal-input');\n\n if (input) {\n showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']);\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\n var inputOptions = templateContent.querySelectorAll('swal-input-option');\n\n if (inputOptions.length) {\n result.inputOptions = {};\n toArray(inputOptions).forEach(function (option) {\n showWarningsForAttributes(option, ['value']);\n var optionValue = option.getAttribute('value');\n var optionName = option.innerHTML;\n result.inputOptions[optionValue] = optionName;\n });\n }\n\n return result;\n };\n\n var getSwalStringParams = function getSwalStringParams(templateContent, paramNames) {\n var result = {};\n\n for (var i in paramNames) {\n var paramName = paramNames[i];\n var 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 var showWarningsForElements = function showWarningsForElements(template) {\n var allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']);\n toArray(template.querySelectorAll('*')).forEach(function (el) {\n if (el.parentNode !== template) {\n // can't use template.children because of IE11\n return;\n }\n\n var tagName = el.tagName.toLowerCase();\n\n if (allowedElements.indexOf(tagName) === -1) {\n warn(\"Unrecognized element <\".concat(tagName, \">\"));\n }\n });\n };\n\n var showWarningsForAttributes = function showWarningsForAttributes(el, allowedAttributes) {\n toArray(el.attributes).forEach(function (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 var SHOW_CLASS_TIMEOUT = 10;\n /**\n * Open popup, add necessary classes and styles, fix scrollbar\n *\n * @param params\n */\n\n var openPopup = function openPopup(params) {\n var container = getContainer();\n var popup = getPopup();\n\n if (typeof params.willOpen === 'function') {\n params.willOpen(popup);\n } else if (typeof params.onBeforeOpen === 'function') {\n params.onBeforeOpen(popup); // @deprecated\n }\n\n var bodyStyles = window.getComputedStyle(document.body);\n var initialBodyOverflow = bodyStyles.overflowY;\n addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto'\n\n setTimeout(function () {\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 runDidOpen(popup, params);\n removeClass(container, swalClasses['no-transition']);\n };\n\n var runDidOpen = function runDidOpen(popup, params) {\n if (typeof params.didOpen === 'function') {\n setTimeout(function () {\n return params.didOpen(popup);\n });\n } else if (typeof params.onOpen === 'function') {\n setTimeout(function () {\n return params.onOpen(popup);\n }); // @deprecated\n }\n };\n\n var swalOpenAnimationFinished = function swalOpenAnimationFinished(event) {\n var popup = getPopup();\n\n if (event.target !== popup) {\n return;\n }\n\n var container = getContainer();\n popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);\n container.style.overflowY = 'auto';\n };\n\n var setScrollingVisibility = function 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 var fixScrollContainer = function fixScrollContainer(container, scrollbarPadding, initialBodyOverflow) {\n iOSfix();\n IEfix();\n\n if (scrollbarPadding && initialBodyOverflow !== 'hidden') {\n fixScrollbar();\n } // sweetalert2/issues/1247\n\n\n setTimeout(function () {\n container.scrollTop = 0;\n });\n };\n\n var addClasses$1 = function addClasses(container, popup, params) {\n addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059\n\n popup.style.setProperty('opacity', '0', 'important');\n show(popup);\n setTimeout(function () {\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 handleInputOptionsAndValue = function handleInputOptionsAndValue(instance, params) {\n if (params.input === 'select' || params.input === 'radio') {\n handleInputOptions(instance, params);\n } else if (['text', 'email', 'number', 'tel', 'textarea'].indexOf(params.input) !== -1 && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {\n handleInputValue(instance, params);\n }\n };\n var getInputValue = function getInputValue(instance, innerParams) {\n var 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 var getCheckboxValue = function getCheckboxValue(input) {\n return input.checked ? 1 : 0;\n };\n\n var getRadioValue = function getRadioValue(input) {\n return input.checked ? input.value : null;\n };\n\n var getFileValue = function getFileValue(input) {\n return input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null;\n };\n\n var handleInputOptions = function handleInputOptions(instance, params) {\n var content = getContent();\n\n var processInputOptions = function processInputOptions(inputOptions) {\n return populateInputOptions[params.input](content, formatInputOptions(inputOptions), params);\n };\n\n if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {\n showLoading(getConfirmButton());\n asPromise(params.inputOptions).then(function (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 var handleInputValue = function handleInputValue(instance, params) {\n var input = instance.getInput();\n hide(input);\n asPromise(params.inputValue).then(function (inputValue) {\n input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : \"\".concat(inputValue);\n show(input);\n input.focus();\n instance.hideLoading();\n })[\"catch\"](function (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 var populateInputOptions = {\n select: function select(content, inputOptions, params) {\n var select = getChildByClass(content, swalClasses.select);\n\n var renderOption = function renderOption(parent, optionLabel, optionValue) {\n var 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(function (inputOption) {\n var optionValue = inputOption[0];\n var optionLabel = inputOption[1]; // 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 \n\n if (Array.isArray(optionLabel)) {\n // if it is an array, then it is an \n var optgroup = document.createElement('optgroup');\n optgroup.label = optionValue;\n optgroup.disabled = false; // not configurable for now\n\n select.appendChild(optgroup);\n optionLabel.forEach(function (o) {\n return renderOption(optgroup, o[1], o[0]);\n });\n } else {\n // case of \n valueFormatted = formatInputOptions(valueFormatted);\n }\n\n result.push([key, valueFormatted]);\n });\n } else {\n Object.keys(inputOptions).forEach(function (key) {\n var valueFormatted = inputOptions[key];\n\n if (_typeof(valueFormatted) === 'object') {\n // case of \n valueFormatted = formatInputOptions(valueFormatted);\n }\n\n result.push([key, valueFormatted]);\n });\n }\n\n return result;\n };\n\n var isSelected = function isSelected(optionValue, inputValue) {\n return inputValue && inputValue.toString() === optionValue.toString();\n };\n\n var handleConfirmButtonClick = function handleConfirmButtonClick(instance, innerParams) {\n instance.disableButtons();\n\n if (innerParams.input) {\n handleConfirmOrDenyWithInput(instance, innerParams, 'confirm');\n } else {\n confirm(instance, innerParams, true);\n }\n };\n var handleDenyButtonClick = function handleDenyButtonClick(instance, innerParams) {\n instance.disableButtons();\n\n if (innerParams.returnInputValueOnDeny) {\n handleConfirmOrDenyWithInput(instance, innerParams, 'deny');\n } else {\n deny(instance, innerParams, false);\n }\n };\n var handleCancelButtonClick = function handleCancelButtonClick(instance, dismissWith) {\n instance.disableButtons();\n dismissWith(DismissReason.cancel);\n };\n\n var handleConfirmOrDenyWithInput = function handleConfirmOrDenyWithInput(instance, innerParams, type\n /* type is either 'confirm' or 'deny' */\n ) {\n var inputValue = getInputValue(instance, innerParams);\n\n if (innerParams.inputValidator) {\n handleInputValidator(instance, innerParams, inputValue);\n } else if (!instance.getInput().checkValidity()) {\n instance.enableButtons();\n instance.showValidationMessage(innerParams.validationMessage);\n } else if (type === 'deny') {\n deny(instance, innerParams, inputValue);\n } else {\n confirm(instance, innerParams, inputValue);\n }\n };\n\n var handleInputValidator = function handleInputValidator(instance, innerParams, inputValue) {\n instance.disableInput();\n var validationPromise = Promise.resolve().then(function () {\n return asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage));\n });\n validationPromise.then(function (validationMessage) {\n instance.enableButtons();\n instance.enableInput();\n\n if (validationMessage) {\n instance.showValidationMessage(validationMessage);\n } else {\n confirm(instance, innerParams, inputValue);\n }\n });\n };\n\n var deny = function deny(instance, innerParams, value) {\n if (innerParams.showLoaderOnDeny) {\n showLoading(getDenyButton());\n }\n\n if (innerParams.preDeny) {\n var preDenyPromise = Promise.resolve().then(function () {\n return asPromise(innerParams.preDeny(value, innerParams.validationMessage));\n });\n preDenyPromise.then(function (preDenyValue) {\n if (preDenyValue === false) {\n instance.hideLoading();\n } else {\n instance.closePopup({\n isDenied: true,\n value: typeof preDenyValue === 'undefined' ? value : preDenyValue\n });\n }\n });\n } else {\n instance.closePopup({\n isDenied: true,\n value: value\n });\n }\n };\n\n var succeedWith = function succeedWith(instance, value) {\n instance.closePopup({\n isConfirmed: true,\n value: value\n });\n };\n\n var confirm = function confirm(instance, innerParams, value) {\n if (innerParams.showLoaderOnConfirm) {\n showLoading(); // TODO: make showLoading an *instance* method\n }\n\n if (innerParams.preConfirm) {\n instance.resetValidationMessage();\n var preConfirmPromise = Promise.resolve().then(function () {\n return asPromise(innerParams.preConfirm(value, innerParams.validationMessage));\n });\n preConfirmPromise.then(function (preConfirmValue) {\n if (isVisible(getValidationMessage()) || preConfirmValue === false) {\n instance.hideLoading();\n } else {\n succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue);\n }\n });\n } else {\n succeedWith(instance, value);\n }\n };\n\n var addKeydownHandler = function addKeydownHandler(instance, globalState, innerParams, dismissWith) {\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 if (!innerParams.toast) {\n globalState.keydownHandler = function (e) {\n return keydownHandler(instance, e, dismissWith);\n };\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 }; // Focus handling\n\n var setFocus = function setFocus(innerParams, index, increment) {\n var 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 var arrowKeysNextButton = ['ArrowRight', 'ArrowDown', 'Right', 'Down' // IE11\n ];\n var arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp', 'Left', 'Up' // IE11\n ];\n var escKeys = ['Escape', 'Esc' // IE11\n ];\n\n var keydownHandler = function keydownHandler(instance, e, dismissWith) {\n var innerParams = privateProps.innerParams.get(instance);\n\n if (!innerParams) {\n return; // This instance has already been destroyed\n }\n\n if (innerParams.stopKeydownPropagation) {\n e.stopPropagation();\n } // ENTER\n\n\n if (e.key === 'Enter') {\n handleEnter(instance, e, innerParams); // TAB\n } else if (e.key === 'Tab') {\n handleTab(e, innerParams); // ARROWS - switch focus between buttons\n } else if ([].concat(arrowKeysNextButton, arrowKeysPreviousButton).indexOf(e.key) !== -1) {\n handleArrows(e.key); // ESC\n } else if (escKeys.indexOf(e.key) !== -1) {\n handleEsc(e, innerParams, dismissWith);\n }\n };\n\n var handleEnter = function handleEnter(instance, e, innerParams) {\n // #720 #721\n if (e.isComposing) {\n return;\n }\n\n if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) {\n if (['textarea', 'file'].indexOf(innerParams.input) !== -1) {\n return; // do not submit\n }\n\n clickConfirm();\n e.preventDefault();\n }\n };\n\n var handleTab = function handleTab(e, innerParams) {\n var targetElement = e.target;\n var focusableElements = getFocusableElements();\n var btnIndex = -1;\n\n for (var i = 0; i < focusableElements.length; i++) {\n if (targetElement === focusableElements[i]) {\n btnIndex = i;\n break;\n }\n }\n\n if (!e.shiftKey) {\n // Cycle to the next button\n setFocus(innerParams, btnIndex, 1);\n } else {\n // Cycle to the prev button\n setFocus(innerParams, btnIndex, -1);\n }\n\n e.stopPropagation();\n e.preventDefault();\n };\n\n var handleArrows = function handleArrows(key) {\n var confirmButton = getConfirmButton();\n var denyButton = getDenyButton();\n var cancelButton = getCancelButton();\n\n if (!([confirmButton, denyButton, cancelButton].indexOf(document.activeElement) !== -1)) {\n return;\n }\n\n var sibling = arrowKeysNextButton.indexOf(key) !== -1 ? 'nextElementSibling' : 'previousElementSibling';\n var buttonToFocus = document.activeElement[sibling];\n\n if (buttonToFocus) {\n buttonToFocus.focus();\n }\n };\n\n var handleEsc = function handleEsc(e, innerParams, dismissWith) {\n if (callIfFunction(innerParams.allowEscapeKey)) {\n e.preventDefault();\n dismissWith(DismissReason.esc);\n }\n };\n\n var handlePopupClick = function handlePopupClick(instance, domCache, dismissWith) {\n var 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 var handleToastClick = function handleToastClick(instance, domCache, dismissWith) {\n // Closing toast by internal click\n domCache.popup.onclick = function () {\n var innerParams = privateProps.innerParams.get(instance);\n\n if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) {\n return;\n }\n\n dismissWith(DismissReason.close);\n };\n };\n\n var ignoreOutsideClick = false;\n\n var handleModalMousedown = function handleModalMousedown(domCache) {\n domCache.popup.onmousedown = function () {\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 var handleContainerMousedown = function handleContainerMousedown(domCache) {\n domCache.container.onmousedown = function () {\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 var handleModalClick = function handleModalClick(instance, domCache, dismissWith) {\n domCache.container.onclick = function (e) {\n var 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 function _main(userParams) {\n var mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n showWarningsForParams(_extends({}, mixinParams, userParams));\n\n if (globalState.currentInstance) {\n globalState.currentInstance._destroy();\n }\n\n globalState.currentInstance = this;\n var 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 var domCache = populateDomCache(this);\n render(this, innerParams);\n privateProps.innerParams.set(this, innerParams);\n return swalPromise(this, domCache, innerParams);\n }\n\n var prepareParams = function prepareParams(userParams, mixinParams) {\n var templateParams = getTemplateParams(userParams);\n\n var params = _extends({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131\n\n\n params.showClass = _extends({}, defaultParams.showClass, params.showClass);\n params.hideClass = _extends({}, defaultParams.hideClass, params.hideClass); // @deprecated\n\n if (userParams.animation === false) {\n params.showClass = {\n popup: 'swal2-noanimation',\n backdrop: 'swal2-noanimation'\n };\n params.hideClass = {};\n }\n\n return params;\n };\n\n var swalPromise = function swalPromise(instance, domCache, innerParams) {\n return new Promise(function (resolve) {\n // functions to handle all closings/dismissals\n var dismissWith = function dismissWith(dismiss) {\n instance.closePopup({\n isDismissed: true,\n dismiss: dismiss\n });\n };\n\n privateMethods.swalPromiseResolve.set(instance, resolve);\n\n domCache.confirmButton.onclick = function () {\n return handleConfirmButtonClick(instance, innerParams);\n };\n\n domCache.denyButton.onclick = function () {\n return handleDenyButtonClick(instance, innerParams);\n };\n\n domCache.cancelButton.onclick = function () {\n return handleCancelButtonClick(instance, dismissWith);\n };\n\n domCache.closeButton.onclick = function () {\n return 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(function () {\n domCache.container.scrollTop = 0;\n });\n });\n };\n\n var populateDomCache = function populateDomCache(instance) {\n var domCache = {\n popup: getPopup(),\n container: getContainer(),\n content: getContent(),\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 var setupTimer = function setupTimer(globalState$$1, innerParams, dismissWith) {\n var timerProgressBar = getTimerProgressBar();\n hide(timerProgressBar);\n\n if (innerParams.timer) {\n globalState$$1.timeout = new Timer(function () {\n dismissWith('timer');\n delete globalState$$1.timeout;\n }, innerParams.timer);\n\n if (innerParams.timerProgressBar) {\n show(timerProgressBar);\n setTimeout(function () {\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 var initFocus = function initFocus(domCache, innerParams) {\n if (innerParams.toast) {\n return;\n }\n\n if (!callIfFunction(innerParams.allowEnterKey)) {\n return blurActiveElement();\n }\n\n if (!focusButton(domCache, innerParams)) {\n setFocus(innerParams, -1, 1);\n }\n };\n\n var focusButton = function 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 var blurActiveElement = function blurActiveElement() {\n if (document.activeElement && typeof document.activeElement.blur === 'function') {\n document.activeElement.blur();\n }\n };\n\n /**\n * Updates popup parameters.\n */\n\n function update(params) {\n var popup = getPopup();\n var 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 var validUpdatableParams = {}; // assign valid params from `params` to `defaults`\n\n Object.keys(params).forEach(function (param) {\n if (Swal.isUpdatableParameter(param)) {\n validUpdatableParams[param] = params[param];\n } else {\n warn(\"Invalid parameter to update: \\\"\".concat(param, \"\\\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\\n\\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md\"));\n }\n });\n\n var updatedParams = _extends({}, innerParams, validUpdatableParams);\n\n render(this, updatedParams);\n privateProps.innerParams.set(this, updatedParams);\n Object.defineProperties(this, {\n params: {\n value: _extends({}, this.params, params),\n writable: false,\n enumerable: true\n }\n });\n }\n\n function _destroy() {\n var domCache = privateProps.domCache.get(this);\n var innerParams = privateProps.innerParams.get(this);\n\n if (!innerParams) {\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 } // Check if there is a swal disposal defer timer\n\n\n if (globalState.deferDisposalTimer) {\n clearTimeout(globalState.deferDisposalTimer);\n delete globalState.deferDisposalTimer;\n }\n\n runDidDestroy(innerParams);\n disposeSwal(this);\n }\n\n var runDidDestroy = function runDidDestroy(innerParams) {\n if (typeof innerParams.didDestroy === 'function') {\n innerParams.didDestroy();\n } else if (typeof innerParams.onDestroy === 'function') {\n innerParams.onDestroy(); // @deprecated\n }\n };\n\n var disposeSwal = function disposeSwal(instance) {\n // Unset this.params so GC will dispose it (#1569)\n delete instance.params; // Unset globalState props so GC will dispose globalState (#1569)\n\n delete globalState.keydownHandler;\n delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569)\n\n unsetWeakMaps(privateProps);\n unsetWeakMaps(privateMethods);\n };\n\n var unsetWeakMaps = function unsetWeakMaps(obj) {\n for (var i in obj) {\n obj[i] = new WeakMap();\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 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 _main: _main,\n update: update,\n _destroy: _destroy\n });\n\n var currentInstance;\n\n var SweetAlert = /*#__PURE__*/function () {\n function SweetAlert() {\n _classCallCheck(this, SweetAlert);\n\n // Prevent run in Node env\n if (typeof window === 'undefined') {\n return;\n } // Check for the existence of Promise\n\n\n if (typeof Promise === 'undefined') {\n error('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)');\n }\n\n currentInstance = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var 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 });\n\n var promise = this._main(this.params);\n\n privateProps.promise.set(this, promise);\n } // `catch` cannot be the name of a module export, so we define our thenable methods here instead\n\n\n _createClass(SweetAlert, [{\n key: \"then\",\n value: function then(onFulfilled) {\n var promise = privateProps.promise.get(this);\n return promise.then(onFulfilled);\n }\n }, {\n key: \"finally\",\n value: function _finally(onFinally) {\n var promise = privateProps.promise.get(this);\n return promise[\"finally\"](onFinally);\n }\n }]);\n\n return SweetAlert;\n }(); // Assign instance methods from src/instanceMethods/*.js to prototype\n\n\n _extends(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor\n\n\n _extends(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility\n\n\n Object.keys(instanceMethods).forEach(function (key) {\n SweetAlert[key] = function () {\n if (currentInstance) {\n var _currentInstance;\n\n return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments);\n }\n };\n });\n SweetAlert.DismissReason = DismissReason;\n SweetAlert.version = '10.16.7';\n\n var Swal = SweetAlert;\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\n\"undefined\"!=typeof document&&function(e,t){var n=e.createElement(\"style\");if(e.getElementsByTagName(\"head\")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,\".swal2-popup.swal2-toast{flex-direction:column;align-items:stretch;width:auto;padding:1.25em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9}.swal2-popup.swal2-toast .swal2-header{flex-direction:row;padding:0}.swal2-popup.swal2-toast .swal2-title{flex-grow:1;justify-content:flex-start;margin:0 .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{position:static;width:.8em;height:.8em;line-height:.8}.swal2-popup.swal2-toast .swal2-content{justify-content:flex-start;margin:0 .625em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container{padding:.625em 0 0}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{font-size:.25em}}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{flex:1;flex-basis:auto!important;align-self:stretch;width:auto;height:2.2em;height:auto;margin:0 .3125em;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.125em .3125em;padding:.3125em .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:flex;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;flex-direction:row;align-items:center;justify-content:center;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-top{align-items:flex-start}.swal2-container.swal2-top-left,.swal2-container.swal2-top-start{align-items:flex-start;justify-content:flex-start}.swal2-container.swal2-top-end,.swal2-container.swal2-top-right{align-items:flex-start;justify-content:flex-end}.swal2-container.swal2-center{align-items:center}.swal2-container.swal2-center-left,.swal2-container.swal2-center-start{align-items:center;justify-content:flex-start}.swal2-container.swal2-center-end,.swal2-container.swal2-center-right{align-items:center;justify-content:flex-end}.swal2-container.swal2-bottom{align-items:flex-end}.swal2-container.swal2-bottom-left,.swal2-container.swal2-bottom-start{align-items:flex-end;justify-content:flex-start}.swal2-container.swal2-bottom-end,.swal2-container.swal2-bottom-right{align-items:flex-end;justify-content:flex-end}.swal2-container.swal2-bottom-end>:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-no-transition{transition:none!important}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:5px;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center;padding:0 1.8em}.swal2-title{position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#2778c4;color:#fff;font-size:1em}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#d14529;color:#fff;font-size:1em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#757575;color:#fff;font-size:1em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;align-items:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0 1.6em;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto}.swal2-validation-message{align-items:center;justify-content:center;margin:0 -2.7em;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\\\"!\\\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}\");","/*\n * This file is part of justoverclock/flarum-ext-guestengagement.\n *\n * Copyright (c) 2021 Marco Colia.\n * https://flarum.it\n *\n * For the full copyright and license information, please view the LICENSE.md\n * file that was distributed with this source code.\n */\n\nimport { extend } from 'flarum/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport app from 'flarum/app';\nimport Swal from 'sweetalert2';\n\napp.initializers.add('justoverclock/flarum-ext-newsletter', () => {\n extend(IndexPage.prototype, 'navItems', (navItems) => {\n if (app.current.matches(IndexPage))\n navItems.add(\n 'Newsletter',\n m(\n 'div',\n { className: 'alignews' },\n m('h1', { id: 'titleNl' }, ['News', m('span', '.letter')]),\n m('p', { className: 'descNl' }, app.translator.trans('flarum-ext-newsletter.forum.subscribe')),\n m('form', { id: 'subscribeForm' }, [\n m('input', { className: 'fieldinp', id: 'email-input', type: 'email', placeholder: 'Subscribe to Flarum' }),\n m('button', { className: 'subscbutt', type: 'submit' }, app.translator.trans('flarum-ext-newsletter.forum.submitbutton')),\n ])\n ),\n -100\n );\n });\n});\nextend(IndexPage.prototype, 'oncreate', function () {\n function SetupNewsletterSubscribe(publicAccountId, listName, formId, onSuccess) {\n var eeUrl = 'https://api.elasticemail.com/contact/add?version=2';\n var email = jQuery('#email-input');\n var form = jQuery('#' + formId).submit(function (event) {\n event.preventDefault();\n jQuery\n .post(\n eeUrl,\n {\n email: email.val(),\n publicAccountId: publicAccountId,\n listName: listName,\n },\n function () {},\n 'json'\n )\n .done(function (result) {\n if (result.success === true) {\n onSuccess();\n }\n })\n .fail(function () {\n // e se fallisce?...\n });\n });\n }\n jQuery(function () {\n const pubAcc = app.forum.attribute('PubAccount');\n const listmail = app.forum.attribute('ListName');\n SetupNewsletterSubscribe(pubAcc, listmail, 'subscribeForm', function () {\n // Ripuliamo il form dopo essere stato inviato!\n Swal.fire('Thank You!', 'You are now subscribed to our Newsletter!', 'success');\n document.getElementById('subscribeForm').reset();\n });\n });\n});\n"],"sourceRoot":""} \ No newline at end of file diff --git a/js/src/forum/index.js b/js/src/forum/index.js index dfc1d0a..df4f282 100644 --- a/js/src/forum/index.js +++ b/js/src/forum/index.js @@ -18,10 +18,11 @@ app.initializers.add('justoverclock/flarum-ext-newsletter', () => { if (app.current.matches(IndexPage)) navItems.add( 'Newsletter', - m('div', + m( + 'div', { className: 'alignews' }, m('h1', { id: 'titleNl' }, ['News', m('span', '.letter')]), - m('p', {className: 'descNl'}, app.translator.trans('flarum-ext-newsletter.forum.subscribe')), + m('p', { className: 'descNl' }, app.translator.trans('flarum-ext-newsletter.forum.subscribe')), m('form', { id: 'subscribeForm' }, [ m('input', { className: 'fieldinp', id: 'email-input', type: 'email', placeholder: 'Subscribe to Flarum' }), m('button', { className: 'subscbutt', type: 'submit' }, app.translator.trans('flarum-ext-newsletter.forum.submitbutton')), @@ -45,8 +46,7 @@ extend(IndexPage.prototype, 'oncreate', function () { publicAccountId: publicAccountId, listName: listName, }, - function () { - }, + function () {}, 'json' ) .done(function (result) { @@ -64,12 +64,8 @@ extend(IndexPage.prototype, 'oncreate', function () { const listmail = app.forum.attribute('ListName'); SetupNewsletterSubscribe(pubAcc, listmail, 'subscribeForm', function () { // Ripuliamo il form dopo essere stato inviato! - Swal.fire( - 'Thank You!', - 'You are now subscribed to our Newsletter!', - 'success' - ); - document.getElementById("subscribeForm").reset(); + Swal.fire('Thank You!', 'You are now subscribed to our Newsletter!', 'success'); + document.getElementById('subscribeForm').reset(); }); }); -}) +});